XkbAllocServerMap allocates and initializes an empty server map in the server field of the keyboard description specified by xkb. The which parameter specifies the particular components of the server map structure to allocate, as specified in Table 1.
Table 1 XkbAllocServerMap Masks |
Mask Effect |
XkbExplicitComponentsMask T{ |
The min_key_code and max_key_code fields of the xkb parameter are used to |
allocate the explicit field of the server map. |
T} |
XkbKeyActionsMask T{ |
The min_key_code and max_key_code fields of the xkb parameter are used to allocate the key_acts field of the server map. The count_acts parameter is used to allocate the acts field of the server map. |
T} |
XkbKeyBehaviorsMask T{ |
The min_key_code and max_key_code fields of the xkb parameter are used to allocate the behaviors field of the server map. |
T} |
XkbVirtualModMapMask T{ |
The min_key_code and max_key_code fields of the xkb parameter are used to allocate the vmodmap field of the server map. |
T} |
If the server map of the keyboard description is not NULL and any fields are already allocated in the server map, XkbAllocServerMap does not overwrite the existing values. The only exception is with the acts array. If the count_acts parameter is greater than the current num_acts field of the server map, XkbAllocServerMap resizes the acts array and resets the num_acts field accordingly.
If XkbAllocServerMap is successful, it returns Success. Otherwise, it can return either BadMatch or BadAlloc errors.
The min_key_code and max_key_code fields of the xkb parameter must be legal values. If they are not valid, XkbAllocServerMap returns BadValue.