summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/Makefile.am1
-rw-r--r--include/compiz-core.h3132
-rw-r--r--include/compiz-cube.h2
-rw-r--r--include/compiz-plugin.h40
-rw-r--r--include/compiz-scale.h2
-rw-r--r--include/compiz.h3191
-rw-r--r--plugins/annotate.c2
-rw-r--r--plugins/blur.c2
-rw-r--r--plugins/clone.c2
-rw-r--r--plugins/dbus.c2
-rw-r--r--plugins/decoration.c2
-rw-r--r--plugins/fade.c2
-rw-r--r--plugins/fuse.c2
-rw-r--r--plugins/gconf.c2
-rw-r--r--plugins/glib.c3
-rw-r--r--plugins/ini.c2
-rw-r--r--plugins/inotify.c2
-rw-r--r--plugins/kconfig.cpp2
-rw-r--r--plugins/minimize.c2
-rw-r--r--plugins/move.c2
-rw-r--r--plugins/place.c2
-rw-r--r--plugins/plane.c2
-rw-r--r--plugins/png.c2
-rw-r--r--plugins/regex.c2
-rw-r--r--plugins/resize.c2
-rw-r--r--plugins/screenshot.c2
-rw-r--r--plugins/svg.c2
-rw-r--r--plugins/switcher.c2
-rw-r--r--plugins/video.c2
-rw-r--r--plugins/water.c2
-rw-r--r--plugins/wobbly.c2
-rw-r--r--plugins/zoom.c2
-rw-r--r--src/cursor.c4
-rw-r--r--src/display.c2
-rw-r--r--src/event.c2
-rw-r--r--src/fragment.c2
-rw-r--r--src/main.c2
-rw-r--r--src/match.c2
-rw-r--r--src/matrix.c2
-rw-r--r--src/metadata.c2
-rw-r--r--src/option.c14
-rw-r--r--src/paint.c2
-rw-r--r--src/plugin.c2
-rw-r--r--src/privates.c2
-rw-r--r--src/screen.c2
-rw-r--r--src/session.c2
-rw-r--r--src/texture.c2
-rw-r--r--src/window.c2
48 files changed, 3244 insertions, 3223 deletions
diff --git a/include/Makefile.am b/include/Makefile.am
index 60c79894..e0cd0107 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -2,6 +2,7 @@ compizincludedir = $(includedir)/compiz
compizinclude_HEADERS = \
compiz.h \
compiz-plugin.h \
+ compiz-core.h \
compiz-cube.h \
compiz-scale.h \
decoration.h
diff --git a/include/compiz-core.h b/include/compiz-core.h
new file mode 100644
index 00000000..15e0b31d
--- /dev/null
+++ b/include/compiz-core.h
@@ -0,0 +1,3132 @@
+/*
+ * Copyright © 2007 Novell, Inc.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software
+ * and its documentation for any purpose is hereby granted without
+ * fee, provided that the above copyright notice appear in all copies
+ * and that both that copyright notice and this permission notice
+ * appear in supporting documentation, and that the name of
+ * Novell, Inc. not be used in advertising or publicity pertaining to
+ * distribution of the software without specific, written prior permission.
+ * Novell, Inc. makes no representations about the suitability of this
+ * software for any purpose. It is provided "as is" without express or
+ * implied warranty.
+ *
+ * NOVELL, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
+ * NO EVENT SHALL NOVELL, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
+ * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Author: David Reveman <davidr@novell.com>
+ */
+
+#ifndef _COMPIZ_CORE_H
+#define _COMPIZ_CORE_H
+
+#include <compiz-plugin.h>
+
+#define ABIVERSION 20070828
+
+#include <stdio.h>
+#include <sys/time.h>
+
+#include <X11/Xlib-xcb.h>
+#include <X11/Xutil.h>
+#include <X11/extensions/Xdamage.h>
+#include <X11/extensions/Xcomposite.h>
+#include <X11/extensions/Xinerama.h>
+#include <X11/extensions/sync.h>
+#include <X11/Xregion.h>
+#include <X11/XKBlib.h>
+
+#define SN_API_NOT_YET_FROZEN
+#include <libsn/sn.h>
+
+#include <GL/gl.h>
+#include <GL/glx.h>
+
+COMPIZ_BEGIN_DECLS
+
+#if COMPOSITE_MAJOR > 0 || COMPOSITE_MINOR > 2
+#define USE_COW
+#endif
+
+/*
+ * WORDS_BIGENDIAN should be defined before including this file for
+ * IMAGE_BYTE_ORDER and BITMAP_BIT_ORDER to be set correctly.
+ */
+#define LSBFirst 0
+#define MSBFirst 1
+
+#ifdef WORDS_BIGENDIAN
+# define IMAGE_BYTE_ORDER MSBFirst
+# define BITMAP_BIT_ORDER MSBFirst
+#else
+# define IMAGE_BYTE_ORDER LSBFirst
+# define BITMAP_BIT_ORDER LSBFirst
+#endif
+
+typedef struct _CompTexture CompTexture;
+typedef struct _CompIcon CompIcon;
+typedef struct _CompWindowExtents CompWindowExtents;
+typedef struct _CompProgram CompProgram;
+typedef struct _CompFunction CompFunction;
+typedef struct _CompFunctionData CompFunctionData;
+typedef struct _FragmentAttrib FragmentAttrib;
+typedef struct _CompCursor CompCursor;
+typedef struct _CompMatch CompMatch;
+typedef struct _CompOutput CompOutput;
+typedef struct _CompWalker CompWalker;
+
+/* virtual modifiers */
+
+#define CompModAlt 0
+#define CompModMeta 1
+#define CompModSuper 2
+#define CompModHyper 3
+#define CompModModeSwitch 4
+#define CompModNumLock 5
+#define CompModScrollLock 6
+#define CompModNum 7
+
+#define CompAltMask (1 << 16)
+#define CompMetaMask (1 << 17)
+#define CompSuperMask (1 << 18)
+#define CompHyperMask (1 << 19)
+#define CompModeSwitchMask (1 << 20)
+#define CompNumLockMask (1 << 21)
+#define CompScrollLockMask (1 << 22)
+
+#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 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
+
+#define RED_SATURATION_WEIGHT 0.30f
+#define GREEN_SATURATION_WEIGHT 0.59f
+#define BLUE_SATURATION_WEIGHT 0.11f
+
+extern char *programName;
+extern char **programArgv;
+extern int programArgc;
+extern char *backgroundImage;
+extern REGION emptyRegion;
+extern REGION infiniteRegion;
+extern GLushort defaultColor[4];
+extern Window currentRoot;
+extern Bool shutDown;
+extern Bool restartSignal;
+extern CompWindow *lastFoundWindow;
+extern CompWindow *lastDamagedWindow;
+extern Bool replaceCurrentWm;
+extern Bool indirectRendering;
+extern Bool strictBinding;
+extern Bool useCow;
+extern Bool noDetection;
+extern Bool useDesktopHints;
+extern Bool onlyCurrentScreen;
+
+extern int defaultRefreshRate;
+extern char *defaultTextureFilter;
+
+extern int lastPointerX;
+extern int lastPointerY;
+extern int pointerX;
+extern int pointerY;
+
+extern CompMetadata coreMetadata;
+
+#define RESTRICT_VALUE(value, min, max) \
+ (((value) < (min)) ? (min): ((value) > (max)) ? (max) : (value))
+
+#define MOD(a,b) ((a) < 0 ? ((b) - ((-(a) - 1) % (b))) - 1 : (a) % (b))
+
+
+/* privates.h */
+
+#define WRAP(priv, real, func, wrapFunc) \
+ (priv)->func = (real)->func; \
+ (real)->func = (wrapFunc)
+
+#define UNWRAP(priv, real, func) \
+ (real)->func = (priv)->func
+
+typedef union _CompPrivate {
+ void *ptr;
+ long val;
+ unsigned long uval;
+ void *(*fptr) (void);
+} CompPrivate;
+
+typedef int (*ReallocPrivatesProc) (int size, void *closure);
+
+int
+allocatePrivateIndex (int *len,
+ char **indices,
+ ReallocPrivatesProc reallocProc,
+ void *closure);
+
+void
+freePrivateIndex (int len,
+ char *indices,
+ int index);
+
+
+/* option.c */
+
+typedef enum {
+ CompBindingTypeNone = 0,
+ CompBindingTypeKey = 1 << 0,
+ CompBindingTypeButton = 1 << 1,
+ CompBindingTypeEdgeButton = 1 << 2
+} CompBindingType;
+
+typedef enum {
+ CompActionStateInitKey = 1 << 0,
+ CompActionStateTermKey = 1 << 1,
+ CompActionStateInitButton = 1 << 2,
+ CompActionStateTermButton = 1 << 3,
+ CompActionStateInitBell = 1 << 4,
+ CompActionStateInitEdge = 1 << 5,
+ CompActionStateTermEdge = 1 << 6,
+ CompActionStateInitEdgeDnd = 1 << 7,
+ CompActionStateTermEdgeDnd = 1 << 8,
+ CompActionStateCommit = 1 << 9,
+ CompActionStateCancel = 1 << 10,
+ CompActionStateAutoGrab = 1 << 11
+} CompActionState;
+
+typedef enum {
+ CompLogLevelFatal = 0,
+ CompLogLevelError,
+ CompLogLevelWarn,
+ CompLogLevelInfo,
+ CompLogLevelDebug
+} CompLogLevel;
+
+typedef struct _CompKeyBinding {
+ int keycode;
+ unsigned int modifiers;
+} CompKeyBinding;
+
+typedef struct _CompButtonBinding {
+ int button;
+ unsigned int modifiers;
+} CompButtonBinding;
+
+typedef struct _CompAction CompAction;
+
+typedef Bool (*CompActionCallBackProc) (CompDisplay *d,
+ CompAction *action,
+ CompActionState state,
+ CompOption *option,
+ int nOption);
+
+struct _CompAction {
+ CompActionCallBackProc initiate;
+ CompActionCallBackProc terminate;
+
+ CompActionState state;
+
+ CompBindingType type;
+ CompKeyBinding key;
+ CompButtonBinding button;
+
+ Bool bell;
+
+ unsigned int edgeMask;
+
+ CompPrivate priv;
+};
+
+typedef union _CompMatchOp CompMatchOp;
+
+struct _CompMatch {
+ CompDisplay *display;
+ CompMatchOp *op;
+ int nOp;
+};
+
+typedef struct {
+ CompOptionType type;
+ CompOptionValue *value;
+ int nValue;
+} CompListValue;
+
+union _CompOptionValue {
+ Bool b;
+ int i;
+ float f;
+ char *s;
+ unsigned short c[4];
+ CompAction action;
+ CompMatch match;
+ CompListValue list;
+};
+
+typedef struct _CompOptionIntRestriction {
+ int min;
+ int max;
+} CompOptionIntRestriction;
+
+typedef struct _CompOptionFloatRestriction {
+ float min;
+ float max;
+ float precision;
+} CompOptionFloatRestriction;
+
+typedef union {
+ CompOptionIntRestriction i;
+ CompOptionFloatRestriction f;
+} CompOptionRestriction;
+
+struct _CompOption {
+ char *name;
+ CompOptionType type;
+ CompOptionValue value;
+ CompOptionRestriction rest;
+};
+
+typedef CompOption *(*DisplayOptionsProc) (CompDisplay *display, int *count);
+typedef CompOption *(*ScreenOptionsProc) (CompScreen *screen, int *count);
+
+Bool
+getBoolOptionNamed (CompOption *option,
+ int nOption,
+ const char *name,
+ Bool defaultValue);
+
+int
+getIntOptionNamed (CompOption *option,
+ int nOption,
+ const char *name,
+ int defaultValue);
+
+float
+getFloatOptionNamed (CompOption *option,
+ int nOption,
+ const char *name,
+ float defaultValue);
+
+char *
+getStringOptionNamed (CompOption *option,
+ int nOption,
+ const char *name,
+ char *defaultValue);
+
+unsigned short *
+getColorOptionNamed (CompOption *option,
+ int nOption,
+ const char *name,
+ unsigned short *defaultValue);
+
+CompMatch *
+getMatchOptionNamed (CompOption *option,
+ int nOption,
+ const char *name,
+ CompMatch *defaultValue);
+
+char *
+keyBindingToString (CompDisplay *d,
+ CompKeyBinding *key);
+
+char *
+buttonBindingToString (CompDisplay *d,
+ CompButtonBinding *button);
+
+char *
+keyActionToString (CompDisplay *d,
+ CompAction *action);
+
+char *
+buttonActionToString (CompDisplay *d,
+ CompAction *action);
+
+Bool
+stringToKeyBinding (CompDisplay *d,
+ const char *binding,
+ CompKeyBinding *key);
+
+Bool
+stringToButtonBinding (CompDisplay *d,
+ const char *binding,
+ CompButtonBinding *button);
+
+void
+stringToKeyAction (CompDisplay *d,
+ const char *binding,
+ CompAction *action);
+
+void
+stringToButtonAction (CompDisplay *d,
+ const char *binding,
+ CompAction *action);
+
+const char *
+edgeToString (unsigned int edge);
+
+unsigned int
+stringToEdgeMask (const char *edge);
+
+char *
+edgeMaskToString (unsigned int edgeMask);
+
+Bool
+stringToColor (const char *color,
+ unsigned short *rgba);
+
+char *
+colorToString (unsigned short *rgba);
+
+const char *
+optionTypeToString (CompOptionType type);
+
+Bool
+isActionOption (CompOption *option);
+
+
+/* display.c */
+
+typedef int CompFileWatchHandle;
+
+#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_MAIN_MENU_KEY 7
+#define COMP_DISPLAY_OPTION_RUN_DIALOG_KEY 8
+#define COMP_DISPLAY_OPTION_COMMAND0 9
+#define COMP_DISPLAY_OPTION_COMMAND1 10
+#define COMP_DISPLAY_OPTION_COMMAND2 11
+#define COMP_DISPLAY_OPTION_COMMAND3 12
+#define COMP_DISPLAY_OPTION_COMMAND4 13
+#define COMP_DISPLAY_OPTION_COMMAND5 14
+#define COMP_DISPLAY_OPTION_COMMAND6 15
+#define COMP_DISPLAY_OPTION_COMMAND7 16
+#define COMP_DISPLAY_OPTION_COMMAND8 17
+#define COMP_DISPLAY_OPTION_COMMAND9 18
+#define COMP_DISPLAY_OPTION_COMMAND10 19
+#define COMP_DISPLAY_OPTION_COMMAND11 20
+#define COMP_DISPLAY_OPTION_RUN_COMMAND0_KEY 21
+#define COMP_DISPLAY_OPTION_RUN_COMMAND1_KEY 22
+#define COMP_DISPLAY_OPTION_RUN_COMMAND2_KEY 23
+#define COMP_DISPLAY_OPTION_RUN_COMMAND3_KEY 24
+#define COMP_DISPLAY_OPTION_RUN_COMMAND4_KEY 25
+#define COMP_DISPLAY_OPTION_RUN_COMMAND5_KEY 26
+#define COMP_DISPLAY_OPTION_RUN_COMMAND6_KEY 27
+#define COMP_DISPLAY_OPTION_RUN_COMMAND7_KEY 28
+#define COMP_DISPLAY_OPTION_RUN_COMMAND8_KEY 29
+#define COMP_DISPLAY_OPTION_RUN_COMMAND9_KEY 30
+#define COMP_DISPLAY_OPTION_RUN_COMMAND10_KEY 31
+#define COMP_DISPLAY_OPTION_RUN_COMMAND11_KEY 32
+#define COMP_DISPLAY_OPTION_SLOW_ANIMATIONS_KEY 33
+#define COMP_DISPLAY_OPTION_RAISE_WINDOW_BUTTON 34
+#define COMP_DISPLAY_OPTION_LOWER_WINDOW_BUTTON 35
+#define COMP_DISPLAY_OPTION_UNMAXIMIZE_WINDOW_KEY 36
+#define COMP_DISPLAY_OPTION_MINIMIZE_WINDOW_KEY 37
+#define COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW_KEY 38
+#define COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW_HORZ_KEY 39
+#define COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW_VERT_KEY 40
+#define COMP_DISPLAY_OPTION_OPACITY_INCREASE_BUTTON 41
+#define COMP_DISPLAY_OPTION_OPACITY_DECREASE_BUTTON 42
+#define COMP_DISPLAY_OPTION_SCREENSHOT 43
+#define COMP_DISPLAY_OPTION_RUN_SCREENSHOT_KEY 44
+#define COMP_DISPLAY_OPTION_WINDOW_SCREENSHOT 45
+#define COMP_DISPLAY_OPTION_RUN_WINDOW_SCREENSHOT_KEY 46
+#define COMP_DISPLAY_OPTION_WINDOW_MENU_BUTTON 47
+#define COMP_DISPLAY_OPTION_WINDOW_MENU_KEY 48
+#define COMP_DISPLAY_OPTION_SHOW_DESKTOP_KEY 49
+#define COMP_DISPLAY_OPTION_SHOW_DESKTOP_EDGE 50
+#define COMP_DISPLAY_OPTION_RAISE_ON_CLICK 51
+#define COMP_DISPLAY_OPTION_AUDIBLE_BELL 52
+#define COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_KEY 53
+#define COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_HORZ_KEY 54
+#define COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_VERT_KEY 55
+#define COMP_DISPLAY_OPTION_HIDE_SKIP_TASKBAR_WINDOWS 56
+#define COMP_DISPLAY_OPTION_TOGGLE_WINDOW_SHADED_KEY 57
+#define COMP_DISPLAY_OPTION_IGNORE_HINTS_WHEN_MAXIMIZED 58
+#define COMP_DISPLAY_OPTION_TERMINAL 59
+#define COMP_DISPLAY_OPTION_RUN_TERMINAL_KEY 60
+#define COMP_DISPLAY_OPTION_PING_DELAY 61
+#define COMP_DISPLAY_OPTION_NUM 62
+
+typedef Bool (*SetDisplayOptionForPluginProc) (CompDisplay *display,
+ const char *plugin,
+ const char *name,
+ CompOptionValue *value);
+
+typedef void (*HandleEventProc) (CompDisplay *display,
+ XEvent *event);
+
+typedef void (*HandleCompizEventProc) (CompDisplay *display,
+ const char *pluginName,
+ const char *eventName,
+ CompOption *option,
+ int nOption);
+
+typedef void (*ForEachWindowProc) (CompWindow *window,
+ void *closure);
+
+typedef Bool (*FileToImageProc) (CompDisplay *display,
+ const char *path,
+ const char *name,
+ int *width,
+ int *height,
+ int *stride,
+ void **data);
+
+typedef Bool (*ImageToFileProc) (CompDisplay *display,
+ const char *path,
+ const char *name,
+ const char *format,
+ int width,
+ int height,
+ int stride,
+ void *data);
+
+#define NOTIFY_CREATE_MASK (1 << 0)
+#define NOTIFY_DELETE_MASK (1 << 1)
+#define NOTIFY_MOVE_MASK (1 << 2)
+#define NOTIFY_MODIFY_MASK (1 << 3)
+
+typedef void (*FileWatchCallBackProc) (const char *name,
+ void *closure);
+
+typedef struct _CompFileWatch {
+ struct _CompFileWatch *next;
+ char *path;
+ int mask;
+ FileWatchCallBackProc callBack;
+ void *closure;
+ CompFileWatchHandle handle;
+} CompFileWatch;
+
+typedef void (*FileWatchAddedProc) (CompDisplay *display,
+ CompFileWatch *fileWatch);
+
+typedef void (*FileWatchRemovedProc) (CompDisplay *display,
+ CompFileWatch *fileWatch);
+
+#define MATCH_OP_AND_MASK (1 << 0)
+#define MATCH_OP_NOT_MASK (1 << 1)
+
+typedef enum {
+ CompMatchOpTypeGroup,
+ CompMatchOpTypeExp
+} CompMatchOpType;
+
+typedef struct _CompMatchAnyOp {
+ CompMatchOpType type;
+ int flags;
+} CompMatchAnyOp;
+
+typedef struct _CompMatchGroupOp {
+ CompMatchOpType type;
+ int flags;
+ CompMatchOp *op;
+ int nOp;
+} CompMatchGroupOp;
+
+typedef void (*CompMatchExpFiniProc) (CompDisplay *display,
+ CompPrivate priv);
+
+typedef Bool (*CompMatchExpEvalProc) (CompDisplay *display,
+ CompWindow *window,
+ CompPrivate priv);
+
+typedef struct _CompMatchExp {
+ CompMatchExpFiniProc fini;
+ CompMatchExpEvalProc eval;
+ CompPrivate priv;
+} CompMatchExp;
+
+typedef struct _CompMatchExpOp {
+ CompMatchOpType type;
+ int flags;
+ char *value;
+ CompMatchExp e;
+} CompMatchExpOp;
+
+union _CompMatchOp {
+ CompMatchOpType type;
+ CompMatchAnyOp any;
+ CompMatchGroupOp group;
+ CompMatchExpOp exp;
+};
+
+typedef void (*MatchInitExpProc) (CompDisplay *display,
+ CompMatchExp *exp,
+ const char *value);
+
+typedef void (*MatchExpHandlerChangedProc) (CompDisplay *display);
+
+typedef void (*MatchPropertyChangedProc) (CompDisplay *display,
+ CompWindow *window);
+
+typedef void (*LogMessageProc) (CompDisplay *d,
+ const char *componentName,
+ CompLogLevel level,
+ const char *message);
+
+struct _CompDisplay {
+ xcb_connection_t *connection;
+
+ Display *display;
+ CompScreen *screens;
+
+ char *screenPrivateIndices;
+ int screenPrivateLen;
+
+ int compositeEvent, compositeError, compositeOpcode;
+ int damageEvent, damageError;
+ int syncEvent, syncError;
+ int fixesEvent, fixesError, fixesVersion;
+
+ Bool randrExtension;
+ int randrEvent, randrError;
+
+ Bool shapeExtension;
+ int shapeEvent, shapeError;
+
+ Bool xkbExtension;
+ int xkbEvent, xkbError;
+
+ Bool xineramaExtension;
+ int xineramaEvent, xineramaError;
+
+ XineramaScreenInfo *screenInfo;
+ int nScreenInfo;
+
+ SnDisplay *snDisplay;
+
+ Atom supportedAtom;
+ Atom supportingWmCheckAtom;
+
+ Atom utf8StringAtom;
+
+ Atom wmNameAtom;
+
+ Atom winTypeAtom;
+ Atom winTypeDesktopAtom;
+ Atom winTypeDockAtom;
+ Atom winTypeToolbarAtom;
+ Atom winTypeMenuAtom;
+ Atom winTypeUtilAtom;
+ Atom winTypeSplashAtom;
+ Atom winTypeDialogAtom;
+ Atom winTypeNormalAtom;
+ Atom winTypeDropdownMenuAtom;
+ Atom winTypePopupMenuAtom;
+ Atom winTypeTooltipAtom;
+ Atom winTypeNotificationAtom;
+ Atom winTypeComboAtom;
+ Atom winTypeDndAtom;
+
+ Atom winOpacityAtom;
+ Atom winBrightnessAtom;
+ Atom winSaturationAtom;
+ Atom winActiveAtom;
+ Atom winDesktopAtom;
+
+ Atom workareaAtom;
+
+ Atom desktopViewportAtom;
+ Atom desktopGeometryAtom;
+ Atom currentDesktopAtom;
+ Atom numberOfDesktopsAtom;
+
+ Atom winStateAtom;
+ Atom winStateModalAtom;
+ Atom winStateStickyAtom;
+ Atom winStateMaximizedVertAtom;
+ Atom winStateMaximizedHorzAtom;
+ Atom winStateShadedAtom;
+ Atom winStateSkipTaskbarAtom;
+ Atom winStateSkipPagerAtom;
+ Atom winStateHiddenAtom;
+ Atom winStateFullscreenAtom;
+ Atom winStateAboveAtom;
+ Atom winStateBelowAtom;
+ Atom winStateDemandsAttentionAtom;
+ Atom winStateDisplayModalAtom;
+
+ Atom winActionMoveAtom;
+ Atom winActionResizeAtom;
+ Atom winActionStickAtom;
+ Atom winActionMinimizeAtom;
+ Atom winActionMaximizeHorzAtom;
+ Atom winActionMaximizeVertAtom;
+ Atom winActionFullscreenAtom;
+ Atom winActionCloseAtom;
+ Atom winActionShadeAtom;
+ Atom winActionChangeDesktopAtom;
+ Atom winActionAboveAtom;
+ Atom winActionBelowAtom;
+
+ Atom wmAllowedActionsAtom;
+
+ Atom wmStrutAtom;
+ Atom wmStrutPartialAtom;
+
+ Atom wmUserTimeAtom;
+
+ Atom wmIconAtom;
+
+ Atom clientListAtom;
+ Atom clientListStackingAtom;
+
+ Atom frameExtentsAtom;
+ Atom frameWindowAtom;
+
+ Atom wmStateAtom;
+ Atom wmChangeStateAtom;
+ Atom wmProtocolsAtom;
+ Atom wmClientLeaderAtom;
+
+ Atom wmDeleteWindowAtom;
+ Atom wmTakeFocusAtom;
+ Atom wmPingAtom;
+ Atom wmSyncRequestAtom;
+
+ Atom wmSyncRequestCounterAtom;
+
+ Atom closeWindowAtom;
+ Atom wmMoveResizeAtom;
+ Atom moveResizeWindowAtom;
+ Atom restackWindowAtom;
+
+ Atom showingDesktopAtom;
+
+ Atom xBackgroundAtom[2];
+
+ Atom toolkitActionAtom;
+ Atom toolkitActionMainMenuAtom;
+ Atom toolkitActionRunDialogAtom;
+ Atom toolkitActionWindowMenuAtom;
+ Atom toolkitActionForceQuitDialogAtom;
+
+ Atom mwmHintsAtom;
+
+ Atom xdndAwareAtom;
+ Atom xdndEnterAtom;
+ Atom xdndLeaveAtom;
+ Atom xdndPositionAtom;
+ Atom xdndStatusAtom;
+ Atom xdndDropAtom;
+
+ Atom managerAtom;
+ Atom targetsAtom;
+ Atom multipleAtom;
+ Atom timestampAtom;
+ Atom versionAtom;
+ Atom atomPairAtom;
+
+ Atom startupIdAtom;
+
+ unsigned int lastPing;
+ CompTimeoutHandle pingHandle;
+
+ GLenum textureFilter;
+
+ Window activeWindow;
+
+ Window below;
+ char displayString[256];
+
+ XModifierKeymap *modMap;
+ unsigned int modMask[CompModNum];
+ unsigned int ignoredModMask;
+
+ KeyCode escapeKeyCode;
+ KeyCode returnKeyCode;
+
+ CompOption opt[COMP_DISPLAY_OPTION_NUM];
+
+ CompTimeoutHandle autoRaiseHandle;
+ Window autoRaiseWindow;
+
+ CompOptionValue plugin;
+ Bool dirtyPluginList;
+
+ CompFileWatch *fileWatch;
+
+ SetDisplayOptionForPluginProc setDisplayOptionForPlugin;
+
+ InitPluginForDisplayProc initPluginForDisplay;
+ FiniPluginForDisplayProc finiPluginForDisplay;
+
+ HandleEventProc handleEvent;
+ HandleCompizEventProc handleCompizEvent;
+
+ FileToImageProc fileToImage;
+ ImageToFileProc imageToFile;
+
+ FileWatchAddedProc fileWatchAdded;
+ FileWatchRemovedProc fileWatchRemoved;
+
+ MatchInitExpProc matchInitExp;
+ MatchExpHandlerChangedProc matchExpHandlerChanged;
+ MatchPropertyChangedProc matchPropertyChanged;
+
+ LogMessageProc logMessage;
+
+ CompPrivate *privates;
+};
+
+
+extern CompDisplay *compDisplays;
+
+int
+allocateDisplayPrivateIndex (void);
+
+void
+freeDisplayPrivateIndex (int index);
+
+CompOption *
+getDisplayOptions (CompDisplay *display,
+ int *count);
+
+Bool
+setDisplayOption (CompDisplay *display,
+ const char *name,
+ CompOptionValue *value);
+
+CompFileWatchHandle
+addFileWatch (CompDisplay *display,
+ const char *path,
+ int mask,
+ FileWatchCallBackProc callBack,
+ void *closure);
+
+void
+removeFileWatch (CompDisplay *display,
+ CompFileWatchHandle handle);
+
+void
+fileWatchAdded (CompDisplay *display,
+ CompFileWatch *fileWatch);
+
+void
+fileWatchRemoved (CompDisplay *display,
+ CompFileWatch *fileWatch);
+
+void
+compLogMessage (CompDisplay *d,
+ const char *componentName,
+ CompLogLevel level,
+ const char *format,
+ ...);
+
+void
+logMessage (CompDisplay *d,
+ const char *componentName,
+ CompLogLevel level,
+ const char *message);
+
+const char *
+logLevelToString (CompLogLevel level);
+
+int
+compCheckForError (Display *dpy);
+
+void
+addScreenToDisplay (CompDisplay *display,
+ CompScreen *s);
+
+Bool
+addDisplay (const char *name);
+
+Time
+getCurrentTimeFromDisplay (CompDisplay *d);
+
+void
+focusDefaultWindow (CompDisplay *d);
+
+void
+forEachWindowOnDisplay (CompDisplay *display,
+ ForEachWindowProc proc,
+ void *closure);
+
+CompScreen *
+findScreenAtDisplay (CompDisplay *d,
+ Window root);
+
+CompWindow *
+findWindowAtDisplay (CompDisplay *display,
+ Window id);
+
+CompWindow *
+findTopLevelWindowAtDisplay (CompDisplay *d,
+ Window id);
+
+unsigned int
+virtualToRealModMask (CompDisplay *d,
+ unsigned int modMask);
+
+void
+updateModifierMappings (CompDisplay *d);
+
+unsigned int
+keycodeToModifiers (CompDisplay *d,
+ int keycode);
+
+void
+eventLoop (void);
+
+void
+handleSelectionRequest (CompDisplay *display,
+ XEvent *event);
+
+void
+handleSelectionClear (CompDisplay *display,
+ XEvent *event);
+
+void
+warpPointer (CompScreen *screen,
+ int dx,
+ int dy);
+
+Bool
+setDisplayAction (CompDisplay *display,
+ CompOption *o,
+ CompOptionValue *value);
+
+Bool
+readImageFromFile (CompDisplay *display,
+ const char *name,
+ int *width,
+ int *height,
+ void **data);
+
+Bool
+writeImageToFile (CompDisplay *display,
+ const char *path,
+ const char *name,
+ const char *format,
+ int width,
+ int height,
+ void *data);
+
+Bool
+fileToImage (CompDisplay *display,
+ const char *path,
+ const char *name,
+ int *width,
+ int *height,
+ int *stride,
+ void **data);
+
+Bool
+imageToFile (CompDisplay *display,
+ const char *path,
+ const char *name,
+ const char *format,
+ int width,
+ int height,
+ int stride,
+ void *data);
+
+CompCursor *
+findCursorAtDisplay (CompDisplay *display);
+
+
+/* event.c */
+
+void
+handleEvent (CompDisplay *display,
+ XEvent *event);
+
+void
+handleCompizEvent (CompDisplay *display,
+ const char *pluginName,
+ const char *eventName,
+ CompOption *option,
+ int nOption);
+
+void
+handleSyncAlarm (CompWindow *w);
+
+Bool
+eventMatches (CompDisplay *display,
+ XEvent *event,
+ CompOption *option);
+
+Bool
+eventTerminates (CompDisplay *display,
+ XEvent *event,
+ CompOption *option);
+
+void
+clearTargetOutput (CompDisplay *display,
+ unsigned int mask);
+
+/* paint.c */
+
+#define MULTIPLY_USHORT(us1, us2) \
+ (((GLuint) (us1) * (GLuint) (us2)) / 0xffff)
+
+/* camera distance from screen, 0.5 * tan (FOV) */
+#define DEFAULT_Z_CAMERA 0.866025404f
+
+typedef struct _CompTransform {
+ float m[16];
+} CompTransform;
+
+/* XXX: ScreenPaintAttrib will be removed */
+typedef struct _ScreenPaintAttrib {
+ GLfloat xRotate;
+ GLfloat yRotate;
+ GLfloat vRotate;
+ GLfloat xTranslate;
+ GLfloat yTranslate;
+ GLfloat zTranslate;
+ GLfloat zCamera;
+} ScreenPaintAttrib;
+
+/* XXX: scale and translate fields will be removed */
+typedef struct _WindowPaintAttrib {
+ GLushort opacity;
+ GLushort brightness;
+ GLushort saturation;
+ GLfloat xScale;
+ GLfloat yScale;
+ GLfloat xTranslate;
+ GLfloat yTranslate;
+} WindowPaintAttrib;
+
+extern ScreenPaintAttrib defaultScreenPaintAttrib;
+extern WindowPaintAttrib defaultWindowPaintAttrib;
+
+typedef struct _CompMatrix {
+ float xx; float yx;
+ float xy; float yy;
+ float x0; float y0;
+} CompMatrix;
+
+#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)
+
+
+typedef void (*PreparePaintScreenProc) (CompScreen *screen,
+ int msSinceLastPaint);
+
+typedef void (*DonePaintScreenProc) (CompScreen *screen);
+
+#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)
+
+typedef void (*PaintScreenProc) (CompScreen *screen,
+ CompOutput *outputs,
+ int numOutput,
+ unsigned int mask);
+
+typedef Bool (*PaintOutputProc) (CompScreen *screen,
+ const ScreenPaintAttrib *sAttrib,
+ const CompTransform *transform,
+ Region region,
+ CompOutput *output,
+ unsigned int mask);
+
+typedef void (*PaintTransformedOutputProc) (CompScreen *screen,
+ const ScreenPaintAttrib *sAttrib,
+ const CompTransform *transform,
+ Region region,
+ CompOutput *output,
+ unsigned int mask);
+
+/* XXX: ApplyScreenTransformProc will be removed */
+typedef void (*ApplyScreenTransformProc) (CompScreen *screen,
+ const ScreenPaintAttrib *sAttrib,
+ CompOutput *output,
+ CompTransform *transform);
+
+typedef void (*WalkerFiniProc) (CompScreen *screen,
+ CompWalker *walker);
+
+typedef CompWindow *(*WalkInitProc) (CompScreen *screen);
+typedef CompWindow *(*WalkStepProc) (CompWindow *window);
+
+struct _CompWalker {
+ WalkerFiniProc fini;
+ CompPrivate priv;
+
+ WalkInitProc first;
+ WalkInitProc last;
+ WalkStepProc next;
+ 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)
+
+/*
+ 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)
+
+
+typedef Bool (*PaintWindowProc) (CompWindow *window,
+ const WindowPaintAttrib *attrib,
+ const CompTransform *transform,
+ Region region,
+ unsigned int mask);
+
+typedef Bool (*DrawWindowProc) (CompWindow *window,
+ const CompTransform *transform,
+ const FragmentAttrib *fragment,
+ Region region,
+ unsigned int mask);
+
+typedef void (*AddWindowGeometryProc) (CompWindow *window,
+ CompMatrix *matrix,
+ int nMatrix,
+ Region region,
+ Region clip);
+
+typedef void (*DrawWindowTextureProc) (CompWindow *w,
+ CompTexture *texture,
+ const FragmentAttrib *fragment,
+ unsigned int mask);
+
+typedef void (*DrawWindowGeometryProc) (CompWindow *window);
+
+typedef void (*PaintCursorProc) (CompCursor *cursor,
+ const CompTransform *transform,
+ Region region,
+ unsigned int mask);
+
+#define PAINT_BACKGROUND_ON_TRANSFORMED_SCREEN_MASK (1 << 0)
+
+typedef void (*PaintBackgroundProc) (CompScreen *screen,
+ Region region,
+ unsigned int mask);
+
+void
+preparePaintScreen (CompScreen *screen,
+ int msSinceLastPaint);
+
+void
+donePaintScreen (CompScreen *screen);
+
+void
+transformToScreenSpace (CompScreen *screen,
+ CompOutput *output,
+ float z,
+ CompTransform *transform);
+
+/* XXX: prepareXCoords will be removed */
+void
+prepareXCoords (CompScreen *screen,
+ CompOutput *output,
+ float z);
+
+void
+paintTransformedOutput (CompScreen *screen,
+ const ScreenPaintAttrib *sAttrib,
+ const CompTransform *transform,
+ Region region,
+ CompOutput *output,
+ unsigned int mask);
+
+/* XXX: applyScreenTransform will be removed */
+void
+applyScreenTransform (CompScreen *screen,
+ const ScreenPaintAttrib *sAttrib,
+ CompOutput *output,
+ CompTransform *transform);
+
+void
+paintScreen (CompScreen *screen,
+ CompOutput *outputs,
+ int numOutput,
+ unsigned int mask);
+
+Bool
+paintOutput (CompScreen *screen,
+ const ScreenPaintAttrib *sAttrib,
+ const CompTransform *transform,
+ Region region,
+ CompOutput *output,
+ unsigned int mask);
+
+Bool
+moreWindowVertices (CompWindow *w,
+ int newSize);
+
+Bool
+moreWindowIndices (CompWindow *w,
+ int newSize);
+
+void
+addWindowGeometry (CompWindow *w,
+ CompMatrix *matrix,
+ int nMatrix,
+ Region region,
+ Region clip);
+
+void
+drawWindowTexture (CompWindow *w,
+ CompTexture *texture,
+ const FragmentAttrib *fragment,
+ unsigned int mask);
+
+Bool
+drawWindow (CompWindow *w,
+ const CompTransform *transform,
+ const FragmentAttrib *fragment,
+ Region region,
+ unsigned int mask);
+
+Bool
+paintWindow (CompWindow *w,
+ const WindowPaintAttrib *attrib,
+ const CompTransform *transform,
+ Region region,
+ unsigned int mask);
+
+void
+paintCursor (CompCursor *cursor,
+ const CompTransform *transform,
+ Region region,
+ unsigned int mask);
+
+void
+paintBackground (CompScreen *screen,
+ Region region,
+ unsigned int mask);
+
+
+/* texture.c */
+
+#define POWER_OF_TWO(v) ((v & (v - 1)) == 0)
+
+typedef enum {
+ COMP_TEXTURE_FILTER_FAST,
+ COMP_TEXTURE_FILTER_GOOD
+} CompTextureFilter;
+
+struct _CompTexture {
+ GLuint name;
+ GLenum target;
+ GLfloat dx, dy;
+ GLXPixmap pixmap;
+ GLenum filter;
+ GLenum wrap;
+ CompMatrix matrix;
+ Bool oldMipmaps;
+ Bool mipmap;
+ int refCount;
+};
+
+void
+initTexture (CompScreen *screen,
+ CompTexture *texture);
+
+void
+finiTexture (CompScreen *screen,
+ CompTexture *texture);
+
+CompTexture *
+createTexture (CompScreen *screen);
+
+void
+destroyTexture (CompScreen *screen,
+ CompTexture *texture);
+
+Bool
+imageBufferToTexture (CompScreen *screen,
+ CompTexture *texture,
+ const char *image,
+ unsigned int width,
+ unsigned int height);
+
+Bool
+imageDataToTexture (CompScreen *screen,
+ CompTexture *texture,
+ const char *image,
+ unsigned int width,
+ unsigned int height,
+ GLenum format,
+ GLenum type);
+
+
+Bool
+readImageToTexture (CompScreen *screen,
+ CompTexture *texture,
+ const char *imageFileName,
+ unsigned int *width,
+ unsigned int *height);
+
+Bool
+iconToTexture (CompScreen *screen,
+ CompIcon *icon);
+
+Bool
+bindPixmapToTexture (CompScreen *screen,
+ CompTexture *texture,
+ Pixmap pixmap,
+ int width,
+ int height,
+ int depth);
+
+void
+releasePixmapFromTexture (CompScreen *screen,
+ CompTexture *texture);
+
+void
+enableTexture (CompScreen *screen,
+ CompTexture *texture,
+ CompTextureFilter filter);
+
+void
+enableTextureClampToBorder (CompScreen *screen,
+ CompTexture *texture,
+ CompTextureFilter filter);
+
+void
+enableTextureClampToEdge (CompScreen *screen,
+ CompTexture *texture,
+ CompTextureFilter filter);
+
+void
+disableTexture (CompScreen *screen,
+ CompTexture *texture);
+
+
+/* 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_FOCUS_PREVENTION_MATCH 12
+#define COMP_SCREEN_OPTION_OPACITY_MATCHES 13
+#define COMP_SCREEN_OPTION_OPACITY_VALUES 14
+#define COMP_SCREEN_OPTION_NUM 15
+
+#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 (*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 (*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 (*SetScreenOptionForPluginProc) (CompScreen *screen,
+ const char *plugin,
+ const char *name,
+ CompOptionValue *value);
+
+typedef void (*EnterShowDesktopModeProc) (CompScreen *screen);
+
+typedef void (*LeaveShowDesktopModeProc) (CompScreen *screen,
+ CompWindow *window);
+
+typedef Bool (*DamageWindowRectProc) (CompWindow *w,
+ Bool initial,
+ BoxPtr rect);
+
+typedef Bool (*DamageWindowRegionProc) (CompWindow *w,
+ Region region);
+
+typedef Bool (*DamageCursorRectProc) (CompCursor *c,
+ Bool initial,
+ BoxPtr rect);
+
+
+typedef void (*GetOutputExtentsForWindowProc) (CompWindow *w,
+ CompWindowExtents *output);
+
+typedef unsigned int (*GetAllowedActionsForWindowProc) (CompWindow *w);
+
+typedef Bool (*FocusWindowProc) (CompWindow *window);
+
+typedef Bool (*PlaceWindowProc) (CompWindow *window,
+ int x,
+ int y,
+ int *newX,
+ int *newY);
+
+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)
+
+typedef void (*WindowGrabNotifyProc) (CompWindow *window,
+ int x,
+ int y,
+ unsigned int state,
+ unsigned int mask);
+
+typedef void (*WindowUngrabNotifyProc) (CompWindow *window);
+
+typedef void (*WindowStateChangeNotifyProc) (CompWindow *window,
+ unsigned int lastState);
+
+typedef void (*WindowAddNotifyProc) (CompWindow *window);
+
+typedef void (*OutputChangeNotifyProc) (CompScreen *screen);
+
+typedef void (*InitWindowWalkerProc) (CompScreen *screen,
+ CompWalker *walker);
+
+#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 _CompKeyGrab {
+ int keycode;
+ unsigned int modifiers;
+ int count;
+} CompKeyGrab;
+
+typedef struct _CompButtonGrab {
+ int button;
+ unsigned int modifiers;
+ int count;
+} CompButtonGrab;
+
+typedef struct _CompGrab {
+ Bool active;
+ Cursor cursor;
+ const char *name;
+} CompGrab;
+
+typedef struct _CompGroup {
+ struct _CompGroup *next;
+ unsigned int refCnt;
+ Window id;
+} CompGroup;
+
+typedef struct _CompStartupSequence {
+ struct _CompStartupSequence *next;
+ SnStartupSequence *sequence;
+ unsigned int viewportX;
+ unsigned int viewportY;
+} CompStartupSequence;
+
+typedef struct _CompFBConfig {
+ GLXFBConfig fbConfig;
+ int yInverted;
+ int mipmap;
+ int textureFormat;
+ int textureTargets;
+} CompFBConfig;
+
+#define NOTHING_TRANS_FILTER 0
+#define SCREEN_TRANS_FILTER 1
+#define WINDOW_TRANS_FILTER 2
+
+#define SCREEN_EDGE_LEFT 0
+#define SCREEN_EDGE_RIGHT 1
+#define SCREEN_EDGE_TOP 2
+#define SCREEN_EDGE_BOTTOM 3
+#define SCREEN_EDGE_TOPLEFT 4
+#define SCREEN_EDGE_TOPRIGHT 5
+#define SCREEN_EDGE_BOTTOMLEFT 6
+#define SCREEN_EDGE_BOTTOMRIGHT 7
+#define SCREEN_EDGE_NUM 8
+
+typedef struct _CompScreenEdge {
+ Window id;
+ unsigned int count;
+} CompScreenEdge;
+
+struct _CompIcon {
+ CompTexture texture;
+ int width;
+ int height;
+};
+
+struct _CompOutput {
+ char *name;
+ int id;
+ REGION region;
+ int width;
+ int height;
+ XRectangle workArea;
+};
+
+typedef struct _CompCursorImage {
+ struct _CompCursorImage *next;
+
+ unsigned long serial;
+ Pixmap pixmap;
+ CompTexture texture;
+ int xhot;
+ int yhot;
+ int width;
+ int height;
+} CompCursorImage;
+
+struct _CompCursor {
+ struct _CompCursor *next;
+
+ CompScreen *screen;
+ CompCursorImage *image;
+
+ int x;
+ int y;
+
+ CompMatrix matrix;
+};
+
+#define ACTIVE_WINDOW_HISTORY_SIZE 64
+#define ACTIVE_WINDOW_HISTORY_NUM 32
+
+typedef struct _CompActiveWindowHistory {
+ Window id[ACTIVE_WINDOW_HISTORY_SIZE];
+ int x;
+ int y;
+ int activeNum;
+} CompActiveWindowHistory;
+
+struct _CompScreen {
+ CompScreen *next;
+ CompDisplay *display;
+ CompWindow *windows;
+ CompWindow *reverseWindows;
+
+ char *windowPrivateIndices;
+ int windowPrivateLen;
+
+ Colormap colormap;
+ int screenNum;
+ int width;
+ int height;
+ int x;
+ int y;
+ int hsize; /* Number of horizontal viewports */
+ int vsize; /* Number of vertical viewports */
+ unsigned int nDesktop;
+ unsigned int currentDesktop;
+ REGION region;
+ Region damage;
+ unsigned long damageMask;
+ Window root;
+ Window overlay;
+ Window output;
+ XWindowAttributes attrib;
+ Window grabWindow;
+ CompFBConfig glxPixmapFBConfigs[MAX_DEPTH + 1];
+ int textureRectangle;
+ int textureNonPowerOfTwo;
+ int textureEnvCombine;
+ int textureEnvCrossbar;
+ int textureBorderClamp;
+ GLint maxTextureSize;
+ int fbo;
+ int fragmentProgram;
+ int maxTextureUnits;
+ Cursor invisibleCursor;
+ XRectangle *exposeRects;
+ int sizeExpose;
+ int nExpose;
+ CompTexture backgroundTexture;
+ Bool backgroundLoaded;
+ unsigned int pendingDestroys;
+ int desktopWindowCount;
+ unsigned int mapNum;
+ unsigned int activeNum;
+
+ CompOutput *outputDev;
+ int nOutputDev;
+ int currentOutputDev;
+ CompOutput fullscreenOutput;
+
+ XRectangle lastViewport;
+
+ CompActiveWindowHistory history[ACTIVE_WINDOW_HISTORY_NUM];
+ int currentHistory;
+
+ int overlayWindowCount;
+
+ CompScreenEdge screenEdge[SCREEN_EDGE_NUM];
+
+ SnMonitorContext *snContext;
+ CompStartupSequence *startupSequences;
+ unsigned int startupSequenceTimeoutHandle;
+
+ int filter[3];
+
+ CompGroup *groups;
+
+ CompIcon *defaultIcon;
+
+ Bool canDoSaturated;
+ Bool canDoSlightlySaturated;
+
+ Window wmSnSelectionWindow;
+ Atom wmSnAtom;
+ Time wmSnTimestamp;
+
+ Cursor normalCursor;
+ Cursor busyCursor;
+
+ CompWindow **clientList;
+ int nClientList;
+
+ CompButtonGrab *buttonGrab;
+ int nButtonGrab;
+ CompKeyGrab *keyGrab;
+ int nKeyGrab;
+
+ CompGrab *grabs;
+ int grabSize;
+ int maxGrab;
+
+ int rasterX;
+ int rasterY;
+ struct timeval lastRedraw;
+ int nextRedraw;
+ int redrawTime;
+ int optimalRedrawTime;
+ int frameStatus;
+ int timeMult;
+ Bool idle;
+ int timeLeft;
+ Bool pendingCommands;
+
+ int lastFunctionId;
+
+ CompFunction *fragmentFunctions;
+ CompProgram *fragmentPrograms;
+
+ int saturateFunction[2][64];
+
+ GLfloat projection[16];
+
+ Bool clearBuffers;
+
+ Bool lighting;
+ Bool slowAnimations;
+
+ XRectangle workArea;
+
+ unsigned int showingDesktopMask;
+
+ unsigned long *desktopHintData;
+ int desktopHintSize;
+
+ CompCursor *cursors;
+ CompCursorImage *cursorImages;
+
+ GLXGetProcAddressProc getProcAddress;
+ GLXBindTexImageProc bindTexImage;
+ GLXReleaseTexImageProc releaseTexImage;
+ GLXQueryDrawableProc queryDrawable;
+ GLXCopySubBufferProc copySubBuffer;
+ GLXGetVideoSyncProc getVideoSync;
+ GLXWaitVideoSyncProc waitVideoSync;
+ GLXGetFBConfigsProc getFBConfigs;
+ GLXGetFBConfigAttribProc getFBConfigAttrib;
+ GLXCreatePixmapProc createPixmap;
+
+ GLActiveTextureProc activeTexture;
+ GLClientActiveTextureProc clientActiveTexture;
+
+ GLGenProgramsProc genPrograms;
+ GLDeleteProgramsProc deletePrograms;
+ GLBindProgramProc bindProgram;
+ GLProgramStringProc programString;
+ GLProgramParameter4fProc programEnvParameter4f;
+ GLProgramParameter4fProc programLocalParameter4f;
+
+ GLGenFramebuffersProc genFramebuffers;
+ GLDeleteFramebuffersProc deleteFramebuffers;
+ GLBindFramebufferProc bindFramebuffer;
+ GLCheckFramebufferStatusProc checkFramebufferStatus;
+ GLFramebufferTexture2DProc framebufferTexture2D;
+ GLGenerateMipmapProc generateMipmap;
+
+ GLXContext ctx;
+
+ CompOption opt[COMP_SCREEN_OPTION_NUM];
+
+ SetScreenOptionForPluginProc setScreenOptionForPlugin;
+
+ InitPluginForScreenProc initPluginForScreen;
+ FiniPluginForScreenProc finiPluginForScreen;
+
+ PreparePaintScreenProc preparePaintScreen;
+ DonePaintScreenProc donePaintScreen;
+ PaintScreenProc paintScreen;
+ PaintOutputProc paintOutput;
+ PaintTransformedOutputProc paintTransformedOutput;
+ ApplyScreenTransformProc applyScreenTransform;
+ PaintBackgroundProc paintBackground;
+ PaintWindowProc paintWindow;
+ DrawWindowProc drawWindow;
+ AddWindowGeometryProc addWindowGeometry;
+ DrawWindowTextureProc drawWindowTexture;
+ DamageWindowRectProc damageWindowRect;
+ GetOutputExtentsForWindowProc getOutputExtentsForWindow;
+ GetAllowedActionsForWindowProc getAllowedActionsForWindow;
+ FocusWindowProc focusWindow;
+ PlaceWindowProc placeWindow;
+
+ PaintCursorProc paintCursor;
+ DamageCursorRectProc damageCursorRect;
+
+ WindowAddNotifyProc windowAddNotify;
+ WindowResizeNotifyProc windowResizeNotify;
+ WindowMoveNotifyProc windowMoveNotify;
+ WindowGrabNotifyProc windowGrabNotify;
+ WindowUngrabNotifyProc windowUngrabNotify;
+
+ EnterShowDesktopModeProc enterShowDesktopMode;
+ LeaveShowDesktopModeProc leaveShowDesktopMode;
+
+ WindowStateChangeNotifyProc windowStateChangeNotify;
+
+ OutputChangeNotifyProc outputChangeNotify;
+
+ InitWindowWalkerProc initWindowWalker;
+
+ CompPrivate *privates;
+};
+
+int
+allocateScreenPrivateIndex (CompDisplay *display);
+
+void
+freeScreenPrivateIndex (CompDisplay *display,
+ int index);
+
+CompOption *
+getScreenOptions (CompScreen *screen,
+ int *count);
+
+Bool
+setScreenOption (CompScreen *screen,
+ const char *name,
+ CompOptionValue *value);
+
+void
+configureScreen (CompScreen *s,
+ XConfigureEvent *ce);
+
+void
+setCurrentOutput (CompScreen *s,
+ int outputNum);
+
+void
+updateScreenBackground (CompScreen *screen,
+ CompTexture *texture);
+
+void
+detectRefreshRateOfScreen (CompScreen *s);
+
+void
+showOutputWindow (CompScreen *s);
+
+void
+hideOutputWindow (CompScreen *s);
+
+Bool
+addScreen (CompDisplay *display,
+ int screenNum,
+ Window wmSnSelectionWindow,
+ Atom wmSnAtom,
+ Time wmSnTimestamp);
+
+void
+damageScreenRegion (CompScreen *screen,
+ Region region);
+
+void
+damageScreen (CompScreen *screen);
+
+void
+damagePendingOnScreen (CompScreen *s);
+
+void
+insertWindowIntoScreen (CompScreen *s,
+ CompWindow *w,
+ Window aboveId);
+
+void
+unhookWindowFromScreen (CompScreen *s,
+ CompWindow *w);
+
+void
+forEachWindowOnScreen (CompScreen *screen,
+ ForEachWindowProc proc,
+ void *closure);
+
+CompWindow *
+findWindowAtScreen (CompScreen *s,
+ Window id);
+
+CompWindow *
+findTopLevelWindowAtScreen (CompScreen *s,
+ Window id);
+
+int
+pushScreenGrab (CompScreen *s,
+ Cursor cursor,
+ const char *name);
+
+void
+updateScreenGrab (CompScreen *s,
+ int index,
+ Cursor cursor);
+
+void
+removeScreenGrab (CompScreen *s,
+ int index,
+ XPoint *restorePointer);
+
+Bool
+otherScreenGrabExist (CompScreen *s, ...);
+
+Bool
+addScreenAction (CompScreen *s,
+ CompAction *action);
+
+void
+removeScreenAction (CompScreen *s,
+ CompAction *action);
+
+void
+updatePassiveGrabs (CompScreen *s);
+
+void
+updateWorkareaForScreen (CompScreen *s);
+
+void
+updateClientListForScreen (CompScreen *s);
+
+Window
+getActiveWindow (CompDisplay *display,
+ Window root);
+
+void
+toolkitAction (CompScreen *s,
+ Atom toolkitAction,
+ Time eventTime,
+ Window window,
+ long data0,
+ long data1,
+ long data2);
+
+void
+runCommand (CompScreen *s,
+ const char *command);
+
+void
+moveScreenViewport (CompScreen *s,
+ int tx,
+ int ty,
+ Bool sync);
+
+void
+moveWindowToViewportPosition (CompWindow *w,
+ int x,
+ int y,
+ Bool sync);
+
+CompGroup *
+addGroupToScreen (CompScreen *s,
+ Window id);
+void
+removeGroupFromScreen (CompScreen *s,
+ CompGroup *group);
+
+CompGroup *
+findGroupAtScreen (CompScreen *s,
+ Window id);
+
+void
+applyStartupProperties (CompScreen *screen,
+ CompWindow *window);
+
+void
+sendWindowActivationRequest (CompScreen *s,
+ Window id);
+
+void
+screenTexEnvMode (CompScreen *s,
+ GLenum mode);
+
+void
+screenLighting (CompScreen *s,
+ Bool lighting);
+
+void
+enableScreenEdge (CompScreen *s,
+ int edge);
+
+void
+disableScreenEdge (CompScreen *s,
+ int edge);
+
+Window
+getTopWindow (CompScreen *s);
+
+void
+makeScreenCurrent (CompScreen *s);
+
+void
+finishScreenDrawing (CompScreen *s);
+
+int
+outputDeviceForPoint (CompScreen *s,
+ int x,
+ int y);
+
+void
+getCurrentOutputExtents (CompScreen *s,
+ int *x1,
+ int *y1,
+ int *x2,
+ int *y2);
+
+void
+getWorkareaForOutput (CompScreen *s,
+ int output,
+ XRectangle *area);
+
+void
+setNumberOfDesktops (CompScreen *s,
+ unsigned int nDesktop);
+
+void
+setCurrentDesktop (CompScreen *s,
+ unsigned int desktop);
+
+void
+setDefaultViewport (CompScreen *s);
+
+void
+outputChangeNotify (CompScreen *s);
+
+void
+clearScreenOutput (CompScreen *s,
+ CompOutput *output,
+ unsigned int mask);
+
+void
+viewportForGeometry (CompScreen *s,
+ int x,
+ int y,
+ int width,
+ int height,
+ int borderWidth,
+ int *viewportX,
+ int *viewportY);
+
+int
+outputDeviceForGeometry (CompScreen *s,
+ int x,
+ int y,
+ int width,
+ int height,
+ int borderWidth);
+
+Bool
+updateDefaultIcon (CompScreen *screen);
+
+CompCursor *
+findCursorAtScreen (CompScreen *screen);
+
+CompCursorImage *
+findCursorImageAtScreen (CompScreen *screen,
+ unsigned long serial);
+
+void
+setCurrentActiveWindowHistory (CompScreen *s,
+ int x,
+ int y);
+
+void
+addToCurrentActiveWindowHistory (CompScreen *s,
+ Window id);
+
+
+/* window.c */
+
+#define WINDOW_INVISIBLE(w) \
+ ((w)->attrib.map_state != IsViewable || \
+ (!(w)->damaged) || \
+ (w)->attrib.x + (w)->width + (w)->output.right <= 0 || \
+ (w)->attrib.y + (w)->height + (w)->output.bottom <= 0 || \
+ (w)->attrib.x - (w)->output.left >= (w)->screen->width || \
+ (w)->attrib.y - (w)->output.top >= (w)->screen->height)
+
+typedef enum {
+ CompStackingUpdateModeNone = 0,
+ CompStackingUpdateModeNormal,
+ CompStackingUpdateModeAboveFullscreen
+} CompStackingUpdateMode;
+
+struct _CompWindowExtents {
+ int left;
+ int right;
+ int top;
+ int bottom;
+};
+
+typedef struct _CompStruts {
+ XRectangle left;
+ XRectangle right;
+ XRectangle top;
+ XRectangle bottom;
+} CompStruts;
+
+struct _CompWindow {
+ CompScreen *screen;
+ CompWindow *next;
+ CompWindow *prev;
+
+ int refcnt;
+ Window id;
+ Window frame;
+ unsigned int mapNum;
+ unsigned int activeNum;
+ XWindowAttributes attrib;
+ int serverX;
+ int serverY;
+ int serverWidth;
+ int serverHeight;
+ int serverBorderWidth;
+ Window transientFor;
+ Window clientLeader;
+ XSizeHints sizeHints;
+ Pixmap pixmap;
+ CompTexture *texture;
+ CompMatrix matrix;
+ Damage damage;
+ Bool inputHint;
+ Bool alpha;
+ GLint width;
+ GLint height;
+ Region region;
+ Region clip;
+ unsigned int wmType;
+ unsigned int type;
+ unsigned int state;
+ unsigned int actions;
+ unsigned int protocols;
+ unsigned int mwmDecor;
+ unsigned int mwmFunc;
+ Bool invisible;
+ Bool destroyed;
+ Bool damaged;
+ Bool redirected;
+ Bool managed;
+ Bool bindFailed;
+ Bool added;
+ int destroyRefCnt;
+ int unmapRefCnt;
+
+ unsigned int initialViewportX;
+ unsigned int initialViewportY;
+
+ Time initialTimestamp;
+ Bool initialTimestampSet;
+
+ Bool placed;
+ Bool minimized;
+ Bool inShowDesktopMode;
+ Bool shaded;
+ Bool hidden;
+ Bool grabbed;
+
+ unsigned int desktop;
+
+ int pendingUnmaps;
+ int pendingMaps;
+
+ char *startupId;
+ char *resName;
+ char *resClass;
+
+ CompGroup *group;
+
+ unsigned int lastPong;
+ Bool alive;
+
+ GLushort opacity;
+ GLushort brightness;
+ GLushort saturation;
+
+ Bool opacityPropSet;
+ int opacityFactor;
+
+ WindowPaintAttrib paint;
+ WindowPaintAttrib lastPaint;
+
+ unsigned int lastMask;
+
+ CompWindowExtents input;
+ CompWindowExtents output;
+
+ CompStruts *struts;
+
+ CompIcon **icon;
+ int nIcon;
+
+ XWindowChanges saveWc;
+ int saveMask;
+
+ XSyncCounter syncCounter;
+ XSyncValue syncValue;
+ XSyncAlarm syncAlarm;
+ unsigned long syncAlarmConnection;
+ unsigned int syncWaitHandle;
+
+ Bool syncWait;
+ int syncX;
+ int syncY;
+ int syncWidth;
+ int syncHeight;
+ int syncBorderWidth;
+
+ Bool closeRequests;
+ Time lastCloseRequestTime;
+
+ XRectangle *damageRects;
+ int sizeDamage;
+ int nDamage;
+
+ GLfloat *vertices;
+ int vertexSize;
+ GLushort *indices;
+ int indexSize;
+ int vCount;
+ int texUnits;
+ int texCoordSize;
+ int indexCount;
+
+ /* must be set by addWindowGeometry */
+ DrawWindowGeometryProc drawWindowGeometry;
+
+ CompPrivate *privates;
+};
+
+int
+allocateWindowPrivateIndex (CompScreen *screen);
+
+void
+freeWindowPrivateIndex (CompScreen *screen,
+ int index);
+
+unsigned int
+windowStateMask (CompDisplay *display,
+ Atom state);
+
+unsigned int
+windowStateFromString (const char *str);
+
+unsigned int
+getWindowState (CompDisplay *display,
+ Window id);
+
+void
+setWindowState (CompDisplay *display,
+ unsigned int state,
+ Window id);
+
+void
+changeWindowState (CompWindow *w,
+ unsigned int newState);
+
+void
+recalcWindowActions (CompWindow *w);
+
+unsigned int
+constrainWindowState (unsigned int state,
+ unsigned int actions);
+
+unsigned int
+windowTypeFromString (const char *str);
+
+unsigned int
+getWindowType (CompDisplay *display,
+ Window id);
+
+void
+recalcWindowType (CompWindow *w);
+
+void
+getMwmHints (CompDisplay *display,
+ Window id,
+ unsigned int *func,
+ unsigned int *decor);
+
+unsigned int
+getProtocols (CompDisplay *display,
+ Window id);
+
+unsigned int
+getWindowProp (CompDisplay *display,
+ Window id,
+ Atom property,
+ unsigned int defaultValue);
+
+void
+setWindowProp (CompDisplay *display,
+ Window id,
+ Atom property,
+ unsigned int value);
+
+Bool
+readWindowProp32 (CompDisplay *display,
+ Window id,
+ Atom property,
+ unsigned short *returnValue);
+
+unsigned short
+getWindowProp32 (CompDisplay *display,
+ Window id,
+ Atom property,
+ unsigned short defaultValue);
+
+void
+setWindowProp32 (CompDisplay *display,
+ Window id,
+ Atom property,
+ unsigned short value);
+
+void
+updateWindowOpacity (CompWindow *window);
+
+void
+updateNormalHints (CompWindow *window);
+
+void
+updateWmHints (CompWindow *w);
+
+void
+updateWindowClassHints (CompWindow *window);
+
+void
+updateTransientHint (CompWindow *w);
+
+Window
+getClientLeader (CompWindow *w);
+
+char *
+getStartupId (CompWindow *w);
+
+int
+getWmState (CompDisplay *display,
+ Window id);
+
+void
+setWmState (CompDisplay *display,
+ int state,
+ Window id);
+
+void
+setWindowFrameExtents (CompWindow *w,
+ CompWindowExtents *input);
+
+void
+updateWindowOutputExtents (CompWindow *w);
+
+void
+updateWindowRegion (CompWindow *w);
+
+Bool
+updateWindowStruts (CompWindow *w);
+
+void
+addWindow (CompScreen *screen,
+ Window id,
+ Window aboveId);
+
+void
+removeWindow (CompWindow *w);
+
+void
+destroyWindow (CompWindow *w);
+
+void
+sendConfigureNotify (CompWindow *w);
+
+void
+mapWindow (CompWindow *w);
+
+void
+unmapWindow (CompWindow *w);
+
+Bool
+bindWindow (CompWindow *w);
+
+void
+releaseWindow (CompWindow *w);
+
+void
+moveWindow (CompWindow *w,
+ int dx,
+ int dy,
+ Bool damage,
+ Bool immediate);
+
+void
+configureXWindow (CompWindow *w,
+ unsigned int valueMask,
+ XWindowChanges *xwc);
+
+void
+moveResizeWindow (CompWindow *w,
+ XWindowChanges *xwc,
+ unsigned int xwcm,
+ int gravity);
+
+void
+syncWindowPosition (CompWindow *w);
+
+void
+sendSyncRequest (CompWindow *w);
+
+Bool
+resizeWindow (CompWindow *w,
+ int x,
+ int y,
+ int width,
+ int height,
+ int borderWidth);
+
+void
+configureWindow (CompWindow *w,
+ XConfigureEvent *ce);
+
+void
+circulateWindow (CompWindow *w,
+ XCirculateEvent *ce);
+
+void
+addWindowDamageRect (CompWindow *w,
+ BoxPtr rect);
+
+void
+getOutputExtentsForWindow (CompWindow *w,
+ CompWindowExtents *output);
+
+unsigned int
+getAllowedActionsForWindow (CompWindow *w);
+
+void
+addWindowDamage (CompWindow *w);
+
+void
+damageWindowOutputExtents (CompWindow *w);
+
+Bool
+damageWindowRect (CompWindow *w,
+ Bool initial,
+ BoxPtr rect);
+
+void
+damageTransformedWindowRect (CompWindow *w,
+ float xScale,
+ float yScale,
+ float xTranslate,
+ float yTranslate,
+ BoxPtr rect);
+
+Bool
+focusWindow (CompWindow *w);
+
+Bool
+placeWindow (CompWindow *w,
+ int x,
+ int y,
+ int *newX,
+ int *newY);
+
+void
+windowResizeNotify (CompWindow *w,
+ int dx,
+ int dy,
+ int dwidth,
+ int dheight);
+
+void
+windowMoveNotify (CompWindow *w,
+ int dx,
+ int dy,
+ Bool immediate);
+
+void
+windowGrabNotify (CompWindow *w,
+ int x,
+ int y,
+ unsigned int state,
+ unsigned int mask);
+
+void
+windowUngrabNotify (CompWindow *w);
+
+void
+windowStateChangeNotify (CompWindow *w,
+ unsigned int lastState);
+
+void
+moveInputFocusToWindow (CompWindow *w);
+
+void
+updateWindowSize (CompWindow *w);
+
+void
+raiseWindow (CompWindow *w);
+
+void
+lowerWindow (CompWindow *w);
+
+void
+restackWindowAbove (CompWindow *w,
+ CompWindow *sibling);
+
+void
+restackWindowBelow (CompWindow *w,
+ CompWindow *sibling);
+
+void
+updateWindowAttributes (CompWindow *w,
+ CompStackingUpdateMode stackingMode);
+
+void
+activateWindow (CompWindow *w);
+
+void
+closeWindow (CompWindow *w,
+ Time serverTime);
+
+Bool
+constrainNewWindowSize (CompWindow *w,
+ int width,
+ int height,
+ int *newWidth,
+ int *newHeight);
+
+void
+hideWindow (CompWindow *w);
+
+void
+showWindow (CompWindow *w);
+
+void
+minimizeWindow (CompWindow *w);
+
+void
+unminimizeWindow (CompWindow *w);
+
+void
+maximizeWindow (CompWindow *w,
+ int state);
+
+Bool
+getWindowUserTime (CompWindow *w,
+ Time *time);
+
+void
+setWindowUserTime (CompWindow *w,
+ Time time);
+
+Bool
+focusWindowOnMap (CompWindow *w);
+
+void
+unredirectWindow (CompWindow *w);
+
+void
+redirectWindow (CompWindow *w);
+
+void
+defaultViewportForWindow (CompWindow *w,
+ int *vx,
+ int *vy);
+
+CompIcon *
+getWindowIcon (CompWindow *w,
+ int width,
+ int height);
+
+void
+freeWindowIcons (CompWindow *w);
+
+int
+outputDeviceForWindow (CompWindow *w);
+
+Bool
+onCurrentDesktop (CompWindow *w);
+
+void
+setDesktopForWindow (CompWindow *w,
+ unsigned int desktop);
+
+int
+compareWindowActiveness (CompWindow *w1,
+ CompWindow *w2);
+
+void
+windowAddNotify (CompWindow *w);
+
+
+/* plugin.c */
+
+#define HOME_PLUGINDIR ".compiz/plugins"
+
+typedef CompPluginVTable *(*PluginGetInfoProc) (void);
+
+typedef Bool (*LoadPluginProc) (CompPlugin *p,
+ const char *path,
+ const char *name);
+
+typedef void (*UnloadPluginProc) (CompPlugin *p);
+
+typedef char **(*ListPluginsProc) (const char *path,
+ int *n);
+
+extern LoadPluginProc loaderLoadPlugin;
+extern UnloadPluginProc loaderUnloadPlugin;
+extern ListPluginsProc loaderListPlugins;
+
+struct _CompPlugin {
+ CompPlugin *next;
+ CompPrivate devPrivate;
+ char *devType;
+ CompPluginVTable *vTable;
+};
+
+Bool
+initPluginForDisplay (CompPlugin *p,
+ CompDisplay *d);
+
+void
+finiPluginForDisplay (CompPlugin *p,
+ CompDisplay *d);
+
+Bool
+initPluginForScreen (CompPlugin *p,
+ CompScreen *s);
+
+void
+finiPluginForScreen (CompPlugin *p,
+ CompScreen *s);
+
+void
+screenInitPlugins (CompScreen *s);
+
+void
+screenFiniPlugins (CompScreen *s);
+
+void
+windowInitPlugins (CompWindow *w);
+
+void
+windowFiniPlugins (CompWindow *w);
+
+CompPlugin *
+findActivePlugin (const char *name);
+
+CompPlugin *
+loadPlugin (const char *plugin);
+
+void
+unloadPlugin (CompPlugin *p);
+
+Bool
+pushPlugin (CompPlugin *p);
+
+CompPlugin *
+popPlugin (void);
+
+CompPlugin *
+getPlugins (void);
+
+char **
+availablePlugins (int *n);
+
+int
+getPluginABI (const char *name);
+
+Bool
+checkPluginABI (const char *name,
+ int abi);
+
+Bool
+getPluginDisplayIndex (CompDisplay *d,
+ const char *name,
+ int *index);
+
+
+/* session.c */
+
+void
+initSession (char *smPrevClientId);
+
+void
+closeSession (void);
+
+
+/* fragment.c */
+
+#define MAX_FRAGMENT_FUNCTIONS 16
+
+struct _FragmentAttrib {
+ GLushort opacity;
+ GLushort brightness;
+ GLushort saturation;
+ int nTexture;
+ int function[MAX_FRAGMENT_FUNCTIONS];
+ int nFunction;
+ int nParam;
+};
+
+CompFunctionData *
+createFunctionData (void);
+
+void
+destroyFunctionData (CompFunctionData *data);
+
+Bool
+addTempHeaderOpToFunctionData (CompFunctionData *data,
+ const char *name);
+
+Bool
+addParamHeaderOpToFunctionData (CompFunctionData *data,
+ const char *name);
+
+Bool
+addAttribHeaderOpToFunctionData (CompFunctionData *data,
+ const char *name);
+
+#define COMP_FETCH_TARGET_2D 0
+#define COMP_FETCH_TARGET_RECT 1
+#define COMP_FETCH_TARGET_NUM 2
+
+Bool
+addFetchOpToFunctionData (CompFunctionData *data,
+ const char *dst,
+ const char *offset,
+ int target);
+
+Bool
+addColorOpToFunctionData (CompFunctionData *data,
+ const char *dst,
+ const char *src);
+
+Bool
+addDataOpToFunctionData (CompFunctionData *data,
+ const char *str,
+ ...);
+
+Bool
+addBlendOpToFunctionData (CompFunctionData *data,
+ const char *str,
+ ...);
+
+int
+createFragmentFunction (CompScreen *s,
+ const char *name,
+ CompFunctionData *data);
+
+void
+destroyFragmentFunction (CompScreen *s,
+ int id);
+
+int
+getSaturateFragmentFunction (CompScreen *s,
+ CompTexture *texture,
+ int param);
+
+int
+allocFragmentTextureUnits (FragmentAttrib *attrib,
+ int nTexture);
+
+int
+allocFragmentParameters (FragmentAttrib *attrib,
+ int nParam);
+
+void
+addFragmentFunction (FragmentAttrib *attrib,
+ int function);
+
+void
+initFragmentAttrib (FragmentAttrib *attrib,
+ const WindowPaintAttrib *paint);
+
+Bool
+enableFragmentAttrib (CompScreen *s,
+ FragmentAttrib *attrib,
+ Bool *blending);
+
+void
+disableFragmentAttrib (CompScreen *s,
+ FragmentAttrib *attrib);
+
+
+/* matrix.c */
+
+void
+matrixRotate (CompTransform *transform,
+ float angle,
+ float x,
+ float y,
+ float z);
+
+void
+matrixScale (CompTransform *transform,
+ float x,
+ float y,
+ float z);
+
+void
+matrixTranslate (CompTransform *transform,
+ float x,
+ float y,
+ float z);
+
+
+/* cursor.c */
+
+void
+addCursor (CompScreen *s);
+
+Bool
+damageCursorRect (CompCursor *c,
+ Bool initial,
+ BoxPtr rect);
+
+void
+addCursorDamageRect (CompCursor *c,
+ BoxPtr rect);
+
+void
+addCursorDamage (CompCursor *c);
+
+void
+updateCursor (CompCursor *c,
+ int x,
+ int y,
+ unsigned long serial);
+
+
+/* match.c */
+
+void
+matchInit (CompMatch *match);
+
+void
+matchFini (CompMatch *match);
+
+Bool
+matchEqual (CompMatch *m1,
+ CompMatch *m2);
+
+Bool
+matchCopy (CompMatch *dst,
+ CompMatch *src);
+
+Bool
+matchAddGroup (CompMatch *match,
+ int flags,
+ CompMatch *group);
+
+Bool
+matchAddExp (CompMatch *match,
+ int flags,
+ const char *value);
+
+void
+matchAddFromString (CompMatch *match,
+ const char *str);
+
+char *
+matchToString (CompMatch *match);
+
+void
+matchUpdate (CompDisplay *display,
+ CompMatch *match);
+
+Bool
+matchEval (CompMatch *match,
+ CompWindow *window);
+
+void
+matchInitExp (CompDisplay *display,
+ CompMatchExp *exp,
+ const char *value);
+
+void
+matchExpHandlerChanged (CompDisplay *display);
+
+void
+matchPropertyChanged (CompDisplay *display,
+ CompWindow *window);
+
+
+/* metadata.c */
+
+#define STRINGIFY(x) #x
+#define TOSTRING(x) STRINGIFY (x)
+#define MINTOSTRING(x) "<min>" TOSTRING (x) "</min>"
+#define MAXTOSTRING(x) "<max>" TOSTRING (x) "</max>"
+#define RESTOSTRING(min, max) MINTOSTRING (min) MAXTOSTRING (max)
+
+typedef struct _CompMetadataOptionInfo {
+ char *name;
+ char *type;
+ char *data;
+ CompActionCallBackProc initiate;
+ 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;
+ int nDoc;
+};
+
+Bool
+compInitPluginMetadataFromInfo (CompMetadata *metadata,
+ const char *plugin,
+ const CompMetadataOptionInfo *displayOptionInfo,
+ int nDisplayOptionInfo,
+ const CompMetadataOptionInfo *screenOptionInfo,
+ int nScreenOptionInfo);
+
+Bool
+compInitScreenOptionFromMetadata (CompScreen *screen,
+ CompMetadata *metadata,
+ CompOption *option,
+ const char *name);
+
+void
+compFiniScreenOption (CompScreen *screen,
+ CompOption *option);
+
+Bool
+compInitScreenOptionsFromMetadata (CompScreen *screen,
+ CompMetadata *metadata,
+ const CompMetadataOptionInfo *info,
+ CompOption *option,
+ int n);
+
+void
+compFiniScreenOptions (CompScreen *screen,
+ CompOption *option,
+ int n);
+
+Bool
+compSetScreenOption (CompScreen *screen,
+ CompOption *option,
+ CompOptionValue *value);
+
+Bool
+compInitDisplayOptionFromMetadata (CompDisplay *display,
+ CompMetadata *metadata,
+ CompOption *option,
+ const char *name);
+
+void
+compFiniDisplayOption (CompDisplay *display,
+ CompOption *option);
+
+Bool
+compInitDisplayOptionsFromMetadata (CompDisplay *display,
+ CompMetadata *metadata,
+ const CompMetadataOptionInfo *info,
+ CompOption *option,
+ int n);
+
+void
+compFiniDisplayOptions (CompDisplay *display,
+ CompOption *option,
+ int n);
+
+Bool
+compSetDisplayOption (CompDisplay *display,
+ CompOption *option,
+ CompOptionValue *value);
+
+char *
+compGetShortPluginDescription (CompMetadata *metadata);
+
+char *
+compGetLongPluginDescription (CompMetadata *metadata);
+
+char *
+compGetShortScreenOptionDescription (CompMetadata *metadata,
+ CompOption *option);
+
+char *
+compGetLongScreenOptionDescription (CompMetadata *metadata,
+ CompOption *option);
+
+char *
+compGetShortDisplayOptionDescription (CompMetadata *metadata,
+ CompOption *option);
+
+char *
+compGetLongDisplayOptionDescription (CompMetadata *metadata,
+ CompOption *option);
+
+int
+compReadXmlChunkFromMetadataOptionInfo (const CompMetadataOptionInfo *info,
+ int *offset,
+ char *buffer,
+ int length);
+
+
+COMPIZ_END_DECLS
+
+#endif
diff --git a/include/compiz-cube.h b/include/compiz-cube.h
index 316de8eb..aa24b498 100644
--- a/include/compiz-cube.h
+++ b/include/compiz-cube.h
@@ -26,7 +26,7 @@
#ifndef _COMPIZ_CUBE_H
#define _COMPIZ_CUBE_H
-#include <compiz-plugin.h>
+#include <compiz-core.h>
COMPIZ_BEGIN_DECLS
diff --git a/include/compiz-plugin.h b/include/compiz-plugin.h
index bbb43775..72bb3a0c 100644
--- a/include/compiz-plugin.h
+++ b/include/compiz-plugin.h
@@ -30,12 +30,43 @@
COMPIZ_BEGIN_DECLS
-typedef Bool (*InitPluginProc) (CompPlugin *plugin);
+typedef CompBool (*InitPluginProc) (CompPlugin *plugin);
typedef void (*FiniPluginProc) (CompPlugin *plugin);
typedef CompMetadata *(*GetMetadataProc) (CompPlugin *plugin);
-struct _CompPluginVTable {
+typedef CompBool (*InitPluginForDisplayProc) (CompPlugin *plugin,
+ CompDisplay *display);
+typedef void (*FiniPluginForDisplayProc) (CompPlugin *plugin,
+ CompDisplay *display);
+
+typedef CompBool (*InitPluginForScreenProc) (CompPlugin *plugin,
+ CompScreen *screen);
+typedef void (*FiniPluginForScreenProc) (CompPlugin *plugin,
+ CompScreen *screen);
+
+typedef CompBool (*InitPluginForWindowProc) (CompPlugin *plugin,
+ CompWindow *window);
+typedef void (*FiniPluginForWindowProc) (CompPlugin *plugin,
+ CompWindow *window);
+
+typedef CompOption *(*GetPluginDisplayOptionsProc) (CompPlugin *plugin,
+ CompDisplay *display,
+ int *count);
+typedef CompBool (*SetPluginDisplayOptionProc) (CompPlugin *plugin,
+ CompDisplay *display,
+ const char *name,
+ CompOptionValue *value);
+
+typedef CompOption *(*GetPluginScreenOptionsProc) (CompPlugin *plugin,
+ CompScreen *screen,
+ int *count);
+typedef CompBool (*SetPluginScreenOptionProc) (CompPlugin *plugin,
+ CompScreen *screen,
+ const char *name,
+ CompOptionValue *value);
+
+typedef struct _CompPluginVTable {
const char *name;
GetMetadataProc getMetadata;
@@ -56,7 +87,10 @@ struct _CompPluginVTable {
SetPluginDisplayOptionProc setDisplayOption;
GetPluginScreenOptionsProc getScreenOptions;
SetPluginScreenOptionProc setScreenOption;
-};
+} CompPluginVTable;
+
+CompPluginVTable *
+getCompPluginInfo (void);
COMPIZ_END_DECLS
diff --git a/include/compiz-scale.h b/include/compiz-scale.h
index fc2ee3d4..d814a508 100644
--- a/include/compiz-scale.h
+++ b/include/compiz-scale.h
@@ -26,7 +26,7 @@
#ifndef _COMPIZ_SCALE_H
#define _COMPIZ_SCALE_H
-#include <compiz-plugin.h>
+#include <compiz-core.h>
COMPIZ_BEGIN_DECLS
diff --git a/include/compiz.h b/include/compiz.h
index 57cf3dcf..c4612c82 100644
--- a/include/compiz.h
+++ b/include/compiz.h
@@ -1,5 +1,5 @@
/*
- * Copyright © 2005 Novell, Inc.
+ * Copyright © 2007 Novell, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software
* and its documentation for any purpose is hereby granted without
@@ -26,250 +26,26 @@
#ifndef _COMPIZ_H
#define _COMPIZ_H
-#include <compiz-common.h>
-
-#define ABIVERSION 20070828
-
-#include <stdio.h>
-#include <sys/time.h>
-
-#include <X11/Xlib-xcb.h>
-#include <X11/Xutil.h>
-#include <X11/extensions/Xdamage.h>
-#include <X11/extensions/Xcomposite.h>
-#include <X11/extensions/Xinerama.h>
-#include <X11/extensions/sync.h>
-#include <X11/Xregion.h>
-#include <X11/XKBlib.h>
-
#include <libxml/parser.h>
-#define SN_API_NOT_YET_FROZEN
-#include <libsn/sn.h>
-
-#include <GL/gl.h>
-#include <GL/glx.h>
+#include <compiz-common.h>
COMPIZ_BEGIN_DECLS
-#if COMPOSITE_MAJOR > 0 || COMPOSITE_MINOR > 2
-#define USE_COW
-#endif
-
-/*
- * WORDS_BIGENDIAN should be defined before including this file for
- * IMAGE_BYTE_ORDER and BITMAP_BIT_ORDER to be set correctly.
- */
-#define LSBFirst 0
-#define MSBFirst 1
-
-#ifdef WORDS_BIGENDIAN
-# define IMAGE_BYTE_ORDER MSBFirst
-# define BITMAP_BIT_ORDER MSBFirst
-#else
-# define IMAGE_BYTE_ORDER LSBFirst
-# define BITMAP_BIT_ORDER LSBFirst
-#endif
-
-typedef struct _CompPlugin CompPlugin;
-typedef struct _CompDisplay CompDisplay;
-typedef struct _CompScreen CompScreen;
-typedef struct _CompWindow CompWindow;
-typedef struct _CompTexture CompTexture;
-typedef struct _CompIcon CompIcon;
-typedef struct _CompWindowExtents CompWindowExtents;
-typedef struct _CompProgram CompProgram;
-typedef struct _CompFunction CompFunction;
-typedef struct _CompFunctionData CompFunctionData;
-typedef struct _FragmentAttrib FragmentAttrib;
-typedef struct _CompCursor CompCursor;
-typedef struct _CompMatch CompMatch;
-typedef struct _CompMetadata CompMetadata;
-typedef struct _CompOutput CompOutput;
-typedef struct _CompWalker CompWalker;
-
-/* virtual modifiers */
-
-#define CompModAlt 0
-#define CompModMeta 1
-#define CompModSuper 2
-#define CompModHyper 3
-#define CompModModeSwitch 4
-#define CompModNumLock 5
-#define CompModScrollLock 6
-#define CompModNum 7
-
-#define CompAltMask (1 << 16)
-#define CompMetaMask (1 << 17)
-#define CompSuperMask (1 << 18)
-#define CompHyperMask (1 << 19)
-#define CompModeSwitchMask (1 << 20)
-#define CompNumLockMask (1 << 21)
-#define CompScrollLockMask (1 << 22)
-
-#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 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
-
-#define RED_SATURATION_WEIGHT 0.30f
-#define GREEN_SATURATION_WEIGHT 0.59f
-#define BLUE_SATURATION_WEIGHT 0.11f
-
-extern char *programName;
-extern char **programArgv;
-extern int programArgc;
-extern char *backgroundImage;
-extern REGION emptyRegion;
-extern REGION infiniteRegion;
-extern GLushort defaultColor[4];
-extern Window currentRoot;
-extern Bool shutDown;
-extern Bool restartSignal;
-extern CompWindow *lastFoundWindow;
-extern CompWindow *lastDamagedWindow;
-extern Bool replaceCurrentWm;
-extern Bool indirectRendering;
-extern Bool strictBinding;
-extern Bool useCow;
-extern Bool noDetection;
-extern Bool useDesktopHints;
-extern Bool onlyCurrentScreen;
-
-extern int defaultRefreshRate;
-extern char *defaultTextureFilter;
-
-extern int lastPointerX;
-extern int lastPointerY;
-extern int pointerX;
-extern int pointerY;
-
-extern CompMetadata coreMetadata;
-
-#define RESTRICT_VALUE(value, min, max) \
- (((value) < (min)) ? (min): ((value) > (max)) ? (max) : (value))
-
-#define MOD(a,b) ((a) < 0 ? ((b) - ((-(a) - 1) % (b))) - 1 : (a) % (b))
-
-
-/* privates.h */
-
-#define WRAP(priv, real, func, wrapFunc) \
- (priv)->func = (real)->func; \
- (real)->func = (wrapFunc)
-
-#define UNWRAP(priv, real, func) \
- (real)->func = (priv)->func
-
-typedef union _CompPrivate {
- void *ptr;
- long val;
- unsigned long uval;
- void *(*fptr) (void);
-} CompPrivate;
-
-typedef int (*ReallocPrivatesProc) (int size, void *closure);
-
-int
-allocatePrivateIndex (int *len,
- char **indices,
- ReallocPrivatesProc reallocProc,
- void *closure);
+typedef int CompBool;
+typedef int CompTimeoutHandle;
+typedef int CompWatchFdHandle;
-void
-freePrivateIndex (int len,
- char *indices,
- int index);
+typedef union _CompOptionValue CompOptionValue;
+typedef struct _CompDisplay CompDisplay;
+typedef struct _CompMetadata CompMetadata;
+typedef struct _CompOption CompOption;
+typedef struct _CompPlugin CompPlugin;
+typedef struct _CompScreen CompScreen;
+typedef struct _CompWindow CompWindow;
-/* option.c */
+typedef CompBool (*CallBackProc) (void *closure);
typedef enum {
CompOptionTypeBool,
@@ -286,125 +62,6 @@ typedef enum {
CompOptionTypeList
} CompOptionType;
-typedef enum {
- CompBindingTypeNone = 0,
- CompBindingTypeKey = 1 << 0,
- CompBindingTypeButton = 1 << 1,
- CompBindingTypeEdgeButton = 1 << 2
-} CompBindingType;
-
-typedef enum {
- CompActionStateInitKey = 1 << 0,
- CompActionStateTermKey = 1 << 1,
- CompActionStateInitButton = 1 << 2,
- CompActionStateTermButton = 1 << 3,
- CompActionStateInitBell = 1 << 4,
- CompActionStateInitEdge = 1 << 5,
- CompActionStateTermEdge = 1 << 6,
- CompActionStateInitEdgeDnd = 1 << 7,
- CompActionStateTermEdgeDnd = 1 << 8,
- CompActionStateCommit = 1 << 9,
- CompActionStateCancel = 1 << 10,
- CompActionStateAutoGrab = 1 << 11
-} CompActionState;
-
-typedef enum {
- CompLogLevelFatal = 0,
- CompLogLevelError,
- CompLogLevelWarn,
- CompLogLevelInfo,
- CompLogLevelDebug
-} CompLogLevel;
-
-typedef struct _CompKeyBinding {
- int keycode;
- unsigned int modifiers;
-} CompKeyBinding;
-
-typedef struct _CompButtonBinding {
- int button;
- unsigned int modifiers;
-} CompButtonBinding;
-
-typedef union _CompOptionValue CompOptionValue;
-
-typedef struct _CompOption CompOption;
-typedef struct _CompAction CompAction;
-
-typedef Bool (*CompActionCallBackProc) (CompDisplay *d,
- CompAction *action,
- CompActionState state,
- CompOption *option,
- int nOption);
-
-struct _CompAction {
- CompActionCallBackProc initiate;
- CompActionCallBackProc terminate;
-
- CompActionState state;
-
- CompBindingType type;
- CompKeyBinding key;
- CompButtonBinding button;
-
- Bool bell;
-
- unsigned int edgeMask;
-
- CompPrivate priv;
-};
-
-typedef union _CompMatchOp CompMatchOp;
-
-struct _CompMatch {
- CompDisplay *display;
- CompMatchOp *op;
- int nOp;
-};
-
-typedef struct {
- CompOptionType type;
- CompOptionValue *value;
- int nValue;
-} CompListValue;
-
-union _CompOptionValue {
- Bool b;
- int i;
- float f;
- char *s;
- unsigned short c[4];
- CompAction action;
- CompMatch match;
- CompListValue list;
-};
-
-typedef struct _CompOptionIntRestriction {
- int min;
- int max;
-} CompOptionIntRestriction;
-
-typedef struct _CompOptionFloatRestriction {
- float min;
- float max;
- float precision;
-} CompOptionFloatRestriction;
-
-typedef union {
- CompOptionIntRestriction i;
- CompOptionFloatRestriction f;
-} CompOptionRestriction;
-
-struct _CompOption {
- char *name;
- CompOptionType type;
- CompOptionValue value;
- CompOptionRestriction rest;
-};
-
-typedef CompOption *(*DisplayOptionsProc) (CompDisplay *display, int *count);
-typedef CompOption *(*ScreenOptionsProc) (CompScreen *screen, int *count);
-
void
compInitOptionValue (CompOptionValue *v);
@@ -424,568 +81,42 @@ compFindOption (CompOption *option,
const char *name,
int *index);
-Bool
-compSetBoolOption (CompOption *option,
+CompBool
+compSetBoolOption (CompOption *option,
CompOptionValue *value);
-Bool
+CompBool
compSetIntOption (CompOption *option,
CompOptionValue *value);
-Bool
+CompBool
compSetFloatOption (CompOption *option,
CompOptionValue *value);
-Bool
+CompBool
compSetStringOption (CompOption *option,
CompOptionValue *value);
-Bool
+CompBool
compSetColorOption (CompOption *option,
CompOptionValue *value);
-Bool
+CompBool
compSetActionOption (CompOption *option,
CompOptionValue *value);
-Bool
+CompBool
compSetMatchOption (CompOption *option,
CompOptionValue *value);
-Bool
+CompBool
compSetOptionList (CompOption *option,
CompOptionValue *value);
-Bool
+CompBool
compSetOption (CompOption *option,
CompOptionValue *value);
-unsigned int
-compWindowTypeMaskFromStringList (CompOptionValue *value);
-
-Bool
-getBoolOptionNamed (CompOption *option,
- int nOption,
- const char *name,
- Bool defaultValue);
-
-int
-getIntOptionNamed (CompOption *option,
- int nOption,
- const char *name,
- int defaultValue);
-
-float
-getFloatOptionNamed (CompOption *option,
- int nOption,
- const char *name,
- float defaultValue);
-
-char *
-getStringOptionNamed (CompOption *option,
- int nOption,
- const char *name,
- char *defaultValue);
-
-unsigned short *
-getColorOptionNamed (CompOption *option,
- int nOption,
- const char *name,
- unsigned short *defaultValue);
-
-CompMatch *
-getMatchOptionNamed (CompOption *option,
- int nOption,
- const char *name,
- CompMatch *defaultValue);
-
-char *
-keyBindingToString (CompDisplay *d,
- CompKeyBinding *key);
-
-char *
-buttonBindingToString (CompDisplay *d,
- CompButtonBinding *button);
-
-char *
-keyActionToString (CompDisplay *d,
- CompAction *action);
-
-char *
-buttonActionToString (CompDisplay *d,
- CompAction *action);
-
-Bool
-stringToKeyBinding (CompDisplay *d,
- const char *binding,
- CompKeyBinding *key);
-
-Bool
-stringToButtonBinding (CompDisplay *d,
- const char *binding,
- CompButtonBinding *button);
-
-void
-stringToKeyAction (CompDisplay *d,
- const char *binding,
- CompAction *action);
-
-void
-stringToButtonAction (CompDisplay *d,
- const char *binding,
- CompAction *action);
-
-const char *
-edgeToString (unsigned int edge);
-
-unsigned int
-stringToEdgeMask (const char *edge);
-
-char *
-edgeMaskToString (unsigned int edgeMask);
-
-Bool
-stringToColor (const char *color,
- unsigned short *rgba);
-
-char *
-colorToString (unsigned short *rgba);
-
-const char *
-optionTypeToString (CompOptionType type);
-
-Bool
-isActionOption (CompOption *option);
-
-
-/* display.c */
-
-typedef int CompTimeoutHandle;
-typedef int CompWatchFdHandle;
-typedef int CompFileWatchHandle;
-
-#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_MAIN_MENU_KEY 7
-#define COMP_DISPLAY_OPTION_RUN_DIALOG_KEY 8
-#define COMP_DISPLAY_OPTION_COMMAND0 9
-#define COMP_DISPLAY_OPTION_COMMAND1 10
-#define COMP_DISPLAY_OPTION_COMMAND2 11
-#define COMP_DISPLAY_OPTION_COMMAND3 12
-#define COMP_DISPLAY_OPTION_COMMAND4 13
-#define COMP_DISPLAY_OPTION_COMMAND5 14
-#define COMP_DISPLAY_OPTION_COMMAND6 15
-#define COMP_DISPLAY_OPTION_COMMAND7 16
-#define COMP_DISPLAY_OPTION_COMMAND8 17
-#define COMP_DISPLAY_OPTION_COMMAND9 18
-#define COMP_DISPLAY_OPTION_COMMAND10 19
-#define COMP_DISPLAY_OPTION_COMMAND11 20
-#define COMP_DISPLAY_OPTION_RUN_COMMAND0_KEY 21
-#define COMP_DISPLAY_OPTION_RUN_COMMAND1_KEY 22
-#define COMP_DISPLAY_OPTION_RUN_COMMAND2_KEY 23
-#define COMP_DISPLAY_OPTION_RUN_COMMAND3_KEY 24
-#define COMP_DISPLAY_OPTION_RUN_COMMAND4_KEY 25
-#define COMP_DISPLAY_OPTION_RUN_COMMAND5_KEY 26
-#define COMP_DISPLAY_OPTION_RUN_COMMAND6_KEY 27
-#define COMP_DISPLAY_OPTION_RUN_COMMAND7_KEY 28
-#define COMP_DISPLAY_OPTION_RUN_COMMAND8_KEY 29
-#define COMP_DISPLAY_OPTION_RUN_COMMAND9_KEY 30
-#define COMP_DISPLAY_OPTION_RUN_COMMAND10_KEY 31
-#define COMP_DISPLAY_OPTION_RUN_COMMAND11_KEY 32
-#define COMP_DISPLAY_OPTION_SLOW_ANIMATIONS_KEY 33
-#define COMP_DISPLAY_OPTION_RAISE_WINDOW_BUTTON 34
-#define COMP_DISPLAY_OPTION_LOWER_WINDOW_BUTTON 35
-#define COMP_DISPLAY_OPTION_UNMAXIMIZE_WINDOW_KEY 36
-#define COMP_DISPLAY_OPTION_MINIMIZE_WINDOW_KEY 37
-#define COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW_KEY 38
-#define COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW_HORZ_KEY 39
-#define COMP_DISPLAY_OPTION_MAXIMIZE_WINDOW_VERT_KEY 40
-#define COMP_DISPLAY_OPTION_OPACITY_INCREASE_BUTTON 41
-#define COMP_DISPLAY_OPTION_OPACITY_DECREASE_BUTTON 42
-#define COMP_DISPLAY_OPTION_SCREENSHOT 43
-#define COMP_DISPLAY_OPTION_RUN_SCREENSHOT_KEY 44
-#define COMP_DISPLAY_OPTION_WINDOW_SCREENSHOT 45
-#define COMP_DISPLAY_OPTION_RUN_WINDOW_SCREENSHOT_KEY 46
-#define COMP_DISPLAY_OPTION_WINDOW_MENU_BUTTON 47
-#define COMP_DISPLAY_OPTION_WINDOW_MENU_KEY 48
-#define COMP_DISPLAY_OPTION_SHOW_DESKTOP_KEY 49
-#define COMP_DISPLAY_OPTION_SHOW_DESKTOP_EDGE 50
-#define COMP_DISPLAY_OPTION_RAISE_ON_CLICK 51
-#define COMP_DISPLAY_OPTION_AUDIBLE_BELL 52
-#define COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_KEY 53
-#define COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_HORZ_KEY 54
-#define COMP_DISPLAY_OPTION_TOGGLE_WINDOW_MAXIMIZED_VERT_KEY 55
-#define COMP_DISPLAY_OPTION_HIDE_SKIP_TASKBAR_WINDOWS 56
-#define COMP_DISPLAY_OPTION_TOGGLE_WINDOW_SHADED_KEY 57
-#define COMP_DISPLAY_OPTION_IGNORE_HINTS_WHEN_MAXIMIZED 58
-#define COMP_DISPLAY_OPTION_TERMINAL 59
-#define COMP_DISPLAY_OPTION_RUN_TERMINAL_KEY 60
-#define COMP_DISPLAY_OPTION_PING_DELAY 61
-#define COMP_DISPLAY_OPTION_NUM 62
-
-typedef CompOption *(*GetPluginDisplayOptionsProc) (CompPlugin *plugin,
- CompDisplay *display,
- int *count);
-
-typedef Bool (*SetPluginDisplayOptionProc) (CompPlugin *plugin,
- CompDisplay *display,
- const char *name,
- CompOptionValue *value);
-
-typedef Bool (*SetDisplayOptionForPluginProc) (CompDisplay *display,
- const char *plugin,
- const char *name,
- CompOptionValue *value);
-
-typedef Bool (*InitPluginForDisplayProc) (CompPlugin *plugin,
- CompDisplay *display);
-
-typedef void (*FiniPluginForDisplayProc) (CompPlugin *plugin,
- CompDisplay *display);
-
-typedef void (*HandleEventProc) (CompDisplay *display,
- XEvent *event);
-
-typedef void (*HandleCompizEventProc) (CompDisplay *display,
- const char *pluginName,
- const char *eventName,
- CompOption *option,
- int nOption);
-
-typedef Bool (*CallBackProc) (void *closure);
-
-typedef void (*ForEachWindowProc) (CompWindow *window,
- void *closure);
-
-typedef Bool (*FileToImageProc) (CompDisplay *display,
- const char *path,
- const char *name,
- int *width,
- int *height,
- int *stride,
- void **data);
-
-typedef Bool (*ImageToFileProc) (CompDisplay *display,
- const char *path,
- const char *name,
- const char *format,
- int width,
- int height,
- int stride,
- void *data);
-
-#define NOTIFY_CREATE_MASK (1 << 0)
-#define NOTIFY_DELETE_MASK (1 << 1)
-#define NOTIFY_MOVE_MASK (1 << 2)
-#define NOTIFY_MODIFY_MASK (1 << 3)
-
-typedef void (*FileWatchCallBackProc) (const char *name,
- void *closure);
-
-typedef struct _CompFileWatch {
- struct _CompFileWatch *next;
- char *path;
- int mask;
- FileWatchCallBackProc callBack;
- void *closure;
- CompFileWatchHandle handle;
-} CompFileWatch;
-
-typedef void (*FileWatchAddedProc) (CompDisplay *display,
- CompFileWatch *fileWatch);
-
-typedef void (*FileWatchRemovedProc) (CompDisplay *display,
- CompFileWatch *fileWatch);
-
-#define MATCH_OP_AND_MASK (1 << 0)
-#define MATCH_OP_NOT_MASK (1 << 1)
-
-typedef enum {
- CompMatchOpTypeGroup,
- CompMatchOpTypeExp
-} CompMatchOpType;
-
-typedef struct _CompMatchAnyOp {
- CompMatchOpType type;
- int flags;
-} CompMatchAnyOp;
-
-typedef struct _CompMatchGroupOp {
- CompMatchOpType type;
- int flags;
- CompMatchOp *op;
- int nOp;
-} CompMatchGroupOp;
-
-typedef void (*CompMatchExpFiniProc) (CompDisplay *display,
- CompPrivate priv);
-
-typedef Bool (*CompMatchExpEvalProc) (CompDisplay *display,
- CompWindow *window,
- CompPrivate priv);
-
-typedef struct _CompMatchExp {
- CompMatchExpFiniProc fini;
- CompMatchExpEvalProc eval;
- CompPrivate priv;
-} CompMatchExp;
-
-typedef struct _CompMatchExpOp {
- CompMatchOpType type;
- int flags;
- char *value;
- CompMatchExp e;
-} CompMatchExpOp;
-
-union _CompMatchOp {
- CompMatchOpType type;
- CompMatchAnyOp any;
- CompMatchGroupOp group;
- CompMatchExpOp exp;
-};
-
-typedef void (*MatchInitExpProc) (CompDisplay *display,
- CompMatchExp *exp,
- const char *value);
-
-typedef void (*MatchExpHandlerChangedProc) (CompDisplay *display);
-
-typedef void (*MatchPropertyChangedProc) (CompDisplay *display,
- CompWindow *window);
-
-typedef void (*LogMessageProc) (CompDisplay *d,
- const char *componentName,
- CompLogLevel level,
- const char *message);
-
-struct _CompDisplay {
- xcb_connection_t *connection;
-
- Display *display;
- CompScreen *screens;
-
- char *screenPrivateIndices;
- int screenPrivateLen;
-
- int compositeEvent, compositeError, compositeOpcode;
- int damageEvent, damageError;
- int syncEvent, syncError;
- int fixesEvent, fixesError, fixesVersion;
-
- Bool randrExtension;
- int randrEvent, randrError;
-
- Bool shapeExtension;
- int shapeEvent, shapeError;
-
- Bool xkbExtension;
- int xkbEvent, xkbError;
-
- Bool xineramaExtension;
- int xineramaEvent, xineramaError;
-
- XineramaScreenInfo *screenInfo;
- int nScreenInfo;
-
- SnDisplay *snDisplay;
-
- Atom supportedAtom;
- Atom supportingWmCheckAtom;
-
- Atom utf8StringAtom;
-
- Atom wmNameAtom;
-
- Atom winTypeAtom;
- Atom winTypeDesktopAtom;
- Atom winTypeDockAtom;
- Atom winTypeToolbarAtom;
- Atom winTypeMenuAtom;
- Atom winTypeUtilAtom;
- Atom winTypeSplashAtom;
- Atom winTypeDialogAtom;
- Atom winTypeNormalAtom;
- Atom winTypeDropdownMenuAtom;
- Atom winTypePopupMenuAtom;
- Atom winTypeTooltipAtom;
- Atom winTypeNotificationAtom;
- Atom winTypeComboAtom;
- Atom winTypeDndAtom;
-
- Atom winOpacityAtom;
- Atom winBrightnessAtom;
- Atom winSaturationAtom;
- Atom winActiveAtom;
- Atom winDesktopAtom;
-
- Atom workareaAtom;
-
- Atom desktopViewportAtom;
- Atom desktopGeometryAtom;
- Atom currentDesktopAtom;
- Atom numberOfDesktopsAtom;
-
- Atom winStateAtom;
- Atom winStateModalAtom;
- Atom winStateStickyAtom;
- Atom winStateMaximizedVertAtom;
- Atom winStateMaximizedHorzAtom;
- Atom winStateShadedAtom;
- Atom winStateSkipTaskbarAtom;
- Atom winStateSkipPagerAtom;
- Atom winStateHiddenAtom;
- Atom winStateFullscreenAtom;
- Atom winStateAboveAtom;
- Atom winStateBelowAtom;
- Atom winStateDemandsAttentionAtom;
- Atom winStateDisplayModalAtom;
-
- Atom winActionMoveAtom;
- Atom winActionResizeAtom;
- Atom winActionStickAtom;
- Atom winActionMinimizeAtom;
- Atom winActionMaximizeHorzAtom;
- Atom winActionMaximizeVertAtom;
- Atom winActionFullscreenAtom;
- Atom winActionCloseAtom;
- Atom winActionShadeAtom;
- Atom winActionChangeDesktopAtom;
- Atom winActionAboveAtom;
- Atom winActionBelowAtom;
-
- Atom wmAllowedActionsAtom;
-
- Atom wmStrutAtom;
- Atom wmStrutPartialAtom;
-
- Atom wmUserTimeAtom;
-
- Atom wmIconAtom;
-
- Atom clientListAtom;
- Atom clientListStackingAtom;
-
- Atom frameExtentsAtom;
- Atom frameWindowAtom;
-
- Atom wmStateAtom;
- Atom wmChangeStateAtom;
- Atom wmProtocolsAtom;
- Atom wmClientLeaderAtom;
-
- Atom wmDeleteWindowAtom;
- Atom wmTakeFocusAtom;
- Atom wmPingAtom;
- Atom wmSyncRequestAtom;
-
- Atom wmSyncRequestCounterAtom;
-
- Atom closeWindowAtom;
- Atom wmMoveResizeAtom;
- Atom moveResizeWindowAtom;
- Atom restackWindowAtom;
-
- Atom showingDesktopAtom;
-
- Atom xBackgroundAtom[2];
-
- Atom toolkitActionAtom;
- Atom toolkitActionMainMenuAtom;
- Atom toolkitActionRunDialogAtom;
- Atom toolkitActionWindowMenuAtom;
- Atom toolkitActionForceQuitDialogAtom;
-
- Atom mwmHintsAtom;
-
- Atom xdndAwareAtom;
- Atom xdndEnterAtom;
- Atom xdndLeaveAtom;
- Atom xdndPositionAtom;
- Atom xdndStatusAtom;
- Atom xdndDropAtom;
-
- Atom managerAtom;
- Atom targetsAtom;
- Atom multipleAtom;
- Atom timestampAtom;
- Atom versionAtom;
- Atom atomPairAtom;
-
- Atom startupIdAtom;
-
- unsigned int lastPing;
- CompTimeoutHandle pingHandle;
-
- GLenum textureFilter;
-
- Window activeWindow;
-
- Window below;
- char displayString[256];
-
- XModifierKeymap *modMap;
- unsigned int modMask[CompModNum];
- unsigned int ignoredModMask;
-
- KeyCode escapeKeyCode;
- KeyCode returnKeyCode;
-
- CompOption opt[COMP_DISPLAY_OPTION_NUM];
-
- CompTimeoutHandle autoRaiseHandle;
- Window autoRaiseWindow;
-
- CompOptionValue plugin;
- Bool dirtyPluginList;
-
- CompFileWatch *fileWatch;
-
- SetDisplayOptionForPluginProc setDisplayOptionForPlugin;
-
- InitPluginForDisplayProc initPluginForDisplay;
- FiniPluginForDisplayProc finiPluginForDisplay;
-
- HandleEventProc handleEvent;
- HandleCompizEventProc handleCompizEvent;
-
- FileToImageProc fileToImage;
- ImageToFileProc imageToFile;
-
- FileWatchAddedProc fileWatchAdded;
- FileWatchRemovedProc fileWatchRemoved;
-
- MatchInitExpProc matchInitExp;
- MatchExpHandlerChangedProc matchExpHandlerChanged;
- MatchPropertyChangedProc matchPropertyChanged;
-
- LogMessageProc logMessage;
-
- CompPrivate *privates;
-};
-
-
-extern CompDisplay *compDisplays;
-
-int
-allocateDisplayPrivateIndex (void);
-
-void
-freeDisplayPrivateIndex (int index);
-
-CompOption *
-getDisplayOptions (CompDisplay *display,
- int *count);
-
-Bool
-setDisplayOption (CompDisplay *display,
- const char *name,
- CompOptionValue *value);
-
CompTimeoutHandle
compAddTimeout (int time,
CallBackProc callBack,
@@ -1006,2306 +137,40 @@ compRemoveWatchFd (CompWatchFdHandle handle);
short int
compWatchFdEvents (CompWatchFdHandle handle);
-CompFileWatchHandle
-addFileWatch (CompDisplay *display,
- const char *path,
- int mask,
- FileWatchCallBackProc callBack,
- void *closure);
-
-void
-removeFileWatch (CompDisplay *display,
- CompFileWatchHandle handle);
-
-void
-fileWatchAdded (CompDisplay *display,
- CompFileWatch *fileWatch);
-
-void
-fileWatchRemoved (CompDisplay *display,
- CompFileWatch *fileWatch);
-
-void
-compLogMessage (CompDisplay *d,
- const char *componentName,
- CompLogLevel level,
- const char *format,
- ...);
-
-void
-logMessage (CompDisplay *d,
- const char *componentName,
- CompLogLevel level,
- const char *message);
-
-const char *
-logLevelToString (CompLogLevel level);
-
-int
-compCheckForError (Display *dpy);
-
-void
-addScreenToDisplay (CompDisplay *display,
- CompScreen *s);
-
-Bool
-addDisplay (const char *name);
-
-Time
-getCurrentTimeFromDisplay (CompDisplay *d);
-
-void
-focusDefaultWindow (CompDisplay *d);
-
-void
-forEachWindowOnDisplay (CompDisplay *display,
- ForEachWindowProc proc,
- void *closure);
-
-CompScreen *
-findScreenAtDisplay (CompDisplay *d,
- Window root);
-
-CompWindow *
-findWindowAtDisplay (CompDisplay *display,
- Window id);
-
-CompWindow *
-findTopLevelWindowAtDisplay (CompDisplay *d,
- Window id);
-
-unsigned int
-virtualToRealModMask (CompDisplay *d,
- unsigned int modMask);
-
-void
-updateModifierMappings (CompDisplay *d);
-
-unsigned int
-keycodeToModifiers (CompDisplay *d,
- int keycode);
-
-void
-eventLoop (void);
-
-void
-handleSelectionRequest (CompDisplay *display,
- XEvent *event);
-
-void
-handleSelectionClear (CompDisplay *display,
- XEvent *event);
-
-void
-warpPointer (CompScreen *screen,
- int dx,
- int dy);
-
-Bool
-setDisplayAction (CompDisplay *display,
- CompOption *o,
- CompOptionValue *value);
-
-Bool
-readImageFromFile (CompDisplay *display,
- const char *name,
- int *width,
- int *height,
- void **data);
-
-Bool
-writeImageToFile (CompDisplay *display,
- const char *path,
- const char *name,
- const char *format,
- int width,
- int height,
- void *data);
-
-Bool
-fileToImage (CompDisplay *display,
- const char *path,
- const char *name,
- int *width,
- int *height,
- int *stride,
- void **data);
-
-Bool
-imageToFile (CompDisplay *display,
- const char *path,
- const char *name,
- const char *format,
- int width,
- int height,
- int stride,
- void *data);
-
-CompCursor *
-findCursorAtDisplay (CompDisplay *display);
-
-
-/* event.c */
-
-void
-handleEvent (CompDisplay *display,
- XEvent *event);
-
-void
-handleCompizEvent (CompDisplay *display,
- const char *pluginName,
- const char *eventName,
- CompOption *option,
- int nOption);
-
-void
-handleSyncAlarm (CompWindow *w);
-
-Bool
-eventMatches (CompDisplay *display,
- XEvent *event,
- CompOption *option);
-
-Bool
-eventTerminates (CompDisplay *display,
- XEvent *event,
- CompOption *option);
-
-void
-clearTargetOutput (CompDisplay *display,
- unsigned int mask);
-
-/* paint.c */
-
-#define MULTIPLY_USHORT(us1, us2) \
- (((GLuint) (us1) * (GLuint) (us2)) / 0xffff)
-
-/* camera distance from screen, 0.5 * tan (FOV) */
-#define DEFAULT_Z_CAMERA 0.866025404f
-
-typedef struct _CompTransform {
- float m[16];
-} CompTransform;
-
-/* XXX: ScreenPaintAttrib will be removed */
-typedef struct _ScreenPaintAttrib {
- GLfloat xRotate;
- GLfloat yRotate;
- GLfloat vRotate;
- GLfloat xTranslate;
- GLfloat yTranslate;
- GLfloat zTranslate;
- GLfloat zCamera;
-} ScreenPaintAttrib;
-
-/* XXX: scale and translate fields will be removed */
-typedef struct _WindowPaintAttrib {
- GLushort opacity;
- GLushort brightness;
- GLushort saturation;
- GLfloat xScale;
- GLfloat yScale;
- GLfloat xTranslate;
- GLfloat yTranslate;
-} WindowPaintAttrib;
-
-extern ScreenPaintAttrib defaultScreenPaintAttrib;
-extern WindowPaintAttrib defaultWindowPaintAttrib;
-
-typedef struct _CompMatrix {
- float xx; float yx;
- float xy; float yy;
- float x0; float y0;
-} CompMatrix;
-
-#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)
-
-
-typedef void (*PreparePaintScreenProc) (CompScreen *screen,
- int msSinceLastPaint);
-
-typedef void (*DonePaintScreenProc) (CompScreen *screen);
-
-#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)
-
-typedef void (*PaintScreenProc) (CompScreen *screen,
- CompOutput *outputs,
- int numOutput,
- unsigned int mask);
-
-typedef Bool (*PaintOutputProc) (CompScreen *screen,
- const ScreenPaintAttrib *sAttrib,
- const CompTransform *transform,
- Region region,
- CompOutput *output,
- unsigned int mask);
-
-typedef void (*PaintTransformedOutputProc) (CompScreen *screen,
- const ScreenPaintAttrib *sAttrib,
- const CompTransform *transform,
- Region region,
- CompOutput *output,
- unsigned int mask);
-
-/* XXX: ApplyScreenTransformProc will be removed */
-typedef void (*ApplyScreenTransformProc) (CompScreen *screen,
- const ScreenPaintAttrib *sAttrib,
- CompOutput *output,
- CompTransform *transform);
-
-typedef void (*WalkerFiniProc) (CompScreen *screen,
- CompWalker *walker);
-
-typedef CompWindow *(*WalkInitProc) (CompScreen *screen);
-typedef CompWindow *(*WalkStepProc) (CompWindow *window);
-
-struct _CompWalker {
- WalkerFiniProc fini;
- CompPrivate priv;
-
- WalkInitProc first;
- WalkInitProc last;
- WalkStepProc next;
- 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)
-
-/*
- 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)
-
-
-typedef Bool (*PaintWindowProc) (CompWindow *window,
- const WindowPaintAttrib *attrib,
- const CompTransform *transform,
- Region region,
- unsigned int mask);
-
-typedef Bool (*DrawWindowProc) (CompWindow *window,
- const CompTransform *transform,
- const FragmentAttrib *fragment,
- Region region,
- unsigned int mask);
-
-typedef void (*AddWindowGeometryProc) (CompWindow *window,
- CompMatrix *matrix,
- int nMatrix,
- Region region,
- Region clip);
-
-typedef void (*DrawWindowTextureProc) (CompWindow *w,
- CompTexture *texture,
- const FragmentAttrib *fragment,
- unsigned int mask);
-
-typedef void (*DrawWindowGeometryProc) (CompWindow *window);
-
-typedef void (*PaintCursorProc) (CompCursor *cursor,
- const CompTransform *transform,
- Region region,
- unsigned int mask);
-
-#define PAINT_BACKGROUND_ON_TRANSFORMED_SCREEN_MASK (1 << 0)
-
-typedef void (*PaintBackgroundProc) (CompScreen *screen,
- Region region,
- unsigned int mask);
-
-void
-preparePaintScreen (CompScreen *screen,
- int msSinceLastPaint);
-
-void
-donePaintScreen (CompScreen *screen);
-
-void
-transformToScreenSpace (CompScreen *screen,
- CompOutput *output,
- float z,
- CompTransform *transform);
-
-/* XXX: prepareXCoords will be removed */
-void
-prepareXCoords (CompScreen *screen,
- CompOutput *output,
- float z);
-
-void
-paintTransformedOutput (CompScreen *screen,
- const ScreenPaintAttrib *sAttrib,
- const CompTransform *transform,
- Region region,
- CompOutput *output,
- unsigned int mask);
-
-/* XXX: applyScreenTransform will be removed */
-void
-applyScreenTransform (CompScreen *screen,
- const ScreenPaintAttrib *sAttrib,
- CompOutput *output,
- CompTransform *transform);
-
-void
-paintScreen (CompScreen *screen,
- CompOutput *outputs,
- int numOutput,
- unsigned int mask);
-
-Bool
-paintOutput (CompScreen *screen,
- const ScreenPaintAttrib *sAttrib,
- const CompTransform *transform,
- Region region,
- CompOutput *output,
- unsigned int mask);
-
-Bool
-moreWindowVertices (CompWindow *w,
- int newSize);
-
-Bool
-moreWindowIndices (CompWindow *w,
- int newSize);
-
-void
-addWindowGeometry (CompWindow *w,
- CompMatrix *matrix,
- int nMatrix,
- Region region,
- Region clip);
-
-void
-drawWindowTexture (CompWindow *w,
- CompTexture *texture,
- const FragmentAttrib *fragment,
- unsigned int mask);
-
-Bool
-drawWindow (CompWindow *w,
- const CompTransform *transform,
- const FragmentAttrib *fragment,
- Region region,
- unsigned int mask);
-
-Bool
-paintWindow (CompWindow *w,
- const WindowPaintAttrib *attrib,
- const CompTransform *transform,
- Region region,
- unsigned int mask);
-
-void
-paintCursor (CompCursor *cursor,
- const CompTransform *transform,
- Region region,
- unsigned int mask);
-
-void
-paintBackground (CompScreen *screen,
- Region region,
- unsigned int mask);
-
-
-/* texture.c */
-
-#define POWER_OF_TWO(v) ((v & (v - 1)) == 0)
-
-typedef enum {
- COMP_TEXTURE_FILTER_FAST,
- COMP_TEXTURE_FILTER_GOOD
-} CompTextureFilter;
-
-struct _CompTexture {
- GLuint name;
- GLenum target;
- GLfloat dx, dy;
- GLXPixmap pixmap;
- GLenum filter;
- GLenum wrap;
- CompMatrix matrix;
- Bool oldMipmaps;
- Bool mipmap;
- int refCount;
-};
-
-void
-initTexture (CompScreen *screen,
- CompTexture *texture);
-
-void
-finiTexture (CompScreen *screen,
- CompTexture *texture);
-
-CompTexture *
-createTexture (CompScreen *screen);
-
-void
-destroyTexture (CompScreen *screen,
- CompTexture *texture);
-
-Bool
-imageBufferToTexture (CompScreen *screen,
- CompTexture *texture,
- const char *image,
- unsigned int width,
- unsigned int height);
-
-Bool
-imageDataToTexture (CompScreen *screen,
- CompTexture *texture,
- const char *image,
- unsigned int width,
- unsigned int height,
- GLenum format,
- GLenum type);
-
-
-Bool
-readImageToTexture (CompScreen *screen,
- CompTexture *texture,
- const char *imageFileName,
- unsigned int *width,
- unsigned int *height);
-
-Bool
-iconToTexture (CompScreen *screen,
- CompIcon *icon);
-
-Bool
-bindPixmapToTexture (CompScreen *screen,
- CompTexture *texture,
- Pixmap pixmap,
- int width,
- int height,
- int depth);
-
-void
-releasePixmapFromTexture (CompScreen *screen,
- CompTexture *texture);
-
-void
-enableTexture (CompScreen *screen,
- CompTexture *texture,
- CompTextureFilter filter);
-
-void
-enableTextureClampToBorder (CompScreen *screen,
- CompTexture *texture,
- CompTextureFilter filter);
-
-void
-enableTextureClampToEdge (CompScreen *screen,
- CompTexture *texture,
- CompTextureFilter filter);
-
-void
-disableTexture (CompScreen *screen,
- CompTexture *texture);
-
-
-/* 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_FOCUS_PREVENTION_MATCH 12
-#define COMP_SCREEN_OPTION_OPACITY_MATCHES 13
-#define COMP_SCREEN_OPTION_OPACITY_VALUES 14
-#define COMP_SCREEN_OPTION_NUM 15
-
-#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 (*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 (*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 CompOption *(*GetPluginScreenOptionsProc) (CompPlugin *plugin,
- CompScreen *screen,
- int *count);
-typedef Bool (*SetPluginScreenOptionProc) (CompPlugin *plugin,
- CompScreen *screen,
- const char *name,
- CompOptionValue *value);
-typedef Bool (*SetScreenOptionForPluginProc) (CompScreen *screen,
- const char *plugin,
- const char *name,
- CompOptionValue *value);
-
-typedef Bool (*InitPluginForScreenProc) (CompPlugin *plugin,
- CompScreen *screen);
-
-typedef void (*FiniPluginForScreenProc) (CompPlugin *plugin,
- CompScreen *screen);
-
-typedef void (*EnterShowDesktopModeProc) (CompScreen *screen);
-
-typedef void (*LeaveShowDesktopModeProc) (CompScreen *screen,
- CompWindow *window);
-
-typedef Bool (*DamageWindowRectProc) (CompWindow *w,
- Bool initial,
- BoxPtr rect);
-
-typedef Bool (*DamageWindowRegionProc) (CompWindow *w,
- Region region);
-
-typedef Bool (*DamageCursorRectProc) (CompCursor *c,
- Bool initial,
- BoxPtr rect);
-
-
-typedef void (*GetOutputExtentsForWindowProc) (CompWindow *w,
- CompWindowExtents *output);
-
-typedef unsigned int (*GetAllowedActionsForWindowProc) (CompWindow *w);
-
-typedef Bool (*FocusWindowProc) (CompWindow *window);
-
-typedef Bool (*PlaceWindowProc) (CompWindow *window,
- int x,
- int y,
- int *newX,
- int *newY);
-
-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)
-
-typedef void (*WindowGrabNotifyProc) (CompWindow *window,
- int x,
- int y,
- unsigned int state,
- unsigned int mask);
-
-typedef void (*WindowUngrabNotifyProc) (CompWindow *window);
-
-typedef void (*WindowStateChangeNotifyProc) (CompWindow *window,
- unsigned int lastState);
-
-typedef void (*WindowAddNotifyProc) (CompWindow *window);
-
-typedef void (*OutputChangeNotifyProc) (CompScreen *screen);
-
-typedef void (*InitWindowWalkerProc) (CompScreen *screen,
- CompWalker *walker);
-
-#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 _CompKeyGrab {
- int keycode;
- unsigned int modifiers;
- int count;
-} CompKeyGrab;
-
-typedef struct _CompButtonGrab {
- int button;
- unsigned int modifiers;
- int count;
-} CompButtonGrab;
-
-typedef struct _CompGrab {
- Bool active;
- Cursor cursor;
- const char *name;
-} CompGrab;
-
-typedef struct _CompGroup {
- struct _CompGroup *next;
- unsigned int refCnt;
- Window id;
-} CompGroup;
-
-typedef struct _CompStartupSequence {
- struct _CompStartupSequence *next;
- SnStartupSequence *sequence;
- unsigned int viewportX;
- unsigned int viewportY;
-} CompStartupSequence;
-
-typedef struct _CompFBConfig {
- GLXFBConfig fbConfig;
- int yInverted;
- int mipmap;
- int textureFormat;
- int textureTargets;
-} CompFBConfig;
-
-#define NOTHING_TRANS_FILTER 0
-#define SCREEN_TRANS_FILTER 1
-#define WINDOW_TRANS_FILTER 2
-
-#define SCREEN_EDGE_LEFT 0
-#define SCREEN_EDGE_RIGHT 1
-#define SCREEN_EDGE_TOP 2
-#define SCREEN_EDGE_BOTTOM 3
-#define SCREEN_EDGE_TOPLEFT 4
-#define SCREEN_EDGE_TOPRIGHT 5
-#define SCREEN_EDGE_BOTTOMLEFT 6
-#define SCREEN_EDGE_BOTTOMRIGHT 7
-#define SCREEN_EDGE_NUM 8
-
-typedef struct _CompScreenEdge {
- Window id;
- unsigned int count;
-} CompScreenEdge;
-
-struct _CompIcon {
- CompTexture texture;
- int width;
- int height;
-};
-
-struct _CompOutput {
- char *name;
- int id;
- REGION region;
- int width;
- int height;
- XRectangle workArea;
-};
-
-typedef struct _CompCursorImage {
- struct _CompCursorImage *next;
-
- unsigned long serial;
- Pixmap pixmap;
- CompTexture texture;
- int xhot;
- int yhot;
- int width;
- int height;
-} CompCursorImage;
-
-struct _CompCursor {
- struct _CompCursor *next;
-
- CompScreen *screen;
- CompCursorImage *image;
-
- int x;
- int y;
-
- CompMatrix matrix;
-};
-
-#define ACTIVE_WINDOW_HISTORY_SIZE 64
-#define ACTIVE_WINDOW_HISTORY_NUM 32
-
-typedef struct _CompActiveWindowHistory {
- Window id[ACTIVE_WINDOW_HISTORY_SIZE];
- int x;
- int y;
- int activeNum;
-} CompActiveWindowHistory;
-
-struct _CompScreen {
- CompScreen *next;
- CompDisplay *display;
- CompWindow *windows;
- CompWindow *reverseWindows;
-
- char *windowPrivateIndices;
- int windowPrivateLen;
-
- Colormap colormap;
- int screenNum;
- int width;
- int height;
- int x;
- int y;
- int hsize; /* Number of horizontal viewports */
- int vsize; /* Number of vertical viewports */
- unsigned int nDesktop;
- unsigned int currentDesktop;
- REGION region;
- Region damage;
- unsigned long damageMask;
- Window root;
- Window overlay;
- Window output;
- XWindowAttributes attrib;
- Window grabWindow;
- CompFBConfig glxPixmapFBConfigs[MAX_DEPTH + 1];
- int textureRectangle;
- int textureNonPowerOfTwo;
- int textureEnvCombine;
- int textureEnvCrossbar;
- int textureBorderClamp;
- GLint maxTextureSize;
- int fbo;
- int fragmentProgram;
- int maxTextureUnits;
- Cursor invisibleCursor;
- XRectangle *exposeRects;
- int sizeExpose;
- int nExpose;
- CompTexture backgroundTexture;
- Bool backgroundLoaded;
- unsigned int pendingDestroys;
- int desktopWindowCount;
- unsigned int mapNum;
- unsigned int activeNum;
-
- CompOutput *outputDev;
- int nOutputDev;
- int currentOutputDev;
- CompOutput fullscreenOutput;
-
- XRectangle lastViewport;
-
- CompActiveWindowHistory history[ACTIVE_WINDOW_HISTORY_NUM];
- int currentHistory;
-
- int overlayWindowCount;
-
- CompScreenEdge screenEdge[SCREEN_EDGE_NUM];
-
- SnMonitorContext *snContext;
- CompStartupSequence *startupSequences;
- unsigned int startupSequenceTimeoutHandle;
-
- int filter[3];
-
- CompGroup *groups;
-
- CompIcon *defaultIcon;
-
- Bool canDoSaturated;
- Bool canDoSlightlySaturated;
-
- Window wmSnSelectionWindow;
- Atom wmSnAtom;
- Time wmSnTimestamp;
-
- Cursor normalCursor;
- Cursor busyCursor;
-
- CompWindow **clientList;
- int nClientList;
-
- CompButtonGrab *buttonGrab;
- int nButtonGrab;
- CompKeyGrab *keyGrab;
- int nKeyGrab;
-
- CompGrab *grabs;
- int grabSize;
- int maxGrab;
-
- int rasterX;
- int rasterY;
- struct timeval lastRedraw;
- int nextRedraw;
- int redrawTime;
- int optimalRedrawTime;
- int frameStatus;
- int timeMult;
- Bool idle;
- int timeLeft;
- Bool pendingCommands;
-
- int lastFunctionId;
-
- CompFunction *fragmentFunctions;
- CompProgram *fragmentPrograms;
-
- int saturateFunction[2][64];
-
- GLfloat projection[16];
-
- Bool clearBuffers;
-
- Bool lighting;
- Bool slowAnimations;
-
- XRectangle workArea;
-
- unsigned int showingDesktopMask;
-
- unsigned long *desktopHintData;
- int desktopHintSize;
-
- CompCursor *cursors;
- CompCursorImage *cursorImages;
-
- GLXGetProcAddressProc getProcAddress;
- GLXBindTexImageProc bindTexImage;
- GLXReleaseTexImageProc releaseTexImage;
- GLXQueryDrawableProc queryDrawable;
- GLXCopySubBufferProc copySubBuffer;
- GLXGetVideoSyncProc getVideoSync;
- GLXWaitVideoSyncProc waitVideoSync;
- GLXGetFBConfigsProc getFBConfigs;
- GLXGetFBConfigAttribProc getFBConfigAttrib;
- GLXCreatePixmapProc createPixmap;
-
- GLActiveTextureProc activeTexture;
- GLClientActiveTextureProc clientActiveTexture;
-
- GLGenProgramsProc genPrograms;
- GLDeleteProgramsProc deletePrograms;
- GLBindProgramProc bindProgram;
- GLProgramStringProc programString;
- GLProgramParameter4fProc programEnvParameter4f;
- GLProgramParameter4fProc programLocalParameter4f;
-
- GLGenFramebuffersProc genFramebuffers;
- GLDeleteFramebuffersProc deleteFramebuffers;
- GLBindFramebufferProc bindFramebuffer;
- GLCheckFramebufferStatusProc checkFramebufferStatus;
- GLFramebufferTexture2DProc framebufferTexture2D;
- GLGenerateMipmapProc generateMipmap;
-
- GLXContext ctx;
-
- CompOption opt[COMP_SCREEN_OPTION_NUM];
-
- SetScreenOptionForPluginProc setScreenOptionForPlugin;
-
- InitPluginForScreenProc initPluginForScreen;
- FiniPluginForScreenProc finiPluginForScreen;
-
- PreparePaintScreenProc preparePaintScreen;
- DonePaintScreenProc donePaintScreen;
- PaintScreenProc paintScreen;
- PaintOutputProc paintOutput;
- PaintTransformedOutputProc paintTransformedOutput;
- ApplyScreenTransformProc applyScreenTransform;
- PaintBackgroundProc paintBackground;
- PaintWindowProc paintWindow;
- DrawWindowProc drawWindow;
- AddWindowGeometryProc addWindowGeometry;
- DrawWindowTextureProc drawWindowTexture;
- DamageWindowRectProc damageWindowRect;
- GetOutputExtentsForWindowProc getOutputExtentsForWindow;
- GetAllowedActionsForWindowProc getAllowedActionsForWindow;
- FocusWindowProc focusWindow;
- PlaceWindowProc placeWindow;
-
- PaintCursorProc paintCursor;
- DamageCursorRectProc damageCursorRect;
-
- WindowAddNotifyProc windowAddNotify;
- WindowResizeNotifyProc windowResizeNotify;
- WindowMoveNotifyProc windowMoveNotify;
- WindowGrabNotifyProc windowGrabNotify;
- WindowUngrabNotifyProc windowUngrabNotify;
-
- EnterShowDesktopModeProc enterShowDesktopMode;
- LeaveShowDesktopModeProc leaveShowDesktopMode;
-
- WindowStateChangeNotifyProc windowStateChangeNotify;
-
- OutputChangeNotifyProc outputChangeNotify;
-
- InitWindowWalkerProc initWindowWalker;
-
- CompPrivate *privates;
-};
-
-int
-allocateScreenPrivateIndex (CompDisplay *display);
-
-void
-freeScreenPrivateIndex (CompDisplay *display,
- int index);
-
-CompOption *
-getScreenOptions (CompScreen *screen,
- int *count);
-
-Bool
-setScreenOption (CompScreen *screen,
- const char *name,
- CompOptionValue *value);
-
-void
-configureScreen (CompScreen *s,
- XConfigureEvent *ce);
-
-void
-setCurrentOutput (CompScreen *s,
- int outputNum);
-
-void
-updateScreenBackground (CompScreen *screen,
- CompTexture *texture);
-
-void
-detectRefreshRateOfScreen (CompScreen *s);
-
-void
-showOutputWindow (CompScreen *s);
-
-void
-hideOutputWindow (CompScreen *s);
-
-Bool
-addScreen (CompDisplay *display,
- int screenNum,
- Window wmSnSelectionWindow,
- Atom wmSnAtom,
- Time wmSnTimestamp);
-
-void
-damageScreenRegion (CompScreen *screen,
- Region region);
-
-void
-damageScreen (CompScreen *screen);
-
-void
-damagePendingOnScreen (CompScreen *s);
-
-void
-insertWindowIntoScreen (CompScreen *s,
- CompWindow *w,
- Window aboveId);
-
-void
-unhookWindowFromScreen (CompScreen *s,
- CompWindow *w);
-
-void
-forEachWindowOnScreen (CompScreen *screen,
- ForEachWindowProc proc,
- void *closure);
-
-CompWindow *
-findWindowAtScreen (CompScreen *s,
- Window id);
-
-CompWindow *
-findTopLevelWindowAtScreen (CompScreen *s,
- Window id);
-
-int
-pushScreenGrab (CompScreen *s,
- Cursor cursor,
- const char *name);
-
-void
-updateScreenGrab (CompScreen *s,
- int index,
- Cursor cursor);
-
-void
-removeScreenGrab (CompScreen *s,
- int index,
- XPoint *restorePointer);
-
-Bool
-otherScreenGrabExist (CompScreen *s, ...);
-
-Bool
-addScreenAction (CompScreen *s,
- CompAction *action);
-
-void
-removeScreenAction (CompScreen *s,
- CompAction *action);
-
-void
-updatePassiveGrabs (CompScreen *s);
-
-void
-updateWorkareaForScreen (CompScreen *s);
-
-void
-updateClientListForScreen (CompScreen *s);
-
-Window
-getActiveWindow (CompDisplay *display,
- Window root);
-
-void
-toolkitAction (CompScreen *s,
- Atom toolkitAction,
- Time eventTime,
- Window window,
- long data0,
- long data1,
- long data2);
-
-void
-runCommand (CompScreen *s,
- const char *command);
-
-void
-moveScreenViewport (CompScreen *s,
- int tx,
- int ty,
- Bool sync);
-
-void
-moveWindowToViewportPosition (CompWindow *w,
- int x,
- int y,
- Bool sync);
-
-CompGroup *
-addGroupToScreen (CompScreen *s,
- Window id);
-void
-removeGroupFromScreen (CompScreen *s,
- CompGroup *group);
-
-CompGroup *
-findGroupAtScreen (CompScreen *s,
- Window id);
-
-void
-applyStartupProperties (CompScreen *screen,
- CompWindow *window);
-
-void
-sendWindowActivationRequest (CompScreen *s,
- Window id);
-
-void
-screenTexEnvMode (CompScreen *s,
- GLenum mode);
-
-void
-screenLighting (CompScreen *s,
- Bool lighting);
-
-void
-enableScreenEdge (CompScreen *s,
- int edge);
-
-void
-disableScreenEdge (CompScreen *s,
- int edge);
-
-Window
-getTopWindow (CompScreen *s);
-
-void
-makeScreenCurrent (CompScreen *s);
-
-void
-finishScreenDrawing (CompScreen *s);
-
-int
-outputDeviceForPoint (CompScreen *s,
- int x,
- int y);
-
-void
-getCurrentOutputExtents (CompScreen *s,
- int *x1,
- int *y1,
- int *x2,
- int *y2);
-
-void
-getWorkareaForOutput (CompScreen *s,
- int output,
- XRectangle *area);
-
-void
-setNumberOfDesktops (CompScreen *s,
- unsigned int nDesktop);
-
-void
-setCurrentDesktop (CompScreen *s,
- unsigned int desktop);
-
-void
-setDefaultViewport (CompScreen *s);
-
-void
-outputChangeNotify (CompScreen *s);
-
-void
-clearScreenOutput (CompScreen *s,
- CompOutput *output,
- unsigned int mask);
-
-void
-viewportForGeometry (CompScreen *s,
- int x,
- int y,
- int width,
- int height,
- int borderWidth,
- int *viewportX,
- int *viewportY);
-
-int
-outputDeviceForGeometry (CompScreen *s,
- int x,
- int y,
- int width,
- int height,
- int borderWidth);
-
-Bool
-updateDefaultIcon (CompScreen *screen);
-
-CompCursor *
-findCursorAtScreen (CompScreen *screen);
-
-CompCursorImage *
-findCursorImageAtScreen (CompScreen *screen,
- unsigned long serial);
-
-void
-setCurrentActiveWindowHistory (CompScreen *s,
- int x,
- int y);
-
-void
-addToCurrentActiveWindowHistory (CompScreen *s,
- Window id);
-
-
-/* window.c */
-
-#define WINDOW_INVISIBLE(w) \
- ((w)->attrib.map_state != IsViewable || \
- (!(w)->damaged) || \
- (w)->attrib.x + (w)->width + (w)->output.right <= 0 || \
- (w)->attrib.y + (w)->height + (w)->output.bottom <= 0 || \
- (w)->attrib.x - (w)->output.left >= (w)->screen->width || \
- (w)->attrib.y - (w)->output.top >= (w)->screen->height)
-
-typedef Bool (*InitPluginForWindowProc) (CompPlugin *plugin,
- CompWindow *window);
-typedef void (*FiniPluginForWindowProc) (CompPlugin *plugin,
- CompWindow *window);
-
-typedef enum {
- CompStackingUpdateModeNone = 0,
- CompStackingUpdateModeNormal,
- CompStackingUpdateModeAboveFullscreen
-} CompStackingUpdateMode;
-
-struct _CompWindowExtents {
- int left;
- int right;
- int top;
- int bottom;
-};
-
-typedef struct _CompStruts {
- XRectangle left;
- XRectangle right;
- XRectangle top;
- XRectangle bottom;
-} CompStruts;
-
-struct _CompWindow {
- CompScreen *screen;
- CompWindow *next;
- CompWindow *prev;
-
- int refcnt;
- Window id;
- Window frame;
- unsigned int mapNum;
- unsigned int activeNum;
- XWindowAttributes attrib;
- int serverX;
- int serverY;
- int serverWidth;
- int serverHeight;
- int serverBorderWidth;
- Window transientFor;
- Window clientLeader;
- XSizeHints sizeHints;
- Pixmap pixmap;
- CompTexture *texture;
- CompMatrix matrix;
- Damage damage;
- Bool inputHint;
- Bool alpha;
- GLint width;
- GLint height;
- Region region;
- Region clip;
- unsigned int wmType;
- unsigned int type;
- unsigned int state;
- unsigned int actions;
- unsigned int protocols;
- unsigned int mwmDecor;
- unsigned int mwmFunc;
- Bool invisible;
- Bool destroyed;
- Bool damaged;
- Bool redirected;
- Bool managed;
- Bool bindFailed;
- Bool added;
- int destroyRefCnt;
- int unmapRefCnt;
-
- unsigned int initialViewportX;
- unsigned int initialViewportY;
-
- Time initialTimestamp;
- Bool initialTimestampSet;
-
- Bool placed;
- Bool minimized;
- Bool inShowDesktopMode;
- Bool shaded;
- Bool hidden;
- Bool grabbed;
-
- unsigned int desktop;
-
- int pendingUnmaps;
- int pendingMaps;
-
- char *startupId;
- char *resName;
- char *resClass;
-
- CompGroup *group;
-
- unsigned int lastPong;
- Bool alive;
-
- GLushort opacity;
- GLushort brightness;
- GLushort saturation;
-
- Bool opacityPropSet;
- int opacityFactor;
-
- WindowPaintAttrib paint;
- WindowPaintAttrib lastPaint;
-
- unsigned int lastMask;
-
- CompWindowExtents input;
- CompWindowExtents output;
-
- CompStruts *struts;
-
- CompIcon **icon;
- int nIcon;
-
- XWindowChanges saveWc;
- int saveMask;
-
- XSyncCounter syncCounter;
- XSyncValue syncValue;
- XSyncAlarm syncAlarm;
- unsigned long syncAlarmConnection;
- unsigned int syncWaitHandle;
-
- Bool syncWait;
- int syncX;
- int syncY;
- int syncWidth;
- int syncHeight;
- int syncBorderWidth;
-
- Bool closeRequests;
- Time lastCloseRequestTime;
-
- XRectangle *damageRects;
- int sizeDamage;
- int nDamage;
-
- GLfloat *vertices;
- int vertexSize;
- GLushort *indices;
- int indexSize;
- int vCount;
- int texUnits;
- int texCoordSize;
- int indexCount;
-
- /* must be set by addWindowGeometry */
- DrawWindowGeometryProc drawWindowGeometry;
-
- CompPrivate *privates;
-};
-
-int
-allocateWindowPrivateIndex (CompScreen *screen);
-
-void
-freeWindowPrivateIndex (CompScreen *screen,
- int index);
-
-unsigned int
-windowStateMask (CompDisplay *display,
- Atom state);
-
-unsigned int
-windowStateFromString (const char *str);
-
-unsigned int
-getWindowState (CompDisplay *display,
- Window id);
-
-void
-setWindowState (CompDisplay *display,
- unsigned int state,
- Window id);
-
-void
-changeWindowState (CompWindow *w,
- unsigned int newState);
-
-void
-recalcWindowActions (CompWindow *w);
-
-unsigned int
-constrainWindowState (unsigned int state,
- unsigned int actions);
-
-unsigned int
-windowTypeFromString (const char *str);
-
-unsigned int
-getWindowType (CompDisplay *display,
- Window id);
-
-void
-recalcWindowType (CompWindow *w);
-
-void
-getMwmHints (CompDisplay *display,
- Window id,
- unsigned int *func,
- unsigned int *decor);
-
-unsigned int
-getProtocols (CompDisplay *display,
- Window id);
-
-unsigned int
-getWindowProp (CompDisplay *display,
- Window id,
- Atom property,
- unsigned int defaultValue);
-
-void
-setWindowProp (CompDisplay *display,
- Window id,
- Atom property,
- unsigned int value);
-
-Bool
-readWindowProp32 (CompDisplay *display,
- Window id,
- Atom property,
- unsigned short *returnValue);
-
-unsigned short
-getWindowProp32 (CompDisplay *display,
- Window id,
- Atom property,
- unsigned short defaultValue);
-
-void
-setWindowProp32 (CompDisplay *display,
- Window id,
- Atom property,
- unsigned short value);
-
-void
-updateWindowOpacity (CompWindow *window);
-
-void
-updateNormalHints (CompWindow *window);
-
-void
-updateWmHints (CompWindow *w);
-
-void
-updateWindowClassHints (CompWindow *window);
-
-void
-updateTransientHint (CompWindow *w);
-
-Window
-getClientLeader (CompWindow *w);
-
-char *
-getStartupId (CompWindow *w);
-
-int
-getWmState (CompDisplay *display,
- Window id);
-
-void
-setWmState (CompDisplay *display,
- int state,
- Window id);
-
-void
-setWindowFrameExtents (CompWindow *w,
- CompWindowExtents *input);
-
-void
-updateWindowOutputExtents (CompWindow *w);
-
-void
-updateWindowRegion (CompWindow *w);
-
-Bool
-updateWindowStruts (CompWindow *w);
-
-void
-addWindow (CompScreen *screen,
- Window id,
- Window aboveId);
-
-void
-removeWindow (CompWindow *w);
-
-void
-destroyWindow (CompWindow *w);
-
-void
-sendConfigureNotify (CompWindow *w);
-
-void
-mapWindow (CompWindow *w);
-
-void
-unmapWindow (CompWindow *w);
-
-Bool
-bindWindow (CompWindow *w);
-
-void
-releaseWindow (CompWindow *w);
-
-void
-moveWindow (CompWindow *w,
- int dx,
- int dy,
- Bool damage,
- Bool immediate);
-
-void
-configureXWindow (CompWindow *w,
- unsigned int valueMask,
- XWindowChanges *xwc);
-
-void
-moveResizeWindow (CompWindow *w,
- XWindowChanges *xwc,
- unsigned int xwcm,
- int gravity);
-
-void
-syncWindowPosition (CompWindow *w);
-
-void
-sendSyncRequest (CompWindow *w);
-
-Bool
-resizeWindow (CompWindow *w,
- int x,
- int y,
- int width,
- int height,
- int borderWidth);
-
-void
-configureWindow (CompWindow *w,
- XConfigureEvent *ce);
-
-void
-circulateWindow (CompWindow *w,
- XCirculateEvent *ce);
-
-void
-addWindowDamageRect (CompWindow *w,
- BoxPtr rect);
-
-void
-getOutputExtentsForWindow (CompWindow *w,
- CompWindowExtents *output);
-
-unsigned int
-getAllowedActionsForWindow (CompWindow *w);
-
-void
-addWindowDamage (CompWindow *w);
-
-void
-damageWindowOutputExtents (CompWindow *w);
-
-Bool
-damageWindowRect (CompWindow *w,
- Bool initial,
- BoxPtr rect);
-
-void
-damageTransformedWindowRect (CompWindow *w,
- float xScale,
- float yScale,
- float xTranslate,
- float yTranslate,
- BoxPtr rect);
-
-Bool
-focusWindow (CompWindow *w);
-
-Bool
-placeWindow (CompWindow *w,
- int x,
- int y,
- int *newX,
- int *newY);
-
-void
-windowResizeNotify (CompWindow *w,
- int dx,
- int dy,
- int dwidth,
- int dheight);
-
-void
-windowMoveNotify (CompWindow *w,
- int dx,
- int dy,
- Bool immediate);
-
-void
-windowGrabNotify (CompWindow *w,
- int x,
- int y,
- unsigned int state,
- unsigned int mask);
-
-void
-windowUngrabNotify (CompWindow *w);
-
-void
-windowStateChangeNotify (CompWindow *w,
- unsigned int lastState);
-
-void
-moveInputFocusToWindow (CompWindow *w);
-
-void
-updateWindowSize (CompWindow *w);
-
-void
-raiseWindow (CompWindow *w);
-
-void
-lowerWindow (CompWindow *w);
-
-void
-restackWindowAbove (CompWindow *w,
- CompWindow *sibling);
-
-void
-restackWindowBelow (CompWindow *w,
- CompWindow *sibling);
-
-void
-updateWindowAttributes (CompWindow *w,
- CompStackingUpdateMode stackingMode);
-
-void
-activateWindow (CompWindow *w);
-
-void
-closeWindow (CompWindow *w,
- Time serverTime);
-
-Bool
-constrainNewWindowSize (CompWindow *w,
- int width,
- int height,
- int *newWidth,
- int *newHeight);
-
-void
-hideWindow (CompWindow *w);
-
-void
-showWindow (CompWindow *w);
-
-void
-minimizeWindow (CompWindow *w);
-
-void
-unminimizeWindow (CompWindow *w);
-
-void
-maximizeWindow (CompWindow *w,
- int state);
-
-Bool
-getWindowUserTime (CompWindow *w,
- Time *time);
-
-void
-setWindowUserTime (CompWindow *w,
- Time time);
-
-Bool
-focusWindowOnMap (CompWindow *w);
-
-void
-unredirectWindow (CompWindow *w);
-
-void
-redirectWindow (CompWindow *w);
-
-void
-defaultViewportForWindow (CompWindow *w,
- int *vx,
- int *vy);
-
-CompIcon *
-getWindowIcon (CompWindow *w,
- int width,
- int height);
-
-void
-freeWindowIcons (CompWindow *w);
-
-int
-outputDeviceForWindow (CompWindow *w);
-
-Bool
-onCurrentDesktop (CompWindow *w);
-
-void
-setDesktopForWindow (CompWindow *w,
- unsigned int desktop);
-
-int
-compareWindowActiveness (CompWindow *w1,
- CompWindow *w2);
-
-void
-windowAddNotify (CompWindow *w);
-
-
-/* plugin.c */
-
-#define HOME_PLUGINDIR ".compiz/plugins"
-
-typedef struct _CompPluginVTable CompPluginVTable;
-
-typedef CompPluginVTable *(*PluginGetInfoProc) (void);
-
-typedef Bool (*LoadPluginProc) (CompPlugin *p,
- const char *path,
- const char *name);
-
-typedef void (*UnloadPluginProc) (CompPlugin *p);
-
-typedef char **(*ListPluginsProc) (const char *path,
- int *n);
-
-extern LoadPluginProc loaderLoadPlugin;
-extern UnloadPluginProc loaderUnloadPlugin;
-extern ListPluginsProc loaderListPlugins;
-
-struct _CompPlugin {
- CompPlugin *next;
- CompPrivate devPrivate;
- char *devType;
- CompPluginVTable *vTable;
-};
-
-Bool
-initPluginForDisplay (CompPlugin *p,
- CompDisplay *d);
-
-void
-finiPluginForDisplay (CompPlugin *p,
- CompDisplay *d);
-
-Bool
-initPluginForScreen (CompPlugin *p,
- CompScreen *s);
-
-void
-finiPluginForScreen (CompPlugin *p,
- CompScreen *s);
-
-CompPluginVTable *
-getCompPluginInfo (void);
-
-void
-screenInitPlugins (CompScreen *s);
-
-void
-screenFiniPlugins (CompScreen *s);
-
-void
-windowInitPlugins (CompWindow *w);
-
-void
-windowFiniPlugins (CompWindow *w);
-
-CompPlugin *
-findActivePlugin (const char *name);
-
-CompPlugin *
-loadPlugin (const char *plugin);
-
-void
-unloadPlugin (CompPlugin *p);
-
-Bool
-pushPlugin (CompPlugin *p);
-
-CompPlugin *
-popPlugin (void);
-
-CompPlugin *
-getPlugins (void);
-
-char **
-availablePlugins (int *n);
-
-int
-getPluginABI (const char *name);
-
-Bool
-checkPluginABI (const char *name,
- int abi);
-
-Bool
-getPluginDisplayIndex (CompDisplay *d,
- const char *name,
- int *index);
-
-
-/* session.c */
-
-void
-initSession (char *smPrevClientId);
-
-void
-closeSession (void);
-
-
-/* fragment.c */
-
-#define MAX_FRAGMENT_FUNCTIONS 16
-
-struct _FragmentAttrib {
- GLushort opacity;
- GLushort brightness;
- GLushort saturation;
- int nTexture;
- int function[MAX_FRAGMENT_FUNCTIONS];
- int nFunction;
- int nParam;
-};
-
-CompFunctionData *
-createFunctionData (void);
-
-void
-destroyFunctionData (CompFunctionData *data);
-
-Bool
-addTempHeaderOpToFunctionData (CompFunctionData *data,
- const char *name);
-
-Bool
-addParamHeaderOpToFunctionData (CompFunctionData *data,
- const char *name);
-
-Bool
-addAttribHeaderOpToFunctionData (CompFunctionData *data,
- const char *name);
-
-#define COMP_FETCH_TARGET_2D 0
-#define COMP_FETCH_TARGET_RECT 1
-#define COMP_FETCH_TARGET_NUM 2
-
-Bool
-addFetchOpToFunctionData (CompFunctionData *data,
- const char *dst,
- const char *offset,
- int target);
-
-Bool
-addColorOpToFunctionData (CompFunctionData *data,
- const char *dst,
- const char *src);
-
-Bool
-addDataOpToFunctionData (CompFunctionData *data,
- const char *str,
- ...);
-
-Bool
-addBlendOpToFunctionData (CompFunctionData *data,
- const char *str,
- ...);
-
-int
-createFragmentFunction (CompScreen *s,
- const char *name,
- CompFunctionData *data);
-
-void
-destroyFragmentFunction (CompScreen *s,
- int id);
-
-int
-getSaturateFragmentFunction (CompScreen *s,
- CompTexture *texture,
- int param);
-
-int
-allocFragmentTextureUnits (FragmentAttrib *attrib,
- int nTexture);
-
-int
-allocFragmentParameters (FragmentAttrib *attrib,
- int nParam);
-
-void
-addFragmentFunction (FragmentAttrib *attrib,
- int function);
-
-void
-initFragmentAttrib (FragmentAttrib *attrib,
- const WindowPaintAttrib *paint);
-
-Bool
-enableFragmentAttrib (CompScreen *s,
- FragmentAttrib *attrib,
- Bool *blending);
-
-void
-disableFragmentAttrib (CompScreen *s,
- FragmentAttrib *attrib);
-
-
-/* matrix.c */
-
-void
-matrixRotate (CompTransform *transform,
- float angle,
- float x,
- float y,
- float z);
-
-void
-matrixScale (CompTransform *transform,
- float x,
- float y,
- float z);
-
-void
-matrixTranslate (CompTransform *transform,
- float x,
- float y,
- float z);
-
-
-/* cursor.c */
-
-void
-addCursor (CompScreen *s);
-
-Bool
-damageCursorRect (CompCursor *c,
- Bool initial,
- BoxPtr rect);
-
-void
-addCursorDamageRect (CompCursor *c,
- BoxPtr rect);
-
-void
-addCursorDamage (CompCursor *c);
-
-void
-updateCursor (CompCursor *c,
- int x,
- int y,
- unsigned long serial);
-
-
-/* match.c */
-
-void
-matchInit (CompMatch *match);
-
-void
-matchFini (CompMatch *match);
-
-Bool
-matchEqual (CompMatch *m1,
- CompMatch *m2);
-
-Bool
-matchCopy (CompMatch *dst,
- CompMatch *src);
-
-Bool
-matchAddGroup (CompMatch *match,
- int flags,
- CompMatch *group);
-
-Bool
-matchAddExp (CompMatch *match,
- int flags,
- const char *value);
-
-void
-matchAddFromString (CompMatch *match,
- const char *str);
-
-char *
-matchToString (CompMatch *match);
-
-void
-matchUpdate (CompDisplay *display,
- CompMatch *match);
-
-Bool
-matchEval (CompMatch *match,
- CompWindow *window);
-
-void
-matchInitExp (CompDisplay *display,
- CompMatchExp *exp,
- const char *value);
-
-void
-matchExpHandlerChanged (CompDisplay *display);
-
-void
-matchPropertyChanged (CompDisplay *display,
- CompWindow *window);
-
-
-/* metadata.c */
-
-#define STRINGIFY(x) #x
-#define TOSTRING(x) STRINGIFY (x)
-#define MINTOSTRING(x) "<min>" TOSTRING (x) "</min>"
-#define MAXTOSTRING(x) "<max>" TOSTRING (x) "</max>"
-#define RESTOSTRING(min, max) MINTOSTRING (min) MAXTOSTRING (max)
-
-typedef struct _CompMetadataOptionInfo {
- char *name;
- char *type;
- char *data;
- CompActionCallBackProc initiate;
- 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;
- int nDoc;
-};
-
-Bool
+CompBool
compInitMetadata (CompMetadata *metadata);
-Bool
+CompBool
compInitPluginMetadata (CompMetadata *metadata,
const char *plugin);
-Bool
-compInitPluginMetadataFromInfo (CompMetadata *metadata,
- const char *plugin,
- const CompMetadataOptionInfo *displayOptionInfo,
- int nDisplayOptionInfo,
- const CompMetadataOptionInfo *screenOptionInfo,
- int nScreenOptionInfo);
-
void
compFiniMetadata (CompMetadata *metadata);
-Bool
+CompBool
compAddMetadataFromFile (CompMetadata *metadata,
const char *file);
-Bool
+CompBool
compAddMetadataFromString (CompMetadata *metadata,
const char *string);
-Bool
+CompBool
compAddMetadataFromIO (CompMetadata *metadata,
xmlInputReadCallback ioread,
xmlInputCloseCallback ioclose,
void *ioctx);
-Bool
-compInitScreenOptionFromMetadata (CompScreen *screen,
- CompMetadata *metadata,
- CompOption *option,
- const char *name);
-
-void
-compFiniScreenOption (CompScreen *screen,
- CompOption *option);
-
-Bool
-compInitScreenOptionsFromMetadata (CompScreen *screen,
- CompMetadata *metadata,
- const CompMetadataOptionInfo *info,
- CompOption *option,
- int n);
-
-void
-compFiniScreenOptions (CompScreen *screen,
- CompOption *option,
- int n);
-
-Bool
-compSetScreenOption (CompScreen *screen,
- CompOption *option,
- CompOptionValue *value);
-
-Bool
-compInitDisplayOptionFromMetadata (CompDisplay *display,
- CompMetadata *metadata,
- CompOption *option,
- const char *name);
-
-void
-compFiniDisplayOption (CompDisplay *display,
- CompOption *option);
-
-Bool
-compInitDisplayOptionsFromMetadata (CompDisplay *display,
- CompMetadata *metadata,
- const CompMetadataOptionInfo *info,
- CompOption *option,
- int n);
-
-void
-compFiniDisplayOptions (CompDisplay *display,
- CompOption *option,
- int n);
-
-Bool
-compSetDisplayOption (CompDisplay *display,
- CompOption *option,
- CompOptionValue *value);
-
char *
compGetStringFromMetadataPath (CompMetadata *metadata,
const char *path);
-char *
-compGetShortPluginDescription (CompMetadata *metadata);
-
-char *
-compGetLongPluginDescription (CompMetadata *metadata);
-
-char *
-compGetShortScreenOptionDescription (CompMetadata *metadata,
- CompOption *option);
-
-char *
-compGetLongScreenOptionDescription (CompMetadata *metadata,
- CompOption *option);
-
-char *
-compGetShortDisplayOptionDescription (CompMetadata *metadata,
- CompOption *option);
-
-char *
-compGetLongDisplayOptionDescription (CompMetadata *metadata,
- CompOption *option);
-
-
int
compReadXmlChunk (const char *src,
int *offset,
char *buffer,
int length);
-int
-compReadXmlChunkFromMetadataOptionInfo (const CompMetadataOptionInfo *info,
- int *offset,
- char *buffer,
- int length);
-
COMPIZ_END_DECLS
diff --git a/plugins/annotate.c b/plugins/annotate.c
index fbad40aa..fb04f37d 100644
--- a/plugins/annotate.c
+++ b/plugins/annotate.c
@@ -28,7 +28,7 @@
#include <string.h>
#include <cairo-xlib-xrender.h>
-#include <compiz-plugin.h>
+#include <compiz-core.h>
static CompMetadata annoMetadata;
diff --git a/plugins/blur.c b/plugins/blur.c
index 1c4f1e92..3cbdf33e 100644
--- a/plugins/blur.c
+++ b/plugins/blur.c
@@ -27,7 +27,7 @@
#include <string.h>
#include <math.h>
-#include <compiz-plugin.h>
+#include <compiz-core.h>
#include <decoration.h>
#include <X11/Xatom.h>
diff --git a/plugins/clone.c b/plugins/clone.c
index 26dd83e6..b24b3c95 100644
--- a/plugins/clone.c
+++ b/plugins/clone.c
@@ -29,7 +29,7 @@
#include <math.h>
#include <sys/time.h>
-#include <compiz-plugin.h>
+#include <compiz-core.h>
static CompMetadata cloneMetadata;
diff --git a/plugins/dbus.c b/plugins/dbus.c
index 2846e482..0c824b67 100644
--- a/plugins/dbus.c
+++ b/plugins/dbus.c
@@ -31,7 +31,7 @@
#include <dbus/dbus.h>
#include <libxml/xmlwriter.h>
-#include <compiz-plugin.h>
+#include <compiz-core.h>
static CompMetadata dbusMetadata;
diff --git a/plugins/decoration.c b/plugins/decoration.c
index df0ba1cf..6200a348 100644
--- a/plugins/decoration.c
+++ b/plugins/decoration.c
@@ -33,7 +33,7 @@
#include <math.h>
#include <unistd.h>
-#include <compiz-plugin.h>
+#include <compiz-core.h>
#include <decoration.h>
#include <X11/Xatom.h>
diff --git a/plugins/fade.c b/plugins/fade.c
index d5582c36..ecd54e10 100644
--- a/plugins/fade.c
+++ b/plugins/fade.c
@@ -26,7 +26,7 @@
#include <stdlib.h>
#include <string.h>
-#include <compiz-plugin.h>
+#include <compiz-core.h>
static CompMetadata fadeMetadata;
diff --git a/plugins/fuse.c b/plugins/fuse.c
index 257fbf3c..281adc42 100644
--- a/plugins/fuse.c
+++ b/plugins/fuse.c
@@ -32,7 +32,7 @@
#include <fuse.h>
#include <fuse_lowlevel.h>
-#include <compiz-plugin.h>
+#include <compiz-core.h>
static CompMetadata fuseMetadata;
diff --git a/plugins/gconf.c b/plugins/gconf.c
index 9ba6c9e9..3b6bb3a5 100644
--- a/plugins/gconf.c
+++ b/plugins/gconf.c
@@ -33,7 +33,7 @@
#include <glib/gprintf.h>
#include <gconf/gconf-client.h>
-#include <compiz-plugin.h>
+#include <compiz-core.h>
static CompMetadata gconfMetadata;
diff --git a/plugins/glib.c b/plugins/glib.c
index 6835c9e2..5af08936 100644
--- a/plugins/glib.c
+++ b/plugins/glib.c
@@ -24,7 +24,8 @@
*/
#include <glib.h>
-#include <compiz-plugin.h>
+
+#include <compiz-core.h>
static CompMetadata glibMetadata;
diff --git a/plugins/ini.c b/plugins/ini.c
index 6188a08a..8eb59f61 100644
--- a/plugins/ini.c
+++ b/plugins/ini.c
@@ -31,7 +31,7 @@
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
-#include <compiz-plugin.h>
+#include <compiz-core.h>
#define DEFAULT_PLUGINS "ini,inotify,png,decoration,move,resize,switcher"
#define NUM_DEFAULT_PLUGINS 7
diff --git a/plugins/inotify.c b/plugins/inotify.c
index 9d171455..bae92dc0 100644
--- a/plugins/inotify.c
+++ b/plugins/inotify.c
@@ -28,7 +28,7 @@
#include <poll.h>
#include <sys/inotify.h>
-#include <compiz-plugin.h>
+#include <compiz-core.h>
static CompMetadata inotifyMetadata;
diff --git a/plugins/kconfig.cpp b/plugins/kconfig.cpp
index eabb816b..d9edfa14 100644
--- a/plugins/kconfig.cpp
+++ b/plugins/kconfig.cpp
@@ -23,7 +23,7 @@
#include <ksimpleconfig.h>
#include <qfile.h>
-#include <compiz-plugin.h>
+#include <compiz-core.h>
#define COMPIZ_KCONFIG_RC "compizrc"
diff --git a/plugins/minimize.c b/plugins/minimize.c
index 9f4d7694..030c0abc 100644
--- a/plugins/minimize.c
+++ b/plugins/minimize.c
@@ -29,7 +29,7 @@
#include <string.h>
#include <math.h>
-#include <compiz-plugin.h>
+#include <compiz-core.h>
static CompMetadata minMetadata;
diff --git a/plugins/move.c b/plugins/move.c
index 986e135a..e54669f3 100644
--- a/plugins/move.c
+++ b/plugins/move.c
@@ -29,7 +29,7 @@
#include <X11/cursorfont.h>
-#include <compiz-plugin.h>
+#include <compiz-core.h>
static CompMetadata moveMetadata;
diff --git a/plugins/place.c b/plugins/place.c
index 906eebf3..5db6bd80 100644
--- a/plugins/place.c
+++ b/plugins/place.c
@@ -24,7 +24,7 @@
#include <stdlib.h>
#include <string.h>
-#include <compiz-plugin.h>
+#include <compiz-core.h>
#include <glib.h>
diff --git a/plugins/plane.c b/plugins/plane.c
index 6dc4bf17..4d0f985e 100644
--- a/plugins/plane.c
+++ b/plugins/plane.c
@@ -32,7 +32,7 @@
#include <X11/Xatom.h>
#include <X11/Xproto.h>
-#include <compiz-plugin.h>
+#include <compiz-core.h>
static CompMetadata planeMetadata;
diff --git a/plugins/png.c b/plugins/png.c
index 3d5a79f0..99593f7f 100644
--- a/plugins/png.c
+++ b/plugins/png.c
@@ -29,7 +29,7 @@
#include <png.h>
#include <setjmp.h>
-#include <compiz-plugin.h>
+#include <compiz-core.h>
static CompMetadata pngMetadata;
diff --git a/plugins/regex.c b/plugins/regex.c
index 87228674..c7c1e95a 100644
--- a/plugins/regex.c
+++ b/plugins/regex.c
@@ -31,7 +31,7 @@
#include <X11/Xatom.h>
-#include <compiz-plugin.h>
+#include <compiz-core.h>
static CompMetadata regexMetadata;
diff --git a/plugins/resize.c b/plugins/resize.c
index e05147da..0393ede1 100644
--- a/plugins/resize.c
+++ b/plugins/resize.c
@@ -30,7 +30,7 @@
#include <X11/Xatom.h>
#include <X11/cursorfont.h>
-#include <compiz-plugin.h>
+#include <compiz-core.h>
static CompMetadata resizeMetadata;
diff --git a/plugins/screenshot.c b/plugins/screenshot.c
index 1f1c3b84..ef76f45b 100644
--- a/plugins/screenshot.c
+++ b/plugins/screenshot.c
@@ -27,7 +27,7 @@
#include <string.h>
#include <dirent.h>
-#include <compiz-plugin.h>
+#include <compiz-core.h>
static CompMetadata shotMetadata;
diff --git a/plugins/svg.c b/plugins/svg.c
index 153fcdc9..423ed4e7 100644
--- a/plugins/svg.c
+++ b/plugins/svg.c
@@ -33,7 +33,7 @@
#include <X11/Xatom.h>
#include <X11/extensions/shape.h>
-#include <compiz-plugin.h>
+#include <compiz-core.h>
#include <decoration.h>
static CompMetadata svgMetadata;
diff --git a/plugins/switcher.c b/plugins/switcher.c
index 38523123..3c33ec79 100644
--- a/plugins/switcher.c
+++ b/plugins/switcher.c
@@ -33,7 +33,7 @@
#include <X11/Xatom.h>
#include <X11/extensions/Xrender.h>
-#include <compiz-plugin.h>
+#include <compiz-core.h>
#define ZOOMED_WINDOW_MASK (1 << 0)
#define NORMAL_WINDOW_MASK (1 << 1)
diff --git a/plugins/video.c b/plugins/video.c
index 323c4868..8ba02207 100644
--- a/plugins/video.c
+++ b/plugins/video.c
@@ -29,7 +29,7 @@
#include <math.h>
#include <unistd.h>
-#include <compiz-plugin.h>
+#include <compiz-core.h>
#include <decoration.h>
#include <X11/Xatom.h>
diff --git a/plugins/water.c b/plugins/water.c
index f59f3e55..6d3ec100 100644
--- a/plugins/water.c
+++ b/plugins/water.c
@@ -32,7 +32,7 @@
#include <string.h>
#include <math.h>
-#include <compiz-plugin.h>
+#include <compiz-core.h>
#define TEXTURE_SIZE 256
diff --git a/plugins/wobbly.c b/plugins/wobbly.c
index f6c1748b..1707731d 100644
--- a/plugins/wobbly.c
+++ b/plugins/wobbly.c
@@ -31,7 +31,7 @@
#include <string.h>
#include <math.h>
-#include <compiz-plugin.h>
+#include <compiz-core.h>
#define WIN_X(w) ((w)->attrib.x - (w)->output.left)
#define WIN_Y(w) ((w)->attrib.y - (w)->output.top)
diff --git a/plugins/zoom.c b/plugins/zoom.c
index 84cb1235..4f2d83d6 100644
--- a/plugins/zoom.c
+++ b/plugins/zoom.c
@@ -31,7 +31,7 @@
#include <X11/cursorfont.h>
-#include <compiz-plugin.h>
+#include <compiz-core.h>
static CompMetadata zoomMetadata;
diff --git a/src/cursor.c b/src/cursor.c
index ae5c8da8..559a285c 100644
--- a/src/cursor.c
+++ b/src/cursor.c
@@ -23,10 +23,10 @@
* Author: David Reveman <davidr@novell.com>
*/
-#include <compiz.h>
-
#include <stdlib.h>
+#include <compiz-core.h>
+
static void
setCursorMatrix (CompCursor *c)
{
diff --git a/src/display.c b/src/display.c
index d25d4c02..6bbf950d 100644
--- a/src/display.c
+++ b/src/display.c
@@ -41,7 +41,7 @@
#include <X11/extensions/Xrandr.h>
#include <X11/extensions/shape.h>
-#include <compiz-plugin.h>
+#include <compiz-core.h>
static unsigned int virtualModMask[] = {
CompAltMask, CompMetaMask, CompSuperMask, CompHyperMask,
diff --git a/src/event.c b/src/event.c
index d149f386..54a641e7 100644
--- a/src/event.c
+++ b/src/event.c
@@ -32,7 +32,7 @@
#include <X11/extensions/Xrandr.h>
#include <X11/extensions/Xfixes.h>
-#include <compiz-plugin.h>
+#include <compiz-core.h>
static Window xdndWindow = None;
static Window edgeWindow = None;
diff --git a/src/fragment.c b/src/fragment.c
index e51d03c4..dda806ce 100644
--- a/src/fragment.c
+++ b/src/fragment.c
@@ -23,7 +23,7 @@
* Author: David Reveman <davidr@novell.com>
*/
-#include <compiz.h>
+#include <compiz-core.h>
#include <string.h>
#include <stdlib.h>
diff --git a/src/main.c b/src/main.c
index d7798a19..3f17f1df 100644
--- a/src/main.c
+++ b/src/main.c
@@ -34,7 +34,7 @@
#include <string.h>
#include <sys/wait.h>
-#include <compiz.h>
+#include <compiz-core.h>
char *programName;
char **programArgv;
diff --git a/src/match.c b/src/match.c
index 7309ca06..eb324fb5 100644
--- a/src/match.c
+++ b/src/match.c
@@ -26,7 +26,7 @@
#include <stdlib.h>
#include <string.h>
-#include <compiz-plugin.h>
+#include <compiz-core.h>
static void
matchResetOps (CompDisplay *display,
diff --git a/src/matrix.c b/src/matrix.c
index 0fec253e..cfaf0157 100644
--- a/src/matrix.c
+++ b/src/matrix.c
@@ -24,7 +24,7 @@
#include <string.h>
#include <math.h>
-#include <compiz.h>
+#include <compiz-core.h>
/**
* Identity matrix.
diff --git a/src/metadata.c b/src/metadata.c
index 81dec8c0..07208428 100644
--- a/src/metadata.c
+++ b/src/metadata.c
@@ -30,7 +30,7 @@
#include <libxml/xpath.h>
#include <libxml/xpathInternals.h>
-#include <compiz.h>
+#include <compiz-core.h>
#define HOME_METADATADIR ".compiz/metadata"
#define EXTENSION ".xml"
diff --git a/src/option.c b/src/option.c
index 729b3771..2f7b8fbf 100644
--- a/src/option.c
+++ b/src/option.c
@@ -29,7 +29,7 @@
#include <ctype.h>
#include <math.h>
-#include <compiz.h>
+#include <compiz-core.h>
struct _Modifier {
char *name;
@@ -424,18 +424,6 @@ compSetOption (CompOption *option,
return FALSE;
}
-unsigned int
-compWindowTypeMaskFromStringList (CompOptionValue *value)
-{
- int i;
- unsigned int mask = 0;
-
- for (i = 0; i < value->list.nValue; i++)
- mask |= windowTypeFromString (value->list.value[i].s);
-
- return mask;
-}
-
Bool
getBoolOptionNamed (CompOption *option,
int nOption,
diff --git a/src/paint.c b/src/paint.c
index 00cbf736..92ca47c0 100644
--- a/src/paint.c
+++ b/src/paint.c
@@ -27,7 +27,7 @@
#include <string.h>
#include <math.h>
-#include <compiz.h>
+#include <compiz-core.h>
#define DEG2RAD (M_PI / 180.0f)
diff --git a/src/plugin.c b/src/plugin.c
index 91c9cfce..828947b6 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -29,7 +29,7 @@
#include <dlfcn.h>
#include <dirent.h>
-#include <compiz-plugin.h>
+#include <compiz-core.h>
CompPlugin *plugins = 0;
diff --git a/src/privates.c b/src/privates.c
index ea5b57ac..56baa4bf 100644
--- a/src/privates.c
+++ b/src/privates.c
@@ -25,7 +25,7 @@
#include <stdlib.h>
-#include <compiz.h>
+#include <compiz-core.h>
int
allocatePrivateIndex (int *len,
diff --git a/src/screen.c b/src/screen.c
index 4e90b222..d2462d72 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -43,7 +43,7 @@
#include <X11/extensions/shape.h>
#include <X11/cursorfont.h>
-#include <compiz-plugin.h>
+#include <compiz-core.h>
#define NUM_OPTIONS(s) (sizeof ((s)->opt) / sizeof (CompOption))
diff --git a/src/session.c b/src/session.c
index a354c3bc..0afa6b7e 100644
--- a/src/session.c
+++ b/src/session.c
@@ -36,7 +36,7 @@
#include <X11/SM/SMlib.h>
#include <X11/ICE/ICElib.h>
-#include <compiz.h>
+#include <compiz-core.h>
#define SM_DEBUG(x)
diff --git a/src/texture.c b/src/texture.c
index 2e405374..d9f7067a 100644
--- a/src/texture.c
+++ b/src/texture.c
@@ -31,7 +31,7 @@
#include <stdlib.h>
#include <string.h>
-#include <compiz.h>
+#include <compiz-core.h>
static CompMatrix _identity_matrix = {
1.0f, 0.0f,
diff --git a/src/window.c b/src/window.c
index 6142fa49..c80d4ece 100644
--- a/src/window.c
+++ b/src/window.c
@@ -35,7 +35,7 @@
#include <stdlib.h>
#include <stdint.h>
-#include <compiz.h>
+#include <compiz-core.h>
#define MwmHintsFunctions (1L << 0)
#define MwmHintsDecorations (1L << 1)