summaryrefslogtreecommitdiff
path: root/include/X11
diff options
context:
space:
mode:
Diffstat (limited to 'include/X11')
-rw-r--r--include/X11/XKBlib.h9
-rw-r--r--include/X11/Xcms.h16
-rw-r--r--include/X11/Xlib.h249
-rw-r--r--include/X11/Xlibint.h346
-rw-r--r--include/X11/Xlocale.h11
-rw-r--r--include/X11/Xresource.h13
-rw-r--r--include/X11/Xutil.h90
7 files changed, 589 insertions, 145 deletions
diff --git a/include/X11/XKBlib.h b/include/X11/XKBlib.h
index 0369c8c..abeb92b 100644
--- a/include/X11/XKBlib.h
+++ b/include/X11/XKBlib.h
@@ -24,6 +24,7 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
+/* $XFree86: xc/lib/X11/XKBlib.h,v 3.3 2001/08/01 00:44:38 tsi Exp $ */
#ifndef _XKBLIB_H_
#define _XKBLIB_H_
@@ -1346,6 +1347,14 @@ extern Bool XkbSetDebuggingFlags(
#endif
);
+extern Bool XkbApplyVirtualModChanges(
+#if NeedFunctionPrototypes
+ XkbDescPtr /* xkb */,
+ unsigned int /* changed */,
+ XkbChangesPtr /* changes */
+#endif
+);
+
_XFUNCPROTOEND
#endif /* _XKBLIB_H_ */
diff --git a/include/X11/Xcms.h b/include/X11/Xcms.h
index d9e9c3b..4b71af4 100644
--- a/include/X11/Xcms.h
+++ b/include/X11/Xcms.h
@@ -27,6 +27,7 @@
* DESCRIPTION
* Public include file for X Color Management System
*/
+/* $XFree86: xc/lib/X11/Xcms.h,v 1.5 2001/01/17 19:41:49 dawes Exp $ */
#ifndef _XCMS_H_
#define _XCMS_H_
@@ -255,6 +256,21 @@ typedef void (*XcmsScreenFreeProc)(
* Function List Pointer -- pointer to an array of function pointers.
* The end of list is indicated by a NULL pointer.
*/
+/*
+ * XXX: The use of the XcmsConversionProc type is broken. The
+ * device-independent colour conversion code uses it as:
+
+typedef Status (*XcmsConversionProc)(XcmsCCC, XcmsColor *, XcmsColor *,
+ unsigned int);
+
+ * while the device-dependent code uses it as:
+
+typedef Status (*XcmsConversionProc)(XcmsCCC, XcmsColor *, unsigned int,
+ Bool *);
+
+ * Until this is reworked, it's probably best to leave it unprotoized.
+ * The code works regardless.
+ */
typedef Status (*XcmsConversionProc)();
typedef XcmsConversionProc *XcmsFuncListPtr;
diff --git a/include/X11/Xlib.h b/include/X11/Xlib.h
index 0cf9d86..7bd488c 100644
--- a/include/X11/Xlib.h
+++ b/include/X11/Xlib.h
@@ -24,6 +24,7 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
+/* $XFree86: xc/lib/X11/Xlib.h,v 3.23 2002/05/31 18:45:42 dawes Exp $ */
/*
@@ -59,16 +60,36 @@ in this Software without prior written authorization from The Open Group.
#ifndef X_WCHAR
#ifdef X_NOT_STDC_ENV
+#ifndef SCO324
+#ifndef ISC
#define X_WCHAR
#endif
#endif
+#endif
+#endif
#ifndef X_WCHAR
#include <stddef.h>
#else
+#ifdef __UNIXOS2__
+#include <stdlib.h>
+#else
/* replace this with #include or typedef appropriate for your system */
typedef unsigned long wchar_t;
#endif
+#endif
+
+#if defined(ISC) && defined(USE_XMBTOWC)
+#define wctomb(a,b) _Xwctomb(a,b)
+#define mblen(a,b) _Xmblen(a,b)
+#ifndef USE_XWCHAR_STRING
+#define mbtowc(a,b,c) _Xmbtowc(a,b,c)
+#endif
+#endif
+
+/* API mentioning "UTF8" or "utf8" is an XFree86 extension, introduced in
+ November 2000. Its presence is indicated through the following macro. */
+#define X_HAVE_UTF8_STRING 1
typedef char *XPointer;
@@ -145,7 +166,11 @@ typedef char *XPointer;
typedef struct _XExtData {
int number; /* number returned by XRegisterExtension */
struct _XExtData *next; /* next item on list of data for structure */
- int (*free_private)(); /* called to free private storage */
+ int (*free_private)( /* called to free private storage */
+#if NeedFunctionPrototypes
+ struct _XExtData *extension
+#endif
+ );
XPointer private_data; /* data private to this extension. */
} XExtData;
@@ -359,14 +384,25 @@ typedef struct _XImage {
unsigned long blue_mask;
XPointer obdata; /* hook for the object routines to hang on */
struct funcs { /* image manipulation routines */
- struct _XImage *(*create_image)();
#if NeedFunctionPrototypes
+ struct _XImage *(*create_image)(
+ struct _XDisplay* /* display */,
+ Visual* /* visual */,
+ unsigned int /* depth */,
+ int /* format */,
+ int /* offset */,
+ char* /* data */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ int /* bitmap_pad */,
+ int /* bytes_per_line */);
int (*destroy_image) (struct _XImage *);
unsigned long (*get_pixel) (struct _XImage *, int, int);
int (*put_pixel) (struct _XImage *, int, int, unsigned long);
struct _XImage *(*sub_image)(struct _XImage *, int, int, unsigned int, unsigned int);
int (*add_pixel) (struct _XImage *, long);
#else
+ struct _XImage *(*create_image)();
int (*destroy_image)();
unsigned long (*get_pixel)();
int (*put_pixel)();
@@ -489,7 +525,11 @@ _XDisplay
XID private4;
XID private5;
int private6;
- XID (*resource_alloc)();/* allocator function */
+ XID (*resource_alloc)( /* allocator function */
+#if NeedFunctionPrototypes
+ struct _XDisplay*
+#endif
+ );
int byte_order; /* screen byte order, LSBFirst, MSBFirst */
int bitmap_unit; /* padding and data requirements */
int bitmap_pad; /* padding requirements on bitmaps */
@@ -508,7 +548,11 @@ _XDisplay
XPointer private14;
unsigned max_request_size; /* maximum number 32 bit words in request*/
struct _XrmHashBucketRec *db;
- int (*private15)();
+ int (*private15)(
+#if NeedFunctionPrototypes
+ struct _XDisplay*
+#endif
+ );
char *display_name; /* "host:display" string used on this connect*/
int default_screen; /* default screen for operations */
int nscreens; /* number of screens on this server*/
@@ -541,7 +585,7 @@ typedef struct {
Bool send_event; /* true if this came from a SendEvent request */
Display *display; /* Display the event was read from */
Window window; /* "event" window it is reported relative to */
- Window root; /* root window that the event occured on */
+ Window root; /* root window that the event occurred on */
Window subwindow; /* child window */
Time time; /* milliseconds */
int x, y; /* pointer x, y coordinates in event window */
@@ -559,7 +603,7 @@ typedef struct {
Bool send_event; /* true if this came from a SendEvent request */
Display *display; /* Display the event was read from */
Window window; /* "event" window it is reported relative to */
- Window root; /* root window that the event occured on */
+ Window root; /* root window that the event occurred on */
Window subwindow; /* child window */
Time time; /* milliseconds */
int x, y; /* pointer x, y coordinates in event window */
@@ -577,7 +621,7 @@ typedef struct {
Bool send_event; /* true if this came from a SendEvent request */
Display *display; /* Display the event was read from */
Window window; /* "event" window reported relative to */
- Window root; /* root window that the event occured on */
+ Window root; /* root window that the event occurred on */
Window subwindow; /* child window */
Time time; /* milliseconds */
int x, y; /* pointer x, y coordinates in event window */
@@ -594,7 +638,7 @@ typedef struct {
Bool send_event; /* true if this came from a SendEvent request */
Display *display; /* Display the event was read from */
Window window; /* "event" window reported relative to */
- Window root; /* root window that the event occured on */
+ Window root; /* root window that the event occurred on */
Window subwindow; /* child window */
Time time; /* milliseconds */
int x, y; /* pointer x, y coordinates in event window */
@@ -1037,7 +1081,9 @@ typedef struct {
XRectangle max_logical_extent;
} XFontSetExtents;
+/* unused:
typedef void (*XOMProc)();
+ */
typedef struct _XOM *XOM;
typedef struct _XOC *XOC, *XFontSet;
@@ -1091,11 +1137,33 @@ typedef struct {
char **font_name_list;
} XOMFontInfo;
-typedef void (*XIMProc)();
-
typedef struct _XIM *XIM;
typedef struct _XIC *XIC;
+typedef void (*XIMProc)(
+#if NeedFunctionPrototypes
+ XIM,
+ XPointer,
+ XPointer
+#endif
+);
+
+typedef Bool (*XICProc)(
+#if NeedFunctionPrototypes
+ XIC,
+ XPointer,
+ XPointer
+#endif
+);
+
+typedef void (*XIDProc)(
+#if NeedFunctionPrototypes
+ Display*,
+ XPointer,
+ XPointer
+#endif
+);
+
typedef unsigned long XIMStyle;
typedef struct {
@@ -1174,6 +1242,11 @@ typedef struct {
XIMProc callback;
} XIMCallback;
+typedef struct {
+ XPointer client_data;
+ XICProc callback;
+} XICCallback;
+
typedef unsigned long XIMFeedback;
#define XIMReverse 1L
@@ -1496,7 +1569,11 @@ extern int (*XSynchronize(
Display* /* display */,
Bool /* onoff */
#endif
-))();
+))(
+#if NeedNestedPrototypes
+ Display* /* display */
+#endif
+);
extern int (*XSetAfterFunction(
#if NeedFunctionPrototypes
Display* /* display */,
@@ -1506,7 +1583,11 @@ extern int (*XSetAfterFunction(
#endif
) /* procedure */
#endif
-))();
+))(
+#if NeedNestedPrototypes
+ Display* /* display */
+#endif
+);
extern Atom XInternAtom(
#if NeedFunctionPrototypes
Display* /* display */,
@@ -1555,8 +1636,8 @@ extern Cursor XCreateGlyphCursor(
Font /* mask_font */,
unsigned int /* source_char */,
unsigned int /* mask_char */,
- XColor* /* foreground_color */,
- XColor* /* background_color */
+ XColor _Xconst * /* foreground_color */,
+ XColor _Xconst * /* background_color */
#endif
);
extern Cursor XCreateFontCursor(
@@ -4166,16 +4247,10 @@ extern int XWriteBitmapFile(
#endif
);
-extern Bool XSupportsLocale(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern Bool XSupportsLocale (void);
extern char *XSetLocaleModifiers(
-#if NeedFunctionPrototypes
- _Xconst char* /* modifier_list */
-#endif
+ const char* /* modifier_list */
);
extern XOM XOpenOM(
@@ -4329,6 +4404,14 @@ extern int XwcTextEscapement(
#endif
);
+extern int Xutf8TextEscapement(
+#if NeedFunctionPrototypes
+ XFontSet /* font_set */,
+ _Xconst char* /* text */,
+ int /* bytes_text */
+#endif
+);
+
extern int XmbTextExtents(
#if NeedFunctionPrototypes
XFontSet /* font_set */,
@@ -4349,6 +4432,16 @@ extern int XwcTextExtents(
#endif
);
+extern int Xutf8TextExtents(
+#if NeedFunctionPrototypes
+ XFontSet /* font_set */,
+ _Xconst char* /* text */,
+ int /* bytes_text */,
+ XRectangle* /* overall_ink_return */,
+ XRectangle* /* overall_logical_return */
+#endif
+);
+
extern Status XmbTextPerCharExtents(
#if NeedFunctionPrototypes
XFontSet /* font_set */,
@@ -4377,6 +4470,20 @@ extern Status XwcTextPerCharExtents(
#endif
);
+extern Status Xutf8TextPerCharExtents(
+#if NeedFunctionPrototypes
+ XFontSet /* font_set */,
+ _Xconst char* /* text */,
+ int /* bytes_text */,
+ XRectangle* /* ink_extents_buffer */,
+ XRectangle* /* logical_extents_buffer */,
+ int /* buffer_size */,
+ int* /* num_chars */,
+ XRectangle* /* overall_ink_return */,
+ XRectangle* /* overall_logical_return */
+#endif
+);
+
extern void XmbDrawText(
#if NeedFunctionPrototypes
Display* /* display */,
@@ -4401,6 +4508,18 @@ extern void XwcDrawText(
#endif
);
+extern void Xutf8DrawText(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ XmbTextItem* /* text_items */,
+ int /* nitems */
+#endif
+);
+
extern void XmbDrawString(
#if NeedFunctionPrototypes
Display* /* display */,
@@ -4427,6 +4546,19 @@ extern void XwcDrawString(
#endif
);
+extern void Xutf8DrawString(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Drawable /* d */,
+ XFontSet /* font_set */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ _Xconst char* /* text */,
+ int /* bytes_text */
+#endif
+);
+
extern void XmbDrawImageString(
#if NeedFunctionPrototypes
Display* /* display */,
@@ -4453,6 +4585,19 @@ extern void XwcDrawImageString(
#endif
);
+extern void Xutf8DrawImageString(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Drawable /* d */,
+ XFontSet /* font_set */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ _Xconst char* /* text */,
+ int /* bytes_text */
+#endif
+);
+
extern XIM XOpenIM(
#if NeedFunctionPrototypes
Display* /* dpy */,
@@ -4474,6 +4619,12 @@ extern char *XGetIMValues(
#endif
);
+extern char *XSetIMValues(
+#if NeedVarargsPrototypes
+ XIM /* im */, ...
+#endif
+);
+
extern Display *XDisplayOfIM(
#if NeedFunctionPrototypes
XIM /* im */
@@ -4522,6 +4673,12 @@ extern char *XmbResetIC(
#endif
);
+extern char *Xutf8ResetIC(
+#if NeedFunctionPrototypes
+ XIC /* ic */
+#endif
+);
+
extern char *XSetICValues(
#if NeedVarargsPrototypes
XIC /* ic */, ...
@@ -4569,6 +4726,17 @@ extern int XwcLookupString(
#endif
);
+extern int Xutf8LookupString(
+#if NeedFunctionPrototypes
+ XIC /* ic */,
+ XKeyPressedEvent* /* event */,
+ char* /* buffer_return */,
+ int /* bytes_buffer */,
+ KeySym* /* keysym_return */,
+ Status* /* status_return */
+#endif
+);
+
extern XVaNestedList XVaCreateNestedList(
#if NeedVarargsPrototypes
int /*unused*/, ...
@@ -4583,8 +4751,8 @@ extern Bool XRegisterIMInstantiateCallback(
struct _XrmHashBucketRec* /* rdb */,
char* /* res_name */,
char* /* res_class */,
- XIMProc /* callback */,
- XPointer* /* client_data */
+ XIDProc /* callback */,
+ XPointer /* client_data */
#endif
);
@@ -4594,8 +4762,8 @@ extern Bool XUnregisterIMInstantiateCallback(
struct _XrmHashBucketRec* /* rdb */,
char* /* res_name */,
char* /* res_class */,
- XIMProc /* callback */,
- XPointer* /* client_data */
+ XIDProc /* callback */,
+ XPointer /* client_data */
#endif
);
@@ -4641,6 +4809,35 @@ extern void XRemoveConnectionWatch(
#endif
);
+extern void XSetAuthorization(
+#if NeedFunctionPrototypes
+ char * /* name */,
+ int /* namelen */,
+ char * /* data */,
+ int /* datalen */
+#endif
+);
+
+extern int _Xmbtowc(
+#if NeedFunctionPrototypes
+ wchar_t * /* wstr */,
+#ifdef ISC
+ char const * /* str */,
+ size_t /* len */
+#else
+ char * /* str */,
+ int /* len */
+#endif
+#endif
+);
+
+extern int _Xwctomb(
+#if NeedFunctionPrototypes
+ char * /* str */,
+ wchar_t /* wc */
+#endif
+);
+
_XFUNCPROTOEND
#endif /* _XLIB_H_ */
diff --git a/include/X11/Xlibint.h b/include/X11/Xlibint.h
index 3f3826b..9fca144 100644
--- a/include/X11/Xlibint.h
+++ b/include/X11/Xlibint.h
@@ -27,6 +27,10 @@ other dealings in this Software without prior written authorization
from The Open Group.
*/
+/* $XFree86: xc/lib/X11/Xlibint.h,v 3.24 2002/05/31 18:45:42 dawes Exp $ */
+
+#ifndef _XLIBINT_H_
+#define _XLIBINT_H_ 1
/*
* Xlibint.h - Header definition and support file for the internal
@@ -36,10 +40,8 @@ from The Open Group.
* Warning, there be dragons here....
*/
-#ifndef _XLIBINT_H_
-#define _XLIBINT_H_
-
#include <X11/Xlib.h>
+#include <X11/Xproto.h> /* to declare xEvent */
#ifdef WIN32
#define _XFlush _XFlushIt
@@ -76,7 +78,11 @@ struct _XDisplay
XID resource_mask; /* resource ID mask bits */
XID resource_id; /* allocator current ID */
int resource_shift; /* allocator shift to correct bits */
- XID (*resource_alloc)(); /* allocator function */
+ XID (*resource_alloc)( /* allocator function */
+#if NeedFunctionPrototypes
+ struct _XDisplay*
+#endif
+ );
int byte_order; /* screen byte order, LSBFirst, MSBFirst */
int bitmap_unit; /* padding and data requirements */
int bitmap_pad; /* padding requirements on bitmaps */
@@ -95,7 +101,11 @@ struct _XDisplay
char *bufmax; /* Output buffer maximum+1 address. */
unsigned max_request_size; /* maximum number 32 bit words in request*/
struct _XrmHashBucketRec *db;
- int (*synchandler)(); /* Synchronization handler */
+ int (*synchandler)( /* Synchronization handler */
+#if NeedFunctionPrototypes
+ struct _XDisplay*
+#endif
+ );
char *display_name; /* "host:display" string used on this connect*/
int default_screen; /* default screen for operations */
int nscreens; /* number of screens on this server*/
@@ -120,14 +130,26 @@ struct _XDisplay
* list to find the right procedure for each event might be
* expensive if many extensions are being used.
*/
- Bool (*event_vec[128])(); /* vector for wire to event */
- Status (*wire_vec[128])(); /* vector for event to wire */
+ Bool (*event_vec[128])( /* vector for wire to event */
+ Display * /* dpy */,
+ XEvent * /* re */,
+ xEvent * /* event */
+ );
+ Status (*wire_vec[128])( /* vector for event to wire */
+ Display * /* dpy */,
+ XEvent * /* re */,
+ xEvent * /* event */
+ );
KeySym lock_meaning; /* for XLookupString */
struct _XLockInfo *lock; /* multi-thread state, display lock */
struct _XInternalAsync *async_handlers; /* for internal async */
unsigned long bigreq_size; /* max size of big requests */
struct _XLockPtrs *lock_fns; /* pointers to threads functions */
- void (*idlist_alloc)(); /* XID list allocator function */
+ void (*idlist_alloc)( /* XID list allocator function */
+ Display * /* dpy */,
+ XID * /* ids */,
+ int /* count */
+ );
/* things above this line should not move, for binary compatibility */
struct _XKeytrans *key_bindings; /* for XLookupString */
Font cursor_font; /* for XCreateFontCursor */
@@ -135,7 +157,11 @@ struct _XDisplay
unsigned int mode_switch; /* keyboard group modifiers */
unsigned int num_lock; /* keyboard numlock modifiers */
struct _XContextDB *context_db; /* context database */
- Bool (**error_vec)(); /* vector for wire to error */
+ Bool (**error_vec)( /* vector for wire to error */
+ Display * /* display */,
+ XErrorEvent * /* he */,
+ xError * /* we */
+ );
/*
* Xcms information
*/
@@ -154,7 +180,9 @@ struct _XDisplay
struct _XConnWatchInfo *conn_watchers; /* XAddConnectionWatch */
int watcher_count; /* number of conn_watchers */
XPointer filedes; /* struct pollfd cache for _XWaitForReadable */
- int (*savedsynchandler)(); /* user synchandler when Xlib usurps */
+ int (*savedsynchandler)( /* user synchandler when Xlib usurps */
+ Display * /* dpy */
+ );
XID resource_max; /* allocator max ID */
int xcmisc_opcode; /* major opcode for XC-MISC */
struct _XkbInfoRec *xkb_info; /* XKB info */
@@ -204,18 +232,12 @@ typedef struct _XSQEvent
#undef dirty
#endif
-#ifndef X_NOT_STDC_ENV
#include <stdlib.h>
#include <string.h>
-#else
-char *malloc(), *realloc(), *calloc();
-void exit();
-#ifdef SYSV
-#include <string.h>
-#else
-#include <strings.h>
-#endif
-#endif
+
+#include <X11/Xfuncproto.h>
+
+_XFUNCPROTOBEGIN
/*
* The following definitions can be used for locking requests in multi-threaded
@@ -227,16 +249,27 @@ void exit();
* declarations for C Threads locking
*/
-#include <X11/Xfuncproto.h>
+typedef struct _LockInfoRec *LockInfoPtr;
+/* interfaces for locking.c */
struct _XLockPtrs {
/* used by all, including extensions; do not move */
- void (*lock_display)();
- void (*unlock_display)();
+ void (*lock_display)(
+ Display *dpy
+#if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE)
+ , char *file
+ , int line
+#endif
+ );
+ void (*unlock_display)(
+ Display *dpy
+#if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE)
+ , char *file
+ , int line
+#endif
+ );
};
-typedef struct _LockInfoRec *LockInfoPtr;
-
#if defined(WIN32) && !defined(_XLIBINT_)
#define _XCreateMutex_fn (*_XCreateMutex_fn_p)
#define _XFreeMutex_fn (*_XFreeMutex_fn_p)
@@ -323,16 +356,11 @@ extern LockInfoPtr _Xglobal_lock;
#endif
-#ifndef NULL
-#define NULL 0
-#endif
+#include <stddef.h>
+
#define LOCKED 1
#define UNLOCKED 0
-#ifdef X_NOT_STDC_ENV
-extern int errno; /* Internal system error number. */
-#endif
-
#ifndef BUFSIZE
#define BUFSIZE 2048 /* X output buffer size. */
#endif
@@ -407,7 +435,7 @@ extern int errno; /* Internal system error number. */
*
*/
-#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP)
+#if !defined(UNIXCPP) || defined(ANSICPP)
#define GetReq(name, req) \
WORD64ALIGN\
if ((dpy->bufptr + SIZEOF(x##name##Req)) > dpy->bufmax)\
@@ -433,7 +461,7 @@ extern int errno; /* Internal system error number. */
/* GetReqExtra is the same as GetReq, but allocates "n" additional
bytes after the request. "n" must be a multiple of 4! */
-#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP)
+#if !defined(UNIXCPP) || defined(ANSICPP)
#define GetReqExtra(name, n, req) \
WORD64ALIGN\
if ((dpy->bufptr + SIZEOF(x##name##Req) + n) > dpy->bufmax)\
@@ -462,7 +490,7 @@ extern int errno; /* Internal system error number. */
* "rid" is the name of the resource.
*/
-#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP)
+#if !defined(UNIXCPP) || defined(ANSICPP)
#define GetResReq(name, rid, req) \
WORD64ALIGN\
if ((dpy->bufptr + SIZEOF(xResourceReq)) > dpy->bufmax)\
@@ -490,7 +518,7 @@ extern int errno; /* Internal system error number. */
* GetEmptyReq is for those requests that have no arguments
* at all.
*/
-#if (defined(__STDC__) && !defined(UNIXCPP)) || defined(ANSICPP)
+#if !defined(UNIXCPP) || defined(ANSICPP)
#define GetEmptyReq(name, req) \
WORD64ALIGN\
if ((dpy->bufptr + SIZEOF(xReq)) > dpy->bufmax)\
@@ -563,7 +591,7 @@ extern int errno; /* Internal system error number. */
#define SyncHandle() \
if (dpy->synchandler) (*dpy->synchandler)(dpy)
-extern void _XFlushGCCache();
+extern void _XFlushGCCache(Display *dpy, GC gc);
#define FlushGC(dpy, gc) \
if ((gc)->dirty) _XFlushGCCache((dpy), (gc))
/*
@@ -575,12 +603,13 @@ extern void _XFlushGCCache();
* "len" is the length of the data buffer.
*/
#ifndef DataRoutineIsProcedure
-#define Data(dpy, data, len) \
+#define Data(dpy, data, len) {\
if (dpy->bufptr + (len) <= dpy->bufmax) {\
memcpy(dpy->bufptr, data, (int)len);\
dpy->bufptr += ((len) + 3) & ~3;\
} else\
- _XSend(dpy, data, len)
+ _XSend(dpy, data, len);\
+ }
#endif /* DataRoutineIsProcedure */
@@ -613,6 +642,20 @@ extern void _XFlushGCCache();
#define _XRead16(dpy, data, len) _XRead((dpy), (char *)(data), (len))
#ifdef LONG64
#define Data32(dpy, data, len) _XData32(dpy, (long *)data, len)
+extern int _XData32(
+#if NeedFunctionPrototypes
+ Display *dpy,
+ register long *data,
+ unsigned len
+#endif
+);
+extern void _XRead32(
+#if NeedFunctionPrototypes
+ Display *dpy,
+ register long *data,
+ long len
+#endif
+);
#else
#define Data32(dpy, data, len) Data((dpy), (char *)(data), (len))
#define _XRead32(dpy, data, len) _XRead((dpy), (char *)(data), (len))
@@ -733,7 +776,7 @@ typedef struct _XAsyncEState {
int error_count;
} _XAsyncErrorState;
-extern void _XDeqAsyncHandler();
+extern void _XDeqAsyncHandler(Display *dpy, _XAsyncHandler *handler);
#define DeqAsyncHandler(dpy,handler) { \
if (dpy->async_handlers == (handler)) \
dpy->async_handlers = (handler)->next; \
@@ -741,48 +784,150 @@ extern void _XDeqAsyncHandler();
_XDeqAsyncHandler(dpy, handler); \
}
+typedef void (*FreeFuncType) (
+#if NeedFunctionPrototypes
+ Display* /* display */
+#endif
+);
+
+typedef int (*FreeModmapType) (
+#if NeedFunctionPrototypes
+ XModifierKeymap* /* modmap */
+#endif
+);
+
/*
* This structure is private to the library.
*/
typedef struct _XFreeFuncs {
- void (*atoms)(); /* _XFreeAtomTable */
- int (*modifiermap)(); /* XFreeModifierMap */
- void (*key_bindings)(); /* _XFreeKeyBindings */
- void (*context_db)(); /* _XFreeContextDB */
- void (*defaultCCCs)(); /* _XcmsFreeDefaultCCCs */
- void (*clientCmaps)(); /* _XcmsFreeClientCmaps */
- void (*intensityMaps)(); /* _XcmsFreeIntensityMaps */
- void (*im_filters)(); /* _XFreeIMFilters */
- void (*xkb)(); /* _XkbFreeInfo */
+ FreeFuncType atoms; /* _XFreeAtomTable */
+ FreeModmapType modifiermap; /* XFreeModifierMap */
+ FreeFuncType key_bindings; /* _XFreeKeyBindings */
+ FreeFuncType context_db; /* _XFreeContextDB */
+ FreeFuncType defaultCCCs; /* _XcmsFreeDefaultCCCs */
+ FreeFuncType clientCmaps; /* _XcmsFreeClientCmaps */
+ FreeFuncType intensityMaps; /* _XcmsFreeIntensityMaps */
+ FreeFuncType im_filters; /* _XFreeIMFilters */
+ FreeFuncType xkb; /* _XkbFreeInfo */
} _XFreeFuncRec;
+/* types for InitExt.c */
+typedef int (*CreateGCType) (
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ GC /* gc */,
+ XExtCodes* /* codes */
+#endif
+);
+
+typedef int (*CopyGCType)(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ GC /* gc */,
+ XExtCodes* /* codes */
+#endif
+);
+
+typedef int (*FlushGCType) (
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ GC /* gc */,
+ XExtCodes* /* codes */
+#endif
+);
+
+typedef int (*FreeGCType) (
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ GC /* gc */,
+ XExtCodes* /* codes */
+#endif
+);
+
+typedef int (*CreateFontType) (
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ XFontStruct* /* fs */,
+ XExtCodes* /* codes */
+#endif
+);
+
+typedef int (*FreeFontType) (
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ XFontStruct* /* fs */,
+ XExtCodes* /* codes */
+#endif
+);
+
+typedef int (*CloseDisplayType) (
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ XExtCodes* /* codes */
+#endif
+);
+
+typedef int (*ErrorType) (
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ xError* /* err */,
+ XExtCodes* /* codes */,
+ int* /* ret_code */
+#endif
+);
+
+typedef char* (*ErrorStringType) (
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ int /* code */,
+ XExtCodes* /* codes */,
+ char* /* buffer */,
+ int /* nbytes */
+#endif
+);
+
+typedef void (*PrintErrorType)(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ XErrorEvent* /* ev */,
+ void* /* fp */
+#endif
+);
+
+typedef void (*BeforeFlushType)(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ XExtCodes* /* codes */,
+ _Xconst char* /* data */,
+ long /* len */
+#endif
+);
+
/*
* This structure is private to the library.
*/
-typedef struct _XExten { /* private to extension mechanism */
- struct _XExten *next; /* next in list */
- XExtCodes codes; /* public information, all extension told */
- int (*create_GC)(); /* routine to call when GC created */
- int (*copy_GC)(); /* routine to call when GC copied */
- int (*flush_GC)(); /* routine to call when GC flushed */
- int (*free_GC)(); /* routine to call when GC freed */
- int (*create_Font)(); /* routine to call when Font created */
- int (*free_Font)(); /* routine to call when Font freed */
- int (*close_display)(); /* routine to call when connection closed */
- int (*error)(); /* who to call when an error occurs */
- char *(*error_string)(); /* routine to supply error string */
- char *name; /* name of this extension */
- void (*error_values)(); /* routine to supply error values */
- void (*before_flush)(); /* routine to call when sending data */
- struct _XExten *next_flush; /* next in list of those with flushes */
+typedef struct _XExten { /* private to extension mechanism */
+ struct _XExten *next; /* next in list */
+ XExtCodes codes; /* public information, all extension told */
+ CreateGCType create_GC; /* routine to call when GC created */
+ CopyGCType copy_GC; /* routine to call when GC copied */
+ FlushGCType flush_GC; /* routine to call when GC flushed */
+ FreeGCType free_GC; /* routine to call when GC freed */
+ CreateFontType create_Font; /* routine to call when Font created */
+ FreeFontType free_Font; /* routine to call when Font freed */
+ CloseDisplayType close_display; /* routine to call when connection closed */
+ ErrorType error; /* who to call when an error occurs */
+ ErrorStringType error_string; /* routine to supply error string */
+ char *name; /* name of this extension */
+ PrintErrorType error_values; /* routine to supply error values */
+ BeforeFlushType before_flush; /* routine to call when sending data */
+ struct _XExten *next_flush; /* next in list of those with flushes */
} _XExtension;
/* extension hooks */
-_XFUNCPROTOBEGIN
-
#ifdef DataRoutineIsProcedure
-extern void Data();
+extern void Data(Display *dpy, char *data, long len);
#endif
extern int _XError(
#if NeedFunctionPrototypes
@@ -875,6 +1020,17 @@ extern char *_XGetAsyncReply(
Bool /* discard */
#endif
);
+extern void _XGetAsyncData(
+#if NeedFunctionPrototypes
+ Display* /* dpy */,
+ char * /* data */,
+ char * /* buf */,
+ int /* len */,
+ int /* skip */,
+ int /* datalen */,
+ int /* discardtotal */
+#endif
+);
extern void _XFlush(
#if NeedFunctionPrototypes
Display* /* dpy */
@@ -934,6 +1090,33 @@ extern void _XDeq(
#endif
);
+extern Bool _XUnknownWireEvent(
+#if NeedFunctionPrototypes
+ Display* /* dpy */,
+ XEvent* /* re */,
+ xEvent* /* event */
+#endif
+);
+extern Status _XUnknownNativeEvent(
+#if NeedFunctionPrototypes
+ Display* /* dpy */,
+ XEvent* /* re */,
+ xEvent* /* event */
+#endif
+);
+
+extern Bool _XWireToEvent(Display *dpy, XEvent *re, xEvent *event);
+extern Bool _XDefaultWireError(Display *display, XErrorEvent *he, xError *we);
+extern Bool _XPollfdCacheInit(Display *dpy);
+extern XID _XAllocID(Display *dpy);
+extern void _XAllocIDs(Display *dpy, XID *ids, int count);
+
+extern int _XFreeExtData(
+#if NeedFunctionPrototypes
+ XExtData* /* extension */
+#endif
+);
+
extern int (*XESetCreateGC(
#if NeedFunctionPrototypes
Display* /* display */,
@@ -1178,14 +1361,14 @@ extern void (*XESetBeforeFlush(
#if NeedNestedPrototypes
Display* /* display */,
XExtCodes* /* codes */,
- char* /* data */,
+ _Xconst char* /* data */,
long /* len */
#endif
) /* proc */
#endif
))(
#if NeedNestedPrototypes
- Display*, XExtCodes*, char*, long
+ Display*, XExtCodes*, _Xconst char*, long
#endif
);
@@ -1232,6 +1415,14 @@ struct _XConnWatchInfo { /* info from XAddConnectionWatch */
struct _XConnWatchInfo *next;
};
+#ifdef __UNIXOS2__
+extern char* __XOS2RedirRoot(
+#if NeedFunctionPrototypes
+ char*
+#endif
+);
+#endif
+
extern int _XTextHeight(
#if NeedFunctionPrototypes
XFontStruct* /* font_struct */,
@@ -1248,7 +1439,8 @@ extern int _XTextHeight16(
#endif
);
-#if defined(WIN32) || defined(__EMX__) /* || defined(OS2) */
+#if defined(WIN32)
+
extern int _XOpenFile(
#if NeedFunctionPrototypes
_Xconst char* /* path */,
@@ -1273,6 +1465,18 @@ extern int _XAccessFile(
#define _XFopenFile(path,mode) fopen(path,mode)
#endif
+/* EvToWire.c */
+extern Status _XEventToWire(Display *dpy, XEvent *re, xEvent *event);
+
+extern int _XF86LoadQueryLocaleFont(
+#if NeedFunctionPrototypes
+ Display* /* dpy */,
+ _Xconst char* /* name*/,
+ XFontStruct** /* xfp*/,
+ Font* /* fidp */
+#endif
+);
+
_XFUNCPROTOEND
#endif /* _XLIBINT_H_ */
diff --git a/include/X11/Xlocale.h b/include/X11/Xlocale.h
index 77702b1..a202304 100644
--- a/include/X11/Xlocale.h
+++ b/include/X11/Xlocale.h
@@ -26,6 +26,7 @@ other dealings in this Software without prior written authorization
from The Open Group.
*/
+/* $XFree86: xc/lib/X11/Xlocale.h,v 1.4 2001/12/14 19:54:09 dawes Exp $ */
#ifndef _XLOCALE_H_
#define _XLOCALE_H_
@@ -34,12 +35,6 @@ from The Open Group.
#include <X11/Xosdefs.h>
#ifndef X_LOCALE
-#ifdef X_NOT_STDC_ENV
-#define X_LOCALE
-#endif
-#endif
-
-#ifndef X_LOCALE
#include <locale.h>
#else
@@ -61,9 +56,7 @@ _XFUNCPROTOEND
#define setlocale _Xsetlocale
-#ifndef NULL
-#define NULL 0
-#endif
+#include <stddef.h>
#endif /* X_LOCALE */
diff --git a/include/X11/Xresource.h b/include/X11/Xresource.h
index b195bb5..acbff18 100644
--- a/include/X11/Xresource.h
+++ b/include/X11/Xresource.h
@@ -46,13 +46,14 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
+/* $XFree86: xc/lib/X11/Xresource.h,v 3.8 2001/12/14 19:54:10 dawes Exp $ */
#ifndef _XRESOURCE_H_
#define _XRESOURCE_H_
-/* You must include <X11/Xlib.h> before including this file */
-
+#ifndef _XP_PRINT_SERVER_
#include <X11/Xlib.h>
+#endif
/****************************************************************
****************************************************************
@@ -84,7 +85,7 @@ extern char *Xpermalloc(
*
****************************************************************/
-typedef int XrmQuark, *XrmQuarkList;
+typedef int XrmQuark, *XrmQuarkList;
#define NULLQUARK ((XrmQuark) 0)
typedef char *XrmString;
@@ -285,6 +286,8 @@ extern Bool XrmQGetSearchResource(
*
****************************************************************/
+#ifndef _XP_PRINT_SERVER_
+
extern void XrmSetDatabase(
#if NeedFunctionPrototypes
Display* /* display */,
@@ -298,6 +301,8 @@ extern XrmDatabase XrmGetDatabase(
#endif
);
+#endif /* !_XP_PRINT_SERVER_ */
+
extern XrmDatabase XrmGetFileDatabase(
#if NeedFunctionPrototypes
_Xconst char* /* filename */
@@ -363,7 +368,7 @@ extern Bool XrmEnumerateDatabase(
#endif
);
-extern char *XrmLocaleOfDatabase(
+extern const char *XrmLocaleOfDatabase(
#if NeedFunctionPrototypes
XrmDatabase /* database */
#endif
diff --git a/include/X11/Xutil.h b/include/X11/Xutil.h
index 17438e8..677670d 100644
--- a/include/X11/Xutil.h
+++ b/include/X11/Xutil.h
@@ -46,6 +46,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
+/* $XFree86: xc/lib/X11/Xutil.h,v 3.5 2003/01/26 02:40:10 dawes Exp $ */
#ifndef _XUTIL_H_
#define _XUTIL_H_
@@ -167,7 +168,9 @@ typedef enum {
XStringStyle, /* STRING */
XCompoundTextStyle, /* COMPOUND_TEXT */
XTextStyle, /* text in owner's encoding (current locale)*/
- XStdICCTextStyle /* STRING, else COMPOUND_TEXT */
+ XStdICCTextStyle, /* STRING, else COMPOUND_TEXT */
+ /* The following is an XFree86 extension, introduced in November 2000 */
+ XUTF8StringStyle /* UTF8_STRING */
} XICCEncodingStyle;
typedef struct {
@@ -227,6 +230,8 @@ typedef struct _XComposeStatus {
#define IsModifierKey(keysym) \
((((KeySym)(keysym) >= XK_Shift_L) && ((KeySym)(keysym) <= XK_Hyper_R)) \
+ || (((KeySym)(keysym) >= XK_ISO_Lock) && \
+ ((KeySym)(keysym) <= XK_ISO_Last_Group_Lock)) \
|| ((KeySym)(keysym) == XK_Mode_switch) \
|| ((KeySym)(keysym) == XK_Num_Lock))
/*
@@ -368,11 +373,7 @@ extern Region XCreateRegion(
#endif
);
-extern char *XDefaultString(
-#if NeedFunctionPrototypes
- void
-#endif
-);
+extern const char *XDefaultString (void);
extern int XDeleteContext(
#if NeedFunctionPrototypes
@@ -752,6 +753,20 @@ extern void XmbSetWMProperties(
#endif
);
+extern void Xutf8SetWMProperties(
+#if NeedFunctionPrototypes
+ Display* /* display */,
+ Window /* w */,
+ _Xconst char* /* window_name */,
+ _Xconst char* /* icon_name */,
+ char** /* argv */,
+ int /* argc */,
+ XSizeHints* /* normal_hints */,
+ XWMHints* /* wm_hints */,
+ XClassHint* /* class_hints */
+#endif
+);
+
extern void XSetWMSizeHints(
#if NeedFunctionPrototypes
Display* /* display */,
@@ -811,29 +826,31 @@ extern int XSubtractRegion(
);
extern int XmbTextListToTextProperty(
-#if NeedFunctionPrototypes
- Display* /* display */,
- char** /* list */,
- int /* count */,
- XICCEncodingStyle /* style */,
- XTextProperty* /* text_prop_return */
-#endif
+ Display* display,
+ char** list,
+ int count,
+ XICCEncodingStyle style,
+ XTextProperty* text_prop_return
);
extern int XwcTextListToTextProperty(
-#if NeedFunctionPrototypes
- Display* /* display */,
- wchar_t** /* list */,
- int /* count */,
- XICCEncodingStyle /* style */,
- XTextProperty* /* text_prop_return */
-#endif
+ Display* display,
+ wchar_t** list,
+ int count,
+ XICCEncodingStyle style,
+ XTextProperty* text_prop_return
+);
+
+extern int Xutf8TextListToTextProperty(
+ Display* display,
+ char** list,
+ int count,
+ XICCEncodingStyle style,
+ XTextProperty* text_prop_return
);
extern void XwcFreeStringList(
-#if NeedFunctionPrototypes
- wchar_t** /* list */
-#endif
+ wchar_t** list
);
extern Status XTextPropertyToStringList(
@@ -845,21 +862,24 @@ extern Status XTextPropertyToStringList(
);
extern int XmbTextPropertyToTextList(
-#if NeedFunctionPrototypes
- Display* /* display */,
- XTextProperty* /* text_prop */,
- char*** /* list_return */,
- int* /* count_return */
-#endif
+ Display* display,
+ const XTextProperty* text_prop,
+ char*** list_return,
+ int* count_return
);
extern int XwcTextPropertyToTextList(
-#if NeedFunctionPrototypes
- Display* /* display */,
- XTextProperty* /* text_prop */,
- wchar_t*** /* list_return */,
- int* /* count_return */
-#endif
+ Display* display,
+ const XTextProperty* text_prop,
+ wchar_t*** list_return,
+ int* count_return
+);
+
+extern int Xutf8TextPropertyToTextList(
+ Display* display,
+ const XTextProperty* text_prop,
+ char*** list_return,
+ int* count_return
);
extern int XUnionRectWithRegion(