annotate semiconginev2/old/thirdparty/x11/xkb.nim @ 1221:000befd9479f compiletime-tests

did: remove support for git, for now
author sam <sam@basx.dev>
date Wed, 17 Jul 2024 21:05:47 +0700
parents 56781cc0fc7c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1191
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2 # $Xorg: XKB.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
3 #************************************************************
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
4 # $Xorg: XKBstr.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
5 #************************************************************
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
6 # $Xorg: XKBgeom.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
7 #************************************************************
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
8 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
9 #Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
10 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
11 #Permission to use, copy, modify, and distribute this
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
12 #software and its documentation for any purpose and without
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
13 #fee is hereby granted, provided that the above copyright
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
14 #notice appear in all copies and that both that copyright
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
15 #notice and this permission notice appear in supporting
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
16 #documentation, and that the name of Silicon Graphics not be
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
17 #used in advertising or publicity pertaining to distribution
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
18 #of the software without specific prior written permission.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
19 #Silicon Graphics makes no representation about the suitability
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
20 #of this software for any purpose. It is provided "as is"
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
21 #without any express or implied warranty.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
22 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
23 #SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
24 #SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
25 #AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
26 #GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
27 #DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
28 #DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
29 #OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
30 #THE USE OR PERFORMANCE OF THIS SOFTWARE.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
31 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
32 #********************************************************
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
33 # $XFree86: xc/include/extensions/XKB.h,v 1.5 2002/11/20 04:49:01 dawes Exp $
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
34 # $XFree86: xc/include/extensions/XKBgeom.h,v 3.9 2002/09/18 17:11:40 tsi Exp $
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
35 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
36 # Pascal Convertion was made by Ido Kannner - kanerido@actcom.net.il
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
37 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
38 #Thanks:
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
39 # I want to thanks to oliebol for putting up with all of the problems that was found
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
40 # while translating this code. ;)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
41 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
42 # I want to thanks #fpc channel in freenode irc, for helping me, and to put up with my
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
43 # wierd questions ;)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
44 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
45 # Thanks for mmc in #xlib on freenode irc And so for the channel itself for the helping me to
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
46 # understanding some of the problems I had converting this headers and pointing me to resources
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
47 # that helped translating this headers.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
48 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
49 # Ido
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
50 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
51 #History:
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
52 # 2004/10/15 - Fixed a bug of accessing second based records by removing "paced record" and
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
53 # chnaged it to "reocrd" only.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
54 # 2004/10/04 - 06 - Convertion from the c header of XKBgeom.h.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
55 # 2004/10/03 - Removed the XKBstr_UNIT compiler decleration. Afther the joined files,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
56 # There is no need for it anymore.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
57 # - There is a need to define (for now) XKBgeom (compiler define) in order
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
58 # to use the code of it. At this moment, I did not yet converted it to Pascal.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
59 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
60 # 2004/09/17 - 10/04 - Convertion from the c header of XKBstr.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
61 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
62 # 2004/10/03 - Joined xkbstr.pas into xkb.pas because of the circular calls problems.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
63 # - Added the history of xkbstr.pas above this addition.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
64 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
65 # 2004/09/17 - Fixed a wrong convertion number of XkbPerKeyBitArraySize, insted
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
66 # of float, it's now converted into integer (as it should have been).
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
67 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
68 # 2004/09/15 - 16 - Convertion from the c header of XKB.h.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
69 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
70
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
71 import
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
72 x, xlib
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
73
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
74 include "x11pragma.nim"
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
75
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
76 proc XkbcharToInt*(v: int8): int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
77 proc XkbIntTo2chars*(i: int16, h, L: var int8)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
78 proc Xkb2charsToInt*(h, L: int8): int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
79 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
80 # Common data structures and access macros
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
81 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
82 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
83 PWord* = ptr array[0..64_000, int16]
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
84 PByte* = ptr byte
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
85 PXkbStatePtr* = ptr XkbStateRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
86 XkbStateRec*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
87 group*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
88 locked_group*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
89 base_group*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
90 latched_group*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
91 mods*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
92 base_mods*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
93 latched_mods*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
94 locked_mods*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
95 compat_state*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
96 grab_mods*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
97 compat_grab_mods*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
98 lookup_mods*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
99 compat_lookup_mods*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
100 ptr_buttons*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
101
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
102
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
103
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
104 proc XkbModLocks*(s: PXkbStatePtr): int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
105 proc XkbStateMods*(s: PXkbStatePtr): int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
106 proc XkbGroupLock*(s: PXkbStatePtr): int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
107 proc XkbStateGroup*(s: PXkbStatePtr): int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
108 proc XkbStateFieldFromRec*(s: PXkbStatePtr): int
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
109 proc XkbGrabStateFromRec*(s: PXkbStatePtr): int
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
110 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
111 PXkbModsPtr* = ptr XkbModsRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
112 XkbModsRec*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
113 mask*: int8 # effective mods
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
114 real_mods*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
115 vmods*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
116
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
117
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
118
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
119 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
120 PXkbKTMapEntryPtr* = ptr XkbKTMapEntryRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
121 XkbKTMapEntryRec*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
122 active*: bool
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
123 level*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
124 mods*: XkbModsRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
125
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
126
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
127
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
128 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
129 PXkbKeyTypePtr* = ptr XkbKeyTypeRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
130 XkbKeyTypeRec*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
131 mods*: XkbModsRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
132 num_levels*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
133 map_count*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
134 map*: PXkbKTMapEntryPtr
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
135 preserve*: PXkbModsPtr
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
136 name*: Atom
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
137 level_names*: Atom
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
138
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
139
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
140
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
141 proc XkbNumGroups*(g: int16): int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
142 proc XkbOutOfRangeGroupInfo*(g: int16): int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
143 proc XkbOutOfRangeGroupAction*(g: int16): int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
144 proc XkbOutOfRangeGroupNumber*(g: int16): int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
145 proc XkbSetGroupInfo*(g, w, n: int16): int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
146 proc XkbSetNumGroups*(g, n: int16): int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
147 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
148 # Structures and access macros used primarily by the server
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
149 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
150 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
151 PXkbBehavior* = ptr XkbBehavior
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
152 XkbBehavior*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
153 theType*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
154 data*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
155
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
156
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
157
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
158 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
159 PXkbModAction* = ptr XkbModAction
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
160 XkbModAction*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
161 theType*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
162 flags*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
163 mask*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
164 real_mods*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
165 vmods1*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
166 vmods2*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
167
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
168
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
169
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
170 proc XkbModActionVMods*(a: PXkbModAction): int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
171 proc XkbSetModActionVMods*(a: PXkbModAction, v: int8)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
172 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
173 PXkbGroupAction* = ptr XkbGroupAction
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
174 XkbGroupAction*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
175 theType*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
176 flags*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
177 group_XXX*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
178
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
179
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
180
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
181 proc XkbSAGroup*(a: PXkbGroupAction): int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
182 proc XkbSASetGroupProc*(a: PXkbGroupAction, g: int8)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
183 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
184 PXkbISOAction* = ptr XkbISOAction
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
185 XkbISOAction*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
186 theType*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
187 flags*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
188 mask*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
189 real_mods*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
190 group_XXX*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
191 affect*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
192 vmods1*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
193 vmods2*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
194
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
195
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
196
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
197 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
198 PXkbPtrAction* = ptr XkbPtrAction
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
199 XkbPtrAction*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
200 theType*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
201 flags*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
202 high_XXX*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
203 low_XXX*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
204 high_YYY*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
205 low_YYY*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
206
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
207
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
208
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
209 proc XkbPtrActionX*(a: PXkbPtrAction): int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
210 proc XkbPtrActionY*(a: PXkbPtrAction): int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
211 proc XkbSetPtrActionX*(a: PXkbPtrAction, x: int8)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
212 proc XkbSetPtrActionY*(a: PXkbPtrAction, y: int8)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
213 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
214 PXkbPtrBtnAction* = ptr XkbPtrBtnAction
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
215 XkbPtrBtnAction*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
216 theType*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
217 flags*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
218 count*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
219 button*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
220
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
221
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
222
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
223 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
224 PXkbPtrDfltAction* = ptr XkbPtrDfltAction
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
225 XkbPtrDfltAction*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
226 theType*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
227 flags*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
228 affect*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
229 valueXXX*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
230
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
231
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
232
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
233 proc XkbSAPtrDfltValue*(a: PXkbPtrDfltAction): int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
234 proc XkbSASetPtrDfltValue*(a: PXkbPtrDfltAction, c: pointer)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
235 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
236 PXkbSwitchScreenAction* = ptr XkbSwitchScreenAction
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
237 XkbSwitchScreenAction*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
238 theType*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
239 flags*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
240 screenXXX*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
241
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
242
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
243
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
244 proc XkbSAScreen*(a: PXkbSwitchScreenAction): int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
245 proc XkbSASetScreen*(a: PXkbSwitchScreenAction, s: pointer)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
246 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
247 PXkbCtrlsAction* = ptr XkbCtrlsAction
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
248 XkbCtrlsAction*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
249 theType*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
250 flags*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
251 ctrls3*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
252 ctrls2*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
253 ctrls1*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
254 ctrls0*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
255
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
256
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
257
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
258 proc XkbActionSetCtrls*(a: PXkbCtrlsAction, c: int8)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
259 proc XkbActionCtrls*(a: PXkbCtrlsAction): int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
260 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
261 PXkbMessageAction* = ptr XkbMessageAction
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
262 XkbMessageAction*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
263 theType*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
264 flags*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
265 message*: array[0..5, char]
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
266
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
267
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
268
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
269 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
270 PXkbRedirectKeyAction* = ptr XkbRedirectKeyAction
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
271 XkbRedirectKeyAction*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
272 theType*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
273 new_key*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
274 mods_mask*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
275 mods*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
276 vmods_mask0*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
277 vmods_mask1*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
278 vmods0*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
279 vmods1*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
280
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
281
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
282
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
283 proc XkbSARedirectVMods*(a: PXkbRedirectKeyAction): int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
284 proc XkbSARedirectSetVMods*(a: PXkbRedirectKeyAction, m: int8)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
285 proc XkbSARedirectVModsMask*(a: PXkbRedirectKeyAction): int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
286 proc XkbSARedirectSetVModsMask*(a: PXkbRedirectKeyAction, m: int8)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
287 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
288 PXkbDeviceBtnAction* = ptr XkbDeviceBtnAction
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
289 XkbDeviceBtnAction*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
290 theType*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
291 flags*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
292 count*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
293 button*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
294 device*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
295
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
296
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
297
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
298 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
299 PXkbDeviceValuatorAction* = ptr XkbDeviceValuatorAction
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
300 XkbDeviceValuatorAction*{.final.} = object #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
301 # Macros to classify key actions
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
302 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
303 theType*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
304 device*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
305 v1_what*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
306 v1_ndx*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
307 v1_value*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
308 v2_what*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
309 v2_ndx*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
310 v2_value*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
311
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
312
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
313
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
314 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
315 XkbAnyActionDataSize* = 7
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
316
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
317 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
318 PXkbAnyAction* = ptr XkbAnyAction
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
319 XkbAnyAction*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
320 theType*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
321 data*: array[0..XkbAnyActionDataSize - 1, int8]
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
322
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
323
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
324
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
325 proc XkbIsModAction*(a: PXkbAnyAction): bool
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
326 proc XkbIsGroupAction*(a: PXkbAnyAction): bool
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
327 proc XkbIsPtrAction*(a: PXkbAnyAction): bool
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
328 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
329 PXkbAction* = ptr XkbAction
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
330 XkbAction*{.final.} = object #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
331 # XKB request codes, used in:
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
332 # - xkbReqType field of all requests
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
333 # - requestMinor field of some events
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
334 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
335 any*: XkbAnyAction
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
336 mods*: XkbModAction
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
337 group*: XkbGroupAction
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
338 iso*: XkbISOAction
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
339 thePtr*: XkbPtrAction
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
340 btn*: XkbPtrBtnAction
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
341 dflt*: XkbPtrDfltAction
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
342 screen*: XkbSwitchScreenAction
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
343 ctrls*: XkbCtrlsAction
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
344 msg*: XkbMessageAction
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
345 redirect*: XkbRedirectKeyAction
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
346 devbtn*: XkbDeviceBtnAction
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
347 devval*: XkbDeviceValuatorAction
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
348 theType*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
349
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
350
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
351
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
352 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
353 X_kbUseExtension* = 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
354 X_kbSelectEvents* = 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
355 X_kbBell* = 3
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
356 X_kbGetState* = 4
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
357 X_kbLatchLockState* = 5
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
358 X_kbGetControls* = 6
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
359 X_kbSetControls* = 7
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
360 X_kbGetMap* = 8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
361 X_kbSetMap* = 9
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
362 X_kbGetCompatMap* = 10
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
363 X_kbSetCompatMap* = 11
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
364 X_kbGetIndicatorState* = 12
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
365 X_kbGetIndicatorMap* = 13
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
366 X_kbSetIndicatorMap* = 14
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
367 X_kbGetNamedIndicator* = 15
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
368 X_kbSetNamedIndicator* = 16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
369 X_kbGetNames* = 17
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
370 X_kbSetNames* = 18
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
371 X_kbGetGeometry* = 19
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
372 X_kbSetGeometry* = 20
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
373 X_kbPerClientFlags* = 21
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
374 X_kbListComponents* = 22
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
375 X_kbGetKbdByName* = 23
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
376 X_kbGetDeviceInfo* = 24
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
377 X_kbSetDeviceInfo* = 25
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
378 X_kbSetDebuggingFlags* = 101 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
379 # In the X sense, XKB reports only one event.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
380 # The type field of all XKB events is XkbEventCode
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
381 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
382
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
383 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
384 XkbEventCode* = 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
385 XkbNumberEvents* = XkbEventCode + 1 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
386 # XKB has a minor event code so it can use one X event code for
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
387 # multiple purposes.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
388 # - reported in the xkbType field of all XKB events.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
389 # - XkbSelectEventDetails: Indicates the event for which event details
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
390 # are being changed
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
391 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
392
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
393 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
394 XkbNewKeyboardNotify* = 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
395 XkbMapNotify* = 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
396 XkbStateNotify* = 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
397 XkbControlsNotify* = 3
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
398 XkbIndicatorStateNotify* = 4
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
399 XkbIndicatorMapNotify* = 5
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
400 XkbNamesNotify* = 6
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
401 XkbCompatMapNotify* = 7
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
402 XkbBellNotify* = 8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
403 XkbActionMessage* = 9
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
404 XkbAccessXNotify* = 10
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
405 XkbExtensionDeviceNotify* = 11 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
406 # Event Mask:
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
407 # - XkbSelectEvents: Specifies event interest.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
408 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
409
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
410 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
411 XkbNewKeyboardNotifyMask* = int(1) shl 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
412 XkbMapNotifyMask* = int(1) shl 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
413 XkbStateNotifyMask* = int(1) shl 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
414 XkbControlsNotifyMask* = int(1) shl 3
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
415 XkbIndicatorStateNotifyMask* = int(1) shl 4
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
416 XkbIndicatorMapNotifyMask* = int(1) shl 5
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
417 XkbNamesNotifyMask* = int(1) shl 6
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
418 XkbCompatMapNotifyMask* = int(1) shl 7
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
419 XkbBellNotifyMask* = int(1) shl 8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
420 XkbActionMessageMask* = int(1) shl 9
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
421 XkbAccessXNotifyMask* = int(1) shl 10
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
422 XkbExtensionDeviceNotifyMask* = int(1) shl 11
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
423 XkbAllEventsMask* = 0x00000FFF #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
424 # NewKeyboardNotify event details:
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
425 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
426
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
427 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
428 XkbNKN_KeycodesMask* = int(1) shl 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
429 XkbNKN_GeometryMask* = int(1) shl 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
430 XkbNKN_DeviceIDMask* = int(1) shl 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
431 XkbAllNewKeyboardEventsMask* = 0x00000007 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
432 # AccessXNotify event types:
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
433 # - The 'what' field of AccessXNotify events reports the
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
434 # reason that the event was generated.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
435 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
436
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
437 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
438 XkbAXN_SKPress* = 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
439 XkbAXN_SKAccept* = 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
440 XkbAXN_SKReject* = 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
441 XkbAXN_SKRelease* = 3
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
442 XkbAXN_BKAccept* = 4
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
443 XkbAXN_BKReject* = 5
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
444 XkbAXN_AXKWarning* = 6 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
445 # AccessXNotify details:
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
446 # - Used as an event detail mask to limit the conditions under which
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
447 # AccessXNotify events are reported
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
448 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
449
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
450 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
451 XkbAXN_SKPressMask* = int(1) shl 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
452 XkbAXN_SKAcceptMask* = int(1) shl 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
453 XkbAXN_SKRejectMask* = int(1) shl 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
454 XkbAXN_SKReleaseMask* = int(1) shl 3
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
455 XkbAXN_BKAcceptMask* = int(1) shl 4
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
456 XkbAXN_BKRejectMask* = int(1) shl 5
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
457 XkbAXN_AXKWarningMask* = int(1) shl 6
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
458 XkbAllAccessXEventsMask* = 0x0000000F #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
459 # State detail mask:
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
460 # - The 'changed' field of StateNotify events reports which of
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
461 # the keyboard state components have changed.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
462 # - Used as an event detail mask to limit the conditions under
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
463 # which StateNotify events are reported.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
464 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
465
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
466 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
467 XkbModifierStateMask* = int(1) shl 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
468 XkbModifierBaseMask* = int(1) shl 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
469 XkbModifierLatchMask* = int(1) shl 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
470 XkbModifierLockMask* = int(1) shl 3
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
471 XkbGroupStateMask* = int(1) shl 4
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
472 XkbGroupBaseMask* = int(1) shl 5
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
473 XkbGroupLatchMask* = int(1) shl 6
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
474 XkbGroupLockMask* = int(1) shl 7
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
475 XkbCompatStateMask* = int(1) shl 8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
476 XkbGrabModsMask* = int(1) shl 9
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
477 XkbCompatGrabModsMask* = int(1) shl 10
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
478 XkbLookupModsMask* = int(1) shl 11
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
479 XkbCompatLookupModsMask* = int(1) shl 12
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
480 XkbPointerButtonMask* = int(1) shl 13
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
481 XkbAllStateComponentsMask* = 0x00003FFF #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
482 # Controls detail masks:
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
483 # The controls specified in XkbAllControlsMask:
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
484 # - The 'changed' field of ControlsNotify events reports which of
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
485 # the keyboard controls have changed.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
486 # - The 'changeControls' field of the SetControls request specifies
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
487 # the controls for which values are to be changed.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
488 # - Used as an event detail mask to limit the conditions under
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
489 # which ControlsNotify events are reported.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
490 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
491 # The controls specified in the XkbAllBooleanCtrlsMask:
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
492 # - The 'enabledControls' field of ControlsNotify events reports the
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
493 # current status of the boolean controls.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
494 # - The 'enabledControlsChanges' field of ControlsNotify events reports
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
495 # any boolean controls that have been turned on or off.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
496 # - The 'affectEnabledControls' and 'enabledControls' fields of the
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
497 # kbSetControls request change the set of enabled controls.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
498 # - The 'accessXTimeoutMask' and 'accessXTimeoutValues' fields of
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
499 # an XkbControlsRec specify the controls to be changed if the keyboard
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
500 # times out and the values to which they should be changed.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
501 # - The 'autoCtrls' and 'autoCtrlsValues' fields of the PerClientFlags
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
502 # request specifies the specify the controls to be reset when the
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
503 # client exits and the values to which they should be reset.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
504 # - The 'ctrls' field of an indicator map specifies the controls
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
505 # that drive the indicator.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
506 # - Specifies the boolean controls affected by the SetControls and
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
507 # LockControls key actions.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
508 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
509
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
510 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
511 XkbRepeatKeysMask* = int(1) shl 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
512 XkbSlowKeysMask* = int(1) shl 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
513 XkbBounceKeysMask* = int(1) shl 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
514 XkbStickyKeysMask* = int(1) shl 3
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
515 XkbMouseKeysMask* = int(1) shl 4
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
516 XkbMouseKeysAccelMask* = int(1) shl 5
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
517 XkbAccessXKeysMask* = int(1) shl 6
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
518 XkbAccessXTimeoutMask* = int(1) shl 7
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
519 XkbAccessXFeedbackMask* = int(1) shl 8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
520 XkbAudibleBellMask* = int(1) shl 9
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
521 XkbOverlay1Mask* = int(1) shl 10
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
522 XkbOverlay2Mask* = int(1) shl 11
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
523 XkbIgnoreGroupLockMask* = int(1) shl 12
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
524 XkbGroupsWrapMask* = int(1) shl 27
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
525 XkbInternalModsMask* = int(1) shl 28
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
526 XkbIgnoreLockModsMask* = int(1) shl 29
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
527 XkbPerKeyRepeatMask* = int(1) shl 30
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
528 XkbControlsEnabledMask* = int(1) shl 31
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
529 XkbAccessXOptionsMask* = XkbStickyKeysMask or XkbAccessXFeedbackMask
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
530 XkbAllBooleanCtrlsMask* = 0x00001FFF
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
531 XkbAllControlsMask* = 0xF8001FFF #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
532 # Compatibility Map Compontents:
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
533 # - Specifies the components to be allocated in XkbAllocCompatMap.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
534 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
535
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
536 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
537 XkbSymInterpMask* = 1 shl 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
538 XkbGroupCompatMask* = 1 shl 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
539 XkbAllCompatMask* = 0x00000003 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
540 # Assorted constants and limits.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
541 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
542
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
543 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
544 XkbAllIndicatorsMask* = 0xFFFFFFFF #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
545 # Map components masks:
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
546 # Those in AllMapComponentsMask:
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
547 # - Specifies the individual fields to be loaded or changed for the
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
548 # GetMap and SetMap requests.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
549 # Those in ClientInfoMask:
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
550 # - Specifies the components to be allocated by XkbAllocClientMap.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
551 # Those in ServerInfoMask:
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
552 # - Specifies the components to be allocated by XkbAllocServerMap.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
553 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
554
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
555 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
556 XkbKeyTypesMask* = 1 shl 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
557 XkbKeySymsMask* = 1 shl 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
558 XkbModifierMapMask* = 1 shl 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
559 XkbExplicitComponentsMask* = 1 shl 3
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
560 XkbKeyActionsMask* = 1 shl 4
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
561 XkbKeyBehaviorsMask* = 1 shl 5
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
562 XkbVirtualModsMask* = 1 shl 6
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
563 XkbVirtualModMapMask* = 1 shl 7
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
564 XkbAllClientInfoMask* = XkbKeyTypesMask or XkbKeySymsMask or
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
565 XkbModifierMapMask
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
566 XkbAllServerInfoMask* = XkbExplicitComponentsMask or XkbKeyActionsMask or
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
567 XkbKeyBehaviorsMask or XkbVirtualModsMask or XkbVirtualModMapMask
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
568 XkbAllMapComponentsMask* = XkbAllClientInfoMask or XkbAllServerInfoMask #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
569 # Names component mask:
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
570 # - Specifies the names to be loaded or changed for the GetNames and
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
571 # SetNames requests.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
572 # - Specifies the names that have changed in a NamesNotify event.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
573 # - Specifies the names components to be allocated by XkbAllocNames.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
574 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
575
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
576 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
577 XkbKeycodesNameMask* = 1 shl 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
578 XkbGeometryNameMask* = 1 shl 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
579 XkbSymbolsNameMask* = 1 shl 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
580 XkbPhysSymbolsNameMask* = 1 shl 3
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
581 XkbTypesNameMask* = 1 shl 4
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
582 XkbCompatNameMask* = 1 shl 5
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
583 XkbKeyTypeNamesMask* = 1 shl 6
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
584 XkbKTLevelNamesMask* = 1 shl 7
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
585 XkbIndicatorNamesMask* = 1 shl 8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
586 XkbKeyNamesMask* = 1 shl 9
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
587 XkbKeyAliasesMask* = 1 shl 10
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
588 XkbVirtualModNamesMask* = 1 shl 11
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
589 XkbGroupNamesMask* = 1 shl 12
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
590 XkbRGNamesMask* = 1 shl 13
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
591 XkbComponentNamesMask* = 0x0000003F
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
592 XkbAllNamesMask* = 0x00003FFF #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
593 # Miscellaneous event details:
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
594 # - event detail masks for assorted events that don't reall
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
595 # have any details.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
596 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
597
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
598 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
599 XkbAllStateEventsMask* = XkbAllStateComponentsMask
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
600 XkbAllMapEventsMask* = XkbAllMapComponentsMask
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
601 XkbAllControlEventsMask* = XkbAllControlsMask
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
602 XkbAllIndicatorEventsMask* = XkbAllIndicatorsMask
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
603 XkbAllNameEventsMask* = XkbAllNamesMask
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
604 XkbAllCompatMapEventsMask* = XkbAllCompatMask
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
605 XkbAllBellEventsMask* = int(1) shl 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
606 XkbAllActionMessagesMask* = int(1) shl 0 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
607 # XKB reports one error: BadKeyboard
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
608 # A further reason for the error is encoded into to most significant
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
609 # byte of the resourceID for the error:
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
610 # XkbErr_BadDevice - the device in question was not found
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
611 # XkbErr_BadClass - the device was found but it doesn't belong to
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
612 # the appropriate class.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
613 # XkbErr_BadId - the device was found and belongs to the right
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
614 # class, but not feedback with a matching id was
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
615 # found.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
616 # The low byte of the resourceID for this error contains the device
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
617 # id, class specifier or feedback id that failed.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
618 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
619
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
620 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
621 XkbKeyboard* = 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
622 XkbNumberErrors* = 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
623 XkbErr_BadDevice* = 0x000000FF
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
624 XkbErr_BadClass* = 0x000000FE
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
625 XkbErr_BadId* = 0x000000FD #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
626 # Keyboard Components Mask:
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
627 # - Specifies the components that follow a GetKeyboardByNameReply
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
628 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
629
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
630 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
631 XkbClientMapMask* = int(1) shl 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
632 XkbServerMapMask* = int(1) shl 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
633 XkbCompatMapMask* = int(1) shl 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
634 XkbIndicatorMapMask* = int(1) shl 3
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
635 XkbNamesMask* = int(1) shl 4
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
636 XkbGeometryMask* = int(1) shl 5
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
637 XkbControlsMask* = int(1) shl 6
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
638 XkbAllComponentsMask* = 0x0000007F #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
639 # AccessX Options Mask
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
640 # - The 'accessXOptions' field of an XkbControlsRec specifies the
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
641 # AccessX options that are currently in effect.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
642 # - The 'accessXTimeoutOptionsMask' and 'accessXTimeoutOptionsValues'
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
643 # fields of an XkbControlsRec specify the Access X options to be
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
644 # changed if the keyboard times out and the values to which they
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
645 # should be changed.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
646 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
647
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
648 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
649 XkbAX_SKPressFBMask* = int(1) shl 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
650 XkbAX_SKAcceptFBMask* = int(1) shl 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
651 XkbAX_FeatureFBMask* = int(1) shl 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
652 XkbAX_SlowWarnFBMask* = int(1) shl 3
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
653 XkbAX_IndicatorFBMask* = int(1) shl 4
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
654 XkbAX_StickyKeysFBMask* = int(1) shl 5
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
655 XkbAX_TwoKeysMask* = int(1) shl 6
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
656 XkbAX_LatchToLockMask* = int(1) shl 7
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
657 XkbAX_SKReleaseFBMask* = int(1) shl 8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
658 XkbAX_SKRejectFBMask* = int(1) shl 9
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
659 XkbAX_BKRejectFBMask* = int(1) shl 10
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
660 XkbAX_DumbBellFBMask* = int(1) shl 11
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
661 XkbAX_FBOptionsMask* = 0x00000F3F
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
662 XkbAX_SKOptionsMask* = 0x000000C0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
663 XkbAX_AllOptionsMask* = 0x00000FFF #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
664 # XkbUseCoreKbd is used to specify the core keyboard without having
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
665 # to look up its X input extension identifier.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
666 # XkbUseCorePtr is used to specify the core pointer without having
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
667 # to look up its X input extension identifier.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
668 # XkbDfltXIClass is used to specify "don't care" any place that the
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
669 # XKB protocol is looking for an X Input Extension
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
670 # device class.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
671 # XkbDfltXIId is used to specify "don't care" any place that the
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
672 # XKB protocol is looking for an X Input Extension
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
673 # feedback identifier.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
674 # XkbAllXIClasses is used to get information about all device indicators,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
675 # whether they're part of the indicator feedback class
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
676 # or the keyboard feedback class.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
677 # XkbAllXIIds is used to get information about all device indicator
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
678 # feedbacks without having to list them.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
679 # XkbXINone is used to indicate that no class or id has been specified.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
680 # XkbLegalXILedClass(c) True if 'c' specifies a legal class with LEDs
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
681 # XkbLegalXIBellClass(c) True if 'c' specifies a legal class with bells
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
682 # XkbExplicitXIDevice(d) True if 'd' explicitly specifies a device
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
683 # XkbExplicitXIClass(c) True if 'c' explicitly specifies a device class
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
684 # XkbExplicitXIId(c) True if 'i' explicitly specifies a device id
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
685 # XkbSingleXIClass(c) True if 'c' specifies exactly one device class,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
686 # including the default.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
687 # XkbSingleXIId(i) True if 'i' specifies exactly one device
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
688 # identifier, including the default.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
689 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
690
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
691 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
692 XkbUseCoreKbd* = 0x00000100
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
693 XkbUseCorePtr* = 0x00000200
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
694 XkbDfltXIClass* = 0x00000300
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
695 XkbDfltXIId* = 0x00000400
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
696 XkbAllXIClasses* = 0x00000500
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
697 XkbAllXIIds* = 0x00000600
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
698 XkbXINone* = 0x0000FF00
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
699
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
700 proc XkbLegalXILedClass*(c: int): bool
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
701 proc XkbLegalXIBellClass*(c: int): bool
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
702 proc XkbExplicitXIDevice*(c: int): bool
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
703 proc XkbExplicitXIClass*(c: int): bool
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
704 proc XkbExplicitXIId*(c: int): bool
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
705 proc XkbSingleXIClass*(c: int): bool
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
706 proc XkbSingleXIId*(c: int): bool
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
707 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
708 XkbNoModifier* = 0x000000FF
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
709 XkbNoShiftLevel* = 0x000000FF
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
710 XkbNoShape* = 0x000000FF
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
711 XkbNoIndicator* = 0x000000FF
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
712 XkbNoModifierMask* = 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
713 XkbAllModifiersMask* = 0x000000FF
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
714 XkbAllVirtualModsMask* = 0x0000FFFF
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
715 XkbNumKbdGroups* = 4
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
716 XkbMaxKbdGroup* = XkbNumKbdGroups - 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
717 XkbMaxMouseKeysBtn* = 4 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
718 # Group Index and Mask:
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
719 # - Indices into the kt_index array of a key type.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
720 # - Mask specifies types to be changed for XkbChangeTypesOfKey
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
721 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
722
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
723 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
724 XkbGroup1Index* = 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
725 XkbGroup2Index* = 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
726 XkbGroup3Index* = 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
727 XkbGroup4Index* = 3
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
728 XkbAnyGroup* = 254
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
729 XkbAllGroups* = 255
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
730 XkbGroup1Mask* = 1 shl 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
731 XkbGroup2Mask* = 1 shl 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
732 XkbGroup3Mask* = 1 shl 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
733 XkbGroup4Mask* = 1 shl 3
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
734 XkbAnyGroupMask* = 1 shl 7
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
735 XkbAllGroupsMask* = 0x0000000F #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
736 # BuildCoreState: Given a keyboard group and a modifier state,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
737 # construct the value to be reported an event.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
738 # GroupForCoreState: Given the state reported in an event,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
739 # determine the keyboard group.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
740 # IsLegalGroup: Returns TRUE if 'g' is a valid group index.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
741 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
742
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
743 proc XkbBuildCoreState*(m, g: int): int
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
744 proc XkbGroupForCoreState*(s: int): int
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
745 proc XkbIsLegalGroup*(g: int): bool
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
746 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
747 # GroupsWrap values:
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
748 # - The 'groupsWrap' field of an XkbControlsRec specifies the
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
749 # treatment of out of range groups.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
750 # - Bits 6 and 7 of the group info field of a key symbol map
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
751 # specify the interpretation of out of range groups for the
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
752 # corresponding key.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
753 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
754 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
755 XkbWrapIntoRange* = 0x00000000
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
756 XkbClampIntoRange* = 0x00000040
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
757 XkbRedirectIntoRange* = 0x00000080 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
758 # Action flags: Reported in the 'flags' field of most key actions.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
759 # Interpretation depends on the type of the action; not all actions
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
760 # accept all flags.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
761 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
762 # Option Used for Actions
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
763 # ------ ----------------
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
764 # ClearLocks SetMods, LatchMods, SetGroup, LatchGroup
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
765 # LatchToLock SetMods, LatchMods, SetGroup, LatchGroup
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
766 # LockNoLock LockMods, ISOLock, LockPtrBtn, LockDeviceBtn
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
767 # LockNoUnlock LockMods, ISOLock, LockPtrBtn, LockDeviceBtn
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
768 # UseModMapMods SetMods, LatchMods, LockMods, ISOLock
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
769 # GroupAbsolute SetGroup, LatchGroup, LockGroup, ISOLock
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
770 # UseDfltButton PtrBtn, LockPtrBtn
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
771 # NoAcceleration MovePtr
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
772 # MoveAbsoluteX MovePtr
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
773 # MoveAbsoluteY MovePtr
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
774 # ISODfltIsGroup ISOLock
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
775 # ISONoAffectMods ISOLock
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
776 # ISONoAffectGroup ISOLock
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
777 # ISONoAffectPtr ISOLock
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
778 # ISONoAffectCtrls ISOLock
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
779 # MessageOnPress ActionMessage
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
780 # MessageOnRelease ActionMessage
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
781 # MessageGenKeyEvent ActionMessage
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
782 # AffectDfltBtn SetPtrDflt
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
783 # DfltBtnAbsolute SetPtrDflt
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
784 # SwitchApplication SwitchScreen
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
785 # SwitchAbsolute SwitchScreen
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
786 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
787
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
788 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
789 XkbSA_ClearLocks* = int(1) shl 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
790 XkbSA_LatchToLock* = int(1) shl 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
791 XkbSA_LockNoLock* = int(1) shl 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
792 XkbSA_LockNoUnlock* = int(1) shl 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
793 XkbSA_UseModMapMods* = int(1) shl 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
794 XkbSA_GroupAbsolute* = int(1) shl 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
795 XkbSA_UseDfltButton* = 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
796 XkbSA_NoAcceleration* = int(1) shl 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
797 XkbSA_MoveAbsoluteX* = int(1) shl 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
798 XkbSA_MoveAbsoluteY* = int(1) shl 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
799 XkbSA_ISODfltIsGroup* = int(1) shl 7
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
800 XkbSA_ISONoAffectMods* = int(1) shl 6
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
801 XkbSA_ISONoAffectGroup* = int(1) shl 5
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
802 XkbSA_ISONoAffectPtr* = int(1) shl 4
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
803 XkbSA_ISONoAffectCtrls* = int(1) shl 3
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
804 XkbSA_ISOAffectMask* = 0x00000078
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
805 XkbSA_MessageOnPress* = int(1) shl 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
806 XkbSA_MessageOnRelease* = int(1) shl 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
807 XkbSA_MessageGenKeyEvent* = int(1) shl 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
808 XkbSA_AffectDfltBtn* = 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
809 XkbSA_DfltBtnAbsolute* = int(1) shl 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
810 XkbSA_SwitchApplication* = int(1) shl 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
811 XkbSA_SwitchAbsolute* = int(1) shl 2 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
812 # The following values apply to the SA_DeviceValuator
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
813 # action only. Valuator operations specify the action
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
814 # to be taken. Values specified in the action are
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
815 # multiplied by 2^scale before they are applied.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
816 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
817
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
818 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
819 XkbSA_IgnoreVal* = 0x00000000
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
820 XkbSA_SetValMin* = 0x00000010
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
821 XkbSA_SetValCenter* = 0x00000020
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
822 XkbSA_SetValMax* = 0x00000030
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
823 XkbSA_SetValRelative* = 0x00000040
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
824 XkbSA_SetValAbsolute* = 0x00000050
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
825 XkbSA_ValOpMask* = 0x00000070
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
826 XkbSA_ValScaleMask* = 0x00000007
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
827
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
828 proc XkbSA_ValOp*(a: int): int
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
829 proc XkbSA_ValScale*(a: int): int
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
830 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
831 # Action types: specifies the type of a key action. Reported in the
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
832 # type field of all key actions.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
833 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
834 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
835 XkbSA_NoAction* = 0x00000000
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
836 XkbSA_SetMods* = 0x00000001
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
837 XkbSA_LatchMods* = 0x00000002
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
838 XkbSA_LockMods* = 0x00000003
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
839 XkbSA_SetGroup* = 0x00000004
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
840 XkbSA_LatchGroup* = 0x00000005
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
841 XkbSA_LockGroup* = 0x00000006
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
842 XkbSA_MovePtr* = 0x00000007
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
843 XkbSA_PtrBtn* = 0x00000008
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
844 XkbSA_LockPtrBtn* = 0x00000009
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
845 XkbSA_SetPtrDflt* = 0x0000000A
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
846 XkbSA_ISOLock* = 0x0000000B
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
847 XkbSA_Terminate* = 0x0000000C
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
848 XkbSA_SwitchScreen* = 0x0000000D
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
849 XkbSA_SetControls* = 0x0000000E
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
850 XkbSA_LockControls* = 0x0000000F
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
851 XkbSA_ActionMessage* = 0x00000010
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
852 XkbSA_RedirectKey* = 0x00000011
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
853 XkbSA_DeviceBtn* = 0x00000012
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
854 XkbSA_LockDeviceBtn* = 0x00000013
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
855 XkbSA_DeviceValuator* = 0x00000014
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
856 XkbSA_LastAction* = XkbSA_DeviceValuator
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
857 XkbSA_NumActions* = XkbSA_LastAction + 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
858
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
859 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
860 XkbSA_XFree86Private* = 0x00000086
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
861 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
862 # Specifies the key actions that clear latched groups or modifiers.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
863 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
864
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
865 const ##define XkbSA_BreakLatch \
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
866 # ((1<<XkbSA_NoAction)|(1<<XkbSA_PtrBtn)|(1<<XkbSA_LockPtrBtn)|\
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
867 # (1<<XkbSA_Terminate)|(1<<XkbSA_SwitchScreen)|(1<<XkbSA_SetControls)|\
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
868 # (1<<XkbSA_LockControls)|(1<<XkbSA_ActionMessage)|\
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
869 # (1<<XkbSA_RedirectKey)|(1<<XkbSA_DeviceBtn)|(1<<XkbSA_LockDeviceBtn))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
870 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
871 XkbSA_BreakLatch* = (1 shl XkbSA_PtrBtn) or (1 shl XkbSA_LockPtrBtn) or
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
872 (1 shl XkbSA_Terminate) or (1 shl XkbSA_SwitchScreen) or
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
873 (1 shl XkbSA_SetControls) or (1 shl XkbSA_LockControls) or
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
874 (1 shl XkbSA_ActionMessage) or (1 shl XkbSA_RedirectKey) or
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
875 (1 shl XkbSA_DeviceBtn) or (1 shl XkbSA_LockDeviceBtn) #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
876 # Key Behavior Qualifier:
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
877 # KB_Permanent indicates that the behavior describes an unalterable
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
878 # characteristic of the keyboard, not an XKB software-simulation of
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
879 # the listed behavior.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
880 # Key Behavior Types:
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
881 # Specifies the behavior of the underlying key.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
882 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
883
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
884 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
885 XkbKB_Permanent* = 0x00000080
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
886 XkbKB_OpMask* = 0x0000007F
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
887 XkbKB_Default* = 0x00000000
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
888 XkbKB_Lock* = 0x00000001
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
889 XkbKB_RadioGroup* = 0x00000002
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
890 XkbKB_Overlay1* = 0x00000003
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
891 XkbKB_Overlay2* = 0x00000004
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
892 XkbKB_RGAllowNone* = 0x00000080 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
893 # Various macros which describe the range of legal keycodes.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
894 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
895
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
896 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
897 XkbMinLegalKeyCode* = 8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
898 XkbMaxLegalKeyCode* = 255
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
899 XkbMaxKeyCount* = XkbMaxLegalKeyCode - XkbMinLegalKeyCode + 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
900 XkbPerKeyBitArraySize* = (XkbMaxLegalKeyCode + 1) div 8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
901
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
902 proc XkbIsLegalKeycode*(k: int): bool
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
903 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
904 PXkbControlsPtr* = ptr XkbControlsRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
905 XkbControlsRec*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
906 mk_dflt_btn*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
907 num_groups*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
908 groups_wrap*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
909 internal*: XkbModsRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
910 ignore_lock*: XkbModsRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
911 enabled_ctrls*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
912 repeat_delay*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
913 repeat_interval*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
914 slow_keys_delay*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
915 debounce_delay*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
916 mk_delay*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
917 mk_interval*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
918 mk_time_to_max*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
919 mk_max_speed*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
920 mk_curve*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
921 ax_options*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
922 ax_timeout*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
923 axt_opts_mask*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
924 axt_opts_values*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
925 axt_ctrls_mask*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
926 axt_ctrls_values*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
927 per_key_repeat*: array[0..XkbPerKeyBitArraySize - 1, int8]
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
928
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
929
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
930
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
931 proc XkbAX_AnyFeedback*(c: PXkbControlsPtr): int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
932 proc XkbAX_NeedOption*(c: PXkbControlsPtr, w: int16): int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
933 proc XkbAX_NeedFeedback*(c: PXkbControlsPtr, w: int16): bool
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
934 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
935 # Assorted constants and limits.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
936 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
937 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
938 XkbNumModifiers* = 8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
939 XkbNumVirtualMods* = 16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
940 XkbNumIndicators* = 32
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
941 XkbMaxRadioGroups* = 32
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
942 XkbAllRadioGroupsMask* = 0xFFFFFFFF
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
943 XkbMaxShiftLevel* = 63
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
944 XkbMaxSymsPerKey* = XkbMaxShiftLevel * XkbNumKbdGroups
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
945 XkbRGMaxMembers* = 12
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
946 XkbActionMessageLength* = 6
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
947 XkbKeyNameLength* = 4
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
948 XkbMaxRedirectCount* = 8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
949 XkbGeomPtsPerMM* = 10
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
950 XkbGeomMaxColors* = 32
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
951 XkbGeomMaxLabelColors* = 3
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
952 XkbGeomMaxPriority* = 255
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
953
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
954 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
955 PXkbServerMapPtr* = ptr XkbServerMapRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
956 XkbServerMapRec*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
957 num_acts*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
958 size_acts*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
959 acts*: ptr array[0..0xfff, XkbAction]
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
960 behaviors*: PXkbBehavior
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
961 key_acts*: PWord
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
962 explicit*: PByte
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
963 vmods*: array[0..XkbNumVirtualMods - 1, int8]
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
964 vmodmap*: PWord
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
965
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
966
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
967
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
968 proc XkbSMKeyActionsPtr*(m: PXkbServerMapPtr, k: int16): PXkbAction
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
969 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
970 # Structures and access macros used primarily by clients
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
971 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
972 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
973 PXkbSymMapPtr* = ptr XkbSymMapRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
974 XkbSymMapRec*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
975 kt_index*: array[0..XkbNumKbdGroups - 1, int8]
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
976 group_info*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
977 width*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
978 offset*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
979
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
980
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
981
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
982 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
983 PXkbClientMapPtr* = ptr XkbClientMapRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
984 XkbClientMapRec*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
985 size_types*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
986 num_types*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
987 types*: ptr array[0..0xffff, XkbKeyTypeRec]
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
988 size_syms*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
989 num_syms*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
990 syms*: ptr array[0..0xffff, KeySym]
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
991 key_sym_map*: ptr array[0..0xffff, XkbSymMapRec]
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
992 modmap*: PByte
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
993
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
994
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
995
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
996 proc XkbCMKeyGroupInfo*(m: PXkbClientMapPtr, k: int16): int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
997 proc XkbCMKeyNumGroups*(m: PXkbClientMapPtr, k: int16): int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
998 proc XkbCMKeyGroupWidth*(m: PXkbClientMapPtr, k: int16, g: int8): int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
999 proc XkbCMKeyGroupsWidth*(m: PXkbClientMapPtr, k: int16): int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1000 proc XkbCMKeyTypeIndex*(m: PXkbClientMapPtr, k: int16, g: int8): int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1001 proc XkbCMKeyType*(m: PXkbClientMapPtr, k: int16, g: int8): PXkbKeyTypePtr
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1002 proc XkbCMKeyNumSyms*(m: PXkbClientMapPtr, k: int16): int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1003 proc XkbCMKeySymsOffset*(m: PXkbClientMapPtr, k: int16): int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1004 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1005 # Compatibility structures and access macros
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1006 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1007 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1008 PXkbSymInterpretPtr* = ptr XkbSymInterpretRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1009 XkbSymInterpretRec*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1010 sym*: KeySym
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1011 flags*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1012 match*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1013 mods*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1014 virtual_mod*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1015 act*: XkbAnyAction
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1016
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1017
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1018
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1019 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1020 PXkbCompatMapPtr* = ptr XkbCompatMapRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1021 XkbCompatMapRec*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1022 sym_interpret*: PXkbSymInterpretPtr
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1023 groups*: array[0..XkbNumKbdGroups - 1, XkbModsRec]
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1024 num_si*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1025 size_si*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1026
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1027
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1028
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1029 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1030 PXkbIndicatorMapPtr* = ptr XkbIndicatorMapRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1031 XkbIndicatorMapRec*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1032 flags*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1033 which_groups*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1034 groups*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1035 which_mods*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1036 mods*: XkbModsRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1037 ctrls*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1038
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1039
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1040
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1041 proc XkbIM_IsAuto*(i: PXkbIndicatorMapPtr): bool
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1042 proc XkbIM_InUse*(i: PXkbIndicatorMapPtr): bool
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1043 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1044 PXkbIndicatorPtr* = ptr XkbIndicatorRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1045 XkbIndicatorRec*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1046 phys_indicators*: int32
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1047 maps*: array[0..XkbNumIndicators - 1, XkbIndicatorMapRec]
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1048
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1049
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1050
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1051 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1052 PXkbKeyNamePtr* = ptr XkbKeyNameRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1053 XkbKeyNameRec*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1054 name*: array[0..XkbKeyNameLength - 1, char]
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1055
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1056
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1057
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1058 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1059 PXkbKeyAliasPtr* = ptr XkbKeyAliasRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1060 XkbKeyAliasRec*{.final.} = object #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1061 # Names for everything
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1062 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1063 float*: array[0..XkbKeyNameLength - 1, char]
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1064 alias*: array[0..XkbKeyNameLength - 1, char]
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1065
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1066
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1067
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1068 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1069 PXkbNamesPtr* = ptr XkbNamesRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1070 XkbNamesRec*{.final.} = object #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1071 # Key Type index and mask for the four standard key types.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1072 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1073 keycodes*: Atom
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1074 geometry*: Atom
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1075 symbols*: Atom
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1076 types*: Atom
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1077 compat*: Atom
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1078 vmods*: array[0..XkbNumVirtualMods - 1, Atom]
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1079 indicators*: array[0..XkbNumIndicators - 1, Atom]
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1080 groups*: array[0..XkbNumKbdGroups - 1, Atom]
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1081 keys*: PXkbKeyNamePtr
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1082 key_aliases*: PXkbKeyAliasPtr
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1083 radio_groups*: PAtom
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1084 phys_symbols*: Atom
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1085 num_keys*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1086 num_key_aliases*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1087 num_rg*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1088
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1089
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1090
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1091 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1092 XkbOneLevelIndex* = 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1093 XkbTwoLevelIndex* = 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1094 XkbAlphabeticIndex* = 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1095 XkbKeypadIndex* = 3
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1096 XkbLastRequiredType* = XkbKeypadIndex
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1097 XkbNumRequiredTypes* = XkbLastRequiredType + 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1098 XkbMaxKeyTypes* = 255
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1099 XkbOneLevelMask* = 1 shl 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1100 XkbTwoLevelMask* = 1 shl 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1101 XkbAlphabeticMask* = 1 shl 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1102 XkbKeypadMask* = 1 shl 3
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1103 XkbAllRequiredTypes* = 0x0000000F
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1104
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1105 proc XkbShiftLevel*(n: int8): int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1106 proc XkbShiftLevelMask*(n: int8): int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1107 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1108 # Extension name and version information
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1109 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1110 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1111 XkbName* = "XKEYBOARD"
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1112 XkbMajorVersion* = 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1113 XkbMinorVersion* = 0 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1114 # Explicit map components:
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1115 # - Used in the 'explicit' field of an XkbServerMap. Specifies
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1116 # the keyboard components that should _not_ be updated automatically
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1117 # in response to core protocol keyboard mapping requests.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1118 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1119
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1120 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1121 XkbExplicitKeyTypesMask* = 0x0000000F
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1122 XkbExplicitKeyType1Mask* = 1 shl 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1123 XkbExplicitKeyType2Mask* = 1 shl 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1124 XkbExplicitKeyType3Mask* = 1 shl 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1125 XkbExplicitKeyType4Mask* = 1 shl 3
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1126 XkbExplicitInterpretMask* = 1 shl 4
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1127 XkbExplicitAutoRepeatMask* = 1 shl 5
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1128 XkbExplicitBehaviorMask* = 1 shl 6
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1129 XkbExplicitVModMapMask* = 1 shl 7
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1130 XkbAllExplicitMask* = 0x000000FF #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1131 # Symbol interpretations flags:
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1132 # - Used in the flags field of a symbol interpretation
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1133 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1134
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1135 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1136 XkbSI_AutoRepeat* = 1 shl 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1137 XkbSI_LockingKey* = 1 shl 1 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1138 # Symbol interpretations match specification:
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1139 # - Used in the match field of a symbol interpretation to specify
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1140 # the conditions under which an interpretation is used.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1141 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1142
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1143 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1144 XkbSI_LevelOneOnly* = 0x00000080
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1145 XkbSI_OpMask* = 0x0000007F
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1146 XkbSI_NoneOf* = 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1147 XkbSI_AnyOfOrNone* = 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1148 XkbSI_AnyOf* = 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1149 XkbSI_AllOf* = 3
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1150 XkbSI_Exactly* = 4 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1151 # Indicator map flags:
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1152 # - Used in the flags field of an indicator map to indicate the
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1153 # conditions under which and indicator can be changed and the
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1154 # effects of changing the indicator.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1155 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1156
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1157 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1158 XkbIM_NoExplicit* = int(1) shl 7
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1159 XkbIM_NoAutomatic* = int(1) shl 6
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1160 XkbIM_LEDDrivesKB* = int(1) shl 5 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1161 # Indicator map component specifications:
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1162 # - Used by the 'which_groups' and 'which_mods' fields of an indicator
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1163 # map to specify which keyboard components should be used to drive
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1164 # the indicator.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1165 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1166
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1167 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1168 XkbIM_UseBase* = int(1) shl 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1169 XkbIM_UseLatched* = int(1) shl 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1170 XkbIM_UseLocked* = int(1) shl 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1171 XkbIM_UseEffective* = int(1) shl 3
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1172 XkbIM_UseCompat* = int(1) shl 4
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1173 XkbIM_UseNone* = 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1174 XkbIM_UseAnyGroup* = XkbIM_UseBase or XkbIM_UseLatched or XkbIM_UseLocked or
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1175 XkbIM_UseEffective
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1176 XkbIM_UseAnyMods* = XkbIM_UseAnyGroup or XkbIM_UseCompat #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1177 # GetByName components:
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1178 # - Specifies desired or necessary components to GetKbdByName request.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1179 # - Reports the components that were found in a GetKbdByNameReply
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1180 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1181
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1182 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1183 XkbGBN_TypesMask* = int(1) shl 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1184 XkbGBN_CompatMapMask* = int(1) shl 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1185 XkbGBN_ClientSymbolsMask* = int(1) shl 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1186 XkbGBN_ServerSymbolsMask* = int(1) shl 3
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1187 XkbGBN_SymbolsMask* = XkbGBN_ClientSymbolsMask or XkbGBN_ServerSymbolsMask
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1188 XkbGBN_IndicatorMapMask* = int(1) shl 4
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1189 XkbGBN_KeyNamesMask* = int(1) shl 5
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1190 XkbGBN_GeometryMask* = int(1) shl 6
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1191 XkbGBN_OtherNamesMask* = int(1) shl 7
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1192 XkbGBN_AllComponentsMask* = 0x000000FF #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1193 # ListComponents flags
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1194 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1195
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1196 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1197 XkbLC_Hidden* = int(1) shl 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1198 XkbLC_Default* = int(1) shl 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1199 XkbLC_Partial* = int(1) shl 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1200 XkbLC_AlphanumericKeys* = int(1) shl 8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1201 XkbLC_ModifierKeys* = int(1) shl 9
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1202 XkbLC_KeypadKeys* = int(1) shl 10
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1203 XkbLC_FunctionKeys* = int(1) shl 11
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1204 XkbLC_AlternateGroup* = int(1) shl 12 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1205 # X Input Extension Interactions
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1206 # - Specifies the possible interactions between XKB and the X input
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1207 # extension
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1208 # - Used to request (XkbGetDeviceInfo) or change (XKbSetDeviceInfo)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1209 # XKB information about an extension device.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1210 # - Reports the list of supported optional features in the reply to
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1211 # XkbGetDeviceInfo or in an XkbExtensionDeviceNotify event.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1212 # XkbXI_UnsupportedFeature is reported in XkbExtensionDeviceNotify
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1213 # events to indicate an attempt to use an unsupported feature.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1214 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1215
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1216 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1217 XkbXI_KeyboardsMask* = int(1) shl 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1218 XkbXI_ButtonActionsMask* = int(1) shl 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1219 XkbXI_IndicatorNamesMask* = int(1) shl 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1220 XkbXI_IndicatorMapsMask* = int(1) shl 3
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1221 XkbXI_IndicatorStateMask* = int(1) shl 4
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1222 XkbXI_UnsupportedFeatureMask* = int(1) shl 15
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1223 XkbXI_AllFeaturesMask* = 0x0000001F
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1224 XkbXI_AllDeviceFeaturesMask* = 0x0000001E
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1225 XkbXI_IndicatorsMask* = 0x0000001C
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1226 XkbAllExtensionDeviceEventsMask* = 0x0000801F #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1227 # Per-Client Flags:
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1228 # - Specifies flags to be changed by the PerClientFlags request.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1229 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1230
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1231 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1232 XkbPCF_DetectableAutoRepeatMask* = int(1) shl 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1233 XkbPCF_GrabsUseXKBStateMask* = int(1) shl 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1234 XkbPCF_AutoResetControlsMask* = int(1) shl 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1235 XkbPCF_LookupStateWhenGrabbed* = int(1) shl 3
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1236 XkbPCF_SendEventUsesXKBState* = int(1) shl 4
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1237 XkbPCF_AllFlagsMask* = 0x0000001F #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1238 # Debugging flags and controls
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1239 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1240
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1241 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1242 XkbDF_DisableLocks* = 1 shl 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1243
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1244 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1245 PXkbPropertyPtr* = ptr XkbPropertyRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1246 XkbPropertyRec*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1247 name*: cstring
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1248 value*: cstring
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1249
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1250
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1251
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1252 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1253 PXkbColorPtr* = ptr XkbColorRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1254 XkbColorRec*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1255 pixel*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1256 spec*: cstring
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1257
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1258
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1259
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1260 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1261 PXkbPointPtr* = ptr XkbPointRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1262 XkbPointRec*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1263 x*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1264 y*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1265
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1266
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1267
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1268 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1269 PXkbBoundsPtr* = ptr XkbBoundsRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1270 XkbBoundsRec*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1271 x1*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1272 y1*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1273 x2*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1274 y2*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1275
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1276
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1277
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1278 proc XkbBoundsWidth*(b: PXkbBoundsPtr): int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1279 proc XkbBoundsHeight*(b: PXkbBoundsPtr): int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1280 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1281 PXkbOutlinePtr* = ptr XkbOutlineRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1282 XkbOutlineRec*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1283 num_points*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1284 sz_points*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1285 corner_radius*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1286 points*: PXkbPointPtr
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1287
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1288
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1289
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1290 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1291 PXkbShapePtr* = ptr XkbShapeRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1292 XkbShapeRec*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1293 name*: Atom
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1294 num_outlines*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1295 sz_outlines*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1296 outlines*: ptr array[0..0xffff, XkbOutlineRec]
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1297 approx*: ptr array[0..0xffff, XkbOutlineRec]
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1298 primary*: ptr array[0..0xffff, XkbOutlineRec]
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1299 bounds*: XkbBoundsRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1300
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1301
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1302
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1303 proc XkbOutlineIndex*(s: PXkbShapePtr, o: PXkbOutlinePtr): int32
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1304 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1305 PXkbShapeDoodadPtr* = ptr XkbShapeDoodadRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1306 XkbShapeDoodadRec*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1307 name*: Atom
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1308 theType*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1309 priority*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1310 top*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1311 left*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1312 angle*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1313 color_ndx*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1314 shape_ndx*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1315
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1316
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1317
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1318 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1319 PXkbTextDoodadPtr* = ptr XkbTextDoodadRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1320 XkbTextDoodadRec*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1321 name*: Atom
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1322 theType*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1323 priority*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1324 top*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1325 left*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1326 angle*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1327 width*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1328 height*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1329 color_ndx*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1330 text*: cstring
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1331 font*: cstring
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1332
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1333
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1334
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1335 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1336 PXkbIndicatorDoodadPtr* = ptr XkbIndicatorDoodadRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1337 XkbIndicatorDoodadRec*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1338 name*: Atom
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1339 theType*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1340 priority*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1341 top*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1342 left*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1343 angle*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1344 shape_ndx*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1345 on_color_ndx*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1346 off_color_ndx*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1347
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1348
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1349
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1350 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1351 PXkbLogoDoodadPtr* = ptr XkbLogoDoodadRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1352 XkbLogoDoodadRec*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1353 name*: Atom
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1354 theType*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1355 priority*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1356 top*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1357 left*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1358 angle*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1359 color_ndx*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1360 shape_ndx*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1361 logo_name*: cstring
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1362
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1363
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1364
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1365 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1366 PXkbAnyDoodadPtr* = ptr XkbAnyDoodadRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1367 XkbAnyDoodadRec*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1368 name*: Atom
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1369 theType*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1370 priority*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1371 top*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1372 left*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1373 angle*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1374
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1375
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1376
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1377 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1378 PXkbDoodadPtr* = ptr XkbDoodadRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1379 XkbDoodadRec*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1380 any*: XkbAnyDoodadRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1381 shape*: XkbShapeDoodadRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1382 text*: XkbTextDoodadRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1383 indicator*: XkbIndicatorDoodadRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1384 logo*: XkbLogoDoodadRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1385
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1386
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1387
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1388 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1389 XkbUnknownDoodad* = 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1390 XkbOutlineDoodad* = 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1391 XkbSolidDoodad* = 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1392 XkbTextDoodad* = 3
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1393 XkbIndicatorDoodad* = 4
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1394 XkbLogoDoodad* = 5
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1395
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1396 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1397 PXkbKeyPtr* = ptr XkbKeyRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1398 XkbKeyRec*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1399 name*: XkbKeyNameRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1400 gap*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1401 shape_ndx*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1402 color_ndx*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1403
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1404
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1405
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1406 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1407 PXkbRowPtr* = ptr XkbRowRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1408 XkbRowRec*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1409 top*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1410 left*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1411 num_keys*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1412 sz_keys*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1413 vertical*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1414 Keys*: PXkbKeyPtr
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1415 bounds*: XkbBoundsRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1416
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1417
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1418
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1419 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1420 PXkbOverlayPtr* = ptr XkbOverlayRec #forward for XkbSectionRec use.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1421 #Do not add more "type"
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1422 PXkbSectionPtr* = ptr XkbSectionRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1423 XkbSectionRec*{.final.} = object #Do not add more "type"
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1424 name*: Atom
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1425 priority*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1426 top*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1427 left*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1428 width*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1429 height*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1430 angle*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1431 num_rows*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1432 num_doodads*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1433 num_overlays*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1434 rows*: PXkbRowPtr
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1435 doodads*: PXkbDoodadPtr
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1436 bounds*: XkbBoundsRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1437 overlays*: PXkbOverlayPtr
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1438
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1439 PXkbOverlayKeyPtr* = ptr XkbOverlayKeyRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1440 XkbOverlayKeyRec*{.final.} = object #Do not add more "type"
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1441 over*: XkbKeyNameRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1442 under*: XkbKeyNameRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1443
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1444 PXkbOverlayRowPtr* = ptr XkbOverlayRowRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1445 XkbOverlayRowRec*{.final.} = object #Do not add more "type"
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1446 row_under*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1447 num_keys*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1448 sz_keys*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1449 keys*: PXkbOverlayKeyPtr
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1450
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1451 XkbOverlayRec*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1452 name*: Atom
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1453 section_under*: PXkbSectionPtr
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1454 num_rows*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1455 sz_rows*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1456 rows*: PXkbOverlayRowPtr
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1457 bounds*: PXkbBoundsPtr
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1458
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1459
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1460 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1461 PXkbGeometryRec* = ptr XkbGeometryRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1462 PXkbGeometryPtr* = PXkbGeometryRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1463 XkbGeometryRec*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1464 name*: Atom
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1465 width_mm*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1466 height_mm*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1467 label_font*: cstring
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1468 label_color*: PXkbColorPtr
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1469 base_color*: PXkbColorPtr
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1470 sz_properties*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1471 sz_colors*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1472 sz_shapes*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1473 sz_sections*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1474 sz_doodads*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1475 sz_key_aliases*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1476 num_properties*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1477 num_colors*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1478 num_shapes*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1479 num_sections*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1480 num_doodads*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1481 num_key_aliases*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1482 properties*: ptr array[0..0xffff, XkbPropertyRec]
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1483 colors*: ptr array[0..0xffff, XkbColorRec]
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1484 shapes*: ptr array[0..0xffff, XkbShapeRec]
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1485 sections*: ptr array[0..0xffff, XkbSectionRec]
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1486 key_aliases*: ptr array[0..0xffff, XkbKeyAliasRec]
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1487
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1488
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1489
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1490 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1491 XkbGeomPropertiesMask* = 1 shl 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1492 XkbGeomColorsMask* = 1 shl 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1493 XkbGeomShapesMask* = 1 shl 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1494 XkbGeomSectionsMask* = 1 shl 3
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1495 XkbGeomDoodadsMask* = 1 shl 4
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1496 XkbGeomKeyAliasesMask* = 1 shl 5
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1497 XkbGeomAllMask* = 0x0000003F
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1498
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1499 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1500 PXkbGeometrySizesPtr* = ptr XkbGeometrySizesRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1501 XkbGeometrySizesRec*{.final.} = object #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1502 # Tie it all together into one big keyboard description
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1503 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1504 which*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1505 num_properties*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1506 num_colors*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1507 num_shapes*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1508 num_sections*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1509 num_doodads*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1510 num_key_aliases*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1511
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1512
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1513
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1514 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1515 PXkbDescPtr* = ptr XkbDescRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1516 XkbDescRec*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1517 dpy*: PDisplay
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1518 flags*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1519 device_spec*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1520 min_key_code*: KeyCode
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1521 max_key_code*: KeyCode
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1522 ctrls*: PXkbControlsPtr
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1523 server*: PXkbServerMapPtr
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1524 map*: PXkbClientMapPtr
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1525 indicators*: PXkbIndicatorPtr
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1526 names*: PXkbNamesPtr
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1527 compat*: PXkbCompatMapPtr
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1528 geom*: PXkbGeometryPtr
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1529
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1530
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1531
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1532 proc XkbKeyKeyTypeIndex*(d: PXkbDescPtr, k: int16, g: int8): int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1533 proc XkbKeyKeyType*(d: PXkbDescPtr, k: int16, g: int8): PXkbKeyTypePtr
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1534 proc XkbKeyGroupWidth*(d: PXkbDescPtr, k: int16, g: int8): int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1535 proc XkbKeyGroupsWidth*(d: PXkbDescPtr, k: int16): int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1536 proc XkbKeyGroupInfo*(d: PXkbDescPtr, k: int16): int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1537 proc XkbKeyNumGroups*(d: PXkbDescPtr, k: int16): int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1538 proc XkbKeyNumSyms*(d: PXkbDescPtr, k: int16): int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1539 proc XkbKeySym*(d: PXkbDescPtr, k: int16, n: int16): KeySym
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1540 proc XkbKeySymEntry*(d: PXkbDescPtr, k: int16, sl: int16, g: int8): KeySym
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1541 proc XkbKeyAction*(d: PXkbDescPtr, k: int16, n: int16): PXkbAction
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1542 proc XkbKeyActionEntry*(d: PXkbDescPtr, k: int16, sl: int16, g: int8): int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1543 proc XkbKeyHasActions*(d: PXkbDescPtr, k: int16): bool
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1544 proc XkbKeyNumActions*(d: PXkbDescPtr, k: int16): int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1545 proc XkbKeyActionsPtr*(d: PXkbDescPtr, k: int16): PXkbAction
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1546 proc XkbKeycodeInRange*(d: PXkbDescPtr, k: int16): bool
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1547 proc XkbNumKeys*(d: PXkbDescPtr): int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1548 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1549 # The following structures can be used to track changes
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1550 # to a keyboard device
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1551 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1552 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1553 PXkbMapChangesPtr* = ptr XkbMapChangesRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1554 XkbMapChangesRec*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1555 changed*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1556 min_key_code*: KeyCode
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1557 max_key_code*: KeyCode
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1558 first_type*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1559 num_types*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1560 first_key_sym*: KeyCode
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1561 num_key_syms*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1562 first_key_act*: KeyCode
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1563 num_key_acts*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1564 first_key_behavior*: KeyCode
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1565 num_key_behaviors*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1566 first_key_explicit*: KeyCode
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1567 num_key_explicit*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1568 first_modmap_key*: KeyCode
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1569 num_modmap_keys*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1570 first_vmodmap_key*: KeyCode
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1571 num_vmodmap_keys*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1572 pad*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1573 vmods*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1574
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1575
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1576
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1577 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1578 PXkbControlsChangesPtr* = ptr XkbControlsChangesRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1579 XkbControlsChangesRec*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1580 changed_ctrls*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1581 enabled_ctrls_changes*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1582 num_groups_changed*: bool
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1583
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1584
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1585
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1586 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1587 PXkbIndicatorChangesPtr* = ptr XkbIndicatorChangesRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1588 XkbIndicatorChangesRec*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1589 state_changes*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1590 map_changes*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1591
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1592
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1593
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1594 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1595 PXkbNameChangesPtr* = ptr XkbNameChangesRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1596 XkbNameChangesRec*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1597 changed*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1598 first_type*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1599 num_types*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1600 first_lvl*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1601 num_lvls*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1602 num_aliases*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1603 num_rg*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1604 first_key*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1605 num_keys*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1606 changed_vmods*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1607 changed_indicators*: int32
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1608 changed_groups*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1609
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1610
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1611
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1612 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1613 PXkbCompatChangesPtr* = ptr XkbCompatChangesRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1614 XkbCompatChangesRec*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1615 changed_groups*: int8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1616 first_si*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1617 num_si*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1618
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1619
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1620
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1621 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1622 PXkbChangesPtr* = ptr XkbChangesRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1623 XkbChangesRec*{.final.} = object #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1624 # These data structures are used to construct a keymap from
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1625 # a set of components or to list components in the server
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1626 # database.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1627 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1628 device_spec*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1629 state_changes*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1630 map*: XkbMapChangesRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1631 ctrls*: XkbControlsChangesRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1632 indicators*: XkbIndicatorChangesRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1633 names*: XkbNameChangesRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1634 compat*: XkbCompatChangesRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1635
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1636
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1637
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1638 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1639 PXkbComponentNamesPtr* = ptr XkbComponentNamesRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1640 XkbComponentNamesRec*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1641 keymap*: ptr int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1642 keycodes*: ptr int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1643 types*: ptr int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1644 compat*: ptr int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1645 symbols*: ptr int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1646 geometry*: ptr int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1647
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1648
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1649
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1650 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1651 PXkbComponentNamePtr* = ptr XkbComponentNameRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1652 XkbComponentNameRec*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1653 flags*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1654 name*: cstring
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1655
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1656
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1657
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1658 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1659 PXkbComponentListPtr* = ptr XkbComponentListRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1660 XkbComponentListRec*{.final.} = object #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1661 # The following data structures describe and track changes to a
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1662 # non-keyboard extension device
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1663 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1664 num_keymaps*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1665 num_keycodes*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1666 num_types*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1667 num_compat*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1668 num_symbols*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1669 num_geometry*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1670 keymaps*: PXkbComponentNamePtr
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1671 keycodes*: PXkbComponentNamePtr
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1672 types*: PXkbComponentNamePtr
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1673 compat*: PXkbComponentNamePtr
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1674 symbols*: PXkbComponentNamePtr
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1675 geometry*: PXkbComponentNamePtr
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1676
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1677
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1678
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1679 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1680 PXkbDeviceLedInfoPtr* = ptr XkbDeviceLedInfoRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1681 XkbDeviceLedInfoRec*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1682 led_class*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1683 led_id*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1684 phys_indicators*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1685 maps_present*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1686 names_present*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1687 state*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1688 names*: array[0..XkbNumIndicators - 1, Atom]
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1689 maps*: array[0..XkbNumIndicators - 1, XkbIndicatorMapRec]
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1690
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1691
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1692
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1693 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1694 PXkbDeviceInfoPtr* = ptr XkbDeviceInfoRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1695 XkbDeviceInfoRec*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1696 name*: cstring
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1697 theType*: Atom
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1698 device_spec*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1699 has_own_state*: bool
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1700 supported*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1701 unsupported*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1702 num_btns*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1703 btn_acts*: PXkbAction
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1704 sz_leds*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1705 num_leds*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1706 dflt_kbd_fb*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1707 dflt_led_fb*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1708 leds*: PXkbDeviceLedInfoPtr
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1709
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1710
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1711
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1712 proc XkbXI_DevHasBtnActs*(d: PXkbDeviceInfoPtr): bool
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1713 proc XkbXI_LegalDevBtn*(d: PXkbDeviceInfoPtr, b: int16): bool
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1714 proc XkbXI_DevHasLeds*(d: PXkbDeviceInfoPtr): bool
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1715 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1716 PXkbDeviceLedChangesPtr* = ptr XkbDeviceLedChangesRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1717 XkbDeviceLedChangesRec*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1718 led_class*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1719 led_id*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1720 defined*: int16 #names or maps changed
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1721 next*: PXkbDeviceLedChangesPtr
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1722
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1723
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1724 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1725 PXkbDeviceChangesPtr* = ptr XkbDeviceChangesRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1726 XkbDeviceChangesRec*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1727 changed*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1728 first_btn*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1729 num_btns*: int16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1730 leds*: XkbDeviceLedChangesRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1731
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1732
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1733
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1734 proc XkbShapeDoodadColor*(g: PXkbGeometryPtr, d: PXkbShapeDoodadPtr): PXkbColorPtr
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1735 proc XkbShapeDoodadShape*(g: PXkbGeometryPtr, d: PXkbShapeDoodadPtr): PXkbShapePtr
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1736 proc XkbSetShapeDoodadColor*(g: PXkbGeometryPtr, d: PXkbShapeDoodadPtr,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1737 c: PXkbColorPtr)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1738 proc XkbSetShapeDoodadShape*(g: PXkbGeometryPtr, d: PXkbShapeDoodadPtr,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1739 s: PXkbShapePtr)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1740 proc XkbTextDoodadColor*(g: PXkbGeometryPtr, d: PXkbTextDoodadPtr): PXkbColorPtr
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1741 proc XkbSetTextDoodadColor*(g: PXkbGeometryPtr, d: PXkbTextDoodadPtr,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1742 c: PXkbColorPtr)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1743 proc XkbIndicatorDoodadShape*(g: PXkbGeometryPtr, d: PXkbIndicatorDoodadPtr): PXkbShapeDoodadPtr
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1744 proc XkbIndicatorDoodadOnColor*(g: PXkbGeometryPtr, d: PXkbIndicatorDoodadPtr): PXkbColorPtr
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1745 proc XkbIndicatorDoodadOffColor*(g: PXkbGeometryPtr, d: PXkbIndicatorDoodadPtr): PXkbColorPtr
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1746 proc XkbSetIndicatorDoodadOnColor*(g: PXkbGeometryPtr,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1747 d: PXkbIndicatorDoodadPtr, c: PXkbColorPtr)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1748 proc XkbSetIndicatorDoodadOffColor*(g: PXkbGeometryPtr,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1749 d: PXkbIndicatorDoodadPtr, c: PXkbColorPtr)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1750 proc XkbSetIndicatorDoodadShape*(g: PXkbGeometryPtr, d: PXkbIndicatorDoodadPtr,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1751 s: PXkbShapeDoodadPtr)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1752 proc XkbLogoDoodadColor*(g: PXkbGeometryPtr, d: PXkbLogoDoodadPtr): PXkbColorPtr
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1753 proc XkbLogoDoodadShape*(g: PXkbGeometryPtr, d: PXkbLogoDoodadPtr): PXkbShapeDoodadPtr
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1754 proc XkbSetLogoDoodadColor*(g: PXkbGeometryPtr, d: PXkbLogoDoodadPtr,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1755 c: PXkbColorPtr)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1756 proc XkbSetLogoDoodadShape*(g: PXkbGeometryPtr, d: PXkbLogoDoodadPtr,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1757 s: PXkbShapeDoodadPtr)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1758 proc XkbKeyShape*(g: PXkbGeometryPtr, k: PXkbKeyPtr): PXkbShapeDoodadPtr
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1759 proc XkbKeyColor*(g: PXkbGeometryPtr, k: PXkbKeyPtr): PXkbColorPtr
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1760 proc XkbSetKeyShape*(g: PXkbGeometryPtr, k: PXkbKeyPtr, s: PXkbShapeDoodadPtr)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1761 proc XkbSetKeyColor*(g: PXkbGeometryPtr, k: PXkbKeyPtr, c: PXkbColorPtr)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1762 proc XkbGeomColorIndex*(g: PXkbGeometryPtr, c: PXkbColorPtr): int32
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1763 proc XkbAddGeomProperty*(geom: PXkbGeometryPtr, name: cstring, value: cstring): PXkbPropertyPtr{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1764 libx11c, importc: "XkbAddGeomProperty".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1765 proc XkbAddGeomKeyAlias*(geom: PXkbGeometryPtr, alias: cstring, float: cstring): PXkbKeyAliasPtr{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1766 libx11c, importc: "XkbAddGeomKeyAlias".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1767 proc XkbAddGeomColor*(geom: PXkbGeometryPtr, spec: cstring, pixel: int16): PXkbColorPtr{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1768 libx11c, importc: "XkbAddGeomColor".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1769 proc XkbAddGeomOutline*(shape: PXkbShapePtr, sz_points: int16): PXkbOutlinePtr{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1770 libx11c, importc: "XkbAddGeomOutline".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1771 proc XkbAddGeomShape*(geom: PXkbGeometryPtr, name: Atom, sz_outlines: int16): PXkbShapePtr{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1772 libx11c, importc: "XkbAddGeomShape".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1773 proc XkbAddGeomKey*(row: PXkbRowPtr): PXkbKeyPtr{.libx11c,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1774 importc: "XkbAddGeomKey".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1775 proc XkbAddGeomRow*(section: PXkbSectionPtr, sz_keys: int16): PXkbRowPtr{.libx11c, importc: "XkbAddGeomRow".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1776 proc XkbAddGeomSection*(geom: PXkbGeometryPtr, name: Atom, sz_rows: int16,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1777 sz_doodads: int16, sz_overlays: int16): PXkbSectionPtr{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1778 libx11c, importc: "XkbAddGeomSection".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1779 proc XkbAddGeomOverlay*(section: PXkbSectionPtr, name: Atom, sz_rows: int16): PXkbOverlayPtr{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1780 libx11c, importc: "XkbAddGeomOverlay".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1781 proc XkbAddGeomOverlayRow*(overlay: PXkbOverlayPtr, row_under: int16,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1782 sz_keys: int16): PXkbOverlayRowPtr{.libx11c, importc: "XkbAddGeomOverlayRow".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1783 proc XkbAddGeomOverlayKey*(overlay: PXkbOverlayPtr, row: PXkbOverlayRowPtr,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1784 over: cstring, under: cstring): PXkbOverlayKeyPtr{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1785 libx11c, importc: "XkbAddGeomOverlayKey".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1786 proc XkbAddGeomDoodad*(geom: PXkbGeometryPtr, section: PXkbSectionPtr,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1787 name: Atom): PXkbDoodadPtr{.libx11c,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1788 importc: "XkbAddGeomDoodad".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1789 proc XkbFreeGeomKeyAliases*(geom: PXkbGeometryPtr, first: int16, count: int16,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1790 freeAll: bool){.libx11c,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1791 importc: "XkbFreeGeomKeyAliases".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1792 proc XkbFreeGeomColors*(geom: PXkbGeometryPtr, first: int16, count: int16,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1793 freeAll: bool){.libx11c,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1794 importc: "XkbFreeGeomColors".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1795 proc XkbFreeGeomDoodads*(doodads: PXkbDoodadPtr, nDoodads: int16, freeAll: bool){.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1796 libx11c, importc: "XkbFreeGeomDoodads".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1797 proc XkbFreeGeomProperties*(geom: PXkbGeometryPtr, first: int16, count: int16,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1798 freeAll: bool){.libx11c,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1799 importc: "XkbFreeGeomProperties".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1800 proc XkbFreeGeomOverlayKeys*(row: PXkbOverlayRowPtr, first: int16, count: int16,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1801 freeAll: bool){.libx11c,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1802 importc: "XkbFreeGeomOverlayKeys".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1803 proc XkbFreeGeomOverlayRows*(overlay: PXkbOverlayPtr, first: int16,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1804 count: int16, freeAll: bool){.libx11c, importc: "XkbFreeGeomOverlayRows".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1805 proc XkbFreeGeomOverlays*(section: PXkbSectionPtr, first: int16, count: int16,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1806 freeAll: bool){.libx11c,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1807 importc: "XkbFreeGeomOverlays".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1808 proc XkbFreeGeomKeys*(row: PXkbRowPtr, first: int16, count: int16, freeAll: bool){.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1809 libx11c, importc: "XkbFreeGeomKeys".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1810 proc XkbFreeGeomRows*(section: PXkbSectionPtr, first: int16, count: int16,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1811 freeAll: bool){.libx11c,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1812 importc: "XkbFreeGeomRows".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1813 proc XkbFreeGeomSections*(geom: PXkbGeometryPtr, first: int16, count: int16,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1814 freeAll: bool){.libx11c,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1815 importc: "XkbFreeGeomSections".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1816 proc XkbFreeGeomPoints*(outline: PXkbOutlinePtr, first: int16, count: int16,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1817 freeAll: bool){.libx11c,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1818 importc: "XkbFreeGeomPoints".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1819 proc XkbFreeGeomOutlines*(shape: PXkbShapePtr, first: int16, count: int16,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1820 freeAll: bool){.libx11c,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1821 importc: "XkbFreeGeomOutlines".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1822 proc XkbFreeGeomShapes*(geom: PXkbGeometryPtr, first: int16, count: int16,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1823 freeAll: bool){.libx11c,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1824 importc: "XkbFreeGeomShapes".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1825 proc XkbFreeGeometry*(geom: PXkbGeometryPtr, which: int16, freeMap: bool){.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1826 libx11c, importc: "XkbFreeGeometry".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1827 proc XkbAllocGeomProps*(geom: PXkbGeometryPtr, nProps: int16): Status{.libx11c, importc: "XkbAllocGeomProps".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1828 proc XkbAllocGeomKeyAliases*(geom: PXkbGeometryPtr, nAliases: int16): Status{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1829 libx11c, importc: "XkbAllocGeomKeyAliases".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1830 proc XkbAllocGeomColors*(geom: PXkbGeometryPtr, nColors: int16): Status{.libx11c, importc: "XkbAllocGeomColors".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1831 proc XkbAllocGeomShapes*(geom: PXkbGeometryPtr, nShapes: int16): Status{.libx11c, importc: "XkbAllocGeomShapes".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1832 proc XkbAllocGeomSections*(geom: PXkbGeometryPtr, nSections: int16): Status{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1833 libx11c, importc: "XkbAllocGeomSections".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1834 proc XkbAllocGeomOverlays*(section: PXkbSectionPtr, num_needed: int16): Status{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1835 libx11c, importc: "XkbAllocGeomOverlays".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1836 proc XkbAllocGeomOverlayRows*(overlay: PXkbOverlayPtr, num_needed: int16): Status{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1837 libx11c, importc: "XkbAllocGeomOverlayRows".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1838 proc XkbAllocGeomOverlayKeys*(row: PXkbOverlayRowPtr, num_needed: int16): Status{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1839 libx11c, importc: "XkbAllocGeomOverlayKeys".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1840 proc XkbAllocGeomDoodads*(geom: PXkbGeometryPtr, nDoodads: int16): Status{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1841 libx11c, importc: "XkbAllocGeomDoodads".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1842 proc XkbAllocGeomSectionDoodads*(section: PXkbSectionPtr, nDoodads: int16): Status{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1843 libx11c, importc: "XkbAllocGeomSectionDoodads".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1844 proc XkbAllocGeomOutlines*(shape: PXkbShapePtr, nOL: int16): Status{.libx11c, importc: "XkbAllocGeomOutlines".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1845 proc XkbAllocGeomRows*(section: PXkbSectionPtr, nRows: int16): Status{.libx11c, importc: "XkbAllocGeomRows".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1846 proc XkbAllocGeomPoints*(ol: PXkbOutlinePtr, nPts: int16): Status{.libx11c, importc: "XkbAllocGeomPoints".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1847 proc XkbAllocGeomKeys*(row: PXkbRowPtr, nKeys: int16): Status{.libx11c, importc: "XkbAllocGeomKeys".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1848 proc XkbAllocGeometry*(xkb: PXkbDescPtr, sizes: PXkbGeometrySizesPtr): Status{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1849 libx11c, importc: "XkbAllocGeometry".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1850 proc XkbSetGeometryProc*(dpy: PDisplay, deviceSpec: int16, geom: PXkbGeometryPtr): Status{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1851 libx11c, importc: "XkbSetGeometry".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1852 proc XkbComputeShapeTop*(shape: PXkbShapePtr, bounds: PXkbBoundsPtr): bool{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1853 libx11c, importc: "XkbComputeShapeTop".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1854 proc XkbComputeShapeBounds*(shape: PXkbShapePtr): bool{.libx11c,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1855 importc: "XkbComputeShapeBounds".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1856 proc XkbComputeRowBounds*(geom: PXkbGeometryPtr, section: PXkbSectionPtr,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1857 row: PXkbRowPtr): bool{.libx11c,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1858 importc: "XkbComputeRowBounds".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1859 proc XkbComputeSectionBounds*(geom: PXkbGeometryPtr, section: PXkbSectionPtr): bool{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1860 libx11c, importc: "XkbComputeSectionBounds".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1861 proc XkbFindOverlayForKey*(geom: PXkbGeometryPtr, wanted: PXkbSectionPtr,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1862 under: cstring): cstring{.libx11c,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1863 importc: "XkbFindOverlayForKey".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1864 proc XkbGetGeometryProc*(dpy: PDisplay, xkb: PXkbDescPtr): Status{.libx11c, importc: "XkbGetGeometry".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1865 proc XkbGetNamedGeometry*(dpy: PDisplay, xkb: PXkbDescPtr, name: Atom): Status{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1866 libx11c, importc: "XkbGetNamedGeometry".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1867 when defined(XKB_IN_SERVER):
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1868 proc SrvXkbAddGeomKeyAlias*(geom: PXkbGeometryPtr, alias: cstring,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1869 float: cstring): PXkbKeyAliasPtr{.libx11c, importc: "XkbAddGeomKeyAlias".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1870 proc SrvXkbAddGeomColor*(geom: PXkbGeometryPtr, spec: cstring, pixel: int16): PXkbColorPtr{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1871 libx11c, importc: "XkbAddGeomColor".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1872 proc SrvXkbAddGeomDoodad*(geom: PXkbGeometryPtr, section: PXkbSectionPtr,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1873 name: Atom): PXkbDoodadPtr{.libx11c,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1874 importc: "XkbAddGeomDoodad".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1875 proc SrvXkbAddGeomKey*(geom: PXkbGeometryPtr, alias: cstring, float: cstring): PXkbKeyAliasPtr{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1876 libx11c, importc: "XkbAddGeomKeyAlias".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1877 proc SrvXkbAddGeomOutline*(shape: PXkbShapePtr, sz_points: int16): PXkbOutlinePtr{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1878 libx11c, importc: "XkbAddGeomOutline".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1879 proc SrvXkbAddGeomOverlay*(overlay: PXkbOverlayPtr, row: PXkbOverlayRowPtr,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1880 over: cstring, under: cstring): PXkbOverlayKeyPtr{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1881 libx11c, importc: "XkbAddGeomOverlayKey".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1882 proc SrvXkbAddGeomOverlayRow*(overlay: PXkbOverlayPtr, row_under: int16,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1883 sz_keys: int16): PXkbOverlayRowPtr{.libx11c, importc: "XkbAddGeomOverlayRow".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1884 proc SrvXkbAddGeomOverlayKey*(overlay: PXkbOverlayPtr, row: PXkbOverlayRowPtr,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1885 over: cstring, under: cstring): PXkbOverlayKeyPtr{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1886 libx11c, importc: "XkbAddGeomOverlayKey".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1887 proc SrvXkbAddGeomProperty*(geom: PXkbGeometryPtr, name: cstring,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1888 value: cstring): PXkbPropertyPtr{.libx11c, importc: "XkbAddGeomProperty".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1889 proc SrvXkbAddGeomRow*(section: PXkbSectionPtr, sz_keys: int16): PXkbRowPtr{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1890 libx11c, importc: "XkbAddGeomRow".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1891 proc SrvXkbAddGeomSection*(geom: PXkbGeometryPtr, name: Atom, sz_rows: int16,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1892 sz_doodads: int16, sz_overlays: int16): PXkbSectionPtr{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1893 libx11c, importc: "XkbAddGeomSection".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1894 proc SrvXkbAddGeomShape*(geom: PXkbGeometryPtr, name: Atom,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1895 sz_outlines: int16): PXkbShapePtr{.libx11c, importc: "XkbAddGeomShape".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1896 proc SrvXkbAllocGeomKeyAliases*(geom: PXkbGeometryPtr, nAliases: int16): Status{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1897 libx11c, importc: "XkbAllocGeomKeyAliases".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1898 proc SrvXkbAllocGeomColors*(geom: PXkbGeometryPtr, nColors: int16): Status{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1899 libx11c, importc: "XkbAllocGeomColors".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1900 proc SrvXkbAllocGeomDoodads*(geom: PXkbGeometryPtr, nDoodads: int16): Status{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1901 libx11c, importc: "XkbAllocGeomDoodads".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1902 proc SrvXkbAllocGeomKeys*(row: PXkbRowPtr, nKeys: int16): Status{.libx11c, importc: "XkbAllocGeomKeys".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1903 proc SrvXkbAllocGeomOutlines*(shape: PXkbShapePtr, nOL: int16): Status{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1904 libx11c, importc: "XkbAllocGeomOutlines".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1905 proc SrvXkbAllocGeomPoints*(ol: PXkbOutlinePtr, nPts: int16): Status{.libx11c, importc: "XkbAllocGeomPoints".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1906 proc SrvXkbAllocGeomProps*(geom: PXkbGeometryPtr, nProps: int16): Status{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1907 libx11c, importc: "XkbAllocGeomProps".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1908 proc SrvXkbAllocGeomRows*(section: PXkbSectionPtr, nRows: int16): Status{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1909 libx11c, importc: "XkbAllocGeomRows".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1910 proc SrvXkbAllocGeomSectionDoodads*(section: PXkbSectionPtr, nDoodads: int16): Status{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1911 libx11c, importc: "XkbAllocGeomSectionDoodads".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1912 proc SrvXkbAllocGeomSections*(geom: PXkbGeometryPtr, nSections: int16): Status{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1913 libx11c, importc: "XkbAllocGeomSections".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1914 proc SrvXkbAllocGeomOverlays*(section: PXkbSectionPtr, num_needed: int16): Status{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1915 libx11c, importc: "XkbAllocGeomOverlays".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1916 proc SrvXkbAllocGeomOverlayRows*(overlay: PXkbOverlayPtr, num_needed: int16): Status{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1917 libx11c, importc: "XkbAllocGeomOverlayRows".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1918 proc SrvXkbAllocGeomOverlayKeys*(row: PXkbOverlayRowPtr, num_needed: int16): Status{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1919 libx11c, importc: "XkbAllocGeomOverlayKeys".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1920 proc SrvXkbAllocGeomShapes*(geom: PXkbGeometryPtr, nShapes: int16): Status{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1921 libx11c, importc: "XkbAllocGeomShapes".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1922 proc SrvXkbAllocGeometry*(xkb: PXkbDescPtr, sizes: PXkbGeometrySizesPtr): Status{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1923 libx11c, importc: "XkbAllocGeometry".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1924 proc SrvXkbFreeGeomKeyAliases*(geom: PXkbGeometryPtr, first: int16,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1925 count: int16, freeAll: bool){.libx11c, importc: "XkbFreeGeomKeyAliases".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1926 proc SrvXkbFreeGeomColors*(geom: PXkbGeometryPtr, first: int16, count: int16,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1927 freeAll: bool){.libx11c,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1928 importc: "XkbFreeGeomColors".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1929 proc SrvXkbFreeGeomDoodads*(doodads: PXkbDoodadPtr, nDoodads: int16,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1930 freeAll: bool){.libx11c,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1931 importc: "XkbFreeGeomDoodads".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1932 proc SrvXkbFreeGeomProperties*(geom: PXkbGeometryPtr, first: int16,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1933 count: int16, freeAll: bool){.libx11c, importc: "XkbFreeGeomProperties".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1934 proc SrvXkbFreeGeomOverlayKeys*(row: PXkbOverlayRowPtr, first: int16,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1935 count: int16, freeAll: bool){.libx11c, importc: "XkbFreeGeomOverlayKeys".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1936 proc SrvXkbFreeGeomOverlayRows*(overlay: PXkbOverlayPtr, first: int16,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1937 count: int16, freeAll: bool){.libx11c, importc: "XkbFreeGeomOverlayRows".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1938 proc SrvXkbFreeGeomOverlays*(section: PXkbSectionPtr, first: int16,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1939 count: int16, freeAll: bool){.libx11c, importc: "XkbFreeGeomOverlays".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1940 proc SrvXkbFreeGeomKeys*(row: PXkbRowPtr, first: int16, count: int16,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1941 freeAll: bool){.libx11c,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1942 importc: "XkbFreeGeomKeys".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1943 proc SrvXkbFreeGeomRows*(section: PXkbSectionPtr, first: int16, count: int16,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1944 freeAll: bool){.libx11c,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1945 importc: "XkbFreeGeomRows".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1946 proc SrvXkbFreeGeomSections*(geom: PXkbGeometryPtr, first: int16,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1947 count: int16, freeAll: bool){.libx11c, importc: "XkbFreeGeomSections".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1948 proc SrvXkbFreeGeomPoints*(outline: PXkbOutlinePtr, first: int16,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1949 count: int16, freeAll: bool){.libx11c, importc: "XkbFreeGeomPoints".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1950 proc SrvXkbFreeGeomOutlines*(shape: PXkbShapePtr, first: int16, count: int16,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1951 freeAll: bool){.libx11c,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1952 importc: "XkbFreeGeomOutlines".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1953 proc SrvXkbFreeGeomShapes*(geom: PXkbGeometryPtr, first: int16, count: int16,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1954 freeAll: bool){.libx11c,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1955 importc: "XkbFreeGeomShapes".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1956 proc SrvXkbFreeGeometry*(geom: PXkbGeometryPtr, which: int16, freeMap: bool){.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1957 libx11c, importc: "XkbFreeGeometry".}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1958 # implementation
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1959
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1960 import #************************************ xkb ************************************
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1961 xi
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1962
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1963 proc XkbLegalXILedClass(c: int): bool =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1964 ##define XkbLegalXILedClass(c) (((c)==KbdFeedbackClass)||((c)==LedFeedbackClass)||
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1965 # ((c)==XkbDfltXIClass)||((c)==XkbAllXIClasses))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1966 result = (c == KbdFeedbackClass) or (c == LedFeedbackClass) or
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1967 (c == XkbDfltXIClass) or (c == XkbAllXIClasses)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1968
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1969 proc XkbLegalXIBellClass(c: int): bool =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1970 ##define XkbLegalXIBellClass(c) (((c)==KbdFeedbackClass)||((c)==BellFeedbackClass)||
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1971 # ((c)==XkbDfltXIClass)||((c)==XkbAllXIClasses))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1972 result = (c == KbdFeedbackClass) or (c == BellFeedbackClass) or
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1973 (c == XkbDfltXIClass) or (c == XkbAllXIClasses)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1974
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1975 proc XkbExplicitXIDevice(c: int): bool =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1976 ##define XkbExplicitXIDevice(c) (((c)&(~0xff))==0)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1977 result = (c and (not 0x000000FF)) == 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1978
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1979 proc XkbExplicitXIClass(c: int): bool =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1980 ##define XkbExplicitXIClass(c) (((c)&(~0xff))==0)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1981 result = (c and (not 0x000000FF)) == 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1982
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1983 proc XkbExplicitXIId(c: int): bool =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1984 ##define XkbExplicitXIId(c) (((c)&(~0xff))==0)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1985 result = (c and (not 0x000000FF)) == 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1986
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1987 proc XkbSingleXIClass(c: int): bool =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1988 ##define XkbSingleXIClass(c) ((((c)&(~0xff))==0)||((c)==XkbDfltXIClass))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1989 result = ((c and (not 0x000000FF)) == 0) or (c == XkbDfltXIClass)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1990
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1991 proc XkbSingleXIId(c: int): bool =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1992 ##define XkbSingleXIId(c) ((((c)&(~0xff))==0)||((c)==XkbDfltXIId))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1993 result = ((c and (not 0x000000FF)) == 0) or (c == XkbDfltXIId)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1994
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1995 proc XkbBuildCoreState(m, g: int): int =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1996 ##define XkbBuildCoreState(m,g) ((((g)&0x3)<<13)|((m)&0xff))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1997 result = ((g and 0x00000003) shl 13) or (m and 0x000000FF)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1998
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1999 proc XkbGroupForCoreState(s: int): int =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2000 ##define XkbGroupForCoreState(s) (((s)>>13)&0x3)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2001 result = (s shr 13) and 0x00000003
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2002
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2003 proc XkbIsLegalGroup(g: int): bool =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2004 ##define XkbIsLegalGroup(g) (((g)>=0)&&((g)<XkbNumKbdGroups))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2005 result = (g >= 0) and (g < XkbNumKbdGroups)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2006
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2007 proc XkbSA_ValOp(a: int): int =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2008 ##define XkbSA_ValOp(a) ((a)&XkbSA_ValOpMask)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2009 result = a and XkbSA_ValOpMask
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2010
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2011 proc XkbSA_ValScale(a: int): int =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2012 ##define XkbSA_ValScale(a) ((a)&XkbSA_ValScaleMask)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2013 result = a and XkbSA_ValScaleMask
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2014
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2015 proc XkbIsModAction(a: PXkbAnyAction): bool =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2016 ##define XkbIsModAction(a) (((a)->type>=Xkb_SASetMods)&&((a)->type<=XkbSA_LockMods))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2017 result = (a.theType) >= XkbSA_SetMods and (a.theType) <= XkbSA_LockMods
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2018
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2019 proc XkbIsGroupAction(a: PXkbAnyAction): bool =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2020 ##define XkbIsGroupAction(a) (((a)->type>=XkbSA_SetGroup)&&((a)->type<=XkbSA_LockGroup))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2021 result = (a.theType >= XkbSA_SetGroup) or (a.theType <= XkbSA_LockGroup)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2022
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2023 proc XkbIsPtrAction(a: PXkbAnyAction): bool =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2024 ##define XkbIsPtrAction(a) (((a)->type>=XkbSA_MovePtr)&&((a)->type<=XkbSA_SetPtrDflt))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2025 result = (a.theType >= XkbSA_MovePtr) and
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2026 (a.theType <= XkbSA_SetPtrDflt)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2027
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2028 proc XkbIsLegalKeycode(k: int): bool =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2029 ##define XkbIsLegalKeycode(k) (((k)>=XkbMinLegalKeyCode)&&((k)<=XkbMaxLegalKeyCode))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2030 result = (k >= XkbMinLegalKeyCode) and (k <= XkbMaxLegalKeyCode)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2031
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2032 proc XkbShiftLevel(n: int8): int8 =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2033 ##define XkbShiftLevel(n) ((n)-1)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2034 result = n - 1'i8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2035
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2036 proc XkbShiftLevelMask(n: int8): int8 =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2037 ##define XkbShiftLevelMask(n) (1<<((n)-1))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2038 result = 1'i8 shl (n - 1'i8)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2039
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2040 proc XkbcharToInt(v: int8): int16 =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2041 ##define XkbcharToInt(v) ((v)&0x80?(int)((v)|(~0xff)):(int)((v)&0x7f))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2042 if ((v and 0x80'i8) != 0'i8): result = v or (not 0xFF'i16)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2043 else: result = int16(v and 0x7F'i8)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2044
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2045 proc XkbIntTo2chars(i: int16, h, L: var int8) =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2046 ##define XkbIntTo2chars(i,h,l) (((h)=((i>>8)&0xff)),((l)=((i)&0xff)))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2047 h = int8((i shr 8'i16) and 0x00FF'i16)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2048 L = int8(i and 0xFF'i16)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2049
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2050 proc Xkb2charsToInt(h, L: int8): int16 =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2051 when defined(cpu64):
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2052 ##define Xkb2charsToInt(h,l) ((h)&0x80?(int)(((h)<<8)|(l)|(~0xffff)): (int)(((h)<<8)|(l)&0x7fff))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2053 if (h and 0x80'i8) != 0'i8:
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2054 result = int16((h shl 8) or L or not 0x0000FFFF)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2055 else:
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2056 result = int16((h shl 8) or L and 0x00007FFF)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2057 else:
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2058 ##define Xkb2charsToInt(h,l) ((short)(((h)<<8)|(l)))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2059 result = int16(h shl 8 or L)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2060
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2061 proc XkbModLocks(s: PXkbStatePtr): int8 =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2062 ##define XkbModLocks(s) ((s)->locked_mods)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2063 result = s.locked_mods
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2064
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2065 proc XkbStateMods(s: PXkbStatePtr): int16 =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2066 ##define XkbStateMods(s) ((s)->base_mods|(s)->latched_mods|XkbModLocks(s))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2067 result = s.base_mods or s.latched_mods or XkbModLocks(s)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2068
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2069 proc XkbGroupLock(s: PXkbStatePtr): int8 =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2070 ##define XkbGroupLock(s) ((s)->locked_group)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2071 result = s.locked_group
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2072
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2073 proc XkbStateGroup(s: PXkbStatePtr): int16 =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2074 ##define XkbStateGroup(s) ((s)->base_group+(s)->latched_group+XkbGroupLock(s))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2075 result = s.base_group + (s.latched_group) + XkbGroupLock(s)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2076
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2077 proc XkbStateFieldFromRec(s: PXkbStatePtr): int =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2078 ##define XkbStateFieldFromRec(s) XkbBuildCoreState((s)->lookup_mods,(s)->group)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2079 result = XkbBuildCoreState(s.lookup_mods, s.group)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2080
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2081 proc XkbGrabStateFromRec(s: PXkbStatePtr): int =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2082 ##define XkbGrabStateFromRec(s) XkbBuildCoreState((s)->grab_mods,(s)->group)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2083 result = XkbBuildCoreState(s.grab_mods, s.group)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2084
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2085 proc XkbNumGroups(g: int16): int16 =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2086 ##define XkbNumGroups(g) ((g)&0x0f)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2087 result = g and 0x0000000F'i16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2088
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2089 proc XkbOutOfRangeGroupInfo(g: int16): int16 =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2090 ##define XkbOutOfRangeGroupInfo(g) ((g)&0xf0)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2091 result = g and 0x000000F0'i16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2092
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2093 proc XkbOutOfRangeGroupAction(g: int16): int16 =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2094 ##define XkbOutOfRangeGroupAction(g) ((g)&0xc0)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2095 result = g and 0x000000C0'i16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2096
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2097 proc XkbOutOfRangeGroupNumber(g: int16): int16 =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2098 ##define XkbOutOfRangeGroupNumber(g) (((g)&0x30)>>4)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2099 result = (g and 0x00000030'i16) shr 4'i16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2100
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2101 proc XkbSetGroupInfo(g, w, n: int16): int16 =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2102 ##define XkbSetGroupInfo(g,w,n) (((w)&0xc0)|(((n)&3)<<4)|((g)&0x0f))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2103 result = (w and 0x000000C0'i16) or
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2104 ((n and 3'i16) shl 4'i16) or (g and 0x0000000F'i16)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2105
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2106 proc XkbSetNumGroups(g, n: int16): int16 =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2107 ##define XkbSetNumGroups(g,n) (((g)&0xf0)|((n)&0x0f))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2108 result = (g and 0x000000F0'i16) or (n and 0x0000000F'i16)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2109
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2110 proc XkbModActionVMods(a: PXkbModAction): int16 =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2111 ##define XkbModActionVMods(a) ((short)(((a)->vmods1<<8)|((a)->vmods2)))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2112 result = int16((a.vmods1 shl 8) or a.vmods2)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2113
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2114 proc XkbSetModActionVMods(a: PXkbModAction, v: int8) =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2115 ##define XkbSetModActionVMods(a,v) (((a)->vmods1=(((v)>>8)&0xff)),(a)->vmods2=((v)&0xff))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2116 a.vmods1 = int8((v shr 8) and 0x000000FF)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2117 a.vmods2 = int8(v and 0x000000FF)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2118
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2119 proc XkbSAGroup(a: PXkbGroupAction): int8 =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2120 ##define XkbSAGroup(a) (XkbcharToInt((a)->group_XXX))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2121 result = int8(XkbcharToInt(a.group_XXX))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2122
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2123 proc XkbSASetGroupProc(a: PXkbGroupAction, g: int8) =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2124 ##define XkbSASetGroup(a,g) ((a)->group_XXX=(g))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2125 a.group_XXX = g
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2126
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2127 proc XkbPtrActionX(a: PXkbPtrAction): int16 =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2128 ##define XkbPtrActionX(a) (Xkb2charsToInt((a)->high_XXX,(a)->low_XXX))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2129 result = int16(Xkb2charsToInt(a.high_XXX, a.low_XXX))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2130
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2131 proc XkbPtrActionY(a: PXkbPtrAction): int16 =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2132 ##define XkbPtrActionY(a) (Xkb2charsToInt((a)->high_YYY,(a)->low_YYY))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2133 result = int16(Xkb2charsToInt(a.high_YYY, a.low_YYY))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2134
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2135 proc XkbSetPtrActionX(a: PXkbPtrAction, x: int8) =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2136 ##define XkbSetPtrActionX(a,x) (XkbIntTo2chars(x,(a)->high_XXX,(a)->low_XXX))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2137 XkbIntTo2chars(x, a.high_XXX, a.low_XXX)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2138
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2139 proc XkbSetPtrActionY(a: PXkbPtrAction, y: int8) =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2140 ##define XkbSetPtrActionY(a,y) (XkbIntTo2chars(y,(a)->high_YYY,(a)->low_YYY))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2141 XkbIntTo2chars(y, a.high_YYY, a.low_YYY)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2142
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2143 proc XkbSAPtrDfltValue(a: PXkbPtrDfltAction): int8 =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2144 ##define XkbSAPtrDfltValue(a) (XkbcharToInt((a)->valueXXX))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2145 result = int8(XkbcharToInt(a.valueXXX))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2146
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2147 proc XkbSASetPtrDfltValue(a: PXkbPtrDfltAction, c: pointer) =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2148 ##define XkbSASetPtrDfltValue(a,c) ((a)->valueXXX= ((c)&0xff))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2149 a.valueXXX = int8(cast[int](c))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2150
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2151 proc XkbSAScreen(a: PXkbSwitchScreenAction): int8 =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2152 ##define XkbSAScreen(a) (XkbcharToInt((a)->screenXXX))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2153 result = int8(XkbcharToInt(a.screenXXX))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2154
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2155 proc XkbSASetScreen(a: PXkbSwitchScreenAction, s: pointer) =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2156 ##define XkbSASetScreen(a,s) ((a)->screenXXX= ((s)&0xff))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2157 a.screenXXX = int8(cast[int](s))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2158
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2159 proc XkbActionSetCtrls(a: PXkbCtrlsAction, c: int8) =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2160 ##define XkbActionSetCtrls(a,c) (((a)->ctrls3=(((c)>>24)&0xff)),((a)->ctrls2=(((c)>>16)&0xff)),
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2161 # ((a)->ctrls1=(((c)>>8)&0xff)),((a)->ctrls0=((c)&0xff)))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2162 a.ctrls3 = int8((c shr 24) and 0x000000FF)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2163 a.ctrls2 = int8((c shr 16) and 0x000000FF)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2164 a.ctrls1 = int8((c shr 8) and 0x000000FF)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2165 a.ctrls0 = int8(c and 0x000000FF)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2166
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2167 proc XkbActionCtrls(a: PXkbCtrlsAction): int16 =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2168 ##define XkbActionCtrls(a) ((((unsigned int)(a)->ctrls3)<<24)|(((unsigned int)(a)->ctrls2)<<16)|
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2169 # (((unsigned int)(a)->ctrls1)<<8)|((unsigned int)((a)->ctrls0)))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2170 result = int16((a.ctrls3 shl 24) or (a.ctrls2 shl 16) or
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2171 (a.ctrls1 shl 8) or a.ctrls0)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2172
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2173 proc XkbSARedirectVMods(a: PXkbRedirectKeyAction): int16 =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2174 ##define XkbSARedirectVMods(a) ((((unsigned int)(a)->vmods1)<<8)|((unsigned int)(a)->vmods0))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2175 result = int16((a.vmods1 shl 8) or a.vmods0)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2176
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2177 proc XkbSARedirectSetVMods(a: PXkbRedirectKeyAction, m: int8) =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2178 ##define XkbSARedirectSetVMods(a,m) (((a)->vmods_mask1=(((m)>>8)&0xff)),((a)->vmods_mask0=((m)&0xff)))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2179 a.vmods_mask1 = int8((m shr 8) and 0x000000FF)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2180 a.vmods_mask0 = int8(m or 0x000000FF)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2181
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2182 proc XkbSARedirectVModsMask(a: PXkbRedirectKeyAction): int16 =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2183 ##define XkbSARedirectVModsMask(a) ((((unsigned int)(a)->vmods_mask1)<<8)|
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2184 # ((unsigned int)(a)->vmods_mask0))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2185 result = int16((a.vmods_mask1 shl 8) or a.vmods_mask0)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2186
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2187 proc XkbSARedirectSetVModsMask(a: PXkbRedirectKeyAction, m: int8) =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2188 ##define XkbSARedirectSetVModsMask(a,m) (((a)->vmods_mask1=(((m)>>8)&0xff)),((a)->vmods_mask0=((m)&0xff)))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2189 a.vmods_mask1 = int8(m shr 8 and 0x000000FF)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2190 a.vmods_mask0 = int8(m and 0x000000FF)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2191
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2192 proc XkbAX_AnyFeedback(c: PXkbControlsPtr): int16 =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2193 ##define XkbAX_AnyFeedback(c) ((c)->enabled_ctrls&XkbAccessXFeedbackMask)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2194 result = int16(c.enabled_ctrls and XkbAccessXFeedbackMask)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2195
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2196 proc XkbAX_NeedOption(c: PXkbControlsPtr, w: int16): int16 =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2197 ##define XkbAX_NeedOption(c,w) ((c)->ax_options&(w))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2198 result = int16(c.ax_options and w)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2199
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2200 proc XkbAX_NeedFeedback(c: PXkbControlsPtr, w: int16): bool =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2201 ##define XkbAX_NeedFeedback(c,w) (XkbAX_AnyFeedback(c)&&XkbAX_NeedOption(c,w))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2202 result = (XkbAX_AnyFeedback(c) > 0'i16) and (XkbAX_NeedOption(c, w) > 0'i16)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2203
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2204 proc XkbSMKeyActionsPtr(m: PXkbServerMapPtr, k: int16): PXkbAction =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2205 ##define XkbSMKeyActionsPtr(m,k) (&(m)->acts[(m)->key_acts[k]])
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2206 result = addr(m.acts[m.key_acts[k]])
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2207
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2208 proc XkbCMKeyGroupInfo(m: PXkbClientMapPtr, k: int16): int8 =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2209 ##define XkbCMKeyGroupInfo(m,k) ((m)->key_sym_map[k].group_info)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2210 result = m.key_sym_map[k].group_info
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2211
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2212 proc XkbCMKeyNumGroups(m: PXkbClientMapPtr, k: int16): int8 =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2213 ##define XkbCMKeyNumGroups(m,k) (XkbNumGroups((m)->key_sym_map[k].group_info))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2214 result = int8(XkbNumGroups(m.key_sym_map[k].group_info))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2215
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2216 proc XkbCMKeyGroupWidth(m: PXkbClientMapPtr, k: int16, g: int8): int8 =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2217 ##define XkbCMKeyGroupWidth(m,k,g) (XkbCMKeyType(m,k,g)->num_levels)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2218 result = XkbCMKeyType(m, k, g).num_levels
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2219
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2220 proc XkbCMKeyGroupsWidth(m: PXkbClientMapPtr, k: int16): int8 =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2221 ##define XkbCMKeyGroupsWidth(m,k) ((m)->key_sym_map[k].width)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2222 result = m.key_sym_map[k].width
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2223
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2224 proc XkbCMKeyTypeIndex(m: PXkbClientMapPtr, k: int16, g: int8): int8 =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2225 ##define XkbCMKeyTypeIndex(m,k,g) ((m)->key_sym_map[k].kt_index[g&0x3])
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2226 result = m.key_sym_map[k].kt_index[g and 0x00000003]
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2227
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2228 proc XkbCMKeyType(m: PXkbClientMapPtr, k: int16, g: int8): PXkbKeyTypePtr =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2229 ##define XkbCMKeyType(m,k,g) (&(m)->types[XkbCMKeyTypeIndex(m,k,g)])
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2230 result = addr(m.types[XkbCMKeyTypeIndex(m, k, g)])
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2231
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2232 proc XkbCMKeyNumSyms(m: PXkbClientMapPtr, k: int16): int16 =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2233 ##define XkbCMKeyNumSyms(m,k) (XkbCMKeyGroupsWidth(m,k)*XkbCMKeyNumGroups(m,k))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2234 result = int16(XkbCMKeyGroupsWidth(m, k) or XkbCMKeyNumGroups(m, k))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2235
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2236 proc XkbCMKeySymsOffset(m: PXkbClientMapPtr, k: int16): int8 =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2237 ##define XkbCMKeySymsOffset(m,k) ((m)->key_sym_map[k].offset)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2238 result = m.key_sym_map[k].offset
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2239
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2240 proc XkbCMKeySymsPtr*(m: PXkbClientMapPtr, k: int16): PKeySym =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2241 ##define XkbCMKeySymsPtr(m,k) (&(m)->syms[XkbCMKeySymsOffset(m,k)])
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2242 result = addr(m.syms[XkbCMKeySymsOffset(m, k)])
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2243
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2244 proc XkbIM_IsAuto(i: PXkbIndicatorMapPtr): bool =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2245 ##define XkbIM_IsAuto(i) ((((i)->flags&XkbIM_NoAutomatic)==0)&&(((i)->which_groups&&(i)->groups)||
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2246 # ((i)->which_mods&&(i)->mods.mask)|| ((i)->ctrls)))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2247 result = ((i.flags and XkbIM_NoAutomatic) == 0) and
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2248 (((i.which_groups > 0'i8) and (i.groups > 0'i8)) or
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2249 ((i.which_mods > 0'i8) and (i.mods.mask > 0'i8)) or (i.ctrls > 0'i8))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2250
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2251 proc XkbIM_InUse(i: PXkbIndicatorMapPtr): bool =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2252 ##define XkbIM_InUse(i) (((i)->flags)||((i)->which_groups)||((i)->which_mods)||((i)->ctrls))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2253 result = (i.flags > 0'i8) or (i.which_groups > 0'i8) or (i.which_mods > 0'i8) or
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2254 (i.ctrls > 0'i8)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2255
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2256 proc XkbKeyKeyTypeIndex(d: PXkbDescPtr, k: int16, g: int8): int8 =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2257 ##define XkbKeyKeyTypeIndex(d,k,g) (XkbCMKeyTypeIndex((d)->map,k,g))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2258 result = XkbCMKeyTypeIndex(d.map, k, g)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2259
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2260 proc XkbKeyKeyType(d: PXkbDescPtr, k: int16, g: int8): PXkbKeyTypePtr =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2261 ##define XkbKeyKeyType(d,k,g) (XkbCMKeyType((d)->map,k,g))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2262 result = XkbCMKeyType(d.map, k, g)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2263
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2264 proc XkbKeyGroupWidth(d: PXkbDescPtr, k: int16, g: int8): int8 =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2265 ##define XkbKeyGroupWidth(d,k,g) (XkbCMKeyGroupWidth((d)->map,k,g))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2266 result = XkbCMKeyGroupWidth(d.map, k, g)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2267
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2268 proc XkbKeyGroupsWidth(d: PXkbDescPtr, k: int16): int8 =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2269 ##define XkbKeyGroupsWidth(d,k) (XkbCMKeyGroupsWidth((d)->map,k))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2270 result = XkbCMKeyGroupsWidth(d.map, k)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2271
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2272 proc XkbKeyGroupInfo(d: PXkbDescPtr, k: int16): int8 =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2273 ##define XkbKeyGroupInfo(d,k) (XkbCMKeyGroupInfo((d)->map,(k)))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2274 result = XkbCMKeyGroupInfo(d.map, k)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2275
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2276 proc XkbKeyNumGroups(d: PXkbDescPtr, k: int16): int8 =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2277 ##define XkbKeyNumGroups(d,k) (XkbCMKeyNumGroups((d)->map,(k)))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2278 result = XkbCMKeyNumGroups(d.map, k)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2279
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2280 proc XkbKeyNumSyms(d: PXkbDescPtr, k: int16): int16 =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2281 ##define XkbKeyNumSyms(d,k) (XkbCMKeyNumSyms((d)->map,(k)))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2282 result = XkbCMKeyNumSyms(d.map, k)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2283
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2284 proc XkbKeySymsPtr*(d: PXkbDescPtr, k: int16): PKeySym =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2285 ##define XkbKeySymsPtr(d,k) (XkbCMKeySymsPtr((d)->map,(k)))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2286 result = XkbCMKeySymsPtr(d.map, k)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2287
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2288 proc XkbKeySym(d: PXkbDescPtr, k: int16, n: int16): KeySym =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2289 ##define XkbKeySym(d,k,n) (XkbKeySymsPtr(d,k)[n])
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2290 result = cast[ptr array[0..0xffff, KeySym]](XkbKeySymsPtr(d, k))[n] # XXX: this seems strange!
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2291
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2292 proc XkbKeySymEntry(d: PXkbDescPtr, k: int16, sl: int16, g: int8): KeySym =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2293 ##define XkbKeySymEntry(d,k,sl,g) (XkbKeySym(d,k,((XkbKeyGroupsWidth(d,k)*(g))+(sl))))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2294 result = XkbKeySym(d, k, int16(XkbKeyGroupsWidth(d, k) * g + sl))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2295
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2296 proc XkbKeyAction(d: PXkbDescPtr, k: int16, n: int16): PXkbAction =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2297 ##define XkbKeyAction(d,k,n) (XkbKeyHasActions(d,k)?&XkbKeyActionsPtr(d,k)[n]:NULL)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2298 #if (XkbKeyHasActions(d, k)):
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2299 # result = XkbKeyActionsPtr(d, k)[n] #Buggy !!!
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2300 assert(false)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2301 result = nil
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2302
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2303 proc XkbKeyActionEntry(d: PXkbDescPtr, k: int16, sl: int16, g: int8): int8 =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2304 ##define XkbKeyActionEntry(d,k,sl,g) (XkbKeyHasActions(d,k) ?
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2305 # XkbKeyAction(d, k, ((XkbKeyGroupsWidth(d, k) * (g))+(sl))):NULL)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2306 if XkbKeyHasActions(d, k):
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2307 result = XkbKeyGroupsWidth(d, k) *% g +% int8(sl)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2308 else:
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2309 result = 0'i8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2310
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2311 proc XkbKeyHasActions(d: PXkbDescPtr, k: int16): bool =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2312 ##define XkbKeyHasActions(d,k) ((d)->server->key_acts[k]!=0)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2313 result = d.server.key_acts[k] != 0'i16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2314
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2315 proc XkbKeyNumActions(d: PXkbDescPtr, k: int16): int16 =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2316 ##define XkbKeyNumActions(d,k) (XkbKeyHasActions(d,k)?XkbKeyNumSyms(d,k):1)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2317 if (XkbKeyHasActions(d, k)): result = XkbKeyNumSyms(d, k)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2318 else: result = 1'i16
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2319
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2320 proc XkbKeyActionsPtr(d: PXkbDescPtr, k: int16): PXkbAction =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2321 ##define XkbKeyActionsPtr(d,k) (XkbSMKeyActionsPtr((d)->server,k))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2322 result = XkbSMKeyActionsPtr(d.server, k)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2323
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2324 proc XkbKeycodeInRange(d: PXkbDescPtr, k: int16): bool =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2325 ##define XkbKeycodeInRange(d,k) (((k)>=(d)->min_key_code)&& ((k)<=(d)->max_key_code))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2326 result = (char(int8(k)) >= d.min_key_code) and (char(int8(k)) <= d.max_key_code)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2327
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2328 proc XkbNumKeys(d: PXkbDescPtr): int8 =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2329 ##define XkbNumKeys(d) ((d)->max_key_code-(d)->min_key_code+1)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2330 result = int8(ord(d.max_key_code) - ord(d.min_key_code) + 1)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2331
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2332 proc XkbXI_DevHasBtnActs(d: PXkbDeviceInfoPtr): bool =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2333 ##define XkbXI_DevHasBtnActs(d) (((d)->num_btns>0)&&((d)->btn_acts!=NULL))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2334 result = (d.num_btns > 0'i16) and (not (d.btn_acts == nil))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2335
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2336 proc XkbXI_LegalDevBtn(d: PXkbDeviceInfoPtr, b: int16): bool =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2337 ##define XkbXI_LegalDevBtn(d,b) (XkbXI_DevHasBtnActs(d)&&((b)<(d)->num_btns))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2338 result = XkbXI_DevHasBtnActs(d) and (b <% d.num_btns)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2339
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2340 proc XkbXI_DevHasLeds(d: PXkbDeviceInfoPtr): bool =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2341 ##define XkbXI_DevHasLeds(d) (((d)->num_leds>0)&&((d)->leds!=NULL))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2342 result = (d.num_leds > 0'i16) and (not (d.leds == nil))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2343
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2344 proc XkbBoundsWidth(b: PXkbBoundsPtr): int16 =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2345 ##define XkbBoundsWidth(b) (((b)->x2)-((b)->x1))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2346 result = (b.x2) - b.x1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2347
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2348 proc XkbBoundsHeight(b: PXkbBoundsPtr): int16 =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2349 ##define XkbBoundsHeight(b) (((b)->y2)-((b)->y1))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2350 result = (b.y2) - b.y1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2351
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2352 proc XkbOutlineIndex(s: PXkbShapePtr, o: PXkbOutlinePtr): int32 =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2353 ##define XkbOutlineIndex(s,o) ((int)((o)-&(s)->outlines[0]))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2354 result = int32((cast[int](o) - cast[int](addr(s.outlines[0]))) div sizeof(PXkbOutlinePtr))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2355
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2356 proc XkbShapeDoodadColor(g: PXkbGeometryPtr, d: PXkbShapeDoodadPtr): PXkbColorPtr =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2357 ##define XkbShapeDoodadColor(g,d) (&(g)->colors[(d)->color_ndx])
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2358 result = addr((g.colors[d.color_ndx]))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2359
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2360 proc XkbShapeDoodadShape(g: PXkbGeometryPtr, d: PXkbShapeDoodadPtr): PXkbShapePtr =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2361 ##define XkbShapeDoodadShape(g,d) (&(g)->shapes[(d)->shape_ndx])
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2362 result = addr(g.shapes[d.shape_ndx])
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2363
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2364 proc XkbSetShapeDoodadColor(g: PXkbGeometryPtr, d: PXkbShapeDoodadPtr,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2365 c: PXkbColorPtr) =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2366 ##define XkbSetShapeDoodadColor(g,d,c) ((d)->color_ndx= (c)-&(g)->colors[0])
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2367 d.color_ndx = int16((cast[int](c) - cast[int](addr(g.colors[0]))) div sizeof(XkbColorRec))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2368
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2369 proc XkbSetShapeDoodadShape(g: PXkbGeometryPtr, d: PXkbShapeDoodadPtr,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2370 s: PXkbShapePtr) =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2371 ##define XkbSetShapeDoodadShape(g,d,s) ((d)->shape_ndx= (s)-&(g)->shapes[0])
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2372 d.shape_ndx = int16((cast[int](s) - cast[int](addr(g.shapes[0]))) div sizeof(XkbShapeRec))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2373
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2374 proc XkbTextDoodadColor(g: PXkbGeometryPtr, d: PXkbTextDoodadPtr): PXkbColorPtr =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2375 ##define XkbTextDoodadColor(g,d) (&(g)->colors[(d)->color_ndx])
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2376 result = addr(g.colors[d.color_ndx])
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2377
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2378 proc XkbSetTextDoodadColor(g: PXkbGeometryPtr, d: PXkbTextDoodadPtr,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2379 c: PXkbColorPtr) =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2380 ##define XkbSetTextDoodadColor(g,d,c) ((d)->color_ndx= (c)-&(g)->colors[0])
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2381 d.color_ndx = int16((cast[int](c) - cast[int](addr(g.colors[0]))) div sizeof(XkbColorRec))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2382
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2383 proc XkbIndicatorDoodadShape(g: PXkbGeometryPtr, d: PXkbIndicatorDoodadPtr): PXkbShapeDoodadPtr =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2384 ##define XkbIndicatorDoodadShape(g,d) (&(g)->shapes[(d)->shape_ndx])
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2385 result = cast[PXkbShapeDoodadPtr](addr(g.shapes[d.shape_ndx]))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2386
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2387 proc XkbIndicatorDoodadOnColor(g: PXkbGeometryPtr, d: PXkbIndicatorDoodadPtr): PXkbColorPtr =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2388 ##define XkbIndicatorDoodadOnColor(g,d) (&(g)->colors[(d)->on_color_ndx])
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2389 result = addr(g.colors[d.on_color_ndx])
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2390
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2391 proc XkbIndicatorDoodadOffColor(g: PXkbGeometryPtr, d: PXkbIndicatorDoodadPtr): PXkbColorPtr =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2392 ##define XkbIndicatorDoodadOffColor(g,d) (&(g)->colors[(d)->off_color_ndx])
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2393 result = addr(g.colors[d.off_color_ndx])
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2394
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2395 proc XkbSetIndicatorDoodadOnColor(g: PXkbGeometryPtr, d: PXkbIndicatorDoodadPtr,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2396 c: PXkbColorPtr) =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2397 ##define XkbSetIndicatorDoodadOnColor(g,d,c) ((d)->on_color_ndx= (c)-&(g)->colors[0])
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2398 d.on_color_ndx = int16((cast[int](c) - cast[int](addr(g.colors[0]))) div sizeof(XkbColorRec))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2399
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2400 proc XkbSetIndicatorDoodadOffColor(g: PXkbGeometryPtr,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2401 d: PXkbIndicatorDoodadPtr, c: PXkbColorPtr) =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2402 ##define XkbSetIndicatorDoodadOffColor(g,d,c) ((d)->off_color_ndx= (c)-&(g)->colors[0])
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2403 d.off_color_ndx = int16((cast[int](c) - cast[int](addr(g.colors[0]))) div sizeof(XkbColorRec))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2404
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2405 proc XkbSetIndicatorDoodadShape(g: PXkbGeometryPtr, d: PXkbIndicatorDoodadPtr,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2406 s: PXkbShapeDoodadPtr) =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2407 ##define XkbSetIndicatorDoodadShape(g,d,s) ((d)->shape_ndx= (s)-&(g)->shapes[0])
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2408 d.shape_ndx = int16((cast[int](s) - (cast[int](addr(g.shapes[0])))) div sizeof(XkbShapeRec))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2409
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2410 proc XkbLogoDoodadColor(g: PXkbGeometryPtr, d: PXkbLogoDoodadPtr): PXkbColorPtr =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2411 ##define XkbLogoDoodadColor(g,d) (&(g)->colors[(d)->color_ndx])
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2412 result = addr(g.colors[d.color_ndx])
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2413
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2414 proc XkbLogoDoodadShape(g: PXkbGeometryPtr, d: PXkbLogoDoodadPtr): PXkbShapeDoodadPtr =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2415 ##define XkbLogoDoodadShape(g,d) (&(g)->shapes[(d)->shape_ndx])
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2416 result = cast[PXkbShapeDoodadPtr](addr(g.shapes[d.shape_ndx]))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2417
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2418 proc XkbSetLogoDoodadColor(g: PXkbGeometryPtr, d: PXkbLogoDoodadPtr,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2419 c: PXkbColorPtr) =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2420 ##define XkbSetLogoDoodadColor(g,d,c) ((d)->color_ndx= (c)-&(g)->colors[0])
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2421 d.color_ndx = int16((cast[int](c) - cast[int](addr(g.colors[0]))) div sizeof(XkbColorRec))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2422
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2423 proc XkbSetLogoDoodadShape(g: PXkbGeometryPtr, d: PXkbLogoDoodadPtr,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2424 s: PXkbShapeDoodadPtr) =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2425 ##define XkbSetLogoDoodadShape(g,d,s) ((d)->shape_ndx= (s)-&(g)->shapes[0])
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2426 d.shape_ndx = int16((cast[int](s) - cast[int](addr(g.shapes[0]))) div sizeof(XkbShapeRec))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2427
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2428 proc XkbKeyShape(g: PXkbGeometryPtr, k: PXkbKeyPtr): PXkbShapeDoodadPtr =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2429 ##define XkbKeyShape(g,k) (&(g)->shapes[(k)->shape_ndx])
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2430 result = cast[PXkbShapeDoodadPtr](addr(g.shapes[k.shape_ndx]))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2431
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2432 proc XkbKeyColor(g: PXkbGeometryPtr, k: PXkbKeyPtr): PXkbColorPtr =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2433 ##define XkbKeyColor(g,k) (&(g)->colors[(k)->color_ndx])
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2434 result = addr(g.colors[k.color_ndx])
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2435
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2436 proc XkbSetKeyShape(g: PXkbGeometryPtr, k: PXkbKeyPtr, s: PXkbShapeDoodadPtr) =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2437 ##define XkbSetKeyShape(g,k,s) ((k)->shape_ndx= (s)-&(g)->shapes[0])
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2438 k.shape_ndx = int8((cast[int](s) - cast[int](addr(g.shapes[0]))) div sizeof(XkbShapeRec))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2439
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2440 proc XkbSetKeyColor(g: PXkbGeometryPtr, k: PXkbKeyPtr, c: PXkbColorPtr) =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2441 ##define XkbSetKeyColor(g,k,c) ((k)->color_ndx= (c)-&(g)->colors[0])
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2442 k.color_ndx = int8((cast[int](c) - cast[int](addr(g.colors[0]))) div sizeof(XkbColorRec))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2443
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2444 proc XkbGeomColorIndex(g: PXkbGeometryPtr, c: PXkbColorPtr): int32 =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2445 ##define XkbGeomColorIndex(g,c) ((int)((c)-&(g)->colors[0]))
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2446 result = int16((cast[int](c) - (cast[int](addr(g.colors[0])))) div sizeof(XkbColorRec))