summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Kasprzyk <onestone@opencompositing.org>2008-08-13 16:52:58 +0200
committerDennis kasprzyk <onestone@opencompositing.org>2008-08-13 16:52:58 +0200
commitc9b8f6dff3c7457f5e05802335327200fa169110 (patch)
tree918f736a25b802c1b1fbc481a200ed7533615c87
parent343a9b678681205c7c2883d4824263da6a3c81cf (diff)
downloadzcomp-c9b8f6dff3c7457f5e05802335327200fa169110.tar.gz
zcomp-c9b8f6dff3c7457f5e05802335327200fa169110.tar.bz2
Moved definitions from compiz-core.h to the right headers.
-rw-r--r--include/compiz-core.h417
-rw-r--r--include/compscreen.h111
-rw-r--r--include/comptexture.h9
-rw-r--r--include/compwindow.h146
-rw-r--r--src/main.cpp2
-rw-r--r--src/privatedisplay.h71
-rw-r--r--src/privatescreen.h37
-rw-r--r--src/window.cpp1
8 files changed, 378 insertions, 416 deletions
diff --git a/include/compiz-core.h b/include/compiz-core.h
index 3d7b47a..b3dd1c6 100644
--- a/include/compiz-core.h
+++ b/include/compiz-core.h
@@ -113,96 +113,6 @@ class CompDisplay;
#define CompNoMask (1 << 25)
-#define CompWindowProtocolDeleteMask (1 << 0)
-#define CompWindowProtocolTakeFocusMask (1 << 1)
-#define CompWindowProtocolPingMask (1 << 2)
-#define CompWindowProtocolSyncRequestMask (1 << 3)
-
-#define CompWindowTypeDesktopMask (1 << 0)
-#define CompWindowTypeDockMask (1 << 1)
-#define CompWindowTypeToolbarMask (1 << 2)
-#define CompWindowTypeMenuMask (1 << 3)
-#define CompWindowTypeUtilMask (1 << 4)
-#define CompWindowTypeSplashMask (1 << 5)
-#define CompWindowTypeDialogMask (1 << 6)
-#define CompWindowTypeNormalMask (1 << 7)
-#define CompWindowTypeDropdownMenuMask (1 << 8)
-#define CompWindowTypePopupMenuMask (1 << 9)
-#define CompWindowTypeTooltipMask (1 << 10)
-#define CompWindowTypeNotificationMask (1 << 11)
-#define CompWindowTypeComboMask (1 << 12)
-#define CompWindowTypeDndMask (1 << 13)
-#define CompWindowTypeModalDialogMask (1 << 14)
-#define CompWindowTypeFullscreenMask (1 << 15)
-#define CompWindowTypeUnknownMask (1 << 16)
-
-#define NO_FOCUS_MASK (CompWindowTypeDesktopMask | \
- CompWindowTypeDockMask | \
- CompWindowTypeSplashMask)
-
-#define CompWindowStateModalMask (1 << 0)
-#define CompWindowStateStickyMask (1 << 1)
-#define CompWindowStateMaximizedVertMask (1 << 2)
-#define CompWindowStateMaximizedHorzMask (1 << 3)
-#define CompWindowStateShadedMask (1 << 4)
-#define CompWindowStateSkipTaskbarMask (1 << 5)
-#define CompWindowStateSkipPagerMask (1 << 6)
-#define CompWindowStateHiddenMask (1 << 7)
-#define CompWindowStateFullscreenMask (1 << 8)
-#define CompWindowStateAboveMask (1 << 9)
-#define CompWindowStateBelowMask (1 << 10)
-#define CompWindowStateDemandsAttentionMask (1 << 11)
-#define CompWindowStateDisplayModalMask (1 << 12)
-
-#define MAXIMIZE_STATE (CompWindowStateMaximizedHorzMask | \
- CompWindowStateMaximizedVertMask)
-
-#define CompWindowActionMoveMask (1 << 0)
-#define CompWindowActionResizeMask (1 << 1)
-#define CompWindowActionStickMask (1 << 2)
-#define CompWindowActionMinimizeMask (1 << 3)
-#define CompWindowActionMaximizeHorzMask (1 << 4)
-#define CompWindowActionMaximizeVertMask (1 << 5)
-#define CompWindowActionFullscreenMask (1 << 6)
-#define CompWindowActionCloseMask (1 << 7)
-#define CompWindowActionShadeMask (1 << 8)
-#define CompWindowActionChangeDesktopMask (1 << 9)
-#define CompWindowActionAboveMask (1 << 10)
-#define CompWindowActionBelowMask (1 << 11)
-
-#define MwmFuncAll (1L << 0)
-#define MwmFuncResize (1L << 1)
-#define MwmFuncMove (1L << 2)
-#define MwmFuncIconify (1L << 3)
-#define MwmFuncMaximize (1L << 4)
-#define MwmFuncClose (1L << 5)
-
-#define MwmDecorHandle (1L << 2)
-#define MwmDecorTitle (1L << 3)
-#define MwmDecorMenu (1L << 4)
-#define MwmDecorMinimize (1L << 5)
-#define MwmDecorMaximize (1L << 6)
-
-#define MwmDecorAll (1L << 0)
-#define MwmDecorBorder (1L << 1)
-#define MwmDecorHandle (1L << 2)
-#define MwmDecorTitle (1L << 3)
-#define MwmDecorMenu (1L << 4)
-#define MwmDecorMinimize (1L << 5)
-#define MwmDecorMaximize (1L << 6)
-
-#define WmMoveResizeSizeTopLeft 0
-#define WmMoveResizeSizeTop 1
-#define WmMoveResizeSizeTopRight 2
-#define WmMoveResizeSizeRight 3
-#define WmMoveResizeSizeBottomRight 4
-#define WmMoveResizeSizeBottom 5
-#define WmMoveResizeSizeBottomLeft 6
-#define WmMoveResizeSizeLeft 7
-#define WmMoveResizeMove 8
-#define WmMoveResizeSizeKeyboard 9
-#define WmMoveResizeMoveKeyboard 10
-
#define OPAQUE 0xffff
#define COLOR 0xffff
#define BRIGHT 0xffff
@@ -514,73 +424,7 @@ isActionOption (CompOption *option);
/* display.c */
-#define COMP_DISPLAY_OPTION_ABI 0
-#define COMP_DISPLAY_OPTION_ACTIVE_PLUGINS 1
-#define COMP_DISPLAY_OPTION_TEXTURE_FILTER 2
-#define COMP_DISPLAY_OPTION_CLICK_TO_FOCUS 3
-#define COMP_DISPLAY_OPTION_AUTORAISE 4
-#define COMP_DISPLAY_OPTION_AUTORAISE_DELAY 5
-#define COMP_DISPLAY_OPTION_CLOSE_WINDOW_KEY 6
-#define COMP_DISPLAY_OPTION_CLOSE_WINDOW_BUTTON 7
-#define COMP_DISPLAY_OPTION_MAIN_MENU_KEY 8
-#define COMP_DISPLAY_OPTION_RUN_DIALOG_KEY 9
-#define COMP_DISPLAY_OPTION_COMMAND0 10
-#define COMP_DISPLAY_OPTION_COMMAND1 11
-#define COMP_DISPLAY_OPTION_COMMAND2 12
-#define COMP_DISPLAY_OPTION_COMMAND3 13
-#define COMP_DISPLAY_OPTION_COMMAND4 14
-#define COMP_DISPLAY_OPTION_COMMAND5 15
-#define COMP_DISPLAY_OPTION_COMMAND6 16
-#define COMP_DISPLAY_OPTION_COMMAND7 17
-#define COMP_DISPLAY_OPTION_COMMAND8 18
-#define COMP_DISPLAY_OPTION_COMMAND9 19
-#define COMP_DISPLAY_OPTION_COMMAND10 20
-#define COMP_DISPLAY_OPTION_COMMAND11 21
-#define COMP_DISPLAY_OPTION_RUN_COMMAND0_KEY 22
-#define COMP_DISPLAY_OPTION_RUN_COMMAND1_KEY 23
-#define COMP_DISPLAY_OPTION_RUN_COMMAND2_KEY 24
-#define COMP_DISPLAY_OPTION_RUN_COMMAND3_KEY 25
-#define COMP_DISPLAY_OPTION_RUN_COMMAND4_KEY 26
-#define COMP_DISPLAY_OPTION_RUN_COMMAND5_KEY 27
-#define COMP_DISPLAY_OPTION_RUN_COMMAND6_KEY 28
-#define COMP_DISPLAY_OPTION_RUN_COMMAND7_KEY 29
-#define COMP_DISPLAY_OPTION_RUN_COMMAND8_KEY 30
-#define COMP_DISPLAY_OPTION_RUN_COMMAND9_KEY 31
-#define COMP_DISPLAY_OPTION_RUN_COMMAND10_KEY 32
-#define COMP_DISPLAY_OPTION_RUN_COMMAND11_KEY 33
-#define COMP_DISPLAY_OPTION_SLOW_ANIMATIONS_KEY 34
-#define COMP_DISPLAY_OPTION_RAISE_WINDOW_KEY 35
-#define COMP_DISPLAY_OPTION_RAISE_WINDOW_BUTTON 36
-#define COMP_DISPLAY_OPTION_LOWER_WINDOW_KEY 37
-#define COMP_DISPLAY_OPTION_LOWER_WINDOW_BUTTON 38
-#define COMP_DISPLAY_OPTION_UNMAXIMIZE_WINDOW_KEY 39
-#define COMP_DISPLAY_OPTION_MINIMIZE_WINDOW_KEY 40
-#define COMP_DISPLAY_OPTION_MINIMIZE_WINDOW_BUTTON 41
-#define COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW_KEY 42
-#define COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW_HORZ_KEY 43
-#define COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW_VERT_KEY 44
-#define COMP_DISPLAY_OPTION_SCREENSHOT 45
-#define COMP_DISPLAY_OPTION_RUN_SCREENSHOT_KEY 46
-#define COMP_DISPLAY_OPTION_WINDOW_SCREENSHOT 47
-#define COMP_DISPLAY_OPTION_RUN_WINDOW_SCREENSHOT_KEY 48
-#define COMP_DISPLAY_OPTION_WINDOW_MENU_BUTTON 49
-#define COMP_DISPLAY_OPTION_WINDOW_MENU_KEY 50
-#define COMP_DISPLAY_OPTION_SHOW_DESKTOP_KEY 51
-#define COMP_DISPLAY_OPTION_SHOW_DESKTOP_EDGE 52
-#define COMP_DISPLAY_OPTION_RAISE_ON_CLICK 53
-#define COMP_DISPLAY_OPTION_AUDIBLE_BELL 54
-#define COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_KEY 55
-#define COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_BUTTON 56
-#define COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_HORZ_KEY 57
-#define COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_VERT_KEY 58
-#define COMP_DISPLAY_OPTION_HIDE_SKIP_TASKBAR_WINDOWS 59
-#define COMP_DISPLAY_OPTION_TOGGLE_WINDOW_SHADED_KEY 60
-#define COMP_DISPLAY_OPTION_IGNORE_HINTS_WHEN_MAXIMIZED 61
-#define COMP_DISPLAY_OPTION_TERMINAL 62
-#define COMP_DISPLAY_OPTION_RUN_TERMINAL_KEY 63
-#define COMP_DISPLAY_OPTION_PING_DELAY 64
-#define COMP_DISPLAY_OPTION_EDGE_DELAY 65
-#define COMP_DISPLAY_OPTION_NUM 66
+
typedef void (*ForEachWindowProc) (CompWindow *window,
void *closure);
@@ -736,22 +580,6 @@ typedef struct _WindowPaintAttrib {
extern ScreenPaintAttrib defaultScreenPaintAttrib;
extern WindowPaintAttrib defaultWindowPaintAttrib;
-#define COMP_TEX_COORD_X(m, vx) ((m)->xx * (vx) + (m)->x0)
-#define COMP_TEX_COORD_Y(m, vy) ((m)->yy * (vy) + (m)->y0)
-
-#define COMP_TEX_COORD_XY(m, vx, vy) \
- ((m)->xx * (vx) + (m)->xy * (vy) + (m)->x0)
-#define COMP_TEX_COORD_YX(m, vx, vy) \
- ((m)->yx * (vx) + (m)->yy * (vy) + (m)->y0)
-
-#define PAINT_SCREEN_REGION_MASK (1 << 0)
-#define PAINT_SCREEN_FULL_MASK (1 << 1)
-#define PAINT_SCREEN_TRANSFORMED_MASK (1 << 2)
-#define PAINT_SCREEN_WITH_TRANSFORMED_WINDOWS_MASK (1 << 3)
-#define PAINT_SCREEN_CLEAR_MASK (1 << 4)
-#define PAINT_SCREEN_NO_OCCLUSION_DETECTION_MASK (1 << 5)
-#define PAINT_SCREEN_NO_BACKGROUND_MASK (1 << 6)
-
typedef void (*WalkerFiniProc) (CompScreen *screen,
@@ -770,57 +598,6 @@ struct _CompWalker {
WalkStepProc prev;
};
-/*
- window paint flags
-
- bit 1-16 are used for read-only flags and they provide
- information that describe the screen rendering pass
- currently in process.
-
- bit 17-32 are writable flags and they provide information
- that is used to optimize rendering.
-*/
-
-/*
- this flag is present when window is being painted
- on a transformed screen.
-*/
-#define PAINT_WINDOW_ON_TRANSFORMED_SCREEN_MASK (1 << 0)
-
-/*
- this flag is present when window is being tested
- for occlusion of other windows.
-*/
-#define PAINT_WINDOW_OCCLUSION_DETECTION_MASK (1 << 1)
-
-/*
- this flag indicates that the window ist painted with
- an offset
-*/
-#define PAINT_WINDOW_WITH_OFFSET_MASK (1 << 2)
-
-/*
- flag indicate that window is translucent.
-*/
-#define PAINT_WINDOW_TRANSLUCENT_MASK (1 << 16)
-
-/*
- flag indicate that window is transformed.
-*/
-#define PAINT_WINDOW_TRANSFORMED_MASK (1 << 17)
-
-/*
- flag indicate that core PaintWindow function should
- not draw this window.
-*/
-#define PAINT_WINDOW_NO_CORE_INSTANCE_MASK (1 << 18)
-
-/*
- flag indicate that blending is required.
-*/
-#define PAINT_WINDOW_BLEND_MASK (1 << 19)
-
-
/* XXX: prepareXCoords will be removed */
void
@@ -830,196 +607,9 @@ prepareXCoords (CompScreen *screen,
/* screen.c */
-#define COMP_SCREEN_OPTION_DETECT_REFRESH_RATE 0
-#define COMP_SCREEN_OPTION_LIGHTING 1
-#define COMP_SCREEN_OPTION_REFRESH_RATE 2
-#define COMP_SCREEN_OPTION_HSIZE 3
-#define COMP_SCREEN_OPTION_VSIZE 4
-#define COMP_SCREEN_OPTION_OPACITY_STEP 5
-#define COMP_SCREEN_OPTION_UNREDIRECT_FS 6
-#define COMP_SCREEN_OPTION_DEFAULT_ICON 7
-#define COMP_SCREEN_OPTION_SYNC_TO_VBLANK 8
-#define COMP_SCREEN_OPTION_NUMBER_OF_DESKTOPS 9
-#define COMP_SCREEN_OPTION_DETECT_OUTPUTS 10
-#define COMP_SCREEN_OPTION_OUTPUTS 11
-#define COMP_SCREEN_OPTION_OVERLAPPING_OUTPUTS 12
-#define COMP_SCREEN_OPTION_FOCUS_PREVENTION_LEVEL 13
-#define COMP_SCREEN_OPTION_FOCUS_PREVENTION_MATCH 14
-#define COMP_SCREEN_OPTION_TEXTURE_COMPRESSION 15
-#define COMP_SCREEN_OPTION_FORCE_INDEPENDENT 16
-#define COMP_SCREEN_OPTION_NUM 17
-
-#ifndef GLX_EXT_texture_from_pixmap
-#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0
-#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1
-#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2
-#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3
-#define GLX_Y_INVERTED_EXT 0x20D4
-#define GLX_TEXTURE_FORMAT_EXT 0x20D5
-#define GLX_TEXTURE_TARGET_EXT 0x20D6
-#define GLX_MIPMAP_TEXTURE_EXT 0x20D7
-#define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8
-#define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9
-#define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA
-#define GLX_TEXTURE_1D_BIT_EXT 0x00000001
-#define GLX_TEXTURE_2D_BIT_EXT 0x00000002
-#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
-#define GLX_TEXTURE_1D_EXT 0x20DB
-#define GLX_TEXTURE_2D_EXT 0x20DC
-#define GLX_TEXTURE_RECTANGLE_EXT 0x20DD
-#define GLX_FRONT_LEFT_EXT 0x20DE
-#endif
-
-#define OUTPUT_OVERLAP_MODE_SMART 0
-#define OUTPUT_OVERLAP_MODE_PREFER_LARGER 1
-#define OUTPUT_OVERLAP_MODE_PREFER_SMALLER 2
-#define OUTPUT_OVERLAP_MODE_LAST OUTPUT_OVERLAP_MODE_PREFER_SMALLER
-
-#define FOCUS_PREVENTION_LEVEL_NONE 0
-#define FOCUS_PREVENTION_LEVEL_LOW 1
-#define FOCUS_PREVENTION_LEVEL_HIGH 2
-#define FOCUS_PREVENTION_LEVEL_VERYHIGH 3
-#define FOCUS_PREVENTION_LEVEL_LAST FOCUS_PREVENTION_LEVEL_VERYHIGH
-
-typedef void (*FuncPtr) (void);
-typedef FuncPtr (*GLXGetProcAddressProc) (const GLubyte *procName);
-
-typedef void (*GLXBindTexImageProc) (Display *display,
- GLXDrawable drawable,
- int buffer,
- int *attribList);
-typedef void (*GLXReleaseTexImageProc) (Display *display,
- GLXDrawable drawable,
- int buffer);
-typedef void (*GLXQueryDrawableProc) (Display *display,
- GLXDrawable drawable,
- int attribute,
- unsigned int *value);
-
-typedef void (*GLXCopySubBufferProc) (Display *display,
- GLXDrawable drawable,
- int x,
- int y,
- int width,
- int height);
-
-typedef int (*GLXGetVideoSyncProc) (unsigned int *count);
-typedef int (*GLXWaitVideoSyncProc) (int divisor,
- int remainder,
- unsigned int *count);
-
-#ifndef GLX_VERSION_1_3
-typedef struct __GLXFBConfigRec *GLXFBConfig;
-#endif
-
-typedef GLXFBConfig *(*GLXGetFBConfigsProc) (Display *display,
- int screen,
- int *nElements);
-typedef int (*GLXGetFBConfigAttribProc) (Display *display,
- GLXFBConfig config,
- int attribute,
- int *value);
-typedef GLXPixmap (*GLXCreatePixmapProc) (Display *display,
- GLXFBConfig config,
- Pixmap pixmap,
- const int *attribList);
-
-typedef void (*GLActiveTextureProc) (GLenum texture);
-typedef void (*GLClientActiveTextureProc) (GLenum texture);
-typedef void (*GLMultiTexCoord2fProc) (GLenum, GLfloat, GLfloat);
-
-typedef void (*GLGenProgramsProc) (GLsizei n,
- GLuint *programs);
-typedef void (*GLDeleteProgramsProc) (GLsizei n,
- GLuint *programs);
-typedef void (*GLBindProgramProc) (GLenum target,
- GLuint program);
-typedef void (*GLProgramStringProc) (GLenum target,
- GLenum format,
- GLsizei len,
- const GLvoid *string);
-typedef void (*GLProgramParameter4fProc) (GLenum target,
- GLuint index,
- GLfloat x,
- GLfloat y,
- GLfloat z,
- GLfloat w);
-typedef void (*GLGetProgramivProc) (GLenum target,
- GLenum pname,
- int *params);
-
-typedef void (*GLGenFramebuffersProc) (GLsizei n,
- GLuint *framebuffers);
-typedef void (*GLDeleteFramebuffersProc) (GLsizei n,
- GLuint *framebuffers);
-typedef void (*GLBindFramebufferProc) (GLenum target,
- GLuint framebuffer);
-typedef GLenum (*GLCheckFramebufferStatusProc) (GLenum target);
-typedef void (*GLFramebufferTexture2DProc) (GLenum target,
- GLenum attachment,
- GLenum textarget,
- GLuint texture,
- GLint level);
-typedef void (*GLGenerateMipmapProc) (GLenum target);
#define MAX_DEPTH 32
-
-
-typedef Bool (*DamageWindowRectProc) (CompWindow *w,
- Bool initial,
- BoxPtr rect);
-
-typedef Bool (*DamageWindowRegionProc) (CompWindow *w,
- Region region);
-
-
-typedef void (*GetOutputExtentsForWindowProc) (CompWindow *w,
- CompWindowExtents *output);
-
-typedef void (*GetAllowedActionsForWindowProc) (CompWindow *w,
- unsigned int *setActions,
- unsigned int *clearActions);
-
-typedef Bool (*FocusWindowProc) (CompWindow *window);
-
-typedef void (*ActivateWindowProc) (CompWindow *window);
-
-typedef Bool (*PlaceWindowProc) (CompWindow *window,
- int x,
- int y,
- int *newX,
- int *newY);
-
-typedef void (*ValidateWindowResizeRequestProc) (CompWindow *window,
- unsigned int *mask,
- XWindowChanges *xwc);
-
-typedef void (*WindowResizeNotifyProc) (CompWindow *window,
- int dx,
- int dy,
- int dwidth,
- int dheight);
-
-typedef void (*WindowMoveNotifyProc) (CompWindow *window,
- int dx,
- int dy,
- Bool immediate);
-
-#define CompWindowGrabKeyMask (1 << 0)
-#define CompWindowGrabButtonMask (1 << 1)
-#define CompWindowGrabMoveMask (1 << 2)
-#define CompWindowGrabResizeMask (1 << 3)
-
-
-
-
-
-#define COMP_SCREEN_DAMAGE_PENDING_MASK (1 << 0)
-#define COMP_SCREEN_DAMAGE_REGION_MASK (1 << 1)
-#define COMP_SCREEN_DAMAGE_ALL_MASK (1 << 2)
-
-
typedef struct _CompGroup {
struct _CompGroup *next;
unsigned int refCnt;
@@ -1374,11 +964,6 @@ typedef struct _CompMetadataOptionInfo {
CompActionCallBackProc terminate;
} CompMetadataOptionInfo;
-extern const CompMetadataOptionInfo
-coreDisplayOptionInfo[COMP_DISPLAY_OPTION_NUM];
-extern const CompMetadataOptionInfo
-coreScreenOptionInfo[COMP_SCREEN_OPTION_NUM];
-
struct _CompMetadata {
char *path;
xmlDoc **doc;
diff --git a/include/compscreen.h b/include/compscreen.h
index 42b5066..59f5a9d 100644
--- a/include/compscreen.h
+++ b/include/compscreen.h
@@ -10,6 +10,117 @@ class PrivateScreen;
#define GET_CORE_SCREEN(object) (dynamic_cast<CompScreen *> (object))
#define CORE_SCREEN(object) CompScreen *s = GET_CORE_SCREEN (object)
+#define PAINT_SCREEN_REGION_MASK (1 << 0)
+#define PAINT_SCREEN_FULL_MASK (1 << 1)
+#define PAINT_SCREEN_TRANSFORMED_MASK (1 << 2)
+#define PAINT_SCREEN_WITH_TRANSFORMED_WINDOWS_MASK (1 << 3)
+#define PAINT_SCREEN_CLEAR_MASK (1 << 4)
+#define PAINT_SCREEN_NO_OCCLUSION_DETECTION_MASK (1 << 5)
+#define PAINT_SCREEN_NO_BACKGROUND_MASK (1 << 6)
+
+#ifndef GLX_EXT_texture_from_pixmap
+#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0
+#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1
+#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2
+#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3
+#define GLX_Y_INVERTED_EXT 0x20D4
+#define GLX_TEXTURE_FORMAT_EXT 0x20D5
+#define GLX_TEXTURE_TARGET_EXT 0x20D6
+#define GLX_MIPMAP_TEXTURE_EXT 0x20D7
+#define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8
+#define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9
+#define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA
+#define GLX_TEXTURE_1D_BIT_EXT 0x00000001
+#define GLX_TEXTURE_2D_BIT_EXT 0x00000002
+#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
+#define GLX_TEXTURE_1D_EXT 0x20DB
+#define GLX_TEXTURE_2D_EXT 0x20DC
+#define GLX_TEXTURE_RECTANGLE_EXT 0x20DD
+#define GLX_FRONT_LEFT_EXT 0x20DE
+#endif
+
+typedef void (*FuncPtr) (void);
+typedef FuncPtr (*GLXGetProcAddressProc) (const GLubyte *procName);
+
+typedef void (*GLXBindTexImageProc) (Display *display,
+ GLXDrawable drawable,
+ int buffer,
+ int *attribList);
+typedef void (*GLXReleaseTexImageProc) (Display *display,
+ GLXDrawable drawable,
+ int buffer);
+typedef void (*GLXQueryDrawableProc) (Display *display,
+ GLXDrawable drawable,
+ int attribute,
+ unsigned int *value);
+
+typedef void (*GLXCopySubBufferProc) (Display *display,
+ GLXDrawable drawable,
+ int x,
+ int y,
+ int width,
+ int height);
+
+typedef int (*GLXGetVideoSyncProc) (unsigned int *count);
+typedef int (*GLXWaitVideoSyncProc) (int divisor,
+ int remainder,
+ unsigned int *count);
+
+#ifndef GLX_VERSION_1_3
+typedef struct __GLXFBConfigRec *GLXFBConfig;
+#endif
+
+typedef GLXFBConfig *(*GLXGetFBConfigsProc) (Display *display,
+ int screen,
+ int *nElements);
+typedef int (*GLXGetFBConfigAttribProc) (Display *display,
+ GLXFBConfig config,
+ int attribute,
+ int *value);
+typedef GLXPixmap (*GLXCreatePixmapProc) (Display *display,
+ GLXFBConfig config,
+ Pixmap pixmap,
+ const int *attribList);
+
+typedef void (*GLActiveTextureProc) (GLenum texture);
+typedef void (*GLClientActiveTextureProc) (GLenum texture);
+typedef void (*GLMultiTexCoord2fProc) (GLenum, GLfloat, GLfloat);
+
+typedef void (*GLGenProgramsProc) (GLsizei n,
+ GLuint *programs);
+typedef void (*GLDeleteProgramsProc) (GLsizei n,
+ GLuint *programs);
+typedef void (*GLBindProgramProc) (GLenum target,
+ GLuint program);
+typedef void (*GLProgramStringProc) (GLenum target,
+ GLenum format,
+ GLsizei len,
+ const GLvoid *string);
+typedef void (*GLProgramParameter4fProc) (GLenum target,
+ GLuint index,
+ GLfloat x,
+ GLfloat y,
+ GLfloat z,
+ GLfloat w);
+typedef void (*GLGetProgramivProc) (GLenum target,
+ GLenum pname,
+ int *params);
+
+typedef void (*GLGenFramebuffersProc) (GLsizei n,
+ GLuint *framebuffers);
+typedef void (*GLDeleteFramebuffersProc) (GLsizei n,
+ GLuint *framebuffers);
+typedef void (*GLBindFramebufferProc) (GLenum target,
+ GLuint framebuffer);
+typedef GLenum (*GLCheckFramebufferStatusProc) (GLenum target);
+typedef void (*GLFramebufferTexture2DProc) (GLenum target,
+ GLenum attachment,
+ GLenum textarget,
+ GLuint texture,
+ GLint level);
+typedef void (*GLGenerateMipmapProc) (GLenum target);
+
+
class ScreenInterface : public WrapableInterface<CompScreen> {
public:
ScreenInterface ();
diff --git a/include/comptexture.h b/include/comptexture.h
index b31a2a4..7bc3ba5 100644
--- a/include/comptexture.h
+++ b/include/comptexture.h
@@ -9,6 +9,15 @@
#define POWER_OF_TWO(v) ((v & (v - 1)) == 0)
+#define COMP_TEX_COORD_X(m, vx) ((m)->xx * (vx) + (m)->x0)
+#define COMP_TEX_COORD_Y(m, vy) ((m)->yy * (vy) + (m)->y0)
+
+#define COMP_TEX_COORD_XY(m, vx, vy) \
+ ((m)->xx * (vx) + (m)->xy * (vy) + (m)->x0)
+#define COMP_TEX_COORD_YX(m, vx, vy) \
+ ((m)->yx * (vx) + (m)->yy * (vy) + (m)->y0)
+
+
class CompScreen;
class PrivateTexture;
diff --git a/include/compwindow.h b/include/compwindow.h
index 28d5a78..a213587 100644
--- a/include/compwindow.h
+++ b/include/compwindow.h
@@ -11,6 +11,152 @@ class PrivateWindow;
#define GET_CORE_WINDOW(object) (dynamic_cast<CompWindow *> (object))
#define CORE_WINDOW(object) CompWindow *w = GET_CORE_WINDOW (object)
+#define CompWindowProtocolDeleteMask (1 << 0)
+#define CompWindowProtocolTakeFocusMask (1 << 1)
+#define CompWindowProtocolPingMask (1 << 2)
+#define CompWindowProtocolSyncRequestMask (1 << 3)
+
+#define CompWindowTypeDesktopMask (1 << 0)
+#define CompWindowTypeDockMask (1 << 1)
+#define CompWindowTypeToolbarMask (1 << 2)
+#define CompWindowTypeMenuMask (1 << 3)
+#define CompWindowTypeUtilMask (1 << 4)
+#define CompWindowTypeSplashMask (1 << 5)
+#define CompWindowTypeDialogMask (1 << 6)
+#define CompWindowTypeNormalMask (1 << 7)
+#define CompWindowTypeDropdownMenuMask (1 << 8)
+#define CompWindowTypePopupMenuMask (1 << 9)
+#define CompWindowTypeTooltipMask (1 << 10)
+#define CompWindowTypeNotificationMask (1 << 11)
+#define CompWindowTypeComboMask (1 << 12)
+#define CompWindowTypeDndMask (1 << 13)
+#define CompWindowTypeModalDialogMask (1 << 14)
+#define CompWindowTypeFullscreenMask (1 << 15)
+#define CompWindowTypeUnknownMask (1 << 16)
+
+#define NO_FOCUS_MASK (CompWindowTypeDesktopMask | \
+ CompWindowTypeDockMask | \
+ CompWindowTypeSplashMask)
+
+#define CompWindowStateModalMask (1 << 0)
+#define CompWindowStateStickyMask (1 << 1)
+#define CompWindowStateMaximizedVertMask (1 << 2)
+#define CompWindowStateMaximizedHorzMask (1 << 3)
+#define CompWindowStateShadedMask (1 << 4)
+#define CompWindowStateSkipTaskbarMask (1 << 5)
+#define CompWindowStateSkipPagerMask (1 << 6)
+#define CompWindowStateHiddenMask (1 << 7)
+#define CompWindowStateFullscreenMask (1 << 8)
+#define CompWindowStateAboveMask (1 << 9)
+#define CompWindowStateBelowMask (1 << 10)
+#define CompWindowStateDemandsAttentionMask (1 << 11)
+#define CompWindowStateDisplayModalMask (1 << 12)
+
+#define MAXIMIZE_STATE (CompWindowStateMaximizedHorzMask | \
+ CompWindowStateMaximizedVertMask)
+
+#define CompWindowActionMoveMask (1 << 0)
+#define CompWindowActionResizeMask (1 << 1)
+#define CompWindowActionStickMask (1 << 2)
+#define CompWindowActionMinimizeMask (1 << 3)
+#define CompWindowActionMaximizeHorzMask (1 << 4)
+#define CompWindowActionMaximizeVertMask (1 << 5)
+#define CompWindowActionFullscreenMask (1 << 6)
+#define CompWindowActionCloseMask (1 << 7)
+#define CompWindowActionShadeMask (1 << 8)
+#define CompWindowActionChangeDesktopMask (1 << 9)
+#define CompWindowActionAboveMask (1 << 10)
+#define CompWindowActionBelowMask (1 << 11)
+
+#define MwmFuncAll (1L << 0)
+#define MwmFuncResize (1L << 1)
+#define MwmFuncMove (1L << 2)
+#define MwmFuncIconify (1L << 3)
+#define MwmFuncMaximize (1L << 4)
+#define MwmFuncClose (1L << 5)
+
+#define MwmDecorHandle (1L << 2)
+#define MwmDecorTitle (1L << 3)
+#define MwmDecorMenu (1L << 4)
+#define MwmDecorMinimize (1L << 5)
+#define MwmDecorMaximize (1L << 6)
+
+#define MwmDecorAll (1L << 0)
+#define MwmDecorBorder (1L << 1)
+#define MwmDecorHandle (1L << 2)
+#define MwmDecorTitle (1L << 3)
+#define MwmDecorMenu (1L << 4)
+#define MwmDecorMinimize (1L << 5)
+#define MwmDecorMaximize (1L << 6)
+
+#define WmMoveResizeSizeTopLeft 0
+#define WmMoveResizeSizeTop 1
+#define WmMoveResizeSizeTopRight 2
+#define WmMoveResizeSizeRight 3
+#define WmMoveResizeSizeBottomRight 4
+#define WmMoveResizeSizeBottom 5
+#define WmMoveResizeSizeBottomLeft 6
+#define WmMoveResizeSizeLeft 7
+#define WmMoveResizeMove 8
+#define WmMoveResizeSizeKeyboard 9
+#define WmMoveResizeMoveKeyboard 10
+
+/*
+ window paint flags
+
+ bit 1-16 are used for read-only flags and they provide
+ information that describe the screen rendering pass
+ currently in process.
+
+ bit 17-32 are writable flags and they provide information
+ that is used to optimize rendering.
+*/
+
+/*
+ this flag is present when window is being painted
+ on a transformed screen.
+*/
+#define PAINT_WINDOW_ON_TRANSFORMED_SCREEN_MASK (1 << 0)
+
+/*
+ this flag is present when window is being tested
+ for occlusion of other windows.
+*/
+#define PAINT_WINDOW_OCCLUSION_DETECTION_MASK (1 << 1)
+
+/*
+ this flag indicates that the window ist painted with
+ an offset
+*/
+#define PAINT_WINDOW_WITH_OFFSET_MASK (1 << 2)
+
+/*
+ flag indicate that window is translucent.
+*/
+#define PAINT_WINDOW_TRANSLUCENT_MASK (1 << 16)
+
+/*
+ flag indicate that window is transformed.
+*/
+#define PAINT_WINDOW_TRANSFORMED_MASK (1 << 17)
+
+/*
+ flag indicate that core PaintWindow function should
+ not draw this window.
+*/
+#define PAINT_WINDOW_NO_CORE_INSTANCE_MASK (1 << 18)
+
+/*
+ flag indicate that blending is required.
+*/
+#define PAINT_WINDOW_BLEND_MASK (1 << 19)
+
+#define CompWindowGrabKeyMask (1 << 0)
+#define CompWindowGrabButtonMask (1 << 1)
+#define CompWindowGrabMoveMask (1 << 2)
+#define CompWindowGrabResizeMask (1 << 3)
+
+
class WindowInterface : public WrapableInterface<CompWindow> {
public:
WindowInterface ();
diff --git a/src/main.cpp b/src/main.cpp
index 3629c88..8f06e24 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -35,6 +35,8 @@
#include <sys/wait.h>
#include <compiz-core.h>
+#include "privatedisplay.h"
+#include "privatescreen.h"
char *programName;
char **programArgv;
diff --git a/src/privatedisplay.h b/src/privatedisplay.h
index 9b96aa6..a826a2b 100644
--- a/src/privatedisplay.h
+++ b/src/privatedisplay.h
@@ -4,6 +4,77 @@
#include <compiz-core.h>
#include <compdisplay.h>
+#define COMP_DISPLAY_OPTION_ABI 0
+#define COMP_DISPLAY_OPTION_ACTIVE_PLUGINS 1
+#define COMP_DISPLAY_OPTION_TEXTURE_FILTER 2
+#define COMP_DISPLAY_OPTION_CLICK_TO_FOCUS 3
+#define COMP_DISPLAY_OPTION_AUTORAISE 4
+#define COMP_DISPLAY_OPTION_AUTORAISE_DELAY 5
+#define COMP_DISPLAY_OPTION_CLOSE_WINDOW_KEY 6
+#define COMP_DISPLAY_OPTION_CLOSE_WINDOW_BUTTON 7
+#define COMP_DISPLAY_OPTION_MAIN_MENU_KEY 8
+#define COMP_DISPLAY_OPTION_RUN_DIALOG_KEY 9
+#define COMP_DISPLAY_OPTION_COMMAND0 10
+#define COMP_DISPLAY_OPTION_COMMAND1 11
+#define COMP_DISPLAY_OPTION_COMMAND2 12
+#define COMP_DISPLAY_OPTION_COMMAND3 13
+#define COMP_DISPLAY_OPTION_COMMAND4 14
+#define COMP_DISPLAY_OPTION_COMMAND5 15
+#define COMP_DISPLAY_OPTION_COMMAND6 16
+#define COMP_DISPLAY_OPTION_COMMAND7 17
+#define COMP_DISPLAY_OPTION_COMMAND8 18
+#define COMP_DISPLAY_OPTION_COMMAND9 19
+#define COMP_DISPLAY_OPTION_COMMAND10 20
+#define COMP_DISPLAY_OPTION_COMMAND11 21
+#define COMP_DISPLAY_OPTION_RUN_COMMAND0_KEY 22
+#define COMP_DISPLAY_OPTION_RUN_COMMAND1_KEY 23
+#define COMP_DISPLAY_OPTION_RUN_COMMAND2_KEY 24
+#define COMP_DISPLAY_OPTION_RUN_COMMAND3_KEY 25
+#define COMP_DISPLAY_OPTION_RUN_COMMAND4_KEY 26
+#define COMP_DISPLAY_OPTION_RUN_COMMAND5_KEY 27
+#define COMP_DISPLAY_OPTION_RUN_COMMAND6_KEY 28
+#define COMP_DISPLAY_OPTION_RUN_COMMAND7_KEY 29
+#define COMP_DISPLAY_OPTION_RUN_COMMAND8_KEY 30
+#define COMP_DISPLAY_OPTION_RUN_COMMAND9_KEY 31
+#define COMP_DISPLAY_OPTION_RUN_COMMAND10_KEY 32
+#define COMP_DISPLAY_OPTION_RUN_COMMAND11_KEY 33
+#define COMP_DISPLAY_OPTION_SLOW_ANIMATIONS_KEY 34
+#define COMP_DISPLAY_OPTION_RAISE_WINDOW_KEY 35
+#define COMP_DISPLAY_OPTION_RAISE_WINDOW_BUTTON 36
+#define COMP_DISPLAY_OPTION_LOWER_WINDOW_KEY 37
+#define COMP_DISPLAY_OPTION_LOWER_WINDOW_BUTTON 38
+#define COMP_DISPLAY_OPTION_UNMAXIMIZE_WINDOW_KEY 39
+#define COMP_DISPLAY_OPTION_MINIMIZE_WINDOW_KEY 40
+#define COMP_DISPLAY_OPTION_MINIMIZE_WINDOW_BUTTON 41
+#define COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW_KEY 42
+#define COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW_HORZ_KEY 43
+#define COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW_VERT_KEY 44
+#define COMP_DISPLAY_OPTION_SCREENSHOT 45
+#define COMP_DISPLAY_OPTION_RUN_SCREENSHOT_KEY 46
+#define COMP_DISPLAY_OPTION_WINDOW_SCREENSHOT 47
+#define COMP_DISPLAY_OPTION_RUN_WINDOW_SCREENSHOT_KEY 48
+#define COMP_DISPLAY_OPTION_WINDOW_MENU_BUTTON 49
+#define COMP_DISPLAY_OPTION_WINDOW_MENU_KEY 50
+#define COMP_DISPLAY_OPTION_SHOW_DESKTOP_KEY 51
+#define COMP_DISPLAY_OPTION_SHOW_DESKTOP_EDGE 52
+#define COMP_DISPLAY_OPTION_RAISE_ON_CLICK 53
+#define COMP_DISPLAY_OPTION_AUDIBLE_BELL 54
+#define COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_KEY 55
+#define COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_BUTTON 56
+#define COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_HORZ_KEY 57
+#define COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_VERT_KEY 58
+#define COMP_DISPLAY_OPTION_HIDE_SKIP_TASKBAR_WINDOWS 59
+#define COMP_DISPLAY_OPTION_TOGGLE_WINDOW_SHADED_KEY 60
+#define COMP_DISPLAY_OPTION_IGNORE_HINTS_WHEN_MAXIMIZED 61
+#define COMP_DISPLAY_OPTION_TERMINAL 62
+#define COMP_DISPLAY_OPTION_RUN_TERMINAL_KEY 63
+#define COMP_DISPLAY_OPTION_PING_DELAY 64
+#define COMP_DISPLAY_OPTION_EDGE_DELAY 65
+#define COMP_DISPLAY_OPTION_NUM 66
+
+extern const CompMetadataOptionInfo
+coreDisplayOptionInfo[COMP_DISPLAY_OPTION_NUM];
+
class PrivateDisplay {
public:
diff --git a/src/privatescreen.h b/src/privatescreen.h
index ae3da92..cc2b2d8 100644
--- a/src/privatescreen.h
+++ b/src/privatescreen.h
@@ -7,6 +7,43 @@
#include <comppoint.h>
#include <comptexture.h>
+#define COMP_SCREEN_OPTION_DETECT_REFRESH_RATE 0
+#define COMP_SCREEN_OPTION_LIGHTING 1
+#define COMP_SCREEN_OPTION_REFRESH_RATE 2
+#define COMP_SCREEN_OPTION_HSIZE 3
+#define COMP_SCREEN_OPTION_VSIZE 4
+#define COMP_SCREEN_OPTION_OPACITY_STEP 5
+#define COMP_SCREEN_OPTION_UNREDIRECT_FS 6
+#define COMP_SCREEN_OPTION_DEFAULT_ICON 7
+#define COMP_SCREEN_OPTION_SYNC_TO_VBLANK 8
+#define COMP_SCREEN_OPTION_NUMBER_OF_DESKTOPS 9
+#define COMP_SCREEN_OPTION_DETECT_OUTPUTS 10
+#define COMP_SCREEN_OPTION_OUTPUTS 11
+#define COMP_SCREEN_OPTION_OVERLAPPING_OUTPUTS 12
+#define COMP_SCREEN_OPTION_FOCUS_PREVENTION_LEVEL 13
+#define COMP_SCREEN_OPTION_FOCUS_PREVENTION_MATCH 14
+#define COMP_SCREEN_OPTION_TEXTURE_COMPRESSION 15
+#define COMP_SCREEN_OPTION_FORCE_INDEPENDENT 16
+#define COMP_SCREEN_OPTION_NUM 17
+
+#define OUTPUT_OVERLAP_MODE_SMART 0
+#define OUTPUT_OVERLAP_MODE_PREFER_LARGER 1
+#define OUTPUT_OVERLAP_MODE_PREFER_SMALLER 2
+#define OUTPUT_OVERLAP_MODE_LAST OUTPUT_OVERLAP_MODE_PREFER_SMALLER
+
+#define FOCUS_PREVENTION_LEVEL_NONE 0
+#define FOCUS_PREVENTION_LEVEL_LOW 1
+#define FOCUS_PREVENTION_LEVEL_HIGH 2
+#define FOCUS_PREVENTION_LEVEL_VERYHIGH 3
+#define FOCUS_PREVENTION_LEVEL_LAST FOCUS_PREVENTION_LEVEL_VERYHIGH
+
+#define COMP_SCREEN_DAMAGE_PENDING_MASK (1 << 0)
+#define COMP_SCREEN_DAMAGE_REGION_MASK (1 << 1)
+#define COMP_SCREEN_DAMAGE_ALL_MASK (1 << 2)
+
+extern const CompMetadataOptionInfo
+coreScreenOptionInfo[COMP_SCREEN_OPTION_NUM];
+
class PrivateScreen {
public:
diff --git a/src/window.cpp b/src/window.cpp
index 314783d..d0cbadb 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -43,6 +43,7 @@
#include <comptexture.h>
#include <compicon.h>
#include "privatewindow.h"
+#include "privatescreen.h"
CompObject::indices windowPrivateIndices (0);