1XkbAllocClientMap(3) XKB FUNCTIONS XkbAllocClientMap(3)
2
3
4
6 XkbAllocClientMap - Allocate and initialize an empty client map
7 description record
8
10 Status XkbAllocClientMap (XkbDescPtr xkb, unsigned int which, unsigned
11 int type_count);
12
14 - xkb keyboard description in which to allocate client map
15
16 - which
17 mask selecting map components to allocate
18
19 - type_count
20 value of num_types field in map to be allocated
21
23 Calling XkbGetMap should be sufficient for most applications to get
24 client and server maps. As a result, most applications do not need to
25 directly allocate client and server maps.
26
27 If you change the number of key types or construct map components with‐
28 out loading the necessary components from the X server, do not allocate
29 any map components directly using malloc or Xmalloc. Instead, use the
30 Xkb allocators, XkbAllocClientMap, and XkbAllocServerMap.
31
32 Similarly, use the Xkb destructors, XkbFreeClientMap, and
33 XkbFreeServerMap instead of free or Xfree.
34
35 XkbAllocClientMap allocates and initializes an empty client map in the
36 map field of the keyboard description specified by xkb. The which
37 parameter specifies the particular components of the client map struc‐
38 ture to allocate and is a mask composed by a bitwise inclusive OR of
39 one or more of the masks shown in Table 1.
40
41 Table 1 XkbAllocClientMap Masks
42 ──────────────────────────────────────────────────────────────
43 Mask Effect
44 ──────────────────────────────────────────────────────────────
45 XkbKeyTypesMask The type_count field specifies the num‐
46 ber of entries to preallocate for the
47 types field of the client map. If the
48 type_count field is less than XkbNumRe‐
49 quiredTypes returns BadValue.
50
51 XkbKeySymsMask The min_key_code and max_key_code fields
52 of the xkb parameter are used to allo‐
53 cate the syms and key_sym_map fields of
54 the client map. The fields are allocated
55 to contain the maximum number of entries
56 necessary for max_key_code -
57 min_key_code + 1 keys.
58
59 XkbModifierMapMask The min_key_code and max_key_code fields
60 of the xkb parameter are used to allo‐
61 cate the modmap field of the client map.
62 The field is allocated to contain the
63 maximum number of entries necessary for
64 max_key_code - min_key_code + 1 keys.
65
66 NOTE: The min_key_code and max_key_code fields of the xkb parameter
67 must be legal values if the XkbKeySymsMask or XkbModifierMapMask masks
68 are set in the which parameter. If they are not valid, XkbAlloc‐
69 ClientMap returns BadValue.
70
71 If the client map of the keyboard description is not NULL, and any
72 fields are already allocated in the client map, XkbAllocClientMap does
73 not overwrite the existing values; it simply ignores that part of the
74 request. The only exception is the types array. If type_count is
75 greater than the current num_types field of the client map, XkbAlloc‐
76 ClientMap resizes the types array and resets the num_types field
77 accordingly.
78
79 If XkbAllocClientMap is successful, it returns Success. Otherwise, it
80 can return either BadMatch, BadAlloc, or BadValue errors.
81
83 BadAlloc Unable to allocate storage
84
85 BadMatch A compatible version of Xkb was not available in the
86 server or an argument has correct type and range, but is
87 otherwise invalid
88
89 BadValue An argument is out of range
90
92 XkbAllocClientMap(3), XkbAllocServerMap(3), XkbFreeClientMap,[22m(3),
93 XkbFreeServerMap(3), XkbGetMap(3)
94
95
96
97X Version 11 libX11 1.6.9 XkbAllocClientMap(3)