upload tizen2.0 source
[framework/uifw/xorg/lib/libx11.git] / man / xkb / XkbFreeServerMap.man
1 '\" t
2 .\" Copyright 1999 Oracle and/or its affiliates. All rights reserved.
3 .\"
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:
10 .\"
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
13 .\" Software.
14 .\"
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.
22 .\"
23 .TH XkbFreeServerMap __libmansuffix__ __xorgversion__ "XKB FUNCTIONS"
24 .SH NAME
25 XkbFreeServerMap \- Free memory used by the server member of an XkbDescRec 
26 structure
27 .SH SYNOPSIS
28 .HP
29 .B void XkbFreeServerMap
30 .BI "(\^XkbDescPtr " "xkb" "\^,"
31 .BI "unsigned int " "which" "\^,"
32 .BI "Bool " "free_all" "\^);"
33 .if n .ti +5n
34 .if t .ti +.5i
35 .SH ARGUMENTS
36 .TP
37 .I \- xkb
38 keyboard description containing server map to free
39 .TP
40 .I \- which
41 mask identifying components of map to free
42 .TP
43 .I \- free_all
44 True => free all server map components and server itself
45 .SH DESCRIPTION
46 .LP
47 The 
48 .I XkbFreeServerMap 
49 function frees the specified components of server map in the XkbDescRec 
50 structure specified by the 
51 .I xkb 
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 
54 bitwise inclusive OR 
55 of the masks listed in Table 1. If 
56 .I free_all 
57 is True, 
58 .I which 
59 is ignored and 
60 .I XkbFreeServerMap 
61 frees every non-NULL structure component in the server map, frees the 
62 XkbServerMapRec structure 
63 referenced by the 
64 .I server 
65 member of the 
66 .I xkb 
67 parameter, and sets the 
68 .I server 
69 member to NULL.
70
71 .TS
72 c s
73 l l
74 l lw(4i).
75 Table 1 XkbAllocServerMap Masks
76 _
77 Mask    Effect
78 _
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.
82 T}
83 .sp
84 XkbKeyActionsMask       T{
85 The min_key_code and max_key_code fields of the xkb parameter are used to 
86 allocate the key_acts 
87 field of the server map. The count_acts parameter is used to allocate the acts 
88 field of the 
89 server map.
90 T}
91 .sp
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.
96 T}
97 .sp
98 XkbVirtualModMapMask    T{
99 The min_key_code and max_key_code fields of the xkb parameter are used to 
100 allocate the vmodmap 
101 field of the server map.
102 T}
103
104 .TE
105 .SH STRUCTURES
106 .LP
107 The complete description of an Xkb keyboard is given by an XkbDescRec. The 
108 component 
109 structures in the XkbDescRec represent the major Xkb components.
110
111 .nf
112 typedef struct {
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;
126
127 .fi
128 The 
129 .I display 
130 field points to an X display structure. The 
131 .I flags field is private to the library: modifying 
132 .I flags 
133 may yield unpredictable results. The 
134 .I device_spec 
135 field specifies the device identifier of the keyboard input device, or 
136 XkbUseCoreKeyboard, which specifies the core keyboard device. The 
137 .I min_key_code
138 and 
139 .I max_key_code 
140 fields specify the least and greatest keycode that can be returned by the 
141 keyboard. 
142
143 Each structure component has a corresponding mask bit that is used in function 
144 calls to 
145 indicate that the structure should be manipulated in some manner, such as 
146 allocating it 
147 or freeing it. These masks and their relationships to the fields in the 
148 XkbDescRec are 
149 shown in Table 2.
150
151 .TS
152 c s s
153 l l l
154 l l l.
155 Table 2 Mask Bits for XkbDescRec
156 _
157 Mask Bit        XkbDescRec Field        Value
158 _
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)
167 .TE
168
169 The Xkb server map contains the information the server needs to interpret key 
170 events and is of 
171 type XkbServerMapRec:
172
173 .nf
174 \&#define XkbNumVirtualMods          16
175
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;
186
187 .fi