annotate semiconginev2/thirdparty/x11/xutil.nim @ 1224:a3fa15c25026 compiletime-tests

did: cleanup, add audio, change platform-dependent structure
author sam <sam@basx.dev>
date Wed, 17 Jul 2024 22:02:11 +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 import
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
3 x, xlib, keysym
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
4
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
5 #const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
6 # libX11* = "libX11.so"
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 # Automatically converted by H2Pas 0.99.15 from xutil.h
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
10 # The following command line parameters were used:
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
11 # -p
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
12 # -T
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
13 # -S
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
14 # -d
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
15 # -c
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
16 # xutil.h
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
17 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
18
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
19 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
20 NoValue* = 0x00000000
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
21 XValue* = 0x00000001
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
22 YValue* = 0x00000002
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
23 WidthValue* = 0x00000004
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
24 HeightValue* = 0x00000008
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
25 AllValues* = 0x0000000F
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
26 XNegative* = 0x00000010
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
27 YNegative* = 0x00000020
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
28
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
29 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
30 CPoint*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
31 x*: cint
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
32 y*: cint
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
33
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
34 PXSizeHints* = ptr XSizeHints
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
35 XSizeHints*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
36 flags*: clong
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
37 x*, y*: cint
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
38 width*, height*: cint
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
39 min_width*, min_height*: cint
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
40 max_width*, max_height*: cint
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
41 width_inc*, height_inc*: cint
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
42 min_aspect*, max_aspect*: CPoint
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
43 base_width*, base_height*: cint
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
44 win_gravity*: cint
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
45
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
46 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
47 USPosition* = 1 shl 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
48 USSize* = 1 shl 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
49 PPosition* = 1 shl 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
50 PSize* = 1 shl 3
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
51 PMinSize* = 1 shl 4
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
52 PMaxSize* = 1 shl 5
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
53 PResizeInc* = 1 shl 6
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
54 PAspect* = 1 shl 7
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
55 PBaseSize* = 1 shl 8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
56 PWinGravity* = 1 shl 9
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
57 PAllHints* = PPosition or PSize or PMinSize or PMaxSize or PResizeInc or
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
58 PAspect
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 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
61 PXWMHints* = ptr XWMHints
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
62 XWMHints*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
63 flags*: clong
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
64 input*: XBool
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
65 initial_state*: cint
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
66 icon_pixmap*: Pixmap
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
67 icon_window*: Window
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
68 icon_x*, icon_y*: cint
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
69 icon_mask*: Pixmap
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
70 window_group*: XID
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
71
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
72
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
73 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
74 InputHint* = 1 shl 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
75 StateHint* = 1 shl 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
76 IconPixmapHint* = 1 shl 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
77 IconWindowHint* = 1 shl 3
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
78 IconPositionHint* = 1 shl 4
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
79 IconMaskHint* = 1 shl 5
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
80 WindowGroupHint* = 1 shl 6
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
81 AllHints* = InputHint or StateHint or IconPixmapHint or IconWindowHint or
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
82 IconPositionHint or IconMaskHint or WindowGroupHint
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
83 XUrgencyHint* = 1 shl 8
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
84 WithdrawnState* = 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
85 NormalState* = 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
86 IconicState* = 3
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
87 DontCareState* = 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
88 ZoomState* = 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
89 InactiveState* = 4
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
90
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
91 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
92 PXTextProperty* = ptr XTextProperty
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
93 XTextProperty*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
94 value*: Pcuchar
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
95 encoding*: Atom
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
96 format*: cint
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
97 nitems*: culong
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
98
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
99
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
100 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
101 XNoMemory* = - 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
102 XLocaleNotSupported* = - 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
103 XConverterNotFound* = - 3
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
104
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
105 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
106 PXICCEncodingStyle* = ptr XICCEncodingStyle
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
107 XICCEncodingStyle* = enum
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
108 XStringStyle, XCompoundTextStyle, XTextStyle, XStdICCTextStyle,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
109 XUTF8StringStyle
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
110
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
111 PPXIconSize* = ptr PXIconSize
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
112 PXIconSize* = ptr XIconSize
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
113 XIconSize*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
114 min_width*, min_height*: cint
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
115 max_width*, max_height*: cint
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
116 width_inc*, height_inc*: cint
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 PXClassHint* = ptr XClassHint
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
119 XClassHint*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
120 res_name*: cstring
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
121 res_class*: cstring
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
122
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
123
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
124 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
125 PXComposeStatus* = ptr XComposeStatus
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
126 XComposeStatus*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
127 compose_ptr*: XPointer
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
128 chars_matched*: cint
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
129
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
130
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
131 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
132 PXRegion* = ptr XRegion
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
133 XRegion*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
134
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
135 PRegion* = ptr Region
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
136 Region* = PXRegion
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
137
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
138 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
139 RectangleOut* = 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
140 RectangleIn* = 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
141 RectanglePart* = 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
142
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
143 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
144 PXVisualInfo* = ptr XVisualInfo
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
145 XVisualInfo*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
146 visual*: PVisual
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
147 visualid*: VisualID
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
148 screen*: cint
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
149 depth*: cint
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
150 class*: cint
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
151 red_mask*: culong
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
152 green_mask*: culong
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
153 blue_mask*: culong
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
154 colormap_size*: cint
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
155 bits_per_rgb*: cint
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 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
159 VisualNoMask* = 0x00000000
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
160 VisualIDMask* = 0x00000001
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
161 VisualScreenMask* = 0x00000002
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
162 VisualDepthMask* = 0x00000004
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
163 VisualClassMask* = 0x00000008
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
164 VisualRedMaskMask* = 0x00000010
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
165 VisualGreenMaskMask* = 0x00000020
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
166 VisualBlueMaskMask* = 0x00000040
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
167 VisualColormapSizeMask* = 0x00000080
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
168 VisualBitsPerRGBMask* = 0x00000100
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
169 VisualAllMask* = 0x000001FF
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
170
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
171 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
172 PPXStandardColormap* = ptr PXStandardColormap
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
173 PXStandardColormap* = ptr XStandardColormap
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
174 XStandardColormap*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
175 colormap*: Colormap
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
176 red_max*: culong
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
177 red_mult*: culong
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
178 green_max*: culong
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
179 green_mult*: culong
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
180 blue_max*: culong
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
181 blue_mult*: culong
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
182 base_pixel*: culong
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
183 visualid*: VisualID
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
184 killid*: XID
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
185
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
186
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
187 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
188 BitmapSuccess* = 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
189 BitmapOpenFailed* = 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
190 BitmapFileInvalid* = 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
191 BitmapNoMemory* = 3
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
192 XCSUCCESS* = 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
193 XCNOMEM* = 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
194 XCNOENT* = 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
195 ReleaseByFreeingColormap*: XID = XID(1)
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 PXContext* = ptr XContext
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
199 XContext* = cint
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
200
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
201 proc XAllocClassHint*(): PXClassHint{.cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
202 proc XAllocIconSize*(): PXIconSize{.cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
203 proc XAllocSizeHints*(): PXSizeHints{.cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
204 proc XAllocStandardColormap*(): PXStandardColormap{.cdecl, dynlib: libX11,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
205 importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
206 proc XAllocWMHints*(): PXWMHints{.cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
207 proc XClipBox*(para1: Region, para2: PXRectangle): cint{.cdecl, dynlib: libX11,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
208 importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
209 proc XCreateRegion*(): Region{.cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
210 proc XDefaultString*(): cstring{.cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
211 proc XDeleteContext*(para1: PDisplay, para2: XID, para3: XContext): cint{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
212 cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
213 proc XDestroyRegion*(para1: Region): cint{.cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
214 proc XEmptyRegion*(para1: Region): cint{.cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
215 proc XEqualRegion*(para1: Region, para2: Region): cint{.cdecl, dynlib: libX11,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
216 importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
217 proc XFindContext*(para1: PDisplay, para2: XID, para3: XContext,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
218 para4: PXPointer): cint{.cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
219 proc XGetClassHint*(para1: PDisplay, para2: Window, para3: PXClassHint): Status{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
220 cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
221 proc XGetIconSizes*(para1: PDisplay, para2: Window, para3: PPXIconSize,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
222 para4: Pcint): Status{.cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
223 proc XGetNormalHints*(para1: PDisplay, para2: Window, para3: PXSizeHints): Status{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
224 cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
225 proc XGetRGBColormaps*(para1: PDisplay, para2: Window,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
226 para3: PPXStandardColormap, para4: Pcint, para5: Atom): Status{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
227 cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
228 proc XGetSizeHints*(para1: PDisplay, para2: Window, para3: PXSizeHints,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
229 para4: Atom): Status{.cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
230 proc XGetStandardColormap*(para1: PDisplay, para2: Window,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
231 para3: PXStandardColormap, para4: Atom): Status{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
232 cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
233 proc XGetTextProperty*(para1: PDisplay, para2: Window, para3: PXTextProperty,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
234 para4: Atom): Status{.cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
235 proc XGetVisualInfo*(para1: PDisplay, para2: clong, para3: PXVisualInfo,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
236 para4: Pcint): PXVisualInfo{.cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
237 proc XGetWMClientMachine*(para1: PDisplay, para2: Window, para3: PXTextProperty): Status{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
238 cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
239 proc XGetWMHints*(para1: PDisplay, para2: Window): PXWMHints{.cdecl,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
240 dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
241 proc XGetWMIconName*(para1: PDisplay, para2: Window, para3: PXTextProperty): Status{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
242 cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
243 proc XGetWMName*(para1: PDisplay, para2: Window, para3: PXTextProperty): Status{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
244 cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
245 proc XGetWMNormalHints*(para1: PDisplay, para2: Window, para3: PXSizeHints,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
246 para4: ptr int): Status{.cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
247 proc XGetWMSizeHints*(para1: PDisplay, para2: Window, para3: PXSizeHints,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
248 para4: ptr int, para5: Atom): Status{.cdecl,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
249 dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
250 proc XGetZoomHints*(para1: PDisplay, para2: Window, para3: PXSizeHints): Status{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
251 cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
252 proc XIntersectRegion*(para1: Region, para2: Region, para3: Region): cint{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
253 cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
254 proc XConvertCase*(para1: KeySym, para2: PKeySym, para3: PKeySym){.cdecl,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
255 dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
256 proc XLookupString*(para1: PXKeyEvent, para2: cstring, para3: cint,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
257 para4: PKeySym, para5: PXComposeStatus): cint{.cdecl,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
258 dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
259 proc XMatchVisualInfo*(para1: PDisplay, para2: cint, para3: cint, para4: cint,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
260 para5: PXVisualInfo): Status{.cdecl, dynlib: libX11,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
261 importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
262 proc XOffsetRegion*(para1: Region, para2: cint, para3: cint): cint{.cdecl,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
263 dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
264 proc XPointInRegion*(para1: Region, para2: cint, para3: cint): XBool{.cdecl,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
265 dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
266 proc XPolygonRegion*(para1: PXPoint, para2: cint, para3: cint): Region{.cdecl,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
267 dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
268 proc XRectInRegion*(para1: Region, para2: cint, para3: cint, para4: cuint,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
269 para5: cuint): cint{.cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
270 proc XSaveContext*(para1: PDisplay, para2: XID, para3: XContext,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
271 para4: cstring): cint{.cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
272 proc XSetClassHint*(para1: PDisplay, para2: Window, para3: PXClassHint): cint{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
273 cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
274 proc XSetIconSizes*(para1: PDisplay, para2: Window, para3: PXIconSize,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
275 para4: cint): cint{.cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
276 proc XSetNormalHints*(para1: PDisplay, para2: Window, para3: PXSizeHints): cint{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
277 cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
278 proc XSetRGBColormaps*(para1: PDisplay, para2: Window,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
279 para3: PXStandardColormap, para4: cint, para5: Atom){.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
280 cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
281 proc XSetSizeHints*(para1: PDisplay, para2: Window, para3: PXSizeHints,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
282 para4: Atom): cint{.cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
283 proc XSetStandardProperties*(para1: PDisplay, para2: Window, para3: cstring,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
284 para4: cstring, para5: Pixmap, para6: PPchar,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
285 para7: cint, para8: PXSizeHints): cint{.cdecl,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
286 dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
287 proc XSetTextProperty*(para1: PDisplay, para2: Window, para3: PXTextProperty,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
288 para4: Atom){.cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
289 proc XSetWMClientMachine*(para1: PDisplay, para2: Window, para3: PXTextProperty){.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
290 cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
291 proc XSetWMHints*(para1: PDisplay, para2: Window, para3: PXWMHints): cint{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
292 cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
293 proc XSetWMIconName*(para1: PDisplay, para2: Window, para3: PXTextProperty){.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
294 cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
295 proc XSetWMName*(para1: PDisplay, para2: Window, para3: PXTextProperty){.cdecl,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
296 dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
297 proc XSetWMNormalHints*(para1: PDisplay, para2: Window, para3: PXSizeHints){.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
298 cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
299 proc XSetWMProperties*(para1: PDisplay, para2: Window, para3: PXTextProperty,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
300 para4: PXTextProperty, para5: PPchar, para6: cint,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
301 para7: PXSizeHints, para8: PXWMHints, para9: PXClassHint){.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
302 cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
303 proc XmbSetWMProperties*(para1: PDisplay, para2: Window, para3: cstring,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
304 para4: cstring, para5: PPchar, para6: cint,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
305 para7: PXSizeHints, para8: PXWMHints,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
306 para9: PXClassHint){.cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
307 proc Xutf8SetWMProperties*(para1: PDisplay, para2: Window, para3: cstring,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
308 para4: cstring, para5: PPchar, para6: cint,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
309 para7: PXSizeHints, para8: PXWMHints,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
310 para9: PXClassHint){.cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
311 proc XSetWMSizeHints*(para1: PDisplay, para2: Window, para3: PXSizeHints,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
312 para4: Atom){.cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
313 proc XSetRegion*(para1: PDisplay, para2: GC, para3: Region): cint{.cdecl,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
314 dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
315 proc XSetStandardColormap*(para1: PDisplay, para2: Window,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
316 para3: PXStandardColormap, para4: Atom){.cdecl,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
317 dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
318 proc XSetZoomHints*(para1: PDisplay, para2: Window, para3: PXSizeHints): cint{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
319 cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
320 proc XShrinkRegion*(para1: Region, para2: cint, para3: cint): cint{.cdecl,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
321 dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
322 proc XStringListToTextProperty*(para1: PPchar, para2: cint,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
323 para3: PXTextProperty): Status{.cdecl,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
324 dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
325 proc XSubtractRegion*(para1: Region, para2: Region, para3: Region): cint{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
326 cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
327 proc XmbTextListToTextProperty*(para1: PDisplay, para2: PPchar, para3: cint,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
328 para4: XICCEncodingStyle, para5: PXTextProperty): cint{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
329 cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
330 proc XwcTextListToTextProperty*(para1: PDisplay, para2: ptr ptr int16, para3: cint,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
331 para4: XICCEncodingStyle, para5: PXTextProperty): cint{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
332 cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
333 proc Xutf8TextListToTextProperty*(para1: PDisplay, para2: PPchar, para3: cint,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
334 para4: XICCEncodingStyle,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
335 para5: PXTextProperty): cint{.cdecl,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
336 dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
337 proc XwcFreeStringList*(para1: ptr ptr int16){.cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
338 proc XTextPropertyToStringList*(para1: PXTextProperty, para2: PPPchar,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
339 para3: Pcint): Status{.cdecl, dynlib: libX11,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
340 importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
341 proc XmbTextPropertyToTextList*(para1: PDisplay, para2: PXTextProperty,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
342 para3: PPPchar, para4: Pcint): cint{.cdecl,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
343 dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
344 proc XwcTextPropertyToTextList*(para1: PDisplay, para2: PXTextProperty,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
345 para3: ptr ptr ptr int16, para4: Pcint): cint{.cdecl,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
346 dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
347 proc Xutf8TextPropertyToTextList*(para1: PDisplay, para2: PXTextProperty,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
348 para3: PPPchar, para4: Pcint): cint{.cdecl,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
349 dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
350 proc XUnionRectWithRegion*(para1: PXRectangle, para2: Region, para3: Region): cint{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
351 cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
352 proc XUnionRegion*(para1: Region, para2: Region, para3: Region): cint{.cdecl,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
353 dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
354 proc XWMGeometry*(para1: PDisplay, para2: cint, para3: cstring, para4: cstring,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
355 para5: cuint, para6: PXSizeHints, para7: Pcint, para8: Pcint,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
356 para9: Pcint, para10: Pcint, para11: Pcint): cint{.cdecl,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
357 dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
358 proc XXorRegion*(para1: Region, para2: Region, para3: Region): cint{.cdecl,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
359 dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
360 #when defined(MACROS):
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
361 proc XDestroyImage*(ximage: PXImage): cint
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
362 proc XGetPixel*(ximage: PXImage, x, y: cint): culong
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
363 proc XPutPixel*(ximage: PXImage, x, y: cint, pixel: culong): cint
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
364 proc XSubImage*(ximage: PXImage, x, y: cint, width, height: cuint): PXImage
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
365 proc XAddPixel*(ximage: PXImage, value: clong): cint
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
366 proc IsKeypadKey*(keysym: KeySym): bool
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
367 proc IsPrivateKeypadKey*(keysym: KeySym): bool
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
368 proc IsCursorKey*(keysym: KeySym): bool
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
369 proc IsPFKey*(keysym: KeySym): bool
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
370 proc IsFunctionKey*(keysym: KeySym): bool
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
371 proc IsMiscFunctionKey*(keysym: KeySym): bool
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
372 proc IsModifierKey*(keysym: KeySym): bool
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
373 #function XUniqueContext : XContext;
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
374 #function XStringToContext(_string : Pchar) : XContext;
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
375 # implementation
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
376
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
377 #when defined(MACROS):
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
378 proc XDestroyImage(ximage: PXImage): cint =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
379 ximage.f.destroy_image(ximage)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
380
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
381 proc XGetPixel(ximage: PXImage, x, y: cint): culong =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
382 ximage.f.get_pixel(ximage, x, y)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
383
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
384 proc XPutPixel(ximage: PXImage, x, y: cint, pixel: culong): cint =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
385 ximage.f.put_pixel(ximage, x, y, pixel)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
386
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
387 proc XSubImage(ximage: PXImage, x, y: cint, width, height: cuint): PXImage =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
388 ximage.f.sub_image(ximage, x, y, width, height)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
389
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
390 proc XAddPixel(ximage: PXImage, value: clong): cint =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
391 ximage.f.add_pixel(ximage, value)
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 proc IsKeypadKey(keysym: KeySym): bool =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
394 (keysym >= XK_KP_Space) and (keysym <= XK_KP_Equal)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
395
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
396 proc IsPrivateKeypadKey(keysym: KeySym): bool =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
397 (keysym >= 0x11000000.KeySym) and (keysym <= 0x1100FFFF.KeySym)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
398
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
399 proc IsCursorKey(keysym: KeySym): bool =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
400 (keysym >= XK_Home) and (keysym < XK_Select)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
401
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
402 proc IsPFKey(keysym: KeySym): bool =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
403 (keysym >= XK_KP_F1) and (keysym <= XK_KP_F4)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
404
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
405 proc IsFunctionKey(keysym: KeySym): bool =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
406 (keysym >= XK_F1) and (keysym <= XK_F35)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
407
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
408 proc IsMiscFunctionKey(keysym: KeySym): bool =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
409 (keysym >= XK_Select) and (keysym <= XK_Break)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
410
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
411 proc IsModifierKey(keysym: KeySym): bool =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
412 ((keysym >= XK_Shift_L) and (keysym <= XK_Hyper_R)) or
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
413 (keysym == XK_Mode_switch) or (keysym == XK_Num_Lock)