summaryrefslogtreecommitdiff
path: root/xserver/include/privates.h
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2011-11-05 13:32:59 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2011-11-05 13:32:59 +0000
commitbf781c5ff285301ad70ffc5f4321b8906f71edd8 (patch)
tree3b770f4bf9a8cd11dd9f14e7f758991a73a52d78 /xserver/include/privates.h
parente59d0622d3162f7b5a7420ef87dbebb200348c37 (diff)
Update to xserver 1.11.2
Diffstat (limited to 'xserver/include/privates.h')
-rw-r--r--xserver/include/privates.h52
1 files changed, 41 insertions, 11 deletions
diff --git a/xserver/include/privates.h b/xserver/include/privates.h
index d3c0e1325..2b0040cba 100644
--- a/xserver/include/privates.h
+++ b/xserver/include/privates.h
@@ -51,6 +51,7 @@ typedef enum {
PRIVATE_GLYPH,
PRIVATE_GLYPHSET,
PRIVATE_PICTURE,
+ PRIVATE_SYNC_FENCE,
/* last private type */
PRIVATE_LAST,
@@ -65,6 +66,10 @@ typedef struct _DevPrivateKeyRec {
struct _DevPrivateKeyRec *next;
} DevPrivateKeyRec, *DevPrivateKey;
+typedef struct _DevScreenPrivateKeyRec {
+ DevPrivateKeyRec screenKey;
+} DevScreenPrivateKeyRec, *DevScreenPrivateKey;
+
/*
* Let drivers know how to initialize private keys
*/
@@ -100,17 +105,6 @@ dixPrivateKeyRegistered(DevPrivateKey key)
}
/*
- * Allocate a new private key.
- *
- * This manages the storage of the key object itself, freeing it when the
- * privates system is restarted at server reset time. All other keys
- * are expected to be statically allocated as the privates must be
- * reset after all objects have been freed
- */
-extern _X_EXPORT DevPrivateKey
-dixCreatePrivateKey(DevPrivateType type, unsigned size);
-
-/*
* Get the address of the private storage.
*
* For keys with pre-defined storage, this gets the base of that storage
@@ -180,6 +174,42 @@ dixLookupPrivateAddr(PrivatePtr *privates, const DevPrivateKey key)
return (pointer *)dixGetPrivateAddr(privates, key);
}
+extern _X_EXPORT Bool
+dixRegisterScreenPrivateKey(DevScreenPrivateKey key, ScreenPtr pScreen, DevPrivateType type, unsigned size);
+
+extern _X_EXPORT DevPrivateKey
+_dixGetScreenPrivateKey(const DevScreenPrivateKey key, ScreenPtr pScreen);
+
+static inline void *
+dixGetScreenPrivateAddr(PrivatePtr *privates, const DevScreenPrivateKey key, ScreenPtr pScreen)
+{
+ return dixGetPrivateAddr(privates, _dixGetScreenPrivateKey(key, pScreen));
+}
+
+static inline void *
+dixGetScreenPrivate(PrivatePtr *privates, const DevScreenPrivateKey key, ScreenPtr pScreen)
+{
+ return dixGetPrivate(privates, _dixGetScreenPrivateKey(key, pScreen));
+}
+
+static inline void
+dixSetScreenPrivate(PrivatePtr *privates, const DevScreenPrivateKey key, ScreenPtr pScreen, pointer val)
+{
+ dixSetPrivate(privates, _dixGetScreenPrivateKey(key, pScreen), val);
+}
+
+static inline pointer
+dixLookupScreenPrivate(PrivatePtr *privates, const DevScreenPrivateKey key, ScreenPtr pScreen)
+{
+ return dixLookupPrivate(privates, _dixGetScreenPrivateKey(key, pScreen));
+}
+
+static inline pointer *
+dixLookupScreenPrivateAddr(PrivatePtr *privates, const DevScreenPrivateKey key, ScreenPtr pScreen)
+{
+ return dixLookupPrivateAddr(privates, _dixGetScreenPrivateKey(key, pScreen));
+}
+
/*
* Allocates private data separately from main object.
*