aboutsummaryrefslogtreecommitdiff
path: root/libX11/specs/XKB/ch22.xml
blob: 4a3981afa30f860e6dcccecdc3fd8ebbdca1fc81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
	  "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
<chapter id='Debugging_Aids'>
<title>Debugging Aids</title>

<para>
The debugging aids are intended for use primarily by Xkb implementors and are
optional in any implementation.
</para>


<para>
There are two bitmasks that may be used to control debugging. One bitmask
controls the output of debugging information, and the other controls behavior.
Both bitmasks are initially all zeros.
</para>


<para>
To change the values of any of the debug controls, use
<function>XkbSetDebuggingFlags</function>.
</para>

<indexterm significance="preferred" zone="XkbSetDebuggingFlags"><primary><function>XkbSetDebuggingFlags</function></primary></indexterm>
<funcsynopsis id="XkbSetDebuggingFlags">
  <funcprototype>
    <funcdef>Bool <function>XkbSetDebuggingFlags</function></funcdef>
<!-- (
<parameter>display, mask, flags, msg, ctrls_mask, ctrls, ret_flags, ret_ctrls</parameter>
) -->

    <paramdef>Display *<parameter>display</parameter></paramdef>
    <paramdef>unsigned int <parameter>mask</parameter></paramdef>
    <paramdef>unsigned int <parameter>flags</parameter></paramdef>
    <paramdef>char *<parameter>msg</parameter></paramdef>
    <paramdef>unsigned int <parameter>ctrls_mask</parameter></paramdef>
    <paramdef>unsigned int <parameter>ctrls</parameter></paramdef>
    <paramdef>unsigned int *<parameter>ret_flags</parameter></paramdef>
    <paramdef>unsigned int *<parameter>ret_ctrls</parameter></paramdef>
  </funcprototype>
</funcsynopsis>
<variablelist>
  <varlistentry>
    <term>
      <parameter>display</parameter>
    </term>
    <listitem>
      <para>
        connection to X server
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term>
      <parameter>mask</parameter>
    </term>
    <listitem>
      <para>
        mask selecting debug output flags to change
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term>
      <parameter>flags</parameter>
    </term>
    <listitem>
      <para>
        values for debug output flags selected by <parameter>mask</parameter>
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term>
      <parameter>msg</parameter>
    </term>
    <listitem>
      <para>
        message to print right now
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term>
      <parameter>ctrls_mask</parameter>
    </term>
    <listitem>
      <para>
        mask selecting debug controls to change
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term>
      <parameter>ctrls</parameter>
    </term>
    <listitem>
      <para>
        values for debug controls selected by <parameter>ctrls_mask</parameter>
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term>
      <parameter>ret_flags</parameter>
    </term>
    <listitem>
      <para>
        resulting state of all debug output flags
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term>
      <parameter>ret_ctrls</parameter>
    </term>
    <listitem>
      <para>
        resulting state of all debug controls
      </para>
    </listitem>
  </varlistentry>
</variablelist>

<para>
<function>XkbSetDebuggingFlags</function>
modifies the debug output flags as specified by
<parameter>mask</parameter>
and
<parameter>flags</parameter>,
modifies the debug controls flags as specified by
<parameter>ctrls_mask</parameter>
and
<parameter>ctrls</parameter>,
prints the message
<parameter>msg</parameter>,
and backfills
<parameter>ret_flags</parameter>
and
<parameter>ret_ctrls</parameter>
with the resulting debug output and debug controls flags.
</para>


<para>
When bits are set in the debug output masks,
<parameter>mask</parameter>
and
<parameter>flags</parameter>,
Xkb prints debug information corresponding to each bit at appropriate points
during its processing. The device to which the output is written is
implementation-dependent, but is normally the same device to which X server
error messages are directed; thus the bits that can be set in
<parameter>mask</parameter>
and
<parameter>flags</parameter>
is implementation-specific. To turn on a debug output selection, set the bit
for the output in the
<parameter>mask</parameter>
parameter and set the corresponding bit in the
<parameter>flags</parameter>
parameter. To turn off event selection for an event, set the bit for the
output in the
<parameter>mask</parameter>
parameter and do not set the corresponding bit in the
<parameter>flags</parameter>
parameter.
</para>


<para>
When bits are set in the debug controls masks,
<parameter>ctrls_mask</parameter>
and
<parameter>ctrls</parameter>,
Xkb modifies its behavior according to each controls bit.
<parameter>ctrls_mask</parameter>
and
<parameter>ctrls</parameter>
are related in the same way that
<parameter>mask</parameter>
and
<parameter>flags</parameter>
are. The valid controls bits are defined in
<link linkend="table22.1">Table 22.1</link>.
</para>

<table id='table22.1' frame='topbot'>
<title>Debug Control Masks</title>
<?dbfo keep-together="always" ?>
<tgroup cols='3' align='left' colsep='0' rowsep='0'>
<colspec colname='c1' colwidth='1.5*'/>
<colspec colname='c2' colwidth='1.0*'/>
<colspec colname='c3' colwidth='2.0*'/>
<thead>
<row rowsep='1'>
  <entry>Debug Control Mask</entry>
  <entry>Value</entry>
  <entry>Meaning</entry>
</row>
</thead>
<tbody>
<row>
    <entry><symbol>XkbDF_DisableLocks</symbol></entry>
    <entry>(1 &lt;&lt; 0)</entry>
    <entry>Disable actions that lock modifiers</entry>
  </row>
</tbody>
</tgroup>
</table>

<para>
<function>XkbSetDebuggingFlags</function>
returns
<symbol>True</symbol>
if successful and
<symbol>False</symbol>
otherwise. The only protocol error it may generate is
<errorname>BadAlloc</errorname>,
if for some reason it is unable to allocate storage.
</para>


<para>
<function>XkbSetDebuggingFlags</function>
is intended for developer use and may be disabled in production X servers. If
it is disabled,
<function>XkbSetDebuggingFlags</function>
has no effect and does not generate any protocol errors.
</para>


<para>
The message in
<parameter>msg</parameter>
is written immediately. The device to which it is written is implementation
dependent but is normally the same device where X server error messages are
directed.
</para>
</chapter>