diff options
author | marha <marha@users.sourceforge.net> | 2012-11-19 10:16:38 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-11-19 10:16:38 +0100 |
commit | 3744281b9ae8aa0ab86ceaee1afe8a603e3aeb2c (patch) | |
tree | f59b9749730728729691a8a1efd54dce95f0177c /libX11/include | |
parent | 8d57b7fcb22cf1a52203ee57c745b64bba649249 (diff) | |
download | vcxsrv-3744281b9ae8aa0ab86ceaee1afe8a603e3aeb2c.tar.gz vcxsrv-3744281b9ae8aa0ab86ceaee1afe8a603e3aeb2c.tar.bz2 vcxsrv-3744281b9ae8aa0ab86ceaee1afe8a603e3aeb2c.zip |
dos -> unix
Diffstat (limited to 'libX11/include')
-rw-r--r-- | libX11/include/Makefile.am | 38 | ||||
-rw-r--r-- | libX11/include/X11/.gitignore | 4 | ||||
-rw-r--r-- | libX11/include/X11/ImUtil.h | 60 | ||||
-rw-r--r-- | libX11/include/X11/XKBlib.h | 2298 | ||||
-rw-r--r-- | libX11/include/X11/Xcms.h | 1606 | ||||
-rw-r--r-- | libX11/include/X11/Xlib-xcb.h | 40 | ||||
-rw-r--r-- | libX11/include/X11/XlibConf.h.in | 74 | ||||
-rw-r--r-- | libX11/include/X11/Xlocale.h | 118 | ||||
-rw-r--r-- | libX11/include/X11/Xregion.h | 378 | ||||
-rw-r--r-- | libX11/include/X11/Xresource.h | 716 | ||||
-rw-r--r-- | libX11/include/X11/cursorfont.h | 222 |
11 files changed, 2777 insertions, 2777 deletions
diff --git a/libX11/include/Makefile.am b/libX11/include/Makefile.am index bf8fcb954..067546cf0 100644 --- a/libX11/include/Makefile.am +++ b/libX11/include/Makefile.am @@ -1,19 +1,19 @@ -x11includedir=${includedir}/X11
-x11include_HEADERS=\
- X11/XKBlib.h \
- X11/Xcms.h \
- X11/Xlib.h \
- X11/Xlibint.h \
- X11/Xlocale.h \
- X11/Xresource.h \
- X11/Xutil.h \
- X11/cursorfont.h \
- X11/Xregion.h \
- X11/ImUtil.h \
- X11/Xlib-xcb.h
-
-nodist_x11include_HEADERS=\
- X11/XlibConf.h
-
-EXTRA_DIST = \
- X11/XlibConf.h.in
+x11includedir=${includedir}/X11 +x11include_HEADERS=\ + X11/XKBlib.h \ + X11/Xcms.h \ + X11/Xlib.h \ + X11/Xlibint.h \ + X11/Xlocale.h \ + X11/Xresource.h \ + X11/Xutil.h \ + X11/cursorfont.h \ + X11/Xregion.h \ + X11/ImUtil.h \ + X11/Xlib-xcb.h + +nodist_x11include_HEADERS=\ + X11/XlibConf.h + +EXTRA_DIST = \ + X11/XlibConf.h.in diff --git a/libX11/include/X11/.gitignore b/libX11/include/X11/.gitignore index 6a2c1215e..b43616ad7 100644 --- a/libX11/include/X11/.gitignore +++ b/libX11/include/X11/.gitignore @@ -1,2 +1,2 @@ -# Add & Override for this directory and it's subdirectories
-XlibConf.h
+# Add & Override for this directory and it's subdirectories +XlibConf.h diff --git a/libX11/include/X11/ImUtil.h b/libX11/include/X11/ImUtil.h index b7f425c93..ffdba1a93 100644 --- a/libX11/include/X11/ImUtil.h +++ b/libX11/include/X11/ImUtil.h @@ -1,30 +1,30 @@ -
-#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_ */
+ +#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 33a24c1b4..8f6c72c12 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 _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_ */
+/************************************************************ +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 327fdc1f7..8151fd1f3 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 _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_ */
+ +/* + * 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 a0339de12..a21e2bef0 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 _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_ */
+/* 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/XlibConf.h.in b/libX11/include/X11/XlibConf.h.in index 320350018..8f36ac1d9 100644 --- a/libX11/include/X11/XlibConf.h.in +++ b/libX11/include/X11/XlibConf.h.in @@ -1,37 +1,37 @@ -/*
- * Copyright © 2005 Keith Packard
- *
- * 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, and that the name of Keith Packard not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission. Keith Packard makes no
- * representations about the suitability of this software for any purpose. It
- * is provided "as is" without express or implied warranty.
- *
- * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL KEITH PACKARD 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 _XLIBCONF_H_
-#define _XLIBCONF_H_
-/*
- * This header file exports defines necessary to correctly
- * use Xlibint.h both inside Xlib and by external libraries
- * such as extensions.
- */
-
-/* Threading support? */
-#undef XTHREADS
-
-/* Use multi-threaded libc functions? */
-#undef XUSE_MTSAFE_API
-
-#endif /* _XLIBCONF_H_ */
+/* + * Copyright © 2005 Keith Packard + * + * 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, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD 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 _XLIBCONF_H_ +#define _XLIBCONF_H_ +/* + * This header file exports defines necessary to correctly + * use Xlibint.h both inside Xlib and by external libraries + * such as extensions. + */ + +/* Threading support? */ +#undef XTHREADS + +/* Use multi-threaded libc functions? */ +#undef XUSE_MTSAFE_API + +#endif /* _XLIBCONF_H_ */ diff --git a/libX11/include/X11/Xlocale.h b/libX11/include/X11/Xlocale.h index dfb004c32..98946e53a 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 _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_ */
+/* + +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 b441312dc..c25d70b41 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 _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_ */
+/************************************************************************ + +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 113f732a5..6dbb3ce46 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 _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 */
+ +/*********************************************************** + +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/cursorfont.h b/libX11/include/X11/cursorfont.h index d6319b6fa..c69d508f4 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 _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_ */
+/* + +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_ */ |