sdl

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 1, 2017 License: BSD-3-Clause Imports: 8 Imported by: 1,586

Documentation

Index

Constants

View Source
const (
	AUDIO_MASK_BITSIZE  = C.SDL_AUDIO_MASK_BITSIZE
	AUDIO_MASK_DATATYPE = C.SDL_AUDIO_MASK_DATATYPE
	AUDIO_MASK_ENDIAN   = C.SDL_AUDIO_MASK_ENDIAN
	AUDIO_MASK_SIGNED   = C.SDL_AUDIO_MASK_SIGNED
)
View Source
const (
	AUDIO_U8     = C.AUDIO_U8
	AUDIO_S8     = C.AUDIO_S8
	AUDIO_U16LSB = C.AUDIO_U16LSB
	AUDIO_S16LSB = C.AUDIO_S16LSB
	AUDIO_U16MSB = C.AUDIO_U16MSB
	AUDIO_S16MSB = C.AUDIO_S16MSB
	AUDIO_U16    = C.AUDIO_U16
	AUDIO_S16    = C.AUDIO_S16
	AUDIO_S32LSB = C.AUDIO_S32LSB
	AUDIO_S32MSB = C.AUDIO_S32MSB
	AUDIO_S32    = C.AUDIO_S32
	AUDIO_F32LSB = C.AUDIO_F32LSB
	AUDIO_F32MSB = C.AUDIO_F32MSB
	AUDIO_F32    = C.AUDIO_F32
	AUDIO_U16SYS = C.AUDIO_U16SYS
	AUDIO_S16SYS = C.AUDIO_S16SYS
	AUDIO_S32SYS = C.AUDIO_S32SYS
	AUDIO_F32SYS = C.AUDIO_F32SYS
)
View Source
const (
	AUDIO_ALLOW_FREQUENCY_CHANGE = C.SDL_AUDIO_ALLOW_FREQUENCY_CHANGE
	AUDIO_ALLOW_FORMAT_CHANGE    = C.SDL_AUDIO_ALLOW_FORMAT_CHANGE
	AUDIO_ALLOW_CHANNELS_CHANGE  = C.SDL_AUDIO_ALLOW_CHANNELS_CHANGE
	AUDIO_ALLOW_ANY_CHANGE       = C.SDL_AUDIO_ALLOW_ANY_CHANGE
)
View Source
const (
	AUDIO_STOPPED AudioStatus = C.SDL_AUDIO_STOPPED
	AUDIO_PLAYING             = C.SDL_AUDIO_PLAYING
	AUDIO_PAUSED              = C.SDL_AUDIO_PAUSED
)
View Source
const (
	BLENDMODE_NONE  = C.SDL_BLENDMODE_NONE
	BLENDMODE_BLEND = C.SDL_BLENDMODE_BLEND
	BLENDMODE_ADD   = C.SDL_BLENDMODE_ADD
	BLENDMODE_MOD   = C.SDL_BLENDMODE_MOD
)
View Source
const (
	LIL_ENDIAN = C.SDL_LIL_ENDIAN
	BIG_ENDIAN = C.SDL_BIG_ENDIAN
)
View Source
const (
	ENOMEM      ErrorCode = C.SDL_ENOMEM
	EFREAD                = C.SDL_EFREAD
	EFWRITE               = C.SDL_EFWRITE
	EFSEEK                = C.SDL_EFSEEK
	UNSUPPORTED           = C.SDL_UNSUPPORTED
	LASTERROR             = C.SDL_LASTERROR
)
View Source
const (
	FIRSTEVENT              = C.SDL_FIRSTEVENT
	QUIT                    = C.SDL_QUIT
	APP_TERMINATING         = C.SDL_APP_TERMINATING
	APP_LOWMEMORY           = C.SDL_APP_LOWMEMORY
	APP_WILLENTERBACKGROUND = C.SDL_APP_WILLENTERBACKGROUND
	APP_DIDENTERBACKGROUND  = C.SDL_APP_DIDENTERBACKGROUND
	APP_WILLENTERFOREGROUND = C.SDL_APP_WILLENTERFOREGROUND
	APP_DIDENTERFOREGROUND  = C.SDL_APP_DIDENTERFOREGROUND

	/* Window events */
	WINDOWEVENT = C.SDL_WINDOWEVENT
	SYSWMEVENT  = C.SDL_SYSWMEVENT

	/* Keyboard events */
	KEYDOWN     = C.SDL_KEYDOWN
	KEYUP       = C.SDL_KEYUP
	TEXTEDITING = C.SDL_TEXTEDITING
	TEXTINPUT   = C.SDL_TEXTINPUT

	/* Mouse events */
	MOUSEMOTION     = C.SDL_MOUSEMOTION
	MOUSEBUTTONDOWN = C.SDL_MOUSEBUTTONDOWN
	MOUSEBUTTONUP   = C.SDL_MOUSEBUTTONUP
	MOUSEWHEEL      = C.SDL_MOUSEWHEEL

	/* Joystick events */
	JOYAXISMOTION    = C.SDL_JOYAXISMOTION
	JOYBALLMOTION    = C.SDL_JOYBALLMOTION
	JOYHATMOTION     = C.SDL_JOYHATMOTION
	JOYBUTTONDOWN    = C.SDL_JOYBUTTONDOWN
	JOYBUTTONUP      = C.SDL_JOYBUTTONUP
	JOYDEVICEADDED   = C.SDL_JOYDEVICEADDED
	JOYDEVICEREMOVED = C.SDL_JOYDEVICEREMOVED

	/* Game controller events */
	CONTROLLERAXISMOTION     = C.SDL_CONTROLLERAXISMOTION
	CONTROLLERBUTTONDOWN     = C.SDL_CONTROLLERBUTTONDOWN
	CONTROLLERBUTTONUP       = C.SDL_CONTROLLERBUTTONUP
	CONTROLLERDEVICEADDED    = C.SDL_CONTROLLERDEVICEADDED
	CONTROLLERDEVICEREMOVED  = C.SDL_CONTROLLERDEVICEREMOVED
	CONTROLLERDEVICEREMAPPED = C.SDL_CONTROLLERDEVICEREMAPPED

	/* Touch events */
	FINGERDOWN   = C.SDL_FINGERDOWN
	FINGERUP     = C.SDL_FINGERUP
	FINGERMOTION = C.SDL_FINGERMOTION

	/* Gesture events */
	DOLLARGESTURE = C.SDL_DOLLARGESTURE
	DOLLARRECORD  = C.SDL_DOLLARRECORD
	MULTIGESTURE  = C.SDL_MULTIGESTURE

	/* Clipboard events */
	CLIPBOARDUPDATE = C.SDL_CLIPBOARDUPDATE

	/* Drag and drop events */
	DROPFILE = C.SDL_DROPFILE

	/* Render events */
	RENDER_TARGETS_RESET = C.SDL_RENDER_TARGETS_RESET

	USEREVENT = C.SDL_USEREVENT
	LASTEVENT = C.SDL_LASTEVENT
)
View Source
const (
	ADDEVENT  = C.SDL_ADDEVENT
	PEEKEVENT = C.SDL_PEEKEVENT
	GETEVENT  = C.SDL_GETEVENT
)
View Source
const (
	QUERY   = C.SDL_QUERY
	IGNORE  = C.SDL_IGNORE
	DISABLE = C.SDL_DISABLE
	ENABLE  = C.SDL_ENABLE
)
View Source
const (
	CONTROLLER_BINDTYPE_NONE   = C.SDL_CONTROLLER_BINDTYPE_NONE
	CONTROLLER_BINDTYPE_BUTTON = C.SDL_CONTROLLER_BINDTYPE_BUTTON
	CONTROLLER_BINDTYPE_AXIS   = C.SDL_CONTROLLER_BINDTYPE_AXIS
	CONTROLLER_BINDTYPE_HAT    = C.SDL_CONTROLLER_BINDTYPE_HAT
)
View Source
const (
	CONTROLLER_AXIS_INVALID      = C.SDL_CONTROLLER_AXIS_INVALID
	CONTROLLER_AXIS_LEFTX        = C.SDL_CONTROLLER_AXIS_LEFTX
	CONTROLLER_AXIS_LEFTY        = C.SDL_CONTROLLER_AXIS_LEFTY
	CONTROLLER_AXIS_RIGHTX       = C.SDL_CONTROLLER_AXIS_RIGHTX
	CONTROLLER_AXIS_RIGHTY       = C.SDL_CONTROLLER_AXIS_RIGHTY
	CONTROLLER_AXIS_TRIGGERLEFT  = C.SDL_CONTROLLER_AXIS_TRIGGERLEFT
	CONTROLLER_AXIS_TRIGGERRIGHT = C.SDL_CONTROLLER_AXIS_TRIGGERRIGHT
	CONTROLLER_AXIS_MAX          = C.SDL_CONTROLLER_AXIS_MAX
)
View Source
const (
	CONTROLLER_BUTTON_INVALID       = C.SDL_CONTROLLER_BUTTON_INVALID
	CONTROLLER_BUTTON_A             = C.SDL_CONTROLLER_BUTTON_A
	CONTROLLER_BUTTON_B             = C.SDL_CONTROLLER_BUTTON_B
	CONTROLLER_BUTTON_X             = C.SDL_CONTROLLER_BUTTON_X
	CONTROLLER_BUTTON_Y             = C.SDL_CONTROLLER_BUTTON_Y
	CONTROLLER_BUTTON_BACK          = C.SDL_CONTROLLER_BUTTON_BACK
	CONTROLLER_BUTTON_GUIDE         = C.SDL_CONTROLLER_BUTTON_GUIDE
	CONTROLLER_BUTTON_START         = C.SDL_CONTROLLER_BUTTON_START
	CONTROLLER_BUTTON_LEFTSTICK     = C.SDL_CONTROLLER_BUTTON_LEFTSTICK
	CONTROLLER_BUTTON_RIGHTSTICK    = C.SDL_CONTROLLER_BUTTON_RIGHTSTICK
	CONTROLLER_BUTTON_LEFTSHOULDER  = C.SDL_CONTROLLER_BUTTON_LEFTSHOULDER
	CONTROLLER_BUTTON_RIGHTSHOULDER = C.SDL_CONTROLLER_BUTTON_RIGHTSHOULDER
	CONTROLLER_BUTTON_DPAD_UP       = C.SDL_CONTROLLER_BUTTON_DPAD_UP
	CONTROLLER_BUTTON_DPAD_DOWN     = C.SDL_CONTROLLER_BUTTON_DPAD_DOWN
	CONTROLLER_BUTTON_DPAD_LEFT     = C.SDL_CONTROLLER_BUTTON_DPAD_LEFT
	CONTROLLER_BUTTON_DPAD_RIGHT    = C.SDL_CONTROLLER_BUTTON_DPAD_RIGHT
	CONTROLLER_BUTTON_MAX           = C.SDL_CONTROLLER_BUTTON_MAX
)
View Source
const (
	HAPTIC_CONSTANT  = C.SDL_HAPTIC_CONSTANT
	HAPTIC_SINE      = C.SDL_HAPTIC_SINE
	HAPTIC_LEFTRIGHT = C.SDL_HAPTIC_LEFTRIGHT
	//HAPTIC_SQUARE = C.SDL_HAPTIC_SQUARE (back in SDL 2.1)
	HAPTIC_TRIANGLE     = C.SDL_HAPTIC_TRIANGLE
	HAPTIC_SAWTOOTHUP   = C.SDL_HAPTIC_SAWTOOTHUP
	HAPTIC_SAWTOOTHDOWN = C.SDL_HAPTIC_SAWTOOTHDOWN
	HAPTIC_RAMP         = C.SDL_HAPTIC_RAMP
	HAPTIC_SPRING       = C.SDL_HAPTIC_SPRING
	HAPTIC_DAMPER       = C.SDL_HAPTIC_DAMPER
	HAPTIC_INERTIA      = C.SDL_HAPTIC_INERTIA
	HAPTIC_FRICTION     = C.SDL_HAPTIC_FRICTION
	HAPTIC_CUSTOM       = C.SDL_HAPTIC_CUSTOM
	HAPTIC_GAIN         = C.SDL_HAPTIC_GAIN
	HAPTIC_AUTOCENTER   = C.SDL_HAPTIC_AUTOCENTER
	HAPTIC_STATUS       = C.SDL_HAPTIC_STATUS
	HAPTIC_PAUSE        = C.SDL_HAPTIC_PAUSE
)
View Source
const (
	HAPTIC_POLAR     = C.SDL_HAPTIC_POLAR
	HAPTIC_CARTESIAN = C.SDL_HAPTIC_CARTESIAN
	HAPTIC_SPHERICAL = C.SDL_HAPTIC_SPHERICAL
	HAPTIC_INFINITY  = C.SDL_HAPTIC_INFINITY
)
View Source
const (
	HINT_FRAMEBUFFER_ACCELERATION                 = C.SDL_HINT_FRAMEBUFFER_ACCELERATION
	HINT_RENDER_DRIVER                            = C.SDL_HINT_RENDER_DRIVER
	HINT_RENDER_OPENGL_SHADERS                    = C.SDL_HINT_RENDER_OPENGL_SHADERS
	HINT_RENDER_DIRECT3D_THREADSAFE               = C.SDL_HINT_RENDER_DIRECT3D_THREADSAFE
	HINT_RENDER_DIRECT3D11_DEBUG                  = C.SDL_HINT_RENDER_DIRECT3D11_DEBUG
	HINT_RENDER_SCALE_QUALITY                     = C.SDL_HINT_RENDER_SCALE_QUALITY
	HINT_RENDER_VSYNC                             = C.SDL_HINT_RENDER_VSYNC
	HINT_VIDEO_ALLOW_SCREENSAVER                  = C.SDL_HINT_VIDEO_ALLOW_SCREENSAVER
	HINT_VIDEO_X11_NET_WM_PING                    = C.SDL_HINT_VIDEO_X11_NET_WM_PING
	HINT_VIDEO_X11_XVIDMODE                       = C.SDL_HINT_VIDEO_X11_XVIDMODE
	HINT_VIDEO_X11_XINERAMA                       = C.SDL_HINT_VIDEO_X11_XINERAMA
	HINT_VIDEO_X11_XRANDR                         = C.SDL_HINT_VIDEO_X11_XRANDR
	HINT_GRAB_KEYBOARD                            = C.SDL_HINT_GRAB_KEYBOARD
	HINT_MOUSE_RELATIVE_MODE_WARP                 = C.SDL_HINT_MOUSE_RELATIVE_MODE_WARP
	HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS             = C.SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS
	HINT_IDLE_TIMER_DISABLED                      = C.SDL_HINT_IDLE_TIMER_DISABLED
	HINT_IME_INTERNAL_EDITING                     = C.SDL_HINT_IME_INTERNAL_EDITING
	HINT_ORIENTATIONS                             = C.SDL_HINT_ORIENTATIONS
	HINT_ACCELEROMETER_AS_JOYSTICK                = C.SDL_HINT_ACCELEROMETER_AS_JOYSTICK
	HINT_XINPUT_ENABLED                           = C.SDL_HINT_XINPUT_ENABLED
	HINT_XINPUT_USE_OLD_JOYSTICK_MAPPING          = C.SDL_HINT_XINPUT_USE_OLD_JOYSTICK_MAPPING
	HINT_GAMECONTROLLERCONFIG                     = C.SDL_HINT_GAMECONTROLLERCONFIG
	HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS         = C.SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS
	HINT_ALLOW_TOPMOST                            = C.SDL_HINT_ALLOW_TOPMOST
	HINT_THREAD_STACK_SIZE                        = C.SDL_HINT_THREAD_STACK_SIZE
	HINT_TIMER_RESOLUTION                         = C.SDL_HINT_TIMER_RESOLUTION
	HINT_VIDEO_HIGHDPI_DISABLED                   = C.SDL_HINT_VIDEO_HIGHDPI_DISABLED
	HINT_MAC_BACKGROUND_APP                       = C.SDL_HINT_MAC_BACKGROUND_APP
	HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK       = C.SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK
	HINT_VIDEO_WIN_D3DCOMPILER                    = C.SDL_HINT_VIDEO_WIN_D3DCOMPILER
	HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT          = C.SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT
	HINT_WINRT_PRIVACY_POLICY_URL                 = C.SDL_HINT_WINRT_PRIVACY_POLICY_URL
	HINT_WINRT_PRIVACY_POLICY_LABEL               = C.SDL_HINT_WINRT_PRIVACY_POLICY_LABEL
	HINT_WINRT_HANDLE_BACK_BUTTON                 = C.SDL_HINT_WINRT_HANDLE_BACK_BUTTON
	HINT_VIDEO_MAC_FULLSCREEN_SPACES              = C.SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES
	HINT_NO_SIGNAL_HANDLERS                       = C.SDL_HINT_NO_SIGNAL_HANDLERS
	HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN  = C.SDL_HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN
	HINT_WINDOWS_ENABLE_MESSAGELOOP               = C.SDL_HINT_WINDOWS_ENABLE_MESSAGELOOP
	HINT_WINDOWS_NO_CLOSE_ON_ALT_F4               = C.SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4
	HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH         = C.SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH
	HINT_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION  = C.SDL_HINT_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION
	HINT_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION = C.SDL_HINT_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION
)

Hint Names

View Source
const (
	HINT_DEFAULT  = C.SDL_HINT_DEFAULT
	HINT_NORMAL   = C.SDL_HINT_NORMAL
	HINT_OVERRIDE = C.SDL_HINT_OVERRIDE
)
View Source
const (
	HAT_CENTERED  = C.SDL_HAT_CENTERED
	HAT_UP        = C.SDL_HAT_UP
	HAT_RIGHT     = C.SDL_HAT_RIGHT
	HAT_DOWN      = C.SDL_HAT_DOWN
	HAT_LEFT      = C.SDL_HAT_LEFT
	HAT_RIGHTUP   = C.SDL_HAT_RIGHTUP
	HAT_RIGHTDOWN = C.SDL_HAT_RIGHTDOWN
	HAT_LEFTUP    = C.SDL_HAT_LEFTUP
	HAT_LEFTDOWN  = C.SDL_HAT_LEFTDOWN
)
View Source
const (
	K_UNKNOWN = C.SDLK_UNKNOWN

	K_RETURN     = C.SDLK_RETURN
	K_ESCAPE     = C.SDLK_ESCAPE
	K_BACKSPACE  = C.SDLK_BACKSPACE
	K_TAB        = C.SDLK_TAB
	K_SPACE      = C.SDLK_SPACE
	K_EXCLAIM    = C.SDLK_EXCLAIM
	K_QUOTEDBL   = C.SDLK_QUOTEDBL
	K_HASH       = C.SDLK_HASH
	K_PERCENT    = C.SDLK_PERCENT
	K_DOLLAR     = C.SDLK_DOLLAR
	K_AMPERSAND  = C.SDLK_AMPERSAND
	K_QUOTE      = C.SDLK_QUOTE
	K_LEFTPAREN  = C.SDLK_LEFTPAREN
	K_RIGHTPAREN = C.SDLK_RIGHTPAREN
	K_ASTERISK   = C.SDLK_ASTERISK
	K_PLUS       = C.SDLK_PLUS
	K_COMMA      = C.SDLK_COMMA
	K_MINUS      = C.SDLK_MINUS
	K_PERIOD     = C.SDLK_PERIOD
	K_SLASH      = C.SDLK_SLASH
	K_0          = C.SDLK_0
	K_1          = C.SDLK_1
	K_2          = C.SDLK_2
	K_3          = C.SDLK_3
	K_4          = C.SDLK_4
	K_5          = C.SDLK_5
	K_6          = C.SDLK_6
	K_7          = C.SDLK_7
	K_8          = C.SDLK_8
	K_9          = C.SDLK_9
	K_COLON      = C.SDLK_COLON
	K_SEMICOLON  = C.SDLK_SEMICOLON
	K_LESS       = C.SDLK_LESS
	K_EQUALS     = C.SDLK_EQUALS
	K_GREATER    = C.SDLK_GREATER
	K_QUESTION   = C.SDLK_QUESTION
	K_AT         = C.SDLK_AT
	/*
	   Skip uppercase letters
	*/
	K_LEFTBRACKET  = C.SDLK_LEFTBRACKET
	K_BACKSLASH    = C.SDLK_BACKSLASH
	K_RIGHTBRACKET = C.SDLK_RIGHTBRACKET
	K_CARET        = C.SDLK_CARET
	K_UNDERSCORE   = C.SDLK_UNDERSCORE
	K_BACKQUOTE    = C.SDLK_BACKQUOTE
	K_a            = C.SDLK_a
	K_b            = C.SDLK_b
	K_c            = C.SDLK_c
	K_d            = C.SDLK_d
	K_e            = C.SDLK_e
	K_f            = C.SDLK_f
	K_g            = C.SDLK_g
	K_h            = C.SDLK_h
	K_i            = C.SDLK_i
	K_j            = C.SDLK_j
	K_k            = C.SDLK_k
	K_l            = C.SDLK_l
	K_m            = C.SDLK_m
	K_n            = C.SDLK_n
	K_o            = C.SDLK_o
	K_p            = C.SDLK_p
	K_q            = C.SDLK_q
	K_r            = C.SDLK_r
	K_s            = C.SDLK_s
	K_t            = C.SDLK_t
	K_u            = C.SDLK_u
	K_v            = C.SDLK_v
	K_w            = C.SDLK_w
	K_x            = C.SDLK_x
	K_y            = C.SDLK_y
	K_z            = C.SDLK_z

	K_CAPSLOCK = C.SDLK_CAPSLOCK

	K_F1  = C.SDLK_F1
	K_F2  = C.SDLK_F2
	K_F3  = C.SDLK_F3
	K_F4  = C.SDLK_F4
	K_F5  = C.SDLK_F5
	K_F6  = C.SDLK_F6
	K_F7  = C.SDLK_F7
	K_F8  = C.SDLK_F8
	K_F9  = C.SDLK_F9
	K_F10 = C.SDLK_F10
	K_F11 = C.SDLK_F11
	K_F12 = C.SDLK_F12

	K_PRINTSCREEN = C.SDLK_PRINTSCREEN
	K_SCROLLLOCK  = C.SDLK_SCROLLLOCK
	K_PAUSE       = C.SDLK_PAUSE
	K_INSERT      = C.SDLK_INSERT
	K_HOME        = C.SDLK_HOME
	K_PAGEUP      = C.SDLK_PAGEUP
	K_DELETE      = C.SDLK_DELETE
	K_END         = C.SDLK_END
	K_PAGEDOWN    = C.SDLK_PAGEDOWN
	K_RIGHT       = C.SDLK_RIGHT
	K_LEFT        = C.SDLK_LEFT
	K_DOWN        = C.SDLK_DOWN
	K_UP          = C.SDLK_UP

	K_NUMLOCKCLEAR = C.SDLK_NUMLOCKCLEAR
	K_KP_DIVIDE    = C.SDLK_KP_DIVIDE
	K_KP_MULTIPLY  = C.SDLK_KP_MULTIPLY
	K_KP_MINUS     = C.SDLK_KP_MINUS
	K_KP_PLUS      = C.SDLK_KP_PLUS
	K_KP_ENTER     = C.SDLK_KP_ENTER
	K_KP_1         = C.SDLK_KP_1
	K_KP_2         = C.SDLK_KP_2
	K_KP_3         = C.SDLK_KP_3
	K_KP_4         = C.SDLK_KP_4
	K_KP_5         = C.SDLK_KP_5
	K_KP_6         = C.SDLK_KP_6
	K_KP_7         = C.SDLK_KP_7
	K_KP_8         = C.SDLK_KP_8
	K_KP_9         = C.SDLK_KP_9
	K_KP_0         = C.SDLK_KP_0
	K_KP_PERIOD    = C.SDLK_KP_PERIOD

	K_APPLICATION    = C.SDLK_APPLICATION
	K_POWER          = C.SDLK_POWER
	K_KP_EQUALS      = C.SDLK_KP_EQUALS
	K_F13            = C.SDLK_F13
	K_F14            = C.SDLK_F14
	K_F15            = C.SDLK_F15
	K_F16            = C.SDLK_F16
	K_F17            = C.SDLK_F17
	K_F18            = C.SDLK_F18
	K_F19            = C.SDLK_F19
	K_F20            = C.SDLK_F20
	K_F21            = C.SDLK_F21
	K_F22            = C.SDLK_F22
	K_F23            = C.SDLK_F23
	K_F24            = C.SDLK_F24
	K_EXECUTE        = C.SDLK_EXECUTE
	K_HELP           = C.SDLK_HELP
	K_MENU           = C.SDLK_MENU
	K_SELECT         = C.SDLK_SELECT
	K_STOP           = C.SDLK_STOP
	K_AGAIN          = C.SDLK_AGAIN
	K_UNDO           = C.SDLK_UNDO
	K_CUT            = C.SDLK_CUT
	K_COPY           = C.SDLK_COPY
	K_PASTE          = C.SDLK_PASTE
	K_FIND           = C.SDLK_FIND
	K_MUTE           = C.SDLK_MUTE
	K_VOLUMEUP       = C.SDLK_VOLUMEUP
	K_VOLUMEDOWN     = C.SDLK_VOLUMEDOWN
	K_KP_COMMA       = C.SDLK_KP_COMMA
	K_KP_EQUALSAS400 = C.SDLK_KP_EQUALSAS400

	K_ALTERASE   = C.SDLK_ALTERASE
	K_SYSREQ     = C.SDLK_SYSREQ
	K_CANCEL     = C.SDLK_CANCEL
	K_CLEAR      = C.SDLK_CLEAR
	K_PRIOR      = C.SDLK_PRIOR
	K_RETURN2    = C.SDLK_RETURN2
	K_SEPARATOR  = C.SDLK_SEPARATOR
	K_OUT        = C.SDLK_OUT
	K_OPER       = C.SDLK_OPER
	K_CLEARAGAIN = C.SDLK_CLEARAGAIN
	K_CRSEL      = C.SDLK_CRSEL
	K_EXSEL      = C.SDLK_EXSEL

	K_KP_00              = C.SDLK_KP_00
	K_KP_000             = C.SDLK_KP_000
	K_THOUSANDSSEPARATOR = C.SDLK_THOUSANDSSEPARATOR
	K_DECIMALSEPARATOR   = C.SDLK_DECIMALSEPARATOR
	K_CURRENCYUNIT       = C.SDLK_CURRENCYUNIT
	K_CURRENCYSUBUNIT    = C.SDLK_CURRENCYSUBUNIT
	K_KP_LEFTPAREN       = C.SDLK_KP_LEFTPAREN
	K_KP_RIGHTPAREN      = C.SDLK_KP_RIGHTPAREN
	K_KP_LEFTBRACE       = C.SDLK_KP_LEFTBRACE
	K_KP_RIGHTBRACE      = C.SDLK_KP_RIGHTBRACE
	K_KP_TAB             = C.SDLK_KP_TAB
	K_KP_BACKSPACE       = C.SDLK_KP_BACKSPACE
	K_KP_A               = C.SDLK_KP_A
	K_KP_B               = C.SDLK_KP_B
	K_KP_C               = C.SDLK_KP_C
	K_KP_D               = C.SDLK_KP_D
	K_KP_E               = C.SDLK_KP_E
	K_KP_F               = C.SDLK_KP_F
	K_KP_XOR             = C.SDLK_KP_XOR
	K_KP_POWER           = C.SDLK_KP_POWER
	K_KP_PERCENT         = C.SDLK_KP_PERCENT
	K_KP_LESS            = C.SDLK_KP_LESS
	K_KP_GREATER         = C.SDLK_KP_GREATER
	K_KP_AMPERSAND       = C.SDLK_KP_AMPERSAND
	K_KP_DBLAMPERSAND    = C.SDLK_KP_DBLAMPERSAND
	K_KP_VERTICALBAR     = C.SDLK_KP_VERTICALBAR
	K_KP_DBLVERTICALBAR  = C.SDLK_KP_DBLVERTICALBAR
	K_KP_COLON           = C.SDLK_KP_COLON
	K_KP_HASH            = C.SDLK_KP_HASH
	K_KP_SPACE           = C.SDLK_KP_SPACE
	K_KP_AT              = C.SDLK_KP_AT
	K_KP_EXCLAM          = C.SDLK_KP_EXCLAM
	K_KP_MEMSTORE        = C.SDLK_KP_MEMSTORE
	K_KP_MEMRECALL       = C.SDLK_KP_MEMRECALL
	K_KP_MEMCLEAR        = C.SDLK_KP_MEMCLEAR
	K_KP_MEMADD          = C.SDLK_KP_MEMADD
	K_KP_MEMSUBTRACT     = C.SDLK_KP_MEMSUBTRACT
	K_KP_MEMMULTIPLY     = C.SDLK_KP_MEMMULTIPLY
	K_KP_MEMDIVIDE       = C.SDLK_KP_MEMDIVIDE
	K_KP_PLUSMINUS       = C.SDLK_KP_PLUSMINUS
	K_KP_CLEAR           = C.SDLK_KP_CLEAR
	K_KP_CLEARENTRY      = C.SDLK_KP_CLEARENTRY
	K_KP_BINARY          = C.SDLK_KP_BINARY
	K_KP_OCTAL           = C.SDLK_KP_OCTAL
	K_KP_DECIMAL         = C.SDLK_KP_DECIMAL
	K_KP_HEXADECIMAL     = C.SDLK_KP_HEXADECIMAL

	K_LCTRL  = C.SDLK_LCTRL
	K_LSHIFT = C.SDLK_LSHIFT
	K_LALT   = C.SDLK_LALT
	K_LGUI   = C.SDLK_LGUI
	K_RCTRL  = C.SDLK_RCTRL
	K_RSHIFT = C.SDLK_RSHIFT
	K_RALT   = C.SDLK_RALT
	K_RGUI   = C.SDLK_RGUI

	K_MODE = C.SDLK_MODE

	K_AUDIONEXT    = C.SDLK_AUDIONEXT
	K_AUDIOPREV    = C.SDLK_AUDIOPREV
	K_AUDIOSTOP    = C.SDLK_AUDIOSTOP
	K_AUDIOPLAY    = C.SDLK_AUDIOPLAY
	K_AUDIOMUTE    = C.SDLK_AUDIOMUTE
	K_MEDIASELECT  = C.SDLK_MEDIASELECT
	K_WWW          = C.SDLK_WWW
	K_MAIL         = C.SDLK_MAIL
	K_CALCULATOR   = C.SDLK_CALCULATOR
	K_COMPUTER     = C.SDLK_COMPUTER
	K_AC_SEARCH    = C.SDLK_AC_SEARCH
	K_AC_HOME      = C.SDLK_AC_HOME
	K_AC_BACK      = C.SDLK_AC_BACK
	K_AC_FORWARD   = C.SDLK_AC_FORWARD
	K_AC_STOP      = C.SDLK_AC_STOP
	K_AC_REFRESH   = C.SDLK_AC_REFRESH
	K_AC_BOOKMARKS = C.SDLK_AC_BOOKMARKS

	K_BRIGHTNESSDOWN = C.SDLK_BRIGHTNESSDOWN
	K_BRIGHTNESSUP   = C.SDLK_BRIGHTNESSUP
	K_DISPLAYSWITCH  = C.SDLK_DISPLAYSWITCH
	K_KBDILLUMTOGGLE = C.SDLK_KBDILLUMTOGGLE
	K_KBDILLUMDOWN   = C.SDLK_KBDILLUMDOWN
	K_KBDILLUMUP     = C.SDLK_KBDILLUMUP
	K_EJECT          = C.SDLK_EJECT
	K_SLEEP          = C.SDLK_SLEEP
)
View Source
const (
	KMOD_NONE     = C.KMOD_NONE
	KMOD_LSHIFT   = C.KMOD_LSHIFT
	KMOD_RSHIFT   = C.KMOD_RSHIFT
	KMOD_LCTRL    = C.KMOD_LCTRL
	KMOD_RCTRL    = C.KMOD_RCTRL
	KMOD_LALT     = C.KMOD_LALT
	KMOD_RALT     = C.KMOD_RALT
	KMOD_LGUI     = C.KMOD_LGUI
	KMOD_RGUI     = C.KMOD_RGUI
	KMOD_NUM      = C.KMOD_NUM
	KMOD_CAPS     = C.KMOD_CAPS
	KMOD_MODE     = C.KMOD_MODE
	KMOD_CTRL     = C.KMOD_CTRL
	KMOD_SHIFT    = C.KMOD_SHIFT
	KMOD_ALT      = C.KMOD_ALT
	KMOD_GUI      = C.KMOD_GUI
	KMOD_RESERVED = C.KMOD_RESERVED
)
View Source
const (
	LOG_CATEGORY_APPLICATION = iota
	LOG_CATEGORY_ERROR
	LOG_CATEGORY_ASSERT
	LOG_CATEGORY_SYSTEM
	LOG_CATEGORY_AUDIO
	LOG_CATEGORY_VIDEO
	LOG_CATEGORY_RENDER
	LOG_CATEGORY_INPUT
	LOG_CATEGORY_TEST
	LOG_CATEGORY_RESERVED1
	LOG_CATEGORY_RESERVED2
	LOG_CATEGORY_RESERVED3
	LOG_CATEGORY_RESERVED4
	LOG_CATEGORY_RESERVED5
	LOG_CATEGORY_RESERVED6
	LOG_CATEGORY_RESERVED7
	LOG_CATEGORY_RESERVED8
	LOG_CATEGORY_RESERVED9
	LOG_CATEGORY_RESERVED10
	LOG_CATEGORY_CUSTOM
)
View Source
const (
	LOG_PRIORITY_VERBOSE = iota + 1
	LOG_PRIORITY_DEBUG
	LOG_PRIORITY_INFO
	LOG_PRIORITY_WARN
	LOG_PRIORITY_ERROR
	LOG_PRIORITY_CRITICAL
	NUM_LOG_PRIORITIES
)
View Source
const (
	SYSTEM_CURSOR_ARROW     = C.SDL_SYSTEM_CURSOR_ARROW
	SYSTEM_CURSOR_IBEAM     = C.SDL_SYSTEM_CURSOR_IBEAM
	SYSTEM_CURSOR_WAIT      = C.SDL_SYSTEM_CURSOR_WAIT
	SYSTEM_CURSOR_CROSSHAIR = C.SDL_SYSTEM_CURSOR_CROSSHAIR
	SYSTEM_CURSOR_WAITARROW = C.SDL_SYSTEM_CURSOR_WAITARROW
	SYSTEM_CURSOR_SIZENWSE  = C.SDL_SYSTEM_CURSOR_SIZENWSE
	SYSTEM_CURSOR_SIZENESW  = C.SDL_SYSTEM_CURSOR_SIZENESW
	SYSTEM_CURSOR_SIZEWE    = C.SDL_SYSTEM_CURSOR_SIZEWE
	SYSTEM_CURSOR_SIZENS    = C.SDL_SYSTEM_CURSOR_SIZENS
	SYSTEM_CURSOR_SIZEALL   = C.SDL_SYSTEM_CURSOR_SIZEALL
	SYSTEM_CURSOR_NO        = C.SDL_SYSTEM_CURSOR_NO
	SYSTEM_CURSOR_HAND      = C.SDL_SYSTEM_CURSOR_HAND
	NUM_SYSTEM_CURSORS      = C.SDL_NUM_SYSTEM_CURSORS
)

SystemCursor

View Source
const (
	BUTTON_LEFT   = C.SDL_BUTTON_LEFT
	BUTTON_MIDDLE = C.SDL_BUTTON_MIDDLE
	BUTTON_RIGHT  = C.SDL_BUTTON_RIGHT
	BUTTON_X1     = C.SDL_BUTTON_X1
	BUTTON_X2     = C.SDL_BUTTON_X2
)
View Source
const (
	PIXELTYPE_UNKNOWN  = C.SDL_PIXELTYPE_UNKNOWN
	PIXELTYPE_INDEX1   = C.SDL_PIXELTYPE_INDEX1
	PIXELTYPE_INDEX4   = C.SDL_PIXELTYPE_INDEX4
	PIXELTYPE_INDEX8   = C.SDL_PIXELTYPE_INDEX8
	PIXELTYPE_PACKED8  = C.SDL_PIXELTYPE_PACKED8
	PIXELTYPE_PACKED16 = C.SDL_PIXELTYPE_PACKED16
	PIXELTYPE_PACKED32 = C.SDL_PIXELTYPE_PACKED32
	PIXELTYPE_ARRAYU8  = C.SDL_PIXELTYPE_ARRAYU8
	PIXELTYPE_ARRAYU16 = C.SDL_PIXELTYPE_ARRAYU16
	PIXELTYPE_ARRAYU32 = C.SDL_PIXELTYPE_ARRAYU32
	PIXELTYPE_ARRAYF16 = C.SDL_PIXELTYPE_ARRAYF16
	PIXELTYPE_ARRAYF32 = C.SDL_PIXELTYPE_ARRAYF32
)
View Source
const (
	BITMAPORDER_NONE = C.SDL_BITMAPORDER_NONE
	BITMAPORDER_4321 = C.SDL_BITMAPORDER_4321
	BITMAPORDER_1234 = C.SDL_BITMAPORDER_1234
)

* Bitmap pixel order high bit -> low bit.

View Source
const (
	PACKEDORDER_NONE = C.SDL_PACKEDORDER_NONE
	PACKEDORDER_XRGB = C.SDL_PACKEDORDER_XRGB
	PACKEDORDER_RGBX = C.SDL_PACKEDORDER_RGBX
	PACKEDORDER_ARGB = C.SDL_PACKEDORDER_ARGB
	PACKEDORDER_RGBA = C.SDL_PACKEDORDER_RGBA
	PACKEDORDER_XBGR = C.SDL_PACKEDORDER_XBGR
	PACKEDORDER_BGRX = C.SDL_PACKEDORDER_BGRX
	PACKEDORDER_ABGR = C.SDL_PACKEDORDER_ABGR
	PACKEDORDER_BGRA = C.SDL_PACKEDORDER_BGRA
)

* Packed component order high bit -> low bit.

View Source
const (
	ARRAYORDER_NONE = C.SDL_ARRAYORDER_NONE
	ARRAYORDER_RGB  = C.SDL_ARRAYORDER_RGB
	ARRAYORDER_RGBA = C.SDL_ARRAYORDER_RGBA
	ARRAYORDER_ARGB = C.SDL_ARRAYORDER_ARGB
	ARRAYORDER_BGR  = C.SDL_ARRAYORDER_BGR
	ARRAYORDER_BGRA = C.SDL_ARRAYORDER_BGRA
	ARRAYORDER_ABGR = C.SDL_ARRAYORDER_ABGR
)

* Array component order low byte -> high byte.

View Source
const (
	PACKEDLAYOUT_NONE    = C.SDL_PACKEDLAYOUT_NONE
	PACKEDLAYOUT_332     = C.SDL_PACKEDLAYOUT_332
	PACKEDLAYOUT_4444    = C.SDL_PACKEDLAYOUT_4444
	PACKEDLAYOUT_1555    = C.SDL_PACKEDLAYOUT_1555
	PACKEDLAYOUT_5551    = C.SDL_PACKEDLAYOUT_5551
	PACKEDLAYOUT_565     = C.SDL_PACKEDLAYOUT_565
	PACKEDLAYOUT_8888    = C.SDL_PACKEDLAYOUT_8888
	PACKEDLAYOUT_2101010 = C.SDL_PACKEDLAYOUT_2101010
	PACKEDLAYOUT_1010102 = C.SDL_PACKEDLAYOUT_1010102
)

* Packed component layout.

View Source
const (
	PIXELFORMAT_UNKNOWN     = C.SDL_PIXELFORMAT_UNKNOWN
	PIXELFORMAT_INDEX1LSB   = C.SDL_PIXELFORMAT_INDEX1LSB
	PIXELFORMAT_INDEX1MSB   = C.SDL_PIXELFORMAT_INDEX1MSB
	PIXELFORMAT_INDEX4LSB   = C.SDL_PIXELFORMAT_INDEX4LSB
	PIXELFORMAT_INDEX4MSB   = C.SDL_PIXELFORMAT_INDEX4MSB
	PIXELFORMAT_INDEX8      = C.SDL_PIXELFORMAT_INDEX8
	PIXELFORMAT_RGB332      = C.SDL_PIXELFORMAT_RGB332
	PIXELFORMAT_RGB444      = C.SDL_PIXELFORMAT_RGB444
	PIXELFORMAT_RGB555      = C.SDL_PIXELFORMAT_RGB555
	PIXELFORMAT_BGR555      = C.SDL_PIXELFORMAT_BGR555
	PIXELFORMAT_ARGB4444    = C.SDL_PIXELFORMAT_ARGB4444
	PIXELFORMAT_RGBA4444    = C.SDL_PIXELFORMAT_RGBA4444
	PIXELFORMAT_ABGR4444    = C.SDL_PIXELFORMAT_ABGR4444
	PIXELFORMAT_BGRA4444    = C.SDL_PIXELFORMAT_BGRA4444
	PIXELFORMAT_ARGB1555    = C.SDL_PIXELFORMAT_ARGB1555
	PIXELFORMAT_RGBA5551    = C.SDL_PIXELFORMAT_RGBA5551
	PIXELFORMAT_ABGR1555    = C.SDL_PIXELFORMAT_ABGR1555
	PIXELFORMAT_BGRA5551    = C.SDL_PIXELFORMAT_BGRA5551
	PIXELFORMAT_RGB565      = C.SDL_PIXELFORMAT_RGB565
	PIXELFORMAT_BGR565      = C.SDL_PIXELFORMAT_BGR565
	PIXELFORMAT_RGB24       = C.SDL_PIXELFORMAT_RGB24
	PIXELFORMAT_BGR24       = C.SDL_PIXELFORMAT_BGR24
	PIXELFORMAT_RGB888      = C.SDL_PIXELFORMAT_RGB888
	PIXELFORMAT_RGBX8888    = C.SDL_PIXELFORMAT_RGBX8888
	PIXELFORMAT_BGR888      = C.SDL_PIXELFORMAT_BGR888
	PIXELFORMAT_BGRX8888    = C.SDL_PIXELFORMAT_BGRX8888
	PIXELFORMAT_ARGB8888    = C.SDL_PIXELFORMAT_ARGB8888
	PIXELFORMAT_RGBA8888    = C.SDL_PIXELFORMAT_RGBA8888
	PIXELFORMAT_ABGR8888    = C.SDL_PIXELFORMAT_ABGR8888
	PIXELFORMAT_BGRA8888    = C.SDL_PIXELFORMAT_BGRA8888
	PIXELFORMAT_ARGB2101010 = C.SDL_PIXELFORMAT_ARGB2101010
	PIXELFORMAT_YV12        = C.SDL_PIXELFORMAT_YV12
	PIXELFORMAT_IYUV        = C.SDL_PIXELFORMAT_IYUV
	PIXELFORMAT_YUY2        = C.SDL_PIXELFORMAT_YUY2
	PIXELFORMAT_UYVY        = C.SDL_PIXELFORMAT_UYVY
	PIXELFORMAT_YVYU        = C.SDL_PIXELFORMAT_YVYU
)
View Source
const (
	ALPHA_OPAQUE      = C.SDL_ALPHA_OPAQUE
	ALPHA_TRANSPARENT = C.SDL_ALPHA_TRANSPARENT
)
View Source
const (
	POWERSTATE_UNKNOWN    = C.SDL_POWERSTATE_UNKNOWN
	POWERSTATE_ON_BATTERY = C.SDL_POWERSTATE_ON_BATTERY
	POWERSTATE_NO_BATTERY = C.SDL_POWERSTATE_NO_BATTERY
	POWERSTATE_CHARGING   = C.SDL_POWERSTATE_CHARGING
	POWERSTATE_CHARGED    = C.SDL_POWERSTATE_CHARGED
)
View Source
const (
	RENDERER_SOFTWARE      = C.SDL_RENDERER_SOFTWARE
	RENDERER_ACCELERATED   = C.SDL_RENDERER_ACCELERATED
	RENDERER_PRESENTVSYNC  = C.SDL_RENDERER_PRESENTVSYNC
	RENDERER_TARGETTEXTURE = C.SDL_RENDERER_TARGETTEXTURE

	TEXTUREACCESS_STATIC    = C.SDL_TEXTUREACCESS_STATIC
	TEXTUREACCESS_STREAMING = C.SDL_TEXTUREACCESS_STREAMING
	TEXTUREACCESS_TARGET    = C.SDL_TEXTUREACCESS_TARGET

	TEXTUREMODULATE_NONE  = C.SDL_TEXTUREMODULATE_NONE
	TEXTUREMODULATE_COLOR = C.SDL_TEXTUREMODULATE_COLOR
	TEXTUREMODULATE_ALPHA = C.SDL_TEXTUREMODULATE_ALPHA
)
View Source
const (
	FLIP_NONE       RendererFlip = C.SDL_FLIP_NONE
	FLIP_HORIZONTAL              = C.SDL_FLIP_HORIZONTAL
	FLIP_VERTICAL                = C.SDL_FLIP_VERTICAL
)
View Source
const (
	RWOPS_UNKNOWN   = 0
	RWOPS_WINFILE   = 1
	RWOPS_STDFILE   = 2
	RWOPS_JNIFILE   = 3
	RWOPS_MEMORY    = 4
	RWOPS_MEMORY_RO = 5
)

RWops Types

View Source
const (
	RW_SEEK_SET = C.RW_SEEK_SET
	RW_SEEK_CUR = C.RW_SEEK_CUR
	RW_SEEK_END = C.RW_SEEK_END
)
View Source
const (
	SCANCODE_UNKNOWN = 0

	SCANCODE_A = C.SDL_SCANCODE_A
	SCANCODE_B = C.SDL_SCANCODE_B
	SCANCODE_C = C.SDL_SCANCODE_C
	SCANCODE_D = C.SDL_SCANCODE_D
	SCANCODE_E = C.SDL_SCANCODE_E
	SCANCODE_F = C.SDL_SCANCODE_F
	SCANCODE_G = C.SDL_SCANCODE_G
	SCANCODE_H = C.SDL_SCANCODE_H
	SCANCODE_I = C.SDL_SCANCODE_I
	SCANCODE_J = C.SDL_SCANCODE_J
	SCANCODE_K = C.SDL_SCANCODE_K
	SCANCODE_L = C.SDL_SCANCODE_L
	SCANCODE_M = C.SDL_SCANCODE_M
	SCANCODE_N = C.SDL_SCANCODE_N
	SCANCODE_O = C.SDL_SCANCODE_O
	SCANCODE_P = C.SDL_SCANCODE_P
	SCANCODE_Q = C.SDL_SCANCODE_Q
	SCANCODE_R = C.SDL_SCANCODE_R
	SCANCODE_S = C.SDL_SCANCODE_S
	SCANCODE_T = C.SDL_SCANCODE_T
	SCANCODE_U = C.SDL_SCANCODE_U
	SCANCODE_V = C.SDL_SCANCODE_V
	SCANCODE_W = C.SDL_SCANCODE_W
	SCANCODE_X = C.SDL_SCANCODE_X
	SCANCODE_Y = C.SDL_SCANCODE_Y
	SCANCODE_Z = C.SDL_SCANCODE_Z

	SCANCODE_1 = C.SDL_SCANCODE_1
	SCANCODE_2 = C.SDL_SCANCODE_2
	SCANCODE_3 = C.SDL_SCANCODE_3
	SCANCODE_4 = C.SDL_SCANCODE_4
	SCANCODE_5 = C.SDL_SCANCODE_5
	SCANCODE_6 = C.SDL_SCANCODE_6
	SCANCODE_7 = C.SDL_SCANCODE_7
	SCANCODE_8 = C.SDL_SCANCODE_8
	SCANCODE_9 = C.SDL_SCANCODE_9
	SCANCODE_0 = C.SDL_SCANCODE_0

	SCANCODE_RETURN    = C.SDL_SCANCODE_RETURN
	SCANCODE_ESCAPE    = C.SDL_SCANCODE_ESCAPE
	SCANCODE_BACKSPACE = C.SDL_SCANCODE_BACKSPACE
	SCANCODE_TAB       = C.SDL_SCANCODE_TAB
	SCANCODE_SPACE     = C.SDL_SCANCODE_SPACE

	SCANCODE_MINUS        = C.SDL_SCANCODE_MINUS
	SCANCODE_EQUALS       = C.SDL_SCANCODE_EQUALS
	SCANCODE_LEFTBRACKET  = C.SDL_SCANCODE_LEFTBRACKET
	SCANCODE_RIGHTBRACKET = C.SDL_SCANCODE_RIGHTBRACKET
	SCANCODE_BACKSLASH    = C.SDL_SCANCODE_BACKSLASH
	SCANCODE_NONUSHASH    = C.SDL_SCANCODE_NONUSHASH
	SCANCODE_SEMICOLON    = C.SDL_SCANCODE_SEMICOLON
	SCANCODE_APOSTROPHE   = C.SDL_SCANCODE_APOSTROPHE
	SCANCODE_GRAVE        = C.SDL_SCANCODE_GRAVE
	SCANCODE_COMMA        = C.SDL_SCANCODE_COMMA
	SCANCODE_PERIOD       = C.SDL_SCANCODE_PERIOD
	SCANCODE_SLASH        = C.SDL_SCANCODE_SLASH
	SCANCODE_CAPSLOCK     = C.SDL_SCANCODE_CAPSLOCK
	SCANCODE_F1           = C.SDL_SCANCODE_F1
	SCANCODE_F2           = C.SDL_SCANCODE_F2
	SCANCODE_F3           = C.SDL_SCANCODE_F3
	SCANCODE_F4           = C.SDL_SCANCODE_F4
	SCANCODE_F5           = C.SDL_SCANCODE_F5
	SCANCODE_F6           = C.SDL_SCANCODE_F6
	SCANCODE_F7           = C.SDL_SCANCODE_F7
	SCANCODE_F8           = C.SDL_SCANCODE_F8
	SCANCODE_F9           = C.SDL_SCANCODE_F9
	SCANCODE_F10          = C.SDL_SCANCODE_F10
	SCANCODE_F11          = C.SDL_SCANCODE_F11
	SCANCODE_F12          = C.SDL_SCANCODE_F12
	SCANCODE_PRINTSCREEN  = C.SDL_SCANCODE_PRINTSCREEN
	SCANCODE_SCROLLLOCK   = C.SDL_SCANCODE_SCROLLLOCK
	SCANCODE_PAUSE        = C.SDL_SCANCODE_PAUSE
	SCANCODE_INSERT       = C.SDL_SCANCODE_INSERT
	SCANCODE_HOME         = C.SDL_SCANCODE_HOME
	SCANCODE_PAGEUP       = C.SDL_SCANCODE_PAGEUP
	SCANCODE_DELETE       = C.SDL_SCANCODE_DELETE
	SCANCODE_END          = C.SDL_SCANCODE_END
	SCANCODE_PAGEDOWN     = C.SDL_SCANCODE_PAGEDOWN
	SCANCODE_RIGHT        = C.SDL_SCANCODE_RIGHT
	SCANCODE_LEFT         = C.SDL_SCANCODE_LEFT
	SCANCODE_DOWN         = C.SDL_SCANCODE_DOWN
	SCANCODE_UP           = C.SDL_SCANCODE_UP

	SCANCODE_NUMLOCKCLEAR = C.SDL_SCANCODE_NUMLOCKCLEAR
	SCANCODE_KP_DIVIDE    = C.SDL_SCANCODE_KP_DIVIDE
	SCANCODE_KP_MULTIPLY  = C.SDL_SCANCODE_KP_MULTIPLY
	SCANCODE_KP_MINUS     = C.SDL_SCANCODE_KP_MINUS
	SCANCODE_KP_PLUS      = C.SDL_SCANCODE_KP_PLUS
	SCANCODE_KP_ENTER     = C.SDL_SCANCODE_KP_ENTER
	SCANCODE_KP_1         = C.SDL_SCANCODE_KP_1
	SCANCODE_KP_2         = C.SDL_SCANCODE_KP_2
	SCANCODE_KP_3         = C.SDL_SCANCODE_KP_3
	SCANCODE_KP_4         = C.SDL_SCANCODE_KP_4
	SCANCODE_KP_5         = C.SDL_SCANCODE_KP_5
	SCANCODE_KP_6         = C.SDL_SCANCODE_KP_6
	SCANCODE_KP_7         = C.SDL_SCANCODE_KP_7
	SCANCODE_KP_8         = C.SDL_SCANCODE_KP_8
	SCANCODE_KP_9         = C.SDL_SCANCODE_KP_9
	SCANCODE_KP_0         = C.SDL_SCANCODE_KP_0
	SCANCODE_KP_PERIOD    = C.SDL_SCANCODE_KP_PERIOD

	SCANCODE_NONUSBACKSLASH = C.SDL_SCANCODE_NONUSBACKSLASH
	SCANCODE_APPLICATION    = C.SDL_SCANCODE_APPLICATION
	SCANCODE_POWER          = C.SDL_SCANCODE_POWER
	SCANCODE_KP_EQUALS      = C.SDL_SCANCODE_KP_EQUALS
	SCANCODE_F13            = C.SDL_SCANCODE_F13
	SCANCODE_F14            = C.SDL_SCANCODE_F14
	SCANCODE_F15            = C.SDL_SCANCODE_F15
	SCANCODE_F16            = C.SDL_SCANCODE_F16
	SCANCODE_F17            = C.SDL_SCANCODE_F17
	SCANCODE_F18            = C.SDL_SCANCODE_F18
	SCANCODE_F19            = C.SDL_SCANCODE_F19
	SCANCODE_F20            = C.SDL_SCANCODE_F20
	SCANCODE_F21            = C.SDL_SCANCODE_F21
	SCANCODE_F22            = C.SDL_SCANCODE_F22
	SCANCODE_F23            = C.SDL_SCANCODE_F23
	SCANCODE_F24            = C.SDL_SCANCODE_F24
	SCANCODE_EXECUTE        = C.SDL_SCANCODE_EXECUTE
	SCANCODE_HELP           = C.SDL_SCANCODE_HELP
	SCANCODE_MENU           = C.SDL_SCANCODE_MENU
	SCANCODE_SELECT         = C.SDL_SCANCODE_SELECT
	SCANCODE_STOP           = C.SDL_SCANCODE_STOP
	SCANCODE_AGAIN          = C.SDL_SCANCODE_AGAIN
	SCANCODE_UNDO           = C.SDL_SCANCODE_UNDO
	SCANCODE_CUT            = C.SDL_SCANCODE_CUT
	SCANCODE_COPY           = C.SDL_SCANCODE_COPY
	SCANCODE_PASTE          = C.SDL_SCANCODE_PASTE
	SCANCODE_FIND           = C.SDL_SCANCODE_FIND
	SCANCODE_MUTE           = C.SDL_SCANCODE_MUTE
	SCANCODE_VOLUMEUP       = C.SDL_SCANCODE_VOLUMEUP
	SCANCODE_VOLUMEDOWN     = C.SDL_SCANCODE_VOLUMEDOWN
	SCANCODE_KP_COMMA       = C.SDL_SCANCODE_KP_COMMA
	SCANCODE_KP_EQUALSAS400 = C.SDL_SCANCODE_KP_EQUALSAS400

	SCANCODE_INTERNATIONAL1 = C.SDL_SCANCODE_INTERNATIONAL1
	SCANCODE_INTERNATIONAL2 = C.SDL_SCANCODE_INTERNATIONAL2
	SCANCODE_INTERNATIONAL3 = C.SDL_SCANCODE_INTERNATIONAL3
	SCANCODE_INTERNATIONAL4 = C.SDL_SCANCODE_INTERNATIONAL4
	SCANCODE_INTERNATIONAL5 = C.SDL_SCANCODE_INTERNATIONAL5
	SCANCODE_INTERNATIONAL6 = C.SDL_SCANCODE_INTERNATIONAL6
	SCANCODE_INTERNATIONAL7 = C.SDL_SCANCODE_INTERNATIONAL7
	SCANCODE_INTERNATIONAL8 = C.SDL_SCANCODE_INTERNATIONAL8
	SCANCODE_INTERNATIONAL9 = C.SDL_SCANCODE_INTERNATIONAL9
	SCANCODE_LANG1          = C.SDL_SCANCODE_LANG1
	SCANCODE_LANG2          = C.SDL_SCANCODE_LANG2
	SCANCODE_LANG3          = C.SDL_SCANCODE_LANG3
	SCANCODE_LANG4          = C.SDL_SCANCODE_LANG4
	SCANCODE_LANG5          = C.SDL_SCANCODE_LANG5
	SCANCODE_LANG6          = C.SDL_SCANCODE_LANG6
	SCANCODE_LANG7          = C.SDL_SCANCODE_LANG7
	SCANCODE_LANG8          = C.SDL_SCANCODE_LANG8
	SCANCODE_LANG9          = C.SDL_SCANCODE_LANG9

	SCANCODE_ALTERASE   = C.SDL_SCANCODE_ALTERASE
	SCANCODE_SYSREQ     = C.SDL_SCANCODE_SYSREQ
	SCANCODE_CANCEL     = C.SDL_SCANCODE_CANCEL
	SCANCODE_CLEAR      = C.SDL_SCANCODE_CLEAR
	SCANCODE_PRIOR      = C.SDL_SCANCODE_PRIOR
	SCANCODE_RETURN2    = C.SDL_SCANCODE_RETURN2
	SCANCODE_SEPARATOR  = C.SDL_SCANCODE_SEPARATOR
	SCANCODE_OUT        = C.SDL_SCANCODE_OUT
	SCANCODE_OPER       = C.SDL_SCANCODE_OPER
	SCANCODE_CLEARAGAIN = C.SDL_SCANCODE_CLEARAGAIN
	SCANCODE_CRSEL      = C.SDL_SCANCODE_CRSEL
	SCANCODE_EXSEL      = C.SDL_SCANCODE_EXSEL

	SCANCODE_KP_00              = C.SDL_SCANCODE_KP_00
	SCANCODE_KP_000             = C.SDL_SCANCODE_KP_000
	SCANCODE_THOUSANDSSEPARATOR = C.SDL_SCANCODE_THOUSANDSSEPARATOR
	SCANCODE_DECIMALSEPARATOR   = C.SDL_SCANCODE_DECIMALSEPARATOR
	SCANCODE_CURRENCYUNIT       = C.SDL_SCANCODE_CURRENCYUNIT
	SCANCODE_CURRENCYSUBUNIT    = C.SDL_SCANCODE_CURRENCYSUBUNIT
	SCANCODE_KP_LEFTPAREN       = C.SDL_SCANCODE_KP_LEFTPAREN
	SCANCODE_KP_RIGHTPAREN      = C.SDL_SCANCODE_KP_RIGHTPAREN
	SCANCODE_KP_LEFTBRACE       = C.SDL_SCANCODE_KP_LEFTBRACE
	SCANCODE_KP_RIGHTBRACE      = C.SDL_SCANCODE_KP_RIGHTBRACE
	SCANCODE_KP_TAB             = C.SDL_SCANCODE_KP_TAB
	SCANCODE_KP_BACKSPACE       = C.SDL_SCANCODE_KP_BACKSPACE
	SCANCODE_KP_A               = C.SDL_SCANCODE_KP_A
	SCANCODE_KP_B               = C.SDL_SCANCODE_KP_B
	SCANCODE_KP_C               = C.SDL_SCANCODE_KP_C
	SCANCODE_KP_D               = C.SDL_SCANCODE_KP_D
	SCANCODE_KP_E               = C.SDL_SCANCODE_KP_E
	SCANCODE_KP_F               = C.SDL_SCANCODE_KP_F
	SCANCODE_KP_XOR             = C.SDL_SCANCODE_KP_XOR
	SCANCODE_KP_POWER           = C.SDL_SCANCODE_KP_POWER
	SCANCODE_KP_PERCENT         = C.SDL_SCANCODE_KP_PERCENT
	SCANCODE_KP_LESS            = C.SDL_SCANCODE_KP_LESS
	SCANCODE_KP_GREATER         = C.SDL_SCANCODE_KP_GREATER
	SCANCODE_KP_AMPERSAND       = C.SDL_SCANCODE_KP_AMPERSAND
	SCANCODE_KP_DBLAMPERSAND    = C.SDL_SCANCODE_KP_DBLAMPERSAND
	SCANCODE_KP_VERTICALBAR     = C.SDL_SCANCODE_KP_VERTICALBAR
	SCANCODE_KP_DBLVERTICALBAR  = C.SDL_SCANCODE_KP_DBLVERTICALBAR
	SCANCODE_KP_COLON           = C.SDL_SCANCODE_KP_COLON
	SCANCODE_KP_HASH            = C.SDL_SCANCODE_KP_HASH
	SCANCODE_KP_SPACE           = C.SDL_SCANCODE_KP_SPACE
	SCANCODE_KP_AT              = C.SDL_SCANCODE_KP_AT
	SCANCODE_KP_EXCLAM          = C.SDL_SCANCODE_KP_EXCLAM
	SCANCODE_KP_MEMSTORE        = C.SDL_SCANCODE_KP_MEMSTORE
	SCANCODE_KP_MEMRECALL       = C.SDL_SCANCODE_KP_MEMRECALL
	SCANCODE_KP_MEMCLEAR        = C.SDL_SCANCODE_KP_MEMCLEAR
	SCANCODE_KP_MEMADD          = C.SDL_SCANCODE_KP_MEMADD
	SCANCODE_KP_MEMSUBTRACT     = C.SDL_SCANCODE_KP_MEMSUBTRACT
	SCANCODE_KP_MEMMULTIPLY     = C.SDL_SCANCODE_KP_MEMMULTIPLY
	SCANCODE_KP_MEMDIVIDE       = C.SDL_SCANCODE_KP_MEMDIVIDE
	SCANCODE_KP_PLUSMINUS       = C.SDL_SCANCODE_KP_PLUSMINUS
	SCANCODE_KP_CLEAR           = C.SDL_SCANCODE_KP_CLEAR
	SCANCODE_KP_CLEARENTRY      = C.SDL_SCANCODE_KP_CLEARENTRY
	SCANCODE_KP_BINARY          = C.SDL_SCANCODE_KP_BINARY
	SCANCODE_KP_OCTAL           = C.SDL_SCANCODE_KP_OCTAL
	SCANCODE_KP_DECIMAL         = C.SDL_SCANCODE_KP_DECIMAL
	SCANCODE_KP_HEXADECIMAL     = C.SDL_SCANCODE_KP_HEXADECIMAL

	SCANCODE_LCTRL          = C.SDL_SCANCODE_LCTRL
	SCANCODE_LSHIFT         = C.SDL_SCANCODE_LSHIFT
	SCANCODE_LALT           = C.SDL_SCANCODE_LALT
	SCANCODE_LGUI           = C.SDL_SCANCODE_LGUI
	SCANCODE_RCTRL          = C.SDL_SCANCODE_RCTRL
	SCANCODE_RSHIFT         = C.SDL_SCANCODE_RSHIFT
	SCANCODE_RALT           = C.SDL_SCANCODE_RALT
	SCANCODE_RGUI           = C.SDL_SCANCODE_RGUI
	SCANCODE_MODE           = C.SDL_SCANCODE_MODE
	SCANCODE_AUDIONEXT      = C.SDL_SCANCODE_AUDIONEXT
	SCANCODE_AUDIOPREV      = C.SDL_SCANCODE_AUDIOPREV
	SCANCODE_AUDIOSTOP      = C.SDL_SCANCODE_AUDIOSTOP
	SCANCODE_AUDIOPLAY      = C.SDL_SCANCODE_AUDIOPLAY
	SCANCODE_AUDIOMUTE      = C.SDL_SCANCODE_AUDIOMUTE
	SCANCODE_MEDIASELECT    = C.SDL_SCANCODE_MEDIASELECT
	SCANCODE_WWW            = C.SDL_SCANCODE_WWW
	SCANCODE_MAIL           = C.SDL_SCANCODE_MAIL
	SCANCODE_CALCULATOR     = C.SDL_SCANCODE_CALCULATOR
	SCANCODE_COMPUTER       = C.SDL_SCANCODE_COMPUTER
	SCANCODE_AC_SEARCH      = C.SDL_SCANCODE_AC_SEARCH
	SCANCODE_AC_HOME        = C.SDL_SCANCODE_AC_HOME
	SCANCODE_AC_BACK        = C.SDL_SCANCODE_AC_BACK
	SCANCODE_AC_FORWARD     = C.SDL_SCANCODE_AC_FORWARD
	SCANCODE_AC_STOP        = C.SDL_SCANCODE_AC_STOP
	SCANCODE_AC_REFRESH     = C.SDL_SCANCODE_AC_REFRESH
	SCANCODE_AC_BOOKMARKS   = C.SDL_SCANCODE_AC_BOOKMARKS
	SCANCODE_BRIGHTNESSDOWN = C.SDL_SCANCODE_BRIGHTNESSDOWN
	SCANCODE_BRIGHTNESSUP   = C.SDL_SCANCODE_BRIGHTNESSUP
	SCANCODE_DISPLAYSWITCH  = C.SDL_SCANCODE_DISPLAYSWITCH
	SCANCODE_KBDILLUMTOGGLE = C.SDL_SCANCODE_KBDILLUMTOGGLE
	SCANCODE_KBDILLUMDOWN   = C.SDL_SCANCODE_KBDILLUMDOWN
	SCANCODE_KBDILLUMUP     = C.SDL_SCANCODE_KBDILLUMUP
	SCANCODE_EJECT          = C.SDL_SCANCODE_EJECT
	SCANCODE_SLEEP          = C.SDL_SCANCODE_SLEEP
	SCANCODE_APP1           = C.SDL_SCANCODE_APP1
	SCANCODE_APP2           = C.SDL_SCANCODE_APP2
	NUM_SCANCODES           = C.SDL_NUM_SCANCODES
)
View Source
const (
	INIT_TIMER          = 0x00000001
	INIT_AUDIO          = 0x00000010
	INIT_VIDEO          = 0x00000020
	INIT_JOYSTICK       = 0x00000200
	INIT_HAPTIC         = 0x00001000
	INIT_GAMECONTROLLER = 0x00002000
	INIT_NOPARACHUTE    = 0x00100000
	INIT_EVERYTHING     = INIT_TIMER | INIT_AUDIO | INIT_VIDEO | INIT_JOYSTICK |
		INIT_HAPTIC | INIT_GAMECONTROLLER
)
View Source
const (
	RELEASED = 0
	PRESSED  = 1
)
View Source
const (
	SWSURFACE = C.SDL_SWSURFACE
	PREALLOC  = C.SDL_PREALLOC
	RLEACCEL  = C.SDL_RLEACCEL
	DONTFREE  = C.SDL_DONTFREE
)
View Source
const (
	SYSWM_UNKNOWN  = C.SDL_SYSWM_UNKNOWN
	SYSWM_WINDOWS  = C.SDL_SYSWM_WINDOWS
	SYSWM_X11      = C.SDL_SYSWM_X11
	SYSWM_DIRECTFB = C.SDL_SYSWM_DIRECTFB
	SYSWM_COCOA    = C.SDL_SYSWM_COCOA
	SYSWM_UIKIT    = C.SDL_SYSWM_UIKIT
	SYSWM_WAYLAND  = C.SDL_SYSWM_WAYLAND
	SYSWM_MIR      = C.SDL_SYSWM_MIR
)
View Source
const (
	MAJOR_VERSION = C.SDL_MAJOR_VERSION
	MINOR_VERSION = C.SDL_MINOR_VERSION
	PATCHLEVEL    = C.SDL_PATCHLEVEL
)
View Source
const (
	WINDOW_FULLSCREEN         = C.SDL_WINDOW_FULLSCREEN
	WINDOW_OPENGL             = C.SDL_WINDOW_OPENGL
	WINDOW_SHOWN              = C.SDL_WINDOW_SHOWN
	WINDOW_HIDDEN             = C.SDL_WINDOW_HIDDEN
	WINDOW_BORDERLESS         = C.SDL_WINDOW_BORDERLESS
	WINDOW_RESIZABLE          = C.SDL_WINDOW_RESIZABLE
	WINDOW_MINIMIZED          = C.SDL_WINDOW_MINIMIZED
	WINDOW_MAXIMIZED          = C.SDL_WINDOW_MAXIMIZED
	WINDOW_INPUT_GRABBED      = C.SDL_WINDOW_INPUT_GRABBED
	WINDOW_INPUT_FOCUS        = C.SDL_WINDOW_INPUT_FOCUS
	WINDOW_MOUSE_FOCUS        = C.SDL_WINDOW_MOUSE_FOCUS
	WINDOW_FULLSCREEN_DESKTOP = C.SDL_WINDOW_FULLSCREEN_DESKTOP
	WINDOW_FOREIGN            = C.SDL_WINDOW_FOREIGN
	WINDOW_ALLOW_HIGHDPI      = C.SDL_WINDOW_ALLOW_HIGHDPI
)
View Source
const (
	WINDOWEVENT_NONE         = C.SDL_WINDOWEVENT_NONE
	WINDOWEVENT_SHOWN        = C.SDL_WINDOWEVENT_SHOWN
	WINDOWEVENT_HIDDEN       = C.SDL_WINDOWEVENT_HIDDEN
	WINDOWEVENT_EXPOSED      = C.SDL_WINDOWEVENT_EXPOSED
	WINDOWEVENT_MOVED        = C.SDL_WINDOWEVENT_MOVED
	WINDOWEVENT_RESIZED      = C.SDL_WINDOWEVENT_RESIZED
	WINDOWEVENT_SIZE_CHANGED = C.SDL_WINDOWEVENT_SIZE_CHANGED
	WINDOWEVENT_MINIMIZED    = C.SDL_WINDOWEVENT_MINIMIZED
	WINDOWEVENT_MAXIMIZED    = C.SDL_WINDOWEVENT_MAXIMIZED
	WINDOWEVENT_RESTORED     = C.SDL_WINDOWEVENT_RESTORED
	WINDOWEVENT_ENTER        = C.SDL_WINDOWEVENT_ENTER
	WINDOWEVENT_LEAVE        = C.SDL_WINDOWEVENT_LEAVE
	WINDOWEVENT_FOCUS_GAINED = C.SDL_WINDOWEVENT_FOCUS_GAINED
	WINDOWEVENT_FOCUS_LOST   = C.SDL_WINDOWEVENT_FOCUS_LOST
	WINDOWEVENT_CLOSE        = C.SDL_WINDOWEVENT_CLOSE
)
View Source
const (
	WINDOWPOS_UNDEFINED_MASK = C.SDL_WINDOWPOS_UNDEFINED_MASK
	WINDOWPOS_UNDEFINED      = C.SDL_WINDOWPOS_UNDEFINED
	WINDOWPOS_CENTERED_MASK  = C.SDL_WINDOWPOS_CENTERED_MASK
	WINDOWPOS_CENTERED       = C.SDL_WINDOWPOS_CENTERED
)
View Source
const (
	MESSAGEBOX_ERROR       = C.SDL_MESSAGEBOX_ERROR
	MESSAGEBOX_WARNING     = C.SDL_MESSAGEBOX_WARNING
	MESSAGEBOX_INFORMATION = C.SDL_MESSAGEBOX_INFORMATION
)
View Source
const (
	MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT = C.SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT
	MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT = C.SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT
)
View Source
const (
	GL_RED_SIZE                   = C.SDL_GL_RED_SIZE
	GL_GREEN_SIZE                 = C.SDL_GL_GREEN_SIZE
	GL_BLUE_SIZE                  = C.SDL_GL_BLUE_SIZE
	GL_ALPHA_SIZE                 = C.SDL_GL_ALPHA_SIZE
	GL_BUFFER_SIZE                = C.SDL_GL_BUFFER_SIZE
	GL_DOUBLEBUFFER               = C.SDL_GL_DOUBLEBUFFER
	GL_DEPTH_SIZE                 = C.SDL_GL_DEPTH_SIZE
	GL_STENCIL_SIZE               = C.SDL_GL_STENCIL_SIZE
	GL_ACCUM_RED_SIZE             = C.SDL_GL_ACCUM_RED_SIZE
	GL_ACCUM_GREEN_SIZE           = C.SDL_GL_ACCUM_GREEN_SIZE
	GL_ACCUM_BLUE_SIZE            = C.SDL_GL_ACCUM_BLUE_SIZE
	GL_ACCUM_ALPHA_SIZE           = C.SDL_GL_ALPHA_SIZE
	GL_STEREO                     = C.SDL_GL_STEREO
	GL_MULTISAMPLEBUFFERS         = C.SDL_GL_MULTISAMPLEBUFFERS
	GL_MULTISAMPLESAMPLES         = C.SDL_GL_MULTISAMPLESAMPLES
	GL_ACCELERATED_VISUAL         = C.SDL_GL_ACCELERATED_VISUAL
	GL_RETAINED_BACKING           = C.SDL_GL_RETAINED_BACKING
	GL_CONTEXT_MAJOR_VERSION      = C.SDL_GL_CONTEXT_MAJOR_VERSION
	GL_CONTEXT_MINOR_VERSION      = C.SDL_GL_CONTEXT_MINOR_VERSION
	GL_CONTEXT_EGL                = C.SDL_GL_CONTEXT_EGL
	GL_CONTEXT_FLAGS              = C.SDL_GL_CONTEXT_FLAGS
	GL_CONTEXT_PROFILE_MASK       = C.SDL_GL_CONTEXT_PROFILE_MASK
	GL_SHARE_WITH_CURRENT_CONTEXT = C.SDL_GL_SHARE_WITH_CURRENT_CONTEXT
)
View Source
const (
	GL_CONTEXT_PROFILE_CORE          = C.SDL_GL_CONTEXT_PROFILE_CORE
	GL_CONTEXT_PROFILE_COMPATIBILITY = C.SDL_GL_CONTEXT_PROFILE_COMPATIBILITY
	GL_CONTEXT_PROFILE_ES            = C.SDL_GL_CONTEXT_PROFILE_ES
)
View Source
const (
	GL_CONTEXT_DEBUG_FLAG              = C.SDL_GL_CONTEXT_DEBUG_FLAG
	GL_CONTEXT_FORWARD_COMPATIBLE_FLAG = C.SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG
	GL_CONTEXT_ROBUST_ACCESS_FLAG      = C.SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG
	GL_CONTEXT_RESET_ISOLATION_FLAG    = C.SDL_GL_CONTEXT_RESET_ISOLATION_FLAG
)
View Source
const CACHELINE_SIZE = C.SDL_CACHELINE_SIZE
View Source
const K_SCANCODE_MASK = 1 << 30
View Source
const MIX_MAXVOLUME = C.SDL_MIX_MAXVOLUME
View Source
const TOUCH_MOUSEID = C.SDL_TOUCH_MOUSEID

Variables

This section is empty.

Functions

func AudioInit

func AudioInit(driverName string) error

AudioInit (https://wiki.libsdl.org/SDL_AudioInit)

func AudioQuit

func AudioQuit()

AudioQuit (https://wiki.libsdl.org/SDL_AudioQuit)

func Btoi

func Btoi(b bool) int

func BuildAudioCVT

func BuildAudioCVT(cvt *AudioCVT, srcFormat AudioFormat, srcChannels uint8, srcRate int, dstFormat AudioFormat, dstChannels uint8, dstRate int) (converted bool, err error)

BuildAudioCVT (https://wiki.libsdl.org/SDL_BuildAudioCVT)

func Button

func Button(flag uint32) uint32

func ButtonLMask

func ButtonLMask() uint32

func ButtonMMask

func ButtonMMask() uint32

func ButtonRMask

func ButtonRMask() uint32

func ButtonX1Mask

func ButtonX1Mask() uint32

func ButtonX2Mask

func ButtonX2Mask() uint32

func COMPILEDVERSION

func COMPILEDVERSION() int

COMPILEDVERSION (https://wiki.libsdl.org/SDL_COMPILEDVERSION)

func CalculateGammaRamp

func CalculateGammaRamp(gamma float32, ramp *[256]uint16)

CalculateGammaRamp calculates a 256 entry gamma ramp for a gamma value. CalculateGammaRamp (https://wiki.libsdl.org/SDL_CalculateGammaRamp)

func CaptureMouse

func CaptureMouse(toggle bool) error

CaptureMouse (https://wiki.libsdl.org/SDL_CaptureMouse)

func ClearError

func ClearError()

ClearError (https://wiki.libsdl.org/SDL_ClearError)

func ClearHints

func ClearHints()

ClearHints (https://wiki.libsdl.org/SDL_ClearHints)

func ClearQueuedAudio

func ClearQueuedAudio(dev AudioDeviceID)

ClearQueuedAudio (https://wiki.libsdl.org/SDL_ClearQueuedAudio)

func CloseAudio

func CloseAudio()

CloseAudio (https://wiki.libsdl.org/SDL_CloseAudio)

func CloseAudioDevice

func CloseAudioDevice(dev AudioDeviceID)

CloseAudioDevice (https://wiki.libsdl.org/SDL_CloseAudioDevice)

func CondBroadcast

func CondBroadcast(cond *Cond) int

CondBroadcast (https://wiki.libsdl.org/SDL_CondBroadcast)

func CondSignal

func CondSignal(cond *Cond) int

CondSignal (https://wiki.libsdl.org/SDL_CondSignal)

func CondWait

func CondWait(cond *Cond, mutex *Mutex) int

CondWait (https://wiki.libsdl.org/SDL_CondWait)

func CondWaitTimeout

func CondWaitTimeout(cond *Cond, mutex *Mutex, ms uint32) int

CondWaitTimeout (https://wiki.libsdl.org/SDL_CondWaitTimeout)

func ConvertAudio

func ConvertAudio(cvt *AudioCVT) error

ConvertAudio (https://wiki.libsdl.org/SDL_ConvertAudio)

func ConvertPixels

func ConvertPixels(width, height int, srcFormat uint32, src unsafe.Pointer, srcPitch int,
	dstFormat uint32, dst unsafe.Pointer, dstPitch int) error

ConvertPixels (https://wiki.libsdl.org/SDL_ConvertPixels)

func CreateWindowAndRenderer

func CreateWindowAndRenderer(w, h int, flags uint32) (*Window, *Renderer, error)

CreateWindowAndRenderer (https://wiki.libsdl.org/SDL_CreateWindowAndRenderer)

func DelEventWatch

func DelEventWatch(handle EventWatchHandle)

DelEventWatch (https://wiki.libsdl.org/SDL_DelEventWatch)

func Delay

func Delay(ms uint32)

Delay (https://wiki.libsdl.org/SDL_Delay)

func DequeueAudio

func DequeueAudio(dev AudioDeviceID, data []byte) error

DequeueAudio (https://wiki.libsdl.org/SDL_DequeueAudio)

func DestroyCond

func DestroyCond(cond *Cond)

DestroyCond (https://wiki.libsdl.org/SDL_DestroyCond)

func DestroyMutex

func DestroyMutex(mutex *Mutex)

DestroyMutex (https://wiki.libsdl.org/SDL_DestroyMutex)

func DestroySemaphore

func DestroySemaphore(sem *Sem)

DestroySemaphore (https://wiki.libsdl.org/SDL_DestroySemaphore)

func DisableScreenSaver

func DisableScreenSaver()

DisableScreenSaver (https://wiki.libsdl.org/SDL_DisableScreenSaver)

func Do

func Do(f func())

Run the specified function in the main thread. For this function to work, you must have correctly used sdl.Main() in your main() function.

func EnableScreenSaver

func EnableScreenSaver()

EnableScreenSaver (https://wiki.libsdl.org/SDL_EnableScreenSaver)

func Error

func Error(code ErrorCode)

func EventState

func EventState(type_ uint32, state int) uint8

EventState (https://wiki.libsdl.org/SDL_EventState)

func FilterEvents

func FilterEvents(filter EventFilter, userdata interface{})

FilterEvents (https://wiki.libsdl.org/SDL_FilterEvents)

func FilterEventsFunc

func FilterEventsFunc(filter eventFilterFunc, userdata interface{})

func FlushEvent

func FlushEvent(type_ uint32)

FlushEvent (https://wiki.libsdl.org/SDL_FlushEvent)

func FlushEvents

func FlushEvents(minType, maxType uint32)

FlushEvents (https://wiki.libsdl.org/SDL_FlushEvents)

func FreeCursor

func FreeCursor(cursor *Cursor)

FreeCursor (https://wiki.libsdl.org/SDL_FreeCursor)

func FreeWAV

func FreeWAV(audioBuf []uint8)

FreeWAV (https://wiki.libsdl.org/SDL_FreeWAV)

func GL_DeleteContext

func GL_DeleteContext(context GLContext)

GL_DeleteContext (https://wiki.libsdl.org/SDL_GL_DeleteContext)

func GL_ExtensionSupported

func GL_ExtensionSupported(extension string) bool

GL_ExtensionSupported (https://wiki.libsdl.org/SDL_GL_ExtensionSupported)

func GL_GetAttribute

func GL_GetAttribute(attr GLattr) (int, error)

GL_GetAttribute (https://wiki.libsdl.org/SDL_GL_GetAttribute)

func GL_GetDrawableSize

func GL_GetDrawableSize(window *Window) (w, h int)

GL_GetDrawableSize (https://wiki.libsdl.org/SDL_GL_GetDrawableSize)

func GL_GetProcAddress

func GL_GetProcAddress(proc string) unsafe.Pointer

GL_GetProcAddress (https://wiki.libsdl.org/SDL_GL_GetProcAddress)

func GL_GetSwapInterval

func GL_GetSwapInterval() (int, error)

GL_GetSwapInterval (https://wiki.libsdl.org/SDL_GL_GetSwapInterval)

func GL_LoadLibrary

func GL_LoadLibrary(path string) error

GL_LoadLibrary (https://wiki.libsdl.org/SDL_GL_LoadLibrary)

func GL_MakeCurrent

func GL_MakeCurrent(window *Window, glcontext GLContext) error

GL_MakeCurrent (https://wiki.libsdl.org/SDL_GL_MakeCurrent)

func GL_SetAttribute

func GL_SetAttribute(attr GLattr, value int) error

GL_SetAttribute (https://wiki.libsdl.org/SDL_GL_SetAttribute)

func GL_SetSwapInterval

func GL_SetSwapInterval(interval int) error

GL_SetSwapInterval (https://wiki.libsdl.org/SDL_GL_SetSwapInterval)

func GL_SwapWindow

func GL_SwapWindow(window *Window)

GL_SwapWindow (https://wiki.libsdl.org/SDL_GL_SwapWindow)

func GL_UnloadLibrary

func GL_UnloadLibrary()

GL_UnloadLibrary (https://wiki.libsdl.org/SDL_GL_UnloadLibrary)

func GameControllerAddMapping

func GameControllerAddMapping(mappingString string) int

GameControllerAddMapping (https://wiki.libsdl.org/SDL_GameControllerAddMapping)

func GameControllerEventState

func GameControllerEventState(state int) int

GameControllerEventState (https://wiki.libsdl.org/SDL_GameControllerEventState)

func GameControllerGetStringForAxis

func GameControllerGetStringForAxis(axis GameControllerAxis) string

GameControllerGetStringForAxis (https://wiki.libsdl.org/SDL_GameControllerGetStringForAxis)

func GameControllerGetStringForButton

func GameControllerGetStringForButton(btn GameControllerButton) string

GameControllerGetStringForButton (https://wiki.libsdl.org/SDL_GameControllerGetStringForButton)

func GameControllerMapping

func GameControllerMapping(ctrl *GameController) string

GameControllerMapping (https://wiki.libsdl.org/SDL_GameControllerMapping)

func GameControllerMappingForGUID

func GameControllerMappingForGUID(guid JoystickGUID) string

GameControllerMappingForGUID (https://wiki.libsdl.org/SDL_GameControllerMappingForGUID)

func GameControllerNameForIndex

func GameControllerNameForIndex(index int) string

GameControllerNameForIndex (https://wiki.libsdl.org/SDL_GameControllerNameForIndex)

func GameControllerUpdate

func GameControllerUpdate()

GameControllerUpdate (https://wiki.libsdl.org/SDL_GameControllerUpdate)

func GetAudioDeviceName

func GetAudioDeviceName(index int, isCapture bool) string

GetAudioDeviceName (https://wiki.libsdl.org/SDL_GetAudioDeviceName)

func GetAudioDriver

func GetAudioDriver(index int) string

GetAudioDriver (https://wiki.libsdl.org/SDL_GetAudioDriver)

func GetBasePath

func GetBasePath() string

GetBasePath (https://wiki.libsdl.org/SDL_GetBasePath)

func GetCPUCacheLineSize

func GetCPUCacheLineSize() int

GetCPUCacheLineSize (https://wiki.libsdl.org/SDL_GetCPUCacheLineSize)

func GetCPUCount

func GetCPUCount() int

GetCPUCount (https://wiki.libsdl.org/SDL_GetCPUCount)

func GetClipboardText

func GetClipboardText() (string, error)

GetClipboardText (https://wiki.libsdl.org/SDL_GetClipboardText)

func GetCurrentAudioDriver

func GetCurrentAudioDriver() string

GetCurrentAudioDriver (https://wiki.libsdl.org/SDL_GetCurrentAudioDriver)

func GetCurrentDisplayMode

func GetCurrentDisplayMode(displayIndex int, mode *DisplayMode) error

GetCurrentDisplayMode (https://wiki.libsdl.org/SDL_GetCurrentDisplayMode)

func GetCurrentVideoDriver

func GetCurrentVideoDriver() string

GetCurrentVideoDriver (https://wiki.libsdl.org/SDL_GetCurrentVideoDriver)

func GetDesktopDisplayMode

func GetDesktopDisplayMode(displayIndex int, mode *DisplayMode) error

GetDesktopDisplayMode (https://wiki.libsdl.org/SDL_GetDesktopDisplayMode)

func GetDisplayBounds

func GetDisplayBounds(displayIndex int, rect *Rect) error

GetDisplayBounds (https://wiki.libsdl.org/SDL_GetDisplayBounds)

func GetDisplayMode

func GetDisplayMode(displayIndex int, modeIndex int, mode *DisplayMode) error

GetDisplayMode (https://wiki.libsdl.org/SDL_GetDisplayMode)

func GetDisplayName

func GetDisplayName(displayIndex int) string

GetDisplayName (https://wiki.libsdl.org/SDL_GetDisplayName)

func GetError

func GetError() error

GetError (https://wiki.libsdl.org/SDL_GetError)

func GetEventState

func GetEventState(type_ uint32) uint8

func GetHint

func GetHint(name string) string

GetHint (https://wiki.libsdl.org/SDL_GetHint)

func GetKeyName

func GetKeyName(code Keycode) string

GetKeyName (https://wiki.libsdl.org/SDL_GetKeyName)

func GetKeyboardState

func GetKeyboardState() []uint8

GetKeyboardState (https://wiki.libsdl.org/SDL_GetKeyboardState)

func GetMouseState

func GetMouseState() (x, y int, state uint32)

GetMouseState (https://wiki.libsdl.org/SDL_GetMouseState)

func GetNumAudioDevices

func GetNumAudioDevices(isCapture bool) int

GetNumAudioDevices (https://wiki.libsdl.org/SDL_GetNumAudioDevices)

func GetNumAudioDrivers

func GetNumAudioDrivers() int

GetNumAudioDrivers (https://wiki.libsdl.org/SDL_GetNumAudioDrivers)

func GetNumDisplayModes

func GetNumDisplayModes(displayIndex int) (int, error)

GetNumDisplayModes (https://wiki.libsdl.org/SDL_GetNumDisplayModes)

func GetNumRenderDrivers

func GetNumRenderDrivers() int

GetNumRenderDrivers (https://wiki.libsdl.org/SDL_GetNumRenderDrivers)

func GetNumTouchDevices

func GetNumTouchDevices() int

GetNumTouchDevices (https://wiki.libsdl.org/SDL_GetNumTouchDevices)

func GetNumTouchFingers

func GetNumTouchFingers(t TouchID) int

GetNumTouchFingers (https://wiki.libsdl.org/SDL_GetNumTouchFingers)

func GetNumVideoDisplays

func GetNumVideoDisplays() (int, error)

GetNumVideoDisplays (https://wiki.libsdl.org/SDL_GetNumVideoDisplays)

func GetNumVideoDrivers

func GetNumVideoDrivers() (int, error)

GetNumVideoDrivers (https://wiki.libsdl.org/SDL_GetNumVideoDrivers)

func GetPerformanceCounter

func GetPerformanceCounter() uint64

GetPerformanceCounter (https://wiki.libsdl.org/SDL_GetPerformanceCounter)

func GetPerformanceFrequency

func GetPerformanceFrequency() uint64

GetPerformanceFrequency (https://wiki.libsdl.org/SDL_GetPerformanceFrequency)

func GetPixelFormatName

func GetPixelFormatName(format uint) string

GetPixelFormatName gets the human readable name of a pixel format GetPixelFormatName (https://wiki.libsdl.org/SDL_GetPixelFormatName)

func GetPlatform

func GetPlatform() string

GetPlatform (https://wiki.libsdl.org/SDL_GetPlatform)

func GetPowerInfo

func GetPowerInfo() (int, int, int)

GetPowerInfo (https://wiki.libsdl.org/SDL_GetPowerInfo)

func GetPrefPath

func GetPrefPath(org, app string) string

GetPrefPath (https://wiki.libsdl.org/SDL_GetPrefPath)

func GetQueuedAudioSize

func GetQueuedAudioSize(dev AudioDeviceID) uint32

GetQueuedAudioSize (https://wiki.libsdl.org/SDL_GetQueuedAudioSize)

func GetRGB

func GetRGB(pixel uint32, format *PixelFormat) (r, g, b uint8)

GetRGB gets the RGB components from a pixel of the specified format. GetRGB (https://wiki.libsdl.org/SDL_GetRGB)

func GetRGBA

func GetRGBA(pixel uint32, format *PixelFormat) (r, g, b, a uint8)

GetRGBA gets the RGBA components from a pixel of the specified format. GetRGBA (https://wiki.libsdl.org/SDL_GetRGBA)

func GetRelativeMouseMode

func GetRelativeMouseMode() bool

GetRelativeMouseMode (https://wiki.libsdl.org/SDL_GetRelativeMouseMode)

func GetRelativeMouseState

func GetRelativeMouseState() (x, y int, state uint32)

GetRelativeMouseState (https://wiki.libsdl.org/SDL_GetRelativeMouseState)

func GetRenderDriverInfo

func GetRenderDriverInfo(index int, info *RendererInfo) int

GetRenderDriverInfo (https://wiki.libsdl.org/SDL_GetRenderDriverInfo)

func GetRevision

func GetRevision() string

GetRevision (https://wiki.libsdl.org/SDL_GetRevision)

func GetRevisionNumber

func GetRevisionNumber() int

GetRevisionNumber (https://wiki.libsdl.org/SDL_GetRevisionNumber)

func GetScancodeName

func GetScancodeName(code Scancode) string

GetScancodeName (https://wiki.libsdl.org/SDL_GetScancodeName)

func GetSystemRAM

func GetSystemRAM() int

GetSystemRAM (https://wiki.libsdl.org/SDL_GetSystemRAM)

func GetTicks

func GetTicks() uint32

GetTicks (https://wiki.libsdl.org/SDL_GetTicks)

func GetVersion

func GetVersion(v *Version)

GetVersion (https://wiki.libsdl.org/SDL_GetVersion)

func GetVideoDriver

func GetVideoDriver(index int) string

GetVideoDriver (https://wiki.libsdl.org/SDL_GetVideoDriver)

func HapticIndex

func HapticIndex(h *Haptic) int

HapticIndex (https://wiki.libsdl.org/SDL_HapticIndex)

func HapticName

func HapticName(index int) string

HapticName (https://wiki.libsdl.org/SDL_HapticName)

func HapticOpened

func HapticOpened(index int) int

HapticOpened (https://wiki.libsdl.org/SDL_HapticOpened)

func Has3DNow

func Has3DNow() bool

Has3DNow (https://wiki.libsdl.org/SDL_Has3DNow)

func HasAVX

func HasAVX() bool

func HasAltiVec

func HasAltiVec() bool

HasAltiVec (https://wiki.libsdl.org/SDL_HasAltiVec)

func HasClipboardText

func HasClipboardText() bool

HasClipboardText (https://wiki.libsdl.org/SDL_HasClipboardText)

func HasEvent

func HasEvent(type_ uint32) bool

HasEvent (https://wiki.libsdl.org/SDL_HasEvent)

func HasEvents

func HasEvents(minType, maxType uint32) bool

HasEvents (https://wiki.libsdl.org/SDL_HasEvents)

func HasMMX

func HasMMX() bool

HasMMX (https://wiki.libsdl.org/SDL_HasMMX)

func HasRDTSC

func HasRDTSC() bool

HasRDTSC (https://wiki.libsdl.org/SDL_HasRDTSC)

func HasSSE

func HasSSE() bool

HasSSE (https://wiki.libsdl.org/SDL_HasSSE)

func HasSSE2

func HasSSE2() bool

HasSSE2 (https://wiki.libsdl.org/SDL_HasSSE2)

func HasSSE3

func HasSSE3() bool

HasSSE3 (https://wiki.libsdl.org/SDL_HasSSE3)

func HasSSE41

func HasSSE41() bool

HasSSE41 (https://wiki.libsdl.org/SDL_HasSSE41)

func HasSSE42

func HasSSE42() bool

HasSSE42 (https://wiki.libsdl.org/SDL_HasSSE42)

func HasScreenKeyboardSupport

func HasScreenKeyboardSupport() bool

HasScreenKeyboardSupport (https://wiki.libsdl.org/SDL_HasScreenKeyboardSupport)

func Init

func Init(flags uint32) error

Init (https://wiki.libsdl.org/SDL_Init)

func InitSubSystem

func InitSubSystem(flags uint32) error

InitSubSystem (https://wiki.libsdl.org/SDL_InitSubSystem)

func IsGameController

func IsGameController(index int) bool

IsGameController (https://wiki.libsdl.org/SDL_IsGameController)

func IsScreenKeyboardShown

func IsScreenKeyboardShown(window *Window) bool

IsScreenKeyboardShown (https://wiki.libsdl.org/SDL_IsScreenKeyboardShown)

func IsScreenSaverEnabled

func IsScreenSaverEnabled() bool

IsScreenSaverEnabled (https://wiki.libsdl.org/SDL_IsScreenSaverEnabled)

func IsTextInputActive

func IsTextInputActive() bool

IsTextInputActive (https://wiki.libsdl.org/SDL_IsTextInputActive)

func JoystickEventState

func JoystickEventState(state int) int

JoystickEventState (https://wiki.libsdl.org/SDL_JoystickEventState)

func JoystickGetGUIDString

func JoystickGetGUIDString(guid JoystickGUID) string

JoystickGetGUIDString (https://wiki.libsdl.org/SDL_JoystickGetGUIDString)

func JoystickIsHaptic

func JoystickIsHaptic(joy *Joystick) int

JoystickIsHaptic (https://wiki.libsdl.org/SDL_JoystickIsHaptic)

func JoystickNameForIndex

func JoystickNameForIndex(index int) string

JoystickNameForIndex (https://wiki.libsdl.org/SDL_JoystickNameForIndex)

func LoadDollarTemplates

func LoadDollarTemplates(t TouchID, src *RWops) int

LoadDollarTemplates (https://wiki.libsdl.org/SDL_LoadDollarTemplates)

func LockAudio

func LockAudio()

LockAudio (https://wiki.libsdl.org/SDL_LockAudio)

func LockAudioDevice

func LockAudioDevice(dev AudioDeviceID)

LockAudioDevice (https://wiki.libsdl.org/SDL_LockAudioDevice)

func LockMutex

func LockMutex(mutex *Mutex) int

LockMutex (https://wiki.libsdl.org/SDL_LockMutex)

func Log

func Log(str string, args ...interface{})

Log (https://wiki.libsdl.org/SDL_Log)

func LogCritical

func LogCritical(cat int, str string, args ...interface{})

LogCritical (https://wiki.libsdl.org/SDL_LogCritical)

func LogDebug

func LogDebug(cat int, str string, args ...interface{})

LogDebug (https://wiki.libsdl.org/SDL_LogDebug)

func LogError

func LogError(cat int, str string, args ...interface{})

LogError (https://wiki.libsdl.org/SDL_LogError)

func LogInfo

func LogInfo(cat int, str string, args ...interface{})

LogInfo (https://wiki.libsdl.org/SDL_LogInfo)

func LogMessage

func LogMessage(cat int, pri LogPriority, str string, args ...interface{})

LogMessage (https://wiki.libsdl.org/SDL_LogMessage)

func LogResetPriorities

func LogResetPriorities()

LogResetPriorities (https://wiki.libsdl.org/SDL_LogResetPriorities)

func LogSetAllPriority

func LogSetAllPriority(p LogPriority)

LogSetAllPriority (https://wiki.libsdl.org/SDL_LogSetAllPriority)

func LogSetOutputFunction

func LogSetOutputFunction(f LogOutputFunction, data interface{})

LogSetOutputFunction (https://wiki.libsdl.org/SDL_LogSetOutputFunction)

func LogSetPriority

func LogSetPriority(category int, p LogPriority)

LogSetPriority (https://wiki.libsdl.org/SDL_LogSetPriority)

func LogVerbose

func LogVerbose(cat int, str string, args ...interface{})

LogVerbose (https://wiki.libsdl.org/SDL_LogVerbose)

func LogWarn

func LogWarn(cat int, str string, args ...interface{})

LogWarn (https://wiki.libsdl.org/SDL_LogWarn)

func Main

func Main(main func())

Main entry point. Run this function at the beginning of main(), and pass your own main body to it as a function. E.g.:

func main() {
   sdl.Main(func() {
       // Your code here....
       // [....]

       // Calls to SDL can be made by any goroutine, but always guarded by sdl.Do()
       sdl.Do(func() {
           sdl.Init(0)
       })
   })
}

func MapRGB

func MapRGB(format *PixelFormat, r, g, b uint8) uint32

MapRGB maps an RGB triple to an opaque pixel value for a given pixel format. MapRGB (https://wiki.libsdl.org/SDL_MapRGB)

func MapRGBA

func MapRGBA(format *PixelFormat, r, g, b, a uint8) uint32

MapRGBA maps an RGBA quadruple to a pixel value for a given pixel format. MapRGBA (https://wiki.libsdl.org/SDL_MapRGBA)

func MasksToPixelFormatEnum

func MasksToPixelFormatEnum(bpp int, rmask, gmask, bmask, amask uint32) uint

MasksTouint converts a bpp and RGBA masks to a uint. MasksToPixelFormatEnum (https://wiki.libsdl.org/SDL_MasksToPixelFormatEnum)

func MixAudio

func MixAudio(dst, src *uint8, len_ uint32, volume int)

MixAudio (https://wiki.libsdl.org/SDL_MixAudio)

func MixAudioFormat

func MixAudioFormat(dst, src *uint8, format AudioFormat, len_ uint32, volume int)

MixAudioFormat (https://wiki.libsdl.org/SDL_MixAudioFormat)

func MouseIsHaptic

func MouseIsHaptic() int

MouseIsHaptic (https://wiki.libsdl.org/SDL_MouseIsHaptic)

func NumHaptics

func NumHaptics() int

NumHaptics (https://wiki.libsdl.org/SDL_NumHaptics)

func NumJoysticks

func NumJoysticks() int

NumJoysticks (https://wiki.libsdl.org/SDL_NumJoysticks)

func OpenAudio

func OpenAudio(desired, obtained *AudioSpec) error

OpenAudio (https://wiki.libsdl.org/SDL_OpenAudio)

func OutOfMemory

func OutOfMemory()

func PauseAudio

func PauseAudio(pauseOn bool)

PauseAudio (https://wiki.libsdl.org/SDL_PauseAudio)

func PauseAudioDevice

func PauseAudioDevice(dev AudioDeviceID, pauseOn bool)

PauseAudioDevice (https://wiki.libsdl.org/SDL_PauseAudioDevice)

func PeepEvents

func PeepEvents(events []Event, action EventAction, minType, maxType uint32) (storedEvents int, err error)

PeepEvents (https://wiki.libsdl.org/SDL_PeepEvents)

func PixelFormatEnumToMasks

func PixelFormatEnumToMasks(format uint) (bpp int, rmask, gmask, bmask, amask uint32, err error)

PixelFormatEnumToMasks converts format into a bpp and RGBA masks. PixelFormatEnumToMasks (https://wiki.libsdl.org/SDL_PixelFormatEnumToMasks)

func PumpEvents

func PumpEvents()

PumpEvents (https://wiki.libsdl.org/SDL_PumpEvents)

func PushEvent

func PushEvent(event Event) (filtered bool, err error)

PushEvent (https://wiki.libsdl.org/SDL_PushEvent)

func QueueAudio

func QueueAudio(dev AudioDeviceID, data []byte) error

QueueAudio (https://wiki.libsdl.org/SDL_QueueAudio)

func Quit

func Quit()

Quit (https://wiki.libsdl.org/SDL_Quit)

func QuitSubSystem

func QuitSubSystem(flags uint32)

QuitSubSystem (https://wiki.libsdl.org/SDL_QuitSubSystem)

func RecordGesture

func RecordGesture(t TouchID) int

RecordGesture (https://wiki.libsdl.org/SDL_RecordGesture)

func RegisterEvents

func RegisterEvents(numEvents int) uint32

RegisterEvents (https://wiki.libsdl.org/SDL_RegisterEvents)

func SaveAllDollarTemplates

func SaveAllDollarTemplates(src *RWops) int

SaveAllDollarTemplates (https://wiki.libsdl.org/SDL_SaveAllDollarTemplates)

func SaveDollarTemplate

func SaveDollarTemplate(g GestureID, src *RWops) int

SaveDollarTemplate (https://wiki.libsdl.org/SDL_SaveDollarTemplate)

func SemPost

func SemPost(sem *Sem) int

SemPost (https://wiki.libsdl.org/SDL_SemPost)

func SemTryWait

func SemTryWait(sem *Sem) int

SemTryWait (https://wiki.libsdl.org/SDL_SemTryWait)

func SemValue

func SemValue(sem *Sem) uint32

SemValue (https://wiki.libsdl.org/SDL_SemValue)

func SemWait

func SemWait(sem *Sem) int

SemWait (https://wiki.libsdl.org/SDL_SemWait)

func SemWaitTimeout

func SemWaitTimeout(sem *Sem, ms uint32) int

SemWaitTimeout (https://wiki.libsdl.org/SDL_SemWaitTimeout)

func SetClipboardText

func SetClipboardText(text string) error

SetClipboardText (https://wiki.libsdl.org/SDL_SetClipboardText)

func SetCursor

func SetCursor(cursor *Cursor)

SetCursor (https://wiki.libsdl.org/SDL_SetCursor)

func SetEventFilter

func SetEventFilter(filter EventFilter, userdata interface{})

SetEventFilter (https://wiki.libsdl.org/SDL_SetEventFilter)

func SetEventFilterFunc

func SetEventFilterFunc(filterFunc eventFilterFunc, userdata interface{})

func SetHint

func SetHint(name, value string) bool

SetHint (https://wiki.libsdl.org/SDL_SetHint)

func SetHintWithPriority

func SetHintWithPriority(name, value string, hp HintPriority) bool

SetHintWithPriority (https://wiki.libsdl.org/SDL_SetHintWithPriority)

func SetModState

func SetModState(mod Keymod)

SetModState (https://wiki.libsdl.org/SDL_SetModState)

func SetRelativeMouseMode

func SetRelativeMouseMode(enabled bool) int

SetRelativeMouseMode (https://wiki.libsdl.org/SDL_SetRelativeMouseMode)

func SetTextInputRect

func SetTextInputRect(rect *Rect)

SetTextInputRect (https://wiki.libsdl.org/SDL_SetTextInputRect)

func ShowCursor

func ShowCursor(toggle int) int

ShowCursor (https://wiki.libsdl.org/SDL_ShowCursor)

func ShowMessageBox

func ShowMessageBox(data *MessageBoxData) (err error, buttonid int32)

ShowMessageBox (https://wiki.libsdl.org/SDL_ShowMessageBox)

func ShowSimpleMessageBox

func ShowSimpleMessageBox(flags uint32, title, message string, window *Window) error

ShowSimpleMessageBox (https://wiki.libsdl.org/SDL_ShowSimpleMessageBox)

func StartTextInput

func StartTextInput()

StartTextInput (https://wiki.libsdl.org/SDL_StartTextInput)

func StopTextInput

func StopTextInput()

StopTextInput (https://wiki.libsdl.org/SDL_StopTextInput)

func TryLockMutex

func TryLockMutex(mutex *Mutex) int

TryLockMutex (https://wiki.libsdl.org/SDL_TryLockMutex)

func UnlockAudio

func UnlockAudio()

UnlockAudio (https://wiki.libsdl.org/SDL_UnlockAudio)

func UnlockAudioDevice

func UnlockAudioDevice(dev AudioDeviceID)

UnlockAudioDevice (https://wiki.libsdl.org/SDL_UnlockAudioDevice)

func UnlockMutex

func UnlockMutex(mutex *Mutex) int

UnlockMutex (https://wiki.libsdl.org/SDL_UnlockMutex)

func Unsupported

func Unsupported()

func Update

func Update()

func VERSION

func VERSION(version *Version)

VERSION (https://wiki.libsdl.org/SDL_VERSION)

func VERSIONNUM

func VERSIONNUM(x, y, z int) int

VERSIONNUM (https://wiki.libsdl.org/SDL_VERSIONNUM)

func VERSION_ATLEAST

func VERSION_ATLEAST(x, y, z int) bool

VERSION_ATLEAST (https://wiki.libsdl.org/SDL_VERSION_ATLEAST)

func VideoInit

func VideoInit(driverName string) error

VideoInit (https://wiki.libsdl.org/SDL_VideoInit)

func VideoQuit

func VideoQuit()

VideoQuit (https://wiki.libsdl.org/SDL_VideoQuit)

func WasInit

func WasInit(flags uint32) uint32

WasInit (https://wiki.libsdl.org/SDL_WasInit)

Types

type AudioCVT

type AudioCVT struct {
	Needed    int32
	SrcFormat AudioFormat
	DstFormat AudioFormat
	RateIncr  float64
	Buf       unsafe.Pointer // use AudioCVT.BufAsSlice() for access via Go slice
	Len       int32
	LenCVT    int32
	LenMult   int32
	LenRatio  float64
	// contains filtered or unexported fields
}

AudioCVT (https://wiki.libsdl.org/SDL_AudioCVT)

func (*AudioCVT) AllocBuf

func (cvt *AudioCVT) AllocBuf(size uintptr)

func (AudioCVT) BufAsSlice

func (cvt AudioCVT) BufAsSlice() []byte

Access AudioCVT.buf as slice. NOTE: Must have used ConvertAudio() before usage because it uses LenCVT as slice length.

func (*AudioCVT) FreeBuf

func (cvt *AudioCVT) FreeBuf()

type AudioCallback

type AudioCallback C.SDL_AudioCallback

type AudioDeviceID

type AudioDeviceID uint32

func OpenAudioDevice

func OpenAudioDevice(device string, isCapture bool, desired, obtained *AudioSpec, allowedChanges int) (AudioDeviceID, error)

OpenAudioDevice (https://wiki.libsdl.org/SDL_OpenAudioDevice)

type AudioFilter

type AudioFilter C.SDL_AudioFilter

type AudioFormat

type AudioFormat uint16

AudioFormat (https://wiki.libsdl.org/SDL_AudioFormat)

func (AudioFormat) BitSize

func (format AudioFormat) BitSize() uint8

func (AudioFormat) IsBigEndian

func (format AudioFormat) IsBigEndian() bool

func (AudioFormat) IsFloat

func (format AudioFormat) IsFloat() bool

func (AudioFormat) IsInt

func (format AudioFormat) IsInt() bool

func (AudioFormat) IsLittleEndian

func (format AudioFormat) IsLittleEndian() bool

func (AudioFormat) IsSigned

func (format AudioFormat) IsSigned() bool

func (AudioFormat) IsUnsigned

func (format AudioFormat) IsUnsigned() bool

type AudioSpec

type AudioSpec struct {
	Freq     int32
	Format   AudioFormat
	Channels uint8
	Silence  uint8
	Samples  uint16
	Padding  uint16
	Size     uint32
	Callback AudioCallback
	UserData unsafe.Pointer
}

AudioSpec (https://wiki.libsdl.org/SDL_AudioSpec)

func LoadWAV

func LoadWAV(file string, spec *AudioSpec) ([]byte, *AudioSpec)

LoadWAV (https://wiki.libsdl.org/SDL_LoadWAV)

func LoadWAV_RW

func LoadWAV_RW(src *RWops, freeSrc bool, spec *AudioSpec) ([]byte, *AudioSpec)

LoadWAV_RW (https://wiki.libsdl.org/SDL_LoadWAV_RW)

type AudioStatus

type AudioStatus uint32

AudioStatus (https://wiki.libsdl.org/SDL_AudioStatus)

func GetAudioDeviceStatus

func GetAudioDeviceStatus(dev AudioDeviceID) AudioStatus

GetAudioDeviceStatus (https://wiki.libsdl.org/SDL_GetAudioDeviceStatus)

func GetAudioStatus

func GetAudioStatus() AudioStatus

GetAudioStatus (https://wiki.libsdl.org/SDL_GetAudioStatus)

type BlendMode

type BlendMode uint32

BlendMode (https://wiki.libsdl.org/SDL_BlendMode)

type CEvent

type CEvent struct {
	Type uint32
	// contains filtered or unexported fields
}

type ClipboardEvent

type ClipboardEvent struct {
	Type      uint32
	Timestamp uint32
}

type CocoaInfo

type CocoaInfo struct {
	Window unsafe.Pointer
}

type Color

type Color struct {
	R uint8
	G uint8
	B uint8
	A uint8
}

Color (https://wiki.libsdl.org/SDL_Color)

func (Color) RGBA

func (c Color) RGBA() (r, g, b, a uint32)

RGBA returns the alpha-premultiplied red, green, blue and alpha values for the color. Each value ranges within [0, 0xffff], but is represented by a uint32 so that multiplying by a blend factor up to 0xffff will not overflow.

An alpha-premultiplied color component c has been scaled by alpha (a), so has valid values 0 <= c <= a.

func (Color) Uint32

func (c Color) Uint32() uint32

type CommonEvent

type CommonEvent struct {
	Type      uint32
	Timestamp uint32
}

type Cond

type Cond struct {
	Lock     *Mutex
	Waiting  int
	Signals  int
	WaitSem  *Sem
	WaitDone *Sem
}

func CreateCond

func CreateCond() *Cond

CreateCond (https://wiki.libsdl.org/SDL_CreateCond)

type ControllerAxisEvent

type ControllerAxisEvent struct {
	Type      uint32
	Timestamp uint32
	Which     JoystickID
	Axis      uint8

	Value int16
	// contains filtered or unexported fields
}

type ControllerButtonEvent

type ControllerButtonEvent struct {
	Type      uint32
	Timestamp uint32
	Which     JoystickID
	Button    uint8
	State     uint8
	// contains filtered or unexported fields
}

type ControllerDeviceEvent

type ControllerDeviceEvent struct {
	Type      uint32
	Timestamp uint32
	Which     JoystickID
}

type Cursor

type Cursor C.SDL_Cursor

func CreateColorCursor

func CreateColorCursor(surface *Surface, hotX, hotY int) *Cursor

CreateColorCursor (https://wiki.libsdl.org/SDL_CreateColorCursor)

func CreateCursor

func CreateCursor(data, mask *uint8, w, h, hotX, hotY int) *Cursor

CreateCursor (https://wiki.libsdl.org/SDL_CreateCursor)

func CreateSystemCursor

func CreateSystemCursor(id SystemCursor) *Cursor

CreateSystemCursor (https://wiki.libsdl.org/SDL_CreateSystemCursor)

func GetCursor

func GetCursor() *Cursor

GetCursor (https://wiki.libsdl.org/SDL_GetCursor)

func GetDefaultCursor

func GetDefaultCursor() *Cursor

GetDefaultCursor (https://wiki.libsdl.org/SDL_GetDefaultCursor)

type DFBInfo

type DFBInfo struct {
	Dfb     unsafe.Pointer
	Window  unsafe.Pointer
	Surface unsafe.Pointer
}

type DisplayMode

type DisplayMode struct {
	Format      uint32
	W           int32
	H           int32
	RefreshRate int32
	DriverData  unsafe.Pointer
}

DisplayMode (https://wiki.libsdl.org/SDL_DisplayMode)

func GetClosestDisplayMode

func GetClosestDisplayMode(displayIndex int, mode *DisplayMode, closest *DisplayMode) (*DisplayMode, error)

GetClosestDisplayMode (https://wiki.libsdl.org/SDL_GetClosestDisplayMode)

type DollarGestureEvent

type DollarGestureEvent struct {
	Type       uint32
	Timestamp  uint32
	TouchID    TouchID
	GestureID  GestureID
	NumFingers uint32
	Error      float32
	X          float32
	Y          float32
}

DollarGestureEvent (https://wiki.libsdl.org/SDL_DollarGestureEvent)

type DropEvent

type DropEvent struct {
	Type      uint32
	Timestamp uint32
	File      unsafe.Pointer
	WindowID  uint32
}

DropEvent (https://wiki.libsdl.org/SDL_DropEvent)

type ErrorCode

type ErrorCode uint32

type Event

type Event interface{}

Event (https://wiki.libsdl.org/SDL_Event)

func PollEvent

func PollEvent() Event

PollEvent (https://wiki.libsdl.org/SDL_PollEvent)

func WaitEvent

func WaitEvent() Event

WaitEvent (https://wiki.libsdl.org/SDL_WaitEvent)

func WaitEventTimeout

func WaitEventTimeout(timeout int) Event

WaitEventTimeout (https://wiki.libsdl.org/SDL_WaitEventTimeout)

type EventAction

type EventAction C.SDL_eventaction

type EventFilter

type EventFilter interface {
	FilterEvent(e Event, userdata interface{}) bool
}

func GetEventFilter

func GetEventFilter() EventFilter

GetEventFilter (https://wiki.libsdl.org/SDL_GetEventFilter)

type EventWatchHandle

type EventWatchHandle uintptr

func AddEventWatch

func AddEventWatch(filter EventFilter, userdata interface{}) EventWatchHandle

AddEventWatch (https://wiki.libsdl.org/SDL_AddEventWatch)

func AddEventWatchFunc

func AddEventWatchFunc(filterFunc eventFilterFunc, userdata interface{}) EventWatchHandle

type Finger

type Finger struct {
	Id       FingerID
	X        float32
	Y        float32
	Pressure float32
}

func GetTouchFinger

func GetTouchFinger(t TouchID, index int) *Finger

GetTouchFinger (https://wiki.libsdl.org/SDL_GetTouchFinger)

type FingerID

type FingerID C.SDL_FingerID

type GLContext

type GLContext C.SDL_GLContext

func GL_CreateContext

func GL_CreateContext(window *Window) (GLContext, error)

GL_CreateContext (https://wiki.libsdl.org/SDL_GL_CreateContext)

type GameController

type GameController C.SDL_GameController

func GameControllerOpen

func GameControllerOpen(index int) *GameController

GameControllerOpen (https://wiki.libsdl.org/SDL_GameControllerOpen)

func (*GameController) Close

func (ctrl *GameController) Close()

GameController (https://wiki.libsdl.org/SDL_GameControllerClose)

func (*GameController) GetAttached

func (ctrl *GameController) GetAttached() bool

GameController (https://wiki.libsdl.org/SDL_GameControllerGetAttached)

func (*GameController) GetAxis

func (ctrl *GameController) GetAxis(axis GameControllerAxis) int16

GameController (https://wiki.libsdl.org/SDL_GameControllerGetAxis)

func (*GameController) GetButton

func (ctrl *GameController) GetButton(btn GameControllerButton) byte

GameController (https://wiki.libsdl.org/SDL_GameControllerGetButton)

func (*GameController) GetJoystick

func (ctrl *GameController) GetJoystick() *Joystick

GameController (https://wiki.libsdl.org/SDL_GameControllerGetJoystick)

func (*GameController) Name

func (ctrl *GameController) Name() string

GameController (https://wiki.libsdl.org/SDL_GameControllerName)

type GameControllerAxis

type GameControllerAxis C.SDL_GameControllerAxis

func GameControllerGetAxisFromString

func GameControllerGetAxisFromString(pchString string) GameControllerAxis

GameControllerGetAxisFromString (https://wiki.libsdl.org/SDL_GameControllerGetAxisFromString)

type GameControllerBindType

type GameControllerBindType C.SDL_GameControllerBindType

type GameControllerButton

type GameControllerButton C.SDL_GameControllerButton

func GameControllerGetButtonFromString

func GameControllerGetButtonFromString(pchString string) GameControllerButton

GameControllerGetButtonFromString (https://wiki.libsdl.org/SDL_GameControllerGetButtonFromString)

type GameControllerButtonBind

type GameControllerButtonBind C.SDL_GameControllerButtonBind

func (*GameControllerButtonBind) Axis

func (bind *GameControllerButtonBind) Axis() int

func (*GameControllerButtonBind) Button

func (bind *GameControllerButtonBind) Button() int

func (*GameControllerButtonBind) Hat

func (bind *GameControllerButtonBind) Hat() int

func (*GameControllerButtonBind) HatMask

func (bind *GameControllerButtonBind) HatMask() int

func (*GameControllerButtonBind) Type

func (bind *GameControllerButtonBind) Type() int

type GestureID

type GestureID C.SDL_GestureID

type Haptic

type Haptic C.SDL_Haptic

func HapticOpen

func HapticOpen(index int) *Haptic

HapticOpen (https://wiki.libsdl.org/SDL_HapticOpen)

func HapticOpenFromJoystick

func HapticOpenFromJoystick(joy *Joystick) *Haptic

HapticOpenFromJoystick (https://wiki.libsdl.org/SDL_HapticOpenFromJoystick)

func HapticOpenFromMouse

func HapticOpenFromMouse() *Haptic

HapticOpenFromMouse (https://wiki.libsdl.org/SDL_HapticOpenFromMouse)

func (*Haptic) Close

func (h *Haptic) Close()

Haptic (https://wiki.libsdl.org/SDL_HapticClose)

func (*Haptic) DestroyEffect

func (h *Haptic) DestroyEffect(effect int)

Haptic (https://wiki.libsdl.org/SDL_HapticDestroyEffect)

func (*Haptic) EffectSupported

func (h *Haptic) EffectSupported(he *HapticEffect) int

Haptic (https://wiki.libsdl.org/SDL_HapticEffectSupported)

func (*Haptic) GetEffectStatus

func (h *Haptic) GetEffectStatus(effect int) int

Haptic (https://wiki.libsdl.org/SDL_HapticGetEffectStatus)

func (*Haptic) NewEffect

func (h *Haptic) NewEffect(he *HapticEffect) int

Haptic (https://wiki.libsdl.org/SDL_HapticNewEffect)

func (*Haptic) NumAxes

func (h *Haptic) NumAxes() int

Haptic (https://wiki.libsdl.org/SDL_HapticNumAxes)

func (*Haptic) NumEffects

func (h *Haptic) NumEffects() int

Haptic (https://wiki.libsdl.org/SDL_HapticNumEffects)

func (*Haptic) NumEffectsPlaying

func (h *Haptic) NumEffectsPlaying() int

Haptic (https://wiki.libsdl.org/SDL_HapticNumEffectsPlaying)

func (*Haptic) Pause

func (h *Haptic) Pause() int

Haptic (https://wiki.libsdl.org/SDL_HapticPause)

func (*Haptic) Query

func (h *Haptic) Query() uint

Haptic (https://wiki.libsdl.org/SDL_HapticQuery)

func (*Haptic) RumbleInit

func (h *Haptic) RumbleInit() int

Haptic (https://wiki.libsdl.org/SDL_HapticRumbleInit)

func (*Haptic) RumblePlay

func (h *Haptic) RumblePlay(strength float32, length uint32) int

Haptic (https://wiki.libsdl.org/SDL_HapticRumblePlay)

func (*Haptic) RumbleStop

func (h *Haptic) RumbleStop() int

Haptic (https://wiki.libsdl.org/SDL_HapticRumbleStop)

func (*Haptic) RumbleSupported

func (h *Haptic) RumbleSupported() int

Haptic (https://wiki.libsdl.org/SDL_HapticRumbleSupported)

func (*Haptic) RunEffect

func (h *Haptic) RunEffect(effect int, iterations uint32) int

Haptic (https://wiki.libsdl.org/SDL_HapticRunEffect)

func (*Haptic) SetAutocenter

func (h *Haptic) SetAutocenter(autocenter int) int

Haptic (https://wiki.libsdl.org/SDL_HapticSetAutocenter)

func (*Haptic) SetGain

func (h *Haptic) SetGain(gain int) int

Haptic (https://wiki.libsdl.org/SDL_HapticSetGain)

func (*Haptic) StopAll

func (h *Haptic) StopAll() int

Haptic (https://wiki.libsdl.org/SDL_HapticStopAll)

func (*Haptic) StopEffect

func (h *Haptic) StopEffect(effect int) int

Haptic (https://wiki.libsdl.org/SDL_HapticStopEffect)

func (*Haptic) Unpause

func (h *Haptic) Unpause() int

Haptic (https://wiki.libsdl.org/SDL_HapticUnpause)

func (*Haptic) UpdateEffect

func (h *Haptic) UpdateEffect(effect int, data *HapticEffect) int

Haptic (https://wiki.libsdl.org/SDL_HapticUpdateEffect)

type HapticCondition

type HapticCondition struct {
	Type       uint16
	Direction  HapticDirection
	Length     uint32
	Delay      uint16
	Button     uint16
	Interval   uint16
	RightSat   [3]uint16
	LeftSat    [3]uint16
	RightCoeff [3]int16
	LeftCoeff  [3]int16
	Deadband   [3]uint16
	Center     [3]int16
}

HapticCondition (https://wiki.libsdl.org/SDL_HapticCondition)

type HapticConstant

type HapticConstant struct {
	Type         uint16
	Direction    HapticDirection
	Length       uint32
	Delay        uint16
	Button       uint16
	Interval     uint16
	Level        int16
	AttackLength uint16
	AttackLevel  uint16
	FadeLength   uint16
	FadeLevel    uint16
}

HapticConstant (https://wiki.libsdl.org/SDL_HapticConstant)

type HapticCustom

type HapticCustom struct {
	Type         uint16
	Direction    HapticDirection
	Length       uint32
	Delay        uint16
	Button       uint16
	Interval     uint16
	Channels     uint8
	Period       uint16
	Samples      uint16
	Data         *uint16
	AttackLength uint16
	AttackLevel  uint16
	FadeLength   uint16
	FadeLevel    uint16
}

HapticCustom (https://wiki.libsdl.org/SDL_HapticCustom)

type HapticDirection

type HapticDirection struct {
	Type byte
	// contains filtered or unexported fields
}

HapticDirection (https://wiki.libsdl.org/SDL_HapticDirection)

type HapticEffect

type HapticEffect C.SDL_HapticEffect

HapticEffect (https://wiki.libsdl.org/SDL_HapticEffect)

func (HapticEffect) Condition

func (he HapticEffect) Condition() *HapticCondition

func (HapticEffect) Constant

func (he HapticEffect) Constant() *HapticConstant

func (HapticEffect) Custom

func (he HapticEffect) Custom() *HapticCustom

func (HapticEffect) LeftRight

func (he HapticEffect) LeftRight() *HapticLeftRight

func (HapticEffect) Periodic

func (he HapticEffect) Periodic() *HapticPeriodic

func (HapticEffect) Ramp

func (he HapticEffect) Ramp() *HapticRamp

func (HapticEffect) SetType

func (he HapticEffect) SetType(typ uint16)

func (HapticEffect) Type

func (he HapticEffect) Type() uint16

type HapticLeftRight

type HapticLeftRight struct {
	Type           uint16
	Length         uint32
	LargeMagnitude uint16
	SmallMagnitude uint16
}

HapticLeftRight (https://wiki.libsdl.org/SDL_HapticLeftRight)

type HapticPeriodic

type HapticPeriodic struct {
	Type         uint16
	Direction    HapticDirection
	Length       uint32
	Delay        uint16
	Button       uint16
	Interval     uint16
	Period       uint16
	Magnitude    int16
	Offset       int16
	Phase        uint16
	AttackLength uint16
	AttackLevel  uint16
	FadeLength   uint16
	FadeLevel    uint16
}

HapticPeriodic (https://wiki.libsdl.org/SDL_HapticPeriodic)

type HapticRamp

type HapticRamp struct {
	Type         uint16
	Direction    HapticDirection
	Length       uint32
	Delay        uint16
	Button       uint16
	Interval     uint16
	Start        int16
	End          int16
	AttackLength uint16
	AttackLevel  uint16
	FadeLength   uint16
	FadeLevel    uint16
}

HapticRamp (https://wiki.libsdl.org/SDL_HapticRamp)

type JoyAxisEvent

type JoyAxisEvent struct {
	Type      uint32
	Timestamp uint32
	Which     JoystickID
	Axis      uint8

	Value int16
	// contains filtered or unexported fields
}

JoyAxisEvent (https://wiki.libsdl.org/SDL_JoyAxisEvent)

type JoyBallEvent

type JoyBallEvent struct {
	Type      uint32
	Timestamp uint32
	Which     JoystickID
	Ball      uint8

	XRel int16
	YRel int16
	// contains filtered or unexported fields
}

JoyBallEvent (https://wiki.libsdl.org/SDL_JoyBallEvent)

type JoyButtonEvent

type JoyButtonEvent struct {
	Type      uint32
	Timestamp uint32
	Which     JoystickID
	Button    uint8
	State     uint8
	// contains filtered or unexported fields
}

JoyButtonEvent (https://wiki.libsdl.org/SDL_JoyButtonEvent)

type JoyDeviceEvent

type JoyDeviceEvent struct {
	Type      uint32
	Timestamp uint32
	Which     JoystickID
}

type JoyHatEvent

type JoyHatEvent struct {
	Type      uint32
	Timestamp uint32
	Which     JoystickID
	Hat       uint8
	Value     uint8
	// contains filtered or unexported fields
}

JoyHatEvent (https://wiki.libsdl.org/SDL_JoyHatEvent)

type Joystick

type Joystick C.SDL_Joystick

func JoystickOpen

func JoystickOpen(index JoystickID) *Joystick

JoystickOpen (https://wiki.libsdl.org/SDL_JoystickOpen)

func (*Joystick) Close

func (joy *Joystick) Close()

Joystick (https://wiki.libsdl.org/SDL_JoystickClose)

func (*Joystick) GetAttached

func (joy *Joystick) GetAttached() bool

Joystick (https://wiki.libsdl.org/SDL_JoystickGetAttached)

func (*Joystick) GetAxis

func (joy *Joystick) GetAxis(axis int) int16

Joystick (https://wiki.libsdl.org/SDL_JoystickGetAxis)

func (*Joystick) GetBall

func (joy *Joystick) GetBall(ball int, dx, dy *int) int

Joystick (https://wiki.libsdl.org/SDL_JoystickGetBall)

func (*Joystick) GetButton

func (joy *Joystick) GetButton(button int) byte

Joystick (https://wiki.libsdl.org/SDL_JoystickGetButton)

func (*Joystick) GetGUID

func (joy *Joystick) GetGUID() JoystickGUID

Joystick (https://wiki.libsdl.org/SDL_JoystickGetGUID)

func (*Joystick) GetHat

func (joy *Joystick) GetHat(hat int) byte

Joystick (https://wiki.libsdl.org/SDL_JoystickGetHat)

func (*Joystick) InstanceID

func (joy *Joystick) InstanceID() JoystickID

Joystick (https://wiki.libsdl.org/SDL_JoystickInstanceID)

func (*Joystick) Name

func (joy *Joystick) Name() string

Joystick (https://wiki.libsdl.org/SDL_JoystickName)

func (*Joystick) NumAxes

func (joy *Joystick) NumAxes() int

Joystick (https://wiki.libsdl.org/SDL_JoystickNumAxes)

func (*Joystick) NumBalls

func (joy *Joystick) NumBalls() int

Joystick (https://wiki.libsdl.org/SDL_JoystickNumBalls)

func (*Joystick) NumButtons

func (joy *Joystick) NumButtons() int

Joystick (https://wiki.libsdl.org/SDL_JoystickNumButtons)

func (*Joystick) NumHats

func (joy *Joystick) NumHats() int

Joystick (https://wiki.libsdl.org/SDL_JoystickNumHats)

type JoystickGUID

type JoystickGUID C.SDL_JoystickGUID

func JoystickGetDeviceGUID

func JoystickGetDeviceGUID(index int) JoystickGUID

JoystickGetDeviceGUID (https://wiki.libsdl.org/SDL_JoystickGetDeviceGUID)

func JoystickGetGUIDFromString

func JoystickGetGUIDFromString(pchGUID string) JoystickGUID

JoystickGetGUIDFromString (https://wiki.libsdl.org/SDL_JoystickGetGUIDFromString)

type JoystickID

type JoystickID C.SDL_JoystickID

type KeyDownEvent

type KeyDownEvent struct {
	Type      uint32
	Timestamp uint32
	WindowID  uint32
	State     uint8
	Repeat    uint8

	Keysym Keysym
	// contains filtered or unexported fields
}

type KeyUpEvent

type KeyUpEvent struct {
	Type      uint32
	Timestamp uint32
	WindowID  uint32
	State     uint8
	Repeat    uint8

	Keysym Keysym
	// contains filtered or unexported fields
}

type Keycode

type Keycode C.SDL_Keycode

Keycode (https://wiki.libsdl.org/SDL_Keycode)

func GetKeyFromName

func GetKeyFromName(name string) Keycode

GetKeyFromName (https://wiki.libsdl.org/SDL_GetKeyFromName)

func GetKeyFromScancode

func GetKeyFromScancode(code Scancode) Keycode

GetKeyFromScancode (https://wiki.libsdl.org/SDL_GetKeyFromScancode)

type Keysym

type Keysym struct {
	Scancode Scancode
	Sym      Keycode
	Mod      uint16
	Unicode  uint32
}

Keysym (https://wiki.libsdl.org/SDL_Keysym)

type LogOutputFunction

type LogOutputFunction func(data interface{}, cat int, pri LogPriority, message string)

func LogGetOutputFunction

func LogGetOutputFunction() (LogOutputFunction, interface{})

LogGetOutputFunction (https://wiki.libsdl.org/SDL_LogGetOutputFunction)

type LogPriority

type LogPriority C.SDL_LogPriority

LogPriority (https://wiki.libsdl.org/SDL_LogPriority)

func LogGetPriority

func LogGetPriority(category int) LogPriority

LogGetPriority (https://wiki.libsdl.org/SDL_LogGetPriority)

type MessageBoxButtonData

type MessageBoxButtonData struct {
	Flags    uint32
	ButtonId int32
	Text     string
}

MessageBoxButtonData (https://wiki.libsdl.org/SDL_MessageBoxButtonData)

type MessageBoxColor

type MessageBoxColor struct {
	R uint8
	G uint8
	B uint8
}

MessageBoxColor (https://wiki.libsdl.org/SDL_MessageBoxColor)

type MessageBoxColorScheme

type MessageBoxColorScheme struct {
	Colors [5]MessageBoxColor
}

MessageBoxColorScheme (https://wiki.libsdl.org/SDL_MessageBoxColorScheme)

type MessageBoxData

type MessageBoxData struct {
	Flags       uint32
	Window      *Window
	Title       string
	Message     string
	NumButtons  int32
	Buttons     []MessageBoxButtonData
	ColorScheme *MessageBoxColorScheme
}

MessageBoxData (https://wiki.libsdl.org/SDL_MessageBoxData)

type MouseButtonEvent

type MouseButtonEvent struct {
	Type      uint32
	Timestamp uint32
	WindowID  uint32
	Which     uint32
	Button    uint8
	State     uint8

	X int32
	Y int32
	// contains filtered or unexported fields
}

MouseButtonEvent (https://wiki.libsdl.org/SDL_MouseButtonEvent)

type MouseMotionEvent

type MouseMotionEvent struct {
	Type      uint32
	Timestamp uint32
	WindowID  uint32
	Which     uint32
	State     uint32
	X         int32
	Y         int32
	XRel      int32
	YRel      int32
}

MouseMotionEvent (https://wiki.libsdl.org/SDL_MouseMotionEvent)

type MouseWheelEvent

type MouseWheelEvent struct {
	Type      uint32
	Timestamp uint32
	WindowID  uint32
	Which     uint32
	X         int32
	Y         int32
	Direction uint32
}

MouseWheelEvent (https://wiki.libsdl.org/SDL_MouseWheelEvent)

type MultiGestureEvent

type MultiGestureEvent struct {
	Type       uint32
	Timestamp  uint32
	TouchId    TouchID
	DTheta     float32
	DDist      float32
	X          float32
	Y          float32
	NumFingers uint16
	// contains filtered or unexported fields
}

MultiGestureEvent (https://wiki.libsdl.org/SDL_MultiGestureEvent)

type Mutex

type Mutex struct {
	Recursive int
	Owner     ThreadID
	Sem       *Sem
}

func CreateMutex

func CreateMutex() (*Mutex, error)

CreateMutex (https://wiki.libsdl.org/SDL_CreateMutex)

type OSEvent

type OSEvent struct {
	Type      uint32
	Timestamp uint32
}

type Palette

type Palette struct {
	Ncolors  int32
	Colors   *Color
	Version  uint32
	RefCount int32
}

Palette (https://wiki.libsdl.org/SDL_Palette)

func AllocPalette

func AllocPalette(ncolors int) (*Palette, error)

AllocPalette create a palette structure with the specified number of color entries. AllocPalette (https://wiki.libsdl.org/SDL_AllocPalette)

func (*Palette) Free

func (palette *Palette) Free()

Free frees a palette created with AllocPalette. Palette (https://wiki.libsdl.org/SDL_FreePalette)

func (*Palette) SetColors

func (palette *Palette) SetColors(colors []Color) error

SetColors sets a range of colors in a palette. Palette (https://wiki.libsdl.org/SDL_SetPaletteColors)

type PixelFormat

type PixelFormat struct {
	Format        uint32
	Palette       *Palette
	BitsPerPixel  uint8
	BytesPerPixel uint8

	Rmask    uint32
	Gmask    uint32
	Bmask    uint32
	Amask    uint32
	Rloss    uint8
	Gloss    uint8
	Bloss    uint8
	Aloss    uint8
	Rshift   uint8
	Gshift   uint8
	Bshift   uint8
	Ashift   uint8
	RefCount int32
	Next     *PixelFormat
	// contains filtered or unexported fields
}

PixelFormat (https://wiki.libsdl.org/SDL_PixelFormat)

func AllocFormat

func AllocFormat(format uint) (*PixelFormat, error)

AllocFormat creates a PixelFormat structure from a uint. AllocFormat (https://wiki.libsdl.org/SDL_AllocFormat)

func (*PixelFormat) Free

func (format *PixelFormat) Free()

Free frees a PixelFormat created by AllocFormat.

func (*PixelFormat) SetPalette

func (format *PixelFormat) SetPalette(palette *Palette) error

SetPalette sets the palette for format. PixelFormat (https://wiki.libsdl.org/SDL_SetPixelFormatPalette)

type Point

type Point struct {
	X int32
	Y int32
}

Point is a structure that defines a two demensional point. (https://wiki.libsdl.org/SDL_Point)

func (*Point) InRect

func (p *Point) InRect(r *Rect) bool

InRect checks if a point resides inside a rectangle (https://wiki.libsdl.org/SDL_PointInRect)

type QuitEvent

type QuitEvent struct {
	Type      uint32
	Timestamp uint32
}

QuitEvent (https://wiki.libsdl.org/SDL_QuitEvent)

type RWops

type RWops C.SDL_RWops

RWops (https://wiki.libsdl.org/SDL_RWops)

func AllocRW

func AllocRW() *RWops

AllocRW (https://wiki.libsdl.org/SDL_AllocRW)

func RWFromFile

func RWFromFile(file, mode string) *RWops

RWFromFile (https://wiki.libsdl.org/SDL_RWFromFile)

func RWFromMem

func RWFromMem(mem unsafe.Pointer, size int) *RWops

RWFromMem (https://wiki.libsdl.org/SDL_RWFromMem)

func (*RWops) FreeRW

func (area *RWops) FreeRW()

FreeRW (https://wiki.libsdl.org/SDL_FreeRW)

func (*RWops) RWclose

func (ctx *RWops) RWclose() error

RWclose (https://wiki.libsdl.org/SDL_RWclose)

func (*RWops) RWread

func (ctx *RWops) RWread(ptr unsafe.Pointer, size, maxnum uint) uint

RWread (https://wiki.libsdl.org/SDL_RWread)

func (*RWops) RWseek

func (ctx *RWops) RWseek(offset int64, whence int) int64

RWseek (https://wiki.libsdl.org/SDL_RWseek)

func (*RWops) RWsize

func (ctx *RWops) RWsize() int64

RWsize (https://wiki.libsdl.org/SDL_RWsize)

func (*RWops) RWtell

func (ctx *RWops) RWtell() int64

RWtell (https://wiki.libsdl.org/SDL_RWtell)

func (*RWops) RWwrite

func (ctx *RWops) RWwrite(ptr unsafe.Pointer, size, num uint) uint

RWwrite (https://wiki.libsdl.org/SDL_RWwrite)

func (*RWops) ReadBE16

func (src *RWops) ReadBE16() uint16

ReadBE16 (https://wiki.libsdl.org/SDL_ReadBE16)

func (*RWops) ReadBE32

func (src *RWops) ReadBE32() uint32

ReadBE32 (https://wiki.libsdl.org/SDL_ReadBE32)

func (*RWops) ReadBE64

func (src *RWops) ReadBE64() uint64

ReadBE64 (https://wiki.libsdl.org/SDL_ReadBE64)

func (*RWops) ReadLE16

func (src *RWops) ReadLE16() uint16

ReadLE16 (https://wiki.libsdl.org/SDL_ReadLE16)

func (*RWops) ReadLE32

func (src *RWops) ReadLE32() uint32

ReadLE32 (https://wiki.libsdl.org/SDL_ReadLE32)

func (*RWops) ReadLE64

func (src *RWops) ReadLE64() uint64

ReadLE64 (https://wiki.libsdl.org/SDL_ReadLE64)

func (*RWops) ReadU8

func (src *RWops) ReadU8() uint8

func (*RWops) WriteBE16

func (dst *RWops) WriteBE16(value uint16) uint

WriteBE16 (https://wiki.libsdl.org/SDL_WriteBE16)

func (*RWops) WriteBE32

func (dst *RWops) WriteBE32(value uint32) uint

WriteBE32 (https://wiki.libsdl.org/SDL_WriteBE32)

func (*RWops) WriteBE64

func (dst *RWops) WriteBE64(value uint64) uint

WriteBE64 (https://wiki.libsdl.org/SDL_WriteBE64)

func (*RWops) WriteLE16

func (dst *RWops) WriteLE16(value uint16) uint

WriteLE16 (https://wiki.libsdl.org/SDL_WriteLE16)

func (*RWops) WriteLE32

func (dst *RWops) WriteLE32(value uint32) uint

WriteLE32 (https://wiki.libsdl.org/SDL_WriteLE32)

func (*RWops) WriteLE64

func (dst *RWops) WriteLE64(value uint64) uint

WriteLE64 (https://wiki.libsdl.org/SDL_WriteLE64)

func (*RWops) WriteU8

func (dst *RWops) WriteU8(value uint8) uint

type Rect

type Rect struct {
	X int32
	Y int32
	W int32
	H int32
}

Rect is a structure that defines a rectangle, with the origin at the upper left. (https://wiki.libsdl.org/SDL_Rect)

func EnclosePoints

func EnclosePoints(points []Point, clip *Rect) (Rect, bool)

EnclosePoints calculates a minimal rectangle that encloses a set of points. (https://wiki.libsdl.org/SDL_EnclosePoints)

func (*Rect) Empty

func (a *Rect) Empty() bool

Empty checks whether a rectangle has no area. (https://wiki.libsdl.org/SDL_RectEmpty)

func (*Rect) Equals

func (a *Rect) Equals(b *Rect) bool

Equals checks whether two rectangles are equal. (https://wiki.libsdl.org/SDL_RectEquals)

func (*Rect) HasIntersection

func (a *Rect) HasIntersection(b *Rect) bool

HasIntersection determines whether two rectangles intersect. (https://wiki.libsdl.org/SDL_HasIntersection)

func (*Rect) Intersect

func (a *Rect) Intersect(b *Rect) (Rect, bool)

Intersect calculates the intersection of two rectangles. (https://wiki.libsdl.org/SDL_IntersectRect)

func (*Rect) IntersectLine

func (a *Rect) IntersectLine(X1, Y1, X2, Y2 *int) bool

IntersectLine calculates the intersection of a rectangle and a line segment. (https://wiki.libsdl.org/SDL_IntersectRectAndLine)

func (*Rect) Union

func (a *Rect) Union(b *Rect) Rect

Union calculates the union of two rectangles. (https://wiki.libsdl.org/SDL_UnionRect)

type RenderEvent

type RenderEvent struct {
	Type      uint32
	Timestamp uint32
}

type Renderer

type Renderer C.SDL_Renderer

func CreateRenderer

func CreateRenderer(window *Window, index int, flags uint32) (*Renderer, error)

CreateRenderer (https://wiki.libsdl.org/SDL_CreateRenderer)

func CreateSoftwareRenderer

func CreateSoftwareRenderer(surface *Surface) (*Renderer, error)

CreateSoftwareRenderer (https://wiki.libsdl.org/SDL_CreateSoftwareRenderer)

func (*Renderer) Clear

func (renderer *Renderer) Clear() error

Renderer (https://wiki.libsdl.org/SDL_RenderClear)

func (*Renderer) Copy

func (renderer *Renderer) Copy(texture *Texture, src, dst *Rect) error

Renderer (https://wiki.libsdl.org/SDL_RenderCopy)

func (*Renderer) CopyEx

func (renderer *Renderer) CopyEx(texture *Texture, src, dst *Rect, angle float64, center *Point, flip RendererFlip) error

Renderer (https://wiki.libsdl.org/SDL_RenderCopyEx)

func (*Renderer) CreateTexture

func (renderer *Renderer) CreateTexture(format uint32, access int, w int, h int) (*Texture, error)

Renderer (https://wiki.libsdl.org/SDL_CreateTexture)

func (*Renderer) CreateTextureFromSurface

func (renderer *Renderer) CreateTextureFromSurface(surface *Surface) (*Texture, error)

Renderer (https://wiki.libsdl.org/SDL_CreateTextureFromSurface)

func (*Renderer) Destroy

func (renderer *Renderer) Destroy()

Renderer (https://wiki.libsdl.org/SDL_DestroyRenderer)

func (*Renderer) DrawLine

func (renderer *Renderer) DrawLine(x1, y1, x2, y2 int) error

Renderer (https://wiki.libsdl.org/SDL_RenderDrawLine)

func (*Renderer) DrawLines

func (renderer *Renderer) DrawLines(points []Point) error

Renderer (https://wiki.libsdl.org/SDL_RenderDrawLines)

func (*Renderer) DrawPoint

func (renderer *Renderer) DrawPoint(x, y int) error

Renderer (https://wiki.libsdl.org/SDL_RenderDrawPoint)

func (*Renderer) DrawPoints

func (renderer *Renderer) DrawPoints(points []Point) error

Renderer (https://wiki.libsdl.org/SDL_RenderDrawPoints)

func (*Renderer) DrawRect

func (renderer *Renderer) DrawRect(rect *Rect) error

Renderer (https://wiki.libsdl.org/SDL_RenderDrawRect)

func (*Renderer) DrawRects

func (renderer *Renderer) DrawRects(rects []Rect) error

Renderer (https://wiki.libsdl.org/SDL_RenderDrawRects)

func (*Renderer) FillRect

func (renderer *Renderer) FillRect(rect *Rect) error

Renderer (https://wiki.libsdl.org/SDL_RenderFillRect)

func (*Renderer) FillRects

func (renderer *Renderer) FillRects(rects []Rect) error

Renderer (https://wiki.libsdl.org/SDL_RenderFillRects)

func (*Renderer) GetClipRect

func (renderer *Renderer) GetClipRect(rect *Rect)

Renderer (https://wiki.libsdl.org/SDL_RenderGetClipRect)

func (*Renderer) GetDrawBlendMode

func (renderer *Renderer) GetDrawBlendMode(bm *BlendMode) error

Renderer (https://wiki.libsdl.org/SDL_GetRenderDrawBlendMode)

func (*Renderer) GetDrawColor

func (renderer *Renderer) GetDrawColor() (r, g, b, a uint8, err error)

Renderer (https://wiki.libsdl.org/SDL_GetRenderDrawColor)

func (*Renderer) GetRenderTarget

func (renderer *Renderer) GetRenderTarget() *Texture

Renderer (https://wiki.libsdl.org/SDL_GetRenderTarget)

func (*Renderer) GetRendererInfo

func (renderer *Renderer) GetRendererInfo(info *RendererInfo) error

Renderer (https://wiki.libsdl.org/SDL_GetRendererInfo)

func (*Renderer) GetRendererOutputSize

func (renderer *Renderer) GetRendererOutputSize() (w, h int, err error)

Renderer (https://wiki.libsdl.org/SDL_GetRendererOutputSize)

func (*Renderer) GetScale

func (renderer *Renderer) GetScale() (scaleX, scaleY float32)

Renderer (https://wiki.libsdl.org/SDL_RenderGetScale)

func (*Renderer) GetViewport

func (renderer *Renderer) GetViewport(rect *Rect)

Renderer (https://wiki.libsdl.org/SDL_RenderGetViewport)

func (*Renderer) Present

func (renderer *Renderer) Present()

Renderer (https://wiki.libsdl.org/SDL_RenderPresent)

func (*Renderer) ReadPixels

func (renderer *Renderer) ReadPixels(rect *Rect, format uint32, pixels unsafe.Pointer, pitch int) error

Renderer (https://wiki.libsdl.org/SDL_RenderReadPixels)

func (*Renderer) RenderTargetSupported

func (renderer *Renderer) RenderTargetSupported() bool

Renderer (https://wiki.libsdl.org/SDL_RenderTargetSupported)

func (*Renderer) SetClipRect

func (renderer *Renderer) SetClipRect(rect *Rect) error

Renderer (https://wiki.libsdl.org/SDL_RenderSetClipRect)

func (*Renderer) SetDrawBlendMode

func (renderer *Renderer) SetDrawBlendMode(bm BlendMode) error

Renderer (https://wiki.libsdl.org/SDL_SetRenderDrawBlendMode)

func (*Renderer) SetDrawColor

func (renderer *Renderer) SetDrawColor(r, g, b, a uint8) error

Renderer (https://wiki.libsdl.org/SDL_SetRenderDrawColor)

func (*Renderer) SetDrawColorArray

func (renderer *Renderer) SetDrawColorArray(bs ...uint8) error

Custom variant of SetDrawColor

func (*Renderer) SetLogicalSize

func (renderer *Renderer) SetLogicalSize(w int, h int) error

Renderer (https://wiki.libsdl.org/SDL_RenderSetLogicalSize)

func (*Renderer) SetRenderTarget

func (renderer *Renderer) SetRenderTarget(texture *Texture) error

Renderer (https://wiki.libsdl.org/SDL_SetRenderTarget)

func (*Renderer) SetScale

func (renderer *Renderer) SetScale(scaleX, scaleY float32) error

Renderer (https://wiki.libsdl.org/SDL_RenderSetScale)

func (*Renderer) SetViewport

func (renderer *Renderer) SetViewport(rect *Rect) error

Renderer (https://wiki.libsdl.org/SDL_RenderSetViewport)

type RendererFlip

type RendererFlip uint32

RendererFlip (https://wiki.libsdl.org/SDL_RendererFlip)

type RendererInfo

type RendererInfo struct {
	Name string
	RendererInfoData
}

RendererInfo (https://wiki.libsdl.org/SDL_RendererInfo)

type RendererInfoData

type RendererInfoData struct {
	Flags             uint32
	NumTextureFormats uint32
	TextureFormats    [16]int32
	MaxTextureWidth   int32
	MaxTextureHeight  int32
}

type SW_YUVTexture

type SW_YUVTexture struct {
	Format       uint32
	TargetFormat uint32
	W            int
	H            int
	Pixels       *uint8
	ColorTab     *int
	Rgb2Pix      *uint32
	Display1X    unsafe.Pointer
	Display2x    unsafe.Pointer
	Pitches      [3]uint16
	Planes       *[3]uint8
	Stretch      *Surface
	Display      *Surface
}

type Scancode

type Scancode uint32

Scancode (https://wiki.libsdl.org/SDL_Scancode)

func GetScancodeFromKey

func GetScancodeFromKey(code Keycode) Scancode

GetScancodeFromKey (https://wiki.libsdl.org/SDL_GetScancodeFromKey)

func GetScancodeFromName

func GetScancodeFromName(name string) Scancode

GetScancodeFromName (https://wiki.libsdl.org/SDL_GetScancodeFromName)

type Sem

type Sem struct {
	Count        uint32
	WaitersCount uint32
	CountLock    *Mutex
	CountNonzero *Cond
}

func CreateSemaphore

func CreateSemaphore(initialValue uint32) (*Sem, error)

CreateSemaphore (https://wiki.libsdl.org/SDL_CreateSemaphore)

type SharedObject

type SharedObject uintptr

func LoadObject

func LoadObject(sofile string) SharedObject

LoadObject (https://wiki.libsdl.org/SDL_LoadObject)

func (SharedObject) LoadFunction

func (handle SharedObject) LoadFunction(name string) unsafe.Pointer

LoadFunction (https://wiki.libsdl.org/SDL_LoadFunction)

func (SharedObject) Unload

func (handle SharedObject) Unload()

UnloadObject (https://wiki.libsdl.org/SDL_UnloadObject)

type Surface

type Surface struct {
	Flags  uint32
	Format *PixelFormat
	W      int32
	H      int32
	Pitch  int32

	UserData unsafe.Pointer
	Locked   int32
	LockData unsafe.Pointer
	ClipRect Rect

	RefCount int32
	// contains filtered or unexported fields
}

Surface (https://wiki.libsdl.org/SDL_Surface)

func CreateRGBSurface

func CreateRGBSurface(flags uint32, width, height, depth int32, Rmask, Gmask, Bmask, Amask uint32) (*Surface, error)

CreateRGBSurface (https://wiki.libsdl.org/SDL_CreateRGBSurface)

func CreateRGBSurfaceFrom

func CreateRGBSurfaceFrom(pixels unsafe.Pointer, width, height, depth, pitch int, Rmask, Gmask, Bmask, Amask uint32) (*Surface, error)

CreateRGBSurfaceFrom (https://wiki.libsdl.org/SDL_CreateRGBSurfaceFrom)

func LoadBMP

func LoadBMP(file string) (*Surface, error)

LoadBMP (https://wiki.libsdl.org/SDL_LoadBMP)

func LoadBMP_RW

func LoadBMP_RW(src *RWops, freeSrc int) (*Surface, error)

LoadBMP_RW (https://wiki.libsdl.org/SDL_LoadBMP_RW)

func (*Surface) Blit

func (src *Surface) Blit(srcRect *Rect, dst *Surface, dstRect *Rect) error

Surface (https://wiki.libsdl.org/SDL_BlitSurface)

func (*Surface) BlitScaled

func (src *Surface) BlitScaled(srcRect *Rect, dst *Surface, dstRect *Rect) error

Surface (https://wiki.libsdl.org/SDL_BlitScaled)

func (*Surface) BytesPerPixel

func (surface *Surface) BytesPerPixel() int

func (*Surface) Convert

func (surface *Surface) Convert(fmt *PixelFormat, flags uint32) (*Surface, error)

Surface (https://wiki.libsdl.org/SDL_ConvertSurface)

func (*Surface) ConvertFormat

func (surface *Surface) ConvertFormat(pixelFormat uint32, flags uint32) (*Surface, error)

Surface (https://wiki.libsdl.org/SDL_ConvertSurfaceFormat)

func (*Surface) Data

func (surface *Surface) Data() unsafe.Pointer

func (*Surface) FillRect

func (surface *Surface) FillRect(rect *Rect, color uint32) error

Surface (https://wiki.libsdl.org/SDL_FillRect)

func (*Surface) FillRects

func (surface *Surface) FillRects(rects []Rect, color uint32) error

Surface (https://wiki.libsdl.org/SDL_FillRects)

func (*Surface) Free

func (surface *Surface) Free()

Surface (https://wiki.libsdl.org/SDL_FreeSurface)

func (*Surface) GetAlphaMod

func (surface *Surface) GetAlphaMod() (alpha uint8, err error)

Surface (https://wiki.libsdl.org/SDL_GetSurfaceAlphaMod)

func (*Surface) GetBlendMode

func (surface *Surface) GetBlendMode() (bm BlendMode, err error)

Surface (https://wiki.libsdl.org/SDL_GetSurfaceBlendMode)

func (*Surface) GetClipRect

func (surface *Surface) GetClipRect(rect *Rect)

Surface (https://wiki.libsdl.org/SDL_GetClipRect)

func (*Surface) GetColorKey

func (surface *Surface) GetColorKey() (key uint32, err error)

Surface (https://wiki.libsdl.org/SDL_GetColorKey)

func (*Surface) GetColorMod

func (surface *Surface) GetColorMod() (r, g, b uint8, err error)

Surface (https://wiki.libsdl.org/SDL_GetSurfaceColorMod)

func (*Surface) Lock

func (surface *Surface) Lock() error

Surface (https://wiki.libsdl.org/SDL_LockSurface)

func (*Surface) LowerBlit

func (src *Surface) LowerBlit(srcRect *Rect, dst *Surface, dstRect *Rect) error

Surface (https://wiki.libsdl.org/SDL_LowerBlit)

func (*Surface) LowerBlitScaled

func (src *Surface) LowerBlitScaled(srcRect *Rect, dst *Surface, dstRect *Rect) error

Surface (https://wiki.libsdl.org/SDL_LowerBlitScaled)

func (*Surface) MustLock

func (surface *Surface) MustLock() bool

Surface (https://wiki.libsdl.org/SDL_MustLock)

func (*Surface) PixelNum

func (surface *Surface) PixelNum() int

func (*Surface) Pixels

func (surface *Surface) Pixels() []byte

func (*Surface) SaveBMP

func (surface *Surface) SaveBMP(file string) error

Surface (https://wiki.libsdl.org/SDL_SaveBMP)

func (*Surface) SaveBMP_RW

func (surface *Surface) SaveBMP_RW(dst *RWops, freeDst int) error

Surface (https://wiki.libsdl.org/SDL_SaveBMP_RW)

func (*Surface) SetAlphaMod

func (surface *Surface) SetAlphaMod(alpha uint8) error

Surface (https://wiki.libsdl.org/SDL_SetSurfaceAlphaMod)

func (*Surface) SetBlendMode

func (surface *Surface) SetBlendMode(bm BlendMode) error

Surface (https://wiki.libsdl.org/SDL_SetSurfaceBlendMode)

func (*Surface) SetClipRect

func (surface *Surface) SetClipRect(rect *Rect) bool

Surface (https://wiki.libsdl.org/SDL_SetClipRect)

func (*Surface) SetColorKey

func (surface *Surface) SetColorKey(flag int, key uint32) error

Surface (https://wiki.libsdl.org/SDL_SetColorKey)

func (*Surface) SetColorMod

func (surface *Surface) SetColorMod(r, g, b uint8) error

Surface (https://wiki.libsdl.org/SDL_SetSurfaceColorMod)

func (*Surface) SetPalette

func (surface *Surface) SetPalette(palette *Palette) error

Surface (https://wiki.libsdl.org/SDL_SetSurfacePalette)

func (*Surface) SetRLE

func (surface *Surface) SetRLE(flag int) error

Surface (https://wiki.libsdl.org/SDL_SetSurfaceRLE)

func (*Surface) SoftStretch

func (src *Surface) SoftStretch(srcRect *Rect, dst *Surface, dstRect *Rect) error

Surface (https://wiki.libsdl.org/SDL_SoftStretch)

func (*Surface) Unlock

func (surface *Surface) Unlock()

Surface (https://wiki.libsdl.org/SDL_UnlockSurface)

func (*Surface) UpperBlit

func (src *Surface) UpperBlit(srcRect *Rect, dst *Surface, dstRect *Rect) error

Surface (https://wiki.libsdl.org/SDL_UpperBlit)

func (*Surface) UpperBlitScaled

func (src *Surface) UpperBlitScaled(srcRect *Rect, dst *Surface, dstRect *Rect) error

Surface (https://wiki.libsdl.org/SDL_UpperBlitScaled)

type SysWMEvent

type SysWMEvent struct {
	Type      uint32
	Timestamp uint32
	// contains filtered or unexported fields
}

SysWMEvent (https://wiki.libsdl.org/SDL_SysWMEvent)

type SysWMInfo

type SysWMInfo struct {
	Version   Version
	Subsystem uint32
	// contains filtered or unexported fields
}

SysWMInfo (https://wiki.libsdl.org/SDL_SysWMinfo)

func (*SysWMInfo) GetCocoaInfo

func (info *SysWMInfo) GetCocoaInfo() *CocoaInfo

func (*SysWMInfo) GetDFBInfo

func (info *SysWMInfo) GetDFBInfo() *DFBInfo

func (*SysWMInfo) GetUIKitInfo

func (info *SysWMInfo) GetUIKitInfo() *UIKitInfo

func (*SysWMInfo) GetWindowsInfo

func (info *SysWMInfo) GetWindowsInfo() *WindowsInfo

func (*SysWMInfo) GetX11Info

func (info *SysWMInfo) GetX11Info() *X11Info

type SystemCursor

type SystemCursor C.SDL_SystemCursor

type TextEditingEvent

type TextEditingEvent struct {
	Type      uint32
	Timestamp uint32
	WindowID  uint32
	Text      [C.SDL_TEXTINPUTEVENT_TEXT_SIZE]byte
	Start     int32
	Length    int32
}

TextEditingEvent (https://wiki.libsdl.org/SDL_TextEditingEvent)

type TextInputEvent

type TextInputEvent struct {
	Type      uint32
	Timestamp uint32
	WindowID  uint32
	Text      [C.SDL_TEXTINPUTEVENT_TEXT_SIZE]byte
}

TextInputEvent (https://wiki.libsdl.org/SDL_TextInputEvent)

type Texture

type Texture C.SDL_Texture

Texture (https://wiki.libsdl.org/SDL_Texture)

func (*Texture) Destroy

func (texture *Texture) Destroy()

Texture (https://wiki.libsdl.org/SDL_DestroyTexture)

func (*Texture) GL_BindTexture

func (texture *Texture) GL_BindTexture(texw, texh *float32) error

func (*Texture) GL_UnbindTexture

func (texture *Texture) GL_UnbindTexture() error

func (*Texture) GetAlphaMod

func (texture *Texture) GetAlphaMod() (alpha uint8, err error)

Texture (https://wiki.libsdl.org/SDL_GetTextureAlphaMod)

func (*Texture) GetBlendMode

func (texture *Texture) GetBlendMode() (bm BlendMode, err error)

Texture (https://wiki.libsdl.org/SDL_GetTextureBlendMode)

func (*Texture) Lock

func (texture *Texture) Lock(rect *Rect, pixels *unsafe.Pointer, pitch *int) error

Texture (https://wiki.libsdl.org/SDL_LockTexture)

func (*Texture) Query

func (texture *Texture) Query() (uint32, int, int32, int32, error)

Texture (https://wiki.libsdl.org/SDL_QueryTexture)

func (*Texture) SetAlphaMod

func (texture *Texture) SetAlphaMod(alpha uint8) error

Texture (https://wiki.libsdl.org/SDL_SetTextureAlphaMod)

func (*Texture) SetBlendMode

func (texture *Texture) SetBlendMode(bm BlendMode) error

Texture (https://wiki.libsdl.org/SDL_SetTextureBlendMode)

func (*Texture) SetColorMod

func (texture *Texture) SetColorMod(r uint8, g uint8, b uint8) error

Texture (https://wiki.libsdl.org/SDL_SetTextureColorMod)

func (*Texture) Unlock

func (texture *Texture) Unlock()

Texture (https://wiki.libsdl.org/SDL_UnlockTexture)

func (*Texture) Update

func (texture *Texture) Update(rect *Rect, pixels unsafe.Pointer, pitch int) error

Texture (https://wiki.libsdl.org/SDL_UpdateTexture)

type ThreadID

type ThreadID uint64

type TouchFingerEvent

type TouchFingerEvent struct {
	Type      uint32
	Timestamp uint32
	TouchID   TouchID
	FingerID  FingerID
	X         float32
	Y         float32
	DX        float32
	DY        float32
	Pressure  float32
}

TouchFingerEvent (https://wiki.libsdl.org/SDL_TouchFingerEvent)

type TouchID

type TouchID C.SDL_TouchID

func GetTouchDevice

func GetTouchDevice(index int) TouchID

GetTouchDevice (https://wiki.libsdl.org/SDL_GetTouchDevice)

type UIKitInfo

type UIKitInfo struct {
	Window unsafe.Pointer
}

type UserEvent

type UserEvent struct {
	Type      uint32
	Timestamp uint32
	WindowID  uint32
	Code      int32
	Data1     unsafe.Pointer
	Data2     unsafe.Pointer
}

UserEvent (https://wiki.libsdl.org/SDL_UserEvent)

type Version

type Version struct {
	Major uint8
	Minor uint8
	Patch uint8
}

Version (https://wiki.libsdl.org/SDL_Version)

type Window

type Window C.SDL_Window

func CreateWindow

func CreateWindow(title string, x int, y int, w int, h int, flags uint32) (*Window, error)

CreateWindow (https://wiki.libsdl.org/SDL_CreateWindow)

func CreateWindowFrom

func CreateWindowFrom(data unsafe.Pointer) (*Window, error)

CreateWindowFrom (https://wiki.libsdl.org/SDL_CreateWindowFrom)

func GetKeyboardFocus

func GetKeyboardFocus() *Window

GetKeyboardFocus (https://wiki.libsdl.org/SDL_GetKeyboardFocus)

func GetMouseFocus

func GetMouseFocus() *Window

GetMouseFocus (https://wiki.libsdl.org/SDL_GetMouseFocus)

func GetWindowFromID

func GetWindowFromID(id uint32) (*Window, error)

GetWindowFromID (https://wiki.libsdl.org/SDL_GetWindowFromID)

func (*Window) Destroy

func (window *Window) Destroy()

Window (https://wiki.libsdl.org/SDL_DestroyWindow)

func (*Window) GetBrightness

func (window *Window) GetBrightness() float32

Window (https://wiki.libsdl.org/SDL_GetWindowBrightness)

func (*Window) GetData

func (window *Window) GetData(name string) unsafe.Pointer

Window (https://wiki.libsdl.org/SDL_GetWindowData)

func (*Window) GetDisplayIndex

func (window *Window) GetDisplayIndex() (int, error)

Window (https://wiki.libsdl.org/SDL_GetWindowDisplayIndex)

func (*Window) GetDisplayMode

func (window *Window) GetDisplayMode(mode *DisplayMode) error

Window (https://wiki.libsdl.org/SDL_GetWindowDisplayMode)

func (*Window) GetFlags

func (window *Window) GetFlags() uint32

Window (https://wiki.libsdl.org/SDL_GetWindowFlags)

func (*Window) GetGammaRamp

func (window *Window) GetGammaRamp() (red, green, blue *[256]uint16, err error)

Window (https://wiki.libsdl.org/SDL_GetWindowGammaRamp)

func (*Window) GetGrab

func (window *Window) GetGrab() bool

Window (https://wiki.libsdl.org/SDL_GetWindowGrab)

func (*Window) GetID

func (window *Window) GetID() uint32

Window (https://wiki.libsdl.org/SDL_GetWindowID)

func (*Window) GetMaximumSize

func (window *Window) GetMaximumSize() (w, h int)

Window (https://wiki.libsdl.org/SDL_GetWindowMaximumSize)

func (*Window) GetMinimumSize

func (window *Window) GetMinimumSize() (w, h int)

Window (https://wiki.libsdl.org/SDL_GetWindowMinimumSize)

func (*Window) GetPixelFormat

func (window *Window) GetPixelFormat() (uint32, error)

Window (https://wiki.libsdl.org/SDL_GetWindowPixelFormat)

func (*Window) GetPosition

func (window *Window) GetPosition() (x, y int)

Window (https://wiki.libsdl.org/SDL_GetWindowPosition)

func (*Window) GetRenderer

func (window *Window) GetRenderer() (*Renderer, error)

Window (https://wiki.libsdl.org/SDL_GetRenderer)

func (*Window) GetSize

func (window *Window) GetSize() (w, h int)

Window (https://wiki.libsdl.org/SDL_GetWindowSize)

func (*Window) GetSurface

func (window *Window) GetSurface() (*Surface, error)

Window (https://wiki.libsdl.org/SDL_GetWindowSurface)

func (*Window) GetTitle

func (window *Window) GetTitle() string

Window (https://wiki.libsdl.org/SDL_GetWindowTitle)

func (*Window) GetWMInfo

func (window *Window) GetWMInfo() (*SysWMInfo, error)

Window (https://wiki.libsdl.org/SDL_GetWindowWMInfo)

func (*Window) Hide

func (window *Window) Hide()

Window (https://wiki.libsdl.org/SDL_HideWindow)

func (*Window) Maximize

func (window *Window) Maximize()

Window (https://wiki.libsdl.org/SDL_MaximizeWindow)

func (*Window) Minimize

func (window *Window) Minimize()

Window (https://wiki.libsdl.org/SDL_MinimizeWindow)

func (*Window) Raise

func (window *Window) Raise()

Window (https://wiki.libsdl.org/SDL_RaiseWindow)

func (*Window) Restore

func (window *Window) Restore()

Window (https://wiki.libsdl.org/SDL_RestoreWindow)

func (*Window) SetBordered

func (window *Window) SetBordered(bordered bool)

Window (https://wiki.libsdl.org/SDL_SetWindowBordered)

func (*Window) SetBrightness

func (window *Window) SetBrightness(brightness float32) error

Window (https://wiki.libsdl.org/SDL_SetWindowBrightness)

func (*Window) SetData

func (window *Window) SetData(name string, userdata unsafe.Pointer) unsafe.Pointer

Window (https://wiki.libsdl.org/SDL_SetWindowData)

func (*Window) SetDisplayMode

func (window *Window) SetDisplayMode(mode *DisplayMode) error

Window (https://wiki.libsdl.org/SDL_SetWindowDisplayMode)

func (*Window) SetFullscreen

func (window *Window) SetFullscreen(flags uint32) error

Window (https://wiki.libsdl.org/SDL_SetWindowFullscreen)

func (*Window) SetGammaRamp

func (window *Window) SetGammaRamp(red, green, blue *[256]uint16) error

Window (https://wiki.libsdl.org/SDL_SetWindowGammaRamp)

func (*Window) SetGrab

func (window *Window) SetGrab(grabbed bool)

Window (https://wiki.libsdl.org/SDL_SetWindowGrab)

func (*Window) SetIcon

func (window *Window) SetIcon(icon *Surface)

Window (https://wiki.libsdl.org/SDL_SetWindowIcon)

func (*Window) SetMaximumSize

func (window *Window) SetMaximumSize(maxW int, maxH int)

Window (https://wiki.libsdl.org/SDL_SetWindowMaximumSize)

func (*Window) SetMinimumSize

func (window *Window) SetMinimumSize(minW int, minH int)

Window (https://wiki.libsdl.org/SDL_SetWindowMinimumSize)

func (*Window) SetPosition

func (window *Window) SetPosition(x int, y int)

Window (https://wiki.libsdl.org/SDL_SetWindowPosition)

func (*Window) SetSize

func (window *Window) SetSize(w int, h int)

Window (https://wiki.libsdl.org/SDL_SetWindowSize)

func (*Window) SetTitle

func (window *Window) SetTitle(title string)

Window (https://wiki.libsdl.org/SDL_SetWindowTitle)

func (*Window) Show

func (window *Window) Show()

Window (https://wiki.libsdl.org/SDL_ShowWindow)

func (*Window) UpdateSurface

func (window *Window) UpdateSurface() error

Window (https://wiki.libsdl.org/SDL_UpdateWindowSurface)

func (*Window) UpdateSurfaceRects

func (window *Window) UpdateSurfaceRects(rects []Rect) error

Window (https://wiki.libsdl.org/SDL_UpdateWindowSurfaceRects)

func (*Window) WarpMouseInWindow

func (window *Window) WarpMouseInWindow(x, y int)

Window (https://wiki.libsdl.org/SDL_WarpMouseInWindow)

type WindowEvent

type WindowEvent struct {
	Type      uint32
	Timestamp uint32
	WindowID  uint32
	Event     uint8

	Data1 int32
	Data2 int32
	// contains filtered or unexported fields
}

WindowEvent (https://wiki.libsdl.org/SDL_WindowEvent)

type WindowsInfo

type WindowsInfo struct {
	Window unsafe.Pointer
}

type X11Info

type X11Info struct {
	Display unsafe.Pointer
	Window  uint
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL