-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathstructures.go
495 lines (435 loc) · 10.8 KB
/
structures.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
package winapi
type (
// https://msdn.microsoft.com/en-us/library/ms724197.aspx
ANIMATIONINFO struct {
CbSize uint32
IMinAnimate int32
}
// https://msdn.microsoft.com/en-us/library/aa379651.aspx
AUDIODESCRIPTION struct {
CbSize uint32
Enabled int32
Locale uint32
}
// https://msdn.microsoft.com/en-us/library/ms724500.aspx
MINIMIZEDMETRICS struct {
CbSize uint32
IWidth int32
IHorzGap int32
IVertGap int32
IArrange int32
}
// https://msdn.microsoft.com/en-us/library/ff729175.aspx
NONCLIENTMETRICS_L struct {
CbSize uint32
IBorderWidth int32
IScrollWidth int32
IScrollHeight int32
ICaptionWidth int32
ICaptionHeight int32
LfCaptionFont LOGFONT
ISmCaptionWidth int32
ISmCaptionHeight int32
LfSmCaptionFont LOGFONT
IMenuWidth int32
IMenuHeight int32
LfMenuFont LOGFONT
LfStatusFont LOGFONT
LfMessageFont LOGFONT
}
// https://msdn.microsoft.com/en-us/library/ff729175.aspx
NONCLIENTMETRICS struct {
CbSize uint32
IBorderWidth int32
IScrollWidth int32
IScrollHeight int32
ICaptionWidth int32
ICaptionHeight int32
LfCaptionFont LOGFONT
ISmCaptionWidth int32
ISmCaptionHeight int32
LfSmCaptionFont LOGFONT
IMenuWidth int32
IMenuHeight int32
LfMenuFont LOGFONT
LfStatusFont LOGFONT
LfMessageFont LOGFONT
IPaddedBorderWidth int32
}
// https://msdn.microsoft.com/en-us/library/dd145037.aspx
LOGFONT struct {
LfHeight int32
LfWidth int32
LfEscapement int32
LfOrientation int32
LfWeight int32
LfItalic uint8
LfUnderline uint8
LfStrikeOut uint8
LfCharSet uint8
LfOutPrecision uint8
LfClipPrecision uint8
LfQuality uint8
LfPitchAndFamily uint8
LfFaceName []uint16
}
// https://msdn.microsoft.com/en-us/library/ms645549.aspx
RAWHID struct {
DwSizeHid uint32
DwCount uint32
BRawData []uint8
}
// https://msdn.microsoft.com/en-us/library/ms645562.aspx
RAWINPUT_MB struct {
Header RAWINPUTHEADER
Mouse RAWMOUSEBUTTONS
}
// https://msdn.microsoft.com/en-us/library/ms645562.aspx
RAWINPUT_MBI struct {
Header RAWINPUTHEADER
Mouse RAWMOUSEBUTTONINFO
}
// https://msdn.microsoft.com/en-us/library/ms645562.aspx
RAWINPUT_K struct {
Header RAWINPUTHEADER
Keyboard RAWKEYBOARD
}
// https://msdn.microsoft.com/en-us/library/ms645562.aspx
RAWINPUT_HID struct {
Header RAWINPUTHEADER
HID RAWHID
}
// https://msdn.microsoft.com/en-us/library/ms645565.aspx
RAWINPUTDEVICE struct {
UsUsagePage uint16
UsUsage uint16
DwFlags uint32
HwndTarget uintptr
}
// https://msdn.microsoft.com/en-us/library/ms645568.aspx
RAWINPUTDEVICELIST struct {
HDevice uintptr
DwType uint32
}
// https://msdn.microsoft.com/en-us/library/ms645571.aspx
RAWINPUTHEADER struct {
DwType uint32
DwSize uint32
HDevice uintptr
WParam uintptr
}
// https://msdn.microsoft.com/en-us/library/ms645575.aspx
RAWKEYBOARD struct {
MakeCode uint16
Flags uint16
Reserved uint16
VKey uint16
Message uint32
ExtraInformation uint32
}
// https://msdn.microsoft.com/en-us/library/ms645578.aspx
RAWMOUSEBUTTONS struct {
UsFlags uint16
UlButtons uint32
UlRawButtons uint32
LLastX int32
LLastY int32
UlExtraInformation uint32
}
// https://msdn.microsoft.com/en-us/library/ms645578.aspx
RAWMOUSEBUTTONINFO struct {
UsFlags uint16
ButtonInfo struct {
UsButtonFlags uint16
UsButtonData uint16
}
UlRawButtons uint32
LLastX int32
LLastY int32
UlExtraInformation uint32
}
// https://msdn.microsoft.com/en-us/library/ms645581.aspx
RIDI_M struct {
CbSize uint32
DwType uint32
Mouse RID_DEVICE_INFO_MOUSE
}
// https://msdn.microsoft.com/en-us/library/ms645581.aspx
RIDI_K struct {
CbSize uint32
DwType uint32
Keyboard RID_DEVICE_INFO_KEYBOARD
}
// https://msdn.microsoft.com/en-us/library/ms645581.aspx
RIDI_HID struct {
CbSize uint32
DwType uint32
HID RID_DEVICE_INFO_HID
}
// https://msdn.microsoft.com/en-us/library/ms645584.aspx
RID_DEVICE_INFO_HID struct {
DwVendorId uint32
DwProductId uint32
DwVersionNumber uint32
UsUsagePage uint16
UsUsage uint16
}
// https://msdn.microsoft.com/en-us/library/ms645587.aspx
RID_DEVICE_INFO_KEYBOARD struct {
DwType uint32
DwSubType uint32
DwKeyboardMode uint32
DwNumberOfFunctionKeys uint32
DwNumberOfIndicators uint32
DwNumberOfKeysTotal uint32
}
// https://msdn.microsoft.com/en-us/library/ms645589.aspx
RID_DEVICE_INFO_MOUSE struct {
DwId uint32
DwNumberOfButtons uint32
DwSampleRate uint32
FHasHorizontalWheel int32
}
// https://msdn.microsoft.com/en-us/library/ms644957.aspx
BSMINFO struct {
CbSize uint32
Hdesk uintptr
Hwnd uintptr
Luid LUID
}
// https://msdn.microsoft.com/en-us/library/ms644958.aspx
MSG struct {
Hwnd uintptr
Message uint32
WParam uintptr
LParam uintptr
Time uint32
Pt POINT
}
// https://msdn.microsoft.com/en-us/library/aa379261.aspx
LUID struct {
LowPart uint32
HighPart int32
}
// https://msdn.microsoft.com/en-us/library/dd162805.aspx
POINT struct {
X int32
Y int32
}
// https://msdn.microsoft.com/en-us/library/ms632603.aspx
CREATESTRUCT struct {
LpCreateParams uintptr
HInstance uintptr
HMenu uintptr
HwndParent uintptr
Cy int32
Cx int32
Y int32
X int32
Style int32
LpszName []uint16
LpszClass []uint16
DwExStyle uint32
}
// https://msdn.microsoft.com/en-us/library/ms632602.aspx
CLIENTCREATESTRUCT struct {
HWindowMenu uintptr
IdFirstChild uint32
}
// https://msdn.microsoft.com/en-us/library/ms644910.aspx
MDICREATESTRUCT struct {
SzClass []uint16
SzTitle []uint16
HOwner uintptr
X int32
Y int32
Cx int32
Cy int32
Style uint32
LParam uintptr
}
// https://msdn.microsoft.com/en-us/library/ms644962.aspx
CBT_CREATEWND struct {
Lpcs *CREATESTRUCT
HwndInsertAfter uintptr
}
// https://msdn.microsoft.com/en-us/library/ms644961.aspx
CBTACTIVATESTRUCT struct {
FMouse int32
HwndActive uintptr
}
// https://msdn.microsoft.com/en-us/library/ms644963.aspx
CWPRETSTRUCT struct {
LResult uintptr
LParam uintptr
WParam uintptr
Message uint32
Hwnd uintptr
}
// https://msdn.microsoft.com/en-us/library/ms644964.aspx
CWPSTRUCT struct {
LParam uintptr
WParam uintptr
Message uint32
Hwnd uintptr
}
// https://msdn.microsoft.com/en-us/library/ms644965.aspx
DEBUGHOOKINFO struct {
IdThread uint32
IdThreadInstaller uint32
LParam uintptr
WParam uintptr
Code int32
}
// https://msdn.microsoft.com/en-us/library/ms644966.aspx
EVENTMSG struct {
Message uint32
ParamL uint32
ParamH uint32
Time uint32
Hwnd uintptr
}
// https://msdn.microsoft.com/en-us/library/ms644967.aspx
KBDLLHOOKSTRUCT struct {
VkCode uint32
ScanCode uint32
Flags uint32
Time uint32
DwExtraInfo uint32
}
// https://msdn.microsoft.com/en-us/library/ms644968.aspx
MOUSEHOOKSTRUCT struct {
Pt POINT
Hwnd uintptr
WHitTestCode uint32
DwExtraInfo uint32
}
// https://msdn.microsoft.com/en-us/library/ms644969.aspx
MOUSEHOOKSTRUCTEX struct {
MOUSEHOOKSTRUCT MOUSEHOOKSTRUCT
MouseData uint32
}
// https://msdn.microsoft.com/en-us/library/ms644970.aspx
MSLLHOOKSTRUCT struct {
Pt POINT
MouseData uint32
Flags uint32
Time uint32
DwExtraInfo uint32
}
// https://msdn.microsoft.com/en-us/library/ms646269.aspx
HARDWAREINPUT struct {
UMsg uint32
WParamL uint16
WParamH uint16
}
// https://msdn.microsoft.com/en-us/library/ms646271.aspx
KEYBDINPUT struct {
WVk uint16
WScan uint16
DwFlags uint32
Time uint32
DwExtraInfo uint32
}
// https://msdn.microsoft.com/en-us/library/ms646273.aspx
MOUSEINPUT struct {
Dx int32
Dy int32
MouseData uint32
DwFlags uint32
Time uint32
DwExtraInfo uint32
}
// https://msdn.microsoft.com/en-us/library/ms646270.aspx
INPUT_M struct {
Type uint32
MI MOUSEINPUT
}
// https://msdn.microsoft.com/en-us/library/ms646270.aspx
INPUT_K struct {
Type uint32
KI KEYBDINPUT
}
// https://msdn.microsoft.com/en-us/library/ms646270.aspx
INPUT_HW struct {
Type uint32
HI HARDWAREINPUT
}
// https://msdn.microsoft.com/en-us/library/ms646272.aspx
LASTINPUTINFO struct {
CbSize uint32
DwTime uint32
}
// https://msdn.microsoft.com/en-us/library/ms645603.aspx
MOUSEMOVEPOINT struct {
X int32
Y int32
Time uint32
DwExtraInfo uint32
}
// https://msdn.microsoft.com/en-us/library/ms645604.aspx
TRACKMOUSEEVENT struct {
CbSize uint32
DwFlags uint32
HwndTrack uintptr
DwHoverTime uint32
}
// https://docs.microsoft.com/en-us/windows/console/coord-str
COORD struct {
X int16
Y int16
}
// https://docs.microsoft.com/en-us/windows/console/focus-event-record-str
FOCUS_EVENT_RECORD struct {
BSetFocus int32
}
// https://docs.microsoft.com/en-us/windows/console/mouse-event-record-str
MOUSE_EVENT_RECORD struct {
DwMousePosition COORD
DwButtonState uint32
DwControlKeyState uint32
DwEventFlags uint32
}
// https://docs.microsoft.com/en-us/windows/console/menu-event-record-str
MENU_EVENT_RECORD struct {
DwCommandId uint32
}
// https://docs.microsoft.com/en-us/windows/console/key-event-record-str
KEY_EVENT_RECORD struct {
BKeyDown int32
WRepeatCount uint16
WVirtualKeyCode uint16
WVirtualScanCode uint16
UChar uint16
DwControlKeyState uint32
}
// https://docs.microsoft.com/en-us/windows/console/window-buffer-size-record-str
WINDOW_BUFFER_SIZE_RECORD struct {
DwSize COORD
}
// https://docs.microsoft.com/en-us/windows/console/input-record-str
INPUT_RECORD_KEY struct {
EventType uint16
Event KEY_EVENT_RECORD
}
// https://docs.microsoft.com/en-us/windows/console/input-record-str
INPUT_RECORD_MOUSE struct {
EventType uint16
Event MOUSE_EVENT_RECORD
}
// https://docs.microsoft.com/en-us/windows/console/input-record-str
INPUT_RECORD_WINDOW_BUFFER_SIZE struct {
EventType uint16
Event WINDOW_BUFFER_SIZE_RECORD
}
// https://docs.microsoft.com/en-us/windows/console/input-record-str
INPUT_RECORD_MENU struct {
EventType uint16
Event MENU_EVENT_RECORD
}
// https://docs.microsoft.com/en-us/windows/console/input-record-str
INPUT_RECORD_FOCUS struct {
EventType uint16
Event FOCUS_EVENT_RECORD
}
)