mirror of
https://github.com/yeslayla/golang-game-framework.git
synced 2025-01-14 04:53:32 +01:00
259 lines
13 KiB
Go
259 lines
13 KiB
Go
package sdl
|
|
|
|
import "github.com/veandco/go-sdl2/sdl"
|
|
|
|
const (
|
|
SCANCODE_UNKNOWN = uint32(sdl.SCANCODE_UNKNOWN)
|
|
|
|
SCANCODE_A = uint32(sdl.SCANCODE_A)
|
|
SCANCODE_B = uint32(sdl.SCANCODE_B)
|
|
SCANCODE_C = uint32(sdl.SCANCODE_C)
|
|
SCANCODE_D = uint32(sdl.SCANCODE_D)
|
|
SCANCODE_E = uint32(sdl.SCANCODE_E)
|
|
SCANCODE_F = uint32(sdl.SCANCODE_F)
|
|
SCANCODE_G = uint32(sdl.SCANCODE_G)
|
|
SCANCODE_H = uint32(sdl.SCANCODE_H)
|
|
SCANCODE_I = uint32(sdl.SCANCODE_I)
|
|
SCANCODE_J = uint32(sdl.SCANCODE_J)
|
|
SCANCODE_K = uint32(sdl.SCANCODE_K)
|
|
SCANCODE_L = uint32(sdl.SCANCODE_L)
|
|
SCANCODE_M = uint32(sdl.SCANCODE_M)
|
|
SCANCODE_N = uint32(sdl.SCANCODE_N)
|
|
SCANCODE_O = uint32(sdl.SCANCODE_O)
|
|
SCANCODE_P = uint32(sdl.SCANCODE_P)
|
|
SCANCODE_Q = uint32(sdl.SCANCODE_Q)
|
|
SCANCODE_R = uint32(sdl.SCANCODE_R)
|
|
SCANCODE_S = uint32(sdl.SCANCODE_S)
|
|
SCANCODE_T = uint32(sdl.SCANCODE_T)
|
|
SCANCODE_U = uint32(sdl.SCANCODE_U)
|
|
SCANCODE_V = uint32(sdl.SCANCODE_V)
|
|
SCANCODE_W = uint32(sdl.SCANCODE_W)
|
|
SCANCODE_X = uint32(sdl.SCANCODE_X)
|
|
SCANCODE_Y = uint32(sdl.SCANCODE_Y)
|
|
SCANCODE_Z = uint32(sdl.SCANCODE_Z)
|
|
|
|
SCANCODE_1 = uint32(sdl.SCANCODE_1)
|
|
SCANCODE_2 = uint32(sdl.SCANCODE_2)
|
|
SCANCODE_3 = uint32(sdl.SCANCODE_3)
|
|
SCANCODE_4 = uint32(sdl.SCANCODE_4)
|
|
SCANCODE_5 = uint32(sdl.SCANCODE_5)
|
|
SCANCODE_6 = uint32(sdl.SCANCODE_6)
|
|
SCANCODE_7 = uint32(sdl.SCANCODE_7)
|
|
SCANCODE_8 = uint32(sdl.SCANCODE_8)
|
|
SCANCODE_9 = uint32(sdl.SCANCODE_9)
|
|
SCANCODE_0 = uint32(sdl.SCANCODE_0)
|
|
|
|
SCANCODE_RETURN = uint32(sdl.SCANCODE_RETURN)
|
|
SCANCODE_ESCAPE = uint32(sdl.SCANCODE_ESCAPE)
|
|
SCANCODE_BACKSPACE = uint32(sdl.SCANCODE_BACKSPACE)
|
|
SCANCODE_TAB = uint32(sdl.SCANCODE_TAB)
|
|
SCANCODE_SPACE = uint32(sdl.SCANCODE_SPACE)
|
|
|
|
SCANCODE_MINUS = uint32(sdl.SCANCODE_MINUS)
|
|
SCANCODE_EQUALS = uint32(sdl.SCANCODE_EQUALS)
|
|
SCANCODE_LEFTBRACKET = uint32(sdl.SCANCODE_LEFTBRACKET)
|
|
SCANCODE_RIGHTBRACKET = uint32(sdl.SCANCODE_RIGHTBRACKET)
|
|
SCANCODE_BACKSLASH = uint32(sdl.SCANCODE_BACKSLASH)
|
|
SCANCODE_NONUSHASH = uint32(sdl.SCANCODE_NONUSHASH)
|
|
SCANCODE_SEMICOLON = uint32(sdl.SCANCODE_SEMICOLON)
|
|
SCANCODE_APOSTROPHE = uint32(sdl.SCANCODE_APOSTROPHE)
|
|
SCANCODE_GRAVE = uint32(sdl.SCANCODE_GRAVE)
|
|
SCANCODE_COMMA = uint32(sdl.SCANCODE_COMMA)
|
|
SCANCODE_PERIOD = uint32(sdl.SCANCODE_PERIOD)
|
|
SCANCODE_SLASH = uint32(sdl.SCANCODE_SLASH)
|
|
SCANCODE_CAPSLOCK = uint32(sdl.SCANCODE_CAPSLOCK)
|
|
SCANCODE_F1 = uint32(sdl.SCANCODE_F1)
|
|
SCANCODE_F2 = uint32(sdl.SCANCODE_F2)
|
|
SCANCODE_F3 = uint32(sdl.SCANCODE_F3)
|
|
SCANCODE_F4 = uint32(sdl.SCANCODE_F4)
|
|
SCANCODE_F5 = uint32(sdl.SCANCODE_F5)
|
|
SCANCODE_F6 = uint32(sdl.SCANCODE_F6)
|
|
SCANCODE_F7 = uint32(sdl.SCANCODE_F7)
|
|
SCANCODE_F8 = uint32(sdl.SCANCODE_F8)
|
|
SCANCODE_F9 = uint32(sdl.SCANCODE_F9)
|
|
SCANCODE_F10 = uint32(sdl.SCANCODE_F10)
|
|
SCANCODE_F11 = uint32(sdl.SCANCODE_F11)
|
|
SCANCODE_F12 = uint32(sdl.SCANCODE_F12)
|
|
SCANCODE_PRINTSCREEN = uint32(sdl.SCANCODE_PRINTSCREEN)
|
|
SCANCODE_SCROLLLOCK = uint32(sdl.SCANCODE_SCROLLLOCK)
|
|
SCANCODE_PAUSE = uint32(sdl.SCANCODE_PAUSE)
|
|
SCANCODE_INSERT = uint32(sdl.SCANCODE_INSERT)
|
|
SCANCODE_HOME = uint32(sdl.SCANCODE_HOME)
|
|
SCANCODE_PAGEUP = uint32(sdl.SCANCODE_PAGEUP)
|
|
SCANCODE_DELETE = uint32(sdl.SCANCODE_DELETE)
|
|
SCANCODE_END = uint32(sdl.SCANCODE_END)
|
|
SCANCODE_PAGEDOWN = uint32(sdl.SCANCODE_PAGEDOWN)
|
|
SCANCODE_RIGHT = uint32(sdl.SCANCODE_RIGHT)
|
|
SCANCODE_LEFT = uint32(sdl.SCANCODE_LEFT)
|
|
SCANCODE_DOWN = uint32(sdl.SCANCODE_DOWN)
|
|
SCANCODE_UP = uint32(sdl.SCANCODE_UP)
|
|
|
|
SCANCODE_NUMLOCKCLEAR = uint32(sdl.SCANCODE_NUMLOCKCLEAR)
|
|
SCANCODE_KP_DIVIDE = uint32(sdl.SCANCODE_KP_DIVIDE)
|
|
SCANCODE_KP_MULTIPLY = uint32(sdl.SCANCODE_KP_MULTIPLY)
|
|
SCANCODE_KP_MINUS = uint32(sdl.SCANCODE_KP_MINUS)
|
|
SCANCODE_KP_PLUS = uint32(sdl.SCANCODE_KP_PLUS)
|
|
SCANCODE_KP_ENTER = uint32(sdl.SCANCODE_KP_ENTER)
|
|
SCANCODE_KP_1 = uint32(sdl.SCANCODE_KP_1)
|
|
SCANCODE_KP_2 = uint32(sdl.SCANCODE_KP_2)
|
|
SCANCODE_KP_3 = uint32(sdl.SCANCODE_KP_3)
|
|
SCANCODE_KP_4 = uint32(sdl.SCANCODE_KP_4)
|
|
SCANCODE_KP_5 = uint32(sdl.SCANCODE_KP_5)
|
|
SCANCODE_KP_6 = uint32(sdl.SCANCODE_KP_6)
|
|
SCANCODE_KP_7 = uint32(sdl.SCANCODE_KP_7)
|
|
SCANCODE_KP_8 = uint32(sdl.SCANCODE_KP_8)
|
|
SCANCODE_KP_9 = uint32(sdl.SCANCODE_KP_9)
|
|
SCANCODE_KP_0 = uint32(sdl.SCANCODE_KP_0)
|
|
SCANCODE_KP_PERIOD = uint32(sdl.SCANCODE_KP_PERIOD)
|
|
|
|
SCANCODE_NONUSBACKSLASH = uint32(sdl.SCANCODE_NONUSBACKSLASH)
|
|
SCANCODE_APPLICATION = uint32(sdl.SCANCODE_APPLICATION)
|
|
SCANCODE_POWER = uint32(sdl.SCANCODE_POWER)
|
|
SCANCODE_KP_EQUALS = uint32(sdl.SCANCODE_KP_EQUALS)
|
|
SCANCODE_F13 = uint32(sdl.SCANCODE_F13)
|
|
SCANCODE_F14 = uint32(sdl.SCANCODE_F14)
|
|
SCANCODE_F15 = uint32(sdl.SCANCODE_F15)
|
|
SCANCODE_F16 = uint32(sdl.SCANCODE_F16)
|
|
SCANCODE_F17 = uint32(sdl.SCANCODE_F17)
|
|
SCANCODE_F18 = uint32(sdl.SCANCODE_F18)
|
|
SCANCODE_F19 = uint32(sdl.SCANCODE_F19)
|
|
SCANCODE_F20 = uint32(sdl.SCANCODE_F20)
|
|
SCANCODE_F21 = uint32(sdl.SCANCODE_F21)
|
|
SCANCODE_F22 = uint32(sdl.SCANCODE_F22)
|
|
SCANCODE_F23 = uint32(sdl.SCANCODE_F23)
|
|
SCANCODE_F24 = uint32(sdl.SCANCODE_F24)
|
|
SCANCODE_EXECUTE = uint32(sdl.SCANCODE_EXECUTE)
|
|
SCANCODE_HELP = uint32(sdl.SCANCODE_HELP)
|
|
SCANCODE_MENU = uint32(sdl.SCANCODE_MENU)
|
|
SCANCODE_SELECT = uint32(sdl.SCANCODE_SELECT)
|
|
SCANCODE_STOP = uint32(sdl.SCANCODE_STOP)
|
|
SCANCODE_AGAIN = uint32(sdl.SCANCODE_AGAIN)
|
|
SCANCODE_UNDO = uint32(sdl.SCANCODE_UNDO)
|
|
SCANCODE_CUT = uint32(sdl.SCANCODE_CUT)
|
|
SCANCODE_COPY = uint32(sdl.SCANCODE_COPY)
|
|
SCANCODE_PASTE = uint32(sdl.SCANCODE_PASTE)
|
|
SCANCODE_FIND = uint32(sdl.SCANCODE_FIND)
|
|
SCANCODE_MUTE = uint32(sdl.SCANCODE_MUTE)
|
|
SCANCODE_VOLUMEUP = uint32(sdl.SCANCODE_VOLUMEUP)
|
|
SCANCODE_VOLUMEDOWN = uint32(sdl.SCANCODE_VOLUMEDOWN)
|
|
SCANCODE_KP_COMMA = uint32(sdl.SCANCODE_KP_COMMA)
|
|
SCANCODE_KP_EQUALSAS400 = uint32(sdl.SCANCODE_KP_EQUALSAS400)
|
|
|
|
SCANCODE_INTERNATIONAL1 = uint32(sdl.SCANCODE_INTERNATIONAL1)
|
|
SCANCODE_INTERNATIONAL2 = uint32(sdl.SCANCODE_INTERNATIONAL2)
|
|
SCANCODE_INTERNATIONAL3 = uint32(sdl.SCANCODE_INTERNATIONAL3)
|
|
SCANCODE_INTERNATIONAL4 = uint32(sdl.SCANCODE_INTERNATIONAL4)
|
|
SCANCODE_INTERNATIONAL5 = uint32(sdl.SCANCODE_INTERNATIONAL5)
|
|
SCANCODE_INTERNATIONAL6 = uint32(sdl.SCANCODE_INTERNATIONAL6)
|
|
SCANCODE_INTERNATIONAL7 = uint32(sdl.SCANCODE_INTERNATIONAL7)
|
|
SCANCODE_INTERNATIONAL8 = uint32(sdl.SCANCODE_INTERNATIONAL8)
|
|
SCANCODE_INTERNATIONAL9 = uint32(sdl.SCANCODE_INTERNATIONAL9)
|
|
SCANCODE_LANG1 = uint32(sdl.SCANCODE_LANG1)
|
|
SCANCODE_LANG2 = uint32(sdl.SCANCODE_LANG2)
|
|
SCANCODE_LANG3 = uint32(sdl.SCANCODE_LANG3)
|
|
SCANCODE_LANG4 = uint32(sdl.SCANCODE_LANG4)
|
|
SCANCODE_LANG5 = uint32(sdl.SCANCODE_LANG5)
|
|
SCANCODE_LANG6 = uint32(sdl.SCANCODE_LANG6)
|
|
SCANCODE_LANG7 = uint32(sdl.SCANCODE_LANG7)
|
|
SCANCODE_LANG8 = uint32(sdl.SCANCODE_LANG8)
|
|
SCANCODE_LANG9 = uint32(sdl.SCANCODE_LANG9)
|
|
|
|
SCANCODE_ALTERASE = uint32(sdl.SCANCODE_ALTERASE)
|
|
SCANCODE_SYSREQ = uint32(sdl.SCANCODE_SYSREQ)
|
|
SCANCODE_CANCEL = uint32(sdl.SCANCODE_CANCEL)
|
|
SCANCODE_CLEAR = uint32(sdl.SCANCODE_CLEAR)
|
|
SCANCODE_PRIOR = uint32(sdl.SCANCODE_PRIOR)
|
|
SCANCODE_RETURN2 = uint32(sdl.SCANCODE_RETURN2)
|
|
SCANCODE_SEPARATOR = uint32(sdl.SCANCODE_SEPARATOR)
|
|
SCANCODE_OUT = uint32(sdl.SCANCODE_OUT)
|
|
SCANCODE_OPER = uint32(sdl.SCANCODE_OPER)
|
|
SCANCODE_CLEARAGAIN = uint32(sdl.SCANCODE_CLEARAGAIN)
|
|
SCANCODE_CRSEL = uint32(sdl.SCANCODE_CRSEL)
|
|
SCANCODE_EXSEL = uint32(sdl.SCANCODE_EXSEL)
|
|
|
|
SCANCODE_KP_00 = uint32(sdl.SCANCODE_KP_00)
|
|
SCANCODE_KP_000 = uint32(sdl.SCANCODE_KP_000)
|
|
SCANCODE_THOUSANDSSEPARATOR = uint32(sdl.SCANCODE_THOUSANDSSEPARATOR)
|
|
SCANCODE_DECIMALSEPARATOR = uint32(sdl.SCANCODE_DECIMALSEPARATOR)
|
|
SCANCODE_CURRENCYUNIT = uint32(sdl.SCANCODE_CURRENCYUNIT)
|
|
SCANCODE_CURRENCYSUBUNIT = uint32(sdl.SCANCODE_CURRENCYSUBUNIT)
|
|
SCANCODE_KP_LEFTPAREN = uint32(sdl.SCANCODE_KP_LEFTPAREN)
|
|
SCANCODE_KP_RIGHTPAREN = uint32(sdl.SCANCODE_KP_RIGHTPAREN)
|
|
SCANCODE_KP_LEFTBRACE = uint32(sdl.SCANCODE_KP_LEFTBRACE)
|
|
SCANCODE_KP_RIGHTBRACE = uint32(sdl.SCANCODE_KP_RIGHTBRACE)
|
|
SCANCODE_KP_TAB = uint32(sdl.SCANCODE_KP_TAB)
|
|
SCANCODE_KP_BACKSPACE = uint32(sdl.SCANCODE_KP_BACKSPACE)
|
|
SCANCODE_KP_A = uint32(sdl.SCANCODE_KP_A)
|
|
SCANCODE_KP_B = uint32(sdl.SCANCODE_KP_B)
|
|
SCANCODE_KP_C = uint32(sdl.SCANCODE_KP_C)
|
|
SCANCODE_KP_D = uint32(sdl.SCANCODE_KP_D)
|
|
SCANCODE_KP_E = uint32(sdl.SCANCODE_KP_E)
|
|
SCANCODE_KP_F = uint32(sdl.SCANCODE_KP_F)
|
|
SCANCODE_KP_XOR = uint32(sdl.SCANCODE_KP_XOR)
|
|
SCANCODE_KP_POWER = uint32(sdl.SCANCODE_KP_POWER)
|
|
SCANCODE_KP_PERCENT = uint32(sdl.SCANCODE_KP_PERCENT)
|
|
SCANCODE_KP_LESS = uint32(sdl.SCANCODE_KP_LESS)
|
|
SCANCODE_KP_GREATER = uint32(sdl.SCANCODE_KP_GREATER)
|
|
SCANCODE_KP_AMPERSAND = uint32(sdl.SCANCODE_KP_AMPERSAND)
|
|
SCANCODE_KP_DBLAMPERSAND = uint32(sdl.SCANCODE_KP_DBLAMPERSAND)
|
|
SCANCODE_KP_VERTICALBAR = uint32(sdl.SCANCODE_KP_VERTICALBAR)
|
|
SCANCODE_KP_DBLVERTICALBAR = uint32(sdl.SCANCODE_KP_DBLVERTICALBAR)
|
|
SCANCODE_KP_COLON = uint32(sdl.SCANCODE_KP_COLON)
|
|
SCANCODE_KP_HASH = uint32(sdl.SCANCODE_KP_HASH)
|
|
SCANCODE_KP_SPACE = uint32(sdl.SCANCODE_KP_SPACE)
|
|
SCANCODE_KP_AT = uint32(sdl.SCANCODE_KP_AT)
|
|
SCANCODE_KP_EXCLAM = uint32(sdl.SCANCODE_KP_EXCLAM)
|
|
SCANCODE_KP_MEMSTORE = uint32(sdl.SCANCODE_KP_MEMSTORE)
|
|
SCANCODE_KP_MEMRECALL = uint32(sdl.SCANCODE_KP_MEMRECALL)
|
|
SCANCODE_KP_MEMCLEAR = uint32(sdl.SCANCODE_KP_MEMCLEAR)
|
|
SCANCODE_KP_MEMADD = uint32(sdl.SCANCODE_KP_MEMADD)
|
|
SCANCODE_KP_MEMSUBTRACT = uint32(sdl.SCANCODE_KP_MEMSUBTRACT)
|
|
SCANCODE_KP_MEMMULTIPLY = uint32(sdl.SCANCODE_KP_MEMMULTIPLY)
|
|
SCANCODE_KP_MEMDIVIDE = uint32(sdl.SCANCODE_KP_MEMDIVIDE)
|
|
SCANCODE_KP_PLUSMINUS = uint32(sdl.SCANCODE_KP_PLUSMINUS)
|
|
SCANCODE_KP_CLEAR = uint32(sdl.SCANCODE_KP_CLEAR)
|
|
SCANCODE_KP_CLEARENTRY = uint32(sdl.SCANCODE_KP_CLEARENTRY)
|
|
SCANCODE_KP_BINARY = uint32(sdl.SCANCODE_KP_BINARY)
|
|
SCANCODE_KP_OCTAL = uint32(sdl.SCANCODE_KP_OCTAL)
|
|
SCANCODE_KP_DECIMAL = uint32(sdl.SCANCODE_KP_DECIMAL)
|
|
SCANCODE_KP_HEXADECIMAL = uint32(sdl.SCANCODE_KP_HEXADECIMAL)
|
|
|
|
SCANCODE_LCTRL = uint32(sdl.SCANCODE_LCTRL)
|
|
SCANCODE_LSHIFT = uint32(sdl.SCANCODE_LSHIFT)
|
|
SCANCODE_LALT = uint32(sdl.SCANCODE_LALT)
|
|
SCANCODE_LGUI = uint32(sdl.SCANCODE_LGUI)
|
|
SCANCODE_RCTRL = uint32(sdl.SCANCODE_RCTRL)
|
|
SCANCODE_RSHIFT = uint32(sdl.SCANCODE_RSHIFT)
|
|
SCANCODE_RALT = uint32(sdl.SCANCODE_RALT)
|
|
SCANCODE_RGUI = uint32(sdl.SCANCODE_RGUI)
|
|
SCANCODE_MODE = uint32(sdl.SCANCODE_MODE)
|
|
SCANCODE_AUDIONEXT = uint32(sdl.SCANCODE_AUDIONEXT)
|
|
SCANCODE_AUDIOPREV = uint32(sdl.SCANCODE_AUDIOPREV)
|
|
SCANCODE_AUDIOSTOP = uint32(sdl.SCANCODE_AUDIOSTOP)
|
|
SCANCODE_AUDIOPLAY = uint32(sdl.SCANCODE_AUDIOPLAY)
|
|
SCANCODE_AUDIOMUTE = uint32(sdl.SCANCODE_AUDIOMUTE)
|
|
SCANCODE_MEDIASELECT = uint32(sdl.SCANCODE_MEDIASELECT)
|
|
SCANCODE_WWW = uint32(sdl.SCANCODE_WWW)
|
|
SCANCODE_MAIL = uint32(sdl.SCANCODE_MAIL)
|
|
SCANCODE_CALCULATOR = uint32(sdl.SCANCODE_CALCULATOR)
|
|
SCANCODE_COMPUTER = uint32(sdl.SCANCODE_COMPUTER)
|
|
SCANCODE_AC_SEARCH = uint32(sdl.SCANCODE_AC_SEARCH)
|
|
SCANCODE_AC_HOME = uint32(sdl.SCANCODE_AC_HOME)
|
|
SCANCODE_AC_BACK = uint32(sdl.SCANCODE_AC_BACK)
|
|
SCANCODE_AC_FORWARD = uint32(sdl.SCANCODE_AC_FORWARD)
|
|
SCANCODE_AC_STOP = uint32(sdl.SCANCODE_AC_STOP)
|
|
SCANCODE_AC_REFRESH = uint32(sdl.SCANCODE_AC_REFRESH)
|
|
SCANCODE_AC_BOOKMARKS = uint32(sdl.SCANCODE_AC_BOOKMARKS)
|
|
SCANCODE_BRIGHTNESSDOWN = uint32(sdl.SCANCODE_BRIGHTNESSDOWN)
|
|
SCANCODE_BRIGHTNESSUP = uint32(sdl.SCANCODE_BRIGHTNESSUP)
|
|
SCANCODE_DISPLAYSWITCH = uint32(sdl.SCANCODE_DISPLAYSWITCH)
|
|
SCANCODE_KBDILLUMTOGGLE = uint32(sdl.SCANCODE_KBDILLUMTOGGLE)
|
|
SCANCODE_KBDILLUMDOWN = uint32(sdl.SCANCODE_KBDILLUMDOWN)
|
|
SCANCODE_KBDILLUMUP = uint32(sdl.SCANCODE_KBDILLUMUP)
|
|
SCANCODE_EJECT = uint32(sdl.SCANCODE_EJECT)
|
|
SCANCODE_SLEEP = uint32(sdl.SCANCODE_SLEEP)
|
|
SCANCODE_APP1 = uint32(sdl.SCANCODE_APP1)
|
|
SCANCODE_APP2 = uint32(sdl.SCANCODE_APP2)
|
|
NUM_SCANCODES = uint32(sdl.NUM_SCANCODES)
|
|
)
|