1XkbFreeServerMap(3) XKB FUNCTIONS XkbFreeServerMap(3)
2
3
4
6 XkbFreeServerMap - Free memory used by the server member of an XkbDe‐
7 scRec structure
8
10 void XkbFreeServerMap (XkbDescPtr xkb, unsigned int which, Bool
11 free_all);
12
14 xkb keyboard description containing server map to free
15
16 which mask identifying components of map to free
17
18 free_all
19 True => free all server map components and server itself
20
22 The XkbFreeServerMap function frees the specified components of server
23 map in the XkbDescRec structure specified by the xkb parameter and sets
24 the corresponding structure component values to NULL. The which parame‐
25 ter specifies a combination of the server map masks and is a bitwise
26 inclusive OR of the masks listed in Table 1. If free_all is True, which
27 is ignored and XkbFreeServerMap frees every non-NULL structure compo‐
28 nent in the server map, frees the XkbServerMapRec structure referenced
29 by the server member of the xkb parameter, and sets the server member
30 to NULL.
31
32
33 Table 1 XkbAllocServerMap Masks
34 ─────────────────────────────────────────────────────────────────────
35 Mask Effect
36 ─────────────────────────────────────────────────────────────────────
37 XkbExplicitComponentsMask The min_key_code and max_key_code fields
38 of the xkb parameter are used to allo‐
39 cate the explicit field of the server
40 map.
41
42 XkbKeyActionsMask The min_key_code and max_key_code fields
43 of the xkb parameter are used to allo‐
44 cate the key_acts field of the server
45 map. The count_acts parameter is used to
46 allocate the acts field of the server
47 map.
48
49 XkbKeyBehaviorsMask The min_key_code and max_key_code fields
50 of the xkb parameter are used to allo‐
51 cate the behaviors field of the server
52 map.
53
54 XkbVirtualModMapMask The min_key_code and max_key_code fields
55 of the xkb parameter are used to allo‐
56 cate the vmodmap field of the server
57 map.
58
59
61 The complete description of an Xkb keyboard is given by an XkbDescRec.
62 The component structures in the XkbDescRec represent the major Xkb com‐
63 ponents.
64
65 typedef struct {
66 struct _XDisplay * display; /* connection to X server */
67 unsigned short flags; /* private to Xkb, do not modify */
68 unsigned short device_spec; /* device of interest */
69 KeyCode min_key_code; /* minimum keycode for device */
70 KeyCode max_key_code; /* maximum keycode for device */
71 XkbControlsPtr ctrls; /* controls */
72 XkbServerMapPtr server; /* server keymap */
73 XkbClientMapPtr map; /* client keymap */
74 XkbIndicatorPtr indicators; /* indicator map */
75 XkbNamesPtr names; /* names for all components */
76 XkbCompatMapPtr compat; /* compatibility map */
77 XkbGeometryPtr geom; /* physical geometry of keyboard */
78 } XkbDescRec, *XkbDescPtr;
79
80 The display field points to an X display structure. The flags field is
81 private to the library: modifying flags may yield unpredictable re‐
82 sults. The device_spec field specifies the device identifier of the
83 keyboard input device, or XkbUseCoreKeyboard, which specifies the core
84 keyboard device. The min_key_code and max_key_code fields specify the
85 least and greatest keycode that can be returned by the keyboard.
86
87 Each structure component has a corresponding mask bit that is used in
88 function calls to indicate that the structure should be manipulated in
89 some manner, such as allocating it or freeing it. These masks and their
90 relationships to the fields in the XkbDescRec are shown in Table 2.
91
92
93 Table 2 Mask Bits for XkbDescRec
94 ──────────────────────────────────────────────────
95 Mask Bit XkbDescRec Field Value
96 ──────────────────────────────────────────────────
97 XkbControlsMask ctrls (1L<<0)
98 XkbServerMapMask server (1L<<1)
99 XkbIClientMapMask map (1L<<2)
100 XkbIndicatorMapMask indicators (1L<<3)
101 XkbNamesMask names (1L<<4)
102 XkbCompatMapMask compat (1L<<5)
103 XkbGeometryMask geom (1L<<6)
104 XkbAllComponentsMask All Fields (0x7f)
105
106 The Xkb server map contains the information the server needs to inter‐
107 pret key events and is of type XkbServerMapRec:
108
109 #define XkbNumVirtualMods 16
110
111 typedef struct { /* Server Map */
112 unsigned short num_acts; /* # of occupied entries in acts */
113 unsigned short size_acts; /* # of entries in acts */
114 XkbAction * acts; /* linear 2d tables of key actions, 1 per keycode */
115 XkbBehavior * behaviors; /* key behaviors,1 per keycode */
116 unsigned short * key_acts; /* index into acts, 1 per keycode */
117 unsigned char * explicit; /* explicit overrides of core remapping, 1 per key */
118 unsigned char vmods[XkbNumVirtualMods]; /* real mods bound to virtual mods */
119 unsigned short * vmodmap; /* virtual mods bound to key, 1 per keycode*/
120 } XkbServerMapRec, *XkbServerMapPtr;
121
122
123
124
125X Version 11 libX11 1.8.7 XkbFreeServerMap(3)