Tizen 2.1 base
[framework/uifw/xorg/lib/libx11.git] / man / xkb / XkbGetDeviceLedInfo.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 XkbGetDeviceLedInfo __libmansuffix__ __xorgversion__ "XKB FUNCTIONS"
24 .SH NAME
25 XkbGetDeviceLedInfo \- Query the indicator names, maps, and state associated 
26 with an LED feedback of an input extension device
27 .SH SYNOPSIS
28 .HP
29 .B Status XkbGetDeviceLedInfo
30 .BI "(\^Display *" "dpy" "\^,"
31 .BI "XkbDeviceInfoPtr " "device_info" "\^,"
32 .BI "unsigned int " "led_class" "\^,"
33 .BI "unsigned int " "led_id" "\^,"
34 .BI "unsigned int " "which" "\^);"
35 .if n .ti +5n
36 .if t .ti +.5i
37 .SH ARGUMENTS
38 .TP
39 .I \- dpy
40 connection to X server
41 .TP
42 .I \- device_info
43 structure to update with results
44 .TP
45 .I \- led_class
46 LED feedback class assigned by input extension
47 .TP
48 .I \- led_id
49 LED feedback ID assigned by input extension
50 .TP
51 .I \- which
52 mask indicating desired information
53 .SH DESCRIPTION
54 .LP
55 .I XkbGetDeviceLedInfo 
56 queries the server for the desired LED information for the feedback specified by
57 .I led_class 
58 and 
59 .I led_id 
60 for the X input extension device indicated by 
61 .I device_spec->device_info 
62 and waits for a reply. If successful, 
63 .I XkbGetDeviceLedInfo 
64 backfills the relevant fields of 
65 .I device_info 
66 as determined by 
67 .I which 
68 with the results and returns Success. Valid values for 
69 .I which 
70 are the inclusive OR of any of XkbXI_IndicatorNamesMask, 
71 XkbXI_IndicatorMapsMask, and XkbXI_IndicatorStateMask.
72
73 The fields of 
74 .I device_info 
75 that are filled in when this request succeeds are 
76 .I name, type, supported, 
77 and 
78 .I unsupported, 
79 and portions of the 
80 .I leds 
81 structure corresponding to 
82 .I led_class 
83 and 
84 .I led_id 
85 as indicated by the bits set in 
86 .I which. 
87 The 
88 .I device_info->leds 
89 vector is allocated if necessary and 
90 .I sz_leds 
91 and 
92 .I num_leds 
93 filled in. The 
94 .I led_class, led_id 
95 and 
96 .I phys_indicators 
97 fields of the 
98 .I device_info->leds 
99 entry corresponding to 
100 .I led_class 
101 and 
102 .I led_id 
103 are always filled in. 
104
105 If 
106 .I which 
107 contains XkbXI_IndicatorNamesMask, the 
108 .I names_present 
109 and 
110 .I names 
111 fields of the 
112 .I device_info->leds 
113 structure corresponding to 
114 .I led_class 
115 and 
116 .I led_id 
117 are updated, if 
118 .I which 
119 contains XkbXI_IndicatorStateMask, the corresponding 
120 .I state 
121 field is updated, and if 
122 .I which 
123 contains XkbXI_IndicatorMapsMask, the 
124 .I maps_present 
125 and 
126 .I maps 
127 fields are updated.
128
129 If a compatible version of Xkb is not available in the server or the Xkb 
130 extension has not been properly initialized, 
131 .I XkbGetDeviceLedInfo 
132 returns BadAccess. If allocation errors occur, a BadAlloc status is returned. If 
133 the device has no indicators, a BadMatch error is returned. If 
134 .I ledClass 
135 or 
136 .I ledID 
137 have illegal values, a BadValue error is returned. If they have legal values but 
138 do not specify a feedback that contains LEDs and is associated with the 
139 specified device, a BadMatch error is returned. 
140 .SH DIAGNOSTICS
141 .TP 15
142 .B BadAccess
143 The Xkb extension has not been properly initialized
144 .TP 15
145 .B BadAlloc
146 Unable to allocate storage
147 .TP 15
148 .B BadMatch
149 A compatible version of Xkb was not available in the server or an argument has 
150 correct type and range, but is otherwise invalid
151 .TP 15
152 .B BadValue
153 An argument is out of range