aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/include
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-09-27 08:26:50 +0200
committermarha <marha@users.sourceforge.net>2011-09-27 08:26:50 +0200
commit183b7373f9919eeb5eb408f38578e01717b2cc10 (patch)
tree216dcb7e4efb0d67d019a4abe0e58cc6e1fa58b8 /xorg-server/include
parent873965b49f283ad028dd4e0e5b7e93a758c84993 (diff)
downloadvcxsrv-183b7373f9919eeb5eb408f38578e01717b2cc10.tar.gz
vcxsrv-183b7373f9919eeb5eb408f38578e01717b2cc10.tar.bz2
vcxsrv-183b7373f9919eeb5eb408f38578e01717b2cc10.zip
libX11 pixman mesa xserver git update 27 sep 2011
Diffstat (limited to 'xorg-server/include')
-rw-r--r--xorg-server/include/globals.h250
-rw-r--r--xorg-server/include/input.h17
-rw-r--r--xorg-server/include/inputstr.h12
-rw-r--r--xorg-server/include/inpututils.h1
-rw-r--r--xorg-server/include/list.h160
-rw-r--r--xorg-server/include/os.h13
-rw-r--r--xorg-server/include/xserver-properties.h3
7 files changed, 325 insertions, 131 deletions
diff --git a/xorg-server/include/globals.h b/xorg-server/include/globals.h
index e9a6028dd..17bca8208 100644
--- a/xorg-server/include/globals.h
+++ b/xorg-server/include/globals.h
@@ -1,125 +1,125 @@
-
-#ifndef _XSERV_GLOBAL_H_
-#define _XSERV_GLOBAL_H_
-
-#include "window.h" /* for WindowPtr */
-
-/* Global X server variables that are visible to mi, dix, os, and ddx */
-
-extern _X_EXPORT CARD32 defaultScreenSaverTime;
-extern _X_EXPORT CARD32 defaultScreenSaverInterval;
-extern _X_EXPORT CARD32 ScreenSaverTime;
-extern _X_EXPORT CARD32 ScreenSaverInterval;
-
-#ifdef SCREENSAVER
-extern _X_EXPORT Bool screenSaverSuspended;
-#endif
-
-extern _X_EXPORT char *defaultFontPath;
-extern _X_EXPORT int monitorResolution;
-extern _X_EXPORT int defaultColorVisualClass;
-
-extern _X_EXPORT int GrabInProgress;
-extern _X_EXPORT Bool noTestExtensions;
-
-extern _X_EXPORT char *ConnectionInfo;
-
-#ifdef DPMSExtension
-extern _X_EXPORT CARD32 DPMSStandbyTime;
-extern _X_EXPORT CARD32 DPMSSuspendTime;
-extern _X_EXPORT CARD32 DPMSOffTime;
-extern _X_EXPORT CARD16 DPMSPowerLevel;
-extern _X_EXPORT Bool DPMSEnabled;
-extern _X_EXPORT Bool DPMSDisabledSwitch;
-extern _X_EXPORT Bool DPMSCapableFlag;
-#endif
-
-#ifdef PANORAMIX
-extern _X_EXPORT Bool PanoramiXExtensionDisabledHack;
-#endif
-
-#ifdef COMPOSITE
-extern _X_EXPORT Bool noCompositeExtension;
-#endif
-
-#ifdef DAMAGE
-extern _X_EXPORT Bool noDamageExtension;
-#endif
-
-#ifdef DBE
-extern _X_EXPORT Bool noDbeExtension;
-#endif
-
-#ifdef DPMSExtension
-extern _X_EXPORT Bool noDPMSExtension;
-#endif
-
-#ifdef GLXEXT
-extern _X_EXPORT Bool noGlxExtension;
-#endif
-
-#ifdef SCREENSAVER
-extern _X_EXPORT Bool noScreenSaverExtension;
-#endif
-
-#ifdef MITSHM
-extern _X_EXPORT Bool noMITShmExtension;
-#endif
-
-#ifdef RANDR
-extern _X_EXPORT Bool noRRExtension;
-#endif
-
-extern _X_EXPORT Bool noRenderExtension;
-
-#ifdef XCSECURITY
-extern _X_EXPORT Bool noSecurityExtension;
-#endif
-
-#ifdef RES
-extern _X_EXPORT Bool noResExtension;
-#endif
-
-#ifdef XF86BIGFONT
-extern _X_EXPORT Bool noXFree86BigfontExtension;
-#endif
-
-#ifdef XFreeXDGA
-extern _X_EXPORT Bool noXFree86DGAExtension;
-#endif
-
-#ifdef XF86DRI
-extern _X_EXPORT Bool noXFree86DRIExtension;
-#endif
-
-#ifdef XF86VIDMODE
-extern _X_EXPORT Bool noXFree86VidModeExtension;
-#endif
-
-#ifdef XFIXES
-extern _X_EXPORT Bool noXFixesExtension;
-#endif
-
-#ifdef PANORAMIX
-extern _X_EXPORT Bool noPanoramiXExtension;
-#endif
-
-#ifdef XSELINUX
-extern _X_EXPORT Bool noSELinuxExtension;
-
-#define SELINUX_MODE_DEFAULT 0
-#define SELINUX_MODE_DISABLED 1
-#define SELINUX_MODE_PERMISSIVE 2
-#define SELINUX_MODE_ENFORCING 3
-extern _X_EXPORT int selinuxEnforcingState;
-#endif
-
-#ifdef XV
-extern _X_EXPORT Bool noXvExtension;
-#endif
-
-#ifdef DRI2
-extern _X_EXPORT Bool noDRI2Extension;
-#endif
-
-#endif /* !_XSERV_GLOBAL_H_ */
+
+#ifndef _XSERV_GLOBAL_H_
+#define _XSERV_GLOBAL_H_
+
+#include "window.h" /* for WindowPtr */
+
+/* Global X server variables that are visible to mi, dix, os, and ddx */
+
+extern _X_EXPORT CARD32 defaultScreenSaverTime;
+extern _X_EXPORT CARD32 defaultScreenSaverInterval;
+extern _X_EXPORT CARD32 ScreenSaverTime;
+extern _X_EXPORT CARD32 ScreenSaverInterval;
+
+#ifdef SCREENSAVER
+extern _X_EXPORT Bool screenSaverSuspended;
+#endif
+
+extern _X_EXPORT char *defaultFontPath;
+extern _X_EXPORT int monitorResolution;
+extern _X_EXPORT int defaultColorVisualClass;
+
+extern _X_EXPORT int GrabInProgress;
+extern _X_EXPORT Bool noTestExtensions;
+extern _X_EXPORT char *SeatId;
+extern _X_EXPORT char *ConnectionInfo;
+
+#ifdef DPMSExtension
+extern _X_EXPORT CARD32 DPMSStandbyTime;
+extern _X_EXPORT CARD32 DPMSSuspendTime;
+extern _X_EXPORT CARD32 DPMSOffTime;
+extern _X_EXPORT CARD16 DPMSPowerLevel;
+extern _X_EXPORT Bool DPMSEnabled;
+extern _X_EXPORT Bool DPMSDisabledSwitch;
+extern _X_EXPORT Bool DPMSCapableFlag;
+#endif
+
+#ifdef PANORAMIX
+extern _X_EXPORT Bool PanoramiXExtensionDisabledHack;
+#endif
+
+#ifdef COMPOSITE
+extern _X_EXPORT Bool noCompositeExtension;
+#endif
+
+#ifdef DAMAGE
+extern _X_EXPORT Bool noDamageExtension;
+#endif
+
+#ifdef DBE
+extern _X_EXPORT Bool noDbeExtension;
+#endif
+
+#ifdef DPMSExtension
+extern _X_EXPORT Bool noDPMSExtension;
+#endif
+
+#ifdef GLXEXT
+extern _X_EXPORT Bool noGlxExtension;
+#endif
+
+#ifdef SCREENSAVER
+extern _X_EXPORT Bool noScreenSaverExtension;
+#endif
+
+#ifdef MITSHM
+extern _X_EXPORT Bool noMITShmExtension;
+#endif
+
+#ifdef RANDR
+extern _X_EXPORT Bool noRRExtension;
+#endif
+
+extern _X_EXPORT Bool noRenderExtension;
+
+#ifdef XCSECURITY
+extern _X_EXPORT Bool noSecurityExtension;
+#endif
+
+#ifdef RES
+extern _X_EXPORT Bool noResExtension;
+#endif
+
+#ifdef XF86BIGFONT
+extern _X_EXPORT Bool noXFree86BigfontExtension;
+#endif
+
+#ifdef XFreeXDGA
+extern _X_EXPORT Bool noXFree86DGAExtension;
+#endif
+
+#ifdef XF86DRI
+extern _X_EXPORT Bool noXFree86DRIExtension;
+#endif
+
+#ifdef XF86VIDMODE
+extern _X_EXPORT Bool noXFree86VidModeExtension;
+#endif
+
+#ifdef XFIXES
+extern _X_EXPORT Bool noXFixesExtension;
+#endif
+
+#ifdef PANORAMIX
+extern _X_EXPORT Bool noPanoramiXExtension;
+#endif
+
+#ifdef XSELINUX
+extern _X_EXPORT Bool noSELinuxExtension;
+
+#define SELINUX_MODE_DEFAULT 0
+#define SELINUX_MODE_DISABLED 1
+#define SELINUX_MODE_PERMISSIVE 2
+#define SELINUX_MODE_ENFORCING 3
+extern _X_EXPORT int selinuxEnforcingState;
+#endif
+
+#ifdef XV
+extern _X_EXPORT Bool noXvExtension;
+#endif
+
+#ifdef DRI2
+extern _X_EXPORT Bool noDRI2Extension;
+#endif
+
+#endif /* !_XSERV_GLOBAL_H_ */
diff --git a/xorg-server/include/input.h b/xorg-server/include/input.h
index 5377a0c13..0258f4f18 100644
--- a/xorg-server/include/input.h
+++ b/xorg-server/include/input.h
@@ -56,6 +56,7 @@ SOFTWARE.
#include "window.h" /* for WindowPtr */
#include "xkbrules.h"
#include "events.h"
+#include "list.h"
#define DEVICE_INIT 0
#define DEVICE_ON 1
@@ -202,11 +203,7 @@ typedef struct {
extern _X_EXPORT KeybdCtrl defaultKeyboardControl;
extern _X_EXPORT PtrCtrl defaultPointerControl;
-typedef struct _InputOption {
- char *key;
- char *value;
- struct _InputOption *next;
-} InputOption;
+typedef struct _InputOption InputOption;
typedef struct _InputAttributes {
char *product;
@@ -595,4 +592,14 @@ extern _X_EXPORT void valuator_mask_copy(ValuatorMask *dest,
const ValuatorMask *src);
extern _X_EXPORT int valuator_mask_get(const ValuatorMask *mask, int valnum);
+/* InputOption handling interface */
+extern _X_EXPORT InputOption* input_option_new(InputOption *list, const char *key, const char *value);
+extern _X_EXPORT void input_option_free_list(InputOption **opt);
+extern _X_EXPORT InputOption* input_option_free_element(InputOption *opt, const char *key);
+extern _X_EXPORT InputOption* input_option_find(InputOption *list, const char *key);
+extern _X_EXPORT const char* input_option_get_key(const InputOption *opt);
+extern _X_EXPORT const char* input_option_get_value(const InputOption *opt);
+extern _X_EXPORT void input_option_set_key(InputOption *opt, const char* key);
+extern _X_EXPORT void input_option_set_value(InputOption *opt, const char* value);
+
#endif /* INPUT_H */
diff --git a/xorg-server/include/inputstr.h b/xorg-server/include/inputstr.h
index 00f72c260..480e95671 100644
--- a/xorg-server/include/inputstr.h
+++ b/xorg-server/include/inputstr.h
@@ -472,7 +472,10 @@ typedef struct _SpriteInfoRec {
#define MASTER_POINTER 1
#define MASTER_KEYBOARD 2
#define SLAVE 3
-#define MASTER_ATTACHED 4 /* special type for GetMaster */
+/* special types for GetMaster */
+#define MASTER_ATTACHED 4 /* Master for this device */
+#define KEYBOARD_OR_FLOAT 5 /* Keyboard master for this device or this device if floating */
+#define POINTER_OR_FLOAT 6 /* Pointer master for this device or this device if floating */
typedef struct _DeviceIntRec {
DeviceRec public;
@@ -599,4 +602,11 @@ static inline WindowPtr DeepestSpriteWin(SpritePtr sprite)
return sprite->spriteTrace[sprite->spriteTraceGood - 1];
}
+struct _InputOption {
+ char *key;
+ char *value;
+ struct _InputOption *next;
+};
+
+
#endif /* INPUTSTRUCT_H */
diff --git a/xorg-server/include/inpututils.h b/xorg-server/include/inpututils.h
index 92a754327..63e1a263a 100644
--- a/xorg-server/include/inpututils.h
+++ b/xorg-server/include/inpututils.h
@@ -38,5 +38,6 @@ struct _ValuatorMask {
};
extern void verify_internal_event(const InternalEvent *ev);
+extern void init_device_event(DeviceEvent *event, DeviceIntPtr dev, Time ms);
#endif
diff --git a/xorg-server/include/list.h b/xorg-server/include/list.h
index 5933b973d..7825dce52 100644
--- a/xorg-server/include/list.h
+++ b/xorg-server/include/list.h
@@ -278,4 +278,164 @@ list_is_empty(struct list *head)
&pos->member != (head); \
pos = tmp, tmp = __container_of(pos->member.next, tmp, member))
+
+
+/* NULL-Terminated List Interface
+ *
+ * The interface below does _not_ use the struct list as described above.
+ * It is mainly for legacy structures that cannot easily be switched to
+ * struct list.
+ *
+ * This interface is for structs like
+ * struct foo {
+ * [...]
+ * struct foo *next;
+ * [...]
+ * };
+ *
+ * The position and field name of "next" are arbitrary.
+ */
+
+/**
+ * Init the element as null-terminated list.
+ *
+ * Example:
+ * struct foo *list = malloc();
+ * nt_list_init(list, next);
+ *
+ * @param list The list element that will be the start of the list
+ * @param member Member name of the field pointing to next struct
+ */
+#define nt_list_init(_list, _member) \
+ (_list)->_member = NULL
+
+/**
+ * Returns the next element in the list or NULL on termination.
+ *
+ * Example:
+ * struct foo *element = list;
+ * while ((element = nt_list_next(element, next)) { }
+ *
+ * This macro is not safe for node deletion. Use list_for_each_entry_safe
+ * instead.
+ *
+ * @param list The list or current element.
+ * @param member Member name of the field pointing to next struct.
+ */
+#define nt_list_next(_list, _member) \
+ (_list)->_member
+
+/**
+ * Iterate through each element in the list.
+ *
+ * Example:
+ * struct foo *iterator;
+ * nt_list_for_each_entry(iterator, list, next) {
+ * [modify iterator]
+ * }
+ *
+ * @param entry Assigned to the current list element
+ * @param list The list to iterate through.
+ * @param member Member name of the field pointing to next struct.
+ */
+#define nt_list_for_each_entry(_entry, _list, _member) \
+ for (_entry = _list; _entry; _entry = (_entry)->_member)
+
+/**
+ * Iterate through each element in the list, keeping a backup pointer to the
+ * element. This macro allows for the deletion of a list element while
+ * looping through the list.
+ *
+ * See nt_list_for_each_entry for more details.
+ *
+ * @param entry Assigned to the current list element
+ * @param tmp The pointer to the next element
+ * @param list The list to iterate through.
+ * @param member Member name of the field pointing to next struct.
+ */
+#define nt_list_for_each_entry_safe(_entry, _tmp, _list, _member) \
+ for (_entry = _list, _tmp = (_entry) ? (_entry)->_member : NULL;\
+ _entry; \
+ _entry = _tmp, _tmp = (_tmp) ? (_tmp)->_member: NULL)
+
+
+/**
+ * Append the element to the end of the list. This macro may be used to
+ * merge two lists.
+ *
+ * Example:
+ * struct foo *elem = malloc(...);
+ * nt_list_init(elem, next)
+ * nt_list_append(elem, list, struct foo, next);
+ *
+ * Resulting list order:
+ * list_item_0 -> list_item_1 -> ... -> elem_item_0 -> elem_item_1 ...
+ *
+ * @param entry An entry (or list) to append to the list
+ * @param list The list to append to. This list must be a valid list, not
+ * NULL.
+ * @param type The list type
+ * @param member Member name of the field pointing to next struct
+ */
+#define nt_list_append(_entry, _list, _type, _member) \
+ do { \
+ _type *__iterator = _list; \
+ while (__iterator->_member) { __iterator = __iterator->_member;}\
+ __iterator->_member = _entry; \
+ } while (0)
+
+/**
+ * Insert the element at the next position in the list. This macro may be
+ * used to insert a list into a list.
+ *
+ * struct foo *elem = malloc(...);
+ * nt_list_init(elem, next)
+ * nt_list_insert(elem, list, struct foo, next);
+ *
+ * Resulting list order:
+ * list_item_0 -> elem_item_0 -> elem_item_1 ... -> list_item_1 -> ...
+ *
+ * @param entry An entry (or list) to append to the list
+ * @param list The list to insert to. This list must be a valid list, not
+ * NULL.
+ * @param type The list type
+ * @param member Member name of the field pointing to next struct
+ */
+#define nt_list_insert(_entry, _list, _type, _member) \
+ do { \
+ nt_list_append((_list)->_member, _entry, _type, _member); \
+ (_list)->_member = _entry; \
+ } while (0)
+
+/**
+ * Delete the entry from the list by iterating through the list and
+ * removing any reference from the list to the entry.
+ *
+ * Example:
+ * struct foo *elem = <assign to right element>
+ * nt_list_del(elem, list, struct foo, next);
+ *
+ * @param entry The entry to delete from the list. entry is always
+ * re-initialized as a null-terminated list.
+ * @param list The list containing the entry, set to the new list without
+ * the removed entry.
+ * @param type The list type
+ * @param member Member name of the field pointing to the next entry
+ */
+#define nt_list_del(_entry, _list, _type, _member) \
+ do { \
+ _type *__e = _entry; \
+ if (__e == NULL) break; \
+ if ((_list) == __e) { \
+ _list = __e->_member; \
+ } else { \
+ _type *__prev = _list; \
+ while (__prev->_member && __prev->_member != __e) \
+ __prev = nt_list_next(__prev, _member); \
+ if (__prev->_member) \
+ __prev->_member = __e->_member; \
+ } \
+ nt_list_init(__e, _member); \
+ } while(0)
+
#endif
diff --git a/xorg-server/include/os.h b/xorg-server/include/os.h
index a553f5783..5401ea478 100644
--- a/xorg-server/include/os.h
+++ b/xorg-server/include/os.h
@@ -525,6 +525,19 @@ extern _X_EXPORT void LogMessageVerb(MessageType type, int verb, const char *for
...) _X_ATTRIBUTE_PRINTF(3,4);
extern _X_EXPORT void LogMessage(MessageType type, const char *format, ...)
_X_ATTRIBUTE_PRINTF(2,3);
+
+extern _X_EXPORT void LogVHdrMessageVerb(MessageType type, int verb,
+ const char *msg_format, va_list msg_args,
+ const char *hdr_format, va_list hdr_args)
+ _X_ATTRIBUTE_PRINTF(3,0) _X_ATTRIBUTE_PRINTF(5,0);
+extern _X_EXPORT void LogHdrMessageVerb(MessageType type, int verb,
+ const char *msg_format, va_list msg_args,
+ const char *hdr_format, ...)
+ _X_ATTRIBUTE_PRINTF(3,0) _X_ATTRIBUTE_PRINTF(5,6);
+extern _X_EXPORT void LogHdrMessage(MessageType type, const char *msg_format,
+ va_list msg_args, const char *hdr_format, ...)
+ _X_ATTRIBUTE_PRINTF(2,0) _X_ATTRIBUTE_PRINTF(4,5);
+
extern _X_EXPORT void FreeAuditTimer(void);
extern _X_EXPORT void AuditF(const char *f, ...) _X_ATTRIBUTE_PRINTF(1,2);
extern _X_EXPORT void VAuditF(const char *f, va_list args) _X_ATTRIBUTE_PRINTF(1,0);
diff --git a/xorg-server/include/xserver-properties.h b/xorg-server/include/xserver-properties.h
index 2b1feabb6..bf50042d0 100644
--- a/xorg-server/include/xserver-properties.h
+++ b/xorg-server/include/xserver-properties.h
@@ -30,6 +30,9 @@
* byte-ordering. */
#define XATOM_FLOAT "FLOAT"
+/* STRING. Seat name of this display */
+#define SEAT_ATOM_NAME "Xorg_Seat"
+
/* BOOL. 0 - device disabled, 1 - device enabled */
#define XI_PROP_ENABLED "Device Enabled"
/* BOOL. If present, device is a virtual XTEST device */