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

NAME

6       XkbAllocClientMap  -  Allocate  and  initialize an empty client map de‐
7       scription record
8

SYNOPSIS

10       Status XkbAllocClientMap (XkbDescPtr xkb, unsigned int which,  unsigned
11              int type_count);
12

ARGUMENTS

14       xkb    keyboard description in which to allocate client map
15
16       which  mask selecting map components to allocate
17
18       type_count
19              value of num_types field in map to be allocated
20

DESCRIPTION

22       Calling  XkbGetMap  should  be  sufficient for most applications to get
23       client and server maps. As a result, most applications do not  need  to
24       directly allocate client and server maps.
25
26       If you change the number of key types or construct map components with‐
27       out loading the necessary components from the X server, do not allocate
28       any  map components directly using malloc or Xmalloc.  Instead, use the
29       Xkb allocators, XkbAllocClientMap, and XkbAllocServerMap.
30
31       Similarly,   use   the   Xkb   destructors,    XkbFreeClientMap,    and
32       XkbFreeServerMap instead of free or Xfree.
33
34       XkbAllocClientMap  allocates and initializes an empty client map in the
35       map field of the keyboard description specified by xkb.  The which  pa‐
36       rameter specifies the particular components of the client map structure
37       to allocate and is a mask composed by a bitwise inclusive OR of one  or
38       more of the masks shown in Table 1.
39
40                      Table 1 XkbAllocClientMap Masks
41       ──────────────────────────────────────────────────────────────
42       Mask                 Effect
43       ──────────────────────────────────────────────────────────────
44       XkbKeyTypesMask      The  type_count field specifies the num‐
45                            ber of entries to  preallocate  for  the
46                            types  field  of  the client map. If the
47                            type_count field is less than  XkbNumRe‐
48                            quiredTypes returns BadValue.
49
50       XkbKeySymsMask       The min_key_code and max_key_code fields
51                            of the xkb parameter are used  to  allo‐
52                            cate  the syms and key_sym_map fields of
53                            the client map. The fields are allocated
54                            to contain the maximum number of entries
55                            necessary     for     max_key_code     -
56                            min_key_code + 1 keys.
57
58       XkbModifierMapMask   The min_key_code and max_key_code fields
59                            of the xkb parameter are used  to  allo‐
60                            cate the modmap field of the client map.
61                            The field is allocated  to  contain  the
62                            maximum  number of entries necessary for
63                            max_key_code - min_key_code + 1 keys.
64
65       NOTE: The min_key_code and max_key_code fields  of  the  xkb  parameter
66       must  be legal values if the XkbKeySymsMask or XkbModifierMapMask masks
67       are set in the which  parameter.  If  they  are  not  valid,  XkbAlloc‐
68       ClientMap returns BadValue.
69
70       If  the  client  map  of  the keyboard description is not NULL, and any
71       fields are already allocated in the client map, XkbAllocClientMap  does
72       not  overwrite  the existing values; it simply ignores that part of the
73       request. The only exception  is  the  types  array.  If  type_count  is
74       greater  than  the current num_types field of the client map, XkbAlloc‐
75       ClientMap resizes the types array and resets the  num_types  field  ac‐
76       cordingly.
77
78       If  XkbAllocClientMap  is successful, it returns Success. Otherwise, it
79       can return either BadMatch, BadAlloc, or BadValue errors.
80

DIAGNOSTICS

82       BadAlloc       Unable to allocate storage
83
84       BadMatch       A compatible version of Xkb was  not  available  in  the
85                      server or an argument has correct type and range, but is
86                      otherwise invalid
87
88       BadValue       An argument is out of range
89

SEE ALSO

91       XkbAllocClientMap(3),    XkbAllocServerMap(3),    XkbFreeClientMap,(3),
92       XkbFreeServerMap(3), XkbGetMap(3)
93
94
95
96X Version 11                     libX11 1.8.7             XkbAllocClientMap(3)
Impressum