diff options
author | marha <marha@users.sourceforge.net> | 2010-09-24 10:10:29 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2010-09-24 10:10:29 +0000 |
commit | 84b35d18d0b84909f7216fc6a7487ffa72bd3f18 (patch) | |
tree | a6a1cf67169f65d2b680c6d3f548d45901284aff /xorg-server/include/privates.h | |
parent | 6a14682c40a85bbfdb5023a3330e95a3a3c0ad03 (diff) | |
download | vcxsrv-84b35d18d0b84909f7216fc6a7487ffa72bd3f18.tar.gz vcxsrv-84b35d18d0b84909f7216fc6a7487ffa72bd3f18.tar.bz2 vcxsrv-84b35d18d0b84909f7216fc6a7487ffa72bd3f18.zip |
xserver xkbcomp libxcb pixman git update 24/9/2010
Diffstat (limited to 'xorg-server/include/privates.h')
-rw-r--r-- | xorg-server/include/privates.h | 51 |
1 files changed, 40 insertions, 11 deletions
diff --git a/xorg-server/include/privates.h b/xorg-server/include/privates.h index c2b7b43ec..6fb3184fe 100644 --- a/xorg-server/include/privates.h +++ b/xorg-server/include/privates.h @@ -65,6 +65,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 +104,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 +173,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)
+{
+ return 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.
*
|