diff --git a/audio.c.v b/audio.c.v index f12a16fe..400c257a 100644 --- a/audio.c.v +++ b/audio.c.v @@ -153,13 +153,13 @@ pub type AudioCallback = fn (userdata voidptr, stream &u8, len int) @[typedef] pub struct C.SDL_AudioSpec { pub: - freq int // DSP frequency -- samples per second - format AudioFormat // C.SDL_AudioFormat Audio data format - channels u8 // Number of channels: 1 mono, 2 stereo - silence u8 // Audio buffer silence value (calculated) - samples u16 // Audio buffer size in sample FRAMES (total samples divided by channel count) - padding u16 // Necessary for some compile environments - size u32 // Audio buffer size in bytes (calculated) + freq int // DSP frequency -- samples per second + format AudioFormat // C.SDL_AudioFormat Audio data format + channels u8 // Number of channels: 1 mono, 2 stereo + silence u8 // Audio buffer silence value (calculated) + samples u16 // Audio buffer size in sample FRAMES (total samples divided by channel count) + padding u16 // Necessary for some compile environments + size u32 // Audio buffer size in bytes (calculated) callback AudioCallback // C.SDL_AudioCallback // Callback that feeds the audio device (NULL to use SDL_QueueAudio()). userdata voidptr // Userdata passed to callback (ignored for NULL callbacks). } @@ -210,17 +210,17 @@ pub type AudioCVTPackedSDLAudioCVT = C.SDL_AUDIOCVT_PACKEDSDL_AudioCVT @[typedef] pub struct C.SDL_AudioCVT { pub: - needed int // Set to 1 if conversion possible - src_format AudioFormat // C.SDL_AudioFormat, Source audio format - dst_format AudioFormat // C.SDL_AudioFormat, Target audio format - rate_incr f64 // Rate conversion increment - buf &u8 // Buffer to hold entire audio data - len int // Length of original audio buffer - len_cvt int // Length of converted audio buffer - len_mult int // buffer must be len*len_mult big - len_ratio f64 // Given len, final size is len*len_ratio + needed int // Set to 1 if conversion possible + src_format AudioFormat // C.SDL_AudioFormat, Source audio format + dst_format AudioFormat // C.SDL_AudioFormat, Target audio format + rate_incr f64 // Rate conversion increment + buf &u8 // Buffer to hold entire audio data + len int // Length of original audio buffer + len_cvt int // Length of converted audio buffer + len_mult int // buffer must be len*len_mult big + len_ratio f64 // Given len, final size is len*len_ratio filters [10]AudioFilter // C.SDL_AudioFilter NULL-terminated list of filter functions - filter_index int // Current audio conversion function + filter_index int // Current audio conversion function } pub type AudioCVT = C.SDL_AudioCVT diff --git a/blendmode.c.v b/blendmode.c.v index 4c90cfa3..c0eb7801 100644 --- a/blendmode.c.v +++ b/blendmode.c.v @@ -10,36 +10,36 @@ module sdl // BlendMode is the blend mode used in SDL_RenderCopy() and drawing operations. // BlendMode is SDL_BlendMode pub enum BlendMode { - @none = C.SDL_BLENDMODE_NONE // 0x00000000, no blending dstRGBA = srcRGBA - blend = C.SDL_BLENDMODE_BLEND // 0x00000001, alpha blending dstRGB = (srcRGB * srcA) + (dstRGB * (1-srcA)) dstA = srcA + (dstA * (1-srcA)) - add = C.SDL_BLENDMODE_ADD // 0x00000002, additive blending dstRGB = (srcRGB * srcA) + dstRGB dstA = dstA - mod = C.SDL_BLENDMODE_MOD // 0x00000004, color modulate dstRGB = srcRGB * dstRGB dstA = dstA - mul = C.SDL_BLENDMODE_MUL // 0x00000008, color multiply dstRGB = (srcRGB * dstRGB) + (dstRGB * (1-srcA)) dstA = (srcA * dstA) + (dstA * (1-srcA)) + @none = C.SDL_BLENDMODE_NONE // 0x00000000, no blending dstRGBA = srcRGBA + blend = C.SDL_BLENDMODE_BLEND // 0x00000001, alpha blending dstRGB = (srcRGB * srcA) + (dstRGB * (1-srcA)) dstA = srcA + (dstA * (1-srcA)) + add = C.SDL_BLENDMODE_ADD // 0x00000002, additive blending dstRGB = (srcRGB * srcA) + dstRGB dstA = dstA + mod = C.SDL_BLENDMODE_MOD // 0x00000004, color modulate dstRGB = srcRGB * dstRGB dstA = dstA + mul = C.SDL_BLENDMODE_MUL // 0x00000008, color multiply dstRGB = (srcRGB * dstRGB) + (dstRGB * (1-srcA)) dstA = (srcA * dstA) + (dstA * (1-srcA)) invalid = C.SDL_BLENDMODE_INVALID // 0x7FFFFFFF } // BlendOperation is the blend operation used when combining source and destination pixel components // BlendOperation is C.SDL_BlendOperation pub enum BlendOperation { - add = C.SDL_BLENDOPERATION_ADD // 0x1, dst + src: supported by all renderers - subtract = C.SDL_BLENDOPERATION_SUBTRACT // 0x2, dst - src : supported by D3D9, D3D11, OpenGL, OpenGLES + add = C.SDL_BLENDOPERATION_ADD // 0x1, dst + src: supported by all renderers + subtract = C.SDL_BLENDOPERATION_SUBTRACT // 0x2, dst - src : supported by D3D9, D3D11, OpenGL, OpenGLES rev_subtract = C.SDL_BLENDOPERATION_REV_SUBTRACT // 0x3, src - dst : supported by D3D9, D3D11, OpenGL, OpenGLES - minimum = C.SDL_BLENDOPERATION_MINIMUM // 0x4, min(dst, src) : supported by D3D11 - maximum = C.SDL_BLENDOPERATION_MAXIMUM // 0x5 max(dst, src) : supported by D3D11 + minimum = C.SDL_BLENDOPERATION_MINIMUM // 0x4, min(dst, src) : supported by D3D11 + maximum = C.SDL_BLENDOPERATION_MAXIMUM // 0x5 max(dst, src) : supported by D3D11 } // BlendFactor is the normalized factor used to multiply pixel components // BlendFactor is C.SDL_BlendFactor pub enum BlendFactor { - zero = C.SDL_BLENDFACTOR_ZERO // 0x1, 0, 0, 0, 0 - one = C.SDL_BLENDFACTOR_ONE // 0x2, 1, 1, 1, 1 - src_color = C.SDL_BLENDFACTOR_SRC_COLOR // 0x3, srcR, srcG, srcB, srcA + zero = C.SDL_BLENDFACTOR_ZERO // 0x1, 0, 0, 0, 0 + one = C.SDL_BLENDFACTOR_ONE // 0x2, 1, 1, 1, 1 + src_color = C.SDL_BLENDFACTOR_SRC_COLOR // 0x3, srcR, srcG, srcB, srcA one_minus_src_color = C.SDL_BLENDFACTOR_ONE_MINUS_SRC_COLOR // 0x4, 1-srcR, 1-srcG, 1-srcB, 1-srcA - src_alpha = C.SDL_BLENDFACTOR_SRC_ALPHA // 0x5, srcA, srcA, srcA, srcA + src_alpha = C.SDL_BLENDFACTOR_SRC_ALPHA // 0x5, srcA, srcA, srcA, srcA one_minus_src_alpha = C.SDL_BLENDFACTOR_ONE_MINUS_SRC_ALPHA // 0x6, 1-srcA, 1-srcA, 1-srcA, 1-srcA - dst_color = C.SDL_BLENDFACTOR_DST_COLOR // 0x7, dstR, dstG, dstB, dstA + dst_color = C.SDL_BLENDFACTOR_DST_COLOR // 0x7, dstR, dstG, dstB, dstA one_minus_dst_color = C.SDL_BLENDFACTOR_ONE_MINUS_DST_COLOR // 0x8, 1-dstR, 1-dstG, 1-dstB, 1-dstA - dst_alpha = C.SDL_BLENDFACTOR_DST_ALPHA // 0x9, dstA, dstA, dstA, dstA + dst_alpha = C.SDL_BLENDFACTOR_DST_ALPHA // 0x9, dstA, dstA, dstA, dstA one_minus_dst_alpha = C.SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA // 0xA, 1-dstA, 1-dstA, 1-dstA, 1-dstA } diff --git a/events.c.v b/events.c.v index 485852e4..dcc4934b 100644 --- a/events.c.v +++ b/events.c.v @@ -40,95 +40,95 @@ pub type EventFilter = fn (userdata voidptr, event &Event) // EventType is C.SDL_EventType pub enum EventType { - firstevent = C.SDL_FIRSTEVENT // Unused (do not remove) - quit = C.SDL_QUIT // 0x100 User-requested quit + firstevent = C.SDL_FIRSTEVENT // Unused (do not remove) + quit = C.SDL_QUIT // 0x100 User-requested quit // These application events have special meaning on iOS, see README-ios.md in SDL for details // The application is being terminated by the OS // Called on iOS in applicationWillTerminate() // Called on Android in onDestroy() - app_terminating = C.SDL_APP_TERMINATING + app_terminating = C.SDL_APP_TERMINATING // The application is low on memory, free memory if possible. // Called on iOS in applicationDidReceiveMemoryWarning() // Called on Android in onLowMemory() - app_lowmemory = C.SDL_APP_LOWMEMORY + app_lowmemory = C.SDL_APP_LOWMEMORY // The application is about to enter the background // Called on iOS in applicationWillResignActive() // Called on Android in onPause() - app_willenterbackground = C.SDL_APP_WILLENTERBACKGROUND + app_willenterbackground = C.SDL_APP_WILLENTERBACKGROUND // The application did enter the background and may not get CPU for some time // Called on iOS in applicationDidEnterBackground() // Called on Android in onPause() - app_didenterbackground = C.SDL_APP_DIDENTERBACKGROUND + app_didenterbackground = C.SDL_APP_DIDENTERBACKGROUND // The application is about to enter the foreground // Called on iOS in applicationWillEnterForeground() // Called on Android in onResume() - app_willenterforeground = C.SDL_APP_WILLENTERFOREGROUND + app_willenterforeground = C.SDL_APP_WILLENTERFOREGROUND // The application is now interactive // Called on iOS in applicationDidBecomeActive() // Called on Android in onResume() - app_didenterforeground = C.SDL_APP_DIDENTERFOREGROUND - localechanged = C.SDL_LOCALECHANGED // The user's locale preferences have changed. + app_didenterforeground = C.SDL_APP_DIDENTERFOREGROUND + localechanged = C.SDL_LOCALECHANGED // The user's locale preferences have changed. // Display events - displayevent = C.SDL_DISPLAYEVENT // 0x150 Display state change + displayevent = C.SDL_DISPLAYEVENT // 0x150 Display state change // Window events - windowevent = C.SDL_WINDOWEVENT // 0x200 Window state change - syswmevent = C.SDL_SYSWMEVENT + windowevent = C.SDL_WINDOWEVENT // 0x200 Window state change + syswmevent = C.SDL_SYSWMEVENT // Keyboard events - keydown = C.SDL_KEYDOWN // 0x300, Key pressed - keyup = C.SDL_KEYUP // Key released - textediting = C.SDL_TEXTEDITING // Keyboard text editing (composition) - textinput = C.SDL_TEXTINPUT // Keyboard text input - keymapchanged = C.SDL_KEYMAPCHANGED // Keymap changed due to a system event such as an input language or keyboard layout change. + keydown = C.SDL_KEYDOWN // 0x300, Key pressed + keyup = C.SDL_KEYUP // Key released + textediting = C.SDL_TEXTEDITING // Keyboard text editing (composition) + textinput = C.SDL_TEXTINPUT // Keyboard text input + keymapchanged = C.SDL_KEYMAPCHANGED // Keymap changed due to a system event such as an input language or keyboard layout change. // Mouse events - mousemotion = C.SDL_MOUSEMOTION // 0x400, Mouse moved - mousebuttondown = C.SDL_MOUSEBUTTONDOWN // Mouse button pressed - mousebuttonup = C.SDL_MOUSEBUTTONUP // Mouse button released - mousewheel = C.SDL_MOUSEWHEEL // Mouse wheel motion + mousemotion = C.SDL_MOUSEMOTION // 0x400, Mouse moved + mousebuttondown = C.SDL_MOUSEBUTTONDOWN // Mouse button pressed + mousebuttonup = C.SDL_MOUSEBUTTONUP // Mouse button released + mousewheel = C.SDL_MOUSEWHEEL // Mouse wheel motion // Joystick events - joyaxismotion = C.SDL_JOYAXISMOTION // 0x600, Joystick axis motion - joyballmotion = C.SDL_JOYBALLMOTION // Joystick trackball motion - joyhatmotion = C.SDL_JOYHATMOTION // Joystick hat position change - joybuttondown = C.SDL_JOYBUTTONDOWN // Joystick button pressed - joybuttonup = C.SDL_JOYBUTTONUP // Joystick button released - joydeviceadded = C.SDL_JOYDEVICEADDED // A new joystick has been inserted into the system - joydeviceremoved = C.SDL_JOYDEVICEREMOVED // An opened joystick has been removed + joyaxismotion = C.SDL_JOYAXISMOTION // 0x600, Joystick axis motion + joyballmotion = C.SDL_JOYBALLMOTION // Joystick trackball motion + joyhatmotion = C.SDL_JOYHATMOTION // Joystick hat position change + joybuttondown = C.SDL_JOYBUTTONDOWN // Joystick button pressed + joybuttonup = C.SDL_JOYBUTTONUP // Joystick button released + joydeviceadded = C.SDL_JOYDEVICEADDED // A new joystick has been inserted into the system + joydeviceremoved = C.SDL_JOYDEVICEREMOVED // An opened joystick has been removed // Game controller events - controlleraxismotion = C.SDL_CONTROLLERAXISMOTION // 0x650, Game controller axis motion - controllerbuttondown = C.SDL_CONTROLLERBUTTONDOWN // Game controller button pressed - controllerbuttonup = C.SDL_CONTROLLERBUTTONUP // Game controller button released - controllerdeviceadded = C.SDL_CONTROLLERDEVICEADDED // A new Game controller has been inserted into the system - controllerdeviceremoved = C.SDL_CONTROLLERDEVICEREMOVED // An opened Game controller has been removed + controlleraxismotion = C.SDL_CONTROLLERAXISMOTION // 0x650, Game controller axis motion + controllerbuttondown = C.SDL_CONTROLLERBUTTONDOWN // Game controller button pressed + controllerbuttonup = C.SDL_CONTROLLERBUTTONUP // Game controller button released + controllerdeviceadded = C.SDL_CONTROLLERDEVICEADDED // A new Game controller has been inserted into the system + controllerdeviceremoved = C.SDL_CONTROLLERDEVICEREMOVED // An opened Game controller has been removed controllerdeviceremapped = C.SDL_CONTROLLERDEVICEREMAPPED // The controller mapping was updated - controllertouchpaddown = C.SDL_CONTROLLERTOUCHPADDOWN // Game controller touchpad was touched + controllertouchpaddown = C.SDL_CONTROLLERTOUCHPADDOWN // Game controller touchpad was touched controllertouchpadmotion = C.SDL_CONTROLLERTOUCHPADMOTION // Game controller touchpad finger was moved - controllertouchpadup = C.SDL_CONTROLLERTOUCHPADUP // Game controller touchpad finger was lifted - controllersensorupdate = C.SDL_CONTROLLERSENSORUPDATE // Game controller sensor was updated + controllertouchpadup = C.SDL_CONTROLLERTOUCHPADUP // Game controller touchpad finger was lifted + controllersensorupdate = C.SDL_CONTROLLERSENSORUPDATE // Game controller sensor was updated // Touch events - fingerdown = C.SDL_FINGERDOWN // 0x700 - fingerup = C.SDL_FINGERUP - fingermotion = C.SDL_FINGERMOTION + fingerdown = C.SDL_FINGERDOWN // 0x700 + fingerup = C.SDL_FINGERUP + fingermotion = C.SDL_FINGERMOTION // Gesture events - dollargesture = C.SDL_DOLLARGESTURE // 0x800 - dollarrecord = C.SDL_DOLLARRECORD - multigesture = C.SDL_MULTIGESTURE + dollargesture = C.SDL_DOLLARGESTURE // 0x800 + dollarrecord = C.SDL_DOLLARRECORD + multigesture = C.SDL_MULTIGESTURE // Clipboard events - clipboardupdate = C.SDL_CLIPBOARDUPDATE // 0x900 The clipboard changed + clipboardupdate = C.SDL_CLIPBOARDUPDATE // 0x900 The clipboard changed // Drag and drop events - dropfile = C.SDL_DROPFILE // 0x1000 The system requests a file open - droptext = C.SDL_DROPTEXT // text/plain drag-and-drop event - dropbegin = C.SDL_DROPBEGIN // A new set of drops is beginning (NULL filename) - dropcomplete = C.SDL_DROPCOMPLETE // Current set of drops is now complete (NULL filename) + dropfile = C.SDL_DROPFILE // 0x1000 The system requests a file open + droptext = C.SDL_DROPTEXT // text/plain drag-and-drop event + dropbegin = C.SDL_DROPBEGIN // A new set of drops is beginning (NULL filename) + dropcomplete = C.SDL_DROPCOMPLETE // Current set of drops is now complete (NULL filename) // Audio hotplug events - audiodeviceadded = C.SDL_AUDIODEVICEADDED // 0x1100 A new audio device is available - audiodeviceremoved = C.SDL_AUDIODEVICEREMOVED // An audio device has been removed. + audiodeviceadded = C.SDL_AUDIODEVICEADDED // 0x1100 A new audio device is available + audiodeviceremoved = C.SDL_AUDIODEVICEREMOVED // An audio device has been removed. // Sensor events - sensorupdate = C.SDL_SENSORUPDATE // 0x1200 A sensor was updated + sensorupdate = C.SDL_SENSORUPDATE // 0x1200 A sensor was updated // Render events - render_targets_reset = C.SDL_RENDER_TARGETS_RESET // 0x2000 The render targets have been reset and their contents need to be updated - render_device_reset = C.SDL_RENDER_DEVICE_RESET /// The device has been reset and all textures need to be recreated - userevent = C.SDL_USEREVENT // Events ::SDL_USEREVENT through ::SDL_LASTEVENT are for your use, and should be allocated with SDL_RegisterEvents() + render_targets_reset = C.SDL_RENDER_TARGETS_RESET // 0x2000 The render targets have been reset and their contents need to be updated + render_device_reset = C.SDL_RENDER_DEVICE_RESET /// The device has been reset and all textures need to be recreated + userevent = C.SDL_USEREVENT // Events ::SDL_USEREVENT through ::SDL_LASTEVENT are for your use, and should be allocated with SDL_RegisterEvents() // This last event is only for bounding internal arrays - lastevent = C.SDL_LASTEVENT // 0xFFFF + lastevent = C.SDL_LASTEVENT // 0xFFFF } // CommonEvent is fields shared by every event @@ -274,7 +274,7 @@ pub: @type EventType // ::SDL_JOYAXISMOTION timestamp u32 // In milliseconds, populated using SDL_GetTicks() which JoystickID // The joystick instance id - axis u8 // The joystick axis index + axis u8 // The joystick axis index padding1 u8 padding2 u8 padding3 u8 @@ -291,7 +291,7 @@ pub: @type EventType // ::SDL_JOYBALLMOTION timestamp u32 // In milliseconds, populated using SDL_GetTicks() which JoystickID // C.SDL_JoystickID // The joystick instance id - ball u8 // The joystick trackball index + ball u8 // The joystick trackball index padding1 u8 padding2 u8 padding3 u8 @@ -308,8 +308,8 @@ pub: @type EventType // ::SDL_JOYHATMOTION timestamp u32 // In milliseconds, populated using SDL_GetTicks() which JoystickID // C.SDL_JoystickID // The joystick instance id - hat u8 // The joystick hat index - value u8 // The hat position value. + hat u8 // The joystick hat index + value u8 // The hat position value. // See also: ::SDL_HAT_LEFTUP ::SDL_HAT_UP ::SDL_HAT_RIGHTUP // See also: ::SDL_HAT_LEFT ::SDL_HAT_CENTERED ::SDL_HAT_RIGHT // See also: ::SDL_HAT_LEFTDOWN ::SDL_HAT_DOWN ::SDL_HAT_RIGHTDOWN @@ -327,8 +327,8 @@ pub: @type EventType // ::SDL_JOYBUTTONDOWN or ::SDL_JOYBUTTONUP timestamp u32 // In milliseconds, populated using SDL_GetTicks() which JoystickID // C.SDL_JoystickID // The joystick instance id - button u8 // The joystick button index - state u8 // ::SDL_PRESSED or ::SDL_RELEASED + button u8 // The joystick button index + state u8 // ::SDL_PRESSED or ::SDL_RELEASED padding1 u8 padding2 u8 } @@ -353,7 +353,7 @@ pub: @type EventType // ::SDL_CONTROLLERAXISMOTION timestamp u32 // In milliseconds, populated using SDL_GetTicks() which JoystickID // C.SDL_JoystickID // The joystick instance id - axis u8 // The controller axis (SDL_GameControllerAxis) + axis u8 // The controller axis (SDL_GameControllerAxis) padding1 u8 padding2 u8 padding3 u8 @@ -370,8 +370,8 @@ pub: @type EventType // ::SDL_CONTROLLERBUTTONDOWN or ::SDL_CONTROLLERBUTTONUP timestamp u32 // In milliseconds, populated using SDL_GetTicks() which JoystickID // C.SDL_JoystickID // The joystick instance id - button u8 // The controller button (SDL_GameControllerButton) - state u8 // ::SDL_PRESSED or ::SDL_RELEASED + button u8 // The controller button (SDL_GameControllerButton) + state u8 // ::SDL_PRESSED or ::SDL_RELEASED padding1 u8 padding2 u8 } @@ -605,7 +605,7 @@ pub: ctouchpad ControllerTouchpadEvent // C.SDL_ControllerTouchpadEvent // Game Controller touchpad event data csensor ControllerSensorEvent // C.SDL_ControllerSensorEvent // Game Controller sensor event data adevice AudioDeviceEvent // C.SDL_AudioDeviceEvent // Audio device event data - sensor SensorEvent // C.SDL_SensorEvent // Sensor event data + sensor SensorEvent // C.SDL_SensorEvent // Sensor event data // quit QuitEvent // C.SDL_QuitEvent // Quit request event data @@ -614,7 +614,7 @@ pub: tfinger TouchFingerEvent // C.SDL_TouchFingerEvent // Touch finger event data mgesture MultiGestureEvent // C.SDL_MultiGestureEvent // Gesture event data dgesture DollarGestureEvent // C.SDL_DollarGestureEvent // Gesture event data - drop DropEvent // C.SDL_DropEvent // Drag and drop event data + drop DropEvent // C.SDL_DropEvent // Drag and drop event data // This is necessary for ABI compatibility between Visual C++ and GCC. // Visual C++ will respect the push pack pragma and use 52 bytes (size of // SDL_TextEditingEvent, the largest structure for 32-bit and 64-bit diff --git a/gamecontroller.c.v b/gamecontroller.c.v index 81ae9839..b391953a 100644 --- a/gamecontroller.c.v +++ b/gamecontroller.c.v @@ -655,11 +655,11 @@ pub enum GameControllerButton { dpad_down = C.SDL_CONTROLLER_BUTTON_DPAD_DOWN dpad_left = C.SDL_CONTROLLER_BUTTON_DPAD_LEFT dpad_right = C.SDL_CONTROLLER_BUTTON_DPAD_RIGHT - misc1 = C.SDL_CONTROLLER_BUTTON_MISC1 // Xbox Series X share button, PS5 microphone button, Nintendo Switch Pro capture button, Amazon Luna microphone button - paddle1 = C.SDL_CONTROLLER_BUTTON_PADDLE1 // Xbox Elite paddle P1 - paddle2 = C.SDL_CONTROLLER_BUTTON_PADDLE2 // Xbox Elite paddle P3 - paddle3 = C.SDL_CONTROLLER_BUTTON_PADDLE3 // Xbox Elite paddle P2 - paddle4 = C.SDL_CONTROLLER_BUTTON_PADDLE4 // Xbox Elite paddle P4 + misc1 = C.SDL_CONTROLLER_BUTTON_MISC1 // Xbox Series X share button, PS5 microphone button, Nintendo Switch Pro capture button, Amazon Luna microphone button + paddle1 = C.SDL_CONTROLLER_BUTTON_PADDLE1 // Xbox Elite paddle P1 + paddle2 = C.SDL_CONTROLLER_BUTTON_PADDLE2 // Xbox Elite paddle P3 + paddle3 = C.SDL_CONTROLLER_BUTTON_PADDLE3 // Xbox Elite paddle P2 + paddle4 = C.SDL_CONTROLLER_BUTTON_PADDLE4 // Xbox Elite paddle P4 touchpad = C.SDL_CONTROLLER_BUTTON_TOUCHPAD // PS4/PS5 touchpad button max = C.SDL_CONTROLLER_BUTTON_MAX } diff --git a/haptic.c.v b/haptic.c.v index 3bb6b64d..08419952 100644 --- a/haptic.c.v +++ b/haptic.c.v @@ -280,17 +280,17 @@ pub type HapticDirection = C.SDL_HapticDirection @[typedef] pub struct C.SDL_HapticConstant { pub mut: - @type u16 // ::SDL_HAPTIC_CONSTANT + @type u16 // ::SDL_HAPTIC_CONSTANT direction HapticDirection // Direction of the effect. - length u32 // Duration of the effect. - delay u16 // Delay before starting the effect. - button u16 // Button that triggers the effect. - interval u16 // How soon it can be triggered again after button. - level i16 // Strength of the constant effect. - attack_length u16 // Duration of the attack. - attack_level u16 // Level at the start of the attack. - fade_length u16 // Duration of the fade. - fade_level u16 // Level at the end of the fade. + length u32 // Duration of the effect. + delay u16 // Delay before starting the effect. + button u16 // Button that triggers the effect. + interval u16 // How soon it can be triggered again after button. + level i16 // Strength of the constant effect. + attack_length u16 // Duration of the attack. + attack_level u16 // Level at the start of the attack. + fade_length u16 // Duration of the fade. + fade_level u16 // Level at the end of the fade. } pub type HapticConstant = C.SDL_HapticConstant @@ -356,20 +356,20 @@ pub type HapticConstant = C.SDL_HapticConstant @[typedef] pub struct C.SDL_HapticPeriodic { pub mut: - @type u16 // ::SDL_HAPTIC_SINE, ::SDL_HAPTIC_LEFTRIGHT, ::SDL_HAPTIC_TRIANGLE, ::SDL_HAPTIC_SAWTOOTHUP or ::SDL_HAPTIC_SAWTOOTHDOWN + @type u16 // ::SDL_HAPTIC_SINE, ::SDL_HAPTIC_LEFTRIGHT, ::SDL_HAPTIC_TRIANGLE, ::SDL_HAPTIC_SAWTOOTHUP or ::SDL_HAPTIC_SAWTOOTHDOWN direction HapticDirection // Direction of the effect. - length u32 // Duration of the effect. - delay u16 // Delay before starting the effect. - button u16 // Button that triggers the effect. - interval u16 // How soon it can be triggered again after button. - period u16 // Period of the wave. - magnitude i16 // Peak value; if negative, equivalent to 180 degrees extra phase shift. - offset i16 // Mean value of the wave. - phase u16 // Positive phase shift given by hundredth of a degree. - attack_length u16 // Duration of the attack. - attack_level u16 // Level at the start of the attack. - fade_length u16 // Duration of the fade. - fade_level u16 // Level at the end of the fade. + length u32 // Duration of the effect. + delay u16 // Delay before starting the effect. + button u16 // Button that triggers the effect. + interval u16 // How soon it can be triggered again after button. + period u16 // Period of the wave. + magnitude i16 // Peak value; if negative, equivalent to 180 degrees extra phase shift. + offset i16 // Mean value of the wave. + phase u16 // Positive phase shift given by hundredth of a degree. + attack_length u16 // Duration of the attack. + attack_level u16 // Level at the start of the attack. + fade_length u16 // Duration of the fade. + fade_level u16 // Level at the end of the fade. } pub type HapticPeriodic = C.SDL_HapticPeriodic @@ -399,18 +399,18 @@ pub type HapticPeriodic = C.SDL_HapticPeriodic @[typedef] pub struct C.SDL_HapticCondition { pub mut: - @type u16 // ::SDL_HAPTIC_SPRING, ::SDL_HAPTIC_DAMPER, ::SDL_HAPTIC_INERTIA or ::SDL_HAPTIC_FRICTION + @type u16 // ::SDL_HAPTIC_SPRING, ::SDL_HAPTIC_DAMPER, ::SDL_HAPTIC_INERTIA or ::SDL_HAPTIC_FRICTION direction HapticDirection // Direction of the effect - Not used ATM. - length u32 // Duration of the effect. - delay u16 // Delay before starting the effect. - button u16 // Button that triggers the effect. - interval u16 // How soon it can be triggered again after button. - right_sat [3]u16 // Level when joystick is to the positive side; max 0xFFFF. - left_sat [3]u16 // Level when joystick is to the negative side; max 0xFFFF. - right_coeff [3]i16 // How fast to increase the force towards the positive side. - left_coeff [3]i16 // How fast to increase the force towards the negative side. - deadband [3]u16 // Size of the dead zone; max 0xFFFF: whole axis-range when 0-centered. - center [3]i16 // Position of the dead zone. + length u32 // Duration of the effect. + delay u16 // Delay before starting the effect. + button u16 // Button that triggers the effect. + interval u16 // How soon it can be triggered again after button. + right_sat [3]u16 // Level when joystick is to the positive side; max 0xFFFF. + left_sat [3]u16 // Level when joystick is to the negative side; max 0xFFFF. + right_coeff [3]i16 // How fast to increase the force towards the positive side. + left_coeff [3]i16 // How fast to increase the force towards the negative side. + deadband [3]u16 // Size of the dead zone; max 0xFFFF: whole axis-range when 0-centered. + center [3]i16 // Position of the dead zone. } pub type HapticCondition = C.SDL_HapticCondition @@ -429,18 +429,18 @@ pub type HapticCondition = C.SDL_HapticCondition @[typedef] pub struct C.SDL_HapticRamp { pub mut: - @type u16 // ::SDL_HAPTIC_RAMP + @type u16 // ::SDL_HAPTIC_RAMP direction HapticDirection // Direction of the effect. - length u32 // Duration of the effect. - delay u16 // Delay before starting the effect. - button u16 // Button that triggers the effect. - interval u16 // How soon it can be triggered again after button. - start i16 // Beginning strength level. - end i16 // Ending strength level. - attack_length u16 // Duration of the attack. - attack_level u16 // Level at the start of the attack. - fade_length u16 // Duration of the fade. - fade_level u16 // Level at the end of the fade. + length u32 // Duration of the effect. + delay u16 // Delay before starting the effect. + button u16 // Button that triggers the effect. + interval u16 // How soon it can be triggered again after button. + start i16 // Beginning strength level. + end i16 // Ending strength level. + attack_length u16 // Duration of the attack. + attack_level u16 // Level at the start of the attack. + fade_length u16 // Duration of the fade. + fade_level u16 // Level at the end of the fade. } pub type HapticRamp = C.SDL_HapticRamp @@ -482,20 +482,20 @@ pub type HapticLeftRight = C.SDL_HapticLeftRight @[typedef] pub struct C.SDL_HapticCustom { pub mut: - @type u16 // ::SDL_HAPTIC_CUSTOM + @type u16 // ::SDL_HAPTIC_CUSTOM direction HapticDirection // Direction of the effect. - length u32 // Duration of the effect. - delay u16 // Delay before starting the effect. - button u16 // Button that triggers the effect. - interval u16 // How soon it can be triggered again after button. - channels u8 // Axes to use, minimum of one. - period u16 // Sample periods. - samples u16 // Amount of samples. - data &u16 // Should contain channels*samples items. - attack_length u16 // Duration of the attack. - attack_level u16 // Level at the start of the attack. - fade_length u16 // Duration of the fade. - fade_level u16 // Level at the end of the fade. + length u32 // Duration of the effect. + delay u16 // Delay before starting the effect. + button u16 // Button that triggers the effect. + interval u16 // How soon it can be triggered again after button. + channels u8 // Axes to use, minimum of one. + period u16 // Sample periods. + samples u16 // Amount of samples. + data &u16 // Should contain channels*samples items. + attack_length u16 // Duration of the attack. + attack_level u16 // Level at the start of the attack. + fade_length u16 // Duration of the fade. + fade_level u16 // Level at the end of the fade. } pub type HapticCustom = C.SDL_HapticCustom @@ -577,7 +577,7 @@ Uint16 fade_level; // Level at the end of the fade. union C.SDL_HapticEffect { pub mut: // Common for all force feedback effects - @type u16 // Effect type. + @type u16 // Effect type. constant HapticConstant // Constant effect. periodic HapticPeriodic // Periodic effect. condition HapticCondition // Condition effect. diff --git a/image/image.c.v b/image/image.c.v index 2259e8e3..c2aea189 100644 --- a/image/image.c.v +++ b/image/image.c.v @@ -41,9 +41,9 @@ pub fn linked_version() &sdl.Version { // InitFlags isC.IMG_InitFlags pub enum InitFlags { - jpg = C.IMG_INIT_JPG // 0x00000001 - png = C.IMG_INIT_PNG // 0x00000002 - tif = C.IMG_INIT_TIF // 0x00000004 + jpg = C.IMG_INIT_JPG // 0x00000001 + png = C.IMG_INIT_PNG // 0x00000002 + tif = C.IMG_INIT_TIF // 0x00000004 webp = C.IMG_INIT_WEBP // 0x00000008 } diff --git a/joystick.c.v b/joystick.c.v index 42958702..49dc65c1 100644 --- a/joystick.c.v +++ b/joystick.c.v @@ -64,10 +64,10 @@ pub type JoystickID = i32 // JoystickPowerLevel is C.SDL_JoystickPowerLevel pub enum JoystickPowerLevel { unknown = -1 - empty // <= 5% - low // <= 20% + empty // <= 5% + low // <= 20% medium // <= 70% - full // <= 100% + full // <= 100% wired max } diff --git a/keycode.c.v b/keycode.c.v index 8c59c238..0daf37fb 100644 --- a/keycode.c.v +++ b/keycode.c.v @@ -30,192 +30,192 @@ pub fn scancode_to_keycode(scancode Scancode) Keycode { // Keymod is C.SDL_Keymod pub enum Keymod { - @none = C.KMOD_NONE // 0x0000 - lshift = C.KMOD_LSHIFT // 0x0001 - rshift = C.KMOD_RSHIFT // 0x0002 - lctrl = C.KMOD_LCTRL // 0x0040 - rctrl = C.KMOD_RCTRL // 0x0080 - lalt = C.KMOD_LALT // 0x0100 - ralt = C.KMOD_RALT // 0x0200 - lgui = C.KMOD_LGUI // 0x0400 - rgui = C.KMOD_RGUI // 0x0800 - num = C.KMOD_NUM // 0x1000 - caps = C.KMOD_CAPS // 0x2000 - mode = C.KMOD_MODE // 0x4000 + @none = C.KMOD_NONE // 0x0000 + lshift = C.KMOD_LSHIFT // 0x0001 + rshift = C.KMOD_RSHIFT // 0x0002 + lctrl = C.KMOD_LCTRL // 0x0040 + rctrl = C.KMOD_RCTRL // 0x0080 + lalt = C.KMOD_LALT // 0x0100 + ralt = C.KMOD_RALT // 0x0200 + lgui = C.KMOD_LGUI // 0x0400 + rgui = C.KMOD_RGUI // 0x0800 + num = C.KMOD_NUM // 0x1000 + caps = C.KMOD_CAPS // 0x2000 + mode = C.KMOD_MODE // 0x4000 reserved = C.KMOD_RESERVED // 0x8000 // - ctrl = C.KMOD_CTRL - shift = C.KMOD_SHIFT - alt = C.KMOD_ALT - gui = C.KMOD_GUI + ctrl = C.KMOD_CTRL + shift = C.KMOD_SHIFT + alt = C.KMOD_ALT + gui = C.KMOD_GUI } pub enum KeyCode { - unknown = C.SDLK_UNKNOWN // 0 - @return = C.SDLK_RETURN // '\r' - escape = C.SDLK_ESCAPE // '\x1B' - backspace = C.SDLK_BACKSPACE // '\b' - tab = C.SDLK_TAB // '\t' - space = C.SDLK_SPACE // ' ' - exclaim = C.SDLK_EXCLAIM // '!' - quotedbl = C.SDLK_QUOTEDBL // '"' - hash = C.SDLK_HASH // '#' - percent = C.SDLK_PERCENT // '%' - dollar = C.SDLK_DOLLAR // '$' - ampersand = C.SDLK_AMPERSAND // '&' - quote = C.SDLK_QUOTE // '\'' - leftparen = C.SDLK_LEFTPAREN // '(' - rightparen = C.SDLK_RIGHTPAREN // ')' - asterisk = C.SDLK_ASTERISK // '*' - plus = C.SDLK_PLUS // '+' - comma = C.SDLK_COMMA // '' - minus = C.SDLK_MINUS // '-' - period = C.SDLK_PERIOD // '.' - slash = C.SDLK_SLASH // '/' - _0 = C.SDLK_0 // '0' - _1 = C.SDLK_1 // '1' - _2 = C.SDLK_2 // '2' - _3 = C.SDLK_3 // '3' - _4 = C.SDLK_4 // '4' - _5 = C.SDLK_5 // '5' - _6 = C.SDLK_6 // '6' - _7 = C.SDLK_7 // '7' - _8 = C.SDLK_8 // '8' - _9 = C.SDLK_9 // '9' - colon = C.SDLK_COLON // ':' - semicolon = C.SDLK_SEMICOLON // ';' - less = C.SDLK_LESS // '<' - equals = C.SDLK_EQUALS // '=' - greater = C.SDLK_GREATER // '>' - question = C.SDLK_QUESTION // '?' - at = C.SDLK_AT // '@' + unknown = C.SDLK_UNKNOWN // 0 + @return = C.SDLK_RETURN // '\r' + escape = C.SDLK_ESCAPE // '\x1B' + backspace = C.SDLK_BACKSPACE // '\b' + tab = C.SDLK_TAB // '\t' + space = C.SDLK_SPACE // ' ' + exclaim = C.SDLK_EXCLAIM // '!' + quotedbl = C.SDLK_QUOTEDBL // '"' + hash = C.SDLK_HASH // '#' + percent = C.SDLK_PERCENT // '%' + dollar = C.SDLK_DOLLAR // '$' + ampersand = C.SDLK_AMPERSAND // '&' + quote = C.SDLK_QUOTE // '\'' + leftparen = C.SDLK_LEFTPAREN // '(' + rightparen = C.SDLK_RIGHTPAREN // ')' + asterisk = C.SDLK_ASTERISK // '*' + plus = C.SDLK_PLUS // '+' + comma = C.SDLK_COMMA // '' + minus = C.SDLK_MINUS // '-' + period = C.SDLK_PERIOD // '.' + slash = C.SDLK_SLASH // '/' + _0 = C.SDLK_0 // '0' + _1 = C.SDLK_1 // '1' + _2 = C.SDLK_2 // '2' + _3 = C.SDLK_3 // '3' + _4 = C.SDLK_4 // '4' + _5 = C.SDLK_5 // '5' + _6 = C.SDLK_6 // '6' + _7 = C.SDLK_7 // '7' + _8 = C.SDLK_8 // '8' + _9 = C.SDLK_9 // '9' + colon = C.SDLK_COLON // ':' + semicolon = C.SDLK_SEMICOLON // ';' + less = C.SDLK_LESS // '<' + equals = C.SDLK_EQUALS // '=' + greater = C.SDLK_GREATER // '>' + question = C.SDLK_QUESTION // '?' + at = C.SDLK_AT // '@' /* Skip uppercase letters */ - leftbracket = C.SDLK_LEFTBRACKET // '[' - backslash = C.SDLK_BACKSLASH // '\\' - rightbracket = C.SDLK_RIGHTBRACKET // ']' - caret = C.SDLK_CARET // '^' - underscore = C.SDLK_UNDERSCORE // '_' - backquote = C.SDLK_BACKQUOTE // '`' - a = C.SDLK_a // 'a' - b = C.SDLK_b // 'b' - c = C.SDLK_c // 'c' - d = C.SDLK_d // 'd' - e = C.SDLK_e // 'e' - f = C.SDLK_f // 'f' - g = C.SDLK_g // 'g' - h = C.SDLK_h // 'h' - i = C.SDLK_i // 'i' - j = C.SDLK_j // 'j' - k = C.SDLK_k // 'k' - l = C.SDLK_l // 'l' - m = C.SDLK_m // 'm' - n = C.SDLK_n // 'n' - o = C.SDLK_o // 'o' - p = C.SDLK_p // 'p' - q = C.SDLK_q // 'q' - r = C.SDLK_r // 'r' - s = C.SDLK_s // 's' - t = C.SDLK_t // 't' - u = C.SDLK_u // 'u' - v = C.SDLK_v // 'v' - w = C.SDLK_w // 'w' - x = C.SDLK_x // 'x' - y = C.SDLK_y // 'y' - z = C.SDLK_z // 'z' + leftbracket = C.SDLK_LEFTBRACKET // '[' + backslash = C.SDLK_BACKSLASH // '\\' + rightbracket = C.SDLK_RIGHTBRACKET // ']' + caret = C.SDLK_CARET // '^' + underscore = C.SDLK_UNDERSCORE // '_' + backquote = C.SDLK_BACKQUOTE // '`' + a = C.SDLK_a // 'a' + b = C.SDLK_b // 'b' + c = C.SDLK_c // 'c' + d = C.SDLK_d // 'd' + e = C.SDLK_e // 'e' + f = C.SDLK_f // 'f' + g = C.SDLK_g // 'g' + h = C.SDLK_h // 'h' + i = C.SDLK_i // 'i' + j = C.SDLK_j // 'j' + k = C.SDLK_k // 'k' + l = C.SDLK_l // 'l' + m = C.SDLK_m // 'm' + n = C.SDLK_n // 'n' + o = C.SDLK_o // 'o' + p = C.SDLK_p // 'p' + q = C.SDLK_q // 'q' + r = C.SDLK_r // 'r' + s = C.SDLK_s // 's' + t = C.SDLK_t // 't' + u = C.SDLK_u // 'u' + v = C.SDLK_v // 'v' + w = C.SDLK_w // 'w' + x = C.SDLK_x // 'x' + y = C.SDLK_y // 'y' + z = C.SDLK_z // 'z' // - capslock = C.SDLK_CAPSLOCK + capslock = C.SDLK_CAPSLOCK // - f1 = C.SDLK_F1 - f2 = C.SDLK_F2 - f3 = C.SDLK_F3 - f4 = C.SDLK_F4 - f5 = C.SDLK_F5 - f6 = C.SDLK_F6 - f7 = C.SDLK_F7 - f8 = C.SDLK_F8 - f9 = C.SDLK_F9 - f10 = C.SDLK_F10 - f11 = C.SDLK_F11 - f12 = C.SDLK_F12 + f1 = C.SDLK_F1 + f2 = C.SDLK_F2 + f3 = C.SDLK_F3 + f4 = C.SDLK_F4 + f5 = C.SDLK_F5 + f6 = C.SDLK_F6 + f7 = C.SDLK_F7 + f8 = C.SDLK_F8 + f9 = C.SDLK_F9 + f10 = C.SDLK_F10 + f11 = C.SDLK_F11 + f12 = C.SDLK_F12 // - printscreen = C.SDLK_PRINTSCREEN - scrolllock = C.SDLK_SCROLLLOCK - pause = C.SDLK_PAUSE - insert = C.SDLK_INSERT - home = C.SDLK_HOME - pageup = C.SDLK_PAGEUP - delete = C.SDLK_DELETE // '\x7F' - end = C.SDLK_END - pagedown = C.SDLK_PAGEDOWN - right = C.SDLK_RIGHT - left = C.SDLK_LEFT - down = C.SDLK_DOWN - up = C.SDLK_UP + printscreen = C.SDLK_PRINTSCREEN + scrolllock = C.SDLK_SCROLLLOCK + pause = C.SDLK_PAUSE + insert = C.SDLK_INSERT + home = C.SDLK_HOME + pageup = C.SDLK_PAGEUP + delete = C.SDLK_DELETE // '\x7F' + end = C.SDLK_END + pagedown = C.SDLK_PAGEDOWN + right = C.SDLK_RIGHT + left = C.SDLK_LEFT + down = C.SDLK_DOWN + up = C.SDLK_UP // - numlockclear = C.SDLK_NUMLOCKCLEAR - divide = C.SDLK_KP_DIVIDE - kp_multiply = C.SDLK_KP_MULTIPLY - kp_minus = C.SDLK_KP_MINUS - kp_plus = C.SDLK_KP_PLUS - kp_enter = C.SDLK_KP_ENTER - kp_1 = C.SDLK_KP_1 - kp_2 = C.SDLK_KP_2 - kp_3 = C.SDLK_KP_3 - kp_4 = C.SDLK_KP_4 - kp_5 = C.SDLK_KP_5 - kp_6 = C.SDLK_KP_6 - kp_7 = C.SDLK_KP_7 - kp_8 = C.SDLK_KP_8 - kp_9 = C.SDLK_KP_9 - kp_0 = C.SDLK_KP_0 - kp_period = C.SDLK_KP_PERIOD + numlockclear = C.SDLK_NUMLOCKCLEAR + divide = C.SDLK_KP_DIVIDE + kp_multiply = C.SDLK_KP_MULTIPLY + kp_minus = C.SDLK_KP_MINUS + kp_plus = C.SDLK_KP_PLUS + kp_enter = C.SDLK_KP_ENTER + kp_1 = C.SDLK_KP_1 + kp_2 = C.SDLK_KP_2 + kp_3 = C.SDLK_KP_3 + kp_4 = C.SDLK_KP_4 + kp_5 = C.SDLK_KP_5 + kp_6 = C.SDLK_KP_6 + kp_7 = C.SDLK_KP_7 + kp_8 = C.SDLK_KP_8 + kp_9 = C.SDLK_KP_9 + kp_0 = C.SDLK_KP_0 + kp_period = C.SDLK_KP_PERIOD // - application = C.SDLK_APPLICATION - power = C.SDLK_POWER - kp_equals = C.SDLK_KP_EQUALS - f13 = C.SDLK_F13 - f14 = C.SDLK_F14 - f15 = C.SDLK_F15 - f16 = C.SDLK_F16 - f17 = C.SDLK_F17 - f18 = C.SDLK_F18 - f19 = C.SDLK_F19 - f20 = C.SDLK_F20 - f21 = C.SDLK_F21 - f22 = C.SDLK_F22 - f23 = C.SDLK_F23 - f24 = C.SDLK_F24 - execute = C.SDLK_EXECUTE - help = C.SDLK_HELP - menu = C.SDLK_MENU - @select = C.SDLK_SELECT - stop = C.SDLK_STOP - again = C.SDLK_AGAIN - undo = C.SDLK_UNDO - cut = C.SDLK_CUT - copy = C.SDLK_COPY - paste = C.SDLK_PASTE - find = C.SDLK_FIND - mute = C.SDLK_MUTE - volumeup = C.SDLK_VOLUMEUP - volumedown = C.SDLK_VOLUMEDOWN - kp_comma = C.SDLK_KP_COMMA - equalsas400 = C.SDLK_KP_EQUALSAS400 + application = C.SDLK_APPLICATION + power = C.SDLK_POWER + kp_equals = C.SDLK_KP_EQUALS + f13 = C.SDLK_F13 + f14 = C.SDLK_F14 + f15 = C.SDLK_F15 + f16 = C.SDLK_F16 + f17 = C.SDLK_F17 + f18 = C.SDLK_F18 + f19 = C.SDLK_F19 + f20 = C.SDLK_F20 + f21 = C.SDLK_F21 + f22 = C.SDLK_F22 + f23 = C.SDLK_F23 + f24 = C.SDLK_F24 + execute = C.SDLK_EXECUTE + help = C.SDLK_HELP + menu = C.SDLK_MENU + @select = C.SDLK_SELECT + stop = C.SDLK_STOP + again = C.SDLK_AGAIN + undo = C.SDLK_UNDO + cut = C.SDLK_CUT + copy = C.SDLK_COPY + paste = C.SDLK_PASTE + find = C.SDLK_FIND + mute = C.SDLK_MUTE + volumeup = C.SDLK_VOLUMEUP + volumedown = C.SDLK_VOLUMEDOWN + kp_comma = C.SDLK_KP_COMMA + equalsas400 = C.SDLK_KP_EQUALSAS400 // - alterase = C.SDLK_ALTERASE - sysreq = C.SDLK_SYSREQ - cancel = C.SDLK_CANCEL - clear = C.SDLK_CLEAR - prior = C.SDLK_PRIOR - return2 = C.SDLK_RETURN2 - separator = C.SDLK_SEPARATOR - out = C.SDLK_OUT - oper = C.SDLK_OPER - clearagain = C.SDLK_CLEARAGAIN - crsel = C.SDLK_CRSEL - exsel = C.SDLK_EXSEL + alterase = C.SDLK_ALTERASE + sysreq = C.SDLK_SYSREQ + cancel = C.SDLK_CANCEL + clear = C.SDLK_CLEAR + prior = C.SDLK_PRIOR + return2 = C.SDLK_RETURN2 + separator = C.SDLK_SEPARATOR + out = C.SDLK_OUT + oper = C.SDLK_OPER + clearagain = C.SDLK_CLEARAGAIN + crsel = C.SDLK_CRSEL + exsel = C.SDLK_EXSEL // kp_00 = C.SDLK_KP_00 kp_000 = C.SDLK_KP_000 @@ -272,36 +272,36 @@ pub enum KeyCode { ralt = C.SDLK_RALT rgui = C.SDLK_RGUI // - mode = C.SDLK_MODE + mode = C.SDLK_MODE // - audionext = C.SDLK_AUDIONEXT - audioprev = C.SDLK_AUDIOPREV - audiostop = C.SDLK_AUDIOSTOP - audioplay = C.SDLK_AUDIOPLAY - audiomute = C.SDLK_AUDIOMUTE - mediaselect = C.SDLK_MEDIASELECT - www = C.SDLK_WWW - mail = C.SDLK_MAIL - calculator = C.SDLK_CALCULATOR - computer = C.SDLK_COMPUTER - ac_search = C.SDLK_AC_SEARCH - ac_home = C.SDLK_AC_HOME - ac_back = C.SDLK_AC_BACK - ac_forward = C.SDLK_AC_FORWARD - ac_stop = C.SDLK_AC_STOP - ac_refresh = C.SDLK_AC_REFRESH - ac_bookmarks = C.SDLK_AC_BOOKMARKS + audionext = C.SDLK_AUDIONEXT + audioprev = C.SDLK_AUDIOPREV + audiostop = C.SDLK_AUDIOSTOP + audioplay = C.SDLK_AUDIOPLAY + audiomute = C.SDLK_AUDIOMUTE + mediaselect = C.SDLK_MEDIASELECT + www = C.SDLK_WWW + mail = C.SDLK_MAIL + calculator = C.SDLK_CALCULATOR + computer = C.SDLK_COMPUTER + ac_search = C.SDLK_AC_SEARCH + ac_home = C.SDLK_AC_HOME + ac_back = C.SDLK_AC_BACK + ac_forward = C.SDLK_AC_FORWARD + ac_stop = C.SDLK_AC_STOP + ac_refresh = C.SDLK_AC_REFRESH + ac_bookmarks = C.SDLK_AC_BOOKMARKS // - brightnessdown = C.SDLK_BRIGHTNESSDOWN - brightnessup = C.SDLK_BRIGHTNESSUP - displayswitch = C.SDLK_DISPLAYSWITCH - kbdillumtoggle = C.SDLK_KBDILLUMTOGGLE - kbdillumdown = C.SDLK_KBDILLUMDOWN - kbdillumup = C.SDLK_KBDILLUMUP - eject = C.SDLK_EJECT - sleep = C.SDLK_SLEEP - app1 = C.SDLK_APP1 - app2 = C.SDLK_APP2 - audiorewind = C.SDLK_AUDIOREWIND - audiofastforward = C.SDLK_AUDIOFASTFORWARD + brightnessdown = C.SDLK_BRIGHTNESSDOWN + brightnessup = C.SDLK_BRIGHTNESSUP + displayswitch = C.SDLK_DISPLAYSWITCH + kbdillumtoggle = C.SDLK_KBDILLUMTOGGLE + kbdillumdown = C.SDLK_KBDILLUMDOWN + kbdillumup = C.SDLK_KBDILLUMUP + eject = C.SDLK_EJECT + sleep = C.SDLK_SLEEP + app1 = C.SDLK_APP1 + app2 = C.SDLK_APP2 + audiorewind = C.SDLK_AUDIOREWIND + audiofastforward = C.SDLK_AUDIOFASTFORWARD } diff --git a/log.c.v b/log.c.v index 9142451d..b3ecd290 100644 --- a/log.c.v +++ b/log.c.v @@ -29,16 +29,16 @@ pub enum LogCategory { input = C.SDL_LOG_CATEGORY_INPUT test = C.SDL_LOG_CATEGORY_TEST // Reserved for future SDL library use - reserved1 = C.SDL_LOG_CATEGORY_RESERVED1 - reserved2 = C.SDL_LOG_CATEGORY_RESERVED2 - reserved3 = C.SDL_LOG_CATEGORY_RESERVED3 - reserved4 = C.SDL_LOG_CATEGORY_RESERVED4 - reserved5 = C.SDL_LOG_CATEGORY_RESERVED5 - reserved6 = C.SDL_LOG_CATEGORY_RESERVED6 - reserved7 = C.SDL_LOG_CATEGORY_RESERVED7 - reserved8 = C.SDL_LOG_CATEGORY_RESERVED8 - reserved9 = C.SDL_LOG_CATEGORY_RESERVED9 - reserved10 = C.SDL_LOG_CATEGORY_RESERVED10 + reserved1 = C.SDL_LOG_CATEGORY_RESERVED1 + reserved2 = C.SDL_LOG_CATEGORY_RESERVED2 + reserved3 = C.SDL_LOG_CATEGORY_RESERVED3 + reserved4 = C.SDL_LOG_CATEGORY_RESERVED4 + reserved5 = C.SDL_LOG_CATEGORY_RESERVED5 + reserved6 = C.SDL_LOG_CATEGORY_RESERVED6 + reserved7 = C.SDL_LOG_CATEGORY_RESERVED7 + reserved8 = C.SDL_LOG_CATEGORY_RESERVED8 + reserved9 = C.SDL_LOG_CATEGORY_RESERVED9 + reserved10 = C.SDL_LOG_CATEGORY_RESERVED10 // Beyond this point is reserved for application use, e.g. // enum { // MYAPP_CATEGORY_AWESOME1 = SDL_LOG_CATEGORY_CUSTOM, @@ -47,7 +47,7 @@ pub enum LogCategory { // ... // }; // - custom = C.SDL_LOG_CATEGORY_CUSTOM + custom = C.SDL_LOG_CATEGORY_CUSTOM } // LogPriority is C.SDL_LogPriority diff --git a/messagebox.c.v b/messagebox.c.v index 272dc2ab..f786be46 100644 --- a/messagebox.c.v +++ b/messagebox.c.v @@ -10,9 +10,9 @@ module sdl // MessageBoxFlags is C.SDL_MessageBoxFlags // MessageBox flags. If supported will display warning icon, etc. pub enum MessageBoxFlags { - error = C.SDL_MESSAGEBOX_ERROR // 0x00000010, error dialog - warning = C.SDL_MESSAGEBOX_WARNING // 0x00000020, warning dialog - information = C.SDL_MESSAGEBOX_INFORMATION // 0x00000040, informational dialog + error = C.SDL_MESSAGEBOX_ERROR // 0x00000010, error dialog + warning = C.SDL_MESSAGEBOX_WARNING // 0x00000020, warning dialog + information = C.SDL_MESSAGEBOX_INFORMATION // 0x00000040, informational dialog buttons_left_to_right = C.SDL_MESSAGEBOX_BUTTONS_LEFT_TO_RIGHT // 0x00000080, buttons placed left to right buttons_right_to_left = C.SDL_MESSAGEBOX_BUTTONS_RIGHT_TO_LEFT // 0x00000100, buttons placed right to left } diff --git a/mixer/mixer.c.v b/mixer/mixer.c.v index 974f0a84..ae7f60ef 100644 --- a/mixer/mixer.c.v +++ b/mixer/mixer.c.v @@ -48,10 +48,10 @@ pub fn linked_version() &sdl.Version { // InitFlags is C.MIX_InitFlags pub enum InitFlags { flac = C.MIX_INIT_FLAC // 0x00000001 - mod = C.MIX_INIT_MOD // 0x00000002 - mp3 = C.MIX_INIT_MP3 // 0x00000008 - ogg = C.MIX_INIT_OGG // 0x00000010 - mid = C.MIX_INIT_MID // 0x00000020 + mod = C.MIX_INIT_MOD // 0x00000002 + mp3 = C.MIX_INIT_MP3 // 0x00000008 + ogg = C.MIX_INIT_OGG // 0x00000010 + mid = C.MIX_INIT_MID // 0x00000020 opus = C.MIX_INIT_OPUS // 0x00000040 } diff --git a/mouse.c.v b/mouse.c.v index 25931052..13e697a4 100644 --- a/mouse.c.v +++ b/mouse.c.v @@ -58,25 +58,25 @@ pub const button_x2mask = int(C.SDL_BUTTON_X2MASK) // SDL_BUTTON(SDL_BUTTON_X2) // SystemCursor is C.SDL_SystemCursor // Cursor types for SDL_CreateSystemCursor(). pub enum SystemCursor { - arrow = C.SDL_SYSTEM_CURSOR_ARROW // Arrow - ibeam = C.SDL_SYSTEM_CURSOR_IBEAM // I-beam - wait = C.SDL_SYSTEM_CURSOR_WAIT // Wait + arrow = C.SDL_SYSTEM_CURSOR_ARROW // Arrow + ibeam = C.SDL_SYSTEM_CURSOR_IBEAM // I-beam + wait = C.SDL_SYSTEM_CURSOR_WAIT // Wait crosshair = C.SDL_SYSTEM_CURSOR_CROSSHAIR // Crosshair waitarrow = C.SDL_SYSTEM_CURSOR_WAITARROW // Small wait cursor (or Wait if not available) - sizenwse = C.SDL_SYSTEM_CURSOR_SIZENWSE // Double arrow pointing northwest and southeast - sizenesw = C.SDL_SYSTEM_CURSOR_SIZENESW // Double arrow pointing northeast and southwest - sizewe = C.SDL_SYSTEM_CURSOR_SIZEWE // Double arrow pointing west and east - sizens = C.SDL_SYSTEM_CURSOR_SIZENS // Double arrow pointing north and south - sizeall = C.SDL_SYSTEM_CURSOR_SIZEALL // Four pointed arrow pointing north, south, east, and west - no = C.SDL_SYSTEM_CURSOR_NO // Slashed circle or crossbones - hand = C.SDL_SYSTEM_CURSOR_HAND // Hand + sizenwse = C.SDL_SYSTEM_CURSOR_SIZENWSE // Double arrow pointing northwest and southeast + sizenesw = C.SDL_SYSTEM_CURSOR_SIZENESW // Double arrow pointing northeast and southwest + sizewe = C.SDL_SYSTEM_CURSOR_SIZEWE // Double arrow pointing west and east + sizens = C.SDL_SYSTEM_CURSOR_SIZENS // Double arrow pointing north and south + sizeall = C.SDL_SYSTEM_CURSOR_SIZEALL // Four pointed arrow pointing north, south, east, and west + no = C.SDL_SYSTEM_CURSOR_NO // Slashed circle or crossbones + hand = C.SDL_SYSTEM_CURSOR_HAND // Hand num_cursors = C.SDL_NUM_SYSTEM_CURSORS } // MouseWheelDirection is C.SDL_MouseWheelDirection // Scroll direction types for the Scroll event pub enum MouseWheelDirection { - normal = C.SDL_MOUSEWHEEL_NORMAL // The scroll direction is normal + normal = C.SDL_MOUSEWHEEL_NORMAL // The scroll direction is normal flipped = C.SDL_MOUSEWHEEL_FLIPPED // The scroll direction is flipped / natural } diff --git a/pixels.c.v b/pixels.c.v index ec407990..6a1c3dc4 100644 --- a/pixels.c.v +++ b/pixels.c.v @@ -122,13 +122,13 @@ pub enum Format { argb32 = C.SDL_PIXELFORMAT_ARGB32 bgra32 = C.SDL_PIXELFORMAT_BGRA32 abgr32 = C.SDL_PIXELFORMAT_ABGR32 - yv12 = C.SDL_PIXELFORMAT_YV12 // Planar mode: Y + V + U (3 planes) - iyuv = C.SDL_PIXELFORMAT_IYUV // Planar mode: Y + U + V (3 planes) - yuy2 = C.SDL_PIXELFORMAT_YUY2 // Packed mode: Y0+U0+Y1+V0 (1 plane) - uyvy = C.SDL_PIXELFORMAT_UYVY // Packed mode: U0+Y0+V0+Y1 (1 plane) - yvyu = C.SDL_PIXELFORMAT_YVYU // Packed mode: Y0+V0+Y1+U0 (1 plane) - nv12 = C.SDL_PIXELFORMAT_NV12 // Planar mode: Y + U/V interleaved (2 planes) - nv21 = C.SDL_PIXELFORMAT_NV21 // Planar mode: Y + V/U interleaved (2 planes) + yv12 = C.SDL_PIXELFORMAT_YV12 // Planar mode: Y + V + U (3 planes) + iyuv = C.SDL_PIXELFORMAT_IYUV // Planar mode: Y + U + V (3 planes) + yuy2 = C.SDL_PIXELFORMAT_YUY2 // Packed mode: Y0+U0+Y1+V0 (1 plane) + uyvy = C.SDL_PIXELFORMAT_UYVY // Packed mode: U0+Y0+V0+Y1 (1 plane) + yvyu = C.SDL_PIXELFORMAT_YVYU // Packed mode: Y0+V0+Y1+U0 (1 plane) + nv12 = C.SDL_PIXELFORMAT_NV12 // Planar mode: Y + U/V interleaved (2 planes) + nv21 = C.SDL_PIXELFORMAT_NV21 // Planar mode: Y + V/U interleaved (2 planes) external_oes = C.SDL_PIXELFORMAT_EXTERNAL_OES // Android video texture format } diff --git a/power.c.v b/power.c.v index db5edfbb..a5ca5d97 100644 --- a/power.c.v +++ b/power.c.v @@ -10,11 +10,11 @@ module sdl // PowerState is the basic state for the system's power supply. // PowerState is C.SDL_PowerState pub enum PowerState { - unknown = C.SDL_POWERSTATE_UNKNOWN // cannot determine power status + unknown = C.SDL_POWERSTATE_UNKNOWN // cannot determine power status on_battery = C.SDL_POWERSTATE_ON_BATTERY // Not plugged in, running on the battery no_battery = C.SDL_POWERSTATE_NO_BATTERY // Plugged in, no battery available - charging = C.SDL_POWERSTATE_CHARGING // Plugged in, charging battery - charged = C.SDL_POWERSTATE_CHARGED // Plugged in, battery charged + charging = C.SDL_POWERSTATE_CHARGING // Plugged in, charging battery + charged = C.SDL_POWERSTATE_CHARGED // Plugged in, battery charged } fn C.SDL_GetPowerInfo(secs &int, pct &int) PowerState diff --git a/render.c.v b/render.c.v index 4bd774d0..9082bb4c 100644 --- a/render.c.v +++ b/render.c.v @@ -28,9 +28,9 @@ module sdl // RendererFlags is C.SDL_RendererFlags pub enum RendererFlags { - software = C.SDL_RENDERER_SOFTWARE // 0x00000001 The renderer is a software fallback - accelerated = C.SDL_RENDERER_ACCELERATED // 0x00000002 The renderer uses hardware acceleration - presentvsync = C.SDL_RENDERER_PRESENTVSYNC // 0x00000004 Present is synchronized with the refresh rate + software = C.SDL_RENDERER_SOFTWARE // 0x00000001 The renderer is a software fallback + accelerated = C.SDL_RENDERER_ACCELERATED // 0x00000002 The renderer uses hardware acceleration + presentvsync = C.SDL_RENDERER_PRESENTVSYNC // 0x00000004 Present is synchronized with the refresh rate targettexture = C.SDL_RENDERER_TARGETTEXTURE // 0x00000008 } @@ -51,29 +51,29 @@ pub type RendererInfo = C.SDL_RendererInfo // ScaleMode is C.SDL_ScaleMode pub enum ScaleMode { nearest = C.SDL_ScaleModeNearest // nearest pixel sampling - linear = C.SDL_ScaleModeLinear // linear filtering - best = C.SDL_ScaleModeBest // anisotropic filtering + linear = C.SDL_ScaleModeLinear // linear filtering + best = C.SDL_ScaleModeBest // anisotropic filtering } // TextureAccess is C.SDL_TextureAccess pub enum TextureAccess { - @static = C.SDL_TEXTUREACCESS_STATIC // Changes rarely, not lockable + @static = C.SDL_TEXTUREACCESS_STATIC // Changes rarely, not lockable streaming = C.SDL_TEXTUREACCESS_STREAMING // Changes frequently, lockable - target = C.SDL_TEXTUREACCESS_TARGET // Texture can be used as a render target + target = C.SDL_TEXTUREACCESS_TARGET // Texture can be used as a render target } // TextureModulate is C.SDL_TextureModulate pub enum TextureModulate { - @none = C.SDL_TEXTUREMODULATE_NONE // 0x00000000 No modulation + @none = C.SDL_TEXTUREMODULATE_NONE // 0x00000000 No modulation color = C.SDL_TEXTUREMODULATE_COLOR // 0x00000001 srcC = srcC * color alpha = C.SDL_TEXTUREMODULATE_ALPHA // 0x00000002 srcA = srcA * alpha } // RendererFlip is C.SDL_RendererFlip pub enum RendererFlip { - @none = C.SDL_FLIP_NONE // 0x00000000 Do not flip + @none = C.SDL_FLIP_NONE // 0x00000000 Do not flip horizontal = C.SDL_FLIP_HORIZONTAL // 0x00000001 flip horizontally - vertical = C.SDL_FLIP_VERTICAL // 0x00000002 flip vertically + vertical = C.SDL_FLIP_VERTICAL // 0x00000002 flip vertically } @[noinit; typedef] diff --git a/scancode.c.v b/scancode.c.v index 2498ea38..2599f914 100644 --- a/scancode.c.v +++ b/scancode.c.v @@ -17,59 +17,59 @@ module sdl // https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf // Scancode is C.SDL_Scancode pub enum Scancode { - scancode_unknown = C.SDL_SCANCODE_UNKNOWN // 0 + scancode_unknown = C.SDL_SCANCODE_UNKNOWN // 0 // Usage page 0x07 // // These values are from usage page 0x07 (USB keyboard page). // - scancode_a = C.SDL_SCANCODE_A // 4 - scancode_b = C.SDL_SCANCODE_B // 5 - scancode_c = C.SDL_SCANCODE_C // 6 - scancode_d = C.SDL_SCANCODE_D // 7 - scancode_e = C.SDL_SCANCODE_E // 8 - scancode_f = C.SDL_SCANCODE_F // 9 - scancode_g = C.SDL_SCANCODE_G // 10 - scancode_h = C.SDL_SCANCODE_H // 11 - scancode_i = C.SDL_SCANCODE_I // 12 - scancode_j = C.SDL_SCANCODE_J // 13 - scancode_k = C.SDL_SCANCODE_K // 14 - scancode_l = C.SDL_SCANCODE_L // 15 - scancode_m = C.SDL_SCANCODE_M // 16 - scancode_n = C.SDL_SCANCODE_N // 17 - scancode_o = C.SDL_SCANCODE_O // 18 - scancode_p = C.SDL_SCANCODE_P // 19 - scancode_q = C.SDL_SCANCODE_Q // 20 - scancode_r = C.SDL_SCANCODE_R // 21 - scancode_s = C.SDL_SCANCODE_S // 22 - scancode_t = C.SDL_SCANCODE_T // 23 - scancode_u = C.SDL_SCANCODE_U // 24 - scancode_v = C.SDL_SCANCODE_V // 25 - scancode_w = C.SDL_SCANCODE_W // 26 - scancode_x = C.SDL_SCANCODE_X // 27 - scancode_y = C.SDL_SCANCODE_Y // 28 - scancode_z = C.SDL_SCANCODE_Z // 29 + scancode_a = C.SDL_SCANCODE_A // 4 + scancode_b = C.SDL_SCANCODE_B // 5 + scancode_c = C.SDL_SCANCODE_C // 6 + scancode_d = C.SDL_SCANCODE_D // 7 + scancode_e = C.SDL_SCANCODE_E // 8 + scancode_f = C.SDL_SCANCODE_F // 9 + scancode_g = C.SDL_SCANCODE_G // 10 + scancode_h = C.SDL_SCANCODE_H // 11 + scancode_i = C.SDL_SCANCODE_I // 12 + scancode_j = C.SDL_SCANCODE_J // 13 + scancode_k = C.SDL_SCANCODE_K // 14 + scancode_l = C.SDL_SCANCODE_L // 15 + scancode_m = C.SDL_SCANCODE_M // 16 + scancode_n = C.SDL_SCANCODE_N // 17 + scancode_o = C.SDL_SCANCODE_O // 18 + scancode_p = C.SDL_SCANCODE_P // 19 + scancode_q = C.SDL_SCANCODE_Q // 20 + scancode_r = C.SDL_SCANCODE_R // 21 + scancode_s = C.SDL_SCANCODE_S // 22 + scancode_t = C.SDL_SCANCODE_T // 23 + scancode_u = C.SDL_SCANCODE_U // 24 + scancode_v = C.SDL_SCANCODE_V // 25 + scancode_w = C.SDL_SCANCODE_W // 26 + scancode_x = C.SDL_SCANCODE_X // 27 + scancode_y = C.SDL_SCANCODE_Y // 28 + scancode_z = C.SDL_SCANCODE_Z // 29 // - scancode_1 = C.SDL_SCANCODE_1 // 30 - scancode_2 = C.SDL_SCANCODE_2 // 31 - scancode_3 = C.SDL_SCANCODE_3 // 32 - scancode_4 = C.SDL_SCANCODE_4 // 33 - scancode_5 = C.SDL_SCANCODE_5 // 34 - scancode_6 = C.SDL_SCANCODE_6 // 35 - scancode_7 = C.SDL_SCANCODE_7 // 36 - scancode_8 = C.SDL_SCANCODE_8 // 37 - scancode_9 = C.SDL_SCANCODE_9 // 38 - scancode_0 = C.SDL_SCANCODE_0 // 39 + scancode_1 = C.SDL_SCANCODE_1 // 30 + scancode_2 = C.SDL_SCANCODE_2 // 31 + scancode_3 = C.SDL_SCANCODE_3 // 32 + scancode_4 = C.SDL_SCANCODE_4 // 33 + scancode_5 = C.SDL_SCANCODE_5 // 34 + scancode_6 = C.SDL_SCANCODE_6 // 35 + scancode_7 = C.SDL_SCANCODE_7 // 36 + scancode_8 = C.SDL_SCANCODE_8 // 37 + scancode_9 = C.SDL_SCANCODE_9 // 38 + scancode_0 = C.SDL_SCANCODE_0 // 39 // - scancode_return = C.SDL_SCANCODE_RETURN // 40 - scancode_escape = C.SDL_SCANCODE_ESCAPE // 41 - scancode_backspace = C.SDL_SCANCODE_BACKSPACE // 42 - scancode_tab = C.SDL_SCANCODE_TAB // 43 - scancode_space = C.SDL_SCANCODE_SPACE // 44 + scancode_return = C.SDL_SCANCODE_RETURN // 40 + scancode_escape = C.SDL_SCANCODE_ESCAPE // 41 + scancode_backspace = C.SDL_SCANCODE_BACKSPACE // 42 + scancode_tab = C.SDL_SCANCODE_TAB // 43 + scancode_space = C.SDL_SCANCODE_SPACE // 44 // - scancode_minus = C.SDL_SCANCODE_MINUS // 45 - scancode_equals = C.SDL_SCANCODE_EQUALS // 46 - scancode_leftbracket = C.SDL_SCANCODE_LEFTBRACKET // 47 - scancode_rightbracket = C.SDL_SCANCODE_RIGHTBRACKET // 48 + scancode_minus = C.SDL_SCANCODE_MINUS // 45 + scancode_equals = C.SDL_SCANCODE_EQUALS // 46 + scancode_leftbracket = C.SDL_SCANCODE_LEFTBRACKET // 47 + scancode_rightbracket = C.SDL_SCANCODE_RIGHTBRACKET // 48 // Located at the lower left of the return // key on ISO keyboards and at the right end // of the QWERTY row on ANSI keyboards. @@ -83,7 +83,7 @@ pub enum Scancode { // ACCENT and POUND SIGN in a French Mac // layout, and ASTERISK and MICRO SIGN in a // French Windows layout. - scancode_backslash = C.SDL_SCANCODE_BACKSLASH // 49 + scancode_backslash = C.SDL_SCANCODE_BACKSLASH // 49 // ISO USB keyboards actually use this code // instead of 49 for the same key, but all // OSes I've seen treat the two codes @@ -95,9 +95,9 @@ pub enum Scancode { // should not rely on this code because SDL // will never generate it with most (all?) // keyboards. - scancode_nonushash = C.SDL_SCANCODE_NONUSHASH // 50 - scancode_semicolon = C.SDL_SCANCODE_SEMICOLON // 51 - scancode_apostrophe = C.SDL_SCANCODE_APOSTROPHE // 52 + scancode_nonushash = C.SDL_SCANCODE_NONUSHASH // 50 + scancode_semicolon = C.SDL_SCANCODE_SEMICOLON // 51 + scancode_apostrophe = C.SDL_SCANCODE_APOSTROPHE // 52 // Located in the top left corner (on both ANSI // and ISO keyboards). Produces GRAVE ACCENT and // TILDE in a US Windows layout and in US and UK @@ -114,61 +114,61 @@ pub enum Scancode { // keyboards, and LESS-THAN SIGN and GREATER-THAN // SIGN in a Swiss German, German, or French Mac // layout on ANSI keyboards. - scancode_grave = C.SDL_SCANCODE_GRAVE // 53 + scancode_grave = C.SDL_SCANCODE_GRAVE // 53 // - scancode_comma = C.SDL_SCANCODE_COMMA // 54 - scancode_period = C.SDL_SCANCODE_PERIOD // 55 - scancode_slash = C.SDL_SCANCODE_SLASH // 56 + scancode_comma = C.SDL_SCANCODE_COMMA // 54 + scancode_period = C.SDL_SCANCODE_PERIOD // 55 + scancode_slash = C.SDL_SCANCODE_SLASH // 56 // - scancode_capslock = C.SDL_SCANCODE_CAPSLOCK // 57 + scancode_capslock = C.SDL_SCANCODE_CAPSLOCK // 57 // - scancode_f1 = C.SDL_SCANCODE_F1 // 58 - scancode_f2 = C.SDL_SCANCODE_F2 // 59 - scancode_f3 = C.SDL_SCANCODE_F3 // 60 - scancode_f4 = C.SDL_SCANCODE_F4 // 61 - scancode_f5 = C.SDL_SCANCODE_F5 // 62 - scancode_f6 = C.SDL_SCANCODE_F6 // 63 - scancode_f7 = C.SDL_SCANCODE_F7 // 64 - scancode_f8 = C.SDL_SCANCODE_F8 // 65 - scancode_f9 = C.SDL_SCANCODE_F9 // 66 - scancode_f10 = C.SDL_SCANCODE_F10 // 67 - scancode_f11 = C.SDL_SCANCODE_F11 // 68 - scancode_f12 = C.SDL_SCANCODE_F12 // 69 + scancode_f1 = C.SDL_SCANCODE_F1 // 58 + scancode_f2 = C.SDL_SCANCODE_F2 // 59 + scancode_f3 = C.SDL_SCANCODE_F3 // 60 + scancode_f4 = C.SDL_SCANCODE_F4 // 61 + scancode_f5 = C.SDL_SCANCODE_F5 // 62 + scancode_f6 = C.SDL_SCANCODE_F6 // 63 + scancode_f7 = C.SDL_SCANCODE_F7 // 64 + scancode_f8 = C.SDL_SCANCODE_F8 // 65 + scancode_f9 = C.SDL_SCANCODE_F9 // 66 + scancode_f10 = C.SDL_SCANCODE_F10 // 67 + scancode_f11 = C.SDL_SCANCODE_F11 // 68 + scancode_f12 = C.SDL_SCANCODE_F12 // 69 // - scancode_printscreen = C.SDL_SCANCODE_PRINTSCREEN // 70 - scancode_scrolllock = C.SDL_SCANCODE_SCROLLLOCK // 71 - scancode_pause = C.SDL_SCANCODE_PAUSE // 72 + scancode_printscreen = C.SDL_SCANCODE_PRINTSCREEN // 70 + scancode_scrolllock = C.SDL_SCANCODE_SCROLLLOCK // 71 + scancode_pause = C.SDL_SCANCODE_PAUSE // 72 // insert on PC, help on some Mac keyboards (but does send code 73, not 117) - scancode_insert = C.SDL_SCANCODE_INSERT // 73 + scancode_insert = C.SDL_SCANCODE_INSERT // 73 // - scancode_home = C.SDL_SCANCODE_HOME // 74 - scancode_pageup = C.SDL_SCANCODE_PAGEUP // 75 - scancode_delete = C.SDL_SCANCODE_DELETE // 76 - scancode_end = C.SDL_SCANCODE_END // 77 - scancode_pagedown = C.SDL_SCANCODE_PAGEDOWN // 78 - scancode_right = C.SDL_SCANCODE_RIGHT // 79 - scancode_left = C.SDL_SCANCODE_LEFT // 80 - scancode_down = C.SDL_SCANCODE_DOWN // 81 - scancode_up = C.SDL_SCANCODE_UP // 82 + scancode_home = C.SDL_SCANCODE_HOME // 74 + scancode_pageup = C.SDL_SCANCODE_PAGEUP // 75 + scancode_delete = C.SDL_SCANCODE_DELETE // 76 + scancode_end = C.SDL_SCANCODE_END // 77 + scancode_pagedown = C.SDL_SCANCODE_PAGEDOWN // 78 + scancode_right = C.SDL_SCANCODE_RIGHT // 79 + scancode_left = C.SDL_SCANCODE_LEFT // 80 + scancode_down = C.SDL_SCANCODE_DOWN // 81 + scancode_up = C.SDL_SCANCODE_UP // 82 // - scancode_numlockclear = C.SDL_SCANCODE_NUMLOCKCLEAR // 83 num lock on PC, clear on Mac keyboards + scancode_numlockclear = C.SDL_SCANCODE_NUMLOCKCLEAR // 83 num lock on PC, clear on Mac keyboards // - scancode_kp_divide = C.SDL_SCANCODE_KP_DIVIDE // 84 - scancode_kp_multiply = C.SDL_SCANCODE_KP_MULTIPLY // 85 - scancode_kp_minus = C.SDL_SCANCODE_KP_MINUS // 86 - scancode_kp_plus = C.SDL_SCANCODE_KP_PLUS // 87 - scancode_kp_enter = C.SDL_SCANCODE_KP_ENTER // 88 - scancode_kp_1 = C.SDL_SCANCODE_KP_1 // 89 - scancode_kp_2 = C.SDL_SCANCODE_KP_2 // 90 - scancode_kp_3 = C.SDL_SCANCODE_KP_3 // 91 - scancode_kp_4 = C.SDL_SCANCODE_KP_4 // 92 - scancode_kp_5 = C.SDL_SCANCODE_KP_5 // 93 - scancode_kp_6 = C.SDL_SCANCODE_KP_6 // 94 - scancode_kp_7 = C.SDL_SCANCODE_KP_7 // 95 - scancode_kp_8 = C.SDL_SCANCODE_KP_8 // 96 - scancode_kp_9 = C.SDL_SCANCODE_KP_9 // 97 - scancode_kp_0 = C.SDL_SCANCODE_KP_0 // 98 - scancode_kp_period = C.SDL_SCANCODE_KP_PERIOD // 99 + scancode_kp_divide = C.SDL_SCANCODE_KP_DIVIDE // 84 + scancode_kp_multiply = C.SDL_SCANCODE_KP_MULTIPLY // 85 + scancode_kp_minus = C.SDL_SCANCODE_KP_MINUS // 86 + scancode_kp_plus = C.SDL_SCANCODE_KP_PLUS // 87 + scancode_kp_enter = C.SDL_SCANCODE_KP_ENTER // 88 + scancode_kp_1 = C.SDL_SCANCODE_KP_1 // 89 + scancode_kp_2 = C.SDL_SCANCODE_KP_2 // 90 + scancode_kp_3 = C.SDL_SCANCODE_KP_3 // 91 + scancode_kp_4 = C.SDL_SCANCODE_KP_4 // 92 + scancode_kp_5 = C.SDL_SCANCODE_KP_5 // 93 + scancode_kp_6 = C.SDL_SCANCODE_KP_6 // 94 + scancode_kp_7 = C.SDL_SCANCODE_KP_7 // 95 + scancode_kp_8 = C.SDL_SCANCODE_KP_8 // 96 + scancode_kp_9 = C.SDL_SCANCODE_KP_9 // 97 + scancode_kp_0 = C.SDL_SCANCODE_KP_0 // 98 + scancode_kp_period = C.SDL_SCANCODE_KP_PERIOD // 99 // // This is the additional key that ISO // keyboards have over ANSI ones, @@ -180,177 +180,177 @@ pub enum Scancode { // LESS-THAN SIGN and GREATER-THAN SIGN // in a Swiss German, German, or French // layout. - scancode_nonusbackslash = C.SDL_SCANCODE_NONUSBACKSLASH // 100 + scancode_nonusbackslash = C.SDL_SCANCODE_NONUSBACKSLASH // 100 // - scancode_application = C.SDL_SCANCODE_APPLICATION // 101 windows contextual menu, compose + scancode_application = C.SDL_SCANCODE_APPLICATION // 101 windows contextual menu, compose // The USB document says this is a status flag, // not a physical key - but some Mac keyboards // do have a power key. - scancode_power = C.SDL_SCANCODE_POWER // 102 + scancode_power = C.SDL_SCANCODE_POWER // 102 // - scancode_kp_equals = C.SDL_SCANCODE_KP_EQUALS // 103 - scancode_f13 = C.SDL_SCANCODE_F13 // 104 - scancode_f14 = C.SDL_SCANCODE_F14 // 105 - scancode_f15 = C.SDL_SCANCODE_F15 // 106 - scancode_f16 = C.SDL_SCANCODE_F16 // 107 - scancode_f17 = C.SDL_SCANCODE_F17 // 108 - scancode_f18 = C.SDL_SCANCODE_F18 // 109 - scancode_f19 = C.SDL_SCANCODE_F19 // 110 - scancode_f20 = C.SDL_SCANCODE_F20 // 111 - scancode_f21 = C.SDL_SCANCODE_F21 // 112 - scancode_f22 = C.SDL_SCANCODE_F22 // 113 - scancode_f23 = C.SDL_SCANCODE_F23 // 114 - scancode_f24 = C.SDL_SCANCODE_F24 // 115 - scancode_execute = C.SDL_SCANCODE_EXECUTE // 116 - scancode_help = C.SDL_SCANCODE_HELP // 117 - scancode_menu = C.SDL_SCANCODE_MENU // 118 - scancode_select = C.SDL_SCANCODE_SELECT // 119 - scancode_stop = C.SDL_SCANCODE_STOP // 120 - scancode_again = C.SDL_SCANCODE_AGAIN // 121< redo - scancode_undo = C.SDL_SCANCODE_UNDO // 122 - scancode_cut = C.SDL_SCANCODE_CUT // 123 - scancode_copy = C.SDL_SCANCODE_COPY // 124 - scancode_paste = C.SDL_SCANCODE_PASTE // 125 - scancode_find = C.SDL_SCANCODE_FIND // 126 - scancode_mute = C.SDL_SCANCODE_MUTE // 127 - scancode_volumeup = C.SDL_SCANCODE_VOLUMEUP // 128 - scancode_volumedown = C.SDL_SCANCODE_VOLUMEDOWN // 129 + scancode_kp_equals = C.SDL_SCANCODE_KP_EQUALS // 103 + scancode_f13 = C.SDL_SCANCODE_F13 // 104 + scancode_f14 = C.SDL_SCANCODE_F14 // 105 + scancode_f15 = C.SDL_SCANCODE_F15 // 106 + scancode_f16 = C.SDL_SCANCODE_F16 // 107 + scancode_f17 = C.SDL_SCANCODE_F17 // 108 + scancode_f18 = C.SDL_SCANCODE_F18 // 109 + scancode_f19 = C.SDL_SCANCODE_F19 // 110 + scancode_f20 = C.SDL_SCANCODE_F20 // 111 + scancode_f21 = C.SDL_SCANCODE_F21 // 112 + scancode_f22 = C.SDL_SCANCODE_F22 // 113 + scancode_f23 = C.SDL_SCANCODE_F23 // 114 + scancode_f24 = C.SDL_SCANCODE_F24 // 115 + scancode_execute = C.SDL_SCANCODE_EXECUTE // 116 + scancode_help = C.SDL_SCANCODE_HELP // 117 + scancode_menu = C.SDL_SCANCODE_MENU // 118 + scancode_select = C.SDL_SCANCODE_SELECT // 119 + scancode_stop = C.SDL_SCANCODE_STOP // 120 + scancode_again = C.SDL_SCANCODE_AGAIN // 121< redo + scancode_undo = C.SDL_SCANCODE_UNDO // 122 + scancode_cut = C.SDL_SCANCODE_CUT // 123 + scancode_copy = C.SDL_SCANCODE_COPY // 124 + scancode_paste = C.SDL_SCANCODE_PASTE // 125 + scancode_find = C.SDL_SCANCODE_FIND // 126 + scancode_mute = C.SDL_SCANCODE_MUTE // 127 + scancode_volumeup = C.SDL_SCANCODE_VOLUMEUP // 128 + scancode_volumedown = C.SDL_SCANCODE_VOLUMEDOWN // 129 // - scancode_kp_comma = C.SDL_SCANCODE_KP_COMMA // 133 - scancode_kp_equalsas400 = C.SDL_SCANCODE_KP_EQUALSAS400 // 134 - scancode_international1 = C.SDL_SCANCODE_INTERNATIONAL1 // 135 used on Asian keyboards, see footnotes in USB doc - scancode_international2 = C.SDL_SCANCODE_INTERNATIONAL2 // 136 - scancode_international3 = C.SDL_SCANCODE_INTERNATIONAL3 // 137 Yen - scancode_international4 = C.SDL_SCANCODE_INTERNATIONAL4 // 138 - scancode_international5 = C.SDL_SCANCODE_INTERNATIONAL5 // 139 - scancode_international6 = C.SDL_SCANCODE_INTERNATIONAL6 // 140 - scancode_international7 = C.SDL_SCANCODE_INTERNATIONAL7 // 141 - scancode_international8 = C.SDL_SCANCODE_INTERNATIONAL8 // 142 - scancode_international9 = C.SDL_SCANCODE_INTERNATIONAL9 // 143 - scancode_lang1 = C.SDL_SCANCODE_LANG1 // 144 Hangul/English toggle - scancode_lang2 = C.SDL_SCANCODE_LANG2 // 145 Hanja conversion - scancode_lang3 = C.SDL_SCANCODE_LANG3 // 146 Katakana - scancode_lang4 = C.SDL_SCANCODE_LANG4 // 147 Hiragana - scancode_lang5 = C.SDL_SCANCODE_LANG5 // 148 Zenkaku/Hankaku - scancode_lang6 = C.SDL_SCANCODE_LANG6 // 149 reserved - scancode_lang7 = C.SDL_SCANCODE_LANG7 // 150 reserved - scancode_lang8 = C.SDL_SCANCODE_LANG8 // 151 reserved - scancode_lang9 = C.SDL_SCANCODE_LANG9 // 152 reserved + scancode_kp_comma = C.SDL_SCANCODE_KP_COMMA // 133 + scancode_kp_equalsas400 = C.SDL_SCANCODE_KP_EQUALSAS400 // 134 + scancode_international1 = C.SDL_SCANCODE_INTERNATIONAL1 // 135 used on Asian keyboards, see footnotes in USB doc + scancode_international2 = C.SDL_SCANCODE_INTERNATIONAL2 // 136 + scancode_international3 = C.SDL_SCANCODE_INTERNATIONAL3 // 137 Yen + scancode_international4 = C.SDL_SCANCODE_INTERNATIONAL4 // 138 + scancode_international5 = C.SDL_SCANCODE_INTERNATIONAL5 // 139 + scancode_international6 = C.SDL_SCANCODE_INTERNATIONAL6 // 140 + scancode_international7 = C.SDL_SCANCODE_INTERNATIONAL7 // 141 + scancode_international8 = C.SDL_SCANCODE_INTERNATIONAL8 // 142 + scancode_international9 = C.SDL_SCANCODE_INTERNATIONAL9 // 143 + scancode_lang1 = C.SDL_SCANCODE_LANG1 // 144 Hangul/English toggle + scancode_lang2 = C.SDL_SCANCODE_LANG2 // 145 Hanja conversion + scancode_lang3 = C.SDL_SCANCODE_LANG3 // 146 Katakana + scancode_lang4 = C.SDL_SCANCODE_LANG4 // 147 Hiragana + scancode_lang5 = C.SDL_SCANCODE_LANG5 // 148 Zenkaku/Hankaku + scancode_lang6 = C.SDL_SCANCODE_LANG6 // 149 reserved + scancode_lang7 = C.SDL_SCANCODE_LANG7 // 150 reserved + scancode_lang8 = C.SDL_SCANCODE_LANG8 // 151 reserved + scancode_lang9 = C.SDL_SCANCODE_LANG9 // 152 reserved // - scancode_alterase = C.SDL_SCANCODE_ALTERASE // 153 Erase-Eaze - scancode_sysreq = C.SDL_SCANCODE_SYSREQ // 154 - scancode_cancel = C.SDL_SCANCODE_CANCEL // 155 - scancode_clear = C.SDL_SCANCODE_CLEAR // 156 - scancode_prior = C.SDL_SCANCODE_PRIOR // 157 - scancode_return2 = C.SDL_SCANCODE_RETURN2 // 158 - scancode_separator = C.SDL_SCANCODE_SEPARATOR // 159 - scancode_out = C.SDL_SCANCODE_OUT // 160 - scancode_oper = C.SDL_SCANCODE_OPER // 161 - scancode_clearagain = C.SDL_SCANCODE_CLEARAGAIN // 162 - scancode_crsel = C.SDL_SCANCODE_CRSEL // 163 - scancode_exsel = C.SDL_SCANCODE_EXSEL // 164 - scancode_kp_00 = C.SDL_SCANCODE_KP_00 // 176 - scancode_kp_000 = C.SDL_SCANCODE_KP_000 // 177 + scancode_alterase = C.SDL_SCANCODE_ALTERASE // 153 Erase-Eaze + scancode_sysreq = C.SDL_SCANCODE_SYSREQ // 154 + scancode_cancel = C.SDL_SCANCODE_CANCEL // 155 + scancode_clear = C.SDL_SCANCODE_CLEAR // 156 + scancode_prior = C.SDL_SCANCODE_PRIOR // 157 + scancode_return2 = C.SDL_SCANCODE_RETURN2 // 158 + scancode_separator = C.SDL_SCANCODE_SEPARATOR // 159 + scancode_out = C.SDL_SCANCODE_OUT // 160 + scancode_oper = C.SDL_SCANCODE_OPER // 161 + scancode_clearagain = C.SDL_SCANCODE_CLEARAGAIN // 162 + scancode_crsel = C.SDL_SCANCODE_CRSEL // 163 + scancode_exsel = C.SDL_SCANCODE_EXSEL // 164 + scancode_kp_00 = C.SDL_SCANCODE_KP_00 // 176 + scancode_kp_000 = C.SDL_SCANCODE_KP_000 // 177 scancode_thousandsseparator = C.SDL_SCANCODE_THOUSANDSSEPARATOR // 178 - scancode_decimalseparator = C.SDL_SCANCODE_DECIMALSEPARATOR // 179 - scancode_currencyunit = C.SDL_SCANCODE_CURRENCYUNIT // 180 - scancode_currencysubunit = C.SDL_SCANCODE_CURRENCYSUBUNIT // 181 - scancode_kp_leftparen = C.SDL_SCANCODE_KP_LEFTPAREN // 182 - scancode_kp_rightparen = C.SDL_SCANCODE_KP_RIGHTPAREN // 183 - scancode_kp_leftbrace = C.SDL_SCANCODE_KP_LEFTBRACE // 184 - scancode_kp_rightbrace = C.SDL_SCANCODE_KP_RIGHTBRACE // 185 - scancode_kp_tab = C.SDL_SCANCODE_KP_TAB // 186 - scancode_kp_backspace = C.SDL_SCANCODE_KP_BACKSPACE // 187 - scancode_kp_a = C.SDL_SCANCODE_KP_A // 188 - scancode_kp_b = C.SDL_SCANCODE_KP_B // 189 - scancode_kp_c = C.SDL_SCANCODE_KP_C // 190 - scancode_kp_d = C.SDL_SCANCODE_KP_D // 191 - scancode_kp_e = C.SDL_SCANCODE_KP_E // 192 - scancode_kp_f = C.SDL_SCANCODE_KP_F // 193 - scancode_kp_xor = C.SDL_SCANCODE_KP_XOR // 194 - scancode_kp_power = C.SDL_SCANCODE_KP_POWER // 195 - scancode_kp_percent = C.SDL_SCANCODE_KP_PERCENT // 196 - scancode_kp_less = C.SDL_SCANCODE_KP_LESS // 197 - scancode_kp_greater = C.SDL_SCANCODE_KP_GREATER // 198 - scancode_kp_ampersand = C.SDL_SCANCODE_KP_AMPERSAND // 199 - scancode_kp_dblampersand = C.SDL_SCANCODE_KP_DBLAMPERSAND // 200 - scancode_kp_verticalbar = C.SDL_SCANCODE_KP_VERTICALBAR // 201 - scancode_kp_dblverticalbar = C.SDL_SCANCODE_KP_DBLVERTICALBAR // 202 - scancode_kp_colon = C.SDL_SCANCODE_KP_COLON // 203 - scancode_kp_hash = C.SDL_SCANCODE_KP_HASH // 204 - scancode_kp_space = C.SDL_SCANCODE_KP_SPACE // 205 - scancode_kp_at = C.SDL_SCANCODE_KP_AT // 206 - scancode_kp_exclam = C.SDL_SCANCODE_KP_EXCLAM // 207 - scancode_kp_memstore = C.SDL_SCANCODE_KP_MEMSTORE // 208 - scancode_kp_memrecall = C.SDL_SCANCODE_KP_MEMRECALL // 209 - scancode_kp_memclear = C.SDL_SCANCODE_KP_MEMCLEAR // 210 - scancode_kp_memadd = C.SDL_SCANCODE_KP_MEMADD // 211 - scancode_kp_memsubtract = C.SDL_SCANCODE_KP_MEMSUBTRACT // 212 - scancode_kp_memmultiply = C.SDL_SCANCODE_KP_MEMMULTIPLY // 213 - scancode_kp_memdivide = C.SDL_SCANCODE_KP_MEMDIVIDE // 214 - scancode_kp_plusminus = C.SDL_SCANCODE_KP_PLUSMINUS // 215 - scancode_kp_clear = C.SDL_SCANCODE_KP_CLEAR // 216 - scancode_kp_clearentry = C.SDL_SCANCODE_KP_CLEARENTRY // 217 - scancode_kp_binary = C.SDL_SCANCODE_KP_BINARY // 218 - scancode_kp_octal = C.SDL_SCANCODE_KP_OCTAL // 219 - scancode_kp_decimal = C.SDL_SCANCODE_KP_DECIMAL // 220 - scancode_kp_hexadecimal = C.SDL_SCANCODE_KP_HEXADECIMAL // 221 + scancode_decimalseparator = C.SDL_SCANCODE_DECIMALSEPARATOR // 179 + scancode_currencyunit = C.SDL_SCANCODE_CURRENCYUNIT // 180 + scancode_currencysubunit = C.SDL_SCANCODE_CURRENCYSUBUNIT // 181 + scancode_kp_leftparen = C.SDL_SCANCODE_KP_LEFTPAREN // 182 + scancode_kp_rightparen = C.SDL_SCANCODE_KP_RIGHTPAREN // 183 + scancode_kp_leftbrace = C.SDL_SCANCODE_KP_LEFTBRACE // 184 + scancode_kp_rightbrace = C.SDL_SCANCODE_KP_RIGHTBRACE // 185 + scancode_kp_tab = C.SDL_SCANCODE_KP_TAB // 186 + scancode_kp_backspace = C.SDL_SCANCODE_KP_BACKSPACE // 187 + scancode_kp_a = C.SDL_SCANCODE_KP_A // 188 + scancode_kp_b = C.SDL_SCANCODE_KP_B // 189 + scancode_kp_c = C.SDL_SCANCODE_KP_C // 190 + scancode_kp_d = C.SDL_SCANCODE_KP_D // 191 + scancode_kp_e = C.SDL_SCANCODE_KP_E // 192 + scancode_kp_f = C.SDL_SCANCODE_KP_F // 193 + scancode_kp_xor = C.SDL_SCANCODE_KP_XOR // 194 + scancode_kp_power = C.SDL_SCANCODE_KP_POWER // 195 + scancode_kp_percent = C.SDL_SCANCODE_KP_PERCENT // 196 + scancode_kp_less = C.SDL_SCANCODE_KP_LESS // 197 + scancode_kp_greater = C.SDL_SCANCODE_KP_GREATER // 198 + scancode_kp_ampersand = C.SDL_SCANCODE_KP_AMPERSAND // 199 + scancode_kp_dblampersand = C.SDL_SCANCODE_KP_DBLAMPERSAND // 200 + scancode_kp_verticalbar = C.SDL_SCANCODE_KP_VERTICALBAR // 201 + scancode_kp_dblverticalbar = C.SDL_SCANCODE_KP_DBLVERTICALBAR // 202 + scancode_kp_colon = C.SDL_SCANCODE_KP_COLON // 203 + scancode_kp_hash = C.SDL_SCANCODE_KP_HASH // 204 + scancode_kp_space = C.SDL_SCANCODE_KP_SPACE // 205 + scancode_kp_at = C.SDL_SCANCODE_KP_AT // 206 + scancode_kp_exclam = C.SDL_SCANCODE_KP_EXCLAM // 207 + scancode_kp_memstore = C.SDL_SCANCODE_KP_MEMSTORE // 208 + scancode_kp_memrecall = C.SDL_SCANCODE_KP_MEMRECALL // 209 + scancode_kp_memclear = C.SDL_SCANCODE_KP_MEMCLEAR // 210 + scancode_kp_memadd = C.SDL_SCANCODE_KP_MEMADD // 211 + scancode_kp_memsubtract = C.SDL_SCANCODE_KP_MEMSUBTRACT // 212 + scancode_kp_memmultiply = C.SDL_SCANCODE_KP_MEMMULTIPLY // 213 + scancode_kp_memdivide = C.SDL_SCANCODE_KP_MEMDIVIDE // 214 + scancode_kp_plusminus = C.SDL_SCANCODE_KP_PLUSMINUS // 215 + scancode_kp_clear = C.SDL_SCANCODE_KP_CLEAR // 216 + scancode_kp_clearentry = C.SDL_SCANCODE_KP_CLEARENTRY // 217 + scancode_kp_binary = C.SDL_SCANCODE_KP_BINARY // 218 + scancode_kp_octal = C.SDL_SCANCODE_KP_OCTAL // 219 + scancode_kp_decimal = C.SDL_SCANCODE_KP_DECIMAL // 220 + scancode_kp_hexadecimal = C.SDL_SCANCODE_KP_HEXADECIMAL // 221 // - scancode_lctrl = C.SDL_SCANCODE_LCTRL // 224 - scancode_lshift = C.SDL_SCANCODE_LSHIFT // 225 - scancode_lalt = C.SDL_SCANCODE_LALT // 226 < alt, option - scancode_lgui = C.SDL_SCANCODE_LGUI // 227 < windows, command (apple), meta - scancode_rctrl = C.SDL_SCANCODE_RCTRL // 228 - scancode_rshift = C.SDL_SCANCODE_RSHIFT // 229 - scancode_ralt = C.SDL_SCANCODE_RALT // 230 < alt gr, option - scancode_rgui = C.SDL_SCANCODE_RGUI // 231 < windows, command (apple), meta + scancode_lctrl = C.SDL_SCANCODE_LCTRL // 224 + scancode_lshift = C.SDL_SCANCODE_LSHIFT // 225 + scancode_lalt = C.SDL_SCANCODE_LALT // 226 < alt, option + scancode_lgui = C.SDL_SCANCODE_LGUI // 227 < windows, command (apple), meta + scancode_rctrl = C.SDL_SCANCODE_RCTRL // 228 + scancode_rshift = C.SDL_SCANCODE_RSHIFT // 229 + scancode_ralt = C.SDL_SCANCODE_RALT // 230 < alt gr, option + scancode_rgui = C.SDL_SCANCODE_RGUI // 231 < windows, command (apple), meta // // I'm not sure if this is really not covered // by any of the above, but since there's a // special KMOD_MODE for it I'm adding it here - scancode_mode = C.SDL_SCANCODE_MODE // 257 + scancode_mode = C.SDL_SCANCODE_MODE // 257 // I'm not sure if this is really not covered // by any of the above, but since there's a // special KMOD_MODE for it I'm adding it here - scancode_audionext = C.SDL_SCANCODE_AUDIONEXT // 258 - scancode_audioprev = C.SDL_SCANCODE_AUDIOPREV // 259 - scancode_audiostop = C.SDL_SCANCODE_AUDIOSTOP // 260 - scancode_audioplay = C.SDL_SCANCODE_AUDIOPLAY // 261 - scancode_audiomute = C.SDL_SCANCODE_AUDIOMUTE // 262 - scancode_mediaselect = C.SDL_SCANCODE_MEDIASELECT // 263 - scancode_www = C.SDL_SCANCODE_WWW // 264 - scancode_mail = C.SDL_SCANCODE_MAIL // 265 - scancode_calculator = C.SDL_SCANCODE_CALCULATOR // 266 - scancode_computer = C.SDL_SCANCODE_COMPUTER // 267 - scancode_ac_search = C.SDL_SCANCODE_AC_SEARCH // 268 - scancode_ac_home = C.SDL_SCANCODE_AC_HOME // 269 - scancode_ac_back = C.SDL_SCANCODE_AC_BACK // 270 - scancode_ac_forward = C.SDL_SCANCODE_AC_FORWARD // 271 - scancode_ac_stop = C.SDL_SCANCODE_AC_STOP // 272 - scancode_ac_refresh = C.SDL_SCANCODE_AC_REFRESH // 273 - scancode_ac_bookmarks = C.SDL_SCANCODE_AC_BOOKMARKS // 274 + scancode_audionext = C.SDL_SCANCODE_AUDIONEXT // 258 + scancode_audioprev = C.SDL_SCANCODE_AUDIOPREV // 259 + scancode_audiostop = C.SDL_SCANCODE_AUDIOSTOP // 260 + scancode_audioplay = C.SDL_SCANCODE_AUDIOPLAY // 261 + scancode_audiomute = C.SDL_SCANCODE_AUDIOMUTE // 262 + scancode_mediaselect = C.SDL_SCANCODE_MEDIASELECT // 263 + scancode_www = C.SDL_SCANCODE_WWW // 264 + scancode_mail = C.SDL_SCANCODE_MAIL // 265 + scancode_calculator = C.SDL_SCANCODE_CALCULATOR // 266 + scancode_computer = C.SDL_SCANCODE_COMPUTER // 267 + scancode_ac_search = C.SDL_SCANCODE_AC_SEARCH // 268 + scancode_ac_home = C.SDL_SCANCODE_AC_HOME // 269 + scancode_ac_back = C.SDL_SCANCODE_AC_BACK // 270 + scancode_ac_forward = C.SDL_SCANCODE_AC_FORWARD // 271 + scancode_ac_stop = C.SDL_SCANCODE_AC_STOP // 272 + scancode_ac_refresh = C.SDL_SCANCODE_AC_REFRESH // 273 + scancode_ac_bookmarks = C.SDL_SCANCODE_AC_BOOKMARKS // 274 // Walther keys // // These are values that Christian Walther added (for mac keyboard?). - scancode_brightnessdown = C.SDL_SCANCODE_BRIGHTNESSDOWN // 275 - scancode_brightnessup = C.SDL_SCANCODE_BRIGHTNESSUP // 276 + scancode_brightnessdown = C.SDL_SCANCODE_BRIGHTNESSDOWN // 275 + scancode_brightnessup = C.SDL_SCANCODE_BRIGHTNESSUP // 276 // display mirroring/dual display // switch, video mode switch - scancode_displayswitch = C.SDL_SCANCODE_DISPLAYSWITCH // 277 - scancode_kbdillumtoggle = C.SDL_SCANCODE_KBDILLUMTOGGLE // 278 - scancode_kbdillumdown = C.SDL_SCANCODE_KBDILLUMDOWN // 279 - scancode_kbdillumup = C.SDL_SCANCODE_KBDILLUMUP // 280 - scancode_eject = C.SDL_SCANCODE_EJECT // 281 - scancode_sleep = C.SDL_SCANCODE_SLEEP // 282 + scancode_displayswitch = C.SDL_SCANCODE_DISPLAYSWITCH // 277 + scancode_kbdillumtoggle = C.SDL_SCANCODE_KBDILLUMTOGGLE // 278 + scancode_kbdillumdown = C.SDL_SCANCODE_KBDILLUMDOWN // 279 + scancode_kbdillumup = C.SDL_SCANCODE_KBDILLUMUP // 280 + scancode_eject = C.SDL_SCANCODE_EJECT // 281 + scancode_sleep = C.SDL_SCANCODE_SLEEP // 282 // - scancode_app1 = C.SDL_SCANCODE_APP1 // 283 - scancode_app2 = C.SDL_SCANCODE_APP2 // 284 + scancode_app1 = C.SDL_SCANCODE_APP1 // 283 + scancode_app2 = C.SDL_SCANCODE_APP2 // 284 // // Usage page 0x0C (additional media keys) // // These values are mapped from usage page 0x0C (USB consumer page). - scancode_audiorewind = C.SDL_SCANCODE_AUDIOREWIND // 285 - scancode_audiofastforward = C.SDL_SCANCODE_AUDIOFASTFORWARD // 286 + scancode_audiorewind = C.SDL_SCANCODE_AUDIOREWIND // 285 + scancode_audiofastforward = C.SDL_SCANCODE_AUDIOFASTFORWARD // 286 // Add any other keys here. - num_scancodes = C.SDL_NUM_SCANCODES // 512 + num_scancodes = C.SDL_NUM_SCANCODES // 512 } diff --git a/sensor.c.v b/sensor.c.v index 7bf5daad..ea5cccac 100644 --- a/sensor.c.v +++ b/sensor.c.v @@ -29,8 +29,8 @@ pub type SensorID = int pub enum SensorType { invalid = C.SDL_SENSOR_INVALID // -1, Returned for an invalid sensor unknown = C.SDL_SENSOR_UNKNOWN // Unknown sensor type - accel = C.SDL_SENSOR_ACCEL // Accelerometer - gyro = C.SDL_SENSOR_GYRO // Gyroscope + accel = C.SDL_SENSOR_ACCEL // Accelerometer + gyro = C.SDL_SENSOR_GYRO // Gyroscope } // Accelerometer sensor diff --git a/shape.c.v b/shape.c.v index cfbe1cf4..26b9f3de 100644 --- a/shape.c.v +++ b/shape.c.v @@ -54,10 +54,10 @@ pub fn is_shaped_window(window &Window) bool { // WindowShapeMode is an enum denoting the specific type of contents present in an SDL_WindowShapeParams union. // WindowShapeMode is C.WindowShapeMode pub enum WindowShapeModeFlag { - default = C.ShapeModeDefault // The default mode, a binarized alpha cutoff of 1. - binarize_alpha = C.ShapeModeBinarizeAlpha // A binarized alpha cutoff with a given integer value. + default = C.ShapeModeDefault // The default mode, a binarized alpha cutoff of 1. + binarize_alpha = C.ShapeModeBinarizeAlpha // A binarized alpha cutoff with a given integer value. reverse_binarize_alpha = C.ShapeModeReverseBinarizeAlpha // A binarized alpha cutoff with a given integer value, but with the opposite comparison. - color_key = C.ShapeModeColorKey // A color key is applied. + color_key = C.ShapeModeColorKey // A color key is applied. } fn C.SDL_SHAPEMODEALPHA(mode WindowShapeModeFlag) bool diff --git a/surface.c.v b/surface.c.v index 2171e0d3..83082d61 100644 --- a/surface.c.v +++ b/surface.c.v @@ -15,11 +15,11 @@ module sdl @[noinit; typedef] pub struct C.SDL_Surface { pub: - flags u32 // Read-only + flags u32 // Read-only format &C.SDL_PixelFormat // Read-only - w int // Read-only - h int // Read-only - pitch int // Read-only + w int // Read-only + h int // Read-only + pitch int // Read-only // information needed for surfaces requiring locks locked int // Read-only // list of BlitMap that hold a reference to this surface @@ -46,9 +46,9 @@ pub type BlitCall = fn (src &Surface, srcrect &Rect, dst &Surface, dstrect &Rect // YUVConversionMode is the formula used for converting between YUV and RGB // YUVConversionMode is C.SDL_YUV_CONVERSION_MODE pub enum YUVConversionMode { - jpeg = C.SDL_YUV_CONVERSION_JPEG // Full range JPEG - bt601 = C.SDL_YUV_CONVERSION_BT601 // BT.601 (the default) - bt709 = C.SDL_YUV_CONVERSION_BT709 // BT.709 + jpeg = C.SDL_YUV_CONVERSION_JPEG // Full range JPEG + bt601 = C.SDL_YUV_CONVERSION_BT601 // BT.601 (the default) + bt709 = C.SDL_YUV_CONVERSION_BT709 // BT.709 automatic = C.SDL_YUV_CONVERSION_AUTOMATIC // BT.601 for SD content, BT.709 for HD content } diff --git a/touch.c.v b/touch.c.v index 063a4827..40cc55e2 100644 --- a/touch.c.v +++ b/touch.c.v @@ -21,8 +21,8 @@ pub const mouse_touch_id = C.SDL_MOUSE_TOUCHID // ((Sint64)-1) // TouchDeviceType is C.SDL_TouchDeviceType pub enum TouchDeviceType { - invalid = C.SDL_TOUCH_DEVICE_INVALID // -1 - direct = C.SDL_TOUCH_DEVICE_DIRECT // touch screen with window-relative coordinates + invalid = C.SDL_TOUCH_DEVICE_INVALID // -1 + direct = C.SDL_TOUCH_DEVICE_DIRECT // touch screen with window-relative coordinates indirect_absolute = C.SDL_TOUCH_DEVICE_INDIRECT_ABSOLUTE // trackpad with absolute device coordinates indirect_relative = C.SDL_TOUCH_DEVICE_INDIRECT_RELATIVE // trackpad with screen cursor-relative coordinates } diff --git a/video.c.v b/video.c.v index d04be826..4cf41d80 100644 --- a/video.c.v +++ b/video.c.v @@ -72,30 +72,30 @@ pub type Window = C.SDL_Window // // WindowFlags is C.SDL_WindowFlags pub enum WindowFlags { - fullscreen = C.SDL_WINDOW_FULLSCREEN // 0x00000001 fullscreen window - opengl = C.SDL_WINDOW_OPENGL // 0x00000002 window usable with OpenGL context - shown = C.SDL_WINDOW_SHOWN // 0x00000004 window is visible - hidden = C.SDL_WINDOW_HIDDEN // 0x00000008 window is not visible - borderless = C.SDL_WINDOW_BORDERLESS // 0x00000010 no window decoration - resizable = C.SDL_WINDOW_RESIZABLE // 0x00000020 window can be resized - minimized = C.SDL_WINDOW_MINIMIZED // 0x00000040 window is minimized - maximized = C.SDL_WINDOW_MAXIMIZED // 0x00000080 window is maximized - mouse_grabbed = C.SDL_WINDOW_MOUSE_GRABBED // 0x00000100 window has grabbed mouse input - input_focus = C.SDL_WINDOW_INPUT_FOCUS // 0x00000200 window has input focus - mouse_focus = C.SDL_WINDOW_MOUSE_FOCUS // 0x00000400 window has mouse focus + fullscreen = C.SDL_WINDOW_FULLSCREEN // 0x00000001 fullscreen window + opengl = C.SDL_WINDOW_OPENGL // 0x00000002 window usable with OpenGL context + shown = C.SDL_WINDOW_SHOWN // 0x00000004 window is visible + hidden = C.SDL_WINDOW_HIDDEN // 0x00000008 window is not visible + borderless = C.SDL_WINDOW_BORDERLESS // 0x00000010 no window decoration + resizable = C.SDL_WINDOW_RESIZABLE // 0x00000020 window can be resized + minimized = C.SDL_WINDOW_MINIMIZED // 0x00000040 window is minimized + maximized = C.SDL_WINDOW_MAXIMIZED // 0x00000080 window is maximized + mouse_grabbed = C.SDL_WINDOW_MOUSE_GRABBED // 0x00000100 window has grabbed mouse input + input_focus = C.SDL_WINDOW_INPUT_FOCUS // 0x00000200 window has input focus + mouse_focus = C.SDL_WINDOW_MOUSE_FOCUS // 0x00000400 window has mouse focus fullscreen_desktop = C.SDL_WINDOW_FULLSCREEN_DESKTOP // ( SDL_WINDOW_FULLSCREEN | 0x00001000 ) - foreign = C.SDL_WINDOW_FOREIGN // 0x00000800 window not created by SDL - allow_highdpi = C.SDL_WINDOW_ALLOW_HIGHDPI // 0x00002000 window should be created in high-DPI mode if supported. On macOS NSHighResolutionCapable must be set true in the application's Info.plist for this to have any effect. - mouse_capture = C.SDL_WINDOW_MOUSE_CAPTURE // 0x00004000 window has mouse captured (unrelated to MOUSE_GRABBED) - always_on_top = C.SDL_WINDOW_ALWAYS_ON_TOP // 0x00008000 window should always be above others - skip_taskbar = C.SDL_WINDOW_SKIP_TASKBAR // 0x00010000 window should not be added to the taskbar - utility = C.SDL_WINDOW_UTILITY // 0x00020000 window should be treated as a utility window - tooltip = C.SDL_WINDOW_TOOLTIP // 0x00040000 window should be treated as a tooltip - popup_menu = C.SDL_WINDOW_POPUP_MENU // 0x00080000 window should be treated as a popup menu - vulkan = C.SDL_WINDOW_VULKAN // 0x10000000 window usable for Vulkan surface - metal = C.SDL_WINDOW_METAL // 0x20000000 window usable for Metal view + foreign = C.SDL_WINDOW_FOREIGN // 0x00000800 window not created by SDL + allow_highdpi = C.SDL_WINDOW_ALLOW_HIGHDPI // 0x00002000 window should be created in high-DPI mode if supported. On macOS NSHighResolutionCapable must be set true in the application's Info.plist for this to have any effect. + mouse_capture = C.SDL_WINDOW_MOUSE_CAPTURE // 0x00004000 window has mouse captured (unrelated to MOUSE_GRABBED) + always_on_top = C.SDL_WINDOW_ALWAYS_ON_TOP // 0x00008000 window should always be above others + skip_taskbar = C.SDL_WINDOW_SKIP_TASKBAR // 0x00010000 window should not be added to the taskbar + utility = C.SDL_WINDOW_UTILITY // 0x00020000 window should be treated as a utility window + tooltip = C.SDL_WINDOW_TOOLTIP // 0x00040000 window should be treated as a tooltip + popup_menu = C.SDL_WINDOW_POPUP_MENU // 0x00080000 window should be treated as a popup menu + vulkan = C.SDL_WINDOW_VULKAN // 0x10000000 window usable for Vulkan surface + metal = C.SDL_WINDOW_METAL // 0x20000000 window usable for Metal view // - input_grabbed = C.SDL_WINDOW_MOUSE_GRABBED // equivalent to SDL_WINDOW_MOUSE_GRABBED for compatibility + input_grabbed = C.SDL_WINDOW_MOUSE_GRABBED // equivalent to SDL_WINDOW_MOUSE_GRABBED for compatibility } // Used to indicate that you don't care what the window position is. @@ -132,49 +132,49 @@ pub fn windowpos_iscentered(x u32) bool { // // WindowEventID is C.SDL_WindowEventID pub enum WindowEventID { - @none = C.SDL_WINDOWEVENT_NONE // Never used - shown = C.SDL_WINDOWEVENT_SHOWN // Window has been shown - hidden = C.SDL_WINDOWEVENT_HIDDEN // Window has been hidden - exposed = C.SDL_WINDOWEVENT_EXPOSED // Window has been exposed and should be redrawn - moved = C.SDL_WINDOWEVENT_MOVED // Window has been moved to data1, data2 - resized = C.SDL_WINDOWEVENT_RESIZED // Window has been resized to data1xdata2 + @none = C.SDL_WINDOWEVENT_NONE // Never used + shown = C.SDL_WINDOWEVENT_SHOWN // Window has been shown + hidden = C.SDL_WINDOWEVENT_HIDDEN // Window has been hidden + exposed = C.SDL_WINDOWEVENT_EXPOSED // Window has been exposed and should be redrawn + moved = C.SDL_WINDOWEVENT_MOVED // Window has been moved to data1, data2 + resized = C.SDL_WINDOWEVENT_RESIZED // Window has been resized to data1xdata2 size_changed = C.SDL_WINDOWEVENT_SIZE_CHANGED // The window size has changed, either as a result of an API call or through the system or user changing the window size. - minimized = C.SDL_WINDOWEVENT_MINIMIZED // Window has been minimized - maximized = C.SDL_WINDOWEVENT_MAXIMIZED // Window has been maximized - restored = C.SDL_WINDOWEVENT_RESTORED // Window has been restored to normal size and position - enter = C.SDL_WINDOWEVENT_ENTER // Window has gained mouse focus - leave = C.SDL_WINDOWEVENT_LEAVE // Window has lost mouse focus + minimized = C.SDL_WINDOWEVENT_MINIMIZED // Window has been minimized + maximized = C.SDL_WINDOWEVENT_MAXIMIZED // Window has been maximized + restored = C.SDL_WINDOWEVENT_RESTORED // Window has been restored to normal size and position + enter = C.SDL_WINDOWEVENT_ENTER // Window has gained mouse focus + leave = C.SDL_WINDOWEVENT_LEAVE // Window has lost mouse focus focus_gained = C.SDL_WINDOWEVENT_FOCUS_GAINED // Window has gained keyboard focus - focus_lost = C.SDL_WINDOWEVENT_FOCUS_LOST // Window has lost keyboard focus - close = C.SDL_WINDOWEVENT_CLOSE // The window manager requests that the window be closed - take_focus = C.SDL_WINDOWEVENT_TAKE_FOCUS // Window is being offered a focus (should SetWindowInputFocus() on itself or a subwindow, or ignore) - hit_test = C.SDL_WINDOWEVENT_HIT_TEST // Window had a hit test that wasn't SDL_HITTEST_NORMAL. + focus_lost = C.SDL_WINDOWEVENT_FOCUS_LOST // Window has lost keyboard focus + close = C.SDL_WINDOWEVENT_CLOSE // The window manager requests that the window be closed + take_focus = C.SDL_WINDOWEVENT_TAKE_FOCUS // Window is being offered a focus (should SetWindowInputFocus() on itself or a subwindow, or ignore) + hit_test = C.SDL_WINDOWEVENT_HIT_TEST // Window had a hit test that wasn't SDL_HITTEST_NORMAL. } // DisplayEventID is an event subtype for display events // DisplayEventID is C.SDL_DisplayEventID pub enum DisplayEventID { - @none = C.SDL_DISPLAYEVENT_NONE // Never used - orientation = C.SDL_DISPLAYEVENT_ORIENTATION // Display orientation has changed to data1 - connected = C.SDL_DISPLAYEVENT_CONNECTED // Display has been added to the system + @none = C.SDL_DISPLAYEVENT_NONE // Never used + orientation = C.SDL_DISPLAYEVENT_ORIENTATION // Display orientation has changed to data1 + connected = C.SDL_DISPLAYEVENT_CONNECTED // Display has been added to the system disconnected = C.SDL_DISPLAYEVENT_DISCONNECTED // Display has been removed from the system } // Display orientation // DisplayOrientation is C.SDL_DisplayOrientation pub enum DisplayOrientation { - unknown = C.SDL_ORIENTATION_UNKNOWN // The display orientation can't be determined - landscape = C.SDL_ORIENTATION_LANDSCAPE // The display is in landscape mode, with the right side up, relative to portrait mode + unknown = C.SDL_ORIENTATION_UNKNOWN // The display orientation can't be determined + landscape = C.SDL_ORIENTATION_LANDSCAPE // The display is in landscape mode, with the right side up, relative to portrait mode landscape_flipped = C.SDL_ORIENTATION_LANDSCAPE_FLIPPED // The display is in landscape mode, with the left side up, relative to portrait mode - portrait = C.SDL_ORIENTATION_PORTRAIT // The display is in portrait mode - portrait_flipped = C.SDL_ORIENTATION_PORTRAIT_FLIPPED // The display is in portrait mode, upside down + portrait = C.SDL_ORIENTATION_PORTRAIT // The display is in portrait mode + portrait_flipped = C.SDL_ORIENTATION_PORTRAIT_FLIPPED // The display is in portrait mode, upside down } // Window flash operation // FlashOperation is SDL_FlashOperation pub enum FlashOperation { - cancel = C.SDL_FLASH_CANCEL // Cancel any window flash state - briefly = C.SDL_FLASH_BRIEFLY // Flash the window briefly to get attention + cancel = C.SDL_FLASH_CANCEL // Cancel any window flash state + briefly = C.SDL_FLASH_BRIEFLY // Flash the window briefly to get attention until_focused = C.SDL_FLASH_UNTIL_FOCUSED // Flash the window until it gets focus } @@ -218,29 +218,29 @@ pub enum GLattr { // GLprofile is C.SDL_GLprofile pub enum GLprofile { - core = C.SDL_GL_CONTEXT_PROFILE_CORE // 0x0001 + core = C.SDL_GL_CONTEXT_PROFILE_CORE // 0x0001 compatibility = C.SDL_GL_CONTEXT_PROFILE_COMPATIBILITY // 0x0002 - es = C.SDL_GL_CONTEXT_PROFILE_ES // 0x0004, GLX_CONTEXT_ES2_PROFILE_BIT_EXT + es = C.SDL_GL_CONTEXT_PROFILE_ES // 0x0004, GLX_CONTEXT_ES2_PROFILE_BIT_EXT } // GLcontextFlag is C.SDL_GLcontextFlag pub enum GLcontextFlag { - debug_flag = C.SDL_GL_CONTEXT_DEBUG_FLAG // 0x0001 + debug_flag = C.SDL_GL_CONTEXT_DEBUG_FLAG // 0x0001 forward_compatible_flag = C.SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG // 0x0002 - robust_access_flag = C.SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG // 0x0004 - reset_isolation_flag = C.SDL_GL_CONTEXT_RESET_ISOLATION_FLAG // 0x0008 + robust_access_flag = C.SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG // 0x0004 + reset_isolation_flag = C.SDL_GL_CONTEXT_RESET_ISOLATION_FLAG // 0x0008 } // GLcontextReleaseFlag is C.SDL_GLcontextReleaseFlag pub enum GLcontextReleaseFlag { - @none = C.SDL_GL_CONTEXT_RELEASE_BEHAVIOR_NONE // 0x0000 + @none = C.SDL_GL_CONTEXT_RELEASE_BEHAVIOR_NONE // 0x0000 flush = C.SDL_GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH // 0x0001 } // GLContextResetNotification is C.SDL_GLContextResetNotification pub enum GLContextResetNotification { no_notification = C.SDL_GL_CONTEXT_RESET_NO_NOTIFICATION // 0x0000 - lose_context = C.SDL_GL_CONTEXT_RESET_LOSE_CONTEXT // 0x0001 + lose_context = C.SDL_GL_CONTEXT_RESET_LOSE_CONTEXT // 0x0001 } // HitTestResult are possible return values from the SDL_HitTest callback. @@ -249,7 +249,7 @@ pub enum GLContextResetNotification { // // HitTestResult is C.SDL_HitTestResult pub enum HitTestResult { - normal = C.SDL_HITTEST_NORMAL // Region is normal. No special properties. + normal = C.SDL_HITTEST_NORMAL // Region is normal. No special properties. draggable = C.SDL_HITTEST_DRAGGABLE // Region can drag entire window. resize_topleft = C.SDL_HITTEST_RESIZE_TOPLEFT resize_top = C.SDL_HITTEST_RESIZE_TOP