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
/* automatically generated by rust-bindgen 0.65.1 */

pub const LOGI_LED_BITMAP_WIDTH: u32 = 21;
pub const LOGI_LED_BITMAP_HEIGHT: u32 = 6;
pub const LOGI_LED_BITMAP_BYTES_PER_KEY: u32 = 4;
pub const LOGI_LED_BITMAP_SIZE: u32 = 504;
pub const LOGI_LED_DURATION_INFINITE: u32 = 0;
pub const LOGI_DEVICETYPE_MONOCHROME_ORD: u32 = 0;
pub const LOGI_DEVICETYPE_RGB_ORD: u32 = 1;
pub const LOGI_DEVICETYPE_PERKEY_RGB_ORD: u32 = 2;
pub const LOGI_DEVICETYPE_MONOCHROME: u32 = 1;
pub const LOGI_DEVICETYPE_RGB: u32 = 2;
pub const LOGI_DEVICETYPE_PERKEY_RGB: u32 = 4;
pub const LOGI_DEVICETYPE_ALL: u32 = 7;
#[repr(i32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum LogiLed_KeyName {
    ESC = 1,
    F1 = 59,
    F2 = 60,
    F3 = 61,
    F4 = 62,
    F5 = 63,
    F6 = 64,
    F7 = 65,
    F8 = 66,
    F9 = 67,
    F10 = 68,
    F11 = 87,
    F12 = 88,
    PRINT_SCREEN = 311,
    SCROLL_LOCK = 70,
    PAUSE_BREAK = 325,
    TILDE = 41,
    ONE = 2,
    TWO = 3,
    THREE = 4,
    FOUR = 5,
    FIVE = 6,
    SIX = 7,
    SEVEN = 8,
    EIGHT = 9,
    NINE = 10,
    ZERO = 11,
    MINUS = 12,
    EQUALS = 13,
    BACKSPACE = 14,
    INSERT = 338,
    HOME = 327,
    PAGE_UP = 329,
    NUM_LOCK = 69,
    NUM_SLASH = 309,
    NUM_ASTERISK = 55,
    NUM_MINUS = 74,
    TAB = 15,
    Q = 16,
    W = 17,
    E = 18,
    R = 19,
    T = 20,
    Y = 21,
    U = 22,
    I = 23,
    O = 24,
    P = 25,
    OPEN_BRACKET = 26,
    CLOSE_BRACKET = 27,
    BACKSLASH = 43,
    KEYBOARD_DELETE = 339,
    END = 335,
    PAGE_DOWN = 337,
    NUM_SEVEN = 71,
    NUM_EIGHT = 72,
    NUM_NINE = 73,
    NUM_PLUS = 78,
    CAPS_LOCK = 58,
    A = 30,
    S = 31,
    D = 32,
    F = 33,
    G = 34,
    H = 35,
    J = 36,
    K = 37,
    L = 38,
    SEMICOLON = 39,
    APOSTROPHE = 40,
    ENTER = 28,
    NUM_FOUR = 75,
    NUM_FIVE = 76,
    NUM_SIX = 77,
    LEFT_SHIFT = 42,
    Z = 44,
    X = 45,
    C = 46,
    V = 47,
    B = 48,
    N = 49,
    M = 50,
    COMMA = 51,
    PERIOD = 52,
    FORWARD_SLASH = 53,
    RIGHT_SHIFT = 54,
    ARROW_UP = 328,
    NUM_ONE = 79,
    NUM_TWO = 80,
    NUM_THREE = 81,
    NUM_ENTER = 284,
    LEFT_CONTROL = 29,
    LEFT_WINDOWS = 347,
    LEFT_ALT = 56,
    SPACE = 57,
    RIGHT_ALT = 312,
    RIGHT_WINDOWS = 348,
    APPLICATION_SELECT = 349,
    RIGHT_CONTROL = 285,
    ARROW_LEFT = 331,
    ARROW_DOWN = 336,
    ARROW_RIGHT = 333,
    NUM_ZERO = 82,
    NUM_PERIOD = 83,
    G_1 = 65521,
    G_2 = 65522,
    G_3 = 65523,
    G_4 = 65524,
    G_5 = 65525,
    G_6 = 65526,
    G_7 = 65527,
    G_8 = 65528,
    G_9 = 65529,
    G_LOGO = 1048561,
    G_BADGE = 1048562,
}
#[repr(i32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum LogiLed_DeviceType {
    Keyboard = 0,
    Mouse = 3,
    Mousemat = 4,
    Headset = 8,
    Speaker = 14,
}
extern "C" {
    #[link_name = "\u{1}?LogiLedInit@@YA_NXZ"]
    pub fn LogiLedInit() -> bool;
}
extern "C" {
    #[link_name = "\u{1}?LogiLedInitWithName@@YA_NQEBD@Z"]
    pub fn LogiLedInitWithName(name: *const ::std::os::raw::c_char) -> bool;
}
extern "C" {
    #[link_name = "\u{1}?LogiLedGetSdkVersion@@YA_NPEAH00@Z"]
    pub fn LogiLedGetSdkVersion(
        majorNum: *mut ::std::os::raw::c_int,
        minorNum: *mut ::std::os::raw::c_int,
        buildNum: *mut ::std::os::raw::c_int,
    ) -> bool;
}
extern "C" {
    #[link_name = "\u{1}?LogiLedGetConfigOptionNumber@@YA_NPEB_WPEAN@Z"]
    pub fn LogiLedGetConfigOptionNumber(configPath: *const u16, defaultValue: *mut f64) -> bool;
}
extern "C" {
    #[link_name = "\u{1}?LogiLedGetConfigOptionBool@@YA_NPEB_WPEA_N@Z"]
    pub fn LogiLedGetConfigOptionBool(configPath: *const u16, defaultValue: *mut bool) -> bool;
}
extern "C" {
    #[link_name = "\u{1}?LogiLedGetConfigOptionColor@@YA_NPEB_WPEAH11@Z"]
    pub fn LogiLedGetConfigOptionColor(
        configPath: *const u16,
        defaultRed: *mut ::std::os::raw::c_int,
        defaultGreen: *mut ::std::os::raw::c_int,
        defaultBlue: *mut ::std::os::raw::c_int,
    ) -> bool;
}
extern "C" {
    #[link_name = "\u{1}?LogiLedGetConfigOptionRect@@YA_NPEB_WPEAH111@Z"]
    pub fn LogiLedGetConfigOptionRect(
        configPath: *const u16,
        defaultX: *mut ::std::os::raw::c_int,
        defaultY: *mut ::std::os::raw::c_int,
        defaultWidth: *mut ::std::os::raw::c_int,
        defaultHeight: *mut ::std::os::raw::c_int,
    ) -> bool;
}
extern "C" {
    #[link_name = "\u{1}?LogiLedGetConfigOptionString@@YA_NPEB_WPEA_WH@Z"]
    pub fn LogiLedGetConfigOptionString(
        configPath: *const u16,
        defaultValue: *mut u16,
        bufferSize: ::std::os::raw::c_int,
    ) -> bool;
}
extern "C" {
    #[link_name = "\u{1}?LogiLedGetConfigOptionKeyInput@@YA_NPEB_WPEA_WH@Z"]
    pub fn LogiLedGetConfigOptionKeyInput(
        configPath: *const u16,
        defaultValue: *mut u16,
        bufferSize: ::std::os::raw::c_int,
    ) -> bool;
}
extern "C" {
    #[link_name = "\u{1}?LogiLedGetConfigOptionSelect@@YA_NPEB_WPEA_WPEAH0H@Z"]
    pub fn LogiLedGetConfigOptionSelect(
        configPath: *const u16,
        defaultValue: *mut u16,
        valueSize: *mut ::std::os::raw::c_int,
        values: *const u16,
        bufferSize: ::std::os::raw::c_int,
    ) -> bool;
}
extern "C" {
    #[link_name = "\u{1}?LogiLedGetConfigOptionRange@@YA_NPEB_WPEAHHH@Z"]
    pub fn LogiLedGetConfigOptionRange(
        configPath: *const u16,
        defaultValue: *mut ::std::os::raw::c_int,
        min: ::std::os::raw::c_int,
        max: ::std::os::raw::c_int,
    ) -> bool;
}
extern "C" {
    #[link_name = "\u{1}?LogiLedSetConfigOptionLabel@@YA_NPEB_WPEA_W@Z"]
    pub fn LogiLedSetConfigOptionLabel(configPath: *const u16, label: *mut u16) -> bool;
}
extern "C" {
    #[link_name = "\u{1}?LogiLedSetTargetDevice@@YA_NH@Z"]
    pub fn LogiLedSetTargetDevice(targetDevice: ::std::os::raw::c_int) -> bool;
}
extern "C" {
    #[link_name = "\u{1}?LogiLedSaveCurrentLighting@@YA_NXZ"]
    pub fn LogiLedSaveCurrentLighting() -> bool;
}
extern "C" {
    #[link_name = "\u{1}?LogiLedSetLighting@@YA_NHHH@Z"]
    pub fn LogiLedSetLighting(
        redPercentage: ::std::os::raw::c_int,
        greenPercentage: ::std::os::raw::c_int,
        bluePercentage: ::std::os::raw::c_int,
    ) -> bool;
}
extern "C" {
    #[link_name = "\u{1}?LogiLedRestoreLighting@@YA_NXZ"]
    pub fn LogiLedRestoreLighting() -> bool;
}
extern "C" {
    #[link_name = "\u{1}?LogiLedFlashLighting@@YA_NHHHHH@Z"]
    pub fn LogiLedFlashLighting(
        redPercentage: ::std::os::raw::c_int,
        greenPercentage: ::std::os::raw::c_int,
        bluePercentage: ::std::os::raw::c_int,
        milliSecondsDuration: ::std::os::raw::c_int,
        milliSecondsInterval: ::std::os::raw::c_int,
    ) -> bool;
}
extern "C" {
    #[link_name = "\u{1}?LogiLedPulseLighting@@YA_NHHHHH@Z"]
    pub fn LogiLedPulseLighting(
        redPercentage: ::std::os::raw::c_int,
        greenPercentage: ::std::os::raw::c_int,
        bluePercentage: ::std::os::raw::c_int,
        milliSecondsDuration: ::std::os::raw::c_int,
        milliSecondsInterval: ::std::os::raw::c_int,
    ) -> bool;
}
extern "C" {
    #[link_name = "\u{1}?LogiLedStopEffects@@YA_NXZ"]
    pub fn LogiLedStopEffects() -> bool;
}
extern "C" {
    #[link_name = "\u{1}?LogiLedSetLightingFromBitmap@@YA_NQEAE@Z"]
    pub fn LogiLedSetLightingFromBitmap(bitmap: *mut ::std::os::raw::c_uchar) -> bool;
}
extern "C" {
    #[link_name = "\u{1}?LogiLedSetLightingForKeyWithScanCode@@YA_NHHHH@Z"]
    pub fn LogiLedSetLightingForKeyWithScanCode(
        keyCode: ::std::os::raw::c_int,
        redPercentage: ::std::os::raw::c_int,
        greenPercentage: ::std::os::raw::c_int,
        bluePercentage: ::std::os::raw::c_int,
    ) -> bool;
}
extern "C" {
    #[link_name = "\u{1}?LogiLedSetLightingForKeyWithHidCode@@YA_NHHHH@Z"]
    pub fn LogiLedSetLightingForKeyWithHidCode(
        keyCode: ::std::os::raw::c_int,
        redPercentage: ::std::os::raw::c_int,
        greenPercentage: ::std::os::raw::c_int,
        bluePercentage: ::std::os::raw::c_int,
    ) -> bool;
}
extern "C" {
    #[link_name = "\u{1}?LogiLedSetLightingForKeyWithQuartzCode@@YA_NHHHH@Z"]
    pub fn LogiLedSetLightingForKeyWithQuartzCode(
        keyCode: ::std::os::raw::c_int,
        redPercentage: ::std::os::raw::c_int,
        greenPercentage: ::std::os::raw::c_int,
        bluePercentage: ::std::os::raw::c_int,
    ) -> bool;
}
extern "C" {
    #[link_name = "\u{1}?LogiLedSetLightingForKeyWithKeyName@@YA_NW4KeyName@LogiLed@@HHH@Z"]
    pub fn LogiLedSetLightingForKeyWithKeyName(
        keyName: LogiLed_KeyName,
        redPercentage: ::std::os::raw::c_int,
        greenPercentage: ::std::os::raw::c_int,
        bluePercentage: ::std::os::raw::c_int,
    ) -> bool;
}
extern "C" {
    #[link_name = "\u{1}?LogiLedSaveLightingForKey@@YA_NW4KeyName@LogiLed@@@Z"]
    pub fn LogiLedSaveLightingForKey(keyName: LogiLed_KeyName) -> bool;
}
extern "C" {
    #[link_name = "\u{1}?LogiLedRestoreLightingForKey@@YA_NW4KeyName@LogiLed@@@Z"]
    pub fn LogiLedRestoreLightingForKey(keyName: LogiLed_KeyName) -> bool;
}
extern "C" {
    #[link_name = "\u{1}?LogiLedExcludeKeysFromBitmap@@YA_NPEAW4KeyName@LogiLed@@H@Z"]
    pub fn LogiLedExcludeKeysFromBitmap(
        keyList: *mut LogiLed_KeyName,
        listCount: ::std::os::raw::c_int,
    ) -> bool;
}
extern "C" {
    #[link_name = "\u{1}?LogiLedFlashSingleKey@@YA_NW4KeyName@LogiLed@@HHHHH@Z"]
    pub fn LogiLedFlashSingleKey(
        keyName: LogiLed_KeyName,
        redPercentage: ::std::os::raw::c_int,
        greenPercentage: ::std::os::raw::c_int,
        bluePercentage: ::std::os::raw::c_int,
        msDuration: ::std::os::raw::c_int,
        msInterval: ::std::os::raw::c_int,
    ) -> bool;
}
extern "C" {
    #[link_name = "\u{1}?LogiLedPulseSingleKey@@YA_NW4KeyName@LogiLed@@HHHHHHH_N@Z"]
    pub fn LogiLedPulseSingleKey(
        keyName: LogiLed_KeyName,
        startRedPercentage: ::std::os::raw::c_int,
        startGreenPercentage: ::std::os::raw::c_int,
        startBluePercentage: ::std::os::raw::c_int,
        finishRedPercentage: ::std::os::raw::c_int,
        finishGreenPercentage: ::std::os::raw::c_int,
        finishBluePercentage: ::std::os::raw::c_int,
        msDuration: ::std::os::raw::c_int,
        isInfinite: bool,
    ) -> bool;
}
extern "C" {
    #[link_name = "\u{1}?LogiLedStopEffectsOnKey@@YA_NW4KeyName@LogiLed@@@Z"]
    pub fn LogiLedStopEffectsOnKey(keyName: LogiLed_KeyName) -> bool;
}
extern "C" {
    #[link_name = "\u{1}?LogiLedSetLightingForTargetZone@@YA_NW4DeviceType@LogiLed@@HHHH@Z"]
    pub fn LogiLedSetLightingForTargetZone(
        deviceType: LogiLed_DeviceType,
        zone: ::std::os::raw::c_int,
        redPercentage: ::std::os::raw::c_int,
        greenPercentage: ::std::os::raw::c_int,
        bluePercentage: ::std::os::raw::c_int,
    ) -> bool;
}
extern "C" {
    #[link_name = "\u{1}?LogiLedShutdown@@YAXXZ"]
    pub fn LogiLedShutdown();
}