1
2
3
/* automatically generated by rust-bindgen */

pub const _STDINT_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; pub const __USE_ISOC11 : u32 = 1 ; pub const __USE_ISOC99 : u32 = 1 ; pub const __USE_ISOC95 : u32 = 1 ; pub const __USE_POSIX_IMPLICITLY : u32 = 1 ; pub const _POSIX_SOURCE : u32 = 1 ; pub const _POSIX_C_SOURCE : u32 = 200809 ; pub const __USE_POSIX : u32 = 1 ; pub const __USE_POSIX2 : u32 = 1 ; pub const __USE_POSIX199309 : u32 = 1 ; pub const __USE_POSIX199506 : u32 = 1 ; pub const __USE_XOPEN2K : u32 = 1 ; pub const __USE_XOPEN2K8 : u32 = 1 ; pub const _ATFILE_SOURCE : u32 = 1 ; pub const __USE_MISC : u32 = 1 ; pub const __USE_ATFILE : u32 = 1 ; pub const __USE_FORTIFY_LEVEL : u32 = 0 ; pub const __GLIBC_USE_DEPRECATED_GETS : u32 = 0 ; pub const _STDC_PREDEF_H : u32 = 1 ; pub const __STDC_IEC_559__ : u32 = 1 ; pub const __STDC_IEC_559_COMPLEX__ : u32 = 1 ; pub const __STDC_ISO_10646__ : u32 = 201706 ; pub const __STDC_NO_THREADS__ : u32 = 1 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 27 ; pub const _SYS_CDEFS_H : u32 = 1 ; pub const __glibc_c99_flexarr_available : u32 = 1 ; pub const __WORDSIZE : u32 = 64 ; pub const __WORDSIZE_TIME64_COMPAT32 : u32 = 1 ; pub const __SYSCALL_WORDSIZE : u32 = 64 ; pub const __HAVE_GENERIC_SELECTION : u32 = 1 ; pub const __GLIBC_USE_LIB_EXT2 : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_BFP_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_FUNCS_EXT : u32 = 0 ; pub const __GLIBC_USE_IEC_60559_TYPES_EXT : u32 = 0 ; pub const _BITS_TYPES_H : u32 = 1 ; pub const _BITS_TYPESIZES_H : u32 = 1 ; pub const __OFF_T_MATCHES_OFF64_T : u32 = 1 ; pub const __INO_T_MATCHES_INO64_T : u32 = 1 ; pub const __RLIM_T_MATCHES_RLIM64_T : u32 = 1 ; pub const __FD_SETSIZE : u32 = 1024 ; pub const _BITS_WCHAR_H : u32 = 1 ; pub const _BITS_STDINT_INTN_H : u32 = 1 ; pub const _BITS_STDINT_UINTN_H : u32 = 1 ; pub const INT8_MIN : i32 = -128 ; pub const INT16_MIN : i32 = -32768 ; pub const INT32_MIN : i32 = -2147483648 ; pub const INT8_MAX : u32 = 127 ; pub const INT16_MAX : u32 = 32767 ; pub const INT32_MAX : u32 = 2147483647 ; pub const UINT8_MAX : u32 = 255 ; pub const UINT16_MAX : u32 = 65535 ; pub const UINT32_MAX : u32 = 4294967295 ; pub const INT_LEAST8_MIN : i32 = -128 ; pub const INT_LEAST16_MIN : i32 = -32768 ; pub const INT_LEAST32_MIN : i32 = -2147483648 ; pub const INT_LEAST8_MAX : u32 = 127 ; pub const INT_LEAST16_MAX : u32 = 32767 ; pub const INT_LEAST32_MAX : u32 = 2147483647 ; pub const UINT_LEAST8_MAX : u32 = 255 ; pub const UINT_LEAST16_MAX : u32 = 65535 ; pub const UINT_LEAST32_MAX : u32 = 4294967295 ; pub const INT_FAST8_MIN : i32 = -128 ; pub const INT_FAST16_MIN : i64 = -9223372036854775808 ; pub const INT_FAST32_MIN : i64 = -9223372036854775808 ; pub const INT_FAST8_MAX : u32 = 127 ; pub const INT_FAST16_MAX : u64 = 9223372036854775807 ; pub const INT_FAST32_MAX : u64 = 9223372036854775807 ; pub const UINT_FAST8_MAX : u32 = 255 ; pub const UINT_FAST16_MAX : i32 = -1 ; pub const UINT_FAST32_MAX : i32 = -1 ; pub const INTPTR_MIN : i64 = -9223372036854775808 ; pub const INTPTR_MAX : u64 = 9223372036854775807 ; pub const UINTPTR_MAX : i32 = -1 ; pub const PTRDIFF_MIN : i64 = -9223372036854775808 ; pub const PTRDIFF_MAX : u64 = 9223372036854775807 ; pub const SIG_ATOMIC_MIN : i32 = -2147483648 ; pub const SIG_ATOMIC_MAX : u32 = 2147483647 ; pub const SIZE_MAX : i32 = -1 ; pub const WINT_MIN : u32 = 0 ; pub const WINT_MAX : u32 = 4294967295 ; pub const true_ : u32 = 1 ; pub const false_ : u32 = 0 ; pub const __bool_true_false_are_defined : u32 = 1 ; pub const WOOTING_RGB_ROWS : u32 = 6 ; pub const WOOTING_RGB_COLS : u32 = 21 ; pub const RGB_RAW_BUFFER_SIZE : u32 = 96 ; pub const WOOTING_RAW_COLORS_REPORT : u32 = 11 ; pub const WOOTING_SINGLE_COLOR_COMMAND : u32 = 30 ; pub const WOOTING_SINGLE_RESET_COMMAND : u32 = 31 ; pub const WOOTING_RESET_ALL_COMMAND : u32 = 32 ; pub const WOOTING_COLOR_INIT_COMMAND : u32 = 33 ; pub type __u_char = :: std :: os :: raw :: c_uchar ; pub type __u_short = :: std :: os :: raw :: c_ushort ; pub type __u_int = :: std :: os :: raw :: c_uint ; pub type __u_long = :: std :: os :: raw :: c_ulong ; pub type __int8_t = :: std :: os :: raw :: c_schar ; pub type __uint8_t = :: std :: os :: raw :: c_uchar ; pub type __int16_t = :: std :: os :: raw :: c_short ; pub type __uint16_t = :: std :: os :: raw :: c_ushort ; pub type __int32_t = :: std :: os :: raw :: c_int ; pub type __uint32_t = :: std :: os :: raw :: c_uint ; pub type __int64_t = :: std :: os :: raw :: c_long ; pub type __uint64_t = :: std :: os :: raw :: c_ulong ; pub type __quad_t = :: std :: os :: raw :: c_long ; pub type __u_quad_t = :: std :: os :: raw :: c_ulong ; pub type __intmax_t = :: std :: os :: raw :: c_long ; pub type __uintmax_t = :: std :: os :: raw :: c_ulong ; pub type __dev_t = :: std :: os :: raw :: c_ulong ; pub type __uid_t = :: std :: os :: raw :: c_uint ; pub type __gid_t = :: std :: os :: raw :: c_uint ; pub type __ino_t = :: std :: os :: raw :: c_ulong ; pub type __ino64_t = :: std :: os :: raw :: c_ulong ; pub type __mode_t = :: std :: os :: raw :: c_uint ; pub type __nlink_t = :: std :: os :: raw :: c_ulong ; pub type __off_t = :: std :: os :: raw :: c_long ; pub type __off64_t = :: std :: os :: raw :: c_long ; pub type __pid_t = :: std :: os :: raw :: c_int ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct __fsid_t { pub __val : [ :: std :: os :: raw :: c_int ; 2usize ] , } # [ test ] fn bindgen_test_layout___fsid_t ( ) { assert_eq ! ( :: std :: mem :: size_of :: < __fsid_t > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( __fsid_t ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < __fsid_t > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( __fsid_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < __fsid_t > ( ) ) ) . __val as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( __fsid_t ) , "::" , stringify ! ( __val ) ) ) ; } pub type __clock_t = :: std :: os :: raw :: c_long ; pub type __rlim_t = :: std :: os :: raw :: c_ulong ; pub type __rlim64_t = :: std :: os :: raw :: c_ulong ; pub type __id_t = :: std :: os :: raw :: c_uint ; pub type __time_t = :: std :: os :: raw :: c_long ; pub type __useconds_t = :: std :: os :: raw :: c_uint ; pub type __suseconds_t = :: std :: os :: raw :: c_long ; pub type __daddr_t = :: std :: os :: raw :: c_int ; pub type __key_t = :: std :: os :: raw :: c_int ; pub type __clockid_t = :: std :: os :: raw :: c_int ; pub type __timer_t = * mut :: std :: os :: raw :: c_void ; pub type __blksize_t = :: std :: os :: raw :: c_long ; pub type __blkcnt_t = :: std :: os :: raw :: c_long ; pub type __blkcnt64_t = :: std :: os :: raw :: c_long ; pub type __fsblkcnt_t = :: std :: os :: raw :: c_ulong ; pub type __fsblkcnt64_t = :: std :: os :: raw :: c_ulong ; pub type __fsfilcnt_t = :: std :: os :: raw :: c_ulong ; pub type __fsfilcnt64_t = :: std :: os :: raw :: c_ulong ; pub type __fsword_t = :: std :: os :: raw :: c_long ; pub type __ssize_t = :: std :: os :: raw :: c_long ; pub type __syscall_slong_t = :: std :: os :: raw :: c_long ; pub type __syscall_ulong_t = :: std :: os :: raw :: c_ulong ; pub type __loff_t = __off64_t ; pub type __caddr_t = * mut :: std :: os :: raw :: c_char ; pub type __intptr_t = :: std :: os :: raw :: c_long ; pub type __socklen_t = :: std :: os :: raw :: c_uint ; pub type __sig_atomic_t = :: std :: os :: raw :: c_int ; pub type int_least8_t = :: std :: os :: raw :: c_schar ; pub type int_least16_t = :: std :: os :: raw :: c_short ; pub type int_least32_t = :: std :: os :: raw :: c_int ; pub type int_least64_t = :: std :: os :: raw :: c_long ; pub type uint_least8_t = :: std :: os :: raw :: c_uchar ; pub type uint_least16_t = :: std :: os :: raw :: c_ushort ; pub type uint_least32_t = :: std :: os :: raw :: c_uint ; pub type uint_least64_t = :: std :: os :: raw :: c_ulong ; pub type int_fast8_t = :: std :: os :: raw :: c_schar ; pub type int_fast16_t = :: std :: os :: raw :: c_long ; pub type int_fast32_t = :: std :: os :: raw :: c_long ; pub type int_fast64_t = :: std :: os :: raw :: c_long ; pub type uint_fast8_t = :: std :: os :: raw :: c_uchar ; pub type uint_fast16_t = :: std :: os :: raw :: c_ulong ; pub type uint_fast32_t = :: std :: os :: raw :: c_ulong ; pub type uint_fast64_t = :: std :: os :: raw :: c_ulong ; pub type intmax_t = __intmax_t ; pub type uintmax_t = __uintmax_t ; pub type void_cb = :: std :: option :: Option < unsafe extern "C" fn ( ) > ; extern "C" { # [ doc = " @brief Check if keyboard connected." ] # [ doc = "" ] # [ doc = "This function offers a check if the keyboard is connected." ] # [ doc = "The read functions will automatically call this function on first use." ] # [ doc = "" ] # [ doc = "@ingroup API" ] # [ doc = "" ] # [ doc = "@returns" ] # [ doc = "This function returns true (1) if keyboard is found." ] pub fn wooting_rgb_kbd_connected ( ) -> bool ; } extern "C" { # [ doc = " @brief Set callback for when a keyboard disconnects." ] # [ doc = "" ] # [ doc = "The callback will be called when a Wooting keyboard disconnects. The callback will only trigger after a failed color change." ] # [ doc = "" ] # [ doc = "@ingroup API" ] # [ doc = "@param cb The function pointer of the callback" ] # [ doc = "" ] # [ doc = "@returns" ] # [ doc = "None." ] pub fn wooting_rgb_set_disconnected_cb ( cb : void_cb ) ; } extern "C" { # [ doc = " @brief Reset all colors on keyboard to the original colors." ] # [ doc = "" ] # [ doc = "This function will restore all the colours to the colours that were originally on the keyboard. This function" ] # [ doc = "should always be called when you close the application." ] # [ doc = "" ] # [ doc = "@ingroup API" ] # [ doc = "" ] # [ doc = "@returns" ] # [ doc = "Return true (1) if the keyboard is reset" ] pub fn wooting_rgb_reset ( ) -> bool ; } extern "C" { # [ doc = " @brief Directly set and update 1 key on the keyboard." ] # [ doc = "" ] # [ doc = "This function will directly change the color of 1 key on the keyboard. This will not influence the keyboard color array." ] # [ doc = "" ] # [ doc = "Use this function for simple applifications, like a notification. Use the array functions if you want to change the entire keyboard." ] # [ doc = "" ] # [ doc = "@ingroup API" ] # [ doc = "@param row The horizontal index of the key" ] # [ doc = "@param coloum The vertical index of the key" ] # [ doc = "@param red 0-255 value of the red color" ] # [ doc = "@param green 0-255 value of the green color" ] # [ doc = "@param blue 0-255 value of the blue color" ] # [ doc = "" ] # [ doc = "@returns" ] # [ doc = "This functions return true (1) if the colour is set." ] pub fn wooting_rgb_direct_set_key ( row : u8 , column : u8 , red : u8 , green : u8 , blue : u8 ) -> bool ; } extern "C" { # [ doc = " @brief Directly reset 1 key on the keyboard to the original color." ] # [ doc = "" ] # [ doc = "This function will directly reset the color of 1 key on the keyboard. This will not influence the keyboard color array." ] # [ doc = "" ] # [ doc = "Use this function for simple applifications, like a notification. Use the array functions if you want to change the entire keyboard." ] # [ doc = "" ] # [ doc = "@ingroup API" ] # [ doc = "@param row The horizontal index of the key" ] # [ doc = "@param coloum The vertical index of the key" ] # [ doc = "" ] # [ doc = "@returns" ] # [ doc = "This functions return true (1) if the colour is reset." ] pub fn wooting_rgb_direct_reset_key ( row : u8 , column : u8 ) -> bool ; } extern "C" { # [ doc = " @brief Send the colors from the color array to the keyboard." ] # [ doc = "" ] # [ doc = "This function will send the changes made with the wooting_rgb_array single and full functions to the keyboard." ] # [ doc = "" ] # [ doc = "@ingroup API" ] # [ doc = "" ] # [ doc = "@returns" ] # [ doc = "This functions return true (1) if the colours are updated." ] pub fn wooting_rgb_array_update_keyboard ( ) -> bool ; } extern "C" { # [ doc = " @brief Change the auto update flag for the wooting_rgb_array single and full functions functions." ] # [ doc = "" ] # [ doc = "This function can be used to set a auto update trigger after every change with the wooting_rgb_array single and full functions function." ] # [ doc = "" ] # [ doc = "Standard is set to false." ] # [ doc = "" ] # [ doc = "@ingroup API" ] # [ doc = "@param auto_update Change the auto update flag" ] # [ doc = "" ] # [ doc = "@returns" ] # [ doc = "None." ] pub fn wooting_rgb_array_auto_update ( auto_update : bool ) ; } extern "C" { # [ doc = " @brief Set a single color in the colour array." ] # [ doc = "" ] # [ doc = "This function will set a single color in the colour array. This will not directly update the keyboard (unless the flag is set), so" ] # [ doc = "it can be called frequently. For example in a loop that updates the entire keyboard. This way you can avoid dealing with C arrays from" ] # [ doc = "different languages." ] # [ doc = "" ] # [ doc = "@ingroup API" ] # [ doc = "@param row The horizontal index of the key" ] # [ doc = "@param coloum The vertical index of the key" ] # [ doc = "@param red 0-255 value of the red color" ] # [ doc = "@param green 0-255 value of the green color" ] # [ doc = "@param blue 0-255 value of the blue color" ] # [ doc = "" ] # [ doc = "@returns" ] # [ doc = "This functions return true (1) if the colours are changed (if auto update flag: updated)." ] pub fn wooting_rgb_array_set_single ( row : u8 , column : u8 , red : u8 , green : u8 , blue : u8 ) -> bool ; } extern "C" { # [ doc = " @brief Set a full colour array." ] # [ doc = "" ] # [ doc = "This function will set a complete color array. This will not directly update the keyboard (unless the flag is set)." ] # [ doc = "" ] # [ doc = "If you use a non-C language it is recommended to use the wooting_rgb_array_set_single function to change the colors to avoid compatibility issues." ] # [ doc = "" ] # [ doc = "Buffer should be layout out as [Row0Col0Red, Row0Col0Green, Row0Col0Blue, Row0Col1Red, Row0Col1Green, Row0Col1Blue, ... Row5Row20Red, Row5Row20Green, Row5Row20Blue]." ] # [ doc = "Expected size is 6 row * 21 columns * 3 colors per key = 576 bytes." ] # [ doc = "" ] # [ doc = "@ingroup API" ] # [ doc = "@param colors_buffer Pointer to a buffer of a full color array" ] # [ doc = "" ] # [ doc = "@returns" ] # [ doc = "This functions return true (1) if the colours are changed (if auto update flag: updated)." ] pub fn wooting_rgb_array_set_full ( colors_buffer : * const u8 ) -> bool ; } pub const RGB_PARTS_PART0 : RGB_PARTS = 0 ; pub const RGB_PARTS_PART1 : RGB_PARTS = 1 ; pub const RGB_PARTS_PART2 : RGB_PARTS = 2 ; pub const RGB_PARTS_PART3 : RGB_PARTS = 3 ; pub const RGB_PARTS_PART4 : RGB_PARTS = 4 ; pub type RGB_PARTS = u32 ; extern "C" { pub fn wooting_usb_set_disconnected_cb ( cb : void_cb ) ; } extern "C" { pub fn wooting_usb_disconnect ( trigger_cb : bool ) ; } extern "C" { pub fn wooting_usb_find_keyboard ( ) -> bool ; } extern "C" { pub fn wooting_usb_send_buffer ( part_number : RGB_PARTS , rgb_buffer : * mut u8 ) -> bool ; } extern "C" { pub fn wooting_usb_send_feature ( commandId : u8 , parameter0 : u8 , parameter1 : u8 , parameter2 : u8 , parameter3 : u8 ) -> bool ; }