Pull in enough structs and defines from XKBstr.h to only need XKB.h
We want to move away from sharing implementation structs and let libX11 and libxkbcommon use each their own set of structs.master
parent
9d55d5bbf6
commit
9f6026867a
|
@ -58,8 +58,149 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <X11/Xfuncproto.h>
|
||||
#include <X11/extensions/XKBstrcommon.h>
|
||||
#include <X11/extensions/XKBrulescommon.h>
|
||||
#include <X11/extensions/XKB.h>
|
||||
|
||||
#ifndef X_PROTOCOL
|
||||
typedef unsigned char KeyCode;
|
||||
#endif
|
||||
|
||||
#ifndef _XTYPEDEF_BOOL
|
||||
typedef int Bool;
|
||||
#endif
|
||||
|
||||
/* From filecommon */
|
||||
|
||||
#define XkbXKMFile 0
|
||||
#define XkbCFile 1
|
||||
#define XkbXKBFile 2
|
||||
#define XkbMessage 3
|
||||
|
||||
#define XkbMapDefined (1 << 0)
|
||||
#define XkbStateDefined (1 << 1)
|
||||
|
||||
/***====================================================================***/
|
||||
|
||||
#define _XkbSuccess 0
|
||||
#define _XkbErrMissingNames 1
|
||||
#define _XkbErrMissingTypes 2
|
||||
#define _XkbErrMissingReqTypes 3
|
||||
#define _XkbErrMissingSymbols 4
|
||||
#define _XkbErrMissingVMods 5
|
||||
#define _XkbErrMissingIndicators 6
|
||||
#define _XkbErrMissingCompatMap 7
|
||||
#define _XkbErrMissingSymInterps 8
|
||||
#define _XkbErrMissingGeometry 9
|
||||
#define _XkbErrIllegalDoodad 10
|
||||
#define _XkbErrIllegalTOCType 11
|
||||
#define _XkbErrIllegalContents 12
|
||||
#define _XkbErrEmptyFile 13
|
||||
#define _XkbErrFileNotFound 14
|
||||
#define _XkbErrFileCannotOpen 15
|
||||
#define _XkbErrBadValue 16
|
||||
#define _XkbErrBadMatch 17
|
||||
#define _XkbErrBadTypeName 18
|
||||
#define _XkbErrBadTypeWidth 19
|
||||
#define _XkbErrBadFileType 20
|
||||
#define _XkbErrBadFileVersion 21
|
||||
#define _XkbErrBadFileFormat 22
|
||||
#define _XkbErrBadAlloc 23
|
||||
#define _XkbErrBadLength 24
|
||||
#define _XkbErrXReqFailure 25
|
||||
#define _XkbErrBadImplementation 26
|
||||
|
||||
/* From rulescommon */
|
||||
|
||||
#define _XkbKSLower (1 << 0)
|
||||
#define _XkbKSUpper (1 << 1)
|
||||
|
||||
#define XkbKSIsKeypad(k) (((k) >= XK_KP_Space) && ((k) <= XK_KP_Equal))
|
||||
#define XkbKSIsDeadKey(k) \
|
||||
(((k) >= XK_dead_grave) && ((k) <= XK_dead_semivoiced_sound))
|
||||
|
||||
|
||||
|
||||
typedef struct _XkbRMLVOSet {
|
||||
char * rules;
|
||||
char * model;
|
||||
char * layout;
|
||||
char * variant;
|
||||
char * options;
|
||||
} XkbRMLVOSet;
|
||||
|
||||
typedef struct _XkbRF_VarDefs {
|
||||
char * model;
|
||||
char * layout;
|
||||
char * variant;
|
||||
char * options;
|
||||
unsigned short sz_extra;
|
||||
unsigned short num_extra;
|
||||
char * extra_names;
|
||||
char ** extra_values;
|
||||
} XkbRF_VarDefsRec,*XkbRF_VarDefsPtr;
|
||||
|
||||
typedef struct _XkbRF_VarDesc {
|
||||
char * name;
|
||||
char * desc;
|
||||
} XkbRF_VarDescRec, *XkbRF_VarDescPtr;
|
||||
|
||||
typedef struct _XkbRF_DescribeVars {
|
||||
int sz_desc;
|
||||
int num_desc;
|
||||
XkbRF_VarDescPtr desc;
|
||||
} XkbRF_DescribeVarsRec,*XkbRF_DescribeVarsPtr;
|
||||
|
||||
typedef struct _XkbRF_Rule {
|
||||
int number;
|
||||
int layout_num;
|
||||
int variant_num;
|
||||
char * model;
|
||||
char * layout;
|
||||
char * variant;
|
||||
char * option;
|
||||
/* yields */
|
||||
char * keycodes;
|
||||
char * symbols;
|
||||
char * types;
|
||||
char * compat;
|
||||
char * geometry;
|
||||
char * keymap;
|
||||
unsigned flags;
|
||||
} XkbRF_RuleRec,*XkbRF_RulePtr;
|
||||
|
||||
typedef struct _XkbRF_Group {
|
||||
int number;
|
||||
char * name;
|
||||
char * words;
|
||||
} XkbRF_GroupRec, *XkbRF_GroupPtr;
|
||||
|
||||
#define XkbRF_PendingMatch (1L<<1)
|
||||
#define XkbRF_Option (1L<<2)
|
||||
#define XkbRF_Append (1L<<3)
|
||||
#define XkbRF_Normal (1L<<4)
|
||||
#define XkbRF_Invalid (1L<<5)
|
||||
|
||||
typedef struct _XkbRF_Rules {
|
||||
XkbRF_DescribeVarsRec models;
|
||||
XkbRF_DescribeVarsRec layouts;
|
||||
XkbRF_DescribeVarsRec variants;
|
||||
XkbRF_DescribeVarsRec options;
|
||||
unsigned short sz_extra;
|
||||
unsigned short num_extra;
|
||||
char ** extra_names;
|
||||
XkbRF_DescribeVarsPtr extra;
|
||||
|
||||
unsigned short sz_rules;
|
||||
unsigned short num_rules;
|
||||
XkbRF_RulePtr rules;
|
||||
unsigned short sz_groups;
|
||||
unsigned short num_groups;
|
||||
XkbRF_GroupPtr groups;
|
||||
} XkbRF_RulesRec, *XkbRF_RulesPtr;
|
||||
|
||||
#define _XKB_RF_NAMES_PROP_ATOM "_XKB_RULES_NAMES"
|
||||
#define _XKB_RF_NAMES_PROP_MAXLEN 1024
|
||||
|
||||
|
||||
|
||||
/* Action structures used in the server */
|
||||
|
||||
|
@ -80,7 +221,7 @@ struct xkb_mod_action {
|
|||
struct xkb_group_action {
|
||||
unsigned char type;
|
||||
unsigned char flags;
|
||||
int16_t group_XXX;
|
||||
int16_t group;
|
||||
};
|
||||
|
||||
struct xkb_iso_action {
|
||||
|
@ -123,13 +264,13 @@ struct xkb_pointer_default_action {
|
|||
unsigned char type;
|
||||
uint8_t flags;
|
||||
uint8_t affect;
|
||||
uint8_t valueXXX;
|
||||
uint8_t value;
|
||||
};
|
||||
|
||||
struct xkb_switch_screen_action {
|
||||
unsigned char type;
|
||||
uint8_t flags;
|
||||
uint8_t screenXXX;
|
||||
uint8_t screen;
|
||||
};
|
||||
|
||||
struct xkb_redirect_key_action {
|
||||
|
@ -142,6 +283,15 @@ struct xkb_redirect_key_action {
|
|||
unsigned char vmods0;
|
||||
unsigned char vmods1;
|
||||
};
|
||||
#define XkbSARedirectVMods(a) ((((unsigned int)(a)->vmods1)<<8)|\
|
||||
((unsigned int)(a)->vmods0))
|
||||
#define XkbSARedirectSetVMods(a,m) (((a)->vmods_mask1=(((m)>>8)&0xff)),\
|
||||
((a)->vmods_mask0=((m)&0xff)))
|
||||
#define XkbSARedirectVModsMask(a) ((((unsigned int)(a)->vmods_mask1)<<8)|\
|
||||
((unsigned int)(a)->vmods_mask0))
|
||||
#define XkbSARedirectSetVModsMask(a,m) (((a)->vmods_mask1=(((m)>>8)&0xff)),\
|
||||
((a)->vmods_mask0=((m)&0xff)))
|
||||
|
||||
|
||||
struct xkb_pointer_action {
|
||||
unsigned char type;
|
||||
|
@ -151,6 +301,11 @@ struct xkb_pointer_action {
|
|||
unsigned char high_YYY;
|
||||
unsigned char low_YYY;
|
||||
};
|
||||
#define XkbIntTo2Chars(i,h,l) (((h)=((i>>8)&0xff)),((l)=((i)&0xff)))
|
||||
#define XkbPtrActionX(a) (Xkb2CharsToInt((a)->high_XXX,(a)->low_XXX))
|
||||
#define XkbPtrActionY(a) (Xkb2CharsToInt((a)->high_YYY,(a)->low_YYY))
|
||||
#define XkbSetPtrActionX(a,x) (XkbIntTo2Chars(x,(a)->high_XXX,(a)->low_XXX))
|
||||
#define XkbSetPtrActionY(a,y) (XkbIntTo2Chars(y,(a)->high_YYY,(a)->low_YYY))
|
||||
|
||||
struct xkb_message_action {
|
||||
unsigned char type;
|
||||
|
@ -182,58 +337,87 @@ union xkb_action {
|
|||
unsigned char type;
|
||||
};
|
||||
|
||||
typedef struct _XkbcMods {
|
||||
struct xkb_mods {
|
||||
uint32_t mask; /* effective mods */
|
||||
uint32_t vmods;
|
||||
uint8_t real_mods;
|
||||
} XkbcModsRec, *XkbcModsPtr;
|
||||
};
|
||||
|
||||
typedef struct _XkbcKTMapEntry {
|
||||
struct xkb_kt_map_entry {
|
||||
Bool active;
|
||||
uint16_t level;
|
||||
XkbcModsRec mods;
|
||||
} XkbcKTMapEntryRec, *XkbcKTMapEntryPtr;
|
||||
struct xkb_mods mods;
|
||||
};
|
||||
|
||||
typedef struct _XkbcKeyType {
|
||||
XkbcModsRec mods;
|
||||
struct xkb_key_type {
|
||||
struct xkb_mods mods;
|
||||
uint16_t num_levels;
|
||||
unsigned char map_count;
|
||||
XkbcKTMapEntryPtr map;
|
||||
XkbcModsPtr preserve;
|
||||
struct xkb_kt_map_entry * map;
|
||||
struct xkb_mods * preserve;
|
||||
uint32_t name;
|
||||
uint32_t *level_names;
|
||||
} XkbcKeyTypeRec, *XkbcKeyTypePtr;
|
||||
};
|
||||
|
||||
typedef struct _XkbcSymInterpretRec {
|
||||
struct xkb_sym_interpret {
|
||||
uint32_t sym;
|
||||
unsigned char flags;
|
||||
unsigned char match;
|
||||
uint8_t mods; /* XXX real or virt? */
|
||||
uint32_t virtual_mod;
|
||||
struct xkb_any_action act;
|
||||
} XkbcSymInterpretRec, *XkbcSymInterpretPtr;
|
||||
};
|
||||
|
||||
typedef struct _XkbcCompatMapRec {
|
||||
XkbcSymInterpretPtr sym_interpret;
|
||||
XkbcModsRec groups[XkbNumKbdGroups];
|
||||
struct xkb_compat_map {
|
||||
struct xkb_sym_interpret * sym_interpret;
|
||||
struct xkb_mods groups[XkbNumKbdGroups];
|
||||
unsigned short num_si;
|
||||
unsigned short size_si;
|
||||
} XkbcCompatMapRec, *XkbcCompatMapPtr;
|
||||
};
|
||||
|
||||
typedef struct _XkbcClientMapRec {
|
||||
struct xkb_sym_map {
|
||||
unsigned char kt_index[XkbNumKbdGroups];
|
||||
unsigned char group_info;
|
||||
unsigned char width;
|
||||
unsigned short offset;
|
||||
};
|
||||
|
||||
#define XkbNumGroups(g) ((g)&0x0f)
|
||||
#define XkbOutOfRangeGroupInfo(g) ((g)&0xf0)
|
||||
#define XkbOutOfRangeGroupAction(g) ((g)&0xc0)
|
||||
#define XkbOutOfRangeGroupNumber(g) (((g)&0x30)>>4)
|
||||
#define XkbSetGroupInfo(g,w,n) (((w)&0xc0)|(((n)&3)<<4)|((g)&0x0f))
|
||||
#define XkbSetNumGroups(g,n) (((g)&0xf0)|((n)&0x0f))
|
||||
|
||||
struct xkb_client_map {
|
||||
unsigned char size_types;
|
||||
unsigned char num_types;
|
||||
XkbcKeyTypePtr types;
|
||||
struct xkb_key_type * types;
|
||||
|
||||
unsigned short size_syms;
|
||||
unsigned short num_syms;
|
||||
uint32_t *syms;
|
||||
XkbSymMapPtr key_sym_map;
|
||||
struct xkb_sym_map * key_sym_map;
|
||||
|
||||
unsigned char *modmap;
|
||||
} XkbcClientMapRec, *XkbcClientMapPtr;
|
||||
};
|
||||
|
||||
typedef struct _XkbcServerMapRec {
|
||||
#define XkbCMKeyGroupInfo(m,k) ((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 XkbCMKeyGroupsWidth(m,k) ((m)->key_sym_map[k].width)
|
||||
#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 XkbCMKeyNumSyms(m,k) (XkbCMKeyGroupsWidth(m,k)*XkbCMKeyNumGroups(m,k))
|
||||
#define XkbCMKeySymsOffset(m,k) ((m)->key_sym_map[k].offset)
|
||||
#define XkbCMKeySymsPtr(m,k) (&(m)->syms[XkbCMKeySymsOffset(m,k)])
|
||||
|
||||
struct xkb_behavior {
|
||||
unsigned char type;
|
||||
unsigned char data;
|
||||
};
|
||||
|
||||
struct xkb_server_map {
|
||||
unsigned short num_acts;
|
||||
unsigned short size_acts;
|
||||
|
||||
|
@ -245,14 +429,39 @@ typedef struct _XkbcServerMapRec {
|
|||
#endif
|
||||
|
||||
union xkb_action *acts;
|
||||
XkbBehavior *behaviors;
|
||||
struct xkb_behavior *behaviors;
|
||||
unsigned short *key_acts;
|
||||
unsigned char *explicits;
|
||||
uint32_t vmods[XkbNumVirtualMods];
|
||||
uint32_t *vmodmap;
|
||||
} XkbcServerMapRec, *XkbcServerMapPtr;
|
||||
};
|
||||
|
||||
typedef struct _XkbcNamesRec {
|
||||
#define XkbSMKeyActionsPtr(m,k) (&(m)->acts[(m)->key_acts[k]])
|
||||
|
||||
struct xkb_indicator_map {
|
||||
unsigned char flags;
|
||||
unsigned char which_groups;
|
||||
unsigned char groups;
|
||||
unsigned char which_mods;
|
||||
struct xkb_mods mods;
|
||||
unsigned int ctrls;
|
||||
};
|
||||
|
||||
struct xkb_indicator {
|
||||
unsigned long phys_indicators;
|
||||
struct xkb_indicator_map maps[XkbNumIndicators];
|
||||
};
|
||||
|
||||
struct xkb_key_name {
|
||||
char name[XkbKeyNameLength];
|
||||
};
|
||||
|
||||
struct xkb_key_alias {
|
||||
char real[XkbKeyNameLength];
|
||||
char alias[XkbKeyNameLength];
|
||||
};
|
||||
|
||||
struct xkb_names {
|
||||
uint32_t keycodes;
|
||||
uint32_t geometry;
|
||||
uint32_t symbols;
|
||||
|
@ -261,57 +470,57 @@ typedef struct _XkbcNamesRec {
|
|||
uint32_t vmods[XkbNumVirtualMods];
|
||||
uint32_t indicators[XkbNumIndicators];
|
||||
uint32_t groups[XkbNumKbdGroups];
|
||||
XkbKeyNamePtr keys;
|
||||
XkbKeyAliasPtr key_aliases;
|
||||
struct xkb_key_name * keys;
|
||||
struct xkb_key_alias * key_aliases;
|
||||
uint32_t *radio_groups;
|
||||
uint32_t phys_symbols;
|
||||
|
||||
unsigned char num_keys;
|
||||
unsigned char num_key_aliases;
|
||||
unsigned short num_rg;
|
||||
} XkbcNamesRec, *XkbcNamesPtr;
|
||||
};
|
||||
|
||||
typedef struct _XkbcProperty {
|
||||
struct xkb_property {
|
||||
char *name;
|
||||
char *value;
|
||||
} XkbcPropertyRec, *XkbcPropertyPtr;
|
||||
};
|
||||
|
||||
typedef struct _XkbcColor {
|
||||
struct xkb_color {
|
||||
unsigned int pixel;
|
||||
char * spec;
|
||||
} XkbcColorRec, *XkbcColorPtr;
|
||||
};
|
||||
|
||||
typedef struct _XkbcPoint {
|
||||
struct xkb_point {
|
||||
short x;
|
||||
short y;
|
||||
} XkbcPointRec, *XkbcPointPtr;
|
||||
};
|
||||
|
||||
typedef struct _XkbcBounds {
|
||||
struct xkb_bounds {
|
||||
short x1,y1;
|
||||
short x2,y2;
|
||||
} XkbcBoundsRec, *XkbcBoundsPtr;
|
||||
};
|
||||
#define XkbBoundsWidth(b) (((b)->x2)-((b)->x1))
|
||||
#define XkbBoundsHeight(b) (((b)->y2)-((b)->y1))
|
||||
|
||||
typedef struct _XkbcOutline {
|
||||
struct xkb_outline {
|
||||
unsigned short num_points;
|
||||
unsigned short sz_points;
|
||||
unsigned short corner_radius;
|
||||
XkbcPointPtr points;
|
||||
} XkbcOutlineRec, *XkbcOutlinePtr;
|
||||
struct xkb_point * points;
|
||||
};
|
||||
|
||||
typedef struct _XkbcShape {
|
||||
struct xkb_shape {
|
||||
uint32_t name;
|
||||
unsigned short num_outlines;
|
||||
unsigned short sz_outlines;
|
||||
XkbcOutlinePtr outlines;
|
||||
XkbcOutlinePtr approx;
|
||||
XkbcOutlinePtr primary;
|
||||
XkbcBoundsRec bounds;
|
||||
} XkbcShapeRec, *XkbcShapePtr;
|
||||
struct xkb_outline * outlines;
|
||||
struct xkb_outline * approx;
|
||||
struct xkb_outline * primary;
|
||||
struct xkb_bounds bounds;
|
||||
};
|
||||
#define XkbOutlineIndex(s,o) ((int)((o)-&(s)->outlines[0]))
|
||||
|
||||
typedef struct _XkbcShapeDoodad {
|
||||
struct xkb_shape_doodad {
|
||||
uint32_t name;
|
||||
unsigned char type;
|
||||
unsigned char priority;
|
||||
|
@ -320,13 +529,13 @@ typedef struct _XkbcShapeDoodad {
|
|||
short angle;
|
||||
unsigned short color_ndx;
|
||||
unsigned short shape_ndx;
|
||||
} XkbcShapeDoodadRec, *XkbcShapeDoodadPtr;
|
||||
};
|
||||
#define XkbShapeDoodadColor(g,d) (&(g)->colors[(d)->color_ndx])
|
||||
#define XkbShapeDoodadShape(g,d) (&(g)->shapes[(d)->shape_ndx])
|
||||
#define XkbSetShapeDoodadColor(g,d,c) ((d)->color_ndx= (c)-&(g)->colors[0])
|
||||
#define XkbSetShapeDoodadShape(g,d,s) ((d)->shape_ndx= (s)-&(g)->shapes[0])
|
||||
|
||||
typedef struct _XkbcTextDoodad {
|
||||
struct xkb_text_doodad {
|
||||
uint32_t name;
|
||||
unsigned char type;
|
||||
unsigned char priority;
|
||||
|
@ -338,11 +547,11 @@ typedef struct _XkbcTextDoodad {
|
|||
unsigned short color_ndx;
|
||||
char * text;
|
||||
char * font;
|
||||
} XkbcTextDoodadRec, *XkbcTextDoodadPtr;
|
||||
};
|
||||
#define XkbTextDoodadColor(g,d) (&(g)->colors[(d)->color_ndx])
|
||||
#define XkbSetTextDoodadColor(g,d,c) ((d)->color_ndx= (c)-&(g)->colors[0])
|
||||
|
||||
typedef struct _XkbcIndicatorDoodad {
|
||||
struct xkb_indicator_doodad {
|
||||
uint32_t name;
|
||||
unsigned char type;
|
||||
unsigned char priority;
|
||||
|
@ -352,7 +561,7 @@ typedef struct _XkbcIndicatorDoodad {
|
|||
unsigned short shape_ndx;
|
||||
unsigned short on_color_ndx;
|
||||
unsigned short off_color_ndx;
|
||||
} XkbcIndicatorDoodadRec, *XkbcIndicatorDoodadPtr;
|
||||
};
|
||||
#define XkbIndicatorDoodadShape(g,d) (&(g)->shapes[(d)->shape_ndx])
|
||||
#define XkbIndicatorDoodadOnColor(g,d) (&(g)->colors[(d)->on_color_ndx])
|
||||
#define XkbIndicatorDoodadOffColor(g,d) (&(g)->colors[(d)->off_color_ndx])
|
||||
|
@ -363,7 +572,7 @@ typedef struct _XkbcIndicatorDoodad {
|
|||
#define XkbSetIndicatorDoodadShape(g,d,s) \
|
||||
((d)->shape_ndx= (s)-&(g)->shapes[0])
|
||||
|
||||
typedef struct _XkbcLogoDoodad {
|
||||
struct xkb_logo_doodad {
|
||||
uint32_t name;
|
||||
unsigned char type;
|
||||
unsigned char priority;
|
||||
|
@ -373,28 +582,28 @@ typedef struct _XkbcLogoDoodad {
|
|||
unsigned short color_ndx;
|
||||
unsigned short shape_ndx;
|
||||
char * logo_name;
|
||||
} XkbcLogoDoodadRec, *XkbcLogoDoodadPtr;
|
||||
};
|
||||
#define XkbLogoDoodadColor(g,d) (&(g)->colors[(d)->color_ndx])
|
||||
#define XkbLogoDoodadShape(g,d) (&(g)->shapes[(d)->shape_ndx])
|
||||
#define XkbSetLogoDoodadColor(g,d,c) ((d)->color_ndx= (c)-&(g)->colors[0])
|
||||
#define XkbSetLogoDoodadShape(g,d,s) ((d)->shape_ndx= (s)-&(g)->shapes[0])
|
||||
|
||||
typedef struct _XkbcAnyDoodad {
|
||||
struct xkb_any_doodad {
|
||||
uint32_t name;
|
||||
unsigned char type;
|
||||
unsigned char priority;
|
||||
short top;
|
||||
short left;
|
||||
short angle;
|
||||
} XkbcAnyDoodadRec, *XkbcAnyDoodadPtr;
|
||||
};
|
||||
|
||||
typedef union _XkbcDoodad {
|
||||
XkbcAnyDoodadRec any;
|
||||
XkbcShapeDoodadRec shape;
|
||||
XkbcTextDoodadRec text;
|
||||
XkbcIndicatorDoodadRec indicator;
|
||||
XkbcLogoDoodadRec logo;
|
||||
} XkbcDoodadRec, *XkbcDoodadPtr;
|
||||
union xkb_doodad {
|
||||
struct xkb_any_doodad any;
|
||||
struct xkb_shape_doodad shape;
|
||||
struct xkb_text_doodad text;
|
||||
struct xkb_indicator_doodad indicator;
|
||||
struct xkb_logo_doodad logo;
|
||||
};
|
||||
|
||||
#define XkbUnknownDoodad 0
|
||||
#define XkbOutlineDoodad 1
|
||||
|
@ -403,28 +612,28 @@ typedef union _XkbcDoodad {
|
|||
#define XkbIndicatorDoodad 4
|
||||
#define XkbLogoDoodad 5
|
||||
|
||||
typedef struct _XkbcKey {
|
||||
XkbKeyNameRec name;
|
||||
struct xkb_key {
|
||||
struct xkb_key_name name;
|
||||
short gap;
|
||||
unsigned char shape_ndx;
|
||||
unsigned char color_ndx;
|
||||
} XkbcKeyRec, *XkbcKeyPtr;
|
||||
};
|
||||
#define XkbKeyShape(g,k) (&(g)->shapes[(k)->shape_ndx])
|
||||
#define XkbKeyColor(g,k) (&(g)->colors[(k)->color_ndx])
|
||||
#define XkbSetKeyShape(g,k,s) ((k)->shape_ndx= (s)-&(g)->shapes[0])
|
||||
#define XkbSetKeyColor(g,k,c) ((k)->color_ndx= (c)-&(g)->colors[0])
|
||||
|
||||
typedef struct _XkbRow {
|
||||
struct xkb_row {
|
||||
short top;
|
||||
short left;
|
||||
unsigned short num_keys;
|
||||
unsigned short sz_keys;
|
||||
int vertical;
|
||||
XkbcKeyPtr keys;
|
||||
XkbcBoundsRec bounds;
|
||||
} XkbcRowRec, *XkbcRowPtr;
|
||||
struct xkb_key * keys;
|
||||
struct xkb_bounds bounds;
|
||||
};
|
||||
|
||||
typedef struct _XkbcSection {
|
||||
struct xkb_section {
|
||||
uint32_t name;
|
||||
unsigned char priority;
|
||||
short top;
|
||||
|
@ -438,40 +647,40 @@ typedef struct _XkbcSection {
|
|||
unsigned short sz_rows;
|
||||
unsigned short sz_doodads;
|
||||
unsigned short sz_overlays;
|
||||
XkbcRowPtr rows;
|
||||
XkbcDoodadPtr doodads;
|
||||
XkbcBoundsRec bounds;
|
||||
struct _XkbOverlay *overlays;
|
||||
} XkbcSectionRec, *XkbcSectionPtr;
|
||||
struct xkb_row * rows;
|
||||
union xkb_doodad * doodads;
|
||||
struct xkb_bounds bounds;
|
||||
struct xkb_overlay *overlays;
|
||||
};
|
||||
|
||||
typedef struct _XkbcOverlayKey {
|
||||
XkbKeyNameRec over;
|
||||
XkbKeyNameRec under;
|
||||
} XkbcOverlayKeyRec, *XkbcOverlayKeyPtr;
|
||||
struct xkb_overlay_key {
|
||||
struct xkb_key_name over;
|
||||
struct xkb_key_name under;
|
||||
};
|
||||
|
||||
typedef struct _XkbOverlayRow {
|
||||
struct xkb_overlay_row {
|
||||
unsigned short row_under;
|
||||
unsigned short num_keys;
|
||||
unsigned short sz_keys;
|
||||
XkbcOverlayKeyPtr keys;
|
||||
} XkbcOverlayRowRec, *XkbcOverlayRowPtr;
|
||||
struct xkb_overlay_key * keys;
|
||||
};
|
||||
|
||||
typedef struct _XkbOverlay {
|
||||
struct xkb_overlay {
|
||||
uint32_t name;
|
||||
XkbcSectionPtr section_under;
|
||||
struct xkb_section * section_under;
|
||||
unsigned short num_rows;
|
||||
unsigned short sz_rows;
|
||||
XkbcOverlayRowPtr rows;
|
||||
XkbcBoundsPtr bounds;
|
||||
} XkbcOverlayRec, *XkbcOverlayPtr;
|
||||
struct xkb_overlay_row * rows;
|
||||
struct xkb_bounds * bounds;
|
||||
};
|
||||
|
||||
typedef struct _XkbcGeometry {
|
||||
struct xkb_geometry {
|
||||
uint32_t name;
|
||||
unsigned short width_mm;
|
||||
unsigned short height_mm;
|
||||
char * label_font;
|
||||
XkbcColorPtr label_color;
|
||||
XkbcColorPtr base_color;
|
||||
struct xkb_color * label_color;
|
||||
struct xkb_color * base_color;
|
||||
unsigned short sz_properties;
|
||||
unsigned short sz_colors;
|
||||
unsigned short sz_shapes;
|
||||
|
@ -484,13 +693,13 @@ typedef struct _XkbcGeometry {
|
|||
unsigned short num_sections;
|
||||
unsigned short num_doodads;
|
||||
unsigned short num_key_aliases;
|
||||
XkbcPropertyPtr properties;
|
||||
XkbcColorPtr colors;
|
||||
XkbcShapePtr shapes;
|
||||
XkbcSectionPtr sections;
|
||||
XkbcDoodadPtr doodads;
|
||||
XkbKeyAliasPtr key_aliases;
|
||||
} XkbcGeometryRec, *XkbcGeometryPtr;
|
||||
struct xkb_property * properties;
|
||||
struct xkb_color * colors;
|
||||
struct xkb_shape * shapes;
|
||||
struct xkb_section * sections;
|
||||
union xkb_doodad * doodads;
|
||||
struct xkb_key_alias * key_aliases;
|
||||
};
|
||||
#define XkbGeomColorIndex(g,c) ((int)((c)-&(g)->colors[0]))
|
||||
|
||||
#define XkbGeomPropertiesMask (1<<0)
|
||||
|
@ -501,7 +710,7 @@ typedef struct _XkbcGeometry {
|
|||
#define XkbGeomKeyAliasesMask (1<<5)
|
||||
#define XkbGeomAllMask (0x3f)
|
||||
|
||||
typedef struct _XkbcGeometrySizes {
|
||||
struct xkb_geometry_sizes {
|
||||
unsigned int which;
|
||||
unsigned short num_properties;
|
||||
unsigned short num_colors;
|
||||
|
@ -509,24 +718,166 @@ typedef struct _XkbcGeometrySizes {
|
|||
unsigned short num_sections;
|
||||
unsigned short num_doodads;
|
||||
unsigned short num_key_aliases;
|
||||
} XkbcGeometrySizesRec, *XkbcGeometrySizesPtr;
|
||||
};
|
||||
|
||||
struct xkb_controls {
|
||||
unsigned char mk_dflt_btn;
|
||||
unsigned char num_groups;
|
||||
unsigned char groups_wrap;
|
||||
struct xkb_mods internal;
|
||||
struct xkb_mods ignore_lock;
|
||||
unsigned int enabled_ctrls;
|
||||
unsigned short repeat_delay;
|
||||
unsigned short repeat_interval;
|
||||
unsigned short slow_keys_delay;
|
||||
unsigned short debounce_delay;
|
||||
unsigned short mk_delay;
|
||||
unsigned short mk_interval;
|
||||
unsigned short mk_time_to_max;
|
||||
unsigned short mk_max_speed;
|
||||
short mk_curve;
|
||||
unsigned short ax_options;
|
||||
unsigned short ax_timeout;
|
||||
unsigned short axt_opts_mask;
|
||||
unsigned short axt_opts_values;
|
||||
unsigned int axt_ctrls_mask;
|
||||
unsigned int axt_ctrls_values;
|
||||
unsigned char per_key_repeat[XkbPerKeyBitArraySize];
|
||||
};
|
||||
|
||||
/* Common keyboard description structure */
|
||||
typedef struct _XkbcDesc {
|
||||
struct xkb_desc {
|
||||
unsigned int defined;
|
||||
unsigned short flags;
|
||||
unsigned short device_spec;
|
||||
KeyCode min_key_code;
|
||||
KeyCode max_key_code;
|
||||
|
||||
XkbControlsPtr ctrls;
|
||||
XkbcServerMapPtr server;
|
||||
XkbcClientMapPtr map;
|
||||
XkbIndicatorPtr indicators;
|
||||
XkbcNamesPtr names;
|
||||
XkbcCompatMapPtr compat;
|
||||
XkbcGeometryPtr geom;
|
||||
} XkbcDescRec, *XkbcDescPtr;
|
||||
struct xkb_controls * ctrls;
|
||||
struct xkb_server_map * server;
|
||||
struct xkb_client_map * map;
|
||||
struct xkb_indicator * indicators;
|
||||
struct xkb_names * names;
|
||||
struct xkb_compat_map * compat;
|
||||
struct xkb_geometry * geom;
|
||||
};
|
||||
|
||||
#define XkbKeyKeyTypeIndex(d,k,g) (XkbCMKeyTypeIndex((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 XkbKeyGroupsWidth(d,k) (XkbCMKeyGroupsWidth((d)->map,k))
|
||||
#define XkbKeyGroupInfo(d,k) (XkbCMKeyGroupInfo((d)->map,(k)))
|
||||
#define XkbKeyNumGroups(d,k) (XkbCMKeyNumGroups((d)->map,(k)))
|
||||
#define XkbKeyNumSyms(d,k) (XkbCMKeyNumSyms((d)->map,(k)))
|
||||
#define XkbKeySymsPtr(d,k) (XkbCMKeySymsPtr((d)->map,(k)))
|
||||
#define XkbKeySym(d,k,n) (XkbKeySymsPtr(d,k)[n])
|
||||
#define XkbKeySymEntry(d,k,sl,g) \
|
||||
(XkbKeySym(d,k,((XkbKeyGroupsWidth(d,k)*(g))+(sl))))
|
||||
#define XkbKeyAction(d,k,n) \
|
||||
(XkbKeyHasActions(d,k)?&XkbKeyActionsPtr(d,k)[n]:NULL)
|
||||
#define XkbKeyActionEntry(d,k,sl,g) \
|
||||
(XkbKeyHasActions(d,k)?\
|
||||
XkbKeyAction(d,k,((XkbKeyGroupsWidth(d,k)*(g))+(sl))):NULL)
|
||||
|
||||
#define XkbKeyHasActions(d,k) ((d)->server->key_acts[k]!=0)
|
||||
#define XkbKeyNumActions(d,k) (XkbKeyHasActions(d,k)?XkbKeyNumSyms(d,k):1)
|
||||
#define XkbKeyActionsPtr(d,k) (XkbSMKeyActionsPtr((d)->server,k))
|
||||
#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)
|
||||
|
||||
struct xkb_map_changes {
|
||||
unsigned short changed;
|
||||
KeyCode min_key_code;
|
||||
KeyCode max_key_code;
|
||||
unsigned char first_type;
|
||||
unsigned char num_types;
|
||||
KeyCode first_key_sym;
|
||||
unsigned char num_key_syms;
|
||||
KeyCode first_key_act;
|
||||
unsigned char num_key_acts;
|
||||
KeyCode first_key_behavior;
|
||||
unsigned char num_key_behaviors;
|
||||
KeyCode first_key_explicit;
|
||||
unsigned char num_key_explicit;
|
||||
KeyCode first_modmap_key;
|
||||
unsigned char num_modmap_keys;
|
||||
KeyCode first_vmodmap_key;
|
||||
unsigned char num_vmodmap_keys;
|
||||
unsigned char pad;
|
||||
unsigned short vmods;
|
||||
};
|
||||
|
||||
struct xkb_controls_changes {
|
||||
unsigned int changed_ctrls;
|
||||
unsigned int enabled_ctrls_changes;
|
||||
Bool num_groups_changed;
|
||||
};
|
||||
|
||||
struct xkb_indicator_changes {
|
||||
unsigned int state_changes;
|
||||
unsigned int map_changes;
|
||||
};
|
||||
|
||||
struct xkb_name_changes {
|
||||
unsigned int changed;
|
||||
unsigned char first_type;
|
||||
unsigned char num_types;
|
||||
unsigned char first_lvl;
|
||||
unsigned char num_lvls;
|
||||
unsigned char num_aliases;
|
||||
unsigned char num_rg;
|
||||
unsigned char first_key;
|
||||
unsigned char num_keys;
|
||||
unsigned short changed_vmods;
|
||||
unsigned long changed_indicators;
|
||||
unsigned char changed_groups;
|
||||
};
|
||||
|
||||
struct xkb_compat_changes {
|
||||
unsigned char changed_groups;
|
||||
unsigned short first_si;
|
||||
unsigned short num_si;
|
||||
};
|
||||
|
||||
struct xkb_changes {
|
||||
unsigned short device_spec;
|
||||
unsigned short state_changes;
|
||||
struct xkb_map_changes map;
|
||||
struct xkb_controls_changes ctrls;
|
||||
struct xkb_indicator_changes indicators;
|
||||
struct xkb_name_changes names;
|
||||
struct xkb_compat_changes compat;
|
||||
};
|
||||
|
||||
struct xkb_component_names {
|
||||
char * keymap;
|
||||
char * keycodes;
|
||||
char * types;
|
||||
char * compat;
|
||||
char * symbols;
|
||||
char * geometry;
|
||||
};
|
||||
|
||||
struct xkb_component_name {
|
||||
unsigned short flags;
|
||||
char * name;
|
||||
};
|
||||
|
||||
struct xkb_component_list {
|
||||
int num_keymaps;
|
||||
int num_keycodes;
|
||||
int num_types;
|
||||
int num_compat;
|
||||
int num_symbols;
|
||||
int num_geometry;
|
||||
struct xkb_component_name * keymaps;
|
||||
struct xkb_component_name * keycodes;
|
||||
struct xkb_component_name * types;
|
||||
struct xkb_component_name * compat;
|
||||
struct xkb_component_name * symbols;
|
||||
struct xkb_component_name * geometry;
|
||||
};
|
||||
|
||||
_XFUNCPROTOBEGIN
|
||||
|
||||
|
@ -536,17 +887,17 @@ typedef const char *(*GetAtomValueFuncPtr)(uint32_t atom);
|
|||
extern void
|
||||
XkbcInitAtoms(InternAtomFuncPtr intern, GetAtomValueFuncPtr get_atom_value);
|
||||
|
||||
extern XkbcDescPtr
|
||||
extern struct xkb_desc *
|
||||
XkbcCompileKeymapFromRules(const XkbRMLVOSet *rmlvo);
|
||||
|
||||
extern XkbcDescPtr
|
||||
XkbcCompileKeymapFromComponents(const XkbComponentNamesPtr ktcsg);
|
||||
extern struct xkb_desc *
|
||||
XkbcCompileKeymapFromComponents(const struct xkb_component_names * ktcsg);
|
||||
|
||||
extern XkbcDescPtr
|
||||
extern struct xkb_desc *
|
||||
XkbcCompileKeymapFromFile(FILE *inputFile, const char *mapName);
|
||||
|
||||
extern XkbComponentListPtr
|
||||
XkbcListComponents(XkbComponentNamesPtr ptrns, int *maxMatch);
|
||||
extern struct xkb_component_list *
|
||||
XkbcListComponents(struct xkb_component_names * ptrns, int *maxMatch);
|
||||
|
||||
/*
|
||||
* Canonicalises component names by prepending the relevant component from
|
||||
|
@ -563,8 +914,8 @@ XkbcListComponents(XkbComponentNamesPtr ptrns, int *maxMatch);
|
|||
* free()d, and a new one allocated with malloc().
|
||||
*/
|
||||
extern void
|
||||
XkbcCanonicaliseComponents(XkbComponentNamesPtr names,
|
||||
const XkbComponentNamesPtr old);
|
||||
XkbcCanonicaliseComponents(struct xkb_component_names * names,
|
||||
const struct xkb_component_names * old);
|
||||
|
||||
/*
|
||||
* Converts a keysym to a string; will return unknown Unicode codepoints
|
||||
|
|
68
src/alloc.c
68
src/alloc.c
|
@ -33,10 +33,10 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#include <X11/extensions/XKB.h>
|
||||
|
||||
int
|
||||
XkbcAllocCompatMap(XkbcDescPtr xkb, unsigned which, unsigned nSI)
|
||||
XkbcAllocCompatMap(struct xkb_desc * xkb, unsigned which, unsigned nSI)
|
||||
{
|
||||
XkbcCompatMapPtr compat;
|
||||
XkbcSymInterpretRec *prev_interpret;
|
||||
struct xkb_compat_map * compat;
|
||||
struct xkb_sym_interpret *prev_interpret;
|
||||
|
||||
if (!xkb)
|
||||
return BadMatch;
|
||||
|
@ -52,7 +52,7 @@ XkbcAllocCompatMap(XkbcDescPtr xkb, unsigned which, unsigned nSI)
|
|||
|
||||
prev_interpret = compat->sym_interpret;
|
||||
compat->sym_interpret = _XkbTypedRealloc(compat->sym_interpret,
|
||||
nSI, XkbcSymInterpretRec);
|
||||
nSI, struct xkb_sym_interpret);
|
||||
if (!compat->sym_interpret) {
|
||||
free(prev_interpret);
|
||||
compat->size_si = compat->num_si = 0;
|
||||
|
@ -61,17 +61,17 @@ XkbcAllocCompatMap(XkbcDescPtr xkb, unsigned which, unsigned nSI)
|
|||
|
||||
if (compat->num_si != 0)
|
||||
_XkbClearElems(compat->sym_interpret, compat->num_si,
|
||||
compat->size_si - 1, XkbcSymInterpretRec);
|
||||
compat->size_si - 1, struct xkb_sym_interpret);
|
||||
|
||||
return Success;
|
||||
}
|
||||
|
||||
compat = _XkbTypedCalloc(1, XkbcCompatMapRec);
|
||||
compat = _XkbTypedCalloc(1, struct xkb_compat_map);
|
||||
if (!compat)
|
||||
return BadAlloc;
|
||||
|
||||
if (nSI > 0) {
|
||||
compat->sym_interpret = _XkbTypedCalloc(nSI, XkbcSymInterpretRec);
|
||||
compat->sym_interpret = _XkbTypedCalloc(nSI, struct xkb_sym_interpret);
|
||||
if (!compat->sym_interpret) {
|
||||
free(compat);
|
||||
return BadAlloc;
|
||||
|
@ -79,7 +79,7 @@ XkbcAllocCompatMap(XkbcDescPtr xkb, unsigned which, unsigned nSI)
|
|||
}
|
||||
compat->size_si = nSI;
|
||||
compat->num_si = 0;
|
||||
bzero(&compat->groups[0], XkbNumKbdGroups * sizeof(XkbcModsRec));
|
||||
bzero(&compat->groups[0], XkbNumKbdGroups * sizeof(struct xkb_mods));
|
||||
xkb->compat = compat;
|
||||
|
||||
return Success;
|
||||
|
@ -87,9 +87,9 @@ XkbcAllocCompatMap(XkbcDescPtr xkb, unsigned which, unsigned nSI)
|
|||
|
||||
|
||||
void
|
||||
XkbcFreeCompatMap(XkbcDescPtr xkb, unsigned which, Bool freeMap)
|
||||
XkbcFreeCompatMap(struct xkb_desc * xkb, unsigned which, Bool freeMap)
|
||||
{
|
||||
XkbcCompatMapPtr compat;
|
||||
struct xkb_compat_map * compat;
|
||||
|
||||
if (!xkb || !xkb->compat)
|
||||
return;
|
||||
|
@ -99,7 +99,7 @@ XkbcFreeCompatMap(XkbcDescPtr xkb, unsigned which, Bool freeMap)
|
|||
which = XkbAllCompatMask;
|
||||
|
||||
if (which & XkbGroupCompatMask)
|
||||
bzero(&compat->groups[0], XkbNumKbdGroups * sizeof(XkbcModsRec));
|
||||
bzero(&compat->groups[0], XkbNumKbdGroups * sizeof(struct xkb_mods));
|
||||
|
||||
if (which & XkbSymInterpMask) {
|
||||
if (compat->sym_interpret && (compat->size_si > 0))
|
||||
|
@ -115,15 +115,15 @@ XkbcFreeCompatMap(XkbcDescPtr xkb, unsigned which, Bool freeMap)
|
|||
}
|
||||
|
||||
int
|
||||
XkbcAllocNames(XkbcDescPtr xkb, unsigned which, int nTotalRG, int nTotalAliases)
|
||||
XkbcAllocNames(struct xkb_desc * xkb, unsigned which, int nTotalRG, int nTotalAliases)
|
||||
{
|
||||
XkbcNamesPtr names;
|
||||
struct xkb_names * names;
|
||||
|
||||
if (!xkb)
|
||||
return BadMatch;
|
||||
|
||||
if (!xkb->names) {
|
||||
xkb->names = _XkbTypedCalloc(1, XkbcNamesRec);
|
||||
xkb->names = _XkbTypedCalloc(1, struct xkb_names);
|
||||
if (!xkb->names)
|
||||
return BadAlloc;
|
||||
}
|
||||
|
@ -131,7 +131,7 @@ XkbcAllocNames(XkbcDescPtr xkb, unsigned which, int nTotalRG, int nTotalAliases)
|
|||
|
||||
if ((which & XkbKTLevelNamesMask) && xkb->map && xkb->map->types) {
|
||||
int i;
|
||||
XkbcKeyTypePtr type;
|
||||
struct xkb_key_type * type;
|
||||
|
||||
type = xkb->map->types;
|
||||
for (i = 0; i < xkb->map->num_types; i++, type++) {
|
||||
|
@ -149,7 +149,7 @@ XkbcAllocNames(XkbcDescPtr xkb, unsigned which, int nTotalRG, int nTotalAliases)
|
|||
(xkb->max_key_code < xkb->min_key_code))
|
||||
return BadValue;
|
||||
|
||||
names->keys = _XkbTypedCalloc(xkb->max_key_code + 1, XkbKeyNameRec);
|
||||
names->keys = _XkbTypedCalloc(xkb->max_key_code + 1, struct xkb_key_name);
|
||||
if (!names->keys)
|
||||
return BadAlloc;
|
||||
}
|
||||
|
@ -157,16 +157,16 @@ XkbcAllocNames(XkbcDescPtr xkb, unsigned which, int nTotalRG, int nTotalAliases)
|
|||
if ((which & XkbKeyAliasesMask) && (nTotalAliases > 0)) {
|
||||
if (!names->key_aliases)
|
||||
names->key_aliases = _XkbTypedCalloc(nTotalAliases,
|
||||
XkbKeyAliasRec);
|
||||
struct xkb_key_alias);
|
||||
else if (nTotalAliases > names->num_key_aliases) {
|
||||
XkbKeyAliasRec *prev_aliases = names->key_aliases;
|
||||
struct xkb_key_alias *prev_aliases = names->key_aliases;
|
||||
|
||||
names->key_aliases = _XkbTypedRealloc(names->key_aliases,
|
||||
nTotalAliases,
|
||||
XkbKeyAliasRec);
|
||||
struct xkb_key_alias);
|
||||
if (names->key_aliases)
|
||||
_XkbClearElems(names->key_aliases, names->num_key_aliases,
|
||||
nTotalAliases - 1, XkbKeyAliasRec);
|
||||
nTotalAliases - 1, struct xkb_key_alias);
|
||||
else
|
||||
free(prev_aliases);
|
||||
}
|
||||
|
@ -204,9 +204,9 @@ XkbcAllocNames(XkbcDescPtr xkb, unsigned which, int nTotalRG, int nTotalAliases)
|
|||
}
|
||||
|
||||
void
|
||||
XkbcFreeNames(XkbcDescPtr xkb, unsigned which, Bool freeMap)
|
||||
XkbcFreeNames(struct xkb_desc * xkb, unsigned which, Bool freeMap)
|
||||
{
|
||||
XkbcNamesPtr names;
|
||||
struct xkb_names * names;
|
||||
|
||||
if (!xkb || !xkb->names)
|
||||
return;
|
||||
|
@ -216,11 +216,11 @@ XkbcFreeNames(XkbcDescPtr xkb, unsigned which, Bool freeMap)
|
|||
which = XkbAllNamesMask;
|
||||
|
||||
if (which & XkbKTLevelNamesMask) {
|
||||
XkbcClientMapPtr map = xkb->map;
|
||||
struct xkb_client_map * map = xkb->map;
|
||||
|
||||
if (map && map->types) {
|
||||
int i;
|
||||
XkbcKeyTypePtr type = map->types;
|
||||
struct xkb_key_type * type = map->types;
|
||||
|
||||
for (i = 0; i < map->num_types; i++, type++) {
|
||||
if (type->level_names) {
|
||||
|
@ -256,13 +256,13 @@ XkbcFreeNames(XkbcDescPtr xkb, unsigned which, Bool freeMap)
|
|||
}
|
||||
|
||||
int
|
||||
XkbcAllocControls(XkbcDescPtr xkb, unsigned which)
|
||||
XkbcAllocControls(struct xkb_desc * xkb, unsigned which)
|
||||
{
|
||||
if (!xkb)
|
||||
return BadMatch;
|
||||
|
||||
if (!xkb->ctrls) {
|
||||
xkb->ctrls = _XkbTypedCalloc(1, XkbControlsRec);
|
||||
xkb->ctrls = _XkbTypedCalloc(1, struct xkb_controls);
|
||||
if (!xkb->ctrls)
|
||||
return BadAlloc;
|
||||
}
|
||||
|
@ -271,7 +271,7 @@ XkbcAllocControls(XkbcDescPtr xkb, unsigned which)
|
|||
}
|
||||
|
||||
void
|
||||
XkbcFreeControls(XkbcDescPtr xkb, unsigned which, Bool freeMap)
|
||||
XkbcFreeControls(struct xkb_desc * xkb, unsigned which, Bool freeMap)
|
||||
{
|
||||
if (freeMap && xkb && xkb->ctrls) {
|
||||
free(xkb->ctrls);
|
||||
|
@ -280,13 +280,13 @@ XkbcFreeControls(XkbcDescPtr xkb, unsigned which, Bool freeMap)
|
|||
}
|
||||
|
||||
int
|
||||
XkbcAllocIndicatorMaps(XkbcDescPtr xkb)
|
||||
XkbcAllocIndicatorMaps(struct xkb_desc * xkb)
|
||||
{
|
||||
if (!xkb)
|
||||
return BadMatch;
|
||||
|
||||
if (!xkb->indicators) {
|
||||
xkb->indicators = _XkbTypedCalloc(1, XkbIndicatorRec);
|
||||
xkb->indicators = _XkbTypedCalloc(1, struct xkb_indicator);
|
||||
if (!xkb->indicators)
|
||||
return BadAlloc;
|
||||
}
|
||||
|
@ -295,7 +295,7 @@ XkbcAllocIndicatorMaps(XkbcDescPtr xkb)
|
|||
}
|
||||
|
||||
void
|
||||
XkbcFreeIndicatorMaps(XkbcDescPtr xkb)
|
||||
XkbcFreeIndicatorMaps(struct xkb_desc * xkb)
|
||||
{
|
||||
if (xkb && xkb->indicators) {
|
||||
free(xkb->indicators);
|
||||
|
@ -303,19 +303,19 @@ XkbcFreeIndicatorMaps(XkbcDescPtr xkb)
|
|||
}
|
||||
}
|
||||
|
||||
XkbcDescRec *
|
||||
struct xkb_desc *
|
||||
XkbcAllocKeyboard(void)
|
||||
{
|
||||
XkbcDescRec *xkb;
|
||||
struct xkb_desc *xkb;
|
||||
|
||||
xkb = _XkbTypedCalloc(1, XkbcDescRec);
|
||||
xkb = _XkbTypedCalloc(1, struct xkb_desc);
|
||||
if (xkb)
|
||||
xkb->device_spec = XkbUseCoreKbd;
|
||||
return xkb;
|
||||
}
|
||||
|
||||
void
|
||||
XkbcFreeKeyboard(XkbcDescPtr xkb, unsigned which, Bool freeAll)
|
||||
XkbcFreeKeyboard(struct xkb_desc * xkb, unsigned which, Bool freeAll)
|
||||
{
|
||||
if (!xkb)
|
||||
return;
|
||||
|
|
224
src/galloc.c
224
src/galloc.c
|
@ -115,7 +115,7 @@ _XkbFreeGeomNonLeafElems(Bool freeAll, int first, int count,
|
|||
static void
|
||||
_XkbClearProperty(char *prop_in)
|
||||
{
|
||||
XkbcPropertyPtr prop = (XkbcPropertyPtr)prop_in;
|
||||
struct xkb_property * prop = (struct xkb_property *)prop_in;
|
||||
|
||||
if (prop->name) {
|
||||
free(prop->name);
|
||||
|
@ -128,113 +128,113 @@ _XkbClearProperty(char *prop_in)
|
|||
}
|
||||
|
||||
void
|
||||
XkbcFreeGeomProperties(XkbcGeometryPtr geom, int first, int count, Bool freeAll)
|
||||
XkbcFreeGeomProperties(struct xkb_geometry * geom, int first, int count, Bool freeAll)
|
||||
{
|
||||
_XkbFreeGeomNonLeafElems(freeAll, first, count,
|
||||
&geom->num_properties, &geom->sz_properties,
|
||||
(char **)&geom->properties,
|
||||
sizeof(XkbcPropertyRec),
|
||||
sizeof(struct xkb_property),
|
||||
_XkbClearProperty);
|
||||
}
|
||||
|
||||
void
|
||||
XkbcFreeGeomKeyAliases(XkbcGeometryPtr geom, int first, int count, Bool freeAll)
|
||||
XkbcFreeGeomKeyAliases(struct xkb_geometry * geom, int first, int count, Bool freeAll)
|
||||
{
|
||||
_XkbFreeGeomLeafElems(freeAll, first, count,
|
||||
&geom->num_key_aliases, &geom->sz_key_aliases,
|
||||
(char **)&geom->key_aliases,
|
||||
sizeof(XkbKeyAliasRec));
|
||||
sizeof(struct xkb_key_alias));
|
||||
}
|
||||
|
||||
static void
|
||||
_XkbClearColor(char *color_in)
|
||||
{
|
||||
XkbcColorPtr color = (XkbcColorPtr)color_in;
|
||||
struct xkb_color * color = (struct xkb_color *)color_in;
|
||||
|
||||
if (color->spec)
|
||||
free(color->spec);
|
||||
}
|
||||
|
||||
void
|
||||
XkbcFreeGeomColors(XkbcGeometryPtr geom, int first, int count, Bool freeAll)
|
||||
XkbcFreeGeomColors(struct xkb_geometry * geom, int first, int count, Bool freeAll)
|
||||
{
|
||||
_XkbFreeGeomNonLeafElems(freeAll, first, count,
|
||||
&geom->num_colors, &geom->sz_colors,
|
||||
(char **)&geom->colors, sizeof(XkbcColorRec),
|
||||
(char **)&geom->colors, sizeof(struct xkb_color),
|
||||
_XkbClearColor);
|
||||
}
|
||||
|
||||
void
|
||||
XkbcFreeGeomPoints(XkbcOutlinePtr outline, int first, int count, Bool freeAll)
|
||||
XkbcFreeGeomPoints(struct xkb_outline * outline, int first, int count, Bool freeAll)
|
||||
{
|
||||
_XkbFreeGeomLeafElems(freeAll, first, count,
|
||||
&outline->num_points, &outline->sz_points,
|
||||
(char **)&outline->points, sizeof(XkbcPointRec));
|
||||
(char **)&outline->points, sizeof(struct xkb_point));
|
||||
}
|
||||
|
||||
static void
|
||||
_XkbClearOutline(char *outline_in)
|
||||
{
|
||||
XkbcOutlinePtr outline = (XkbcOutlinePtr)outline_in;
|
||||
struct xkb_outline * outline = (struct xkb_outline *)outline_in;
|
||||
|
||||
if (outline->points)
|
||||
XkbcFreeGeomPoints(outline, 0, outline->num_points, True);
|
||||
}
|
||||
|
||||
void
|
||||
XkbcFreeGeomOutlines(XkbcShapePtr shape, int first, int count, Bool freeAll)
|
||||
XkbcFreeGeomOutlines(struct xkb_shape * shape, int first, int count, Bool freeAll)
|
||||
{
|
||||
_XkbFreeGeomNonLeafElems(freeAll, first, count,
|
||||
&shape->num_outlines, &shape->sz_outlines,
|
||||
(char **)&shape->outlines, sizeof(XkbcOutlineRec),
|
||||
(char **)&shape->outlines, sizeof(struct xkb_outline),
|
||||
_XkbClearOutline);
|
||||
}
|
||||
|
||||
static void
|
||||
_XkbClearShape(char *shape_in)
|
||||
{
|
||||
XkbcShapePtr shape = (XkbcShapePtr)shape_in;
|
||||
struct xkb_shape * shape = (struct xkb_shape *)shape_in;
|
||||
|
||||
if (shape->outlines)
|
||||
XkbcFreeGeomOutlines(shape, 0, shape->num_outlines, True);
|
||||
}
|
||||
|
||||
void
|
||||
XkbcFreeGeomShapes(XkbcGeometryPtr geom, int first, int count, Bool freeAll)
|
||||
XkbcFreeGeomShapes(struct xkb_geometry * geom, int first, int count, Bool freeAll)
|
||||
{
|
||||
_XkbFreeGeomNonLeafElems(freeAll, first, count,
|
||||
&geom->num_shapes, &geom->sz_shapes,
|
||||
(char **)&geom->shapes, sizeof(XkbcShapeRec),
|
||||
(char **)&geom->shapes, sizeof(struct xkb_shape),
|
||||
_XkbClearShape);
|
||||
}
|
||||
|
||||
void
|
||||
XkbcFreeGeomOverlayKeys(XkbcOverlayRowPtr row, int first, int count,
|
||||
XkbcFreeGeomOverlayKeys(struct xkb_overlay_row * row, int first, int count,
|
||||
Bool freeAll)
|
||||
{
|
||||
_XkbFreeGeomLeafElems(freeAll, first, count,
|
||||
&row->num_keys, &row->sz_keys,
|
||||
(char **)&row->keys, sizeof(XkbcOverlayKeyRec));
|
||||
(char **)&row->keys, sizeof(struct xkb_overlay_key));
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
_XkbClearOverlayRow(char *row_in)
|
||||
{
|
||||
XkbcOverlayRowPtr row = (XkbcOverlayRowPtr)row_in;
|
||||
struct xkb_overlay_row * row = (struct xkb_overlay_row *)row_in;
|
||||
|
||||
if (row->keys)
|
||||
XkbcFreeGeomOverlayKeys(row, 0, row->num_keys, True);
|
||||
}
|
||||
|
||||
void
|
||||
XkbcFreeGeomOverlayRows(XkbcOverlayPtr overlay, int first, int count,
|
||||
XkbcFreeGeomOverlayRows(struct xkb_overlay * overlay, int first, int count,
|
||||
Bool freeAll)
|
||||
{
|
||||
_XkbFreeGeomNonLeafElems(freeAll, first, count,
|
||||
&overlay->num_rows, &overlay->sz_rows,
|
||||
(char **)&overlay->rows,
|
||||
sizeof(XkbcOverlayRowRec),
|
||||
sizeof(struct xkb_overlay_row),
|
||||
_XkbClearOverlayRow);
|
||||
}
|
||||
|
||||
|
@ -242,47 +242,47 @@ XkbcFreeGeomOverlayRows(XkbcOverlayPtr overlay, int first, int count,
|
|||
static void
|
||||
_XkbClearOverlay(char *overlay_in)
|
||||
{
|
||||
XkbcOverlayPtr overlay = (XkbcOverlayPtr)overlay_in;
|
||||
struct xkb_overlay * overlay = (struct xkb_overlay *)overlay_in;
|
||||
|
||||
if (overlay->rows)
|
||||
XkbcFreeGeomOverlayRows(overlay, 0, overlay->num_rows, True);
|
||||
}
|
||||
|
||||
void
|
||||
XkbcFreeGeomOverlays(XkbcSectionPtr section, int first, int count, Bool freeAll)
|
||||
XkbcFreeGeomOverlays(struct xkb_section * section, int first, int count, Bool freeAll)
|
||||
{
|
||||
_XkbFreeGeomNonLeafElems(freeAll, first, count,
|
||||
§ion->num_overlays, §ion->sz_overlays,
|
||||
(char **)§ion->overlays,
|
||||
sizeof(XkbcOverlayRec),
|
||||
sizeof(struct xkb_overlay),
|
||||
_XkbClearOverlay);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
XkbcFreeGeomKeys(XkbcRowPtr row, int first, int count, Bool freeAll)
|
||||
XkbcFreeGeomKeys(struct xkb_row * row, int first, int count, Bool freeAll)
|
||||
{
|
||||
_XkbFreeGeomLeafElems(freeAll, first, count,
|
||||
&row->num_keys, &row->sz_keys,
|
||||
(char **)&row->keys, sizeof(XkbcKeyRec));
|
||||
(char **)&row->keys, sizeof(struct xkb_key));
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
_XkbClearRow(char *row_in)
|
||||
{
|
||||
XkbcRowPtr row = (XkbcRowPtr)row_in;
|
||||
struct xkb_row * row = (struct xkb_row *)row_in;
|
||||
|
||||
if (row->keys)
|
||||
XkbcFreeGeomKeys(row, 0, row->num_keys, True);
|
||||
}
|
||||
|
||||
void
|
||||
XkbcFreeGeomRows(XkbcSectionPtr section, int first, int count, Bool freeAll)
|
||||
XkbcFreeGeomRows(struct xkb_section * section, int first, int count, Bool freeAll)
|
||||
{
|
||||
_XkbFreeGeomNonLeafElems(freeAll, first, count,
|
||||
§ion->num_rows, §ion->sz_rows,
|
||||
(char **)§ion->rows, sizeof(XkbcRowRec),
|
||||
(char **)§ion->rows, sizeof(struct xkb_row),
|
||||
_XkbClearRow);
|
||||
}
|
||||
|
||||
|
@ -290,7 +290,7 @@ XkbcFreeGeomRows(XkbcSectionPtr section, int first, int count, Bool freeAll)
|
|||
static void
|
||||
_XkbClearSection(char *section_in)
|
||||
{
|
||||
XkbcSectionPtr section = (XkbcSectionPtr)section_in;
|
||||
struct xkb_section * section = (struct xkb_section *)section_in;
|
||||
|
||||
if (section->rows)
|
||||
XkbcFreeGeomRows(section, 0, section->num_rows, True);
|
||||
|
@ -301,11 +301,11 @@ _XkbClearSection(char *section_in)
|
|||
}
|
||||
|
||||
void
|
||||
XkbcFreeGeomSections(XkbcGeometryPtr geom, int first, int count, Bool freeAll)
|
||||
XkbcFreeGeomSections(struct xkb_geometry * geom, int first, int count, Bool freeAll)
|
||||
{
|
||||
_XkbFreeGeomNonLeafElems(freeAll, first, count,
|
||||
&geom->num_sections, &geom->sz_sections,
|
||||
(char **)&geom->sections, sizeof(XkbcSectionRec),
|
||||
(char **)&geom->sections, sizeof(struct xkb_section),
|
||||
_XkbClearSection);
|
||||
}
|
||||
|
||||
|
@ -313,7 +313,7 @@ XkbcFreeGeomSections(XkbcGeometryPtr geom, int first, int count, Bool freeAll)
|
|||
static void
|
||||
_XkbClearDoodad(char *doodad_in)
|
||||
{
|
||||
XkbcDoodadPtr doodad = (XkbcDoodadPtr)doodad_in;
|
||||
union xkb_doodad * doodad = (union xkb_doodad *)doodad_in;
|
||||
|
||||
switch (doodad->any.type) {
|
||||
case XkbTextDoodad:
|
||||
|
@ -337,10 +337,10 @@ _XkbClearDoodad(char *doodad_in)
|
|||
}
|
||||
|
||||
void
|
||||
XkbcFreeGeomDoodads(XkbcDoodadPtr doodads, int nDoodads, Bool freeAll)
|
||||
XkbcFreeGeomDoodads(union xkb_doodad * doodads, int nDoodads, Bool freeAll)
|
||||
{
|
||||
int i;
|
||||
XkbcDoodadPtr doodad;
|
||||
union xkb_doodad * doodad;
|
||||
|
||||
if (doodads) {
|
||||
for (i = 0, doodad = doodads; i < nDoodads; i++, doodad++)
|
||||
|
@ -351,7 +351,7 @@ XkbcFreeGeomDoodads(XkbcDoodadPtr doodads, int nDoodads, Bool freeAll)
|
|||
}
|
||||
|
||||
void
|
||||
XkbcFreeGeometry(XkbcGeometryPtr geom, unsigned which, Bool freeMap)
|
||||
XkbcFreeGeometry(struct xkb_geometry * geom, unsigned which, Bool freeMap)
|
||||
{
|
||||
if (!geom)
|
||||
return;
|
||||
|
@ -424,137 +424,137 @@ _XkbGeomAlloc(char **old, unsigned short *num, unsigned short *total,
|
|||
#define _XkbAllocProps(g, n) _XkbGeomAlloc((char **)&(g)->properties, \
|
||||
&(g)->num_properties, \
|
||||
&(g)->sz_properties, \
|
||||
(n), sizeof(XkbcPropertyRec))
|
||||
(n), sizeof(struct xkb_property))
|
||||
#define _XkbAllocColors(g, n) _XkbGeomAlloc((char **)&(g)->colors, \
|
||||
&(g)->num_colors, \
|
||||
&(g)->sz_colors, \
|
||||
(n), sizeof(XkbcColorRec))
|
||||
(n), sizeof(struct xkb_color))
|
||||
#define _XkbAllocShapes(g, n) _XkbGeomAlloc((char **)&(g)->shapes, \
|
||||
&(g)->num_shapes, \
|
||||
&(g)->sz_shapes, \
|
||||
(n), sizeof(XkbcShapeRec))
|
||||
(n), sizeof(struct xkb_shape))
|
||||
#define _XkbAllocSections(g, n) _XkbGeomAlloc((char **)&(g)->sections, \
|
||||
&(g)->num_sections, \
|
||||
&(g)->sz_sections, \
|
||||
(n), sizeof(XkbcSectionRec))
|
||||
(n), sizeof(struct xkb_section))
|
||||
#define _XkbAllocDoodads(g, n) _XkbGeomAlloc((char **)&(g)->doodads, \
|
||||
&(g)->num_doodads, \
|
||||
&(g)->sz_doodads, \
|
||||
(n), sizeof(XkbcDoodadRec))
|
||||
(n), sizeof(union xkb_doodad))
|
||||
#define _XkbAllocKeyAliases(g, n) _XkbGeomAlloc((char **)&(g)->key_aliases, \
|
||||
&(g)->num_key_aliases, \
|
||||
&(g)->sz_key_aliases, \
|
||||
(n), sizeof(XkbKeyAliasRec))
|
||||
(n), sizeof(struct xkb_key_alias))
|
||||
|
||||
#define _XkbAllocOutlines(s, n) _XkbGeomAlloc((char **)&(s)->outlines, \
|
||||
&(s)->num_outlines, \
|
||||
&(s)->sz_outlines, \
|
||||
(n), sizeof(XkbcOutlineRec))
|
||||
(n), sizeof(struct xkb_outline))
|
||||
#define _XkbAllocRows(s, n) _XkbGeomAlloc((char **)&(s)->rows, \
|
||||
&(s)->num_rows, \
|
||||
&(s)->sz_rows, \
|
||||
(n), sizeof(XkbcRowRec))
|
||||
(n), sizeof(struct xkb_row))
|
||||
#define _XkbAllocPoints(o, n) _XkbGeomAlloc((char **)&(o)->points, \
|
||||
&(o)->num_points, \
|
||||
&(o)->sz_points, \
|
||||
(n), sizeof(XkbcPointRec))
|
||||
(n), sizeof(struct xkb_point))
|
||||
#define _XkbAllocKeys(r, n) _XkbGeomAlloc((char **)&(r)->keys, \
|
||||
&(r)->num_keys, \
|
||||
&(r)->sz_keys, \
|
||||
(n), sizeof(XkbcKeyRec))
|
||||
(n), sizeof(struct xkb_key))
|
||||
#define _XkbAllocOverlays(s, n) _XkbGeomAlloc((char **)&(s)->overlays, \
|
||||
&(s)->num_overlays, \
|
||||
&(s)->sz_overlays, \
|
||||
(n), sizeof(XkbcOverlayRec))
|
||||
(n), sizeof(struct xkb_overlay))
|
||||
#define _XkbAllocOverlayRows(o, n) _XkbGeomAlloc((char **)&(o)->rows, \
|
||||
&(o)->num_rows, \
|
||||
&(o)->sz_rows, \
|
||||
(n), sizeof(XkbcOverlayRowRec))
|
||||
(n), sizeof(struct xkb_overlay_row))
|
||||
#define _XkbAllocOverlayKeys(r, n) _XkbGeomAlloc((char **)&(r)->keys, \
|
||||
&(r)->num_keys, \
|
||||
&(r)->sz_keys, \
|
||||
(n), sizeof(XkbcOverlayKeyRec))
|
||||
(n), sizeof(struct xkb_overlay_key))
|
||||
|
||||
int
|
||||
XkbcAllocGeomProps(XkbcGeometryPtr geom, int nProps)
|
||||
XkbcAllocGeomProps(struct xkb_geometry * geom, int nProps)
|
||||
{
|
||||
return _XkbAllocProps(geom, nProps);
|
||||
}
|
||||
|
||||
int
|
||||
XkbcAllocGeomColors(XkbcGeometryPtr geom, int nColors)
|
||||
XkbcAllocGeomColors(struct xkb_geometry * geom, int nColors)
|
||||
{
|
||||
return _XkbAllocColors(geom, nColors);
|
||||
}
|
||||
|
||||
int
|
||||
XkbcAllocGeomKeyAliases(XkbcGeometryPtr geom, int nKeyAliases)
|
||||
XkbcAllocGeomKeyAliases(struct xkb_geometry * geom, int nKeyAliases)
|
||||
{
|
||||
return _XkbAllocKeyAliases(geom, nKeyAliases);
|
||||
}
|
||||
|
||||
int
|
||||
XkbcAllocGeomShapes(XkbcGeometryPtr geom, int nShapes)
|
||||
XkbcAllocGeomShapes(struct xkb_geometry * geom, int nShapes)
|
||||
{
|
||||
return _XkbAllocShapes(geom, nShapes);
|
||||
}
|
||||
|
||||
int
|
||||
XkbcAllocGeomSections(XkbcGeometryPtr geom, int nSections)
|
||||
XkbcAllocGeomSections(struct xkb_geometry * geom, int nSections)
|
||||
{
|
||||
return _XkbAllocSections(geom, nSections);
|
||||
}
|
||||
|
||||
int
|
||||
XkbcAllocGeomOverlays(XkbcSectionPtr section, int nOverlays)
|
||||
XkbcAllocGeomOverlays(struct xkb_section * section, int nOverlays)
|
||||
{
|
||||
return _XkbAllocOverlays(section, nOverlays);
|
||||
}
|
||||
|
||||
int
|
||||
XkbcAllocGeomOverlayRows(XkbcOverlayPtr overlay, int nRows)
|
||||
XkbcAllocGeomOverlayRows(struct xkb_overlay * overlay, int nRows)
|
||||
{
|
||||
return _XkbAllocOverlayRows(overlay, nRows);
|
||||
}
|
||||
|
||||
int
|
||||
XkbcAllocGeomOverlayKeys(XkbcOverlayRowPtr row, int nKeys)
|
||||
XkbcAllocGeomOverlayKeys(struct xkb_overlay_row * row, int nKeys)
|
||||
{
|
||||
return _XkbAllocOverlayKeys(row, nKeys);
|
||||
}
|
||||
|
||||
int
|
||||
XkbcAllocGeomDoodads(XkbcGeometryPtr geom, int nDoodads)
|
||||
XkbcAllocGeomDoodads(struct xkb_geometry * geom, int nDoodads)
|
||||
{
|
||||
return _XkbAllocDoodads(geom, nDoodads);
|
||||
}
|
||||
|
||||
int
|
||||
XkbcAllocGeomSectionDoodads(XkbcSectionPtr section, int nDoodads)
|
||||
XkbcAllocGeomSectionDoodads(struct xkb_section * section, int nDoodads)
|
||||
{
|
||||
return _XkbAllocDoodads(section, nDoodads);
|
||||
}
|
||||
|
||||
int
|
||||
XkbcAllocGeomOutlines(XkbcShapePtr shape, int nOL)
|
||||
XkbcAllocGeomOutlines(struct xkb_shape * shape, int nOL)
|
||||
{
|
||||
return _XkbAllocOutlines(shape, nOL);
|
||||
}
|
||||
|
||||
int
|
||||
XkbcAllocGeomRows(XkbcSectionPtr section, int nRows)
|
||||
XkbcAllocGeomRows(struct xkb_section * section, int nRows)
|
||||
{
|
||||
return _XkbAllocRows(section, nRows);
|
||||
}
|
||||
|
||||
int
|
||||
XkbcAllocGeomPoints(XkbcOutlinePtr ol, int nPts)
|
||||
XkbcAllocGeomPoints(struct xkb_outline * ol, int nPts)
|
||||
{
|
||||
return _XkbAllocPoints(ol, nPts);
|
||||
}
|
||||
|
||||
int
|
||||
XkbcAllocGeomKeys(XkbcRowPtr row, int nKeys)
|
||||
XkbcAllocGeomKeys(struct xkb_row * row, int nKeys)
|
||||
{
|
||||
int ret = _XkbAllocKeys(row, nKeys);
|
||||
fprintf(stderr, "!!! allocated %d keys at %p\n", nKeys, row->keys);
|
||||
|
@ -562,13 +562,13 @@ XkbcAllocGeomKeys(XkbcRowPtr row, int nKeys)
|
|||
}
|
||||
|
||||
int
|
||||
XkbcAllocGeometry(XkbcDescPtr xkb, XkbcGeometrySizesPtr sizes)
|
||||
XkbcAllocGeometry(struct xkb_desc * xkb, struct xkb_geometry_sizes * sizes)
|
||||
{
|
||||
XkbcGeometryPtr geom;
|
||||
struct xkb_geometry * geom;
|
||||
int rtrn;
|
||||
|
||||
if (!xkb->geom) {
|
||||
xkb->geom = _XkbTypedCalloc(1, XkbcGeometryRec);
|
||||
xkb->geom = _XkbTypedCalloc(1, struct xkb_geometry);
|
||||
if (!xkb->geom)
|
||||
return BadAlloc;
|
||||
}
|
||||
|
@ -605,11 +605,11 @@ bail:
|
|||
return rtrn;
|
||||
}
|
||||
|
||||
XkbcPropertyPtr
|
||||
XkbcAddGeomProperty(XkbcGeometryPtr geom,const char *name,const char *value)
|
||||
struct xkb_property *
|
||||
XkbcAddGeomProperty(struct xkb_geometry * geom,const char *name,const char *value)
|
||||
{
|
||||
register int i;
|
||||
register XkbcPropertyPtr prop;
|
||||
register struct xkb_property * prop;
|
||||
|
||||
if ((!geom)||(!name)||(!value))
|
||||
return NULL;
|
||||
|
@ -643,11 +643,11 @@ register XkbcPropertyPtr prop;
|
|||
return prop;
|
||||
}
|
||||
|
||||
XkbKeyAliasPtr
|
||||
XkbcAddGeomKeyAlias(XkbcGeometryPtr geom,const char *aliasStr,const char *realStr)
|
||||
struct xkb_key_alias *
|
||||
XkbcAddGeomKeyAlias(struct xkb_geometry * geom,const char *aliasStr,const char *realStr)
|
||||
{
|
||||
register int i;
|
||||
register XkbKeyAliasPtr alias;
|
||||
register struct xkb_key_alias * alias;
|
||||
|
||||
if ((!geom)||(!aliasStr)||(!realStr)||(!aliasStr[0])||(!realStr[0]))
|
||||
return NULL;
|
||||
|
@ -663,18 +663,18 @@ register XkbKeyAliasPtr alias;
|
|||
return NULL;
|
||||
}
|
||||
alias= &geom->key_aliases[geom->num_key_aliases];
|
||||
bzero(alias,sizeof(XkbKeyAliasRec));
|
||||
bzero(alias,sizeof(struct xkb_key_alias));
|
||||
strncpy(alias->alias,aliasStr,XkbKeyNameLength);
|
||||
strncpy(alias->real,realStr,XkbKeyNameLength);
|
||||
geom->num_key_aliases++;
|
||||
return alias;
|
||||
}
|
||||
|
||||
XkbcColorPtr
|
||||
XkbcAddGeomColor(XkbcGeometryPtr geom,const char *spec,unsigned int pixel)
|
||||
struct xkb_color *
|
||||
XkbcAddGeomColor(struct xkb_geometry * geom,const char *spec,unsigned int pixel)
|
||||
{
|
||||
register int i;
|
||||
register XkbcColorPtr color;
|
||||
register struct xkb_color * color;
|
||||
|
||||
if ((!geom)||(!spec))
|
||||
return NULL;
|
||||
|
@ -698,10 +698,10 @@ register XkbcColorPtr color;
|
|||
return color;
|
||||
}
|
||||
|
||||
XkbcOutlinePtr
|
||||
XkbcAddGeomOutline(XkbcShapePtr shape,int sz_points)
|
||||
struct xkb_outline *
|
||||
XkbcAddGeomOutline(struct xkb_shape * shape,int sz_points)
|
||||
{
|
||||
XkbcOutlinePtr outline;
|
||||
struct xkb_outline * outline;
|
||||
|
||||
if ((!shape)||(sz_points<0))
|
||||
return NULL;
|
||||
|
@ -710,17 +710,17 @@ XkbcOutlinePtr outline;
|
|||
return NULL;
|
||||
}
|
||||
outline= &shape->outlines[shape->num_outlines];
|
||||
bzero(outline,sizeof(XkbcOutlineRec));
|
||||
bzero(outline,sizeof(struct xkb_outline));
|
||||
if ((sz_points>0)&&(_XkbAllocPoints(outline,sz_points)!=Success))
|
||||
return NULL;
|
||||
shape->num_outlines++;
|
||||
return outline;
|
||||
}
|
||||
|
||||
XkbcShapePtr
|
||||
XkbcAddGeomShape(XkbcGeometryPtr geom,uint32_t name,int sz_outlines)
|
||||
struct xkb_shape *
|
||||
XkbcAddGeomShape(struct xkb_geometry * geom,uint32_t name,int sz_outlines)
|
||||
{
|
||||
XkbcShapePtr shape;
|
||||
struct xkb_shape * shape;
|
||||
register int i;
|
||||
|
||||
if ((!geom)||(!name)||(sz_outlines<0))
|
||||
|
@ -735,7 +735,7 @@ register int i;
|
|||
(_XkbAllocShapes(geom,1)!=Success))
|
||||
return NULL;
|
||||
shape= &geom->shapes[geom->num_shapes];
|
||||
bzero(shape,sizeof(XkbcShapeRec));
|
||||
bzero(shape,sizeof(struct xkb_shape));
|
||||
if ((sz_outlines>0)&&(_XkbAllocOutlines(shape,sz_outlines)!=Success))
|
||||
return NULL;
|
||||
shape->name= name;
|
||||
|
@ -744,23 +744,23 @@ register int i;
|
|||
return shape;
|
||||
}
|
||||
|
||||
XkbcKeyPtr
|
||||
XkbcAddGeomKey(XkbcRowPtr row)
|
||||
struct xkb_key *
|
||||
XkbcAddGeomKey(struct xkb_row * row)
|
||||
{
|
||||
XkbcKeyPtr key;
|
||||
struct xkb_key * key;
|
||||
if (!row)
|
||||
return NULL;
|
||||
if ((row->num_keys>=row->sz_keys)&&(_XkbAllocKeys(row,1)!=Success))
|
||||
return NULL;
|
||||
key= &row->keys[row->num_keys++];
|
||||
bzero(key,sizeof(XkbcKeyRec));
|
||||
bzero(key,sizeof(struct xkb_key));
|
||||
return key;
|
||||
}
|
||||
|
||||
XkbcRowPtr
|
||||
XkbcAddGeomRow(XkbcSectionPtr section,int sz_keys)
|
||||
struct xkb_row *
|
||||
XkbcAddGeomRow(struct xkb_section * section,int sz_keys)
|
||||
{
|
||||
XkbcRowPtr row;
|
||||
struct xkb_row * row;
|
||||
|
||||
if ((!section)||(sz_keys<0))
|
||||
return NULL;
|
||||
|
@ -768,22 +768,22 @@ XkbcRowPtr row;
|
|||
(_XkbAllocRows(section,1)!=Success))
|
||||
return NULL;
|
||||
row= §ion->rows[section->num_rows];
|
||||
bzero(row,sizeof(XkbcRowRec));
|
||||
bzero(row,sizeof(struct xkb_row));
|
||||
if ((sz_keys>0)&&(_XkbAllocKeys(row,sz_keys)!=Success))
|
||||
return NULL;
|
||||
section->num_rows++;
|
||||
return row;
|
||||
}
|
||||
|
||||
XkbcSectionPtr
|
||||
XkbcAddGeomSection( XkbcGeometryPtr geom,
|
||||
struct xkb_section *
|
||||
XkbcAddGeomSection( struct xkb_geometry * geom,
|
||||
uint32_t name,
|
||||
int sz_rows,
|
||||
int sz_doodads,
|
||||
int sz_over)
|
||||
{
|
||||
register int i;
|
||||
XkbcSectionPtr section;
|
||||
struct xkb_section * section;
|
||||
|
||||
if ((!geom)||(name==None)||(sz_rows<0))
|
||||
return NULL;
|
||||
|
@ -815,10 +815,10 @@ XkbcSectionPtr section;
|
|||
return section;
|
||||
}
|
||||
|
||||
XkbcDoodadPtr
|
||||
XkbcAddGeomDoodad(XkbcGeometryPtr geom,XkbcSectionPtr section,uint32_t name)
|
||||
union xkb_doodad *
|
||||
XkbcAddGeomDoodad(struct xkb_geometry * geom,struct xkb_section * section,uint32_t name)
|
||||
{
|
||||
XkbcDoodadPtr old,doodad;
|
||||
union xkb_doodad *old, *doodad;
|
||||
register int i,nDoodads;
|
||||
|
||||
if ((!geom)||(name==None))
|
||||
|
@ -848,21 +848,21 @@ register int i,nDoodads;
|
|||
return NULL;
|
||||
doodad= &geom->doodads[geom->num_doodads++];
|
||||
}
|
||||
bzero(doodad,sizeof(XkbcDoodadRec));
|
||||
bzero(doodad,sizeof(union xkb_doodad));
|
||||
doodad->any.name= name;
|
||||
return doodad;
|
||||
}
|
||||
|
||||
XkbcOverlayKeyPtr
|
||||
XkbcAddGeomOverlayKey( XkbcOverlayPtr overlay,
|
||||
XkbcOverlayRowPtr row,
|
||||
struct xkb_overlay_key *
|
||||
XkbcAddGeomOverlayKey( struct xkb_overlay * overlay,
|
||||
struct xkb_overlay_row * row,
|
||||
const char * over,
|
||||
const char * under)
|
||||
{
|
||||
register int i;
|
||||
XkbcOverlayKeyPtr key;
|
||||
XkbcSectionPtr section;
|
||||
XkbcRowPtr row_under;
|
||||
struct xkb_overlay_key * key;
|
||||
struct xkb_section * section;
|
||||
struct xkb_row * row_under;
|
||||
Bool found;
|
||||
|
||||
if ((!overlay)||(!row)||(!over)||(!under))
|
||||
|
@ -888,11 +888,11 @@ Bool found;
|
|||
return key;
|
||||
}
|
||||
|
||||
XkbcOverlayRowPtr
|
||||
XkbcAddGeomOverlayRow(XkbcOverlayPtr overlay,int row_under,int sz_keys)
|
||||
struct xkb_overlay_row *
|
||||
XkbcAddGeomOverlayRow(struct xkb_overlay * overlay,int row_under,int sz_keys)
|
||||
{
|
||||
register int i;
|
||||
XkbcOverlayRowPtr row;
|
||||
struct xkb_overlay_row * row;
|
||||
|
||||
if ((!overlay)||(sz_keys<0))
|
||||
return NULL;
|
||||
|
@ -912,7 +912,7 @@ XkbcOverlayRowPtr row;
|
|||
(_XkbAllocOverlayRows(overlay,1)!=Success))
|
||||
return NULL;
|
||||
row= &overlay->rows[overlay->num_rows];
|
||||
bzero(row,sizeof(XkbcOverlayRowRec));
|
||||
bzero(row,sizeof(struct xkb_overlay_row));
|
||||
if ((sz_keys>0)&&(_XkbAllocOverlayKeys(row,sz_keys)!=Success))
|
||||
return NULL;
|
||||
row->row_under= row_under;
|
||||
|
@ -920,11 +920,11 @@ XkbcOverlayRowPtr row;
|
|||
return row;
|
||||
}
|
||||
|
||||
XkbcOverlayPtr
|
||||
XkbcAddGeomOverlay(XkbcSectionPtr section,uint32_t name,int sz_rows)
|
||||
struct xkb_overlay *
|
||||
XkbcAddGeomOverlay(struct xkb_section * section,uint32_t name,int sz_rows)
|
||||
{
|
||||
register int i;
|
||||
XkbcOverlayPtr overlay;
|
||||
struct xkb_overlay * overlay;
|
||||
|
||||
if ((!section)||(name==None)||(sz_rows==0))
|
||||
return NULL;
|
||||
|
|
36
src/geom.c
36
src/geom.c
|
@ -40,7 +40,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#endif
|
||||
|
||||
static void
|
||||
_XkbCheckBounds(XkbcBoundsPtr bounds, int x, int y)
|
||||
_XkbCheckBounds(struct xkb_bounds * bounds, int x, int y)
|
||||
{
|
||||
if (x < bounds->x1)
|
||||
bounds->x1 = x;
|
||||
|
@ -53,11 +53,11 @@ _XkbCheckBounds(XkbcBoundsPtr bounds, int x, int y)
|
|||
}
|
||||
|
||||
Bool
|
||||
XkbcComputeShapeBounds(XkbcShapePtr shape)
|
||||
XkbcComputeShapeBounds(struct xkb_shape * shape)
|
||||
{
|
||||
int o, p;
|
||||
XkbcOutlinePtr outline;
|
||||
XkbcPointPtr pt;
|
||||
struct xkb_outline * outline;
|
||||
struct xkb_point * pt;
|
||||
|
||||
if ((!shape) || (shape->num_outlines < 1))
|
||||
return False;
|
||||
|
@ -77,11 +77,11 @@ XkbcComputeShapeBounds(XkbcShapePtr shape)
|
|||
}
|
||||
|
||||
Bool
|
||||
XkbcComputeShapeTop(XkbcShapePtr shape, XkbcBoundsPtr bounds)
|
||||
XkbcComputeShapeTop(struct xkb_shape * shape, struct xkb_bounds * bounds)
|
||||
{
|
||||
int p;
|
||||
XkbcOutlinePtr outline;
|
||||
XkbcPointPtr pt;
|
||||
struct xkb_outline * outline;
|
||||
struct xkb_point * pt;
|
||||
|
||||
if ((!shape) || (shape->num_outlines < 1))
|
||||
return False;
|
||||
|
@ -107,18 +107,18 @@ XkbcComputeShapeTop(XkbcShapePtr shape, XkbcBoundsPtr bounds)
|
|||
}
|
||||
|
||||
Bool
|
||||
XkbcComputeRowBounds(XkbcGeometryPtr geom, XkbcSectionPtr section, XkbcRowPtr row)
|
||||
XkbcComputeRowBounds(struct xkb_geometry * geom, struct xkb_section * section, struct xkb_row * row)
|
||||
{
|
||||
int k, pos;
|
||||
XkbcKeyPtr key;
|
||||
XkbcBoundsPtr bounds, sbounds;
|
||||
struct xkb_key * key;
|
||||
struct xkb_bounds *bounds, *sbounds;
|
||||
|
||||
if (!geom || !section || !row)
|
||||
return False;
|
||||
|
||||
pos = 0;
|
||||
bounds = &row->bounds;
|
||||
bzero(bounds, sizeof(XkbcBoundsRec));
|
||||
bzero(bounds, sizeof(struct xkb_bounds));
|
||||
|
||||
for (key = row->keys, pos = k = 0; k < row->num_keys; k++, key++) {
|
||||
sbounds = &XkbKeyShape(geom, key)->bounds;
|
||||
|
@ -148,19 +148,19 @@ XkbcComputeRowBounds(XkbcGeometryPtr geom, XkbcSectionPtr section, XkbcRowPtr ro
|
|||
}
|
||||
|
||||
Bool
|
||||
XkbcComputeSectionBounds(XkbcGeometryPtr geom, XkbcSectionPtr section)
|
||||
XkbcComputeSectionBounds(struct xkb_geometry * geom, struct xkb_section * section)
|
||||
{
|
||||
int i;
|
||||
XkbcShapePtr shape;
|
||||
XkbcRowPtr row;
|
||||
XkbcDoodadPtr doodad;
|
||||
XkbcBoundsPtr bounds, rbounds = NULL;
|
||||
struct xkb_shape * shape;
|
||||
struct xkb_row * row;
|
||||
union xkb_doodad * doodad;
|
||||
struct xkb_bounds * bounds, *rbounds = NULL;
|
||||
|
||||
if (!geom || !section)
|
||||
return False;
|
||||
|
||||
bounds = §ion->bounds;
|
||||
bzero(bounds, sizeof(XkbcBoundsRec));
|
||||
bzero(bounds, sizeof(struct xkb_bounds));
|
||||
|
||||
for (i = 0, row = section->rows; i < section->num_rows; i++, row++) {
|
||||
if (!XkbcComputeRowBounds(geom, section, row))
|
||||
|
@ -175,7 +175,7 @@ XkbcComputeSectionBounds(XkbcGeometryPtr geom, XkbcSectionPtr section)
|
|||
for (i = 0, doodad = section->doodads; i < section->num_doodads;
|
||||
i++, doodad++)
|
||||
{
|
||||
static XkbcBoundsRec tbounds;
|
||||
static struct xkb_bounds tbounds;
|
||||
|
||||
switch (doodad->any.type) {
|
||||
case XkbOutlineDoodad:
|
||||
|
|
90
src/malloc.c
90
src/malloc.c
|
@ -29,10 +29,10 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#include "XKBcommonint.h"
|
||||
|
||||
int
|
||||
XkbcAllocClientMap(XkbcDescPtr xkb, unsigned which, unsigned nTotalTypes)
|
||||
XkbcAllocClientMap(struct xkb_desc * xkb, unsigned which, unsigned nTotalTypes)
|
||||
{
|
||||
int i;
|
||||
XkbcClientMapPtr map;
|
||||
struct xkb_client_map * map;
|
||||
|
||||
if (!xkb || ((nTotalTypes > 0) && (nTotalTypes < XkbNumRequiredTypes)))
|
||||
return BadValue;
|
||||
|
@ -49,7 +49,7 @@ XkbcAllocClientMap(XkbcDescPtr xkb, unsigned which, unsigned nTotalTypes)
|
|||
}
|
||||
|
||||
if (!xkb->map) {
|
||||
map = _XkbTypedCalloc(1, XkbcClientMapRec);
|
||||
map = _XkbTypedCalloc(1, struct xkb_client_map);
|
||||
if (!map)
|
||||
return BadAlloc;
|
||||
xkb->map = map;
|
||||
|
@ -59,7 +59,7 @@ XkbcAllocClientMap(XkbcDescPtr xkb, unsigned which, unsigned nTotalTypes)
|
|||
|
||||
if ((which & XkbKeyTypesMask) && (nTotalTypes > 0)) {
|
||||
if (!map->types) {
|
||||
map->types = _XkbTypedCalloc(nTotalTypes, XkbcKeyTypeRec);
|
||||
map->types = _XkbTypedCalloc(nTotalTypes, struct xkb_key_type);
|
||||
if (!map->types)
|
||||
return BadAlloc;
|
||||
|
||||
|
@ -67,10 +67,10 @@ XkbcAllocClientMap(XkbcDescPtr xkb, unsigned which, unsigned nTotalTypes)
|
|||
map->size_types = nTotalTypes;
|
||||
}
|
||||
else if (map->size_types < nTotalTypes) {
|
||||
XkbcKeyTypeRec *prev_types = map->types;
|
||||
struct xkb_key_type *prev_types = map->types;
|
||||
|
||||
map->types = _XkbTypedRealloc(map->types, nTotalTypes,
|
||||
XkbcKeyTypeRec);
|
||||
struct xkb_key_type);
|
||||
if (!map->types) {
|
||||
free(prev_types);
|
||||
map->num_types = map->size_types = 0;
|
||||
|
@ -79,7 +79,7 @@ XkbcAllocClientMap(XkbcDescPtr xkb, unsigned which, unsigned nTotalTypes)
|
|||
|
||||
map->size_types = nTotalTypes;
|
||||
bzero(&map->types[map->num_types],
|
||||
(map->size_types - map->num_types) * sizeof(XkbcKeyTypeRec));
|
||||
(map->size_types - map->num_types) * sizeof(struct xkb_key_type));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -99,7 +99,7 @@ XkbcAllocClientMap(XkbcDescPtr xkb, unsigned which, unsigned nTotalTypes)
|
|||
|
||||
if (!map->key_sym_map) {
|
||||
i = xkb->max_key_code + 1;
|
||||
map->key_sym_map = _XkbTypedCalloc(i, XkbSymMapRec);
|
||||
map->key_sym_map = _XkbTypedCalloc(i, struct xkb_sym_map);
|
||||
if (!map->key_sym_map)
|
||||
return BadAlloc;
|
||||
}
|
||||
|
@ -123,16 +123,16 @@ XkbcAllocClientMap(XkbcDescPtr xkb, unsigned which, unsigned nTotalTypes)
|
|||
}
|
||||
|
||||
int
|
||||
XkbcAllocServerMap(XkbcDescPtr xkb, unsigned which, unsigned nNewActions)
|
||||
XkbcAllocServerMap(struct xkb_desc * xkb, unsigned which, unsigned nNewActions)
|
||||
{
|
||||
int i;
|
||||
XkbcServerMapPtr map;
|
||||
struct xkb_server_map * map;
|
||||
|
||||
if (!xkb)
|
||||
return BadMatch;
|
||||
|
||||
if (!xkb->server) {
|
||||
map = _XkbTypedCalloc(1, XkbcServerMapRec);
|
||||
map = _XkbTypedCalloc(1, struct xkb_server_map);
|
||||
if (!map)
|
||||
return BadAlloc;
|
||||
|
||||
|
@ -207,7 +207,7 @@ XkbcAllocServerMap(XkbcDescPtr xkb, unsigned which, unsigned nNewActions)
|
|||
|
||||
if (!map->behaviors) {
|
||||
i = xkb->max_key_code + 1;
|
||||
map->behaviors = _XkbTypedCalloc(i, XkbBehavior);
|
||||
map->behaviors = _XkbTypedCalloc(i, struct xkb_behavior);
|
||||
if (!map->behaviors)
|
||||
return BadAlloc;
|
||||
}
|
||||
|
@ -231,7 +231,7 @@ XkbcAllocServerMap(XkbcDescPtr xkb, unsigned which, unsigned nNewActions)
|
|||
}
|
||||
|
||||
int
|
||||
XkbcCopyKeyType(XkbcKeyTypePtr from, XkbcKeyTypePtr into)
|
||||
XkbcCopyKeyType(struct xkb_key_type * from, struct xkb_key_type * into)
|
||||
{
|
||||
if (!from || !into)
|
||||
return BadMatch;
|
||||
|
@ -252,19 +252,19 @@ XkbcCopyKeyType(XkbcKeyTypePtr from, XkbcKeyTypePtr into)
|
|||
*into = *from;
|
||||
|
||||
if (from->map && (into->map_count > 0)) {
|
||||
into->map = _XkbTypedCalloc(into->map_count, XkbcKTMapEntryRec);
|
||||
into->map = _XkbTypedCalloc(into->map_count, struct xkb_kt_map_entry);
|
||||
if (!into->map)
|
||||
return BadAlloc;
|
||||
memcpy(into->map, from->map,
|
||||
into->map_count * sizeof(XkbcKTMapEntryRec));
|
||||
into->map_count * sizeof(struct xkb_kt_map_entry));
|
||||
}
|
||||
|
||||
if (from->preserve && (into->map_count > 0)) {
|
||||
into->preserve = _XkbTypedCalloc(into->map_count, XkbcModsRec);
|
||||
into->preserve = _XkbTypedCalloc(into->map_count, struct xkb_mods);
|
||||
if (!into->preserve)
|
||||
return BadAlloc;
|
||||
memcpy(into->preserve, from->preserve,
|
||||
into->map_count * sizeof(XkbcModsRec));
|
||||
into->map_count * sizeof(struct xkb_mods));
|
||||
}
|
||||
|
||||
if (from->level_names && (into->num_levels > 0)) {
|
||||
|
@ -279,7 +279,7 @@ XkbcCopyKeyType(XkbcKeyTypePtr from, XkbcKeyTypePtr into)
|
|||
}
|
||||
|
||||
int
|
||||
XkbcCopyKeyTypes(XkbcKeyTypePtr from, XkbcKeyTypePtr into, int num_types)
|
||||
XkbcCopyKeyTypes(struct xkb_key_type * from, struct xkb_key_type * into, int num_types)
|
||||
{
|
||||
int i, rtrn;
|
||||
|
||||
|
@ -295,10 +295,10 @@ XkbcCopyKeyTypes(XkbcKeyTypePtr from, XkbcKeyTypePtr into, int num_types)
|
|||
}
|
||||
|
||||
int
|
||||
XkbcResizeKeyType(XkbcDescPtr xkb, int type_ndx, int map_count,
|
||||
XkbcResizeKeyType(struct xkb_desc * xkb, int type_ndx, int map_count,
|
||||
Bool want_preserve, int new_num_lvls)
|
||||
{
|
||||
XkbcKeyTypePtr type;
|
||||
struct xkb_key_type * type;
|
||||
KeyCode matchingKeys[XkbMaxKeyCount], nMatchingKeys;
|
||||
|
||||
if ((type_ndx < 0) || (type_ndx >= xkb->map->num_types) ||
|
||||
|
@ -330,11 +330,11 @@ XkbcResizeKeyType(XkbcDescPtr xkb, int type_ndx, int map_count,
|
|||
type->map_count = 0;
|
||||
}
|
||||
else {
|
||||
XkbcKTMapEntryRec *prev_map = type->map;
|
||||
struct xkb_kt_map_entry *prev_map = type->map;
|
||||
|
||||
if ((map_count > type->map_count) || !type->map)
|
||||
type->map = _XkbTypedRealloc(type->map, map_count,
|
||||
XkbcKTMapEntryRec);
|
||||
struct xkb_kt_map_entry);
|
||||
if (!type->map) {
|
||||
if (prev_map)
|
||||
free(prev_map);
|
||||
|
@ -342,11 +342,11 @@ XkbcResizeKeyType(XkbcDescPtr xkb, int type_ndx, int map_count,
|
|||
}
|
||||
|
||||
if (want_preserve) {
|
||||
XkbcModsRec *prev_preserve = type->preserve;
|
||||
struct xkb_mods *prev_preserve = type->preserve;
|
||||
|
||||
if ((map_count > type->map_count) || !type->preserve)
|
||||
type->preserve = _XkbTypedRealloc(type->preserve, map_count,
|
||||
XkbcModsRec);
|
||||
struct xkb_mods);
|
||||
if (!type->preserve) {
|
||||
if (prev_preserve)
|
||||
free(prev_preserve);
|
||||
|
@ -514,7 +514,7 @@ XkbcResizeKeyType(XkbcDescPtr xkb, int type_ndx, int map_count,
|
|||
}
|
||||
|
||||
uint32_t *
|
||||
XkbcResizeKeySyms(XkbcDescPtr xkb, int key, int needed)
|
||||
XkbcResizeKeySyms(struct xkb_desc * xkb, int key, int needed)
|
||||
{
|
||||
int i, nSyms, nKeySyms;
|
||||
unsigned nOldSyms;
|
||||
|
@ -602,8 +602,8 @@ _ExtendRange(unsigned int old_flags, unsigned int flag, KeyCode newKC,
|
|||
}
|
||||
|
||||
int
|
||||
XkbcChangeKeycodeRange(XkbcDescPtr xkb, int minKC, int maxKC,
|
||||
XkbChangesPtr changes)
|
||||
XkbcChangeKeycodeRange(struct xkb_desc * xkb, int minKC, int maxKC,
|
||||
struct xkb_changes * changes)
|
||||
{
|
||||
int tmp;
|
||||
|
||||
|
@ -621,7 +621,7 @@ XkbcChangeKeycodeRange(XkbcDescPtr xkb, int minKC, int maxKC,
|
|||
if (xkb->map) {
|
||||
if (xkb->map->key_sym_map) {
|
||||
bzero(&xkb->map->key_sym_map[minKC],
|
||||
tmp * sizeof(XkbSymMapRec));
|
||||
tmp * sizeof(struct xkb_sym_map));
|
||||
if (changes)
|
||||
changes->map.changed = _ExtendRange(changes->map.changed,
|
||||
XkbKeySymsMask, minKC,
|
||||
|
@ -642,7 +642,7 @@ XkbcChangeKeycodeRange(XkbcDescPtr xkb, int minKC, int maxKC,
|
|||
if (xkb->server) {
|
||||
if (xkb->server->behaviors) {
|
||||
bzero(&xkb->server->behaviors[minKC],
|
||||
tmp * sizeof(XkbBehavior));
|
||||
tmp * sizeof(struct xkb_behavior));
|
||||
if (changes)
|
||||
changes->map.changed = _ExtendRange(changes->map.changed,
|
||||
XkbKeyBehaviorsMask, minKC,
|
||||
|
@ -672,7 +672,7 @@ XkbcChangeKeycodeRange(XkbcDescPtr xkb, int minKC, int maxKC,
|
|||
}
|
||||
|
||||
if (xkb->names && xkb->names->keys) {
|
||||
bzero(&xkb->names->keys[minKC], tmp * sizeof(XkbKeyNameRec));
|
||||
bzero(&xkb->names->keys[minKC], tmp * sizeof(struct xkb_key_name));
|
||||
if (changes)
|
||||
changes->names.changed = _ExtendRange(changes->names.changed,
|
||||
XkbKeyNamesMask, minKC,
|
||||
|
@ -690,18 +690,18 @@ XkbcChangeKeycodeRange(XkbcDescPtr xkb, int minKC, int maxKC,
|
|||
|
||||
if (xkb->map) {
|
||||
if (xkb->map->key_sym_map) {
|
||||
XkbSymMapRec *prev_key_sym_map = xkb->map->key_sym_map;
|
||||
struct xkb_sym_map *prev_key_sym_map = xkb->map->key_sym_map;
|
||||
|
||||
xkb->map->key_sym_map = _XkbTypedRealloc(xkb->map->key_sym_map,
|
||||
maxKC + 1,
|
||||
XkbSymMapRec);
|
||||
struct xkb_sym_map);
|
||||
if (!xkb->map->key_sym_map) {
|
||||
free(prev_key_sym_map);
|
||||
return BadAlloc;
|
||||
}
|
||||
|
||||
bzero(&xkb->map->key_sym_map[xkb->max_key_code],
|
||||
tmp * sizeof(XkbSymMapRec));
|
||||
tmp * sizeof(struct xkb_sym_map));
|
||||
if (changes)
|
||||
changes->map.changed = _ExtendRange(changes->map.changed,
|
||||
XkbKeySymsMask, maxKC,
|
||||
|
@ -730,18 +730,18 @@ XkbcChangeKeycodeRange(XkbcDescPtr xkb, int minKC, int maxKC,
|
|||
|
||||
if (xkb->server) {
|
||||
if (xkb->server->behaviors) {
|
||||
XkbBehavior *prev_behaviors = xkb->server->behaviors;
|
||||
struct xkb_behavior *prev_behaviors = xkb->server->behaviors;
|
||||
|
||||
xkb->server->behaviors = _XkbTypedRealloc(xkb->server->behaviors,
|
||||
maxKC + 1,
|
||||
XkbBehavior);
|
||||
struct xkb_behavior);
|
||||
if (!xkb->server->behaviors) {
|
||||
free(prev_behaviors);
|
||||
return BadAlloc;
|
||||
}
|
||||
|
||||
bzero(&xkb->server->behaviors[xkb->max_key_code],
|
||||
tmp * sizeof(XkbBehavior));
|
||||
tmp * sizeof(struct xkb_behavior));
|
||||
if (changes)
|
||||
changes->map.changed = _ExtendRange(changes->map.changed,
|
||||
XkbKeyBehaviorsMask, maxKC,
|
||||
|
@ -791,17 +791,17 @@ XkbcChangeKeycodeRange(XkbcDescPtr xkb, int minKC, int maxKC,
|
|||
}
|
||||
|
||||
if (xkb->names && xkb->names->keys ) {
|
||||
XkbKeyNameRec *prev_keys = xkb->names->keys;
|
||||
struct xkb_key_name *prev_keys = xkb->names->keys;
|
||||
|
||||
xkb->names->keys = _XkbTypedRealloc(xkb->names->keys, maxKC + 1,
|
||||
XkbKeyNameRec);
|
||||
struct xkb_key_name);
|
||||
if (!xkb->names->keys) {
|
||||
free(prev_keys);
|
||||
return BadAlloc;
|
||||
}
|
||||
|
||||
bzero(&xkb->names->keys[xkb->max_key_code],
|
||||
tmp * sizeof(XkbKeyNameRec));
|
||||
tmp * sizeof(struct xkb_key_name));
|
||||
if (changes)
|
||||
changes->names.changed = _ExtendRange(changes->names.changed,
|
||||
XkbKeyNamesMask, maxKC,
|
||||
|
@ -816,7 +816,7 @@ XkbcChangeKeycodeRange(XkbcDescPtr xkb, int minKC, int maxKC,
|
|||
}
|
||||
|
||||
union xkb_action *
|
||||
XkbcResizeKeyActions(XkbcDescPtr xkb, int key, int needed)
|
||||
XkbcResizeKeyActions(struct xkb_desc * xkb, int key, int needed)
|
||||
{
|
||||
int i, nActs;
|
||||
union xkb_action *newActs;
|
||||
|
@ -876,9 +876,9 @@ XkbcResizeKeyActions(XkbcDescPtr xkb, int key, int needed)
|
|||
}
|
||||
|
||||
void
|
||||
XkbcFreeClientMap(XkbcDescPtr xkb, unsigned what, Bool freeMap)
|
||||
XkbcFreeClientMap(struct xkb_desc * xkb, unsigned what, Bool freeMap)
|
||||
{
|
||||
XkbcClientMapPtr map;
|
||||
struct xkb_client_map * map;
|
||||
|
||||
if (!xkb || !xkb->map)
|
||||
return;
|
||||
|
@ -891,7 +891,7 @@ XkbcFreeClientMap(XkbcDescPtr xkb, unsigned what, Bool freeMap)
|
|||
if (map->types) {
|
||||
if (map->num_types > 0) {
|
||||
int i;
|
||||
XkbcKeyTypePtr type;
|
||||
struct xkb_key_type * type;
|
||||
|
||||
for (i = 0, type = map->types; i < map->num_types; i++, type++) {
|
||||
if (type->map) {
|
||||
|
@ -939,9 +939,9 @@ XkbcFreeClientMap(XkbcDescPtr xkb, unsigned what, Bool freeMap)
|
|||
}
|
||||
|
||||
void
|
||||
XkbcFreeServerMap(XkbcDescPtr xkb, unsigned what, Bool freeMap)
|
||||
XkbcFreeServerMap(struct xkb_desc * xkb, unsigned what, Bool freeMap)
|
||||
{
|
||||
XkbcServerMapPtr map;
|
||||
struct xkb_server_map * map;
|
||||
|
||||
if (!xkb || !xkb->server)
|
||||
return;
|
||||
|
|
|
@ -600,7 +600,7 @@ Apply(char *src, char **dst)
|
|||
|
||||
static void
|
||||
XkbRF_ApplyRule( XkbRF_RulePtr rule,
|
||||
XkbComponentNamesPtr names)
|
||||
struct xkb_component_names * names)
|
||||
{
|
||||
rule->flags&= ~XkbRF_PendingMatch; /* clear the flag because it's applied */
|
||||
|
||||
|
@ -639,7 +639,7 @@ CheckGroup( XkbRF_RulesPtr rules,
|
|||
static int
|
||||
XkbRF_CheckApplyRule( XkbRF_RulePtr rule,
|
||||
XkbRF_MultiDefsPtr mdefs,
|
||||
XkbComponentNamesPtr names,
|
||||
struct xkb_component_names * names,
|
||||
XkbRF_RulesPtr rules)
|
||||
{
|
||||
Bool pending = False;
|
||||
|
@ -722,7 +722,7 @@ XkbRF_RulePtr rule;
|
|||
}
|
||||
|
||||
static void
|
||||
XkbRF_ApplyPartialMatches(XkbRF_RulesPtr rules,XkbComponentNamesPtr names)
|
||||
XkbRF_ApplyPartialMatches(XkbRF_RulesPtr rules,struct xkb_component_names * names)
|
||||
{
|
||||
int i;
|
||||
XkbRF_RulePtr rule;
|
||||
|
@ -737,7 +737,7 @@ XkbRF_RulePtr rule;
|
|||
static void
|
||||
XkbRF_CheckApplyRules( XkbRF_RulesPtr rules,
|
||||
XkbRF_MultiDefsPtr mdefs,
|
||||
XkbComponentNamesPtr names,
|
||||
struct xkb_component_names * names,
|
||||
int flags)
|
||||
{
|
||||
int i;
|
||||
|
@ -856,13 +856,13 @@ int len, ndx;
|
|||
Bool
|
||||
XkbcRF_GetComponents( XkbRF_RulesPtr rules,
|
||||
XkbRF_VarDefsPtr defs,
|
||||
XkbComponentNamesPtr names)
|
||||
struct xkb_component_names * names)
|
||||
{
|
||||
XkbRF_MultiDefsRec mdefs;
|
||||
|
||||
MakeMultiDefs(&mdefs, defs);
|
||||
|
||||
bzero((char *)names,sizeof(XkbComponentNamesRec));
|
||||
bzero((char *)names,sizeof(struct xkb_component_names));
|
||||
XkbRF_ClearPartialMatches(rules);
|
||||
XkbRF_CheckApplyRules(rules, &mdefs, names, XkbRF_Normal);
|
||||
XkbRF_ApplyPartialMatches(rules, names);
|
||||
|
|
23
src/misc.c
23
src/misc.c
|
@ -33,30 +33,29 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#include "X11/extensions/XKBcommon.h"
|
||||
#include "XKBcommonint.h"
|
||||
#include <X11/keysym.h>
|
||||
#include <X11/extensions/XKBfilecommon.h>
|
||||
|
||||
#define mapSize(m) (sizeof(m) / sizeof(XkbcKTMapEntryRec))
|
||||
static XkbcKTMapEntryRec map2Level[]= {
|
||||
#define mapSize(m) (sizeof(m) / sizeof(struct xkb_kt_map_entry))
|
||||
static struct xkb_kt_map_entry map2Level[]= {
|
||||
{ True, ShiftMask, {1, ShiftMask, 0} }
|
||||
};
|
||||
|
||||
static XkbcKTMapEntryRec mapAlpha[]= {
|
||||
static struct xkb_kt_map_entry mapAlpha[]= {
|
||||
{ True, ShiftMask, { 1, ShiftMask, 0 } },
|
||||
{ True, LockMask, { 0, LockMask, 0 } }
|
||||
};
|
||||
|
||||
static XkbcModsRec preAlpha[]= {
|
||||
static struct xkb_mods preAlpha[]= {
|
||||
{ 0, 0, 0 },
|
||||
{ LockMask, LockMask, 0 }
|
||||
};
|
||||
|
||||
#define NL_VMOD_MASK 0
|
||||
static XkbcKTMapEntryRec mapKeypad[]= {
|
||||
static struct xkb_kt_map_entry mapKeypad[]= {
|
||||
{ True, ShiftMask, { 1, ShiftMask, 0 } },
|
||||
{ False, 0, { 1, 0, NL_VMOD_MASK } }
|
||||
};
|
||||
|
||||
static XkbcKeyTypeRec canonicalTypes[XkbNumRequiredTypes] = {
|
||||
static struct xkb_key_type canonicalTypes[XkbNumRequiredTypes] = {
|
||||
{ { 0, 0, 0 },
|
||||
1, /* num_levels */
|
||||
0, /* map_count */
|
||||
|
@ -84,10 +83,10 @@ static XkbcKeyTypeRec canonicalTypes[XkbNumRequiredTypes] = {
|
|||
};
|
||||
|
||||
int
|
||||
XkbcInitCanonicalKeyTypes(XkbcDescPtr xkb, unsigned which, int keypadVMod)
|
||||
XkbcInitCanonicalKeyTypes(struct xkb_desc * xkb, unsigned which, int keypadVMod)
|
||||
{
|
||||
XkbcClientMapPtr map;
|
||||
XkbcKeyTypePtr from,to;
|
||||
struct xkb_client_map * map;
|
||||
struct xkb_key_type *from, *to;
|
||||
int rtrn;
|
||||
|
||||
if (!xkb)
|
||||
|
@ -116,7 +115,7 @@ XkbcInitCanonicalKeyTypes(XkbcDescPtr xkb, unsigned which, int keypadVMod)
|
|||
&to[XkbAlphabeticIndex]);
|
||||
|
||||
if ((which & XkbKeypadMask) && (rtrn == Success)) {
|
||||
XkbcKeyTypePtr type;
|
||||
struct xkb_key_type * type;
|
||||
|
||||
rtrn = XkbcCopyKeyType(&from[XkbKeypadIndex], &to[XkbKeypadIndex]);
|
||||
type = &to[XkbKeypadIndex];
|
||||
|
@ -141,7 +140,7 @@ XkbcInitCanonicalKeyTypes(XkbcDescPtr xkb, unsigned which, int keypadVMod)
|
|||
}
|
||||
|
||||
Bool
|
||||
XkbcVirtualModsToReal(XkbcDescPtr xkb, unsigned virtual_mask,
|
||||
XkbcVirtualModsToReal(struct xkb_desc * xkb, unsigned virtual_mask,
|
||||
unsigned *mask_rtrn)
|
||||
{
|
||||
int i, bit;
|
||||
|
|
|
@ -57,7 +57,7 @@ tbGetBuffer(unsigned int size)
|
|||
}
|
||||
|
||||
char *
|
||||
XkbcVModIndexText(XkbcDescPtr xkb, unsigned ndx)
|
||||
XkbcVModIndexText(struct xkb_desc * xkb, unsigned ndx)
|
||||
{
|
||||
int len;
|
||||
uint32_t *vmodNames;
|
||||
|
@ -91,7 +91,7 @@ XkbcVModIndexText(XkbcDescPtr xkb, unsigned ndx)
|
|||
}
|
||||
|
||||
char *
|
||||
XkbcVModMaskText(XkbcDescPtr xkb, unsigned modMask, unsigned mask)
|
||||
XkbcVModMaskText(struct xkb_desc * xkb, unsigned modMask, unsigned mask)
|
||||
{
|
||||
int i, bit, len, rem;
|
||||
char *mm = NULL, *rtrn, *str;
|
||||
|
|
|
@ -82,8 +82,8 @@ XkbcCanonicaliseComponent(char *name, const char *old)
|
|||
}
|
||||
|
||||
void
|
||||
XkbcCanonicaliseComponents(XkbComponentNamesPtr names,
|
||||
const XkbComponentNamesPtr old)
|
||||
XkbcCanonicaliseComponents(struct xkb_component_names * names,
|
||||
const struct xkb_component_names * old)
|
||||
{
|
||||
names->keycodes = XkbcCanonicaliseComponent(names->keycodes,
|
||||
old ? old->keycodes : NULL);
|
||||
|
@ -98,12 +98,12 @@ XkbcCanonicaliseComponents(XkbComponentNamesPtr names,
|
|||
}
|
||||
|
||||
Bool
|
||||
XkbcComputeEffectiveMap(XkbcDescPtr xkb, XkbcKeyTypePtr type,
|
||||
XkbcComputeEffectiveMap(struct xkb_desc * xkb, struct xkb_key_type * type,
|
||||
unsigned char *map_rtrn)
|
||||
{
|
||||
int i;
|
||||
unsigned tmp;
|
||||
XkbcKTMapEntryPtr entry = NULL;
|
||||
struct xkb_kt_map_entry * entry = NULL;
|
||||
|
||||
if (!xkb || !type || !xkb->server)
|
||||
return False;
|
||||
|
|
|
@ -29,73 +29,71 @@ authorization from the authors.
|
|||
|
||||
#include <X11/X.h>
|
||||
#include <X11/Xdefs.h>
|
||||
#include <X11/extensions/XKBstrcommon.h>
|
||||
#include <X11/extensions/XKBrulescommon.h>
|
||||
#include "X11/extensions/XKBcommon.h"
|
||||
|
||||
extern int
|
||||
XkbcAllocCompatMap(XkbcDescPtr xkb, unsigned which, unsigned nSI);
|
||||
XkbcAllocCompatMap(struct xkb_desc * xkb, unsigned which, unsigned nSI);
|
||||
|
||||
extern void
|
||||
XkbcFreeCompatMap(XkbcDescPtr xkb, unsigned which, Bool freeMap);
|
||||
XkbcFreeCompatMap(struct xkb_desc * xkb, unsigned which, Bool freeMap);
|
||||
|
||||
extern int
|
||||
XkbcAllocNames(XkbcDescPtr xkb, unsigned which, int nTotalRG,
|
||||
XkbcAllocNames(struct xkb_desc * xkb, unsigned which, int nTotalRG,
|
||||
int nTotalAliases);
|
||||
|
||||
extern void
|
||||
XkbcFreeNames(XkbcDescPtr xkb, unsigned which, Bool freeMap);
|
||||
XkbcFreeNames(struct xkb_desc * xkb, unsigned which, Bool freeMap);
|
||||
|
||||
extern int
|
||||
XkbcAllocControls(XkbcDescPtr xkb, unsigned which);
|
||||
XkbcAllocControls(struct xkb_desc * xkb, unsigned which);
|
||||
|
||||
extern void
|
||||
XkbcFreeControls(XkbcDescPtr xkb, unsigned which, Bool freeMap);
|
||||
XkbcFreeControls(struct xkb_desc * xkb, unsigned which, Bool freeMap);
|
||||
|
||||
extern int
|
||||
XkbcAllocIndicatorMaps(XkbcDescPtr xkb);
|
||||
XkbcAllocIndicatorMaps(struct xkb_desc * xkb);
|
||||
|
||||
extern void
|
||||
XkbcFreeIndicatorMaps(XkbcDescPtr xkb);
|
||||
XkbcFreeIndicatorMaps(struct xkb_desc * xkb);
|
||||
|
||||
extern XkbcDescRec *
|
||||
extern struct xkb_desc *
|
||||
XkbcAllocKeyboard(void);
|
||||
|
||||
extern void
|
||||
XkbcFreeKeyboard(XkbcDescPtr xkb, unsigned which, Bool freeAll);
|
||||
XkbcFreeKeyboard(struct xkb_desc * xkb, unsigned which, Bool freeAll);
|
||||
|
||||
/***====================================================================***/
|
||||
|
||||
extern int
|
||||
XkbcAllocClientMap(XkbcDescPtr xkb, unsigned which, unsigned nTotalTypes);
|
||||
XkbcAllocClientMap(struct xkb_desc * xkb, unsigned which, unsigned nTotalTypes);
|
||||
|
||||
extern int
|
||||
XkbcAllocServerMap(XkbcDescPtr xkb, unsigned which, unsigned nNewActions);
|
||||
XkbcAllocServerMap(struct xkb_desc * xkb, unsigned which, unsigned nNewActions);
|
||||
|
||||
extern int
|
||||
XkbcCopyKeyType(XkbcKeyTypePtr from, XkbcKeyTypePtr into);
|
||||
XkbcCopyKeyType(struct xkb_key_type * from, struct xkb_key_type *into);
|
||||
|
||||
extern int
|
||||
XkbcCopyKeyTypes(XkbcKeyTypePtr from, XkbcKeyTypePtr into, int num_types);
|
||||
XkbcCopyKeyTypes(struct xkb_key_type * from, struct xkb_key_type *into, int num_types);
|
||||
|
||||
extern int
|
||||
XkbcResizeKeyType(XkbcDescPtr xkb, int type_ndx, int map_count,
|
||||
XkbcResizeKeyType(struct xkb_desc * xkb, int type_ndx, int map_count,
|
||||
Bool want_preserve, int new_num_lvls);
|
||||
|
||||
extern uint32_t *
|
||||
XkbcResizeKeySyms(XkbcDescPtr xkb, int key, int needed);
|
||||
XkbcResizeKeySyms(struct xkb_desc * xkb, int key, int needed);
|
||||
|
||||
extern int
|
||||
XkbcChangeKeycodeRange(XkbcDescPtr xkb, int minKC, int maxKC,
|
||||
XkbChangesPtr changes);
|
||||
XkbcChangeKeycodeRange(struct xkb_desc * xkb, int minKC, int maxKC,
|
||||
struct xkb_changes * changes);
|
||||
|
||||
extern union xkb_action *
|
||||
XkbcResizeKeyActions(XkbcDescPtr xkb, int key, int needed);
|
||||
XkbcResizeKeyActions(struct xkb_desc * xkb, int key, int needed);
|
||||
|
||||
extern void
|
||||
XkbcFreeClientMap(XkbcDescPtr xkb, unsigned what, Bool freeMap);
|
||||
XkbcFreeClientMap(struct xkb_desc * xkb, unsigned what, Bool freeMap);
|
||||
|
||||
extern void
|
||||
XkbcFreeServerMap(XkbcDescPtr xkb, unsigned what, Bool freeMap);
|
||||
XkbcFreeServerMap(struct xkb_desc * xkb, unsigned what, Bool freeMap);
|
||||
|
||||
#endif /* _XKBALLOC_H_ */
|
||||
|
|
|
@ -333,7 +333,7 @@ ReportNotFound(unsigned action, unsigned field, const char *what, char *bad)
|
|||
}
|
||||
|
||||
static Bool
|
||||
HandleNoAction(XkbcDescPtr xkb,
|
||||
HandleNoAction(struct xkb_desc * xkb,
|
||||
struct xkb_any_action * action,
|
||||
unsigned field, ExprDef * array_ndx, ExprDef * value)
|
||||
{
|
||||
|
@ -363,7 +363,7 @@ CheckLatchLockFlags(unsigned action,
|
|||
}
|
||||
|
||||
static Bool
|
||||
CheckModifierField(XkbcDescPtr xkb,
|
||||
CheckModifierField(struct xkb_desc * xkb,
|
||||
unsigned action,
|
||||
ExprDef * value,
|
||||
unsigned *flags_inout, unsigned *mods_rtrn)
|
||||
|
@ -391,7 +391,7 @@ CheckModifierField(XkbcDescPtr xkb,
|
|||
}
|
||||
|
||||
static Bool
|
||||
HandleSetLatchMods(XkbcDescPtr xkb,
|
||||
HandleSetLatchMods(struct xkb_desc * xkb,
|
||||
struct xkb_any_action * action,
|
||||
unsigned field, ExprDef * array_ndx, ExprDef * value)
|
||||
{
|
||||
|
@ -436,7 +436,7 @@ HandleSetLatchMods(XkbcDescPtr xkb,
|
|||
}
|
||||
|
||||
static Bool
|
||||
HandleLockMods(XkbcDescPtr xkb,
|
||||
HandleLockMods(struct xkb_desc * xkb,
|
||||
struct xkb_any_action * action,
|
||||
unsigned field, ExprDef * array_ndx, ExprDef * value)
|
||||
{
|
||||
|
@ -511,7 +511,7 @@ CheckGroupField(unsigned action,
|
|||
}
|
||||
|
||||
static Bool
|
||||
HandleSetLatchGroup(XkbcDescPtr xkb,
|
||||
HandleSetLatchGroup(struct xkb_desc * xkb,
|
||||
struct xkb_any_action * action,
|
||||
unsigned field, ExprDef * array_ndx, ExprDef * value)
|
||||
{
|
||||
|
@ -547,7 +547,7 @@ HandleSetLatchGroup(XkbcDescPtr xkb,
|
|||
if (CheckGroupField(action->type, value, &t1, &t2))
|
||||
{
|
||||
act->flags = t1;
|
||||
XkbSASetGroup(act, t2);
|
||||
act->group = t2;
|
||||
return True;
|
||||
}
|
||||
return False;
|
||||
|
@ -556,7 +556,7 @@ HandleSetLatchGroup(XkbcDescPtr xkb,
|
|||
}
|
||||
|
||||
static Bool
|
||||
HandleLockGroup(XkbcDescPtr xkb,
|
||||
HandleLockGroup(struct xkb_desc * xkb,
|
||||
struct xkb_any_action * action,
|
||||
unsigned field, ExprDef * array_ndx, ExprDef * value)
|
||||
{
|
||||
|
@ -573,7 +573,7 @@ HandleLockGroup(XkbcDescPtr xkb,
|
|||
if (CheckGroupField(action->type, value, &t1, &t2))
|
||||
{
|
||||
act->flags = t1;
|
||||
XkbSASetGroup(act, t2);
|
||||
act->group = t2;
|
||||
return True;
|
||||
}
|
||||
return False;
|
||||
|
@ -582,7 +582,7 @@ HandleLockGroup(XkbcDescPtr xkb,
|
|||
}
|
||||
|
||||
static Bool
|
||||
HandleMovePtr(XkbcDescPtr xkb,
|
||||
HandleMovePtr(struct xkb_desc * xkb,
|
||||
struct xkb_any_action * action,
|
||||
unsigned field, ExprDef * array_ndx, ExprDef * value)
|
||||
{
|
||||
|
@ -647,7 +647,7 @@ static LookupEntry lockWhich[] = {
|
|||
};
|
||||
|
||||
static Bool
|
||||
HandlePtrBtn(XkbcDescPtr xkb,
|
||||
HandlePtrBtn(struct xkb_desc * xkb,
|
||||
struct xkb_any_action * action,
|
||||
unsigned field, ExprDef * array_ndx, ExprDef * value)
|
||||
{
|
||||
|
@ -709,7 +709,7 @@ static LookupEntry ptrDflts[] = {
|
|||
};
|
||||
|
||||
static Bool
|
||||
HandleSetPtrDflt(XkbcDescPtr xkb,
|
||||
HandleSetPtrDflt(struct xkb_desc * xkb,
|
||||
struct xkb_any_action * action,
|
||||
unsigned field, ExprDef * array_ndx, ExprDef * value)
|
||||
{
|
||||
|
@ -759,9 +759,9 @@ HandleSetPtrDflt(XkbcDescPtr xkb,
|
|||
return False;
|
||||
}
|
||||
if (value->op == OpNegate)
|
||||
XkbSASetPtrDfltValue(act, -rtrn.ival);
|
||||
act->value = -rtrn.ival;
|
||||
else
|
||||
XkbSASetPtrDfltValue(act, rtrn.ival);
|
||||
act->value = rtrn.ival;
|
||||
return True;
|
||||
}
|
||||
return ReportIllegal(action->type, field);
|
||||
|
@ -782,7 +782,7 @@ static LookupEntry isoNames[] = {
|
|||
};
|
||||
|
||||
static Bool
|
||||
HandleISOLock(XkbcDescPtr xkb,
|
||||
HandleISOLock(struct xkb_desc * xkb,
|
||||
struct xkb_any_action * action,
|
||||
unsigned field, ExprDef * array_ndx, ExprDef * value)
|
||||
{
|
||||
|
@ -829,7 +829,7 @@ HandleISOLock(XkbcDescPtr xkb,
|
|||
}
|
||||
|
||||
static Bool
|
||||
HandleSwitchScreen(XkbcDescPtr xkb,
|
||||
HandleSwitchScreen(struct xkb_desc * xkb,
|
||||
struct xkb_any_action * action,
|
||||
unsigned field, ExprDef * array_ndx, ExprDef * value)
|
||||
{
|
||||
|
@ -862,9 +862,9 @@ HandleSwitchScreen(XkbcDescPtr xkb,
|
|||
return False;
|
||||
}
|
||||
if (value->op == OpNegate)
|
||||
XkbSASetScreen(act, -rtrn.ival);
|
||||
act->screen = -rtrn.ival;
|
||||
else
|
||||
XkbSASetScreen(act, rtrn.ival);
|
||||
act->screen = rtrn.ival;
|
||||
return True;
|
||||
}
|
||||
else if (field == F_Same)
|
||||
|
@ -921,7 +921,7 @@ LookupEntry ctrlNames[] = {
|
|||
};
|
||||
|
||||
static Bool
|
||||
HandleSetLockControls(XkbcDescPtr xkb,
|
||||
HandleSetLockControls(struct xkb_desc * xkb,
|
||||
struct xkb_any_action * action,
|
||||
unsigned field, ExprDef * array_ndx, ExprDef * value)
|
||||
{
|
||||
|
@ -953,7 +953,7 @@ static LookupEntry evNames[] = {
|
|||
};
|
||||
|
||||
static Bool
|
||||
HandleActionMessage(XkbcDescPtr xkb,
|
||||
HandleActionMessage(struct xkb_desc * xkb,
|
||||
struct xkb_any_action * action,
|
||||
unsigned field, ExprDef * array_ndx, ExprDef * value)
|
||||
{
|
||||
|
@ -1031,7 +1031,7 @@ HandleActionMessage(XkbcDescPtr xkb,
|
|||
}
|
||||
|
||||
static Bool
|
||||
HandleRedirectKey(XkbcDescPtr xkb,
|
||||
HandleRedirectKey(struct xkb_desc * xkb,
|
||||
struct xkb_any_action * action,
|
||||
unsigned field, ExprDef * array_ndx, ExprDef * value)
|
||||
{
|
||||
|
@ -1082,7 +1082,7 @@ HandleRedirectKey(XkbcDescPtr xkb,
|
|||
}
|
||||
|
||||
static Bool
|
||||
HandleDeviceBtn(XkbcDescPtr xkb,
|
||||
HandleDeviceBtn(struct xkb_desc * xkb,
|
||||
struct xkb_any_action * action,
|
||||
unsigned field, ExprDef * array_ndx, ExprDef * value)
|
||||
{
|
||||
|
@ -1152,7 +1152,7 @@ HandleDeviceBtn(XkbcDescPtr xkb,
|
|||
}
|
||||
|
||||
static Bool
|
||||
HandleDeviceValuator(XkbcDescPtr xkb,
|
||||
HandleDeviceValuator(struct xkb_desc * xkb,
|
||||
struct xkb_any_action * action,
|
||||
unsigned field, ExprDef * array_ndx, ExprDef * value)
|
||||
{
|
||||
|
@ -1167,7 +1167,7 @@ HandleDeviceValuator(XkbcDescPtr xkb,
|
|||
}
|
||||
|
||||
static Bool
|
||||
HandlePrivate(XkbcDescPtr xkb,
|
||||
HandlePrivate(struct xkb_desc * xkb,
|
||||
struct xkb_any_action * action,
|
||||
unsigned field, ExprDef * array_ndx, ExprDef * value)
|
||||
{
|
||||
|
@ -1236,7 +1236,7 @@ HandlePrivate(XkbcDescPtr xkb,
|
|||
return ReportIllegal(PrivateAction, field);
|
||||
}
|
||||
|
||||
typedef Bool(*actionHandler) (XkbcDescPtr /* xkb */ ,
|
||||
typedef Bool(*actionHandler) (struct xkb_desc * /* xkb */ ,
|
||||
struct xkb_any_action * /* action */ ,
|
||||
unsigned /* field */ ,
|
||||
ExprDef * /* array_ndx */ ,
|
||||
|
@ -1277,7 +1277,7 @@ ApplyActionFactoryDefaults(union xkb_action * action)
|
|||
{ /* increment default button */
|
||||
action->dflt.affect = XkbSA_AffectDfltBtn;
|
||||
action->dflt.flags = 0;
|
||||
action->dflt.valueXXX = 1;
|
||||
action->dflt.value = 1;
|
||||
}
|
||||
else if (action->type == XkbSA_ISOLock)
|
||||
{
|
||||
|
@ -1289,7 +1289,7 @@ ApplyActionFactoryDefaults(union xkb_action * action)
|
|||
|
||||
int
|
||||
HandleActionDef(ExprDef * def,
|
||||
XkbcDescPtr xkb,
|
||||
struct xkb_desc * xkb,
|
||||
struct xkb_any_action * action, unsigned mergeMode, ActionInfo * info)
|
||||
{
|
||||
ExprDef *arg;
|
||||
|
@ -1394,7 +1394,7 @@ HandleActionDef(ExprDef * def,
|
|||
/***====================================================================***/
|
||||
|
||||
int
|
||||
SetActionField(XkbcDescPtr xkb,
|
||||
SetActionField(struct xkb_desc * xkb,
|
||||
char *elem,
|
||||
char *field,
|
||||
ExprDef * array_ndx, ExprDef * value, ActionInfo ** info_rtrn)
|
||||
|
|
|
@ -65,13 +65,13 @@ typedef struct _ActionInfo
|
|||
} ActionInfo;
|
||||
|
||||
extern int HandleActionDef(ExprDef * /* def */ ,
|
||||
XkbcDescPtr /* xkb */ ,
|
||||
struct xkb_desc * /* xkb */ ,
|
||||
struct xkb_any_action * /* action */ ,
|
||||
unsigned /* mergeMode */ ,
|
||||
ActionInfo * /* info */
|
||||
);
|
||||
|
||||
extern int SetActionField(XkbcDescPtr /* xkb */ ,
|
||||
extern int SetActionField(struct xkb_desc * /* xkb */ ,
|
||||
char * /* elem */ ,
|
||||
char * /* field */ ,
|
||||
ExprDef * /* index */ ,
|
||||
|
|
|
@ -155,10 +155,10 @@ MergeAliases(AliasInfo ** into, AliasInfo ** merge, unsigned how_merge)
|
|||
}
|
||||
|
||||
int
|
||||
ApplyAliases(XkbcDescPtr xkb, Bool toGeom, AliasInfo ** info_in)
|
||||
ApplyAliases(struct xkb_desc * xkb, Bool toGeom, AliasInfo ** info_in)
|
||||
{
|
||||
register int i;
|
||||
XkbKeyAliasPtr old, a;
|
||||
struct xkb_key_alias *old, *a;
|
||||
AliasInfo *info;
|
||||
int nNew, nOld;
|
||||
int status;
|
||||
|
@ -235,8 +235,8 @@ ApplyAliases(XkbcDescPtr xkb, Bool toGeom, AliasInfo ** info_in)
|
|||
{
|
||||
if (!xkb->geom)
|
||||
{
|
||||
XkbcGeometrySizesRec sizes;
|
||||
bzero((char *) &sizes, sizeof(XkbcGeometrySizesRec));
|
||||
struct xkb_geometry_sizes sizes;
|
||||
bzero((char *) &sizes, sizeof(struct xkb_geometry_sizes));
|
||||
sizes.which = XkbGeomKeyAliasesMask;
|
||||
sizes.num_key_aliases = nOld + nNew;
|
||||
status = XkbcAllocGeometry(xkb, &sizes);
|
||||
|
|
|
@ -48,7 +48,7 @@ extern Bool MergeAliases(AliasInfo ** /* into */ ,
|
|||
unsigned /* how_merge */
|
||||
);
|
||||
|
||||
extern int ApplyAliases(XkbcDescPtr /* xkb */ ,
|
||||
extern int ApplyAliases(struct xkb_desc * /* xkb */ ,
|
||||
Bool /* toGeom */ ,
|
||||
AliasInfo ** /* info */
|
||||
);
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
typedef struct _SymInterpInfo
|
||||
{
|
||||
CommonInfo defs;
|
||||
XkbcSymInterpretRec interp;
|
||||
struct xkb_sym_interpret interp;
|
||||
} SymInterpInfo;
|
||||
|
||||
#define _SI_VirtualMod (1<<0)
|
||||
|
@ -70,7 +70,7 @@ typedef struct _CompatInfo
|
|||
LEDInfo *leds;
|
||||
VModInfo vmods;
|
||||
ActionInfo *act;
|
||||
XkbcDescPtr xkb;
|
||||
struct xkb_desc * xkb;
|
||||
} CompatInfo;
|
||||
|
||||
/***====================================================================***/
|
||||
|
@ -102,7 +102,7 @@ siText(SymInterpInfo * si, CompatInfo * info)
|
|||
}
|
||||
|
||||
static void
|
||||
InitCompatInfo(CompatInfo * info, XkbcDescPtr xkb)
|
||||
InitCompatInfo(CompatInfo * info, struct xkb_desc * xkb)
|
||||
{
|
||||
register int i;
|
||||
|
||||
|
@ -135,7 +135,7 @@ InitCompatInfo(CompatInfo * info, XkbcDescPtr xkb)
|
|||
}
|
||||
|
||||
static void
|
||||
ClearCompatInfo(CompatInfo * info, XkbcDescPtr xkb)
|
||||
ClearCompatInfo(CompatInfo * info, struct xkb_desc * xkb)
|
||||
{
|
||||
register int i;
|
||||
|
||||
|
@ -394,14 +394,14 @@ MergeIncludedCompatMaps(CompatInfo * into, CompatInfo * from, unsigned merge)
|
|||
}
|
||||
|
||||
typedef void (*FileHandler) (XkbFile * /* rtrn */ ,
|
||||
XkbcDescPtr /* xkb */ ,
|
||||
struct xkb_desc * /* xkb */ ,
|
||||
unsigned /* merge */ ,
|
||||
CompatInfo * /* info */
|
||||
);
|
||||
|
||||
static Bool
|
||||
HandleIncludeCompatMap(IncludeStmt * stmt,
|
||||
XkbcDescPtr xkb, CompatInfo * info, FileHandler hndlr)
|
||||
struct xkb_desc * xkb, CompatInfo * info, FileHandler hndlr)
|
||||
{
|
||||
unsigned newMerge;
|
||||
XkbFile *rtrn;
|
||||
|
@ -494,7 +494,7 @@ static LookupEntry useModMapValues[] = {
|
|||
|
||||
static int
|
||||
SetInterpField(SymInterpInfo * si,
|
||||
XkbcDescPtr xkb,
|
||||
struct xkb_desc * xkb,
|
||||
char *field,
|
||||
ExprDef * arrayNdx, ExprDef * value, CompatInfo * info)
|
||||
{
|
||||
|
@ -605,7 +605,7 @@ LookupEntry groupNames[] = {
|
|||
};
|
||||
|
||||
static int
|
||||
HandleInterpVar(VarDef * stmt, XkbcDescPtr xkb, CompatInfo * info)
|
||||
HandleInterpVar(VarDef * stmt, struct xkb_desc * xkb, CompatInfo * info)
|
||||
{
|
||||
ExprResult elem, field;
|
||||
ExprDef *ndx;
|
||||
|
@ -628,7 +628,7 @@ HandleInterpVar(VarDef * stmt, XkbcDescPtr xkb, CompatInfo * info)
|
|||
}
|
||||
|
||||
static int
|
||||
HandleInterpBody(VarDef * def, XkbcDescPtr xkb, SymInterpInfo * si,
|
||||
HandleInterpBody(VarDef * def, struct xkb_desc * xkb, SymInterpInfo * si,
|
||||
CompatInfo * info)
|
||||
{
|
||||
int ok = 1;
|
||||
|
@ -651,7 +651,7 @@ HandleInterpBody(VarDef * def, XkbcDescPtr xkb, SymInterpInfo * si,
|
|||
}
|
||||
|
||||
static int
|
||||
HandleInterpDef(InterpDef * def, XkbcDescPtr xkb, unsigned merge,
|
||||
HandleInterpDef(InterpDef * def, struct xkb_desc * xkb, unsigned merge,
|
||||
CompatInfo * info)
|
||||
{
|
||||
unsigned pred, mods;
|
||||
|
@ -692,7 +692,7 @@ HandleInterpDef(InterpDef * def, XkbcDescPtr xkb, unsigned merge,
|
|||
|
||||
static int
|
||||
HandleGroupCompatDef(GroupCompatDef * def,
|
||||
XkbcDescPtr xkb, unsigned merge, CompatInfo * info)
|
||||
struct xkb_desc * xkb, unsigned merge, CompatInfo * info)
|
||||
{
|
||||
ExprResult val;
|
||||
GroupCompatInfo tmp;
|
||||
|
@ -723,7 +723,7 @@ HandleGroupCompatDef(GroupCompatDef * def,
|
|||
|
||||
static void
|
||||
HandleCompatMapFile(XkbFile * file,
|
||||
XkbcDescPtr xkb, unsigned merge, CompatInfo * info)
|
||||
struct xkb_desc * xkb, unsigned merge, CompatInfo * info)
|
||||
{
|
||||
ParseCommon *stmt;
|
||||
|
||||
|
@ -793,7 +793,7 @@ HandleCompatMapFile(XkbFile * file,
|
|||
|
||||
static void
|
||||
CopyInterps(CompatInfo * info,
|
||||
XkbcCompatMapPtr compat, Bool needSymbol, unsigned pred)
|
||||
struct xkb_compat_map * compat, Bool needSymbol, unsigned pred)
|
||||
{
|
||||
SymInterpInfo *si;
|
||||
|
||||
|
@ -815,7 +815,7 @@ CopyInterps(CompatInfo * info,
|
|||
}
|
||||
|
||||
Bool
|
||||
CompileCompatMap(XkbFile *file, XkbcDescPtr xkb, unsigned merge,
|
||||
CompileCompatMap(XkbFile *file, struct xkb_desc * xkb, unsigned merge,
|
||||
LEDInfoPtr *unboundLEDs)
|
||||
{
|
||||
int i;
|
||||
|
@ -848,7 +848,7 @@ CompileCompatMap(XkbFile *file, XkbcDescPtr xkb, unsigned merge,
|
|||
scanFile, info.name);
|
||||
}
|
||||
}
|
||||
size = info.nInterps * sizeof(XkbcSymInterpretRec);
|
||||
size = info.nInterps * sizeof(struct xkb_sym_interpret);
|
||||
if (size > 0)
|
||||
{
|
||||
CopyInterps(&info, xkb->compat, True, XkbSI_Exactly);
|
||||
|
|
|
@ -32,7 +32,7 @@ typedef union _ExprResult
|
|||
char *str;
|
||||
int ival;
|
||||
unsigned uval;
|
||||
XkbKeyNameRec keyName;
|
||||
struct xkb_key_name keyName;
|
||||
} ExprResult;
|
||||
|
||||
typedef Bool(*IdentLookupFunc) (char * /* priv */ ,
|
||||
|
|
|
@ -62,9 +62,9 @@ typedef struct _ShapeInfo
|
|||
short index;
|
||||
unsigned short nOutlines;
|
||||
unsigned short szOutlines;
|
||||
XkbcOutlinePtr outlines;
|
||||
XkbcOutlinePtr approx;
|
||||
XkbcOutlinePtr primary;
|
||||
struct xkb_outline * outlines;
|
||||
struct xkb_outline * approx;
|
||||
struct xkb_outline * primary;
|
||||
int dfltCornerRadius;
|
||||
} ShapeInfo;
|
||||
|
||||
|
@ -1317,13 +1317,13 @@ MergeIncludedGeometry(GeometryInfo * into, GeometryInfo * from,
|
|||
}
|
||||
|
||||
typedef void (*FileHandler) (XkbFile * /* file */ ,
|
||||
XkbcDescPtr /* xkb */ ,
|
||||
struct xkb_desc * /* xkb */ ,
|
||||
unsigned /* merge */ ,
|
||||
GeometryInfo * /* info */
|
||||
);
|
||||
|
||||
static Bool
|
||||
HandleIncludeGeometry(IncludeStmt * stmt, XkbcDescPtr xkb, GeometryInfo * info,
|
||||
HandleIncludeGeometry(IncludeStmt * stmt, struct xkb_desc * xkb, GeometryInfo * info,
|
||||
FileHandler hndlr)
|
||||
{
|
||||
unsigned newMerge;
|
||||
|
@ -2113,7 +2113,7 @@ SetGeometryProperty(GeometryInfo * info, char *property, ExprDef * value)
|
|||
}
|
||||
|
||||
static int
|
||||
HandleGeometryVar(VarDef * stmt, XkbcDescPtr xkb, GeometryInfo * info)
|
||||
HandleGeometryVar(VarDef * stmt, struct xkb_desc * xkb, GeometryInfo * info)
|
||||
{
|
||||
ExprResult elem, field, tmp;
|
||||
ExprDef *ndx;
|
||||
|
@ -2398,7 +2398,7 @@ HandleShapeBody(ShapeDef * def, ShapeInfo * si, unsigned merge,
|
|||
{
|
||||
OutlineDef *ol;
|
||||
int nOut, nPt;
|
||||
XkbcOutlinePtr outline;
|
||||
struct xkb_outline * outline;
|
||||
ExprDef *pt;
|
||||
|
||||
if (def->nOutlines < 1)
|
||||
|
@ -2408,7 +2408,7 @@ HandleShapeBody(ShapeDef * def, ShapeInfo * si, unsigned merge,
|
|||
return True;
|
||||
}
|
||||
si->nOutlines = def->nOutlines;
|
||||
si->outlines = uTypedCalloc(def->nOutlines, XkbcOutlineRec);
|
||||
si->outlines = uTypedCalloc(def->nOutlines, struct xkb_outline);
|
||||
if (!si->outlines)
|
||||
{
|
||||
ERROR("Couldn't allocate outlines for \"%s\"\n", shText(si));
|
||||
|
@ -2428,7 +2428,7 @@ HandleShapeBody(ShapeDef * def, ShapeInfo * si, unsigned merge,
|
|||
outline = &si->outlines[nOut++];
|
||||
outline->num_points = ol->nPoints;
|
||||
outline->corner_radius = si->dfltCornerRadius;
|
||||
outline->points = uTypedCalloc(ol->nPoints, XkbcPointRec);
|
||||
outline->points = uTypedCalloc(ol->nPoints, struct xkb_point);
|
||||
if (!outline->points)
|
||||
{
|
||||
ERROR("Can't allocate points for \"%s\"\n", shText(si));
|
||||
|
@ -2488,7 +2488,7 @@ HandleShapeBody(ShapeDef * def, ShapeInfo * si, unsigned merge,
|
|||
}
|
||||
|
||||
static int
|
||||
HandleShapeDef(ShapeDef * def, XkbcDescPtr xkb, unsigned merge,
|
||||
HandleShapeDef(ShapeDef * def, struct xkb_desc * xkb, unsigned merge,
|
||||
GeometryInfo * info)
|
||||
{
|
||||
ShapeInfo si;
|
||||
|
@ -2822,7 +2822,7 @@ HandleSectionBody(SectionDef * def,
|
|||
|
||||
static int
|
||||
HandleSectionDef(SectionDef * def,
|
||||
XkbcDescPtr xkb, unsigned merge, GeometryInfo * info)
|
||||
struct xkb_desc * xkb, unsigned merge, GeometryInfo * info)
|
||||
{
|
||||
SectionInfo si;
|
||||
|
||||
|
@ -2842,7 +2842,7 @@ HandleSectionDef(SectionDef * def,
|
|||
|
||||
static void
|
||||
HandleGeometryFile(XkbFile * file,
|
||||
XkbcDescPtr xkb, unsigned merge, GeometryInfo * info)
|
||||
struct xkb_desc * xkb, unsigned merge, GeometryInfo * info)
|
||||
{
|
||||
ParseCommon *stmt;
|
||||
char *failWhat;
|
||||
|
@ -2922,11 +2922,11 @@ HandleGeometryFile(XkbFile * file,
|
|||
/***====================================================================***/
|
||||
|
||||
static Bool
|
||||
CopyShapeDef(XkbcGeometryPtr geom, ShapeInfo * si)
|
||||
CopyShapeDef(struct xkb_geometry * geom, ShapeInfo * si)
|
||||
{
|
||||
register int i, n;
|
||||
XkbcShapePtr shape;
|
||||
XkbcOutlinePtr old_outline, outline;
|
||||
struct xkb_shape * shape;
|
||||
struct xkb_outline *old_outline, *outline;
|
||||
uint32_t name;
|
||||
|
||||
si->index = geom->num_shapes;
|
||||
|
@ -2949,7 +2949,7 @@ CopyShapeDef(XkbcGeometryPtr geom, ShapeInfo * si)
|
|||
return False;
|
||||
}
|
||||
n = old_outline->num_points;
|
||||
memcpy(outline->points, old_outline->points, n * sizeof(XkbcPointRec));
|
||||
memcpy(outline->points, old_outline->points, n * sizeof(struct xkb_point));
|
||||
outline->num_points = old_outline->num_points;
|
||||
outline->corner_radius = old_outline->corner_radius;
|
||||
}
|
||||
|
@ -3284,13 +3284,13 @@ FontFromParts(uint32_t fontTok,
|
|||
}
|
||||
|
||||
static Bool
|
||||
CopyDoodadDef(XkbcGeometryPtr geom,
|
||||
XkbcSectionPtr section, DoodadInfo * di, GeometryInfo * info)
|
||||
CopyDoodadDef(struct xkb_geometry * geom,
|
||||
struct xkb_section * section, DoodadInfo * di, GeometryInfo * info)
|
||||
{
|
||||
uint32_t name;
|
||||
XkbcDoodadPtr doodad;
|
||||
XkbcColorPtr color;
|
||||
XkbcShapePtr shape;
|
||||
union xkb_doodad * doodad;
|
||||
struct xkb_color * color;
|
||||
struct xkb_shape * shape;
|
||||
ShapeInfo *si;
|
||||
|
||||
if (!VerifyDoodadInfo(di, info))
|
||||
|
@ -3372,15 +3372,15 @@ CopyDoodadDef(XkbcGeometryPtr geom,
|
|||
/***====================================================================***/
|
||||
|
||||
static Bool
|
||||
VerifyOverlayInfo(XkbcGeometryPtr geom,
|
||||
XkbcSectionPtr section,
|
||||
VerifyOverlayInfo(struct xkb_geometry * geom,
|
||||
struct xkb_section * section,
|
||||
OverlayInfo * oi,
|
||||
GeometryInfo * info, short rowMap[256], short rowSize[256])
|
||||
{
|
||||
register OverlayKeyInfo *ki, *next;
|
||||
unsigned long oKey, uKey, sKey;
|
||||
XkbcRowPtr row;
|
||||
XkbcKeyPtr key;
|
||||
struct xkb_row * row;
|
||||
struct xkb_key * key;
|
||||
int r, k;
|
||||
|
||||
/* find out which row each key is in */
|
||||
|
@ -3469,13 +3469,13 @@ VerifyOverlayInfo(XkbcGeometryPtr geom,
|
|||
}
|
||||
|
||||
static Bool
|
||||
CopyOverlayDef(XkbcGeometryPtr geom,
|
||||
XkbcSectionPtr section, OverlayInfo * oi, GeometryInfo * info)
|
||||
CopyOverlayDef(struct xkb_geometry * geom,
|
||||
struct xkb_section * section, OverlayInfo * oi, GeometryInfo * info)
|
||||
{
|
||||
uint32_t name;
|
||||
XkbcOverlayPtr ol;
|
||||
XkbcOverlayRowPtr row;
|
||||
XkbcOverlayKeyPtr key;
|
||||
struct xkb_overlay * ol;
|
||||
struct xkb_overlay_row * row;
|
||||
struct xkb_overlay_key * key;
|
||||
OverlayKeyInfo *ki;
|
||||
short rowMap[256], rowSize[256];
|
||||
int i;
|
||||
|
@ -3511,7 +3511,7 @@ CopyOverlayDef(XkbcGeometryPtr geom,
|
|||
{
|
||||
row = &ol->rows[ki->overlayRow];
|
||||
key = &row->keys[row->num_keys++];
|
||||
bzero(key, sizeof(XkbcOverlayKeyRec));
|
||||
bzero(key, sizeof(struct xkb_overlay_key));
|
||||
strncpy(key->over.name, ki->over, XkbKeyNameLength);
|
||||
strncpy(key->under.name, ki->under, XkbKeyNameLength);
|
||||
}
|
||||
|
@ -3521,11 +3521,11 @@ CopyOverlayDef(XkbcGeometryPtr geom,
|
|||
/***====================================================================***/
|
||||
|
||||
static Bool
|
||||
CopySectionDef(XkbcGeometryPtr geom, SectionInfo * si, GeometryInfo * info)
|
||||
CopySectionDef(struct xkb_geometry * geom, SectionInfo * si, GeometryInfo * info)
|
||||
{
|
||||
XkbcSectionPtr section;
|
||||
XkbcRowPtr row;
|
||||
XkbcKeyPtr key;
|
||||
struct xkb_section * section;
|
||||
struct xkb_row * row;
|
||||
struct xkb_key * key;
|
||||
KeyInfo *ki;
|
||||
RowInfo *ri;
|
||||
|
||||
|
@ -3557,7 +3557,7 @@ CopySectionDef(XkbcGeometryPtr geom, SectionInfo * si, GeometryInfo * info)
|
|||
row->vertical = ri->vertical;
|
||||
for (ki = ri->keys; ki != NULL; ki = (KeyInfo *) ki->defs.next)
|
||||
{
|
||||
XkbcColorPtr color;
|
||||
struct xkb_color * color;
|
||||
if ((ki->defs.defined & _GK_Name) == 0)
|
||||
{
|
||||
ERROR("Key %d of row %d in section %s has no name\n",
|
||||
|
@ -3624,7 +3624,7 @@ CopySectionDef(XkbcGeometryPtr geom, SectionInfo * si, GeometryInfo * info)
|
|||
/***====================================================================***/
|
||||
|
||||
Bool
|
||||
CompileGeometry(XkbFile *file, XkbcDescPtr xkb, unsigned merge)
|
||||
CompileGeometry(XkbFile *file, struct xkb_desc * xkb, unsigned merge)
|
||||
{
|
||||
GeometryInfo info;
|
||||
|
||||
|
@ -3633,8 +3633,8 @@ CompileGeometry(XkbFile *file, XkbcDescPtr xkb, unsigned merge)
|
|||
|
||||
if (info.errorCount == 0)
|
||||
{
|
||||
XkbcGeometryPtr geom;
|
||||
XkbcGeometrySizesRec sizes;
|
||||
struct xkb_geometry * geom;
|
||||
struct xkb_geometry_sizes sizes;
|
||||
bzero(&sizes, sizeof(sizes));
|
||||
sizes.which = XkbGeomAllMask;
|
||||
sizes.num_properties = info.nProps;
|
||||
|
|
|
@ -199,7 +199,7 @@ static LookupEntry groupComponentNames[] = {
|
|||
|
||||
int
|
||||
SetIndicatorMapField(LEDInfo * led,
|
||||
XkbcDescPtr xkb,
|
||||
struct xkb_desc * xkb,
|
||||
char *field, ExprDef * arrayNdx, ExprDef * value)
|
||||
{
|
||||
ExprResult rtrn;
|
||||
|
@ -323,7 +323,7 @@ SetIndicatorMapField(LEDInfo * led,
|
|||
|
||||
LEDInfo *
|
||||
HandleIndicatorMapDef(IndicatorMapDef * def,
|
||||
XkbcDescPtr xkb,
|
||||
struct xkb_desc * xkb,
|
||||
LEDInfo * dflt, LEDInfo * oldLEDs, unsigned merge)
|
||||
{
|
||||
LEDInfo led, *rtrn;
|
||||
|
@ -372,7 +372,7 @@ HandleIndicatorMapDef(IndicatorMapDef * def,
|
|||
}
|
||||
|
||||
Bool
|
||||
CopyIndicatorMapDefs(XkbcDescPtr xkb, LEDInfo *leds, LEDInfo **unboundRtrn)
|
||||
CopyIndicatorMapDefs(struct xkb_desc * xkb, LEDInfo *leds, LEDInfo **unboundRtrn)
|
||||
{
|
||||
LEDInfo *led, *next;
|
||||
LEDInfo *unbound, *last;
|
||||
|
@ -416,7 +416,7 @@ CopyIndicatorMapDefs(XkbcDescPtr xkb, LEDInfo *leds, LEDInfo **unboundRtrn)
|
|||
}
|
||||
else
|
||||
{
|
||||
register XkbIndicatorMapPtr im;
|
||||
register struct xkb_indicator_map * im;
|
||||
im = &xkb->indicators->maps[led->indicator - 1];
|
||||
im->flags = led->flags;
|
||||
im->which_groups = led->which_groups;
|
||||
|
@ -439,7 +439,7 @@ CopyIndicatorMapDefs(XkbcDescPtr xkb, LEDInfo *leds, LEDInfo **unboundRtrn)
|
|||
}
|
||||
|
||||
Bool
|
||||
BindIndicators(XkbcDescPtr xkb, Bool force, LEDInfo *unbound,
|
||||
BindIndicators(struct xkb_desc * xkb, Bool force, LEDInfo *unbound,
|
||||
LEDInfo **unboundRtrn)
|
||||
{
|
||||
register int i;
|
||||
|
@ -536,7 +536,7 @@ BindIndicators(XkbcDescPtr xkb, Bool force, LEDInfo *unbound,
|
|||
}
|
||||
else
|
||||
{
|
||||
XkbIndicatorMapPtr map;
|
||||
struct xkb_indicator_map * map;
|
||||
map = &xkb->indicators->maps[led->indicator - 1];
|
||||
map->flags = led->flags;
|
||||
map->which_groups = led->which_groups;
|
||||
|
|
|
@ -60,24 +60,24 @@ extern LEDInfo *AddIndicatorMap(LEDInfo * /* oldLEDs */ ,
|
|||
);
|
||||
|
||||
extern int SetIndicatorMapField(LEDInfo * /* led */ ,
|
||||
XkbcDescPtr /* xkb */ ,
|
||||
struct xkb_desc * /* xkb */ ,
|
||||
char * /* field */ ,
|
||||
ExprDef * /* arrayNdx */ ,
|
||||
ExprDef * /* value */
|
||||
);
|
||||
|
||||
extern LEDInfo *HandleIndicatorMapDef(IndicatorMapDef * /* stmt */ ,
|
||||
XkbcDescPtr /* xkb */ ,
|
||||
struct xkb_desc * /* xkb */ ,
|
||||
LEDInfo * /* dflt */ ,
|
||||
LEDInfo * /* oldLEDs */ ,
|
||||
unsigned /* mergeMode */
|
||||
);
|
||||
|
||||
extern Bool
|
||||
CopyIndicatorMapDefs(XkbcDescPtr xkb, LEDInfo *leds, LEDInfo **unboundRtrn);
|
||||
CopyIndicatorMapDefs(struct xkb_desc * xkb, LEDInfo *leds, LEDInfo **unboundRtrn);
|
||||
|
||||
extern Bool
|
||||
BindIndicators(XkbcDescPtr xkb, Bool force, LEDInfo *unbound,
|
||||
BindIndicators(struct xkb_desc * xkb, Bool force, LEDInfo *unbound,
|
||||
LEDInfo **unboundRtrn);
|
||||
|
||||
#endif /* INDICATORS_H */
|
||||
|
|
|
@ -84,7 +84,7 @@ typedef struct _KeyNamesInfo
|
|||
} KeyNamesInfo;
|
||||
|
||||
static void HandleKeycodesFile(XkbFile * file,
|
||||
XkbcDescPtr xkb,
|
||||
struct xkb_desc * xkb,
|
||||
unsigned merge,
|
||||
KeyNamesInfo * info);
|
||||
|
||||
|
@ -495,7 +495,7 @@ MergeIncludedKeycodes(KeyNamesInfo * into, KeyNamesInfo * from,
|
|||
* @param info Struct to store the key info in.
|
||||
*/
|
||||
static Bool
|
||||
HandleIncludeKeycodes(IncludeStmt * stmt, XkbcDescPtr xkb, KeyNamesInfo * info)
|
||||
HandleIncludeKeycodes(IncludeStmt * stmt, struct xkb_desc * xkb, KeyNamesInfo * info)
|
||||
{
|
||||
unsigned newMerge;
|
||||
XkbFile *rtrn;
|
||||
|
@ -750,7 +750,7 @@ HandleIndicatorNameDef(IndicatorNameDef * def,
|
|||
*/
|
||||
static void
|
||||
HandleKeycodesFile(XkbFile * file,
|
||||
XkbcDescPtr xkb, unsigned merge, KeyNamesInfo * info)
|
||||
struct xkb_desc * xkb, unsigned merge, KeyNamesInfo * info)
|
||||
{
|
||||
ParseCommon *stmt;
|
||||
|
||||
|
@ -822,7 +822,7 @@ HandleKeycodesFile(XkbFile * file,
|
|||
* @return True on success, False otherwise.
|
||||
*/
|
||||
Bool
|
||||
CompileKeycodes(XkbFile *file, XkbcDescPtr xkb, unsigned merge)
|
||||
CompileKeycodes(XkbFile *file, struct xkb_desc * xkb, unsigned merge)
|
||||
{
|
||||
KeyNamesInfo info; /* contains all the info after parsing */
|
||||
|
||||
|
@ -857,7 +857,7 @@ CompileKeycodes(XkbFile *file, XkbcDescPtr xkb, unsigned merge)
|
|||
}
|
||||
else
|
||||
{
|
||||
WSGO("Cannot create XkbcNamesRec in CompileKeycodes\n");
|
||||
WSGO("Cannot create struct xkb_names in CompileKeycodes\n");
|
||||
return False;
|
||||
}
|
||||
if (info.leds)
|
||||
|
|
|
@ -48,7 +48,7 @@ static XkbFile *sections[MAX_SECTIONS];
|
|||
* XkmKeyNamesIdx, etc.)
|
||||
*/
|
||||
Bool
|
||||
CompileKeymap(XkbFile *file, XkbcDescPtr xkb, unsigned merge)
|
||||
CompileKeymap(XkbFile *file, struct xkb_desc * xkb, unsigned merge)
|
||||
{
|
||||
unsigned have;
|
||||
Bool ok;
|
||||
|
|
|
@ -60,7 +60,7 @@ typedef struct _KeyTypeInfo
|
|||
int numLevels;
|
||||
int nEntries;
|
||||
int szEntries;
|
||||
XkbcKTMapEntryPtr entries;
|
||||
struct xkb_kt_map_entry * entries;
|
||||
PreserveInfo *preserve;
|
||||
int szNames;
|
||||
uint32_t *lvlNames;
|
||||
|
@ -92,14 +92,14 @@ uint32_t tok_KEYPAD;
|
|||
|
||||
/***====================================================================***/
|
||||
|
||||
extern Bool AddMapEntry(XkbcDescPtr /* xkb */ ,
|
||||
extern Bool AddMapEntry(struct xkb_desc * /* xkb */ ,
|
||||
KeyTypeInfo * /* type */ ,
|
||||
XkbcKTMapEntryPtr /* new */ ,
|
||||
struct xkb_kt_map_entry * /* new */ ,
|
||||
Bool /* clobber */ ,
|
||||
Bool /* report */
|
||||
);
|
||||
|
||||
extern Bool AddPreserve(XkbcDescPtr /* xkb */ ,
|
||||
extern Bool AddPreserve(struct xkb_desc * /* xkb */ ,
|
||||
KeyTypeInfo * /* type */ ,
|
||||
PreserveInfo * /* new */ ,
|
||||
Bool /* clobber */ ,
|
||||
|
@ -127,7 +127,7 @@ extern Bool AddLevelName(KeyTypeInfo * /* type */ ,
|
|||
/***====================================================================***/
|
||||
|
||||
static void
|
||||
InitKeyTypesInfo(KeyTypesInfo * info, XkbcDescPtr xkb, KeyTypesInfo * from)
|
||||
InitKeyTypesInfo(KeyTypesInfo * info, struct xkb_desc * xkb, KeyTypesInfo * from)
|
||||
{
|
||||
tok_ONE_LEVEL = XkbcInternAtom("ONE_LEVEL", False);
|
||||
tok_TWO_LEVEL = XkbcInternAtom("TWO_LEVEL", False);
|
||||
|
@ -159,10 +159,10 @@ InitKeyTypesInfo(KeyTypesInfo * info, XkbcDescPtr xkb, KeyTypesInfo * from)
|
|||
if (from->dflt.entries)
|
||||
{
|
||||
info->dflt.entries = uTypedCalloc(from->dflt.szEntries,
|
||||
XkbcKTMapEntryRec);
|
||||
struct xkb_kt_map_entry);
|
||||
if (info->dflt.entries)
|
||||
{
|
||||
unsigned sz = from->dflt.nEntries * sizeof(XkbcKTMapEntryRec);
|
||||
unsigned sz = from->dflt.nEntries * sizeof(struct xkb_kt_map_entry);
|
||||
memcpy(info->dflt.entries, from->dflt.entries, sz);
|
||||
}
|
||||
}
|
||||
|
@ -277,7 +277,7 @@ ReportTypeBadWidth(const char *type, int has, int needs)
|
|||
}
|
||||
|
||||
static Bool
|
||||
AddKeyType(XkbcDescPtr xkb, KeyTypesInfo * info, KeyTypeInfo * new)
|
||||
AddKeyType(struct xkb_desc * xkb, KeyTypesInfo * info, KeyTypeInfo * new)
|
||||
{
|
||||
KeyTypeInfo *old;
|
||||
|
||||
|
@ -363,7 +363,7 @@ AddKeyType(XkbcDescPtr xkb, KeyTypesInfo * info, KeyTypeInfo * new)
|
|||
|
||||
static void
|
||||
MergeIncludedKeyTypes(KeyTypesInfo * into,
|
||||
KeyTypesInfo * from, unsigned merge, XkbcDescPtr xkb)
|
||||
KeyTypesInfo * from, unsigned merge, struct xkb_desc * xkb)
|
||||
{
|
||||
KeyTypeInfo *type;
|
||||
|
||||
|
@ -389,14 +389,14 @@ MergeIncludedKeyTypes(KeyTypesInfo * into,
|
|||
}
|
||||
|
||||
typedef void (*FileHandler) (XkbFile * /* file */ ,
|
||||
XkbcDescPtr /* xkb */ ,
|
||||
struct xkb_desc * /* xkb */ ,
|
||||
unsigned /* merge */ ,
|
||||
KeyTypesInfo * /* included */
|
||||
);
|
||||
|
||||
static Bool
|
||||
HandleIncludeKeyTypes(IncludeStmt * stmt,
|
||||
XkbcDescPtr xkb, KeyTypesInfo * info, FileHandler hndlr)
|
||||
struct xkb_desc * xkb, KeyTypesInfo * info, FileHandler hndlr)
|
||||
{
|
||||
unsigned newMerge;
|
||||
XkbFile *rtrn;
|
||||
|
@ -472,11 +472,11 @@ HandleIncludeKeyTypes(IncludeStmt * stmt,
|
|||
|
||||
/***====================================================================***/
|
||||
|
||||
static XkbcKTMapEntryPtr
|
||||
static struct xkb_kt_map_entry *
|
||||
FindMatchingMapEntry(KeyTypeInfo * type, unsigned mask, unsigned vmask)
|
||||
{
|
||||
register int i;
|
||||
XkbcKTMapEntryPtr entry;
|
||||
struct xkb_kt_map_entry * entry;
|
||||
|
||||
for (i = 0, entry = type->entries; i < type->nEntries; i++, entry++)
|
||||
{
|
||||
|
@ -509,12 +509,12 @@ DeleteLevel1MapEntries(KeyTypeInfo * type)
|
|||
* Return a pointer to the next free XkbcKTMapEntry, reallocating space if
|
||||
* necessary.
|
||||
*/
|
||||
static XkbcKTMapEntryPtr
|
||||
static struct xkb_kt_map_entry *
|
||||
NextMapEntry(KeyTypeInfo * type)
|
||||
{
|
||||
if (type->entries == NULL)
|
||||
{
|
||||
type->entries = uTypedCalloc(2, XkbcKTMapEntryRec);
|
||||
type->entries = uTypedCalloc(2, struct xkb_kt_map_entry);
|
||||
if (type->entries == NULL)
|
||||
{
|
||||
ERROR("Couldn't allocate map entries for %s\n", TypeTxt(type));
|
||||
|
@ -529,7 +529,7 @@ NextMapEntry(KeyTypeInfo * type)
|
|||
type->szEntries *= 2;
|
||||
type->entries = uTypedRecalloc(type->entries,
|
||||
type->nEntries, type->szEntries,
|
||||
XkbcKTMapEntryRec);
|
||||
struct xkb_kt_map_entry);
|
||||
if (type->entries == NULL)
|
||||
{
|
||||
ERROR("Couldn't reallocate map entries for %s\n", TypeTxt(type));
|
||||
|
@ -541,7 +541,7 @@ NextMapEntry(KeyTypeInfo * type)
|
|||
}
|
||||
|
||||
Bool
|
||||
AddPreserve(XkbcDescPtr xkb,
|
||||
AddPreserve(struct xkb_desc * xkb,
|
||||
KeyTypeInfo * type, PreserveInfo * new, Bool clobber, Bool report)
|
||||
{
|
||||
PreserveInfo *old;
|
||||
|
@ -613,11 +613,11 @@ AddPreserve(XkbcDescPtr xkb,
|
|||
* @param report True if a warning is to be printed on.
|
||||
*/
|
||||
Bool
|
||||
AddMapEntry(XkbcDescPtr xkb,
|
||||
AddMapEntry(struct xkb_desc * xkb,
|
||||
KeyTypeInfo * type,
|
||||
XkbcKTMapEntryPtr new, Bool clobber, Bool report)
|
||||
struct xkb_kt_map_entry * new, Bool clobber, Bool report)
|
||||
{
|
||||
XkbcKTMapEntryPtr old;
|
||||
struct xkb_kt_map_entry * old;
|
||||
|
||||
if ((old =
|
||||
FindMatchingMapEntry(type, new->mods.real_mods, new->mods.vmods)))
|
||||
|
@ -679,10 +679,10 @@ static LookupEntry lnames[] = {
|
|||
|
||||
static Bool
|
||||
SetMapEntry(KeyTypeInfo * type,
|
||||
XkbcDescPtr xkb, ExprDef * arrayNdx, ExprDef * value)
|
||||
struct xkb_desc * xkb, ExprDef * arrayNdx, ExprDef * value)
|
||||
{
|
||||
ExprResult rtrn;
|
||||
XkbcKTMapEntryRec entry;
|
||||
struct xkb_kt_map_entry entry;
|
||||
|
||||
if (arrayNdx == NULL)
|
||||
return ReportTypeShouldBeArray(type, "map entry");
|
||||
|
@ -725,7 +725,7 @@ SetMapEntry(KeyTypeInfo * type,
|
|||
|
||||
static Bool
|
||||
SetPreserve(KeyTypeInfo * type,
|
||||
XkbcDescPtr xkb, ExprDef * arrayNdx, ExprDef * value)
|
||||
struct xkb_desc * xkb, ExprDef * arrayNdx, ExprDef * value)
|
||||
{
|
||||
ExprResult rtrn;
|
||||
PreserveInfo new;
|
||||
|
@ -874,7 +874,7 @@ SetLevelName(KeyTypeInfo * type, ExprDef * arrayNdx, ExprDef * value)
|
|||
*/
|
||||
static Bool
|
||||
SetKeyTypeField(KeyTypeInfo * type,
|
||||
XkbcDescPtr xkb,
|
||||
struct xkb_desc * xkb,
|
||||
char *field,
|
||||
ExprDef * arrayNdx, ExprDef * value, KeyTypesInfo * info)
|
||||
{
|
||||
|
@ -932,7 +932,7 @@ SetKeyTypeField(KeyTypeInfo * type,
|
|||
}
|
||||
|
||||
static Bool
|
||||
HandleKeyTypeVar(VarDef * stmt, XkbcDescPtr xkb, KeyTypesInfo * info)
|
||||
HandleKeyTypeVar(VarDef * stmt, struct xkb_desc * xkb, KeyTypesInfo * info)
|
||||
{
|
||||
ExprResult elem, field;
|
||||
ExprDef *arrayNdx;
|
||||
|
@ -958,7 +958,7 @@ HandleKeyTypeVar(VarDef * stmt, XkbcDescPtr xkb, KeyTypesInfo * info)
|
|||
|
||||
static int
|
||||
HandleKeyTypeBody(VarDef * def,
|
||||
XkbcDescPtr xkb, KeyTypeInfo * type, KeyTypesInfo * info)
|
||||
struct xkb_desc * xkb, KeyTypeInfo * type, KeyTypesInfo * info)
|
||||
{
|
||||
int ok = 1;
|
||||
ExprResult tmp, field;
|
||||
|
@ -985,7 +985,7 @@ HandleKeyTypeBody(VarDef * def,
|
|||
*/
|
||||
static int
|
||||
HandleKeyTypeDef(KeyTypeDef * def,
|
||||
XkbcDescPtr xkb, unsigned merge, KeyTypesInfo * info)
|
||||
struct xkb_desc * xkb, unsigned merge, KeyTypesInfo * info)
|
||||
{
|
||||
register int i;
|
||||
KeyTypeInfo type;
|
||||
|
@ -1019,7 +1019,7 @@ HandleKeyTypeDef(KeyTypeDef * def,
|
|||
/* default type */
|
||||
for (i = 0; i < info->dflt.nEntries; i++)
|
||||
{
|
||||
XkbcKTMapEntryPtr dflt;
|
||||
struct xkb_kt_map_entry * dflt;
|
||||
dflt = &info->dflt.entries[i];
|
||||
if (((dflt->mods.real_mods & type.mask) == dflt->mods.real_mods) &&
|
||||
((dflt->mods.vmods & type.vmask) == dflt->mods.vmods))
|
||||
|
@ -1065,7 +1065,7 @@ HandleKeyTypeDef(KeyTypeDef * def,
|
|||
*/
|
||||
static void
|
||||
HandleKeyTypesFile(XkbFile * file,
|
||||
XkbcDescPtr xkb, unsigned merge, KeyTypesInfo * info)
|
||||
struct xkb_desc * xkb, unsigned merge, KeyTypesInfo * info)
|
||||
{
|
||||
ParseCommon *stmt;
|
||||
|
||||
|
@ -1126,7 +1126,7 @@ HandleKeyTypesFile(XkbFile * file,
|
|||
}
|
||||
|
||||
static Bool
|
||||
CopyDefToKeyType(XkbcDescPtr xkb, XkbcKeyTypePtr type, KeyTypeInfo * def)
|
||||
CopyDefToKeyType(struct xkb_desc * xkb, struct xkb_key_type * type, KeyTypeInfo * def)
|
||||
{
|
||||
register int i;
|
||||
PreserveInfo *pre;
|
||||
|
@ -1134,8 +1134,8 @@ CopyDefToKeyType(XkbcDescPtr xkb, XkbcKeyTypePtr type, KeyTypeInfo * def)
|
|||
for (pre = def->preserve; pre != NULL;
|
||||
pre = (PreserveInfo *) pre->defs.next)
|
||||
{
|
||||
XkbcKTMapEntryPtr match;
|
||||
XkbcKTMapEntryRec tmp;
|
||||
struct xkb_kt_map_entry * match;
|
||||
struct xkb_kt_map_entry tmp;
|
||||
tmp.mods.real_mods = pre->indexMods;
|
||||
tmp.mods.vmods = pre->indexVMods;
|
||||
tmp.level = 0;
|
||||
|
@ -1156,7 +1156,7 @@ CopyDefToKeyType(XkbcDescPtr xkb, XkbcKeyTypePtr type, KeyTypeInfo * def)
|
|||
type->map = def->entries;
|
||||
if (def->preserve)
|
||||
{
|
||||
type->preserve = uTypedCalloc(type->map_count, XkbcModsRec);
|
||||
type->preserve = uTypedCalloc(type->map_count, struct xkb_mods);
|
||||
if (!type->preserve)
|
||||
{
|
||||
WARN("Couldn't allocate preserve array in CopyDefToKeyType\n");
|
||||
|
@ -1199,7 +1199,7 @@ CopyDefToKeyType(XkbcDescPtr xkb, XkbcKeyTypePtr type, KeyTypeInfo * def)
|
|||
}
|
||||
|
||||
Bool
|
||||
CompileKeyTypes(XkbFile *file, XkbcDescPtr xkb, unsigned merge)
|
||||
CompileKeyTypes(XkbFile *file, struct xkb_desc * xkb, unsigned merge)
|
||||
{
|
||||
KeyTypesInfo info;
|
||||
|
||||
|
@ -1211,7 +1211,7 @@ CompileKeyTypes(XkbFile *file, XkbcDescPtr xkb, unsigned merge)
|
|||
{
|
||||
register int i;
|
||||
register KeyTypeInfo *def;
|
||||
register XkbcKeyTypePtr type, next;
|
||||
register struct xkb_key_type *type, *next;
|
||||
|
||||
if (info.name != NULL)
|
||||
{
|
||||
|
|
|
@ -133,7 +133,7 @@ typedef struct _CompPair {
|
|||
int num;
|
||||
int sz;
|
||||
|
||||
XkbComponentNamePtr comp;
|
||||
struct xkb_component_name * comp;
|
||||
} CompPair;
|
||||
|
||||
/***====================================================================***/
|
||||
|
@ -146,7 +146,7 @@ AddComponent(CompPair *cp, char *fileName, XkbFile *map, unsigned dirsToStrip)
|
|||
|
||||
if (cp->num >= cp->sz) {
|
||||
int orig_sz = cp->sz;
|
||||
XkbComponentNamePtr orig_comp = cp->comp;
|
||||
struct xkb_component_name * orig_comp = cp->comp;
|
||||
|
||||
if (cp->sz < 1)
|
||||
cp->sz = 8;
|
||||
|
@ -154,7 +154,7 @@ AddComponent(CompPair *cp, char *fileName, XkbFile *map, unsigned dirsToStrip)
|
|||
cp->sz *= 2;
|
||||
|
||||
cp->comp = realloc(cp->comp,
|
||||
cp->sz * sizeof(XkbComponentNameRec));
|
||||
cp->sz * sizeof(struct xkb_component_name));
|
||||
if (!cp->comp) {
|
||||
ERROR("Failed reallocating component name list\n");
|
||||
cp->sz = orig_sz;
|
||||
|
@ -366,7 +366,7 @@ AddDirectory(CompPair *cp, char *head, char *ptrn, char *rest, char *map,
|
|||
/***====================================================================***/
|
||||
|
||||
static int
|
||||
GenerateComponent(XkbComponentListPtr complist, unsigned type, char *head_in,
|
||||
GenerateComponent(struct xkb_component_list * complist, unsigned type, char *head_in,
|
||||
char *base, int *max)
|
||||
{
|
||||
char *str, *head, *ptrn = NULL, *rest = NULL;
|
||||
|
@ -439,7 +439,7 @@ GenerateComponent(XkbComponentListPtr complist, unsigned type, char *head_in,
|
|||
|
||||
/* Trim excess component slots */
|
||||
if (cp.sz > 0 && cp.sz > cp.num) {
|
||||
if (realloc(cp.comp, cp.num * sizeof(XkbComponentNameRec)))
|
||||
if (realloc(cp.comp, cp.num * sizeof(struct xkb_component_name)))
|
||||
cp.sz = cp.num;
|
||||
else
|
||||
WARN("Could not reallocate component name list\n");
|
||||
|
@ -477,13 +477,13 @@ GenerateComponent(XkbComponentListPtr complist, unsigned type, char *head_in,
|
|||
|
||||
/***====================================================================***/
|
||||
|
||||
XkbComponentListPtr
|
||||
XkbcListComponents(XkbComponentNamesPtr ptrns, int *maxMatch)
|
||||
struct xkb_component_list *
|
||||
XkbcListComponents(struct xkb_component_names * ptrns, int *maxMatch)
|
||||
{
|
||||
XkbComponentListPtr complist = NULL;
|
||||
struct xkb_component_list * complist = NULL;
|
||||
int extra = 0;
|
||||
|
||||
complist = _XkbTypedCalloc(1, XkbComponentListRec);
|
||||
complist = _XkbTypedCalloc(1, struct xkb_component_list);
|
||||
if (!complist) {
|
||||
ERROR("could not allocate space for listing\n");
|
||||
goto out;
|
||||
|
|
|
@ -373,7 +373,7 @@ static KeyNameDesc dfltKeys[] = {
|
|||
};
|
||||
|
||||
int
|
||||
ComputeKbdDefaults(XkbcDescPtr xkb)
|
||||
ComputeKbdDefaults(struct xkb_desc * xkb)
|
||||
{
|
||||
int rtrn;
|
||||
register int i, tmp, nUnknown;
|
||||
|
@ -459,7 +459,7 @@ ComputeKbdDefaults(XkbcDescPtr xkb)
|
|||
* @return True if found, False otherwise.
|
||||
*/
|
||||
Bool
|
||||
FindNamedKey(XkbcDescPtr xkb,
|
||||
FindNamedKey(struct xkb_desc * xkb,
|
||||
unsigned long name,
|
||||
unsigned int *kc_rtrn,
|
||||
Bool use_aliases, Bool create, int start_from)
|
||||
|
@ -532,7 +532,7 @@ FindNamedKey(XkbcDescPtr xkb,
|
|||
}
|
||||
|
||||
Bool
|
||||
FindKeyNameForAlias(XkbcDescPtr xkb, unsigned long lname,
|
||||
FindKeyNameForAlias(struct xkb_desc * xkb, unsigned long lname,
|
||||
unsigned long *real_name)
|
||||
{
|
||||
register int i;
|
||||
|
@ -540,7 +540,7 @@ FindKeyNameForAlias(XkbcDescPtr xkb, unsigned long lname,
|
|||
|
||||
if (xkb && xkb->geom && xkb->geom->key_aliases)
|
||||
{
|
||||
XkbKeyAliasPtr a;
|
||||
struct xkb_key_alias * a;
|
||||
a = xkb->geom->key_aliases;
|
||||
LongToKeyName(lname, name);
|
||||
name[XkbKeyNameLength] = '\0';
|
||||
|
@ -555,7 +555,7 @@ FindKeyNameForAlias(XkbcDescPtr xkb, unsigned long lname,
|
|||
}
|
||||
if (xkb && xkb->names && xkb->names->key_aliases)
|
||||
{
|
||||
XkbKeyAliasPtr a;
|
||||
struct xkb_key_alias * a;
|
||||
a = xkb->names->key_aliases;
|
||||
LongToKeyName(lname, name);
|
||||
name[XkbKeyNameLength] = '\0';
|
||||
|
|
|
@ -92,10 +92,10 @@ extern Bool ProcessIncludeFile(IncludeStmt * /* stmt */ ,
|
|||
unsigned * /* merge_rtrn */
|
||||
);
|
||||
|
||||
extern int ComputeKbdDefaults(XkbcDescPtr /* xkb */
|
||||
extern int ComputeKbdDefaults(struct xkb_desc * /* xkb */
|
||||
);
|
||||
|
||||
extern Bool FindNamedKey(XkbcDescPtr /* xkb */ ,
|
||||
extern Bool FindNamedKey(struct xkb_desc * /* xkb */ ,
|
||||
unsigned long /* name */ ,
|
||||
unsigned int * /* kc_rtrn */ ,
|
||||
Bool /* use_aliases */ ,
|
||||
|
@ -103,7 +103,7 @@ extern Bool FindNamedKey(XkbcDescPtr /* xkb */ ,
|
|||
int /* start_from */
|
||||
);
|
||||
|
||||
extern Bool FindKeyNameForAlias(XkbcDescPtr /* xkb */ ,
|
||||
extern Bool FindKeyNameForAlias(struct xkb_desc * /* xkb */ ,
|
||||
unsigned long /* lname */ ,
|
||||
unsigned long * /* real_name */
|
||||
);
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
#include "expr.h"
|
||||
#include "parseutils.h"
|
||||
|
||||
#include <X11/extensions/XKBfilecommon.h>
|
||||
#include <X11/keysym.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
@ -74,7 +73,7 @@ typedef struct _KeyInfo
|
|||
union xkb_action *acts[XkbNumKbdGroups];
|
||||
uint32_t types[XkbNumKbdGroups];
|
||||
unsigned repeat;
|
||||
XkbBehavior behavior;
|
||||
struct xkb_behavior behavior;
|
||||
unsigned short vmodmap;
|
||||
unsigned long nameForOverlayKey;
|
||||
unsigned long allowNone;
|
||||
|
@ -241,7 +240,7 @@ typedef struct _SymbolsInfo
|
|||
} SymbolsInfo;
|
||||
|
||||
static void
|
||||
InitSymbolsInfo(SymbolsInfo * info, XkbcDescPtr xkb)
|
||||
InitSymbolsInfo(SymbolsInfo * info, struct xkb_desc * xkb)
|
||||
{
|
||||
register int i;
|
||||
|
||||
|
@ -603,7 +602,7 @@ MergeKeys(SymbolsInfo * info, KeyInfo * into, KeyInfo * from)
|
|||
}
|
||||
|
||||
static Bool
|
||||
AddKeySymbols(SymbolsInfo * info, KeyInfo * key, XkbcDescPtr xkb)
|
||||
AddKeySymbols(SymbolsInfo * info, KeyInfo * key, struct xkb_desc * xkb)
|
||||
{
|
||||
register int i;
|
||||
unsigned long real_name;
|
||||
|
@ -715,7 +714,7 @@ AddModMapEntry(SymbolsInfo * info, ModMapEntry * new)
|
|||
|
||||
static void
|
||||
MergeIncludedSymbols(SymbolsInfo * into, SymbolsInfo * from,
|
||||
unsigned merge, XkbcDescPtr xkb)
|
||||
unsigned merge, struct xkb_desc * xkb)
|
||||
{
|
||||
register int i;
|
||||
KeyInfo *key;
|
||||
|
@ -765,14 +764,14 @@ MergeIncludedSymbols(SymbolsInfo * into, SymbolsInfo * from,
|
|||
}
|
||||
|
||||
typedef void (*FileHandler) (XkbFile * /* rtrn */ ,
|
||||
XkbcDescPtr /* xkb */ ,
|
||||
struct xkb_desc * /* xkb */ ,
|
||||
unsigned /* merge */ ,
|
||||
SymbolsInfo * /* included */
|
||||
);
|
||||
|
||||
static Bool
|
||||
HandleIncludeSymbols(IncludeStmt * stmt,
|
||||
XkbcDescPtr xkb, SymbolsInfo * info, FileHandler hndlr)
|
||||
struct xkb_desc * xkb, SymbolsInfo * info, FileHandler hndlr)
|
||||
{
|
||||
unsigned newMerge;
|
||||
XkbFile *rtrn;
|
||||
|
@ -932,7 +931,7 @@ GetGroupIndex(KeyInfo * key,
|
|||
|
||||
static Bool
|
||||
AddSymbolsToKey(KeyInfo * key,
|
||||
XkbcDescPtr xkb,
|
||||
struct xkb_desc * xkb,
|
||||
char *field,
|
||||
ExprDef * arrayNdx, ExprDef * value, SymbolsInfo * info)
|
||||
{
|
||||
|
@ -986,7 +985,7 @@ AddSymbolsToKey(KeyInfo * key,
|
|||
|
||||
static Bool
|
||||
AddActionsToKey(KeyInfo * key,
|
||||
XkbcDescPtr xkb,
|
||||
struct xkb_desc * xkb,
|
||||
char *field,
|
||||
ExprDef * arrayNdx, ExprDef * value, SymbolsInfo * info)
|
||||
{
|
||||
|
@ -1122,7 +1121,7 @@ static LookupEntry rgEntries[] = {
|
|||
|
||||
static Bool
|
||||
SetSymbolsField(KeyInfo * key,
|
||||
XkbcDescPtr xkb,
|
||||
struct xkb_desc * xkb,
|
||||
char *field,
|
||||
ExprDef * arrayNdx, ExprDef * value, SymbolsInfo * info)
|
||||
{
|
||||
|
@ -1411,7 +1410,7 @@ SetGroupName(SymbolsInfo * info, ExprDef * arrayNdx, ExprDef * value)
|
|||
}
|
||||
|
||||
static int
|
||||
HandleSymbolsVar(VarDef * stmt, XkbcDescPtr xkb, SymbolsInfo * info)
|
||||
HandleSymbolsVar(VarDef * stmt, struct xkb_desc * xkb, SymbolsInfo * info)
|
||||
{
|
||||
ExprResult elem, field, tmp;
|
||||
ExprDef *arrayNdx;
|
||||
|
@ -1509,7 +1508,7 @@ HandleSymbolsVar(VarDef * stmt, XkbcDescPtr xkb, SymbolsInfo * info)
|
|||
|
||||
static Bool
|
||||
HandleSymbolsBody(VarDef * def,
|
||||
XkbcDescPtr xkb, KeyInfo * key, SymbolsInfo * info)
|
||||
struct xkb_desc * xkb, KeyInfo * key, SymbolsInfo * info)
|
||||
{
|
||||
Bool ok = True;
|
||||
ExprResult tmp, field;
|
||||
|
@ -1587,7 +1586,7 @@ SetExplicitGroup(SymbolsInfo * info, KeyInfo * key)
|
|||
|
||||
static int
|
||||
HandleSymbolsDef(SymbolsDef * stmt,
|
||||
XkbcDescPtr xkb, unsigned merge, SymbolsInfo * info)
|
||||
struct xkb_desc * xkb, unsigned merge, SymbolsInfo * info)
|
||||
{
|
||||
KeyInfo key;
|
||||
|
||||
|
@ -1617,7 +1616,7 @@ HandleSymbolsDef(SymbolsDef * stmt,
|
|||
|
||||
static Bool
|
||||
HandleModMapDef(ModMapDef * def,
|
||||
XkbcDescPtr xkb, unsigned merge, SymbolsInfo * info)
|
||||
struct xkb_desc * xkb, unsigned merge, SymbolsInfo * info)
|
||||
{
|
||||
ExprDef *key;
|
||||
ModMapEntry tmp;
|
||||
|
@ -1660,7 +1659,7 @@ HandleModMapDef(ModMapDef * def,
|
|||
|
||||
static void
|
||||
HandleSymbolsFile(XkbFile * file,
|
||||
XkbcDescPtr xkb, unsigned merge, SymbolsInfo * info)
|
||||
struct xkb_desc * xkb, unsigned merge, SymbolsInfo * info)
|
||||
{
|
||||
ParseCommon *stmt;
|
||||
|
||||
|
@ -1720,7 +1719,7 @@ HandleSymbolsFile(XkbFile * file,
|
|||
}
|
||||
|
||||
static Bool
|
||||
FindKeyForSymbol(XkbcDescPtr xkb, uint32_t sym, unsigned int *kc_rtrn)
|
||||
FindKeyForSymbol(struct xkb_desc * xkb, uint32_t sym, unsigned int *kc_rtrn)
|
||||
{
|
||||
register int i, j;
|
||||
register Bool gotOne;
|
||||
|
@ -1756,7 +1755,7 @@ FindKeyForSymbol(XkbcDescPtr xkb, uint32_t sym, unsigned int *kc_rtrn)
|
|||
* @return True if found, False otherwise.
|
||||
*/
|
||||
static Bool
|
||||
FindNamedType(XkbcDescPtr xkb, uint32_t name, unsigned *type_rtrn)
|
||||
FindNamedType(struct xkb_desc * xkb, uint32_t name, unsigned *type_rtrn)
|
||||
{
|
||||
register unsigned n;
|
||||
|
||||
|
@ -1951,11 +1950,11 @@ PrepareKeyDef(KeyInfo * key)
|
|||
* This function recurses.
|
||||
*/
|
||||
static Bool
|
||||
CopySymbolsDef(XkbcDescPtr xkb, KeyInfo *key, int start_from)
|
||||
CopySymbolsDef(struct xkb_desc * xkb, KeyInfo *key, int start_from)
|
||||
{
|
||||
register int i;
|
||||
unsigned okc, kc, width, tmp, nGroups;
|
||||
XkbcKeyTypePtr type;
|
||||
struct xkb_key_type * type;
|
||||
Bool haveActions, autoType, useAlias;
|
||||
uint32_t *outSyms;
|
||||
union xkb_action *outActs;
|
||||
|
@ -2155,7 +2154,7 @@ CopySymbolsDef(XkbcDescPtr xkb, KeyInfo *key, int start_from)
|
|||
}
|
||||
|
||||
static Bool
|
||||
CopyModMapDef(XkbcDescPtr xkb, ModMapEntry *entry)
|
||||
CopyModMapDef(struct xkb_desc * xkb, ModMapEntry *entry)
|
||||
{
|
||||
unsigned kc;
|
||||
|
||||
|
@ -2199,7 +2198,7 @@ CopyModMapDef(XkbcDescPtr xkb, ModMapEntry *entry)
|
|||
* @param merge Merge strategy (e.g. MergeOverride).
|
||||
*/
|
||||
Bool
|
||||
CompileSymbols(XkbFile *file, XkbcDescPtr xkb, unsigned merge)
|
||||
CompileSymbols(XkbFile *file, struct xkb_desc * xkb, unsigned merge)
|
||||
{
|
||||
register int i;
|
||||
SymbolsInfo info;
|
||||
|
|
|
@ -34,12 +34,11 @@
|
|||
#include "misc.h"
|
||||
|
||||
#include <X11/extensions/XKB.h>
|
||||
#include <X11/extensions/XKBstrcommon.h>
|
||||
|
||||
#include "vmod.h"
|
||||
|
||||
void
|
||||
InitVModInfo(VModInfo * info, XkbcDescPtr xkb)
|
||||
InitVModInfo(VModInfo * info, struct xkb_desc * xkb)
|
||||
{
|
||||
ClearVModInfo(info, xkb);
|
||||
info->errorCount = 0;
|
||||
|
@ -47,7 +46,7 @@ InitVModInfo(VModInfo * info, XkbcDescPtr xkb)
|
|||
}
|
||||
|
||||
void
|
||||
ClearVModInfo(VModInfo * info, XkbcDescPtr xkb)
|
||||
ClearVModInfo(VModInfo * info, struct xkb_desc * xkb)
|
||||
{
|
||||
register int i;
|
||||
|
||||
|
@ -84,8 +83,8 @@ HandleVModDef(VModDef * stmt, unsigned mergeMode, VModInfo * info)
|
|||
{
|
||||
register int i, bit, nextFree;
|
||||
ExprResult mod;
|
||||
XkbcServerMapPtr srv;
|
||||
XkbcNamesPtr names;
|
||||
struct xkb_server_map * srv;
|
||||
struct xkb_names * names;
|
||||
|
||||
srv = info->xkb->server;
|
||||
names = info->xkb->names;
|
||||
|
@ -167,9 +166,9 @@ LookupVModIndex(char * priv,
|
|||
uint32_t elem, uint32_t field, unsigned type, ExprResult * val_rtrn)
|
||||
{
|
||||
int i;
|
||||
XkbcDescPtr xkb;
|
||||
struct xkb_desc * xkb;
|
||||
|
||||
xkb = (XkbcDescPtr) priv;
|
||||
xkb = (struct xkb_desc *) priv;
|
||||
if ((xkb == NULL) || (xkb->names == NULL) || (elem != None)
|
||||
|| (type != TypeInt))
|
||||
{
|
||||
|
@ -215,7 +214,7 @@ LookupVModMask(char * priv,
|
|||
}
|
||||
|
||||
int
|
||||
FindKeypadVMod(XkbcDescPtr xkb)
|
||||
FindKeypadVMod(struct xkb_desc * xkb)
|
||||
{
|
||||
uint32_t name;
|
||||
ExprResult rtrn;
|
||||
|
@ -231,7 +230,7 @@ FindKeypadVMod(XkbcDescPtr xkb)
|
|||
Bool
|
||||
ResolveVirtualModifier(ExprDef * def, ExprResult * val_rtrn, VModInfo * info)
|
||||
{
|
||||
XkbcNamesPtr names;
|
||||
struct xkb_names * names;
|
||||
|
||||
names = info->xkb->names;
|
||||
if (def->op == ExprIdent)
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
typedef struct _VModInfo
|
||||
{
|
||||
XkbcDescPtr xkb;
|
||||
struct xkb_desc * xkb;
|
||||
unsigned defined;
|
||||
unsigned available;
|
||||
unsigned newlyDefined;
|
||||
|
@ -37,11 +37,11 @@ typedef struct _VModInfo
|
|||
} VModInfo;
|
||||
|
||||
extern void InitVModInfo(VModInfo * /* info */ ,
|
||||
XkbcDescPtr /* xkb */
|
||||
struct xkb_desc * /* xkb */
|
||||
);
|
||||
|
||||
extern void ClearVModInfo(VModInfo * /* info */ ,
|
||||
XkbcDescPtr /* xkb */
|
||||
struct xkb_desc * /* xkb */
|
||||
);
|
||||
|
||||
extern Bool HandleVModDef(VModDef * /* stmt */ ,
|
||||
|
@ -50,7 +50,7 @@ extern Bool HandleVModDef(VModDef * /* stmt */ ,
|
|||
);
|
||||
|
||||
extern Bool ApplyVModDefs(VModInfo * /* info */ ,
|
||||
XkbcDescPtr /* xkb */
|
||||
struct xkb_desc * /* xkb */
|
||||
);
|
||||
|
||||
extern int LookupVModIndex(char * /* priv */ ,
|
||||
|
@ -67,7 +67,7 @@ extern int LookupVModMask(char * /* priv */ ,
|
|||
ExprResult * /* val_rtrn */
|
||||
);
|
||||
|
||||
extern int FindKeypadVMod(XkbcDescPtr /* xkb */
|
||||
extern int FindKeypadVMod(struct xkb_desc * /* xkb */
|
||||
);
|
||||
|
||||
extern Bool ResolveVirtualModifier(ExprDef * /* def */ ,
|
||||
|
|
|
@ -40,7 +40,7 @@ unsigned int warningLevel = 0;
|
|||
#define ISEMPTY(str) (!(str) || (strlen(str) == 0))
|
||||
|
||||
static XkbFile *
|
||||
XkbKeymapFileFromComponents(const XkbComponentNamesPtr ktcsg)
|
||||
XkbKeymapFileFromComponents(const struct xkb_component_names * ktcsg)
|
||||
{
|
||||
XkbFile *keycodes, *types, *compat, *symbols, *geometry;
|
||||
IncludeStmt *inc;
|
||||
|
@ -73,14 +73,14 @@ XkbKeymapFileFromComponents(const XkbComponentNamesPtr ktcsg)
|
|||
&keycodes->common, 0);
|
||||
}
|
||||
|
||||
static XkbComponentNamesPtr
|
||||
static struct xkb_component_names *
|
||||
XkbComponentsFromRules(const char *rules, const XkbRF_VarDefsPtr defs)
|
||||
{
|
||||
FILE *rulesFile = NULL;
|
||||
char *rulesPath = NULL;
|
||||
static XkbRF_RulesPtr loaded = NULL;
|
||||
static char *cached_name = NULL;
|
||||
XkbComponentNamesPtr names = NULL;
|
||||
struct xkb_component_names * names = NULL;
|
||||
|
||||
if (!cached_name || strcmp(rules, cached_name) != 0) {
|
||||
if (loaded)
|
||||
|
@ -110,7 +110,7 @@ XkbComponentsFromRules(const char *rules, const XkbRF_VarDefsPtr defs)
|
|||
cached_name = strdup(rules);
|
||||
}
|
||||
|
||||
if (!(names = _XkbTypedCalloc(1, XkbComponentNamesRec))) {
|
||||
if (!(names = _XkbTypedCalloc(1, struct xkb_component_names))) {
|
||||
ERROR("failed to allocate XKB components\n");
|
||||
goto unwind_file;
|
||||
}
|
||||
|
@ -135,12 +135,12 @@ out:
|
|||
return names;
|
||||
}
|
||||
|
||||
XkbcDescPtr
|
||||
struct xkb_desc *
|
||||
XkbcCompileKeymapFromRules(const XkbRMLVOSet *rmlvo)
|
||||
{
|
||||
XkbRF_VarDefsRec defs;
|
||||
XkbComponentNamesPtr names;
|
||||
XkbcDescPtr xkb;
|
||||
struct xkb_component_names * names;
|
||||
struct xkb_desc * xkb;
|
||||
|
||||
if (!rmlvo || ISEMPTY(rmlvo->rules) || ISEMPTY(rmlvo->layout)) {
|
||||
ERROR("rules and layout required to generate XKB keymap\n");
|
||||
|
@ -206,11 +206,11 @@ XkbChooseMap(XkbFile *file, const char *name)
|
|||
return map;
|
||||
}
|
||||
|
||||
XkbcDescPtr
|
||||
XkbcCompileKeymapFromComponents(const XkbComponentNamesPtr ktcsg)
|
||||
struct xkb_desc *
|
||||
XkbcCompileKeymapFromComponents(const struct xkb_component_names * ktcsg)
|
||||
{
|
||||
XkbFile *file, *mapToUse;
|
||||
XkbcDescPtr xkb;
|
||||
struct xkb_desc * xkb;
|
||||
|
||||
uSetErrorFile(NULL);
|
||||
|
||||
|
@ -248,11 +248,11 @@ fail:
|
|||
return NULL;
|
||||
}
|
||||
|
||||
XkbcDescPtr
|
||||
struct xkb_desc *
|
||||
XkbcCompileKeymapFromFile(FILE *inputFile, const char *mapName)
|
||||
{
|
||||
XkbFile *file, *mapToUse;
|
||||
XkbcDescPtr xkb;
|
||||
struct xkb_desc * xkb;
|
||||
|
||||
if (!inputFile) {
|
||||
ERROR("no file specified to generate XKB keymap\n");
|
||||
|
|
|
@ -37,8 +37,6 @@
|
|||
#include "utils.h"
|
||||
|
||||
#include <X11/extensions/XKM.h>
|
||||
#include <X11/extensions/XKBstrcommon.h>
|
||||
#include <X11/extensions/XKBrulescommon.h>
|
||||
#include "X11/extensions/XKBcommon.h"
|
||||
#include "XKBcommonint.h"
|
||||
|
||||
|
@ -340,24 +338,24 @@ typedef struct _XkbFile
|
|||
} XkbFile;
|
||||
|
||||
extern Bool
|
||||
CompileKeymap(XkbFile *file, XkbcDescPtr xkb, unsigned merge);
|
||||
CompileKeymap(XkbFile *file, struct xkb_desc * xkb, unsigned merge);
|
||||
|
||||
extern Bool
|
||||
CompileKeycodes(XkbFile *file, XkbcDescPtr xkb, unsigned merge);
|
||||
CompileKeycodes(XkbFile *file, struct xkb_desc * xkb, unsigned merge);
|
||||
|
||||
extern Bool
|
||||
CompileGeometry(XkbFile *file, XkbcDescPtr xkb, unsigned merge);
|
||||
CompileGeometry(XkbFile *file, struct xkb_desc * xkb, unsigned merge);
|
||||
|
||||
extern Bool
|
||||
CompileKeyTypes(XkbFile *file, XkbcDescPtr xkb, unsigned merge);
|
||||
CompileKeyTypes(XkbFile *file, struct xkb_desc * xkb, unsigned merge);
|
||||
|
||||
typedef struct _LEDInfo *LEDInfoPtr;
|
||||
|
||||
extern Bool
|
||||
CompileCompatMap(XkbFile *file, XkbcDescPtr xkb, unsigned merge,
|
||||
CompileCompatMap(XkbFile *file, struct xkb_desc * xkb, unsigned merge,
|
||||
LEDInfoPtr *unboundLEDs);
|
||||
|
||||
extern Bool
|
||||
CompileSymbols(XkbFile *file, XkbcDescPtr xkb, unsigned merge);
|
||||
CompileSymbols(XkbFile *file, struct xkb_desc * xkb, unsigned merge);
|
||||
|
||||
#endif /* XKBCOMP_H */
|
||||
|
|
116
src/xkbgeom.h
116
src/xkbgeom.h
|
@ -29,149 +29,147 @@ authorization from the authors.
|
|||
|
||||
#include <X11/X.h>
|
||||
#include <X11/Xdefs.h>
|
||||
#include <X11/extensions/XKBstrcommon.h>
|
||||
#include <X11/extensions/XKBrulescommon.h>
|
||||
#include "X11/extensions/XKBcommon.h"
|
||||
|
||||
extern void
|
||||
XkbcFreeGeomProperties(XkbcGeometryPtr geom, int first, int count, Bool freeAll);
|
||||
XkbcFreeGeomProperties(struct xkb_geometry * geom, int first, int count, Bool freeAll);
|
||||
|
||||
extern void
|
||||
XkbcFreeGeomKeyAliases(XkbcGeometryPtr geom, int first, int count, Bool freeAll);
|
||||
XkbcFreeGeomKeyAliases(struct xkb_geometry * geom, int first, int count, Bool freeAll);
|
||||
|
||||
extern void
|
||||
XkbcFreeGeomColors(XkbcGeometryPtr geom, int first, int count, Bool freeAll);
|
||||
XkbcFreeGeomColors(struct xkb_geometry * geom, int first, int count, Bool freeAll);
|
||||
|
||||
extern void
|
||||
XkbcFreeGeomPoints(XkbcOutlinePtr outline, int first, int count, Bool freeAll);
|
||||
XkbcFreeGeomPoints(struct xkb_outline * outline, int first, int count, Bool freeAll);
|
||||
|
||||
extern void
|
||||
XkbcFreeGeomOutlines(XkbcShapePtr shape, int first, int count, Bool freeAll);
|
||||
XkbcFreeGeomOutlines(struct xkb_shape * shape, int first, int count, Bool freeAll);
|
||||
|
||||
extern void
|
||||
XkbcFreeGeomShapes(XkbcGeometryPtr geom, int first, int count, Bool freeAll);
|
||||
XkbcFreeGeomShapes(struct xkb_geometry * geom, int first, int count, Bool freeAll);
|
||||
|
||||
extern void
|
||||
XkbcFreeGeomOverlayKeys(XkbcOverlayRowPtr row, int first, int count,
|
||||
XkbcFreeGeomOverlayKeys(struct xkb_overlay_row * row, int first, int count,
|
||||
Bool freeAll);
|
||||
|
||||
extern void
|
||||
XkbcFreeGeomOverlayRows(XkbcOverlayPtr overlay, int first, int count,
|
||||
XkbcFreeGeomOverlayRows(struct xkb_overlay * overlay, int first, int count,
|
||||
Bool freeAll);
|
||||
|
||||
extern void
|
||||
XkbcFreeGeomOverlays(XkbcSectionPtr section, int first, int count, Bool freeAll);
|
||||
XkbcFreeGeomOverlays(struct xkb_section * section, int first, int count, Bool freeAll);
|
||||
|
||||
extern void
|
||||
XkbcFreeGeomKeys(XkbcRowPtr row, int first, int count, Bool freeAll);
|
||||
XkbcFreeGeomKeys(struct xkb_row * row, int first, int count, Bool freeAll);
|
||||
|
||||
extern void
|
||||
XkbcFreeGeomRows(XkbcSectionPtr section, int first, int count, Bool freeAll);
|
||||
XkbcFreeGeomRows(struct xkb_section * section, int first, int count, Bool freeAll);
|
||||
|
||||
extern void
|
||||
XkbcFreeGeomSections(XkbcGeometryPtr geom, int first, int count, Bool freeAll);
|
||||
XkbcFreeGeomSections(struct xkb_geometry * geom, int first, int count, Bool freeAll);
|
||||
|
||||
extern void
|
||||
XkbcFreeGeomDoodads(XkbcDoodadPtr doodads, int nDoodads, Bool freeAll);
|
||||
XkbcFreeGeomDoodads(union xkb_doodad * doodads, int nDoodads, Bool freeAll);
|
||||
|
||||
extern void
|
||||
XkbcFreeGeometry(XkbcGeometryPtr geom, unsigned which, Bool freeMap);
|
||||
XkbcFreeGeometry(struct xkb_geometry * geom, unsigned which, Bool freeMap);
|
||||
|
||||
extern int
|
||||
XkbcAllocGeomProps(XkbcGeometryPtr geom, int nProps);
|
||||
XkbcAllocGeomProps(struct xkb_geometry * geom, int nProps);
|
||||
|
||||
extern int
|
||||
XkbcAllocGeomColors(XkbcGeometryPtr geom, int nColors);
|
||||
XkbcAllocGeomColors(struct xkb_geometry * geom, int nColors);
|
||||
|
||||
extern int
|
||||
XkbcAllocGeomKeyAliases(XkbcGeometryPtr geom, int nKeyAliases);
|
||||
XkbcAllocGeomKeyAliases(struct xkb_geometry * geom, int nKeyAliases);
|
||||
|
||||
extern int
|
||||
XkbcAllocGeomShapes(XkbcGeometryPtr geom, int nShapes);
|
||||
XkbcAllocGeomShapes(struct xkb_geometry * geom, int nShapes);
|
||||
|
||||
extern int
|
||||
XkbcAllocGeomSections(XkbcGeometryPtr geom, int nSections);
|
||||
XkbcAllocGeomSections(struct xkb_geometry * geom, int nSections);
|
||||
|
||||
extern int
|
||||
XkbcAllocGeomOverlays(XkbcSectionPtr section, int nOverlays);
|
||||
XkbcAllocGeomOverlays(struct xkb_section * section, int nOverlays);
|
||||
|
||||
extern int
|
||||
XkbcAllocGeomOverlayRows(XkbcOverlayPtr overlay, int nRows);
|
||||
XkbcAllocGeomOverlayRows(struct xkb_overlay * overlay, int nRows);
|
||||
|
||||
extern int
|
||||
XkbcAllocGeomOverlayKeys(XkbcOverlayRowPtr row, int nKeys);
|
||||
XkbcAllocGeomOverlayKeys(struct xkb_overlay_row * row, int nKeys);
|
||||
|
||||
extern int
|
||||
XkbcAllocGeomDoodads(XkbcGeometryPtr geom, int nDoodads);
|
||||
XkbcAllocGeomDoodads(struct xkb_geometry * geom, int nDoodads);
|
||||
|
||||
extern int
|
||||
XkbcAllocGeomSectionDoodads(XkbcSectionPtr section, int nDoodads);
|
||||
XkbcAllocGeomSectionDoodads(struct xkb_section * section, int nDoodads);
|
||||
|
||||
extern int
|
||||
XkbcAllocGeomOutlines(XkbcShapePtr shape, int nOL);
|
||||
XkbcAllocGeomOutlines(struct xkb_shape * shape, int nOL);
|
||||
|
||||
extern int
|
||||
XkbcAllocGeomRows(XkbcSectionPtr section, int nRows);
|
||||
XkbcAllocGeomRows(struct xkb_section * section, int nRows);
|
||||
|
||||
extern int
|
||||
XkbcAllocGeomPoints(XkbcOutlinePtr ol, int nPts);
|
||||
XkbcAllocGeomPoints(struct xkb_outline * ol, int nPts);
|
||||
|
||||
extern int
|
||||
XkbcAllocGeomKeys(XkbcRowPtr row, int nKeys);
|
||||
XkbcAllocGeomKeys(struct xkb_row * row, int nKeys);
|
||||
|
||||
extern int
|
||||
XkbcAllocGeometry(XkbcDescPtr xkb, XkbcGeometrySizesPtr sizes);
|
||||
XkbcAllocGeometry(struct xkb_desc * xkb, struct xkb_geometry_sizes * sizes);
|
||||
|
||||
extern XkbcPropertyPtr
|
||||
XkbcAddGeomProperty(XkbcGeometryPtr geom, const char *name, const char *value);
|
||||
extern struct xkb_property *
|
||||
XkbcAddGeomProperty(struct xkb_geometry * geom, const char *name, const char *value);
|
||||
|
||||
extern XkbKeyAliasPtr
|
||||
XkbcAddGeomKeyAlias(XkbcGeometryPtr geom, const char *aliasStr, const char *realStr);
|
||||
extern struct xkb_key_alias *
|
||||
XkbcAddGeomKeyAlias(struct xkb_geometry * geom, const char *aliasStr, const char *realStr);
|
||||
|
||||
extern XkbcColorPtr
|
||||
XkbcAddGeomColor(XkbcGeometryPtr geom, const char *spec, unsigned int pixel);
|
||||
extern struct xkb_color *
|
||||
XkbcAddGeomColor(struct xkb_geometry * geom, const char *spec, unsigned int pixel);
|
||||
|
||||
extern XkbcOutlinePtr
|
||||
XkbcAddGeomOutline(XkbcShapePtr shape, int sz_points);
|
||||
extern struct xkb_outline *
|
||||
XkbcAddGeomOutline(struct xkb_shape * shape, int sz_points);
|
||||
|
||||
extern XkbcShapePtr
|
||||
XkbcAddGeomShape(XkbcGeometryPtr geom, uint32_t name, int sz_outlines);
|
||||
extern struct xkb_shape *
|
||||
XkbcAddGeomShape(struct xkb_geometry * geom, uint32_t name, int sz_outlines);
|
||||
|
||||
extern XkbcKeyPtr
|
||||
XkbcAddGeomKey(XkbcRowPtr row);
|
||||
extern struct xkb_key *
|
||||
XkbcAddGeomKey(struct xkb_row * row);
|
||||
|
||||
extern XkbcRowPtr
|
||||
XkbcAddGeomRow(XkbcSectionPtr section, int sz_keys);
|
||||
extern struct xkb_row *
|
||||
XkbcAddGeomRow(struct xkb_section * section, int sz_keys);
|
||||
|
||||
extern XkbcSectionPtr
|
||||
XkbcAddGeomSection(XkbcGeometryPtr geom, uint32_t name,
|
||||
extern struct xkb_section *
|
||||
XkbcAddGeomSection(struct xkb_geometry * geom, uint32_t name,
|
||||
int sz_rows, int sz_doodads, int sz_over);
|
||||
|
||||
extern XkbcDoodadPtr
|
||||
XkbcAddGeomDoodad(XkbcGeometryPtr geom, XkbcSectionPtr section, uint32_t name);
|
||||
extern union xkb_doodad *
|
||||
XkbcAddGeomDoodad(struct xkb_geometry * geom, struct xkb_section * section, uint32_t name);
|
||||
|
||||
extern XkbcOverlayKeyPtr
|
||||
XkbcAddGeomOverlayKey(XkbcOverlayPtr overlay, XkbcOverlayRowPtr row,
|
||||
extern struct xkb_overlay_key *
|
||||
XkbcAddGeomOverlayKey(struct xkb_overlay * overlay, struct xkb_overlay_row * row,
|
||||
const char *over, const char *under);
|
||||
|
||||
extern XkbcOverlayRowPtr
|
||||
XkbcAddGeomOverlayRow(XkbcOverlayPtr overlay, int row_under, int sz_keys);
|
||||
extern struct xkb_overlay_row *
|
||||
XkbcAddGeomOverlayRow(struct xkb_overlay * overlay, int row_under, int sz_keys);
|
||||
|
||||
extern XkbcOverlayPtr
|
||||
XkbcAddGeomOverlay(XkbcSectionPtr section, uint32_t name, int sz_rows);
|
||||
extern struct xkb_overlay *
|
||||
XkbcAddGeomOverlay(struct xkb_section * section, uint32_t name, int sz_rows);
|
||||
|
||||
/***====================================================================***/
|
||||
|
||||
extern Bool
|
||||
XkbcComputeShapeBounds(XkbcShapePtr shape);
|
||||
XkbcComputeShapeBounds(struct xkb_shape * shape);
|
||||
|
||||
extern Bool
|
||||
XkbcComputeShapeTop(XkbcShapePtr shape, XkbcBoundsPtr bounds);
|
||||
XkbcComputeShapeTop(struct xkb_shape * shape, struct xkb_bounds * bounds);
|
||||
|
||||
extern Bool
|
||||
XkbcComputeRowBounds(XkbcGeometryPtr geom, XkbcSectionPtr section, XkbcRowPtr row);
|
||||
XkbcComputeRowBounds(struct xkb_geometry * geom, struct xkb_section * section, struct xkb_row * row);
|
||||
|
||||
extern Bool
|
||||
XkbcComputeSectionBounds(XkbcGeometryPtr geom, XkbcSectionPtr section);
|
||||
XkbcComputeSectionBounds(struct xkb_geometry * geom, struct xkb_section * section);
|
||||
|
||||
#endif /* _XKBGEOM_H_ */
|
||||
|
|
|
@ -29,23 +29,21 @@ authorization from the authors.
|
|||
|
||||
#include <X11/X.h>
|
||||
#include <X11/Xdefs.h>
|
||||
#include <X11/extensions/XKBstrcommon.h>
|
||||
#include <X11/extensions/XKBrulescommon.h>
|
||||
#include "X11/extensions/XKBcommon.h"
|
||||
|
||||
/***====================================================================***/
|
||||
|
||||
extern Bool
|
||||
XkbcComputeEffectiveMap(XkbcDescPtr xkb, XkbcKeyTypePtr type,
|
||||
XkbcComputeEffectiveMap(struct xkb_desc * xkb, struct xkb_key_type * type,
|
||||
unsigned char *map_rtrn);
|
||||
|
||||
/***====================================================================***/
|
||||
|
||||
extern int
|
||||
XkbcInitCanonicalKeyTypes(XkbcDescPtr xkb, unsigned which, int keypadVMod);
|
||||
XkbcInitCanonicalKeyTypes(struct xkb_desc * xkb, unsigned which, int keypadVMod);
|
||||
|
||||
extern Bool
|
||||
XkbcVirtualModsToReal(XkbcDescPtr xkb, unsigned virtual_mask,
|
||||
XkbcVirtualModsToReal(struct xkb_desc * xkb, unsigned virtual_mask,
|
||||
unsigned *mask_rtrn);
|
||||
|
||||
extern void
|
||||
|
@ -74,10 +72,10 @@ extern const char *
|
|||
XkbcAtomText(uint32_t atm);
|
||||
|
||||
extern char *
|
||||
XkbcVModIndexText(XkbcDescPtr xkb, unsigned ndx);
|
||||
XkbcVModIndexText(struct xkb_desc * xkb, unsigned ndx);
|
||||
|
||||
extern char *
|
||||
XkbcVModMaskText(XkbcDescPtr xkb, unsigned modMask, unsigned mask);
|
||||
XkbcVModMaskText(struct xkb_desc * xkb, unsigned modMask, unsigned mask);
|
||||
|
||||
extern char *
|
||||
XkbcModIndexText(unsigned ndx);
|
||||
|
|
|
@ -30,13 +30,11 @@ authorization from the authors.
|
|||
#include <stdio.h>
|
||||
#include <X11/X.h>
|
||||
#include <X11/Xdefs.h>
|
||||
#include <X11/extensions/XKBstrcommon.h>
|
||||
#include <X11/extensions/XKBrulescommon.h>
|
||||
#include "X11/extensions/XKBcommon.h"
|
||||
|
||||
extern Bool
|
||||
XkbcRF_GetComponents(XkbRF_RulesPtr rules, XkbRF_VarDefsPtr defs,
|
||||
XkbComponentNamesPtr names);
|
||||
struct xkb_component_names * names);
|
||||
|
||||
extern XkbRF_RulePtr
|
||||
XkbcRF_AddRule(XkbRF_RulesPtr rules);
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
XkbComponentNamesRec *new, *old = NULL;
|
||||
struct xkb_component_names *new, *old = NULL;
|
||||
|
||||
if (argc != 6 && argc != 11) {
|
||||
fprintf(stderr, "usage: canonicalise (new kccgst) [old kccgst]\n");
|
||||
|
|
|
@ -30,8 +30,6 @@ authorization from the authors.
|
|||
#include <errno.h>
|
||||
#include <X11/X.h>
|
||||
#include <X11/Xdefs.h>
|
||||
#include <X11/extensions/XKBstrcommon.h>
|
||||
#include <X11/extensions/XKBrulescommon.h>
|
||||
#include "X11/extensions/XKBcommon.h"
|
||||
#include "xkbcomp/utils.h"
|
||||
|
||||
|
@ -39,7 +37,7 @@ int main(int argc, char *argv[])
|
|||
{
|
||||
char *path, *name;
|
||||
FILE *file;
|
||||
XkbcDescPtr xkb;
|
||||
struct xkb_desc * xkb;
|
||||
|
||||
/* Require xkb file */
|
||||
if (argc < 2) {
|
||||
|
|
|
@ -28,15 +28,13 @@ authorization from the authors.
|
|||
#include <stdio.h>
|
||||
#include <X11/X.h>
|
||||
#include <X11/Xdefs.h>
|
||||
#include <X11/extensions/XKBstrcommon.h>
|
||||
#include <X11/extensions/XKBrulescommon.h>
|
||||
#include "X11/extensions/XKBcommon.h"
|
||||
#include "xkbcomp/utils.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
XkbComponentNamesRec ktcsg;
|
||||
XkbcDescPtr xkb;
|
||||
struct xkb_component_names ktcsg;
|
||||
struct xkb_desc * xkb;
|
||||
|
||||
/* Require rmlvo */
|
||||
if (argc < 6) {
|
||||
|
|
|
@ -28,15 +28,13 @@ authorization from the authors.
|
|||
#include <stdio.h>
|
||||
#include <X11/X.h>
|
||||
#include <X11/Xdefs.h>
|
||||
#include <X11/extensions/XKBstrcommon.h>
|
||||
#include <X11/extensions/XKBrulescommon.h>
|
||||
#include "X11/extensions/XKBcommon.h"
|
||||
#include "xkbcomp/utils.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
XkbRMLVOSet rmlvo;
|
||||
XkbcDescPtr xkb;
|
||||
struct xkb_desc * xkb;
|
||||
|
||||
/* Require rmlvo */
|
||||
if (argc < 6) {
|
||||
|
|
Loading…
Reference in New Issue