kwin/lib/kwinglobals.h
Luboš Luňák 5faa397849 Vertex redesign - redo the way windows are split into smaller parts
for use in effects (and not only). Now a list of window quads (=window areas)
is created at the beginning of the paint pass, prepaint calls can modify
the split itself (i.e. divide it into more parts). The actual paint calls
can then modify these quads (i.e. transform their geometry). This will allow
better control of how the split is done and also allow painting e.g. only
the decoration differently. Still work in progress, but it works.
Also pass data to prepaint functions in a struct, as there is
already quite a number of them.


svn path=/trunk/KDE/kdebase/workspace/; revision=684893
2007-07-07 14:01:32 +00:00

100 lines
2.3 KiB
C++

/*****************************************************************
KWin - the KDE window manager
This file is part of the KDE project.
Copyright (C) 2006 Lubos Lunak <l.lunak@kde.org>
You can Freely distribute this program under the GNU General Public
License. See the file "COPYING" for the exact licensing terms.
******************************************************************/
#ifndef KWIN_LIB_KWINGLOBALS_H
#define KWIN_LIB_KWINGLOBALS_H
#include <QX11Info>
#include <QPoint>
#include <qregion.h>
#include <kdemacros.h>
#include <X11/Xlib.h>
#include <fixx11h.h>
namespace KWin
{
#define KWIN_EXPORT KDE_EXPORT
enum CompositingType
{
NoCompositing = 0,
OpenGLCompositing,
XRenderCompositing
};
enum clientAreaOption
{
PlacementArea, // geometry where a window will be initially placed after being mapped
MovementArea, // ??? window movement snapping area? ignore struts
MaximizeArea, // geometry to which a window will be maximized
MaximizeFullArea, // like MaximizeArea, but ignore struts - used e.g. for topmenu
FullScreenArea, // area for fullscreen windows
// these below don't depend on xinerama settings
WorkArea, // whole workarea (all screens together)
FullArea, // whole area (all screens together), ignore struts
ScreenArea // one whole screen, ignore struts
};
enum ElectricBorder
{
ElectricTop,
ElectricTopRight,
ElectricRight,
ElectricBottomRight,
ElectricBottom,
ElectricBottomLeft,
ElectricLeft,
ElectricTopLeft,
ELECTRIC_COUNT,
ElectricNone
};
// DesktopMode and WindowsMode are based on the order in which the desktop
// or window were viewed.
// DesktopListMode lists them in the order created.
enum TabBoxMode { TabBoxDesktopMode, TabBoxDesktopListMode, TabBoxWindowsMode };
inline
KWIN_EXPORT Display* display()
{
return QX11Info::display();
}
inline
KWIN_EXPORT Window rootWindow()
{
return QX11Info::appRootWindow();
}
inline
KWIN_EXPORT Window xTime()
{
return QX11Info::appTime();
}
inline
KWIN_EXPORT int displayWidth()
{
return XDisplayWidth( display(), DefaultScreen( display()));
}
inline
KWIN_EXPORT int displayHeight()
{
return XDisplayHeight( display(), DefaultScreen( display()));
}
} // namespace
#endif