2 .\" Copyright 1999 Oracle and/or its affiliates. All rights reserved.
4 .\" Permission is hereby granted, free of charge, to any person obtaining a
5 .\" copy of this software and associated documentation files (the "Software"),
6 .\" to deal in the Software without restriction, including without limitation
7 .\" the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 .\" and/or sell copies of the Software, and to permit persons to whom the
9 .\" Software is furnished to do so, subject to the following conditions:
11 .\" The above copyright notice and this permission notice (including the next
12 .\" paragraph) shall be included in all copies or substantial portions of the
15 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 .\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 .\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 .\" THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 .\" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 .\" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21 .\" DEALINGS IN THE SOFTWARE.
23 .TH XkbFreeServerMap __libmansuffix__ __xorgversion__ "XKB FUNCTIONS"
25 XkbFreeServerMap \- Free memory used by the server member of an XkbDescRec
29 .B void XkbFreeServerMap
30 .BI "(\^XkbDescPtr " "xkb" "\^,"
31 .BI "unsigned int " "which" "\^,"
32 .BI "Bool " "free_all" "\^);"
38 keyboard description containing server map to free
41 mask identifying components of map to free
44 True => free all server map components and server itself
49 function frees the specified components of server map in the XkbDescRec
50 structure specified by the
52 parameter and sets the corresponding structure component values to NULL. The
53 .I which parameter specifies a combination of the server map masks and is a
55 of the masks listed in Table 1. If
61 frees every non-NULL structure component in the server map, frees the
62 XkbServerMapRec structure
67 parameter, and sets the
75 Table 1 XkbAllocServerMap Masks
79 XkbExplicitComponentsMask T{
80 The min_key_code and max_key_code fields of the xkb parameter are used to
81 allocate the explicit field of the server map.
85 The min_key_code and max_key_code fields of the xkb parameter are used to
87 field of the server map. The count_acts parameter is used to allocate the acts
92 XkbKeyBehaviorsMask T{
93 The min_key_code and max_key_code fields of the xkb parameter are used to
94 allocate the behaviors
95 field of the server map.
98 XkbVirtualModMapMask T{
99 The min_key_code and max_key_code fields of the xkb parameter are used to
101 field of the server map.
107 The complete description of an Xkb keyboard is given by an XkbDescRec. The
109 structures in the XkbDescRec represent the major Xkb components.
113 struct _XDisplay * display; /\(** connection to X server */
114 unsigned short flags; /\(** private to Xkb, do not modify */
115 unsigned short device_spec; /\(** device of interest */
116 KeyCode min_key_code; /\(** minimum keycode for device */
117 KeyCode max_key_code; /\(** maximum keycode for device */
118 XkbControlsPtr ctrls; /\(** controls */
119 XkbServerMapPtr server; /\(** server keymap */
120 XkbClientMapPtr map; /\(** client keymap */
121 XkbIndicatorPtr indicators; /\(** indicator map */
122 XkbNamesPtr names; /\(** names for all components */
123 XkbCompatMapPtr compat; /\(** compatibility map */
124 XkbGeometryPtr geom; /\(** physical geometry of keyboard */
125 } XkbDescRec, *XkbDescPtr;
130 field points to an X display structure. The
131 .I flags field is private to the library: modifying
133 may yield unpredictable results. The
135 field specifies the device identifier of the keyboard input device, or
136 XkbUseCoreKeyboard, which specifies the core keyboard device. The
140 fields specify the least and greatest keycode that can be returned by the
143 Each structure component has a corresponding mask bit that is used in function
145 indicate that the structure should be manipulated in some manner, such as
147 or freeing it. These masks and their relationships to the fields in the
155 Table 2 Mask Bits for XkbDescRec
157 Mask Bit XkbDescRec Field Value
159 XkbControlsMask ctrls (1L<<0)
160 XkbServerMapMask server (1L<<1)
161 XkbIClientMapMask map (1L<<2)
162 XkbIndicatorMapMask indicators (1L<<3)
163 XkbNamesMask names (1L<<4)
164 XkbCompatMapMask compat (1L<<5)
165 XkbGeometryMask geom (1L<<6)
166 XkbAllComponentsMask All Fields (0x7f)
169 The Xkb server map contains the information the server needs to interpret key
171 type XkbServerMapRec:
174 \&#define XkbNumVirtualMods 16
176 typedef struct { /\(** Server Map */
177 unsigned short num_acts; /\(** # of occupied entries in acts */
178 unsigned short size_acts; /\(** # of entries in acts */
179 XkbAction * acts; /\(** linear 2d tables of key actions, 1 per keycode */
180 XkbBehavior * behaviors; /\(** key behaviors,1 per keycode */
181 unsigned short * key_acts; /\(** index into acts, 1 per keycode */
182 unsigned char * explicit; /\(** explicit overrides of core remapping, 1 per key */
183 unsigned char vmods[XkbNumVirtualMods]; /\(** real mods bound to virtual mods */
184 unsigned short * vmodmap; /\(** virtual mods bound to key, 1 per keycode*/
185 } XkbServerMapRec, *XkbServerMapPtr;