diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2008-11-02 15:26:35 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2008-11-02 15:26:35 +0000 |
commit | dbca69c8a4f3e2d1ccb4f89152213b2861b33af6 (patch) | |
tree | f8963ef73903a7b4374adc2354dffbaa905112ac /xserver/miext/rootless/rootlessCommon.h | |
parent | 33b2029f322f3c238b7ba528083195ad8dde33e1 (diff) |
xserver 1.5.2. tested by ckuethe@, oga@, and others.
Diffstat (limited to 'xserver/miext/rootless/rootlessCommon.h')
-rw-r--r-- | xserver/miext/rootless/rootlessCommon.h | 44 |
1 files changed, 35 insertions, 9 deletions
diff --git a/xserver/miext/rootless/rootlessCommon.h b/xserver/miext/rootless/rootlessCommon.h index 3bf6af02f..9e4a14a04 100644 --- a/xserver/miext/rootless/rootlessCommon.h +++ b/xserver/miext/rootless/rootlessCommon.h @@ -32,12 +32,17 @@ #include <dix-config.h> #endif +#include <stdint.h> #ifndef _ROOTLESSCOMMON_H #define _ROOTLESSCOMMON_H #include "rootless.h" #include "fb.h" +#ifdef SHAPE +#include "scrnintstr.h" +#endif /* SHAPE */ + #ifdef RENDER #include "picturestr.h" #endif @@ -52,9 +57,10 @@ // Global variables -extern int rootlessGCPrivateIndex; -extern int rootlessScreenPrivateIndex; -extern int rootlessWindowPrivateIndex; +extern DevPrivateKey rootlessGCPrivateKey; +extern DevPrivateKey rootlessScreenPrivateKey; +extern DevPrivateKey rootlessWindowPrivateKey; +extern DevPrivateKey rootlessWindowOldPixmapPrivateKey; // RootlessGCRec: private per-gc data @@ -86,8 +92,6 @@ typedef struct _RootlessScreenRec { ChangeWindowAttributesProcPtr ChangeWindowAttributes; CreateGCProcPtr CreateGC; - PaintWindowBackgroundProcPtr PaintWindowBackground; - PaintWindowBorderProcPtr PaintWindowBorder; CopyWindowProcPtr CopyWindow; GetImageProcPtr GetImage; SourceValidateProcPtr SourceValidate; @@ -104,13 +108,20 @@ typedef struct _RootlessScreenRec { GlyphsProcPtr Glyphs; #endif + InstallColormapProcPtr InstallColormap; + UninstallColormapProcPtr UninstallColormap; + StoreColorsProcPtr StoreColors; + void *pixmap_data; unsigned int pixmap_data_size; + ColormapPtr colormap; + void *redisplay_timer; unsigned int redisplay_timer_set :1; unsigned int redisplay_queued :1; unsigned int redisplay_expired :1; + unsigned int colormap_changed :1; } RootlessScreenRec, *RootlessScreenPtr; @@ -133,12 +144,17 @@ typedef struct _RootlessScreenRec { // Accessors for screen and window privates -#define SCREENREC(pScreen) \ - ((RootlessScreenRec *)(pScreen)->devPrivates[rootlessScreenPrivateIndex].ptr) +#define SCREENREC(pScreen) ((RootlessScreenRec *) \ + dixLookupPrivate(&(pScreen)->devPrivates, rootlessScreenPrivateKey)) -#define WINREC(pWin) \ - ((RootlessWindowRec *)(pWin)->devPrivates[rootlessWindowPrivateIndex].ptr) +#define SETSCREENREC(pScreen, v) \ + dixSetPrivate(&(pScreen)->devPrivates, rootlessScreenPrivateKey, v) +#define WINREC(pWin) ((RootlessWindowRec *) \ + dixLookupPrivate(&(pWin)->devPrivates, rootlessWindowPrivateKey)) + +#define SETWINREC(pWin, v) \ + dixSetPrivate(&(pWin)->devPrivates, rootlessWindowPrivateKey, v) // Call a rootless implementation function. // Many rootless implementation functions are allowed to be NULL. @@ -251,6 +267,16 @@ void RootlessRedisplayScreen(ScreenPtr pScreen); void RootlessQueueRedisplay(ScreenPtr pScreen); +/* Return the colormap currently installed on the given screen. */ +ColormapPtr RootlessGetColormap (ScreenPtr pScreen); + +/* Convert colormap to ARGB. */ +Bool RootlessResolveColormap (ScreenPtr pScreen, int first_color, + int n_colors, uint32_t *colors); + +void RootlessFlushWindowColormap (WindowPtr pWin); +void RootlessFlushScreenColormaps (ScreenPtr pScreen); + // Move a window to its proper location on the screen. void RootlessRepositionWindow(WindowPtr pWin); |