aboutsummaryrefslogtreecommitdiff
path: root/libX11/include
diff options
context:
space:
mode:
Diffstat (limited to 'libX11/include')
-rw-r--r--libX11/include/X11/ImUtil.h60
-rw-r--r--libX11/include/X11/XKBlib.h2298
-rw-r--r--libX11/include/X11/Xcms.h1606
-rw-r--r--libX11/include/X11/Xlib-xcb.h40
-rw-r--r--libX11/include/X11/Xlib.h8046
-rw-r--r--libX11/include/X11/Xlibint.h6
-rw-r--r--libX11/include/X11/Xlocale.h118
-rw-r--r--libX11/include/X11/Xregion.h378
-rw-r--r--libX11/include/X11/Xresource.h716
-rw-r--r--libX11/include/X11/Xutil.h1652
-rw-r--r--libX11/include/X11/cursorfont.h222
11 files changed, 7571 insertions, 7571 deletions
diff --git a/libX11/include/X11/ImUtil.h b/libX11/include/X11/ImUtil.h
index 5b62571ac..b7f425c93 100644
--- a/libX11/include/X11/ImUtil.h
+++ b/libX11/include/X11/ImUtil.h
@@ -1,30 +1,30 @@
-
-#ifndef _IMUTIL_H_
-#define _IMUTIL_H_
-
-extern int
-_XGetScanlinePad(
- Display *dpy,
- int depth);
-
-extern int
-_XGetBitsPerPixel(
- Display *dpy,
- int depth);
-
-extern int
-_XSetImage(
- XImage *srcimg,
- register XImage *dstimg,
- register int x,
- register int y);
-
-extern int
-_XReverse_Bytes(
- register unsigned char *bpt,
- register int nb);
-extern void
-_XInitImageFuncPtrs(
- register XImage *image);
-
-#endif /* _IMUTIL_H_ */
+
+#ifndef _X11_IMUTIL_H_
+#define _X11_IMUTIL_H_
+
+extern int
+_XGetScanlinePad(
+ Display *dpy,
+ int depth);
+
+extern int
+_XGetBitsPerPixel(
+ Display *dpy,
+ int depth);
+
+extern int
+_XSetImage(
+ XImage *srcimg,
+ register XImage *dstimg,
+ register int x,
+ register int y);
+
+extern int
+_XReverse_Bytes(
+ register unsigned char *bpt,
+ register int nb);
+extern void
+_XInitImageFuncPtrs(
+ register XImage *image);
+
+#endif /* _X11_IMUTIL_H_ */
diff --git a/libX11/include/X11/XKBlib.h b/libX11/include/X11/XKBlib.h
index 291fc0515..33a24c1b4 100644
--- a/libX11/include/X11/XKBlib.h
+++ b/libX11/include/X11/XKBlib.h
@@ -1,1149 +1,1149 @@
-/************************************************************
-Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
-
-Permission to use, copy, modify, and distribute this
-software and its documentation for any purpose and without
-fee is hereby granted, provided that the above copyright
-notice appear in all copies and that both that copyright
-notice and this permission notice appear in supporting
-documentation, and that the name of Silicon Graphics not be
-used in advertising or publicity pertaining to distribution
-of the software without specific prior written permission.
-Silicon Graphics makes no representation about the suitability
-of this software for any purpose. It is provided "as is"
-without any express or implied warranty.
-
-SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
-SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
-GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
-DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
-THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-********************************************************/
-
-#ifndef _XKBLIB_H_
-#define _XKBLIB_H_
-
-#include <X11/Xlib.h>
-#include <X11/extensions/XKBstr.h>
-
-typedef struct _XkbAnyEvent {
- int type; /* XkbAnyEvent */
- unsigned long serial; /* # of last req processed by server */
- Bool send_event; /* is this from a SendEvent request? */
- Display * display; /* Display the event was read from */
- Time time; /* milliseconds */
- int xkb_type; /* XKB event minor code */
- unsigned int device; /* device ID */
-} XkbAnyEvent;
-
-typedef struct _XkbNewKeyboardNotify {
- int type; /* XkbAnyEvent */
- unsigned long serial; /* of last req processed by server */
- Bool send_event; /* is this from a SendEvent request? */
- Display * display; /* Display the event was read from */
- Time time; /* milliseconds */
- int xkb_type; /* XkbNewKeyboardNotify */
- int device; /* device ID */
- int old_device; /* device ID of previous keyboard */
- int min_key_code; /* minimum key code */
- int max_key_code; /* maximum key code */
- int old_min_key_code;/* min key code of previous kbd */
- int old_max_key_code;/* max key code of previous kbd */
- unsigned int changed; /* changed aspects of the keyboard */
- char req_major; /* major and minor opcode of req */
- char req_minor; /* that caused change, if applicable */
-} XkbNewKeyboardNotifyEvent;
-
-typedef struct _XkbMapNotifyEvent {
- int type; /* XkbAnyEvent */
- unsigned long serial; /* of last req processed by server */
- Bool send_event; /* is this from a SendEvent request */
- Display * display; /* Display the event was read from */
- Time time; /* milliseconds */
- int xkb_type; /* XkbMapNotify */
- int device; /* device ID */
- unsigned int changed; /* fields which have been changed */
- unsigned int flags; /* reserved */
- int first_type; /* first changed key type */
- int num_types; /* number of changed key types */
- KeyCode min_key_code;
- KeyCode max_key_code;
- KeyCode first_key_sym;
- KeyCode first_key_act;
- KeyCode first_key_behavior;
- KeyCode first_key_explicit;
- KeyCode first_modmap_key;
- KeyCode first_vmodmap_key;
- int num_key_syms;
- int num_key_acts;
- int num_key_behaviors;
- int num_key_explicit;
- int num_modmap_keys;
- int num_vmodmap_keys;
- unsigned int vmods; /* mask of changed virtual mods */
-} XkbMapNotifyEvent;
-
-typedef struct _XkbStateNotifyEvent {
- int type; /* XkbAnyEvent */
- unsigned long serial; /* # of last req processed by server */
- Bool send_event; /* is this from a SendEvent request? */
- Display * display; /* Display the event was read from */
- Time time; /* milliseconds */
- int xkb_type; /* XkbStateNotify */
- int device; /* device ID */
- unsigned int changed; /* mask of changed state components */
- int group; /* keyboard group */
- int base_group; /* base keyboard group */
- int latched_group; /* latched keyboard group */
- int locked_group; /* locked keyboard group */
- unsigned int mods; /* modifier state */
- unsigned int base_mods; /* base modifier state */
- unsigned int latched_mods; /* latched modifiers */
- unsigned int locked_mods; /* locked modifiers */
- int compat_state; /* compatibility state */
- unsigned char grab_mods; /* mods used for grabs */
- unsigned char compat_grab_mods;/* grab mods for non-XKB clients */
- unsigned char lookup_mods; /* mods sent to clients */
- unsigned char compat_lookup_mods; /* mods sent to non-XKB clients */
- int ptr_buttons; /* pointer button state */
- KeyCode keycode; /* keycode that caused the change */
- char event_type; /* KeyPress or KeyRelease */
- char req_major; /* Major opcode of request */
- char req_minor; /* Minor opcode of request */
-} XkbStateNotifyEvent;
-
-typedef struct _XkbControlsNotify {
- int type; /* XkbAnyEvent */
- unsigned long serial; /* of last req processed by server */
- Bool send_event; /* is this from a SendEvent request? */
- Display * display; /* Display the event was read from */
- Time time; /* milliseconds */
- int xkb_type; /* XkbControlsNotify */
- int device; /* device ID */
- unsigned int changed_ctrls; /* controls with changed sub-values */
- unsigned int enabled_ctrls; /* controls currently enabled */
- unsigned int enabled_ctrl_changes;/* controls just {en,dis}abled */
- int num_groups; /* total groups on keyboard */
- KeyCode keycode; /* key that caused change or 0 */
- char event_type; /* type of event that caused change */
- char req_major; /* if keycode==0, major and minor */
- char req_minor; /* opcode of req that caused change */
-} XkbControlsNotifyEvent;
-
-typedef struct _XkbIndicatorNotify {
- int type; /* XkbAnyEvent */
- unsigned long serial; /* of last req processed by server */
- Bool send_event; /* is this from a SendEvent request? */
- Display * display; /* Display the event was read from */
- Time time; /* milliseconds */
- int xkb_type; /* XkbIndicatorNotify */
- int device; /* device ID */
- unsigned int changed; /* indicators with new state or map */
- unsigned int state; /* current state of all indicators */
-} XkbIndicatorNotifyEvent;
-
-typedef struct _XkbNamesNotify {
- int type; /* XkbAnyEvent */
- unsigned long serial; /* of last req processed by server */
- Bool send_event; /* is this from a SendEvent request? */
- Display * display; /* Display the event was read from */
- Time time; /* milliseconds */
- int xkb_type; /* XkbNamesNotify */
- int device; /* device ID */
- unsigned int changed; /* names that have changed */
- int first_type; /* first key type with new name */
- int num_types; /* number of key types with new names */
- int first_lvl; /* first key type new new level names */
- int num_lvls; /* # of key types w/new level names */
- int num_aliases; /* total number of key aliases*/
- int num_radio_groups;/* total number of radio groups */
- unsigned int changed_vmods; /* virtual modifiers with new names */
- unsigned int changed_groups; /* groups with new names */
- unsigned int changed_indicators;/* indicators with new names */
- int first_key; /* first key with new name */
- int num_keys; /* number of keys with new names */
-} XkbNamesNotifyEvent;
-
-typedef struct _XkbCompatMapNotify {
- int type; /* XkbAnyEvent */
- unsigned long serial; /* of last req processed by server */
- Bool send_event; /* is this from a SendEvent request? */
- Display * display; /* Display the event was read from */
- Time time; /* milliseconds */
- int xkb_type; /* XkbCompatMapNotify */
- int device; /* device ID */
- unsigned int changed_groups; /* groups with new compat maps */
- int first_si; /* first new symbol interp */
- int num_si; /* number of new symbol interps */
- int num_total_si; /* total # of symbol interps */
-} XkbCompatMapNotifyEvent;
-
-typedef struct _XkbBellNotify {
- int type; /* XkbAnyEvent */
- unsigned long serial; /* of last req processed by server */
- Bool send_event; /* is this from a SendEvent request? */
- Display * display; /* Display the event was read from */
- Time time; /* milliseconds */
- int xkb_type; /* XkbBellNotify */
- int device; /* device ID */
- int percent; /* requested volume as a % of maximum */
- int pitch; /* requested pitch in Hz */
- int duration; /* requested duration in useconds */
- int bell_class; /* (input extension) feedback class */
- int bell_id; /* (input extension) ID of feedback */
- Atom name; /* "name" of requested bell */
- Window window; /* window associated with event */
- Bool event_only; /* "event only" requested */
-} XkbBellNotifyEvent;
-
-typedef struct _XkbActionMessage {
- int type; /* XkbAnyEvent */
- unsigned long serial; /* of last req processed by server */
- Bool send_event; /* is this from a SendEvent request? */
- Display * display; /* Display the event was read from */
- Time time; /* milliseconds */
- int xkb_type; /* XkbActionMessage */
- int device; /* device ID */
- KeyCode keycode; /* key that generated the event */
- Bool press; /* true if act caused by key press */
- Bool key_event_follows;/* true if key event also generated */
- int group; /* effective group */
- unsigned int mods; /* effective mods */
- char message[XkbActionMessageLength+1];
- /* message -- leave space for NUL */
-} XkbActionMessageEvent;
-
-typedef struct _XkbAccessXNotify {
- int type; /* XkbAnyEvent */
- unsigned long serial; /* of last req processed by server */
- Bool send_event; /* is this from a SendEvent request? */
- Display * display; /* Display the event was read from */
- Time time; /* milliseconds */
- int xkb_type; /* XkbAccessXNotify */
- int device; /* device ID */
- int detail; /* XkbAXN_* */
- int keycode; /* key of event */
- int sk_delay; /* current slow keys delay */
- int debounce_delay; /* current debounce delay */
-} XkbAccessXNotifyEvent;
-
-typedef struct _XkbExtensionDeviceNotify {
- int type; /* XkbAnyEvent */
- unsigned long serial; /* of last req processed by server */
- Bool send_event; /* is this from a SendEvent request? */
- Display * display; /* Display the event was read from */
- Time time; /* milliseconds */
- int xkb_type; /* XkbExtensionDeviceNotify */
- int device; /* device ID */
- unsigned int reason; /* reason for the event */
- unsigned int supported; /* mask of supported features */
- unsigned int unsupported; /* mask of unsupported features */
- /* that some app tried to use */
- int first_btn; /* first button that changed */
- int num_btns; /* range of buttons changed */
- unsigned int leds_defined; /* indicators with names or maps */
- unsigned int led_state; /* current state of the indicators */
- int led_class; /* feedback class for led changes */
- int led_id; /* feedback id for led changes */
-} XkbExtensionDeviceNotifyEvent;
-
-typedef union _XkbEvent {
- int type;
- XkbAnyEvent any;
- XkbNewKeyboardNotifyEvent new_kbd;
- XkbMapNotifyEvent map;
- XkbStateNotifyEvent state;
- XkbControlsNotifyEvent ctrls;
- XkbIndicatorNotifyEvent indicators;
- XkbNamesNotifyEvent names;
- XkbCompatMapNotifyEvent compat;
- XkbBellNotifyEvent bell;
- XkbActionMessageEvent message;
- XkbAccessXNotifyEvent accessx;
- XkbExtensionDeviceNotifyEvent device;
- XEvent core;
-} XkbEvent;
-
-typedef struct _XkbKbdDpyState XkbKbdDpyStateRec,*XkbKbdDpyStatePtr;
-
- /* XkbOpenDisplay error codes */
-#define XkbOD_Success 0
-#define XkbOD_BadLibraryVersion 1
-#define XkbOD_ConnectionRefused 2
-#define XkbOD_NonXkbServer 3
-#define XkbOD_BadServerVersion 4
-
- /* Values for XlibFlags */
-#define XkbLC_ForceLatin1Lookup (1<<0)
-#define XkbLC_ConsumeLookupMods (1<<1)
-#define XkbLC_AlwaysConsumeShiftAndLock (1<<2)
-#define XkbLC_IgnoreNewKeyboards (1<<3)
-#define XkbLC_ControlFallback (1<<4)
-#define XkbLC_ConsumeKeysOnComposeFail (1<<29)
-#define XkbLC_ComposeLED (1<<30)
-#define XkbLC_BeepOnComposeFail (1<<31)
-
-#define XkbLC_AllComposeControls (0xc0000000)
-#define XkbLC_AllControls (0xc000001f)
-
-_XFUNCPROTOBEGIN
-
-extern Bool XkbIgnoreExtension(
- Bool /* ignore */
-);
-
-extern Display *XkbOpenDisplay(
- char * /* name */,
- int * /* ev_rtrn */,
- int * /* err_rtrn */,
- int * /* major_rtrn */,
- int * /* minor_rtrn */,
- int * /* reason */
-);
-
-extern Bool XkbQueryExtension(
- Display * /* dpy */,
- int * /* opcodeReturn */,
- int * /* eventBaseReturn */,
- int * /* errorBaseReturn */,
- int * /* majorRtrn */,
- int * /* minorRtrn */
-);
-
-extern Bool XkbUseExtension(
- Display * /* dpy */,
- int * /* major_rtrn */,
- int * /* minor_rtrn */
-);
-
-extern Bool XkbLibraryVersion(
- int * /* libMajorRtrn */,
- int * /* libMinorRtrn */
-);
-
-extern unsigned int XkbSetXlibControls(
- Display* /* dpy */,
- unsigned int /* affect */,
- unsigned int /* values */
-);
-
-extern unsigned int XkbGetXlibControls(
- Display* /* dpy */
-);
-
-extern unsigned int XkbXlibControlsImplemented(void);
-
-typedef Atom (*XkbInternAtomFunc)(
- Display * /* dpy */,
- _Xconst char * /* name */,
- Bool /* only_if_exists */
-);
-
-typedef char * (*XkbGetAtomNameFunc)(
- Display * /* dpy */,
- Atom /* atom */
-);
-
-extern void XkbSetAtomFuncs(
- XkbInternAtomFunc /* getAtom */,
- XkbGetAtomNameFunc /* getName */
-);
-
-extern KeySym XkbKeycodeToKeysym(
- Display * /* dpy */,
-#if NeedWidePrototypes
- unsigned int /* kc */,
-#else
- KeyCode /* kc */,
-#endif
- int /* group */,
- int /* level */
-);
-
-extern unsigned int XkbKeysymToModifiers(
- Display * /* dpy */,
- KeySym /* ks */
-);
-
-extern Bool XkbLookupKeySym(
- Display * /* dpy */,
- KeyCode /* keycode */,
- unsigned int /* modifiers */,
- unsigned int * /* modifiers_return */,
- KeySym * /* keysym_return */
-);
-
-extern int XkbLookupKeyBinding(
- Display * /* dpy */,
- KeySym /* sym_rtrn */,
- unsigned int /* mods */,
- char * /* buffer */,
- int /* nbytes */,
- int * /* extra_rtrn */
-);
-
-extern Bool XkbTranslateKeyCode(
- XkbDescPtr /* xkb */,
- KeyCode /* keycode */,
- unsigned int /* modifiers */,
- unsigned int * /* modifiers_return */,
- KeySym * /* keysym_return */
-);
-
-extern int XkbTranslateKeySym(
- Display * /* dpy */,
- register KeySym * /* sym_return */,
- unsigned int /* modifiers */,
- char * /* buffer */,
- int /* nbytes */,
- int * /* extra_rtrn */
-);
-
-extern Bool XkbSetAutoRepeatRate(
- Display * /* dpy */,
- unsigned int /* deviceSpec */,
- unsigned int /* delay */,
- unsigned int /* interval */
-);
-
-extern Bool XkbGetAutoRepeatRate(
- Display * /* dpy */,
- unsigned int /* deviceSpec */,
- unsigned int * /* delayRtrn */,
- unsigned int * /* intervalRtrn */
-);
-
-extern Bool XkbChangeEnabledControls(
- Display * /* dpy */,
- unsigned int /* deviceSpec */,
- unsigned int /* affect */,
- unsigned int /* values */
-);
-
-extern Bool XkbDeviceBell(
- Display * /* dpy */,
- Window /* win */,
- int /* deviceSpec */,
- int /* bellClass */,
- int /* bellID */,
- int /* percent */,
- Atom /* name */
-);
-
-extern Bool XkbForceDeviceBell(
- Display * /* dpy */,
- int /* deviceSpec */,
- int /* bellClass */,
- int /* bellID */,
- int /* percent */
-);
-
-extern Bool XkbDeviceBellEvent(
- Display * /* dpy */,
- Window /* win */,
- int /* deviceSpec */,
- int /* bellClass */,
- int /* bellID */,
- int /* percent */,
- Atom /* name */
-);
-
-extern Bool XkbBell(
- Display * /* dpy */,
- Window /* win */,
- int /* percent */,
- Atom /* name */
-);
-
-extern Bool XkbForceBell(
- Display * /* dpy */,
- int /* percent */
-);
-
-extern Bool XkbBellEvent(
- Display * /* dpy */,
- Window /* win */,
- int /* percent */,
- Atom /* name */
-);
-
-extern Bool XkbSelectEvents(
- Display * /* dpy */,
- unsigned int /* deviceID */,
- unsigned int /* affect */,
- unsigned int /* values */
-);
-
-extern Bool XkbSelectEventDetails(
- Display * /* dpy */,
- unsigned int /* deviceID */,
- unsigned int /* eventType */,
- unsigned long /* affect */,
- unsigned long /* details */
-);
-
-extern void XkbNoteMapChanges(
- XkbMapChangesPtr /* old */,
- XkbMapNotifyEvent * /* new */,
- unsigned int /* wanted */
-);
-
-extern void XkbNoteNameChanges(
- XkbNameChangesPtr /* old */,
- XkbNamesNotifyEvent * /* new */,
- unsigned int /* wanted */
-);
-
-extern Status XkbGetIndicatorState(
- Display * /* dpy */,
- unsigned int /* deviceSpec */,
- unsigned int * /* pStateRtrn */
-);
-
-extern Status XkbGetDeviceIndicatorState(
- Display * /* dpy */,
- unsigned int /* deviceSpec */,
- unsigned int /* ledClass */,
- unsigned int /* ledID */,
- unsigned int * /* pStateRtrn */
-);
-
-extern Status XkbGetIndicatorMap(
- Display * /* dpy */,
- unsigned long /* which */,
- XkbDescPtr /* desc */
-);
-
-extern Bool XkbSetIndicatorMap(
- Display * /* dpy */,
- unsigned long /* which */,
- XkbDescPtr /* desc */
-);
-
-#define XkbNoteIndicatorMapChanges(o,n,w) \
- ((o)->map_changes|=((n)->map_changes&(w)))
-#define XkbNoteIndicatorStateChanges(o,n,w)\
- ((o)->state_changes|=((n)->state_changes&(w)))
-#define XkbGetIndicatorMapChanges(d,x,c) \
- (XkbGetIndicatorMap((d),(c)->map_changes,x))
-#define XkbChangeIndicatorMaps(d,x,c) \
- (XkbSetIndicatorMap((d),(c)->map_changes,x))
-
-extern Bool XkbGetNamedIndicator(
- Display * /* dpy */,
- Atom /* name */,
- int * /* pNdxRtrn */,
- Bool * /* pStateRtrn */,
- XkbIndicatorMapPtr /* pMapRtrn */,
- Bool * /* pRealRtrn */
-);
-
-extern Bool XkbGetNamedDeviceIndicator(
- Display * /* dpy */,
- unsigned int /* deviceSpec */,
- unsigned int /* ledClass */,
- unsigned int /* ledID */,
- Atom /* name */,
- int * /* pNdxRtrn */,
- Bool * /* pStateRtrn */,
- XkbIndicatorMapPtr /* pMapRtrn */,
- Bool * /* pRealRtrn */
-);
-
-extern Bool XkbSetNamedIndicator(
- Display * /* dpy */,
- Atom /* name */,
- Bool /* changeState */,
- Bool /* state */,
- Bool /* createNewMap */,
- XkbIndicatorMapPtr /* pMap */
-);
-
-extern Bool XkbSetNamedDeviceIndicator(
- Display * /* dpy */,
- unsigned int /* deviceSpec */,
- unsigned int /* ledClass */,
- unsigned int /* ledID */,
- Atom /* name */,
- Bool /* changeState */,
- Bool /* state */,
- Bool /* createNewMap */,
- XkbIndicatorMapPtr /* pMap */
-);
-
-extern Bool XkbLockModifiers(
- Display * /* dpy */,
- unsigned int /* deviceSpec */,
- unsigned int /* affect */,
- unsigned int /* values */
-);
-
-extern Bool XkbLatchModifiers(
- Display * /* dpy */,
- unsigned int /* deviceSpec */,
- unsigned int /* affect */,
- unsigned int /* values */
-);
-
-extern Bool XkbLockGroup(
- Display * /* dpy */,
- unsigned int /* deviceSpec */,
- unsigned int /* group */
-);
-
-extern Bool XkbLatchGroup(
- Display * /* dpy */,
- unsigned int /* deviceSpec */,
- unsigned int /* group */
-);
-
-extern Bool XkbSetServerInternalMods(
- Display * /* dpy */,
- unsigned int /* deviceSpec */,
- unsigned int /* affectReal */,
- unsigned int /* realValues */,
- unsigned int /* affectVirtual */,
- unsigned int /* virtualValues */
-);
-
-extern Bool XkbSetIgnoreLockMods(
- Display * /* dpy */,
- unsigned int /* deviceSpec */,
- unsigned int /* affectReal */,
- unsigned int /* realValues */,
- unsigned int /* affectVirtual */,
- unsigned int /* virtualValues */
-);
-
-
-extern Bool XkbVirtualModsToReal(
- XkbDescPtr /* xkb */,
- unsigned int /* virtual_mask */,
- unsigned int * /* mask_rtrn */
-);
-
-extern Bool XkbComputeEffectiveMap(
- XkbDescPtr /* xkb */,
- XkbKeyTypePtr /* type */,
- unsigned char * /* map_rtrn */
-);
-
-extern Status XkbInitCanonicalKeyTypes(
- XkbDescPtr /* xkb */,
- unsigned int /* which */,
- int /* keypadVMod */
-);
-
-extern XkbDescPtr XkbAllocKeyboard(
- void
-);
-
-extern void XkbFreeKeyboard(
- XkbDescPtr /* xkb */,
- unsigned int /* which */,
- Bool /* freeDesc */
-);
-
-extern Status XkbAllocClientMap(
- XkbDescPtr /* xkb */,
- unsigned int /* which */,
- unsigned int /* nTypes */
-);
-
-extern Status XkbAllocServerMap(
- XkbDescPtr /* xkb */,
- unsigned int /* which */,
- unsigned int /* nActions */
-);
-
-extern void XkbFreeClientMap(
- XkbDescPtr /* xkb */,
- unsigned int /* what */,
- Bool /* freeMap */
-);
-
-extern void XkbFreeServerMap(
- XkbDescPtr /* xkb */,
- unsigned int /* what */,
- Bool /* freeMap */
-);
-
-extern XkbKeyTypePtr XkbAddKeyType(
- XkbDescPtr /* xkb */,
- Atom /* name */,
- int /* map_count */,
- Bool /* want_preserve */,
- int /* num_lvls */
-);
-
-extern Status XkbAllocIndicatorMaps(
- XkbDescPtr /* xkb */
-);
-
-extern void XkbFreeIndicatorMaps(
- XkbDescPtr /* xkb */
-);
-
-extern XkbDescPtr XkbGetMap(
- Display * /* dpy */,
- unsigned int /* which */,
- unsigned int /* deviceSpec */
-);
-
-extern Status XkbGetUpdatedMap(
- Display * /* dpy */,
- unsigned int /* which */,
- XkbDescPtr /* desc */
-);
-
-extern Status XkbGetMapChanges(
- Display * /* dpy */,
- XkbDescPtr /* xkb */,
- XkbMapChangesPtr /* changes */
-);
-
-
-extern Status XkbRefreshKeyboardMapping(
- XkbMapNotifyEvent * /* event */
-);
-
-extern Status XkbGetKeyTypes(
- Display * /* dpy */,
- unsigned int /* first */,
- unsigned int /* num */,
- XkbDescPtr /* xkb */
-);
-
-extern Status XkbGetKeySyms(
- Display * /* dpy */,
- unsigned int /* first */,
- unsigned int /* num */,
- XkbDescPtr /* xkb */
-);
-
-extern Status XkbGetKeyActions(
- Display * /* dpy */,
- unsigned int /* first */,
- unsigned int /* num */,
- XkbDescPtr /* xkb */
-);
-
-extern Status XkbGetKeyBehaviors(
- Display * /* dpy */,
- unsigned int /* firstKey */,
- unsigned int /* nKeys */,
- XkbDescPtr /* desc */
-);
-
-extern Status XkbGetVirtualMods(
- Display * /* dpy */,
- unsigned int /* which */,
- XkbDescPtr /* desc */
-);
-
-extern Status XkbGetKeyExplicitComponents(
- Display * /* dpy */,
- unsigned int /* firstKey */,
- unsigned int /* nKeys */,
- XkbDescPtr /* desc */
-);
-
-extern Status XkbGetKeyModifierMap(
- Display * /* dpy */,
- unsigned int /* firstKey */,
- unsigned int /* nKeys */,
- XkbDescPtr /* desc */
-);
-
-extern Status XkbGetKeyVirtualModMap(
- Display * /* dpy */,
- unsigned int /* first */,
- unsigned int /* num */,
- XkbDescPtr /* xkb */
-);
-
-extern Status XkbAllocControls(
- XkbDescPtr /* xkb */,
- unsigned int /* which*/
-);
-
-extern void XkbFreeControls(
- XkbDescPtr /* xkb */,
- unsigned int /* which */,
- Bool /* freeMap */
-);
-
-extern Status XkbGetControls(
- Display * /* dpy */,
- unsigned long /* which */,
- XkbDescPtr /* desc */
-);
-
-extern Bool XkbSetControls(
- Display * /* dpy */,
- unsigned long /* which */,
- XkbDescPtr /* desc */
-);
-
-extern void XkbNoteControlsChanges(
- XkbControlsChangesPtr /* old */,
- XkbControlsNotifyEvent * /* new */,
- unsigned int /* wanted */
-);
-
-#define XkbGetControlsChanges(d,x,c) XkbGetControls(d,(c)->changed_ctrls,x)
-#define XkbChangeControls(d,x,c) XkbSetControls(d,(c)->changed_ctrls,x)
-
-extern Status XkbAllocCompatMap(
- XkbDescPtr /* xkb */,
- unsigned int /* which */,
- unsigned int /* nInterpret */
-);
-
-extern void XkbFreeCompatMap(
- XkbDescPtr /* xkb */,
- unsigned int /* which */,
- Bool /* freeMap */
-);
-
-extern Status XkbGetCompatMap(
- Display * /* dpy */,
- unsigned int /* which */,
- XkbDescPtr /* xkb */
-);
-
-extern Bool XkbSetCompatMap(
- Display * /* dpy */,
- unsigned int /* which */,
- XkbDescPtr /* xkb */,
- Bool /* updateActions */
-);
-
-extern XkbSymInterpretPtr XkbAddSymInterpret(
- XkbDescPtr /* xkb */,
- XkbSymInterpretPtr /* si */,
- Bool /* updateMap */,
- XkbChangesPtr /* changes */
-);
-
-extern Status XkbAllocNames(
- XkbDescPtr /* xkb */,
- unsigned int /* which */,
- int /* nTotalRG */,
- int /* nTotalAliases */
-);
-
-extern Status XkbGetNames(
- Display * /* dpy */,
- unsigned int /* which */,
- XkbDescPtr /* desc */
-);
-
-extern Bool XkbSetNames(
- Display * /* dpy */,
- unsigned int /* which */,
- unsigned int /* firstType */,
- unsigned int /* nTypes */,
- XkbDescPtr /* desc */
-);
-
-extern Bool XkbChangeNames(
- Display * /* dpy */,
- XkbDescPtr /* xkb */,
- XkbNameChangesPtr /* changes */
-);
-
-extern void XkbFreeNames(
- XkbDescPtr /* xkb */,
- unsigned int /* which */,
- Bool /* freeMap */
-);
-
-
-extern Status XkbGetState(
- Display * /* dpy */,
- unsigned int /* deviceSpec */,
- XkbStatePtr /* rtrnState */
-);
-
-extern Bool XkbSetMap(
- Display * /* dpy */,
- unsigned int /* which */,
- XkbDescPtr /* desc */
-);
-
-extern Bool XkbChangeMap(
- Display* /* dpy */,
- XkbDescPtr /* desc */,
- XkbMapChangesPtr /* changes */
-);
-
-extern Bool XkbSetDetectableAutoRepeat(
- Display * /* dpy */,
- Bool /* detectable */,
- Bool * /* supported */
-);
-
-extern Bool XkbGetDetectableAutoRepeat(
- Display * /* dpy */,
- Bool * /* supported */
-);
-
-extern Bool XkbSetAutoResetControls(
- Display * /* dpy */,
- unsigned int /* changes */,
- unsigned int * /* auto_ctrls */,
- unsigned int * /* auto_values */
-);
-
-extern Bool XkbGetAutoResetControls(
- Display * /* dpy */,
- unsigned int * /* auto_ctrls */,
- unsigned int * /* auto_ctrl_values */
-);
-
-extern Bool XkbSetPerClientControls(
- Display * /* dpy */,
- unsigned int /* change */,
- unsigned int * /* values */
-);
-
-extern Bool XkbGetPerClientControls(
- Display * /* dpy */,
- unsigned int * /* ctrls */
-);
-
-extern Status XkbCopyKeyType(
- XkbKeyTypePtr /* from */,
- XkbKeyTypePtr /* into */
-);
-
-extern Status XkbCopyKeyTypes(
- XkbKeyTypePtr /* from */,
- XkbKeyTypePtr /* into */,
- int /* num_types */
-);
-
-extern Status XkbResizeKeyType(
- XkbDescPtr /* xkb */,
- int /* type_ndx */,
- int /* map_count */,
- Bool /* want_preserve */,
- int /* new_num_lvls */
-);
-
-extern KeySym *XkbResizeKeySyms(
- XkbDescPtr /* desc */,
- int /* forKey */,
- int /* symsNeeded */
-);
-
-extern XkbAction *XkbResizeKeyActions(
- XkbDescPtr /* desc */,
- int /* forKey */,
- int /* actsNeeded */
-);
-
-extern Status XkbChangeTypesOfKey(
- XkbDescPtr /* xkb */,
- int /* key */,
- int /* num_groups */,
- unsigned int /* groups */,
- int * /* newTypes */,
- XkbMapChangesPtr /* pChanges */
-);
-
-extern Status XkbChangeKeycodeRange(
- XkbDescPtr /* xkb */,
- int /* minKC */,
- int /* maxKC */,
- XkbChangesPtr /* changes */
-);
-
-/***====================================================================***/
-
-extern XkbComponentListPtr XkbListComponents(
- Display * /* dpy */,
- unsigned int /* deviceSpec */,
- XkbComponentNamesPtr /* ptrns */,
- int * /* max_inout */
-);
-
-extern void XkbFreeComponentList(
- XkbComponentListPtr /* list */
-);
-
-extern XkbDescPtr XkbGetKeyboard(
- Display * /* dpy */,
- unsigned int /* which */,
- unsigned int /* deviceSpec */
-);
-
-extern XkbDescPtr XkbGetKeyboardByName(
- Display * /* dpy */,
- unsigned int /* deviceSpec */,
- XkbComponentNamesPtr /* names */,
- unsigned int /* want */,
- unsigned int /* need */,
- Bool /* load */
-);
-
-/***====================================================================***/
-
-extern int XkbKeyTypesForCoreSymbols( /* returns # of groups */
- XkbDescPtr /* xkb */, /* keyboard device */
- int /* map_width */, /* width of core KeySym array */
- KeySym * /* core_syms */, /* always mapWidth symbols */
- unsigned int /* protected */, /* explicit key types */
- int * /* types_inout */, /* always four type indices */
- KeySym * /* xkb_syms_rtrn */ /* must have enough space */
-);
-
-extern Bool XkbApplyCompatMapToKey( /* False only on error */
- XkbDescPtr /* xkb */, /* keymap to be edited */
- KeyCode /* key */, /* key to be updated */
- XkbChangesPtr /* changes */ /* resulting changes to map */
-);
-
-extern Bool XkbUpdateMapFromCore( /* False only on error */
- XkbDescPtr /* xkb */, /* XKB keyboard to be edited */
- KeyCode /* first_key */, /* first changed key */
- int /* num_keys */, /* number of changed keys */
- int /* map_width */, /* width of core keymap */
- KeySym * /* core_keysyms */, /* symbols from core keymap */
- XkbChangesPtr /* changes */ /* resulting changes */
-);
-
-/***====================================================================***/
-
-extern XkbDeviceLedInfoPtr XkbAddDeviceLedInfo(
- XkbDeviceInfoPtr /* devi */,
- unsigned int /* ledClass */,
- unsigned int /* ledId */
-);
-
-extern Status XkbResizeDeviceButtonActions(
- XkbDeviceInfoPtr /* devi */,
- unsigned int /* newTotal */
-);
-
-extern XkbDeviceInfoPtr XkbAllocDeviceInfo(
- unsigned int /* deviceSpec */,
- unsigned int /* nButtons */,
- unsigned int /* szLeds */
-);
-
-extern void XkbFreeDeviceInfo(
- XkbDeviceInfoPtr /* devi */,
- unsigned int /* which */,
- Bool /* freeDevI */
-);
-
-extern void XkbNoteDeviceChanges(
- XkbDeviceChangesPtr /* old */,
- XkbExtensionDeviceNotifyEvent * /* new */,
- unsigned int /* wanted */
-);
-
-extern XkbDeviceInfoPtr XkbGetDeviceInfo(
- Display * /* dpy */,
- unsigned int /* which */,
- unsigned int /* deviceSpec */,
- unsigned int /* ledClass */,
- unsigned int /* ledID */
-);
-
-extern Status XkbGetDeviceInfoChanges(
- Display * /* dpy */,
- XkbDeviceInfoPtr /* devi */,
- XkbDeviceChangesPtr /* changes */
-);
-
-extern Status XkbGetDeviceButtonActions(
- Display * /* dpy */,
- XkbDeviceInfoPtr /* devi */,
- Bool /* all */,
- unsigned int /* first */,
- unsigned int /* nBtns */
-);
-
-extern Status XkbGetDeviceLedInfo(
- Display * /* dpy */,
- XkbDeviceInfoPtr /* devi */,
- unsigned int /* ledClass (class, XIDflt, XIAll) */,
- unsigned int /* ledId (id, XIDflt, XIAll) */,
- unsigned int /* which (XkbXI_Indicator{Names,Map}Mask */
-);
-
-extern Bool XkbSetDeviceInfo(
- Display * /* dpy */,
- unsigned int /* which */,
- XkbDeviceInfoPtr /* devi */
-);
-
-extern Bool XkbChangeDeviceInfo(
- Display* /* dpy */,
- XkbDeviceInfoPtr /* desc */,
- XkbDeviceChangesPtr /* changes */
-);
-
-extern Bool XkbSetDeviceLedInfo(
- Display * /* dpy */,
- XkbDeviceInfoPtr /* devi */,
- unsigned int /* ledClass */,
- unsigned int /* ledID */,
- unsigned int /* which */
-);
-
-extern Bool XkbSetDeviceButtonActions(
- Display * /* dpy */,
- XkbDeviceInfoPtr /* devi */,
- unsigned int /* first */,
- unsigned int /* nBtns */
-);
-
-/***====================================================================***/
-
-extern char XkbToControl(
- char /* c */
-);
-
-/***====================================================================***/
-
-extern Bool XkbSetDebuggingFlags(
- Display * /* dpy */,
- unsigned int /* mask */,
- unsigned int /* flags */,
- char * /* msg */,
- unsigned int /* ctrls_mask */,
- unsigned int /* ctrls */,
- unsigned int * /* rtrn_flags */,
- unsigned int * /* rtrn_ctrls */
-);
-
-extern Bool XkbApplyVirtualModChanges(
- XkbDescPtr /* xkb */,
- unsigned int /* changed */,
- XkbChangesPtr /* changes */
-);
-
-extern Bool XkbUpdateActionVirtualMods(
- XkbDescPtr /* xkb */,
- XkbAction * /* act */,
- unsigned int /* changed */
-);
-
-extern void XkbUpdateKeyTypeVirtualMods(
- XkbDescPtr /* xkb */,
- XkbKeyTypePtr /* type */,
- unsigned int /* changed */,
- XkbChangesPtr /* changes */
-);
-
-_XFUNCPROTOEND
-
-#endif /* _XKBLIB_H_ */
+/************************************************************
+Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
+
+Permission to use, copy, modify, and distribute this
+software and its documentation for any purpose and without
+fee is hereby granted, provided that the above copyright
+notice appear in all copies and that both that copyright
+notice and this permission notice appear in supporting
+documentation, and that the name of Silicon Graphics not be
+used in advertising or publicity pertaining to distribution
+of the software without specific prior written permission.
+Silicon Graphics makes no representation about the suitability
+of this software for any purpose. It is provided "as is"
+without any express or implied warranty.
+
+SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+********************************************************/
+
+#ifndef _X11_XKBLIB_H_
+#define _X11_XKBLIB_H_
+
+#include <X11/Xlib.h>
+#include <X11/extensions/XKBstr.h>
+
+typedef struct _XkbAnyEvent {
+ int type; /* XkbAnyEvent */
+ unsigned long serial; /* # of last req processed by server */
+ Bool send_event; /* is this from a SendEvent request? */
+ Display * display; /* Display the event was read from */
+ Time time; /* milliseconds */
+ int xkb_type; /* XKB event minor code */
+ unsigned int device; /* device ID */
+} XkbAnyEvent;
+
+typedef struct _XkbNewKeyboardNotify {
+ int type; /* XkbAnyEvent */
+ unsigned long serial; /* of last req processed by server */
+ Bool send_event; /* is this from a SendEvent request? */
+ Display * display; /* Display the event was read from */
+ Time time; /* milliseconds */
+ int xkb_type; /* XkbNewKeyboardNotify */
+ int device; /* device ID */
+ int old_device; /* device ID of previous keyboard */
+ int min_key_code; /* minimum key code */
+ int max_key_code; /* maximum key code */
+ int old_min_key_code;/* min key code of previous kbd */
+ int old_max_key_code;/* max key code of previous kbd */
+ unsigned int changed; /* changed aspects of the keyboard */
+ char req_major; /* major and minor opcode of req */
+ char req_minor; /* that caused change, if applicable */
+} XkbNewKeyboardNotifyEvent;
+
+typedef struct _XkbMapNotifyEvent {
+ int type; /* XkbAnyEvent */
+ unsigned long serial; /* of last req processed by server */
+ Bool send_event; /* is this from a SendEvent request */
+ Display * display; /* Display the event was read from */
+ Time time; /* milliseconds */
+ int xkb_type; /* XkbMapNotify */
+ int device; /* device ID */
+ unsigned int changed; /* fields which have been changed */
+ unsigned int flags; /* reserved */
+ int first_type; /* first changed key type */
+ int num_types; /* number of changed key types */
+ KeyCode min_key_code;
+ KeyCode max_key_code;
+ KeyCode first_key_sym;
+ KeyCode first_key_act;
+ KeyCode first_key_behavior;
+ KeyCode first_key_explicit;
+ KeyCode first_modmap_key;
+ KeyCode first_vmodmap_key;
+ int num_key_syms;
+ int num_key_acts;
+ int num_key_behaviors;
+ int num_key_explicit;
+ int num_modmap_keys;
+ int num_vmodmap_keys;
+ unsigned int vmods; /* mask of changed virtual mods */
+} XkbMapNotifyEvent;
+
+typedef struct _XkbStateNotifyEvent {
+ int type; /* XkbAnyEvent */
+ unsigned long serial; /* # of last req processed by server */
+ Bool send_event; /* is this from a SendEvent request? */
+ Display * display; /* Display the event was read from */
+ Time time; /* milliseconds */
+ int xkb_type; /* XkbStateNotify */
+ int device; /* device ID */
+ unsigned int changed; /* mask of changed state components */
+ int group; /* keyboard group */
+ int base_group; /* base keyboard group */
+ int latched_group; /* latched keyboard group */
+ int locked_group; /* locked keyboard group */
+ unsigned int mods; /* modifier state */
+ unsigned int base_mods; /* base modifier state */
+ unsigned int latched_mods; /* latched modifiers */
+ unsigned int locked_mods; /* locked modifiers */
+ int compat_state; /* compatibility state */
+ unsigned char grab_mods; /* mods used for grabs */
+ unsigned char compat_grab_mods;/* grab mods for non-XKB clients */
+ unsigned char lookup_mods; /* mods sent to clients */
+ unsigned char compat_lookup_mods; /* mods sent to non-XKB clients */
+ int ptr_buttons; /* pointer button state */
+ KeyCode keycode; /* keycode that caused the change */
+ char event_type; /* KeyPress or KeyRelease */
+ char req_major; /* Major opcode of request */
+ char req_minor; /* Minor opcode of request */
+} XkbStateNotifyEvent;
+
+typedef struct _XkbControlsNotify {
+ int type; /* XkbAnyEvent */
+ unsigned long serial; /* of last req processed by server */
+ Bool send_event; /* is this from a SendEvent request? */
+ Display * display; /* Display the event was read from */
+ Time time; /* milliseconds */
+ int xkb_type; /* XkbControlsNotify */
+ int device; /* device ID */
+ unsigned int changed_ctrls; /* controls with changed sub-values */
+ unsigned int enabled_ctrls; /* controls currently enabled */
+ unsigned int enabled_ctrl_changes;/* controls just {en,dis}abled */
+ int num_groups; /* total groups on keyboard */
+ KeyCode keycode; /* key that caused change or 0 */
+ char event_type; /* type of event that caused change */
+ char req_major; /* if keycode==0, major and minor */
+ char req_minor; /* opcode of req that caused change */
+} XkbControlsNotifyEvent;
+
+typedef struct _XkbIndicatorNotify {
+ int type; /* XkbAnyEvent */
+ unsigned long serial; /* of last req processed by server */
+ Bool send_event; /* is this from a SendEvent request? */
+ Display * display; /* Display the event was read from */
+ Time time; /* milliseconds */
+ int xkb_type; /* XkbIndicatorNotify */
+ int device; /* device ID */
+ unsigned int changed; /* indicators with new state or map */
+ unsigned int state; /* current state of all indicators */
+} XkbIndicatorNotifyEvent;
+
+typedef struct _XkbNamesNotify {
+ int type; /* XkbAnyEvent */
+ unsigned long serial; /* of last req processed by server */
+ Bool send_event; /* is this from a SendEvent request? */
+ Display * display; /* Display the event was read from */
+ Time time; /* milliseconds */
+ int xkb_type; /* XkbNamesNotify */
+ int device; /* device ID */
+ unsigned int changed; /* names that have changed */
+ int first_type; /* first key type with new name */
+ int num_types; /* number of key types with new names */
+ int first_lvl; /* first key type new new level names */
+ int num_lvls; /* # of key types w/new level names */
+ int num_aliases; /* total number of key aliases*/
+ int num_radio_groups;/* total number of radio groups */
+ unsigned int changed_vmods; /* virtual modifiers with new names */
+ unsigned int changed_groups; /* groups with new names */
+ unsigned int changed_indicators;/* indicators with new names */
+ int first_key; /* first key with new name */
+ int num_keys; /* number of keys with new names */
+} XkbNamesNotifyEvent;
+
+typedef struct _XkbCompatMapNotify {
+ int type; /* XkbAnyEvent */
+ unsigned long serial; /* of last req processed by server */
+ Bool send_event; /* is this from a SendEvent request? */
+ Display * display; /* Display the event was read from */
+ Time time; /* milliseconds */
+ int xkb_type; /* XkbCompatMapNotify */
+ int device; /* device ID */
+ unsigned int changed_groups; /* groups with new compat maps */
+ int first_si; /* first new symbol interp */
+ int num_si; /* number of new symbol interps */
+ int num_total_si; /* total # of symbol interps */
+} XkbCompatMapNotifyEvent;
+
+typedef struct _XkbBellNotify {
+ int type; /* XkbAnyEvent */
+ unsigned long serial; /* of last req processed by server */
+ Bool send_event; /* is this from a SendEvent request? */
+ Display * display; /* Display the event was read from */
+ Time time; /* milliseconds */
+ int xkb_type; /* XkbBellNotify */
+ int device; /* device ID */
+ int percent; /* requested volume as a % of maximum */
+ int pitch; /* requested pitch in Hz */
+ int duration; /* requested duration in useconds */
+ int bell_class; /* (input extension) feedback class */
+ int bell_id; /* (input extension) ID of feedback */
+ Atom name; /* "name" of requested bell */
+ Window window; /* window associated with event */
+ Bool event_only; /* "event only" requested */
+} XkbBellNotifyEvent;
+
+typedef struct _XkbActionMessage {
+ int type; /* XkbAnyEvent */
+ unsigned long serial; /* of last req processed by server */
+ Bool send_event; /* is this from a SendEvent request? */
+ Display * display; /* Display the event was read from */
+ Time time; /* milliseconds */
+ int xkb_type; /* XkbActionMessage */
+ int device; /* device ID */
+ KeyCode keycode; /* key that generated the event */
+ Bool press; /* true if act caused by key press */
+ Bool key_event_follows;/* true if key event also generated */
+ int group; /* effective group */
+ unsigned int mods; /* effective mods */
+ char message[XkbActionMessageLength+1];
+ /* message -- leave space for NUL */
+} XkbActionMessageEvent;
+
+typedef struct _XkbAccessXNotify {
+ int type; /* XkbAnyEvent */
+ unsigned long serial; /* of last req processed by server */
+ Bool send_event; /* is this from a SendEvent request? */
+ Display * display; /* Display the event was read from */
+ Time time; /* milliseconds */
+ int xkb_type; /* XkbAccessXNotify */
+ int device; /* device ID */
+ int detail; /* XkbAXN_* */
+ int keycode; /* key of event */
+ int sk_delay; /* current slow keys delay */
+ int debounce_delay; /* current debounce delay */
+} XkbAccessXNotifyEvent;
+
+typedef struct _XkbExtensionDeviceNotify {
+ int type; /* XkbAnyEvent */
+ unsigned long serial; /* of last req processed by server */
+ Bool send_event; /* is this from a SendEvent request? */
+ Display * display; /* Display the event was read from */
+ Time time; /* milliseconds */
+ int xkb_type; /* XkbExtensionDeviceNotify */
+ int device; /* device ID */
+ unsigned int reason; /* reason for the event */
+ unsigned int supported; /* mask of supported features */
+ unsigned int unsupported; /* mask of unsupported features */
+ /* that some app tried to use */
+ int first_btn; /* first button that changed */
+ int num_btns; /* range of buttons changed */
+ unsigned int leds_defined; /* indicators with names or maps */
+ unsigned int led_state; /* current state of the indicators */
+ int led_class; /* feedback class for led changes */
+ int led_id; /* feedback id for led changes */
+} XkbExtensionDeviceNotifyEvent;
+
+typedef union _XkbEvent {
+ int type;
+ XkbAnyEvent any;
+ XkbNewKeyboardNotifyEvent new_kbd;
+ XkbMapNotifyEvent map;
+ XkbStateNotifyEvent state;
+ XkbControlsNotifyEvent ctrls;
+ XkbIndicatorNotifyEvent indicators;
+ XkbNamesNotifyEvent names;
+ XkbCompatMapNotifyEvent compat;
+ XkbBellNotifyEvent bell;
+ XkbActionMessageEvent message;
+ XkbAccessXNotifyEvent accessx;
+ XkbExtensionDeviceNotifyEvent device;
+ XEvent core;
+} XkbEvent;
+
+typedef struct _XkbKbdDpyState XkbKbdDpyStateRec,*XkbKbdDpyStatePtr;
+
+ /* XkbOpenDisplay error codes */
+#define XkbOD_Success 0
+#define XkbOD_BadLibraryVersion 1
+#define XkbOD_ConnectionRefused 2
+#define XkbOD_NonXkbServer 3
+#define XkbOD_BadServerVersion 4
+
+ /* Values for XlibFlags */
+#define XkbLC_ForceLatin1Lookup (1<<0)
+#define XkbLC_ConsumeLookupMods (1<<1)
+#define XkbLC_AlwaysConsumeShiftAndLock (1<<2)
+#define XkbLC_IgnoreNewKeyboards (1<<3)
+#define XkbLC_ControlFallback (1<<4)
+#define XkbLC_ConsumeKeysOnComposeFail (1<<29)
+#define XkbLC_ComposeLED (1<<30)
+#define XkbLC_BeepOnComposeFail (1<<31)
+
+#define XkbLC_AllComposeControls (0xc0000000)
+#define XkbLC_AllControls (0xc000001f)
+
+_XFUNCPROTOBEGIN
+
+extern Bool XkbIgnoreExtension(
+ Bool /* ignore */
+);
+
+extern Display *XkbOpenDisplay(
+ char * /* name */,
+ int * /* ev_rtrn */,
+ int * /* err_rtrn */,
+ int * /* major_rtrn */,
+ int * /* minor_rtrn */,
+ int * /* reason */
+);
+
+extern Bool XkbQueryExtension(
+ Display * /* dpy */,
+ int * /* opcodeReturn */,
+ int * /* eventBaseReturn */,
+ int * /* errorBaseReturn */,
+ int * /* majorRtrn */,
+ int * /* minorRtrn */
+);
+
+extern Bool XkbUseExtension(
+ Display * /* dpy */,
+ int * /* major_rtrn */,
+ int * /* minor_rtrn */
+);
+
+extern Bool XkbLibraryVersion(
+ int * /* libMajorRtrn */,
+ int * /* libMinorRtrn */
+);
+
+extern unsigned int XkbSetXlibControls(
+ Display* /* dpy */,
+ unsigned int /* affect */,
+ unsigned int /* values */
+);
+
+extern unsigned int XkbGetXlibControls(
+ Display* /* dpy */
+);
+
+extern unsigned int XkbXlibControlsImplemented(void);
+
+typedef Atom (*XkbInternAtomFunc)(
+ Display * /* dpy */,
+ _Xconst char * /* name */,
+ Bool /* only_if_exists */
+);
+
+typedef char * (*XkbGetAtomNameFunc)(
+ Display * /* dpy */,
+ Atom /* atom */
+);
+
+extern void XkbSetAtomFuncs(
+ XkbInternAtomFunc /* getAtom */,
+ XkbGetAtomNameFunc /* getName */
+);
+
+extern KeySym XkbKeycodeToKeysym(
+ Display * /* dpy */,
+#if NeedWidePrototypes
+ unsigned int /* kc */,
+#else
+ KeyCode /* kc */,
+#endif
+ int /* group */,
+ int /* level */
+);
+
+extern unsigned int XkbKeysymToModifiers(
+ Display * /* dpy */,
+ KeySym /* ks */
+);
+
+extern Bool XkbLookupKeySym(
+ Display * /* dpy */,
+ KeyCode /* keycode */,
+ unsigned int /* modifiers */,
+ unsigned int * /* modifiers_return */,
+ KeySym * /* keysym_return */
+);
+
+extern int XkbLookupKeyBinding(
+ Display * /* dpy */,
+ KeySym /* sym_rtrn */,
+ unsigned int /* mods */,
+ char * /* buffer */,
+ int /* nbytes */,
+ int * /* extra_rtrn */
+);
+
+extern Bool XkbTranslateKeyCode(
+ XkbDescPtr /* xkb */,
+ KeyCode /* keycode */,
+ unsigned int /* modifiers */,
+ unsigned int * /* modifiers_return */,
+ KeySym * /* keysym_return */
+);
+
+extern int XkbTranslateKeySym(
+ Display * /* dpy */,
+ register KeySym * /* sym_return */,
+ unsigned int /* modifiers */,
+ char * /* buffer */,
+ int /* nbytes */,
+ int * /* extra_rtrn */
+);
+
+extern Bool XkbSetAutoRepeatRate(
+ Display * /* dpy */,
+ unsigned int /* deviceSpec */,
+ unsigned int /* delay */,
+ unsigned int /* interval */
+);
+
+extern Bool XkbGetAutoRepeatRate(
+ Display * /* dpy */,
+ unsigned int /* deviceSpec */,
+ unsigned int * /* delayRtrn */,
+ unsigned int * /* intervalRtrn */
+);
+
+extern Bool XkbChangeEnabledControls(
+ Display * /* dpy */,
+ unsigned int /* deviceSpec */,
+ unsigned int /* affect */,
+ unsigned int /* values */
+);
+
+extern Bool XkbDeviceBell(
+ Display * /* dpy */,
+ Window /* win */,
+ int /* deviceSpec */,
+ int /* bellClass */,
+ int /* bellID */,
+ int /* percent */,
+ Atom /* name */
+);
+
+extern Bool XkbForceDeviceBell(
+ Display * /* dpy */,
+ int /* deviceSpec */,
+ int /* bellClass */,
+ int /* bellID */,
+ int /* percent */
+);
+
+extern Bool XkbDeviceBellEvent(
+ Display * /* dpy */,
+ Window /* win */,
+ int /* deviceSpec */,
+ int /* bellClass */,
+ int /* bellID */,
+ int /* percent */,
+ Atom /* name */
+);
+
+extern Bool XkbBell(
+ Display * /* dpy */,
+ Window /* win */,
+ int /* percent */,
+ Atom /* name */
+);
+
+extern Bool XkbForceBell(
+ Display * /* dpy */,
+ int /* percent */
+);
+
+extern Bool XkbBellEvent(
+ Display * /* dpy */,
+ Window /* win */,
+ int /* percent */,
+ Atom /* name */
+);
+
+extern Bool XkbSelectEvents(
+ Display * /* dpy */,
+ unsigned int /* deviceID */,
+ unsigned int /* affect */,
+ unsigned int /* values */
+);
+
+extern Bool XkbSelectEventDetails(
+ Display * /* dpy */,
+ unsigned int /* deviceID */,
+ unsigned int /* eventType */,
+ unsigned long /* affect */,
+ unsigned long /* details */
+);
+
+extern void XkbNoteMapChanges(
+ XkbMapChangesPtr /* old */,
+ XkbMapNotifyEvent * /* new */,
+ unsigned int /* wanted */
+);
+
+extern void XkbNoteNameChanges(
+ XkbNameChangesPtr /* old */,
+ XkbNamesNotifyEvent * /* new */,
+ unsigned int /* wanted */
+);
+
+extern Status XkbGetIndicatorState(
+ Display * /* dpy */,
+ unsigned int /* deviceSpec */,
+ unsigned int * /* pStateRtrn */
+);
+
+extern Status XkbGetDeviceIndicatorState(
+ Display * /* dpy */,
+ unsigned int /* deviceSpec */,
+ unsigned int /* ledClass */,
+ unsigned int /* ledID */,
+ unsigned int * /* pStateRtrn */
+);
+
+extern Status XkbGetIndicatorMap(
+ Display * /* dpy */,
+ unsigned long /* which */,
+ XkbDescPtr /* desc */
+);
+
+extern Bool XkbSetIndicatorMap(
+ Display * /* dpy */,
+ unsigned long /* which */,
+ XkbDescPtr /* desc */
+);
+
+#define XkbNoteIndicatorMapChanges(o,n,w) \
+ ((o)->map_changes|=((n)->map_changes&(w)))
+#define XkbNoteIndicatorStateChanges(o,n,w)\
+ ((o)->state_changes|=((n)->state_changes&(w)))
+#define XkbGetIndicatorMapChanges(d,x,c) \
+ (XkbGetIndicatorMap((d),(c)->map_changes,x))
+#define XkbChangeIndicatorMaps(d,x,c) \
+ (XkbSetIndicatorMap((d),(c)->map_changes,x))
+
+extern Bool XkbGetNamedIndicator(
+ Display * /* dpy */,
+ Atom /* name */,
+ int * /* pNdxRtrn */,
+ Bool * /* pStateRtrn */,
+ XkbIndicatorMapPtr /* pMapRtrn */,
+ Bool * /* pRealRtrn */
+);
+
+extern Bool XkbGetNamedDeviceIndicator(
+ Display * /* dpy */,
+ unsigned int /* deviceSpec */,
+ unsigned int /* ledClass */,
+ unsigned int /* ledID */,
+ Atom /* name */,
+ int * /* pNdxRtrn */,
+ Bool * /* pStateRtrn */,
+ XkbIndicatorMapPtr /* pMapRtrn */,
+ Bool * /* pRealRtrn */
+);
+
+extern Bool XkbSetNamedIndicator(
+ Display * /* dpy */,
+ Atom /* name */,
+ Bool /* changeState */,
+ Bool /* state */,
+ Bool /* createNewMap */,
+ XkbIndicatorMapPtr /* pMap */
+);
+
+extern Bool XkbSetNamedDeviceIndicator(
+ Display * /* dpy */,
+ unsigned int /* deviceSpec */,
+ unsigned int /* ledClass */,
+ unsigned int /* ledID */,
+ Atom /* name */,
+ Bool /* changeState */,
+ Bool /* state */,
+ Bool /* createNewMap */,
+ XkbIndicatorMapPtr /* pMap */
+);
+
+extern Bool XkbLockModifiers(
+ Display * /* dpy */,
+ unsigned int /* deviceSpec */,
+ unsigned int /* affect */,
+ unsigned int /* values */
+);
+
+extern Bool XkbLatchModifiers(
+ Display * /* dpy */,
+ unsigned int /* deviceSpec */,
+ unsigned int /* affect */,
+ unsigned int /* values */
+);
+
+extern Bool XkbLockGroup(
+ Display * /* dpy */,
+ unsigned int /* deviceSpec */,
+ unsigned int /* group */
+);
+
+extern Bool XkbLatchGroup(
+ Display * /* dpy */,
+ unsigned int /* deviceSpec */,
+ unsigned int /* group */
+);
+
+extern Bool XkbSetServerInternalMods(
+ Display * /* dpy */,
+ unsigned int /* deviceSpec */,
+ unsigned int /* affectReal */,
+ unsigned int /* realValues */,
+ unsigned int /* affectVirtual */,
+ unsigned int /* virtualValues */
+);
+
+extern Bool XkbSetIgnoreLockMods(
+ Display * /* dpy */,
+ unsigned int /* deviceSpec */,
+ unsigned int /* affectReal */,
+ unsigned int /* realValues */,
+ unsigned int /* affectVirtual */,
+ unsigned int /* virtualValues */
+);
+
+
+extern Bool XkbVirtualModsToReal(
+ XkbDescPtr /* xkb */,
+ unsigned int /* virtual_mask */,
+ unsigned int * /* mask_rtrn */
+);
+
+extern Bool XkbComputeEffectiveMap(
+ XkbDescPtr /* xkb */,
+ XkbKeyTypePtr /* type */,
+ unsigned char * /* map_rtrn */
+);
+
+extern Status XkbInitCanonicalKeyTypes(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ int /* keypadVMod */
+);
+
+extern XkbDescPtr XkbAllocKeyboard(
+ void
+);
+
+extern void XkbFreeKeyboard(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ Bool /* freeDesc */
+);
+
+extern Status XkbAllocClientMap(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ unsigned int /* nTypes */
+);
+
+extern Status XkbAllocServerMap(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ unsigned int /* nActions */
+);
+
+extern void XkbFreeClientMap(
+ XkbDescPtr /* xkb */,
+ unsigned int /* what */,
+ Bool /* freeMap */
+);
+
+extern void XkbFreeServerMap(
+ XkbDescPtr /* xkb */,
+ unsigned int /* what */,
+ Bool /* freeMap */
+);
+
+extern XkbKeyTypePtr XkbAddKeyType(
+ XkbDescPtr /* xkb */,
+ Atom /* name */,
+ int /* map_count */,
+ Bool /* want_preserve */,
+ int /* num_lvls */
+);
+
+extern Status XkbAllocIndicatorMaps(
+ XkbDescPtr /* xkb */
+);
+
+extern void XkbFreeIndicatorMaps(
+ XkbDescPtr /* xkb */
+);
+
+extern XkbDescPtr XkbGetMap(
+ Display * /* dpy */,
+ unsigned int /* which */,
+ unsigned int /* deviceSpec */
+);
+
+extern Status XkbGetUpdatedMap(
+ Display * /* dpy */,
+ unsigned int /* which */,
+ XkbDescPtr /* desc */
+);
+
+extern Status XkbGetMapChanges(
+ Display * /* dpy */,
+ XkbDescPtr /* xkb */,
+ XkbMapChangesPtr /* changes */
+);
+
+
+extern Status XkbRefreshKeyboardMapping(
+ XkbMapNotifyEvent * /* event */
+);
+
+extern Status XkbGetKeyTypes(
+ Display * /* dpy */,
+ unsigned int /* first */,
+ unsigned int /* num */,
+ XkbDescPtr /* xkb */
+);
+
+extern Status XkbGetKeySyms(
+ Display * /* dpy */,
+ unsigned int /* first */,
+ unsigned int /* num */,
+ XkbDescPtr /* xkb */
+);
+
+extern Status XkbGetKeyActions(
+ Display * /* dpy */,
+ unsigned int /* first */,
+ unsigned int /* num */,
+ XkbDescPtr /* xkb */
+);
+
+extern Status XkbGetKeyBehaviors(
+ Display * /* dpy */,
+ unsigned int /* firstKey */,
+ unsigned int /* nKeys */,
+ XkbDescPtr /* desc */
+);
+
+extern Status XkbGetVirtualMods(
+ Display * /* dpy */,
+ unsigned int /* which */,
+ XkbDescPtr /* desc */
+);
+
+extern Status XkbGetKeyExplicitComponents(
+ Display * /* dpy */,
+ unsigned int /* firstKey */,
+ unsigned int /* nKeys */,
+ XkbDescPtr /* desc */
+);
+
+extern Status XkbGetKeyModifierMap(
+ Display * /* dpy */,
+ unsigned int /* firstKey */,
+ unsigned int /* nKeys */,
+ XkbDescPtr /* desc */
+);
+
+extern Status XkbGetKeyVirtualModMap(
+ Display * /* dpy */,
+ unsigned int /* first */,
+ unsigned int /* num */,
+ XkbDescPtr /* xkb */
+);
+
+extern Status XkbAllocControls(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which*/
+);
+
+extern void XkbFreeControls(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ Bool /* freeMap */
+);
+
+extern Status XkbGetControls(
+ Display * /* dpy */,
+ unsigned long /* which */,
+ XkbDescPtr /* desc */
+);
+
+extern Bool XkbSetControls(
+ Display * /* dpy */,
+ unsigned long /* which */,
+ XkbDescPtr /* desc */
+);
+
+extern void XkbNoteControlsChanges(
+ XkbControlsChangesPtr /* old */,
+ XkbControlsNotifyEvent * /* new */,
+ unsigned int /* wanted */
+);
+
+#define XkbGetControlsChanges(d,x,c) XkbGetControls(d,(c)->changed_ctrls,x)
+#define XkbChangeControls(d,x,c) XkbSetControls(d,(c)->changed_ctrls,x)
+
+extern Status XkbAllocCompatMap(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ unsigned int /* nInterpret */
+);
+
+extern void XkbFreeCompatMap(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ Bool /* freeMap */
+);
+
+extern Status XkbGetCompatMap(
+ Display * /* dpy */,
+ unsigned int /* which */,
+ XkbDescPtr /* xkb */
+);
+
+extern Bool XkbSetCompatMap(
+ Display * /* dpy */,
+ unsigned int /* which */,
+ XkbDescPtr /* xkb */,
+ Bool /* updateActions */
+);
+
+extern XkbSymInterpretPtr XkbAddSymInterpret(
+ XkbDescPtr /* xkb */,
+ XkbSymInterpretPtr /* si */,
+ Bool /* updateMap */,
+ XkbChangesPtr /* changes */
+);
+
+extern Status XkbAllocNames(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ int /* nTotalRG */,
+ int /* nTotalAliases */
+);
+
+extern Status XkbGetNames(
+ Display * /* dpy */,
+ unsigned int /* which */,
+ XkbDescPtr /* desc */
+);
+
+extern Bool XkbSetNames(
+ Display * /* dpy */,
+ unsigned int /* which */,
+ unsigned int /* firstType */,
+ unsigned int /* nTypes */,
+ XkbDescPtr /* desc */
+);
+
+extern Bool XkbChangeNames(
+ Display * /* dpy */,
+ XkbDescPtr /* xkb */,
+ XkbNameChangesPtr /* changes */
+);
+
+extern void XkbFreeNames(
+ XkbDescPtr /* xkb */,
+ unsigned int /* which */,
+ Bool /* freeMap */
+);
+
+
+extern Status XkbGetState(
+ Display * /* dpy */,
+ unsigned int /* deviceSpec */,
+ XkbStatePtr /* rtrnState */
+);
+
+extern Bool XkbSetMap(
+ Display * /* dpy */,
+ unsigned int /* which */,
+ XkbDescPtr /* desc */
+);
+
+extern Bool XkbChangeMap(
+ Display* /* dpy */,
+ XkbDescPtr /* desc */,
+ XkbMapChangesPtr /* changes */
+);
+
+extern Bool XkbSetDetectableAutoRepeat(
+ Display * /* dpy */,
+ Bool /* detectable */,
+ Bool * /* supported */
+);
+
+extern Bool XkbGetDetectableAutoRepeat(
+ Display * /* dpy */,
+ Bool * /* supported */
+);
+
+extern Bool XkbSetAutoResetControls(
+ Display * /* dpy */,
+ unsigned int /* changes */,
+ unsigned int * /* auto_ctrls */,
+ unsigned int * /* auto_values */
+);
+
+extern Bool XkbGetAutoResetControls(
+ Display * /* dpy */,
+ unsigned int * /* auto_ctrls */,
+ unsigned int * /* auto_ctrl_values */
+);
+
+extern Bool XkbSetPerClientControls(
+ Display * /* dpy */,
+ unsigned int /* change */,
+ unsigned int * /* values */
+);
+
+extern Bool XkbGetPerClientControls(
+ Display * /* dpy */,
+ unsigned int * /* ctrls */
+);
+
+extern Status XkbCopyKeyType(
+ XkbKeyTypePtr /* from */,
+ XkbKeyTypePtr /* into */
+);
+
+extern Status XkbCopyKeyTypes(
+ XkbKeyTypePtr /* from */,
+ XkbKeyTypePtr /* into */,
+ int /* num_types */
+);
+
+extern Status XkbResizeKeyType(
+ XkbDescPtr /* xkb */,
+ int /* type_ndx */,
+ int /* map_count */,
+ Bool /* want_preserve */,
+ int /* new_num_lvls */
+);
+
+extern KeySym *XkbResizeKeySyms(
+ XkbDescPtr /* desc */,
+ int /* forKey */,
+ int /* symsNeeded */
+);
+
+extern XkbAction *XkbResizeKeyActions(
+ XkbDescPtr /* desc */,
+ int /* forKey */,
+ int /* actsNeeded */
+);
+
+extern Status XkbChangeTypesOfKey(
+ XkbDescPtr /* xkb */,
+ int /* key */,
+ int /* num_groups */,
+ unsigned int /* groups */,
+ int * /* newTypes */,
+ XkbMapChangesPtr /* pChanges */
+);
+
+extern Status XkbChangeKeycodeRange(
+ XkbDescPtr /* xkb */,
+ int /* minKC */,
+ int /* maxKC */,
+ XkbChangesPtr /* changes */
+);
+
+/***====================================================================***/
+
+extern XkbComponentListPtr XkbListComponents(
+ Display * /* dpy */,
+ unsigned int /* deviceSpec */,
+ XkbComponentNamesPtr /* ptrns */,
+ int * /* max_inout */
+);
+
+extern void XkbFreeComponentList(
+ XkbComponentListPtr /* list */
+);
+
+extern XkbDescPtr XkbGetKeyboard(
+ Display * /* dpy */,
+ unsigned int /* which */,
+ unsigned int /* deviceSpec */
+);
+
+extern XkbDescPtr XkbGetKeyboardByName(
+ Display * /* dpy */,
+ unsigned int /* deviceSpec */,
+ XkbComponentNamesPtr /* names */,
+ unsigned int /* want */,
+ unsigned int /* need */,
+ Bool /* load */
+);
+
+/***====================================================================***/
+
+extern int XkbKeyTypesForCoreSymbols( /* returns # of groups */
+ XkbDescPtr /* xkb */, /* keyboard device */
+ int /* map_width */, /* width of core KeySym array */
+ KeySym * /* core_syms */, /* always mapWidth symbols */
+ unsigned int /* protected */, /* explicit key types */
+ int * /* types_inout */, /* always four type indices */
+ KeySym * /* xkb_syms_rtrn */ /* must have enough space */
+);
+
+extern Bool XkbApplyCompatMapToKey( /* False only on error */
+ XkbDescPtr /* xkb */, /* keymap to be edited */
+ KeyCode /* key */, /* key to be updated */
+ XkbChangesPtr /* changes */ /* resulting changes to map */
+);
+
+extern Bool XkbUpdateMapFromCore( /* False only on error */
+ XkbDescPtr /* xkb */, /* XKB keyboard to be edited */
+ KeyCode /* first_key */, /* first changed key */
+ int /* num_keys */, /* number of changed keys */
+ int /* map_width */, /* width of core keymap */
+ KeySym * /* core_keysyms */, /* symbols from core keymap */
+ XkbChangesPtr /* changes */ /* resulting changes */
+);
+
+/***====================================================================***/
+
+extern XkbDeviceLedInfoPtr XkbAddDeviceLedInfo(
+ XkbDeviceInfoPtr /* devi */,
+ unsigned int /* ledClass */,
+ unsigned int /* ledId */
+);
+
+extern Status XkbResizeDeviceButtonActions(
+ XkbDeviceInfoPtr /* devi */,
+ unsigned int /* newTotal */
+);
+
+extern XkbDeviceInfoPtr XkbAllocDeviceInfo(
+ unsigned int /* deviceSpec */,
+ unsigned int /* nButtons */,
+ unsigned int /* szLeds */
+);
+
+extern void XkbFreeDeviceInfo(
+ XkbDeviceInfoPtr /* devi */,
+ unsigned int /* which */,
+ Bool /* freeDevI */
+);
+
+extern void XkbNoteDeviceChanges(
+ XkbDeviceChangesPtr /* old */,
+ XkbExtensionDeviceNotifyEvent * /* new */,
+ unsigned int /* wanted */
+);
+
+extern XkbDeviceInfoPtr XkbGetDeviceInfo(
+ Display * /* dpy */,
+ unsigned int /* which */,
+ unsigned int /* deviceSpec */,
+ unsigned int /* ledClass */,
+ unsigned int /* ledID */
+);
+
+extern Status XkbGetDeviceInfoChanges(
+ Display * /* dpy */,
+ XkbDeviceInfoPtr /* devi */,
+ XkbDeviceChangesPtr /* changes */
+);
+
+extern Status XkbGetDeviceButtonActions(
+ Display * /* dpy */,
+ XkbDeviceInfoPtr /* devi */,
+ Bool /* all */,
+ unsigned int /* first */,
+ unsigned int /* nBtns */
+);
+
+extern Status XkbGetDeviceLedInfo(
+ Display * /* dpy */,
+ XkbDeviceInfoPtr /* devi */,
+ unsigned int /* ledClass (class, XIDflt, XIAll) */,
+ unsigned int /* ledId (id, XIDflt, XIAll) */,
+ unsigned int /* which (XkbXI_Indicator{Names,Map}Mask */
+);
+
+extern Bool XkbSetDeviceInfo(
+ Display * /* dpy */,
+ unsigned int /* which */,
+ XkbDeviceInfoPtr /* devi */
+);
+
+extern Bool XkbChangeDeviceInfo(
+ Display* /* dpy */,
+ XkbDeviceInfoPtr /* desc */,
+ XkbDeviceChangesPtr /* changes */
+);
+
+extern Bool XkbSetDeviceLedInfo(
+ Display * /* dpy */,
+ XkbDeviceInfoPtr /* devi */,
+ unsigned int /* ledClass */,
+ unsigned int /* ledID */,
+ unsigned int /* which */
+);
+
+extern Bool XkbSetDeviceButtonActions(
+ Display * /* dpy */,
+ XkbDeviceInfoPtr /* devi */,
+ unsigned int /* first */,
+ unsigned int /* nBtns */
+);
+
+/***====================================================================***/
+
+extern char XkbToControl(
+ char /* c */
+);
+
+/***====================================================================***/
+
+extern Bool XkbSetDebuggingFlags(
+ Display * /* dpy */,
+ unsigned int /* mask */,
+ unsigned int /* flags */,
+ char * /* msg */,
+ unsigned int /* ctrls_mask */,
+ unsigned int /* ctrls */,
+ unsigned int * /* rtrn_flags */,
+ unsigned int * /* rtrn_ctrls */
+);
+
+extern Bool XkbApplyVirtualModChanges(
+ XkbDescPtr /* xkb */,
+ unsigned int /* changed */,
+ XkbChangesPtr /* changes */
+);
+
+extern Bool XkbUpdateActionVirtualMods(
+ XkbDescPtr /* xkb */,
+ XkbAction * /* act */,
+ unsigned int /* changed */
+);
+
+extern void XkbUpdateKeyTypeVirtualMods(
+ XkbDescPtr /* xkb */,
+ XkbKeyTypePtr /* type */,
+ unsigned int /* changed */,
+ XkbChangesPtr /* changes */
+);
+
+_XFUNCPROTOEND
+
+#endif /* _X11_XKBLIB_H_ */
diff --git a/libX11/include/X11/Xcms.h b/libX11/include/X11/Xcms.h
index cea11ab48..327fdc1f7 100644
--- a/libX11/include/X11/Xcms.h
+++ b/libX11/include/X11/Xcms.h
@@ -1,803 +1,803 @@
-
-/*
- * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc.
- * All Rights Reserved
- *
- * This file is a component of an X Window System-specific implementation
- * of Xcms based on the TekColor Color Management System. Permission is
- * hereby granted to use, copy, modify, sell, and otherwise distribute this
- * software and its documentation for any purpose and without fee, provided
- * that this copyright, permission, and disclaimer notice is reproduced in
- * all copies of this software and in supporting documentation. TekColor
- * is a trademark of Tektronix, Inc.
- *
- * Tektronix makes no representation about the suitability of this software
- * for any purpose. It is provided "as is" and with all faults.
- *
- * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE,
- * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY
- * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
- * RESULTING FROM LOSS OF USE, DATA, OR PROFITS, WHETHER IN AN ACTION OF
- * CONTRACT, NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
- * CONNECTION WITH THE USE OR THE PERFORMANCE OF THIS SOFTWARE.
- *
- *
- * DESCRIPTION
- * Public include file for X Color Management System
- */
-#ifndef _XCMS_H_
-#define _XCMS_H_
-
-#include <X11/Xlib.h>
-
- /*
- * XCMS Status Values
- */
-#define XcmsFailure 0
-#define XcmsSuccess 1
-#define XcmsSuccessWithCompression 2
-
- /*
- * Color Space Format ID's
- * Color Space ID's are of XcmsColorFormat type.
- *
- * bit 31
- * 0 == Device-Independent
- * 1 == Device-Dependent
- *
- * bit 30:
- * 0 == Registered with X Consortium
- * 1 == Unregistered
- */
-#define XcmsUndefinedFormat (XcmsColorFormat)0x00000000
-#define XcmsCIEXYZFormat (XcmsColorFormat)0x00000001
-#define XcmsCIEuvYFormat (XcmsColorFormat)0x00000002
-#define XcmsCIExyYFormat (XcmsColorFormat)0x00000003
-#define XcmsCIELabFormat (XcmsColorFormat)0x00000004
-#define XcmsCIELuvFormat (XcmsColorFormat)0x00000005
-#define XcmsTekHVCFormat (XcmsColorFormat)0x00000006
-#define XcmsRGBFormat (XcmsColorFormat)0x80000000
-#define XcmsRGBiFormat (XcmsColorFormat)0x80000001
-
- /*
- * State of XcmsPerScrnInfo
- */
-#define XcmsInitNone 0x00 /* no initialization attempted */
-#define XcmsInitSuccess 0x01 /* initialization successful */
-#define XcmsInitFailure 0xff /* failure, use defaults */
-
-#define DisplayOfCCC(ccc) ((ccc)->dpy)
-#define ScreenNumberOfCCC(ccc) ((ccc)->screenNumber)
-#define VisualOfCCC(ccc) ((ccc)->visual)
-#define ClientWhitePointOfCCC(ccc) (&(ccc)->clientWhitePt)
-#define ScreenWhitePointOfCCC(ccc) (&(ccc)->pPerScrnInfo->screenWhitePt)
-#define FunctionSetOfCCC(ccc) ((ccc)->pPerScrnInfo->functionSet)
-
-typedef unsigned long XcmsColorFormat; /* Color Space Format ID */
-
-typedef double XcmsFloat;
-
- /*
- * Device RGB
- */
-typedef struct {
- unsigned short red; /* scaled from 0x0000 to 0xffff */
- unsigned short green; /* scaled from 0x0000 to 0xffff */
- unsigned short blue; /* scaled from 0x0000 to 0xffff */
-} XcmsRGB;
-
- /*
- * RGB Intensity
- */
-typedef struct {
- XcmsFloat red; /* 0.0 - 1.0 */
- XcmsFloat green; /* 0.0 - 1.0 */
- XcmsFloat blue; /* 0.0 - 1.0 */
-} XcmsRGBi;
-
- /*
- * CIE XYZ
- */
-typedef struct {
- XcmsFloat X;
- XcmsFloat Y;
- XcmsFloat Z;
-} XcmsCIEXYZ;
-
- /*
- * CIE u'v'Y
- */
-typedef struct {
- XcmsFloat u_prime; /* 0.0 - 1.0 */
- XcmsFloat v_prime; /* 0.0 - 1.0 */
- XcmsFloat Y; /* 0.0 - 1.0 */
-} XcmsCIEuvY;
-
- /*
- * CIE xyY
- */
-typedef struct {
- XcmsFloat x; /* 0.0 - 1.0 */
- XcmsFloat y; /* 0.0 - 1.0 */
- XcmsFloat Y; /* 0.0 - 1.0 */
-} XcmsCIExyY;
-
- /*
- * CIE L*a*b*
- */
-typedef struct {
- XcmsFloat L_star; /* 0.0 - 100.0 */
- XcmsFloat a_star;
- XcmsFloat b_star;
-} XcmsCIELab;
-
- /*
- * CIE L*u*v*
- */
-typedef struct {
- XcmsFloat L_star; /* 0.0 - 100.0 */
- XcmsFloat u_star;
- XcmsFloat v_star;
-} XcmsCIELuv;
-
- /*
- * TekHVC
- */
-typedef struct {
- XcmsFloat H; /* 0.0 - 360.0 */
- XcmsFloat V; /* 0.0 - 100.0 */
- XcmsFloat C; /* 0.0 - 100.0 */
-} XcmsTekHVC;
-
- /*
- * PAD
- */
-typedef struct {
- XcmsFloat pad0;
- XcmsFloat pad1;
- XcmsFloat pad2;
- XcmsFloat pad3;
-} XcmsPad;
-
-
- /*
- * XCMS Color Structure
- */
-typedef struct {
- union {
- XcmsRGB RGB;
- XcmsRGBi RGBi;
- XcmsCIEXYZ CIEXYZ;
- XcmsCIEuvY CIEuvY;
- XcmsCIExyY CIExyY;
- XcmsCIELab CIELab;
- XcmsCIELuv CIELuv;
- XcmsTekHVC TekHVC;
- XcmsPad Pad;
- } spec; /* the color specification */
- unsigned long pixel; /* pixel value (as needed) */
- XcmsColorFormat format; /* the specification format */
-} XcmsColor;
-
-
- /*
- * XCMS Per Screen related data
- */
-
-typedef struct _XcmsPerScrnInfo {
- XcmsColor screenWhitePt; /* Screen White point */
- XPointer functionSet; /* pointer to Screen Color Characterization */
- /* Function Set structure */
- XPointer screenData; /* pointer to corresponding Screen Color*/
- /* Characterization Data */
- unsigned char state; /* XcmsInitNone, XcmsInitSuccess, XcmsInitFailure */
- char pad[3];
-} XcmsPerScrnInfo;
-
-typedef struct _XcmsCCC *XcmsCCC;
-
-typedef Status (*XcmsCompressionProc)( /* Gamut Compression Proc */
- XcmsCCC /* ccc */,
- XcmsColor* /* colors_in_out */,
- unsigned int /* ncolors */,
- unsigned int /* index */,
- Bool* /* compression_flags_return */
-);
-
-typedef Status (*XcmsWhiteAdjustProc)( /* White Point Adjust Proc */
- XcmsCCC /* ccc */,
- XcmsColor* /* initial_white_point*/,
- XcmsColor* /* target_white_point*/,
- XcmsColorFormat /* target_format */,
- XcmsColor* /* colors_in_out */,
- unsigned int /* ncolors */,
- Bool* /* compression_flags_return */
-);
-
- /*
- * XCMS Color Conversion Context
- */
-typedef struct _XcmsCCC {
- Display *dpy; /* X Display */
- int screenNumber; /* X screen number */
- Visual *visual; /* X Visual */
- XcmsColor clientWhitePt; /* Client White Point */
- XcmsCompressionProc gamutCompProc; /* Gamut Compression Function */
- XPointer gamutCompClientData; /* Gamut Comp Func Client Data */
- XcmsWhiteAdjustProc whitePtAdjProc; /* White Point Adjustment Function */
- XPointer whitePtAdjClientData; /* White Pt Adj Func Client Data */
- XcmsPerScrnInfo *pPerScrnInfo; /* pointer to per screen information */
- /* associated with the above display */
- /* screenNumber */
-} XcmsCCCRec;
-
-typedef Status (*XcmsScreenInitProc)( /* Screen Initialization Proc */
- Display* /* dpy */,
- int /* screen_number */,
- XcmsPerScrnInfo* /* screen_info */
-);
-
-typedef void (*XcmsScreenFreeProc)(
- XPointer /* screenData */
-);
-
- /*
- * 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 (*XcmsDDConversionProc)( /* using device-dependent version */
- XcmsCCC /* ccc */,
- XcmsColor* /* pcolors_in_out */,
- unsigned int /* ncolors */,
- Bool* /* pCompressed */
- );
-
-typedef Status (*XcmsDIConversionProc)( /* using device-independent version */
- XcmsCCC /* ccc */,
- XcmsColor* /* white_point */,
- XcmsColor* /* pcolors_in_out */,
- unsigned int /* ncolors */
- );
-
-typedef XcmsDIConversionProc XcmsConversionProc;
-typedef XcmsConversionProc *XcmsFuncListPtr;
-
-typedef int (*XcmsParseStringProc)( /* Color String Parsing Proc */
- char* /* color_string */,
- XcmsColor* /* color_return */
-);
-
- /*
- * Color Space -- per Color Space related data (Device-Independent
- * or Device-Dependent)
- */
-typedef struct _XcmsColorSpace {
- const char *prefix; /* Prefix of string format. */
- XcmsColorFormat id; /* Format ID number. */
- XcmsParseStringProc parseString;
- /* String format parsing function */
- XcmsFuncListPtr to_CIEXYZ; /* Pointer to an array of function */
- /* pointers such that when the */
- /* functions are executed in sequence */
- /* will convert a XcmsColor structure */
- /* from this color space to CIEXYZ */
- /* space. */
- XcmsFuncListPtr from_CIEXYZ;/* Pointer to an array of function */
- /* pointers such that when the */
- /* functions are executed in sequence */
- /* will convert a XcmsColor structure */
- /* from CIEXYZ space to this color */
- /* space. */
- int inverse_flag; /* If 1, indicates that for 0 <= i < n */
- /* where n is the number of function */
- /* pointers in the lists to_CIEXYZ */
- /* and from_CIEXYZ; for each function */
- /* to_CIEXYZ[i] its inverse function */
- /* is from_CIEXYZ[n - i]. */
-
-} XcmsColorSpace;
-
- /*
- * Screen Color Characterization Function Set -- per device class
- * color space conversion functions.
- */
-typedef struct _XcmsFunctionSet {
- XcmsColorSpace **DDColorSpaces;
- /* Pointer to an array of pointers to */
- /* Device-DEPENDENT color spaces */
- /* understood by this SCCFuncSet. */
- XcmsScreenInitProc screenInitProc;
- /* Screen initialization function that */
- /* reads Screen Color Characterization*/
- /* Data off properties on the screen's*/
- /* root window. */
- XcmsScreenFreeProc screenFreeProc;
- /* Function that frees the SCCData */
- /* structures. */
-} XcmsFunctionSet;
-
-_XFUNCPROTOBEGIN
-
-extern Status XcmsAddColorSpace (
- XcmsColorSpace* /* pColorSpace */
-);
-
-extern Status XcmsAddFunctionSet (
- XcmsFunctionSet* /* functionSet */
-);
-
-extern Status XcmsAllocColor (
- Display* /* dpy */,
- Colormap /* colormap */,
- XcmsColor* /* color_in_out */,
- XcmsColorFormat /* result_format */
-);
-
-extern Status XcmsAllocNamedColor (
- Display* /* dpy */,
- Colormap /* colormap */,
- _Xconst char* /* color_string */,
- XcmsColor* /* color_scrn_return */,
- XcmsColor* /* color_exact_return */,
- XcmsColorFormat /* result_format */
-);
-
-extern XcmsCCC XcmsCCCOfColormap (
- Display* /* dpy */,
- Colormap /* colormap */
-);
-
-extern Status XcmsCIELabClipab(
- XcmsCCC /* ccc */,
- XcmsColor* /* colors_in_out */,
- unsigned int /* ncolors */,
- unsigned int /* index */,
- Bool* /* compression_flags_return */
-);
-
-extern Status XcmsCIELabClipL(
- XcmsCCC /* ccc */,
- XcmsColor* /* colors_in_out */,
- unsigned int /* ncolors */,
- unsigned int /* index */,
- Bool* /* compression_flags_return */
-);
-
-extern Status XcmsCIELabClipLab(
- XcmsCCC /* ccc */,
- XcmsColor* /* colors_in_out */,
- unsigned int /* ncolors */,
- unsigned int /* index */,
- Bool* /* compression_flags_return */
-);
-
-extern Status XcmsCIELabQueryMaxC (
- XcmsCCC /* ccc */,
- XcmsFloat /* hue_angle */,
- XcmsFloat /* L_star */,
- XcmsColor* /* color_return */
-);
-
-extern Status XcmsCIELabQueryMaxL (
- XcmsCCC /* ccc */,
- XcmsFloat /* hue_angle */,
- XcmsFloat /* chroma */,
- XcmsColor* /* color_return */
-);
-
-extern Status XcmsCIELabQueryMaxLC (
- XcmsCCC /* ccc */,
- XcmsFloat /* hue_angle */,
- XcmsColor* /* color_return */
-);
-
-extern Status XcmsCIELabQueryMinL (
- XcmsCCC /* ccc */,
- XcmsFloat /* hue_angle */,
- XcmsFloat /* chroma */,
- XcmsColor* /* color_return */
-);
-
-extern Status XcmsCIELabToCIEXYZ (
- XcmsCCC /* ccc */,
- XcmsColor* /* white_point */,
- XcmsColor* /* colors */,
- unsigned int /* ncolors */
-);
-
-extern Status XcmsCIELabWhiteShiftColors(
- XcmsCCC /* ccc */,
- XcmsColor* /* initial_white_point*/,
- XcmsColor* /* target_white_point*/,
- XcmsColorFormat /* target_format */,
- XcmsColor* /* colors_in_out */,
- unsigned int /* ncolors */,
- Bool* /* compression_flags_return */
-);
-
-extern Status XcmsCIELuvClipL(
- XcmsCCC /* ccc */,
- XcmsColor* /* colors_in_out */,
- unsigned int /* ncolors */,
- unsigned int /* index */,
- Bool* /* compression_flags_return */
-);
-
-extern Status XcmsCIELuvClipLuv(
- XcmsCCC /* ccc */,
- XcmsColor* /* colors_in_out */,
- unsigned int /* ncolors */,
- unsigned int /* index */,
- Bool* /* compression_flags_return */
-);
-
-extern Status XcmsCIELuvClipuv(
- XcmsCCC /* ccc */,
- XcmsColor* /* colors_in_out */,
- unsigned int /* ncolors */,
- unsigned int /* index */,
- Bool* /* compression_flags_return */
-);
-
-extern Status XcmsCIELuvQueryMaxC (
- XcmsCCC /* ccc */,
- XcmsFloat /* hue_angle */,
- XcmsFloat /* L_star */,
- XcmsColor* /* color_return */
-);
-
-extern Status XcmsCIELuvQueryMaxL (
- XcmsCCC /* ccc */,
- XcmsFloat /* hue_angle */,
- XcmsFloat /* chroma */,
- XcmsColor* /* color_return */
-);
-
-extern Status XcmsCIELuvQueryMaxLC (
- XcmsCCC /* ccc */,
- XcmsFloat /* hue_angle */,
- XcmsColor* /* color_return */
-);
-
-extern Status XcmsCIELuvQueryMinL (
- XcmsCCC /* ccc */,
- XcmsFloat /* hue_angle */,
- XcmsFloat /* chroma */,
- XcmsColor* /* color_return */
-);
-
-extern Status XcmsCIELuvToCIEuvY (
- XcmsCCC /* ccc */,
- XcmsColor* /* white_point */,
- XcmsColor* /* colors */,
- unsigned int /* ncolors */
-);
-
-extern Status XcmsCIELuvWhiteShiftColors(
- XcmsCCC /* ccc */,
- XcmsColor* /* initial_white_point*/,
- XcmsColor* /* target_white_point*/,
- XcmsColorFormat /* target_format */,
- XcmsColor* /* colors_in_out */,
- unsigned int /* ncolors */,
- Bool* /* compression_flags_return */
-);
-
-extern Status XcmsCIEXYZToCIELab (
- XcmsCCC /* ccc */,
- XcmsColor* /* white_point */,
- XcmsColor* /* colors */,
- unsigned int /* ncolors */
-);
-
-extern Status XcmsCIEXYZToCIEuvY (
- XcmsCCC /* ccc */,
- XcmsColor* /* white_point */,
- XcmsColor* /* colors */,
- unsigned int /* ncolors */
-);
-
-extern Status XcmsCIEXYZToCIExyY (
- XcmsCCC /* ccc */,
- XcmsColor* /* white_point */,
- XcmsColor* /* colors */,
- unsigned int /* ncolors */
-);
-
-extern Status XcmsCIEXYZToRGBi (
- XcmsCCC /* ccc */,
- XcmsColor* /* colors */,
- unsigned int /* ncolors */,
- Bool* /* compression_flags_return */
-);
-
-extern Status XcmsCIEuvYToCIELuv (
- XcmsCCC /* ccc */,
- XcmsColor* /* white_point */,
- XcmsColor* /* colors */,
- unsigned int /* ncolors */
-);
-
-extern Status XcmsCIEuvYToCIEXYZ (
- XcmsCCC /* ccc */,
- XcmsColor* /* white_point */,
- XcmsColor* /* colors */,
- unsigned int /* ncolors */
-);
-
-extern Status XcmsCIEuvYToTekHVC (
- XcmsCCC /* ccc */,
- XcmsColor* /* white_point */,
- XcmsColor* /* colors */,
- unsigned int /* ncolors */
-);
-
-extern Status XcmsCIExyYToCIEXYZ (
- XcmsCCC /* ccc */,
- XcmsColor* /* white_point */,
- XcmsColor* /* colors */,
- unsigned int /* ncolors */
-);
-
-extern XcmsColor *XcmsClientWhitePointOfCCC (
- XcmsCCC /* ccc */
-);
-
-extern Status XcmsConvertColors (
- XcmsCCC /* ccc */,
- XcmsColor* /* colorArry_in_out */,
- unsigned int /* nColors */,
- XcmsColorFormat /* targetFormat */,
- Bool* /* compArry_return */
-);
-
-extern XcmsCCC XcmsCreateCCC (
- Display* /* dpy */,
- int /* screenNumber */,
- Visual* /* visual */,
- XcmsColor* /* clientWhitePt */,
- XcmsCompressionProc /* gamutCompProc */,
- XPointer /* gamutCompClientData */,
- XcmsWhiteAdjustProc /* whitePtAdjProc */,
- XPointer /* whitePtAdjClientData */
-);
-
-extern XcmsCCC XcmsDefaultCCC (
- Display* /* dpy */,
- int /* screenNumber */
-);
-
-extern Display *XcmsDisplayOfCCC (
- XcmsCCC /* ccc */
-);
-
-extern XcmsColorFormat XcmsFormatOfPrefix (
- char* /* prefix */
-);
-
-extern void XcmsFreeCCC (
- XcmsCCC /* ccc */
-);
-
-extern Status XcmsLookupColor (
- Display* /* dpy */,
- Colormap /* colormap */,
- _Xconst char* /* color_string */,
- XcmsColor* /* pColor_exact_in_out */,
- XcmsColor* /* pColor_scrn_in_out */,
- XcmsColorFormat /* result_format */
-);
-
-extern char *XcmsPrefixOfFormat (
- XcmsColorFormat /* id */
-);
-
-extern Status XcmsQueryBlack (
- XcmsCCC /* ccc */,
- XcmsColorFormat /* target_format */,
- XcmsColor* /* color_return */
-);
-
-extern Status XcmsQueryBlue (
- XcmsCCC /* ccc */,
- XcmsColorFormat /* target_format */,
- XcmsColor* /* color_return */
-);
-
-extern Status XcmsQueryColor (
- Display* /* dpy */,
- Colormap /* colormap */,
- XcmsColor* /* pColor_in_out */,
- XcmsColorFormat /* result_format */
-);
-
-extern Status XcmsQueryColors (
- Display* /* dpy */,
- Colormap /* colormap */,
- XcmsColor* /* colorArry_in_out */,
- unsigned int /* nColors */,
- XcmsColorFormat /* result_format */
-);
-
-extern Status XcmsQueryGreen (
- XcmsCCC /* ccc */,
- XcmsColorFormat /* target_format */,
- XcmsColor* /* color_return */
-);
-
-extern Status XcmsQueryRed (
- XcmsCCC /* ccc */,
- XcmsColorFormat /* target_format */,
- XcmsColor* /* color_return */
-);
-
-extern Status XcmsQueryWhite (
- XcmsCCC /* ccc */,
- XcmsColorFormat /* target_format */,
- XcmsColor* /* color_return */
-);
-
-extern Status XcmsRGBiToCIEXYZ (
- XcmsCCC /* ccc */,
- XcmsColor* /* colors */,
- unsigned int /* ncolors */,
- Bool* /* compression_flags_return */
-);
-
-extern Status XcmsRGBiToRGB (
- XcmsCCC /* ccc */,
- XcmsColor* /* colors */,
- unsigned int /* ncolors */,
- Bool* /* compression_flags_return */
-);
-
-extern Status XcmsRGBToRGBi (
- XcmsCCC /* ccc */,
- XcmsColor* /* colors */,
- unsigned int /* ncolors */,
- Bool* /* compression_flags_return */
-);
-
-extern int XcmsScreenNumberOfCCC (
- XcmsCCC /* ccc */
-);
-
-extern XcmsColor *XcmsScreenWhitePointOfCCC (
- XcmsCCC /* ccc */
-);
-
-extern XcmsCCC XcmsSetCCCOfColormap(
- Display* /* dpy */,
- Colormap /* colormap */,
- XcmsCCC /* ccc */
-);
-
-extern XcmsCompressionProc XcmsSetCompressionProc (
- XcmsCCC /* ccc */,
- XcmsCompressionProc /* compression_proc */,
- XPointer /* client_data */
-);
-
-extern XcmsWhiteAdjustProc XcmsSetWhiteAdjustProc (
- XcmsCCC /* ccc */,
- XcmsWhiteAdjustProc /* white_adjust_proc */,
- XPointer /* client_data */
-);
-
-extern Status XcmsSetWhitePoint (
- XcmsCCC /* ccc */,
- XcmsColor* /* color */
-);
-
-extern Status XcmsStoreColor (
- Display* /* dpy */,
- Colormap /* colormap */,
- XcmsColor* /* pColor_in */
-);
-
-extern Status XcmsStoreColors (
- Display* /* dpy */,
- Colormap /* colormap */,
- XcmsColor* /* colorArry_in */,
- unsigned int /* nColors */,
- Bool* /* compArry_return */
-);
-
-extern Status XcmsTekHVCClipC(
- XcmsCCC /* ccc */,
- XcmsColor* /* colors_in_out */,
- unsigned int /* ncolors */,
- unsigned int /* index */,
- Bool* /* compression_flags_return */
-);
-
-extern Status XcmsTekHVCClipV(
- XcmsCCC /* ccc */,
- XcmsColor* /* colors_in_out */,
- unsigned int /* ncolors */,
- unsigned int /* index */,
- Bool* /* compression_flags_return */
-);
-
-extern Status XcmsTekHVCClipVC(
- XcmsCCC /* ccc */,
- XcmsColor* /* colors_in_out */,
- unsigned int /* ncolors */,
- unsigned int /* index */,
- Bool* /* compression_flags_return */
-);
-
-extern Status XcmsTekHVCQueryMaxC (
- XcmsCCC /* ccc */,
- XcmsFloat /* hue */,
- XcmsFloat /* value */,
- XcmsColor* /* color_return */
-);
-
-extern Status XcmsTekHVCQueryMaxV (
- XcmsCCC /* ccc */,
- XcmsFloat /* hue */,
- XcmsFloat /* chroma */,
- XcmsColor* /* color_return */
-);
-
-extern Status XcmsTekHVCQueryMaxVC (
- XcmsCCC /* ccc */,
- XcmsFloat /* hue */,
- XcmsColor* /* color_return */
-);
-
-extern Status XcmsTekHVCQueryMaxVSamples (
- XcmsCCC /* ccc */,
- XcmsFloat /* hue */,
- XcmsColor* /* colors_return */,
- unsigned int /* nsamples */
-);
-
-extern Status XcmsTekHVCQueryMinV (
- XcmsCCC /* ccc */,
- XcmsFloat /* hue */,
- XcmsFloat /* chroma */,
- XcmsColor* /* color_return */
-);
-
-extern Status XcmsTekHVCToCIEuvY (
- XcmsCCC /* ccc */,
- XcmsColor* /* white_point */,
- XcmsColor* /* colors */,
- unsigned int /* ncolors */
-);
-
-extern Status XcmsTekHVCWhiteShiftColors(
- XcmsCCC /* ccc */,
- XcmsColor* /* initial_white_point*/,
- XcmsColor* /* target_white_point*/,
- XcmsColorFormat /* target_format */,
- XcmsColor* /* colors_in_out */,
- unsigned int /* ncolors */,
- Bool* /* compression_flags_return */
-);
-
-extern Visual *XcmsVisualOfCCC (
- XcmsCCC /* ccc */
-);
-
-_XFUNCPROTOEND
-
-#endif /* _XCMS_H_ */
+
+/*
+ * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc.
+ * All Rights Reserved
+ *
+ * This file is a component of an X Window System-specific implementation
+ * of Xcms based on the TekColor Color Management System. Permission is
+ * hereby granted to use, copy, modify, sell, and otherwise distribute this
+ * software and its documentation for any purpose and without fee, provided
+ * that this copyright, permission, and disclaimer notice is reproduced in
+ * all copies of this software and in supporting documentation. TekColor
+ * is a trademark of Tektronix, Inc.
+ *
+ * Tektronix makes no representation about the suitability of this software
+ * for any purpose. It is provided "as is" and with all faults.
+ *
+ * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE,
+ * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
+ * RESULTING FROM LOSS OF USE, DATA, OR PROFITS, WHETHER IN AN ACTION OF
+ * CONTRACT, NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR THE PERFORMANCE OF THIS SOFTWARE.
+ *
+ *
+ * DESCRIPTION
+ * Public include file for X Color Management System
+ */
+#ifndef _X11_XCMS_H_
+#define _X11_XCMS_H_
+
+#include <X11/Xlib.h>
+
+ /*
+ * XCMS Status Values
+ */
+#define XcmsFailure 0
+#define XcmsSuccess 1
+#define XcmsSuccessWithCompression 2
+
+ /*
+ * Color Space Format ID's
+ * Color Space ID's are of XcmsColorFormat type.
+ *
+ * bit 31
+ * 0 == Device-Independent
+ * 1 == Device-Dependent
+ *
+ * bit 30:
+ * 0 == Registered with X Consortium
+ * 1 == Unregistered
+ */
+#define XcmsUndefinedFormat (XcmsColorFormat)0x00000000
+#define XcmsCIEXYZFormat (XcmsColorFormat)0x00000001
+#define XcmsCIEuvYFormat (XcmsColorFormat)0x00000002
+#define XcmsCIExyYFormat (XcmsColorFormat)0x00000003
+#define XcmsCIELabFormat (XcmsColorFormat)0x00000004
+#define XcmsCIELuvFormat (XcmsColorFormat)0x00000005
+#define XcmsTekHVCFormat (XcmsColorFormat)0x00000006
+#define XcmsRGBFormat (XcmsColorFormat)0x80000000
+#define XcmsRGBiFormat (XcmsColorFormat)0x80000001
+
+ /*
+ * State of XcmsPerScrnInfo
+ */
+#define XcmsInitNone 0x00 /* no initialization attempted */
+#define XcmsInitSuccess 0x01 /* initialization successful */
+#define XcmsInitFailure 0xff /* failure, use defaults */
+
+#define DisplayOfCCC(ccc) ((ccc)->dpy)
+#define ScreenNumberOfCCC(ccc) ((ccc)->screenNumber)
+#define VisualOfCCC(ccc) ((ccc)->visual)
+#define ClientWhitePointOfCCC(ccc) (&(ccc)->clientWhitePt)
+#define ScreenWhitePointOfCCC(ccc) (&(ccc)->pPerScrnInfo->screenWhitePt)
+#define FunctionSetOfCCC(ccc) ((ccc)->pPerScrnInfo->functionSet)
+
+typedef unsigned long XcmsColorFormat; /* Color Space Format ID */
+
+typedef double XcmsFloat;
+
+ /*
+ * Device RGB
+ */
+typedef struct {
+ unsigned short red; /* scaled from 0x0000 to 0xffff */
+ unsigned short green; /* scaled from 0x0000 to 0xffff */
+ unsigned short blue; /* scaled from 0x0000 to 0xffff */
+} XcmsRGB;
+
+ /*
+ * RGB Intensity
+ */
+typedef struct {
+ XcmsFloat red; /* 0.0 - 1.0 */
+ XcmsFloat green; /* 0.0 - 1.0 */
+ XcmsFloat blue; /* 0.0 - 1.0 */
+} XcmsRGBi;
+
+ /*
+ * CIE XYZ
+ */
+typedef struct {
+ XcmsFloat X;
+ XcmsFloat Y;
+ XcmsFloat Z;
+} XcmsCIEXYZ;
+
+ /*
+ * CIE u'v'Y
+ */
+typedef struct {
+ XcmsFloat u_prime; /* 0.0 - 1.0 */
+ XcmsFloat v_prime; /* 0.0 - 1.0 */
+ XcmsFloat Y; /* 0.0 - 1.0 */
+} XcmsCIEuvY;
+
+ /*
+ * CIE xyY
+ */
+typedef struct {
+ XcmsFloat x; /* 0.0 - 1.0 */
+ XcmsFloat y; /* 0.0 - 1.0 */
+ XcmsFloat Y; /* 0.0 - 1.0 */
+} XcmsCIExyY;
+
+ /*
+ * CIE L*a*b*
+ */
+typedef struct {
+ XcmsFloat L_star; /* 0.0 - 100.0 */
+ XcmsFloat a_star;
+ XcmsFloat b_star;
+} XcmsCIELab;
+
+ /*
+ * CIE L*u*v*
+ */
+typedef struct {
+ XcmsFloat L_star; /* 0.0 - 100.0 */
+ XcmsFloat u_star;
+ XcmsFloat v_star;
+} XcmsCIELuv;
+
+ /*
+ * TekHVC
+ */
+typedef struct {
+ XcmsFloat H; /* 0.0 - 360.0 */
+ XcmsFloat V; /* 0.0 - 100.0 */
+ XcmsFloat C; /* 0.0 - 100.0 */
+} XcmsTekHVC;
+
+ /*
+ * PAD
+ */
+typedef struct {
+ XcmsFloat pad0;
+ XcmsFloat pad1;
+ XcmsFloat pad2;
+ XcmsFloat pad3;
+} XcmsPad;
+
+
+ /*
+ * XCMS Color Structure
+ */
+typedef struct {
+ union {
+ XcmsRGB RGB;
+ XcmsRGBi RGBi;
+ XcmsCIEXYZ CIEXYZ;
+ XcmsCIEuvY CIEuvY;
+ XcmsCIExyY CIExyY;
+ XcmsCIELab CIELab;
+ XcmsCIELuv CIELuv;
+ XcmsTekHVC TekHVC;
+ XcmsPad Pad;
+ } spec; /* the color specification */
+ unsigned long pixel; /* pixel value (as needed) */
+ XcmsColorFormat format; /* the specification format */
+} XcmsColor;
+
+
+ /*
+ * XCMS Per Screen related data
+ */
+
+typedef struct _XcmsPerScrnInfo {
+ XcmsColor screenWhitePt; /* Screen White point */
+ XPointer functionSet; /* pointer to Screen Color Characterization */
+ /* Function Set structure */
+ XPointer screenData; /* pointer to corresponding Screen Color*/
+ /* Characterization Data */
+ unsigned char state; /* XcmsInitNone, XcmsInitSuccess, XcmsInitFailure */
+ char pad[3];
+} XcmsPerScrnInfo;
+
+typedef struct _XcmsCCC *XcmsCCC;
+
+typedef Status (*XcmsCompressionProc)( /* Gamut Compression Proc */
+ XcmsCCC /* ccc */,
+ XcmsColor* /* colors_in_out */,
+ unsigned int /* ncolors */,
+ unsigned int /* index */,
+ Bool* /* compression_flags_return */
+);
+
+typedef Status (*XcmsWhiteAdjustProc)( /* White Point Adjust Proc */
+ XcmsCCC /* ccc */,
+ XcmsColor* /* initial_white_point*/,
+ XcmsColor* /* target_white_point*/,
+ XcmsColorFormat /* target_format */,
+ XcmsColor* /* colors_in_out */,
+ unsigned int /* ncolors */,
+ Bool* /* compression_flags_return */
+);
+
+ /*
+ * XCMS Color Conversion Context
+ */
+typedef struct _XcmsCCC {
+ Display *dpy; /* X Display */
+ int screenNumber; /* X screen number */
+ Visual *visual; /* X Visual */
+ XcmsColor clientWhitePt; /* Client White Point */
+ XcmsCompressionProc gamutCompProc; /* Gamut Compression Function */
+ XPointer gamutCompClientData; /* Gamut Comp Func Client Data */
+ XcmsWhiteAdjustProc whitePtAdjProc; /* White Point Adjustment Function */
+ XPointer whitePtAdjClientData; /* White Pt Adj Func Client Data */
+ XcmsPerScrnInfo *pPerScrnInfo; /* pointer to per screen information */
+ /* associated with the above display */
+ /* screenNumber */
+} XcmsCCCRec;
+
+typedef Status (*XcmsScreenInitProc)( /* Screen Initialization Proc */
+ Display* /* dpy */,
+ int /* screen_number */,
+ XcmsPerScrnInfo* /* screen_info */
+);
+
+typedef void (*XcmsScreenFreeProc)(
+ XPointer /* screenData */
+);
+
+ /*
+ * 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 (*XcmsDDConversionProc)( /* using device-dependent version */
+ XcmsCCC /* ccc */,
+ XcmsColor* /* pcolors_in_out */,
+ unsigned int /* ncolors */,
+ Bool* /* pCompressed */
+ );
+
+typedef Status (*XcmsDIConversionProc)( /* using device-independent version */
+ XcmsCCC /* ccc */,
+ XcmsColor* /* white_point */,
+ XcmsColor* /* pcolors_in_out */,
+ unsigned int /* ncolors */
+ );
+
+typedef XcmsDIConversionProc XcmsConversionProc;
+typedef XcmsConversionProc *XcmsFuncListPtr;
+
+typedef int (*XcmsParseStringProc)( /* Color String Parsing Proc */
+ char* /* color_string */,
+ XcmsColor* /* color_return */
+);
+
+ /*
+ * Color Space -- per Color Space related data (Device-Independent
+ * or Device-Dependent)
+ */
+typedef struct _XcmsColorSpace {
+ const char *prefix; /* Prefix of string format. */
+ XcmsColorFormat id; /* Format ID number. */
+ XcmsParseStringProc parseString;
+ /* String format parsing function */
+ XcmsFuncListPtr to_CIEXYZ; /* Pointer to an array of function */
+ /* pointers such that when the */
+ /* functions are executed in sequence */
+ /* will convert a XcmsColor structure */
+ /* from this color space to CIEXYZ */
+ /* space. */
+ XcmsFuncListPtr from_CIEXYZ;/* Pointer to an array of function */
+ /* pointers such that when the */
+ /* functions are executed in sequence */
+ /* will convert a XcmsColor structure */
+ /* from CIEXYZ space to this color */
+ /* space. */
+ int inverse_flag; /* If 1, indicates that for 0 <= i < n */
+ /* where n is the number of function */
+ /* pointers in the lists to_CIEXYZ */
+ /* and from_CIEXYZ; for each function */
+ /* to_CIEXYZ[i] its inverse function */
+ /* is from_CIEXYZ[n - i]. */
+
+} XcmsColorSpace;
+
+ /*
+ * Screen Color Characterization Function Set -- per device class
+ * color space conversion functions.
+ */
+typedef struct _XcmsFunctionSet {
+ XcmsColorSpace **DDColorSpaces;
+ /* Pointer to an array of pointers to */
+ /* Device-DEPENDENT color spaces */
+ /* understood by this SCCFuncSet. */
+ XcmsScreenInitProc screenInitProc;
+ /* Screen initialization function that */
+ /* reads Screen Color Characterization*/
+ /* Data off properties on the screen's*/
+ /* root window. */
+ XcmsScreenFreeProc screenFreeProc;
+ /* Function that frees the SCCData */
+ /* structures. */
+} XcmsFunctionSet;
+
+_XFUNCPROTOBEGIN
+
+extern Status XcmsAddColorSpace (
+ XcmsColorSpace* /* pColorSpace */
+);
+
+extern Status XcmsAddFunctionSet (
+ XcmsFunctionSet* /* functionSet */
+);
+
+extern Status XcmsAllocColor (
+ Display* /* dpy */,
+ Colormap /* colormap */,
+ XcmsColor* /* color_in_out */,
+ XcmsColorFormat /* result_format */
+);
+
+extern Status XcmsAllocNamedColor (
+ Display* /* dpy */,
+ Colormap /* colormap */,
+ _Xconst char* /* color_string */,
+ XcmsColor* /* color_scrn_return */,
+ XcmsColor* /* color_exact_return */,
+ XcmsColorFormat /* result_format */
+);
+
+extern XcmsCCC XcmsCCCOfColormap (
+ Display* /* dpy */,
+ Colormap /* colormap */
+);
+
+extern Status XcmsCIELabClipab(
+ XcmsCCC /* ccc */,
+ XcmsColor* /* colors_in_out */,
+ unsigned int /* ncolors */,
+ unsigned int /* index */,
+ Bool* /* compression_flags_return */
+);
+
+extern Status XcmsCIELabClipL(
+ XcmsCCC /* ccc */,
+ XcmsColor* /* colors_in_out */,
+ unsigned int /* ncolors */,
+ unsigned int /* index */,
+ Bool* /* compression_flags_return */
+);
+
+extern Status XcmsCIELabClipLab(
+ XcmsCCC /* ccc */,
+ XcmsColor* /* colors_in_out */,
+ unsigned int /* ncolors */,
+ unsigned int /* index */,
+ Bool* /* compression_flags_return */
+);
+
+extern Status XcmsCIELabQueryMaxC (
+ XcmsCCC /* ccc */,
+ XcmsFloat /* hue_angle */,
+ XcmsFloat /* L_star */,
+ XcmsColor* /* color_return */
+);
+
+extern Status XcmsCIELabQueryMaxL (
+ XcmsCCC /* ccc */,
+ XcmsFloat /* hue_angle */,
+ XcmsFloat /* chroma */,
+ XcmsColor* /* color_return */
+);
+
+extern Status XcmsCIELabQueryMaxLC (
+ XcmsCCC /* ccc */,
+ XcmsFloat /* hue_angle */,
+ XcmsColor* /* color_return */
+);
+
+extern Status XcmsCIELabQueryMinL (
+ XcmsCCC /* ccc */,
+ XcmsFloat /* hue_angle */,
+ XcmsFloat /* chroma */,
+ XcmsColor* /* color_return */
+);
+
+extern Status XcmsCIELabToCIEXYZ (
+ XcmsCCC /* ccc */,
+ XcmsColor* /* white_point */,
+ XcmsColor* /* colors */,
+ unsigned int /* ncolors */
+);
+
+extern Status XcmsCIELabWhiteShiftColors(
+ XcmsCCC /* ccc */,
+ XcmsColor* /* initial_white_point*/,
+ XcmsColor* /* target_white_point*/,
+ XcmsColorFormat /* target_format */,
+ XcmsColor* /* colors_in_out */,
+ unsigned int /* ncolors */,
+ Bool* /* compression_flags_return */
+);
+
+extern Status XcmsCIELuvClipL(
+ XcmsCCC /* ccc */,
+ XcmsColor* /* colors_in_out */,
+ unsigned int /* ncolors */,
+ unsigned int /* index */,
+ Bool* /* compression_flags_return */
+);
+
+extern Status XcmsCIELuvClipLuv(
+ XcmsCCC /* ccc */,
+ XcmsColor* /* colors_in_out */,
+ unsigned int /* ncolors */,
+ unsigned int /* index */,
+ Bool* /* compression_flags_return */
+);
+
+extern Status XcmsCIELuvClipuv(
+ XcmsCCC /* ccc */,
+ XcmsColor* /* colors_in_out */,
+ unsigned int /* ncolors */,
+ unsigned int /* index */,
+ Bool* /* compression_flags_return */
+);
+
+extern Status XcmsCIELuvQueryMaxC (
+ XcmsCCC /* ccc */,
+ XcmsFloat /* hue_angle */,
+ XcmsFloat /* L_star */,
+ XcmsColor* /* color_return */
+);
+
+extern Status XcmsCIELuvQueryMaxL (
+ XcmsCCC /* ccc */,
+ XcmsFloat /* hue_angle */,
+ XcmsFloat /* chroma */,
+ XcmsColor* /* color_return */
+);
+
+extern Status XcmsCIELuvQueryMaxLC (
+ XcmsCCC /* ccc */,
+ XcmsFloat /* hue_angle */,
+ XcmsColor* /* color_return */
+);
+
+extern Status XcmsCIELuvQueryMinL (
+ XcmsCCC /* ccc */,
+ XcmsFloat /* hue_angle */,
+ XcmsFloat /* chroma */,
+ XcmsColor* /* color_return */
+);
+
+extern Status XcmsCIELuvToCIEuvY (
+ XcmsCCC /* ccc */,
+ XcmsColor* /* white_point */,
+ XcmsColor* /* colors */,
+ unsigned int /* ncolors */
+);
+
+extern Status XcmsCIELuvWhiteShiftColors(
+ XcmsCCC /* ccc */,
+ XcmsColor* /* initial_white_point*/,
+ XcmsColor* /* target_white_point*/,
+ XcmsColorFormat /* target_format */,
+ XcmsColor* /* colors_in_out */,
+ unsigned int /* ncolors */,
+ Bool* /* compression_flags_return */
+);
+
+extern Status XcmsCIEXYZToCIELab (
+ XcmsCCC /* ccc */,
+ XcmsColor* /* white_point */,
+ XcmsColor* /* colors */,
+ unsigned int /* ncolors */
+);
+
+extern Status XcmsCIEXYZToCIEuvY (
+ XcmsCCC /* ccc */,
+ XcmsColor* /* white_point */,
+ XcmsColor* /* colors */,
+ unsigned int /* ncolors */
+);
+
+extern Status XcmsCIEXYZToCIExyY (
+ XcmsCCC /* ccc */,
+ XcmsColor* /* white_point */,
+ XcmsColor* /* colors */,
+ unsigned int /* ncolors */
+);
+
+extern Status XcmsCIEXYZToRGBi (
+ XcmsCCC /* ccc */,
+ XcmsColor* /* colors */,
+ unsigned int /* ncolors */,
+ Bool* /* compression_flags_return */
+);
+
+extern Status XcmsCIEuvYToCIELuv (
+ XcmsCCC /* ccc */,
+ XcmsColor* /* white_point */,
+ XcmsColor* /* colors */,
+ unsigned int /* ncolors */
+);
+
+extern Status XcmsCIEuvYToCIEXYZ (
+ XcmsCCC /* ccc */,
+ XcmsColor* /* white_point */,
+ XcmsColor* /* colors */,
+ unsigned int /* ncolors */
+);
+
+extern Status XcmsCIEuvYToTekHVC (
+ XcmsCCC /* ccc */,
+ XcmsColor* /* white_point */,
+ XcmsColor* /* colors */,
+ unsigned int /* ncolors */
+);
+
+extern Status XcmsCIExyYToCIEXYZ (
+ XcmsCCC /* ccc */,
+ XcmsColor* /* white_point */,
+ XcmsColor* /* colors */,
+ unsigned int /* ncolors */
+);
+
+extern XcmsColor *XcmsClientWhitePointOfCCC (
+ XcmsCCC /* ccc */
+);
+
+extern Status XcmsConvertColors (
+ XcmsCCC /* ccc */,
+ XcmsColor* /* colorArry_in_out */,
+ unsigned int /* nColors */,
+ XcmsColorFormat /* targetFormat */,
+ Bool* /* compArry_return */
+);
+
+extern XcmsCCC XcmsCreateCCC (
+ Display* /* dpy */,
+ int /* screenNumber */,
+ Visual* /* visual */,
+ XcmsColor* /* clientWhitePt */,
+ XcmsCompressionProc /* gamutCompProc */,
+ XPointer /* gamutCompClientData */,
+ XcmsWhiteAdjustProc /* whitePtAdjProc */,
+ XPointer /* whitePtAdjClientData */
+);
+
+extern XcmsCCC XcmsDefaultCCC (
+ Display* /* dpy */,
+ int /* screenNumber */
+);
+
+extern Display *XcmsDisplayOfCCC (
+ XcmsCCC /* ccc */
+);
+
+extern XcmsColorFormat XcmsFormatOfPrefix (
+ char* /* prefix */
+);
+
+extern void XcmsFreeCCC (
+ XcmsCCC /* ccc */
+);
+
+extern Status XcmsLookupColor (
+ Display* /* dpy */,
+ Colormap /* colormap */,
+ _Xconst char* /* color_string */,
+ XcmsColor* /* pColor_exact_in_out */,
+ XcmsColor* /* pColor_scrn_in_out */,
+ XcmsColorFormat /* result_format */
+);
+
+extern char *XcmsPrefixOfFormat (
+ XcmsColorFormat /* id */
+);
+
+extern Status XcmsQueryBlack (
+ XcmsCCC /* ccc */,
+ XcmsColorFormat /* target_format */,
+ XcmsColor* /* color_return */
+);
+
+extern Status XcmsQueryBlue (
+ XcmsCCC /* ccc */,
+ XcmsColorFormat /* target_format */,
+ XcmsColor* /* color_return */
+);
+
+extern Status XcmsQueryColor (
+ Display* /* dpy */,
+ Colormap /* colormap */,
+ XcmsColor* /* pColor_in_out */,
+ XcmsColorFormat /* result_format */
+);
+
+extern Status XcmsQueryColors (
+ Display* /* dpy */,
+ Colormap /* colormap */,
+ XcmsColor* /* colorArry_in_out */,
+ unsigned int /* nColors */,
+ XcmsColorFormat /* result_format */
+);
+
+extern Status XcmsQueryGreen (
+ XcmsCCC /* ccc */,
+ XcmsColorFormat /* target_format */,
+ XcmsColor* /* color_return */
+);
+
+extern Status XcmsQueryRed (
+ XcmsCCC /* ccc */,
+ XcmsColorFormat /* target_format */,
+ XcmsColor* /* color_return */
+);
+
+extern Status XcmsQueryWhite (
+ XcmsCCC /* ccc */,
+ XcmsColorFormat /* target_format */,
+ XcmsColor* /* color_return */
+);
+
+extern Status XcmsRGBiToCIEXYZ (
+ XcmsCCC /* ccc */,
+ XcmsColor* /* colors */,
+ unsigned int /* ncolors */,
+ Bool* /* compression_flags_return */
+);
+
+extern Status XcmsRGBiToRGB (
+ XcmsCCC /* ccc */,
+ XcmsColor* /* colors */,
+ unsigned int /* ncolors */,
+ Bool* /* compression_flags_return */
+);
+
+extern Status XcmsRGBToRGBi (
+ XcmsCCC /* ccc */,
+ XcmsColor* /* colors */,
+ unsigned int /* ncolors */,
+ Bool* /* compression_flags_return */
+);
+
+extern int XcmsScreenNumberOfCCC (
+ XcmsCCC /* ccc */
+);
+
+extern XcmsColor *XcmsScreenWhitePointOfCCC (
+ XcmsCCC /* ccc */
+);
+
+extern XcmsCCC XcmsSetCCCOfColormap(
+ Display* /* dpy */,
+ Colormap /* colormap */,
+ XcmsCCC /* ccc */
+);
+
+extern XcmsCompressionProc XcmsSetCompressionProc (
+ XcmsCCC /* ccc */,
+ XcmsCompressionProc /* compression_proc */,
+ XPointer /* client_data */
+);
+
+extern XcmsWhiteAdjustProc XcmsSetWhiteAdjustProc (
+ XcmsCCC /* ccc */,
+ XcmsWhiteAdjustProc /* white_adjust_proc */,
+ XPointer /* client_data */
+);
+
+extern Status XcmsSetWhitePoint (
+ XcmsCCC /* ccc */,
+ XcmsColor* /* color */
+);
+
+extern Status XcmsStoreColor (
+ Display* /* dpy */,
+ Colormap /* colormap */,
+ XcmsColor* /* pColor_in */
+);
+
+extern Status XcmsStoreColors (
+ Display* /* dpy */,
+ Colormap /* colormap */,
+ XcmsColor* /* colorArry_in */,
+ unsigned int /* nColors */,
+ Bool* /* compArry_return */
+);
+
+extern Status XcmsTekHVCClipC(
+ XcmsCCC /* ccc */,
+ XcmsColor* /* colors_in_out */,
+ unsigned int /* ncolors */,
+ unsigned int /* index */,
+ Bool* /* compression_flags_return */
+);
+
+extern Status XcmsTekHVCClipV(
+ XcmsCCC /* ccc */,
+ XcmsColor* /* colors_in_out */,
+ unsigned int /* ncolors */,
+ unsigned int /* index */,
+ Bool* /* compression_flags_return */
+);
+
+extern Status XcmsTekHVCClipVC(
+ XcmsCCC /* ccc */,
+ XcmsColor* /* colors_in_out */,
+ unsigned int /* ncolors */,
+ unsigned int /* index */,
+ Bool* /* compression_flags_return */
+);
+
+extern Status XcmsTekHVCQueryMaxC (
+ XcmsCCC /* ccc */,
+ XcmsFloat /* hue */,
+ XcmsFloat /* value */,
+ XcmsColor* /* color_return */
+);
+
+extern Status XcmsTekHVCQueryMaxV (
+ XcmsCCC /* ccc */,
+ XcmsFloat /* hue */,
+ XcmsFloat /* chroma */,
+ XcmsColor* /* color_return */
+);
+
+extern Status XcmsTekHVCQueryMaxVC (
+ XcmsCCC /* ccc */,
+ XcmsFloat /* hue */,
+ XcmsColor* /* color_return */
+);
+
+extern Status XcmsTekHVCQueryMaxVSamples (
+ XcmsCCC /* ccc */,
+ XcmsFloat /* hue */,
+ XcmsColor* /* colors_return */,
+ unsigned int /* nsamples */
+);
+
+extern Status XcmsTekHVCQueryMinV (
+ XcmsCCC /* ccc */,
+ XcmsFloat /* hue */,
+ XcmsFloat /* chroma */,
+ XcmsColor* /* color_return */
+);
+
+extern Status XcmsTekHVCToCIEuvY (
+ XcmsCCC /* ccc */,
+ XcmsColor* /* white_point */,
+ XcmsColor* /* colors */,
+ unsigned int /* ncolors */
+);
+
+extern Status XcmsTekHVCWhiteShiftColors(
+ XcmsCCC /* ccc */,
+ XcmsColor* /* initial_white_point*/,
+ XcmsColor* /* target_white_point*/,
+ XcmsColorFormat /* target_format */,
+ XcmsColor* /* colors_in_out */,
+ unsigned int /* ncolors */,
+ Bool* /* compression_flags_return */
+);
+
+extern Visual *XcmsVisualOfCCC (
+ XcmsCCC /* ccc */
+);
+
+_XFUNCPROTOEND
+
+#endif /* _X11_XCMS_H_ */
diff --git a/libX11/include/X11/Xlib-xcb.h b/libX11/include/X11/Xlib-xcb.h
index 03d8f9867..a0339de12 100644
--- a/libX11/include/X11/Xlib-xcb.h
+++ b/libX11/include/X11/Xlib-xcb.h
@@ -1,20 +1,20 @@
-/* Copyright (C) 2003-2006 Jamey Sharp, Josh Triplett
- * This file is licensed under the MIT license. See the file COPYING. */
-
-#ifndef XLIB_XCB_H
-#define XLIB_XCB_H
-
-#include <xcb/xcb.h>
-#include <X11/Xlib.h>
-#include <X11/Xfuncproto.h>
-
-_XFUNCPROTOBEGIN
-
-xcb_connection_t *XGetXCBConnection(Display *dpy);
-
-enum XEventQueueOwner { XlibOwnsEventQueue = 0, XCBOwnsEventQueue };
-void XSetEventQueueOwner(Display *dpy, enum XEventQueueOwner owner);
-
-_XFUNCPROTOEND
-
-#endif /* XLIB_XCB_H */
+/* Copyright (C) 2003-2006 Jamey Sharp, Josh Triplett
+ * This file is licensed under the MIT license. See the file COPYING. */
+
+#ifndef _X11_XLIB_XCB_H_
+#define _X11_XLIB_XCB_H_
+
+#include <xcb/xcb.h>
+#include <X11/Xlib.h>
+#include <X11/Xfuncproto.h>
+
+_XFUNCPROTOBEGIN
+
+xcb_connection_t *XGetXCBConnection(Display *dpy);
+
+enum XEventQueueOwner { XlibOwnsEventQueue = 0, XCBOwnsEventQueue };
+void XSetEventQueueOwner(Display *dpy, enum XEventQueueOwner owner);
+
+_XFUNCPROTOEND
+
+#endif /* _X11_XLIB_XCB_H_ */
diff --git a/libX11/include/X11/Xlib.h b/libX11/include/X11/Xlib.h
index 7c8bc5154..3d22721e1 100644
--- a/libX11/include/X11/Xlib.h
+++ b/libX11/include/X11/Xlib.h
@@ -1,4023 +1,4023 @@
-/*
-
-Copyright 1985, 1986, 1987, 1991, 1998 The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-*/
-
-
-/*
- * Xlib.h - Header definition and support file for the C subroutine
- * interface library (Xlib) to the X Window System Protocol (V11).
- * Structures and symbols starting with "_" are private to the library.
- */
-#ifndef _XLIB_H_
-#define _XLIB_H_
-
-#define XlibSpecificationRelease 6
-
-#include <sys/types.h>
-
-#if defined(__SCO__) || defined(__UNIXWARE__)
-#include <stdint.h>
-#endif
-
-#include <X11/X.h>
-
-/* applications should not depend on these two headers being included! */
-#include <X11/Xfuncproto.h>
-#include <X11/Xosdefs.h>
-
-#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
-
-extern int
-_Xmblen(
-#ifdef ISC
- char const *str,
- size_t len
-#else
- char *str,
- int len
-#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;
-
-#define Bool int
-#define Status int
-#define True 1
-#define False 0
-
-#define QueuedAlready 0
-#define QueuedAfterReading 1
-#define QueuedAfterFlush 2
-
-#define ConnectionNumber(dpy) (((_XPrivDisplay)dpy)->fd)
-#define RootWindow(dpy, scr) (ScreenOfDisplay(dpy,scr)->root)
-#define DefaultScreen(dpy) (((_XPrivDisplay)dpy)->default_screen)
-#define DefaultRootWindow(dpy) (ScreenOfDisplay(dpy,DefaultScreen(dpy))->root)
-#define DefaultVisual(dpy, scr) (ScreenOfDisplay(dpy,scr)->root_visual)
-#define DefaultGC(dpy, scr) (ScreenOfDisplay(dpy,scr)->default_gc)
-#define BlackPixel(dpy, scr) (ScreenOfDisplay(dpy,scr)->black_pixel)
-#define WhitePixel(dpy, scr) (ScreenOfDisplay(dpy,scr)->white_pixel)
-#define AllPlanes ((unsigned long)~0L)
-#define QLength(dpy) (((_XPrivDisplay)dpy)->qlen)
-#define DisplayWidth(dpy, scr) (ScreenOfDisplay(dpy,scr)->width)
-#define DisplayHeight(dpy, scr) (ScreenOfDisplay(dpy,scr)->height)
-#define DisplayWidthMM(dpy, scr)(ScreenOfDisplay(dpy,scr)->mwidth)
-#define DisplayHeightMM(dpy, scr)(ScreenOfDisplay(dpy,scr)->mheight)
-#define DisplayPlanes(dpy, scr) (ScreenOfDisplay(dpy,scr)->root_depth)
-#define DisplayCells(dpy, scr) (DefaultVisual(dpy,scr)->map_entries)
-#define ScreenCount(dpy) (((_XPrivDisplay)dpy)->nscreens)
-#define ServerVendor(dpy) (((_XPrivDisplay)dpy)->vendor)
-#define ProtocolVersion(dpy) (((_XPrivDisplay)dpy)->proto_major_version)
-#define ProtocolRevision(dpy) (((_XPrivDisplay)dpy)->proto_minor_version)
-#define VendorRelease(dpy) (((_XPrivDisplay)dpy)->release)
-#define DisplayString(dpy) (((_XPrivDisplay)dpy)->display_name)
-#define DefaultDepth(dpy, scr) (ScreenOfDisplay(dpy,scr)->root_depth)
-#define DefaultColormap(dpy, scr)(ScreenOfDisplay(dpy,scr)->cmap)
-#define BitmapUnit(dpy) (((_XPrivDisplay)dpy)->bitmap_unit)
-#define BitmapBitOrder(dpy) (((_XPrivDisplay)dpy)->bitmap_bit_order)
-#define BitmapPad(dpy) (((_XPrivDisplay)dpy)->bitmap_pad)
-#define ImageByteOrder(dpy) (((_XPrivDisplay)dpy)->byte_order)
-#ifdef CRAY /* unable to get WORD64 without pulling in other symbols */
-#define NextRequest(dpy) XNextRequest(dpy)
-#else
-#define NextRequest(dpy) (((_XPrivDisplay)dpy)->request + 1)
-#endif
-#define LastKnownRequestProcessed(dpy) (((_XPrivDisplay)dpy)->last_request_read)
-
-/* macros for screen oriented applications (toolkit) */
-#define ScreenOfDisplay(dpy, scr)(&((_XPrivDisplay)dpy)->screens[scr])
-#define DefaultScreenOfDisplay(dpy) ScreenOfDisplay(dpy,DefaultScreen(dpy))
-#define DisplayOfScreen(s) ((s)->display)
-#define RootWindowOfScreen(s) ((s)->root)
-#define BlackPixelOfScreen(s) ((s)->black_pixel)
-#define WhitePixelOfScreen(s) ((s)->white_pixel)
-#define DefaultColormapOfScreen(s)((s)->cmap)
-#define DefaultDepthOfScreen(s) ((s)->root_depth)
-#define DefaultGCOfScreen(s) ((s)->default_gc)
-#define DefaultVisualOfScreen(s)((s)->root_visual)
-#define WidthOfScreen(s) ((s)->width)
-#define HeightOfScreen(s) ((s)->height)
-#define WidthMMOfScreen(s) ((s)->mwidth)
-#define HeightMMOfScreen(s) ((s)->mheight)
-#define PlanesOfScreen(s) ((s)->root_depth)
-#define CellsOfScreen(s) (DefaultVisualOfScreen((s))->map_entries)
-#define MinCmapsOfScreen(s) ((s)->min_maps)
-#define MaxCmapsOfScreen(s) ((s)->max_maps)
-#define DoesSaveUnders(s) ((s)->save_unders)
-#define DoesBackingStore(s) ((s)->backing_store)
-#define EventMaskOfScreen(s) ((s)->root_input_mask)
-
-/*
- * Extensions need a way to hang private data on some structures.
- */
-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 */
- struct _XExtData *extension
- );
- XPointer private_data; /* data private to this extension. */
-} XExtData;
-
-/*
- * This file contains structures used by the extension mechanism.
- */
-typedef struct { /* public to extension, cannot be changed */
- int extension; /* extension number */
- int major_opcode; /* major op-code assigned by server */
- int first_event; /* first event number for the extension */
- int first_error; /* first error number for the extension */
-} XExtCodes;
-
-/*
- * Data structure for retrieving info about pixmap formats.
- */
-
-typedef struct {
- int depth;
- int bits_per_pixel;
- int scanline_pad;
-} XPixmapFormatValues;
-
-
-/*
- * Data structure for setting graphics context.
- */
-typedef struct {
- int function; /* logical operation */
- unsigned long plane_mask;/* plane mask */
- unsigned long foreground;/* foreground pixel */
- unsigned long background;/* background pixel */
- int line_width; /* line width */
- int line_style; /* LineSolid, LineOnOffDash, LineDoubleDash */
- int cap_style; /* CapNotLast, CapButt,
- CapRound, CapProjecting */
- int join_style; /* JoinMiter, JoinRound, JoinBevel */
- int fill_style; /* FillSolid, FillTiled,
- FillStippled, FillOpaeueStippled */
- int fill_rule; /* EvenOddRule, WindingRule */
- int arc_mode; /* ArcChord, ArcPieSlice */
- Pixmap tile; /* tile pixmap for tiling operations */
- Pixmap stipple; /* stipple 1 plane pixmap for stipping */
- int ts_x_origin; /* offset for tile or stipple operations */
- int ts_y_origin;
- Font font; /* default text font for text operations */
- int subwindow_mode; /* ClipByChildren, IncludeInferiors */
- Bool graphics_exposures;/* boolean, should exposures be generated */
- int clip_x_origin; /* origin for clipping */
- int clip_y_origin;
- Pixmap clip_mask; /* bitmap clipping; other calls for rects */
- int dash_offset; /* patterned/dashed line information */
- char dashes;
-} XGCValues;
-
-/*
- * Graphics context. The contents of this structure are implementation
- * dependent. A GC should be treated as opaque by application code.
- */
-
-typedef struct _XGC
-#ifdef XLIB_ILLEGAL_ACCESS
-{
- XExtData *ext_data; /* hook for extension to hang data */
- GContext gid; /* protocol ID for graphics context */
- /* there is more to this structure, but it is private to Xlib */
-}
-#endif
-*GC;
-
-/*
- * Visual structure; contains information about colormapping possible.
- */
-typedef struct {
- XExtData *ext_data; /* hook for extension to hang data */
- VisualID visualid; /* visual id of this visual */
-#if defined(__cplusplus) || defined(c_plusplus)
- int c_class; /* C++ class of screen (monochrome, etc.) */
-#else
- int class; /* class of screen (monochrome, etc.) */
-#endif
- unsigned long red_mask, green_mask, blue_mask; /* mask values */
- int bits_per_rgb; /* log base 2 of distinct color values */
- int map_entries; /* color map entries */
-} Visual;
-
-/*
- * 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 */
- Visual *visuals; /* list of visuals possible at this depth */
-} Depth;
-
-/*
- * Information about the screen. The contents of this structure are
- * implementation dependent. A Screen should be treated as opaque
- * by application code.
- */
-
-struct _XDisplay; /* Forward declare before use for C++ */
-
-typedef struct {
- XExtData *ext_data; /* hook for extension to hang data */
- struct _XDisplay *display;/* back pointer to display structure */
- Window root; /* Root window id. */
- int width, height; /* width and height of screen */
- int mwidth, mheight; /* width and height of in millimeters */
- int ndepths; /* number of depths possible */
- Depth *depths; /* list of allowable depths on the screen */
- int root_depth; /* bits per pixel */
- Visual *root_visual; /* root visual */
- GC default_gc; /* GC for the root root visual */
- Colormap cmap; /* default color map */
- unsigned long white_pixel;
- 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;
- long root_input_mask; /* initial root input mask */
-} Screen;
-
-/*
- * Format structure; describes ZFormat data the screen will understand.
- */
-typedef struct {
- XExtData *ext_data; /* hook for extension to hang data */
- int depth; /* depth of this image format */
- int bits_per_pixel; /* bits/pixel at this depth */
- int scanline_pad; /* scanline must padded to this multiple */
-} ScreenFormat;
-
-/*
- * Data structure for setting window attributes.
- */
-typedef struct {
- Pixmap background_pixmap; /* background or None or ParentRelative */
- unsigned long background_pixel; /* background pixel */
- Pixmap border_pixmap; /* border of the window */
- unsigned long border_pixel; /* border pixel value */
- int bit_gravity; /* one of bit gravity values */
- int win_gravity; /* one of the window gravity values */
- int backing_store; /* NotUseful, WhenMapped, Always */
- unsigned long backing_planes;/* planes to be preseved if possible */
- unsigned long backing_pixel;/* value to use in restoring planes */
- Bool save_under; /* should bits under be saved? (popups) */
- long event_mask; /* set of events that should be saved */
- long do_not_propagate_mask; /* set of events that should not propagate */
- Bool override_redirect; /* boolean value for override-redirect */
- Colormap colormap; /* color map to be associated with window */
- Cursor cursor; /* cursor to be displayed (or None) */
-} XSetWindowAttributes;
-
-typedef struct {
- int x, y; /* location of window */
- int width, height; /* width and height of window */
- int border_width; /* border width of window */
- int depth; /* depth of window */
- Visual *visual; /* the associated visual structure */
- Window root; /* root of screen containing window */
-#if defined(__cplusplus) || defined(c_plusplus)
- int c_class; /* C++ InputOutput, InputOnly*/
-#else
- int class; /* InputOutput, InputOnly*/
-#endif
- int bit_gravity; /* one of bit gravity values */
- int win_gravity; /* one of the window gravity values */
- int backing_store; /* NotUseful, WhenMapped, Always */
- unsigned long backing_planes;/* planes to be preserved if possible */
- unsigned long backing_pixel;/* value to be used when restoring planes */
- Bool save_under; /* boolean, should bits under be saved? */
- Colormap colormap; /* color map to be associated with window */
- Bool map_installed; /* boolean, is color map currently installed*/
- int map_state; /* IsUnmapped, IsUnviewable, IsViewable */
- long all_event_masks; /* set of events all people have interest in*/
- long your_event_mask; /* my event mask */
- long do_not_propagate_mask; /* set of events that should not propagate */
- Bool override_redirect; /* boolean value for override-redirect */
- Screen *screen; /* back pointer to correct screen */
-} XWindowAttributes;
-
-/*
- * Data structure for host setting; getting routines.
- *
- */
-
-typedef struct {
- int family; /* for example FamilyInternet */
- int length; /* length of address, in bytes */
- char *address; /* pointer to where to find the bytes */
-} XHostAddress;
-
-/*
- * Data structure for ServerFamilyInterpreted addresses in host routines
- */
-typedef struct {
- int typelength; /* length of type string, in bytes */
- int valuelength; /* length of value string, in bytes */
- char *type; /* pointer to where to find the type string */
- char *value; /* pointer to where to find the address */
-} XServerInterpretedAddress;
-
-/*
- * Data structure for "image" data, used by image manipulation routines.
- */
-typedef struct _XImage {
- int width, height; /* size of image */
- int xoffset; /* number of pixels offset in X direction */
- int format; /* XYBitmap, XYPixmap, ZPixmap */
- char *data; /* pointer to image data */
- int byte_order; /* data byte order, LSBFirst, MSBFirst */
- int bitmap_unit; /* quant. of scanline 8, 16, 32 */
- int bitmap_bit_order; /* LSBFirst, MSBFirst */
- int bitmap_pad; /* 8, 16, 32 either XY or ZPixmap */
- int depth; /* depth of image */
- int bytes_per_line; /* accelarator to next line */
- int bits_per_pixel; /* bits per pixel (ZPixmap) */
- unsigned long red_mask; /* bits in z arrangment */
- unsigned long green_mask;
- unsigned long blue_mask;
- XPointer obdata; /* hook for the object routines to hang on */
- struct funcs { /* image manipulation routines */
- 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);
- } f;
-} XImage;
-
-/*
- * Data structure for XReconfigureWindow
- */
-typedef struct {
- int x, y;
- int width, height;
- int border_width;
- Window sibling;
- int stack_mode;
-} XWindowChanges;
-
-/*
- * Data structure used by color operations
- */
-typedef struct {
- unsigned long pixel;
- unsigned short red, green, blue;
- char flags; /* do_red, do_green, do_blue */
- 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.
- */
-typedef struct {
- short x1, y1, x2, y2;
-} XSegment;
-
-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;
- short angle1, angle2;
-} XArc;
-
-
-/* Data structure for XChangeKeyboardControl */
-
-typedef struct {
- int key_click_percent;
- int bell_percent;
- int bell_pitch;
- int bell_duration;
- int led;
- int led_mode;
- int key;
- int auto_repeat_mode; /* On, Off, Default */
-} XKeyboardControl;
-
-/* Data structure for XGetKeyboardControl */
-
-typedef struct {
- int key_click_percent;
- int bell_percent;
- unsigned int bell_pitch, bell_duration;
- unsigned long led_mask;
- int global_auto_repeat;
- char auto_repeats[32];
-} XKeyboardState;
-
-/* Data structure for XGetMotionEvents. */
-
-typedef struct {
- Time time;
- short x, y;
-} XTimeCoord;
-
-/* Data structure for X{Set,Get}ModifierMapping */
-
-typedef struct {
- int max_keypermod; /* The server's max # of keys per modifier */
- KeyCode *modifiermap; /* An 8 by max_keypermod array of modifiers */
-} XModifierKeymap;
-
-
-/*
- * Display datatype maintaining display specific data.
- * The contents of this structure are implementation dependent.
- * A Display should be treated as opaque by application code.
- */
-#ifndef XLIB_ILLEGAL_ACCESS
-typedef struct _XDisplay Display;
-#endif
-
-struct _XPrivate; /* Forward declare before use for C++ */
-struct _XrmHashBucketRec;
-
-typedef struct
-#ifdef XLIB_ILLEGAL_ACCESS
-_XDisplay
-#endif
-{
- XExtData *ext_data; /* hook for extension to hang data */
- struct _XPrivate *private1;
- int fd; /* Network socket. */
- int private2;
- int proto_major_version;/* major version of server's X protocol */
- int proto_minor_version;/* minor version of servers X protocol */
- char *vendor; /* vendor of the server hardware */
- XID private3;
- XID private4;
- XID private5;
- int private6;
- XID (*resource_alloc)( /* allocator function */
- struct _XDisplay*
- );
- int byte_order; /* screen byte order, LSBFirst, MSBFirst */
- int bitmap_unit; /* padding and data requirements */
- int bitmap_pad; /* padding requirements on bitmaps */
- int bitmap_bit_order; /* LeastSignificant or MostSignificant */
- int nformats; /* number of pixmap formats in list */
- ScreenFormat *pixmap_format; /* pixmap format list */
- int private8;
- int release; /* release of the server */
- struct _XPrivate *private9, *private10;
- int qlen; /* Length of input event queue */
- unsigned long last_request_read; /* seq number of last event read */
- unsigned long request; /* sequence number of last request. */
- XPointer private11;
- XPointer private12;
- XPointer private13;
- XPointer private14;
- unsigned max_request_size; /* maximum number 32 bit words in request*/
- struct _XrmHashBucketRec *db;
- int (*private15)(
- struct _XDisplay*
- );
- 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*/
- Screen *screens; /* pointer to list of screens */
- unsigned long motion_buffer; /* size of motion buffer */
- unsigned long private16;
- int min_keycode; /* minimum defined keycode */
- int max_keycode; /* maximum defined keycode */
- XPointer private17;
- XPointer private18;
- int private19;
- char *xdefaults; /* contents of defaults from server */
- /* there is more to this structure, but it is private to Xlib */
-}
-#ifdef XLIB_ILLEGAL_ACCESS
-Display,
-#endif
-*_XPrivDisplay;
-
-#undef _XEVENT_
-#ifndef _XEVENT_
-/*
- * Definitions of specific events.
- */
-typedef struct {
- int type; /* of event */
- unsigned long serial; /* # of last request processed by server */
- 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 occurred on */
- Window subwindow; /* child window */
- Time time; /* milliseconds */
- int x, y; /* pointer x, y coordinates in event window */
- int x_root, y_root; /* coordinates relative to root */
- unsigned int state; /* key or button mask */
- unsigned int keycode; /* detail */
- Bool same_screen; /* same screen flag */
-} XKeyEvent;
-typedef XKeyEvent XKeyPressedEvent;
-typedef XKeyEvent XKeyReleasedEvent;
-
-typedef struct {
- int type; /* of event */
- unsigned long serial; /* # of last request processed by server */
- 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 occurred on */
- Window subwindow; /* child window */
- Time time; /* milliseconds */
- int x, y; /* pointer x, y coordinates in event window */
- int x_root, y_root; /* coordinates relative to root */
- unsigned int state; /* key or button mask */
- unsigned int button; /* detail */
- Bool same_screen; /* same screen flag */
-} XButtonEvent;
-typedef XButtonEvent XButtonPressedEvent;
-typedef XButtonEvent XButtonReleasedEvent;
-
-typedef struct {
- int type; /* of event */
- unsigned long serial; /* # of last request processed by server */
- 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 occurred on */
- Window subwindow; /* child window */
- Time time; /* milliseconds */
- int x, y; /* pointer x, y coordinates in event window */
- int x_root, y_root; /* coordinates relative to root */
- unsigned int state; /* key or button mask */
- char is_hint; /* detail */
- Bool same_screen; /* same screen flag */
-} XMotionEvent;
-typedef XMotionEvent XPointerMovedEvent;
-
-typedef struct {
- int type; /* of event */
- unsigned long serial; /* # of last request processed by server */
- 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 occurred on */
- Window subwindow; /* child window */
- Time time; /* milliseconds */
- int x, y; /* pointer x, y coordinates in event window */
- int x_root, y_root; /* coordinates relative to root */
- int mode; /* NotifyNormal, NotifyGrab, NotifyUngrab */
- int detail;
- /*
- * NotifyAncestor, NotifyVirtual, NotifyInferior,
- * NotifyNonlinear,NotifyNonlinearVirtual
- */
- Bool same_screen; /* same screen flag */
- Bool focus; /* boolean focus */
- unsigned int state; /* key or button mask */
-} XCrossingEvent;
-typedef XCrossingEvent XEnterWindowEvent;
-typedef XCrossingEvent XLeaveWindowEvent;
-
-typedef struct {
- int type; /* FocusIn or FocusOut */
- unsigned long serial; /* # of last request processed by server */
- Bool send_event; /* true if this came from a SendEvent request */
- Display *display; /* Display the event was read from */
- Window window; /* window of event */
- int mode; /* NotifyNormal, NotifyWhileGrabbed,
- NotifyGrab, NotifyUngrab */
- int detail;
- /*
- * NotifyAncestor, NotifyVirtual, NotifyInferior,
- * NotifyNonlinear,NotifyNonlinearVirtual, NotifyPointer,
- * NotifyPointerRoot, NotifyDetailNone
- */
-} XFocusChangeEvent;
-typedef XFocusChangeEvent XFocusInEvent;
-typedef XFocusChangeEvent XFocusOutEvent;
-
-/* generated on EnterWindow and FocusIn when KeyMapState selected */
-typedef struct {
- int type;
- unsigned long serial; /* # of last request processed by server */
- Bool send_event; /* true if this came from a SendEvent request */
- Display *display; /* Display the event was read from */
- Window window;
- char key_vector[32];
-} XKeymapEvent;
-
-typedef struct {
- int type;
- unsigned long serial; /* # of last request processed by server */
- Bool send_event; /* true if this came from a SendEvent request */
- Display *display; /* Display the event was read from */
- Window window;
- int x, y;
- int width, height;
- int count; /* if non-zero, at least this many more */
-} XExposeEvent;
-
-typedef struct {
- int type;
- unsigned long serial; /* # of last request processed by server */
- Bool send_event; /* true if this came from a SendEvent request */
- Display *display; /* Display the event was read from */
- Drawable drawable;
- int x, y;
- int width, height;
- int count; /* if non-zero, at least this many more */
- int major_code; /* core is CopyArea or CopyPlane */
- int minor_code; /* not defined in the core */
-} XGraphicsExposeEvent;
-
-typedef struct {
- int type;
- unsigned long serial; /* # of last request processed by server */
- Bool send_event; /* true if this came from a SendEvent request */
- Display *display; /* Display the event was read from */
- Drawable drawable;
- int major_code; /* core is CopyArea or CopyPlane */
- int minor_code; /* not defined in the core */
-} XNoExposeEvent;
-
-typedef struct {
- int type;
- unsigned long serial; /* # of last request processed by server */
- Bool send_event; /* true if this came from a SendEvent request */
- Display *display; /* Display the event was read from */
- Window window;
- int state; /* Visibility state */
-} XVisibilityEvent;
-
-typedef struct {
- int type;
- unsigned long serial; /* # of last request processed by server */
- Bool send_event; /* true if this came from a SendEvent request */
- Display *display; /* Display the event was read from */
- Window parent; /* parent of the window */
- Window window; /* window id of window created */
- int x, y; /* window location */
- int width, height; /* size of window */
- int border_width; /* border width */
- Bool override_redirect; /* creation should be overridden */
-} XCreateWindowEvent;
-
-typedef struct {
- int type;
- unsigned long serial; /* # of last request processed by server */
- Bool send_event; /* true if this came from a SendEvent request */
- Display *display; /* Display the event was read from */
- Window event;
- Window window;
-} XDestroyWindowEvent;
-
-typedef struct {
- int type;
- unsigned long serial; /* # of last request processed by server */
- Bool send_event; /* true if this came from a SendEvent request */
- Display *display; /* Display the event was read from */
- Window event;
- Window window;
- Bool from_configure;
-} XUnmapEvent;
-
-typedef struct {
- int type;
- unsigned long serial; /* # of last request processed by server */
- Bool send_event; /* true if this came from a SendEvent request */
- Display *display; /* Display the event was read from */
- Window event;
- Window window;
- Bool override_redirect; /* boolean, is override set... */
-} XMapEvent;
-
-typedef struct {
- int type;
- unsigned long serial; /* # of last request processed by server */
- Bool send_event; /* true if this came from a SendEvent request */
- Display *display; /* Display the event was read from */
- Window parent;
- Window window;
-} XMapRequestEvent;
-
-typedef struct {
- int type;
- unsigned long serial; /* # of last request processed by server */
- Bool send_event; /* true if this came from a SendEvent request */
- Display *display; /* Display the event was read from */
- Window event;
- Window window;
- Window parent;
- int x, y;
- Bool override_redirect;
-} XReparentEvent;
-
-typedef struct {
- int type;
- unsigned long serial; /* # of last request processed by server */
- Bool send_event; /* true if this came from a SendEvent request */
- Display *display; /* Display the event was read from */
- Window event;
- Window window;
- int x, y;
- int width, height;
- int border_width;
- Window above;
- Bool override_redirect;
-} XConfigureEvent;
-
-typedef struct {
- int type;
- unsigned long serial; /* # of last request processed by server */
- Bool send_event; /* true if this came from a SendEvent request */
- Display *display; /* Display the event was read from */
- Window event;
- Window window;
- int x, y;
-} XGravityEvent;
-
-typedef struct {
- int type;
- unsigned long serial; /* # of last request processed by server */
- Bool send_event; /* true if this came from a SendEvent request */
- Display *display; /* Display the event was read from */
- Window window;
- int width, height;
-} XResizeRequestEvent;
-
-typedef struct {
- int type;
- unsigned long serial; /* # of last request processed by server */
- Bool send_event; /* true if this came from a SendEvent request */
- Display *display; /* Display the event was read from */
- Window parent;
- Window window;
- int x, y;
- int width, height;
- int border_width;
- Window above;
- int detail; /* Above, Below, TopIf, BottomIf, Opposite */
- unsigned long value_mask;
-} XConfigureRequestEvent;
-
-typedef struct {
- int type;
- unsigned long serial; /* # of last request processed by server */
- Bool send_event; /* true if this came from a SendEvent request */
- Display *display; /* Display the event was read from */
- Window event;
- Window window;
- int place; /* PlaceOnTop, PlaceOnBottom */
-} XCirculateEvent;
-
-typedef struct {
- int type;
- unsigned long serial; /* # of last request processed by server */
- Bool send_event; /* true if this came from a SendEvent request */
- Display *display; /* Display the event was read from */
- Window parent;
- Window window;
- int place; /* PlaceOnTop, PlaceOnBottom */
-} XCirculateRequestEvent;
-
-typedef struct {
- int type;
- unsigned long serial; /* # of last request processed by server */
- Bool send_event; /* true if this came from a SendEvent request */
- Display *display; /* Display the event was read from */
- Window window;
- Atom atom;
- Time time;
- int state; /* NewValue, Deleted */
-} XPropertyEvent;
-
-typedef struct {
- int type;
- unsigned long serial; /* # of last request processed by server */
- Bool send_event; /* true if this came from a SendEvent request */
- Display *display; /* Display the event was read from */
- Window window;
- Atom selection;
- Time time;
-} XSelectionClearEvent;
-
-typedef struct {
- int type;
- unsigned long serial; /* # of last request processed by server */
- Bool send_event; /* true if this came from a SendEvent request */
- Display *display; /* Display the event was read from */
- Window owner;
- Window requestor;
- Atom selection;
- Atom target;
- Atom property;
- Time time;
-} XSelectionRequestEvent;
-
-typedef struct {
- int type;
- unsigned long serial; /* # of last request processed by server */
- Bool send_event; /* true if this came from a SendEvent request */
- Display *display; /* Display the event was read from */
- Window requestor;
- Atom selection;
- Atom target;
- Atom property; /* ATOM or None */
- Time time;
-} XSelectionEvent;
-
-typedef struct {
- int type;
- unsigned long serial; /* # of last request processed by server */
- Bool send_event; /* true if this came from a SendEvent request */
- Display *display; /* Display the event was read from */
- Window window;
- Colormap colormap; /* COLORMAP or None */
-#if defined(__cplusplus) || defined(c_plusplus)
- Bool c_new; /* C++ */
-#else
- Bool new;
-#endif
- int state; /* ColormapInstalled, ColormapUninstalled */
-} XColormapEvent;
-
-typedef struct {
- int type;
- unsigned long serial; /* # of last request processed by server */
- Bool send_event; /* true if this came from a SendEvent request */
- Display *display; /* Display the event was read from */
- Window window;
- Atom message_type;
- int format;
- union {
- char b[20];
- short s[10];
- long l[5];
- } data;
-} XClientMessageEvent;
-
-typedef struct {
- int type;
- unsigned long serial; /* # of last request processed by server */
- Bool send_event; /* true if this came from a SendEvent request */
- Display *display; /* Display the event was read from */
- Window window; /* unused */
- int request; /* one of MappingModifier, MappingKeyboard,
- MappingPointer */
- int first_keycode; /* first keycode */
- int count; /* defines range of change w. first_keycode*/
-} XMappingEvent;
-
-typedef struct {
- int type;
- Display *display; /* Display the event was read from */
- XID resourceid; /* resource id */
- unsigned long serial; /* serial number of failed request */
- unsigned char error_code; /* error code of failed request */
- unsigned char request_code; /* Major op-code of failed request */
- unsigned char minor_code; /* Minor op-code of failed request */
-} XErrorEvent;
-
-typedef struct {
- int type;
- unsigned long serial; /* # of last request processed by server */
- Bool send_event; /* true if this came from a SendEvent request */
- Display *display;/* Display the event was read from */
- 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.
- */
-typedef union _XEvent {
- int type; /* must not be changed; first element */
- XAnyEvent xany;
- XKeyEvent xkey;
- XButtonEvent xbutton;
- XMotionEvent xmotion;
- XCrossingEvent xcrossing;
- XFocusChangeEvent xfocus;
- XExposeEvent xexpose;
- XGraphicsExposeEvent xgraphicsexpose;
- XNoExposeEvent xnoexpose;
- XVisibilityEvent xvisibility;
- XCreateWindowEvent xcreatewindow;
- XDestroyWindowEvent xdestroywindow;
- XUnmapEvent xunmap;
- XMapEvent xmap;
- XMapRequestEvent xmaprequest;
- XReparentEvent xreparent;
- XConfigureEvent xconfigure;
- XGravityEvent xgravity;
- XResizeRequestEvent xresizerequest;
- XConfigureRequestEvent xconfigurerequest;
- XCirculateEvent xcirculate;
- XCirculateRequestEvent xcirculaterequest;
- XPropertyEvent xproperty;
- XSelectionClearEvent xselectionclear;
- XSelectionRequestEvent xselectionrequest;
- XSelectionEvent xselection;
- XColormapEvent xcolormap;
- XClientMessageEvent xclient;
- XMappingEvent xmapping;
- XErrorEvent xerror;
- XKeymapEvent xkeymap;
- XGenericEvent xgeneric;
- XGenericEventCookie xcookie;
- long pad[24];
-} XEvent;
-#endif
-
-#define XAllocID(dpy) ((*((_XPrivDisplay)dpy)->resource_alloc)((dpy)))
-
-/*
- * per character font metric information.
- */
-typedef struct {
- short lbearing; /* origin to left edge of raster */
- short rbearing; /* origin to right edge of raster */
- short width; /* advance to next char's origin */
- short ascent; /* baseline to top edge of raster */
- short descent; /* baseline to bottom edge of raster */
- unsigned short attributes; /* per char flags (not predefined) */
-} XCharStruct;
-
-/*
- * To allow arbitrary information with fonts, there are additional properties
- * returned.
- */
-typedef struct {
- Atom name;
- unsigned long card32;
-} XFontProp;
-
-typedef struct {
- XExtData *ext_data; /* hook for extension to hang data */
- Font fid; /* Font id for this font */
- unsigned direction; /* hint about direction the font is painted */
- unsigned min_char_or_byte2;/* first character */
- unsigned max_char_or_byte2;/* last character */
- unsigned min_byte1; /* first row that exists */
- unsigned max_byte1; /* last row that exists */
- Bool all_chars_exist;/* flag if all characters have non-zero size*/
- unsigned default_char; /* char to print for undefined character */
- int n_properties; /* how many properties there are */
- XFontProp *properties; /* pointer to array of additional properties*/
- XCharStruct min_bounds; /* minimum bounds over all existing char*/
- XCharStruct max_bounds; /* maximum bounds over all existing char*/
- XCharStruct *per_char; /* first_char to last_char information */
- int ascent; /* log. extent above baseline for spacing */
- int descent; /* log. descent below baseline for spacing */
-} XFontStruct;
-
-/*
- * PolyText routines take these as arguments.
- */
-typedef struct {
- char *chars; /* pointer to string */
- int nchars; /* number of characters */
- int delta; /* delta between strings */
- Font font; /* font to print it in, None don't change */
-} XTextItem;
-
-typedef struct { /* normal 16 bit characters are two bytes */
- unsigned char byte1;
- unsigned char byte2;
-} XChar2b;
-
-typedef struct {
- XChar2b *chars; /* two byte characters */
- int nchars; /* number of characters */
- int delta; /* delta between strings */
- Font font; /* font to print it in, None don't change */
-} XTextItem16;
-
-
-typedef union { Display *display;
- GC gc;
- Visual *visual;
- Screen *screen;
- ScreenFormat *pixmap_format;
- XFontStruct *font; } XEDataObject;
-
-typedef struct {
- XRectangle max_ink_extent;
- XRectangle max_logical_extent;
-} XFontSetExtents;
-
-/* unused:
-typedef void (*XOMProc)();
- */
-
-typedef struct _XOM *XOM;
-typedef struct _XOC *XOC, *XFontSet;
-
-typedef struct {
- char *chars;
- int nchars;
- int delta;
- XFontSet font_set;
-} XmbTextItem;
-
-typedef struct {
- wchar_t *chars;
- int nchars;
- int delta;
- XFontSet font_set;
-} XwcTextItem;
-
-#define XNRequiredCharSet "requiredCharSet"
-#define XNQueryOrientation "queryOrientation"
-#define XNBaseFontName "baseFontName"
-#define XNOMAutomatic "omAutomatic"
-#define XNMissingCharSet "missingCharSet"
-#define XNDefaultString "defaultString"
-#define XNOrientation "orientation"
-#define XNDirectionalDependentDrawing "directionalDependentDrawing"
-#define XNContextualDrawing "contextualDrawing"
-#define XNFontInfo "fontInfo"
-
-typedef struct {
- int charset_count;
- char **charset_list;
-} XOMCharSetList;
-
-typedef enum {
- XOMOrientation_LTR_TTB,
- XOMOrientation_RTL_TTB,
- XOMOrientation_TTB_LTR,
- XOMOrientation_TTB_RTL,
- XOMOrientation_Context
-} XOrientation;
-
-typedef struct {
- int num_orientation;
- XOrientation *orientation; /* Input Text description */
-} XOMOrientation;
-
-typedef struct {
- int num_font;
- XFontStruct **font_struct_list;
- char **font_name_list;
-} XOMFontInfo;
-
-typedef struct _XIM *XIM;
-typedef struct _XIC *XIC;
-
-typedef void (*XIMProc)(
- XIM,
- XPointer,
- XPointer
-);
-
-typedef Bool (*XICProc)(
- XIC,
- XPointer,
- XPointer
-);
-
-typedef void (*XIDProc)(
- Display*,
- XPointer,
- XPointer
-);
-
-typedef unsigned long XIMStyle;
-
-typedef struct {
- unsigned short count_styles;
- XIMStyle *supported_styles;
-} XIMStyles;
-
-#define XIMPreeditArea 0x0001L
-#define XIMPreeditCallbacks 0x0002L
-#define XIMPreeditPosition 0x0004L
-#define XIMPreeditNothing 0x0008L
-#define XIMPreeditNone 0x0010L
-#define XIMStatusArea 0x0100L
-#define XIMStatusCallbacks 0x0200L
-#define XIMStatusNothing 0x0400L
-#define XIMStatusNone 0x0800L
-
-#define XNVaNestedList "XNVaNestedList"
-#define XNQueryInputStyle "queryInputStyle"
-#define XNClientWindow "clientWindow"
-#define XNInputStyle "inputStyle"
-#define XNFocusWindow "focusWindow"
-#define XNResourceName "resourceName"
-#define XNResourceClass "resourceClass"
-#define XNGeometryCallback "geometryCallback"
-#define XNDestroyCallback "destroyCallback"
-#define XNFilterEvents "filterEvents"
-#define XNPreeditStartCallback "preeditStartCallback"
-#define XNPreeditDoneCallback "preeditDoneCallback"
-#define XNPreeditDrawCallback "preeditDrawCallback"
-#define XNPreeditCaretCallback "preeditCaretCallback"
-#define XNPreeditStateNotifyCallback "preeditStateNotifyCallback"
-#define XNPreeditAttributes "preeditAttributes"
-#define XNStatusStartCallback "statusStartCallback"
-#define XNStatusDoneCallback "statusDoneCallback"
-#define XNStatusDrawCallback "statusDrawCallback"
-#define XNStatusAttributes "statusAttributes"
-#define XNArea "area"
-#define XNAreaNeeded "areaNeeded"
-#define XNSpotLocation "spotLocation"
-#define XNColormap "colorMap"
-#define XNStdColormap "stdColorMap"
-#define XNForeground "foreground"
-#define XNBackground "background"
-#define XNBackgroundPixmap "backgroundPixmap"
-#define XNFontSet "fontSet"
-#define XNLineSpace "lineSpace"
-#define XNCursor "cursor"
-
-#define XNQueryIMValuesList "queryIMValuesList"
-#define XNQueryICValuesList "queryICValuesList"
-#define XNVisiblePosition "visiblePosition"
-#define XNR6PreeditCallback "r6PreeditCallback"
-#define XNStringConversionCallback "stringConversionCallback"
-#define XNStringConversion "stringConversion"
-#define XNResetState "resetState"
-#define XNHotKey "hotKey"
-#define XNHotKeyState "hotKeyState"
-#define XNPreeditState "preeditState"
-#define XNSeparatorofNestedList "separatorofNestedList"
-
-#define XBufferOverflow -1
-#define XLookupNone 1
-#define XLookupChars 2
-#define XLookupKeySym 3
-#define XLookupBoth 4
-
-typedef void *XVaNestedList;
-
-typedef struct {
- XPointer client_data;
- XIMProc callback;
-} XIMCallback;
-
-typedef struct {
- XPointer client_data;
- XICProc callback;
-} XICCallback;
-
-typedef unsigned long XIMFeedback;
-
-#define XIMReverse 1L
-#define XIMUnderline (1L<<1)
-#define XIMHighlight (1L<<2)
-#define XIMPrimary (1L<<5)
-#define XIMSecondary (1L<<6)
-#define XIMTertiary (1L<<7)
-#define XIMVisibleToForward (1L<<8)
-#define XIMVisibleToBackword (1L<<9)
-#define XIMVisibleToCenter (1L<<10)
-
-typedef struct _XIMText {
- unsigned short length;
- XIMFeedback *feedback;
- Bool encoding_is_wchar;
- union {
- char *multi_byte;
- wchar_t *wide_char;
- } string;
-} XIMText;
-
-typedef unsigned long XIMPreeditState;
-
-#define XIMPreeditUnKnown 0L
-#define XIMPreeditEnable 1L
-#define XIMPreeditDisable (1L<<1)
-
-typedef struct _XIMPreeditStateNotifyCallbackStruct {
- XIMPreeditState state;
-} XIMPreeditStateNotifyCallbackStruct;
-
-typedef unsigned long XIMResetState;
-
-#define XIMInitialState 1L
-#define XIMPreserveState (1L<<1)
-
-typedef unsigned long XIMStringConversionFeedback;
-
-#define XIMStringConversionLeftEdge (0x00000001)
-#define XIMStringConversionRightEdge (0x00000002)
-#define XIMStringConversionTopEdge (0x00000004)
-#define XIMStringConversionBottomEdge (0x00000008)
-#define XIMStringConversionConcealed (0x00000010)
-#define XIMStringConversionWrapped (0x00000020)
-
-typedef struct _XIMStringConversionText {
- unsigned short length;
- XIMStringConversionFeedback *feedback;
- Bool encoding_is_wchar;
- union {
- char *mbs;
- wchar_t *wcs;
- } string;
-} XIMStringConversionText;
-
-typedef unsigned short XIMStringConversionPosition;
-
-typedef unsigned short XIMStringConversionType;
-
-#define XIMStringConversionBuffer (0x0001)
-#define XIMStringConversionLine (0x0002)
-#define XIMStringConversionWord (0x0003)
-#define XIMStringConversionChar (0x0004)
-
-typedef unsigned short XIMStringConversionOperation;
-
-#define XIMStringConversionSubstitution (0x0001)
-#define XIMStringConversionRetrieval (0x0002)
-
-typedef enum {
- XIMForwardChar, XIMBackwardChar,
- XIMForwardWord, XIMBackwardWord,
- XIMCaretUp, XIMCaretDown,
- XIMNextLine, XIMPreviousLine,
- XIMLineStart, XIMLineEnd,
- XIMAbsolutePosition,
- XIMDontChange
-} XIMCaretDirection;
-
-typedef struct _XIMStringConversionCallbackStruct {
- XIMStringConversionPosition position;
- XIMCaretDirection direction;
- XIMStringConversionOperation operation;
- unsigned short factor;
- XIMStringConversionText *text;
-} XIMStringConversionCallbackStruct;
-
-typedef struct _XIMPreeditDrawCallbackStruct {
- int caret; /* Cursor offset within pre-edit string */
- int chg_first; /* Starting change position */
- int chg_length; /* Length of the change in character count */
- XIMText *text;
-} XIMPreeditDrawCallbackStruct;
-
-typedef enum {
- XIMIsInvisible, /* Disable caret feedback */
- XIMIsPrimary, /* UI defined caret feedback */
- XIMIsSecondary /* UI defined caret feedback */
-} XIMCaretStyle;
-
-typedef struct _XIMPreeditCaretCallbackStruct {
- int position; /* Caret offset within pre-edit string */
- XIMCaretDirection direction; /* Caret moves direction */
- XIMCaretStyle style; /* Feedback of the caret */
-} XIMPreeditCaretCallbackStruct;
-
-typedef enum {
- XIMTextType,
- XIMBitmapType
-} XIMStatusDataType;
-
-typedef struct _XIMStatusDrawCallbackStruct {
- XIMStatusDataType type;
- union {
- XIMText *text;
- Pixmap bitmap;
- } data;
-} XIMStatusDrawCallbackStruct;
-
-typedef struct _XIMHotKeyTrigger {
- KeySym keysym;
- int modifier;
- int modifier_mask;
-} XIMHotKeyTrigger;
-
-typedef struct _XIMHotKeyTriggers {
- int num_hot_key;
- XIMHotKeyTrigger *key;
-} XIMHotKeyTriggers;
-
-typedef unsigned long XIMHotKeyState;
-
-#define XIMHotKeyStateON (0x0001L)
-#define XIMHotKeyStateOFF (0x0002L)
-
-typedef struct {
- unsigned short count_values;
- char **supported_values;
-} XIMValuesList;
-
-_XFUNCPROTOBEGIN
-
-#if defined(WIN32) && !defined(_XLIBINT_)
-#define _Xdebug (*_Xdebug_p)
-#endif
-
-extern int _Xdebug;
-
-extern XFontStruct *XLoadQueryFont(
- Display* /* display */,
- _Xconst char* /* name */
-);
-
-extern XFontStruct *XQueryFont(
- Display* /* display */,
- XID /* font_ID */
-);
-
-
-extern XTimeCoord *XGetMotionEvents(
- Display* /* display */,
- Window /* w */,
- Time /* start */,
- Time /* stop */,
- int* /* nevents_return */
-);
-
-extern XModifierKeymap *XDeleteModifiermapEntry(
- XModifierKeymap* /* modmap */,
-#if NeedWidePrototypes
- unsigned int /* keycode_entry */,
-#else
- KeyCode /* keycode_entry */,
-#endif
- int /* modifier */
-);
-
-extern XModifierKeymap *XGetModifierMapping(
- Display* /* display */
-);
-
-extern XModifierKeymap *XInsertModifiermapEntry(
- XModifierKeymap* /* modmap */,
-#if NeedWidePrototypes
- unsigned int /* keycode_entry */,
-#else
- KeyCode /* keycode_entry */,
-#endif
- int /* modifier */
-);
-
-extern XModifierKeymap *XNewModifiermap(
- int /* max_keys_per_mod */
-);
-
-extern XImage *XCreateImage(
- Display* /* 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 */
-);
-extern Status XInitImage(
- XImage* /* image */
-);
-extern XImage *XGetImage(
- Display* /* display */,
- Drawable /* d */,
- int /* x */,
- int /* y */,
- unsigned int /* width */,
- unsigned int /* height */,
- unsigned long /* plane_mask */,
- int /* format */
-);
-extern XImage *XGetSubImage(
- Display* /* display */,
- Drawable /* d */,
- int /* x */,
- int /* y */,
- unsigned int /* width */,
- unsigned int /* height */,
- unsigned long /* plane_mask */,
- int /* format */,
- XImage* /* dest_image */,
- int /* dest_x */,
- int /* dest_y */
-);
-
-/*
- * X function declarations.
- */
-extern Display *XOpenDisplay(
- _Xconst char* /* display_name */
-);
-
-extern void XrmInitialize(
- void
-);
-
-extern char *XFetchBytes(
- Display* /* display */,
- int* /* nbytes_return */
-);
-extern char *XFetchBuffer(
- Display* /* display */,
- int* /* nbytes_return */,
- int /* buffer */
-);
-extern char *XGetAtomName(
- Display* /* display */,
- Atom /* atom */
-);
-extern Status XGetAtomNames(
- Display* /* dpy */,
- Atom* /* atoms */,
- int /* count */,
- char** /* names_return */
-);
-extern char *XGetDefault(
- Display* /* display */,
- _Xconst char* /* program */,
- _Xconst char* /* option */
-);
-extern char *XDisplayName(
- _Xconst char* /* string */
-);
-extern char *XKeysymToString(
- KeySym /* keysym */
-);
-
-extern int (*XSynchronize(
- Display* /* display */,
- Bool /* onoff */
-))(
- Display* /* display */
-);
-extern int (*XSetAfterFunction(
- Display* /* display */,
- int (*) (
- Display* /* display */
- ) /* procedure */
-))(
- Display* /* display */
-);
-extern Atom XInternAtom(
- Display* /* display */,
- _Xconst char* /* atom_name */,
- Bool /* only_if_exists */
-);
-extern Status XInternAtoms(
- Display* /* dpy */,
- char** /* names */,
- int /* count */,
- Bool /* onlyIfExists */,
- Atom* /* atoms_return */
-);
-extern Colormap XCopyColormapAndFree(
- Display* /* display */,
- Colormap /* colormap */
-);
-extern Colormap XCreateColormap(
- Display* /* display */,
- Window /* w */,
- Visual* /* visual */,
- int /* alloc */
-);
-extern Cursor XCreatePixmapCursor(
- Display* /* display */,
- Pixmap /* source */,
- Pixmap /* mask */,
- XColor* /* foreground_color */,
- XColor* /* background_color */,
- unsigned int /* x */,
- unsigned int /* y */
-);
-extern Cursor XCreateGlyphCursor(
- Display* /* display */,
- Font /* source_font */,
- Font /* mask_font */,
- unsigned int /* source_char */,
- unsigned int /* mask_char */,
- XColor _Xconst * /* foreground_color */,
- XColor _Xconst * /* background_color */
-);
-extern Cursor XCreateFontCursor(
- Display* /* display */,
- unsigned int /* shape */
-);
-extern Font XLoadFont(
- Display* /* display */,
- _Xconst char* /* name */
-);
-extern GC XCreateGC(
- Display* /* display */,
- Drawable /* d */,
- unsigned long /* valuemask */,
- XGCValues* /* values */
-);
-extern GContext XGContextFromGC(
- GC /* gc */
-);
-extern void XFlushGC(
- Display* /* display */,
- GC /* gc */
-);
-extern Pixmap XCreatePixmap(
- Display* /* display */,
- Drawable /* d */,
- unsigned int /* width */,
- unsigned int /* height */,
- unsigned int /* depth */
-);
-extern Pixmap XCreateBitmapFromData(
- Display* /* display */,
- Drawable /* d */,
- _Xconst char* /* data */,
- unsigned int /* width */,
- unsigned int /* height */
-);
-extern Pixmap XCreatePixmapFromBitmapData(
- Display* /* display */,
- Drawable /* d */,
- char* /* data */,
- unsigned int /* width */,
- unsigned int /* height */,
- unsigned long /* fg */,
- unsigned long /* bg */,
- unsigned int /* depth */
-);
-extern Window XCreateSimpleWindow(
- Display* /* display */,
- Window /* parent */,
- int /* x */,
- int /* y */,
- unsigned int /* width */,
- unsigned int /* height */,
- unsigned int /* border_width */,
- unsigned long /* border */,
- unsigned long /* background */
-);
-extern Window XGetSelectionOwner(
- Display* /* display */,
- Atom /* selection */
-);
-extern Window XCreateWindow(
- Display* /* display */,
- Window /* parent */,
- int /* x */,
- int /* y */,
- unsigned int /* width */,
- unsigned int /* height */,
- unsigned int /* border_width */,
- int /* depth */,
- unsigned int /* class */,
- Visual* /* visual */,
- unsigned long /* valuemask */,
- XSetWindowAttributes* /* attributes */
-);
-extern Colormap *XListInstalledColormaps(
- Display* /* display */,
- Window /* w */,
- int* /* num_return */
-);
-extern char **XListFonts(
- Display* /* display */,
- _Xconst char* /* pattern */,
- int /* maxnames */,
- int* /* actual_count_return */
-);
-extern char **XListFontsWithInfo(
- Display* /* display */,
- _Xconst char* /* pattern */,
- int /* maxnames */,
- int* /* count_return */,
- XFontStruct** /* info_return */
-);
-extern char **XGetFontPath(
- Display* /* display */,
- int* /* npaths_return */
-);
-extern char **XListExtensions(
- Display* /* display */,
- int* /* nextensions_return */
-);
-extern Atom *XListProperties(
- Display* /* display */,
- Window /* w */,
- int* /* num_prop_return */
-);
-extern XHostAddress *XListHosts(
- Display* /* display */,
- int* /* nhosts_return */,
- Bool* /* state_return */
-);
-extern KeySym XKeycodeToKeysym(
- Display* /* display */,
-#if NeedWidePrototypes
- unsigned int /* keycode */,
-#else
- KeyCode /* keycode */,
-#endif
- int /* index */
-);
-extern KeySym XLookupKeysym(
- XKeyEvent* /* key_event */,
- int /* index */
-);
-extern KeySym *XGetKeyboardMapping(
- Display* /* display */,
-#if NeedWidePrototypes
- unsigned int /* first_keycode */,
-#else
- KeyCode /* first_keycode */,
-#endif
- int /* keycode_count */,
- int* /* keysyms_per_keycode_return */
-);
-extern KeySym XStringToKeysym(
- _Xconst char* /* string */
-);
-extern long XMaxRequestSize(
- Display* /* display */
-);
-extern long XExtendedMaxRequestSize(
- Display* /* display */
-);
-extern char *XResourceManagerString(
- Display* /* display */
-);
-extern char *XScreenResourceString(
- Screen* /* screen */
-);
-extern unsigned long XDisplayMotionBufferSize(
- Display* /* display */
-);
-extern VisualID XVisualIDFromVisual(
- Visual* /* visual */
-);
-
-/* multithread routines */
-
-extern Status XInitThreads(
- void
-);
-
-extern void XLockDisplay(
- Display* /* display */
-);
-
-extern void XUnlockDisplay(
- Display* /* display */
-);
-
-/* routines for dealing with extensions */
-
-extern XExtCodes *XInitExtension(
- Display* /* display */,
- _Xconst char* /* name */
-);
-
-extern XExtCodes *XAddExtension(
- Display* /* display */
-);
-extern XExtData *XFindOnExtensionList(
- XExtData** /* structure */,
- int /* number */
-);
-extern XExtData **XEHeadOfExtensionList(
- XEDataObject /* object */
-);
-
-/* these are routines for which there are also macros */
-extern Window XRootWindow(
- Display* /* display */,
- int /* screen_number */
-);
-extern Window XDefaultRootWindow(
- Display* /* display */
-);
-extern Window XRootWindowOfScreen(
- Screen* /* screen */
-);
-extern Visual *XDefaultVisual(
- Display* /* display */,
- int /* screen_number */
-);
-extern Visual *XDefaultVisualOfScreen(
- Screen* /* screen */
-);
-extern GC XDefaultGC(
- Display* /* display */,
- int /* screen_number */
-);
-extern GC XDefaultGCOfScreen(
- Screen* /* screen */
-);
-extern unsigned long XBlackPixel(
- Display* /* display */,
- int /* screen_number */
-);
-extern unsigned long XWhitePixel(
- Display* /* display */,
- int /* screen_number */
-);
-extern unsigned long XAllPlanes(
- void
-);
-extern unsigned long XBlackPixelOfScreen(
- Screen* /* screen */
-);
-extern unsigned long XWhitePixelOfScreen(
- Screen* /* screen */
-);
-extern unsigned long XNextRequest(
- Display* /* display */
-);
-extern unsigned long XLastKnownRequestProcessed(
- Display* /* display */
-);
-extern char *XServerVendor(
- Display* /* display */
-);
-extern char *XDisplayString(
- Display* /* display */
-);
-extern Colormap XDefaultColormap(
- Display* /* display */,
- int /* screen_number */
-);
-extern Colormap XDefaultColormapOfScreen(
- Screen* /* screen */
-);
-extern Display *XDisplayOfScreen(
- Screen* /* screen */
-);
-extern Screen *XScreenOfDisplay(
- Display* /* display */,
- int /* screen_number */
-);
-extern Screen *XDefaultScreenOfDisplay(
- Display* /* display */
-);
-extern long XEventMaskOfScreen(
- Screen* /* screen */
-);
-
-extern int XScreenNumberOfScreen(
- Screen* /* screen */
-);
-
-typedef int (*XErrorHandler) ( /* WARNING, this type not in Xlib spec */
- Display* /* display */,
- XErrorEvent* /* error_event */
-);
-
-extern XErrorHandler XSetErrorHandler (
- XErrorHandler /* handler */
-);
-
-
-typedef int (*XIOErrorHandler) ( /* WARNING, this type not in Xlib spec */
- Display* /* display */
-);
-
-extern XIOErrorHandler XSetIOErrorHandler (
- XIOErrorHandler /* handler */
-);
-
-
-extern XPixmapFormatValues *XListPixmapFormats(
- Display* /* display */,
- int* /* count_return */
-);
-extern int *XListDepths(
- Display* /* display */,
- int /* screen_number */,
- int* /* count_return */
-);
-
-/* ICCCM routines for things that don't require special include files; */
-/* other declarations are given in Xutil.h */
-extern Status XReconfigureWMWindow(
- Display* /* display */,
- Window /* w */,
- int /* screen_number */,
- unsigned int /* mask */,
- XWindowChanges* /* changes */
-);
-
-extern Status XGetWMProtocols(
- Display* /* display */,
- Window /* w */,
- Atom** /* protocols_return */,
- int* /* count_return */
-);
-extern Status XSetWMProtocols(
- Display* /* display */,
- Window /* w */,
- Atom* /* protocols */,
- int /* count */
-);
-extern Status XIconifyWindow(
- Display* /* display */,
- Window /* w */,
- int /* screen_number */
-);
-extern Status XWithdrawWindow(
- Display* /* display */,
- Window /* w */,
- int /* screen_number */
-);
-extern Status XGetCommand(
- Display* /* display */,
- Window /* w */,
- char*** /* argv_return */,
- int* /* argc_return */
-);
-extern Status XGetWMColormapWindows(
- Display* /* display */,
- Window /* w */,
- Window** /* windows_return */,
- int* /* count_return */
-);
-extern Status XSetWMColormapWindows(
- Display* /* display */,
- Window /* w */,
- Window* /* colormap_windows */,
- int /* count */
-);
-extern void XFreeStringList(
- char** /* list */
-);
-extern int XSetTransientForHint(
- Display* /* display */,
- Window /* w */,
- Window /* prop_window */
-);
-
-/* The following are given in alphabetical order */
-
-extern int XActivateScreenSaver(
- Display* /* display */
-);
-
-extern int XAddHost(
- Display* /* display */,
- XHostAddress* /* host */
-);
-
-extern int XAddHosts(
- Display* /* display */,
- XHostAddress* /* hosts */,
- int /* num_hosts */
-);
-
-extern int XAddToExtensionList(
- struct _XExtData** /* structure */,
- XExtData* /* ext_data */
-);
-
-extern int XAddToSaveSet(
- Display* /* display */,
- Window /* w */
-);
-
-extern Status XAllocColor(
- Display* /* display */,
- Colormap /* colormap */,
- XColor* /* screen_in_out */
-);
-
-extern Status XAllocColorCells(
- Display* /* display */,
- Colormap /* colormap */,
- Bool /* contig */,
- unsigned long* /* plane_masks_return */,
- unsigned int /* nplanes */,
- unsigned long* /* pixels_return */,
- unsigned int /* npixels */
-);
-
-extern Status XAllocColorPlanes(
- Display* /* display */,
- Colormap /* colormap */,
- Bool /* contig */,
- unsigned long* /* pixels_return */,
- int /* ncolors */,
- int /* nreds */,
- int /* ngreens */,
- int /* nblues */,
- unsigned long* /* rmask_return */,
- unsigned long* /* gmask_return */,
- unsigned long* /* bmask_return */
-);
-
-extern Status XAllocNamedColor(
- Display* /* display */,
- Colormap /* colormap */,
- _Xconst char* /* color_name */,
- XColor* /* screen_def_return */,
- XColor* /* exact_def_return */
-);
-
-extern int XAllowEvents(
- Display* /* display */,
- int /* event_mode */,
- Time /* time */
-);
-
-extern int XAutoRepeatOff(
- Display* /* display */
-);
-
-extern int XAutoRepeatOn(
- Display* /* display */
-);
-
-extern int XBell(
- Display* /* display */,
- int /* percent */
-);
-
-extern int XBitmapBitOrder(
- Display* /* display */
-);
-
-extern int XBitmapPad(
- Display* /* display */
-);
-
-extern int XBitmapUnit(
- Display* /* display */
-);
-
-extern int XCellsOfScreen(
- Screen* /* screen */
-);
-
-extern int XChangeActivePointerGrab(
- Display* /* display */,
- unsigned int /* event_mask */,
- Cursor /* cursor */,
- Time /* time */
-);
-
-extern int XChangeGC(
- Display* /* display */,
- GC /* gc */,
- unsigned long /* valuemask */,
- XGCValues* /* values */
-);
-
-extern int XChangeKeyboardControl(
- Display* /* display */,
- unsigned long /* value_mask */,
- XKeyboardControl* /* values */
-);
-
-extern int XChangeKeyboardMapping(
- Display* /* display */,
- int /* first_keycode */,
- int /* keysyms_per_keycode */,
- KeySym* /* keysyms */,
- int /* num_codes */
-);
-
-extern int XChangePointerControl(
- Display* /* display */,
- Bool /* do_accel */,
- Bool /* do_threshold */,
- int /* accel_numerator */,
- int /* accel_denominator */,
- int /* threshold */
-);
-
-extern int XChangeProperty(
- Display* /* display */,
- Window /* w */,
- Atom /* property */,
- Atom /* type */,
- int /* format */,
- int /* mode */,
- _Xconst unsigned char* /* data */,
- int /* nelements */
-);
-
-extern int XChangeSaveSet(
- Display* /* display */,
- Window /* w */,
- int /* change_mode */
-);
-
-extern int XChangeWindowAttributes(
- Display* /* display */,
- Window /* w */,
- unsigned long /* valuemask */,
- XSetWindowAttributes* /* attributes */
-);
-
-extern Bool XCheckIfEvent(
- Display* /* display */,
- XEvent* /* event_return */,
- Bool (*) (
- Display* /* display */,
- XEvent* /* event */,
- XPointer /* arg */
- ) /* predicate */,
- XPointer /* arg */
-);
-
-extern Bool XCheckMaskEvent(
- Display* /* display */,
- long /* event_mask */,
- XEvent* /* event_return */
-);
-
-extern Bool XCheckTypedEvent(
- Display* /* display */,
- int /* event_type */,
- XEvent* /* event_return */
-);
-
-extern Bool XCheckTypedWindowEvent(
- Display* /* display */,
- Window /* w */,
- int /* event_type */,
- XEvent* /* event_return */
-);
-
-extern Bool XCheckWindowEvent(
- Display* /* display */,
- Window /* w */,
- long /* event_mask */,
- XEvent* /* event_return */
-);
-
-extern int XCirculateSubwindows(
- Display* /* display */,
- Window /* w */,
- int /* direction */
-);
-
-extern int XCirculateSubwindowsDown(
- Display* /* display */,
- Window /* w */
-);
-
-extern int XCirculateSubwindowsUp(
- Display* /* display */,
- Window /* w */
-);
-
-extern int XClearArea(
- Display* /* display */,
- Window /* w */,
- int /* x */,
- int /* y */,
- unsigned int /* width */,
- unsigned int /* height */,
- Bool /* exposures */
-);
-
-extern int XClearWindow(
- Display* /* display */,
- Window /* w */
-);
-
-extern int XCloseDisplay(
- Display* /* display */
-);
-
-extern int XConfigureWindow(
- Display* /* display */,
- Window /* w */,
- unsigned int /* value_mask */,
- XWindowChanges* /* values */
-);
-
-extern int XConnectionNumber(
- Display* /* display */
-);
-
-extern int XConvertSelection(
- Display* /* display */,
- Atom /* selection */,
- Atom /* target */,
- Atom /* property */,
- Window /* requestor */,
- Time /* time */
-);
-
-extern int XCopyArea(
- Display* /* display */,
- Drawable /* src */,
- Drawable /* dest */,
- GC /* gc */,
- int /* src_x */,
- int /* src_y */,
- unsigned int /* width */,
- unsigned int /* height */,
- int /* dest_x */,
- int /* dest_y */
-);
-
-extern int XCopyGC(
- Display* /* display */,
- GC /* src */,
- unsigned long /* valuemask */,
- GC /* dest */
-);
-
-extern int XCopyPlane(
- Display* /* display */,
- Drawable /* src */,
- Drawable /* dest */,
- GC /* gc */,
- int /* src_x */,
- int /* src_y */,
- unsigned int /* width */,
- unsigned int /* height */,
- int /* dest_x */,
- int /* dest_y */,
- unsigned long /* plane */
-);
-
-extern int XDefaultDepth(
- Display* /* display */,
- int /* screen_number */
-);
-
-extern int XDefaultDepthOfScreen(
- Screen* /* screen */
-);
-
-extern int XDefaultScreen(
- Display* /* display */
-);
-
-extern int XDefineCursor(
- Display* /* display */,
- Window /* w */,
- Cursor /* cursor */
-);
-
-extern int XDeleteProperty(
- Display* /* display */,
- Window /* w */,
- Atom /* property */
-);
-
-extern int XDestroyWindow(
- Display* /* display */,
- Window /* w */
-);
-
-extern int XDestroySubwindows(
- Display* /* display */,
- Window /* w */
-);
-
-extern int XDoesBackingStore(
- Screen* /* screen */
-);
-
-extern Bool XDoesSaveUnders(
- Screen* /* screen */
-);
-
-extern int XDisableAccessControl(
- Display* /* display */
-);
-
-
-extern int XDisplayCells(
- Display* /* display */,
- int /* screen_number */
-);
-
-extern int XDisplayHeight(
- Display* /* display */,
- int /* screen_number */
-);
-
-extern int XDisplayHeightMM(
- Display* /* display */,
- int /* screen_number */
-);
-
-extern int XDisplayKeycodes(
- Display* /* display */,
- int* /* min_keycodes_return */,
- int* /* max_keycodes_return */
-);
-
-extern int XDisplayPlanes(
- Display* /* display */,
- int /* screen_number */
-);
-
-extern int XDisplayWidth(
- Display* /* display */,
- int /* screen_number */
-);
-
-extern int XDisplayWidthMM(
- Display* /* display */,
- int /* screen_number */
-);
-
-extern int XDrawArc(
- Display* /* display */,
- Drawable /* d */,
- GC /* gc */,
- int /* x */,
- int /* y */,
- unsigned int /* width */,
- unsigned int /* height */,
- int /* angle1 */,
- int /* angle2 */
-);
-
-extern int XDrawArcs(
- Display* /* display */,
- Drawable /* d */,
- GC /* gc */,
- XArc* /* arcs */,
- int /* narcs */
-);
-
-extern int XDrawImageString(
- Display* /* display */,
- Drawable /* d */,
- GC /* gc */,
- int /* x */,
- int /* y */,
- _Xconst char* /* string */,
- int /* length */
-);
-
-extern int XDrawImageString16(
- Display* /* display */,
- Drawable /* d */,
- GC /* gc */,
- int /* x */,
- int /* y */,
- _Xconst XChar2b* /* string */,
- int /* length */
-);
-
-extern int XDrawLine(
- Display* /* display */,
- Drawable /* d */,
- GC /* gc */,
- int /* x1 */,
- int /* y1 */,
- int /* x2 */,
- int /* y2 */
-);
-
-extern int XDrawLines(
- Display* /* display */,
- Drawable /* d */,
- GC /* gc */,
- XPoint* /* points */,
- int /* npoints */,
- int /* mode */
-);
-
-extern int XDrawPoint(
- Display* /* display */,
- Drawable /* d */,
- GC /* gc */,
- int /* x */,
- int /* y */
-);
-
-extern int XDrawPoints(
- Display* /* display */,
- Drawable /* d */,
- GC /* gc */,
- XPoint* /* points */,
- int /* npoints */,
- int /* mode */
-);
-
-extern int XDrawRectangle(
- Display* /* display */,
- Drawable /* d */,
- GC /* gc */,
- int /* x */,
- int /* y */,
- unsigned int /* width */,
- unsigned int /* height */
-);
-
-extern int XDrawRectangles(
- Display* /* display */,
- Drawable /* d */,
- GC /* gc */,
- XRectangle* /* rectangles */,
- int /* nrectangles */
-);
-
-extern int XDrawSegments(
- Display* /* display */,
- Drawable /* d */,
- GC /* gc */,
- XSegment* /* segments */,
- int /* nsegments */
-);
-
-extern int XDrawString(
- Display* /* display */,
- Drawable /* d */,
- GC /* gc */,
- int /* x */,
- int /* y */,
- _Xconst char* /* string */,
- int /* length */
-);
-
-extern int XDrawString16(
- Display* /* display */,
- Drawable /* d */,
- GC /* gc */,
- int /* x */,
- int /* y */,
- _Xconst XChar2b* /* string */,
- int /* length */
-);
-
-extern int XDrawText(
- Display* /* display */,
- Drawable /* d */,
- GC /* gc */,
- int /* x */,
- int /* y */,
- XTextItem* /* items */,
- int /* nitems */
-);
-
-extern int XDrawText16(
- Display* /* display */,
- Drawable /* d */,
- GC /* gc */,
- int /* x */,
- int /* y */,
- XTextItem16* /* items */,
- int /* nitems */
-);
-
-extern int XEnableAccessControl(
- Display* /* display */
-);
-
-extern int XEventsQueued(
- Display* /* display */,
- int /* mode */
-);
-
-extern Status XFetchName(
- Display* /* display */,
- Window /* w */,
- char** /* window_name_return */
-);
-
-extern int XFillArc(
- Display* /* display */,
- Drawable /* d */,
- GC /* gc */,
- int /* x */,
- int /* y */,
- unsigned int /* width */,
- unsigned int /* height */,
- int /* angle1 */,
- int /* angle2 */
-);
-
-extern int XFillArcs(
- Display* /* display */,
- Drawable /* d */,
- GC /* gc */,
- XArc* /* arcs */,
- int /* narcs */
-);
-
-extern int XFillPolygon(
- Display* /* display */,
- Drawable /* d */,
- GC /* gc */,
- XPoint* /* points */,
- int /* npoints */,
- int /* shape */,
- int /* mode */
-);
-
-extern int XFillRectangle(
- Display* /* display */,
- Drawable /* d */,
- GC /* gc */,
- int /* x */,
- int /* y */,
- unsigned int /* width */,
- unsigned int /* height */
-);
-
-extern int XFillRectangles(
- Display* /* display */,
- Drawable /* d */,
- GC /* gc */,
- XRectangle* /* rectangles */,
- int /* nrectangles */
-);
-
-extern int XFlush(
- Display* /* display */
-);
-
-extern int XForceScreenSaver(
- Display* /* display */,
- int /* mode */
-);
-
-extern int XFree(
- void* /* data */
-);
-
-extern int XFreeColormap(
- Display* /* display */,
- Colormap /* colormap */
-);
-
-extern int XFreeColors(
- Display* /* display */,
- Colormap /* colormap */,
- unsigned long* /* pixels */,
- int /* npixels */,
- unsigned long /* planes */
-);
-
-extern int XFreeCursor(
- Display* /* display */,
- Cursor /* cursor */
-);
-
-extern int XFreeExtensionList(
- char** /* list */
-);
-
-extern int XFreeFont(
- Display* /* display */,
- XFontStruct* /* font_struct */
-);
-
-extern int XFreeFontInfo(
- char** /* names */,
- XFontStruct* /* free_info */,
- int /* actual_count */
-);
-
-extern int XFreeFontNames(
- char** /* list */
-);
-
-extern int XFreeFontPath(
- char** /* list */
-);
-
-extern int XFreeGC(
- Display* /* display */,
- GC /* gc */
-);
-
-extern int XFreeModifiermap(
- XModifierKeymap* /* modmap */
-);
-
-extern int XFreePixmap(
- Display* /* display */,
- Pixmap /* pixmap */
-);
-
-extern int XGeometry(
- Display* /* display */,
- int /* screen */,
- _Xconst char* /* position */,
- _Xconst char* /* default_position */,
- unsigned int /* bwidth */,
- unsigned int /* fwidth */,
- unsigned int /* fheight */,
- int /* xadder */,
- int /* yadder */,
- int* /* x_return */,
- int* /* y_return */,
- int* /* width_return */,
- int* /* height_return */
-);
-
-extern int XGetErrorDatabaseText(
- Display* /* display */,
- _Xconst char* /* name */,
- _Xconst char* /* message */,
- _Xconst char* /* default_string */,
- char* /* buffer_return */,
- int /* length */
-);
-
-extern int XGetErrorText(
- Display* /* display */,
- int /* code */,
- char* /* buffer_return */,
- int /* length */
-);
-
-extern Bool XGetFontProperty(
- XFontStruct* /* font_struct */,
- Atom /* atom */,
- unsigned long* /* value_return */
-);
-
-extern Status XGetGCValues(
- Display* /* display */,
- GC /* gc */,
- unsigned long /* valuemask */,
- XGCValues* /* values_return */
-);
-
-extern Status XGetGeometry(
- Display* /* display */,
- Drawable /* d */,
- Window* /* root_return */,
- int* /* x_return */,
- int* /* y_return */,
- unsigned int* /* width_return */,
- unsigned int* /* height_return */,
- unsigned int* /* border_width_return */,
- unsigned int* /* depth_return */
-);
-
-extern Status XGetIconName(
- Display* /* display */,
- Window /* w */,
- char** /* icon_name_return */
-);
-
-extern int XGetInputFocus(
- Display* /* display */,
- Window* /* focus_return */,
- int* /* revert_to_return */
-);
-
-extern int XGetKeyboardControl(
- Display* /* display */,
- XKeyboardState* /* values_return */
-);
-
-extern int XGetPointerControl(
- Display* /* display */,
- int* /* accel_numerator_return */,
- int* /* accel_denominator_return */,
- int* /* threshold_return */
-);
-
-extern int XGetPointerMapping(
- Display* /* display */,
- unsigned char* /* map_return */,
- int /* nmap */
-);
-
-extern int XGetScreenSaver(
- Display* /* display */,
- int* /* timeout_return */,
- int* /* interval_return */,
- int* /* prefer_blanking_return */,
- int* /* allow_exposures_return */
-);
-
-extern Status XGetTransientForHint(
- Display* /* display */,
- Window /* w */,
- Window* /* prop_window_return */
-);
-
-extern int XGetWindowProperty(
- Display* /* display */,
- Window /* w */,
- Atom /* property */,
- long /* long_offset */,
- long /* long_length */,
- Bool /* delete */,
- Atom /* req_type */,
- Atom* /* actual_type_return */,
- int* /* actual_format_return */,
- unsigned long* /* nitems_return */,
- unsigned long* /* bytes_after_return */,
- unsigned char** /* prop_return */
-);
-
-extern Status XGetWindowAttributes(
- Display* /* display */,
- Window /* w */,
- XWindowAttributes* /* window_attributes_return */
-);
-
-extern int XGrabButton(
- Display* /* display */,
- unsigned int /* button */,
- unsigned int /* modifiers */,
- Window /* grab_window */,
- Bool /* owner_events */,
- unsigned int /* event_mask */,
- int /* pointer_mode */,
- int /* keyboard_mode */,
- Window /* confine_to */,
- Cursor /* cursor */
-);
-
-extern int XGrabKey(
- Display* /* display */,
- int /* keycode */,
- unsigned int /* modifiers */,
- Window /* grab_window */,
- Bool /* owner_events */,
- int /* pointer_mode */,
- int /* keyboard_mode */
-);
-
-extern int XGrabKeyboard(
- Display* /* display */,
- Window /* grab_window */,
- Bool /* owner_events */,
- int /* pointer_mode */,
- int /* keyboard_mode */,
- Time /* time */
-);
-
-extern int XGrabPointer(
- Display* /* display */,
- Window /* grab_window */,
- Bool /* owner_events */,
- unsigned int /* event_mask */,
- int /* pointer_mode */,
- int /* keyboard_mode */,
- Window /* confine_to */,
- Cursor /* cursor */,
- Time /* time */
-);
-
-extern int XGrabServer(
- Display* /* display */
-);
-
-extern int XHeightMMOfScreen(
- Screen* /* screen */
-);
-
-extern int XHeightOfScreen(
- Screen* /* screen */
-);
-
-extern int XIfEvent(
- Display* /* display */,
- XEvent* /* event_return */,
- Bool (*) (
- Display* /* display */,
- XEvent* /* event */,
- XPointer /* arg */
- ) /* predicate */,
- XPointer /* arg */
-);
-
-extern int XImageByteOrder(
- Display* /* display */
-);
-
-extern int XInstallColormap(
- Display* /* display */,
- Colormap /* colormap */
-);
-
-extern KeyCode XKeysymToKeycode(
- Display* /* display */,
- KeySym /* keysym */
-);
-
-extern int XKillClient(
- Display* /* display */,
- XID /* resource */
-);
-
-extern Status XLookupColor(
- Display* /* display */,
- Colormap /* colormap */,
- _Xconst char* /* color_name */,
- XColor* /* exact_def_return */,
- XColor* /* screen_def_return */
-);
-
-extern int XLowerWindow(
- Display* /* display */,
- Window /* w */
-);
-
-extern int XMapRaised(
- Display* /* display */,
- Window /* w */
-);
-
-extern int XMapSubwindows(
- Display* /* display */,
- Window /* w */
-);
-
-extern int XMapWindow(
- Display* /* display */,
- Window /* w */
-);
-
-extern int XMaskEvent(
- Display* /* display */,
- long /* event_mask */,
- XEvent* /* event_return */
-);
-
-extern int XMaxCmapsOfScreen(
- Screen* /* screen */
-);
-
-extern int XMinCmapsOfScreen(
- Screen* /* screen */
-);
-
-extern int XMoveResizeWindow(
- Display* /* display */,
- Window /* w */,
- int /* x */,
- int /* y */,
- unsigned int /* width */,
- unsigned int /* height */
-);
-
-extern int XMoveWindow(
- Display* /* display */,
- Window /* w */,
- int /* x */,
- int /* y */
-);
-
-extern int XNextEvent(
- Display* /* display */,
- XEvent* /* event_return */
-);
-
-extern int XNoOp(
- Display* /* display */
-);
-
-extern Status XParseColor(
- Display* /* display */,
- Colormap /* colormap */,
- _Xconst char* /* spec */,
- XColor* /* exact_def_return */
-);
-
-extern int XParseGeometry(
- _Xconst char* /* parsestring */,
- int* /* x_return */,
- int* /* y_return */,
- unsigned int* /* width_return */,
- unsigned int* /* height_return */
-);
-
-extern int XPeekEvent(
- Display* /* display */,
- XEvent* /* event_return */
-);
-
-extern int XPeekIfEvent(
- Display* /* display */,
- XEvent* /* event_return */,
- Bool (*) (
- Display* /* display */,
- XEvent* /* event */,
- XPointer /* arg */
- ) /* predicate */,
- XPointer /* arg */
-);
-
-extern int XPending(
- Display* /* display */
-);
-
-extern int XPlanesOfScreen(
- Screen* /* screen */
-);
-
-extern int XProtocolRevision(
- Display* /* display */
-);
-
-extern int XProtocolVersion(
- Display* /* display */
-);
-
-
-extern int XPutBackEvent(
- Display* /* display */,
- XEvent* /* event */
-);
-
-extern int XPutImage(
- Display* /* display */,
- Drawable /* d */,
- GC /* gc */,
- XImage* /* image */,
- int /* src_x */,
- int /* src_y */,
- int /* dest_x */,
- int /* dest_y */,
- unsigned int /* width */,
- unsigned int /* height */
-);
-
-extern int XQLength(
- Display* /* display */
-);
-
-extern Status XQueryBestCursor(
- Display* /* display */,
- Drawable /* d */,
- unsigned int /* width */,
- unsigned int /* height */,
- unsigned int* /* width_return */,
- unsigned int* /* height_return */
-);
-
-extern Status XQueryBestSize(
- Display* /* display */,
- int /* class */,
- Drawable /* which_screen */,
- unsigned int /* width */,
- unsigned int /* height */,
- unsigned int* /* width_return */,
- unsigned int* /* height_return */
-);
-
-extern Status XQueryBestStipple(
- Display* /* display */,
- Drawable /* which_screen */,
- unsigned int /* width */,
- unsigned int /* height */,
- unsigned int* /* width_return */,
- unsigned int* /* height_return */
-);
-
-extern Status XQueryBestTile(
- Display* /* display */,
- Drawable /* which_screen */,
- unsigned int /* width */,
- unsigned int /* height */,
- unsigned int* /* width_return */,
- unsigned int* /* height_return */
-);
-
-extern int XQueryColor(
- Display* /* display */,
- Colormap /* colormap */,
- XColor* /* def_in_out */
-);
-
-extern int XQueryColors(
- Display* /* display */,
- Colormap /* colormap */,
- XColor* /* defs_in_out */,
- int /* ncolors */
-);
-
-extern Bool XQueryExtension(
- Display* /* display */,
- _Xconst char* /* name */,
- int* /* major_opcode_return */,
- int* /* first_event_return */,
- int* /* first_error_return */
-);
-
-extern int XQueryKeymap(
- Display* /* display */,
- char [32] /* keys_return */
-);
-
-extern Bool XQueryPointer(
- Display* /* display */,
- Window /* w */,
- Window* /* root_return */,
- Window* /* child_return */,
- int* /* root_x_return */,
- int* /* root_y_return */,
- int* /* win_x_return */,
- int* /* win_y_return */,
- unsigned int* /* mask_return */
-);
-
-extern int XQueryTextExtents(
- Display* /* display */,
- XID /* font_ID */,
- _Xconst char* /* string */,
- int /* nchars */,
- int* /* direction_return */,
- int* /* font_ascent_return */,
- int* /* font_descent_return */,
- XCharStruct* /* overall_return */
-);
-
-extern int XQueryTextExtents16(
- Display* /* display */,
- XID /* font_ID */,
- _Xconst XChar2b* /* string */,
- int /* nchars */,
- int* /* direction_return */,
- int* /* font_ascent_return */,
- int* /* font_descent_return */,
- XCharStruct* /* overall_return */
-);
-
-extern Status XQueryTree(
- Display* /* display */,
- Window /* w */,
- Window* /* root_return */,
- Window* /* parent_return */,
- Window** /* children_return */,
- unsigned int* /* nchildren_return */
-);
-
-extern int XRaiseWindow(
- Display* /* display */,
- Window /* w */
-);
-
-extern int XReadBitmapFile(
- Display* /* display */,
- Drawable /* d */,
- _Xconst char* /* filename */,
- unsigned int* /* width_return */,
- unsigned int* /* height_return */,
- Pixmap* /* bitmap_return */,
- int* /* x_hot_return */,
- int* /* y_hot_return */
-);
-
-extern int XReadBitmapFileData(
- _Xconst char* /* filename */,
- unsigned int* /* width_return */,
- unsigned int* /* height_return */,
- unsigned char** /* data_return */,
- int* /* x_hot_return */,
- int* /* y_hot_return */
-);
-
-extern int XRebindKeysym(
- Display* /* display */,
- KeySym /* keysym */,
- KeySym* /* list */,
- int /* mod_count */,
- _Xconst unsigned char* /* string */,
- int /* bytes_string */
-);
-
-extern int XRecolorCursor(
- Display* /* display */,
- Cursor /* cursor */,
- XColor* /* foreground_color */,
- XColor* /* background_color */
-);
-
-extern int XRefreshKeyboardMapping(
- XMappingEvent* /* event_map */
-);
-
-extern int XRemoveFromSaveSet(
- Display* /* display */,
- Window /* w */
-);
-
-extern int XRemoveHost(
- Display* /* display */,
- XHostAddress* /* host */
-);
-
-extern int XRemoveHosts(
- Display* /* display */,
- XHostAddress* /* hosts */,
- int /* num_hosts */
-);
-
-extern int XReparentWindow(
- Display* /* display */,
- Window /* w */,
- Window /* parent */,
- int /* x */,
- int /* y */
-);
-
-extern int XResetScreenSaver(
- Display* /* display */
-);
-
-extern int XResizeWindow(
- Display* /* display */,
- Window /* w */,
- unsigned int /* width */,
- unsigned int /* height */
-);
-
-extern int XRestackWindows(
- Display* /* display */,
- Window* /* windows */,
- int /* nwindows */
-);
-
-extern int XRotateBuffers(
- Display* /* display */,
- int /* rotate */
-);
-
-extern int XRotateWindowProperties(
- Display* /* display */,
- Window /* w */,
- Atom* /* properties */,
- int /* num_prop */,
- int /* npositions */
-);
-
-extern int XScreenCount(
- Display* /* display */
-);
-
-extern int XSelectInput(
- Display* /* display */,
- Window /* w */,
- long /* event_mask */
-);
-
-extern Status XSendEvent(
- Display* /* display */,
- Window /* w */,
- Bool /* propagate */,
- long /* event_mask */,
- XEvent* /* event_send */
-);
-
-extern int XSetAccessControl(
- Display* /* display */,
- int /* mode */
-);
-
-extern int XSetArcMode(
- Display* /* display */,
- GC /* gc */,
- int /* arc_mode */
-);
-
-extern int XSetBackground(
- Display* /* display */,
- GC /* gc */,
- unsigned long /* background */
-);
-
-extern int XSetClipMask(
- Display* /* display */,
- GC /* gc */,
- Pixmap /* pixmap */
-);
-
-extern int XSetClipOrigin(
- Display* /* display */,
- GC /* gc */,
- int /* clip_x_origin */,
- int /* clip_y_origin */
-);
-
-extern int XSetClipRectangles(
- Display* /* display */,
- GC /* gc */,
- int /* clip_x_origin */,
- int /* clip_y_origin */,
- XRectangle* /* rectangles */,
- int /* n */,
- int /* ordering */
-);
-
-extern int XSetCloseDownMode(
- Display* /* display */,
- int /* close_mode */
-);
-
-extern int XSetCommand(
- Display* /* display */,
- Window /* w */,
- char** /* argv */,
- int /* argc */
-);
-
-extern int XSetDashes(
- Display* /* display */,
- GC /* gc */,
- int /* dash_offset */,
- _Xconst char* /* dash_list */,
- int /* n */
-);
-
-extern int XSetFillRule(
- Display* /* display */,
- GC /* gc */,
- int /* fill_rule */
-);
-
-extern int XSetFillStyle(
- Display* /* display */,
- GC /* gc */,
- int /* fill_style */
-);
-
-extern int XSetFont(
- Display* /* display */,
- GC /* gc */,
- Font /* font */
-);
-
-extern int XSetFontPath(
- Display* /* display */,
- char** /* directories */,
- int /* ndirs */
-);
-
-extern int XSetForeground(
- Display* /* display */,
- GC /* gc */,
- unsigned long /* foreground */
-);
-
-extern int XSetFunction(
- Display* /* display */,
- GC /* gc */,
- int /* function */
-);
-
-extern int XSetGraphicsExposures(
- Display* /* display */,
- GC /* gc */,
- Bool /* graphics_exposures */
-);
-
-extern int XSetIconName(
- Display* /* display */,
- Window /* w */,
- _Xconst char* /* icon_name */
-);
-
-extern int XSetInputFocus(
- Display* /* display */,
- Window /* focus */,
- int /* revert_to */,
- Time /* time */
-);
-
-extern int XSetLineAttributes(
- Display* /* display */,
- GC /* gc */,
- unsigned int /* line_width */,
- int /* line_style */,
- int /* cap_style */,
- int /* join_style */
-);
-
-extern int XSetModifierMapping(
- Display* /* display */,
- XModifierKeymap* /* modmap */
-);
-
-extern int XSetPlaneMask(
- Display* /* display */,
- GC /* gc */,
- unsigned long /* plane_mask */
-);
-
-extern int XSetPointerMapping(
- Display* /* display */,
- _Xconst unsigned char* /* map */,
- int /* nmap */
-);
-
-extern int XSetScreenSaver(
- Display* /* display */,
- int /* timeout */,
- int /* interval */,
- int /* prefer_blanking */,
- int /* allow_exposures */
-);
-
-extern int XSetSelectionOwner(
- Display* /* display */,
- Atom /* selection */,
- Window /* owner */,
- Time /* time */
-);
-
-extern int XSetState(
- Display* /* display */,
- GC /* gc */,
- unsigned long /* foreground */,
- unsigned long /* background */,
- int /* function */,
- unsigned long /* plane_mask */
-);
-
-extern int XSetStipple(
- Display* /* display */,
- GC /* gc */,
- Pixmap /* stipple */
-);
-
-extern int XSetSubwindowMode(
- Display* /* display */,
- GC /* gc */,
- int /* subwindow_mode */
-);
-
-extern int XSetTSOrigin(
- Display* /* display */,
- GC /* gc */,
- int /* ts_x_origin */,
- int /* ts_y_origin */
-);
-
-extern int XSetTile(
- Display* /* display */,
- GC /* gc */,
- Pixmap /* tile */
-);
-
-extern int XSetWindowBackground(
- Display* /* display */,
- Window /* w */,
- unsigned long /* background_pixel */
-);
-
-extern int XSetWindowBackgroundPixmap(
- Display* /* display */,
- Window /* w */,
- Pixmap /* background_pixmap */
-);
-
-extern int XSetWindowBorder(
- Display* /* display */,
- Window /* w */,
- unsigned long /* border_pixel */
-);
-
-extern int XSetWindowBorderPixmap(
- Display* /* display */,
- Window /* w */,
- Pixmap /* border_pixmap */
-);
-
-extern int XSetWindowBorderWidth(
- Display* /* display */,
- Window /* w */,
- unsigned int /* width */
-);
-
-extern int XSetWindowColormap(
- Display* /* display */,
- Window /* w */,
- Colormap /* colormap */
-);
-
-extern int XStoreBuffer(
- Display* /* display */,
- _Xconst char* /* bytes */,
- int /* nbytes */,
- int /* buffer */
-);
-
-extern int XStoreBytes(
- Display* /* display */,
- _Xconst char* /* bytes */,
- int /* nbytes */
-);
-
-extern int XStoreColor(
- Display* /* display */,
- Colormap /* colormap */,
- XColor* /* color */
-);
-
-extern int XStoreColors(
- Display* /* display */,
- Colormap /* colormap */,
- XColor* /* color */,
- int /* ncolors */
-);
-
-extern int XStoreName(
- Display* /* display */,
- Window /* w */,
- _Xconst char* /* window_name */
-);
-
-extern int XStoreNamedColor(
- Display* /* display */,
- Colormap /* colormap */,
- _Xconst char* /* color */,
- unsigned long /* pixel */,
- int /* flags */
-);
-
-extern int XSync(
- Display* /* display */,
- Bool /* discard */
-);
-
-extern int XTextExtents(
- XFontStruct* /* font_struct */,
- _Xconst char* /* string */,
- int /* nchars */,
- int* /* direction_return */,
- int* /* font_ascent_return */,
- int* /* font_descent_return */,
- XCharStruct* /* overall_return */
-);
-
-extern int XTextExtents16(
- XFontStruct* /* font_struct */,
- _Xconst XChar2b* /* string */,
- int /* nchars */,
- int* /* direction_return */,
- int* /* font_ascent_return */,
- int* /* font_descent_return */,
- XCharStruct* /* overall_return */
-);
-
-extern int XTextWidth(
- XFontStruct* /* font_struct */,
- _Xconst char* /* string */,
- int /* count */
-);
-
-extern int XTextWidth16(
- XFontStruct* /* font_struct */,
- _Xconst XChar2b* /* string */,
- int /* count */
-);
-
-extern Bool XTranslateCoordinates(
- Display* /* display */,
- Window /* src_w */,
- Window /* dest_w */,
- int /* src_x */,
- int /* src_y */,
- int* /* dest_x_return */,
- int* /* dest_y_return */,
- Window* /* child_return */
-);
-
-extern int XUndefineCursor(
- Display* /* display */,
- Window /* w */
-);
-
-extern int XUngrabButton(
- Display* /* display */,
- unsigned int /* button */,
- unsigned int /* modifiers */,
- Window /* grab_window */
-);
-
-extern int XUngrabKey(
- Display* /* display */,
- int /* keycode */,
- unsigned int /* modifiers */,
- Window /* grab_window */
-);
-
-extern int XUngrabKeyboard(
- Display* /* display */,
- Time /* time */
-);
-
-extern int XUngrabPointer(
- Display* /* display */,
- Time /* time */
-);
-
-extern int XUngrabServer(
- Display* /* display */
-);
-
-extern int XUninstallColormap(
- Display* /* display */,
- Colormap /* colormap */
-);
-
-extern int XUnloadFont(
- Display* /* display */,
- Font /* font */
-);
-
-extern int XUnmapSubwindows(
- Display* /* display */,
- Window /* w */
-);
-
-extern int XUnmapWindow(
- Display* /* display */,
- Window /* w */
-);
-
-extern int XVendorRelease(
- Display* /* display */
-);
-
-extern int XWarpPointer(
- Display* /* display */,
- Window /* src_w */,
- Window /* dest_w */,
- int /* src_x */,
- int /* src_y */,
- unsigned int /* src_width */,
- unsigned int /* src_height */,
- int /* dest_x */,
- int /* dest_y */
-);
-
-extern int XWidthMMOfScreen(
- Screen* /* screen */
-);
-
-extern int XWidthOfScreen(
- Screen* /* screen */
-);
-
-extern int XWindowEvent(
- Display* /* display */,
- Window /* w */,
- long /* event_mask */,
- XEvent* /* event_return */
-);
-
-extern int XWriteBitmapFile(
- Display* /* display */,
- _Xconst char* /* filename */,
- Pixmap /* bitmap */,
- unsigned int /* width */,
- unsigned int /* height */,
- int /* x_hot */,
- int /* y_hot */
-);
-
-extern Bool XSupportsLocale (void);
-
-extern char *XSetLocaleModifiers(
- const char* /* modifier_list */
-);
-
-extern XOM XOpenOM(
- Display* /* display */,
- struct _XrmHashBucketRec* /* rdb */,
- _Xconst char* /* res_name */,
- _Xconst char* /* res_class */
-);
-
-extern Status XCloseOM(
- XOM /* om */
-);
-
-extern char *XSetOMValues(
- XOM /* om */,
- ...
-) _X_SENTINEL(0);
-
-extern char *XGetOMValues(
- XOM /* om */,
- ...
-) _X_SENTINEL(0);
-
-extern Display *XDisplayOfOM(
- XOM /* om */
-);
-
-extern char *XLocaleOfOM(
- XOM /* om */
-);
-
-extern XOC XCreateOC(
- XOM /* om */,
- ...
-) _X_SENTINEL(0);
-
-extern void XDestroyOC(
- XOC /* oc */
-);
-
-extern XOM XOMOfOC(
- XOC /* oc */
-);
-
-extern char *XSetOCValues(
- XOC /* oc */,
- ...
-) _X_SENTINEL(0);
-
-extern char *XGetOCValues(
- XOC /* oc */,
- ...
-) _X_SENTINEL(0);
-
-extern XFontSet XCreateFontSet(
- Display* /* display */,
- _Xconst char* /* base_font_name_list */,
- char*** /* missing_charset_list */,
- int* /* missing_charset_count */,
- char** /* def_string */
-);
-
-extern void XFreeFontSet(
- Display* /* display */,
- XFontSet /* font_set */
-);
-
-extern int XFontsOfFontSet(
- XFontSet /* font_set */,
- XFontStruct*** /* font_struct_list */,
- char*** /* font_name_list */
-);
-
-extern char *XBaseFontNameListOfFontSet(
- XFontSet /* font_set */
-);
-
-extern char *XLocaleOfFontSet(
- XFontSet /* font_set */
-);
-
-extern Bool XContextDependentDrawing(
- XFontSet /* font_set */
-);
-
-extern Bool XDirectionalDependentDrawing(
- XFontSet /* font_set */
-);
-
-extern Bool XContextualDrawing(
- XFontSet /* font_set */
-);
-
-extern XFontSetExtents *XExtentsOfFontSet(
- XFontSet /* font_set */
-);
-
-extern int XmbTextEscapement(
- XFontSet /* font_set */,
- _Xconst char* /* text */,
- int /* bytes_text */
-);
-
-extern int XwcTextEscapement(
- XFontSet /* font_set */,
- _Xconst wchar_t* /* text */,
- int /* num_wchars */
-);
-
-extern int Xutf8TextEscapement(
- XFontSet /* font_set */,
- _Xconst char* /* text */,
- int /* bytes_text */
-);
-
-extern int XmbTextExtents(
- XFontSet /* font_set */,
- _Xconst char* /* text */,
- int /* bytes_text */,
- XRectangle* /* overall_ink_return */,
- XRectangle* /* overall_logical_return */
-);
-
-extern int XwcTextExtents(
- XFontSet /* font_set */,
- _Xconst wchar_t* /* text */,
- int /* num_wchars */,
- XRectangle* /* overall_ink_return */,
- XRectangle* /* overall_logical_return */
-);
-
-extern int Xutf8TextExtents(
- XFontSet /* font_set */,
- _Xconst char* /* text */,
- int /* bytes_text */,
- XRectangle* /* overall_ink_return */,
- XRectangle* /* overall_logical_return */
-);
-
-extern Status XmbTextPerCharExtents(
- 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 */
-);
-
-extern Status XwcTextPerCharExtents(
- XFontSet /* font_set */,
- _Xconst wchar_t* /* text */,
- int /* num_wchars */,
- XRectangle* /* ink_extents_buffer */,
- XRectangle* /* logical_extents_buffer */,
- int /* buffer_size */,
- int* /* num_chars */,
- XRectangle* /* overall_ink_return */,
- XRectangle* /* overall_logical_return */
-);
-
-extern Status Xutf8TextPerCharExtents(
- 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 */
-);
-
-extern void XmbDrawText(
- Display* /* display */,
- Drawable /* d */,
- GC /* gc */,
- int /* x */,
- int /* y */,
- XmbTextItem* /* text_items */,
- int /* nitems */
-);
-
-extern void XwcDrawText(
- Display* /* display */,
- Drawable /* d */,
- GC /* gc */,
- int /* x */,
- int /* y */,
- XwcTextItem* /* text_items */,
- int /* nitems */
-);
-
-extern void Xutf8DrawText(
- Display* /* display */,
- Drawable /* d */,
- GC /* gc */,
- int /* x */,
- int /* y */,
- XmbTextItem* /* text_items */,
- int /* nitems */
-);
-
-extern void XmbDrawString(
- Display* /* display */,
- Drawable /* d */,
- XFontSet /* font_set */,
- GC /* gc */,
- int /* x */,
- int /* y */,
- _Xconst char* /* text */,
- int /* bytes_text */
-);
-
-extern void XwcDrawString(
- Display* /* display */,
- Drawable /* d */,
- XFontSet /* font_set */,
- GC /* gc */,
- int /* x */,
- int /* y */,
- _Xconst wchar_t* /* text */,
- int /* num_wchars */
-);
-
-extern void Xutf8DrawString(
- Display* /* display */,
- Drawable /* d */,
- XFontSet /* font_set */,
- GC /* gc */,
- int /* x */,
- int /* y */,
- _Xconst char* /* text */,
- int /* bytes_text */
-);
-
-extern void XmbDrawImageString(
- Display* /* display */,
- Drawable /* d */,
- XFontSet /* font_set */,
- GC /* gc */,
- int /* x */,
- int /* y */,
- _Xconst char* /* text */,
- int /* bytes_text */
-);
-
-extern void XwcDrawImageString(
- Display* /* display */,
- Drawable /* d */,
- XFontSet /* font_set */,
- GC /* gc */,
- int /* x */,
- int /* y */,
- _Xconst wchar_t* /* text */,
- int /* num_wchars */
-);
-
-extern void Xutf8DrawImageString(
- Display* /* display */,
- Drawable /* d */,
- XFontSet /* font_set */,
- GC /* gc */,
- int /* x */,
- int /* y */,
- _Xconst char* /* text */,
- int /* bytes_text */
-);
-
-extern XIM XOpenIM(
- Display* /* dpy */,
- struct _XrmHashBucketRec* /* rdb */,
- char* /* res_name */,
- char* /* res_class */
-);
-
-extern Status XCloseIM(
- XIM /* im */
-);
-
-extern char *XGetIMValues(
- XIM /* im */, ...
-) _X_SENTINEL(0);
-
-extern char *XSetIMValues(
- XIM /* im */, ...
-) _X_SENTINEL(0);
-
-extern Display *XDisplayOfIM(
- XIM /* im */
-);
-
-extern char *XLocaleOfIM(
- XIM /* im*/
-);
-
-extern XIC XCreateIC(
- XIM /* im */, ...
-) _X_SENTINEL(0);
-
-extern void XDestroyIC(
- XIC /* ic */
-);
-
-extern void XSetICFocus(
- XIC /* ic */
-);
-
-extern void XUnsetICFocus(
- XIC /* ic */
-);
-
-extern wchar_t *XwcResetIC(
- XIC /* ic */
-);
-
-extern char *XmbResetIC(
- XIC /* ic */
-);
-
-extern char *Xutf8ResetIC(
- XIC /* ic */
-);
-
-extern char *XSetICValues(
- XIC /* ic */, ...
-) _X_SENTINEL(0);
-
-extern char *XGetICValues(
- XIC /* ic */, ...
-) _X_SENTINEL(0);
-
-extern XIM XIMOfIC(
- XIC /* ic */
-);
-
-extern Bool XFilterEvent(
- XEvent* /* event */,
- Window /* window */
-);
-
-extern int XmbLookupString(
- XIC /* ic */,
- XKeyPressedEvent* /* event */,
- char* /* buffer_return */,
- int /* bytes_buffer */,
- KeySym* /* keysym_return */,
- Status* /* status_return */
-);
-
-extern int XwcLookupString(
- XIC /* ic */,
- XKeyPressedEvent* /* event */,
- wchar_t* /* buffer_return */,
- int /* wchars_buffer */,
- KeySym* /* keysym_return */,
- Status* /* status_return */
-);
-
-extern int Xutf8LookupString(
- XIC /* ic */,
- XKeyPressedEvent* /* event */,
- char* /* buffer_return */,
- int /* bytes_buffer */,
- KeySym* /* keysym_return */,
- Status* /* status_return */
-);
-
-extern XVaNestedList XVaCreateNestedList(
- int /*unused*/, ...
-) _X_SENTINEL(0);
-
-/* internal connections for IMs */
-
-extern Bool XRegisterIMInstantiateCallback(
- Display* /* dpy */,
- struct _XrmHashBucketRec* /* rdb */,
- char* /* res_name */,
- char* /* res_class */,
- XIDProc /* callback */,
- XPointer /* client_data */
-);
-
-extern Bool XUnregisterIMInstantiateCallback(
- Display* /* dpy */,
- struct _XrmHashBucketRec* /* rdb */,
- char* /* res_name */,
- char* /* res_class */,
- XIDProc /* callback */,
- XPointer /* client_data */
-);
-
-typedef void (*XConnectionWatchProc)(
- Display* /* dpy */,
- XPointer /* client_data */,
- int /* fd */,
- Bool /* opening */, /* open or close flag */
- XPointer* /* watch_data */ /* open sets, close uses */
-);
-
-
-extern Status XInternalConnectionNumbers(
- Display* /* dpy */,
- int** /* fd_return */,
- int* /* count_return */
-);
-
-extern void XProcessInternalConnection(
- Display* /* dpy */,
- int /* fd */
-);
-
-extern Status XAddConnectionWatch(
- Display* /* dpy */,
- XConnectionWatchProc /* callback */,
- XPointer /* client_data */
-);
-
-extern void XRemoveConnectionWatch(
- Display* /* dpy */,
- XConnectionWatchProc /* callback */,
- XPointer /* client_data */
-);
-
-extern void XSetAuthorization(
- char * /* name */,
- int /* namelen */,
- char * /* data */,
- int /* datalen */
-);
-
-extern int _Xmbtowc(
- wchar_t * /* wstr */,
-#ifdef ISC
- char const * /* str */,
- size_t /* len */
-#else
- char * /* str */,
- int /* len */
-#endif
-);
-
-extern int _Xwctomb(
- char * /* str */,
- wchar_t /* wc */
-);
-
-extern Bool XGetEventData(
- Display* /* dpy */,
- XGenericEventCookie* /* cookie*/
-);
-
-extern void XFreeEventData(
- Display* /* dpy */,
- XGenericEventCookie* /* cookie*/
-);
-
-_XFUNCPROTOEND
-
-#endif /* _XLIB_H_ */
+/*
+
+Copyright 1985, 1986, 1987, 1991, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+*/
+
+
+/*
+ * Xlib.h - Header definition and support file for the C subroutine
+ * interface library (Xlib) to the X Window System Protocol (V11).
+ * Structures and symbols starting with "_" are private to the library.
+ */
+#ifndef _X11_XLIB_H_
+#define _X11_XLIB_H_
+
+#define XlibSpecificationRelease 6
+
+#include <sys/types.h>
+
+#if defined(__SCO__) || defined(__UNIXWARE__)
+#include <stdint.h>
+#endif
+
+#include <X11/X.h>
+
+/* applications should not depend on these two headers being included! */
+#include <X11/Xfuncproto.h>
+#include <X11/Xosdefs.h>
+
+#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
+
+extern int
+_Xmblen(
+#ifdef ISC
+ char const *str,
+ size_t len
+#else
+ char *str,
+ int len
+#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;
+
+#define Bool int
+#define Status int
+#define True 1
+#define False 0
+
+#define QueuedAlready 0
+#define QueuedAfterReading 1
+#define QueuedAfterFlush 2
+
+#define ConnectionNumber(dpy) (((_XPrivDisplay)dpy)->fd)
+#define RootWindow(dpy, scr) (ScreenOfDisplay(dpy,scr)->root)
+#define DefaultScreen(dpy) (((_XPrivDisplay)dpy)->default_screen)
+#define DefaultRootWindow(dpy) (ScreenOfDisplay(dpy,DefaultScreen(dpy))->root)
+#define DefaultVisual(dpy, scr) (ScreenOfDisplay(dpy,scr)->root_visual)
+#define DefaultGC(dpy, scr) (ScreenOfDisplay(dpy,scr)->default_gc)
+#define BlackPixel(dpy, scr) (ScreenOfDisplay(dpy,scr)->black_pixel)
+#define WhitePixel(dpy, scr) (ScreenOfDisplay(dpy,scr)->white_pixel)
+#define AllPlanes ((unsigned long)~0L)
+#define QLength(dpy) (((_XPrivDisplay)dpy)->qlen)
+#define DisplayWidth(dpy, scr) (ScreenOfDisplay(dpy,scr)->width)
+#define DisplayHeight(dpy, scr) (ScreenOfDisplay(dpy,scr)->height)
+#define DisplayWidthMM(dpy, scr)(ScreenOfDisplay(dpy,scr)->mwidth)
+#define DisplayHeightMM(dpy, scr)(ScreenOfDisplay(dpy,scr)->mheight)
+#define DisplayPlanes(dpy, scr) (ScreenOfDisplay(dpy,scr)->root_depth)
+#define DisplayCells(dpy, scr) (DefaultVisual(dpy,scr)->map_entries)
+#define ScreenCount(dpy) (((_XPrivDisplay)dpy)->nscreens)
+#define ServerVendor(dpy) (((_XPrivDisplay)dpy)->vendor)
+#define ProtocolVersion(dpy) (((_XPrivDisplay)dpy)->proto_major_version)
+#define ProtocolRevision(dpy) (((_XPrivDisplay)dpy)->proto_minor_version)
+#define VendorRelease(dpy) (((_XPrivDisplay)dpy)->release)
+#define DisplayString(dpy) (((_XPrivDisplay)dpy)->display_name)
+#define DefaultDepth(dpy, scr) (ScreenOfDisplay(dpy,scr)->root_depth)
+#define DefaultColormap(dpy, scr)(ScreenOfDisplay(dpy,scr)->cmap)
+#define BitmapUnit(dpy) (((_XPrivDisplay)dpy)->bitmap_unit)
+#define BitmapBitOrder(dpy) (((_XPrivDisplay)dpy)->bitmap_bit_order)
+#define BitmapPad(dpy) (((_XPrivDisplay)dpy)->bitmap_pad)
+#define ImageByteOrder(dpy) (((_XPrivDisplay)dpy)->byte_order)
+#ifdef CRAY /* unable to get WORD64 without pulling in other symbols */
+#define NextRequest(dpy) XNextRequest(dpy)
+#else
+#define NextRequest(dpy) (((_XPrivDisplay)dpy)->request + 1)
+#endif
+#define LastKnownRequestProcessed(dpy) (((_XPrivDisplay)dpy)->last_request_read)
+
+/* macros for screen oriented applications (toolkit) */
+#define ScreenOfDisplay(dpy, scr)(&((_XPrivDisplay)dpy)->screens[scr])
+#define DefaultScreenOfDisplay(dpy) ScreenOfDisplay(dpy,DefaultScreen(dpy))
+#define DisplayOfScreen(s) ((s)->display)
+#define RootWindowOfScreen(s) ((s)->root)
+#define BlackPixelOfScreen(s) ((s)->black_pixel)
+#define WhitePixelOfScreen(s) ((s)->white_pixel)
+#define DefaultColormapOfScreen(s)((s)->cmap)
+#define DefaultDepthOfScreen(s) ((s)->root_depth)
+#define DefaultGCOfScreen(s) ((s)->default_gc)
+#define DefaultVisualOfScreen(s)((s)->root_visual)
+#define WidthOfScreen(s) ((s)->width)
+#define HeightOfScreen(s) ((s)->height)
+#define WidthMMOfScreen(s) ((s)->mwidth)
+#define HeightMMOfScreen(s) ((s)->mheight)
+#define PlanesOfScreen(s) ((s)->root_depth)
+#define CellsOfScreen(s) (DefaultVisualOfScreen((s))->map_entries)
+#define MinCmapsOfScreen(s) ((s)->min_maps)
+#define MaxCmapsOfScreen(s) ((s)->max_maps)
+#define DoesSaveUnders(s) ((s)->save_unders)
+#define DoesBackingStore(s) ((s)->backing_store)
+#define EventMaskOfScreen(s) ((s)->root_input_mask)
+
+/*
+ * Extensions need a way to hang private data on some structures.
+ */
+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 */
+ struct _XExtData *extension
+ );
+ XPointer private_data; /* data private to this extension. */
+} XExtData;
+
+/*
+ * This file contains structures used by the extension mechanism.
+ */
+typedef struct { /* public to extension, cannot be changed */
+ int extension; /* extension number */
+ int major_opcode; /* major op-code assigned by server */
+ int first_event; /* first event number for the extension */
+ int first_error; /* first error number for the extension */
+} XExtCodes;
+
+/*
+ * Data structure for retrieving info about pixmap formats.
+ */
+
+typedef struct {
+ int depth;
+ int bits_per_pixel;
+ int scanline_pad;
+} XPixmapFormatValues;
+
+
+/*
+ * Data structure for setting graphics context.
+ */
+typedef struct {
+ int function; /* logical operation */
+ unsigned long plane_mask;/* plane mask */
+ unsigned long foreground;/* foreground pixel */
+ unsigned long background;/* background pixel */
+ int line_width; /* line width */
+ int line_style; /* LineSolid, LineOnOffDash, LineDoubleDash */
+ int cap_style; /* CapNotLast, CapButt,
+ CapRound, CapProjecting */
+ int join_style; /* JoinMiter, JoinRound, JoinBevel */
+ int fill_style; /* FillSolid, FillTiled,
+ FillStippled, FillOpaeueStippled */
+ int fill_rule; /* EvenOddRule, WindingRule */
+ int arc_mode; /* ArcChord, ArcPieSlice */
+ Pixmap tile; /* tile pixmap for tiling operations */
+ Pixmap stipple; /* stipple 1 plane pixmap for stipping */
+ int ts_x_origin; /* offset for tile or stipple operations */
+ int ts_y_origin;
+ Font font; /* default text font for text operations */
+ int subwindow_mode; /* ClipByChildren, IncludeInferiors */
+ Bool graphics_exposures;/* boolean, should exposures be generated */
+ int clip_x_origin; /* origin for clipping */
+ int clip_y_origin;
+ Pixmap clip_mask; /* bitmap clipping; other calls for rects */
+ int dash_offset; /* patterned/dashed line information */
+ char dashes;
+} XGCValues;
+
+/*
+ * Graphics context. The contents of this structure are implementation
+ * dependent. A GC should be treated as opaque by application code.
+ */
+
+typedef struct _XGC
+#ifdef XLIB_ILLEGAL_ACCESS
+{
+ XExtData *ext_data; /* hook for extension to hang data */
+ GContext gid; /* protocol ID for graphics context */
+ /* there is more to this structure, but it is private to Xlib */
+}
+#endif
+*GC;
+
+/*
+ * Visual structure; contains information about colormapping possible.
+ */
+typedef struct {
+ XExtData *ext_data; /* hook for extension to hang data */
+ VisualID visualid; /* visual id of this visual */
+#if defined(__cplusplus) || defined(c_plusplus)
+ int c_class; /* C++ class of screen (monochrome, etc.) */
+#else
+ int class; /* class of screen (monochrome, etc.) */
+#endif
+ unsigned long red_mask, green_mask, blue_mask; /* mask values */
+ int bits_per_rgb; /* log base 2 of distinct color values */
+ int map_entries; /* color map entries */
+} Visual;
+
+/*
+ * 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 */
+ Visual *visuals; /* list of visuals possible at this depth */
+} Depth;
+
+/*
+ * Information about the screen. The contents of this structure are
+ * implementation dependent. A Screen should be treated as opaque
+ * by application code.
+ */
+
+struct _XDisplay; /* Forward declare before use for C++ */
+
+typedef struct {
+ XExtData *ext_data; /* hook for extension to hang data */
+ struct _XDisplay *display;/* back pointer to display structure */
+ Window root; /* Root window id. */
+ int width, height; /* width and height of screen */
+ int mwidth, mheight; /* width and height of in millimeters */
+ int ndepths; /* number of depths possible */
+ Depth *depths; /* list of allowable depths on the screen */
+ int root_depth; /* bits per pixel */
+ Visual *root_visual; /* root visual */
+ GC default_gc; /* GC for the root root visual */
+ Colormap cmap; /* default color map */
+ unsigned long white_pixel;
+ 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;
+ long root_input_mask; /* initial root input mask */
+} Screen;
+
+/*
+ * Format structure; describes ZFormat data the screen will understand.
+ */
+typedef struct {
+ XExtData *ext_data; /* hook for extension to hang data */
+ int depth; /* depth of this image format */
+ int bits_per_pixel; /* bits/pixel at this depth */
+ int scanline_pad; /* scanline must padded to this multiple */
+} ScreenFormat;
+
+/*
+ * Data structure for setting window attributes.
+ */
+typedef struct {
+ Pixmap background_pixmap; /* background or None or ParentRelative */
+ unsigned long background_pixel; /* background pixel */
+ Pixmap border_pixmap; /* border of the window */
+ unsigned long border_pixel; /* border pixel value */
+ int bit_gravity; /* one of bit gravity values */
+ int win_gravity; /* one of the window gravity values */
+ int backing_store; /* NotUseful, WhenMapped, Always */
+ unsigned long backing_planes;/* planes to be preseved if possible */
+ unsigned long backing_pixel;/* value to use in restoring planes */
+ Bool save_under; /* should bits under be saved? (popups) */
+ long event_mask; /* set of events that should be saved */
+ long do_not_propagate_mask; /* set of events that should not propagate */
+ Bool override_redirect; /* boolean value for override-redirect */
+ Colormap colormap; /* color map to be associated with window */
+ Cursor cursor; /* cursor to be displayed (or None) */
+} XSetWindowAttributes;
+
+typedef struct {
+ int x, y; /* location of window */
+ int width, height; /* width and height of window */
+ int border_width; /* border width of window */
+ int depth; /* depth of window */
+ Visual *visual; /* the associated visual structure */
+ Window root; /* root of screen containing window */
+#if defined(__cplusplus) || defined(c_plusplus)
+ int c_class; /* C++ InputOutput, InputOnly*/
+#else
+ int class; /* InputOutput, InputOnly*/
+#endif
+ int bit_gravity; /* one of bit gravity values */
+ int win_gravity; /* one of the window gravity values */
+ int backing_store; /* NotUseful, WhenMapped, Always */
+ unsigned long backing_planes;/* planes to be preserved if possible */
+ unsigned long backing_pixel;/* value to be used when restoring planes */
+ Bool save_under; /* boolean, should bits under be saved? */
+ Colormap colormap; /* color map to be associated with window */
+ Bool map_installed; /* boolean, is color map currently installed*/
+ int map_state; /* IsUnmapped, IsUnviewable, IsViewable */
+ long all_event_masks; /* set of events all people have interest in*/
+ long your_event_mask; /* my event mask */
+ long do_not_propagate_mask; /* set of events that should not propagate */
+ Bool override_redirect; /* boolean value for override-redirect */
+ Screen *screen; /* back pointer to correct screen */
+} XWindowAttributes;
+
+/*
+ * Data structure for host setting; getting routines.
+ *
+ */
+
+typedef struct {
+ int family; /* for example FamilyInternet */
+ int length; /* length of address, in bytes */
+ char *address; /* pointer to where to find the bytes */
+} XHostAddress;
+
+/*
+ * Data structure for ServerFamilyInterpreted addresses in host routines
+ */
+typedef struct {
+ int typelength; /* length of type string, in bytes */
+ int valuelength; /* length of value string, in bytes */
+ char *type; /* pointer to where to find the type string */
+ char *value; /* pointer to where to find the address */
+} XServerInterpretedAddress;
+
+/*
+ * Data structure for "image" data, used by image manipulation routines.
+ */
+typedef struct _XImage {
+ int width, height; /* size of image */
+ int xoffset; /* number of pixels offset in X direction */
+ int format; /* XYBitmap, XYPixmap, ZPixmap */
+ char *data; /* pointer to image data */
+ int byte_order; /* data byte order, LSBFirst, MSBFirst */
+ int bitmap_unit; /* quant. of scanline 8, 16, 32 */
+ int bitmap_bit_order; /* LSBFirst, MSBFirst */
+ int bitmap_pad; /* 8, 16, 32 either XY or ZPixmap */
+ int depth; /* depth of image */
+ int bytes_per_line; /* accelarator to next line */
+ int bits_per_pixel; /* bits per pixel (ZPixmap) */
+ unsigned long red_mask; /* bits in z arrangment */
+ unsigned long green_mask;
+ unsigned long blue_mask;
+ XPointer obdata; /* hook for the object routines to hang on */
+ struct funcs { /* image manipulation routines */
+ 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);
+ } f;
+} XImage;
+
+/*
+ * Data structure for XReconfigureWindow
+ */
+typedef struct {
+ int x, y;
+ int width, height;
+ int border_width;
+ Window sibling;
+ int stack_mode;
+} XWindowChanges;
+
+/*
+ * Data structure used by color operations
+ */
+typedef struct {
+ unsigned long pixel;
+ unsigned short red, green, blue;
+ char flags; /* do_red, do_green, do_blue */
+ 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.
+ */
+typedef struct {
+ short x1, y1, x2, y2;
+} XSegment;
+
+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;
+ short angle1, angle2;
+} XArc;
+
+
+/* Data structure for XChangeKeyboardControl */
+
+typedef struct {
+ int key_click_percent;
+ int bell_percent;
+ int bell_pitch;
+ int bell_duration;
+ int led;
+ int led_mode;
+ int key;
+ int auto_repeat_mode; /* On, Off, Default */
+} XKeyboardControl;
+
+/* Data structure for XGetKeyboardControl */
+
+typedef struct {
+ int key_click_percent;
+ int bell_percent;
+ unsigned int bell_pitch, bell_duration;
+ unsigned long led_mask;
+ int global_auto_repeat;
+ char auto_repeats[32];
+} XKeyboardState;
+
+/* Data structure for XGetMotionEvents. */
+
+typedef struct {
+ Time time;
+ short x, y;
+} XTimeCoord;
+
+/* Data structure for X{Set,Get}ModifierMapping */
+
+typedef struct {
+ int max_keypermod; /* The server's max # of keys per modifier */
+ KeyCode *modifiermap; /* An 8 by max_keypermod array of modifiers */
+} XModifierKeymap;
+
+
+/*
+ * Display datatype maintaining display specific data.
+ * The contents of this structure are implementation dependent.
+ * A Display should be treated as opaque by application code.
+ */
+#ifndef XLIB_ILLEGAL_ACCESS
+typedef struct _XDisplay Display;
+#endif
+
+struct _XPrivate; /* Forward declare before use for C++ */
+struct _XrmHashBucketRec;
+
+typedef struct
+#ifdef XLIB_ILLEGAL_ACCESS
+_XDisplay
+#endif
+{
+ XExtData *ext_data; /* hook for extension to hang data */
+ struct _XPrivate *private1;
+ int fd; /* Network socket. */
+ int private2;
+ int proto_major_version;/* major version of server's X protocol */
+ int proto_minor_version;/* minor version of servers X protocol */
+ char *vendor; /* vendor of the server hardware */
+ XID private3;
+ XID private4;
+ XID private5;
+ int private6;
+ XID (*resource_alloc)( /* allocator function */
+ struct _XDisplay*
+ );
+ int byte_order; /* screen byte order, LSBFirst, MSBFirst */
+ int bitmap_unit; /* padding and data requirements */
+ int bitmap_pad; /* padding requirements on bitmaps */
+ int bitmap_bit_order; /* LeastSignificant or MostSignificant */
+ int nformats; /* number of pixmap formats in list */
+ ScreenFormat *pixmap_format; /* pixmap format list */
+ int private8;
+ int release; /* release of the server */
+ struct _XPrivate *private9, *private10;
+ int qlen; /* Length of input event queue */
+ unsigned long last_request_read; /* seq number of last event read */
+ unsigned long request; /* sequence number of last request. */
+ XPointer private11;
+ XPointer private12;
+ XPointer private13;
+ XPointer private14;
+ unsigned max_request_size; /* maximum number 32 bit words in request*/
+ struct _XrmHashBucketRec *db;
+ int (*private15)(
+ struct _XDisplay*
+ );
+ 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*/
+ Screen *screens; /* pointer to list of screens */
+ unsigned long motion_buffer; /* size of motion buffer */
+ unsigned long private16;
+ int min_keycode; /* minimum defined keycode */
+ int max_keycode; /* maximum defined keycode */
+ XPointer private17;
+ XPointer private18;
+ int private19;
+ char *xdefaults; /* contents of defaults from server */
+ /* there is more to this structure, but it is private to Xlib */
+}
+#ifdef XLIB_ILLEGAL_ACCESS
+Display,
+#endif
+*_XPrivDisplay;
+
+#undef _XEVENT_
+#ifndef _XEVENT_
+/*
+ * Definitions of specific events.
+ */
+typedef struct {
+ int type; /* of event */
+ unsigned long serial; /* # of last request processed by server */
+ 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 occurred on */
+ Window subwindow; /* child window */
+ Time time; /* milliseconds */
+ int x, y; /* pointer x, y coordinates in event window */
+ int x_root, y_root; /* coordinates relative to root */
+ unsigned int state; /* key or button mask */
+ unsigned int keycode; /* detail */
+ Bool same_screen; /* same screen flag */
+} XKeyEvent;
+typedef XKeyEvent XKeyPressedEvent;
+typedef XKeyEvent XKeyReleasedEvent;
+
+typedef struct {
+ int type; /* of event */
+ unsigned long serial; /* # of last request processed by server */
+ 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 occurred on */
+ Window subwindow; /* child window */
+ Time time; /* milliseconds */
+ int x, y; /* pointer x, y coordinates in event window */
+ int x_root, y_root; /* coordinates relative to root */
+ unsigned int state; /* key or button mask */
+ unsigned int button; /* detail */
+ Bool same_screen; /* same screen flag */
+} XButtonEvent;
+typedef XButtonEvent XButtonPressedEvent;
+typedef XButtonEvent XButtonReleasedEvent;
+
+typedef struct {
+ int type; /* of event */
+ unsigned long serial; /* # of last request processed by server */
+ 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 occurred on */
+ Window subwindow; /* child window */
+ Time time; /* milliseconds */
+ int x, y; /* pointer x, y coordinates in event window */
+ int x_root, y_root; /* coordinates relative to root */
+ unsigned int state; /* key or button mask */
+ char is_hint; /* detail */
+ Bool same_screen; /* same screen flag */
+} XMotionEvent;
+typedef XMotionEvent XPointerMovedEvent;
+
+typedef struct {
+ int type; /* of event */
+ unsigned long serial; /* # of last request processed by server */
+ 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 occurred on */
+ Window subwindow; /* child window */
+ Time time; /* milliseconds */
+ int x, y; /* pointer x, y coordinates in event window */
+ int x_root, y_root; /* coordinates relative to root */
+ int mode; /* NotifyNormal, NotifyGrab, NotifyUngrab */
+ int detail;
+ /*
+ * NotifyAncestor, NotifyVirtual, NotifyInferior,
+ * NotifyNonlinear,NotifyNonlinearVirtual
+ */
+ Bool same_screen; /* same screen flag */
+ Bool focus; /* boolean focus */
+ unsigned int state; /* key or button mask */
+} XCrossingEvent;
+typedef XCrossingEvent XEnterWindowEvent;
+typedef XCrossingEvent XLeaveWindowEvent;
+
+typedef struct {
+ int type; /* FocusIn or FocusOut */
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window; /* window of event */
+ int mode; /* NotifyNormal, NotifyWhileGrabbed,
+ NotifyGrab, NotifyUngrab */
+ int detail;
+ /*
+ * NotifyAncestor, NotifyVirtual, NotifyInferior,
+ * NotifyNonlinear,NotifyNonlinearVirtual, NotifyPointer,
+ * NotifyPointerRoot, NotifyDetailNone
+ */
+} XFocusChangeEvent;
+typedef XFocusChangeEvent XFocusInEvent;
+typedef XFocusChangeEvent XFocusOutEvent;
+
+/* generated on EnterWindow and FocusIn when KeyMapState selected */
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window;
+ char key_vector[32];
+} XKeymapEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window;
+ int x, y;
+ int width, height;
+ int count; /* if non-zero, at least this many more */
+} XExposeEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Drawable drawable;
+ int x, y;
+ int width, height;
+ int count; /* if non-zero, at least this many more */
+ int major_code; /* core is CopyArea or CopyPlane */
+ int minor_code; /* not defined in the core */
+} XGraphicsExposeEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Drawable drawable;
+ int major_code; /* core is CopyArea or CopyPlane */
+ int minor_code; /* not defined in the core */
+} XNoExposeEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window;
+ int state; /* Visibility state */
+} XVisibilityEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window parent; /* parent of the window */
+ Window window; /* window id of window created */
+ int x, y; /* window location */
+ int width, height; /* size of window */
+ int border_width; /* border width */
+ Bool override_redirect; /* creation should be overridden */
+} XCreateWindowEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window event;
+ Window window;
+} XDestroyWindowEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window event;
+ Window window;
+ Bool from_configure;
+} XUnmapEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window event;
+ Window window;
+ Bool override_redirect; /* boolean, is override set... */
+} XMapEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window parent;
+ Window window;
+} XMapRequestEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window event;
+ Window window;
+ Window parent;
+ int x, y;
+ Bool override_redirect;
+} XReparentEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window event;
+ Window window;
+ int x, y;
+ int width, height;
+ int border_width;
+ Window above;
+ Bool override_redirect;
+} XConfigureEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window event;
+ Window window;
+ int x, y;
+} XGravityEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window;
+ int width, height;
+} XResizeRequestEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window parent;
+ Window window;
+ int x, y;
+ int width, height;
+ int border_width;
+ Window above;
+ int detail; /* Above, Below, TopIf, BottomIf, Opposite */
+ unsigned long value_mask;
+} XConfigureRequestEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window event;
+ Window window;
+ int place; /* PlaceOnTop, PlaceOnBottom */
+} XCirculateEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window parent;
+ Window window;
+ int place; /* PlaceOnTop, PlaceOnBottom */
+} XCirculateRequestEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window;
+ Atom atom;
+ Time time;
+ int state; /* NewValue, Deleted */
+} XPropertyEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window;
+ Atom selection;
+ Time time;
+} XSelectionClearEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window owner;
+ Window requestor;
+ Atom selection;
+ Atom target;
+ Atom property;
+ Time time;
+} XSelectionRequestEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window requestor;
+ Atom selection;
+ Atom target;
+ Atom property; /* ATOM or None */
+ Time time;
+} XSelectionEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window;
+ Colormap colormap; /* COLORMAP or None */
+#if defined(__cplusplus) || defined(c_plusplus)
+ Bool c_new; /* C++ */
+#else
+ Bool new;
+#endif
+ int state; /* ColormapInstalled, ColormapUninstalled */
+} XColormapEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window;
+ Atom message_type;
+ int format;
+ union {
+ char b[20];
+ short s[10];
+ long l[5];
+ } data;
+} XClientMessageEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window; /* unused */
+ int request; /* one of MappingModifier, MappingKeyboard,
+ MappingPointer */
+ int first_keycode; /* first keycode */
+ int count; /* defines range of change w. first_keycode*/
+} XMappingEvent;
+
+typedef struct {
+ int type;
+ Display *display; /* Display the event was read from */
+ XID resourceid; /* resource id */
+ unsigned long serial; /* serial number of failed request */
+ unsigned char error_code; /* error code of failed request */
+ unsigned char request_code; /* Major op-code of failed request */
+ unsigned char minor_code; /* Minor op-code of failed request */
+} XErrorEvent;
+
+typedef struct {
+ int type;
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came from a SendEvent request */
+ Display *display;/* Display the event was read from */
+ 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.
+ */
+typedef union _XEvent {
+ int type; /* must not be changed; first element */
+ XAnyEvent xany;
+ XKeyEvent xkey;
+ XButtonEvent xbutton;
+ XMotionEvent xmotion;
+ XCrossingEvent xcrossing;
+ XFocusChangeEvent xfocus;
+ XExposeEvent xexpose;
+ XGraphicsExposeEvent xgraphicsexpose;
+ XNoExposeEvent xnoexpose;
+ XVisibilityEvent xvisibility;
+ XCreateWindowEvent xcreatewindow;
+ XDestroyWindowEvent xdestroywindow;
+ XUnmapEvent xunmap;
+ XMapEvent xmap;
+ XMapRequestEvent xmaprequest;
+ XReparentEvent xreparent;
+ XConfigureEvent xconfigure;
+ XGravityEvent xgravity;
+ XResizeRequestEvent xresizerequest;
+ XConfigureRequestEvent xconfigurerequest;
+ XCirculateEvent xcirculate;
+ XCirculateRequestEvent xcirculaterequest;
+ XPropertyEvent xproperty;
+ XSelectionClearEvent xselectionclear;
+ XSelectionRequestEvent xselectionrequest;
+ XSelectionEvent xselection;
+ XColormapEvent xcolormap;
+ XClientMessageEvent xclient;
+ XMappingEvent xmapping;
+ XErrorEvent xerror;
+ XKeymapEvent xkeymap;
+ XGenericEvent xgeneric;
+ XGenericEventCookie xcookie;
+ long pad[24];
+} XEvent;
+#endif
+
+#define XAllocID(dpy) ((*((_XPrivDisplay)dpy)->resource_alloc)((dpy)))
+
+/*
+ * per character font metric information.
+ */
+typedef struct {
+ short lbearing; /* origin to left edge of raster */
+ short rbearing; /* origin to right edge of raster */
+ short width; /* advance to next char's origin */
+ short ascent; /* baseline to top edge of raster */
+ short descent; /* baseline to bottom edge of raster */
+ unsigned short attributes; /* per char flags (not predefined) */
+} XCharStruct;
+
+/*
+ * To allow arbitrary information with fonts, there are additional properties
+ * returned.
+ */
+typedef struct {
+ Atom name;
+ unsigned long card32;
+} XFontProp;
+
+typedef struct {
+ XExtData *ext_data; /* hook for extension to hang data */
+ Font fid; /* Font id for this font */
+ unsigned direction; /* hint about direction the font is painted */
+ unsigned min_char_or_byte2;/* first character */
+ unsigned max_char_or_byte2;/* last character */
+ unsigned min_byte1; /* first row that exists */
+ unsigned max_byte1; /* last row that exists */
+ Bool all_chars_exist;/* flag if all characters have non-zero size*/
+ unsigned default_char; /* char to print for undefined character */
+ int n_properties; /* how many properties there are */
+ XFontProp *properties; /* pointer to array of additional properties*/
+ XCharStruct min_bounds; /* minimum bounds over all existing char*/
+ XCharStruct max_bounds; /* maximum bounds over all existing char*/
+ XCharStruct *per_char; /* first_char to last_char information */
+ int ascent; /* log. extent above baseline for spacing */
+ int descent; /* log. descent below baseline for spacing */
+} XFontStruct;
+
+/*
+ * PolyText routines take these as arguments.
+ */
+typedef struct {
+ char *chars; /* pointer to string */
+ int nchars; /* number of characters */
+ int delta; /* delta between strings */
+ Font font; /* font to print it in, None don't change */
+} XTextItem;
+
+typedef struct { /* normal 16 bit characters are two bytes */
+ unsigned char byte1;
+ unsigned char byte2;
+} XChar2b;
+
+typedef struct {
+ XChar2b *chars; /* two byte characters */
+ int nchars; /* number of characters */
+ int delta; /* delta between strings */
+ Font font; /* font to print it in, None don't change */
+} XTextItem16;
+
+
+typedef union { Display *display;
+ GC gc;
+ Visual *visual;
+ Screen *screen;
+ ScreenFormat *pixmap_format;
+ XFontStruct *font; } XEDataObject;
+
+typedef struct {
+ XRectangle max_ink_extent;
+ XRectangle max_logical_extent;
+} XFontSetExtents;
+
+/* unused:
+typedef void (*XOMProc)();
+ */
+
+typedef struct _XOM *XOM;
+typedef struct _XOC *XOC, *XFontSet;
+
+typedef struct {
+ char *chars;
+ int nchars;
+ int delta;
+ XFontSet font_set;
+} XmbTextItem;
+
+typedef struct {
+ wchar_t *chars;
+ int nchars;
+ int delta;
+ XFontSet font_set;
+} XwcTextItem;
+
+#define XNRequiredCharSet "requiredCharSet"
+#define XNQueryOrientation "queryOrientation"
+#define XNBaseFontName "baseFontName"
+#define XNOMAutomatic "omAutomatic"
+#define XNMissingCharSet "missingCharSet"
+#define XNDefaultString "defaultString"
+#define XNOrientation "orientation"
+#define XNDirectionalDependentDrawing "directionalDependentDrawing"
+#define XNContextualDrawing "contextualDrawing"
+#define XNFontInfo "fontInfo"
+
+typedef struct {
+ int charset_count;
+ char **charset_list;
+} XOMCharSetList;
+
+typedef enum {
+ XOMOrientation_LTR_TTB,
+ XOMOrientation_RTL_TTB,
+ XOMOrientation_TTB_LTR,
+ XOMOrientation_TTB_RTL,
+ XOMOrientation_Context
+} XOrientation;
+
+typedef struct {
+ int num_orientation;
+ XOrientation *orientation; /* Input Text description */
+} XOMOrientation;
+
+typedef struct {
+ int num_font;
+ XFontStruct **font_struct_list;
+ char **font_name_list;
+} XOMFontInfo;
+
+typedef struct _XIM *XIM;
+typedef struct _XIC *XIC;
+
+typedef void (*XIMProc)(
+ XIM,
+ XPointer,
+ XPointer
+);
+
+typedef Bool (*XICProc)(
+ XIC,
+ XPointer,
+ XPointer
+);
+
+typedef void (*XIDProc)(
+ Display*,
+ XPointer,
+ XPointer
+);
+
+typedef unsigned long XIMStyle;
+
+typedef struct {
+ unsigned short count_styles;
+ XIMStyle *supported_styles;
+} XIMStyles;
+
+#define XIMPreeditArea 0x0001L
+#define XIMPreeditCallbacks 0x0002L
+#define XIMPreeditPosition 0x0004L
+#define XIMPreeditNothing 0x0008L
+#define XIMPreeditNone 0x0010L
+#define XIMStatusArea 0x0100L
+#define XIMStatusCallbacks 0x0200L
+#define XIMStatusNothing 0x0400L
+#define XIMStatusNone 0x0800L
+
+#define XNVaNestedList "XNVaNestedList"
+#define XNQueryInputStyle "queryInputStyle"
+#define XNClientWindow "clientWindow"
+#define XNInputStyle "inputStyle"
+#define XNFocusWindow "focusWindow"
+#define XNResourceName "resourceName"
+#define XNResourceClass "resourceClass"
+#define XNGeometryCallback "geometryCallback"
+#define XNDestroyCallback "destroyCallback"
+#define XNFilterEvents "filterEvents"
+#define XNPreeditStartCallback "preeditStartCallback"
+#define XNPreeditDoneCallback "preeditDoneCallback"
+#define XNPreeditDrawCallback "preeditDrawCallback"
+#define XNPreeditCaretCallback "preeditCaretCallback"
+#define XNPreeditStateNotifyCallback "preeditStateNotifyCallback"
+#define XNPreeditAttributes "preeditAttributes"
+#define XNStatusStartCallback "statusStartCallback"
+#define XNStatusDoneCallback "statusDoneCallback"
+#define XNStatusDrawCallback "statusDrawCallback"
+#define XNStatusAttributes "statusAttributes"
+#define XNArea "area"
+#define XNAreaNeeded "areaNeeded"
+#define XNSpotLocation "spotLocation"
+#define XNColormap "colorMap"
+#define XNStdColormap "stdColorMap"
+#define XNForeground "foreground"
+#define XNBackground "background"
+#define XNBackgroundPixmap "backgroundPixmap"
+#define XNFontSet "fontSet"
+#define XNLineSpace "lineSpace"
+#define XNCursor "cursor"
+
+#define XNQueryIMValuesList "queryIMValuesList"
+#define XNQueryICValuesList "queryICValuesList"
+#define XNVisiblePosition "visiblePosition"
+#define XNR6PreeditCallback "r6PreeditCallback"
+#define XNStringConversionCallback "stringConversionCallback"
+#define XNStringConversion "stringConversion"
+#define XNResetState "resetState"
+#define XNHotKey "hotKey"
+#define XNHotKeyState "hotKeyState"
+#define XNPreeditState "preeditState"
+#define XNSeparatorofNestedList "separatorofNestedList"
+
+#define XBufferOverflow -1
+#define XLookupNone 1
+#define XLookupChars 2
+#define XLookupKeySym 3
+#define XLookupBoth 4
+
+typedef void *XVaNestedList;
+
+typedef struct {
+ XPointer client_data;
+ XIMProc callback;
+} XIMCallback;
+
+typedef struct {
+ XPointer client_data;
+ XICProc callback;
+} XICCallback;
+
+typedef unsigned long XIMFeedback;
+
+#define XIMReverse 1L
+#define XIMUnderline (1L<<1)
+#define XIMHighlight (1L<<2)
+#define XIMPrimary (1L<<5)
+#define XIMSecondary (1L<<6)
+#define XIMTertiary (1L<<7)
+#define XIMVisibleToForward (1L<<8)
+#define XIMVisibleToBackword (1L<<9)
+#define XIMVisibleToCenter (1L<<10)
+
+typedef struct _XIMText {
+ unsigned short length;
+ XIMFeedback *feedback;
+ Bool encoding_is_wchar;
+ union {
+ char *multi_byte;
+ wchar_t *wide_char;
+ } string;
+} XIMText;
+
+typedef unsigned long XIMPreeditState;
+
+#define XIMPreeditUnKnown 0L
+#define XIMPreeditEnable 1L
+#define XIMPreeditDisable (1L<<1)
+
+typedef struct _XIMPreeditStateNotifyCallbackStruct {
+ XIMPreeditState state;
+} XIMPreeditStateNotifyCallbackStruct;
+
+typedef unsigned long XIMResetState;
+
+#define XIMInitialState 1L
+#define XIMPreserveState (1L<<1)
+
+typedef unsigned long XIMStringConversionFeedback;
+
+#define XIMStringConversionLeftEdge (0x00000001)
+#define XIMStringConversionRightEdge (0x00000002)
+#define XIMStringConversionTopEdge (0x00000004)
+#define XIMStringConversionBottomEdge (0x00000008)
+#define XIMStringConversionConcealed (0x00000010)
+#define XIMStringConversionWrapped (0x00000020)
+
+typedef struct _XIMStringConversionText {
+ unsigned short length;
+ XIMStringConversionFeedback *feedback;
+ Bool encoding_is_wchar;
+ union {
+ char *mbs;
+ wchar_t *wcs;
+ } string;
+} XIMStringConversionText;
+
+typedef unsigned short XIMStringConversionPosition;
+
+typedef unsigned short XIMStringConversionType;
+
+#define XIMStringConversionBuffer (0x0001)
+#define XIMStringConversionLine (0x0002)
+#define XIMStringConversionWord (0x0003)
+#define XIMStringConversionChar (0x0004)
+
+typedef unsigned short XIMStringConversionOperation;
+
+#define XIMStringConversionSubstitution (0x0001)
+#define XIMStringConversionRetrieval (0x0002)
+
+typedef enum {
+ XIMForwardChar, XIMBackwardChar,
+ XIMForwardWord, XIMBackwardWord,
+ XIMCaretUp, XIMCaretDown,
+ XIMNextLine, XIMPreviousLine,
+ XIMLineStart, XIMLineEnd,
+ XIMAbsolutePosition,
+ XIMDontChange
+} XIMCaretDirection;
+
+typedef struct _XIMStringConversionCallbackStruct {
+ XIMStringConversionPosition position;
+ XIMCaretDirection direction;
+ XIMStringConversionOperation operation;
+ unsigned short factor;
+ XIMStringConversionText *text;
+} XIMStringConversionCallbackStruct;
+
+typedef struct _XIMPreeditDrawCallbackStruct {
+ int caret; /* Cursor offset within pre-edit string */
+ int chg_first; /* Starting change position */
+ int chg_length; /* Length of the change in character count */
+ XIMText *text;
+} XIMPreeditDrawCallbackStruct;
+
+typedef enum {
+ XIMIsInvisible, /* Disable caret feedback */
+ XIMIsPrimary, /* UI defined caret feedback */
+ XIMIsSecondary /* UI defined caret feedback */
+} XIMCaretStyle;
+
+typedef struct _XIMPreeditCaretCallbackStruct {
+ int position; /* Caret offset within pre-edit string */
+ XIMCaretDirection direction; /* Caret moves direction */
+ XIMCaretStyle style; /* Feedback of the caret */
+} XIMPreeditCaretCallbackStruct;
+
+typedef enum {
+ XIMTextType,
+ XIMBitmapType
+} XIMStatusDataType;
+
+typedef struct _XIMStatusDrawCallbackStruct {
+ XIMStatusDataType type;
+ union {
+ XIMText *text;
+ Pixmap bitmap;
+ } data;
+} XIMStatusDrawCallbackStruct;
+
+typedef struct _XIMHotKeyTrigger {
+ KeySym keysym;
+ int modifier;
+ int modifier_mask;
+} XIMHotKeyTrigger;
+
+typedef struct _XIMHotKeyTriggers {
+ int num_hot_key;
+ XIMHotKeyTrigger *key;
+} XIMHotKeyTriggers;
+
+typedef unsigned long XIMHotKeyState;
+
+#define XIMHotKeyStateON (0x0001L)
+#define XIMHotKeyStateOFF (0x0002L)
+
+typedef struct {
+ unsigned short count_values;
+ char **supported_values;
+} XIMValuesList;
+
+_XFUNCPROTOBEGIN
+
+#if defined(WIN32) && !defined(_XLIBINT_)
+#define _Xdebug (*_Xdebug_p)
+#endif
+
+extern int _Xdebug;
+
+extern XFontStruct *XLoadQueryFont(
+ Display* /* display */,
+ _Xconst char* /* name */
+);
+
+extern XFontStruct *XQueryFont(
+ Display* /* display */,
+ XID /* font_ID */
+);
+
+
+extern XTimeCoord *XGetMotionEvents(
+ Display* /* display */,
+ Window /* w */,
+ Time /* start */,
+ Time /* stop */,
+ int* /* nevents_return */
+);
+
+extern XModifierKeymap *XDeleteModifiermapEntry(
+ XModifierKeymap* /* modmap */,
+#if NeedWidePrototypes
+ unsigned int /* keycode_entry */,
+#else
+ KeyCode /* keycode_entry */,
+#endif
+ int /* modifier */
+);
+
+extern XModifierKeymap *XGetModifierMapping(
+ Display* /* display */
+);
+
+extern XModifierKeymap *XInsertModifiermapEntry(
+ XModifierKeymap* /* modmap */,
+#if NeedWidePrototypes
+ unsigned int /* keycode_entry */,
+#else
+ KeyCode /* keycode_entry */,
+#endif
+ int /* modifier */
+);
+
+extern XModifierKeymap *XNewModifiermap(
+ int /* max_keys_per_mod */
+);
+
+extern XImage *XCreateImage(
+ Display* /* 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 */
+);
+extern Status XInitImage(
+ XImage* /* image */
+);
+extern XImage *XGetImage(
+ Display* /* display */,
+ Drawable /* d */,
+ int /* x */,
+ int /* y */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ unsigned long /* plane_mask */,
+ int /* format */
+);
+extern XImage *XGetSubImage(
+ Display* /* display */,
+ Drawable /* d */,
+ int /* x */,
+ int /* y */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ unsigned long /* plane_mask */,
+ int /* format */,
+ XImage* /* dest_image */,
+ int /* dest_x */,
+ int /* dest_y */
+);
+
+/*
+ * X function declarations.
+ */
+extern Display *XOpenDisplay(
+ _Xconst char* /* display_name */
+);
+
+extern void XrmInitialize(
+ void
+);
+
+extern char *XFetchBytes(
+ Display* /* display */,
+ int* /* nbytes_return */
+);
+extern char *XFetchBuffer(
+ Display* /* display */,
+ int* /* nbytes_return */,
+ int /* buffer */
+);
+extern char *XGetAtomName(
+ Display* /* display */,
+ Atom /* atom */
+);
+extern Status XGetAtomNames(
+ Display* /* dpy */,
+ Atom* /* atoms */,
+ int /* count */,
+ char** /* names_return */
+);
+extern char *XGetDefault(
+ Display* /* display */,
+ _Xconst char* /* program */,
+ _Xconst char* /* option */
+);
+extern char *XDisplayName(
+ _Xconst char* /* string */
+);
+extern char *XKeysymToString(
+ KeySym /* keysym */
+);
+
+extern int (*XSynchronize(
+ Display* /* display */,
+ Bool /* onoff */
+))(
+ Display* /* display */
+);
+extern int (*XSetAfterFunction(
+ Display* /* display */,
+ int (*) (
+ Display* /* display */
+ ) /* procedure */
+))(
+ Display* /* display */
+);
+extern Atom XInternAtom(
+ Display* /* display */,
+ _Xconst char* /* atom_name */,
+ Bool /* only_if_exists */
+);
+extern Status XInternAtoms(
+ Display* /* dpy */,
+ char** /* names */,
+ int /* count */,
+ Bool /* onlyIfExists */,
+ Atom* /* atoms_return */
+);
+extern Colormap XCopyColormapAndFree(
+ Display* /* display */,
+ Colormap /* colormap */
+);
+extern Colormap XCreateColormap(
+ Display* /* display */,
+ Window /* w */,
+ Visual* /* visual */,
+ int /* alloc */
+);
+extern Cursor XCreatePixmapCursor(
+ Display* /* display */,
+ Pixmap /* source */,
+ Pixmap /* mask */,
+ XColor* /* foreground_color */,
+ XColor* /* background_color */,
+ unsigned int /* x */,
+ unsigned int /* y */
+);
+extern Cursor XCreateGlyphCursor(
+ Display* /* display */,
+ Font /* source_font */,
+ Font /* mask_font */,
+ unsigned int /* source_char */,
+ unsigned int /* mask_char */,
+ XColor _Xconst * /* foreground_color */,
+ XColor _Xconst * /* background_color */
+);
+extern Cursor XCreateFontCursor(
+ Display* /* display */,
+ unsigned int /* shape */
+);
+extern Font XLoadFont(
+ Display* /* display */,
+ _Xconst char* /* name */
+);
+extern GC XCreateGC(
+ Display* /* display */,
+ Drawable /* d */,
+ unsigned long /* valuemask */,
+ XGCValues* /* values */
+);
+extern GContext XGContextFromGC(
+ GC /* gc */
+);
+extern void XFlushGC(
+ Display* /* display */,
+ GC /* gc */
+);
+extern Pixmap XCreatePixmap(
+ Display* /* display */,
+ Drawable /* d */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ unsigned int /* depth */
+);
+extern Pixmap XCreateBitmapFromData(
+ Display* /* display */,
+ Drawable /* d */,
+ _Xconst char* /* data */,
+ unsigned int /* width */,
+ unsigned int /* height */
+);
+extern Pixmap XCreatePixmapFromBitmapData(
+ Display* /* display */,
+ Drawable /* d */,
+ char* /* data */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ unsigned long /* fg */,
+ unsigned long /* bg */,
+ unsigned int /* depth */
+);
+extern Window XCreateSimpleWindow(
+ Display* /* display */,
+ Window /* parent */,
+ int /* x */,
+ int /* y */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ unsigned int /* border_width */,
+ unsigned long /* border */,
+ unsigned long /* background */
+);
+extern Window XGetSelectionOwner(
+ Display* /* display */,
+ Atom /* selection */
+);
+extern Window XCreateWindow(
+ Display* /* display */,
+ Window /* parent */,
+ int /* x */,
+ int /* y */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ unsigned int /* border_width */,
+ int /* depth */,
+ unsigned int /* class */,
+ Visual* /* visual */,
+ unsigned long /* valuemask */,
+ XSetWindowAttributes* /* attributes */
+);
+extern Colormap *XListInstalledColormaps(
+ Display* /* display */,
+ Window /* w */,
+ int* /* num_return */
+);
+extern char **XListFonts(
+ Display* /* display */,
+ _Xconst char* /* pattern */,
+ int /* maxnames */,
+ int* /* actual_count_return */
+);
+extern char **XListFontsWithInfo(
+ Display* /* display */,
+ _Xconst char* /* pattern */,
+ int /* maxnames */,
+ int* /* count_return */,
+ XFontStruct** /* info_return */
+);
+extern char **XGetFontPath(
+ Display* /* display */,
+ int* /* npaths_return */
+);
+extern char **XListExtensions(
+ Display* /* display */,
+ int* /* nextensions_return */
+);
+extern Atom *XListProperties(
+ Display* /* display */,
+ Window /* w */,
+ int* /* num_prop_return */
+);
+extern XHostAddress *XListHosts(
+ Display* /* display */,
+ int* /* nhosts_return */,
+ Bool* /* state_return */
+);
+extern KeySym XKeycodeToKeysym(
+ Display* /* display */,
+#if NeedWidePrototypes
+ unsigned int /* keycode */,
+#else
+ KeyCode /* keycode */,
+#endif
+ int /* index */
+);
+extern KeySym XLookupKeysym(
+ XKeyEvent* /* key_event */,
+ int /* index */
+);
+extern KeySym *XGetKeyboardMapping(
+ Display* /* display */,
+#if NeedWidePrototypes
+ unsigned int /* first_keycode */,
+#else
+ KeyCode /* first_keycode */,
+#endif
+ int /* keycode_count */,
+ int* /* keysyms_per_keycode_return */
+);
+extern KeySym XStringToKeysym(
+ _Xconst char* /* string */
+);
+extern long XMaxRequestSize(
+ Display* /* display */
+);
+extern long XExtendedMaxRequestSize(
+ Display* /* display */
+);
+extern char *XResourceManagerString(
+ Display* /* display */
+);
+extern char *XScreenResourceString(
+ Screen* /* screen */
+);
+extern unsigned long XDisplayMotionBufferSize(
+ Display* /* display */
+);
+extern VisualID XVisualIDFromVisual(
+ Visual* /* visual */
+);
+
+/* multithread routines */
+
+extern Status XInitThreads(
+ void
+);
+
+extern void XLockDisplay(
+ Display* /* display */
+);
+
+extern void XUnlockDisplay(
+ Display* /* display */
+);
+
+/* routines for dealing with extensions */
+
+extern XExtCodes *XInitExtension(
+ Display* /* display */,
+ _Xconst char* /* name */
+);
+
+extern XExtCodes *XAddExtension(
+ Display* /* display */
+);
+extern XExtData *XFindOnExtensionList(
+ XExtData** /* structure */,
+ int /* number */
+);
+extern XExtData **XEHeadOfExtensionList(
+ XEDataObject /* object */
+);
+
+/* these are routines for which there are also macros */
+extern Window XRootWindow(
+ Display* /* display */,
+ int /* screen_number */
+);
+extern Window XDefaultRootWindow(
+ Display* /* display */
+);
+extern Window XRootWindowOfScreen(
+ Screen* /* screen */
+);
+extern Visual *XDefaultVisual(
+ Display* /* display */,
+ int /* screen_number */
+);
+extern Visual *XDefaultVisualOfScreen(
+ Screen* /* screen */
+);
+extern GC XDefaultGC(
+ Display* /* display */,
+ int /* screen_number */
+);
+extern GC XDefaultGCOfScreen(
+ Screen* /* screen */
+);
+extern unsigned long XBlackPixel(
+ Display* /* display */,
+ int /* screen_number */
+);
+extern unsigned long XWhitePixel(
+ Display* /* display */,
+ int /* screen_number */
+);
+extern unsigned long XAllPlanes(
+ void
+);
+extern unsigned long XBlackPixelOfScreen(
+ Screen* /* screen */
+);
+extern unsigned long XWhitePixelOfScreen(
+ Screen* /* screen */
+);
+extern unsigned long XNextRequest(
+ Display* /* display */
+);
+extern unsigned long XLastKnownRequestProcessed(
+ Display* /* display */
+);
+extern char *XServerVendor(
+ Display* /* display */
+);
+extern char *XDisplayString(
+ Display* /* display */
+);
+extern Colormap XDefaultColormap(
+ Display* /* display */,
+ int /* screen_number */
+);
+extern Colormap XDefaultColormapOfScreen(
+ Screen* /* screen */
+);
+extern Display *XDisplayOfScreen(
+ Screen* /* screen */
+);
+extern Screen *XScreenOfDisplay(
+ Display* /* display */,
+ int /* screen_number */
+);
+extern Screen *XDefaultScreenOfDisplay(
+ Display* /* display */
+);
+extern long XEventMaskOfScreen(
+ Screen* /* screen */
+);
+
+extern int XScreenNumberOfScreen(
+ Screen* /* screen */
+);
+
+typedef int (*XErrorHandler) ( /* WARNING, this type not in Xlib spec */
+ Display* /* display */,
+ XErrorEvent* /* error_event */
+);
+
+extern XErrorHandler XSetErrorHandler (
+ XErrorHandler /* handler */
+);
+
+
+typedef int (*XIOErrorHandler) ( /* WARNING, this type not in Xlib spec */
+ Display* /* display */
+);
+
+extern XIOErrorHandler XSetIOErrorHandler (
+ XIOErrorHandler /* handler */
+);
+
+
+extern XPixmapFormatValues *XListPixmapFormats(
+ Display* /* display */,
+ int* /* count_return */
+);
+extern int *XListDepths(
+ Display* /* display */,
+ int /* screen_number */,
+ int* /* count_return */
+);
+
+/* ICCCM routines for things that don't require special include files; */
+/* other declarations are given in Xutil.h */
+extern Status XReconfigureWMWindow(
+ Display* /* display */,
+ Window /* w */,
+ int /* screen_number */,
+ unsigned int /* mask */,
+ XWindowChanges* /* changes */
+);
+
+extern Status XGetWMProtocols(
+ Display* /* display */,
+ Window /* w */,
+ Atom** /* protocols_return */,
+ int* /* count_return */
+);
+extern Status XSetWMProtocols(
+ Display* /* display */,
+ Window /* w */,
+ Atom* /* protocols */,
+ int /* count */
+);
+extern Status XIconifyWindow(
+ Display* /* display */,
+ Window /* w */,
+ int /* screen_number */
+);
+extern Status XWithdrawWindow(
+ Display* /* display */,
+ Window /* w */,
+ int /* screen_number */
+);
+extern Status XGetCommand(
+ Display* /* display */,
+ Window /* w */,
+ char*** /* argv_return */,
+ int* /* argc_return */
+);
+extern Status XGetWMColormapWindows(
+ Display* /* display */,
+ Window /* w */,
+ Window** /* windows_return */,
+ int* /* count_return */
+);
+extern Status XSetWMColormapWindows(
+ Display* /* display */,
+ Window /* w */,
+ Window* /* colormap_windows */,
+ int /* count */
+);
+extern void XFreeStringList(
+ char** /* list */
+);
+extern int XSetTransientForHint(
+ Display* /* display */,
+ Window /* w */,
+ Window /* prop_window */
+);
+
+/* The following are given in alphabetical order */
+
+extern int XActivateScreenSaver(
+ Display* /* display */
+);
+
+extern int XAddHost(
+ Display* /* display */,
+ XHostAddress* /* host */
+);
+
+extern int XAddHosts(
+ Display* /* display */,
+ XHostAddress* /* hosts */,
+ int /* num_hosts */
+);
+
+extern int XAddToExtensionList(
+ struct _XExtData** /* structure */,
+ XExtData* /* ext_data */
+);
+
+extern int XAddToSaveSet(
+ Display* /* display */,
+ Window /* w */
+);
+
+extern Status XAllocColor(
+ Display* /* display */,
+ Colormap /* colormap */,
+ XColor* /* screen_in_out */
+);
+
+extern Status XAllocColorCells(
+ Display* /* display */,
+ Colormap /* colormap */,
+ Bool /* contig */,
+ unsigned long* /* plane_masks_return */,
+ unsigned int /* nplanes */,
+ unsigned long* /* pixels_return */,
+ unsigned int /* npixels */
+);
+
+extern Status XAllocColorPlanes(
+ Display* /* display */,
+ Colormap /* colormap */,
+ Bool /* contig */,
+ unsigned long* /* pixels_return */,
+ int /* ncolors */,
+ int /* nreds */,
+ int /* ngreens */,
+ int /* nblues */,
+ unsigned long* /* rmask_return */,
+ unsigned long* /* gmask_return */,
+ unsigned long* /* bmask_return */
+);
+
+extern Status XAllocNamedColor(
+ Display* /* display */,
+ Colormap /* colormap */,
+ _Xconst char* /* color_name */,
+ XColor* /* screen_def_return */,
+ XColor* /* exact_def_return */
+);
+
+extern int XAllowEvents(
+ Display* /* display */,
+ int /* event_mode */,
+ Time /* time */
+);
+
+extern int XAutoRepeatOff(
+ Display* /* display */
+);
+
+extern int XAutoRepeatOn(
+ Display* /* display */
+);
+
+extern int XBell(
+ Display* /* display */,
+ int /* percent */
+);
+
+extern int XBitmapBitOrder(
+ Display* /* display */
+);
+
+extern int XBitmapPad(
+ Display* /* display */
+);
+
+extern int XBitmapUnit(
+ Display* /* display */
+);
+
+extern int XCellsOfScreen(
+ Screen* /* screen */
+);
+
+extern int XChangeActivePointerGrab(
+ Display* /* display */,
+ unsigned int /* event_mask */,
+ Cursor /* cursor */,
+ Time /* time */
+);
+
+extern int XChangeGC(
+ Display* /* display */,
+ GC /* gc */,
+ unsigned long /* valuemask */,
+ XGCValues* /* values */
+);
+
+extern int XChangeKeyboardControl(
+ Display* /* display */,
+ unsigned long /* value_mask */,
+ XKeyboardControl* /* values */
+);
+
+extern int XChangeKeyboardMapping(
+ Display* /* display */,
+ int /* first_keycode */,
+ int /* keysyms_per_keycode */,
+ KeySym* /* keysyms */,
+ int /* num_codes */
+);
+
+extern int XChangePointerControl(
+ Display* /* display */,
+ Bool /* do_accel */,
+ Bool /* do_threshold */,
+ int /* accel_numerator */,
+ int /* accel_denominator */,
+ int /* threshold */
+);
+
+extern int XChangeProperty(
+ Display* /* display */,
+ Window /* w */,
+ Atom /* property */,
+ Atom /* type */,
+ int /* format */,
+ int /* mode */,
+ _Xconst unsigned char* /* data */,
+ int /* nelements */
+);
+
+extern int XChangeSaveSet(
+ Display* /* display */,
+ Window /* w */,
+ int /* change_mode */
+);
+
+extern int XChangeWindowAttributes(
+ Display* /* display */,
+ Window /* w */,
+ unsigned long /* valuemask */,
+ XSetWindowAttributes* /* attributes */
+);
+
+extern Bool XCheckIfEvent(
+ Display* /* display */,
+ XEvent* /* event_return */,
+ Bool (*) (
+ Display* /* display */,
+ XEvent* /* event */,
+ XPointer /* arg */
+ ) /* predicate */,
+ XPointer /* arg */
+);
+
+extern Bool XCheckMaskEvent(
+ Display* /* display */,
+ long /* event_mask */,
+ XEvent* /* event_return */
+);
+
+extern Bool XCheckTypedEvent(
+ Display* /* display */,
+ int /* event_type */,
+ XEvent* /* event_return */
+);
+
+extern Bool XCheckTypedWindowEvent(
+ Display* /* display */,
+ Window /* w */,
+ int /* event_type */,
+ XEvent* /* event_return */
+);
+
+extern Bool XCheckWindowEvent(
+ Display* /* display */,
+ Window /* w */,
+ long /* event_mask */,
+ XEvent* /* event_return */
+);
+
+extern int XCirculateSubwindows(
+ Display* /* display */,
+ Window /* w */,
+ int /* direction */
+);
+
+extern int XCirculateSubwindowsDown(
+ Display* /* display */,
+ Window /* w */
+);
+
+extern int XCirculateSubwindowsUp(
+ Display* /* display */,
+ Window /* w */
+);
+
+extern int XClearArea(
+ Display* /* display */,
+ Window /* w */,
+ int /* x */,
+ int /* y */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ Bool /* exposures */
+);
+
+extern int XClearWindow(
+ Display* /* display */,
+ Window /* w */
+);
+
+extern int XCloseDisplay(
+ Display* /* display */
+);
+
+extern int XConfigureWindow(
+ Display* /* display */,
+ Window /* w */,
+ unsigned int /* value_mask */,
+ XWindowChanges* /* values */
+);
+
+extern int XConnectionNumber(
+ Display* /* display */
+);
+
+extern int XConvertSelection(
+ Display* /* display */,
+ Atom /* selection */,
+ Atom /* target */,
+ Atom /* property */,
+ Window /* requestor */,
+ Time /* time */
+);
+
+extern int XCopyArea(
+ Display* /* display */,
+ Drawable /* src */,
+ Drawable /* dest */,
+ GC /* gc */,
+ int /* src_x */,
+ int /* src_y */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ int /* dest_x */,
+ int /* dest_y */
+);
+
+extern int XCopyGC(
+ Display* /* display */,
+ GC /* src */,
+ unsigned long /* valuemask */,
+ GC /* dest */
+);
+
+extern int XCopyPlane(
+ Display* /* display */,
+ Drawable /* src */,
+ Drawable /* dest */,
+ GC /* gc */,
+ int /* src_x */,
+ int /* src_y */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ int /* dest_x */,
+ int /* dest_y */,
+ unsigned long /* plane */
+);
+
+extern int XDefaultDepth(
+ Display* /* display */,
+ int /* screen_number */
+);
+
+extern int XDefaultDepthOfScreen(
+ Screen* /* screen */
+);
+
+extern int XDefaultScreen(
+ Display* /* display */
+);
+
+extern int XDefineCursor(
+ Display* /* display */,
+ Window /* w */,
+ Cursor /* cursor */
+);
+
+extern int XDeleteProperty(
+ Display* /* display */,
+ Window /* w */,
+ Atom /* property */
+);
+
+extern int XDestroyWindow(
+ Display* /* display */,
+ Window /* w */
+);
+
+extern int XDestroySubwindows(
+ Display* /* display */,
+ Window /* w */
+);
+
+extern int XDoesBackingStore(
+ Screen* /* screen */
+);
+
+extern Bool XDoesSaveUnders(
+ Screen* /* screen */
+);
+
+extern int XDisableAccessControl(
+ Display* /* display */
+);
+
+
+extern int XDisplayCells(
+ Display* /* display */,
+ int /* screen_number */
+);
+
+extern int XDisplayHeight(
+ Display* /* display */,
+ int /* screen_number */
+);
+
+extern int XDisplayHeightMM(
+ Display* /* display */,
+ int /* screen_number */
+);
+
+extern int XDisplayKeycodes(
+ Display* /* display */,
+ int* /* min_keycodes_return */,
+ int* /* max_keycodes_return */
+);
+
+extern int XDisplayPlanes(
+ Display* /* display */,
+ int /* screen_number */
+);
+
+extern int XDisplayWidth(
+ Display* /* display */,
+ int /* screen_number */
+);
+
+extern int XDisplayWidthMM(
+ Display* /* display */,
+ int /* screen_number */
+);
+
+extern int XDrawArc(
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ int /* angle1 */,
+ int /* angle2 */
+);
+
+extern int XDrawArcs(
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ XArc* /* arcs */,
+ int /* narcs */
+);
+
+extern int XDrawImageString(
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ _Xconst char* /* string */,
+ int /* length */
+);
+
+extern int XDrawImageString16(
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ _Xconst XChar2b* /* string */,
+ int /* length */
+);
+
+extern int XDrawLine(
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ int /* x1 */,
+ int /* y1 */,
+ int /* x2 */,
+ int /* y2 */
+);
+
+extern int XDrawLines(
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ XPoint* /* points */,
+ int /* npoints */,
+ int /* mode */
+);
+
+extern int XDrawPoint(
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */
+);
+
+extern int XDrawPoints(
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ XPoint* /* points */,
+ int /* npoints */,
+ int /* mode */
+);
+
+extern int XDrawRectangle(
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ unsigned int /* width */,
+ unsigned int /* height */
+);
+
+extern int XDrawRectangles(
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ XRectangle* /* rectangles */,
+ int /* nrectangles */
+);
+
+extern int XDrawSegments(
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ XSegment* /* segments */,
+ int /* nsegments */
+);
+
+extern int XDrawString(
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ _Xconst char* /* string */,
+ int /* length */
+);
+
+extern int XDrawString16(
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ _Xconst XChar2b* /* string */,
+ int /* length */
+);
+
+extern int XDrawText(
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ XTextItem* /* items */,
+ int /* nitems */
+);
+
+extern int XDrawText16(
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ XTextItem16* /* items */,
+ int /* nitems */
+);
+
+extern int XEnableAccessControl(
+ Display* /* display */
+);
+
+extern int XEventsQueued(
+ Display* /* display */,
+ int /* mode */
+);
+
+extern Status XFetchName(
+ Display* /* display */,
+ Window /* w */,
+ char** /* window_name_return */
+);
+
+extern int XFillArc(
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ int /* angle1 */,
+ int /* angle2 */
+);
+
+extern int XFillArcs(
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ XArc* /* arcs */,
+ int /* narcs */
+);
+
+extern int XFillPolygon(
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ XPoint* /* points */,
+ int /* npoints */,
+ int /* shape */,
+ int /* mode */
+);
+
+extern int XFillRectangle(
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ unsigned int /* width */,
+ unsigned int /* height */
+);
+
+extern int XFillRectangles(
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ XRectangle* /* rectangles */,
+ int /* nrectangles */
+);
+
+extern int XFlush(
+ Display* /* display */
+);
+
+extern int XForceScreenSaver(
+ Display* /* display */,
+ int /* mode */
+);
+
+extern int XFree(
+ void* /* data */
+);
+
+extern int XFreeColormap(
+ Display* /* display */,
+ Colormap /* colormap */
+);
+
+extern int XFreeColors(
+ Display* /* display */,
+ Colormap /* colormap */,
+ unsigned long* /* pixels */,
+ int /* npixels */,
+ unsigned long /* planes */
+);
+
+extern int XFreeCursor(
+ Display* /* display */,
+ Cursor /* cursor */
+);
+
+extern int XFreeExtensionList(
+ char** /* list */
+);
+
+extern int XFreeFont(
+ Display* /* display */,
+ XFontStruct* /* font_struct */
+);
+
+extern int XFreeFontInfo(
+ char** /* names */,
+ XFontStruct* /* free_info */,
+ int /* actual_count */
+);
+
+extern int XFreeFontNames(
+ char** /* list */
+);
+
+extern int XFreeFontPath(
+ char** /* list */
+);
+
+extern int XFreeGC(
+ Display* /* display */,
+ GC /* gc */
+);
+
+extern int XFreeModifiermap(
+ XModifierKeymap* /* modmap */
+);
+
+extern int XFreePixmap(
+ Display* /* display */,
+ Pixmap /* pixmap */
+);
+
+extern int XGeometry(
+ Display* /* display */,
+ int /* screen */,
+ _Xconst char* /* position */,
+ _Xconst char* /* default_position */,
+ unsigned int /* bwidth */,
+ unsigned int /* fwidth */,
+ unsigned int /* fheight */,
+ int /* xadder */,
+ int /* yadder */,
+ int* /* x_return */,
+ int* /* y_return */,
+ int* /* width_return */,
+ int* /* height_return */
+);
+
+extern int XGetErrorDatabaseText(
+ Display* /* display */,
+ _Xconst char* /* name */,
+ _Xconst char* /* message */,
+ _Xconst char* /* default_string */,
+ char* /* buffer_return */,
+ int /* length */
+);
+
+extern int XGetErrorText(
+ Display* /* display */,
+ int /* code */,
+ char* /* buffer_return */,
+ int /* length */
+);
+
+extern Bool XGetFontProperty(
+ XFontStruct* /* font_struct */,
+ Atom /* atom */,
+ unsigned long* /* value_return */
+);
+
+extern Status XGetGCValues(
+ Display* /* display */,
+ GC /* gc */,
+ unsigned long /* valuemask */,
+ XGCValues* /* values_return */
+);
+
+extern Status XGetGeometry(
+ Display* /* display */,
+ Drawable /* d */,
+ Window* /* root_return */,
+ int* /* x_return */,
+ int* /* y_return */,
+ unsigned int* /* width_return */,
+ unsigned int* /* height_return */,
+ unsigned int* /* border_width_return */,
+ unsigned int* /* depth_return */
+);
+
+extern Status XGetIconName(
+ Display* /* display */,
+ Window /* w */,
+ char** /* icon_name_return */
+);
+
+extern int XGetInputFocus(
+ Display* /* display */,
+ Window* /* focus_return */,
+ int* /* revert_to_return */
+);
+
+extern int XGetKeyboardControl(
+ Display* /* display */,
+ XKeyboardState* /* values_return */
+);
+
+extern int XGetPointerControl(
+ Display* /* display */,
+ int* /* accel_numerator_return */,
+ int* /* accel_denominator_return */,
+ int* /* threshold_return */
+);
+
+extern int XGetPointerMapping(
+ Display* /* display */,
+ unsigned char* /* map_return */,
+ int /* nmap */
+);
+
+extern int XGetScreenSaver(
+ Display* /* display */,
+ int* /* timeout_return */,
+ int* /* interval_return */,
+ int* /* prefer_blanking_return */,
+ int* /* allow_exposures_return */
+);
+
+extern Status XGetTransientForHint(
+ Display* /* display */,
+ Window /* w */,
+ Window* /* prop_window_return */
+);
+
+extern int XGetWindowProperty(
+ Display* /* display */,
+ Window /* w */,
+ Atom /* property */,
+ long /* long_offset */,
+ long /* long_length */,
+ Bool /* delete */,
+ Atom /* req_type */,
+ Atom* /* actual_type_return */,
+ int* /* actual_format_return */,
+ unsigned long* /* nitems_return */,
+ unsigned long* /* bytes_after_return */,
+ unsigned char** /* prop_return */
+);
+
+extern Status XGetWindowAttributes(
+ Display* /* display */,
+ Window /* w */,
+ XWindowAttributes* /* window_attributes_return */
+);
+
+extern int XGrabButton(
+ Display* /* display */,
+ unsigned int /* button */,
+ unsigned int /* modifiers */,
+ Window /* grab_window */,
+ Bool /* owner_events */,
+ unsigned int /* event_mask */,
+ int /* pointer_mode */,
+ int /* keyboard_mode */,
+ Window /* confine_to */,
+ Cursor /* cursor */
+);
+
+extern int XGrabKey(
+ Display* /* display */,
+ int /* keycode */,
+ unsigned int /* modifiers */,
+ Window /* grab_window */,
+ Bool /* owner_events */,
+ int /* pointer_mode */,
+ int /* keyboard_mode */
+);
+
+extern int XGrabKeyboard(
+ Display* /* display */,
+ Window /* grab_window */,
+ Bool /* owner_events */,
+ int /* pointer_mode */,
+ int /* keyboard_mode */,
+ Time /* time */
+);
+
+extern int XGrabPointer(
+ Display* /* display */,
+ Window /* grab_window */,
+ Bool /* owner_events */,
+ unsigned int /* event_mask */,
+ int /* pointer_mode */,
+ int /* keyboard_mode */,
+ Window /* confine_to */,
+ Cursor /* cursor */,
+ Time /* time */
+);
+
+extern int XGrabServer(
+ Display* /* display */
+);
+
+extern int XHeightMMOfScreen(
+ Screen* /* screen */
+);
+
+extern int XHeightOfScreen(
+ Screen* /* screen */
+);
+
+extern int XIfEvent(
+ Display* /* display */,
+ XEvent* /* event_return */,
+ Bool (*) (
+ Display* /* display */,
+ XEvent* /* event */,
+ XPointer /* arg */
+ ) /* predicate */,
+ XPointer /* arg */
+);
+
+extern int XImageByteOrder(
+ Display* /* display */
+);
+
+extern int XInstallColormap(
+ Display* /* display */,
+ Colormap /* colormap */
+);
+
+extern KeyCode XKeysymToKeycode(
+ Display* /* display */,
+ KeySym /* keysym */
+);
+
+extern int XKillClient(
+ Display* /* display */,
+ XID /* resource */
+);
+
+extern Status XLookupColor(
+ Display* /* display */,
+ Colormap /* colormap */,
+ _Xconst char* /* color_name */,
+ XColor* /* exact_def_return */,
+ XColor* /* screen_def_return */
+);
+
+extern int XLowerWindow(
+ Display* /* display */,
+ Window /* w */
+);
+
+extern int XMapRaised(
+ Display* /* display */,
+ Window /* w */
+);
+
+extern int XMapSubwindows(
+ Display* /* display */,
+ Window /* w */
+);
+
+extern int XMapWindow(
+ Display* /* display */,
+ Window /* w */
+);
+
+extern int XMaskEvent(
+ Display* /* display */,
+ long /* event_mask */,
+ XEvent* /* event_return */
+);
+
+extern int XMaxCmapsOfScreen(
+ Screen* /* screen */
+);
+
+extern int XMinCmapsOfScreen(
+ Screen* /* screen */
+);
+
+extern int XMoveResizeWindow(
+ Display* /* display */,
+ Window /* w */,
+ int /* x */,
+ int /* y */,
+ unsigned int /* width */,
+ unsigned int /* height */
+);
+
+extern int XMoveWindow(
+ Display* /* display */,
+ Window /* w */,
+ int /* x */,
+ int /* y */
+);
+
+extern int XNextEvent(
+ Display* /* display */,
+ XEvent* /* event_return */
+);
+
+extern int XNoOp(
+ Display* /* display */
+);
+
+extern Status XParseColor(
+ Display* /* display */,
+ Colormap /* colormap */,
+ _Xconst char* /* spec */,
+ XColor* /* exact_def_return */
+);
+
+extern int XParseGeometry(
+ _Xconst char* /* parsestring */,
+ int* /* x_return */,
+ int* /* y_return */,
+ unsigned int* /* width_return */,
+ unsigned int* /* height_return */
+);
+
+extern int XPeekEvent(
+ Display* /* display */,
+ XEvent* /* event_return */
+);
+
+extern int XPeekIfEvent(
+ Display* /* display */,
+ XEvent* /* event_return */,
+ Bool (*) (
+ Display* /* display */,
+ XEvent* /* event */,
+ XPointer /* arg */
+ ) /* predicate */,
+ XPointer /* arg */
+);
+
+extern int XPending(
+ Display* /* display */
+);
+
+extern int XPlanesOfScreen(
+ Screen* /* screen */
+);
+
+extern int XProtocolRevision(
+ Display* /* display */
+);
+
+extern int XProtocolVersion(
+ Display* /* display */
+);
+
+
+extern int XPutBackEvent(
+ Display* /* display */,
+ XEvent* /* event */
+);
+
+extern int XPutImage(
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ XImage* /* image */,
+ int /* src_x */,
+ int /* src_y */,
+ int /* dest_x */,
+ int /* dest_y */,
+ unsigned int /* width */,
+ unsigned int /* height */
+);
+
+extern int XQLength(
+ Display* /* display */
+);
+
+extern Status XQueryBestCursor(
+ Display* /* display */,
+ Drawable /* d */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ unsigned int* /* width_return */,
+ unsigned int* /* height_return */
+);
+
+extern Status XQueryBestSize(
+ Display* /* display */,
+ int /* class */,
+ Drawable /* which_screen */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ unsigned int* /* width_return */,
+ unsigned int* /* height_return */
+);
+
+extern Status XQueryBestStipple(
+ Display* /* display */,
+ Drawable /* which_screen */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ unsigned int* /* width_return */,
+ unsigned int* /* height_return */
+);
+
+extern Status XQueryBestTile(
+ Display* /* display */,
+ Drawable /* which_screen */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ unsigned int* /* width_return */,
+ unsigned int* /* height_return */
+);
+
+extern int XQueryColor(
+ Display* /* display */,
+ Colormap /* colormap */,
+ XColor* /* def_in_out */
+);
+
+extern int XQueryColors(
+ Display* /* display */,
+ Colormap /* colormap */,
+ XColor* /* defs_in_out */,
+ int /* ncolors */
+);
+
+extern Bool XQueryExtension(
+ Display* /* display */,
+ _Xconst char* /* name */,
+ int* /* major_opcode_return */,
+ int* /* first_event_return */,
+ int* /* first_error_return */
+);
+
+extern int XQueryKeymap(
+ Display* /* display */,
+ char [32] /* keys_return */
+);
+
+extern Bool XQueryPointer(
+ Display* /* display */,
+ Window /* w */,
+ Window* /* root_return */,
+ Window* /* child_return */,
+ int* /* root_x_return */,
+ int* /* root_y_return */,
+ int* /* win_x_return */,
+ int* /* win_y_return */,
+ unsigned int* /* mask_return */
+);
+
+extern int XQueryTextExtents(
+ Display* /* display */,
+ XID /* font_ID */,
+ _Xconst char* /* string */,
+ int /* nchars */,
+ int* /* direction_return */,
+ int* /* font_ascent_return */,
+ int* /* font_descent_return */,
+ XCharStruct* /* overall_return */
+);
+
+extern int XQueryTextExtents16(
+ Display* /* display */,
+ XID /* font_ID */,
+ _Xconst XChar2b* /* string */,
+ int /* nchars */,
+ int* /* direction_return */,
+ int* /* font_ascent_return */,
+ int* /* font_descent_return */,
+ XCharStruct* /* overall_return */
+);
+
+extern Status XQueryTree(
+ Display* /* display */,
+ Window /* w */,
+ Window* /* root_return */,
+ Window* /* parent_return */,
+ Window** /* children_return */,
+ unsigned int* /* nchildren_return */
+);
+
+extern int XRaiseWindow(
+ Display* /* display */,
+ Window /* w */
+);
+
+extern int XReadBitmapFile(
+ Display* /* display */,
+ Drawable /* d */,
+ _Xconst char* /* filename */,
+ unsigned int* /* width_return */,
+ unsigned int* /* height_return */,
+ Pixmap* /* bitmap_return */,
+ int* /* x_hot_return */,
+ int* /* y_hot_return */
+);
+
+extern int XReadBitmapFileData(
+ _Xconst char* /* filename */,
+ unsigned int* /* width_return */,
+ unsigned int* /* height_return */,
+ unsigned char** /* data_return */,
+ int* /* x_hot_return */,
+ int* /* y_hot_return */
+);
+
+extern int XRebindKeysym(
+ Display* /* display */,
+ KeySym /* keysym */,
+ KeySym* /* list */,
+ int /* mod_count */,
+ _Xconst unsigned char* /* string */,
+ int /* bytes_string */
+);
+
+extern int XRecolorCursor(
+ Display* /* display */,
+ Cursor /* cursor */,
+ XColor* /* foreground_color */,
+ XColor* /* background_color */
+);
+
+extern int XRefreshKeyboardMapping(
+ XMappingEvent* /* event_map */
+);
+
+extern int XRemoveFromSaveSet(
+ Display* /* display */,
+ Window /* w */
+);
+
+extern int XRemoveHost(
+ Display* /* display */,
+ XHostAddress* /* host */
+);
+
+extern int XRemoveHosts(
+ Display* /* display */,
+ XHostAddress* /* hosts */,
+ int /* num_hosts */
+);
+
+extern int XReparentWindow(
+ Display* /* display */,
+ Window /* w */,
+ Window /* parent */,
+ int /* x */,
+ int /* y */
+);
+
+extern int XResetScreenSaver(
+ Display* /* display */
+);
+
+extern int XResizeWindow(
+ Display* /* display */,
+ Window /* w */,
+ unsigned int /* width */,
+ unsigned int /* height */
+);
+
+extern int XRestackWindows(
+ Display* /* display */,
+ Window* /* windows */,
+ int /* nwindows */
+);
+
+extern int XRotateBuffers(
+ Display* /* display */,
+ int /* rotate */
+);
+
+extern int XRotateWindowProperties(
+ Display* /* display */,
+ Window /* w */,
+ Atom* /* properties */,
+ int /* num_prop */,
+ int /* npositions */
+);
+
+extern int XScreenCount(
+ Display* /* display */
+);
+
+extern int XSelectInput(
+ Display* /* display */,
+ Window /* w */,
+ long /* event_mask */
+);
+
+extern Status XSendEvent(
+ Display* /* display */,
+ Window /* w */,
+ Bool /* propagate */,
+ long /* event_mask */,
+ XEvent* /* event_send */
+);
+
+extern int XSetAccessControl(
+ Display* /* display */,
+ int /* mode */
+);
+
+extern int XSetArcMode(
+ Display* /* display */,
+ GC /* gc */,
+ int /* arc_mode */
+);
+
+extern int XSetBackground(
+ Display* /* display */,
+ GC /* gc */,
+ unsigned long /* background */
+);
+
+extern int XSetClipMask(
+ Display* /* display */,
+ GC /* gc */,
+ Pixmap /* pixmap */
+);
+
+extern int XSetClipOrigin(
+ Display* /* display */,
+ GC /* gc */,
+ int /* clip_x_origin */,
+ int /* clip_y_origin */
+);
+
+extern int XSetClipRectangles(
+ Display* /* display */,
+ GC /* gc */,
+ int /* clip_x_origin */,
+ int /* clip_y_origin */,
+ XRectangle* /* rectangles */,
+ int /* n */,
+ int /* ordering */
+);
+
+extern int XSetCloseDownMode(
+ Display* /* display */,
+ int /* close_mode */
+);
+
+extern int XSetCommand(
+ Display* /* display */,
+ Window /* w */,
+ char** /* argv */,
+ int /* argc */
+);
+
+extern int XSetDashes(
+ Display* /* display */,
+ GC /* gc */,
+ int /* dash_offset */,
+ _Xconst char* /* dash_list */,
+ int /* n */
+);
+
+extern int XSetFillRule(
+ Display* /* display */,
+ GC /* gc */,
+ int /* fill_rule */
+);
+
+extern int XSetFillStyle(
+ Display* /* display */,
+ GC /* gc */,
+ int /* fill_style */
+);
+
+extern int XSetFont(
+ Display* /* display */,
+ GC /* gc */,
+ Font /* font */
+);
+
+extern int XSetFontPath(
+ Display* /* display */,
+ char** /* directories */,
+ int /* ndirs */
+);
+
+extern int XSetForeground(
+ Display* /* display */,
+ GC /* gc */,
+ unsigned long /* foreground */
+);
+
+extern int XSetFunction(
+ Display* /* display */,
+ GC /* gc */,
+ int /* function */
+);
+
+extern int XSetGraphicsExposures(
+ Display* /* display */,
+ GC /* gc */,
+ Bool /* graphics_exposures */
+);
+
+extern int XSetIconName(
+ Display* /* display */,
+ Window /* w */,
+ _Xconst char* /* icon_name */
+);
+
+extern int XSetInputFocus(
+ Display* /* display */,
+ Window /* focus */,
+ int /* revert_to */,
+ Time /* time */
+);
+
+extern int XSetLineAttributes(
+ Display* /* display */,
+ GC /* gc */,
+ unsigned int /* line_width */,
+ int /* line_style */,
+ int /* cap_style */,
+ int /* join_style */
+);
+
+extern int XSetModifierMapping(
+ Display* /* display */,
+ XModifierKeymap* /* modmap */
+);
+
+extern int XSetPlaneMask(
+ Display* /* display */,
+ GC /* gc */,
+ unsigned long /* plane_mask */
+);
+
+extern int XSetPointerMapping(
+ Display* /* display */,
+ _Xconst unsigned char* /* map */,
+ int /* nmap */
+);
+
+extern int XSetScreenSaver(
+ Display* /* display */,
+ int /* timeout */,
+ int /* interval */,
+ int /* prefer_blanking */,
+ int /* allow_exposures */
+);
+
+extern int XSetSelectionOwner(
+ Display* /* display */,
+ Atom /* selection */,
+ Window /* owner */,
+ Time /* time */
+);
+
+extern int XSetState(
+ Display* /* display */,
+ GC /* gc */,
+ unsigned long /* foreground */,
+ unsigned long /* background */,
+ int /* function */,
+ unsigned long /* plane_mask */
+);
+
+extern int XSetStipple(
+ Display* /* display */,
+ GC /* gc */,
+ Pixmap /* stipple */
+);
+
+extern int XSetSubwindowMode(
+ Display* /* display */,
+ GC /* gc */,
+ int /* subwindow_mode */
+);
+
+extern int XSetTSOrigin(
+ Display* /* display */,
+ GC /* gc */,
+ int /* ts_x_origin */,
+ int /* ts_y_origin */
+);
+
+extern int XSetTile(
+ Display* /* display */,
+ GC /* gc */,
+ Pixmap /* tile */
+);
+
+extern int XSetWindowBackground(
+ Display* /* display */,
+ Window /* w */,
+ unsigned long /* background_pixel */
+);
+
+extern int XSetWindowBackgroundPixmap(
+ Display* /* display */,
+ Window /* w */,
+ Pixmap /* background_pixmap */
+);
+
+extern int XSetWindowBorder(
+ Display* /* display */,
+ Window /* w */,
+ unsigned long /* border_pixel */
+);
+
+extern int XSetWindowBorderPixmap(
+ Display* /* display */,
+ Window /* w */,
+ Pixmap /* border_pixmap */
+);
+
+extern int XSetWindowBorderWidth(
+ Display* /* display */,
+ Window /* w */,
+ unsigned int /* width */
+);
+
+extern int XSetWindowColormap(
+ Display* /* display */,
+ Window /* w */,
+ Colormap /* colormap */
+);
+
+extern int XStoreBuffer(
+ Display* /* display */,
+ _Xconst char* /* bytes */,
+ int /* nbytes */,
+ int /* buffer */
+);
+
+extern int XStoreBytes(
+ Display* /* display */,
+ _Xconst char* /* bytes */,
+ int /* nbytes */
+);
+
+extern int XStoreColor(
+ Display* /* display */,
+ Colormap /* colormap */,
+ XColor* /* color */
+);
+
+extern int XStoreColors(
+ Display* /* display */,
+ Colormap /* colormap */,
+ XColor* /* color */,
+ int /* ncolors */
+);
+
+extern int XStoreName(
+ Display* /* display */,
+ Window /* w */,
+ _Xconst char* /* window_name */
+);
+
+extern int XStoreNamedColor(
+ Display* /* display */,
+ Colormap /* colormap */,
+ _Xconst char* /* color */,
+ unsigned long /* pixel */,
+ int /* flags */
+);
+
+extern int XSync(
+ Display* /* display */,
+ Bool /* discard */
+);
+
+extern int XTextExtents(
+ XFontStruct* /* font_struct */,
+ _Xconst char* /* string */,
+ int /* nchars */,
+ int* /* direction_return */,
+ int* /* font_ascent_return */,
+ int* /* font_descent_return */,
+ XCharStruct* /* overall_return */
+);
+
+extern int XTextExtents16(
+ XFontStruct* /* font_struct */,
+ _Xconst XChar2b* /* string */,
+ int /* nchars */,
+ int* /* direction_return */,
+ int* /* font_ascent_return */,
+ int* /* font_descent_return */,
+ XCharStruct* /* overall_return */
+);
+
+extern int XTextWidth(
+ XFontStruct* /* font_struct */,
+ _Xconst char* /* string */,
+ int /* count */
+);
+
+extern int XTextWidth16(
+ XFontStruct* /* font_struct */,
+ _Xconst XChar2b* /* string */,
+ int /* count */
+);
+
+extern Bool XTranslateCoordinates(
+ Display* /* display */,
+ Window /* src_w */,
+ Window /* dest_w */,
+ int /* src_x */,
+ int /* src_y */,
+ int* /* dest_x_return */,
+ int* /* dest_y_return */,
+ Window* /* child_return */
+);
+
+extern int XUndefineCursor(
+ Display* /* display */,
+ Window /* w */
+);
+
+extern int XUngrabButton(
+ Display* /* display */,
+ unsigned int /* button */,
+ unsigned int /* modifiers */,
+ Window /* grab_window */
+);
+
+extern int XUngrabKey(
+ Display* /* display */,
+ int /* keycode */,
+ unsigned int /* modifiers */,
+ Window /* grab_window */
+);
+
+extern int XUngrabKeyboard(
+ Display* /* display */,
+ Time /* time */
+);
+
+extern int XUngrabPointer(
+ Display* /* display */,
+ Time /* time */
+);
+
+extern int XUngrabServer(
+ Display* /* display */
+);
+
+extern int XUninstallColormap(
+ Display* /* display */,
+ Colormap /* colormap */
+);
+
+extern int XUnloadFont(
+ Display* /* display */,
+ Font /* font */
+);
+
+extern int XUnmapSubwindows(
+ Display* /* display */,
+ Window /* w */
+);
+
+extern int XUnmapWindow(
+ Display* /* display */,
+ Window /* w */
+);
+
+extern int XVendorRelease(
+ Display* /* display */
+);
+
+extern int XWarpPointer(
+ Display* /* display */,
+ Window /* src_w */,
+ Window /* dest_w */,
+ int /* src_x */,
+ int /* src_y */,
+ unsigned int /* src_width */,
+ unsigned int /* src_height */,
+ int /* dest_x */,
+ int /* dest_y */
+);
+
+extern int XWidthMMOfScreen(
+ Screen* /* screen */
+);
+
+extern int XWidthOfScreen(
+ Screen* /* screen */
+);
+
+extern int XWindowEvent(
+ Display* /* display */,
+ Window /* w */,
+ long /* event_mask */,
+ XEvent* /* event_return */
+);
+
+extern int XWriteBitmapFile(
+ Display* /* display */,
+ _Xconst char* /* filename */,
+ Pixmap /* bitmap */,
+ unsigned int /* width */,
+ unsigned int /* height */,
+ int /* x_hot */,
+ int /* y_hot */
+);
+
+extern Bool XSupportsLocale (void);
+
+extern char *XSetLocaleModifiers(
+ const char* /* modifier_list */
+);
+
+extern XOM XOpenOM(
+ Display* /* display */,
+ struct _XrmHashBucketRec* /* rdb */,
+ _Xconst char* /* res_name */,
+ _Xconst char* /* res_class */
+);
+
+extern Status XCloseOM(
+ XOM /* om */
+);
+
+extern char *XSetOMValues(
+ XOM /* om */,
+ ...
+) _X_SENTINEL(0);
+
+extern char *XGetOMValues(
+ XOM /* om */,
+ ...
+) _X_SENTINEL(0);
+
+extern Display *XDisplayOfOM(
+ XOM /* om */
+);
+
+extern char *XLocaleOfOM(
+ XOM /* om */
+);
+
+extern XOC XCreateOC(
+ XOM /* om */,
+ ...
+) _X_SENTINEL(0);
+
+extern void XDestroyOC(
+ XOC /* oc */
+);
+
+extern XOM XOMOfOC(
+ XOC /* oc */
+);
+
+extern char *XSetOCValues(
+ XOC /* oc */,
+ ...
+) _X_SENTINEL(0);
+
+extern char *XGetOCValues(
+ XOC /* oc */,
+ ...
+) _X_SENTINEL(0);
+
+extern XFontSet XCreateFontSet(
+ Display* /* display */,
+ _Xconst char* /* base_font_name_list */,
+ char*** /* missing_charset_list */,
+ int* /* missing_charset_count */,
+ char** /* def_string */
+);
+
+extern void XFreeFontSet(
+ Display* /* display */,
+ XFontSet /* font_set */
+);
+
+extern int XFontsOfFontSet(
+ XFontSet /* font_set */,
+ XFontStruct*** /* font_struct_list */,
+ char*** /* font_name_list */
+);
+
+extern char *XBaseFontNameListOfFontSet(
+ XFontSet /* font_set */
+);
+
+extern char *XLocaleOfFontSet(
+ XFontSet /* font_set */
+);
+
+extern Bool XContextDependentDrawing(
+ XFontSet /* font_set */
+);
+
+extern Bool XDirectionalDependentDrawing(
+ XFontSet /* font_set */
+);
+
+extern Bool XContextualDrawing(
+ XFontSet /* font_set */
+);
+
+extern XFontSetExtents *XExtentsOfFontSet(
+ XFontSet /* font_set */
+);
+
+extern int XmbTextEscapement(
+ XFontSet /* font_set */,
+ _Xconst char* /* text */,
+ int /* bytes_text */
+);
+
+extern int XwcTextEscapement(
+ XFontSet /* font_set */,
+ _Xconst wchar_t* /* text */,
+ int /* num_wchars */
+);
+
+extern int Xutf8TextEscapement(
+ XFontSet /* font_set */,
+ _Xconst char* /* text */,
+ int /* bytes_text */
+);
+
+extern int XmbTextExtents(
+ XFontSet /* font_set */,
+ _Xconst char* /* text */,
+ int /* bytes_text */,
+ XRectangle* /* overall_ink_return */,
+ XRectangle* /* overall_logical_return */
+);
+
+extern int XwcTextExtents(
+ XFontSet /* font_set */,
+ _Xconst wchar_t* /* text */,
+ int /* num_wchars */,
+ XRectangle* /* overall_ink_return */,
+ XRectangle* /* overall_logical_return */
+);
+
+extern int Xutf8TextExtents(
+ XFontSet /* font_set */,
+ _Xconst char* /* text */,
+ int /* bytes_text */,
+ XRectangle* /* overall_ink_return */,
+ XRectangle* /* overall_logical_return */
+);
+
+extern Status XmbTextPerCharExtents(
+ 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 */
+);
+
+extern Status XwcTextPerCharExtents(
+ XFontSet /* font_set */,
+ _Xconst wchar_t* /* text */,
+ int /* num_wchars */,
+ XRectangle* /* ink_extents_buffer */,
+ XRectangle* /* logical_extents_buffer */,
+ int /* buffer_size */,
+ int* /* num_chars */,
+ XRectangle* /* overall_ink_return */,
+ XRectangle* /* overall_logical_return */
+);
+
+extern Status Xutf8TextPerCharExtents(
+ 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 */
+);
+
+extern void XmbDrawText(
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ XmbTextItem* /* text_items */,
+ int /* nitems */
+);
+
+extern void XwcDrawText(
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ XwcTextItem* /* text_items */,
+ int /* nitems */
+);
+
+extern void Xutf8DrawText(
+ Display* /* display */,
+ Drawable /* d */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ XmbTextItem* /* text_items */,
+ int /* nitems */
+);
+
+extern void XmbDrawString(
+ Display* /* display */,
+ Drawable /* d */,
+ XFontSet /* font_set */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ _Xconst char* /* text */,
+ int /* bytes_text */
+);
+
+extern void XwcDrawString(
+ Display* /* display */,
+ Drawable /* d */,
+ XFontSet /* font_set */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ _Xconst wchar_t* /* text */,
+ int /* num_wchars */
+);
+
+extern void Xutf8DrawString(
+ Display* /* display */,
+ Drawable /* d */,
+ XFontSet /* font_set */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ _Xconst char* /* text */,
+ int /* bytes_text */
+);
+
+extern void XmbDrawImageString(
+ Display* /* display */,
+ Drawable /* d */,
+ XFontSet /* font_set */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ _Xconst char* /* text */,
+ int /* bytes_text */
+);
+
+extern void XwcDrawImageString(
+ Display* /* display */,
+ Drawable /* d */,
+ XFontSet /* font_set */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ _Xconst wchar_t* /* text */,
+ int /* num_wchars */
+);
+
+extern void Xutf8DrawImageString(
+ Display* /* display */,
+ Drawable /* d */,
+ XFontSet /* font_set */,
+ GC /* gc */,
+ int /* x */,
+ int /* y */,
+ _Xconst char* /* text */,
+ int /* bytes_text */
+);
+
+extern XIM XOpenIM(
+ Display* /* dpy */,
+ struct _XrmHashBucketRec* /* rdb */,
+ char* /* res_name */,
+ char* /* res_class */
+);
+
+extern Status XCloseIM(
+ XIM /* im */
+);
+
+extern char *XGetIMValues(
+ XIM /* im */, ...
+) _X_SENTINEL(0);
+
+extern char *XSetIMValues(
+ XIM /* im */, ...
+) _X_SENTINEL(0);
+
+extern Display *XDisplayOfIM(
+ XIM /* im */
+);
+
+extern char *XLocaleOfIM(
+ XIM /* im*/
+);
+
+extern XIC XCreateIC(
+ XIM /* im */, ...
+) _X_SENTINEL(0);
+
+extern void XDestroyIC(
+ XIC /* ic */
+);
+
+extern void XSetICFocus(
+ XIC /* ic */
+);
+
+extern void XUnsetICFocus(
+ XIC /* ic */
+);
+
+extern wchar_t *XwcResetIC(
+ XIC /* ic */
+);
+
+extern char *XmbResetIC(
+ XIC /* ic */
+);
+
+extern char *Xutf8ResetIC(
+ XIC /* ic */
+);
+
+extern char *XSetICValues(
+ XIC /* ic */, ...
+) _X_SENTINEL(0);
+
+extern char *XGetICValues(
+ XIC /* ic */, ...
+) _X_SENTINEL(0);
+
+extern XIM XIMOfIC(
+ XIC /* ic */
+);
+
+extern Bool XFilterEvent(
+ XEvent* /* event */,
+ Window /* window */
+);
+
+extern int XmbLookupString(
+ XIC /* ic */,
+ XKeyPressedEvent* /* event */,
+ char* /* buffer_return */,
+ int /* bytes_buffer */,
+ KeySym* /* keysym_return */,
+ Status* /* status_return */
+);
+
+extern int XwcLookupString(
+ XIC /* ic */,
+ XKeyPressedEvent* /* event */,
+ wchar_t* /* buffer_return */,
+ int /* wchars_buffer */,
+ KeySym* /* keysym_return */,
+ Status* /* status_return */
+);
+
+extern int Xutf8LookupString(
+ XIC /* ic */,
+ XKeyPressedEvent* /* event */,
+ char* /* buffer_return */,
+ int /* bytes_buffer */,
+ KeySym* /* keysym_return */,
+ Status* /* status_return */
+);
+
+extern XVaNestedList XVaCreateNestedList(
+ int /*unused*/, ...
+) _X_SENTINEL(0);
+
+/* internal connections for IMs */
+
+extern Bool XRegisterIMInstantiateCallback(
+ Display* /* dpy */,
+ struct _XrmHashBucketRec* /* rdb */,
+ char* /* res_name */,
+ char* /* res_class */,
+ XIDProc /* callback */,
+ XPointer /* client_data */
+);
+
+extern Bool XUnregisterIMInstantiateCallback(
+ Display* /* dpy */,
+ struct _XrmHashBucketRec* /* rdb */,
+ char* /* res_name */,
+ char* /* res_class */,
+ XIDProc /* callback */,
+ XPointer /* client_data */
+);
+
+typedef void (*XConnectionWatchProc)(
+ Display* /* dpy */,
+ XPointer /* client_data */,
+ int /* fd */,
+ Bool /* opening */, /* open or close flag */
+ XPointer* /* watch_data */ /* open sets, close uses */
+);
+
+
+extern Status XInternalConnectionNumbers(
+ Display* /* dpy */,
+ int** /* fd_return */,
+ int* /* count_return */
+);
+
+extern void XProcessInternalConnection(
+ Display* /* dpy */,
+ int /* fd */
+);
+
+extern Status XAddConnectionWatch(
+ Display* /* dpy */,
+ XConnectionWatchProc /* callback */,
+ XPointer /* client_data */
+);
+
+extern void XRemoveConnectionWatch(
+ Display* /* dpy */,
+ XConnectionWatchProc /* callback */,
+ XPointer /* client_data */
+);
+
+extern void XSetAuthorization(
+ char * /* name */,
+ int /* namelen */,
+ char * /* data */,
+ int /* datalen */
+);
+
+extern int _Xmbtowc(
+ wchar_t * /* wstr */,
+#ifdef ISC
+ char const * /* str */,
+ size_t /* len */
+#else
+ char * /* str */,
+ int /* len */
+#endif
+);
+
+extern int _Xwctomb(
+ char * /* str */,
+ wchar_t /* wc */
+);
+
+extern Bool XGetEventData(
+ Display* /* dpy */,
+ XGenericEventCookie* /* cookie*/
+);
+
+extern void XFreeEventData(
+ Display* /* dpy */,
+ XGenericEventCookie* /* cookie*/
+);
+
+_XFUNCPROTOEND
+
+#endif /* _X11_XLIB_H_ */
diff --git a/libX11/include/X11/Xlibint.h b/libX11/include/X11/Xlibint.h
index 8a06f6d6a..2bd83a357 100644
--- a/libX11/include/X11/Xlibint.h
+++ b/libX11/include/X11/Xlibint.h
@@ -27,8 +27,8 @@ from The Open Group.
*/
-#ifndef _XLIBINT_H_
-#define _XLIBINT_H_ 1
+#ifndef _X11_XLIBINT_H_
+#define _X11_XLIBINT_H_ 1
/*
* Xlibint.h - Header definition and support file for the internal
@@ -1394,4 +1394,4 @@ extern void xlocaledir(
_XFUNCPROTOEND
-#endif /* _XLIBINT_H_ */
+#endif /* _X11_XLIBINT_H_ */
diff --git a/libX11/include/X11/Xlocale.h b/libX11/include/X11/Xlocale.h
index baa13353b..dfb004c32 100644
--- a/libX11/include/X11/Xlocale.h
+++ b/libX11/include/X11/Xlocale.h
@@ -1,59 +1,59 @@
-/*
-
-Copyright 1991, 1998 The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from The Open Group.
-
-*/
-
-#ifndef _XLOCALE_H_
-#define _XLOCALE_H_
-
-#include <X11/Xfuncproto.h>
-#include <X11/Xosdefs.h>
-
-#ifndef X_LOCALE
-#include <locale.h>
-#else
-
-#define LC_ALL 0
-#define LC_COLLATE 1
-#define LC_CTYPE 2
-#define LC_MONETARY 3
-#define LC_NUMERIC 4
-#define LC_TIME 5
-
-_XFUNCPROTOBEGIN
-extern char *_Xsetlocale(
- int /* category */,
- _Xconst char* /* name */
-);
-_XFUNCPROTOEND
-
-#define setlocale _Xsetlocale
-
-#include <stddef.h>
-
-#endif /* X_LOCALE */
-
-#endif /* _XLOCALE_H_ */
+/*
+
+Copyright 1991, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from The Open Group.
+
+*/
+
+#ifndef _X11_XLOCALE_H_
+#define _X11_XLOCALE_H_
+
+#include <X11/Xfuncproto.h>
+#include <X11/Xosdefs.h>
+
+#ifndef X_LOCALE
+#include <locale.h>
+#else
+
+#define LC_ALL 0
+#define LC_COLLATE 1
+#define LC_CTYPE 2
+#define LC_MONETARY 3
+#define LC_NUMERIC 4
+#define LC_TIME 5
+
+_XFUNCPROTOBEGIN
+extern char *_Xsetlocale(
+ int /* category */,
+ _Xconst char* /* name */
+);
+_XFUNCPROTOEND
+
+#define setlocale _Xsetlocale
+
+#include <stddef.h>
+
+#endif /* X_LOCALE */
+
+#endif /* _X11_XLOCALE_H_ */
diff --git a/libX11/include/X11/Xregion.h b/libX11/include/X11/Xregion.h
index 7b376e556..b441312dc 100644
--- a/libX11/include/X11/Xregion.h
+++ b/libX11/include/X11/Xregion.h
@@ -1,189 +1,189 @@
-/************************************************************************
-
-Copyright 1987, 1998 The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Digital not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-************************************************************************/
-
-#ifndef _XREGION_H
-#define _XREGION_H
-
-typedef struct {
- short x1, x2, y1, y2;
-} Box, BOX, BoxRec, *BoxPtr;
-
-typedef struct {
- short x, y, width, height;
-}RECTANGLE, RectangleRec, *RectanglePtr;
-
-#define TRUE 1
-#define FALSE 0
-#define MAXSHORT 32767
-#define MINSHORT -MAXSHORT
-#ifndef MAX
-#define MAX(a,b) (((a) > (b)) ? (a) : (b))
-#endif
-#ifndef MIN
-#define MIN(a,b) (((a) < (b)) ? (a) : (b))
-#endif
-
-
-/*
- * clip region
- */
-
-typedef struct _XRegion {
- long size;
- long numRects;
- BOX *rects;
- BOX extents;
-} REGION;
-
-/* Xutil.h contains the declaration:
- * typedef struct _XRegion *Region;
- */
-
-/* 1 if two BOXs overlap.
- * 0 if two BOXs do not overlap.
- * Remember, x2 and y2 are not in the region
- */
-#define EXTENTCHECK(r1, r2) \
- ((r1)->x2 > (r2)->x1 && \
- (r1)->x1 < (r2)->x2 && \
- (r1)->y2 > (r2)->y1 && \
- (r1)->y1 < (r2)->y2)
-
-/*
- * update region extents
- */
-#define EXTENTS(r,idRect){\
- if((r)->x1 < (idRect)->extents.x1)\
- (idRect)->extents.x1 = (r)->x1;\
- if((r)->y1 < (idRect)->extents.y1)\
- (idRect)->extents.y1 = (r)->y1;\
- if((r)->x2 > (idRect)->extents.x2)\
- (idRect)->extents.x2 = (r)->x2;\
- if((r)->y2 > (idRect)->extents.y2)\
- (idRect)->extents.y2 = (r)->y2;\
- }
-
-/*
- * Check to see if there is enough memory in the present region.
- */
-#define MEMCHECK(reg, rect, firstrect){\
- if ((reg)->numRects >= ((reg)->size - 1)){\
- (firstrect) = (BOX *) Xrealloc \
- ((char *)(firstrect), (unsigned) (2 * (sizeof(BOX)) * ((reg)->size)));\
- if ((firstrect) == 0)\
- return(0);\
- (reg)->size *= 2;\
- (rect) = &(firstrect)[(reg)->numRects];\
- }\
- }
-
-/* this routine checks to see if the previous rectangle is the same
- * or subsumes the new rectangle to add.
- */
-
-#define CHECK_PREVIOUS(Reg, R, Rx1, Ry1, Rx2, Ry2)\
- (!(((Reg)->numRects > 0)&&\
- ((R-1)->y1 == (Ry1)) &&\
- ((R-1)->y2 == (Ry2)) &&\
- ((R-1)->x1 <= (Rx1)) &&\
- ((R-1)->x2 >= (Rx2))))
-
-/* add a rectangle to the given Region */
-#define ADDRECT(reg, r, rx1, ry1, rx2, ry2){\
- if (((rx1) < (rx2)) && ((ry1) < (ry2)) &&\
- CHECK_PREVIOUS((reg), (r), (rx1), (ry1), (rx2), (ry2))){\
- (r)->x1 = (rx1);\
- (r)->y1 = (ry1);\
- (r)->x2 = (rx2);\
- (r)->y2 = (ry2);\
- EXTENTS((r), (reg));\
- (reg)->numRects++;\
- (r)++;\
- }\
- }
-
-
-
-/* add a rectangle to the given Region */
-#define ADDRECTNOX(reg, r, rx1, ry1, rx2, ry2){\
- if ((rx1 < rx2) && (ry1 < ry2) &&\
- CHECK_PREVIOUS((reg), (r), (rx1), (ry1), (rx2), (ry2))){\
- (r)->x1 = (rx1);\
- (r)->y1 = (ry1);\
- (r)->x2 = (rx2);\
- (r)->y2 = (ry2);\
- (reg)->numRects++;\
- (r)++;\
- }\
- }
-
-#define EMPTY_REGION(pReg) pReg->numRects = 0
-
-#define REGION_NOT_EMPTY(pReg) pReg->numRects
-
-#define INBOX(r, x, y) \
- ( ( ((r).x2 > x)) && \
- ( ((r).x1 <= x)) && \
- ( ((r).y2 > y)) && \
- ( ((r).y1 <= y)) )
-
-/*
- * number of points to buffer before sending them off
- * to scanlines() : Must be an even number
- */
-#define NUMPTSTOBUFFER 200
-
-/*
- * used to allocate buffers for points and link
- * the buffers together
- */
-typedef struct _POINTBLOCK {
- XPoint pts[NUMPTSTOBUFFER];
- struct _POINTBLOCK *next;
-} POINTBLOCK;
-
-#endif
+/************************************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+************************************************************************/
+
+#ifndef _X11_XREGION_H_
+#define _X11_XREGION_H_
+
+typedef struct {
+ short x1, x2, y1, y2;
+} Box, BOX, BoxRec, *BoxPtr;
+
+typedef struct {
+ short x, y, width, height;
+}RECTANGLE, RectangleRec, *RectanglePtr;
+
+#define TRUE 1
+#define FALSE 0
+#define MAXSHORT 32767
+#define MINSHORT -MAXSHORT
+#ifndef MAX
+#define MAX(a,b) (((a) > (b)) ? (a) : (b))
+#endif
+#ifndef MIN
+#define MIN(a,b) (((a) < (b)) ? (a) : (b))
+#endif
+
+
+/*
+ * clip region
+ */
+
+typedef struct _XRegion {
+ long size;
+ long numRects;
+ BOX *rects;
+ BOX extents;
+} REGION;
+
+/* Xutil.h contains the declaration:
+ * typedef struct _XRegion *Region;
+ */
+
+/* 1 if two BOXs overlap.
+ * 0 if two BOXs do not overlap.
+ * Remember, x2 and y2 are not in the region
+ */
+#define EXTENTCHECK(r1, r2) \
+ ((r1)->x2 > (r2)->x1 && \
+ (r1)->x1 < (r2)->x2 && \
+ (r1)->y2 > (r2)->y1 && \
+ (r1)->y1 < (r2)->y2)
+
+/*
+ * update region extents
+ */
+#define EXTENTS(r,idRect){\
+ if((r)->x1 < (idRect)->extents.x1)\
+ (idRect)->extents.x1 = (r)->x1;\
+ if((r)->y1 < (idRect)->extents.y1)\
+ (idRect)->extents.y1 = (r)->y1;\
+ if((r)->x2 > (idRect)->extents.x2)\
+ (idRect)->extents.x2 = (r)->x2;\
+ if((r)->y2 > (idRect)->extents.y2)\
+ (idRect)->extents.y2 = (r)->y2;\
+ }
+
+/*
+ * Check to see if there is enough memory in the present region.
+ */
+#define MEMCHECK(reg, rect, firstrect){\
+ if ((reg)->numRects >= ((reg)->size - 1)){\
+ (firstrect) = (BOX *) Xrealloc \
+ ((char *)(firstrect), (unsigned) (2 * (sizeof(BOX)) * ((reg)->size)));\
+ if ((firstrect) == 0)\
+ return(0);\
+ (reg)->size *= 2;\
+ (rect) = &(firstrect)[(reg)->numRects];\
+ }\
+ }
+
+/* this routine checks to see if the previous rectangle is the same
+ * or subsumes the new rectangle to add.
+ */
+
+#define CHECK_PREVIOUS(Reg, R, Rx1, Ry1, Rx2, Ry2)\
+ (!(((Reg)->numRects > 0)&&\
+ ((R-1)->y1 == (Ry1)) &&\
+ ((R-1)->y2 == (Ry2)) &&\
+ ((R-1)->x1 <= (Rx1)) &&\
+ ((R-1)->x2 >= (Rx2))))
+
+/* add a rectangle to the given Region */
+#define ADDRECT(reg, r, rx1, ry1, rx2, ry2){\
+ if (((rx1) < (rx2)) && ((ry1) < (ry2)) &&\
+ CHECK_PREVIOUS((reg), (r), (rx1), (ry1), (rx2), (ry2))){\
+ (r)->x1 = (rx1);\
+ (r)->y1 = (ry1);\
+ (r)->x2 = (rx2);\
+ (r)->y2 = (ry2);\
+ EXTENTS((r), (reg));\
+ (reg)->numRects++;\
+ (r)++;\
+ }\
+ }
+
+
+
+/* add a rectangle to the given Region */
+#define ADDRECTNOX(reg, r, rx1, ry1, rx2, ry2){\
+ if ((rx1 < rx2) && (ry1 < ry2) &&\
+ CHECK_PREVIOUS((reg), (r), (rx1), (ry1), (rx2), (ry2))){\
+ (r)->x1 = (rx1);\
+ (r)->y1 = (ry1);\
+ (r)->x2 = (rx2);\
+ (r)->y2 = (ry2);\
+ (reg)->numRects++;\
+ (r)++;\
+ }\
+ }
+
+#define EMPTY_REGION(pReg) pReg->numRects = 0
+
+#define REGION_NOT_EMPTY(pReg) pReg->numRects
+
+#define INBOX(r, x, y) \
+ ( ( ((r).x2 > x)) && \
+ ( ((r).x1 <= x)) && \
+ ( ((r).y2 > y)) && \
+ ( ((r).y1 <= y)) )
+
+/*
+ * number of points to buffer before sending them off
+ * to scanlines() : Must be an even number
+ */
+#define NUMPTSTOBUFFER 200
+
+/*
+ * used to allocate buffers for points and link
+ * the buffers together
+ */
+typedef struct _POINTBLOCK {
+ XPoint pts[NUMPTSTOBUFFER];
+ struct _POINTBLOCK *next;
+} POINTBLOCK;
+
+#endif /* _X11_XREGION_H_ */
diff --git a/libX11/include/X11/Xresource.h b/libX11/include/X11/Xresource.h
index dbb144c27..113f732a5 100644
--- a/libX11/include/X11/Xresource.h
+++ b/libX11/include/X11/Xresource.h
@@ -1,358 +1,358 @@
-
-/***********************************************************
-
-Copyright 1987, 1988, 1998 The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-
-Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Digital not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-******************************************************************/
-
-#ifndef _XRESOURCE_H_
-#define _XRESOURCE_H_
-
-#ifndef _XP_PRINT_SERVER_
-#include <X11/Xlib.h>
-#endif
-
-/****************************************************************
- ****************************************************************
- *** ***
- *** ***
- *** X Resource Manager Intrinsics ***
- *** ***
- *** ***
- ****************************************************************
- ****************************************************************/
-
-_XFUNCPROTOBEGIN
-
-/****************************************************************
- *
- * Memory Management
- *
- ****************************************************************/
-
-extern char *Xpermalloc(
- unsigned int /* size */
-);
-
-/****************************************************************
- *
- * Quark Management
- *
- ****************************************************************/
-
-typedef int XrmQuark, *XrmQuarkList;
-#define NULLQUARK ((XrmQuark) 0)
-
-typedef char *XrmString;
-#define NULLSTRING ((XrmString) 0)
-
-/* find quark for string, create new quark if none already exists */
-extern XrmQuark XrmStringToQuark(
- _Xconst char* /* string */
-);
-
-extern XrmQuark XrmPermStringToQuark(
- _Xconst char* /* string */
-);
-
-/* find string for quark */
-extern XrmString XrmQuarkToString(
- XrmQuark /* quark */
-);
-
-extern XrmQuark XrmUniqueQuark(
- void
-);
-
-#define XrmStringsEqual(a1, a2) (strcmp(a1, a2) == 0)
-
-
-/****************************************************************
- *
- * Conversion of Strings to Lists
- *
- ****************************************************************/
-
-typedef enum {XrmBindTightly, XrmBindLoosely} XrmBinding, *XrmBindingList;
-
-extern void XrmStringToQuarkList(
- _Xconst char* /* string */,
- XrmQuarkList /* quarks_return */
-);
-
-extern void XrmStringToBindingQuarkList(
- _Xconst char* /* string */,
- XrmBindingList /* bindings_return */,
- XrmQuarkList /* quarks_return */
-);
-
-/****************************************************************
- *
- * Name and Class lists.
- *
- ****************************************************************/
-
-typedef XrmQuark XrmName;
-typedef XrmQuarkList XrmNameList;
-#define XrmNameToString(name) XrmQuarkToString(name)
-#define XrmStringToName(string) XrmStringToQuark(string)
-#define XrmStringToNameList(str, name) XrmStringToQuarkList(str, name)
-
-typedef XrmQuark XrmClass;
-typedef XrmQuarkList XrmClassList;
-#define XrmClassToString(c_class) XrmQuarkToString(c_class)
-#define XrmStringToClass(c_class) XrmStringToQuark(c_class)
-#define XrmStringToClassList(str,c_class) XrmStringToQuarkList(str, c_class)
-
-
-
-/****************************************************************
- *
- * Resource Representation Types and Values
- *
- ****************************************************************/
-
-typedef XrmQuark XrmRepresentation;
-#define XrmStringToRepresentation(string) XrmStringToQuark(string)
-#define XrmRepresentationToString(type) XrmQuarkToString(type)
-
-typedef struct {
- unsigned int size;
- XPointer addr;
-} XrmValue, *XrmValuePtr;
-
-
-/****************************************************************
- *
- * Resource Manager Functions
- *
- ****************************************************************/
-
-typedef struct _XrmHashBucketRec *XrmHashBucket;
-typedef XrmHashBucket *XrmHashTable;
-typedef XrmHashTable XrmSearchList[];
-typedef struct _XrmHashBucketRec *XrmDatabase;
-
-
-extern void XrmDestroyDatabase(
- XrmDatabase /* database */
-);
-
-extern void XrmQPutResource(
- XrmDatabase* /* database */,
- XrmBindingList /* bindings */,
- XrmQuarkList /* quarks */,
- XrmRepresentation /* type */,
- XrmValue* /* value */
-);
-
-extern void XrmPutResource(
- XrmDatabase* /* database */,
- _Xconst char* /* specifier */,
- _Xconst char* /* type */,
- XrmValue* /* value */
-);
-
-extern void XrmQPutStringResource(
- XrmDatabase* /* database */,
- XrmBindingList /* bindings */,
- XrmQuarkList /* quarks */,
- _Xconst char* /* value */
-);
-
-extern void XrmPutStringResource(
- XrmDatabase* /* database */,
- _Xconst char* /* specifier */,
- _Xconst char* /* value */
-);
-
-extern void XrmPutLineResource(
- XrmDatabase* /* database */,
- _Xconst char* /* line */
-);
-
-extern Bool XrmQGetResource(
- XrmDatabase /* database */,
- XrmNameList /* quark_name */,
- XrmClassList /* quark_class */,
- XrmRepresentation* /* quark_type_return */,
- XrmValue* /* value_return */
-);
-
-extern Bool XrmGetResource(
- XrmDatabase /* database */,
- _Xconst char* /* str_name */,
- _Xconst char* /* str_class */,
- char** /* str_type_return */,
- XrmValue* /* value_return */
-);
-
-extern Bool XrmQGetSearchList(
- XrmDatabase /* database */,
- XrmNameList /* names */,
- XrmClassList /* classes */,
- XrmSearchList /* list_return */,
- int /* list_length */
-);
-
-extern Bool XrmQGetSearchResource(
- XrmSearchList /* list */,
- XrmName /* name */,
- XrmClass /* class */,
- XrmRepresentation* /* type_return */,
- XrmValue* /* value_return */
-);
-
-/****************************************************************
- *
- * Resource Database Management
- *
- ****************************************************************/
-
-#ifndef _XP_PRINT_SERVER_
-
-extern void XrmSetDatabase(
- Display* /* display */,
- XrmDatabase /* database */
-);
-
-extern XrmDatabase XrmGetDatabase(
- Display* /* display */
-);
-
-#endif /* !_XP_PRINT_SERVER_ */
-
-extern XrmDatabase XrmGetFileDatabase(
- _Xconst char* /* filename */
-);
-
-extern Status XrmCombineFileDatabase(
- _Xconst char* /* filename */,
- XrmDatabase* /* target */,
- Bool /* override */
-);
-
-extern XrmDatabase XrmGetStringDatabase(
- _Xconst char* /* data */ /* null terminated string */
-);
-
-extern void XrmPutFileDatabase(
- XrmDatabase /* database */,
- _Xconst char* /* filename */
-);
-
-extern void XrmMergeDatabases(
- XrmDatabase /* source_db */,
- XrmDatabase* /* target_db */
-);
-
-extern void XrmCombineDatabase(
- XrmDatabase /* source_db */,
- XrmDatabase* /* target_db */,
- Bool /* override */
-);
-
-#define XrmEnumAllLevels 0
-#define XrmEnumOneLevel 1
-
-extern Bool XrmEnumerateDatabase(
- XrmDatabase /* db */,
- XrmNameList /* name_prefix */,
- XrmClassList /* class_prefix */,
- int /* mode */,
- Bool (*)(
- XrmDatabase* /* db */,
- XrmBindingList /* bindings */,
- XrmQuarkList /* quarks */,
- XrmRepresentation* /* type */,
- XrmValue* /* value */,
- XPointer /* closure */
- ) /* proc */,
- XPointer /* closure */
-);
-
-extern const char *XrmLocaleOfDatabase(
- XrmDatabase /* database */
-);
-
-
-/****************************************************************
- *
- * Command line option mapping to resource entries
- *
- ****************************************************************/
-
-typedef enum {
- XrmoptionNoArg, /* Value is specified in OptionDescRec.value */
- XrmoptionIsArg, /* Value is the option string itself */
- XrmoptionStickyArg, /* Value is characters immediately following option */
- XrmoptionSepArg, /* Value is next argument in argv */
- XrmoptionResArg, /* Resource and value in next argument in argv */
- XrmoptionSkipArg, /* Ignore this option and the next argument in argv */
- XrmoptionSkipLine, /* Ignore this option and the rest of argv */
- XrmoptionSkipNArgs /* Ignore this option and the next
- OptionDescRes.value arguments in argv */
-} XrmOptionKind;
-
-typedef struct {
- char *option; /* Option abbreviation in argv */
- char *specifier; /* Resource specifier */
- XrmOptionKind argKind; /* Which style of option it is */
- XPointer value; /* Value to provide if XrmoptionNoArg */
-} XrmOptionDescRec, *XrmOptionDescList;
-
-
-extern void XrmParseCommand(
- XrmDatabase* /* database */,
- XrmOptionDescList /* table */,
- int /* table_count */,
- _Xconst char* /* name */,
- int* /* argc_in_out */,
- char** /* argv_in_out */
-);
-
-_XFUNCPROTOEND
-
-#endif /* _XRESOURCE_H_ */
-/* DON'T ADD STUFF AFTER THIS #endif */
+
+/***********************************************************
+
+Copyright 1987, 1988, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef _X11_XRESOURCE_H_
+#define _X11_XRESOURCE_H_
+
+#ifndef _XP_PRINT_SERVER_
+#include <X11/Xlib.h>
+#endif
+
+/****************************************************************
+ ****************************************************************
+ *** ***
+ *** ***
+ *** X Resource Manager Intrinsics ***
+ *** ***
+ *** ***
+ ****************************************************************
+ ****************************************************************/
+
+_XFUNCPROTOBEGIN
+
+/****************************************************************
+ *
+ * Memory Management
+ *
+ ****************************************************************/
+
+extern char *Xpermalloc(
+ unsigned int /* size */
+);
+
+/****************************************************************
+ *
+ * Quark Management
+ *
+ ****************************************************************/
+
+typedef int XrmQuark, *XrmQuarkList;
+#define NULLQUARK ((XrmQuark) 0)
+
+typedef char *XrmString;
+#define NULLSTRING ((XrmString) 0)
+
+/* find quark for string, create new quark if none already exists */
+extern XrmQuark XrmStringToQuark(
+ _Xconst char* /* string */
+);
+
+extern XrmQuark XrmPermStringToQuark(
+ _Xconst char* /* string */
+);
+
+/* find string for quark */
+extern XrmString XrmQuarkToString(
+ XrmQuark /* quark */
+);
+
+extern XrmQuark XrmUniqueQuark(
+ void
+);
+
+#define XrmStringsEqual(a1, a2) (strcmp(a1, a2) == 0)
+
+
+/****************************************************************
+ *
+ * Conversion of Strings to Lists
+ *
+ ****************************************************************/
+
+typedef enum {XrmBindTightly, XrmBindLoosely} XrmBinding, *XrmBindingList;
+
+extern void XrmStringToQuarkList(
+ _Xconst char* /* string */,
+ XrmQuarkList /* quarks_return */
+);
+
+extern void XrmStringToBindingQuarkList(
+ _Xconst char* /* string */,
+ XrmBindingList /* bindings_return */,
+ XrmQuarkList /* quarks_return */
+);
+
+/****************************************************************
+ *
+ * Name and Class lists.
+ *
+ ****************************************************************/
+
+typedef XrmQuark XrmName;
+typedef XrmQuarkList XrmNameList;
+#define XrmNameToString(name) XrmQuarkToString(name)
+#define XrmStringToName(string) XrmStringToQuark(string)
+#define XrmStringToNameList(str, name) XrmStringToQuarkList(str, name)
+
+typedef XrmQuark XrmClass;
+typedef XrmQuarkList XrmClassList;
+#define XrmClassToString(c_class) XrmQuarkToString(c_class)
+#define XrmStringToClass(c_class) XrmStringToQuark(c_class)
+#define XrmStringToClassList(str,c_class) XrmStringToQuarkList(str, c_class)
+
+
+
+/****************************************************************
+ *
+ * Resource Representation Types and Values
+ *
+ ****************************************************************/
+
+typedef XrmQuark XrmRepresentation;
+#define XrmStringToRepresentation(string) XrmStringToQuark(string)
+#define XrmRepresentationToString(type) XrmQuarkToString(type)
+
+typedef struct {
+ unsigned int size;
+ XPointer addr;
+} XrmValue, *XrmValuePtr;
+
+
+/****************************************************************
+ *
+ * Resource Manager Functions
+ *
+ ****************************************************************/
+
+typedef struct _XrmHashBucketRec *XrmHashBucket;
+typedef XrmHashBucket *XrmHashTable;
+typedef XrmHashTable XrmSearchList[];
+typedef struct _XrmHashBucketRec *XrmDatabase;
+
+
+extern void XrmDestroyDatabase(
+ XrmDatabase /* database */
+);
+
+extern void XrmQPutResource(
+ XrmDatabase* /* database */,
+ XrmBindingList /* bindings */,
+ XrmQuarkList /* quarks */,
+ XrmRepresentation /* type */,
+ XrmValue* /* value */
+);
+
+extern void XrmPutResource(
+ XrmDatabase* /* database */,
+ _Xconst char* /* specifier */,
+ _Xconst char* /* type */,
+ XrmValue* /* value */
+);
+
+extern void XrmQPutStringResource(
+ XrmDatabase* /* database */,
+ XrmBindingList /* bindings */,
+ XrmQuarkList /* quarks */,
+ _Xconst char* /* value */
+);
+
+extern void XrmPutStringResource(
+ XrmDatabase* /* database */,
+ _Xconst char* /* specifier */,
+ _Xconst char* /* value */
+);
+
+extern void XrmPutLineResource(
+ XrmDatabase* /* database */,
+ _Xconst char* /* line */
+);
+
+extern Bool XrmQGetResource(
+ XrmDatabase /* database */,
+ XrmNameList /* quark_name */,
+ XrmClassList /* quark_class */,
+ XrmRepresentation* /* quark_type_return */,
+ XrmValue* /* value_return */
+);
+
+extern Bool XrmGetResource(
+ XrmDatabase /* database */,
+ _Xconst char* /* str_name */,
+ _Xconst char* /* str_class */,
+ char** /* str_type_return */,
+ XrmValue* /* value_return */
+);
+
+extern Bool XrmQGetSearchList(
+ XrmDatabase /* database */,
+ XrmNameList /* names */,
+ XrmClassList /* classes */,
+ XrmSearchList /* list_return */,
+ int /* list_length */
+);
+
+extern Bool XrmQGetSearchResource(
+ XrmSearchList /* list */,
+ XrmName /* name */,
+ XrmClass /* class */,
+ XrmRepresentation* /* type_return */,
+ XrmValue* /* value_return */
+);
+
+/****************************************************************
+ *
+ * Resource Database Management
+ *
+ ****************************************************************/
+
+#ifndef _XP_PRINT_SERVER_
+
+extern void XrmSetDatabase(
+ Display* /* display */,
+ XrmDatabase /* database */
+);
+
+extern XrmDatabase XrmGetDatabase(
+ Display* /* display */
+);
+
+#endif /* !_XP_PRINT_SERVER_ */
+
+extern XrmDatabase XrmGetFileDatabase(
+ _Xconst char* /* filename */
+);
+
+extern Status XrmCombineFileDatabase(
+ _Xconst char* /* filename */,
+ XrmDatabase* /* target */,
+ Bool /* override */
+);
+
+extern XrmDatabase XrmGetStringDatabase(
+ _Xconst char* /* data */ /* null terminated string */
+);
+
+extern void XrmPutFileDatabase(
+ XrmDatabase /* database */,
+ _Xconst char* /* filename */
+);
+
+extern void XrmMergeDatabases(
+ XrmDatabase /* source_db */,
+ XrmDatabase* /* target_db */
+);
+
+extern void XrmCombineDatabase(
+ XrmDatabase /* source_db */,
+ XrmDatabase* /* target_db */,
+ Bool /* override */
+);
+
+#define XrmEnumAllLevels 0
+#define XrmEnumOneLevel 1
+
+extern Bool XrmEnumerateDatabase(
+ XrmDatabase /* db */,
+ XrmNameList /* name_prefix */,
+ XrmClassList /* class_prefix */,
+ int /* mode */,
+ Bool (*)(
+ XrmDatabase* /* db */,
+ XrmBindingList /* bindings */,
+ XrmQuarkList /* quarks */,
+ XrmRepresentation* /* type */,
+ XrmValue* /* value */,
+ XPointer /* closure */
+ ) /* proc */,
+ XPointer /* closure */
+);
+
+extern const char *XrmLocaleOfDatabase(
+ XrmDatabase /* database */
+);
+
+
+/****************************************************************
+ *
+ * Command line option mapping to resource entries
+ *
+ ****************************************************************/
+
+typedef enum {
+ XrmoptionNoArg, /* Value is specified in OptionDescRec.value */
+ XrmoptionIsArg, /* Value is the option string itself */
+ XrmoptionStickyArg, /* Value is characters immediately following option */
+ XrmoptionSepArg, /* Value is next argument in argv */
+ XrmoptionResArg, /* Resource and value in next argument in argv */
+ XrmoptionSkipArg, /* Ignore this option and the next argument in argv */
+ XrmoptionSkipLine, /* Ignore this option and the rest of argv */
+ XrmoptionSkipNArgs /* Ignore this option and the next
+ OptionDescRes.value arguments in argv */
+} XrmOptionKind;
+
+typedef struct {
+ char *option; /* Option abbreviation in argv */
+ char *specifier; /* Resource specifier */
+ XrmOptionKind argKind; /* Which style of option it is */
+ XPointer value; /* Value to provide if XrmoptionNoArg */
+} XrmOptionDescRec, *XrmOptionDescList;
+
+
+extern void XrmParseCommand(
+ XrmDatabase* /* database */,
+ XrmOptionDescList /* table */,
+ int /* table_count */,
+ _Xconst char* /* name */,
+ int* /* argc_in_out */,
+ char** /* argv_in_out */
+);
+
+_XFUNCPROTOEND
+
+#endif /* _X11_XRESOURCE_H_ */
+/* DON'T ADD STUFF AFTER THIS #endif */
diff --git a/libX11/include/X11/Xutil.h b/libX11/include/X11/Xutil.h
index 8ff34d9f0..a97f489f1 100644
--- a/libX11/include/X11/Xutil.h
+++ b/libX11/include/X11/Xutil.h
@@ -1,826 +1,826 @@
-
-/***********************************************************
-
-Copyright 1987, 1998 The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Digital not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-******************************************************************/
-
-#ifndef _XUTIL_H_
-#define _XUTIL_H_
-
-/* You must include <X11/Xlib.h> before including this file */
-#include <X11/Xlib.h>
-#include <X11/keysym.h>
-
-/*
- * Bitmask returned by XParseGeometry(). Each bit tells if the corresponding
- * value (x, y, width, height) was found in the parsed string.
- */
-#define NoValue 0x0000
-#define XValue 0x0001
-#define YValue 0x0002
-#define WidthValue 0x0004
-#define HeightValue 0x0008
-#define AllValues 0x000F
-#define XNegative 0x0010
-#define YNegative 0x0020
-
-/*
- * new version containing base_width, base_height, and win_gravity fields;
- * used with WM_NORMAL_HINTS.
- */
-typedef struct {
- long flags; /* marks which fields in this structure are defined */
- int x, y; /* obsolete for new window mgrs, but clients */
- int width, height; /* should set so old wm's don't mess up */
- int min_width, min_height;
- int max_width, max_height;
- int width_inc, height_inc;
- struct {
- int x; /* numerator */
- int y; /* denominator */
- } min_aspect, max_aspect;
- int base_width, base_height; /* added by ICCCM version 1 */
- int win_gravity; /* added by ICCCM version 1 */
-} XSizeHints;
-
-/*
- * The next block of definitions are for window manager properties that
- * clients and applications use for communication.
- */
-
-/* flags argument in size hints */
-#define USPosition (1L << 0) /* user specified x, y */
-#define USSize (1L << 1) /* user specified width, height */
-
-#define PPosition (1L << 2) /* program specified position */
-#define PSize (1L << 3) /* program specified size */
-#define PMinSize (1L << 4) /* program specified minimum size */
-#define PMaxSize (1L << 5) /* program specified maximum size */
-#define PResizeInc (1L << 6) /* program specified resize increments */
-#define PAspect (1L << 7) /* program specified min and max aspect ratios */
-#define PBaseSize (1L << 8) /* program specified base for incrementing */
-#define PWinGravity (1L << 9) /* program specified window gravity */
-
-/* obsolete */
-#define PAllHints (PPosition|PSize|PMinSize|PMaxSize|PResizeInc|PAspect)
-
-
-
-typedef struct {
- long flags; /* marks which fields in this structure are defined */
- Bool input; /* does this application rely on the window manager to
- get keyboard input? */
- int initial_state; /* see below */
- Pixmap icon_pixmap; /* pixmap to be used as icon */
- Window icon_window; /* window to be used as icon */
- int icon_x, icon_y; /* initial position of icon */
- Pixmap icon_mask; /* icon mask bitmap */
- XID window_group; /* id of related window group */
- /* this structure may be extended in the future */
-} XWMHints;
-
-/* definition for flags of XWMHints */
-
-#define InputHint (1L << 0)
-#define StateHint (1L << 1)
-#define IconPixmapHint (1L << 2)
-#define IconWindowHint (1L << 3)
-#define IconPositionHint (1L << 4)
-#define IconMaskHint (1L << 5)
-#define WindowGroupHint (1L << 6)
-#define AllHints (InputHint|StateHint|IconPixmapHint|IconWindowHint| \
-IconPositionHint|IconMaskHint|WindowGroupHint)
-#define XUrgencyHint (1L << 8)
-
-/* definitions for initial window state */
-#define WithdrawnState 0 /* for windows that are not mapped */
-#define NormalState 1 /* most applications want to start this way */
-#define IconicState 3 /* application wants to start as an icon */
-
-/*
- * Obsolete states no longer defined by ICCCM
- */
-#define DontCareState 0 /* don't know or care */
-#define ZoomState 2 /* application wants to start zoomed */
-#define InactiveState 4 /* application believes it is seldom used; */
- /* some wm's may put it on inactive menu */
-
-
-/*
- * new structure for manipulating TEXT properties; used with WM_NAME,
- * WM_ICON_NAME, WM_CLIENT_MACHINE, and WM_COMMAND.
- */
-typedef struct {
- unsigned char *value; /* same as Property routines */
- Atom encoding; /* prop type */
- int format; /* prop data format: 8, 16, or 32 */
- unsigned long nitems; /* number of data items in value */
-} XTextProperty;
-
-#define XNoMemory -1
-#define XLocaleNotSupported -2
-#define XConverterNotFound -3
-
-typedef enum {
- XStringStyle, /* STRING */
- XCompoundTextStyle, /* COMPOUND_TEXT */
- XTextStyle, /* text in owner's encoding (current locale)*/
- XStdICCTextStyle, /* STRING, else COMPOUND_TEXT */
- /* The following is an XFree86 extension, introduced in November 2000 */
- XUTF8StringStyle /* UTF8_STRING */
-} XICCEncodingStyle;
-
-typedef struct {
- int min_width, min_height;
- int max_width, max_height;
- int width_inc, height_inc;
-} XIconSize;
-
-typedef struct {
- char *res_name;
- char *res_class;
-} XClassHint;
-
-#ifdef XUTIL_DEFINE_FUNCTIONS
-extern int XDestroyImage(
- XImage *ximage);
-extern unsigned long XGetPixel(
- XImage *ximage,
- int x, int y);
-extern int XPutPixel(
- XImage *ximage,
- int x, int y,
- unsigned long pixel);
-extern XImage *XSubImage(
- XImage *ximage,
- int x, int y,
- unsigned int width, unsigned int height);
-extern int XAddPixel(
- XImage *ximage,
- long value);
-#else
-/*
- * These macros are used to give some sugar to the image routines so that
- * naive people are more comfortable with them.
- */
-#define XDestroyImage(ximage) \
- ((*((ximage)->f.destroy_image))((ximage)))
-#define XGetPixel(ximage, x, y) \
- ((*((ximage)->f.get_pixel))((ximage), (x), (y)))
-#define XPutPixel(ximage, x, y, pixel) \
- ((*((ximage)->f.put_pixel))((ximage), (x), (y), (pixel)))
-#define XSubImage(ximage, x, y, width, height) \
- ((*((ximage)->f.sub_image))((ximage), (x), (y), (width), (height)))
-#define XAddPixel(ximage, value) \
- ((*((ximage)->f.add_pixel))((ximage), (value)))
-#endif
-
-/*
- * Compose sequence status structure, used in calling XLookupString.
- */
-typedef struct _XComposeStatus {
- XPointer compose_ptr; /* state table pointer */
- int chars_matched; /* match state */
-} XComposeStatus;
-
-/*
- * Keysym macros, used on Keysyms to test for classes of symbols
- */
-#define IsKeypadKey(keysym) \
- (((KeySym)(keysym) >= XK_KP_Space) && ((KeySym)(keysym) <= XK_KP_Equal))
-
-#define IsPrivateKeypadKey(keysym) \
- (((KeySym)(keysym) >= 0x11000000) && ((KeySym)(keysym) <= 0x1100FFFF))
-
-#define IsCursorKey(keysym) \
- (((KeySym)(keysym) >= XK_Home) && ((KeySym)(keysym) < XK_Select))
-
-#define IsPFKey(keysym) \
- (((KeySym)(keysym) >= XK_KP_F1) && ((KeySym)(keysym) <= XK_KP_F4))
-
-#define IsFunctionKey(keysym) \
- (((KeySym)(keysym) >= XK_F1) && ((KeySym)(keysym) <= XK_F35))
-
-#define IsMiscFunctionKey(keysym) \
- (((KeySym)(keysym) >= XK_Select) && ((KeySym)(keysym) <= XK_Break))
-
-#ifdef XK_XKB_KEYS
-#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))
-#else
-#define IsModifierKey(keysym) \
- ((((KeySym)(keysym) >= XK_Shift_L) && ((KeySym)(keysym) <= XK_Hyper_R)) \
- || ((KeySym)(keysym) == XK_Mode_switch) \
- || ((KeySym)(keysym) == XK_Num_Lock))
-#endif
-/*
- * opaque reference to Region data type
- */
-typedef struct _XRegion *Region;
-
-/* Return values from XRectInRegion() */
-
-#define RectangleOut 0
-#define RectangleIn 1
-#define RectanglePart 2
-
-
-/*
- * Information used by the visual utility routines to find desired visual
- * type from the many visuals a display may support.
- */
-
-typedef struct {
- Visual *visual;
- VisualID visualid;
- int screen;
- int depth;
-#if defined(__cplusplus) || defined(c_plusplus)
- int c_class; /* C++ */
-#else
- int class;
-#endif
- unsigned long red_mask;
- unsigned long green_mask;
- unsigned long blue_mask;
- int colormap_size;
- int bits_per_rgb;
-} XVisualInfo;
-
-#define VisualNoMask 0x0
-#define VisualIDMask 0x1
-#define VisualScreenMask 0x2
-#define VisualDepthMask 0x4
-#define VisualClassMask 0x8
-#define VisualRedMaskMask 0x10
-#define VisualGreenMaskMask 0x20
-#define VisualBlueMaskMask 0x40
-#define VisualColormapSizeMask 0x80
-#define VisualBitsPerRGBMask 0x100
-#define VisualAllMask 0x1FF
-
-/*
- * This defines a window manager property that clients may use to
- * share standard color maps of type RGB_COLOR_MAP:
- */
-typedef struct {
- Colormap colormap;
- unsigned long red_max;
- unsigned long red_mult;
- unsigned long green_max;
- unsigned long green_mult;
- unsigned long blue_max;
- unsigned long blue_mult;
- unsigned long base_pixel;
- VisualID visualid; /* added by ICCCM version 1 */
- XID killid; /* added by ICCCM version 1 */
-} XStandardColormap;
-
-#define ReleaseByFreeingColormap ((XID) 1L) /* for killid field above */
-
-
-/*
- * return codes for XReadBitmapFile and XWriteBitmapFile
- */
-#define BitmapSuccess 0
-#define BitmapOpenFailed 1
-#define BitmapFileInvalid 2
-#define BitmapNoMemory 3
-
-/****************************************************************
- *
- * Context Management
- *
- ****************************************************************/
-
-
-/* Associative lookup table return codes */
-
-#define XCSUCCESS 0 /* No error. */
-#define XCNOMEM 1 /* Out of memory */
-#define XCNOENT 2 /* No entry in table */
-
-typedef int XContext;
-
-#define XUniqueContext() ((XContext) XrmUniqueQuark())
-#define XStringToContext(string) ((XContext) XrmStringToQuark(string))
-
-_XFUNCPROTOBEGIN
-
-/* The following declarations are alphabetized. */
-
-extern XClassHint *XAllocClassHint (
- void
-);
-
-extern XIconSize *XAllocIconSize (
- void
-);
-
-extern XSizeHints *XAllocSizeHints (
- void
-);
-
-extern XStandardColormap *XAllocStandardColormap (
- void
-);
-
-extern XWMHints *XAllocWMHints (
- void
-);
-
-extern int XClipBox(
- Region /* r */,
- XRectangle* /* rect_return */
-);
-
-extern Region XCreateRegion(
- void
-);
-
-extern const char *XDefaultString (void);
-
-extern int XDeleteContext(
- Display* /* display */,
- XID /* rid */,
- XContext /* context */
-);
-
-extern int XDestroyRegion(
- Region /* r */
-);
-
-extern int XEmptyRegion(
- Region /* r */
-);
-
-extern int XEqualRegion(
- Region /* r1 */,
- Region /* r2 */
-);
-
-extern int XFindContext(
- Display* /* display */,
- XID /* rid */,
- XContext /* context */,
- XPointer* /* data_return */
-);
-
-extern Status XGetClassHint(
- Display* /* display */,
- Window /* w */,
- XClassHint* /* class_hints_return */
-);
-
-extern Status XGetIconSizes(
- Display* /* display */,
- Window /* w */,
- XIconSize** /* size_list_return */,
- int* /* count_return */
-);
-
-extern Status XGetNormalHints(
- Display* /* display */,
- Window /* w */,
- XSizeHints* /* hints_return */
-);
-
-extern Status XGetRGBColormaps(
- Display* /* display */,
- Window /* w */,
- XStandardColormap** /* stdcmap_return */,
- int* /* count_return */,
- Atom /* property */
-);
-
-extern Status XGetSizeHints(
- Display* /* display */,
- Window /* w */,
- XSizeHints* /* hints_return */,
- Atom /* property */
-);
-
-extern Status XGetStandardColormap(
- Display* /* display */,
- Window /* w */,
- XStandardColormap* /* colormap_return */,
- Atom /* property */
-);
-
-extern Status XGetTextProperty(
- Display* /* display */,
- Window /* window */,
- XTextProperty* /* text_prop_return */,
- Atom /* property */
-);
-
-extern XVisualInfo *XGetVisualInfo(
- Display* /* display */,
- long /* vinfo_mask */,
- XVisualInfo* /* vinfo_template */,
- int* /* nitems_return */
-);
-
-extern Status XGetWMClientMachine(
- Display* /* display */,
- Window /* w */,
- XTextProperty* /* text_prop_return */
-);
-
-extern XWMHints *XGetWMHints(
- Display* /* display */,
- Window /* w */
-);
-
-extern Status XGetWMIconName(
- Display* /* display */,
- Window /* w */,
- XTextProperty* /* text_prop_return */
-);
-
-extern Status XGetWMName(
- Display* /* display */,
- Window /* w */,
- XTextProperty* /* text_prop_return */
-);
-
-extern Status XGetWMNormalHints(
- Display* /* display */,
- Window /* w */,
- XSizeHints* /* hints_return */,
- long* /* supplied_return */
-);
-
-extern Status XGetWMSizeHints(
- Display* /* display */,
- Window /* w */,
- XSizeHints* /* hints_return */,
- long* /* supplied_return */,
- Atom /* property */
-);
-
-extern Status XGetZoomHints(
- Display* /* display */,
- Window /* w */,
- XSizeHints* /* zhints_return */
-);
-
-extern int XIntersectRegion(
- Region /* sra */,
- Region /* srb */,
- Region /* dr_return */
-);
-
-extern void XConvertCase(
- KeySym /* sym */,
- KeySym* /* lower */,
- KeySym* /* upper */
-);
-
-extern int XLookupString(
- XKeyEvent* /* event_struct */,
- char* /* buffer_return */,
- int /* bytes_buffer */,
- KeySym* /* keysym_return */,
- XComposeStatus* /* status_in_out */
-);
-
-extern Status XMatchVisualInfo(
- Display* /* display */,
- int /* screen */,
- int /* depth */,
- int /* class */,
- XVisualInfo* /* vinfo_return */
-);
-
-extern int XOffsetRegion(
- Region /* r */,
- int /* dx */,
- int /* dy */
-);
-
-extern Bool XPointInRegion(
- Region /* r */,
- int /* x */,
- int /* y */
-);
-
-extern Region XPolygonRegion(
- XPoint* /* points */,
- int /* n */,
- int /* fill_rule */
-);
-
-extern int XRectInRegion(
- Region /* r */,
- int /* x */,
- int /* y */,
- unsigned int /* width */,
- unsigned int /* height */
-);
-
-extern int XSaveContext(
- Display* /* display */,
- XID /* rid */,
- XContext /* context */,
- _Xconst char* /* data */
-);
-
-extern int XSetClassHint(
- Display* /* display */,
- Window /* w */,
- XClassHint* /* class_hints */
-);
-
-extern int XSetIconSizes(
- Display* /* display */,
- Window /* w */,
- XIconSize* /* size_list */,
- int /* count */
-);
-
-extern int XSetNormalHints(
- Display* /* display */,
- Window /* w */,
- XSizeHints* /* hints */
-);
-
-extern void XSetRGBColormaps(
- Display* /* display */,
- Window /* w */,
- XStandardColormap* /* stdcmaps */,
- int /* count */,
- Atom /* property */
-);
-
-extern int XSetSizeHints(
- Display* /* display */,
- Window /* w */,
- XSizeHints* /* hints */,
- Atom /* property */
-);
-
-extern int XSetStandardProperties(
- Display* /* display */,
- Window /* w */,
- _Xconst char* /* window_name */,
- _Xconst char* /* icon_name */,
- Pixmap /* icon_pixmap */,
- char** /* argv */,
- int /* argc */,
- XSizeHints* /* hints */
-);
-
-extern void XSetTextProperty(
- Display* /* display */,
- Window /* w */,
- XTextProperty* /* text_prop */,
- Atom /* property */
-);
-
-extern void XSetWMClientMachine(
- Display* /* display */,
- Window /* w */,
- XTextProperty* /* text_prop */
-);
-
-extern int XSetWMHints(
- Display* /* display */,
- Window /* w */,
- XWMHints* /* wm_hints */
-);
-
-extern void XSetWMIconName(
- Display* /* display */,
- Window /* w */,
- XTextProperty* /* text_prop */
-);
-
-extern void XSetWMName(
- Display* /* display */,
- Window /* w */,
- XTextProperty* /* text_prop */
-);
-
-extern void XSetWMNormalHints(
- Display* /* display */,
- Window /* w */,
- XSizeHints* /* hints */
-);
-
-extern void XSetWMProperties(
- Display* /* display */,
- Window /* w */,
- XTextProperty* /* window_name */,
- XTextProperty* /* icon_name */,
- char** /* argv */,
- int /* argc */,
- XSizeHints* /* normal_hints */,
- XWMHints* /* wm_hints */,
- XClassHint* /* class_hints */
-);
-
-extern void XmbSetWMProperties(
- 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 */
-);
-
-extern void Xutf8SetWMProperties(
- 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 */
-);
-
-extern void XSetWMSizeHints(
- Display* /* display */,
- Window /* w */,
- XSizeHints* /* hints */,
- Atom /* property */
-);
-
-extern int XSetRegion(
- Display* /* display */,
- GC /* gc */,
- Region /* r */
-);
-
-extern void XSetStandardColormap(
- Display* /* display */,
- Window /* w */,
- XStandardColormap* /* colormap */,
- Atom /* property */
-);
-
-extern int XSetZoomHints(
- Display* /* display */,
- Window /* w */,
- XSizeHints* /* zhints */
-);
-
-extern int XShrinkRegion(
- Region /* r */,
- int /* dx */,
- int /* dy */
-);
-
-extern Status XStringListToTextProperty(
- char** /* list */,
- int /* count */,
- XTextProperty* /* text_prop_return */
-);
-
-extern int XSubtractRegion(
- Region /* sra */,
- Region /* srb */,
- Region /* dr_return */
-);
-
-extern int XmbTextListToTextProperty(
- Display* display,
- char** list,
- int count,
- XICCEncodingStyle style,
- XTextProperty* text_prop_return
-);
-
-extern int XwcTextListToTextProperty(
- 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(
- wchar_t** list
-);
-
-extern Status XTextPropertyToStringList(
- XTextProperty* /* text_prop */,
- char*** /* list_return */,
- int* /* count_return */
-);
-
-extern int XmbTextPropertyToTextList(
- Display* display,
- const XTextProperty* text_prop,
- char*** list_return,
- int* count_return
-);
-
-extern int XwcTextPropertyToTextList(
- 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(
- XRectangle* /* rectangle */,
- Region /* src_region */,
- Region /* dest_region_return */
-);
-
-extern int XUnionRegion(
- Region /* sra */,
- Region /* srb */,
- Region /* dr_return */
-);
-
-extern int XWMGeometry(
- Display* /* display */,
- int /* screen_number */,
- _Xconst char* /* user_geometry */,
- _Xconst char* /* default_geometry */,
- unsigned int /* border_width */,
- XSizeHints* /* hints */,
- int* /* x_return */,
- int* /* y_return */,
- int* /* width_return */,
- int* /* height_return */,
- int* /* gravity_return */
-);
-
-extern int XXorRegion(
- Region /* sra */,
- Region /* srb */,
- Region /* dr_return */
-);
-
-_XFUNCPROTOEND
-
-#endif /* _XUTIL_H_ */
+
+/***********************************************************
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+
+Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of Digital not be
+used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+******************************************************************/
+
+#ifndef _X11_XUTIL_H_
+#define _X11_XUTIL_H_
+
+/* You must include <X11/Xlib.h> before including this file */
+#include <X11/Xlib.h>
+#include <X11/keysym.h>
+
+/*
+ * Bitmask returned by XParseGeometry(). Each bit tells if the corresponding
+ * value (x, y, width, height) was found in the parsed string.
+ */
+#define NoValue 0x0000
+#define XValue 0x0001
+#define YValue 0x0002
+#define WidthValue 0x0004
+#define HeightValue 0x0008
+#define AllValues 0x000F
+#define XNegative 0x0010
+#define YNegative 0x0020
+
+/*
+ * new version containing base_width, base_height, and win_gravity fields;
+ * used with WM_NORMAL_HINTS.
+ */
+typedef struct {
+ long flags; /* marks which fields in this structure are defined */
+ int x, y; /* obsolete for new window mgrs, but clients */
+ int width, height; /* should set so old wm's don't mess up */
+ int min_width, min_height;
+ int max_width, max_height;
+ int width_inc, height_inc;
+ struct {
+ int x; /* numerator */
+ int y; /* denominator */
+ } min_aspect, max_aspect;
+ int base_width, base_height; /* added by ICCCM version 1 */
+ int win_gravity; /* added by ICCCM version 1 */
+} XSizeHints;
+
+/*
+ * The next block of definitions are for window manager properties that
+ * clients and applications use for communication.
+ */
+
+/* flags argument in size hints */
+#define USPosition (1L << 0) /* user specified x, y */
+#define USSize (1L << 1) /* user specified width, height */
+
+#define PPosition (1L << 2) /* program specified position */
+#define PSize (1L << 3) /* program specified size */
+#define PMinSize (1L << 4) /* program specified minimum size */
+#define PMaxSize (1L << 5) /* program specified maximum size */
+#define PResizeInc (1L << 6) /* program specified resize increments */
+#define PAspect (1L << 7) /* program specified min and max aspect ratios */
+#define PBaseSize (1L << 8) /* program specified base for incrementing */
+#define PWinGravity (1L << 9) /* program specified window gravity */
+
+/* obsolete */
+#define PAllHints (PPosition|PSize|PMinSize|PMaxSize|PResizeInc|PAspect)
+
+
+
+typedef struct {
+ long flags; /* marks which fields in this structure are defined */
+ Bool input; /* does this application rely on the window manager to
+ get keyboard input? */
+ int initial_state; /* see below */
+ Pixmap icon_pixmap; /* pixmap to be used as icon */
+ Window icon_window; /* window to be used as icon */
+ int icon_x, icon_y; /* initial position of icon */
+ Pixmap icon_mask; /* icon mask bitmap */
+ XID window_group; /* id of related window group */
+ /* this structure may be extended in the future */
+} XWMHints;
+
+/* definition for flags of XWMHints */
+
+#define InputHint (1L << 0)
+#define StateHint (1L << 1)
+#define IconPixmapHint (1L << 2)
+#define IconWindowHint (1L << 3)
+#define IconPositionHint (1L << 4)
+#define IconMaskHint (1L << 5)
+#define WindowGroupHint (1L << 6)
+#define AllHints (InputHint|StateHint|IconPixmapHint|IconWindowHint| \
+IconPositionHint|IconMaskHint|WindowGroupHint)
+#define XUrgencyHint (1L << 8)
+
+/* definitions for initial window state */
+#define WithdrawnState 0 /* for windows that are not mapped */
+#define NormalState 1 /* most applications want to start this way */
+#define IconicState 3 /* application wants to start as an icon */
+
+/*
+ * Obsolete states no longer defined by ICCCM
+ */
+#define DontCareState 0 /* don't know or care */
+#define ZoomState 2 /* application wants to start zoomed */
+#define InactiveState 4 /* application believes it is seldom used; */
+ /* some wm's may put it on inactive menu */
+
+
+/*
+ * new structure for manipulating TEXT properties; used with WM_NAME,
+ * WM_ICON_NAME, WM_CLIENT_MACHINE, and WM_COMMAND.
+ */
+typedef struct {
+ unsigned char *value; /* same as Property routines */
+ Atom encoding; /* prop type */
+ int format; /* prop data format: 8, 16, or 32 */
+ unsigned long nitems; /* number of data items in value */
+} XTextProperty;
+
+#define XNoMemory -1
+#define XLocaleNotSupported -2
+#define XConverterNotFound -3
+
+typedef enum {
+ XStringStyle, /* STRING */
+ XCompoundTextStyle, /* COMPOUND_TEXT */
+ XTextStyle, /* text in owner's encoding (current locale)*/
+ XStdICCTextStyle, /* STRING, else COMPOUND_TEXT */
+ /* The following is an XFree86 extension, introduced in November 2000 */
+ XUTF8StringStyle /* UTF8_STRING */
+} XICCEncodingStyle;
+
+typedef struct {
+ int min_width, min_height;
+ int max_width, max_height;
+ int width_inc, height_inc;
+} XIconSize;
+
+typedef struct {
+ char *res_name;
+ char *res_class;
+} XClassHint;
+
+#ifdef XUTIL_DEFINE_FUNCTIONS
+extern int XDestroyImage(
+ XImage *ximage);
+extern unsigned long XGetPixel(
+ XImage *ximage,
+ int x, int y);
+extern int XPutPixel(
+ XImage *ximage,
+ int x, int y,
+ unsigned long pixel);
+extern XImage *XSubImage(
+ XImage *ximage,
+ int x, int y,
+ unsigned int width, unsigned int height);
+extern int XAddPixel(
+ XImage *ximage,
+ long value);
+#else
+/*
+ * These macros are used to give some sugar to the image routines so that
+ * naive people are more comfortable with them.
+ */
+#define XDestroyImage(ximage) \
+ ((*((ximage)->f.destroy_image))((ximage)))
+#define XGetPixel(ximage, x, y) \
+ ((*((ximage)->f.get_pixel))((ximage), (x), (y)))
+#define XPutPixel(ximage, x, y, pixel) \
+ ((*((ximage)->f.put_pixel))((ximage), (x), (y), (pixel)))
+#define XSubImage(ximage, x, y, width, height) \
+ ((*((ximage)->f.sub_image))((ximage), (x), (y), (width), (height)))
+#define XAddPixel(ximage, value) \
+ ((*((ximage)->f.add_pixel))((ximage), (value)))
+#endif
+
+/*
+ * Compose sequence status structure, used in calling XLookupString.
+ */
+typedef struct _XComposeStatus {
+ XPointer compose_ptr; /* state table pointer */
+ int chars_matched; /* match state */
+} XComposeStatus;
+
+/*
+ * Keysym macros, used on Keysyms to test for classes of symbols
+ */
+#define IsKeypadKey(keysym) \
+ (((KeySym)(keysym) >= XK_KP_Space) && ((KeySym)(keysym) <= XK_KP_Equal))
+
+#define IsPrivateKeypadKey(keysym) \
+ (((KeySym)(keysym) >= 0x11000000) && ((KeySym)(keysym) <= 0x1100FFFF))
+
+#define IsCursorKey(keysym) \
+ (((KeySym)(keysym) >= XK_Home) && ((KeySym)(keysym) < XK_Select))
+
+#define IsPFKey(keysym) \
+ (((KeySym)(keysym) >= XK_KP_F1) && ((KeySym)(keysym) <= XK_KP_F4))
+
+#define IsFunctionKey(keysym) \
+ (((KeySym)(keysym) >= XK_F1) && ((KeySym)(keysym) <= XK_F35))
+
+#define IsMiscFunctionKey(keysym) \
+ (((KeySym)(keysym) >= XK_Select) && ((KeySym)(keysym) <= XK_Break))
+
+#ifdef XK_XKB_KEYS
+#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))
+#else
+#define IsModifierKey(keysym) \
+ ((((KeySym)(keysym) >= XK_Shift_L) && ((KeySym)(keysym) <= XK_Hyper_R)) \
+ || ((KeySym)(keysym) == XK_Mode_switch) \
+ || ((KeySym)(keysym) == XK_Num_Lock))
+#endif
+/*
+ * opaque reference to Region data type
+ */
+typedef struct _XRegion *Region;
+
+/* Return values from XRectInRegion() */
+
+#define RectangleOut 0
+#define RectangleIn 1
+#define RectanglePart 2
+
+
+/*
+ * Information used by the visual utility routines to find desired visual
+ * type from the many visuals a display may support.
+ */
+
+typedef struct {
+ Visual *visual;
+ VisualID visualid;
+ int screen;
+ int depth;
+#if defined(__cplusplus) || defined(c_plusplus)
+ int c_class; /* C++ */
+#else
+ int class;
+#endif
+ unsigned long red_mask;
+ unsigned long green_mask;
+ unsigned long blue_mask;
+ int colormap_size;
+ int bits_per_rgb;
+} XVisualInfo;
+
+#define VisualNoMask 0x0
+#define VisualIDMask 0x1
+#define VisualScreenMask 0x2
+#define VisualDepthMask 0x4
+#define VisualClassMask 0x8
+#define VisualRedMaskMask 0x10
+#define VisualGreenMaskMask 0x20
+#define VisualBlueMaskMask 0x40
+#define VisualColormapSizeMask 0x80
+#define VisualBitsPerRGBMask 0x100
+#define VisualAllMask 0x1FF
+
+/*
+ * This defines a window manager property that clients may use to
+ * share standard color maps of type RGB_COLOR_MAP:
+ */
+typedef struct {
+ Colormap colormap;
+ unsigned long red_max;
+ unsigned long red_mult;
+ unsigned long green_max;
+ unsigned long green_mult;
+ unsigned long blue_max;
+ unsigned long blue_mult;
+ unsigned long base_pixel;
+ VisualID visualid; /* added by ICCCM version 1 */
+ XID killid; /* added by ICCCM version 1 */
+} XStandardColormap;
+
+#define ReleaseByFreeingColormap ((XID) 1L) /* for killid field above */
+
+
+/*
+ * return codes for XReadBitmapFile and XWriteBitmapFile
+ */
+#define BitmapSuccess 0
+#define BitmapOpenFailed 1
+#define BitmapFileInvalid 2
+#define BitmapNoMemory 3
+
+/****************************************************************
+ *
+ * Context Management
+ *
+ ****************************************************************/
+
+
+/* Associative lookup table return codes */
+
+#define XCSUCCESS 0 /* No error. */
+#define XCNOMEM 1 /* Out of memory */
+#define XCNOENT 2 /* No entry in table */
+
+typedef int XContext;
+
+#define XUniqueContext() ((XContext) XrmUniqueQuark())
+#define XStringToContext(string) ((XContext) XrmStringToQuark(string))
+
+_XFUNCPROTOBEGIN
+
+/* The following declarations are alphabetized. */
+
+extern XClassHint *XAllocClassHint (
+ void
+);
+
+extern XIconSize *XAllocIconSize (
+ void
+);
+
+extern XSizeHints *XAllocSizeHints (
+ void
+);
+
+extern XStandardColormap *XAllocStandardColormap (
+ void
+);
+
+extern XWMHints *XAllocWMHints (
+ void
+);
+
+extern int XClipBox(
+ Region /* r */,
+ XRectangle* /* rect_return */
+);
+
+extern Region XCreateRegion(
+ void
+);
+
+extern const char *XDefaultString (void);
+
+extern int XDeleteContext(
+ Display* /* display */,
+ XID /* rid */,
+ XContext /* context */
+);
+
+extern int XDestroyRegion(
+ Region /* r */
+);
+
+extern int XEmptyRegion(
+ Region /* r */
+);
+
+extern int XEqualRegion(
+ Region /* r1 */,
+ Region /* r2 */
+);
+
+extern int XFindContext(
+ Display* /* display */,
+ XID /* rid */,
+ XContext /* context */,
+ XPointer* /* data_return */
+);
+
+extern Status XGetClassHint(
+ Display* /* display */,
+ Window /* w */,
+ XClassHint* /* class_hints_return */
+);
+
+extern Status XGetIconSizes(
+ Display* /* display */,
+ Window /* w */,
+ XIconSize** /* size_list_return */,
+ int* /* count_return */
+);
+
+extern Status XGetNormalHints(
+ Display* /* display */,
+ Window /* w */,
+ XSizeHints* /* hints_return */
+);
+
+extern Status XGetRGBColormaps(
+ Display* /* display */,
+ Window /* w */,
+ XStandardColormap** /* stdcmap_return */,
+ int* /* count_return */,
+ Atom /* property */
+);
+
+extern Status XGetSizeHints(
+ Display* /* display */,
+ Window /* w */,
+ XSizeHints* /* hints_return */,
+ Atom /* property */
+);
+
+extern Status XGetStandardColormap(
+ Display* /* display */,
+ Window /* w */,
+ XStandardColormap* /* colormap_return */,
+ Atom /* property */
+);
+
+extern Status XGetTextProperty(
+ Display* /* display */,
+ Window /* window */,
+ XTextProperty* /* text_prop_return */,
+ Atom /* property */
+);
+
+extern XVisualInfo *XGetVisualInfo(
+ Display* /* display */,
+ long /* vinfo_mask */,
+ XVisualInfo* /* vinfo_template */,
+ int* /* nitems_return */
+);
+
+extern Status XGetWMClientMachine(
+ Display* /* display */,
+ Window /* w */,
+ XTextProperty* /* text_prop_return */
+);
+
+extern XWMHints *XGetWMHints(
+ Display* /* display */,
+ Window /* w */
+);
+
+extern Status XGetWMIconName(
+ Display* /* display */,
+ Window /* w */,
+ XTextProperty* /* text_prop_return */
+);
+
+extern Status XGetWMName(
+ Display* /* display */,
+ Window /* w */,
+ XTextProperty* /* text_prop_return */
+);
+
+extern Status XGetWMNormalHints(
+ Display* /* display */,
+ Window /* w */,
+ XSizeHints* /* hints_return */,
+ long* /* supplied_return */
+);
+
+extern Status XGetWMSizeHints(
+ Display* /* display */,
+ Window /* w */,
+ XSizeHints* /* hints_return */,
+ long* /* supplied_return */,
+ Atom /* property */
+);
+
+extern Status XGetZoomHints(
+ Display* /* display */,
+ Window /* w */,
+ XSizeHints* /* zhints_return */
+);
+
+extern int XIntersectRegion(
+ Region /* sra */,
+ Region /* srb */,
+ Region /* dr_return */
+);
+
+extern void XConvertCase(
+ KeySym /* sym */,
+ KeySym* /* lower */,
+ KeySym* /* upper */
+);
+
+extern int XLookupString(
+ XKeyEvent* /* event_struct */,
+ char* /* buffer_return */,
+ int /* bytes_buffer */,
+ KeySym* /* keysym_return */,
+ XComposeStatus* /* status_in_out */
+);
+
+extern Status XMatchVisualInfo(
+ Display* /* display */,
+ int /* screen */,
+ int /* depth */,
+ int /* class */,
+ XVisualInfo* /* vinfo_return */
+);
+
+extern int XOffsetRegion(
+ Region /* r */,
+ int /* dx */,
+ int /* dy */
+);
+
+extern Bool XPointInRegion(
+ Region /* r */,
+ int /* x */,
+ int /* y */
+);
+
+extern Region XPolygonRegion(
+ XPoint* /* points */,
+ int /* n */,
+ int /* fill_rule */
+);
+
+extern int XRectInRegion(
+ Region /* r */,
+ int /* x */,
+ int /* y */,
+ unsigned int /* width */,
+ unsigned int /* height */
+);
+
+extern int XSaveContext(
+ Display* /* display */,
+ XID /* rid */,
+ XContext /* context */,
+ _Xconst char* /* data */
+);
+
+extern int XSetClassHint(
+ Display* /* display */,
+ Window /* w */,
+ XClassHint* /* class_hints */
+);
+
+extern int XSetIconSizes(
+ Display* /* display */,
+ Window /* w */,
+ XIconSize* /* size_list */,
+ int /* count */
+);
+
+extern int XSetNormalHints(
+ Display* /* display */,
+ Window /* w */,
+ XSizeHints* /* hints */
+);
+
+extern void XSetRGBColormaps(
+ Display* /* display */,
+ Window /* w */,
+ XStandardColormap* /* stdcmaps */,
+ int /* count */,
+ Atom /* property */
+);
+
+extern int XSetSizeHints(
+ Display* /* display */,
+ Window /* w */,
+ XSizeHints* /* hints */,
+ Atom /* property */
+);
+
+extern int XSetStandardProperties(
+ Display* /* display */,
+ Window /* w */,
+ _Xconst char* /* window_name */,
+ _Xconst char* /* icon_name */,
+ Pixmap /* icon_pixmap */,
+ char** /* argv */,
+ int /* argc */,
+ XSizeHints* /* hints */
+);
+
+extern void XSetTextProperty(
+ Display* /* display */,
+ Window /* w */,
+ XTextProperty* /* text_prop */,
+ Atom /* property */
+);
+
+extern void XSetWMClientMachine(
+ Display* /* display */,
+ Window /* w */,
+ XTextProperty* /* text_prop */
+);
+
+extern int XSetWMHints(
+ Display* /* display */,
+ Window /* w */,
+ XWMHints* /* wm_hints */
+);
+
+extern void XSetWMIconName(
+ Display* /* display */,
+ Window /* w */,
+ XTextProperty* /* text_prop */
+);
+
+extern void XSetWMName(
+ Display* /* display */,
+ Window /* w */,
+ XTextProperty* /* text_prop */
+);
+
+extern void XSetWMNormalHints(
+ Display* /* display */,
+ Window /* w */,
+ XSizeHints* /* hints */
+);
+
+extern void XSetWMProperties(
+ Display* /* display */,
+ Window /* w */,
+ XTextProperty* /* window_name */,
+ XTextProperty* /* icon_name */,
+ char** /* argv */,
+ int /* argc */,
+ XSizeHints* /* normal_hints */,
+ XWMHints* /* wm_hints */,
+ XClassHint* /* class_hints */
+);
+
+extern void XmbSetWMProperties(
+ 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 */
+);
+
+extern void Xutf8SetWMProperties(
+ 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 */
+);
+
+extern void XSetWMSizeHints(
+ Display* /* display */,
+ Window /* w */,
+ XSizeHints* /* hints */,
+ Atom /* property */
+);
+
+extern int XSetRegion(
+ Display* /* display */,
+ GC /* gc */,
+ Region /* r */
+);
+
+extern void XSetStandardColormap(
+ Display* /* display */,
+ Window /* w */,
+ XStandardColormap* /* colormap */,
+ Atom /* property */
+);
+
+extern int XSetZoomHints(
+ Display* /* display */,
+ Window /* w */,
+ XSizeHints* /* zhints */
+);
+
+extern int XShrinkRegion(
+ Region /* r */,
+ int /* dx */,
+ int /* dy */
+);
+
+extern Status XStringListToTextProperty(
+ char** /* list */,
+ int /* count */,
+ XTextProperty* /* text_prop_return */
+);
+
+extern int XSubtractRegion(
+ Region /* sra */,
+ Region /* srb */,
+ Region /* dr_return */
+);
+
+extern int XmbTextListToTextProperty(
+ Display* display,
+ char** list,
+ int count,
+ XICCEncodingStyle style,
+ XTextProperty* text_prop_return
+);
+
+extern int XwcTextListToTextProperty(
+ 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(
+ wchar_t** list
+);
+
+extern Status XTextPropertyToStringList(
+ XTextProperty* /* text_prop */,
+ char*** /* list_return */,
+ int* /* count_return */
+);
+
+extern int XmbTextPropertyToTextList(
+ Display* display,
+ const XTextProperty* text_prop,
+ char*** list_return,
+ int* count_return
+);
+
+extern int XwcTextPropertyToTextList(
+ 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(
+ XRectangle* /* rectangle */,
+ Region /* src_region */,
+ Region /* dest_region_return */
+);
+
+extern int XUnionRegion(
+ Region /* sra */,
+ Region /* srb */,
+ Region /* dr_return */
+);
+
+extern int XWMGeometry(
+ Display* /* display */,
+ int /* screen_number */,
+ _Xconst char* /* user_geometry */,
+ _Xconst char* /* default_geometry */,
+ unsigned int /* border_width */,
+ XSizeHints* /* hints */,
+ int* /* x_return */,
+ int* /* y_return */,
+ int* /* width_return */,
+ int* /* height_return */,
+ int* /* gravity_return */
+);
+
+extern int XXorRegion(
+ Region /* sra */,
+ Region /* srb */,
+ Region /* dr_return */
+);
+
+_XFUNCPROTOEND
+
+#endif /* _X11_XUTIL_H_ */
diff --git a/libX11/include/X11/cursorfont.h b/libX11/include/X11/cursorfont.h
index 70d71259b..d6319b6fa 100644
--- a/libX11/include/X11/cursorfont.h
+++ b/libX11/include/X11/cursorfont.h
@@ -1,111 +1,111 @@
-/*
-
-Copyright 1987, 1998 The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall
-not be used in advertising or otherwise to promote the sale, use or
-other dealings in this Software without prior written authorization
-from The Open Group.
-
-*/
-
-#ifndef _cursorfont_h_
-#define _cursorfont_h_
-
-#define XC_num_glyphs 154
-#define XC_X_cursor 0
-#define XC_arrow 2
-#define XC_based_arrow_down 4
-#define XC_based_arrow_up 6
-#define XC_boat 8
-#define XC_bogosity 10
-#define XC_bottom_left_corner 12
-#define XC_bottom_right_corner 14
-#define XC_bottom_side 16
-#define XC_bottom_tee 18
-#define XC_box_spiral 20
-#define XC_center_ptr 22
-#define XC_circle 24
-#define XC_clock 26
-#define XC_coffee_mug 28
-#define XC_cross 30
-#define XC_cross_reverse 32
-#define XC_crosshair 34
-#define XC_diamond_cross 36
-#define XC_dot 38
-#define XC_dotbox 40
-#define XC_double_arrow 42
-#define XC_draft_large 44
-#define XC_draft_small 46
-#define XC_draped_box 48
-#define XC_exchange 50
-#define XC_fleur 52
-#define XC_gobbler 54
-#define XC_gumby 56
-#define XC_hand1 58
-#define XC_hand2 60
-#define XC_heart 62
-#define XC_icon 64
-#define XC_iron_cross 66
-#define XC_left_ptr 68
-#define XC_left_side 70
-#define XC_left_tee 72
-#define XC_leftbutton 74
-#define XC_ll_angle 76
-#define XC_lr_angle 78
-#define XC_man 80
-#define XC_middlebutton 82
-#define XC_mouse 84
-#define XC_pencil 86
-#define XC_pirate 88
-#define XC_plus 90
-#define XC_question_arrow 92
-#define XC_right_ptr 94
-#define XC_right_side 96
-#define XC_right_tee 98
-#define XC_rightbutton 100
-#define XC_rtl_logo 102
-#define XC_sailboat 104
-#define XC_sb_down_arrow 106
-#define XC_sb_h_double_arrow 108
-#define XC_sb_left_arrow 110
-#define XC_sb_right_arrow 112
-#define XC_sb_up_arrow 114
-#define XC_sb_v_double_arrow 116
-#define XC_shuttle 118
-#define XC_sizing 120
-#define XC_spider 122
-#define XC_spraycan 124
-#define XC_star 126
-#define XC_target 128
-#define XC_tcross 130
-#define XC_top_left_arrow 132
-#define XC_top_left_corner 134
-#define XC_top_right_corner 136
-#define XC_top_side 138
-#define XC_top_tee 140
-#define XC_trek 142
-#define XC_ul_angle 144
-#define XC_umbrella 146
-#define XC_ur_angle 148
-#define XC_watch 150
-#define XC_xterm 152
-
-#endif /* _cursorfont_h_ */
+/*
+
+Copyright 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from The Open Group.
+
+*/
+
+#ifndef _X11_CURSORFONT_H_
+#define _X11_CURSORFONT_H_
+
+#define XC_num_glyphs 154
+#define XC_X_cursor 0
+#define XC_arrow 2
+#define XC_based_arrow_down 4
+#define XC_based_arrow_up 6
+#define XC_boat 8
+#define XC_bogosity 10
+#define XC_bottom_left_corner 12
+#define XC_bottom_right_corner 14
+#define XC_bottom_side 16
+#define XC_bottom_tee 18
+#define XC_box_spiral 20
+#define XC_center_ptr 22
+#define XC_circle 24
+#define XC_clock 26
+#define XC_coffee_mug 28
+#define XC_cross 30
+#define XC_cross_reverse 32
+#define XC_crosshair 34
+#define XC_diamond_cross 36
+#define XC_dot 38
+#define XC_dotbox 40
+#define XC_double_arrow 42
+#define XC_draft_large 44
+#define XC_draft_small 46
+#define XC_draped_box 48
+#define XC_exchange 50
+#define XC_fleur 52
+#define XC_gobbler 54
+#define XC_gumby 56
+#define XC_hand1 58
+#define XC_hand2 60
+#define XC_heart 62
+#define XC_icon 64
+#define XC_iron_cross 66
+#define XC_left_ptr 68
+#define XC_left_side 70
+#define XC_left_tee 72
+#define XC_leftbutton 74
+#define XC_ll_angle 76
+#define XC_lr_angle 78
+#define XC_man 80
+#define XC_middlebutton 82
+#define XC_mouse 84
+#define XC_pencil 86
+#define XC_pirate 88
+#define XC_plus 90
+#define XC_question_arrow 92
+#define XC_right_ptr 94
+#define XC_right_side 96
+#define XC_right_tee 98
+#define XC_rightbutton 100
+#define XC_rtl_logo 102
+#define XC_sailboat 104
+#define XC_sb_down_arrow 106
+#define XC_sb_h_double_arrow 108
+#define XC_sb_left_arrow 110
+#define XC_sb_right_arrow 112
+#define XC_sb_up_arrow 114
+#define XC_sb_v_double_arrow 116
+#define XC_shuttle 118
+#define XC_sizing 120
+#define XC_spider 122
+#define XC_spraycan 124
+#define XC_star 126
+#define XC_target 128
+#define XC_tcross 130
+#define XC_top_left_arrow 132
+#define XC_top_left_corner 134
+#define XC_top_right_corner 136
+#define XC_top_side 138
+#define XC_top_tee 140
+#define XC_trek 142
+#define XC_ul_angle 144
+#define XC_umbrella 146
+#define XC_ur_angle 148
+#define XC_watch 150
+#define XC_xterm 152
+
+#endif /* _X11_CURSORFONT_H_ */