/************************************************************
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