From cbaecde7ceabe08e8f714191e3b8daf9c0bcb05b Mon Sep 17 00:00:00 2001 From: lmp Date: Tue, 26 Sep 2023 15:02:24 +0200 Subject: [PATCH] all: run `v fmt -w .` to fix enum alignment --- audio.c.v | 2 +- blendmode.c.v | 28 +-- error.c.v | 10 +- events.c.v | 104 ++++----- gamecontroller.c.v | 52 ++--- hints.c.v | 4 +- image/image.c.v | 6 +- keycode.c.v | 510 ++++++++++++++++++++++----------------------- log.c.v | 50 ++--- messagebox.c.v | 14 +- mixer/mixer.c.v | 30 +-- mouse.c.v | 26 +-- pixels.c.v | 140 ++++++------- power.c.v | 6 +- render.c.v | 14 +- scancode.c.v | 486 +++++++++++++++++++++--------------------- sensor.c.v | 4 +- shape.c.v | 6 +- surface.c.v | 6 +- thread.c.v | 6 +- touch.c.v | 4 +- video.c.v | 160 +++++++------- 22 files changed, 834 insertions(+), 834 deletions(-) diff --git a/audio.c.v b/audio.c.v index 119ad63d..5b22f479 100644 --- a/audio.c.v +++ b/audio.c.v @@ -388,7 +388,7 @@ fn C.SDL_OpenAudioDevice(const_device &char, iscapture int, const_desired &C.SDL pub enum AudioStatus { audio_stopped = C.SDL_AUDIO_STOPPED // 0 audio_playing = C.SDL_AUDIO_PLAYING - audio_paused = C.SDL_AUDIO_PAUSED + audio_paused = C.SDL_AUDIO_PAUSED } pub fn get_audio_status() AudioStatus { diff --git a/blendmode.c.v b/blendmode.c.v index b0cbaddb..5eb1c96d 100644 --- a/blendmode.c.v +++ b/blendmode.c.v @@ -10,35 +10,35 @@ 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 + @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 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/error.c.v b/error.c.v index 68fd794b..354d729f 100644 --- a/error.c.v +++ b/error.c.v @@ -25,12 +25,12 @@ pub fn clear_error() { // ErrorCode is C.SDL_errorcode pub enum ErrorCode { - enomem = C.SDL_ENOMEM - efread = C.SDL_EFREAD - efwrite = C.SDL_EFWRITE - efseek = C.SDL_EFSEEK + enomem = C.SDL_ENOMEM + efread = C.SDL_EFREAD + efwrite = C.SDL_EFWRITE + efseek = C.SDL_EFSEEK unsupported = C.SDL_UNSUPPORTED - lasterror = C.SDL_LASTERROR + lasterror = C.SDL_LASTERROR } fn C.SDL_Error(code C.SDL_errorcode) int diff --git a/events.c.v b/events.c.v index 78dd8deb..28a20a0d 100644 --- a/events.c.v +++ b/events.c.v @@ -30,90 +30,90 @@ 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 + app_didenterforeground = C.SDL_APP_DIDENTERFOREGROUND // 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 // 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 @@ -578,9 +578,9 @@ pub fn pump_events() { // EventAction is C.SDL_eventaction pub enum EventAction { - addevent = C.SDL_ADDEVENT + addevent = C.SDL_ADDEVENT peekevent = C.SDL_PEEKEVENT - getevent = C.SDL_GETEVENT + getevent = C.SDL_GETEVENT } fn C.SDL_PeepEvents(events &C.SDL_Event, numevents int, action C.SDL_eventaction, min_type u32, max_type u32) int diff --git a/gamecontroller.c.v b/gamecontroller.c.v index 48321427..4c1aa968 100644 --- a/gamecontroller.c.v +++ b/gamecontroller.c.v @@ -25,10 +25,10 @@ pub type GameController = C.SDL_GameController // GameControllerBindType is C.SDL_GameControllerBindType pub enum GameControllerBindType { - @none = C.SDL_CONTROLLER_BINDTYPE_NONE // 0 + @none = C.SDL_CONTROLLER_BINDTYPE_NONE // 0 button = C.SDL_CONTROLLER_BINDTYPE_BUTTON - axis = C.SDL_CONTROLLER_BINDTYPE_AXIS - hat = C.SDL_CONTROLLER_BINDTYPE_HAT + axis = C.SDL_CONTROLLER_BINDTYPE_AXIS + hat = C.SDL_CONTROLLER_BINDTYPE_HAT } pub union Value { @@ -278,14 +278,14 @@ pub fn game_controller_update() { // // GameControllerAxis is C.SDL_GameControllerAxis pub enum GameControllerAxis { - invalid = C.SDL_CONTROLLER_AXIS_INVALID // -1 - leftx = C.SDL_CONTROLLER_AXIS_LEFTX - lefty = C.SDL_CONTROLLER_AXIS_LEFTY - rightx = C.SDL_CONTROLLER_AXIS_RIGHTX - righty = C.SDL_CONTROLLER_AXIS_RIGHTY - triggerleft = C.SDL_CONTROLLER_AXIS_TRIGGERLEFT + invalid = C.SDL_CONTROLLER_AXIS_INVALID // -1 + leftx = C.SDL_CONTROLLER_AXIS_LEFTX + lefty = C.SDL_CONTROLLER_AXIS_LEFTY + rightx = C.SDL_CONTROLLER_AXIS_RIGHTX + righty = C.SDL_CONTROLLER_AXIS_RIGHTY + triggerleft = C.SDL_CONTROLLER_AXIS_TRIGGERLEFT triggerright = C.SDL_CONTROLLER_AXIS_TRIGGERRIGHT - max = C.SDL_CONTROLLER_AXIS_MAX + max = C.SDL_CONTROLLER_AXIS_MAX } fn C.SDL_GameControllerGetAxisFromString(pch_string &char) C.SDL_GameControllerAxis @@ -324,23 +324,23 @@ pub fn game_controller_get_axis(gamecontroller &GameController, axis GameControl // GameControllerButton is the list of buttons available from a controller // GameControllerButton is C.SDL_GameControllerButton pub enum GameControllerButton { - invalid = C.SDL_CONTROLLER_BUTTON_INVALID // -1 - a = C.SDL_CONTROLLER_BUTTON_A - b = C.SDL_CONTROLLER_BUTTON_B - x = C.SDL_CONTROLLER_BUTTON_X - y = C.SDL_CONTROLLER_BUTTON_Y - back = C.SDL_CONTROLLER_BUTTON_BACK - guide = C.SDL_CONTROLLER_BUTTON_GUIDE - start = C.SDL_CONTROLLER_BUTTON_START - leftstick = C.SDL_CONTROLLER_BUTTON_LEFTSTICK - rightstick = C.SDL_CONTROLLER_BUTTON_RIGHTSTICK - leftshoulder = C.SDL_CONTROLLER_BUTTON_LEFTSHOULDER + invalid = C.SDL_CONTROLLER_BUTTON_INVALID // -1 + a = C.SDL_CONTROLLER_BUTTON_A + b = C.SDL_CONTROLLER_BUTTON_B + x = C.SDL_CONTROLLER_BUTTON_X + y = C.SDL_CONTROLLER_BUTTON_Y + back = C.SDL_CONTROLLER_BUTTON_BACK + guide = C.SDL_CONTROLLER_BUTTON_GUIDE + start = C.SDL_CONTROLLER_BUTTON_START + leftstick = C.SDL_CONTROLLER_BUTTON_LEFTSTICK + rightstick = C.SDL_CONTROLLER_BUTTON_RIGHTSTICK + leftshoulder = C.SDL_CONTROLLER_BUTTON_LEFTSHOULDER rightshoulder = C.SDL_CONTROLLER_BUTTON_RIGHTSHOULDER - dpad_up = C.SDL_CONTROLLER_BUTTON_DPAD_UP - dpad_down = C.SDL_CONTROLLER_BUTTON_DPAD_DOWN - dpad_left = C.SDL_CONTROLLER_BUTTON_DPAD_LEFT - dpad_right = C.SDL_CONTROLLER_BUTTON_DPAD_RIGHT - max = C.SDL_CONTROLLER_BUTTON_MAX + dpad_up = C.SDL_CONTROLLER_BUTTON_DPAD_UP + dpad_down = C.SDL_CONTROLLER_BUTTON_DPAD_DOWN + dpad_left = C.SDL_CONTROLLER_BUTTON_DPAD_LEFT + dpad_right = C.SDL_CONTROLLER_BUTTON_DPAD_RIGHT + max = C.SDL_CONTROLLER_BUTTON_MAX } fn C.SDL_GameControllerGetButtonFromString(pch_string &char) C.SDL_GameControllerButton diff --git a/hints.c.v b/hints.c.v index fff5039b..aad01373 100644 --- a/hints.c.v +++ b/hints.c.v @@ -975,8 +975,8 @@ pub const ( // HintPriority is C.SDL_HintPriority pub enum HintPriority { - default = C.SDL_HINT_DEFAULT - normal = C.SDL_HINT_NORMAL + default = C.SDL_HINT_DEFAULT + normal = C.SDL_HINT_NORMAL override = C.SDL_HINT_OVERRIDE } diff --git a/image/image.c.v b/image/image.c.v index ad4d1b3e..9f06520a 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/keycode.c.v b/keycode.c.v index fb2f4083..c8c1daa6 100644 --- a/keycode.c.v +++ b/keycode.c.v @@ -32,278 +32,278 @@ 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 // '\033' - 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 // '\033' + 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 // '\177' - 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 // '\177' + 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 + kp_00 = C.SDLK_KP_00 + kp_000 = C.SDLK_KP_000 thousandsseparator = C.SDLK_THOUSANDSSEPARATOR - decimalseparator = C.SDLK_DECIMALSEPARATOR - currencyunit = C.SDLK_CURRENCYUNIT - currencysubunit = C.SDLK_CURRENCYSUBUNIT - kp_leftparen = C.SDLK_KP_LEFTPAREN - kp_rightparen = C.SDLK_KP_RIGHTPAREN - kp_leftbrace = C.SDLK_KP_LEFTBRACE - kp_rightbrace = C.SDLK_KP_RIGHTBRACE - kp_tab = C.SDLK_KP_TAB - kp_backspace = C.SDLK_KP_BACKSPACE - kp_a = C.SDLK_KP_A - kp_b = C.SDLK_KP_B - kp_c = C.SDLK_KP_C - kp_d = C.SDLK_KP_D - kp_e = C.SDLK_KP_E - kp_f = C.SDLK_KP_F - kp_xor = C.SDLK_KP_XOR - kp_power = C.SDLK_KP_POWER - kp_percent = C.SDLK_KP_PERCENT - kp_less = C.SDLK_KP_LESS - kp_greater = C.SDLK_KP_GREATER - kp_ampersand = C.SDLK_KP_AMPERSAND - kp_dblampersand = C.SDLK_KP_DBLAMPERSAND - kp_verticalbar = C.SDLK_KP_VERTICALBAR - kp_dblverticalbar = C.SDLK_KP_DBLVERTICALBAR - kp_colon = C.SDLK_KP_COLON - kp_hash = C.SDLK_KP_HASH - kp_space = C.SDLK_KP_SPACE - kp_at = C.SDLK_KP_AT - kp_exclam = C.SDLK_KP_EXCLAM - kp_memstore = C.SDLK_KP_MEMSTORE - kp_memrecall = C.SDLK_KP_MEMRECALL - kp_memclear = C.SDLK_KP_MEMCLEAR - kp_memadd = C.SDLK_KP_MEMADD - kp_memsubtract = C.SDLK_KP_MEMSUBTRACT - kp_memmultiply = C.SDLK_KP_MEMMULTIPLY - kp_memdivide = C.SDLK_KP_MEMDIVIDE - kp_plusminus = C.SDLK_KP_PLUSMINUS - kp_clear = C.SDLK_KP_CLEAR - kp_clearentry = C.SDLK_KP_CLEARENTRY - kp_binary = C.SDLK_KP_BINARY - kp_octal = C.SDLK_KP_OCTAL - kp_decimal = C.SDLK_KP_DECIMAL - kp_hexadecimal = C.SDLK_KP_HEXADECIMAL - lctrl = C.SDLK_LCTRL - lshift = C.SDLK_LSHIFT - lalt = C.SDLK_LALT - lgui = C.SDLK_LGUI - rctrl = C.SDLK_RCTRL - rshift = C.SDLK_RSHIFT - ralt = C.SDLK_RALT - rgui = C.SDLK_RGUI + decimalseparator = C.SDLK_DECIMALSEPARATOR + currencyunit = C.SDLK_CURRENCYUNIT + currencysubunit = C.SDLK_CURRENCYSUBUNIT + kp_leftparen = C.SDLK_KP_LEFTPAREN + kp_rightparen = C.SDLK_KP_RIGHTPAREN + kp_leftbrace = C.SDLK_KP_LEFTBRACE + kp_rightbrace = C.SDLK_KP_RIGHTBRACE + kp_tab = C.SDLK_KP_TAB + kp_backspace = C.SDLK_KP_BACKSPACE + kp_a = C.SDLK_KP_A + kp_b = C.SDLK_KP_B + kp_c = C.SDLK_KP_C + kp_d = C.SDLK_KP_D + kp_e = C.SDLK_KP_E + kp_f = C.SDLK_KP_F + kp_xor = C.SDLK_KP_XOR + kp_power = C.SDLK_KP_POWER + kp_percent = C.SDLK_KP_PERCENT + kp_less = C.SDLK_KP_LESS + kp_greater = C.SDLK_KP_GREATER + kp_ampersand = C.SDLK_KP_AMPERSAND + kp_dblampersand = C.SDLK_KP_DBLAMPERSAND + kp_verticalbar = C.SDLK_KP_VERTICALBAR + kp_dblverticalbar = C.SDLK_KP_DBLVERTICALBAR + kp_colon = C.SDLK_KP_COLON + kp_hash = C.SDLK_KP_HASH + kp_space = C.SDLK_KP_SPACE + kp_at = C.SDLK_KP_AT + kp_exclam = C.SDLK_KP_EXCLAM + kp_memstore = C.SDLK_KP_MEMSTORE + kp_memrecall = C.SDLK_KP_MEMRECALL + kp_memclear = C.SDLK_KP_MEMCLEAR + kp_memadd = C.SDLK_KP_MEMADD + kp_memsubtract = C.SDLK_KP_MEMSUBTRACT + kp_memmultiply = C.SDLK_KP_MEMMULTIPLY + kp_memdivide = C.SDLK_KP_MEMDIVIDE + kp_plusminus = C.SDLK_KP_PLUSMINUS + kp_clear = C.SDLK_KP_CLEAR + kp_clearentry = C.SDLK_KP_CLEARENTRY + kp_binary = C.SDLK_KP_BINARY + kp_octal = C.SDLK_KP_OCTAL + kp_decimal = C.SDLK_KP_DECIMAL + kp_hexadecimal = C.SDLK_KP_HEXADECIMAL + lctrl = C.SDLK_LCTRL + lshift = C.SDLK_LSHIFT + lalt = C.SDLK_LALT + lgui = C.SDLK_LGUI + rctrl = C.SDLK_RCTRL + rshift = C.SDLK_RSHIFT + 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 d7c9c2cc..bb09e849 100644 --- a/log.c.v +++ b/log.c.v @@ -22,25 +22,25 @@ pub type LogOutputFunction = fn (userdata voidptr, category int, priority LogPri // LogCategory is C.SDL_LogCategory pub enum LogCategory { application = C.SDL_LOG_CATEGORY_APPLICATION - error = C.SDL_LOG_CATEGORY_ERROR - @assert = C.SDL_LOG_CATEGORY_ASSERT - system = C.SDL_LOG_CATEGORY_SYSTEM - audio = C.SDL_LOG_CATEGORY_AUDIO - video = C.SDL_LOG_CATEGORY_VIDEO - render = C.SDL_LOG_CATEGORY_RENDER - input = C.SDL_LOG_CATEGORY_INPUT - test = C.SDL_LOG_CATEGORY_TEST + error = C.SDL_LOG_CATEGORY_ERROR + @assert = C.SDL_LOG_CATEGORY_ASSERT + system = C.SDL_LOG_CATEGORY_SYSTEM + audio = C.SDL_LOG_CATEGORY_AUDIO + video = C.SDL_LOG_CATEGORY_VIDEO + render = C.SDL_LOG_CATEGORY_RENDER + 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, @@ -49,17 +49,17 @@ pub enum LogCategory { // ... // }; // - custom = C.SDL_LOG_CATEGORY_CUSTOM + custom = C.SDL_LOG_CATEGORY_CUSTOM } // LogPriority is C.SDL_LogPriority pub enum LogPriority { - verbose = C.SDL_LOG_PRIORITY_VERBOSE // 1 - debug = C.SDL_LOG_PRIORITY_DEBUG - info = C.SDL_LOG_PRIORITY_INFO - warn = C.SDL_LOG_PRIORITY_WARN - error = C.SDL_LOG_PRIORITY_ERROR - critical = C.SDL_LOG_PRIORITY_CRITICAL + verbose = C.SDL_LOG_PRIORITY_VERBOSE // 1 + debug = C.SDL_LOG_PRIORITY_DEBUG + info = C.SDL_LOG_PRIORITY_INFO + warn = C.SDL_LOG_PRIORITY_WARN + error = C.SDL_LOG_PRIORITY_ERROR + critical = C.SDL_LOG_PRIORITY_CRITICAL num_log_priorities = C.SDL_NUM_LOG_PRIORITIES } diff --git a/messagebox.c.v b/messagebox.c.v index 9305b3a2..c8239d3e 100644 --- a/messagebox.c.v +++ b/messagebox.c.v @@ -10,8 +10,8 @@ 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 + error = C.SDL_MESSAGEBOX_ERROR // 0x00000010, error dialog + warning = C.SDL_MESSAGEBOX_WARNING // 0x00000020, warning dialog information = C.SDL_MESSAGEBOX_INFORMATION // 0x00000040, informational dialog } @@ -46,12 +46,12 @@ pub type MessageBoxColor = C.SDL_MessageBoxColor // MessageBoxColorType is C.SDL_MessageBoxColorType pub enum MessageBoxColorType { - background = C.SDL_MESSAGEBOX_COLOR_BACKGROUND - text = C.SDL_MESSAGEBOX_COLOR_TEXT - button_border = C.SDL_MESSAGEBOX_COLOR_BUTTON_BORDER + background = C.SDL_MESSAGEBOX_COLOR_BACKGROUND + text = C.SDL_MESSAGEBOX_COLOR_TEXT + button_border = C.SDL_MESSAGEBOX_COLOR_BUTTON_BORDER button_background = C.SDL_MESSAGEBOX_COLOR_BUTTON_BACKGROUND - button_selected = C.SDL_MESSAGEBOX_COLOR_BUTTON_SELECTED - max = C.SDL_MESSAGEBOX_COLOR_MAX + button_selected = C.SDL_MESSAGEBOX_COLOR_BUTTON_SELECTED + max = C.SDL_MESSAGEBOX_COLOR_MAX } // MessageBoxColorScheme is a set of colors to use for message box dialogs diff --git a/mixer/mixer.c.v b/mixer/mixer.c.v index b54b73cf..5bd6d050 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 } @@ -99,25 +99,25 @@ pub type Chunk = C.Mix_Chunk // Fading is the different fading types supported // Fading is C.Mix_Fading pub enum Fading { - no_fading = C.MIX_NO_FADING + no_fading = C.MIX_NO_FADING fading_out = C.MIX_FADING_OUT - fading_in = C.MIX_FADING_IN + fading_in = C.MIX_FADING_IN } // MusicType are types of music files (not libraries used to load them) // MusicType is C.Mix_MusicType pub enum MusicType { - @none = C.MUS_NONE - cmd = C.MUS_CMD - wav = C.MUS_WAV - mod = C.MUS_MOD - mid = C.MUS_MID - ogg = C.MUS_OGG - mp3 = C.MUS_MP3 + @none = C.MUS_NONE + cmd = C.MUS_CMD + wav = C.MUS_WAV + mod = C.MUS_MOD + mid = C.MUS_MID + ogg = C.MUS_OGG + mp3 = C.MUS_MP3 mp3_mad_unused = C.MUS_MP3_MAD_UNUSED - flac = C.MUS_FLAC + flac = C.MUS_FLAC modplug_unused = C.MUS_MODPLUG_UNUSED - opus = C.MUS_OPUS + opus = C.MUS_OPUS } pub const ( diff --git a/mouse.c.v b/mouse.c.v index bf9d0b3c..dcaa9e33 100644 --- a/mouse.c.v +++ b/mouse.c.v @@ -49,25 +49,25 @@ pub const ( // 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 - 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 + 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 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 3e41a184..8b29b4f9 100644 --- a/pixels.c.v +++ b/pixels.c.v @@ -18,14 +18,14 @@ pub const ( // Pixel type. // PixelType is C.SDL_PixelType pub enum PixelType { - unknown = C.SDL_PIXELTYPE_UNKNOWN - index1 = C.SDL_PIXELTYPE_INDEX1 - index4 = C.SDL_PIXELTYPE_INDEX4 - index8 = C.SDL_PIXELTYPE_INDEX8 - packed8 = C.SDL_PIXELTYPE_PACKED8 + unknown = C.SDL_PIXELTYPE_UNKNOWN + index1 = C.SDL_PIXELTYPE_INDEX1 + index4 = C.SDL_PIXELTYPE_INDEX4 + index8 = C.SDL_PIXELTYPE_INDEX8 + packed8 = C.SDL_PIXELTYPE_PACKED8 packed16 = C.SDL_PIXELTYPE_PACKED16 packed32 = C.SDL_PIXELTYPE_PACKED32 - arrayu8 = C.SDL_PIXELTYPE_ARRAYU8 + arrayu8 = C.SDL_PIXELTYPE_ARRAYU8 arrayu16 = C.SDL_PIXELTYPE_ARRAYU16 arrayu32 = C.SDL_PIXELTYPE_ARRAYU32 arrayf16 = C.SDL_PIXELTYPE_ARRAYF16 @@ -35,7 +35,7 @@ pub enum PixelType { // Bitmap pixel order, high bit -> low bit. // BitmapOrder is C.SDL_BitmapOrder pub enum BitmapOrder { - @none = C.SDL_BITMAPORDER_NONE + @none = C.SDL_BITMAPORDER_NONE order_4321 = C.SDL_BITMAPORDER_4321 order_1234 = C.SDL_BITMAPORDER_1234 } @@ -44,85 +44,85 @@ pub enum BitmapOrder { // PackedOrder is C.SDL_PackedOrder pub enum PackedOrder { @none = C.SDL_PACKEDORDER_NONE - xrgb = C.SDL_PACKEDORDER_XRGB - rgbx = C.SDL_PACKEDORDER_RGBX - argb = C.SDL_PACKEDORDER_ARGB - rgba = C.SDL_PACKEDORDER_RGBA - xbgr = C.SDL_PACKEDORDER_XBGR - bgrx = C.SDL_PACKEDORDER_BGRX - abgr = C.SDL_PACKEDORDER_ABGR - bgra = C.SDL_PACKEDORDER_BGRA + xrgb = C.SDL_PACKEDORDER_XRGB + rgbx = C.SDL_PACKEDORDER_RGBX + argb = C.SDL_PACKEDORDER_ARGB + rgba = C.SDL_PACKEDORDER_RGBA + xbgr = C.SDL_PACKEDORDER_XBGR + bgrx = C.SDL_PACKEDORDER_BGRX + abgr = C.SDL_PACKEDORDER_ABGR + bgra = C.SDL_PACKEDORDER_BGRA } //** Array component order, low byte -> high byte. */ // ArrayOrder is C.SDL_ArrayOrder pub enum ArrayOrder { @none = C.SDL_ARRAYORDER_NONE - rgb = C.SDL_ARRAYORDER_RGB - rgba = C.SDL_ARRAYORDER_RGBA - argb = C.SDL_ARRAYORDER_ARGB - bgr = C.SDL_ARRAYORDER_BGR - bgra = C.SDL_ARRAYORDER_BGRA - abgr = C.SDL_ARRAYORDER_ABGR + rgb = C.SDL_ARRAYORDER_RGB + rgba = C.SDL_ARRAYORDER_RGBA + argb = C.SDL_ARRAYORDER_ARGB + bgr = C.SDL_ARRAYORDER_BGR + bgra = C.SDL_ARRAYORDER_BGRA + abgr = C.SDL_ARRAYORDER_ABGR } // Packed component layout. // PackedLayout is C.SDL_PackedLayout pub enum PackedLayout { - @none = C.SDL_PACKEDLAYOUT_NONE - layout_332 = C.SDL_PACKEDLAYOUT_332 - layout_4444 = C.SDL_PACKEDLAYOUT_4444 - layout_1555 = C.SDL_PACKEDLAYOUT_1555 - layout_5551 = C.SDL_PACKEDLAYOUT_5551 - layout_565 = C.SDL_PACKEDLAYOUT_565 - layout_8888 = C.SDL_PACKEDLAYOUT_8888 + @none = C.SDL_PACKEDLAYOUT_NONE + layout_332 = C.SDL_PACKEDLAYOUT_332 + layout_4444 = C.SDL_PACKEDLAYOUT_4444 + layout_1555 = C.SDL_PACKEDLAYOUT_1555 + layout_5551 = C.SDL_PACKEDLAYOUT_5551 + layout_565 = C.SDL_PACKEDLAYOUT_565 + layout_8888 = C.SDL_PACKEDLAYOUT_8888 layout_2101010 = C.SDL_PACKEDLAYOUT_2101010 layout_1010102 = C.SDL_PACKEDLAYOUT_1010102 } pub enum Format { - unknown = C.SDL_PIXELFORMAT_UNKNOWN - index1lsb = C.SDL_PIXELFORMAT_INDEX1LSB - index1msb = C.SDL_PIXELFORMAT_INDEX1MSB - index4lsb = C.SDL_PIXELFORMAT_INDEX4LSB - index4msb = C.SDL_PIXELFORMAT_INDEX4MSB - index8 = C.SDL_PIXELFORMAT_INDEX8 - rgb332 = C.SDL_PIXELFORMAT_RGB332 - rgb444 = C.SDL_PIXELFORMAT_RGB444 - rgb555 = C.SDL_PIXELFORMAT_RGB555 - bgr555 = C.SDL_PIXELFORMAT_BGR555 - argb4444 = C.SDL_PIXELFORMAT_ARGB4444 - rgba4444 = C.SDL_PIXELFORMAT_RGBA4444 - abgr4444 = C.SDL_PIXELFORMAT_ABGR4444 - bgra4444 = C.SDL_PIXELFORMAT_BGRA4444 - argb1555 = C.SDL_PIXELFORMAT_ARGB1555 - rgba5551 = C.SDL_PIXELFORMAT_RGBA5551 - abgr1555 = C.SDL_PIXELFORMAT_ABGR1555 - bgra5551 = C.SDL_PIXELFORMAT_BGRA5551 - rgb565 = C.SDL_PIXELFORMAT_RGB565 - bgr565 = C.SDL_PIXELFORMAT_BGR565 - rgb24 = C.SDL_PIXELFORMAT_RGB24 - bgr24 = C.SDL_PIXELFORMAT_BGR24 - rgb888 = C.SDL_PIXELFORMAT_RGB888 - rgbx8888 = C.SDL_PIXELFORMAT_RGBX8888 - bgr888 = C.SDL_PIXELFORMAT_BGR888 - bgrx8888 = C.SDL_PIXELFORMAT_BGRX8888 - argb8888 = C.SDL_PIXELFORMAT_ARGB8888 - rgba8888 = C.SDL_PIXELFORMAT_RGBA8888 - abgr8888 = C.SDL_PIXELFORMAT_ABGR8888 - bgra8888 = C.SDL_PIXELFORMAT_BGRA8888 - argb2101010 = C.SDL_PIXELFORMAT_ARGB2101010 - rgba32 = C.SDL_PIXELFORMAT_RGBA32 - 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) + unknown = C.SDL_PIXELFORMAT_UNKNOWN + index1lsb = C.SDL_PIXELFORMAT_INDEX1LSB + index1msb = C.SDL_PIXELFORMAT_INDEX1MSB + index4lsb = C.SDL_PIXELFORMAT_INDEX4LSB + index4msb = C.SDL_PIXELFORMAT_INDEX4MSB + index8 = C.SDL_PIXELFORMAT_INDEX8 + rgb332 = C.SDL_PIXELFORMAT_RGB332 + rgb444 = C.SDL_PIXELFORMAT_RGB444 + rgb555 = C.SDL_PIXELFORMAT_RGB555 + bgr555 = C.SDL_PIXELFORMAT_BGR555 + argb4444 = C.SDL_PIXELFORMAT_ARGB4444 + rgba4444 = C.SDL_PIXELFORMAT_RGBA4444 + abgr4444 = C.SDL_PIXELFORMAT_ABGR4444 + bgra4444 = C.SDL_PIXELFORMAT_BGRA4444 + argb1555 = C.SDL_PIXELFORMAT_ARGB1555 + rgba5551 = C.SDL_PIXELFORMAT_RGBA5551 + abgr1555 = C.SDL_PIXELFORMAT_ABGR1555 + bgra5551 = C.SDL_PIXELFORMAT_BGRA5551 + rgb565 = C.SDL_PIXELFORMAT_RGB565 + bgr565 = C.SDL_PIXELFORMAT_BGR565 + rgb24 = C.SDL_PIXELFORMAT_RGB24 + bgr24 = C.SDL_PIXELFORMAT_BGR24 + rgb888 = C.SDL_PIXELFORMAT_RGB888 + rgbx8888 = C.SDL_PIXELFORMAT_RGBX8888 + bgr888 = C.SDL_PIXELFORMAT_BGR888 + bgrx8888 = C.SDL_PIXELFORMAT_BGRX8888 + argb8888 = C.SDL_PIXELFORMAT_ARGB8888 + rgba8888 = C.SDL_PIXELFORMAT_RGBA8888 + abgr8888 = C.SDL_PIXELFORMAT_ABGR8888 + bgra8888 = C.SDL_PIXELFORMAT_BGRA8888 + argb2101010 = C.SDL_PIXELFORMAT_ARGB2101010 + rgba32 = C.SDL_PIXELFORMAT_RGBA32 + 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) external_oes = C.SDL_PIXELFORMAT_EXTERNAL_OES // Android video texture format } diff --git a/power.c.v b/power.c.v index 76bb49cd..796efa55 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) C.SDL_PowerState diff --git a/render.c.v b/render.c.v index cf7377ae..85e16a43 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 } @@ -49,9 +49,9 @@ pub type RendererInfo = C.SDL_RendererInfo // 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 @@ -63,9 +63,9 @@ pub enum TextureModulate { // 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 } [typedef] diff --git a/scancode.c.v b/scancode.c.v index 978637d0..2498ea38 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 b6bd00cb..acc5743d 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 c1bf3f7c..9d201d08 100644 --- a/shape.c.v +++ b/shape.c.v @@ -53,10 +53,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 2f51278d..b8d1ed39 100644 --- a/surface.c.v +++ b/surface.c.v @@ -45,9 +45,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/thread.c.v b/thread.c.v index e4069f4a..c996d353 100644 --- a/thread.c.v +++ b/thread.c.v @@ -30,9 +30,9 @@ pub type TLSID = u32 // // ThreadPriority is C.SDL_ThreadPriority pub enum ThreadPriority { - low = C.SDL_THREAD_PRIORITY_LOW - normal = C.SDL_THREAD_PRIORITY_NORMAL - high = C.SDL_THREAD_PRIORITY_HIGH + low = C.SDL_THREAD_PRIORITY_LOW + normal = C.SDL_THREAD_PRIORITY_NORMAL + high = C.SDL_THREAD_PRIORITY_HIGH time_critical = C.SDL_THREAD_PRIORITY_TIME_CRITICAL } diff --git a/touch.c.v b/touch.c.v index 945484b5..9a4cf861 100644 --- a/touch.c.v +++ b/touch.c.v @@ -22,8 +22,8 @@ pub const ( // 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 1353ca0b..2b1809ab 100644 --- a/video.c.v +++ b/video.c.v @@ -67,27 +67,27 @@ 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 - input_grabbed = C.SDL_WINDOW_INPUT_GRABBED // 0x00000100 window has grabbed input focus - 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 + input_grabbed = C.SDL_WINDOW_INPUT_GRABBED // 0x00000100 window has grabbed input focus + 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 INPUT_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 + 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 INPUT_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 } // Used to indicate that you don't care what the window position is. @@ -126,39 +126,39 @@ 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 + @none = C.SDL_DISPLAYEVENT_NONE // Never used orientation = C.SDL_DISPLAYEVENT_ORIENTATION // Display orientation has changed to data1 } // 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 } // typedef void *SDL_GLContext; @@ -170,48 +170,48 @@ pub type GLContext = voidptr // GLattr is OpenGL configuration attributes // GLattr is C.SDL_GLattr pub enum GLattr { - red_size = C.SDL_GL_RED_SIZE - green_size = C.SDL_GL_GREEN_SIZE - blue_size = C.SDL_GL_BLUE_SIZE - alpha_size = C.SDL_GL_ALPHA_SIZE - buffer_size = C.SDL_GL_BUFFER_SIZE - doublebuffer = C.SDL_GL_DOUBLEBUFFER - depth_size = C.SDL_GL_DEPTH_SIZE - stencil_size = C.SDL_GL_STENCIL_SIZE - accum_red_size = C.SDL_GL_ACCUM_RED_SIZE - accum_green_size = C.SDL_GL_ACCUM_GREEN_SIZE - accum_blue_size = C.SDL_GL_ACCUM_BLUE_SIZE - accum_alpha_size = C.SDL_GL_ACCUM_ALPHA_SIZE - stereo = C.SDL_GL_STEREO - multisamplebuffers = C.SDL_GL_MULTISAMPLEBUFFERS - multisamplesamples = C.SDL_GL_MULTISAMPLESAMPLES - accelerated_visual = C.SDL_GL_ACCELERATED_VISUAL - retained_backing = C.SDL_GL_RETAINED_BACKING - context_major_version = C.SDL_GL_CONTEXT_MAJOR_VERSION - context_minor_version = C.SDL_GL_CONTEXT_MINOR_VERSION - context_egl = C.SDL_GL_CONTEXT_EGL - context_flags = C.SDL_GL_CONTEXT_FLAGS - context_profile_mask = C.SDL_GL_CONTEXT_PROFILE_MASK + red_size = C.SDL_GL_RED_SIZE + green_size = C.SDL_GL_GREEN_SIZE + blue_size = C.SDL_GL_BLUE_SIZE + alpha_size = C.SDL_GL_ALPHA_SIZE + buffer_size = C.SDL_GL_BUFFER_SIZE + doublebuffer = C.SDL_GL_DOUBLEBUFFER + depth_size = C.SDL_GL_DEPTH_SIZE + stencil_size = C.SDL_GL_STENCIL_SIZE + accum_red_size = C.SDL_GL_ACCUM_RED_SIZE + accum_green_size = C.SDL_GL_ACCUM_GREEN_SIZE + accum_blue_size = C.SDL_GL_ACCUM_BLUE_SIZE + accum_alpha_size = C.SDL_GL_ACCUM_ALPHA_SIZE + stereo = C.SDL_GL_STEREO + multisamplebuffers = C.SDL_GL_MULTISAMPLEBUFFERS + multisamplesamples = C.SDL_GL_MULTISAMPLESAMPLES + accelerated_visual = C.SDL_GL_ACCELERATED_VISUAL + retained_backing = C.SDL_GL_RETAINED_BACKING + context_major_version = C.SDL_GL_CONTEXT_MAJOR_VERSION + context_minor_version = C.SDL_GL_CONTEXT_MINOR_VERSION + context_egl = C.SDL_GL_CONTEXT_EGL + context_flags = C.SDL_GL_CONTEXT_FLAGS + context_profile_mask = C.SDL_GL_CONTEXT_PROFILE_MASK share_with_current_context = C.SDL_GL_SHARE_WITH_CURRENT_CONTEXT - framebuffer_srgb_capable = C.SDL_GL_FRAMEBUFFER_SRGB_CAPABLE - context_release_behavior = C.SDL_GL_CONTEXT_RELEASE_BEHAVIOR + framebuffer_srgb_capable = C.SDL_GL_FRAMEBUFFER_SRGB_CAPABLE + context_release_behavior = C.SDL_GL_CONTEXT_RELEASE_BEHAVIOR context_reset_notification = C.SDL_GL_CONTEXT_RESET_NOTIFICATION - context_no_error = C.SDL_GL_CONTEXT_NO_ERROR + context_no_error = C.SDL_GL_CONTEXT_NO_ERROR } // 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 @@ -223,7 +223,7 @@ pub enum GLcontextReleaseFlag { // 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. @@ -232,16 +232,16 @@ pub enum GLContextResetNotification { // // HitTestResult is C.SDL_HitTestResult pub enum HitTestResult { - 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 - resize_topright = C.SDL_HITTEST_RESIZE_TOPRIGHT - resize_right = C.SDL_HITTEST_RESIZE_RIGHT + 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 + resize_topright = C.SDL_HITTEST_RESIZE_TOPRIGHT + resize_right = C.SDL_HITTEST_RESIZE_RIGHT resize_bottomright = C.SDL_HITTEST_RESIZE_BOTTOMRIGHT - resize_bottom = C.SDL_HITTEST_RESIZE_BOTTOM - resize_bottomleft = C.SDL_HITTEST_RESIZE_BOTTOMLEFT - resize_left = C.SDL_HITTEST_RESIZE_LEFT + resize_bottom = C.SDL_HITTEST_RESIZE_BOTTOM + resize_bottomleft = C.SDL_HITTEST_RESIZE_BOTTOMLEFT + resize_left = C.SDL_HITTEST_RESIZE_LEFT } // `typedef SDL_HitTestResult (SDLCALL *SDL_HitTest)(SDL_Window *win, const SDL_Point *area, void *data)`