Initialize Tizen 2.3
[framework/uifw/xorg/lib/libx11.git] / man / xkb / XkbSelectEvents.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 XkbSelectEvents __libmansuffix__ __xorgversion__ "XKB FUNCTIONS"
24 .SH NAME
25 XkbSelectEvents \-  Selects and / or deselects for delivery of one or more Xkb 
26 events and has them delivered under all conditions 
27 .SH SYNOPSIS
28 .HP
29 .B Bool XkbSelectEvents
30 .BI "(\^Display *" "display" "\^,"
31 .BI "unsigned int " "device_spec" "\^,"
32 .BI "unsigned long int " "bits_to_change" "\^,"
33 .BI "unsigned long int " "values_for_bits" "\^);"
34 .if n .ti +5n
35 .if t .ti +.5i
36 .SH ARGUMENTS
37 .TP
38 .I display
39 connection to the X server 
40 .TP
41 .I device_spec
42 device ID, or XkbUseCoreKbd
43 .TP
44 .I bits_to_change
45 determines events to be selected / deselected
46 .TP
47 .I values_for_bits
48 1=>select, 0->deselect; for events in bits_to_change
49 .SH DESCRIPTION
50 .LP
51 Xkb events are selected using an event mask, much the same as normal core X 
52 events are selected. However, unlike selecting core X events, where you must 
53 specify the selection status (on or off) for all possible event types whenever 
54 you wish to change the selection criteria for any one event, Xkb allows you to 
55 restrict the specification to only the event types you wish to change. This 
56 means that you do not need to remember the event selection values for all 
57 possible types each time you want to change one of them.
58
59 Many Xkb event types are generated under several different circumstances. When 
60 selecting to receive an Xkb event, you may specify either that you want it 
61 delivered under all circumstances, or that you want it delivered only for a 
62 subset of the possible circumstances. 
63
64 You can also deselect an event type that was previously selected for, using the 
65 same granularity.
66
67 Xkb provides two functions to select and deselect delivery of Xkb events. 
68 .I XkbSelectEvents 
69 allows you to select or deselect delivery of more than one Xkb 
70 event type at once. Events selected using 
71 .I XkbSelectEvents 
72 are delivered to your program under all circumstances that generate the events. 
73 To restrict delivery of an event to a subset of the conditions under which it 
74 occurs, use 
75 .I XkbSelectEventDetails. XkbSelectEventDetails 
76 only allows you to change the selection conditions for a single event at a time, 
77 but it provides a means of fine-tuning the conditions under which the event is 
78 delivered.
79
80 This request changes the Xkb event selection mask for the keyboard specified by 
81 .I device_spec.
82
83 Each Xkb event that can be selected is represented by a bit in the
84 .I bits_to_change 
85 and 
86 .I values_for_bits 
87 masks. Only the event selection bits specified by the 
88 .I bits_to_change 
89 parameter are affected; any unspecified bits are left unchanged. To turn on 
90 event selection for an event, set the bit for the event in the 
91 .I bits_to_change 
92 parameter and set the corresponding bit in the 
93 .I values_for_bits 
94 parameter. To turn off event selection for an event, set the bit for the event 
95 in the 
96 .I bits_to_change 
97 parameter and do not set the corresponding bit in the 
98 .I values_for_bits 
99 parameter. The valid values for both of these parameters are an inclusive 
100 bitwise OR of the masks shown in Table 1. There is no interface to return your 
101 client's current event selection mask. Clients cannot set other clients' event 
102 selection masks.
103
104 The X server reports the events defined by Xkb to your client application only 
105 if you have requested them via a call to 
106 .I XkbSelectEvents 
107 or 
108 .I XkbSelectEventDetails. 
109 Specify the event types in which you are interested in a mask.
110
111 Table 1 lists the event mask constants that can be specified with the 
112 .I XkbSelectEvents 
113 request and the circumstances in which the mask should be specified.
114
115 .TS
116 c s s
117 l l l
118 l l l.
119 Table 1 XkbSelectEvents Mask Constants
120 _
121 Event Mask      Value   Notification Wanted
122 _
123 XkbNewKeyboardNotifyMask        (1L<<0) Keyboard geometry change 
124 XkbMapNotifyMask        (1L<<1) Keyboard mapping change 
125 XkbStateNotifyMask      (1L<<2) Keyboard state change 
126 XkbControlsNotifyMask   (1L<<3) Keyboard control change 
127 XkbIndicatorStateNotifyMask     (1L<<4) Keyboard indicator state change 
128 XkbIndicatorMapNotifyMask       (1L<<5) Keyboard indicator map change 
129 XkbNamesNotifyMask      (1L<<6) Keyboard name change 
130 XkbCompatMapNotifyMask  (1L<<7) Keyboard compat map change 
131 XkbBellNotifyMask       (1L<<8) Bell 
132 XkbActionMessageMask    (1L<<9) Action message 
133 XkbAccessXNotifyMask    (1L<<10)        AccessX features 
134 XkbExtensionDeviceNotifyMask    (1L<<11)        Extension device 
135 XkbAllEventsMask        (0xFFF) All Xkb events
136 .TE
137  
138 If a bit is not set in the 
139 .I bits_to_change 
140 parameter, but the corresponding bit is set in the 
141 .I values_for_bits 
142 parameter, a BadMatch protocol error results. If an undefined bit is set in 
143 either the 
144 .I bits_to_change 
145 or the 
146 .I values_for_bits 
147 parameter, a BadValue protocol error results.
148
149 All event selection bits are initially zero for clients using the Xkb extension. 
150 Once you set some bits, they remain set for your client until you clear them via 
151 another call to 
152 .I XkbSelectEvents. 
153
154 .I XkbSelectEvents 
155 returns False if the Xkb extension has not been initilialized and True 
156 otherwise.
157 .SH "RETURN VALUES"
158 .TP 15
159 True
160 The 
161 .I XkbSelectEvents 
162 function returns True if the Xkb extension has been initilialized.
163 .TP 15
164 False
165 The 
166 .I XkbSelectEvents 
167 function returns False if the Xkb extension has not been initilialized.
168 .SH "SEE ALSO"
169 .BR XkbSelectEventDetails (__libmansuffix__),
170 .BR XkbUseCoreKbd (__libmansuffix__)