XKBlib.h revision d7c63e31
11ab64890Smrg/************************************************************ 21ab64890SmrgCopyright (c) 1993 by Silicon Graphics Computer Systems, Inc. 31ab64890Smrg 41ab64890SmrgPermission to use, copy, modify, and distribute this 51ab64890Smrgsoftware and its documentation for any purpose and without 61ab64890Smrgfee is hereby granted, provided that the above copyright 71ab64890Smrgnotice appear in all copies and that both that copyright 81ab64890Smrgnotice and this permission notice appear in supporting 961b2299dSmrgdocumentation, and that the name of Silicon Graphics not be 1061b2299dSmrgused in advertising or publicity pertaining to distribution 111ab64890Smrgof the software without specific prior written permission. 1261b2299dSmrgSilicon Graphics makes no representation about the suitability 131ab64890Smrgof this software for any purpose. It is provided "as is" 141ab64890Smrgwithout any express or implied warranty. 151ab64890Smrg 1661b2299dSmrgSILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS 1761b2299dSmrgSOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 181ab64890SmrgAND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON 1961b2299dSmrgGRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL 2061b2299dSmrgDAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 2161b2299dSmrgDATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 221ab64890SmrgOR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH 231ab64890SmrgTHE USE OR PERFORMANCE OF THIS SOFTWARE. 241ab64890Smrg 251ab64890Smrg********************************************************/ 261ab64890Smrg 27e9fcaa8aSmrg#ifndef _X11_XKBLIB_H_ 28e9fcaa8aSmrg#define _X11_XKBLIB_H_ 291ab64890Smrg 301ab64890Smrg#include <X11/Xlib.h> 311ab64890Smrg#include <X11/extensions/XKBstr.h> 321ab64890Smrg 331ab64890Smrgtypedef struct _XkbAnyEvent { 341ab64890Smrg int type; /* XkbAnyEvent */ 351ab64890Smrg unsigned long serial; /* # of last req processed by server */ 361ab64890Smrg Bool send_event; /* is this from a SendEvent request? */ 371ab64890Smrg Display * display; /* Display the event was read from */ 381ab64890Smrg Time time; /* milliseconds */ 391ab64890Smrg int xkb_type; /* XKB event minor code */ 401ab64890Smrg unsigned int device; /* device ID */ 411ab64890Smrg} XkbAnyEvent; 421ab64890Smrg 431ab64890Smrgtypedef struct _XkbNewKeyboardNotify { 441ab64890Smrg int type; /* XkbAnyEvent */ 451ab64890Smrg unsigned long serial; /* of last req processed by server */ 461ab64890Smrg Bool send_event; /* is this from a SendEvent request? */ 471ab64890Smrg Display * display; /* Display the event was read from */ 481ab64890Smrg Time time; /* milliseconds */ 491ab64890Smrg int xkb_type; /* XkbNewKeyboardNotify */ 501ab64890Smrg int device; /* device ID */ 511ab64890Smrg int old_device; /* device ID of previous keyboard */ 521ab64890Smrg int min_key_code; /* minimum key code */ 531ab64890Smrg int max_key_code; /* maximum key code */ 541ab64890Smrg int old_min_key_code;/* min key code of previous kbd */ 551ab64890Smrg int old_max_key_code;/* max key code of previous kbd */ 561ab64890Smrg unsigned int changed; /* changed aspects of the keyboard */ 571ab64890Smrg char req_major; /* major and minor opcode of req */ 581ab64890Smrg char req_minor; /* that caused change, if applicable */ 591ab64890Smrg} XkbNewKeyboardNotifyEvent; 601ab64890Smrg 611ab64890Smrgtypedef struct _XkbMapNotifyEvent { 621ab64890Smrg int type; /* XkbAnyEvent */ 631ab64890Smrg unsigned long serial; /* of last req processed by server */ 641ab64890Smrg Bool send_event; /* is this from a SendEvent request */ 651ab64890Smrg Display * display; /* Display the event was read from */ 661ab64890Smrg Time time; /* milliseconds */ 671ab64890Smrg int xkb_type; /* XkbMapNotify */ 681ab64890Smrg int device; /* device ID */ 691ab64890Smrg unsigned int changed; /* fields which have been changed */ 701ab64890Smrg unsigned int flags; /* reserved */ 711ab64890Smrg int first_type; /* first changed key type */ 721ab64890Smrg int num_types; /* number of changed key types */ 731ab64890Smrg KeyCode min_key_code; 741ab64890Smrg KeyCode max_key_code; 751ab64890Smrg KeyCode first_key_sym; 761ab64890Smrg KeyCode first_key_act; 771ab64890Smrg KeyCode first_key_behavior; 781ab64890Smrg KeyCode first_key_explicit; 7961b2299dSmrg KeyCode first_modmap_key; 801ab64890Smrg KeyCode first_vmodmap_key; 811ab64890Smrg int num_key_syms; 821ab64890Smrg int num_key_acts; 831ab64890Smrg int num_key_behaviors; 841ab64890Smrg int num_key_explicit; 851ab64890Smrg int num_modmap_keys; 861ab64890Smrg int num_vmodmap_keys; 871ab64890Smrg unsigned int vmods; /* mask of changed virtual mods */ 881ab64890Smrg} XkbMapNotifyEvent; 891ab64890Smrg 901ab64890Smrgtypedef struct _XkbStateNotifyEvent { 911ab64890Smrg int type; /* XkbAnyEvent */ 921ab64890Smrg unsigned long serial; /* # of last req processed by server */ 931ab64890Smrg Bool send_event; /* is this from a SendEvent request? */ 941ab64890Smrg Display * display; /* Display the event was read from */ 951ab64890Smrg Time time; /* milliseconds */ 961ab64890Smrg int xkb_type; /* XkbStateNotify */ 971ab64890Smrg int device; /* device ID */ 981ab64890Smrg unsigned int changed; /* mask of changed state components */ 991ab64890Smrg int group; /* keyboard group */ 1001ab64890Smrg int base_group; /* base keyboard group */ 1011ab64890Smrg int latched_group; /* latched keyboard group */ 1021ab64890Smrg int locked_group; /* locked keyboard group */ 1031ab64890Smrg unsigned int mods; /* modifier state */ 1041ab64890Smrg unsigned int base_mods; /* base modifier state */ 1051ab64890Smrg unsigned int latched_mods; /* latched modifiers */ 1061ab64890Smrg unsigned int locked_mods; /* locked modifiers */ 1071ab64890Smrg int compat_state; /* compatibility state */ 1081ab64890Smrg unsigned char grab_mods; /* mods used for grabs */ 1091ab64890Smrg unsigned char compat_grab_mods;/* grab mods for non-XKB clients */ 1101ab64890Smrg unsigned char lookup_mods; /* mods sent to clients */ 1111ab64890Smrg unsigned char compat_lookup_mods; /* mods sent to non-XKB clients */ 1121ab64890Smrg int ptr_buttons; /* pointer button state */ 1131ab64890Smrg KeyCode keycode; /* keycode that caused the change */ 1141ab64890Smrg char event_type; /* KeyPress or KeyRelease */ 1151ab64890Smrg char req_major; /* Major opcode of request */ 1161ab64890Smrg char req_minor; /* Minor opcode of request */ 1171ab64890Smrg} XkbStateNotifyEvent; 1181ab64890Smrg 1191ab64890Smrgtypedef struct _XkbControlsNotify { 1201ab64890Smrg int type; /* XkbAnyEvent */ 1211ab64890Smrg unsigned long serial; /* of last req processed by server */ 1221ab64890Smrg Bool send_event; /* is this from a SendEvent request? */ 1231ab64890Smrg Display * display; /* Display the event was read from */ 1241ab64890Smrg Time time; /* milliseconds */ 1251ab64890Smrg int xkb_type; /* XkbControlsNotify */ 1261ab64890Smrg int device; /* device ID */ 1271ab64890Smrg unsigned int changed_ctrls; /* controls with changed sub-values */ 1281ab64890Smrg unsigned int enabled_ctrls; /* controls currently enabled */ 1291ab64890Smrg unsigned int enabled_ctrl_changes;/* controls just {en,dis}abled */ 1301ab64890Smrg int num_groups; /* total groups on keyboard */ 1311ab64890Smrg KeyCode keycode; /* key that caused change or 0 */ 1321ab64890Smrg char event_type; /* type of event that caused change */ 1331ab64890Smrg char req_major; /* if keycode==0, major and minor */ 1341ab64890Smrg char req_minor; /* opcode of req that caused change */ 1351ab64890Smrg} XkbControlsNotifyEvent; 1361ab64890Smrg 1371ab64890Smrgtypedef struct _XkbIndicatorNotify { 1381ab64890Smrg int type; /* XkbAnyEvent */ 1391ab64890Smrg unsigned long serial; /* of last req processed by server */ 1401ab64890Smrg Bool send_event; /* is this from a SendEvent request? */ 1411ab64890Smrg Display * display; /* Display the event was read from */ 1421ab64890Smrg Time time; /* milliseconds */ 1431ab64890Smrg int xkb_type; /* XkbIndicatorNotify */ 1441ab64890Smrg int device; /* device ID */ 1451ab64890Smrg unsigned int changed; /* indicators with new state or map */ 1461ab64890Smrg unsigned int state; /* current state of all indicators */ 1471ab64890Smrg} XkbIndicatorNotifyEvent; 1481ab64890Smrg 1491ab64890Smrgtypedef struct _XkbNamesNotify { 1501ab64890Smrg int type; /* XkbAnyEvent */ 1511ab64890Smrg unsigned long serial; /* of last req processed by server */ 1521ab64890Smrg Bool send_event; /* is this from a SendEvent request? */ 1531ab64890Smrg Display * display; /* Display the event was read from */ 1541ab64890Smrg Time time; /* milliseconds */ 1551ab64890Smrg int xkb_type; /* XkbNamesNotify */ 1561ab64890Smrg int device; /* device ID */ 1571ab64890Smrg unsigned int changed; /* names that have changed */ 1581ab64890Smrg int first_type; /* first key type with new name */ 1591ab64890Smrg int num_types; /* number of key types with new names */ 1601ab64890Smrg int first_lvl; /* first key type new new level names */ 1611ab64890Smrg int num_lvls; /* # of key types w/new level names */ 1621ab64890Smrg int num_aliases; /* total number of key aliases*/ 1631ab64890Smrg int num_radio_groups;/* total number of radio groups */ 1641ab64890Smrg unsigned int changed_vmods; /* virtual modifiers with new names */ 1651ab64890Smrg unsigned int changed_groups; /* groups with new names */ 1661ab64890Smrg unsigned int changed_indicators;/* indicators with new names */ 1671ab64890Smrg int first_key; /* first key with new name */ 1681ab64890Smrg int num_keys; /* number of keys with new names */ 1691ab64890Smrg} XkbNamesNotifyEvent; 1701ab64890Smrg 1711ab64890Smrgtypedef struct _XkbCompatMapNotify { 1721ab64890Smrg int type; /* XkbAnyEvent */ 1731ab64890Smrg unsigned long serial; /* of last req processed by server */ 1741ab64890Smrg Bool send_event; /* is this from a SendEvent request? */ 1751ab64890Smrg Display * display; /* Display the event was read from */ 1761ab64890Smrg Time time; /* milliseconds */ 1771ab64890Smrg int xkb_type; /* XkbCompatMapNotify */ 1781ab64890Smrg int device; /* device ID */ 1791ab64890Smrg unsigned int changed_groups; /* groups with new compat maps */ 1801ab64890Smrg int first_si; /* first new symbol interp */ 1811ab64890Smrg int num_si; /* number of new symbol interps */ 1821ab64890Smrg int num_total_si; /* total # of symbol interps */ 1831ab64890Smrg} XkbCompatMapNotifyEvent; 1841ab64890Smrg 1851ab64890Smrgtypedef struct _XkbBellNotify { 1861ab64890Smrg int type; /* XkbAnyEvent */ 1871ab64890Smrg unsigned long serial; /* of last req processed by server */ 1881ab64890Smrg Bool send_event; /* is this from a SendEvent request? */ 1891ab64890Smrg Display * display; /* Display the event was read from */ 1901ab64890Smrg Time time; /* milliseconds */ 1911ab64890Smrg int xkb_type; /* XkbBellNotify */ 1921ab64890Smrg int device; /* device ID */ 1931ab64890Smrg int percent; /* requested volume as a % of maximum */ 1941ab64890Smrg int pitch; /* requested pitch in Hz */ 1951ab64890Smrg int duration; /* requested duration in useconds */ 1961ab64890Smrg int bell_class; /* (input extension) feedback class */ 1971ab64890Smrg int bell_id; /* (input extension) ID of feedback */ 1981ab64890Smrg Atom name; /* "name" of requested bell */ 1991ab64890Smrg Window window; /* window associated with event */ 2001ab64890Smrg Bool event_only; /* "event only" requested */ 2011ab64890Smrg} XkbBellNotifyEvent; 2021ab64890Smrg 2031ab64890Smrgtypedef struct _XkbActionMessage { 2041ab64890Smrg int type; /* XkbAnyEvent */ 2051ab64890Smrg unsigned long serial; /* of last req processed by server */ 2061ab64890Smrg Bool send_event; /* is this from a SendEvent request? */ 2071ab64890Smrg Display * display; /* Display the event was read from */ 2081ab64890Smrg Time time; /* milliseconds */ 2091ab64890Smrg int xkb_type; /* XkbActionMessage */ 2101ab64890Smrg int device; /* device ID */ 2111ab64890Smrg KeyCode keycode; /* key that generated the event */ 2121ab64890Smrg Bool press; /* true if act caused by key press */ 2131ab64890Smrg Bool key_event_follows;/* true if key event also generated */ 2141ab64890Smrg int group; /* effective group */ 2151ab64890Smrg unsigned int mods; /* effective mods */ 21661b2299dSmrg char message[XkbActionMessageLength+1]; 2171ab64890Smrg /* message -- leave space for NUL */ 2181ab64890Smrg} XkbActionMessageEvent; 2191ab64890Smrg 2201ab64890Smrgtypedef struct _XkbAccessXNotify { 2211ab64890Smrg int type; /* XkbAnyEvent */ 2221ab64890Smrg unsigned long serial; /* of last req processed by server */ 2231ab64890Smrg Bool send_event; /* is this from a SendEvent request? */ 2241ab64890Smrg Display * display; /* Display the event was read from */ 2251ab64890Smrg Time time; /* milliseconds */ 2261ab64890Smrg int xkb_type; /* XkbAccessXNotify */ 2271ab64890Smrg int device; /* device ID */ 2281ab64890Smrg int detail; /* XkbAXN_* */ 2291ab64890Smrg int keycode; /* key of event */ 2301ab64890Smrg int sk_delay; /* current slow keys delay */ 2311ab64890Smrg int debounce_delay; /* current debounce delay */ 2321ab64890Smrg} XkbAccessXNotifyEvent; 2331ab64890Smrg 2341ab64890Smrgtypedef struct _XkbExtensionDeviceNotify { 2351ab64890Smrg int type; /* XkbAnyEvent */ 2361ab64890Smrg unsigned long serial; /* of last req processed by server */ 2371ab64890Smrg Bool send_event; /* is this from a SendEvent request? */ 2381ab64890Smrg Display * display; /* Display the event was read from */ 2391ab64890Smrg Time time; /* milliseconds */ 2401ab64890Smrg int xkb_type; /* XkbExtensionDeviceNotify */ 2411ab64890Smrg int device; /* device ID */ 24261b2299dSmrg unsigned int reason; /* reason for the event */ 24361b2299dSmrg unsigned int supported; /* mask of supported features */ 2441ab64890Smrg unsigned int unsupported; /* mask of unsupported features */ 2451ab64890Smrg /* that some app tried to use */ 2461ab64890Smrg int first_btn; /* first button that changed */ 2471ab64890Smrg int num_btns; /* range of buttons changed */ 2481ab64890Smrg unsigned int leds_defined; /* indicators with names or maps */ 2491ab64890Smrg unsigned int led_state; /* current state of the indicators */ 2501ab64890Smrg int led_class; /* feedback class for led changes */ 2511ab64890Smrg int led_id; /* feedback id for led changes */ 2521ab64890Smrg} XkbExtensionDeviceNotifyEvent; 2531ab64890Smrg 2541ab64890Smrgtypedef union _XkbEvent { 2551ab64890Smrg int type; 2561ab64890Smrg XkbAnyEvent any; 2571ab64890Smrg XkbNewKeyboardNotifyEvent new_kbd; 2581ab64890Smrg XkbMapNotifyEvent map; 2591ab64890Smrg XkbStateNotifyEvent state; 2601ab64890Smrg XkbControlsNotifyEvent ctrls; 2611ab64890Smrg XkbIndicatorNotifyEvent indicators; 2621ab64890Smrg XkbNamesNotifyEvent names; 2631ab64890Smrg XkbCompatMapNotifyEvent compat; 2641ab64890Smrg XkbBellNotifyEvent bell; 2651ab64890Smrg XkbActionMessageEvent message; 2661ab64890Smrg XkbAccessXNotifyEvent accessx; 2671ab64890Smrg XkbExtensionDeviceNotifyEvent device; 2681ab64890Smrg XEvent core; 2691ab64890Smrg} XkbEvent; 2701ab64890Smrg 2711ab64890Smrgtypedef struct _XkbKbdDpyState XkbKbdDpyStateRec,*XkbKbdDpyStatePtr; 2721ab64890Smrg 2731ab64890Smrg /* XkbOpenDisplay error codes */ 2741ab64890Smrg#define XkbOD_Success 0 2751ab64890Smrg#define XkbOD_BadLibraryVersion 1 2761ab64890Smrg#define XkbOD_ConnectionRefused 2 2771ab64890Smrg#define XkbOD_NonXkbServer 3 2781ab64890Smrg#define XkbOD_BadServerVersion 4 2791ab64890Smrg 2801ab64890Smrg /* Values for XlibFlags */ 2811ab64890Smrg#define XkbLC_ForceLatin1Lookup (1<<0) 2821ab64890Smrg#define XkbLC_ConsumeLookupMods (1<<1) 2831ab64890Smrg#define XkbLC_AlwaysConsumeShiftAndLock (1<<2) 2841ab64890Smrg#define XkbLC_IgnoreNewKeyboards (1<<3) 2851ab64890Smrg#define XkbLC_ControlFallback (1<<4) 2861ab64890Smrg#define XkbLC_ConsumeKeysOnComposeFail (1<<29) 2871ab64890Smrg#define XkbLC_ComposeLED (1<<30) 2881ab64890Smrg#define XkbLC_BeepOnComposeFail (1<<31) 2891ab64890Smrg 2901ab64890Smrg#define XkbLC_AllComposeControls (0xc0000000) 2911ab64890Smrg#define XkbLC_AllControls (0xc000001f) 2921ab64890Smrg 2931ab64890Smrg_XFUNCPROTOBEGIN 2941ab64890Smrg 2951ab64890Smrgextern Bool XkbIgnoreExtension( 2961ab64890Smrg Bool /* ignore */ 2971ab64890Smrg); 2981ab64890Smrg 2991ab64890Smrgextern Display *XkbOpenDisplay( 3001ab64890Smrg char * /* name */, 3011ab64890Smrg int * /* ev_rtrn */, 3021ab64890Smrg int * /* err_rtrn */, 3031ab64890Smrg int * /* major_rtrn */, 3041ab64890Smrg int * /* minor_rtrn */, 3051ab64890Smrg int * /* reason */ 3061ab64890Smrg); 3071ab64890Smrg 3081ab64890Smrgextern Bool XkbQueryExtension( 3091ab64890Smrg Display * /* dpy */, 3101ab64890Smrg int * /* opcodeReturn */, 3111ab64890Smrg int * /* eventBaseReturn */, 3121ab64890Smrg int * /* errorBaseReturn */, 3131ab64890Smrg int * /* majorRtrn */, 3141ab64890Smrg int * /* minorRtrn */ 3151ab64890Smrg); 3161ab64890Smrg 3171ab64890Smrgextern Bool XkbUseExtension( 3181ab64890Smrg Display * /* dpy */, 3191ab64890Smrg int * /* major_rtrn */, 3201ab64890Smrg int * /* minor_rtrn */ 3211ab64890Smrg); 3221ab64890Smrg 3231ab64890Smrgextern Bool XkbLibraryVersion( 3241ab64890Smrg int * /* libMajorRtrn */, 3251ab64890Smrg int * /* libMinorRtrn */ 3261ab64890Smrg); 3271ab64890Smrg 3281ab64890Smrgextern unsigned int XkbSetXlibControls( 3291ab64890Smrg Display* /* dpy */, 3301ab64890Smrg unsigned int /* affect */, 3311ab64890Smrg unsigned int /* values */ 3321ab64890Smrg); 3331ab64890Smrg 3341ab64890Smrgextern unsigned int XkbGetXlibControls( 3351ab64890Smrg Display* /* dpy */ 3361ab64890Smrg); 3371ab64890Smrg 3381ab64890Smrgextern unsigned int XkbXlibControlsImplemented(void); 3391ab64890Smrg 3401ab64890Smrgtypedef Atom (*XkbInternAtomFunc)( 3411ab64890Smrg Display * /* dpy */, 3421ab64890Smrg _Xconst char * /* name */, 3431ab64890Smrg Bool /* only_if_exists */ 3441ab64890Smrg); 3451ab64890Smrg 3461ab64890Smrgtypedef char * (*XkbGetAtomNameFunc)( 3471ab64890Smrg Display * /* dpy */, 3481ab64890Smrg Atom /* atom */ 3491ab64890Smrg); 3501ab64890Smrg 3511ab64890Smrgextern void XkbSetAtomFuncs( 3521ab64890Smrg XkbInternAtomFunc /* getAtom */, 3531ab64890Smrg XkbGetAtomNameFunc /* getName */ 3541ab64890Smrg); 3551ab64890Smrg 3561ab64890Smrgextern KeySym XkbKeycodeToKeysym( 3571ab64890Smrg Display * /* dpy */, 3581ab64890Smrg#if NeedWidePrototypes 3591ab64890Smrg unsigned int /* kc */, 3601ab64890Smrg#else 3611ab64890Smrg KeyCode /* kc */, 3621ab64890Smrg#endif 3631ab64890Smrg int /* group */, 3641ab64890Smrg int /* level */ 3651ab64890Smrg); 3661ab64890Smrg 3671ab64890Smrgextern unsigned int XkbKeysymToModifiers( 3681ab64890Smrg Display * /* dpy */, 3691ab64890Smrg KeySym /* ks */ 3701ab64890Smrg); 3711ab64890Smrg 3721ab64890Smrgextern Bool XkbLookupKeySym( 3731ab64890Smrg Display * /* dpy */, 3741ab64890Smrg KeyCode /* keycode */, 3751ab64890Smrg unsigned int /* modifiers */, 3761ab64890Smrg unsigned int * /* modifiers_return */, 3771ab64890Smrg KeySym * /* keysym_return */ 3781ab64890Smrg); 3791ab64890Smrg 3801ab64890Smrgextern int XkbLookupKeyBinding( 3811ab64890Smrg Display * /* dpy */, 3821ab64890Smrg KeySym /* sym_rtrn */, 3831ab64890Smrg unsigned int /* mods */, 3841ab64890Smrg char * /* buffer */, 3851ab64890Smrg int /* nbytes */, 3861ab64890Smrg int * /* extra_rtrn */ 3871ab64890Smrg); 3881ab64890Smrg 3891ab64890Smrgextern Bool XkbTranslateKeyCode( 3901ab64890Smrg XkbDescPtr /* xkb */, 3911ab64890Smrg KeyCode /* keycode */, 3921ab64890Smrg unsigned int /* modifiers */, 3931ab64890Smrg unsigned int * /* modifiers_return */, 3941ab64890Smrg KeySym * /* keysym_return */ 3951ab64890Smrg); 3961ab64890Smrg 3971ab64890Smrgextern int XkbTranslateKeySym( 3981ab64890Smrg Display * /* dpy */, 399d7c63e31Smrg KeySym * /* sym_return */, 4001ab64890Smrg unsigned int /* modifiers */, 4011ab64890Smrg char * /* buffer */, 4021ab64890Smrg int /* nbytes */, 4031ab64890Smrg int * /* extra_rtrn */ 4041ab64890Smrg); 4051ab64890Smrg 4061ab64890Smrgextern Bool XkbSetAutoRepeatRate( 4071ab64890Smrg Display * /* dpy */, 4081ab64890Smrg unsigned int /* deviceSpec */, 4091ab64890Smrg unsigned int /* delay */, 4101ab64890Smrg unsigned int /* interval */ 4111ab64890Smrg); 4121ab64890Smrg 4131ab64890Smrgextern Bool XkbGetAutoRepeatRate( 4141ab64890Smrg Display * /* dpy */, 4151ab64890Smrg unsigned int /* deviceSpec */, 4161ab64890Smrg unsigned int * /* delayRtrn */, 4171ab64890Smrg unsigned int * /* intervalRtrn */ 4181ab64890Smrg); 4191ab64890Smrg 4201ab64890Smrgextern Bool XkbChangeEnabledControls( 4211ab64890Smrg Display * /* dpy */, 4221ab64890Smrg unsigned int /* deviceSpec */, 4231ab64890Smrg unsigned int /* affect */, 4241ab64890Smrg unsigned int /* values */ 4251ab64890Smrg); 4261ab64890Smrg 4271ab64890Smrgextern Bool XkbDeviceBell( 4281ab64890Smrg Display * /* dpy */, 4291ab64890Smrg Window /* win */, 4301ab64890Smrg int /* deviceSpec */, 4311ab64890Smrg int /* bellClass */, 4321ab64890Smrg int /* bellID */, 4331ab64890Smrg int /* percent */, 4341ab64890Smrg Atom /* name */ 4351ab64890Smrg); 4361ab64890Smrg 4371ab64890Smrgextern Bool XkbForceDeviceBell( 4381ab64890Smrg Display * /* dpy */, 4391ab64890Smrg int /* deviceSpec */, 4401ab64890Smrg int /* bellClass */, 4411ab64890Smrg int /* bellID */, 4421ab64890Smrg int /* percent */ 4431ab64890Smrg); 4441ab64890Smrg 4451ab64890Smrgextern Bool XkbDeviceBellEvent( 4461ab64890Smrg Display * /* dpy */, 4471ab64890Smrg Window /* win */, 4481ab64890Smrg int /* deviceSpec */, 4491ab64890Smrg int /* bellClass */, 4501ab64890Smrg int /* bellID */, 4511ab64890Smrg int /* percent */, 4521ab64890Smrg Atom /* name */ 4531ab64890Smrg); 4541ab64890Smrg 4551ab64890Smrgextern Bool XkbBell( 4561ab64890Smrg Display * /* dpy */, 4571ab64890Smrg Window /* win */, 4581ab64890Smrg int /* percent */, 4591ab64890Smrg Atom /* name */ 4601ab64890Smrg); 4611ab64890Smrg 4621ab64890Smrgextern Bool XkbForceBell( 4631ab64890Smrg Display * /* dpy */, 4641ab64890Smrg int /* percent */ 4651ab64890Smrg); 4661ab64890Smrg 4671ab64890Smrgextern Bool XkbBellEvent( 4681ab64890Smrg Display * /* dpy */, 4691ab64890Smrg Window /* win */, 4701ab64890Smrg int /* percent */, 4711ab64890Smrg Atom /* name */ 4721ab64890Smrg); 4731ab64890Smrg 4741ab64890Smrgextern Bool XkbSelectEvents( 4751ab64890Smrg Display * /* dpy */, 4761ab64890Smrg unsigned int /* deviceID */, 4771ab64890Smrg unsigned int /* affect */, 4781ab64890Smrg unsigned int /* values */ 4791ab64890Smrg); 4801ab64890Smrg 4811ab64890Smrgextern Bool XkbSelectEventDetails( 4821ab64890Smrg Display * /* dpy */, 4831ab64890Smrg unsigned int /* deviceID */, 4841ab64890Smrg unsigned int /* eventType */, 4851ab64890Smrg unsigned long /* affect */, 4861ab64890Smrg unsigned long /* details */ 4871ab64890Smrg); 4881ab64890Smrg 4891ab64890Smrgextern void XkbNoteMapChanges( 4901ab64890Smrg XkbMapChangesPtr /* old */, 4911ab64890Smrg XkbMapNotifyEvent * /* new */, 4921ab64890Smrg unsigned int /* wanted */ 4931ab64890Smrg); 4941ab64890Smrg 4951ab64890Smrgextern void XkbNoteNameChanges( 4961ab64890Smrg XkbNameChangesPtr /* old */, 4971ab64890Smrg XkbNamesNotifyEvent * /* new */, 4981ab64890Smrg unsigned int /* wanted */ 4991ab64890Smrg); 5001ab64890Smrg 5011ab64890Smrgextern Status XkbGetIndicatorState( 5021ab64890Smrg Display * /* dpy */, 5031ab64890Smrg unsigned int /* deviceSpec */, 5041ab64890Smrg unsigned int * /* pStateRtrn */ 5051ab64890Smrg); 5061ab64890Smrg 5071ab64890Smrgextern Status XkbGetDeviceIndicatorState( 5081ab64890Smrg Display * /* dpy */, 5091ab64890Smrg unsigned int /* deviceSpec */, 5101ab64890Smrg unsigned int /* ledClass */, 5111ab64890Smrg unsigned int /* ledID */, 5121ab64890Smrg unsigned int * /* pStateRtrn */ 5131ab64890Smrg); 5141ab64890Smrg 5151ab64890Smrgextern Status XkbGetIndicatorMap( 5161ab64890Smrg Display * /* dpy */, 5171ab64890Smrg unsigned long /* which */, 5181ab64890Smrg XkbDescPtr /* desc */ 5191ab64890Smrg); 5201ab64890Smrg 5211ab64890Smrgextern Bool XkbSetIndicatorMap( 5221ab64890Smrg Display * /* dpy */, 5231ab64890Smrg unsigned long /* which */, 5241ab64890Smrg XkbDescPtr /* desc */ 5251ab64890Smrg); 5261ab64890Smrg 5271ab64890Smrg#define XkbNoteIndicatorMapChanges(o,n,w) \ 5281ab64890Smrg ((o)->map_changes|=((n)->map_changes&(w))) 5291ab64890Smrg#define XkbNoteIndicatorStateChanges(o,n,w)\ 5301ab64890Smrg ((o)->state_changes|=((n)->state_changes&(w))) 5311ab64890Smrg#define XkbGetIndicatorMapChanges(d,x,c) \ 53261b2299dSmrg (XkbGetIndicatorMap((d),(c)->map_changes,x)) 5331ab64890Smrg#define XkbChangeIndicatorMaps(d,x,c) \ 5341ab64890Smrg (XkbSetIndicatorMap((d),(c)->map_changes,x)) 5351ab64890Smrg 5361ab64890Smrgextern Bool XkbGetNamedIndicator( 5371ab64890Smrg Display * /* dpy */, 5381ab64890Smrg Atom /* name */, 5391ab64890Smrg int * /* pNdxRtrn */, 5401ab64890Smrg Bool * /* pStateRtrn */, 5411ab64890Smrg XkbIndicatorMapPtr /* pMapRtrn */, 5421ab64890Smrg Bool * /* pRealRtrn */ 5431ab64890Smrg); 5441ab64890Smrg 5451ab64890Smrgextern Bool XkbGetNamedDeviceIndicator( 5461ab64890Smrg Display * /* dpy */, 5471ab64890Smrg unsigned int /* deviceSpec */, 5481ab64890Smrg unsigned int /* ledClass */, 5491ab64890Smrg unsigned int /* ledID */, 5501ab64890Smrg Atom /* name */, 5511ab64890Smrg int * /* pNdxRtrn */, 5521ab64890Smrg Bool * /* pStateRtrn */, 5531ab64890Smrg XkbIndicatorMapPtr /* pMapRtrn */, 5541ab64890Smrg Bool * /* pRealRtrn */ 5551ab64890Smrg); 5561ab64890Smrg 5571ab64890Smrgextern Bool XkbSetNamedIndicator( 5581ab64890Smrg Display * /* dpy */, 5591ab64890Smrg Atom /* name */, 5601ab64890Smrg Bool /* changeState */, 5611ab64890Smrg Bool /* state */, 5621ab64890Smrg Bool /* createNewMap */, 5631ab64890Smrg XkbIndicatorMapPtr /* pMap */ 5641ab64890Smrg); 5651ab64890Smrg 5661ab64890Smrgextern Bool XkbSetNamedDeviceIndicator( 5671ab64890Smrg Display * /* dpy */, 5681ab64890Smrg unsigned int /* deviceSpec */, 5691ab64890Smrg unsigned int /* ledClass */, 5701ab64890Smrg unsigned int /* ledID */, 5711ab64890Smrg Atom /* name */, 5721ab64890Smrg Bool /* changeState */, 5731ab64890Smrg Bool /* state */, 5741ab64890Smrg Bool /* createNewMap */, 5751ab64890Smrg XkbIndicatorMapPtr /* pMap */ 5761ab64890Smrg); 5771ab64890Smrg 5781ab64890Smrgextern Bool XkbLockModifiers( 5791ab64890Smrg Display * /* dpy */, 5801ab64890Smrg unsigned int /* deviceSpec */, 5811ab64890Smrg unsigned int /* affect */, 5821ab64890Smrg unsigned int /* values */ 5831ab64890Smrg); 5841ab64890Smrg 5851ab64890Smrgextern Bool XkbLatchModifiers( 5861ab64890Smrg Display * /* dpy */, 5871ab64890Smrg unsigned int /* deviceSpec */, 5881ab64890Smrg unsigned int /* affect */, 5891ab64890Smrg unsigned int /* values */ 5901ab64890Smrg); 5911ab64890Smrg 5921ab64890Smrgextern Bool XkbLockGroup( 5931ab64890Smrg Display * /* dpy */, 5941ab64890Smrg unsigned int /* deviceSpec */, 5951ab64890Smrg unsigned int /* group */ 5961ab64890Smrg); 5971ab64890Smrg 5981ab64890Smrgextern Bool XkbLatchGroup( 5991ab64890Smrg Display * /* dpy */, 6001ab64890Smrg unsigned int /* deviceSpec */, 6011ab64890Smrg unsigned int /* group */ 6021ab64890Smrg); 6031ab64890Smrg 6041ab64890Smrgextern Bool XkbSetServerInternalMods( 6051ab64890Smrg Display * /* dpy */, 6061ab64890Smrg unsigned int /* deviceSpec */, 6071ab64890Smrg unsigned int /* affectReal */, 6081ab64890Smrg unsigned int /* realValues */, 6091ab64890Smrg unsigned int /* affectVirtual */, 6101ab64890Smrg unsigned int /* virtualValues */ 6111ab64890Smrg); 6121ab64890Smrg 6131ab64890Smrgextern Bool XkbSetIgnoreLockMods( 6141ab64890Smrg Display * /* dpy */, 6151ab64890Smrg unsigned int /* deviceSpec */, 6161ab64890Smrg unsigned int /* affectReal */, 6171ab64890Smrg unsigned int /* realValues */, 6181ab64890Smrg unsigned int /* affectVirtual */, 6191ab64890Smrg unsigned int /* virtualValues */ 6201ab64890Smrg); 6211ab64890Smrg 6221ab64890Smrg 6231ab64890Smrgextern Bool XkbVirtualModsToReal( 6241ab64890Smrg XkbDescPtr /* xkb */, 6251ab64890Smrg unsigned int /* virtual_mask */, 6261ab64890Smrg unsigned int * /* mask_rtrn */ 6271ab64890Smrg); 6281ab64890Smrg 6291ab64890Smrgextern Bool XkbComputeEffectiveMap( 6301ab64890Smrg XkbDescPtr /* xkb */, 6311ab64890Smrg XkbKeyTypePtr /* type */, 6321ab64890Smrg unsigned char * /* map_rtrn */ 6331ab64890Smrg); 6341ab64890Smrg 6351ab64890Smrgextern Status XkbInitCanonicalKeyTypes( 6361ab64890Smrg XkbDescPtr /* xkb */, 6371ab64890Smrg unsigned int /* which */, 6381ab64890Smrg int /* keypadVMod */ 6391ab64890Smrg); 6401ab64890Smrg 6411ab64890Smrgextern XkbDescPtr XkbAllocKeyboard( 6421ab64890Smrg void 6431ab64890Smrg); 6441ab64890Smrg 6451ab64890Smrgextern void XkbFreeKeyboard( 6461ab64890Smrg XkbDescPtr /* xkb */, 6471ab64890Smrg unsigned int /* which */, 6481ab64890Smrg Bool /* freeDesc */ 6491ab64890Smrg); 6501ab64890Smrg 6511ab64890Smrgextern Status XkbAllocClientMap( 6521ab64890Smrg XkbDescPtr /* xkb */, 6531ab64890Smrg unsigned int /* which */, 6541ab64890Smrg unsigned int /* nTypes */ 6551ab64890Smrg); 6561ab64890Smrg 6571ab64890Smrgextern Status XkbAllocServerMap( 6581ab64890Smrg XkbDescPtr /* xkb */, 6591ab64890Smrg unsigned int /* which */, 6601ab64890Smrg unsigned int /* nActions */ 6611ab64890Smrg); 6621ab64890Smrg 6631ab64890Smrgextern void XkbFreeClientMap( 6641ab64890Smrg XkbDescPtr /* xkb */, 6651ab64890Smrg unsigned int /* what */, 6661ab64890Smrg Bool /* freeMap */ 6671ab64890Smrg); 6681ab64890Smrg 6691ab64890Smrgextern void XkbFreeServerMap( 6701ab64890Smrg XkbDescPtr /* xkb */, 6711ab64890Smrg unsigned int /* what */, 6721ab64890Smrg Bool /* freeMap */ 6731ab64890Smrg); 6741ab64890Smrg 6751ab64890Smrgextern XkbKeyTypePtr XkbAddKeyType( 6761ab64890Smrg XkbDescPtr /* xkb */, 6771ab64890Smrg Atom /* name */, 6781ab64890Smrg int /* map_count */, 6791ab64890Smrg Bool /* want_preserve */, 6801ab64890Smrg int /* num_lvls */ 6811ab64890Smrg); 6821ab64890Smrg 6831ab64890Smrgextern Status XkbAllocIndicatorMaps( 6841ab64890Smrg XkbDescPtr /* xkb */ 6851ab64890Smrg); 6861ab64890Smrg 6871ab64890Smrgextern void XkbFreeIndicatorMaps( 6881ab64890Smrg XkbDescPtr /* xkb */ 6891ab64890Smrg); 6901ab64890Smrg 6911ab64890Smrgextern XkbDescPtr XkbGetMap( 6921ab64890Smrg Display * /* dpy */, 6931ab64890Smrg unsigned int /* which */, 6941ab64890Smrg unsigned int /* deviceSpec */ 6951ab64890Smrg); 6961ab64890Smrg 6971ab64890Smrgextern Status XkbGetUpdatedMap( 6981ab64890Smrg Display * /* dpy */, 6991ab64890Smrg unsigned int /* which */, 7001ab64890Smrg XkbDescPtr /* desc */ 7011ab64890Smrg); 7021ab64890Smrg 7031ab64890Smrgextern Status XkbGetMapChanges( 7041ab64890Smrg Display * /* dpy */, 7051ab64890Smrg XkbDescPtr /* xkb */, 7061ab64890Smrg XkbMapChangesPtr /* changes */ 7071ab64890Smrg); 7081ab64890Smrg 7091ab64890Smrg 7101ab64890Smrgextern Status XkbRefreshKeyboardMapping( 7111ab64890Smrg XkbMapNotifyEvent * /* event */ 7121ab64890Smrg); 7131ab64890Smrg 7141ab64890Smrgextern Status XkbGetKeyTypes( 7151ab64890Smrg Display * /* dpy */, 7161ab64890Smrg unsigned int /* first */, 7171ab64890Smrg unsigned int /* num */, 7181ab64890Smrg XkbDescPtr /* xkb */ 7191ab64890Smrg); 7201ab64890Smrg 7211ab64890Smrgextern Status XkbGetKeySyms( 7221ab64890Smrg Display * /* dpy */, 7231ab64890Smrg unsigned int /* first */, 7241ab64890Smrg unsigned int /* num */, 7251ab64890Smrg XkbDescPtr /* xkb */ 7261ab64890Smrg); 7271ab64890Smrg 7281ab64890Smrgextern Status XkbGetKeyActions( 7291ab64890Smrg Display * /* dpy */, 7301ab64890Smrg unsigned int /* first */, 7311ab64890Smrg unsigned int /* num */, 7321ab64890Smrg XkbDescPtr /* xkb */ 7331ab64890Smrg); 7341ab64890Smrg 7351ab64890Smrgextern Status XkbGetKeyBehaviors( 7361ab64890Smrg Display * /* dpy */, 7371ab64890Smrg unsigned int /* firstKey */, 7381ab64890Smrg unsigned int /* nKeys */, 7391ab64890Smrg XkbDescPtr /* desc */ 7401ab64890Smrg); 7411ab64890Smrg 7421ab64890Smrgextern Status XkbGetVirtualMods( 7431ab64890Smrg Display * /* dpy */, 7441ab64890Smrg unsigned int /* which */, 7451ab64890Smrg XkbDescPtr /* desc */ 7461ab64890Smrg); 7471ab64890Smrg 7481ab64890Smrgextern Status XkbGetKeyExplicitComponents( 7491ab64890Smrg Display * /* dpy */, 7501ab64890Smrg unsigned int /* firstKey */, 7511ab64890Smrg unsigned int /* nKeys */, 7521ab64890Smrg XkbDescPtr /* desc */ 7531ab64890Smrg); 7541ab64890Smrg 7551ab64890Smrgextern Status XkbGetKeyModifierMap( 7561ab64890Smrg Display * /* dpy */, 7571ab64890Smrg unsigned int /* firstKey */, 7581ab64890Smrg unsigned int /* nKeys */, 7591ab64890Smrg XkbDescPtr /* desc */ 7601ab64890Smrg); 7611ab64890Smrg 7621ab64890Smrgextern Status XkbGetKeyVirtualModMap( 7631ab64890Smrg Display * /* dpy */, 7641ab64890Smrg unsigned int /* first */, 7651ab64890Smrg unsigned int /* num */, 7661ab64890Smrg XkbDescPtr /* xkb */ 7671ab64890Smrg); 7681ab64890Smrg 7691ab64890Smrgextern Status XkbAllocControls( 7701ab64890Smrg XkbDescPtr /* xkb */, 7711ab64890Smrg unsigned int /* which*/ 7721ab64890Smrg); 7731ab64890Smrg 7741ab64890Smrgextern void XkbFreeControls( 7751ab64890Smrg XkbDescPtr /* xkb */, 7761ab64890Smrg unsigned int /* which */, 7771ab64890Smrg Bool /* freeMap */ 7781ab64890Smrg); 7791ab64890Smrg 7801ab64890Smrgextern Status XkbGetControls( 7811ab64890Smrg Display * /* dpy */, 7821ab64890Smrg unsigned long /* which */, 7831ab64890Smrg XkbDescPtr /* desc */ 7841ab64890Smrg); 7851ab64890Smrg 7861ab64890Smrgextern Bool XkbSetControls( 7871ab64890Smrg Display * /* dpy */, 7881ab64890Smrg unsigned long /* which */, 7891ab64890Smrg XkbDescPtr /* desc */ 7901ab64890Smrg); 7911ab64890Smrg 7921ab64890Smrgextern void XkbNoteControlsChanges( 7931ab64890Smrg XkbControlsChangesPtr /* old */, 7941ab64890Smrg XkbControlsNotifyEvent * /* new */, 7951ab64890Smrg unsigned int /* wanted */ 7961ab64890Smrg); 7971ab64890Smrg 7981ab64890Smrg#define XkbGetControlsChanges(d,x,c) XkbGetControls(d,(c)->changed_ctrls,x) 7991ab64890Smrg#define XkbChangeControls(d,x,c) XkbSetControls(d,(c)->changed_ctrls,x) 8001ab64890Smrg 8011ab64890Smrgextern Status XkbAllocCompatMap( 8021ab64890Smrg XkbDescPtr /* xkb */, 8031ab64890Smrg unsigned int /* which */, 8041ab64890Smrg unsigned int /* nInterpret */ 8051ab64890Smrg); 8061ab64890Smrg 8071ab64890Smrgextern void XkbFreeCompatMap( 8081ab64890Smrg XkbDescPtr /* xkb */, 8091ab64890Smrg unsigned int /* which */, 8101ab64890Smrg Bool /* freeMap */ 8111ab64890Smrg); 8121ab64890Smrg 8131ab64890Smrgextern Status XkbGetCompatMap( 8141ab64890Smrg Display * /* dpy */, 8151ab64890Smrg unsigned int /* which */, 8161ab64890Smrg XkbDescPtr /* xkb */ 8171ab64890Smrg); 8181ab64890Smrg 8191ab64890Smrgextern Bool XkbSetCompatMap( 8201ab64890Smrg Display * /* dpy */, 8211ab64890Smrg unsigned int /* which */, 8221ab64890Smrg XkbDescPtr /* xkb */, 8231ab64890Smrg Bool /* updateActions */ 8241ab64890Smrg); 8251ab64890Smrg 8261ab64890Smrgextern XkbSymInterpretPtr XkbAddSymInterpret( 8271ab64890Smrg XkbDescPtr /* xkb */, 8281ab64890Smrg XkbSymInterpretPtr /* si */, 8291ab64890Smrg Bool /* updateMap */, 8301ab64890Smrg XkbChangesPtr /* changes */ 8311ab64890Smrg); 8321ab64890Smrg 8331ab64890Smrgextern Status XkbAllocNames( 8341ab64890Smrg XkbDescPtr /* xkb */, 8351ab64890Smrg unsigned int /* which */, 8361ab64890Smrg int /* nTotalRG */, 8371ab64890Smrg int /* nTotalAliases */ 8381ab64890Smrg); 8391ab64890Smrg 8401ab64890Smrgextern Status XkbGetNames( 8411ab64890Smrg Display * /* dpy */, 8421ab64890Smrg unsigned int /* which */, 8431ab64890Smrg XkbDescPtr /* desc */ 8441ab64890Smrg); 8451ab64890Smrg 8461ab64890Smrgextern Bool XkbSetNames( 8471ab64890Smrg Display * /* dpy */, 8481ab64890Smrg unsigned int /* which */, 8491ab64890Smrg unsigned int /* firstType */, 8501ab64890Smrg unsigned int /* nTypes */, 8511ab64890Smrg XkbDescPtr /* desc */ 8521ab64890Smrg); 8531ab64890Smrg 8541ab64890Smrgextern Bool XkbChangeNames( 8551ab64890Smrg Display * /* dpy */, 8561ab64890Smrg XkbDescPtr /* xkb */, 8571ab64890Smrg XkbNameChangesPtr /* changes */ 8581ab64890Smrg); 8591ab64890Smrg 8601ab64890Smrgextern void XkbFreeNames( 8611ab64890Smrg XkbDescPtr /* xkb */, 8621ab64890Smrg unsigned int /* which */, 8631ab64890Smrg Bool /* freeMap */ 8641ab64890Smrg); 8651ab64890Smrg 8661ab64890Smrg 8671ab64890Smrgextern Status XkbGetState( 8681ab64890Smrg Display * /* dpy */, 8691ab64890Smrg unsigned int /* deviceSpec */, 8701ab64890Smrg XkbStatePtr /* rtrnState */ 8711ab64890Smrg); 8721ab64890Smrg 8731ab64890Smrgextern Bool XkbSetMap( 8741ab64890Smrg Display * /* dpy */, 8751ab64890Smrg unsigned int /* which */, 8761ab64890Smrg XkbDescPtr /* desc */ 8771ab64890Smrg); 8781ab64890Smrg 8791ab64890Smrgextern Bool XkbChangeMap( 8801ab64890Smrg Display* /* dpy */, 8811ab64890Smrg XkbDescPtr /* desc */, 8821ab64890Smrg XkbMapChangesPtr /* changes */ 8831ab64890Smrg); 8841ab64890Smrg 8851ab64890Smrgextern Bool XkbSetDetectableAutoRepeat( 8861ab64890Smrg Display * /* dpy */, 8871ab64890Smrg Bool /* detectable */, 8881ab64890Smrg Bool * /* supported */ 8891ab64890Smrg); 8901ab64890Smrg 8911ab64890Smrgextern Bool XkbGetDetectableAutoRepeat( 8921ab64890Smrg Display * /* dpy */, 8931ab64890Smrg Bool * /* supported */ 8941ab64890Smrg); 8951ab64890Smrg 8961ab64890Smrgextern Bool XkbSetAutoResetControls( 8971ab64890Smrg Display * /* dpy */, 8981ab64890Smrg unsigned int /* changes */, 8991ab64890Smrg unsigned int * /* auto_ctrls */, 9001ab64890Smrg unsigned int * /* auto_values */ 9011ab64890Smrg); 9021ab64890Smrg 9031ab64890Smrgextern Bool XkbGetAutoResetControls( 9041ab64890Smrg Display * /* dpy */, 9051ab64890Smrg unsigned int * /* auto_ctrls */, 9061ab64890Smrg unsigned int * /* auto_ctrl_values */ 9071ab64890Smrg); 9081ab64890Smrg 9091ab64890Smrgextern Bool XkbSetPerClientControls( 9101ab64890Smrg Display * /* dpy */, 9111ab64890Smrg unsigned int /* change */, 9121ab64890Smrg unsigned int * /* values */ 9131ab64890Smrg); 9141ab64890Smrg 9151ab64890Smrgextern Bool XkbGetPerClientControls( 9161ab64890Smrg Display * /* dpy */, 9171ab64890Smrg unsigned int * /* ctrls */ 9181ab64890Smrg); 9191ab64890Smrg 9201ab64890Smrgextern Status XkbCopyKeyType( 9211ab64890Smrg XkbKeyTypePtr /* from */, 9221ab64890Smrg XkbKeyTypePtr /* into */ 9231ab64890Smrg); 9241ab64890Smrg 9251ab64890Smrgextern Status XkbCopyKeyTypes( 9261ab64890Smrg XkbKeyTypePtr /* from */, 9271ab64890Smrg XkbKeyTypePtr /* into */, 9281ab64890Smrg int /* num_types */ 9291ab64890Smrg); 9301ab64890Smrg 9311ab64890Smrgextern Status XkbResizeKeyType( 9321ab64890Smrg XkbDescPtr /* xkb */, 9331ab64890Smrg int /* type_ndx */, 9341ab64890Smrg int /* map_count */, 9351ab64890Smrg Bool /* want_preserve */, 9361ab64890Smrg int /* new_num_lvls */ 9371ab64890Smrg); 9381ab64890Smrg 9391ab64890Smrgextern KeySym *XkbResizeKeySyms( 9401ab64890Smrg XkbDescPtr /* desc */, 9411ab64890Smrg int /* forKey */, 9421ab64890Smrg int /* symsNeeded */ 9431ab64890Smrg); 9441ab64890Smrg 9451ab64890Smrgextern XkbAction *XkbResizeKeyActions( 9461ab64890Smrg XkbDescPtr /* desc */, 9471ab64890Smrg int /* forKey */, 9481ab64890Smrg int /* actsNeeded */ 9491ab64890Smrg); 9501ab64890Smrg 9511ab64890Smrgextern Status XkbChangeTypesOfKey( 9521ab64890Smrg XkbDescPtr /* xkb */, 9531ab64890Smrg int /* key */, 9541ab64890Smrg int /* num_groups */, 9551ab64890Smrg unsigned int /* groups */, 9561ab64890Smrg int * /* newTypes */, 9571ab64890Smrg XkbMapChangesPtr /* pChanges */ 9581ab64890Smrg); 9591ab64890Smrg 9601ab64890Smrgextern Status XkbChangeKeycodeRange( 9611ab64890Smrg XkbDescPtr /* xkb */, 9621ab64890Smrg int /* minKC */, 9631ab64890Smrg int /* maxKC */, 9641ab64890Smrg XkbChangesPtr /* changes */ 9651ab64890Smrg); 9661ab64890Smrg 9671ab64890Smrg/***====================================================================***/ 9681ab64890Smrg 9691ab64890Smrgextern XkbComponentListPtr XkbListComponents( 9701ab64890Smrg Display * /* dpy */, 9711ab64890Smrg unsigned int /* deviceSpec */, 9721ab64890Smrg XkbComponentNamesPtr /* ptrns */, 9731ab64890Smrg int * /* max_inout */ 9741ab64890Smrg); 9751ab64890Smrg 9761ab64890Smrgextern void XkbFreeComponentList( 9771ab64890Smrg XkbComponentListPtr /* list */ 9781ab64890Smrg); 9791ab64890Smrg 9801ab64890Smrgextern XkbDescPtr XkbGetKeyboard( 9811ab64890Smrg Display * /* dpy */, 9821ab64890Smrg unsigned int /* which */, 9831ab64890Smrg unsigned int /* deviceSpec */ 9841ab64890Smrg); 9851ab64890Smrg 9861ab64890Smrgextern XkbDescPtr XkbGetKeyboardByName( 9871ab64890Smrg Display * /* dpy */, 9881ab64890Smrg unsigned int /* deviceSpec */, 9891ab64890Smrg XkbComponentNamesPtr /* names */, 9901ab64890Smrg unsigned int /* want */, 9911ab64890Smrg unsigned int /* need */, 9921ab64890Smrg Bool /* load */ 9931ab64890Smrg); 9941ab64890Smrg 9951ab64890Smrg/***====================================================================***/ 9961ab64890Smrg 9971ab64890Smrgextern int XkbKeyTypesForCoreSymbols( /* returns # of groups */ 9981ab64890Smrg XkbDescPtr /* xkb */, /* keyboard device */ 9991ab64890Smrg int /* map_width */, /* width of core KeySym array */ 10001ab64890Smrg KeySym * /* core_syms */, /* always mapWidth symbols */ 10011ab64890Smrg unsigned int /* protected */, /* explicit key types */ 10021ab64890Smrg int * /* types_inout */, /* always four type indices */ 10031ab64890Smrg KeySym * /* xkb_syms_rtrn */ /* must have enough space */ 10041ab64890Smrg); 10051ab64890Smrg 10061ab64890Smrgextern Bool XkbApplyCompatMapToKey( /* False only on error */ 10071ab64890Smrg XkbDescPtr /* xkb */, /* keymap to be edited */ 10081ab64890Smrg KeyCode /* key */, /* key to be updated */ 10091ab64890Smrg XkbChangesPtr /* changes */ /* resulting changes to map */ 10101ab64890Smrg); 10111ab64890Smrg 10121ab64890Smrgextern Bool XkbUpdateMapFromCore( /* False only on error */ 10131ab64890Smrg XkbDescPtr /* xkb */, /* XKB keyboard to be edited */ 10141ab64890Smrg KeyCode /* first_key */, /* first changed key */ 10151ab64890Smrg int /* num_keys */, /* number of changed keys */ 10161ab64890Smrg int /* map_width */, /* width of core keymap */ 10171ab64890Smrg KeySym * /* core_keysyms */, /* symbols from core keymap */ 10181ab64890Smrg XkbChangesPtr /* changes */ /* resulting changes */ 10191ab64890Smrg); 10201ab64890Smrg 10211ab64890Smrg/***====================================================================***/ 10221ab64890Smrg 10231ab64890Smrgextern XkbDeviceLedInfoPtr XkbAddDeviceLedInfo( 10241ab64890Smrg XkbDeviceInfoPtr /* devi */, 10251ab64890Smrg unsigned int /* ledClass */, 10261ab64890Smrg unsigned int /* ledId */ 10271ab64890Smrg); 10281ab64890Smrg 10291ab64890Smrgextern Status XkbResizeDeviceButtonActions( 10301ab64890Smrg XkbDeviceInfoPtr /* devi */, 10311ab64890Smrg unsigned int /* newTotal */ 10321ab64890Smrg); 10331ab64890Smrg 10341ab64890Smrgextern XkbDeviceInfoPtr XkbAllocDeviceInfo( 10351ab64890Smrg unsigned int /* deviceSpec */, 10361ab64890Smrg unsigned int /* nButtons */, 10371ab64890Smrg unsigned int /* szLeds */ 10381ab64890Smrg); 10391ab64890Smrg 10401ab64890Smrgextern void XkbFreeDeviceInfo( 10411ab64890Smrg XkbDeviceInfoPtr /* devi */, 10421ab64890Smrg unsigned int /* which */, 10431ab64890Smrg Bool /* freeDevI */ 10441ab64890Smrg); 10451ab64890Smrg 10461ab64890Smrgextern void XkbNoteDeviceChanges( 10471ab64890Smrg XkbDeviceChangesPtr /* old */, 10481ab64890Smrg XkbExtensionDeviceNotifyEvent * /* new */, 10491ab64890Smrg unsigned int /* wanted */ 10501ab64890Smrg); 10511ab64890Smrg 10521ab64890Smrgextern XkbDeviceInfoPtr XkbGetDeviceInfo( 10531ab64890Smrg Display * /* dpy */, 10541ab64890Smrg unsigned int /* which */, 10551ab64890Smrg unsigned int /* deviceSpec */, 10561ab64890Smrg unsigned int /* ledClass */, 10571ab64890Smrg unsigned int /* ledID */ 10581ab64890Smrg); 10591ab64890Smrg 10601ab64890Smrgextern Status XkbGetDeviceInfoChanges( 10611ab64890Smrg Display * /* dpy */, 10621ab64890Smrg XkbDeviceInfoPtr /* devi */, 10631ab64890Smrg XkbDeviceChangesPtr /* changes */ 10641ab64890Smrg); 10651ab64890Smrg 10661ab64890Smrgextern Status XkbGetDeviceButtonActions( 10671ab64890Smrg Display * /* dpy */, 10681ab64890Smrg XkbDeviceInfoPtr /* devi */, 10691ab64890Smrg Bool /* all */, 10701ab64890Smrg unsigned int /* first */, 10711ab64890Smrg unsigned int /* nBtns */ 10721ab64890Smrg); 10731ab64890Smrg 10741ab64890Smrgextern Status XkbGetDeviceLedInfo( 10751ab64890Smrg Display * /* dpy */, 10761ab64890Smrg XkbDeviceInfoPtr /* devi */, 10771ab64890Smrg unsigned int /* ledClass (class, XIDflt, XIAll) */, 10781ab64890Smrg unsigned int /* ledId (id, XIDflt, XIAll) */, 10791ab64890Smrg unsigned int /* which (XkbXI_Indicator{Names,Map}Mask */ 10801ab64890Smrg); 10811ab64890Smrg 10821ab64890Smrgextern Bool XkbSetDeviceInfo( 10831ab64890Smrg Display * /* dpy */, 10841ab64890Smrg unsigned int /* which */, 10851ab64890Smrg XkbDeviceInfoPtr /* devi */ 10861ab64890Smrg); 10871ab64890Smrg 10881ab64890Smrgextern Bool XkbChangeDeviceInfo( 10891ab64890Smrg Display* /* dpy */, 10901ab64890Smrg XkbDeviceInfoPtr /* desc */, 10911ab64890Smrg XkbDeviceChangesPtr /* changes */ 10921ab64890Smrg); 10931ab64890Smrg 10941ab64890Smrgextern Bool XkbSetDeviceLedInfo( 10951ab64890Smrg Display * /* dpy */, 10961ab64890Smrg XkbDeviceInfoPtr /* devi */, 10971ab64890Smrg unsigned int /* ledClass */, 10981ab64890Smrg unsigned int /* ledID */, 10991ab64890Smrg unsigned int /* which */ 11001ab64890Smrg); 11011ab64890Smrg 11021ab64890Smrgextern Bool XkbSetDeviceButtonActions( 11031ab64890Smrg Display * /* dpy */, 11041ab64890Smrg XkbDeviceInfoPtr /* devi */, 11051ab64890Smrg unsigned int /* first */, 11061ab64890Smrg unsigned int /* nBtns */ 11071ab64890Smrg); 11081ab64890Smrg 11091ab64890Smrg/***====================================================================***/ 11101ab64890Smrg 11111ab64890Smrgextern char XkbToControl( 11121ab64890Smrg char /* c */ 11131ab64890Smrg); 11141ab64890Smrg 11151ab64890Smrg/***====================================================================***/ 11161ab64890Smrg 11171ab64890Smrgextern Bool XkbSetDebuggingFlags( 11181ab64890Smrg Display * /* dpy */, 11191ab64890Smrg unsigned int /* mask */, 11201ab64890Smrg unsigned int /* flags */, 11211ab64890Smrg char * /* msg */, 11221ab64890Smrg unsigned int /* ctrls_mask */, 11231ab64890Smrg unsigned int /* ctrls */, 11241ab64890Smrg unsigned int * /* rtrn_flags */, 11251ab64890Smrg unsigned int * /* rtrn_ctrls */ 11261ab64890Smrg); 11271ab64890Smrg 11281ab64890Smrgextern Bool XkbApplyVirtualModChanges( 11291ab64890Smrg XkbDescPtr /* xkb */, 11301ab64890Smrg unsigned int /* changed */, 11311ab64890Smrg XkbChangesPtr /* changes */ 11321ab64890Smrg); 11331ab64890Smrg 11341ab64890Smrgextern Bool XkbUpdateActionVirtualMods( 11351ab64890Smrg XkbDescPtr /* xkb */, 11361ab64890Smrg XkbAction * /* act */, 11371ab64890Smrg unsigned int /* changed */ 11381ab64890Smrg); 11391ab64890Smrg 11401ab64890Smrgextern void XkbUpdateKeyTypeVirtualMods( 11411ab64890Smrg XkbDescPtr /* xkb */, 11421ab64890Smrg XkbKeyTypePtr /* type */, 11431ab64890Smrg unsigned int /* changed */, 11441ab64890Smrg XkbChangesPtr /* changes */ 11451ab64890Smrg); 11461ab64890Smrg 11471ab64890Smrg_XFUNCPROTOEND 11481ab64890Smrg 1149e9fcaa8aSmrg#endif /* _X11_XKBLIB_H_ */ 1150