1#![allow(non_upper_case_globals)]
7#![allow(non_snake_case)]
8#![allow(non_camel_case_types)]
9
10use core::ffi::{c_char, c_int, c_uchar, c_uint, c_void};
11
12pub const CORSAIR_STRING_SIZE_S: c_uint = 64;
15pub const CORSAIR_STRING_SIZE_M: c_uint = 128;
16pub const CORSAIR_LAYER_PRIORITY_MAX: c_uint = 255;
17pub const CORSAIR_DEVICE_COUNT_MAX: c_uint = 64;
18pub const CORSAIR_DEVICE_LEDCOUNT_MAX: c_uint = 512;
19
20pub type CorsairDeviceId = [c_char; 128usize];
23pub type CorsairLedLuid = c_uint;
24
25pub type CorsairError = c_uint;
29pub const CorsairError_CE_Success: CorsairError = 0;
30pub const CorsairError_CE_NotConnected: CorsairError = 1;
31pub const CorsairError_CE_NoControl: CorsairError = 2;
32pub const CorsairError_CE_IncompatibleProtocol: CorsairError = 3;
33pub const CorsairError_CE_InvalidArguments: CorsairError = 4;
34pub const CorsairError_CE_InvalidOperation: CorsairError = 5;
35pub const CorsairError_CE_DeviceNotFound: CorsairError = 6;
36pub const CorsairError_CE_NotAllowed: CorsairError = 7;
37
38pub type CorsairSessionState = c_uint;
40pub const CorsairSessionState_CSS_Invalid: CorsairSessionState = 0;
41pub const CorsairSessionState_CSS_Closed: CorsairSessionState = 1;
42pub const CorsairSessionState_CSS_Connecting: CorsairSessionState = 2;
43pub const CorsairSessionState_CSS_Timeout: CorsairSessionState = 3;
44pub const CorsairSessionState_CSS_ConnectionRefused: CorsairSessionState = 4;
45pub const CorsairSessionState_CSS_ConnectionLost: CorsairSessionState = 5;
46pub const CorsairSessionState_CSS_Connected: CorsairSessionState = 6;
47
48pub type CorsairDeviceType = c_uint;
50pub const CorsairDeviceType_CDT_Unknown: CorsairDeviceType = 0x0000;
51pub const CorsairDeviceType_CDT_Keyboard: CorsairDeviceType = 0x0001;
52pub const CorsairDeviceType_CDT_Mouse: CorsairDeviceType = 0x0002;
53pub const CorsairDeviceType_CDT_Mousemat: CorsairDeviceType = 0x0004;
54pub const CorsairDeviceType_CDT_Headset: CorsairDeviceType = 0x0008;
55pub const CorsairDeviceType_CDT_HeadsetStand: CorsairDeviceType = 0x0010;
56pub const CorsairDeviceType_CDT_FanLedController: CorsairDeviceType = 0x0020;
57pub const CorsairDeviceType_CDT_LedController: CorsairDeviceType = 0x0040;
58pub const CorsairDeviceType_CDT_MemoryModule: CorsairDeviceType = 0x0080;
59pub const CorsairDeviceType_CDT_Cooler: CorsairDeviceType = 0x0100;
60pub const CorsairDeviceType_CDT_Motherboard: CorsairDeviceType = 0x0200;
61pub const CorsairDeviceType_CDT_GraphicsCard: CorsairDeviceType = 0x0400;
62pub const CorsairDeviceType_CDT_Touchbar: CorsairDeviceType = 0x0800;
63pub const CorsairDeviceType_CDT_GameController: CorsairDeviceType = 0x1000;
64pub const CorsairDeviceType_CDT_All: CorsairDeviceType = 0xFFFFFFFF;
65
66pub type CorsairEventId = c_uint;
68pub const CorsairEventId_CEI_Invalid: CorsairEventId = 0;
69pub const CorsairEventId_CEI_DeviceConnectionStatusChangedEvent: CorsairEventId = 1;
70pub const CorsairEventId_CEI_KeyEvent: CorsairEventId = 2;
71
72pub type CorsairMacroKeyId = c_uint;
74pub const CorsairMacroKeyId_CMKI_Invalid: CorsairMacroKeyId = 0;
75pub const CorsairMacroKeyId_CMKI_1: CorsairMacroKeyId = 1;
76pub const CorsairMacroKeyId_CMKI_2: CorsairMacroKeyId = 2;
77pub const CorsairMacroKeyId_CMKI_3: CorsairMacroKeyId = 3;
78pub const CorsairMacroKeyId_CMKI_4: CorsairMacroKeyId = 4;
79pub const CorsairMacroKeyId_CMKI_5: CorsairMacroKeyId = 5;
80pub const CorsairMacroKeyId_CMKI_6: CorsairMacroKeyId = 6;
81pub const CorsairMacroKeyId_CMKI_7: CorsairMacroKeyId = 7;
82pub const CorsairMacroKeyId_CMKI_8: CorsairMacroKeyId = 8;
83pub const CorsairMacroKeyId_CMKI_9: CorsairMacroKeyId = 9;
84pub const CorsairMacroKeyId_CMKI_10: CorsairMacroKeyId = 10;
85pub const CorsairMacroKeyId_CMKI_11: CorsairMacroKeyId = 11;
86pub const CorsairMacroKeyId_CMKI_12: CorsairMacroKeyId = 12;
87pub const CorsairMacroKeyId_CMKI_13: CorsairMacroKeyId = 13;
88pub const CorsairMacroKeyId_CMKI_14: CorsairMacroKeyId = 14;
89pub const CorsairMacroKeyId_CMKI_15: CorsairMacroKeyId = 15;
90pub const CorsairMacroKeyId_CMKI_16: CorsairMacroKeyId = 16;
91pub const CorsairMacroKeyId_CMKI_17: CorsairMacroKeyId = 17;
92pub const CorsairMacroKeyId_CMKI_18: CorsairMacroKeyId = 18;
93pub const CorsairMacroKeyId_CMKI_19: CorsairMacroKeyId = 19;
94pub const CorsairMacroKeyId_CMKI_20: CorsairMacroKeyId = 20;
95
96pub type CorsairDevicePropertyId = c_uint;
98pub const CorsairDevicePropertyId_CDPI_Invalid: CorsairDevicePropertyId = 0;
99pub const CorsairDevicePropertyId_CDPI_PropertyArray: CorsairDevicePropertyId = 1;
100pub const CorsairDevicePropertyId_CDPI_MicEnabled: CorsairDevicePropertyId = 2;
101pub const CorsairDevicePropertyId_CDPI_SurroundSoundEnabled: CorsairDevicePropertyId = 3;
102pub const CorsairDevicePropertyId_CDPI_SidetoneEnabled: CorsairDevicePropertyId = 4;
103pub const CorsairDevicePropertyId_CDPI_EqualizerPreset: CorsairDevicePropertyId = 5;
104pub const CorsairDevicePropertyId_CDPI_PhysicalLayout: CorsairDevicePropertyId = 6;
105pub const CorsairDevicePropertyId_CDPI_LogicalLayout: CorsairDevicePropertyId = 7;
106pub const CorsairDevicePropertyId_CDPI_MacroKeyArray: CorsairDevicePropertyId = 8;
107pub const CorsairDevicePropertyId_CDPI_BatteryLevel: CorsairDevicePropertyId = 9;
108pub const CorsairDevicePropertyId_CDPI_ChannelLedCount: CorsairDevicePropertyId = 10;
109pub const CorsairDevicePropertyId_CDPI_ChannelDeviceCount: CorsairDevicePropertyId = 11;
110pub const CorsairDevicePropertyId_CDPI_ChannelDeviceLedCountArray: CorsairDevicePropertyId = 12;
111pub const CorsairDevicePropertyId_CDPI_ChannelDeviceTypeArray: CorsairDevicePropertyId = 13;
112
113pub type CorsairDataType = c_uint;
115pub const CorsairDataType_CT_Boolean: CorsairDataType = 0;
116pub const CorsairDataType_CT_Int32: CorsairDataType = 1;
117pub const CorsairDataType_CT_Float64: CorsairDataType = 2;
118pub const CorsairDataType_CT_String: CorsairDataType = 3;
119pub const CorsairDataType_CT_Boolean_Array: CorsairDataType = 16;
120pub const CorsairDataType_CT_Int32_Array: CorsairDataType = 17;
121pub const CorsairDataType_CT_Float64_Array: CorsairDataType = 18;
122pub const CorsairDataType_CT_String_Array: CorsairDataType = 19;
123
124pub type CorsairPropertyFlag = c_uint;
126pub const CorsairPropertyFlag_CPF_None: CorsairPropertyFlag = 0;
127pub const CorsairPropertyFlag_CPF_CanRead: CorsairPropertyFlag = 1;
128pub const CorsairPropertyFlag_CPF_CanWrite: CorsairPropertyFlag = 2;
129pub const CorsairPropertyFlag_CPF_Indexed: CorsairPropertyFlag = 4;
130
131pub type CorsairPhysicalLayout = c_uint;
133pub const CorsairPhysicalLayout_CPL_Invalid: CorsairPhysicalLayout = 0;
134pub const CorsairPhysicalLayout_CPL_US: CorsairPhysicalLayout = 1;
135pub const CorsairPhysicalLayout_CPL_UK: CorsairPhysicalLayout = 2;
136pub const CorsairPhysicalLayout_CPL_JP: CorsairPhysicalLayout = 3;
137pub const CorsairPhysicalLayout_CPL_KR: CorsairPhysicalLayout = 4;
138pub const CorsairPhysicalLayout_CPL_BR: CorsairPhysicalLayout = 5;
139
140pub type CorsairLogicalLayout = c_uint;
142pub const CorsairLogicalLayout_CLL_Invalid: CorsairLogicalLayout = 0;
143pub const CorsairLogicalLayout_CLL_US_Int: CorsairLogicalLayout = 1;
144pub const CorsairLogicalLayout_CLL_NA: CorsairLogicalLayout = 2;
145pub const CorsairLogicalLayout_CLL_EU: CorsairLogicalLayout = 3;
146pub const CorsairLogicalLayout_CLL_UK: CorsairLogicalLayout = 4;
147pub const CorsairLogicalLayout_CLL_BE: CorsairLogicalLayout = 5;
148pub const CorsairLogicalLayout_CLL_BR: CorsairLogicalLayout = 6;
149pub const CorsairLogicalLayout_CLL_CH: CorsairLogicalLayout = 7;
150pub const CorsairLogicalLayout_CLL_CN: CorsairLogicalLayout = 8;
151pub const CorsairLogicalLayout_CLL_DE: CorsairLogicalLayout = 9;
152pub const CorsairLogicalLayout_CLL_ES: CorsairLogicalLayout = 10;
153pub const CorsairLogicalLayout_CLL_FR: CorsairLogicalLayout = 11;
154pub const CorsairLogicalLayout_CLL_IT: CorsairLogicalLayout = 12;
155pub const CorsairLogicalLayout_CLL_ND: CorsairLogicalLayout = 13;
156pub const CorsairLogicalLayout_CLL_RU: CorsairLogicalLayout = 14;
157pub const CorsairLogicalLayout_CLL_JP: CorsairLogicalLayout = 15;
158pub const CorsairLogicalLayout_CLL_KR: CorsairLogicalLayout = 16;
159pub const CorsairLogicalLayout_CLL_TW: CorsairLogicalLayout = 17;
160pub const CorsairLogicalLayout_CLL_MEX: CorsairLogicalLayout = 18;
161
162pub type CorsairChannelDeviceType = c_uint;
164pub const CorsairChannelDeviceType_CCDT_Invalid: CorsairChannelDeviceType = 0;
165pub const CorsairChannelDeviceType_CCDT_HD_Fan: CorsairChannelDeviceType = 1;
166pub const CorsairChannelDeviceType_CCDT_SP_Fan: CorsairChannelDeviceType = 2;
167pub const CorsairChannelDeviceType_CCDT_LL_Fan: CorsairChannelDeviceType = 3;
168pub const CorsairChannelDeviceType_CCDT_ML_Fan: CorsairChannelDeviceType = 4;
169pub const CorsairChannelDeviceType_CCDT_QL_Fan: CorsairChannelDeviceType = 5;
170pub const CorsairChannelDeviceType_CCDT_8LedSeriesFan: CorsairChannelDeviceType = 6;
171pub const CorsairChannelDeviceType_CCDT_Strip: CorsairChannelDeviceType = 7;
172pub const CorsairChannelDeviceType_CCDT_DAP: CorsairChannelDeviceType = 8;
173pub const CorsairChannelDeviceType_CCDT_Pump: CorsairChannelDeviceType = 9;
174pub const CorsairChannelDeviceType_CCDT_DRAM: CorsairChannelDeviceType = 10;
175pub const CorsairChannelDeviceType_CCDT_WaterBlock: CorsairChannelDeviceType = 11;
176pub const CorsairChannelDeviceType_CCDT_QX_Fan: CorsairChannelDeviceType = 12;
177
178pub type CorsairAccessLevel = c_uint;
180pub const CorsairAccessLevel_CAL_Shared: CorsairAccessLevel = 0;
181pub const CorsairAccessLevel_CAL_ExclusiveLightingControl: CorsairAccessLevel = 1;
182pub const CorsairAccessLevel_CAL_ExclusiveKeyEventsListening: CorsairAccessLevel = 2;
183pub const CorsairAccessLevel_CAL_ExclusiveLightingControlAndKeyEventsListening: CorsairAccessLevel =
184 3;
185
186pub type CorsairLedGroup = c_uint;
188pub const CorsairLedGroup_CLG_Keyboard: CorsairLedGroup = 0;
189pub const CorsairLedGroup_CLG_KeyboardGKeys: CorsairLedGroup = 1;
190pub const CorsairLedGroup_CLG_KeyboardEdge: CorsairLedGroup = 2;
191pub const CorsairLedGroup_CLG_KeyboardOem: CorsairLedGroup = 3;
192pub const CorsairLedGroup_CLG_Mouse: CorsairLedGroup = 4;
193pub const CorsairLedGroup_CLG_Mousemat: CorsairLedGroup = 5;
194pub const CorsairLedGroup_CLG_Headset: CorsairLedGroup = 6;
195pub const CorsairLedGroup_CLG_HeadsetStand: CorsairLedGroup = 7;
196pub const CorsairLedGroup_CLG_MemoryModule: CorsairLedGroup = 8;
197pub const CorsairLedGroup_CLG_Motherboard: CorsairLedGroup = 9;
198pub const CorsairLedGroup_CLG_GraphicsCard: CorsairLedGroup = 10;
199pub const CorsairLedGroup_CLG_DIY_Channel1: CorsairLedGroup = 11;
200pub const CorsairLedGroup_CLG_DIY_Channel2: CorsairLedGroup = 12;
201pub const CorsairLedGroup_CLG_DIY_Channel3: CorsairLedGroup = 13;
202pub const CorsairLedGroup_CLG_Touchbar: CorsairLedGroup = 14;
203pub const CorsairLedGroup_CLG_GameController: CorsairLedGroup = 15;
204
205pub type CorsairLedId_Keyboard = c_uint;
207pub const CorsairLedId_Keyboard_CLK_Invalid: CorsairLedId_Keyboard = 0;
208pub const CorsairLedId_Keyboard_CLK_Escape: CorsairLedId_Keyboard = 1;
209pub const CorsairLedId_Keyboard_CLK_F1: CorsairLedId_Keyboard = 2;
210pub const CorsairLedId_Keyboard_CLK_F2: CorsairLedId_Keyboard = 3;
211pub const CorsairLedId_Keyboard_CLK_F3: CorsairLedId_Keyboard = 4;
212pub const CorsairLedId_Keyboard_CLK_F4: CorsairLedId_Keyboard = 5;
213pub const CorsairLedId_Keyboard_CLK_F5: CorsairLedId_Keyboard = 6;
214pub const CorsairLedId_Keyboard_CLK_F6: CorsairLedId_Keyboard = 7;
215pub const CorsairLedId_Keyboard_CLK_F7: CorsairLedId_Keyboard = 8;
216pub const CorsairLedId_Keyboard_CLK_F8: CorsairLedId_Keyboard = 9;
217pub const CorsairLedId_Keyboard_CLK_F9: CorsairLedId_Keyboard = 10;
218pub const CorsairLedId_Keyboard_CLK_F10: CorsairLedId_Keyboard = 11;
219pub const CorsairLedId_Keyboard_CLK_F11: CorsairLedId_Keyboard = 12;
220pub const CorsairLedId_Keyboard_CLK_F12: CorsairLedId_Keyboard = 13;
221pub const CorsairLedId_Keyboard_CLK_GraveAccentAndTilde: CorsairLedId_Keyboard = 14;
222pub const CorsairLedId_Keyboard_CLK_1: CorsairLedId_Keyboard = 15;
223pub const CorsairLedId_Keyboard_CLK_2: CorsairLedId_Keyboard = 16;
224pub const CorsairLedId_Keyboard_CLK_3: CorsairLedId_Keyboard = 17;
225pub const CorsairLedId_Keyboard_CLK_4: CorsairLedId_Keyboard = 18;
226pub const CorsairLedId_Keyboard_CLK_5: CorsairLedId_Keyboard = 19;
227pub const CorsairLedId_Keyboard_CLK_6: CorsairLedId_Keyboard = 20;
228pub const CorsairLedId_Keyboard_CLK_7: CorsairLedId_Keyboard = 21;
229pub const CorsairLedId_Keyboard_CLK_8: CorsairLedId_Keyboard = 22;
230pub const CorsairLedId_Keyboard_CLK_9: CorsairLedId_Keyboard = 23;
231pub const CorsairLedId_Keyboard_CLK_0: CorsairLedId_Keyboard = 24;
232pub const CorsairLedId_Keyboard_CLK_MinusAndUnderscore: CorsairLedId_Keyboard = 25;
233pub const CorsairLedId_Keyboard_CLK_EqualsAndPlus: CorsairLedId_Keyboard = 26;
234pub const CorsairLedId_Keyboard_CLK_Backspace: CorsairLedId_Keyboard = 27;
235pub const CorsairLedId_Keyboard_CLK_Tab: CorsairLedId_Keyboard = 28;
236pub const CorsairLedId_Keyboard_CLK_Q: CorsairLedId_Keyboard = 29;
237pub const CorsairLedId_Keyboard_CLK_W: CorsairLedId_Keyboard = 30;
238pub const CorsairLedId_Keyboard_CLK_E: CorsairLedId_Keyboard = 31;
239pub const CorsairLedId_Keyboard_CLK_R: CorsairLedId_Keyboard = 32;
240pub const CorsairLedId_Keyboard_CLK_T: CorsairLedId_Keyboard = 33;
241pub const CorsairLedId_Keyboard_CLK_Y: CorsairLedId_Keyboard = 34;
242pub const CorsairLedId_Keyboard_CLK_U: CorsairLedId_Keyboard = 35;
243pub const CorsairLedId_Keyboard_CLK_I: CorsairLedId_Keyboard = 36;
244pub const CorsairLedId_Keyboard_CLK_O: CorsairLedId_Keyboard = 37;
245pub const CorsairLedId_Keyboard_CLK_P: CorsairLedId_Keyboard = 38;
246pub const CorsairLedId_Keyboard_CLK_BracketLeft: CorsairLedId_Keyboard = 39;
247pub const CorsairLedId_Keyboard_CLK_BracketRight: CorsairLedId_Keyboard = 40;
248pub const CorsairLedId_Keyboard_CLK_CapsLock: CorsairLedId_Keyboard = 41;
249pub const CorsairLedId_Keyboard_CLK_A: CorsairLedId_Keyboard = 42;
250pub const CorsairLedId_Keyboard_CLK_S: CorsairLedId_Keyboard = 43;
251pub const CorsairLedId_Keyboard_CLK_D: CorsairLedId_Keyboard = 44;
252pub const CorsairLedId_Keyboard_CLK_F: CorsairLedId_Keyboard = 45;
253pub const CorsairLedId_Keyboard_CLK_G: CorsairLedId_Keyboard = 46;
254pub const CorsairLedId_Keyboard_CLK_H: CorsairLedId_Keyboard = 47;
255pub const CorsairLedId_Keyboard_CLK_J: CorsairLedId_Keyboard = 48;
256pub const CorsairLedId_Keyboard_CLK_K: CorsairLedId_Keyboard = 49;
257pub const CorsairLedId_Keyboard_CLK_L: CorsairLedId_Keyboard = 50;
258pub const CorsairLedId_Keyboard_CLK_SemicolonAndColon: CorsairLedId_Keyboard = 51;
259pub const CorsairLedId_Keyboard_CLK_ApostropheAndDoubleQuote: CorsairLedId_Keyboard = 52;
260pub const CorsairLedId_Keyboard_CLK_Backslash: CorsairLedId_Keyboard = 53;
261pub const CorsairLedId_Keyboard_CLK_Enter: CorsairLedId_Keyboard = 54;
262pub const CorsairLedId_Keyboard_CLK_LeftShift: CorsairLedId_Keyboard = 55;
263pub const CorsairLedId_Keyboard_CLK_NonUsBackslash: CorsairLedId_Keyboard = 56;
264pub const CorsairLedId_Keyboard_CLK_Z: CorsairLedId_Keyboard = 57;
265pub const CorsairLedId_Keyboard_CLK_X: CorsairLedId_Keyboard = 58;
266pub const CorsairLedId_Keyboard_CLK_C: CorsairLedId_Keyboard = 59;
267pub const CorsairLedId_Keyboard_CLK_V: CorsairLedId_Keyboard = 60;
268pub const CorsairLedId_Keyboard_CLK_B: CorsairLedId_Keyboard = 61;
269pub const CorsairLedId_Keyboard_CLK_N: CorsairLedId_Keyboard = 62;
270pub const CorsairLedId_Keyboard_CLK_M: CorsairLedId_Keyboard = 63;
271pub const CorsairLedId_Keyboard_CLK_CommaAndLessThan: CorsairLedId_Keyboard = 64;
272pub const CorsairLedId_Keyboard_CLK_PeriodAndBiggerThan: CorsairLedId_Keyboard = 65;
273pub const CorsairLedId_Keyboard_CLK_SlashAndQuestionMark: CorsairLedId_Keyboard = 66;
274pub const CorsairLedId_Keyboard_CLK_RightShift: CorsairLedId_Keyboard = 67;
275pub const CorsairLedId_Keyboard_CLK_LeftCtrl: CorsairLedId_Keyboard = 68;
276pub const CorsairLedId_Keyboard_CLK_LeftGui: CorsairLedId_Keyboard = 69;
277pub const CorsairLedId_Keyboard_CLK_LeftAlt: CorsairLedId_Keyboard = 70;
278pub const CorsairLedId_Keyboard_CLK_Space: CorsairLedId_Keyboard = 71;
279pub const CorsairLedId_Keyboard_CLK_RightAlt: CorsairLedId_Keyboard = 72;
280pub const CorsairLedId_Keyboard_CLK_RightGui: CorsairLedId_Keyboard = 73;
281pub const CorsairLedId_Keyboard_CLK_Application: CorsairLedId_Keyboard = 74;
282pub const CorsairLedId_Keyboard_CLK_RightCtrl: CorsairLedId_Keyboard = 75;
283pub const CorsairLedId_Keyboard_CLK_LedProgramming: CorsairLedId_Keyboard = 76;
284pub const CorsairLedId_Keyboard_CLK_Lang1: CorsairLedId_Keyboard = 77;
285pub const CorsairLedId_Keyboard_CLK_Lang2: CorsairLedId_Keyboard = 78;
286pub const CorsairLedId_Keyboard_CLK_International1: CorsairLedId_Keyboard = 79;
287pub const CorsairLedId_Keyboard_CLK_International2: CorsairLedId_Keyboard = 80;
288pub const CorsairLedId_Keyboard_CLK_International3: CorsairLedId_Keyboard = 81;
289pub const CorsairLedId_Keyboard_CLK_International4: CorsairLedId_Keyboard = 82;
290pub const CorsairLedId_Keyboard_CLK_International5: CorsairLedId_Keyboard = 83;
291pub const CorsairLedId_Keyboard_CLK_PrintScreen: CorsairLedId_Keyboard = 84;
292pub const CorsairLedId_Keyboard_CLK_ScrollLock: CorsairLedId_Keyboard = 85;
293pub const CorsairLedId_Keyboard_CLK_PauseBreak: CorsairLedId_Keyboard = 86;
294pub const CorsairLedId_Keyboard_CLK_Insert: CorsairLedId_Keyboard = 87;
295pub const CorsairLedId_Keyboard_CLK_Home: CorsairLedId_Keyboard = 88;
296pub const CorsairLedId_Keyboard_CLK_PageUp: CorsairLedId_Keyboard = 89;
297pub const CorsairLedId_Keyboard_CLK_Delete: CorsairLedId_Keyboard = 90;
298pub const CorsairLedId_Keyboard_CLK_End: CorsairLedId_Keyboard = 91;
299pub const CorsairLedId_Keyboard_CLK_PageDown: CorsairLedId_Keyboard = 92;
300pub const CorsairLedId_Keyboard_CLK_UpArrow: CorsairLedId_Keyboard = 93;
301pub const CorsairLedId_Keyboard_CLK_LeftArrow: CorsairLedId_Keyboard = 94;
302pub const CorsairLedId_Keyboard_CLK_DownArrow: CorsairLedId_Keyboard = 95;
303pub const CorsairLedId_Keyboard_CLK_RightArrow: CorsairLedId_Keyboard = 96;
304pub const CorsairLedId_Keyboard_CLK_NonUsTilde: CorsairLedId_Keyboard = 97;
305pub const CorsairLedId_Keyboard_CLK_Brightness: CorsairLedId_Keyboard = 98;
306pub const CorsairLedId_Keyboard_CLK_WinLock: CorsairLedId_Keyboard = 99;
307pub const CorsairLedId_Keyboard_CLK_Mute: CorsairLedId_Keyboard = 100;
308pub const CorsairLedId_Keyboard_CLK_Stop: CorsairLedId_Keyboard = 101;
309pub const CorsairLedId_Keyboard_CLK_ScanPreviousTrack: CorsairLedId_Keyboard = 102;
310pub const CorsairLedId_Keyboard_CLK_PlayPause: CorsairLedId_Keyboard = 103;
311pub const CorsairLedId_Keyboard_CLK_ScanNextTrack: CorsairLedId_Keyboard = 104;
312pub const CorsairLedId_Keyboard_CLK_NumLock: CorsairLedId_Keyboard = 105;
313pub const CorsairLedId_Keyboard_CLK_KeypadSlash: CorsairLedId_Keyboard = 106;
314pub const CorsairLedId_Keyboard_CLK_KeypadAsterisk: CorsairLedId_Keyboard = 107;
315pub const CorsairLedId_Keyboard_CLK_KeypadMinus: CorsairLedId_Keyboard = 108;
316pub const CorsairLedId_Keyboard_CLK_Keypad7: CorsairLedId_Keyboard = 109;
317pub const CorsairLedId_Keyboard_CLK_Keypad8: CorsairLedId_Keyboard = 110;
318pub const CorsairLedId_Keyboard_CLK_Keypad9: CorsairLedId_Keyboard = 111;
319pub const CorsairLedId_Keyboard_CLK_KeypadPlus: CorsairLedId_Keyboard = 112;
320pub const CorsairLedId_Keyboard_CLK_Keypad4: CorsairLedId_Keyboard = 113;
321pub const CorsairLedId_Keyboard_CLK_Keypad5: CorsairLedId_Keyboard = 114;
322pub const CorsairLedId_Keyboard_CLK_Keypad6: CorsairLedId_Keyboard = 115;
323pub const CorsairLedId_Keyboard_CLK_Keypad1: CorsairLedId_Keyboard = 116;
324pub const CorsairLedId_Keyboard_CLK_Keypad2: CorsairLedId_Keyboard = 117;
325pub const CorsairLedId_Keyboard_CLK_Keypad3: CorsairLedId_Keyboard = 118;
326pub const CorsairLedId_Keyboard_CLK_KeypadComma: CorsairLedId_Keyboard = 119;
327pub const CorsairLedId_Keyboard_CLK_KeypadEnter: CorsairLedId_Keyboard = 120;
328pub const CorsairLedId_Keyboard_CLK_Keypad0: CorsairLedId_Keyboard = 121;
329pub const CorsairLedId_Keyboard_CLK_KeypadPeriodAndDelete: CorsairLedId_Keyboard = 122;
330pub const CorsairLedId_Keyboard_CLK_VolumeUp: CorsairLedId_Keyboard = 123;
331pub const CorsairLedId_Keyboard_CLK_VolumeDown: CorsairLedId_Keyboard = 124;
332pub const CorsairLedId_Keyboard_CLK_MR: CorsairLedId_Keyboard = 125;
333pub const CorsairLedId_Keyboard_CLK_M1: CorsairLedId_Keyboard = 126;
334pub const CorsairLedId_Keyboard_CLK_M2: CorsairLedId_Keyboard = 127;
335pub const CorsairLedId_Keyboard_CLK_M3: CorsairLedId_Keyboard = 128;
336pub const CorsairLedId_Keyboard_CLK_Fn: CorsairLedId_Keyboard = 129;
337
338#[repr(C)]
341#[derive(Debug, Copy, Clone)]
342pub struct CorsairVersion {
343 pub major: c_int,
344 pub minor: c_int,
345 pub patch: c_int,
346}
347#[allow(clippy::unnecessary_operation, clippy::identity_op)]
348const _: () = {
349 ["Size of CorsairVersion"][::std::mem::size_of::<CorsairVersion>() - 12usize];
350 ["Alignment of CorsairVersion"][::std::mem::align_of::<CorsairVersion>() - 4usize];
351 ["Offset of field: CorsairVersion::major"]
352 [::std::mem::offset_of!(CorsairVersion, major) - 0usize];
353 ["Offset of field: CorsairVersion::minor"]
354 [::std::mem::offset_of!(CorsairVersion, minor) - 4usize];
355 ["Offset of field: CorsairVersion::patch"]
356 [::std::mem::offset_of!(CorsairVersion, patch) - 8usize];
357};
358
359#[repr(C)]
360#[derive(Debug, Copy, Clone)]
361pub struct CorsairSessionDetails {
362 pub clientVersion: CorsairVersion,
363 pub serverVersion: CorsairVersion,
364 pub serverHostVersion: CorsairVersion,
365}
366#[allow(clippy::unnecessary_operation, clippy::identity_op)]
367const _: () = {
368 ["Size of CorsairSessionDetails"][::std::mem::size_of::<CorsairSessionDetails>() - 36usize];
369 ["Alignment of CorsairSessionDetails"]
370 [::std::mem::align_of::<CorsairSessionDetails>() - 4usize];
371 ["Offset of field: CorsairSessionDetails::clientVersion"]
372 [::std::mem::offset_of!(CorsairSessionDetails, clientVersion) - 0usize];
373 ["Offset of field: CorsairSessionDetails::serverVersion"]
374 [::std::mem::offset_of!(CorsairSessionDetails, serverVersion) - 12usize];
375 ["Offset of field: CorsairSessionDetails::serverHostVersion"]
376 [::std::mem::offset_of!(CorsairSessionDetails, serverHostVersion) - 24usize];
377};
378
379#[repr(C)]
380#[derive(Debug, Copy, Clone)]
381pub struct CorsairSessionStateChanged {
382 pub state: CorsairSessionState,
383 pub details: CorsairSessionDetails,
384}
385#[allow(clippy::unnecessary_operation, clippy::identity_op)]
386const _: () = {
387 ["Size of CorsairSessionStateChanged"]
388 [::std::mem::size_of::<CorsairSessionStateChanged>() - 40usize];
389 ["Alignment of CorsairSessionStateChanged"]
390 [::std::mem::align_of::<CorsairSessionStateChanged>() - 4usize];
391 ["Offset of field: CorsairSessionStateChanged::state"]
392 [::std::mem::offset_of!(CorsairSessionStateChanged, state) - 0usize];
393 ["Offset of field: CorsairSessionStateChanged::details"]
394 [::std::mem::offset_of!(CorsairSessionStateChanged, details) - 4usize];
395};
396
397#[repr(C)]
398#[derive(Debug, Copy, Clone)]
399pub struct CorsairDeviceInfo {
400 pub type_: CorsairDeviceType,
401 pub id: CorsairDeviceId,
402 pub serial: [c_char; 128usize],
403 pub model: [c_char; 128usize],
404 pub ledCount: c_int,
405 pub channelCount: c_int,
406}
407#[allow(clippy::unnecessary_operation, clippy::identity_op)]
408const _: () = {
409 ["Size of CorsairDeviceInfo"][::std::mem::size_of::<CorsairDeviceInfo>() - 396usize];
410 ["Alignment of CorsairDeviceInfo"][::std::mem::align_of::<CorsairDeviceInfo>() - 4usize];
411 ["Offset of field: CorsairDeviceInfo::type_"]
412 [::std::mem::offset_of!(CorsairDeviceInfo, type_) - 0usize];
413 ["Offset of field: CorsairDeviceInfo::id"]
414 [::std::mem::offset_of!(CorsairDeviceInfo, id) - 4usize];
415 ["Offset of field: CorsairDeviceInfo::serial"]
416 [::std::mem::offset_of!(CorsairDeviceInfo, serial) - 132usize];
417 ["Offset of field: CorsairDeviceInfo::model"]
418 [::std::mem::offset_of!(CorsairDeviceInfo, model) - 260usize];
419 ["Offset of field: CorsairDeviceInfo::ledCount"]
420 [::std::mem::offset_of!(CorsairDeviceInfo, ledCount) - 388usize];
421 ["Offset of field: CorsairDeviceInfo::channelCount"]
422 [::std::mem::offset_of!(CorsairDeviceInfo, channelCount) - 392usize];
423};
424
425#[repr(C)]
426#[derive(Debug, Copy, Clone)]
427pub struct CorsairLedPosition {
428 pub id: CorsairLedLuid,
429 pub cx: f64,
430 pub cy: f64,
431}
432#[allow(clippy::unnecessary_operation, clippy::identity_op)]
433const _: () = {
434 ["Size of CorsairLedPosition"][::std::mem::size_of::<CorsairLedPosition>() - 24usize];
435 ["Alignment of CorsairLedPosition"][::std::mem::align_of::<CorsairLedPosition>() - 8usize];
436 ["Offset of field: CorsairLedPosition::id"]
437 [::std::mem::offset_of!(CorsairLedPosition, id) - 0usize];
438 ["Offset of field: CorsairLedPosition::cx"]
439 [::std::mem::offset_of!(CorsairLedPosition, cx) - 8usize];
440 ["Offset of field: CorsairLedPosition::cy"]
441 [::std::mem::offset_of!(CorsairLedPosition, cy) - 16usize];
442};
443
444#[repr(C)]
445#[derive(Debug, Copy, Clone)]
446pub struct CorsairDeviceFilter {
447 pub deviceTypeMask: c_int,
448}
449#[allow(clippy::unnecessary_operation, clippy::identity_op)]
450const _: () = {
451 ["Size of CorsairDeviceFilter"][::std::mem::size_of::<CorsairDeviceFilter>() - 4usize];
452 ["Alignment of CorsairDeviceFilter"][::std::mem::align_of::<CorsairDeviceFilter>() - 4usize];
453 ["Offset of field: CorsairDeviceFilter::deviceTypeMask"]
454 [::std::mem::offset_of!(CorsairDeviceFilter, deviceTypeMask) - 0usize];
455};
456
457#[repr(C)]
458#[derive(Debug, Copy, Clone)]
459pub struct CorsairDeviceConnectionStatusChangedEvent {
460 pub deviceId: CorsairDeviceId,
461 pub isConnected: bool,
462}
463#[allow(clippy::unnecessary_operation, clippy::identity_op)]
464const _: () = {
465 ["Size of CorsairDeviceConnectionStatusChangedEvent"]
466 [::std::mem::size_of::<CorsairDeviceConnectionStatusChangedEvent>() - 129usize];
467 ["Alignment of CorsairDeviceConnectionStatusChangedEvent"]
468 [::std::mem::align_of::<CorsairDeviceConnectionStatusChangedEvent>() - 1usize];
469 ["Offset of field: CorsairDeviceConnectionStatusChangedEvent::deviceId"]
470 [::std::mem::offset_of!(CorsairDeviceConnectionStatusChangedEvent, deviceId) - 0usize];
471 ["Offset of field: CorsairDeviceConnectionStatusChangedEvent::isConnected"]
472 [::std::mem::offset_of!(CorsairDeviceConnectionStatusChangedEvent, isConnected) - 128usize];
473};
474
475#[repr(C)]
476#[derive(Debug, Copy, Clone)]
477pub struct CorsairKeyEvent {
478 pub deviceId: CorsairDeviceId,
479 pub keyId: CorsairMacroKeyId,
480 pub isPressed: bool,
481}
482#[allow(clippy::unnecessary_operation, clippy::identity_op)]
483const _: () = {
484 ["Size of CorsairKeyEvent"][::std::mem::size_of::<CorsairKeyEvent>() - 136usize];
485 ["Alignment of CorsairKeyEvent"][::std::mem::align_of::<CorsairKeyEvent>() - 4usize];
486 ["Offset of field: CorsairKeyEvent::deviceId"]
487 [::std::mem::offset_of!(CorsairKeyEvent, deviceId) - 0usize];
488 ["Offset of field: CorsairKeyEvent::keyId"]
489 [::std::mem::offset_of!(CorsairKeyEvent, keyId) - 128usize];
490 ["Offset of field: CorsairKeyEvent::isPressed"]
491 [::std::mem::offset_of!(CorsairKeyEvent, isPressed) - 132usize];
492};
493
494unsafe impl Send for CorsairEventUnion {}
498unsafe impl Sync for CorsairEventUnion {}
499
500#[repr(C)]
501#[derive(Copy, Clone)]
502pub union CorsairEventUnion {
503 pub deviceConnectionStatusChangedEvent: *const CorsairDeviceConnectionStatusChangedEvent,
504 pub keyEvent: *const CorsairKeyEvent,
505}
506#[allow(clippy::unnecessary_operation, clippy::identity_op)]
507const _: () = {
508 ["Size of CorsairEventUnion"][::std::mem::size_of::<CorsairEventUnion>() - 8usize];
509 ["Alignment of CorsairEventUnion"][::std::mem::align_of::<CorsairEventUnion>() - 8usize];
510 ["Offset of field: CorsairEventUnion::deviceConnectionStatusChangedEvent"]
511 [::std::mem::offset_of!(CorsairEventUnion, deviceConnectionStatusChangedEvent) - 0usize];
512 ["Offset of field: CorsairEventUnion::keyEvent"]
513 [::std::mem::offset_of!(CorsairEventUnion, keyEvent) - 0usize];
514};
515
516#[repr(C)]
517#[derive(Copy, Clone)]
518pub struct CorsairEvent {
519 pub id: CorsairEventId,
520 pub event_union: CorsairEventUnion,
521}
522#[allow(clippy::unnecessary_operation, clippy::identity_op)]
523const _: () = {
524 ["Size of CorsairEvent"][::std::mem::size_of::<CorsairEvent>() - 16usize];
525 ["Alignment of CorsairEvent"][::std::mem::align_of::<CorsairEvent>() - 8usize];
526 ["Offset of field: CorsairEvent::id"][::std::mem::offset_of!(CorsairEvent, id) - 0usize];
527};
528
529unsafe impl Send for CorsairDataType_BooleanArray {}
531unsafe impl Sync for CorsairDataType_BooleanArray {}
532
533#[repr(C)]
534#[derive(Debug, Copy, Clone)]
535pub struct CorsairDataType_BooleanArray {
536 pub items: *mut bool,
537 pub count: c_uint,
538}
539#[allow(clippy::unnecessary_operation, clippy::identity_op)]
540const _: () = {
541 ["Size of CorsairDataType_BooleanArray"]
542 [::std::mem::size_of::<CorsairDataType_BooleanArray>() - 16usize];
543 ["Alignment of CorsairDataType_BooleanArray"]
544 [::std::mem::align_of::<CorsairDataType_BooleanArray>() - 8usize];
545 ["Offset of field: CorsairDataType_BooleanArray::items"]
546 [::std::mem::offset_of!(CorsairDataType_BooleanArray, items) - 0usize];
547 ["Offset of field: CorsairDataType_BooleanArray::count"]
548 [::std::mem::offset_of!(CorsairDataType_BooleanArray, count) - 8usize];
549};
550
551unsafe impl Send for CorsairDataType_Int32Array {}
553unsafe impl Sync for CorsairDataType_Int32Array {}
554
555#[repr(C)]
556#[derive(Debug, Copy, Clone)]
557pub struct CorsairDataType_Int32Array {
558 pub items: *mut c_int,
559 pub count: c_uint,
560}
561#[allow(clippy::unnecessary_operation, clippy::identity_op)]
562const _: () = {
563 ["Size of CorsairDataType_Int32Array"]
564 [::std::mem::size_of::<CorsairDataType_Int32Array>() - 16usize];
565 ["Alignment of CorsairDataType_Int32Array"]
566 [::std::mem::align_of::<CorsairDataType_Int32Array>() - 8usize];
567 ["Offset of field: CorsairDataType_Int32Array::items"]
568 [::std::mem::offset_of!(CorsairDataType_Int32Array, items) - 0usize];
569 ["Offset of field: CorsairDataType_Int32Array::count"]
570 [::std::mem::offset_of!(CorsairDataType_Int32Array, count) - 8usize];
571};
572
573unsafe impl Send for CorsairDataType_Float64Array {}
575unsafe impl Sync for CorsairDataType_Float64Array {}
576
577#[repr(C)]
578#[derive(Debug, Copy, Clone)]
579pub struct CorsairDataType_Float64Array {
580 pub items: *mut f64,
581 pub count: c_uint,
582}
583#[allow(clippy::unnecessary_operation, clippy::identity_op)]
584const _: () = {
585 ["Size of CorsairDataType_Float64Array"]
586 [::std::mem::size_of::<CorsairDataType_Float64Array>() - 16usize];
587 ["Alignment of CorsairDataType_Float64Array"]
588 [::std::mem::align_of::<CorsairDataType_Float64Array>() - 8usize];
589 ["Offset of field: CorsairDataType_Float64Array::items"]
590 [::std::mem::offset_of!(CorsairDataType_Float64Array, items) - 0usize];
591 ["Offset of field: CorsairDataType_Float64Array::count"]
592 [::std::mem::offset_of!(CorsairDataType_Float64Array, count) - 8usize];
593};
594
595unsafe impl Send for CorsairDataType_StringArray {}
597unsafe impl Sync for CorsairDataType_StringArray {}
598
599#[repr(C)]
600#[derive(Debug, Copy, Clone)]
601pub struct CorsairDataType_StringArray {
602 pub items: *mut *mut c_char,
603 pub count: c_uint,
604}
605#[allow(clippy::unnecessary_operation, clippy::identity_op)]
606const _: () = {
607 ["Size of CorsairDataType_StringArray"]
608 [::std::mem::size_of::<CorsairDataType_StringArray>() - 16usize];
609 ["Alignment of CorsairDataType_StringArray"]
610 [::std::mem::align_of::<CorsairDataType_StringArray>() - 8usize];
611 ["Offset of field: CorsairDataType_StringArray::items"]
612 [::std::mem::offset_of!(CorsairDataType_StringArray, items) - 0usize];
613 ["Offset of field: CorsairDataType_StringArray::count"]
614 [::std::mem::offset_of!(CorsairDataType_StringArray, count) - 8usize];
615};
616
617unsafe impl Send for CorsairDataValue {}
619unsafe impl Sync for CorsairDataValue {}
620
621#[repr(C)]
622#[derive(Copy, Clone)]
623pub union CorsairDataValue {
624 pub boolean: bool,
625 pub int32: c_int,
626 pub float64: f64,
627 pub string: *mut c_char,
628 pub boolean_array: CorsairDataType_BooleanArray,
629 pub int32_array: CorsairDataType_Int32Array,
630 pub float64_array: CorsairDataType_Float64Array,
631 pub string_array: CorsairDataType_StringArray,
632}
633#[allow(clippy::unnecessary_operation, clippy::identity_op)]
634const _: () = {
635 ["Size of CorsairDataValue"][::std::mem::size_of::<CorsairDataValue>() - 16usize];
636 ["Alignment of CorsairDataValue"][::std::mem::align_of::<CorsairDataValue>() - 8usize];
637 ["Offset of field: CorsairDataValue::boolean"]
638 [::std::mem::offset_of!(CorsairDataValue, boolean) - 0usize];
639 ["Offset of field: CorsairDataValue::int32"]
640 [::std::mem::offset_of!(CorsairDataValue, int32) - 0usize];
641 ["Offset of field: CorsairDataValue::float64"]
642 [::std::mem::offset_of!(CorsairDataValue, float64) - 0usize];
643 ["Offset of field: CorsairDataValue::string"]
644 [::std::mem::offset_of!(CorsairDataValue, string) - 0usize];
645 ["Offset of field: CorsairDataValue::boolean_array"]
646 [::std::mem::offset_of!(CorsairDataValue, boolean_array) - 0usize];
647 ["Offset of field: CorsairDataValue::int32_array"]
648 [::std::mem::offset_of!(CorsairDataValue, int32_array) - 0usize];
649 ["Offset of field: CorsairDataValue::float64_array"]
650 [::std::mem::offset_of!(CorsairDataValue, float64_array) - 0usize];
651 ["Offset of field: CorsairDataValue::string_array"]
652 [::std::mem::offset_of!(CorsairDataValue, string_array) - 0usize];
653};
654
655unsafe impl Send for CorsairProperty {}
657unsafe impl Sync for CorsairProperty {}
658
659#[repr(C)]
660#[derive(Copy, Clone)]
661pub struct CorsairProperty {
662 pub type_: CorsairDataType,
663 pub value: CorsairDataValue,
664}
665#[allow(clippy::unnecessary_operation, clippy::identity_op)]
666const _: () = {
667 ["Size of CorsairProperty"][::std::mem::size_of::<CorsairProperty>() - 24usize];
668 ["Alignment of CorsairProperty"][::std::mem::align_of::<CorsairProperty>() - 8usize];
669 ["Offset of field: CorsairProperty::type_"]
670 [::std::mem::offset_of!(CorsairProperty, type_) - 0usize];
671 ["Offset of field: CorsairProperty::value"]
672 [::std::mem::offset_of!(CorsairProperty, value) - 8usize];
673};
674
675#[repr(C)]
676#[derive(Debug, Copy, Clone)]
677pub struct CorsairLedColor {
678 pub id: CorsairLedLuid,
679 pub r: c_uchar,
680 pub g: c_uchar,
681 pub b: c_uchar,
682 pub a: c_uchar,
683}
684#[allow(clippy::unnecessary_operation, clippy::identity_op)]
685const _: () = {
686 ["Size of CorsairLedColor"][::std::mem::size_of::<CorsairLedColor>() - 8usize];
687 ["Alignment of CorsairLedColor"][::std::mem::align_of::<CorsairLedColor>() - 4usize];
688 ["Offset of field: CorsairLedColor::id"][::std::mem::offset_of!(CorsairLedColor, id) - 0usize];
689 ["Offset of field: CorsairLedColor::r"][::std::mem::offset_of!(CorsairLedColor, r) - 4usize];
690 ["Offset of field: CorsairLedColor::g"][::std::mem::offset_of!(CorsairLedColor, g) - 5usize];
691 ["Offset of field: CorsairLedColor::b"][::std::mem::offset_of!(CorsairLedColor, b) - 6usize];
692 ["Offset of field: CorsairLedColor::a"][::std::mem::offset_of!(CorsairLedColor, a) - 7usize];
693};
694
695#[repr(C)]
696#[derive(Debug, Copy, Clone)]
697pub struct CorsairKeyEventConfiguration {
698 pub keyId: CorsairMacroKeyId,
699 pub isIntercepted: bool,
700}
701#[allow(clippy::unnecessary_operation, clippy::identity_op)]
702const _: () = {
703 ["Size of CorsairKeyEventConfiguration"]
704 [::std::mem::size_of::<CorsairKeyEventConfiguration>() - 8usize];
705 ["Alignment of CorsairKeyEventConfiguration"]
706 [::std::mem::align_of::<CorsairKeyEventConfiguration>() - 4usize];
707 ["Offset of field: CorsairKeyEventConfiguration::keyId"]
708 [::std::mem::offset_of!(CorsairKeyEventConfiguration, keyId) - 0usize];
709 ["Offset of field: CorsairKeyEventConfiguration::isIntercepted"]
710 [::std::mem::offset_of!(CorsairKeyEventConfiguration, isIntercepted) - 4usize];
711};
712
713pub type CorsairSessionStateChangedHandler = ::std::option::Option<
716 unsafe extern "C" fn(context: *mut c_void, eventData: *const CorsairSessionStateChanged),
717>;
718
719pub type CorsairAsyncCallback =
720 ::std::option::Option<unsafe extern "C" fn(context: *mut c_void, error: CorsairError)>;
721
722pub type CorsairEventHandler =
723 ::std::option::Option<unsafe extern "C" fn(context: *mut c_void, event: *const CorsairEvent)>;
724
725unsafe extern "C" {
728 #[must_use]
729 pub fn CorsairConnect(
730 onStateChanged: CorsairSessionStateChangedHandler,
731 context: *mut c_void,
732 ) -> CorsairError;
733
734 #[must_use]
735 pub fn CorsairGetSessionDetails(details: *mut CorsairSessionDetails) -> CorsairError;
736
737 #[must_use]
738 pub fn CorsairDisconnect() -> CorsairError;
739
740 #[must_use]
741 pub fn CorsairGetDevices(
742 filter: *const CorsairDeviceFilter,
743 sizeMax: c_int,
744 devices: *mut CorsairDeviceInfo,
745 size: *mut c_int,
746 ) -> CorsairError;
747
748 #[must_use]
749 pub fn CorsairGetDeviceInfo(
750 deviceId: *const c_char,
751 deviceInfo: *mut CorsairDeviceInfo,
752 ) -> CorsairError;
753
754 #[must_use]
755 pub fn CorsairGetLedPositions(
756 deviceId: *const c_char,
757 sizeMax: c_int,
758 ledPositions: *mut CorsairLedPosition,
759 size: *mut c_int,
760 ) -> CorsairError;
761
762 #[must_use]
763 pub fn CorsairSubscribeForEvents(
764 onEvent: CorsairEventHandler,
765 context: *mut c_void,
766 ) -> CorsairError;
767
768 #[must_use]
769 pub fn CorsairUnsubscribeFromEvents() -> CorsairError;
770
771 #[must_use]
772 pub fn CorsairConfigureKeyEvent(
773 deviceId: *const c_char,
774 config: *const CorsairKeyEventConfiguration,
775 ) -> CorsairError;
776
777 #[must_use]
778 pub fn CorsairGetDevicePropertyInfo(
779 deviceId: *const c_char,
780 propertyId: CorsairDevicePropertyId,
781 index: c_uint,
782 dataType: *mut CorsairDataType,
783 flags: *mut c_uint,
784 ) -> CorsairError;
785
786 #[must_use]
787 pub fn CorsairReadDeviceProperty(
788 deviceId: *const c_char,
789 propertyId: CorsairDevicePropertyId,
790 index: c_uint,
791 property: *mut CorsairProperty,
792 ) -> CorsairError;
793
794 #[must_use]
795 pub fn CorsairWriteDeviceProperty(
796 deviceId: *const c_char,
797 propertyId: CorsairDevicePropertyId,
798 index: c_uint,
799 property: *const CorsairProperty,
800 ) -> CorsairError;
801
802 #[must_use]
803 pub fn CorsairFreeProperty(property: *mut CorsairProperty) -> CorsairError;
804
805 #[must_use]
806 pub fn CorsairSetLedColors(
807 deviceId: *const c_char,
808 size: c_int,
809 ledColors: *const CorsairLedColor,
810 ) -> CorsairError;
811
812 #[must_use]
813 pub fn CorsairSetLedColorsBuffer(
814 deviceId: *const c_char,
815 size: c_int,
816 ledColors: *const CorsairLedColor,
817 ) -> CorsairError;
818
819 #[must_use]
820 pub fn CorsairSetLedColorsFlushBufferAsync(
821 callback: CorsairAsyncCallback,
822 context: *mut c_void,
823 ) -> CorsairError;
824
825 #[must_use]
826 pub fn CorsairGetLedColors(
827 deviceId: *const c_char,
828 size: c_int,
829 ledColors: *mut CorsairLedColor,
830 ) -> CorsairError;
831
832 #[must_use]
833 pub fn CorsairSetLayerPriority(priority: c_uint) -> CorsairError;
834
835 #[must_use]
836 pub fn CorsairGetLedLuidForKeyName(
837 deviceId: *const c_char,
838 keyName: c_char,
839 ledId: *mut CorsairLedLuid,
840 ) -> CorsairError;
841
842 #[must_use]
843 pub fn CorsairRequestControl(
844 deviceId: *const c_char,
845 accessLevel: CorsairAccessLevel,
846 ) -> CorsairError;
847
848 #[must_use]
849 pub fn CorsairReleaseControl(deviceId: *const c_char) -> CorsairError;
850}