upload tizen2.0 source
[framework/uifw/xorg/lib/libx11.git] / man / xkb / XkbSAActionSetCtrls.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 XkbSAActionSetCtrls __libmansuffix__ __xorgversion__ "XKB FUNCTIONS"
24 .SH NAME
25 XkbSAActionSetCtrls \- Sets the 
26 .I ctrls0 
27 through 
28 .I ctrls3
29 fields of 
30 .I act
31 from 
32 .I ctrls
33 .SH SYNOPSIS
34 .HP
35 .B void XkbSAActionSetCtrls
36 .BI "(\^XkbCtrlsAction " "act" "\^,"
37 .BI "unsigned int " "ctrls" "\^);"
38 .if n .ti +5n
39 .if t .ti +.5i
40 .SH ARGUMENTS
41 .TP
42 .I \- act
43 action in which to set ctrls0-ctrls3
44 .TP
45 .I \- ctrls
46 value to set in ctrls0-ctrls3
47 .SH DESCRIPTION
48 .LP
49 Actions associated with the XkbCtrlsAction structure change the state of the 
50 boolean controls.
51
52 The 
53 .I type 
54 field can have any one of the values shown in Table 1.
55
56 .TS
57 c s
58 l l
59 l lw(4i).
60 Table 1 Controls Action Types
61 _
62 Type    Effect
63 _
64 XkbSA_SetControls       T{
65 A key press enables any boolean controls specified in the ctrls fields that were 
66 not already enabled at 
67 the time of the key press.
68 A key release disables any controls enabled by the key press.
69 This action can cause XkbControlsNotify events.
70 T}
71 XkbSA_LockControls      T{
72 If the XkbSA_LockNoLock bit is not set in the flags field, a key press enables 
73 any controls specified in 
74 the ctrls fields that were not already enabled at the time of the key press.
75 .br
76 If the XkbSA_LockNoUnlock bit is not set in the flags field, a key release 
77 disables any controls 
78 specified in the ctrls fields that were not already disabled at the time of the 
79 key press.
80 .br
81 This action can cause XkbControlsNotify events.
82 T}
83 .TE
84
85 The 
86 .I flags 
87 field is composed of the bitwise inclusive OR of the masks shown in Table 2.
88
89 .TS
90 c s
91 l l
92 l lw(4i).
93 Table 2 Control Action Flags
94 _
95 Flag    Meaning
96 _
97 XkbSA_LockNoLock        T{
98 If set, and the action type is XkbSA_LockControls, the server only disables 
99 controls.
100 T}
101 XkbSA_LockNoUnlock      T{
102 If set, and the action type is XkbSA_LockControls, the server only enables 
103 controls.
104 T}
105 .TE
106
107 The XkbSA_SetControls action implements a key that enables a boolean control 
108 when pressed and disables it 
109 when released. The XkbSA_LockControls action is used to implement a key that 
110 toggles the state of a 
111 boolean control each time it is pressed and released. The XkbSA_LockNoLock and 
112 XkbSA_LockNoUnlock flags 
113 allow modifying the toggling behavior to only unlock or only lock the boolean 
114 control.
115
116 The 
117 .I ctrls0, ctrls1, ctrls2, 
118 and 
119 .I ctrls3 
120 fields represent the boolean controls in the 
121 .I enabled_ctrls 
122 field of the controls structure. Xkb macros, to convert between the two formats.
123
124 .I XkbSAActionSetCtrls 
125 sets the 
126 .I ctrls0 
127 through 
128 .I ctrls3 
129 fields of 
130 .I act 
131 from 
132 .I ctrls.
133 .SH STRUCTURES
134 .LP
135 .nf
136
137     typedef struct _XkbCtrlsAction {
138         unsigned char    type;    /\(** XkbSA_SetControls, XkbSA_LockControls */
139         unsigned char    flags;   /\(** with type, controls enabling and disabling 
140 of controls */
141         unsigned char    ctrls3;  /\(** ctrls0 through ctrls3 represent the boolean 
142 controls */
143         unsigned char    ctrls2;  /\(** ctrls0 through ctrls3 represent the boolean 
144 controls */
145         unsigned char    ctrls1;  /\(** ctrls0 through ctrls3 represent the boolean 
146 controls */
147         unsigned char    ctrls0;  /\(** ctrls0 through ctrls3 represent the boolean 
148 controls */
149     } XkbCtrlsAction;
150 .fi