# Copyright 2014-2026 Tom Rothamel <pytom@bishoujo.us>
#
# This software is provided 'as-is', without any express or implied
# warranty.  In no event will the authors be held liable for any damages
# arising from the use of this software.
#
# Permission is granted to anyone to use this software for any purpose,
# including commercial applications, and to alter it and redistribute it
# freely, subject to the following restrictions:
#
# 1. The origin of this software must not be misrepresented; you must not
#    claim that you wrote the original software. If you use this software
#    in a product, an acknowledgment in the product documentation would be
#    appreciated but is not required.
# 2. Altered source versions must be plainly marked as such, and must not be
#    misrepresented as being the original software.
# 3. This notice may not be removed or altered from any source distribution.


from .sdl cimport *

from .rect import Rect
from .color import Color
from .surface import (
	BLEND_ADD as BLEND_ADD,
	BLEND_SUB as BLEND_SUB,
	BLEND_MULT as BLEND_MULT,
	BLEND_MIN as BLEND_MIN,
	BLEND_MAX as BLEND_MAX,
	BLEND_RGB_ADD as BLEND_RGB_ADD,
	BLEND_RGB_SUB as BLEND_RGB_SUB,
	BLEND_RGB_MULT as BLEND_RGB_MULT,
	BLEND_RGB_MIN as BLEND_RGB_MIN,
	BLEND_RGB_MAX as BLEND_RGB_MAX,
	BLEND_RGBA_ADD as BLEND_RGBA_ADD,
	BLEND_RGBA_SUB as BLEND_RGBA_SUB,
	BLEND_RGBA_MULT as BLEND_RGBA_MULT,
	BLEND_RGBA_MIN as BLEND_RGBA_MIN,
	BLEND_RGBA_MAX as BLEND_RGBA_MAX,
	BLEND_PREMULTIPLIED as BLEND_PREMULTIPLIED,
	BLEND_ALPHA_SDL2 as BLEND_ALPHA_SDL2,
)


# Events
NOEVENT = SDL_EVENT_FIRST
QUIT = SDL_EVENT_QUIT
TERMINATING = SDL_EVENT_TERMINATING
LOWMEMORY = SDL_EVENT_LOW_MEMORY
WILLENTERBACKGROUND = SDL_EVENT_WILL_ENTER_BACKGROUND
DIDENTERBACKGROUND = SDL_EVENT_DID_ENTER_BACKGROUND
WILLENTERFOREGROUND = SDL_EVENT_WILL_ENTER_FOREGROUND
DIDENTERFOREGROUND = SDL_EVENT_DID_ENTER_FOREGROUND
LOCALECHANGED = SDL_EVENT_LOCALE_CHANGED
SYSTEMTHEMECHANGED = SDL_EVENT_SYSTEM_THEME_CHANGED
DISPLAYORIENTATION = SDL_EVENT_DISPLAY_ORIENTATION
DISPLAYADDED = SDL_EVENT_DISPLAY_ADDED
DISPLAYREMOVED = SDL_EVENT_DISPLAY_REMOVED
DISPLAYMOVED = SDL_EVENT_DISPLAY_MOVED
DISPLAYDESKTOPMODECHANGED = SDL_EVENT_DISPLAY_DESKTOP_MODE_CHANGED
DISPLAYCURRENTMODECHANGED = SDL_EVENT_DISPLAY_CURRENT_MODE_CHANGED
DISPLAYCONTENTSCALECHANGED = SDL_EVENT_DISPLAY_CONTENT_SCALE_CHANGED
DISPLAYUSABLEBOUNDSCHANGED = SDL_EVENT_DISPLAY_USABLE_BOUNDS_CHANGED
DISPLAYFIRST = SDL_EVENT_DISPLAY_FIRST
DISPLAYLAST = SDL_EVENT_DISPLAY_LAST
WINDOWSHOWN = SDL_EVENT_WINDOW_SHOWN
WINDOWHIDDEN = SDL_EVENT_WINDOW_HIDDEN
WINDOWEXPOSED = SDL_EVENT_WINDOW_EXPOSED
WINDOWMOVED = SDL_EVENT_WINDOW_MOVED
WINDOWRESIZED = SDL_EVENT_WINDOW_RESIZED
WINDOWPIXELSIZECHANGED = SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED
WINDOWMETALVIEWRESIZED = SDL_EVENT_WINDOW_METAL_VIEW_RESIZED
WINDOWMINIMIZED = SDL_EVENT_WINDOW_MINIMIZED
WINDOWMAXIMIZED = SDL_EVENT_WINDOW_MAXIMIZED
WINDOWRESTORED = SDL_EVENT_WINDOW_RESTORED
WINDOWMOUSEENTER = SDL_EVENT_WINDOW_MOUSE_ENTER
WINDOWMOUSELEAVE = SDL_EVENT_WINDOW_MOUSE_LEAVE
WINDOWFOCUSGAINED = SDL_EVENT_WINDOW_FOCUS_GAINED
WINDOWFOCUSLOST = SDL_EVENT_WINDOW_FOCUS_LOST
WINDOWCLOSEREQUESTED = SDL_EVENT_WINDOW_CLOSE_REQUESTED
WINDOWHITTEST = SDL_EVENT_WINDOW_HIT_TEST
WINDOWICCPROFCHANGED = SDL_EVENT_WINDOW_ICCPROF_CHANGED
WINDOWDISPLAYCHANGED = SDL_EVENT_WINDOW_DISPLAY_CHANGED
WINDOWDISPLAYSCALECHANGED = SDL_EVENT_WINDOW_DISPLAY_SCALE_CHANGED
WINDOWSAFEAREACHANGED = SDL_EVENT_WINDOW_SAFE_AREA_CHANGED
WINDOWOCCLUDED = SDL_EVENT_WINDOW_OCCLUDED
WINDOWENTERFULLSCREEN = SDL_EVENT_WINDOW_ENTER_FULLSCREEN
WINDOWLEAVEFULLSCREEN = SDL_EVENT_WINDOW_LEAVE_FULLSCREEN
WINDOWDESTROYED = SDL_EVENT_WINDOW_DESTROYED
WINDOWHDRSTATECHANGED = SDL_EVENT_WINDOW_HDR_STATE_CHANGED
WINDOWFIRST = SDL_EVENT_WINDOW_FIRST
WINDOWLAST = SDL_EVENT_WINDOW_LAST
KEYDOWN = SDL_EVENT_KEY_DOWN
KEYUP = SDL_EVENT_KEY_UP
TEXTEDITING = SDL_EVENT_TEXT_EDITING
TEXTINPUT = SDL_EVENT_TEXT_INPUT
KEYMAPCHANGED = SDL_EVENT_KEYMAP_CHANGED
KEYBOARDADDED = SDL_EVENT_KEYBOARD_ADDED
KEYBOARDREMOVED = SDL_EVENT_KEYBOARD_REMOVED
TEXTEDITINGCANDIDATES = SDL_EVENT_TEXT_EDITING_CANDIDATES
SCREENKEYBOARDHIDDEN = SDL_EVENT_SCREEN_KEYBOARD_HIDDEN
MOUSEMOTION = SDL_EVENT_MOUSE_MOTION
MOUSEBUTTONDOWN = SDL_EVENT_MOUSE_BUTTON_DOWN
MOUSEBUTTONUP = SDL_EVENT_MOUSE_BUTTON_UP
MOUSEWHEEL = SDL_EVENT_MOUSE_WHEEL
MOUSEADDED = SDL_EVENT_MOUSE_ADDED
MOUSEREMOVED = SDL_EVENT_MOUSE_REMOVED
JOYSTICKAXISMOTION = SDL_EVENT_JOYSTICK_AXIS_MOTION
JOYSTICKBALLMOTION = SDL_EVENT_JOYSTICK_BALL_MOTION
JOYSTICKHATMOTION = SDL_EVENT_JOYSTICK_HAT_MOTION
JOYSTICKBUTTONDOWN = SDL_EVENT_JOYSTICK_BUTTON_DOWN
JOYSTICKBUTTONUP = SDL_EVENT_JOYSTICK_BUTTON_UP
JOYSTICKADDED = SDL_EVENT_JOYSTICK_ADDED
JOYSTICKREMOVED = SDL_EVENT_JOYSTICK_REMOVED
JOYSTICKBATTERYUPDATED = SDL_EVENT_JOYSTICK_BATTERY_UPDATED
JOYSTICKUPDATECOMPLETE = SDL_EVENT_JOYSTICK_UPDATE_COMPLETE
GAMEPADAXISMOTION = SDL_EVENT_GAMEPAD_AXIS_MOTION
GAMEPADBUTTONDOWN = SDL_EVENT_GAMEPAD_BUTTON_DOWN
GAMEPADBUTTONUP = SDL_EVENT_GAMEPAD_BUTTON_UP
GAMEPADADDED = SDL_EVENT_GAMEPAD_ADDED
GAMEPADREMOVED = SDL_EVENT_GAMEPAD_REMOVED
GAMEPADREMAPPED = SDL_EVENT_GAMEPAD_REMAPPED
GAMEPADTOUCHPADDOWN = SDL_EVENT_GAMEPAD_TOUCHPAD_DOWN
GAMEPADTOUCHPADMOTION = SDL_EVENT_GAMEPAD_TOUCHPAD_MOTION
GAMEPADTOUCHPADUP = SDL_EVENT_GAMEPAD_TOUCHPAD_UP
GAMEPADSENSORUPDATE = SDL_EVENT_GAMEPAD_SENSOR_UPDATE
GAMEPADUPDATECOMPLETE = SDL_EVENT_GAMEPAD_UPDATE_COMPLETE
GAMEPADSTEAMHANDLEUPDATED = SDL_EVENT_GAMEPAD_STEAM_HANDLE_UPDATED
FINGERDOWN = SDL_EVENT_FINGER_DOWN
FINGERUP = SDL_EVENT_FINGER_UP
FINGERMOTION = SDL_EVENT_FINGER_MOTION
FINGERCANCELED = SDL_EVENT_FINGER_CANCELED
PINCHBEGIN = SDL_EVENT_PINCH_BEGIN
PINCHUPDATE = SDL_EVENT_PINCH_UPDATE
PINCHEND = SDL_EVENT_PINCH_END
CLIPBOARDUPDATE = SDL_EVENT_CLIPBOARD_UPDATE
DROPFILE = SDL_EVENT_DROP_FILE
DROPTEXT = SDL_EVENT_DROP_TEXT
DROPBEGIN = SDL_EVENT_DROP_BEGIN
DROPCOMPLETE = SDL_EVENT_DROP_COMPLETE
DROPPOSITION = SDL_EVENT_DROP_POSITION
AUDIODEVICEADDED = SDL_EVENT_AUDIO_DEVICE_ADDED
AUDIODEVICEREMOVED = SDL_EVENT_AUDIO_DEVICE_REMOVED
AUDIODEVICEFORMATCHANGED = SDL_EVENT_AUDIO_DEVICE_FORMAT_CHANGED
SENSORUPDATE = SDL_EVENT_SENSOR_UPDATE
PENPROXIMITYIN = SDL_EVENT_PEN_PROXIMITY_IN
PENPROXIMITYOUT = SDL_EVENT_PEN_PROXIMITY_OUT
PENDOWN = SDL_EVENT_PEN_DOWN
PENUP = SDL_EVENT_PEN_UP
PENBUTTONDOWN = SDL_EVENT_PEN_BUTTON_DOWN
PENBUTTONUP = SDL_EVENT_PEN_BUTTON_UP
PENMOTION = SDL_EVENT_PEN_MOTION
PENAXIS = SDL_EVENT_PEN_AXIS
CAMERADEVICEADDED = SDL_EVENT_CAMERA_DEVICE_ADDED
CAMERADEVICEREMOVED = SDL_EVENT_CAMERA_DEVICE_REMOVED
CAMERADEVICEAPPROVED = SDL_EVENT_CAMERA_DEVICE_APPROVED
CAMERADEVICEDENIED = SDL_EVENT_CAMERA_DEVICE_DENIED
RENDERTARGETSRESET = SDL_EVENT_RENDER_TARGETS_RESET
RENDERDEVICERESET = SDL_EVENT_RENDER_DEVICE_RESET
RENDERDEVICELOST = SDL_EVENT_RENDER_DEVICE_LOST
USEREVENT = SDL_EVENT_USER


# Compatibility event names.

JOYAXISMOTION = SDL_EVENT_JOYSTICK_AXIS_MOTION
JOYBALLMOTION = SDL_EVENT_JOYSTICK_BALL_MOTION
JOYHATMOTION = SDL_EVENT_JOYSTICK_HAT_MOTION
JOYBUTTONDOWN = SDL_EVENT_JOYSTICK_BUTTON_DOWN
JOYBUTTONUP = SDL_EVENT_JOYSTICK_BUTTON_UP
JOYDEVICEADDED = SDL_EVENT_JOYSTICK_ADDED
JOYDEVICEREMOVED = SDL_EVENT_JOYSTICK_REMOVED

CONTROLLERAXISMOTION = SDL_EVENT_GAMEPAD_AXIS_MOTION
CONTROLLERBUTTONDOWN = SDL_EVENT_GAMEPAD_BUTTON_DOWN
CONTROLLERBUTTONUP = SDL_EVENT_GAMEPAD_BUTTON_UP
CONTROLLERDEVICEADDED = SDL_EVENT_GAMEPAD_ADDED
CONTROLLERDEVICEREMOVED = SDL_EVENT_GAMEPAD_REMOVED
CONTROLLERDEVICEREMAPPED = SDL_EVENT_GAMEPAD_REMAPPED


# Fully obsolete event names.

DISPLAYEVENT = SDL_EVENT_LAST
WINDOWEVENT = SDL_EVENT_LAST
SYSWMEVENT = SDL_EVENT_LAST
DOLLARGESTURE = SDL_EVENT_LAST
DOLLARRECORD = SDL_EVENT_LAST
MULTIGESTURE = SDL_EVENT_LAST


# OpenGL attributes.

GL_RED_SIZE = SDL_GL_RED_SIZE
GL_GREEN_SIZE = SDL_GL_GREEN_SIZE
GL_BLUE_SIZE = SDL_GL_BLUE_SIZE
GL_ALPHA_SIZE = SDL_GL_ALPHA_SIZE
GL_BUFFER_SIZE = SDL_GL_BUFFER_SIZE
GL_DOUBLEBUFFER = SDL_GL_DOUBLEBUFFER
GL_DEPTH_SIZE = SDL_GL_DEPTH_SIZE
GL_STENCIL_SIZE = SDL_GL_STENCIL_SIZE
GL_ACCUM_RED_SIZE = SDL_GL_ACCUM_RED_SIZE
GL_ACCUM_GREEN_SIZE = SDL_GL_ACCUM_GREEN_SIZE
GL_ACCUM_BLUE_SIZE = SDL_GL_ACCUM_BLUE_SIZE
GL_ACCUM_ALPHA_SIZE = SDL_GL_ACCUM_ALPHA_SIZE
GL_STEREO = SDL_GL_STEREO
GL_MULTISAMPLEBUFFERS = SDL_GL_MULTISAMPLEBUFFERS
GL_MULTISAMPLESAMPLES = SDL_GL_MULTISAMPLESAMPLES
GL_ACCELERATED_VISUAL = SDL_GL_ACCELERATED_VISUAL
GL_RETAINED_BACKING = SDL_GL_RETAINED_BACKING
GL_CONTEXT_MAJOR_VERSION = SDL_GL_CONTEXT_MAJOR_VERSION
GL_CONTEXT_MINOR_VERSION = SDL_GL_CONTEXT_MINOR_VERSION
GL_CONTEXT_FLAGS = SDL_GL_CONTEXT_FLAGS
GL_CONTEXT_PROFILE_MASK = SDL_GL_CONTEXT_PROFILE_MASK
GL_SHARE_WITH_CURRENT_CONTEXT = SDL_GL_SHARE_WITH_CURRENT_CONTEXT
GL_FRAMEBUFFER_SRGB_CAPABLE = SDL_GL_FRAMEBUFFER_SRGB_CAPABLE
GL_CONTEXT_RELEASE_BEHAVIOR = SDL_GL_CONTEXT_RELEASE_BEHAVIOR
GL_CONTEXT_RESET_NOTIFICATION = SDL_GL_CONTEXT_RESET_NOTIFICATION
GL_CONTEXT_NO_ERROR = SDL_GL_CONTEXT_NO_ERROR
GL_FLOATBUFFERS = SDL_GL_FLOATBUFFERS
GL_EGL_PLATFORM = SDL_GL_EGL_PLATFORM

# Pseudo-attributes, handled in display.pyx.

GL_SWAP_CONTROL = -1

# Values for GL_CONTEXT_PROFILE_MASK.

GL_CONTEXT_PROFILE_CORE = SDL_GL_CONTEXT_PROFILE_CORE
GL_CONTEXT_PROFILE_COMPATIBILITY = SDL_GL_CONTEXT_PROFILE_COMPATIBILITY
GL_CONTEXT_PROFILE_ES = SDL_GL_CONTEXT_PROFILE_ES


# Surface flags. (Not used for much.)

RLEACCEL = 0
SRCCOLORKEY = 0
SRCALPHA  = 0x80000000
HWSURFACE = 0
SWSURFACE = 0


# Window flags.

WINDOW_FULLSCREEN = SDL_WINDOW_FULLSCREEN
WINDOW_OPENGL = SDL_WINDOW_OPENGL
WINDOW_OCCLUDED = SDL_WINDOW_OCCLUDED
WINDOW_HIDDEN = SDL_WINDOW_HIDDEN
WINDOW_BORDERLESS = SDL_WINDOW_BORDERLESS
WINDOW_RESIZABLE = SDL_WINDOW_RESIZABLE
WINDOW_MINIMIZED = SDL_WINDOW_MINIMIZED
WINDOW_MAXIMIZED = SDL_WINDOW_MAXIMIZED
WINDOW_MOUSE_GRABBED = SDL_WINDOW_MOUSE_GRABBED
WINDOW_INPUT_FOCUS = SDL_WINDOW_INPUT_FOCUS
WINDOW_MOUSE_FOCUS = SDL_WINDOW_MOUSE_FOCUS
WINDOW_EXTERNAL = SDL_WINDOW_EXTERNAL
WINDOW_MODAL = SDL_WINDOW_MODAL
WINDOW_HIGH_PIXEL_DENSITY = SDL_WINDOW_HIGH_PIXEL_DENSITY
WINDOW_MOUSE_CAPTURE = SDL_WINDOW_MOUSE_CAPTURE
WINDOW_MOUSE_RELATIVE_MODE = SDL_WINDOW_MOUSE_RELATIVE_MODE
WINDOW_ALWAYS_ON_TOP = SDL_WINDOW_ALWAYS_ON_TOP
WINDOW_UTILITY = SDL_WINDOW_UTILITY
WINDOW_TOOLTIP = SDL_WINDOW_TOOLTIP
WINDOW_POPUP_MENU = SDL_WINDOW_POPUP_MENU
WINDOW_KEYBOARD_GRABBED = SDL_WINDOW_KEYBOARD_GRABBED
WINDOW_FILL_DOCUMENT = SDL_WINDOW_FILL_DOCUMENT
WINDOW_VULKAN = SDL_WINDOW_VULKAN
WINDOW_METAL = SDL_WINDOW_METAL
WINDOW_TRANSPARENT = SDL_WINDOW_TRANSPARENT
WINDOW_NOT_FOCUSABLE = SDL_WINDOW_NOT_FOCUSABLE


# Window compat flags.

WINDOW_FULLSCREEN_DESKTOP = SDL_WINDOW_FULLSCREEN
FULLSCREEN = SDL_WINDOW_FULLSCREEN
OPENGL = SDL_WINDOW_OPENGL
NOFRAME = SDL_WINDOW_BORDERLESS
RESIZABLE = SDL_WINDOW_RESIZABLE
DOUBLEBUF = 0


# Window positions.

WINDOWPOS_UNDEFINED = SDL_WINDOWPOS_UNDEFINED
WINDOWPOS_CENTERED = SDL_WINDOWPOS_CENTERED


# Scrap types.
SCRAP_TEXT = "text/plain"


# Endianness.

BYTEORDER = SDL_LIL_ENDIAN
LIL_ENDIAN = SDL_LIL_ENDIAN
BIG_ENDIAN = SDL_BIG_ENDIAN


# Version.

SDL_VERSION_TUPLE = (SDL_MAJOR_VERSION, SDL_MINOR_VERSION)


# Touch mouse id.

TOUCH_MOUSEID = -1


# Power states.

POWERSTATE_UNKNOWN = SDL_POWERSTATE_UNKNOWN
POWERSTATE_ON_BATTERY = SDL_POWERSTATE_ON_BATTERY
POWERSTATE_NO_BATTERY = SDL_POWERSTATE_NO_BATTERY
POWERSTATE_CHARGING = SDL_POWERSTATE_CHARGING
POWERSTATE_CHARGED = SDL_POWERSTATE_CHARGED


# Keys.

K_UNKNOWN = SDLK_UNKNOWN
K_RETURN = SDLK_RETURN
K_ESCAPE = SDLK_ESCAPE
K_BACKSPACE = SDLK_BACKSPACE
K_TAB = SDLK_TAB
K_SPACE = SDLK_SPACE
K_EXCLAIM = SDLK_EXCLAIM
K_QUOTEDBL = K_DBLAPOSTROPHE = SDLK_DBLAPOSTROPHE
K_HASH = SDLK_HASH
K_DOLLAR = SDLK_DOLLAR
K_PERCENT = SDLK_PERCENT
K_AMPERSAND = SDLK_AMPERSAND
K_QUOTE = K_APOSTROPHE = SDLK_APOSTROPHE
K_LEFTPAREN = SDLK_LEFTPAREN
K_RIGHTPAREN = SDLK_RIGHTPAREN
K_ASTERISK = SDLK_ASTERISK
K_PLUS = SDLK_PLUS
K_COMMA = SDLK_COMMA
K_MINUS = SDLK_MINUS
K_PERIOD = SDLK_PERIOD
K_SLASH = SDLK_SLASH
K_0 = SDLK_0
K_1 = SDLK_1
K_2 = SDLK_2
K_3 = SDLK_3
K_4 = SDLK_4
K_5 = SDLK_5
K_6 = SDLK_6
K_7 = SDLK_7
K_8 = SDLK_8
K_9 = SDLK_9
K_COLON = SDLK_COLON
K_SEMICOLON = SDLK_SEMICOLON
K_LESS = SDLK_LESS
K_EQUALS = SDLK_EQUALS
K_GREATER = SDLK_GREATER
K_QUESTION = SDLK_QUESTION
K_AT = SDLK_AT
K_LEFTBRACKET = SDLK_LEFTBRACKET
K_BACKSLASH = SDLK_BACKSLASH
K_RIGHTBRACKET = SDLK_RIGHTBRACKET
K_CARET = SDLK_CARET
K_UNDERSCORE = SDLK_UNDERSCORE
K_BACKQUOTE = K_GRAVE = SDLK_GRAVE
K_a = K_A = SDLK_A
K_b = K_B = SDLK_B
K_c = K_C = SDLK_C
K_d = K_D = SDLK_D
K_e = K_E = SDLK_E
K_f = K_F = SDLK_F
K_g = K_G = SDLK_G
K_h = K_H = SDLK_H
K_i = K_I = SDLK_I
K_j = K_J = SDLK_J
K_k = K_K = SDLK_K
K_l = K_L = SDLK_L
K_m = K_M = SDLK_M
K_n = K_N = SDLK_N
K_o = K_O = SDLK_O
K_p = K_P = SDLK_P
K_q = K_Q = SDLK_Q
K_r = K_R = SDLK_R
K_s = K_S = SDLK_S
K_t = K_T = SDLK_T
K_u = K_U = SDLK_U
K_v = K_V = SDLK_V
K_w = K_W = SDLK_W
K_x = K_X = SDLK_X
K_y = K_Y = SDLK_Y
K_z = K_Z = SDLK_Z
K_LEFTBRACE = SDLK_LEFTBRACE
K_PIPE = SDLK_PIPE
K_RIGHTBRACE = SDLK_RIGHTBRACE
K_TILDE = SDLK_TILDE
K_DELETE = SDLK_DELETE
K_PLUSMINUS = SDLK_PLUSMINUS
K_CAPSLOCK = SDLK_CAPSLOCK
K_F1 = SDLK_F1
K_F2 = SDLK_F2
K_F3 = SDLK_F3
K_F4 = SDLK_F4
K_F5 = SDLK_F5
K_F6 = SDLK_F6
K_F7 = SDLK_F7
K_F8 = SDLK_F8
K_F9 = SDLK_F9
K_F10 = SDLK_F10
K_F11 = SDLK_F11
K_F12 = SDLK_F12
K_PRINTSCREEN = SDLK_PRINTSCREEN
K_SCROLLLOCK = SDLK_SCROLLLOCK
K_PAUSE = SDLK_PAUSE
K_INSERT = SDLK_INSERT
K_HOME = SDLK_HOME
K_PAGEUP = SDLK_PAGEUP
K_END = SDLK_END
K_PAGEDOWN = SDLK_PAGEDOWN
K_RIGHT = SDLK_RIGHT
K_LEFT = SDLK_LEFT
K_DOWN = SDLK_DOWN
K_UP = SDLK_UP
K_NUMLOCKCLEAR = SDLK_NUMLOCKCLEAR
K_KP_DIVIDE = SDLK_KP_DIVIDE
K_KP_MULTIPLY = SDLK_KP_MULTIPLY
K_KP_MINUS = SDLK_KP_MINUS
K_KP_PLUS = SDLK_KP_PLUS
K_KP_ENTER = SDLK_KP_ENTER
K_KP1 = K_KP_1 = SDLK_KP_1
K_KP2 = K_KP_2 = SDLK_KP_2
K_KP3 = K_KP_3 = SDLK_KP_3
K_KP4 = K_KP_4 = SDLK_KP_4
K_KP5 = K_KP_5 = SDLK_KP_5
K_KP6 = K_KP_6 = SDLK_KP_6
K_KP7 = K_KP_7 = SDLK_KP_7
K_KP8 = K_KP_8 = SDLK_KP_8
K_KP9 = K_KP_9 = SDLK_KP_9
K_KP0 = K_KP_0 = SDLK_KP_0
K_KP_PERIOD = SDLK_KP_PERIOD
K_APPLICATION = SDLK_APPLICATION
K_POWER = SDLK_POWER
K_KP_EQUALS = SDLK_KP_EQUALS
K_F13 = SDLK_F13
K_F14 = SDLK_F14
K_F15 = SDLK_F15
K_F16 = SDLK_F16
K_F17 = SDLK_F17
K_F18 = SDLK_F18
K_F19 = SDLK_F19
K_F20 = SDLK_F20
K_F21 = SDLK_F21
K_F22 = SDLK_F22
K_F23 = SDLK_F23
K_F24 = SDLK_F24
K_EXECUTE = SDLK_EXECUTE
K_HELP = SDLK_HELP
K_MENU = SDLK_MENU
K_SELECT = SDLK_SELECT
K_STOP = SDLK_STOP
K_AGAIN = SDLK_AGAIN
K_UNDO = SDLK_UNDO
K_CUT = SDLK_CUT
K_COPY = SDLK_COPY
K_PASTE = SDLK_PASTE
K_FIND = SDLK_FIND
K_MUTE = SDLK_MUTE
K_VOLUMEUP = SDLK_VOLUMEUP
K_VOLUMEDOWN = SDLK_VOLUMEDOWN
K_KP_COMMA = SDLK_KP_COMMA
K_KP_EQUALSAS400 = SDLK_KP_EQUALSAS400
K_ALTERASE = SDLK_ALTERASE
K_SYSREQ = SDLK_SYSREQ
K_CANCEL = SDLK_CANCEL
K_CLEAR = SDLK_CLEAR
K_PRIOR = SDLK_PRIOR
K_RETURN2 = SDLK_RETURN2
K_SEPARATOR = SDLK_SEPARATOR
K_OUT = SDLK_OUT
K_OPER = SDLK_OPER
K_CLEARAGAIN = SDLK_CLEARAGAIN
K_CRSEL = SDLK_CRSEL
K_EXSEL = SDLK_EXSEL
K_KP_00 = SDLK_KP_00
K_KP_000 = SDLK_KP_000
K_THOUSANDSSEPARATOR = SDLK_THOUSANDSSEPARATOR
K_DECIMALSEPARATOR = SDLK_DECIMALSEPARATOR
K_CURRENCYUNIT = SDLK_CURRENCYUNIT
K_CURRENCYSUBUNIT = SDLK_CURRENCYSUBUNIT
K_KP_LEFTPAREN = SDLK_KP_LEFTPAREN
K_KP_RIGHTPAREN = SDLK_KP_RIGHTPAREN
K_KP_LEFTBRACE = SDLK_KP_LEFTBRACE
K_KP_RIGHTBRACE = SDLK_KP_RIGHTBRACE
K_KP_TAB = SDLK_KP_TAB
K_KP_BACKSPACE = SDLK_KP_BACKSPACE
K_KP_A = SDLK_KP_A
K_KP_B = SDLK_KP_B
K_KP_C = SDLK_KP_C
K_KP_D = SDLK_KP_D
K_KP_E = SDLK_KP_E
K_KP_F = SDLK_KP_F
K_KP_XOR = SDLK_KP_XOR
K_KP_POWER = SDLK_KP_POWER
K_KP_PERCENT = SDLK_KP_PERCENT
K_KP_LESS = SDLK_KP_LESS
K_KP_GREATER = SDLK_KP_GREATER
K_KP_AMPERSAND = SDLK_KP_AMPERSAND
K_KP_DBLAMPERSAND = SDLK_KP_DBLAMPERSAND
K_KP_VERTICALBAR = SDLK_KP_VERTICALBAR
K_KP_DBLVERTICALBAR = SDLK_KP_DBLVERTICALBAR
K_KP_COLON = SDLK_KP_COLON
K_KP_HASH = SDLK_KP_HASH
K_KP_SPACE = SDLK_KP_SPACE
K_KP_AT = SDLK_KP_AT
K_KP_EXCLAM = SDLK_KP_EXCLAM
K_KP_MEMSTORE = SDLK_KP_MEMSTORE
K_KP_MEMRECALL = SDLK_KP_MEMRECALL
K_KP_MEMCLEAR = SDLK_KP_MEMCLEAR
K_KP_MEMADD = SDLK_KP_MEMADD
K_KP_MEMSUBTRACT = SDLK_KP_MEMSUBTRACT
K_KP_MEMMULTIPLY = SDLK_KP_MEMMULTIPLY
K_KP_MEMDIVIDE = SDLK_KP_MEMDIVIDE
K_KP_PLUSMINUS = SDLK_KP_PLUSMINUS
K_KP_CLEAR = SDLK_KP_CLEAR
K_KP_CLEARENTRY = SDLK_KP_CLEARENTRY
K_KP_BINARY = SDLK_KP_BINARY
K_KP_OCTAL = SDLK_KP_OCTAL
K_KP_DECIMAL = SDLK_KP_DECIMAL
K_KP_HEXADECIMAL = SDLK_KP_HEXADECIMAL
K_LCTRL = SDLK_LCTRL
K_LSHIFT = SDLK_LSHIFT
K_LALT = SDLK_LALT
K_LGUI = SDLK_LGUI
K_RCTRL = SDLK_RCTRL
K_RSHIFT = SDLK_RSHIFT
K_RALT = SDLK_RALT
K_RGUI = SDLK_RGUI
K_MODE = SDLK_MODE
K_SLEEP = SDLK_SLEEP
K_WAKE = SDLK_WAKE
K_CHANNEL_INCREMENT = SDLK_CHANNEL_INCREMENT
K_CHANNEL_DECREMENT = SDLK_CHANNEL_DECREMENT
K_MEDIA_PLAY = SDLK_MEDIA_PLAY
K_MEDIA_PAUSE = SDLK_MEDIA_PAUSE
K_MEDIA_RECORD = SDLK_MEDIA_RECORD
K_MEDIA_FAST_FORWARD = SDLK_MEDIA_FAST_FORWARD
K_MEDIA_REWIND = SDLK_MEDIA_REWIND
K_MEDIA_NEXT_TRACK = SDLK_MEDIA_NEXT_TRACK
K_MEDIA_PREVIOUS_TRACK = SDLK_MEDIA_PREVIOUS_TRACK
K_MEDIA_STOP = SDLK_MEDIA_STOP
K_MEDIA_EJECT = SDLK_MEDIA_EJECT
K_MEDIA_PLAY_PAUSE = SDLK_MEDIA_PLAY_PAUSE
K_MEDIA_SELECT = SDLK_MEDIA_SELECT
K_AC_NEW = SDLK_AC_NEW
K_AC_OPEN = SDLK_AC_OPEN
K_AC_CLOSE = SDLK_AC_CLOSE
K_AC_EXIT = SDLK_AC_EXIT
K_AC_SAVE = SDLK_AC_SAVE
K_AC_PRINT = SDLK_AC_PRINT
K_AC_PROPERTIES = SDLK_AC_PROPERTIES
K_AC_SEARCH = SDLK_AC_SEARCH
K_AC_HOME = SDLK_AC_HOME
K_AC_BACK = SDLK_AC_BACK
K_AC_FORWARD = SDLK_AC_FORWARD
K_AC_STOP = SDLK_AC_STOP
K_AC_REFRESH = SDLK_AC_REFRESH
K_AC_BOOKMARKS = SDLK_AC_BOOKMARKS
K_SOFTLEFT = SDLK_SOFTLEFT
K_SOFTRIGHT = SDLK_SOFTRIGHT
K_CALL = SDLK_CALL
K_ENDCALL = SDLK_ENDCALL
K_LEFT_TAB = SDLK_LEFT_TAB
K_LEVEL5_SHIFT = SDLK_LEVEL5_SHIFT
K_MULTI_KEY_COMPOSE = SDLK_MULTI_KEY_COMPOSE
K_LMETA = SDLK_LMETA
K_RMETA = SDLK_RMETA
K_LHYPER = SDLK_LHYPER
K_RHYPER = SDLK_RHYPER

K_BREAK = SDLK_PAUSE,
K_EURO = SDLK_CURRENCYUNIT,

K_NUMLOCK = SDLK_NUMLOCKCLEAR,
K_PRINT = SDLK_PRINTSCREEN,


K_AUDIOMUTE = SDLK_MUTE
K_AUDIONEXT = SDLK_MEDIA_NEXT_TRACK
K_AUDIOPLAY = SDLK_MEDIA_PLAY
K_AUDIOPREV = SDLK_MEDIA_PREVIOUS_TRACK
K_AUDIOREWIND = SDLK_MEDIA_REWIND
K_AUDIOSTOP = SDLK_MEDIA_STOP
K_EJECT = SDLK_MEDIA_EJECT
K_MEDIASELECT = SDLK_MEDIA_SELECT


# Keyboard modifiers.

KMOD_NONE = SDL_KMOD_NONE
KMOD_LSHIFT = SDL_KMOD_LSHIFT
KMOD_RSHIFT = SDL_KMOD_RSHIFT
KMOD_LEVEL5 = SDL_KMOD_LEVEL5
KMOD_LCTRL = SDL_KMOD_LCTRL
KMOD_RCTRL = SDL_KMOD_RCTRL
KMOD_LALT = SDL_KMOD_LALT
KMOD_RALT = SDL_KMOD_RALT
KMOD_LSUPER = KMOD_LMETA = KMOD_LGUI = SDL_KMOD_LGUI
KMOD_RSUPER = KMOD_RMETA = KMOD_RGUI = SDL_KMOD_RGUI
KMOD_NUM = SDL_KMOD_NUM
KMOD_CAPS = SDL_KMOD_CAPS
KMOD_MODE = SDL_KMOD_MODE
KMOD_SCROLL = SDL_KMOD_SCROLL

KMOD_CTRL = KMOD_LCTRL | KMOD_RCTRL
KMOD_SHIFT = KMOD_LSHIFT | KMOD_RSHIFT
KMOD_ALT = KMOD_LALT | KMOD_RALT
KMOD_META = KMOD_LMETA | KMOD_RMETA
KMOD_GUI = KMOD_LGUI | KMOD_RGUI
KMOD_SUPER = KMOD_LSUPER | KMOD_RSUPER


# Text input properties.

SDL_PROP_TEXTINPUT_TYPE_NUMBER = "SDL.textinput.type"
SDL_PROP_TEXTINPUT_CAPITALIZATION_NUMBER = "SDL.textinput.capitalization"
SDL_PROP_TEXTINPUT_AUTOCORRECT_BOOLEAN = "SDL.textinput.autocorrect"
SDL_PROP_TEXTINPUT_MULTILINE_BOOLEAN = "SDL.textinput.multiline"
SDL_PROP_TEXTINPUT_ANDROID_INPUTTYPE_NUMBER = "SDL.textinput.android.inputtype"


# Mouse buttons.

BUTTON_LEFT = SDL_BUTTON_LEFT
BUTTON_MIDDLE = SDL_BUTTON_MIDDLE
BUTTON_RIGHT = SDL_BUTTON_RIGHT
BUTTON_X1 = SDL_BUTTON_X1
BUTTON_X2 = SDL_BUTTON_X2
BUTTON_LMASK = SDL_BUTTON_LMASK
BUTTON_MMASK = SDL_BUTTON_MMASK
BUTTON_RMASK = SDL_BUTTON_RMASK
BUTTON_X1MASK = SDL_BUTTON_X1MASK
BUTTON_X2MASK = SDL_BUTTON_X2MASK


# Gamepad buttons.

CONTROLLER_BUTTON_INVALID = GAMEPAD_BUTTON_INVALID = SDL_GAMEPAD_BUTTON_INVALID
CONTROLLER_BUTTON_SOUTH = GAMEPAD_BUTTON_SOUTH = SDL_GAMEPAD_BUTTON_SOUTH
CONTROLLER_BUTTON_EAST = GAMEPAD_BUTTON_EAST = SDL_GAMEPAD_BUTTON_EAST
CONTROLLER_BUTTON_WEST = GAMEPAD_BUTTON_WEST = SDL_GAMEPAD_BUTTON_WEST
CONTROLLER_BUTTON_NORTH = GAMEPAD_BUTTON_NORTH = SDL_GAMEPAD_BUTTON_NORTH
CONTROLLER_BUTTON_BACK = GAMEPAD_BUTTON_BACK = SDL_GAMEPAD_BUTTON_BACK
CONTROLLER_BUTTON_GUIDE = GAMEPAD_BUTTON_GUIDE = SDL_GAMEPAD_BUTTON_GUIDE
CONTROLLER_BUTTON_START = GAMEPAD_BUTTON_START = SDL_GAMEPAD_BUTTON_START
CONTROLLER_BUTTON_LEFT_STICK = GAMEPAD_BUTTON_LEFT_STICK = SDL_GAMEPAD_BUTTON_LEFT_STICK
CONTROLLER_BUTTON_RIGHT_STICK = GAMEPAD_BUTTON_RIGHT_STICK = SDL_GAMEPAD_BUTTON_RIGHT_STICK
CONTROLLER_BUTTON_LEFT_SHOULDER = GAMEPAD_BUTTON_LEFT_SHOULDER = SDL_GAMEPAD_BUTTON_LEFT_SHOULDER
CONTROLLER_BUTTON_RIGHT_SHOULDER = GAMEPAD_BUTTON_RIGHT_SHOULDER = SDL_GAMEPAD_BUTTON_RIGHT_SHOULDER
CONTROLLER_BUTTON_DPAD_UP = GAMEPAD_BUTTON_DPAD_UP = SDL_GAMEPAD_BUTTON_DPAD_UP
CONTROLLER_BUTTON_DPAD_DOWN = GAMEPAD_BUTTON_DPAD_DOWN = SDL_GAMEPAD_BUTTON_DPAD_DOWN
CONTROLLER_BUTTON_DPAD_LEFT = GAMEPAD_BUTTON_DPAD_LEFT = SDL_GAMEPAD_BUTTON_DPAD_LEFT
CONTROLLER_BUTTON_DPAD_RIGHT = GAMEPAD_BUTTON_DPAD_RIGHT = SDL_GAMEPAD_BUTTON_DPAD_RIGHT
CONTROLLER_BUTTON_MISC1 = GAMEPAD_BUTTON_MISC1 = SDL_GAMEPAD_BUTTON_MISC1
CONTROLLER_BUTTON_RIGHT_PADDLE1 = GAMEPAD_BUTTON_RIGHT_PADDLE1 = SDL_GAMEPAD_BUTTON_RIGHT_PADDLE1
CONTROLLER_BUTTON_LEFT_PADDLE1 = GAMEPAD_BUTTON_LEFT_PADDLE1 = SDL_GAMEPAD_BUTTON_LEFT_PADDLE1
CONTROLLER_BUTTON_RIGHT_PADDLE2 = GAMEPAD_BUTTON_RIGHT_PADDLE2 = SDL_GAMEPAD_BUTTON_RIGHT_PADDLE2
CONTROLLER_BUTTON_LEFT_PADDLE2 = GAMEPAD_BUTTON_LEFT_PADDLE2 = SDL_GAMEPAD_BUTTON_LEFT_PADDLE2
CONTROLLER_BUTTON_TOUCHPAD = GAMEPAD_BUTTON_TOUCHPAD = SDL_GAMEPAD_BUTTON_TOUCHPAD
CONTROLLER_BUTTON_MISC2 = GAMEPAD_BUTTON_MISC2 = SDL_GAMEPAD_BUTTON_MISC2
CONTROLLER_BUTTON_MISC3 = GAMEPAD_BUTTON_MISC3 = SDL_GAMEPAD_BUTTON_MISC3
CONTROLLER_BUTTON_MISC4 = GAMEPAD_BUTTON_MISC4 = SDL_GAMEPAD_BUTTON_MISC4
CONTROLLER_BUTTON_MISC5 = GAMEPAD_BUTTON_MISC5 = SDL_GAMEPAD_BUTTON_MISC5
CONTROLLER_BUTTON_MISC6 = GAMEPAD_BUTTON_MISC6 = SDL_GAMEPAD_BUTTON_MISC6
CONTROLLER_BUTTON_COUNT = GAMEPAD_BUTTON_COUNT = SDL_GAMEPAD_BUTTON_COUNT

CONTROLLER_BUTTON_A = GAMEPAD_BUTTON_A = SDL_GAMEPAD_BUTTON_SOUTH
CONTROLLER_BUTTON_B = GAMEPAD_BUTTON_B = SDL_GAMEPAD_BUTTON_EAST
CONTROLLER_BUTTON_X = GAMEPAD_BUTTON_X = SDL_GAMEPAD_BUTTON_WEST
CONTROLLER_BUTTON_Y = GAMEPAD_BUTTON_Y = SDL_GAMEPAD_BUTTON_NORTH


# Gamepad axes

CONTROLLER_AXIS_INVALID = GAMEPAD_AXIS_INVALID = SDL_GAMEPAD_AXIS_INVALID
CONTROLLER_AXIS_LEFTX = GAMEPAD_AXIS_LEFTX = SDL_GAMEPAD_AXIS_LEFTX
CONTROLLER_AXIS_LEFTY = GAMEPAD_AXIS_LEFTY = SDL_GAMEPAD_AXIS_LEFTY
CONTROLLER_AXIS_RIGHTX = GAMEPAD_AXIS_RIGHTX = SDL_GAMEPAD_AXIS_RIGHTX
CONTROLLER_AXIS_RIGHTY = GAMEPAD_AXIS_RIGHTY = SDL_GAMEPAD_AXIS_RIGHTY
CONTROLLER_AXIS_LEFT_TRIGGER = GAMEPAD_AXIS_LEFT_TRIGGER = SDL_GAMEPAD_AXIS_LEFT_TRIGGER
CONTROLLER_AXIS_RIGHT_TRIGGER = GAMEPAD_AXIS_RIGHT_TRIGGER = SDL_GAMEPAD_AXIS_RIGHT_TRIGGER
CONTROLLER_AXIS_COUNT = GAMEPAD_AXIS_COUNT = SDL_GAMEPAD_AXIS_COUNT

CONTROLLER_AXIS_TRIGGERLEFT = SDL_GAMEPAD_AXIS_LEFT_TRIGGER
CONTROLLER_AXIS_TRIGGERRIGHT = SDL_GAMEPAD_AXIS_RIGHT_TRIGGER
