1XkbFreeClientMap(3)              XKB FUNCTIONS             XkbFreeClientMap(3)
2
3
4

NAME

6       XkbFreeClientMap - Free memory used by the client map member of an Xkb‐
7       DescRec structure
8

SYNOPSIS

10       void  XkbFreeClientMap  (XkbDescPtr  xkb,  unsigned  int  which,   Bool
11              free_all);
12

ARGUMENTS

14       xkb    keyboard description containing client map to free
15
16       which  mask identifying components of map to free
17
18       free_all
19              True => free all client components and map itself
20

DESCRIPTION

22       XkbFreeClientMap  frees the components of client map specified by which
23       in the XkbDescRec structure specified by the xkb parameter and sets the
24       corresponding  structure  component values to NULL. The which parameter
25       specifies a combination of the client map masks shown in Table 1.
26
27       If free_all is True, which is  ignored;  XkbFreeClientMap  frees  every
28       non-NULL  structure  component  in  the  client  map,  frees  the  Xkb‐
29       ClientMapRec structure referenced by the map member of the xkb  parame‐
30       ter, and sets the map member to NULL.
31
32
33                      Table 1 XkbAllocClientMap Masks
34       ──────────────────────────────────────────────────────────────
35       Mask                 Effect
36       ──────────────────────────────────────────────────────────────
37       XkbKeyTypesMask      The  type_count field specifies the num‐
38                            ber of entries to  preallocate  for  the
39                            types  field  of  the client map. If the
40                            type_count field is less than  XkbNumRe‐
41                            quiredTypes returns BadValue.
42
43       XkbKeySymsMask       The min_key_code and max_key_code fields
44                            of the xkb parameter are used  to  allo‐
45                            cate  the syms and key_sym_map fields of
46                            the client map. The fields are allocated
47                            to contain the maximum number of entries
48                            necessary     for     max_key_code     -
49                            min_key_code + 1 keys.
50
51       XkbModifierMapMask   The min_key_code and max_key_code fields
52                            of the xkb parameter are used  to  allo‐
53                            cate the modmap field of the client map.
54                            The field is allocated  to  contain  the
55                            maximum  number of entries necessary for
56                            max_key_code - min_key_code + 1 keys.
57
58       NOTE: The min_key_code and max_key_code fields  of  the  xkb  parameter
59       must  be legal values if the XkbKeySymsMask or XkbModifierMapMask masks
60       are set in the which  parameter.  If  they  are  not  valid,  XkbAlloc‐
61       ClientMap returns BadValue.
62

STRUCTURES

64       The  complete description of an Xkb keyboard is given by an XkbDescRec.
65       The component structures in the XkbDescRec represent the major Xkb com‐
66       ponents.
67
68       typedef struct {
69          struct _XDisplay * display;      /* connection to X server */
70          unsigned short     flags;        /* private to Xkb, do not modify */
71          unsigned short     device_spec;  /* device of interest */
72          KeyCode            min_key_code; /* minimum keycode for device */
73          KeyCode            max_key_code; /* maximum keycode for device */
74          XkbControlsPtr     ctrls;        /* controls */
75          XkbServerMapPtr    server;       /* server keymap */
76          XkbClientMapPtr    map;          /* client keymap */
77          XkbIndicatorPtr    indicators;   /* indicator map */
78          XkbNamesPtr        names;        /* names for all components */
79          XkbCompatMapPtr    compat;       /* compatibility map */
80          XkbGeometryPtr     geom;         /* physical geometry of keyboard */
81       } XkbDescRec, *XkbDescPtr;
82
83       The  display field points to an X display structure. The flags field is
84       private to the library: modifying flags  may  yield  unpredictable  re‐
85       sults.  The  device_spec  field  specifies the device identifier of the
86       keyboard input device, or XkbUseCoreKeyboard, which specifies the  core
87       keyboard  device.  The min_key_code and max_key_code fields specify the
88       least and greatest keycode that can be returned by the keyboard.
89
90       Each structure component has a corresponding mask bit that is  used  in
91       function  calls to indicate that the structure should be manipulated in
92       some manner, such as allocating it or freeing it. These masks and their
93       relationships to the fields in the XkbDescRec are shown in Table 2.
94
95
96               Table 2 Mask Bits for XkbDescRec
97       ──────────────────────────────────────────────────
98       Mask Bit               XkbDescRec Field   Value
99       ──────────────────────────────────────────────────
100       XkbControlsMask        ctrls              (1L<<0)
101       XkbServerMapMask       server             (1L<<1)
102       XkbIClientMapMask      map                (1L<<2)
103       XkbIndicatorMapMask    indicators         (1L<<3)
104       XkbNamesMask           names              (1L<<4)
105       XkbCompatMapMask       compat             (1L<<5)
106       XkbGeometryMask        geom               (1L<<6)
107       XkbAllComponentsMask   All Fields         (0x7f)
108
109       The  map field of the complete Xkb keyboard description is a pointer to
110       the Xkb client map, which is of type XkbClientMapRec:
111
112          typedef struct {                   /* Client Map */
113             unsigned char     size_types;   /* # occupied entries in types */
114             unsigned char     num_types;    /* # entries in types */
115             XkbKeyTypePtr     types;        /* vector of key types used by this keymap */
116             unsigned short    size_syms;    /* length of the syms array */
117             unsigned short    num_syms;     /* # entries in syms */
118             KeySym *          syms;         /* linear 2d tables of keysyms, 1 per key */
119             XkbSymMapPtr      key_sym_map;  /* 1 per keycode, maps keycode to syms */
120             unsigned char *   modmap;       /* 1 per keycode, real mods bound to key */
121       } XkbClientMapRec, *XkbClientMapPtr;
122
123

DIAGNOSTICS

125       BadValue       An argument is out of range
126

SEE ALSO

128       XkbAllocClientMap(3)
129
130
131
132X Version 11                     libX11 1.8.7              XkbFreeClientMap(3)
Impressum