upload tizen2.0 source
[framework/uifw/xorg/lib/libx11.git] / man / xkb / XkbAllocServerMap.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 XkbAllocServerMap __libmansuffix__ __xorgversion__ "XKB FUNCTIONS"
24 .SH NAME
25 XkbAllocServerMap \- Allocate and initialize an empty server map description record
26 .SH SYNOPSIS
27 .HP
28 .B Status XkbAllocServerMap
29 .BI "(\^XkbDescPtr " "xkb" "\^,"
30 .BI "unsigned int " "which" "\^,"
31 .BI "unsigned int " "count_acts" "\^);"
32 .if n .ti +5n
33 .if t .ti +.5i
34 .SH ARGUMENTS
35 .TP
36 .I \- xkb
37 keyboard description in which to allocate server map
38 .TP
39 .I \- which
40 mask selecting map components to allocate
41 .TP
42 .I \- count_acts
43 value of num_acts field in map to be allocated
44 .SH DESCRIPTION
45 .LP
46 .I XkbAllocServerMap 
47 allocates and initializes an empty server map in the 
48 .I server 
49 field of the keyboard description specified by 
50 .I xkb. 
51 The 
52 .I which 
53 parameter specifies the particular components of the server map structure to allocate, as specified in Table 1. 
54
55 .TS
56 c s
57 l l
58 l lw(4i).
59 Table 1 XkbAllocServerMap Masks
60 _
61 Mask    Effect
62 _
63 XkbExplicitComponentsMask       T{
64 The min_key_code and max_key_code fields of the xkb parameter are used to
65 allocate the explicit field of the server map.
66 T}
67 .sp
68 XkbKeyActionsMask       T{
69 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.
70 T}
71 .sp
72 XkbKeyBehaviorsMask     T{
73 The min_key_code and max_key_code fields of the xkb parameter are used to allocate the behaviors field of the server map.
74 T}
75 .sp
76 XkbVirtualModMapMask    T{
77 The min_key_code and max_key_code fields of the xkb parameter are used to allocate the vmodmap field of the server map.
78 T}
79
80 .TE
81
82 If the server map of the keyboard description is not NULL and any fields are already allocated in the server map, 
83 .I XkbAllocServerMap 
84 does not overwrite the existing values. The only exception is with the 
85 .I acts 
86 array. If the 
87 .I count_acts 
88 parameter is greater than the current 
89 .I num_acts 
90 field of the server map, 
91 .I XkbAllocServerMap 
92 resizes the 
93 .I acts 
94 array and resets the 
95 .I num_acts 
96 field accordingly.
97
98 If 
99 .I XkbAllocServerMap 
100 is successful, it returns Success. Otherwise, it can return either BadMatch or BadAlloc errors.
101 .SH DIAGNOSTICS
102 .TP 15
103 .B BadAlloc
104 Unable to allocate storage
105 .TP 15
106 .B BadMatch
107 A compatible version of Xkb was not available in the server or an argument has correct type and range, but is otherwise invalid
108 .TP 15
109 .B BadValue
110 An argument is out of range
111 .SH NOTES
112 .LP
113 The 
114 .I min_key_code 
115 and 
116 .I max_key_code 
117 fields of the 
118 .I xkb 
119 parameter must be legal values. If they are not valid, 
120 .I XkbAllocServerMap 
121 returns BadValue.