XKB: Add a hell of a lot more FIXMEs
For some reason, we insist on having daft internal representations that make no sense, that always have to be converted to be used. We should really sort this one out. Also, comment the hojillion members of XkbStateRec. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
This commit is contained in:
parent
edeb033f29
commit
4f3078df2a
141
include/xkbstr.h
141
include/xkbstr.h
|
@ -29,12 +29,13 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
|
||||||
#include <X11/extensions/XKB.h>
|
#include <X11/extensions/XKB.h>
|
||||||
|
|
||||||
#define XkbCharToInt(v) ((v)&0x80?(int)((v)|(~0xff)):(int)((v)&0x7f))
|
#define XkbCharToInt(v) ((int) ((v) & 0x80 ? ((v) | (~0xff)) : ((v) & 0x7f)))
|
||||||
#define XkbIntTo2Chars(i,h,l) (((h)=((i>>8)&0xff)),((l)=((i)&0xff)))
|
#define XkbIntTo2Chars(i, h, l) ((h) = (i >> 8) & 0xff, (l) = (i) & 0xff)
|
||||||
|
|
||||||
#if defined(WORD64) && defined(UNSIGNEDBITFIELDS)
|
#if defined(WORD64) && defined(UNSIGNEDBITFIELDS)
|
||||||
#define Xkb2CharsToInt(h,l) ((h)&0x80?(int)(((h)<<8)|(l)|(~0xffff)):\
|
#define Xkb2CharsToInt(h, l) ((int) ((h) & 0x80 ? \
|
||||||
(int)(((h)<<8)|(l)&0x7fff))
|
(((h) << 8) | (l) | (~0xffff)) : \
|
||||||
|
(((h) << 8) | (l) & 0x7fff))
|
||||||
#else
|
#else
|
||||||
#define Xkb2CharsToInt(h,l) ((short)(((h)<<8)|(l)))
|
#define Xkb2CharsToInt(h,l) ((short)(((h)<<8)|(l)))
|
||||||
#endif
|
#endif
|
||||||
|
@ -44,20 +45,30 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef struct _XkbStateRec {
|
typedef struct _XkbStateRec {
|
||||||
unsigned char group;
|
unsigned char group; /* base + latched + locked */
|
||||||
unsigned char locked_group;
|
/* FIXME: Why are base + latched short and not char?? */
|
||||||
unsigned short base_group;
|
unsigned short base_group; /* physically ... down? */
|
||||||
unsigned short latched_group;
|
unsigned short latched_group;
|
||||||
unsigned char mods;
|
unsigned char locked_group;
|
||||||
unsigned char base_mods;
|
|
||||||
|
unsigned char mods; /* base + latched + locked */
|
||||||
|
unsigned char base_mods; /* physically down */
|
||||||
unsigned char latched_mods;
|
unsigned char latched_mods;
|
||||||
unsigned char locked_mods;
|
unsigned char locked_mods;
|
||||||
unsigned char compat_state;
|
|
||||||
unsigned char grab_mods;
|
unsigned char compat_state; /* mods + group for core state */
|
||||||
unsigned char compat_grab_mods;
|
|
||||||
unsigned char lookup_mods;
|
/* grab mods = all depressed and latched mods, _not_ locked mods */
|
||||||
unsigned char compat_lookup_mods;
|
unsigned char grab_mods; /* grab mods minus internal mods */
|
||||||
unsigned short ptr_buttons;
|
unsigned char compat_grab_mods; /* grab mods + group for core state,
|
||||||
|
but not locked groups if
|
||||||
|
IgnoreGroupLocks set */
|
||||||
|
|
||||||
|
/* effective mods = all mods (depressed, latched, locked) */
|
||||||
|
unsigned char lookup_mods; /* effective mods minus internal mods */
|
||||||
|
unsigned char compat_lookup_mods; /* effective mods + group */
|
||||||
|
|
||||||
|
unsigned short ptr_buttons; /* core pointer buttons */
|
||||||
} XkbStateRec,*XkbStatePtr;
|
} XkbStateRec,*XkbStatePtr;
|
||||||
#define XkbStateFieldFromRec(s) XkbBuildCoreState((s)->lookup_mods,(s)->group)
|
#define XkbStateFieldFromRec(s) XkbBuildCoreState((s)->lookup_mods,(s)->group)
|
||||||
#define XkbGrabStateFromRec(s) XkbBuildCoreState((s)->grab_mods,(s)->group)
|
#define XkbGrabStateFromRec(s) XkbBuildCoreState((s)->grab_mods,(s)->group)
|
||||||
|
@ -88,7 +99,8 @@ typedef struct _XkbKeyType {
|
||||||
#define XkbOutOfRangeGroupInfo(g) ((g)&0xf0)
|
#define XkbOutOfRangeGroupInfo(g) ((g)&0xf0)
|
||||||
#define XkbOutOfRangeGroupAction(g) ((g)&0xc0)
|
#define XkbOutOfRangeGroupAction(g) ((g)&0xc0)
|
||||||
#define XkbOutOfRangeGroupNumber(g) (((g)&0x30)>>4)
|
#define XkbOutOfRangeGroupNumber(g) (((g)&0x30)>>4)
|
||||||
#define XkbSetGroupInfo(g,w,n) (((w)&0xc0)|(((n)&3)<<4)|((g)&0x0f))
|
#define XkbSetGroupInfo(g, w, n) (((w) & 0xc0) | (((n) & 3) << 4) | \
|
||||||
|
((g) & 0x0f))
|
||||||
#define XkbSetNumGroups(g,n) (((g)&0xf0)|((n)&0x0f))
|
#define XkbSetNumGroups(g,n) (((g)&0xf0)|((n)&0x0f))
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -111,17 +123,19 @@ typedef struct _XkbModAction {
|
||||||
unsigned char flags;
|
unsigned char flags;
|
||||||
unsigned char mask;
|
unsigned char mask;
|
||||||
unsigned char real_mods;
|
unsigned char real_mods;
|
||||||
|
/* FIXME: Make this an int. */
|
||||||
unsigned char vmods1;
|
unsigned char vmods1;
|
||||||
unsigned char vmods2;
|
unsigned char vmods2;
|
||||||
} XkbModAction;
|
} XkbModAction;
|
||||||
#define XkbModActionVMods(a) \
|
#define XkbModActionVMods(a) ((short) (((a)->vmods1 << 8) | (a)->vmods2))
|
||||||
((short)(((a)->vmods1<<8)|((a)->vmods2)))
|
|
||||||
#define XkbSetModActionVMods(a,v) \
|
#define XkbSetModActionVMods(a,v) \
|
||||||
(((a)->vmods1=(((v)>>8)&0xff)),(a)->vmods2=((v)&0xff))
|
((a)->vmods1 = (((v) >> 8) & 0xff), \
|
||||||
|
(a)->vmods2 = (v) & 0xff)
|
||||||
|
|
||||||
typedef struct _XkbGroupAction {
|
typedef struct _XkbGroupAction {
|
||||||
unsigned char type;
|
unsigned char type;
|
||||||
unsigned char flags;
|
unsigned char flags;
|
||||||
|
/* FIXME: Make this an int. */
|
||||||
char group_XXX;
|
char group_XXX;
|
||||||
} XkbGroupAction;
|
} XkbGroupAction;
|
||||||
#define XkbSAGroup(a) (XkbCharToInt((a)->group_XXX))
|
#define XkbSAGroup(a) (XkbCharToInt((a)->group_XXX))
|
||||||
|
@ -132,6 +146,7 @@ typedef struct _XkbISOAction {
|
||||||
unsigned char flags;
|
unsigned char flags;
|
||||||
unsigned char mask;
|
unsigned char mask;
|
||||||
unsigned char real_mods;
|
unsigned char real_mods;
|
||||||
|
/* FIXME: Make this an int. */
|
||||||
char group_XXX;
|
char group_XXX;
|
||||||
unsigned char affect;
|
unsigned char affect;
|
||||||
unsigned char vmods1;
|
unsigned char vmods1;
|
||||||
|
@ -141,6 +156,7 @@ typedef struct _XkbISOAction {
|
||||||
typedef struct _XkbPtrAction {
|
typedef struct _XkbPtrAction {
|
||||||
unsigned char type;
|
unsigned char type;
|
||||||
unsigned char flags;
|
unsigned char flags;
|
||||||
|
/* FIXME: Make this an int. */
|
||||||
unsigned char high_XXX;
|
unsigned char high_XXX;
|
||||||
unsigned char low_XXX;
|
unsigned char low_XXX;
|
||||||
unsigned char high_YYY;
|
unsigned char high_YYY;
|
||||||
|
@ -165,7 +181,7 @@ typedef struct _XkbPtrDfltAction {
|
||||||
char valueXXX;
|
char valueXXX;
|
||||||
} XkbPtrDfltAction;
|
} XkbPtrDfltAction;
|
||||||
#define XkbSAPtrDfltValue(a) (XkbCharToInt((a)->valueXXX))
|
#define XkbSAPtrDfltValue(a) (XkbCharToInt((a)->valueXXX))
|
||||||
#define XkbSASetPtrDfltValue(a,c) ((a)->valueXXX= ((c)&0xff))
|
#define XkbSASetPtrDfltValue(a, c) ((a)->valueXXX = (c) & 0xff)
|
||||||
|
|
||||||
typedef struct _XkbSwitchScreenAction {
|
typedef struct _XkbSwitchScreenAction {
|
||||||
unsigned char type;
|
unsigned char type;
|
||||||
|
@ -173,24 +189,25 @@ typedef struct _XkbSwitchScreenAction {
|
||||||
char screenXXX;
|
char screenXXX;
|
||||||
} XkbSwitchScreenAction;
|
} XkbSwitchScreenAction;
|
||||||
#define XkbSAScreen(a) (XkbCharToInt((a)->screenXXX))
|
#define XkbSAScreen(a) (XkbCharToInt((a)->screenXXX))
|
||||||
#define XkbSASetScreen(a,s) ((a)->screenXXX= ((s)&0xff))
|
#define XkbSASetScreen(a, s) ((a)->screenXXX = (s) & 0xff)
|
||||||
|
|
||||||
typedef struct _XkbCtrlsAction {
|
typedef struct _XkbCtrlsAction {
|
||||||
unsigned char type;
|
unsigned char type;
|
||||||
unsigned char flags;
|
unsigned char flags;
|
||||||
|
/* FIXME: Make this an int. */
|
||||||
unsigned char ctrls3;
|
unsigned char ctrls3;
|
||||||
unsigned char ctrls2;
|
unsigned char ctrls2;
|
||||||
unsigned char ctrls1;
|
unsigned char ctrls1;
|
||||||
unsigned char ctrls0;
|
unsigned char ctrls0;
|
||||||
} XkbCtrlsAction;
|
} XkbCtrlsAction;
|
||||||
#define XkbActionSetCtrls(a,c) (((a)->ctrls3=(((c)>>24)&0xff)),\
|
#define XkbActionSetCtrls(a, c) ((a)->ctrls3 = ((c) >> 24) & 0xff, \
|
||||||
((a)->ctrls2=(((c)>>16)&0xff)),\
|
(a)->ctrls2 = ((c) >> 16) & 0xff, \
|
||||||
((a)->ctrls1=(((c)>>8)&0xff)),\
|
(a)->ctrls1 = ((c) >> 8) & 0xff, \
|
||||||
((a)->ctrls0=((c)&0xff)))
|
(a)->ctrls0 = (c) & 0xff)
|
||||||
#define XkbActionCtrls(a) ((((unsigned int)(a)->ctrls3)<<24)|\
|
#define XkbActionCtrls(a) ((((unsigned int)(a)->ctrls3)<<24)|\
|
||||||
(((unsigned int)(a)->ctrls2)<<16)|\
|
(((unsigned int)(a)->ctrls2)<<16)|\
|
||||||
(((unsigned int)(a)->ctrls1)<<8)|\
|
(((unsigned int)(a)->ctrls1)<<8)|\
|
||||||
((unsigned int)((a)->ctrls0)))
|
((unsigned int) (a)->ctrls0))
|
||||||
|
|
||||||
typedef struct _XkbMessageAction {
|
typedef struct _XkbMessageAction {
|
||||||
unsigned char type;
|
unsigned char type;
|
||||||
|
@ -203,6 +220,7 @@ typedef struct _XkbRedirectKeyAction {
|
||||||
unsigned char new_key;
|
unsigned char new_key;
|
||||||
unsigned char mods_mask;
|
unsigned char mods_mask;
|
||||||
unsigned char mods;
|
unsigned char mods;
|
||||||
|
/* FIXME: Make this an int. */
|
||||||
unsigned char vmods_mask0;
|
unsigned char vmods_mask0;
|
||||||
unsigned char vmods_mask1;
|
unsigned char vmods_mask1;
|
||||||
unsigned char vmods0;
|
unsigned char vmods0;
|
||||||
|
@ -211,6 +229,7 @@ typedef struct _XkbRedirectKeyAction {
|
||||||
|
|
||||||
#define XkbSARedirectVMods(a) ((((unsigned int)(a)->vmods1)<<8)|\
|
#define XkbSARedirectVMods(a) ((((unsigned int)(a)->vmods1)<<8)|\
|
||||||
((unsigned int)(a)->vmods0))
|
((unsigned int)(a)->vmods0))
|
||||||
|
/* FIXME: This is blatantly not setting vmods. Yeesh. */
|
||||||
#define XkbSARedirectSetVMods(a,m) (((a)->vmods_mask1=(((m)>>8)&0xff)),\
|
#define XkbSARedirectSetVMods(a,m) (((a)->vmods_mask1=(((m)>>8)&0xff)),\
|
||||||
((a)->vmods_mask0=((m)&0xff)))
|
((a)->vmods_mask0=((m)&0xff)))
|
||||||
#define XkbSARedirectVModsMask(a) ((((unsigned int)(a)->vmods_mask1)<<8)|\
|
#define XkbSARedirectVModsMask(a) ((((unsigned int)(a)->vmods_mask1)<<8)|\
|
||||||
|
@ -281,7 +300,8 @@ typedef struct _XkbControls {
|
||||||
|
|
||||||
#define XkbAX_AnyFeedback(c) ((c)->enabled_ctrls&XkbAccessXFeedbackMask)
|
#define XkbAX_AnyFeedback(c) ((c)->enabled_ctrls&XkbAccessXFeedbackMask)
|
||||||
#define XkbAX_NeedOption(c,w) ((c)->ax_options&(w))
|
#define XkbAX_NeedOption(c,w) ((c)->ax_options&(w))
|
||||||
#define XkbAX_NeedFeedback(c,w) (XkbAX_AnyFeedback(c)&&XkbAX_NeedOption(c,w))
|
#define XkbAX_NeedFeedback(c, w) (XkbAX_AnyFeedback((c)) && \
|
||||||
|
XkbAX_NeedOption((c), (w)))
|
||||||
|
|
||||||
typedef struct _XkbServerMapRec {
|
typedef struct _XkbServerMapRec {
|
||||||
unsigned short num_acts;
|
unsigned short num_acts;
|
||||||
|
@ -300,7 +320,7 @@ typedef struct _XkbServerMapRec {
|
||||||
unsigned short *vmodmap;
|
unsigned short *vmodmap;
|
||||||
} XkbServerMapRec, *XkbServerMapPtr;
|
} XkbServerMapRec, *XkbServerMapPtr;
|
||||||
|
|
||||||
#define XkbSMKeyActionsPtr(m,k) (&(m)->acts[(m)->key_acts[k]])
|
#define XkbSMKeyActionsPtr(m, k) (&(m)->acts[(m)->key_acts[(k)]])
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Structures and access macros used primarily by clients
|
* Structures and access macros used primarily by clients
|
||||||
|
@ -326,15 +346,16 @@ typedef struct _XkbClientMapRec {
|
||||||
unsigned char *modmap;
|
unsigned char *modmap;
|
||||||
} XkbClientMapRec, *XkbClientMapPtr;
|
} XkbClientMapRec, *XkbClientMapPtr;
|
||||||
|
|
||||||
#define XkbCMKeyGroupInfo(m,k) ((m)->key_sym_map[k].group_info)
|
#define XkbCMKeyGroupInfo(m, k) ((m)->key_sym_map[(k)].group_info)
|
||||||
#define XkbCMKeyNumGroups(m,k) (XkbNumGroups((m)->key_sym_map[k].group_info))
|
#define XkbCMKeyNumGroups(m, k) (XkbNumGroups((m)->key_sym_map[(k)].group_info))
|
||||||
#define XkbCMKeyGroupWidth(m,k,g) (XkbCMKeyType(m,k,g)->num_levels)
|
#define XkbCMKeyGroupWidth(m, k, g) (XkbCMKeyType((m), (k), (g))->num_levels)
|
||||||
#define XkbCMKeyGroupsWidth(m,k) ((m)->key_sym_map[k].width)
|
#define XkbCMKeyGroupsWidth(m, k) ((m)->key_sym_map[(k)].width)
|
||||||
#define XkbCMKeyTypeIndex(m,k,g) ((m)->key_sym_map[k].kt_index[g&0x3])
|
#define XkbCMKeyTypeIndex(m, k, g) ((m)->key_sym_map[(k)].kt_index[(g) & 0x3])
|
||||||
#define XkbCMKeyType(m,k,g) (&(m)->types[XkbCMKeyTypeIndex(m,k,g)])
|
#define XkbCMKeyType(m, k, g) (&(m)->types[XkbCMKeyTypeIndex((m), (k), (g))])
|
||||||
#define XkbCMKeyNumSyms(m,k) (XkbCMKeyGroupsWidth(m,k)*XkbCMKeyNumGroups(m,k))
|
#define XkbCMKeyNumSyms(m, k) (XkbCMKeyGroupsWidth((m), (k)) * \
|
||||||
#define XkbCMKeySymsOffset(m,k) ((m)->key_sym_map[k].offset)
|
XkbCMKeyNumGroups((m), (k)))
|
||||||
#define XkbCMKeySymsPtr(m,k) (&(m)->syms[XkbCMKeySymsOffset(m,k)])
|
#define XkbCMKeySymsOffset(m, k) ((m)->key_sym_map[(k)].offset)
|
||||||
|
#define XkbCMKeySymsPtr(m, k) (&(m)->syms[XkbCMKeySymsOffset((m), (k))])
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Compatibility structures and access macros
|
* Compatibility structures and access macros
|
||||||
|
@ -358,6 +379,8 @@ typedef struct _XkbCompatMapRec {
|
||||||
|
|
||||||
typedef struct _XkbIndicatorMapRec {
|
typedef struct _XkbIndicatorMapRec {
|
||||||
unsigned char flags;
|
unsigned char flags;
|
||||||
|
/* FIXME: For some reason, interepretation of groups is wildly
|
||||||
|
* different between which being base/latched/locked. */
|
||||||
unsigned char which_groups;
|
unsigned char which_groups;
|
||||||
unsigned char groups;
|
unsigned char groups;
|
||||||
unsigned char which_mods;
|
unsigned char which_mods;
|
||||||
|
@ -365,12 +388,12 @@ typedef struct _XkbIndicatorMapRec {
|
||||||
unsigned int ctrls;
|
unsigned int ctrls;
|
||||||
} XkbIndicatorMapRec, *XkbIndicatorMapPtr;
|
} XkbIndicatorMapRec, *XkbIndicatorMapPtr;
|
||||||
|
|
||||||
#define XkbIM_IsAuto(i) ((((i)->flags&XkbIM_NoAutomatic)==0)&&\
|
#define XkbIM_IsAuto(i) (!((i)->flags & XkbIM_NoAutomatic) && \
|
||||||
(((i)->which_groups&&(i)->groups)||\
|
(((i)->which_groups&&(i)->groups)||\
|
||||||
((i)->which_mods&&(i)->mods.mask)||\
|
((i)->which_mods&&(i)->mods.mask)||\
|
||||||
((i)->ctrls)))
|
(i)->ctrls))
|
||||||
#define XkbIM_InUse(i) (((i)->flags)||((i)->which_groups)||\
|
#define XkbIM_InUse(i) ((i)->flags || (i)->which_groups || (i)->which_mods || \
|
||||||
((i)->which_mods)||((i)->ctrls))
|
(i)->ctrls)
|
||||||
|
|
||||||
|
|
||||||
typedef struct _XkbIndicatorRec {
|
typedef struct _XkbIndicatorRec {
|
||||||
|
@ -428,28 +451,30 @@ typedef struct _XkbDesc {
|
||||||
XkbCompatMapPtr compat;
|
XkbCompatMapPtr compat;
|
||||||
XkbGeometryPtr geom;
|
XkbGeometryPtr geom;
|
||||||
} XkbDescRec, *XkbDescPtr;
|
} XkbDescRec, *XkbDescPtr;
|
||||||
#define XkbKeyKeyTypeIndex(d,k,g) (XkbCMKeyTypeIndex((d)->map,k,g))
|
#define XkbKeyKeyTypeIndex(d, k, g) (XkbCMKeyTypeIndex((d)->map, (k), (g)))
|
||||||
#define XkbKeyKeyType(d,k,g) (XkbCMKeyType((d)->map,k,g))
|
#define XkbKeyKeyType(d, k, g) (XkbCMKeyType((d)->map, (k), (g)))
|
||||||
#define XkbKeyGroupWidth(d,k,g) (XkbCMKeyGroupWidth((d)->map,k,g))
|
#define XkbKeyGroupWidth(d, k, g) (XkbCMKeyGroupWidth((d)->map, (k), (g)))
|
||||||
#define XkbKeyGroupsWidth(d,k) (XkbCMKeyGroupsWidth((d)->map,k))
|
#define XkbKeyGroupsWidth(d, k) (XkbCMKeyGroupsWidth((d)->map, (k)))
|
||||||
#define XkbKeyGroupInfo(d,k) (XkbCMKeyGroupInfo((d)->map,(k)))
|
#define XkbKeyGroupInfo(d,k) (XkbCMKeyGroupInfo((d)->map,(k)))
|
||||||
#define XkbKeyNumGroups(d,k) (XkbCMKeyNumGroups((d)->map,(k)))
|
#define XkbKeyNumGroups(d,k) (XkbCMKeyNumGroups((d)->map,(k)))
|
||||||
#define XkbKeyNumSyms(d,k) (XkbCMKeyNumSyms((d)->map,(k)))
|
#define XkbKeyNumSyms(d,k) (XkbCMKeyNumSyms((d)->map,(k)))
|
||||||
#define XkbKeySymsPtr(d,k) (XkbCMKeySymsPtr((d)->map,(k)))
|
#define XkbKeySymsPtr(d,k) (XkbCMKeySymsPtr((d)->map,(k)))
|
||||||
#define XkbKeySym(d,k,n) (XkbKeySymsPtr(d,k)[n])
|
#define XkbKeySym(d, k, n) (XkbKeySymsPtr((d), (k))[(n)])
|
||||||
#define XkbKeySymEntry(d,k,sl,g) \
|
#define XkbKeySymEntry(d,k,sl,g) \
|
||||||
(XkbKeySym(d,k,((XkbKeyGroupsWidth(d,k)*(g))+(sl))))
|
(XkbKeySym((d), (k), (XkbKeyGroupsWidth((d), (k)) * (g)) + (sl)))
|
||||||
#define XkbKeyAction(d,k,n) \
|
#define XkbKeyAction(d,k,n) \
|
||||||
(XkbKeyHasActions(d,k)?&XkbKeyActionsPtr(d,k)[n]:NULL)
|
(XkbKeyHasActions((d), (k)) ? & XkbKeyActionsPtr((d), (k))[(n)] : NULL)
|
||||||
#define XkbKeyActionEntry(d,k,sl,g) \
|
#define XkbKeyActionEntry(d,k,sl,g) \
|
||||||
(XkbKeyHasActions(d,k)?\
|
(XkbKeyHasActions((d), (k)) ? \
|
||||||
XkbKeyAction(d,k,((XkbKeyGroupsWidth(d,k)*(g))+(sl))):NULL)
|
XkbKeyAction((d), (k), ((XkbKeyGroupsWidth((d), (k)) * (g)) + (sl))) : \
|
||||||
|
NULL)
|
||||||
|
|
||||||
#define XkbKeyHasActions(d,k) ((d)->server->key_acts[k]!=0)
|
#define XkbKeyHasActions(d, k) (!!(d)->server->key_acts[(k)])
|
||||||
#define XkbKeyNumActions(d,k) (XkbKeyHasActions(d,k)?XkbKeyNumSyms(d,k):1)
|
#define XkbKeyNumActions(d, k) (XkbKeyHasActions((d), (k)) ? \
|
||||||
#define XkbKeyActionsPtr(d,k) (XkbSMKeyActionsPtr((d)->server,k))
|
XkbKeyNumSyms((d), (k)) : 1)
|
||||||
#define XkbKeycodeInRange(d,k) (((k)>=(d)->min_key_code)&&\
|
#define XkbKeyActionsPtr(d, k) (XkbSMKeyActionsPtr((d)->server, (k)))
|
||||||
((k)<=(d)->max_key_code))
|
#define XkbKeycodeInRange(d, k) ((k) >= (d)->min_key_code && \
|
||||||
|
(k) <= (d)->max_key_code)
|
||||||
#define XkbNumKeys(d) ((d)->max_key_code-(d)->min_key_code+1)
|
#define XkbNumKeys(d) ((d)->max_key_code-(d)->min_key_code+1)
|
||||||
|
|
||||||
|
|
||||||
|
@ -587,9 +612,9 @@ typedef struct _XkbDeviceInfo {
|
||||||
XkbDeviceLedInfoPtr leds;
|
XkbDeviceLedInfoPtr leds;
|
||||||
} XkbDeviceInfoRec,*XkbDeviceInfoPtr;
|
} XkbDeviceInfoRec,*XkbDeviceInfoPtr;
|
||||||
|
|
||||||
#define XkbXI_DevHasBtnActs(d) (((d)->num_btns>0)&&((d)->btn_acts!=NULL))
|
#define XkbXI_DevHasBtnActs(d) ((d)->num_btns > 0 && (d)->btn_acts)
|
||||||
#define XkbXI_LegalDevBtn(d,b) (XkbXI_DevHasBtnActs(d)&&((b)<(d)->num_btns))
|
#define XkbXI_LegalDevBtn(d,b) (XkbXI_DevHasBtnActs(d) && (b) < (d)->num_btns)
|
||||||
#define XkbXI_DevHasLeds(d) (((d)->num_leds>0)&&((d)->leds!=NULL))
|
#define XkbXI_DevHasLeds(d) ((d)->num_leds > 0 && (d)->leds)
|
||||||
|
|
||||||
typedef struct _XkbDeviceLedChanges {
|
typedef struct _XkbDeviceLedChanges {
|
||||||
unsigned short led_class;
|
unsigned short led_class;
|
||||||
|
|
Loading…
Reference in New Issue