1. NAME▲
XkbResizeKeyType - Change the number of levels in a key type
2. SYNOPSIS ▲
Status XkbResizeKeyType (XkbDescPtr xkb , int type_ndx , int map_count , Bool want_preserve , int new_num_lvls );
3. ARGUMENTS ▲
- - xkb
keyboard description containing client map to update - - type_ndx
index in xkb->map->types of type to change - - map_count
total # of map entries needed for the type - - want_preserve
True => list of preserved modifiers is necessary - - new_num_lvls
new max # of levels for type
4. DESCRIPTION ▲
XkbResizeKeyTypechanges the type specified by xkb->map->types[type_ndx],and reallocates the symbols and actions bound to all keys that use the type, if necessary. XkbResizeKeyTypeupdates only the local copy of the types in xkb;to update the server's copy for the physical device, use XkbSetMapor XkbChangeMapafter calling XkbResizeKeyType. The map_countparameter specifies the total number of map entries needed for the type, and can be zero or greater. If map_countis zero, XkbResizeKeyTypefrees the existing mapand preserveentries for the type if they exist and sets them to NULL. The want_preserveparameter specifies whether a preservelist for the key should be created. If want_preserveis True, the preservelist with map_countentries is allocated or reallocated if it already exists. Otherwise, if want_preserveis False, the preservefield is freed if necessary and set to NULL. The new_num_lvlsparameter specifies the new maximum number of shift levels for the type and is used to calculate and resize the symbols and actions bound to all keys that use the type. If type_ndxdoes not specify a legal type, new_num_lvlsis less than 1, or the map_countis less than zero, XkbResizeKeyTypereturns BadValue. If XkbResizeKeyTypeencounters any problems with allocation, it returns BadAlloc. Otherwise, it returns Success.
5. RETURN VALUES ▲
- Success
The XkbResizeKeyTypefunction returns Success if type_ndxspecifies a legal type, new_num_lvlsis greater than zero and map_countis positive.
6. DIAGNOSTICS ▲
BadAlloc
Unable to allocate storage
BadValue
An argument is out of range
7. SEE ALSO ▲
R XkbChangeMap (3),
R XkbSetMap (3)