Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:14:32

0001 /************************************************************
0002 Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
0003 
0004 Permission to use, copy, modify, and distribute this
0005 software and its documentation for any purpose and without
0006 fee is hereby granted, provided that the above copyright
0007 notice appear in all copies and that both that copyright
0008 notice and this permission notice appear in supporting
0009 documentation, and that the name of Silicon Graphics not be
0010 used in advertising or publicity pertaining to distribution
0011 of the software without specific prior written permission.
0012 Silicon Graphics makes no representation about the suitability
0013 of this software for any purpose. It is provided "as is"
0014 without any express or implied warranty.
0015 
0016 SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
0017 SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
0018 AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
0019 GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
0020 DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
0021 DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
0022 OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION  WITH
0023 THE USE OR PERFORMANCE OF THIS SOFTWARE.
0024 
0025 ********************************************************/
0026 
0027 #ifndef _X11_XKBLIB_H_
0028 #define _X11_XKBLIB_H_
0029 
0030 #include <X11/Xlib.h>
0031 #include <X11/extensions/XKBstr.h>
0032 
0033 typedef struct _XkbAnyEvent {
0034     int         type;       /* XkbAnyEvent */
0035     unsigned long   serial;     /* # of last req processed by server */
0036     Bool        send_event; /* is this from a SendEvent request? */
0037     Display *   display;    /* Display the event was read from */
0038     Time        time;       /* milliseconds */
0039     int         xkb_type;   /* XKB event minor code */
0040     unsigned int    device;     /* device ID */
0041 } XkbAnyEvent;
0042 
0043 typedef struct _XkbNewKeyboardNotify {
0044     int         type;       /* XkbAnyEvent */
0045     unsigned long   serial;     /* of last req processed by server */
0046     Bool        send_event; /* is this from a SendEvent request? */
0047     Display *   display;    /* Display the event was read from */
0048     Time        time;       /* milliseconds */
0049     int         xkb_type;   /* XkbNewKeyboardNotify */
0050     int     device;     /* device ID */
0051     int     old_device; /* device ID of previous keyboard */
0052     int     min_key_code;   /* minimum key code */
0053     int     max_key_code;   /* maximum key code */
0054     int     old_min_key_code;/* min key code of previous kbd */
0055     int     old_max_key_code;/* max key code of previous kbd */
0056     unsigned int    changed;    /* changed aspects of the keyboard */
0057     char        req_major;  /* major and minor opcode of req */
0058     char        req_minor;  /* that caused change, if applicable */
0059 } XkbNewKeyboardNotifyEvent;
0060 
0061 typedef struct _XkbMapNotifyEvent {
0062     int         type;       /* XkbAnyEvent */
0063     unsigned long   serial;     /* of last req processed by server */
0064     Bool        send_event; /* is this from a SendEvent request */
0065     Display *   display;    /* Display the event was read from */
0066     Time        time;       /* milliseconds */
0067     int         xkb_type;   /* XkbMapNotify */
0068     int         device;     /* device ID */
0069     unsigned int    changed;    /* fields which have been changed */
0070     unsigned int    flags;      /* reserved */
0071     int         first_type; /* first changed key type */
0072     int         num_types;  /* number of changed key types */
0073     KeyCode     min_key_code;
0074     KeyCode     max_key_code;
0075     KeyCode     first_key_sym;
0076     KeyCode     first_key_act;
0077     KeyCode     first_key_behavior;
0078     KeyCode     first_key_explicit;
0079     KeyCode     first_modmap_key;
0080     KeyCode     first_vmodmap_key;
0081     int     num_key_syms;
0082     int     num_key_acts;
0083     int     num_key_behaviors;
0084     int     num_key_explicit;
0085     int         num_modmap_keys;
0086     int         num_vmodmap_keys;
0087     unsigned int    vmods;      /* mask of changed virtual mods */
0088 } XkbMapNotifyEvent;
0089 
0090 typedef struct _XkbStateNotifyEvent {
0091     int         type;       /* XkbAnyEvent */
0092     unsigned long   serial;     /* # of last req processed by server */
0093     Bool        send_event; /* is this from a SendEvent request? */
0094     Display *   display;    /* Display the event was read from */
0095     Time        time;       /* milliseconds */
0096     int         xkb_type;   /* XkbStateNotify */
0097     int         device;     /* device ID */
0098     unsigned int    changed;    /* mask of changed state components */
0099     int         group;      /* keyboard group */
0100     int         base_group; /* base keyboard group */
0101     int         latched_group;  /* latched keyboard group */
0102     int         locked_group;   /* locked keyboard group */
0103     unsigned int    mods;       /* modifier state */
0104     unsigned int    base_mods;  /* base modifier state */
0105     unsigned int    latched_mods;   /* latched modifiers */
0106     unsigned int    locked_mods;    /* locked modifiers */
0107     int         compat_state;   /* compatibility state */
0108     unsigned char   grab_mods;  /* mods used for grabs */
0109     unsigned char   compat_grab_mods;/* grab mods for non-XKB clients */
0110     unsigned char   lookup_mods;    /* mods sent to clients */
0111     unsigned char   compat_lookup_mods; /* mods sent to non-XKB clients */
0112     int         ptr_buttons;    /* pointer button state */
0113     KeyCode     keycode;    /* keycode that caused the change */
0114     char        event_type; /* KeyPress or KeyRelease */
0115     char        req_major;  /* Major opcode of request */
0116     char        req_minor;  /* Minor opcode of request */
0117 } XkbStateNotifyEvent;
0118 
0119 typedef struct _XkbControlsNotify {
0120     int         type;       /* XkbAnyEvent */
0121     unsigned long   serial;     /* of last req processed by server */
0122     Bool        send_event; /* is this from a SendEvent request? */
0123     Display *   display;    /* Display the event was read from */
0124     Time        time;       /* milliseconds */
0125     int         xkb_type;   /* XkbControlsNotify */
0126     int         device;     /* device ID */
0127     unsigned int    changed_ctrls;  /* controls with changed sub-values */
0128     unsigned int    enabled_ctrls;  /* controls currently enabled */
0129     unsigned int    enabled_ctrl_changes;/* controls just {en,dis}abled */
0130     int         num_groups; /* total groups on keyboard */
0131     KeyCode     keycode;    /* key that caused change or 0 */
0132     char        event_type; /* type of event that caused change */
0133     char        req_major;  /* if keycode==0, major and minor */
0134     char        req_minor;  /* opcode of req that caused change */
0135 } XkbControlsNotifyEvent;
0136 
0137 typedef struct _XkbIndicatorNotify {
0138     int         type;       /* XkbAnyEvent */
0139     unsigned long   serial;     /* of last req processed by server */
0140     Bool        send_event; /* is this from a SendEvent request? */
0141     Display *   display;    /* Display the event was read from */
0142     Time        time;       /* milliseconds */
0143     int         xkb_type;   /* XkbIndicatorNotify */
0144     int         device;     /* device ID */
0145     unsigned int    changed;    /* indicators with new state or map */
0146     unsigned int    state;      /* current state of all indicators */
0147 } XkbIndicatorNotifyEvent;
0148 
0149 typedef struct _XkbNamesNotify {
0150     int         type;       /* XkbAnyEvent */
0151     unsigned long   serial;     /* of last req processed by server */
0152     Bool        send_event; /* is this from a SendEvent request? */
0153     Display *   display;    /* Display the event was read from */
0154     Time        time;       /* milliseconds */
0155     int         xkb_type;   /* XkbNamesNotify */
0156     int     device;     /* device ID */
0157     unsigned int    changed;    /* names that have changed */
0158     int     first_type; /* first key type with new name */
0159     int     num_types;  /* number of key types with new names */
0160     int     first_lvl;  /* first key type new new level names */
0161     int     num_lvls;   /* # of key types w/new level names */
0162     int     num_aliases;    /* total number of key aliases*/
0163     int     num_radio_groups;/* total number of radio groups */
0164     unsigned int    changed_vmods;  /* virtual modifiers with new names */
0165     unsigned int    changed_groups; /* groups with new names */
0166     unsigned int    changed_indicators;/* indicators with new names */
0167     int     first_key;  /* first key with new name */
0168     int     num_keys;   /* number of keys with new names */
0169 } XkbNamesNotifyEvent;
0170 
0171 typedef struct _XkbCompatMapNotify {
0172     int         type;       /* XkbAnyEvent */
0173     unsigned long   serial;     /* of last req processed by server */
0174     Bool        send_event; /* is this from a SendEvent request? */
0175     Display *   display;    /* Display the event was read from */
0176     Time        time;       /* milliseconds */
0177     int         xkb_type;   /* XkbCompatMapNotify */
0178     int     device;     /* device ID */
0179     unsigned int    changed_groups; /* groups with new compat maps */
0180     int     first_si;   /* first new symbol interp */
0181     int     num_si;     /* number of new symbol interps */
0182     int     num_total_si;   /* total # of symbol interps */
0183 } XkbCompatMapNotifyEvent;
0184 
0185 typedef struct _XkbBellNotify {
0186     int         type;       /* XkbAnyEvent */
0187     unsigned long   serial;     /* of last req processed by server */
0188     Bool        send_event; /* is this from a SendEvent request? */
0189     Display *   display;    /* Display the event was read from */
0190     Time        time;       /* milliseconds */
0191     int         xkb_type;   /* XkbBellNotify */
0192     int     device;     /* device ID */
0193     int     percent;    /* requested volume as a % of maximum */
0194     int     pitch;      /* requested pitch in Hz */
0195     int     duration;   /* requested duration in useconds */
0196     int     bell_class; /* (input extension) feedback class */
0197     int     bell_id;    /* (input extension) ID of feedback */
0198     Atom        name;       /* "name" of requested bell */
0199     Window      window;     /* window associated with event */
0200     Bool        event_only; /* "event only" requested */
0201 } XkbBellNotifyEvent;
0202 
0203 typedef struct _XkbActionMessage {
0204     int         type;       /* XkbAnyEvent */
0205     unsigned long   serial;     /* of last req processed by server */
0206     Bool        send_event; /* is this from a SendEvent request? */
0207     Display *   display;    /* Display the event was read from */
0208     Time        time;       /* milliseconds */
0209     int         xkb_type;   /* XkbActionMessage */
0210     int     device;     /* device ID */
0211     KeyCode     keycode;    /* key that generated the event */
0212     Bool        press;      /* true if act caused by key press */
0213     Bool        key_event_follows;/* true if key event also generated */
0214     int     group;      /* effective group */
0215     unsigned int    mods;       /* effective mods */
0216     char        message[XkbActionMessageLength+1];
0217                     /* message -- leave space for NUL */
0218 } XkbActionMessageEvent;
0219 
0220 typedef struct _XkbAccessXNotify {
0221     int         type;       /* XkbAnyEvent */
0222     unsigned long   serial;     /* of last req processed by server */
0223     Bool        send_event; /* is this from a SendEvent request? */
0224     Display *   display;    /* Display the event was read from */
0225     Time        time;       /* milliseconds */
0226     int         xkb_type;   /* XkbAccessXNotify */
0227     int     device;     /* device ID */
0228     int     detail;     /* XkbAXN_* */
0229     int     keycode;    /* key of event */
0230     int     sk_delay;   /* current slow keys delay */
0231     int     debounce_delay; /* current debounce delay */
0232 } XkbAccessXNotifyEvent;
0233 
0234 typedef struct _XkbExtensionDeviceNotify {
0235     int         type;       /* XkbAnyEvent */
0236     unsigned long   serial;     /* of last req processed by server */
0237     Bool        send_event; /* is this from a SendEvent request? */
0238     Display *   display;    /* Display the event was read from */
0239     Time        time;       /* milliseconds */
0240     int         xkb_type;   /* XkbExtensionDeviceNotify */
0241     int     device;     /* device ID */
0242     unsigned int    reason;     /* reason for the event */
0243     unsigned int    supported;  /* mask of supported features */
0244     unsigned int    unsupported;    /* mask of unsupported features */
0245                     /* that some app tried to use */
0246     int     first_btn;  /* first button that changed */
0247     int     num_btns;   /* range of buttons changed */
0248     unsigned int    leds_defined;   /* indicators with names or maps */
0249     unsigned int    led_state;  /* current state of the indicators */
0250     int     led_class;  /* feedback class for led changes */
0251     int     led_id;     /* feedback id for led changes */
0252 } XkbExtensionDeviceNotifyEvent;
0253 
0254 typedef union _XkbEvent {
0255     int             type;
0256     XkbAnyEvent         any;
0257     XkbNewKeyboardNotifyEvent   new_kbd;
0258     XkbMapNotifyEvent       map;
0259     XkbStateNotifyEvent     state;
0260     XkbControlsNotifyEvent      ctrls;
0261     XkbIndicatorNotifyEvent     indicators;
0262     XkbNamesNotifyEvent     names;
0263     XkbCompatMapNotifyEvent     compat;
0264     XkbBellNotifyEvent      bell;
0265     XkbActionMessageEvent       message;
0266     XkbAccessXNotifyEvent       accessx;
0267     XkbExtensionDeviceNotifyEvent   device;
0268     XEvent              core;
0269 } XkbEvent;
0270 
0271 typedef struct  _XkbKbdDpyState XkbKbdDpyStateRec,*XkbKbdDpyStatePtr;
0272 
0273     /* XkbOpenDisplay error codes */
0274 #define XkbOD_Success       0
0275 #define XkbOD_BadLibraryVersion 1
0276 #define XkbOD_ConnectionRefused 2
0277 #define XkbOD_NonXkbServer  3
0278 #define XkbOD_BadServerVersion  4
0279 
0280     /* Values for XlibFlags */
0281 #define XkbLC_ForceLatin1Lookup     (1<<0)
0282 #define XkbLC_ConsumeLookupMods     (1<<1)
0283 #define XkbLC_AlwaysConsumeShiftAndLock (1<<2)
0284 #define XkbLC_IgnoreNewKeyboards    (1<<3)
0285 #define XkbLC_ControlFallback       (1<<4)
0286 #define XkbLC_ConsumeKeysOnComposeFail  (1<<29)
0287 #define XkbLC_ComposeLED        (1<<30)
0288 #define XkbLC_BeepOnComposeFail     (1<<31)
0289 
0290 #define XkbLC_AllComposeControls    (0xc0000000)
0291 #define XkbLC_AllControls       (0xc000001f)
0292 
0293 _XFUNCPROTOBEGIN
0294 
0295 extern  Bool    XkbIgnoreExtension(
0296     Bool            /* ignore */
0297 );
0298 
0299 extern  Display *XkbOpenDisplay(
0300     _Xconst char *      /* name */,
0301     int *           /* ev_rtrn */,
0302     int *           /* err_rtrn */,
0303     int *           /* major_rtrn */,
0304     int *           /* minor_rtrn */,
0305     int *           /* reason */
0306 );
0307 
0308 extern  Bool    XkbQueryExtension(
0309     Display *       /* dpy */,
0310     int *           /* opcodeReturn */,
0311     int *           /* eventBaseReturn */,
0312     int *           /* errorBaseReturn */,
0313     int *           /* majorRtrn */,
0314     int *           /* minorRtrn */
0315 );
0316 
0317 extern  Bool    XkbUseExtension(
0318     Display *       /* dpy */,
0319     int *           /* major_rtrn */,
0320     int *           /* minor_rtrn */
0321 );
0322 
0323 extern  Bool    XkbLibraryVersion(
0324     int *           /* libMajorRtrn */,
0325     int *           /* libMinorRtrn */
0326 );
0327 
0328 extern  unsigned int    XkbSetXlibControls(
0329     Display*        /* dpy */,
0330     unsigned int        /* affect */,
0331     unsigned int        /* values */
0332 );
0333 
0334 extern  unsigned int    XkbGetXlibControls(
0335     Display*        /* dpy */
0336 );
0337 
0338 extern  unsigned int    XkbXlibControlsImplemented(void);
0339 
0340 typedef Atom    (*XkbInternAtomFunc)(
0341     Display *       /* dpy */,
0342     _Xconst char *      /* name */,
0343     Bool            /* only_if_exists */
0344 );
0345 
0346 typedef char *  (*XkbGetAtomNameFunc)(
0347     Display *       /* dpy */,
0348     Atom            /* atom */
0349 );
0350 
0351 extern void     XkbSetAtomFuncs(
0352     XkbInternAtomFunc   /* getAtom */,
0353     XkbGetAtomNameFunc  /* getName */
0354 );
0355 
0356 extern  KeySym XkbKeycodeToKeysym(
0357         Display *   /* dpy */,
0358 #if NeedWidePrototypes
0359          unsigned int   /* kc */,
0360 #else
0361          KeyCode    /* kc */,
0362 #endif
0363          int        /* group */,
0364          int        /* level */
0365 );
0366 
0367 extern  unsigned int    XkbKeysymToModifiers(
0368     Display *           /* dpy */,
0369     KeySym          /* ks */
0370 );
0371 
0372 extern  Bool        XkbLookupKeySym(
0373     Display *           /* dpy */,
0374     KeyCode             /* keycode */,
0375     unsigned int        /* modifiers */,
0376     unsigned int *      /* modifiers_return */,
0377     KeySym *            /* keysym_return */
0378 );
0379 
0380 extern  int     XkbLookupKeyBinding(
0381     Display *           /* dpy */,
0382     KeySym          /* sym_rtrn */,
0383     unsigned int        /* mods */,
0384     char *          /* buffer */,
0385     int             /* nbytes */,
0386     int *           /* extra_rtrn */
0387 );
0388 
0389 extern  Bool        XkbTranslateKeyCode(
0390     XkbDescPtr          /* xkb */,
0391     KeyCode             /* keycode */,
0392     unsigned int        /* modifiers */,
0393     unsigned int *      /* modifiers_return */,
0394     KeySym *            /* keysym_return */
0395 );
0396 
0397 extern  int     XkbTranslateKeySym(
0398     Display *           /* dpy */,
0399     KeySym *            /* sym_return */,
0400     unsigned int        /* modifiers */,
0401     char *          /* buffer */,
0402     int             /* nbytes */,
0403     int *           /* extra_rtrn */
0404 );
0405 
0406 extern  Bool    XkbSetAutoRepeatRate(
0407     Display *       /* dpy */,
0408     unsigned int        /* deviceSpec */,
0409     unsigned int        /* delay */,
0410     unsigned int        /* interval */
0411 );
0412 
0413 extern  Bool    XkbGetAutoRepeatRate(
0414     Display *       /* dpy */,
0415     unsigned int        /* deviceSpec */,
0416     unsigned int *      /* delayRtrn */,
0417     unsigned int *      /* intervalRtrn */
0418 );
0419 
0420 extern  Bool    XkbChangeEnabledControls(
0421     Display *       /* dpy */,
0422     unsigned int        /* deviceSpec */,
0423     unsigned int        /* affect */,
0424     unsigned int        /* values */
0425 );
0426 
0427 extern  Bool    XkbDeviceBell(
0428     Display *       /* dpy */,
0429     Window          /* win */,
0430     int         /* deviceSpec */,
0431     int         /* bellClass */,
0432     int         /* bellID */,
0433     int         /* percent */,
0434     Atom            /* name */
0435 );
0436 
0437 extern  Bool    XkbForceDeviceBell(
0438     Display *       /* dpy */,
0439     int         /* deviceSpec */,
0440     int         /* bellClass */,
0441     int         /* bellID */,
0442     int         /* percent */
0443 );
0444 
0445 extern  Bool    XkbDeviceBellEvent(
0446     Display *       /* dpy */,
0447     Window          /* win */,
0448     int         /* deviceSpec */,
0449     int         /* bellClass */,
0450     int         /* bellID */,
0451     int         /* percent */,
0452     Atom            /* name */
0453 );
0454 
0455 extern  Bool    XkbBell(
0456     Display *       /* dpy */,
0457     Window          /* win */,
0458     int         /* percent */,
0459     Atom            /* name */
0460 );
0461 
0462 extern  Bool    XkbForceBell(
0463     Display *       /* dpy */,
0464     int         /* percent */
0465 );
0466 
0467 extern  Bool    XkbBellEvent(
0468     Display *       /* dpy */,
0469     Window          /* win */,
0470     int         /* percent */,
0471     Atom            /* name */
0472 );
0473 
0474 extern  Bool    XkbSelectEvents(
0475     Display *       /* dpy */,
0476     unsigned int        /* deviceID */,
0477     unsigned int        /* affect */,
0478     unsigned int        /* values */
0479 );
0480 
0481 extern  Bool    XkbSelectEventDetails(
0482     Display *       /* dpy */,
0483     unsigned int        /* deviceID */,
0484     unsigned int        /* eventType */,
0485     unsigned long       /* affect */,
0486     unsigned long       /* details */
0487 );
0488 
0489 extern  void    XkbNoteMapChanges(
0490     XkbMapChangesPtr        /* old */,
0491     XkbMapNotifyEvent   *   /* new */,
0492     unsigned int        /* wanted */
0493 );
0494 
0495 extern  void    XkbNoteNameChanges(
0496     XkbNameChangesPtr       /* old */,
0497     XkbNamesNotifyEvent *   /* new */,
0498     unsigned int        /* wanted */
0499 );
0500 
0501 extern  Status  XkbGetIndicatorState(
0502     Display *       /* dpy */,
0503     unsigned int        /* deviceSpec */,
0504     unsigned int *      /* pStateRtrn */
0505 );
0506 
0507 extern  Status  XkbGetDeviceIndicatorState(
0508     Display *       /* dpy */,
0509     unsigned int        /* deviceSpec */,
0510     unsigned int        /* ledClass */,
0511     unsigned int        /* ledID */,
0512     unsigned int *      /* pStateRtrn */
0513 );
0514 
0515 extern  Status   XkbGetIndicatorMap(
0516     Display *       /* dpy */,
0517     unsigned long       /* which */,
0518     XkbDescPtr      /* desc */
0519 );
0520 
0521 extern  Bool     XkbSetIndicatorMap(
0522     Display *       /* dpy */,
0523     unsigned long       /* which */,
0524     XkbDescPtr      /* desc */
0525 );
0526 
0527 #define XkbNoteIndicatorMapChanges(o,n,w) \
0528                 ((o)->map_changes|=((n)->map_changes&(w)))
0529 #define XkbNoteIndicatorStateChanges(o,n,w)\
0530                 ((o)->state_changes|=((n)->state_changes&(w)))
0531 #define XkbGetIndicatorMapChanges(d,x,c) \
0532                 (XkbGetIndicatorMap((d),(c)->map_changes,x))
0533 #define XkbChangeIndicatorMaps(d,x,c) \
0534                 (XkbSetIndicatorMap((d),(c)->map_changes,x))
0535 
0536 extern  Bool    XkbGetNamedIndicator(
0537     Display *       /* dpy */,
0538     Atom            /* name */,
0539     int *           /* pNdxRtrn */,
0540     Bool *          /* pStateRtrn */,
0541     XkbIndicatorMapPtr  /* pMapRtrn */,
0542     Bool *          /* pRealRtrn */
0543 );
0544 
0545 extern  Bool    XkbGetNamedDeviceIndicator(
0546     Display *       /* dpy */,
0547     unsigned int        /* deviceSpec */,
0548     unsigned int        /* ledClass */,
0549     unsigned int        /* ledID */,
0550     Atom            /* name */,
0551     int *           /* pNdxRtrn */,
0552     Bool *          /* pStateRtrn */,
0553     XkbIndicatorMapPtr  /* pMapRtrn */,
0554     Bool *          /* pRealRtrn */
0555 );
0556 
0557 extern  Bool    XkbSetNamedIndicator(
0558     Display *       /* dpy */,
0559     Atom            /* name */,
0560     Bool            /* changeState */,
0561     Bool            /* state */,
0562     Bool            /* createNewMap */,
0563     XkbIndicatorMapPtr  /* pMap */
0564 );
0565 
0566 extern  Bool    XkbSetNamedDeviceIndicator(
0567     Display *       /* dpy */,
0568     unsigned int        /* deviceSpec */,
0569     unsigned int        /* ledClass */,
0570     unsigned int        /* ledID */,
0571     Atom            /* name */,
0572     Bool            /* changeState */,
0573     Bool            /* state */,
0574     Bool            /* createNewMap */,
0575     XkbIndicatorMapPtr  /* pMap */
0576 );
0577 
0578 extern  Bool    XkbLockModifiers(
0579     Display *       /* dpy */,
0580     unsigned int        /* deviceSpec */,
0581     unsigned int        /* affect */,
0582     unsigned int        /* values */
0583 );
0584 
0585 extern  Bool    XkbLatchModifiers(
0586     Display *       /* dpy */,
0587     unsigned int        /* deviceSpec */,
0588     unsigned int        /* affect */,
0589     unsigned int        /* values */
0590 );
0591 
0592 extern  Bool    XkbLockGroup(
0593     Display *       /* dpy */,
0594     unsigned int        /* deviceSpec */,
0595     unsigned int        /* group */
0596 );
0597 
0598 extern  Bool    XkbLatchGroup(
0599     Display *       /* dpy */,
0600     unsigned int        /* deviceSpec */,
0601     unsigned int        /* group */
0602 );
0603 
0604 extern  Bool    XkbSetServerInternalMods(
0605     Display *       /* dpy */,
0606     unsigned int        /* deviceSpec */,
0607     unsigned int        /* affectReal */,
0608     unsigned int        /* realValues */,
0609     unsigned int        /* affectVirtual */,
0610     unsigned int        /* virtualValues */
0611 );
0612 
0613 extern  Bool    XkbSetIgnoreLockMods(
0614     Display *       /* dpy */,
0615     unsigned int        /* deviceSpec */,
0616     unsigned int        /* affectReal */,
0617     unsigned int        /* realValues */,
0618     unsigned int        /* affectVirtual */,
0619     unsigned int        /* virtualValues */
0620 );
0621 
0622 
0623 extern  Bool    XkbVirtualModsToReal(
0624     XkbDescPtr      /* xkb */,
0625     unsigned int        /* virtual_mask */,
0626     unsigned int *      /* mask_rtrn */
0627 );
0628 
0629 extern  Bool    XkbComputeEffectiveMap(
0630     XkbDescPtr      /* xkb */,
0631     XkbKeyTypePtr       /* type */,
0632     unsigned char *     /* map_rtrn */
0633 );
0634 
0635 extern  Status XkbInitCanonicalKeyTypes(
0636     XkbDescPtr          /* xkb */,
0637     unsigned int        /* which */,
0638     int             /* keypadVMod */
0639 );
0640 
0641 extern  XkbDescPtr XkbAllocKeyboard(
0642     void
0643 );
0644 
0645 extern  void    XkbFreeKeyboard(
0646     XkbDescPtr      /* xkb */,
0647     unsigned int        /* which */,
0648     Bool            /* freeDesc */
0649 );
0650 
0651 extern  Status XkbAllocClientMap(
0652     XkbDescPtr      /* xkb */,
0653     unsigned int        /* which */,
0654     unsigned int        /* nTypes */
0655 );
0656 
0657 extern  Status XkbAllocServerMap(
0658     XkbDescPtr      /* xkb */,
0659     unsigned int        /* which */,
0660     unsigned int        /* nActions */
0661 );
0662 
0663 extern  void    XkbFreeClientMap(
0664     XkbDescPtr          /* xkb */,
0665     unsigned int        /* what */,
0666     Bool            /* freeMap */
0667 );
0668 
0669 extern  void    XkbFreeServerMap(
0670     XkbDescPtr          /* xkb */,
0671     unsigned int        /* what */,
0672     Bool            /* freeMap */
0673 );
0674 
0675 extern  XkbKeyTypePtr   XkbAddKeyType(
0676     XkbDescPtr          /* xkb */,
0677     Atom            /* name */,
0678     int             /* map_count */,
0679     Bool            /* want_preserve */,
0680     int             /* num_lvls */
0681 );
0682 
0683 extern  Status XkbAllocIndicatorMaps(
0684     XkbDescPtr      /* xkb */
0685 );
0686 
0687 extern  void XkbFreeIndicatorMaps(
0688     XkbDescPtr          /* xkb */
0689 );
0690 
0691 extern  XkbDescPtr XkbGetMap(
0692     Display *       /* dpy */,
0693     unsigned int        /* which */,
0694     unsigned int        /* deviceSpec */
0695 );
0696 
0697 extern  Status  XkbGetUpdatedMap(
0698     Display *       /* dpy */,
0699     unsigned int        /* which */,
0700     XkbDescPtr      /* desc */
0701 );
0702 
0703 extern  Status  XkbGetMapChanges(
0704     Display *           /* dpy */,
0705     XkbDescPtr          /* xkb */,
0706     XkbMapChangesPtr        /* changes */
0707 );
0708 
0709 
0710 extern  Status  XkbRefreshKeyboardMapping(
0711     XkbMapNotifyEvent *     /* event */
0712 );
0713 
0714 extern  Status  XkbGetKeyTypes(
0715     Display *           /* dpy */,
0716     unsigned int        /* first */,
0717     unsigned int        /* num */,
0718     XkbDescPtr          /* xkb */
0719 );
0720 
0721 extern  Status  XkbGetKeySyms(
0722     Display *           /* dpy */,
0723     unsigned int        /* first */,
0724     unsigned int        /* num */,
0725     XkbDescPtr          /* xkb */
0726 );
0727 
0728 extern  Status  XkbGetKeyActions(
0729     Display *           /* dpy */,
0730     unsigned int        /* first */,
0731     unsigned int        /* num */,
0732     XkbDescPtr          /* xkb */
0733 );
0734 
0735 extern  Status  XkbGetKeyBehaviors(
0736     Display *       /* dpy */,
0737     unsigned int        /* firstKey */,
0738     unsigned int        /* nKeys */,
0739     XkbDescPtr      /* desc */
0740 );
0741 
0742 extern  Status  XkbGetVirtualMods(
0743     Display *       /* dpy */,
0744     unsigned int        /* which */,
0745     XkbDescPtr      /* desc */
0746 );
0747 
0748 extern  Status  XkbGetKeyExplicitComponents(
0749     Display *       /* dpy */,
0750     unsigned int        /* firstKey */,
0751     unsigned int        /* nKeys */,
0752     XkbDescPtr      /* desc */
0753 );
0754 
0755 extern  Status  XkbGetKeyModifierMap(
0756     Display *       /* dpy */,
0757     unsigned int        /* firstKey */,
0758     unsigned int        /* nKeys */,
0759     XkbDescPtr      /* desc */
0760 );
0761 
0762 extern  Status  XkbGetKeyVirtualModMap(
0763     Display *       /* dpy */,
0764     unsigned int        /* first */,
0765     unsigned int        /* num */,
0766     XkbDescPtr      /* xkb */
0767 );
0768 
0769 extern  Status  XkbAllocControls(
0770     XkbDescPtr      /* xkb */,
0771     unsigned int        /* which*/
0772 );
0773 
0774 extern  void    XkbFreeControls(
0775     XkbDescPtr      /* xkb */,
0776     unsigned int        /* which */,
0777     Bool            /* freeMap */
0778 );
0779 
0780 extern  Status  XkbGetControls(
0781     Display *       /* dpy */,
0782     unsigned long       /* which */,
0783     XkbDescPtr      /* desc */
0784 );
0785 
0786 extern  Bool    XkbSetControls(
0787     Display *       /* dpy */,
0788     unsigned long       /* which */,
0789     XkbDescPtr      /* desc */
0790 );
0791 
0792 extern  void    XkbNoteControlsChanges(
0793     XkbControlsChangesPtr   /* old */,
0794     XkbControlsNotifyEvent *    /* new */,
0795     unsigned int        /* wanted */
0796 );
0797 
0798 #define XkbGetControlsChanges(d,x,c)    XkbGetControls(d,(c)->changed_ctrls,x)
0799 #define XkbChangeControls(d,x,c)    XkbSetControls(d,(c)->changed_ctrls,x)
0800 
0801 extern  Status  XkbAllocCompatMap(
0802     XkbDescPtr          /* xkb */,
0803     unsigned int        /* which */,
0804     unsigned int        /* nInterpret */
0805 );
0806 
0807 extern  void    XkbFreeCompatMap(
0808     XkbDescPtr          /* xkb */,
0809     unsigned int        /* which */,
0810     Bool            /* freeMap */
0811 );
0812 
0813 extern Status XkbGetCompatMap(
0814     Display *       /* dpy */,
0815     unsigned int        /* which */,
0816     XkbDescPtr      /* xkb */
0817 );
0818 
0819 extern Bool XkbSetCompatMap(
0820     Display *       /* dpy */,
0821     unsigned int        /* which */,
0822     XkbDescPtr      /* xkb */,
0823     Bool            /* updateActions */
0824 );
0825 
0826 extern  XkbSymInterpretPtr XkbAddSymInterpret(
0827     XkbDescPtr      /* xkb */,
0828     XkbSymInterpretPtr  /* si */,
0829     Bool            /* updateMap */,
0830     XkbChangesPtr       /* changes */
0831 );
0832 
0833 extern  Status XkbAllocNames(
0834     XkbDescPtr      /* xkb */,
0835     unsigned int        /* which */,
0836     int         /* nTotalRG */,
0837     int         /* nTotalAliases */
0838 );
0839 
0840 extern  Status  XkbGetNames(
0841     Display *       /* dpy */,
0842     unsigned int        /* which */,
0843     XkbDescPtr      /* desc */
0844 );
0845 
0846 extern  Bool    XkbSetNames(
0847     Display *       /* dpy */,
0848     unsigned int        /* which */,
0849     unsigned int        /* firstType */,
0850     unsigned int        /* nTypes */,
0851     XkbDescPtr      /* desc */
0852 );
0853 
0854 extern  Bool    XkbChangeNames(
0855     Display *       /* dpy */,
0856     XkbDescPtr      /* xkb */,
0857     XkbNameChangesPtr   /* changes */
0858 );
0859 
0860 extern  void XkbFreeNames(
0861     XkbDescPtr      /* xkb */,
0862     unsigned int        /* which */,
0863     Bool            /* freeMap */
0864 );
0865 
0866 
0867 extern  Status  XkbGetState(
0868     Display *       /* dpy */,
0869     unsigned int        /* deviceSpec */,
0870     XkbStatePtr     /* rtrnState */
0871 );
0872 
0873 extern  Bool    XkbSetMap(
0874     Display *       /* dpy */,
0875     unsigned int        /* which */,
0876     XkbDescPtr      /* desc */
0877 );
0878 
0879 extern  Bool    XkbChangeMap(
0880     Display*        /* dpy */,
0881     XkbDescPtr      /* desc */,
0882     XkbMapChangesPtr    /* changes */
0883 );
0884 
0885 extern  Bool    XkbSetDetectableAutoRepeat(
0886     Display *       /* dpy */,
0887     Bool            /* detectable */,
0888     Bool *          /* supported */
0889 );
0890 
0891 extern  Bool    XkbGetDetectableAutoRepeat(
0892     Display *       /* dpy */,
0893     Bool *          /* supported */
0894 );
0895 
0896 extern  Bool    XkbSetAutoResetControls(
0897     Display *           /* dpy */,
0898     unsigned int        /* changes */,
0899     unsigned int *      /* auto_ctrls */,
0900     unsigned int *      /* auto_values */
0901 );
0902 
0903 extern  Bool    XkbGetAutoResetControls(
0904     Display *           /* dpy */,
0905     unsigned int *      /* auto_ctrls */,
0906     unsigned int *      /* auto_ctrl_values */
0907 );
0908 
0909 extern  Bool    XkbSetPerClientControls(
0910     Display *           /* dpy */,
0911     unsigned int        /* change */,
0912     unsigned int *      /* values */
0913 );
0914 
0915 extern  Bool    XkbGetPerClientControls(
0916     Display *           /* dpy */,
0917     unsigned int *      /* ctrls */
0918 );
0919 
0920 extern Status XkbCopyKeyType(
0921     XkbKeyTypePtr   /* from */,
0922     XkbKeyTypePtr   /* into */
0923 );
0924 
0925 extern Status XkbCopyKeyTypes(
0926     XkbKeyTypePtr   /* from */,
0927     XkbKeyTypePtr   /* into */,
0928     int         /* num_types */
0929 );
0930 
0931 extern  Status  XkbResizeKeyType(
0932     XkbDescPtr      /* xkb */,
0933     int         /* type_ndx */,
0934     int         /* map_count */,
0935     Bool        /* want_preserve */,
0936     int         /* new_num_lvls */
0937 );
0938 
0939 extern  KeySym *XkbResizeKeySyms(
0940     XkbDescPtr      /* desc */,
0941     int             /* forKey */,
0942     int             /* symsNeeded */
0943 );
0944 
0945 extern  XkbAction *XkbResizeKeyActions(
0946     XkbDescPtr      /* desc */,
0947     int             /* forKey */,
0948     int             /* actsNeeded */
0949 );
0950 
0951 extern  Status XkbChangeTypesOfKey(
0952     XkbDescPtr      /* xkb */,
0953     int             /* key */,
0954     int         /* num_groups */,
0955     unsigned int        /* groups */,
0956     int *           /* newTypes */,
0957     XkbMapChangesPtr    /* pChanges */
0958 );
0959 
0960 extern  Status   XkbChangeKeycodeRange(
0961     XkbDescPtr      /* xkb */,
0962     int         /* minKC */,
0963     int         /* maxKC */,
0964     XkbChangesPtr       /* changes */
0965 );
0966 
0967 /***====================================================================***/
0968 
0969 extern  XkbComponentListPtr XkbListComponents(
0970     Display *       /* dpy */,
0971     unsigned int        /* deviceSpec */,
0972     XkbComponentNamesPtr    /* ptrns */,
0973     int *           /* max_inout */
0974 );
0975 
0976 extern  void XkbFreeComponentList(
0977     XkbComponentListPtr /* list */
0978 );
0979 
0980 extern  XkbDescPtr XkbGetKeyboard(
0981     Display *       /* dpy */,
0982     unsigned int        /* which */,
0983     unsigned int        /* deviceSpec */
0984 );
0985 
0986 extern XkbDescPtr XkbGetKeyboardByName(
0987     Display *           /* dpy */,
0988     unsigned int        /* deviceSpec */,
0989     XkbComponentNamesPtr    /* names */,
0990     unsigned int        /* want */,
0991     unsigned int        /* need */,
0992     Bool            /* load */
0993 );
0994 
0995 /***====================================================================***/
0996 
0997 extern  int XkbKeyTypesForCoreSymbols(  /* returns # of groups */
0998     XkbDescPtr  /* xkb */,          /* keyboard device */
0999     int     /* map_width */,        /* width of core KeySym array */
1000     KeySym *    /* core_syms */,        /* always mapWidth symbols */
1001     unsigned int    /* protected */,    /* explicit key types */
1002     int *   /* types_inout */,      /* always four type indices */
1003     KeySym *    /* xkb_syms_rtrn */     /* must have enough space */
1004 );
1005 
1006 extern  Bool    XkbApplyCompatMapToKey( /* False only on error */
1007     XkbDescPtr      /* xkb */,      /* keymap to be edited */
1008     KeyCode     /* key */,      /* key to be updated */
1009     XkbChangesPtr   /* changes */       /* resulting changes to map */
1010 );
1011 
1012 extern  Bool    XkbUpdateMapFromCore( /* False only on error */
1013     XkbDescPtr      /* xkb */,      /* XKB keyboard to be edited */
1014     KeyCode     /* first_key */,    /* first changed key */
1015     int         /* num_keys */,     /* number of changed keys */
1016     int         /* map_width */,    /* width of core keymap */
1017     KeySym *        /* core_keysyms */, /* symbols from core keymap */
1018     XkbChangesPtr   /* changes */       /* resulting changes */
1019 );
1020 
1021 /***====================================================================***/
1022 
1023 extern  XkbDeviceLedInfoPtr XkbAddDeviceLedInfo(
1024     XkbDeviceInfoPtr    /* devi */,
1025     unsigned int        /* ledClass */,
1026     unsigned int        /* ledId */
1027 );
1028 
1029 extern  Status          XkbResizeDeviceButtonActions(
1030     XkbDeviceInfoPtr    /* devi */,
1031     unsigned int        /* newTotal */
1032 );
1033 
1034 extern  XkbDeviceInfoPtr    XkbAllocDeviceInfo(
1035     unsigned int        /* deviceSpec */,
1036     unsigned int        /* nButtons */,
1037     unsigned int        /* szLeds */
1038 );
1039 
1040 extern  void XkbFreeDeviceInfo(
1041     XkbDeviceInfoPtr    /* devi */,
1042     unsigned int        /* which */,
1043     Bool            /* freeDevI */
1044 );
1045 
1046 extern  void    XkbNoteDeviceChanges(
1047     XkbDeviceChangesPtr         /* old */,
1048     XkbExtensionDeviceNotifyEvent * /* new */,
1049     unsigned int            /* wanted */
1050 );
1051 
1052 extern  XkbDeviceInfoPtr XkbGetDeviceInfo(
1053     Display *       /* dpy */,
1054     unsigned int        /* which */,
1055     unsigned int        /* deviceSpec */,
1056     unsigned int        /* ledClass */,
1057     unsigned int        /* ledID */
1058 );
1059 
1060 extern  Status  XkbGetDeviceInfoChanges(
1061     Display *       /* dpy */,
1062     XkbDeviceInfoPtr    /* devi */,
1063     XkbDeviceChangesPtr     /* changes */
1064 );
1065 
1066 extern  Status  XkbGetDeviceButtonActions(
1067     Display *       /* dpy */,
1068     XkbDeviceInfoPtr    /* devi */,
1069     Bool            /* all */,
1070     unsigned int        /* first */,
1071     unsigned int        /* nBtns */
1072 );
1073 
1074 extern  Status  XkbGetDeviceLedInfo(
1075     Display *       /* dpy */,
1076     XkbDeviceInfoPtr    /* devi */,
1077     unsigned int        /* ledClass (class, XIDflt, XIAll) */,
1078     unsigned int        /* ledId (id, XIDflt, XIAll) */,
1079     unsigned int        /* which (XkbXI_Indicator{Names,Map}Mask */
1080 );
1081 
1082 extern  Bool    XkbSetDeviceInfo(
1083     Display *       /* dpy */,
1084     unsigned int        /* which */,
1085     XkbDeviceInfoPtr    /* devi */
1086 );
1087 
1088 extern  Bool    XkbChangeDeviceInfo(
1089     Display*        /* dpy */,
1090     XkbDeviceInfoPtr    /* desc */,
1091     XkbDeviceChangesPtr /* changes */
1092 );
1093 
1094 extern  Bool XkbSetDeviceLedInfo(
1095     Display *       /* dpy */,
1096     XkbDeviceInfoPtr    /* devi */,
1097     unsigned int        /* ledClass */,
1098     unsigned int        /* ledID */,
1099     unsigned int        /* which */
1100 );
1101 
1102 extern  Bool XkbSetDeviceButtonActions(
1103     Display *       /* dpy */,
1104     XkbDeviceInfoPtr    /* devi */,
1105     unsigned int        /* first */,
1106     unsigned int        /* nBtns */
1107 );
1108 
1109 /***====================================================================***/
1110 
1111 extern  char    XkbToControl(
1112     char        /* c */
1113 );
1114 
1115 /***====================================================================***/
1116 
1117 extern  Bool XkbSetDebuggingFlags(
1118     Display *       /* dpy */,
1119     unsigned int    /* mask */,
1120     unsigned int    /* flags */,
1121     char *      /* msg */,
1122     unsigned int    /* ctrls_mask */,
1123     unsigned int    /* ctrls */,
1124     unsigned int *  /* rtrn_flags */,
1125     unsigned int *  /* rtrn_ctrls */
1126 );
1127 
1128 extern  Bool XkbApplyVirtualModChanges(
1129    XkbDescPtr       /* xkb */,
1130    unsigned int     /* changed */,
1131    XkbChangesPtr    /* changes */
1132 );
1133 
1134 extern Bool XkbUpdateActionVirtualMods(
1135     XkbDescPtr      /* xkb */,
1136     XkbAction *     /* act */,
1137     unsigned int        /* changed */
1138 );
1139 
1140 extern void XkbUpdateKeyTypeVirtualMods(
1141     XkbDescPtr      /* xkb */,
1142     XkbKeyTypePtr       /* type */,
1143     unsigned int        /* changed */,
1144     XkbChangesPtr       /* changes */
1145 );
1146 
1147 _XFUNCPROTOEND
1148 
1149 #endif /* _X11_XKBLIB_H_ */