aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/lib/X11/Xlib.h
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-10-12 08:32:04 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-10-12 08:32:04 +0200
commit051d521f6e20761ba6831cecd91883da960fa931 (patch)
treeb28abba7818115d2fed80eb360a79a0f9183948e /nx-X11/lib/X11/Xlib.h
parent6dce607bad8711dd06a5a7b69ad1930386b4123b (diff)
parentb8de7bf654929c823080b211aeac56cd213f5a32 (diff)
downloadnx-libs-051d521f6e20761ba6831cecd91883da960fa931.tar.gz
nx-libs-051d521f6e20761ba6831cecd91883da960fa931.tar.bz2
nx-libs-051d521f6e20761ba6831cecd91883da960fa931.zip
Merge branch 'uli42-pr/upgrade_libX11' into 3.6.x
Attributes GH PR #214: https://github.com/ArcticaProject/nx-libs/pull/214 Fixes ArcticaProject/nx-libs#157.
Diffstat (limited to 'nx-X11/lib/X11/Xlib.h')
-rw-r--r--nx-X11/lib/X11/Xlib.h155
1 files changed, 86 insertions, 69 deletions
diff --git a/nx-X11/lib/X11/Xlib.h b/nx-X11/lib/X11/Xlib.h
index a7ca57796..e537c7522 100644
--- a/nx-X11/lib/X11/Xlib.h
+++ b/nx-X11/lib/X11/Xlib.h
@@ -1,4 +1,4 @@
-/*
+/*
Copyright 1985, 1986, 1987, 1991, 1998 The Open Group
@@ -30,27 +30,13 @@ in this Software without prior written authorization from The Open Group.
* interface library (Xlib) to the X Window System Protocol (V11).
* Structures and symbols starting with "_" are private to the library.
*/
-
-#if !defined(_XLIB_H_) && !defined(_X11_XLIB_H_)
-#define _XLIB_H_
+#if !defined(_X11_XLIB_H_) && !defined(_XLIB_H_)
#define _X11_XLIB_H_
+#define _XLIB_H_
#define XlibSpecificationRelease 6
-#ifdef USG
-#ifndef __TYPES__
-#include <sys/types.h> /* forgot to protect it... */
-#define __TYPES__
-#endif /* __TYPES__ */
-#else
-#if defined(_POSIX_SOURCE) && defined(MOTOROLA)
-#undef _POSIX_SOURCE
#include <sys/types.h>
-#define _POSIX_SOURCE
-#else
-#include <sys/types.h>
-#endif
-#endif /* USG */
#if defined(__SCO__) || defined(__UNIXWARE__)
#include <stdint.h>
@@ -63,14 +49,6 @@ in this Software without prior written authorization from The Open Group.
#include <nx-X11/Xosdefs.h>
#ifndef X_WCHAR
-#ifdef X_NOT_STDC_ENV
-#ifndef ISC
-#define X_WCHAR
-#endif
-#endif
-#endif
-
-#ifndef X_WCHAR
#include <stddef.h>
#else
#ifdef __UNIXOS2__
@@ -83,7 +61,7 @@ typedef unsigned long wchar_t;
#if defined(ISC) && defined(USE_XMBTOWC)
#define wctomb(a,b) _Xwctomb(a,b)
-#define mblen(a,b) _Xmblen(a,b)
+#define mblen(a,b) _Xmblen(a,b)
#ifndef USE_XWCHAR_STRING
#define mbtowc(a,b,c) _Xmbtowc(a,b,c)
#endif
@@ -212,10 +190,10 @@ typedef struct {
unsigned long background;/* background pixel */
int line_width; /* line width */
int line_style; /* LineSolid, LineOnOffDash, LineDoubleDash */
- int cap_style; /* CapNotLast, CapButt,
+ int cap_style; /* CapNotLast, CapButt,
CapRound, CapProjecting */
int join_style; /* JoinMiter, JoinRound, JoinBevel */
- int fill_style; /* FillSolid, FillTiled,
+ int fill_style; /* FillSolid, FillTiled,
FillStippled, FillOpaeueStippled */
int fill_rule; /* EvenOddRule, WindingRule */
int arc_mode; /* ArcChord, ArcPieSlice */
@@ -266,7 +244,7 @@ typedef struct {
/*
* Depth structure; contains information for each possible depth.
- */
+ */
typedef struct {
int depth; /* this depth (Z) of the depth */
int nvisuals; /* number of Visual types at this depth */
@@ -297,7 +275,7 @@ typedef struct {
unsigned long black_pixel; /* White and Black pixel values */
int max_maps, min_maps; /* max and min color maps */
int backing_store; /* Never, WhenMapped, Always */
- Bool save_unders;
+ Bool save_unders;
long root_input_mask; /* initial root input mask */
} Screen;
@@ -420,7 +398,7 @@ typedef struct _XImage {
} f;
} XImage;
-/*
+/*
* Data structure for XReconfigureWindow
*/
typedef struct {
@@ -441,7 +419,7 @@ typedef struct {
char pad;
} XColor;
-/*
+/*
* Data structures for graphics operations. On most machines, these are
* congruent with the wire protocol structures, so reformatting the data
* can be avoided on these architectures.
@@ -453,12 +431,12 @@ typedef struct {
typedef struct {
short x, y;
} XPoint;
-
+
typedef struct {
short x, y;
unsigned short width, height;
} XRectangle;
-
+
typedef struct {
short x, y;
unsigned short width, height;
@@ -517,7 +495,7 @@ typedef struct _XDisplay Display;
struct _XPrivate; /* Forward declare before use for C++ */
struct _XrmHashBucketRec;
-typedef struct
+typedef struct
#ifdef XLIB_ILLEGAL_ACCESS
_XDisplay
#endif
@@ -572,7 +550,7 @@ _XDisplay
/* there is more to this structure, but it is private to Xlib */
}
#ifdef XLIB_ILLEGAL_ACCESS
-Display,
+Display,
#endif
*_XPrivDisplay;
@@ -648,7 +626,7 @@ typedef struct {
int mode; /* NotifyNormal, NotifyGrab, NotifyUngrab */
int detail;
/*
- * NotifyAncestor, NotifyVirtual, NotifyInferior,
+ * NotifyAncestor, NotifyVirtual, NotifyInferior,
* NotifyNonlinear,NotifyNonlinearVirtual
*/
Bool same_screen; /* same screen flag */
@@ -668,9 +646,9 @@ typedef struct {
NotifyGrab, NotifyUngrab */
int detail;
/*
- * NotifyAncestor, NotifyVirtual, NotifyInferior,
+ * NotifyAncestor, NotifyVirtual, NotifyInferior,
* NotifyNonlinear,NotifyNonlinearVirtual, NotifyPointer,
- * NotifyPointerRoot, NotifyDetailNone
+ * NotifyPointerRoot, NotifyDetailNone
*/
} XFocusChangeEvent;
typedef XFocusChangeEvent XFocusInEvent;
@@ -684,7 +662,7 @@ typedef struct {
Display *display; /* Display the event was read from */
Window window;
char key_vector[32];
-} XKeymapEvent;
+} XKeymapEvent;
typedef struct {
int type;
@@ -966,6 +944,33 @@ typedef struct {
Window window; /* window on which event was requested in event mask */
} XAnyEvent;
+
+/***************************************************************
+ *
+ * GenericEvent. This event is the standard event for all newer extensions.
+ */
+
+typedef struct
+ {
+ int type; /* of event. Always GenericEvent */
+ unsigned long serial; /* # of last request processed */
+ Bool send_event; /* true if from SendEvent request */
+ Display *display; /* Display the event was read from */
+ int extension; /* major opcode of extension that caused the event */
+ int evtype; /* actual event type. */
+ } XGenericEvent;
+
+typedef struct {
+ int type; /* of event. Always GenericEvent */
+ unsigned long serial; /* # of last request processed */
+ Bool send_event; /* true if from SendEvent request */
+ Display *display; /* Display the event was read from */
+ int extension; /* major opcode of extension that caused the event */
+ int evtype; /* actual event type. */
+ unsigned int cookie;
+ void *data;
+} XGenericEventCookie;
+
/*
* this union is defined so Xlib can always use the same sized
* event structure internally, to avoid memory fragmentation.
@@ -1003,6 +1008,8 @@ typedef union _XEvent {
XMappingEvent xmapping;
XErrorEvent xerror;
XKeymapEvent xkeymap;
+ XGenericEvent xgeneric;
+ XGenericEventCookie xcookie;
long pad[24];
} XEvent;
#endif
@@ -1243,7 +1250,7 @@ typedef struct {
typedef unsigned long XIMFeedback;
#define XIMReverse 1L
-#define XIMUnderline (1L<<1)
+#define XIMUnderline (1L<<1)
#define XIMHighlight (1L<<2)
#define XIMPrimary (1L<<5)
#define XIMSecondary (1L<<6)
@@ -1255,11 +1262,11 @@ typedef unsigned long XIMFeedback;
typedef struct _XIMText {
unsigned short length;
XIMFeedback *feedback;
- Bool encoding_is_wchar;
+ Bool encoding_is_wchar;
union {
char *multi_byte;
wchar_t *wide_char;
- } string;
+ } string;
} XIMText;
typedef unsigned long XIMPreeditState;
@@ -1289,11 +1296,11 @@ typedef unsigned long XIMStringConversionFeedback;
typedef struct _XIMStringConversionText {
unsigned short length;
XIMStringConversionFeedback *feedback;
- Bool encoding_is_wchar;
+ Bool encoding_is_wchar;
union {
char *mbs;
wchar_t *wcs;
- } string;
+ } string;
} XIMStringConversionText;
typedef unsigned short XIMStringConversionPosition;
@@ -1315,7 +1322,7 @@ typedef enum {
XIMForwardWord, XIMBackwardWord,
XIMCaretUp, XIMCaretDown,
XIMNextLine, XIMPreviousLine,
- XIMLineStart, XIMLineEnd,
+ XIMLineStart, XIMLineEnd,
XIMAbsolutePosition,
XIMDontChange
} XIMCaretDirection;
@@ -1336,7 +1343,7 @@ typedef struct _XIMPreeditDrawCallbackStruct {
} XIMPreeditDrawCallbackStruct;
typedef enum {
- XIMIsInvisible, /* Disable caret feedback */
+ XIMIsInvisible, /* Disable caret feedback */
XIMIsPrimary, /* UI defined caret feedback */
XIMIsSecondary /* UI defined caret feedback */
} XIMCaretStyle;
@@ -1351,7 +1358,7 @@ typedef enum {
XIMTextType,
XIMBitmapType
} XIMStatusDataType;
-
+
typedef struct _XIMStatusDrawCallbackStruct {
XIMStatusDataType type;
union {
@@ -1429,7 +1436,7 @@ extern XModifierKeymap *XInsertModifiermapEntry(
#else
KeyCode /* keycode_entry */,
#endif
- int /* modifier */
+ int /* modifier */
);
extern XModifierKeymap *XNewModifiermap(
@@ -1475,7 +1482,7 @@ extern XImage *XGetSubImage(
int /* dest_y */
);
-/*
+/*
* X function declarations.
*/
extern Display *XOpenDisplay(
@@ -1508,7 +1515,7 @@ extern Status XGetAtomNames(
extern char *XGetDefault(
Display* /* display */,
_Xconst char* /* program */,
- _Xconst char* /* option */
+ _Xconst char* /* option */
);
extern char *XDisplayName(
_Xconst char* /* string */
@@ -1534,7 +1541,7 @@ extern int (*XSetAfterFunction(
extern Atom XInternAtom(
Display* /* display */,
_Xconst char* /* atom_name */,
- Bool /* only_if_exists */
+ Bool /* only_if_exists */
);
extern Status XInternAtoms(
Display* /* dpy */,
@@ -1551,7 +1558,7 @@ extern Colormap XCreateColormap(
Display* /* display */,
Window /* w */,
Visual* /* visual */,
- int /* alloc */
+ int /* alloc */
);
extern Cursor XCreatePixmapCursor(
Display* /* display */,
@@ -1560,7 +1567,7 @@ extern Cursor XCreatePixmapCursor(
XColor* /* foreground_color */,
XColor* /* background_color */,
unsigned int /* x */,
- unsigned int /* y */
+ unsigned int /* y */
);
extern Cursor XCreateGlyphCursor(
Display* /* display */,
@@ -1597,7 +1604,7 @@ extern Pixmap XCreatePixmap(
Drawable /* d */,
unsigned int /* width */,
unsigned int /* height */,
- unsigned int /* depth */
+ unsigned int /* depth */
);
extern Pixmap XCreateBitmapFromData(
Display* /* display */,
@@ -1644,7 +1651,7 @@ extern Window XCreateWindow(
Visual* /* visual */,
unsigned long /* valuemask */,
XSetWindowAttributes* /* attributes */
-);
+);
extern Colormap *XListInstalledColormaps(
Display* /* display */,
Window /* w */,
@@ -1939,7 +1946,7 @@ extern int XAddHost(
extern int XAddHosts(
Display* /* display */,
XHostAddress* /* hosts */,
- int /* num_hosts */
+ int /* num_hosts */
);
extern int XAddToExtensionList(
@@ -2183,7 +2190,7 @@ extern int XConfigureWindow(
Display* /* display */,
Window /* w */,
unsigned int /* value_mask */,
- XWindowChanges* /* values */
+ XWindowChanges* /* values */
);
extern int XConnectionNumber(
@@ -2269,7 +2276,7 @@ extern int XDestroySubwindows(
);
extern int XDoesBackingStore(
- Screen* /* screen */
+ Screen* /* screen */
);
extern Bool XDoesSaveUnders(
@@ -2554,7 +2561,7 @@ extern int XFreeCursor(
);
extern int XFreeExtensionList(
- char** /* list */
+ char** /* list */
);
extern int XFreeFont(
@@ -2928,7 +2935,7 @@ extern int XPutImage(
int /* dest_x */,
int /* dest_y */,
unsigned int /* width */,
- unsigned int /* height */
+ unsigned int /* height */
);
extern int XQLength(
@@ -3018,7 +3025,7 @@ extern int XQueryTextExtents(
int* /* direction_return */,
int* /* font_ascent_return */,
int* /* font_descent_return */,
- XCharStruct* /* overall_return */
+ XCharStruct* /* overall_return */
);
extern int XQueryTextExtents16(
@@ -3083,7 +3090,7 @@ extern int XRecolorCursor(
);
extern int XRefreshKeyboardMapping(
- XMappingEvent* /* event_map */
+ XMappingEvent* /* event_map */
);
extern int XRemoveFromSaveSet(
@@ -3239,7 +3246,7 @@ extern int XSetFont(
extern int XSetFontPath(
Display* /* display */,
char** /* directories */,
- int /* ndirs */
+ int /* ndirs */
);
extern int XSetForeground(
@@ -3538,7 +3545,7 @@ extern int XWarpPointer(
unsigned int /* src_width */,
unsigned int /* src_height */,
int /* dest_x */,
- int /* dest_y */
+ int /* dest_y */
);
extern int XWidthMMOfScreen(
@@ -3563,7 +3570,7 @@ extern int XWriteBitmapFile(
unsigned int /* width */,
unsigned int /* height */,
int /* x_hot */,
- int /* y_hot */
+ int /* y_hot */
);
extern Bool XSupportsLocale (void);
@@ -3971,7 +3978,7 @@ typedef void (*XConnectionWatchProc)(
Bool /* opening */, /* open or close flag */
XPointer* /* watch_data */ /* open sets, close uses */
);
-
+
extern Status XInternalConnectionNumbers(
Display* /* dpy */,
@@ -3998,7 +4005,7 @@ extern void XRemoveConnectionWatch(
extern void XSetAuthorization(
char * /* name */,
- int /* namelen */,
+ int /* namelen */,
char * /* data */,
int /* datalen */
);
@@ -4019,6 +4026,16 @@ extern int _Xwctomb(
wchar_t /* wc */
);
+extern Bool XGetEventData(
+ Display* /* dpy */,
+ XGenericEventCookie* /* cookie*/
+);
+
+extern void XFreeEventData(
+ Display* /* dpy */,
+ XGenericEventCookie* /* cookie*/
+);
+
_XFUNCPROTOEND
-#endif /* _XLIB_H_ */
+#endif /* #if !defined(_X11_XLIB_H_) && !defined(_XLIB_H_) */