Documentation
¶
Index ¶
- Constants
- func AudioInit(driver_name string) int
- func AudioQuit()
- func Btoi(b bool) int
- func BuildAudioCVT(cvt *AudioCVT, src_format AudioFormat, src_channels uint8, src_rate int, ...) int
- func Button(flag uint32) uint32
- func ButtonLMask() uint32
- func ButtonMMask() uint32
- func ButtonRMask() uint32
- func ButtonX1Mask() uint32
- func ButtonX2Mask() uint32
- func COMPILEDVERSION() int
- func ClearError()
- func CloseAudio()
- func CloseAudioDevice(dev AudioDeviceID)
- func ConvertAudio(cvt *AudioCVT) int
- func ConvertPixels(width, height int, src_format uint32, src unsafe.Pointer, src_pitch int, ...) int
- func CreateWindowAndRenderer(w, h int, flags uint32) (*Window, *Renderer)
- func Delay(ms uint32)
- func DisableScreenSaver()
- func EnableScreenSaver()
- func EnclosePoints(points *Point, count int, clip, result *Rect) bool
- func Endian() int
- func Error(code int)
- func EventState(type_ uint32, state int) uint8
- func FlushEvent(type_ uint32)
- func FlushEvents(minType, maxType uint32)
- func FreeCursor(cursor *Cursor)
- func FreeWAV(audio_buf *uint8)
- func GL_DeleteContext(context GLContext)
- func GL_ExtensionSupported(extension string) bool
- func GL_GetAttribute(attribute uint32, value *int) int
- func GL_GetProcAddress(proc string) unsafe.Pointer
- func GL_GetSwapInterval() int
- func GL_LoadLibrary(path string) int
- func GL_MakeCurrent(window *Window, glcontext GLContext) int
- func GL_SetAttribute(attribute uint32, value int) int
- func GL_SetSwapInterval(interval int) int
- func GL_SwapWindow(window *Window)
- func GL_UnloadLibrary()
- func GameControllerAddMapping(mappingString string) int
- func GameControllerEventState(state int) int
- func GameControllerGetStringForAxis(axis GameControllerAxis) string
- func GameControllerGetStringForButton(button GameControllerButton) string
- func GameControllerMapping(gamecontroller *GameController) string
- func GameControllerMappingForGUID(guid JoystickGUID) string
- func GameControllerNameForIndex(joystick_index int) string
- func GameControllerUpdate()
- func GetAudioDeviceName(index, iscapture int) string
- func GetAudioDriver(index int) string
- func GetCPUCacheLineSize() int
- func GetCPUCount() int
- func GetClipboardText() string
- func GetCurrentAudioDriver() string
- func GetCurrentDisplayMode(displayIndex int, mode *DisplayMode) int
- func GetCurrentVideoDriver() string
- func GetDesktopDisplayMode(displayIndex int, mode *DisplayMode) int
- func GetDisplayMode(displayIndex int, modeIndex int, mode *DisplayMode) int
- func GetError() error
- func GetEventState(type_ uint32) uint8
- func GetKeyName(key Keycode) string
- func GetKeyboardState() []uint8
- func GetMouseState(x, y *int) uint32
- func GetNumAudioDevices(iscapture int) int
- func GetNumAudioDrivers() int
- func GetNumDisplayModes(displayIndex int) int
- func GetNumRenderDrivers() int
- func GetNumTouchDevices() int
- func GetNumTouchFingers(touchId TouchID) int
- func GetNumVideoDrivers() int
- func GetPerformanceCounter() uint64
- func GetPerformanceFrequency() uint64
- func GetPlatform() string
- func GetRelativeMouseMode() bool
- func GetRelativeMouseState(x, y *int) uint32
- func GetRenderDriverInfo(index int, info *RendererInfo) int
- func GetRevision() string
- func GetRevisionNumber() int
- func GetScancodeName(scancode Scancode) string
- func GetTicks() uint32
- func GetVersion(v *Version)
- func GetVideoDriver(index int) string
- func GetWindowDisplayIndex(window *Window) int
- func GetWindowDisplayMode(window *Window, mode *DisplayMode) int
- func HapticIndex(haptic *Haptic) int
- func HapticName(device_index int) string
- func HapticOpened(device_index int) int
- func Has3DNow() bool
- func HasAltiVec() bool
- func HasClipboardText() bool
- func HasEvent(type_ uint32) bool
- func HasEvents(minType, maxType uint32) bool
- func HasMMX() bool
- func HasRDTSC() bool
- func HasSSE() bool
- func HasSSE2() bool
- func HasSSE3() bool
- func HasSSE41() bool
- func HasSSE42() bool
- func HasScreenKeyboardSupport() bool
- func Init(flags uint32) int
- func InitSubSystem(flags uint32) int
- func IsGameController(joystick_index int) bool
- func IsScreenKeyboardShown(window *Window) bool
- func IsScreenSaverEnabled() bool
- func IsTextInputActive() bool
- func Itob(i int) bool
- func JoystickEventState(state int) int
- func JoystickGetGUIDString(guid JoystickGUID, pszGUID string, cbGUID int)
- func JoystickIsHaptic(joystick *Joystick) int
- func JoystickNameForIndex(device_index int) string
- func LoadDollarTemplates(touchId TouchID, src *RWops) int
- func LoadFunction(handle unsafe.Pointer, name string) unsafe.Pointer
- func LoadObject(sofile string) unsafe.Pointer
- func LockAudio()
- func LockAudioDevice(dev AudioDeviceID)
- func LogResetPriorities()
- func LogSetAllPriority(priority LogPriority)
- func LogSetPriority(category int, priority LogPriority)
- func MixAudio(dst, src *uint8, len_ uint32, volume int)
- func MixAudioFormat(dst, src *uint8, format AudioFormat, len_ uint32, volume int)
- func MouseIsHaptic() int
- func NumHaptics() int
- func NumJoysticks() int
- func OpenAudio(desired, obtained *AudioSpec) int
- func OpenAudioDevice(device string, iscapture int, desired, obtained *AudioSpec, ...) int
- func OutOfMemory()
- func PauseAudio(pause_on int)
- func PauseAudioDevice(dev AudioDeviceID, pause_on int)
- func PeepEvents(events []Event, action, minType, maxType uint32) int
- func PumpEvents()
- func PushEvent(event Event) int
- func QueryTexture(texture *Texture, format *uint32, access *int, w *int, h *int) int
- func Quit()
- func QuitSubSystem(flags uint32)
- func RecordGesture(touchId TouchID) int
- func RegisterEvents(numevents int) uint32
- func SaveAllDollarTemplates(src *RWops) int
- func SaveDollarTemplate(gestureId GestureID, src *RWops) int
- func SetClipboardText(text string) int
- func SetCursor(cursor *Cursor)
- func SetModState(modstate Keymod)
- func SetRelativeMouseMode(enabled bool) int
- func SetTextInputRect(rect *Rect)
- func SetWindowDisplayMode(window *Window, mode *DisplayMode) int
- func ShowCursor(toggle int) int
- func StartTextInput()
- func StopTextInput()
- func U8To32Array(buf []byte) []uint32
- func UnloadObject(handle unsafe.Pointer)
- func UnlockAudio()
- func UnlockAudioDevice(dev AudioDeviceID)
- func Unsupported()
- func Update()
- func VERSION(version *Version)
- func VERSIONNUM(x, y, z int) int
- func VERSION_ATLEAST(x, y, z int) bool
- func VideoInit(driverName string) int
- func VideoQuit()
- func WasInit(flags uint32) uint32
- type AudioCVT
- type AudioCallback
- type AudioDeviceID
- type AudioFilter
- type AudioFormat
- func (format AudioFormat) BitSize() uint8
- func (format AudioFormat) IsBigEndian() bool
- func (format AudioFormat) IsFloat() bool
- func (format AudioFormat) IsInt() bool
- func (format AudioFormat) IsLittleEndian() bool
- func (format AudioFormat) IsSigned() bool
- func (format AudioFormat) IsUnsigned() bool
- type AudioSpec
- type AudioStatus
- type BlendMode
- type CEvent
- type ClipboardEvent
- type CocoaInfo
- type Color
- type CommonEvent
- type ControllerAxisEvent
- type ControllerButtonEvent
- type ControllerDeviceEvent
- type Cursor
- type DFBInfo
- type DisplayMode
- type DollarGestureEvent
- type DropEvent
- type Event
- type EventFilter
- type FPoint
- type FRect
- type Finger
- type FingerID
- type GLContext
- type GameController
- func (gamecontroller *GameController) Close()
- func (gamecontroller *GameController) GetAttached() bool
- func (gamecontroller *GameController) GetAxis(axis GameControllerAxis) int16
- func (gamecontroller *GameController) GetBindForAxis(axis GameControllerAxis) GameControllerButtonBind
- func (gamecontroller *GameController) GetBindForButton(button GameControllerButton) GameControllerButtonBind
- func (gamecontroller *GameController) GetButton(button GameControllerButton) byte
- func (gamecontroller *GameController) GetJoystick() *Joystick
- type GameControllerAxis
- type GameControllerBindType
- type GameControllerButton
- type GameControllerButtonBind
- type GestureID
- type Haptic
- func (haptic *Haptic) Close()
- func (haptic *Haptic) DestroyEffect(effect int)
- func (haptic *Haptic) EffectSupported(effect *HapticEffect) int
- func (haptic *Haptic) GetEffectStatus(effect int) int
- func (haptic *Haptic) NewEffect(effect *HapticEffect) int
- func (haptic *Haptic) NumEffects() int
- func (haptic *Haptic) NumEffectsPlaying() int
- func (haptic *Haptic) Pause() int
- func (haptic *Haptic) Query() uint
- func (haptic *Haptic) RumbleInit() int
- func (haptic *Haptic) RumblePlay(strength float32, length uint32) int
- func (haptic *Haptic) RumbleStop() int
- func (haptic *Haptic) RumbleSupported() int
- func (haptic *Haptic) RunEffect(effect int, iterations uint32) int
- func (haptic *Haptic) SetAutocenter(autocenter int) int
- func (haptic *Haptic) SetGain(gain int) int
- func (haptic *Haptic) StopAll() int
- func (haptic *Haptic) StopEffect(effect int) int
- func (haptic *Haptic) Unpause() int
- func (haptic *Haptic) UpdateEffect(effect int, data *HapticEffect) int
- type HapticCondition
- type HapticConstant
- type HapticCustom
- type HapticDirection
- type HapticEffect
- type HapticPeriodic
- type HapticRamp
- type JoyAxisEvent
- type JoyBallEvent
- type JoyButtonEvent
- type JoyDeviceEvent
- type JoyHatEvent
- type Joystick
- func (joystick *Joystick) Close()
- func (joystick *Joystick) GetAttached() bool
- func (joystick *Joystick) GetAxis(axis int) int16
- func (joystick *Joystick) GetBall(ball int, dx, dy *int) int
- func (joystick *Joystick) GetButton(button int) byte
- func (joystick *Joystick) GetGUID() JoystickGUID
- func (joystick *Joystick) GetHat(hat int) byte
- func (joystick *Joystick) InstanceID() JoystickID
- func (joystick *Joystick) Name() string
- func (joystick *Joystick) NumAxes() int
- func (joystick *Joystick) NumBalls() int
- func (joystick *Joystick) NumButtons() int
- func (joystick *Joystick) NumHats() int
- type JoystickGUID
- type JoystickID
- type KeyDownEvent
- type KeyUpEvent
- type Keycode
- type Keymod
- type Keysym
- type LogPriority
- type MouseButtonEvent
- type MouseMotionEvent
- type MouseWheelEvent
- type MultiGestureEvent
- type OSEvent
- type Palette
- type PixelFormat
- type Point
- type QuitEvent
- type RWops
- func (area *RWops) FreeRW()
- func (ctx *RWops) RWclose() int
- func (ctx *RWops) RWread(ptr unsafe.Pointer, size, maxnum uint) uint
- func (ctx *RWops) RWseek(offset int64, whence int) int64
- func (ctx *RWops) RWsize() int64
- func (ctx *RWops) RWtell() int64
- func (ctx *RWops) RWwrite(ptr unsafe.Pointer, size, num uint) uint
- func (src *RWops) ReadBE16() uint16
- func (src *RWops) ReadBE32() uint32
- func (src *RWops) ReadBE64() uint64
- func (src *RWops) ReadLE16() uint16
- func (src *RWops) ReadLE32() uint32
- func (src *RWops) ReadLE64() uint64
- func (src *RWops) ReadU8() uint8
- func (dst *RWops) WriteBE16(value uint16) uint
- func (dst *RWops) WriteBE32(value uint32) uint
- func (dst *RWops) WriteBE64(value uint64) uint
- func (dst *RWops) WriteLE16(value uint16) uint
- func (dst *RWops) WriteLE32(value uint32) uint
- func (dst *RWops) WriteLE64(value uint64) uint
- func (dst *RWops) WriteU8(value uint8) uint
- type Rect
- type Renderer
- func (renderer *Renderer) Clear() int
- func (renderer *Renderer) Copy(texture *Texture, srcrect, dstrect *Rect) int
- func (renderer *Renderer) CopyEx(texture *Texture, srcrect, dstrect *Rect, angle float64, center *Point, ...) int
- func (renderer *Renderer) CreateTextureFromSurface(surface *Surface) *Texture
- func (renderer *Renderer) Destroy()
- func (renderer *Renderer) DrawLine(x1, y1, x2, y2 int) int
- func (renderer *Renderer) DrawLines(points []Point) int
- func (renderer *Renderer) DrawPoint(x, y int) int
- func (renderer *Renderer) DrawPoints(points []Point) int
- func (renderer *Renderer) DrawRect(rect *Rect) int
- func (renderer *Renderer) DrawRects(rects []Rect) int
- func (renderer *Renderer) FillRect(rect *Rect) int
- func (renderer *Renderer) FillRects(rects []Rect) int
- func (renderer *Renderer) GetClipRect(rect *Rect)
- func (renderer *Renderer) GetDrawBlendMode(blendMode *uint32) int
- func (renderer *Renderer) GetDrawColor(r, g, b, a *uint8) int
- func (renderer *Renderer) GetRenderTarget() *Texture
- func (renderer *Renderer) GetRendererInfo(info *RendererInfo) int
- func (renderer *Renderer) GetRendererOutputSize(w *int, h *int) int
- func (renderer *Renderer) GetScale(scaleX, scaleY *float32)
- func (renderer *Renderer) GetViewport(rect *Rect)
- func (renderer *Renderer) Present()
- func (renderer *Renderer) ReadPixels(rect *Rect, format uint32, pixels unsafe.Pointer, pitch int) int
- func (renderer *Renderer) RenderTargetSupported() bool
- func (renderer *Renderer) SetClipRect(rect *Rect) int
- func (renderer *Renderer) SetDrawBlendMode(blendMode uint32) int
- func (renderer *Renderer) SetDrawColor(r, g, b, a uint8) int
- func (renderer *Renderer) SetLogicalSize(w int, h int) int
- func (renderer *Renderer) SetRenderTarget(texture *Texture) int
- func (renderer *Renderer) SetScale(scaleX, scaleY float32) int
- func (renderer *Renderer) SetViewport(rect *Rect) int
- type RendererInfo
- type SW_YUVTexture
- type Scancode
- type Surface
- func (src *Surface) Blit(srcrect *Rect, dst *Surface, dstrect *Rect) int
- func (src *Surface) BlitScaled(srcrect *Rect, dst *Surface, dstrect *Rect) int
- func (surface *Surface) BytesPerPixel() int
- func (surface *Surface) Convert(fmt *PixelFormat, flags uint32) *Surface
- func (surface *Surface) ConvertFormat(pixel_format uint32, flags uint32) *Surface
- func (surface *Surface) Data() unsafe.Pointer
- func (surface *Surface) FillRect(rect *Rect, color uint32) int
- func (surface *Surface) FillRects(rects *Rect, count int, color uint32) int
- func (surface *Surface) Free()
- func (surface *Surface) GetAlphaMod(alpha *uint8) int
- func (surface *Surface) GetBlendMode(blendMode *BlendMode) int
- func (surface *Surface) GetClipRect(rect *Rect)
- func (surface *Surface) GetColorKey(key *uint32) int
- func (surface *Surface) GetColorMod(r, g, b *uint8) int
- func (surface *Surface) Lock()
- func (src *Surface) LowerBlit(srcrect *Rect, dst *Surface, dstrect *Rect) int
- func (src *Surface) LowerBlitScaled(srcrect *Rect, dst *Surface, dstrect *Rect) int
- func (surface *Surface) MustLock() bool
- func (surface *Surface) PixelNum() int
- func (surface *Surface) Pixels() []byte
- func (surface *Surface) SaveBMP(file string) int
- func (surface *Surface) SaveBMP_RW(dst *RWops, freedst int) int
- func (surface *Surface) SetAlphaMod(alpha uint8) int
- func (surface *Surface) SetBlendMode(blendMode BlendMode) int
- func (surface *Surface) SetClipRect(rect *Rect) bool
- func (surface *Surface) SetColorKey(flag int, key uint32) int
- func (surface *Surface) SetColorMod(r, g, b uint8) int
- func (surface *Surface) SetPalette(palette *Palette) int
- func (surface *Surface) SetRLE(flag int) int
- func (src *Surface) SoftStretch(srcrect *Rect, dst *Surface, dstrect *Rect) int
- func (surface *Surface) Unlock()
- func (src *Surface) UpperBlit(srcrect *Rect, dst *Surface, dstrect *Rect) int
- func (src *Surface) UpperBlitScaled(srcrect *Rect, dst *Surface, dstrect *Rect) int
- type SysWMEvent
- type SysWMInfo
- type SystemCursor
- type TextEditingEvent
- type TextInputEvent
- type Texture
- func (texture *Texture) Destroy()
- func (texture *Texture) GL_BindTexture(texw, texh *float32) int
- func (texture *Texture) GL_UnbindTexture() int
- func (texture *Texture) GetBlendMode(blendMode *uint32) int
- func (texture *Texture) Lock(rect *Rect, pixels unsafe.Pointer, pitch *int) int
- func (texture *Texture) SetAlphaMod(alpha uint8) int
- func (texture *Texture) SetBlendMode(blendMode uint32) int
- func (texture *Texture) SetColorMod(r uint8, g uint8, b uint8) int
- func (texture *Texture) Unlock()
- func (texture *Texture) Update(rect *Rect, pixels unsafe.Pointer, pitch int) int
- type TouchFingerEvent
- type TouchID
- type UIKitInfo
- type UserEvent
- type Version
- type Window
- func (window *Window) Destroy()
- func (window *Window) GetBrightness() float32
- func (window *Window) GetData(name string, userdata unsafe.Pointer) unsafe.Pointer
- func (window *Window) GetFlags() uint32
- func (window *Window) GetGammaRamp(red, green, blue *uint16) int
- func (window *Window) GetGrab() bool
- func (window *Window) GetID() uint32
- func (window *Window) GetMaximumSize(w *int, h *int)
- func (window *Window) GetMinimumSize(w *int, h *int)
- func (window *Window) GetPixelFormat() uint32
- func (window *Window) GetPosition(x *int, y *int)
- func (window *Window) GetRenderer() *Renderer
- func (window *Window) GetSize(w *int, h *int)
- func (window *Window) GetSurface() *Surface
- func (window *Window) GetTitle() string
- func (window *Window) GetWMInfo(info *SysWMInfo) bool
- func (window *Window) Hide()
- func (window *Window) Maximize()
- func (window *Window) Minimize()
- func (window *Window) Raise()
- func (window *Window) Restore()
- func (window *Window) SetBordered(bordered bool)
- func (window *Window) SetBrightness(brightness float32) int
- func (window *Window) SetData(name string, userdata unsafe.Pointer) unsafe.Pointer
- func (window *Window) SetFullscreen(flags uint32) int
- func (window *Window) SetGammaRamp(red, green, blue *uint16) int
- func (window *Window) SetGrab(grabbed bool)
- func (window *Window) SetIcon(icon *Surface)
- func (window *Window) SetMaximumSize(max_w int, max_h int)
- func (window *Window) SetMinimumSize(min_w int, min_h int)
- func (window *Window) SetPosition(x int, y int)
- func (window *Window) SetSize(w int, h int)
- func (window *Window) SetTitle(title string)
- func (window *Window) Show()
- func (window *Window) UpdateSurface() int
- func (window *Window) UpdateSurfaceRects(rects *Rect, numrects int) int
- func (window *Window) WarpMouseInWindow(x, y int)
- type WindowEvent
- type WindowsInfo
- type X11Info
Constants ¶
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 ( AUDIO_MASK_BITSIZE = 0xFF AUDIO_MASK_DATATYPE = 1 << 8 AUDIO_MASK_ENDIAN = 1 << 12 AUDIO_MASK_SIGNED = 1 << 15 )
View Source
const ( AUDIO_U8 = 0x0008 AUDIO_S8 = 0x8008 AUDIO_U16LSB = 0x0010 AUDIO_S16LSB = 0x8010 AUDIO_U16MSB = 0x1010 AUDIO_S16MSB = 0x9010 AUDIO_U16 = AUDIO_U16LSB AUDIO_S16 = AUDIO_S16LSB )
View Source
const ( AUDIO_S32LSB = 0x8020 AUDIO_S32MSB = 0x9020 AUDIO_S32 = AUDIO_S32LSB )
View Source
const ( AUDIO_F32LSB = 0x8120 AUDIO_F32MSB = 0x9120 AUDIO_F32 = AUDIO_F32LSB )
View Source
const ( 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 = 0x00000001 AUDIO_ALLOW_FORMAT_CHANGE = 0x00000002 AUDIO_ALLOW_CHANNELS_CHANGE = 0x00000004 AUDIO_ALLOW_ANY_CHANGE = (AUDIO_ALLOW_FREQUENCY_CHANGE | AUDIO_ALLOW_FORMAT_CHANGE | AUDIO_ALLOW_CHANNELS_CHANGE) )
View Source
const ( AUDIO_STOPPED = iota AUDIO_PLAYING AUDIO_PAUSED )
View Source
const ( BLENDMODE_NONE = 0x00000000 /**< No blending */ BLENDMODE_BLEND = 0x00000001 /**< dst = (src * A) + (dst * (1-A)) */ BLENDMODE_ADD = 0x00000002 /**< dst = (src * A) + dst */ BLENDMODE_MOD = 0x00000004 /**< dst = src * dst */ )
View Source
const ( LIL_ENDIAN = 1234 BIG_ENDIAN = 4321 )
View Source
const ( ENOMEM = 0x00000000 EFREAD = 0x00000001 EFWRITE = 0x00000002 EFSEEK = 0x00000003 UNSUPPORTED = 0x00000004 LASTERROR = 0x00000005 )
View Source
const ( FIRSTEVENT = 0 QUIT = 0x100 APP_TERMINATING = 0x101 APP_LOWMEMORY = 0x102 APP_WILLENTERBACKGROUND = 0x103 APP_DIDENTERBACKGROUND = 0x104 APP_WILLENTERFOREGROUND = 0x105 APP_DIDENTERFOREGROUND = 0x106 /* Window events */ WINDOWEVENT = 0x200 SYSWMEVENT = 0x201 /* Keyboard events */ KEYDOWN = 0x300 KEYUP = 0x301 TEXTEDITING = 0x302 TEXTINPUT = 0x303 /* Mouse events */ MOUSEMOTION = 0x400 MOUSEBUTTONDOWN = 0x401 MOUSEBUTTONUP = 0x402 MOUSEWHEEL = 0x403 /* Joystick events */ JOYAXISMOTION = 0x600 JOYBALLMOTION = 0x601 JOYHATMOTION = 0x602 JOYBUTTONDOWN = 0x603 JOYBUTTONUP = 0x604 JOYDEVICEADDED = 0x605 JOYDEVICEREMOVED = 0x606 /* Game controller events */ CONTROLLERAXISMOTION = 0x650 CONTROLLERBUTTONDOWN = 0x651 CONTROLLERBUTTONUP = 0x652 CONTROLLERDEVICEADDED = 0x653 CONTROLLERDEVICEREMOVED = 0x654 CONTROLLERDEVICEREMAPPED = 0x655 /* Touch events */ FINGERDOWN = 0x700 FINGERUP = 0x701 FINGERMOTION = 0x702 /* Gesture events */ DOLLARGESTURE = 0x800 DOLLARRECORD = 0x801 MULTIGESTURE = 0x802 /* Clipboard events */ CLIPBOARDUPDATE = 0x900 /* Drag and drop events */ DROPFILE = 0x1000 USEREVENT = 0x8000 LASTEVENT = 0xFFFF )
View Source
const ( ADDEVENT = iota PEEKEVENT GETEVENT )
View Source
const ( QUERY = -1 IGNORE = 0 DISABLE = 0 ENABLE = 1 )
View Source
const ( CONTROLLER_BINDTYPE_NONE = iota CONTROLLER_BINDTYPE_BUTTON CONTROLLER_BINDTYPE_AXIS CONTROLLER_BINDTYPE_HAT )
View Source
const ( CONTROLLER_AXIS_INVALID = iota - 1 CONTROLLER_AXIS_LEFTX CONTROLLER_AXIS_LEFTY CONTROLLER_AXIS_RIGHTX CONTROLLER_AXIS_RIGHTY CONTROLLER_AXIS_TRIGGERLEFT CONTROLLER_AXIS_TRIGGERRIGHT CONTROLLER_AXIS_MAX )
View Source
const ( CONTROLLER_BUTTON_INVALID = iota - 1 CONTROLLER_BUTTON_A CONTROLLER_BUTTON_B CONTROLLER_BUTTON_X CONTROLLER_BUTTON_Y CONTROLLER_BUTTON_BACK CONTROLLER_BUTTON_GUIDE CONTROLLER_BUTTON_START CONTROLLER_BUTTON_LEFTSTICK CONTROLLER_BUTTON_RIGHTSTICK CONTROLLER_BUTTON_LEFTSHOULDER CONTROLLER_BUTTON_RIGHTSHOULDER CONTROLLER_BUTTON_DPAD_UP CONTROLLER_BUTTON_DPAD_DOWN CONTROLLER_BUTTON_DPAD_LEFT CONTROLLER_BUTTON_DPAD_RIGHT CONTROLLER_BUTTON_MAX )
View Source
const ( HAPTIC_CONSTANT = 1 << iota HAPTIC_SINE HAPTIC_SQUARE HAPTIC_TRIANGLE HAPTIC_SAWTOOTHUP HAPTIC_SAWTOOTHDOWN HAPTIC_RAMP HAPTIC_SPRING HAPTIC_DAMPER HAPTIC_INERTIA HAPTIC_FRICTION HAPTIC_CUSTOM HAPTIC_GAIN HAPTIC_AUTOCENTER HAPTIC_STATUS HAPTIC_PAUSE )
View Source
const ( HAPTIC_POLAR = iota HAPTIC_CARTESION HAPTIC_SPHERICAL )
View Source
const ( HAT_CENTERED = 0x00 HAT_UP = 0x01 HAT_RIGHT = 0x02 HAT_DOWN = 0x04 HAT_LEFT = 0x08 HAT_RIGHTUP = HAT_RIGHT | HAT_UP HAT_RIGHTDOWN = HAT_RIGHT | HAT_DOWN HAT_LEFTUP = HAT_LEFT | HAT_UP HAT_LEFTDOWN = HAT_LEFT | HAT_DOWN )
View Source
const ( K_UNKNOWN = 0 K_RETURN = '\r' K_ESCAPE = '\033' K_BACKSPACE = '\b' K_TAB = '\t' K_SPACE = ' ' K_EXCLAIM = '!' K_QUOTEDBL = '"' K_HASH = '#' K_PERCENT = '%' K_DOLLAR = '$' K_AMPERSAND = '&' K_QUOTE = '\'' K_LEFTPAREN = '(' K_RIGHTPAREN = ')' K_ASTERISK = '*' K_PLUS = '+' K_COMMA = ',' K_MINUS = '-' K_PERIOD = '.' K_SLASH = '/' K_0 = '0' K_1 = '1' K_2 = '2' K_3 = '3' K_4 = '4' K_5 = '5' K_6 = '6' K_7 = '7' K_8 = '8' K_9 = '9' K_COLON = ':' K_SEMICOLON = ';' K_LESS = '<' K_EQUALS = '=' K_GREATER = '>' K_QUESTION = '?' K_AT = '@' /* Skip uppercase letters */ K_LEFTBRACKET = '[' K_BACKSLASH = '\\' K_RIGHTBRACKET = ']' K_CARET = '^' K_UNDERSCORE = '_' K_BACKQUOTE = '`' K_a = 'a' K_b = 'b' K_c = 'c' K_d = 'd' K_e = 'e' K_f = 'f' K_g = 'g' K_h = 'h' K_i = 'i' K_j = 'j' K_k = 'k' K_l = 'l' K_m = 'm' K_n = 'n' K_o = 'o' K_p = 'p' K_q = 'q' K_r = 'r' K_s = 's' K_t = 't' K_u = 'u' K_v = 'v' K_w = 'w' K_x = 'x' K_y = 'y' K_z = 'z' K_CAPSLOCK = SCANCODE_CAPSLOCK | K_SCANCODE_MASK K_F1 = SCANCODE_F1 | K_SCANCODE_MASK K_F2 = SCANCODE_F2 | K_SCANCODE_MASK K_F3 = SCANCODE_F3 | K_SCANCODE_MASK K_F4 = SCANCODE_F4 | K_SCANCODE_MASK K_F5 = SCANCODE_F5 | K_SCANCODE_MASK K_F6 = SCANCODE_F6 | K_SCANCODE_MASK K_F7 = SCANCODE_F7 | K_SCANCODE_MASK K_F8 = SCANCODE_F8 | K_SCANCODE_MASK K_F9 = SCANCODE_F9 | K_SCANCODE_MASK K_F10 = SCANCODE_F10 | K_SCANCODE_MASK K_F11 = SCANCODE_F11 | K_SCANCODE_MASK K_F12 = SCANCODE_F12 | K_SCANCODE_MASK K_PRINTSCREEN = SCANCODE_PRINTSCREEN | K_SCANCODE_MASK K_SCROLLLOCK = SCANCODE_SCROLLLOCK | K_SCANCODE_MASK K_PAUSE = SCANCODE_PAUSE | K_SCANCODE_MASK K_INSERT = SCANCODE_INSERT | K_SCANCODE_MASK K_HOME = SCANCODE_HOME | K_SCANCODE_MASK K_PAGEUP = SCANCODE_PAGEUP | K_SCANCODE_MASK K_DELETE = '\177' K_END = SCANCODE_END | K_SCANCODE_MASK K_PAGEDOWN = SCANCODE_PAGEDOWN | K_SCANCODE_MASK K_RIGHT = SCANCODE_RIGHT | K_SCANCODE_MASK K_LEFT = SCANCODE_LEFT | K_SCANCODE_MASK K_DOWN = SCANCODE_DOWN | K_SCANCODE_MASK K_UP = SCANCODE_UP | K_SCANCODE_MASK K_NUMLOCKCLEAR = SCANCODE_NUMLOCKCLEAR | K_SCANCODE_MASK K_KP_DIVIDE = SCANCODE_KP_DIVIDE | K_SCANCODE_MASK K_KP_MULTIPLY = SCANCODE_KP_MULTIPLY | K_SCANCODE_MASK K_KP_MINUS = SCANCODE_KP_MINUS | K_SCANCODE_MASK K_KP_PLUS = SCANCODE_KP_PLUS | K_SCANCODE_MASK K_KP_ENTER = SCANCODE_KP_ENTER | K_SCANCODE_MASK K_KP_1 = SCANCODE_KP_1 | K_SCANCODE_MASK K_KP_2 = SCANCODE_KP_2 | K_SCANCODE_MASK K_KP_3 = SCANCODE_KP_3 | K_SCANCODE_MASK K_KP_4 = SCANCODE_KP_4 | K_SCANCODE_MASK K_KP_5 = SCANCODE_KP_5 | K_SCANCODE_MASK K_KP_6 = SCANCODE_KP_6 | K_SCANCODE_MASK K_KP_7 = SCANCODE_KP_7 | K_SCANCODE_MASK K_KP_8 = SCANCODE_KP_8 | K_SCANCODE_MASK K_KP_9 = SCANCODE_KP_9 | K_SCANCODE_MASK K_KP_0 = SCANCODE_KP_0 | K_SCANCODE_MASK K_KP_PERIOD = SCANCODE_KP_PERIOD | K_SCANCODE_MASK K_APPLICATION = SCANCODE_APPLICATION | K_SCANCODE_MASK K_POWER = SCANCODE_POWER | K_SCANCODE_MASK K_KP_EQUALS = SCANCODE_KP_EQUALS | K_SCANCODE_MASK K_F13 = SCANCODE_F13 | K_SCANCODE_MASK K_F14 = SCANCODE_F14 | K_SCANCODE_MASK K_F15 = SCANCODE_F15 | K_SCANCODE_MASK K_F16 = SCANCODE_F16 | K_SCANCODE_MASK K_F17 = SCANCODE_F17 | K_SCANCODE_MASK K_F18 = SCANCODE_F18 | K_SCANCODE_MASK K_F19 = SCANCODE_F19 | K_SCANCODE_MASK K_F20 = SCANCODE_F20 | K_SCANCODE_MASK K_F21 = SCANCODE_F21 | K_SCANCODE_MASK K_F22 = SCANCODE_F22 | K_SCANCODE_MASK K_F23 = SCANCODE_F23 | K_SCANCODE_MASK K_F24 = SCANCODE_F24 | K_SCANCODE_MASK K_EXECUTE = SCANCODE_EXECUTE | K_SCANCODE_MASK K_HELP = SCANCODE_HELP | K_SCANCODE_MASK K_MENU = SCANCODE_MENU | K_SCANCODE_MASK K_SELECT = SCANCODE_SELECT | K_SCANCODE_MASK K_STOP = SCANCODE_STOP | K_SCANCODE_MASK K_AGAIN = SCANCODE_AGAIN | K_SCANCODE_MASK K_UNDO = SCANCODE_UNDO | K_SCANCODE_MASK K_CUT = SCANCODE_CUT | K_SCANCODE_MASK K_COPY = SCANCODE_COPY | K_SCANCODE_MASK K_PASTE = SCANCODE_PASTE | K_SCANCODE_MASK K_FIND = SCANCODE_FIND | K_SCANCODE_MASK K_MUTE = SCANCODE_MUTE | K_SCANCODE_MASK K_VOLUMEUP = SCANCODE_VOLUMEUP | K_SCANCODE_MASK K_VOLUMEDOWN = SCANCODE_VOLUMEDOWN | K_SCANCODE_MASK K_KP_COMMA = SCANCODE_KP_COMMA | K_SCANCODE_MASK K_KP_EQUALSAS400 = SCANCODE_KP_EQUALSAS400 | K_SCANCODE_MASK K_ALTERASE = SCANCODE_ALTERASE | K_SCANCODE_MASK K_SYSREQ = SCANCODE_SYSREQ | K_SCANCODE_MASK K_CANCEL = SCANCODE_CANCEL | K_SCANCODE_MASK K_CLEAR = SCANCODE_CLEAR | K_SCANCODE_MASK K_PRIOR = SCANCODE_PRIOR | K_SCANCODE_MASK K_RETURN2 = SCANCODE_RETURN2 | K_SCANCODE_MASK K_SEPARATOR = SCANCODE_SEPARATOR | K_SCANCODE_MASK K_OUT = SCANCODE_OUT | K_SCANCODE_MASK K_OPER = SCANCODE_OPER | K_SCANCODE_MASK K_CLEARAGAIN = SCANCODE_CLEARAGAIN | K_SCANCODE_MASK K_CRSEL = SCANCODE_CRSEL | K_SCANCODE_MASK K_EXSEL = SCANCODE_EXSEL | K_SCANCODE_MASK K_KP_00 = SCANCODE_KP_00 | K_SCANCODE_MASK K_KP_000 = SCANCODE_KP_000 | K_SCANCODE_MASK K_THOUSANDSSEPARATOR = SCANCODE_THOUSANDSSEPARATOR | K_SCANCODE_MASK K_DECIMALSEPARATOR = SCANCODE_DECIMALSEPARATOR | K_SCANCODE_MASK K_CURRENCYUNIT = SCANCODE_CURRENCYUNIT | K_SCANCODE_MASK K_CURRENCYSUBUNIT = SCANCODE_CURRENCYSUBUNIT | K_SCANCODE_MASK K_KP_LEFTPAREN = SCANCODE_KP_LEFTPAREN | K_SCANCODE_MASK K_KP_RIGHTPAREN = SCANCODE_KP_RIGHTPAREN | K_SCANCODE_MASK K_KP_LEFTBRACE = SCANCODE_KP_LEFTBRACE | K_SCANCODE_MASK K_KP_RIGHTBRACE = SCANCODE_KP_RIGHTBRACE | K_SCANCODE_MASK K_KP_TAB = SCANCODE_KP_TAB | K_SCANCODE_MASK K_KP_BACKSPACE = SCANCODE_KP_BACKSPACE | K_SCANCODE_MASK K_KP_A = SCANCODE_KP_A | K_SCANCODE_MASK K_KP_B = SCANCODE_KP_B | K_SCANCODE_MASK K_KP_C = SCANCODE_KP_C | K_SCANCODE_MASK K_KP_D = SCANCODE_KP_D | K_SCANCODE_MASK K_KP_E = SCANCODE_KP_E | K_SCANCODE_MASK K_KP_F = SCANCODE_KP_F | K_SCANCODE_MASK K_KP_XOR = SCANCODE_KP_XOR | K_SCANCODE_MASK K_KP_POWER = SCANCODE_KP_POWER | K_SCANCODE_MASK K_KP_PERCENT = SCANCODE_KP_PERCENT | K_SCANCODE_MASK K_KP_LESS = SCANCODE_KP_LESS | K_SCANCODE_MASK K_KP_GREATER = SCANCODE_KP_GREATER | K_SCANCODE_MASK K_KP_AMPERSAND = SCANCODE_KP_AMPERSAND | K_SCANCODE_MASK K_KP_DBLAMPERSAND = SCANCODE_KP_DBLAMPERSAND | K_SCANCODE_MASK K_KP_VERTICALBAR = SCANCODE_KP_VERTICALBAR | K_SCANCODE_MASK K_KP_DBLVERTICALBAR = SCANCODE_KP_DBLVERTICALBAR | K_SCANCODE_MASK K_KP_COLON = SCANCODE_KP_COLON | K_SCANCODE_MASK K_KP_HASH = SCANCODE_KP_HASH | K_SCANCODE_MASK K_KP_SPACE = SCANCODE_KP_SPACE | K_SCANCODE_MASK K_KP_AT = SCANCODE_KP_AT | K_SCANCODE_MASK K_KP_EXCLAM = SCANCODE_KP_EXCLAM | K_SCANCODE_MASK K_KP_MEMSTORE = SCANCODE_KP_MEMSTORE | K_SCANCODE_MASK K_KP_MEMRECALL = SCANCODE_KP_MEMRECALL | K_SCANCODE_MASK K_KP_MEMCLEAR = SCANCODE_KP_MEMCLEAR | K_SCANCODE_MASK K_KP_MEMADD = SCANCODE_KP_MEMADD | K_SCANCODE_MASK K_KP_MEMSUBTRACT = SCANCODE_KP_MEMSUBTRACT | K_SCANCODE_MASK K_KP_MEMMULTIPLY = SCANCODE_KP_MEMMULTIPLY | K_SCANCODE_MASK K_KP_MEMDIVIDE = SCANCODE_KP_MEMDIVIDE | K_SCANCODE_MASK K_KP_PLUSMINUS = SCANCODE_KP_PLUSMINUS | K_SCANCODE_MASK K_KP_CLEAR = SCANCODE_KP_CLEAR | K_SCANCODE_MASK K_KP_CLEARENTRY = SCANCODE_KP_CLEARENTRY | K_SCANCODE_MASK K_KP_BINARY = SCANCODE_KP_BINARY | K_SCANCODE_MASK K_KP_OCTAL = SCANCODE_KP_OCTAL | K_SCANCODE_MASK K_KP_DECIMAL = SCANCODE_KP_DECIMAL | K_SCANCODE_MASK K_KP_HEXADECIMAL = SCANCODE_KP_HEXADECIMAL | K_SCANCODE_MASK K_LCTRL = SCANCODE_LCTRL | K_SCANCODE_MASK K_LSHIFT = SCANCODE_LSHIFT | K_SCANCODE_MASK K_LALT = SCANCODE_LALT | K_SCANCODE_MASK K_LGUI = SCANCODE_LGUI | K_SCANCODE_MASK K_RCTRL = SCANCODE_RCTRL | K_SCANCODE_MASK K_RSHIFT = SCANCODE_RSHIFT | K_SCANCODE_MASK K_RALT = SCANCODE_RALT | K_SCANCODE_MASK K_RGUI = SCANCODE_RGUI | K_SCANCODE_MASK K_MODE = SCANCODE_MODE | K_SCANCODE_MASK K_AUDIONEXT = SCANCODE_AUDIONEXT | K_SCANCODE_MASK K_AUDIOPREV = SCANCODE_AUDIOPREV | K_SCANCODE_MASK K_AUDIOSTOP = SCANCODE_AUDIOSTOP | K_SCANCODE_MASK K_AUDIOPLAY = SCANCODE_AUDIOPLAY | K_SCANCODE_MASK K_AUDIOMUTE = SCANCODE_AUDIOMUTE | K_SCANCODE_MASK K_MEDIASELECT = SCANCODE_MEDIASELECT | K_SCANCODE_MASK K_WWW = SCANCODE_WWW | K_SCANCODE_MASK K_MAIL = SCANCODE_MAIL | K_SCANCODE_MASK K_CALCULATOR = SCANCODE_CALCULATOR | K_SCANCODE_MASK K_COMPUTER = SCANCODE_COMPUTER | K_SCANCODE_MASK K_AC_SEARCH = SCANCODE_AC_SEARCH | K_SCANCODE_MASK K_AC_HOME = SCANCODE_AC_HOME | K_SCANCODE_MASK K_AC_BACK = SCANCODE_AC_BACK | K_SCANCODE_MASK K_AC_FORWARD = SCANCODE_AC_FORWARD | K_SCANCODE_MASK K_AC_STOP = SCANCODE_AC_STOP | K_SCANCODE_MASK K_AC_REFRESH = SCANCODE_AC_REFRESH | K_SCANCODE_MASK K_AC_BOOKMARKS = SCANCODE_AC_BOOKMARKS | K_SCANCODE_MASK K_BRIGHTNESSDOWN = SCANCODE_BRIGHTNESSDOWN | K_SCANCODE_MASK K_BRIGHTNESSUP = SCANCODE_BRIGHTNESSUP | K_SCANCODE_MASK K_DISPLAYSWITCH = SCANCODE_DISPLAYSWITCH | K_SCANCODE_MASK K_KBDILLUMTOGGLE = SCANCODE_KBDILLUMTOGGLE | K_SCANCODE_MASK K_KBDILLUMDOWN = SCANCODE_KBDILLUMDOWN | K_SCANCODE_MASK K_KBDILLUMUP = SCANCODE_KBDILLUMUP | K_SCANCODE_MASK K_EJECT = SCANCODE_EJECT | K_SCANCODE_MASK K_SLEEP = SCANCODE_SLEEP | K_SCANCODE_MASK )
View Source
const ( KMOD_NONE = 0x0000 KMOD_LSHIFT = 0x0001 KMOD_RSHIFT = 0x0002 KMOD_LCTRL = 0x0040 KMOD_RCTRL = 0x0080 KMOD_LALT = 0x0100 KMOD_RALT = 0x0200 KMOD_LGUI = 0x0400 KMOD_RGUI = 0x0800 KMOD_NUM = 0x1000 KMOD_CAPS = 0x2000 KMOD_MODE = 0x4000 KMOD_RESERVED = 0x8000 )
View Source
const ( KMOD_CTRL = KMOD_LCTRL | KMOD_RCTRL KMOD_SHIFT = KMOD_LSHIFT | KMOD_RSHIFT KMOD_ALT = KMOD_LALT | KMOD_RALT KMOD_GUI = KMOD_LGUI | KMOD_RGUI )
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 = iota SYSTEM_CURSOR_IBEAM SYSTEM_CURSOR_WAIT SYSTEM_CURSOR_CROSSHAIR SYSTEM_CURSOR_WAITARROW SYSTEM_CURSOR_SIZENWSE SYSTEM_CURSOR_SIZENESW SYSTEM_CURSOR_SIZEWE SYSTEM_CURSOR_SIZENS SYSTEM_CURSOR_SIZEALL SYSTEM_CURSOR_NO SYSTEM_CURSOR_HAND NUM_SYSTEM_CURSORS )
SystemCursor
View Source
const ( BUTTON_LEFT = 1 BUTTON_MIDDLE = 2 BUTTON_RIGHT = 3 BUTTON_X1 = 4 BUTTON_X2 = 5 )
View Source
const ( PIXELTYPE_UNKNOWN = iota PIXELTYPE_INDEX1 PIXELTYPE_INDEX4 PIXELTYPE_INDEX8 PIXELTYPE_PACKED8 PIXELTYPE_PACKED16 PIXELTYPE_PACKED32 PIXELTYPE_ARRAYU8 PIXELTYPE_ARRAYU16 PIXELTYPE_ARRAYU32 PIXELTYPE_ARRAYF16 PIXELTYPE_ARRAYF32 )
View Source
const ( BITMAPORDER_NONE = iota BITMAPORDER_4321 BITMAPORDER_1234 )
* Bitmap pixel order high bit -> low bit.
View Source
const ( PACKEDORDER_NONE = iota PACKEDORDER_XRGB PACKEDORDER_RGBX PACKEDORDER_ARGB PACKEDORDER_RGBA PACKEDORDER_XBGR PACKEDORDER_BGRX PACKEDORDER_ABGR PACKEDORDER_BGRA )
* Packed component order high bit -> low bit.
View Source
const ( ARRAYORDER_NONE = iota ARRAYORDER_RGB ARRAYORDER_RGBA ARRAYORDER_ARGB ARRAYORDER_BGR ARRAYORDER_BGRA ARRAYORDER_ABGR )
* Array component order low byte -> high byte.
View Source
const ( PACKEDLAYOUT_NONE = iota PACKEDLAYOUT_332 PACKEDLAYOUT_4444 PACKEDLAYOUT_1555 PACKEDLAYOUT_5551 PACKEDLAYOUT_565 PACKEDLAYOUT_8888 PACKEDLAYOUT_2101010 PACKEDLAYOUT_1010102 )
* Packed component layout.
View Source
const ( PIXELFORMAT_UNKNOWN = iota PIXELFORMAT_ARGB8888 = ((1 << 28) | ((PIXELTYPE_PACKED32) << 24) | ((PACKEDORDER_ARGB) << 20) | ((PACKEDLAYOUT_8888) << 16) | ((32) << 8) | ((4) << 0)) )
View Source
const ( RENDERER_SOFTWARE = 0x00000001 RENDERER_ACCELERATED = 0x00000002 RENDERER_PRESENTVSYNC = 0x00000004 RENDERER_TARGETTEXTURE = 0x00000008 TEXTUREACCESS_STATIC = 0x00000001 TEXTUREACCESS_STREAMING = 0x00000002 TEXTUREACCESS_TARGET = 0x00000003 TEXTUREMODULATE_NONE = 0x00000000 TEXTUREMODULATE_COLOR = 0x00000001 TEXTUREMODULATE_ALPHA = 0x00000002 SDL_FLIP_NONE = 0x00000000 SDL_FLIP_HORIZONTAL = 0x00000001 SDL_FLIP_VERTICAL = 0x00000002 )
View Source
const ( RW_SEEK_SET = 0 RW_SEEK_CUR = 1 RW_SEEK_END = 2 )
View Source
const ( SCANCODE_UNKNOWN = 0 SCANCODE_A = 4 SCANCODE_B = 5 SCANCODE_C = 6 SCANCODE_D = 7 SCANCODE_E = 8 SCANCODE_F = 9 SCANCODE_G = 10 SCANCODE_H = 11 SCANCODE_I = 12 SCANCODE_J = 13 SCANCODE_K = 14 SCANCODE_L = 15 SCANCODE_M = 16 SCANCODE_N = 17 SCANCODE_O = 18 SCANCODE_P = 19 SCANCODE_Q = 20 SCANCODE_R = 21 SCANCODE_S = 22 SCANCODE_T = 23 SCANCODE_U = 24 SCANCODE_V = 25 SCANCODE_W = 26 SCANCODE_X = 27 SCANCODE_Y = 28 SCANCODE_Z = 29 SCANCODE_1 = 30 SCANCODE_2 = 31 SCANCODE_3 = 32 SCANCODE_4 = 33 SCANCODE_5 = 34 SCANCODE_6 = 35 SCANCODE_7 = 36 SCANCODE_8 = 37 SCANCODE_9 = 38 SCANCODE_0 = 39 SCANCODE_RETURN = 40 SCANCODE_ESCAPE = 41 SCANCODE_BACKSPACE = 42 SCANCODE_TAB = 43 SCANCODE_SPACE = 44 SCANCODE_MINUS = 45 SCANCODE_EQUALS = 46 SCANCODE_LEFTBRACKET = 47 SCANCODE_RIGHTBRACKET = 48 SCANCODE_BACKSLASH = 49 /**< Located at the lower left of the return * key on ISO keyboards and at the right end * of the QWERTY row on ANSI keyboards. * Produces REVERSE SOLIDUS (backslash) and * VERTICAL LINE in a US layout REVERSE * SOLIDUS and VERTICAL LINE in a UK Mac * layout NUMBER SIGN and TILDE in a UK * Windows layout DOLLAR SIGN and POUND SIGN * in a Swiss German layout NUMBER SIGN and * APOSTROPHE in a German layout GRAVE * ACCENT and POUND SIGN in a French Mac * layout and ASTERISK and MICRO SIGN in a * French Windows layout. */ SDL_SCANCODE_NONUSHASH = 50 /**< ISO USB keyboards actually use this code * instead of 49 for the same key but all * OSes I've seen treat the two codes * identically. So as an implementor unless * your keyboard generates both of those * codes and your OS treats them differently * you should generate SDL_SCANCODE_BACKSLASH * instead of this code. As a user you * should not rely on this code because SDL * will never generate it with most (all?) * keyboards. */ SDL_SCANCODE_SEMICOLON = 51 SDL_SCANCODE_APOSTROPHE = 52 SDL_SCANCODE_GRAVE = 53 /**< Located in the top left corner (on both ANSI * and ISO keyboards). Produces GRAVE ACCENT and * TILDE in a US Windows layout and in US and UK * Mac layouts on ANSI keyboards GRAVE ACCENT * and NOT SIGN in a UK Windows layout SECTION * SIGN and PLUS-MINUS SIGN in US and UK Mac * layouts on ISO keyboards SECTION SIGN and * DEGREE SIGN in a Swiss German layout (Mac: * only on ISO keyboards) CIRCUMFLEX ACCENT and * DEGREE SIGN in a German layout (Mac: only on * ISO keyboards) SUPERSCRIPT TWO and TILDE in a * French Windows layout COMMERCIAL AT and * NUMBER SIGN in a French Mac layout on ISO * keyboards and LESS-THAN SIGN and GREATER-THAN * SIGN in a Swiss German German or French Mac * layout on ANSI keyboards. */ SCANCODE_COMMA = 54 SCANCODE_PERIOD = 55 SCANCODE_SLASH = 56 SCANCODE_CAPSLOCK = 57 SCANCODE_F1 = 58 SCANCODE_F2 = 59 SCANCODE_F3 = 60 SCANCODE_F4 = 61 SCANCODE_F5 = 62 SCANCODE_F6 = 63 SCANCODE_F7 = 64 SCANCODE_F8 = 65 SCANCODE_F9 = 66 SCANCODE_F10 = 67 SCANCODE_F11 = 68 SCANCODE_F12 = 69 SCANCODE_PRINTSCREEN = 70 SCANCODE_SCROLLLOCK = 71 SCANCODE_PAUSE = 72 SCANCODE_INSERT = 73 /**< insert on PC help on some Mac keyboards (but does send code 73 not 117) */ SCANCODE_HOME = 74 SCANCODE_PAGEUP = 75 SCANCODE_DELETE = 76 SCANCODE_END = 77 SCANCODE_PAGEDOWN = 78 SCANCODE_RIGHT = 79 SCANCODE_LEFT = 80 SCANCODE_DOWN = 81 SCANCODE_UP = 82 SCANCODE_NUMLOCKCLEAR = 83 /**< num lock on PC clear on Mac keyboards */ SCANCODE_KP_DIVIDE = 84 SCANCODE_KP_MULTIPLY = 85 SCANCODE_KP_MINUS = 86 SCANCODE_KP_PLUS = 87 SCANCODE_KP_ENTER = 88 SCANCODE_KP_1 = 89 SCANCODE_KP_2 = 90 SCANCODE_KP_3 = 91 SCANCODE_KP_4 = 92 SCANCODE_KP_5 = 93 SCANCODE_KP_6 = 94 SCANCODE_KP_7 = 95 SCANCODE_KP_8 = 96 SCANCODE_KP_9 = 97 SCANCODE_KP_0 = 98 SCANCODE_KP_PERIOD = 99 SCANCODE_NONUSBACKSLASH = 100 /**< This is the additional key that ISO * keyboards have over ANSI ones * located between left shift and Y. * Produces GRAVE ACCENT and TILDE in a * US or UK Mac layout REVERSE SOLIDUS * (backslash) and VERTICAL LINE in a * US or UK Windows layout and * LESS-THAN SIGN and GREATER-THAN SIGN * in a Swiss German German or French * layout. */ SCANCODE_APPLICATION = 101 /**< windows contextual menu compose */ SCANCODE_POWER = 102 /**< The USB document says this is a status flag * not a physical key - but some Mac keyboards * do have a power key. */ SCANCODE_KP_EQUALS = 103 SCANCODE_F13 = 104 SCANCODE_F14 = 105 SCANCODE_F15 = 106 SCANCODE_F16 = 107 SCANCODE_F17 = 108 SCANCODE_F18 = 109 SCANCODE_F19 = 110 SCANCODE_F20 = 111 SCANCODE_F21 = 112 SCANCODE_F22 = 113 SCANCODE_F23 = 114 SCANCODE_F24 = 115 SCANCODE_EXECUTE = 116 SCANCODE_HELP = 117 SCANCODE_MENU = 118 SCANCODE_SELECT = 119 SCANCODE_STOP = 120 SCANCODE_AGAIN = 121 /**< redo */ SCANCODE_UNDO = 122 SCANCODE_CUT = 123 SCANCODE_COPY = 124 SCANCODE_PASTE = 125 SCANCODE_FIND = 126 SCANCODE_MUTE = 127 SCANCODE_VOLUMEUP = 128 SCANCODE_VOLUMEDOWN = 129 /* not sure whether there's a reason to enable these */ /* SDL_SCANCODE_LOCKINGCAPSLOCK = 130 */ /* SDL_SCANCODE_LOCKINGNUMLOCK = 131 */ /* SDL_SCANCODE_LOCKINGSCROLLLOCK = 132 */ SCANCODE_KP_COMMA = 133 SCANCODE_KP_EQUALSAS400 = 134 SCANCODE_INTERNATIONAL1 = 135 /**< used on Asian keyboards see footnotes in USB doc */ SCANCODE_INTERNATIONAL2 = 136 SCANCODE_INTERNATIONAL3 = 137 /**< Yen */ SCANCODE_INTERNATIONAL4 = 138 SCANCODE_INTERNATIONAL5 = 139 SCANCODE_INTERNATIONAL6 = 140 SCANCODE_INTERNATIONAL7 = 141 SCANCODE_INTERNATIONAL8 = 142 SCANCODE_INTERNATIONAL9 = 143 SCANCODE_LANG1 = 144 /**< Hangul/English toggle */ SCANCODE_LANG2 = 145 /**< Hanja conversion */ SCANCODE_LANG3 = 146 /**< Katakana */ SCANCODE_LANG4 = 147 /**< Hiragana */ SCANCODE_LANG5 = 148 /**< Zenkaku/Hankaku */ SCANCODE_LANG6 = 149 /**< reserved */ SCANCODE_LANG7 = 150 /**< reserved */ SCANCODE_LANG8 = 151 /**< reserved */ SCANCODE_LANG9 = 152 /**< reserved */ SCANCODE_ALTERASE = 153 /**< Erase-Eaze */ SCANCODE_SYSREQ = 154 SCANCODE_CANCEL = 155 SCANCODE_CLEAR = 156 SCANCODE_PRIOR = 157 SCANCODE_RETURN2 = 158 SCANCODE_SEPARATOR = 159 SCANCODE_OUT = 160 SCANCODE_OPER = 161 SCANCODE_CLEARAGAIN = 162 SCANCODE_CRSEL = 163 SCANCODE_EXSEL = 164 SCANCODE_KP_00 = 176 SCANCODE_KP_000 = 177 SCANCODE_THOUSANDSSEPARATOR = 178 SCANCODE_DECIMALSEPARATOR = 179 SCANCODE_CURRENCYUNIT = 180 SCANCODE_CURRENCYSUBUNIT = 181 SCANCODE_KP_LEFTPAREN = 182 SCANCODE_KP_RIGHTPAREN = 183 SCANCODE_KP_LEFTBRACE = 184 SCANCODE_KP_RIGHTBRACE = 185 SCANCODE_KP_TAB = 186 SCANCODE_KP_BACKSPACE = 187 SCANCODE_KP_A = 188 SCANCODE_KP_B = 189 SCANCODE_KP_C = 190 SCANCODE_KP_D = 191 SCANCODE_KP_E = 192 SCANCODE_KP_F = 193 SCANCODE_KP_XOR = 194 SCANCODE_KP_POWER = 195 SCANCODE_KP_PERCENT = 196 SCANCODE_KP_LESS = 197 SCANCODE_KP_GREATER = 198 SCANCODE_KP_AMPERSAND = 199 SCANCODE_KP_DBLAMPERSAND = 200 SCANCODE_KP_VERTICALBAR = 201 SCANCODE_KP_DBLVERTICALBAR = 202 SCANCODE_KP_COLON = 203 SCANCODE_KP_HASH = 204 SCANCODE_KP_SPACE = 205 SCANCODE_KP_AT = 206 SCANCODE_KP_EXCLAM = 207 SCANCODE_KP_MEMSTORE = 208 SCANCODE_KP_MEMRECALL = 209 SCANCODE_KP_MEMCLEAR = 210 SCANCODE_KP_MEMADD = 211 SCANCODE_KP_MEMSUBTRACT = 212 SCANCODE_KP_MEMMULTIPLY = 213 SCANCODE_KP_MEMDIVIDE = 214 SCANCODE_KP_PLUSMINUS = 215 SCANCODE_KP_CLEAR = 216 SCANCODE_KP_CLEARENTRY = 217 SCANCODE_KP_BINARY = 218 SCANCODE_KP_OCTAL = 219 SCANCODE_KP_DECIMAL = 220 SCANCODE_KP_HEXADECIMAL = 221 SCANCODE_LCTRL = 224 SCANCODE_LSHIFT = 225 SCANCODE_LALT = 226 /**< alt option */ SCANCODE_LGUI = 227 /**< windows command (apple) meta */ SCANCODE_RCTRL = 228 SCANCODE_RSHIFT = 229 SCANCODE_RALT = 230 /**< alt gr option */ SCANCODE_RGUI = 231 /**< windows command (apple) meta */ SCANCODE_MODE = 257 /**< I'm not sure if this is really not covered * by any of the above but since there's a * special KMOD_MODE for it I'm adding it here */ SCANCODE_AUDIONEXT = 258 SCANCODE_AUDIOPREV = 259 SCANCODE_AUDIOSTOP = 260 SCANCODE_AUDIOPLAY = 261 SCANCODE_AUDIOMUTE = 262 SCANCODE_MEDIASELECT = 263 SCANCODE_WWW = 264 SCANCODE_MAIL = 265 SCANCODE_CALCULATOR = 266 SCANCODE_COMPUTER = 267 SCANCODE_AC_SEARCH = 268 SCANCODE_AC_HOME = 269 SCANCODE_AC_BACK = 270 SCANCODE_AC_FORWARD = 271 SCANCODE_AC_STOP = 272 SCANCODE_AC_REFRESH = 273 SCANCODE_AC_BOOKMARKS = 274 SCANCODE_BRIGHTNESSDOWN = 275 SCANCODE_BRIGHTNESSUP = 276 SCANCODE_DISPLAYSWITCH = 277 /**< display mirroring/dual display switch video mode switch */ SCANCODE_KBDILLUMTOGGLE = 278 SCANCODE_KBDILLUMDOWN = 279 SCANCODE_KBDILLUMUP = 280 SCANCODE_EJECT = 281 SCANCODE_SLEEP = 282 SCANCODE_APP1 = 283 SCANCODE_APP2 = 284 NUM_SCANCODES = 512 /**< not a key just marks the number of scancodes for array bounds */ )
View Source
const ( SWSURFACE = 0 PREALLOC = 0x00000001 RLEACCEL = 0x00000002 DONTFREE = 0x00000004 )
View Source
const ( SYSWM_UNKNOWN = iota SYSWM_WINDOWS SYSWM_X11 SYSWM_DIRECTFB SYSWM_COCOA SYSWM_UIKIT )
View Source
const ( MAJOR_VERSION = C.SDL_MAJOR_VERSION MINOR_VERSION = C.SDL_MINOR_VERSION PATCHLEVEL = C.SDL_PATCHLEVEL )
View Source
const ( WINDOW_FULLSCREEN = 0x00000001 WINDOW_OPENGL = 0x00000002 WINDOW_SHOWN = 0x00000004 WINDOW_HIDDEN = 0x00000008 WINDOW_BORDERLESS = 0x00000010 WINDOW_RESIZABLE = 0x00000020 WINDOW_MINIMIZED = 0x00000040 WINDOW_MAXIMIZED = 0x00000080 WINDOW_INPUT_GRABBED = 0x00000100 WINDOW_INPUT_FOCUS = 0x00000200 WINDOW_MOUSE_FOCUS = 0x00000400 WINDOW_FULLSCREEN_DESKT = WINDOW_FULLSCREEN | 0x00001000 WINDOW_FOREIGN = 0x00000800 )
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 = 0x1FFF0000 WINDOWPOS_UNDEFINED = WINDOWPOS_UNDEFINED_MASK | 0 )
View Source
const ( GL_RED_SIZE = 0x00000000 GL_GREEN_SIZE = 0x00000001 GL_BLUE_SIZE = 0x00000002 GL_ALPHA_SIZE = 0x00000003 GL_BUFFER_SIZE = 0x00000004 GL_DOUBLEBUFFER = 0x00000005 GL_DEPTH_SIZE = 0x00000006 GL_STENCIL_SIZE = 0x00000007 GL_ACCUM_RED_SIZE = 0x00000008 GL_ACCUM_GREEN_SIZE = 0x00000009 GL_ACCUM_BLUE_SIZE = 0x0000000A GL_ACCUM_ALPHA_SIZE = 0x0000000B GL_STEREO = 0x0000000C GL_MULTISAMPLEBUFFERS = 0x0000000D GL_MULTISAMPLESAMPLES = 0x0000000E GL_ACCELERATED_VISUAL = 0x0000000F GL_RETAINED_BACKING = 0x00000010 GL_CONTEXT_MAJOR_VERSION = 0x00000011 GL_CONTEXT_MINOR_VERSION = 0x00000012 GL_CONTEXT_EGL = 0x00000013 GL_CONTEXT_FLAGS = 0x00000014 GL_CONTEXT_PROFILE_MASK = 0x00000015 GL_SHARE_WITH_CURRENT_CONTEXT = 0x00000016 )
View Source
const ( GL_CONTEXT_PROFILE_CORE = 0x0001 GL_CONTEXT_PROFILE_COMPATIBILITY = 0x0002 GL_CONTEXT_PROFILE_ES = 0x0004 )
View Source
const ( GL_CONTEXT_DEBUG_FLAG = 0x0001 GL_CONTEXT_FORWARD_COMPATIBLE_FLAG = 0x0002 GL_CONTEXT_ROBUST_ACCESS_FLAG = 0x0004 GL_CONTEXT_RESET_ISOLATION_FLAG = 0x0008 )
View Source
const CACHELINE_SIZE = 128
View Source
const HAPTIC_INFINITY = 4294967295
View Source
const K_SCANCODE_MASK = 1 << 30
View Source
const MIX_MAXVOLUME = 128
View Source
const TOUCH_MOUSEID = C.SDL_TOUCH_MOUSEID
Variables ¶
This section is empty.
Functions ¶
func BuildAudioCVT ¶
func BuildAudioCVT(cvt *AudioCVT, src_format AudioFormat, src_channels uint8, src_rate int, dst_format AudioFormat, dst_channels uint8, dst_rate int) int
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
func ClearError ¶
func ClearError()
func CloseAudio ¶
func CloseAudio()
func CloseAudioDevice ¶
func CloseAudioDevice(dev AudioDeviceID)
func ConvertAudio ¶
func ConvertPixels ¶
func CreateWindowAndRenderer ¶
func DisableScreenSaver ¶
func DisableScreenSaver()
func EnableScreenSaver ¶
func EnableScreenSaver()
func EventState ¶
func FlushEvent ¶
func FlushEvent(type_ uint32)
func FlushEvents ¶
func FlushEvents(minType, maxType uint32)
func FreeCursor ¶
func FreeCursor(cursor *Cursor)
func GL_DeleteContext ¶
func GL_DeleteContext(context GLContext)
func GL_ExtensionSupported ¶
func GL_GetAttribute ¶
func GL_GetProcAddress ¶
func GL_GetSwapInterval ¶
func GL_GetSwapInterval() int
func GL_LoadLibrary ¶
func GL_MakeCurrent ¶
func GL_SetAttribute ¶
func GL_SetSwapInterval ¶
func GL_SwapWindow ¶
func GL_SwapWindow(window *Window)
func GL_UnloadLibrary ¶
func GL_UnloadLibrary()
func GameControllerGetStringForAxis ¶
func GameControllerGetStringForAxis(axis GameControllerAxis) string
func GameControllerGetStringForButton ¶
func GameControllerGetStringForButton(button GameControllerButton) string
func GameControllerMapping ¶
func GameControllerMapping(gamecontroller *GameController) string
func GameControllerMappingForGUID ¶
func GameControllerMappingForGUID(guid JoystickGUID) string
func GameControllerUpdate ¶
func GameControllerUpdate()
func GetAudioDeviceName ¶
func GetAudioDriver ¶
func GetCPUCacheLineSize ¶
func GetCPUCacheLineSize() int
func GetCPUCount ¶
func GetCPUCount() int
func GetClipboardText ¶
func GetClipboardText() string
func GetCurrentAudioDriver ¶
func GetCurrentAudioDriver() string
func GetCurrentDisplayMode ¶
func GetCurrentDisplayMode(displayIndex int, mode *DisplayMode) int
func GetCurrentVideoDriver ¶
func GetCurrentVideoDriver() string
func GetDesktopDisplayMode ¶
func GetDesktopDisplayMode(displayIndex int, mode *DisplayMode) int
func GetDisplayMode ¶
func GetDisplayMode(displayIndex int, modeIndex int, mode *DisplayMode) int
func GetEventState ¶
func GetKeyName ¶
func GetKeyboardState ¶
func GetKeyboardState() []uint8
func GetMouseState ¶
func GetNumAudioDevices ¶
func GetNumAudioDrivers ¶
func GetNumAudioDrivers() int
func GetNumDisplayModes ¶
func GetNumRenderDrivers ¶
func GetNumRenderDrivers() int
func GetNumTouchDevices ¶
func GetNumTouchDevices() int
func GetNumTouchFingers ¶
func GetNumVideoDrivers ¶
func GetNumVideoDrivers() int
func GetPerformanceCounter ¶
func GetPerformanceCounter() uint64
func GetPerformanceFrequency ¶
func GetPerformanceFrequency() uint64
func GetPlatform ¶
func GetPlatform() string
func GetRelativeMouseMode ¶
func GetRelativeMouseMode() bool
func GetRelativeMouseState ¶
func GetRenderDriverInfo ¶
func GetRenderDriverInfo(index int, info *RendererInfo) int
func GetRevision ¶
func GetRevision() string
func GetRevisionNumber ¶
func GetRevisionNumber() int
func GetScancodeName ¶
func GetVersion ¶
func GetVersion(v *Version)
func GetVideoDriver ¶
func GetWindowDisplayIndex ¶
func GetWindowDisplayMode ¶
func GetWindowDisplayMode(window *Window, mode *DisplayMode) int
func HapticIndex ¶
func HapticName ¶
func HapticOpened ¶
func HasAltiVec ¶
func HasAltiVec() bool
func HasClipboardText ¶
func HasClipboardText() bool
func HasScreenKeyboardSupport ¶
func HasScreenKeyboardSupport() bool
func InitSubSystem ¶
func IsGameController ¶
func IsScreenKeyboardShown ¶
func IsScreenSaverEnabled ¶
func IsScreenSaverEnabled() bool
func IsTextInputActive ¶
func IsTextInputActive() bool
func JoystickEventState ¶
func JoystickGetGUIDString ¶
func JoystickGetGUIDString(guid JoystickGUID, pszGUID string, cbGUID int)
func JoystickIsHaptic ¶
func JoystickNameForIndex ¶
func LoadDollarTemplates ¶
func LoadObject ¶
func LockAudioDevice ¶
func LockAudioDevice(dev AudioDeviceID)
func LogResetPriorities ¶
func LogResetPriorities()
func LogSetAllPriority ¶
func LogSetAllPriority(priority LogPriority)
func LogSetPriority ¶
func LogSetPriority(category int, priority LogPriority)
func MixAudioFormat ¶
func MixAudioFormat(dst, src *uint8, format AudioFormat, len_ uint32, volume int)
func MouseIsHaptic ¶
func MouseIsHaptic() int
func NumHaptics ¶
func NumHaptics() int
func NumJoysticks ¶
func NumJoysticks() int
func OpenAudioDevice ¶
func OutOfMemory ¶
func OutOfMemory()
func PauseAudio ¶
func PauseAudio(pause_on int)
func PauseAudioDevice ¶
func PauseAudioDevice(dev AudioDeviceID, pause_on int)
func PeepEvents ¶
func PumpEvents ¶
func PumpEvents()
func QueryTexture ¶
func QuitSubSystem ¶
func QuitSubSystem(flags uint32)
func RecordGesture ¶
func RegisterEvents ¶
func SaveAllDollarTemplates ¶
func SaveDollarTemplate ¶
func SetClipboardText ¶
func SetModState ¶
func SetModState(modstate Keymod)
func SetRelativeMouseMode ¶
func SetTextInputRect ¶
func SetTextInputRect(rect *Rect)
func SetWindowDisplayMode ¶
func SetWindowDisplayMode(window *Window, mode *DisplayMode) int
func ShowCursor ¶
func StartTextInput ¶
func StartTextInput()
func StopTextInput ¶
func StopTextInput()
func U8To32Array ¶
func UnloadObject ¶
func UnlockAudio ¶
func UnlockAudio()
func UnlockAudioDevice ¶
func UnlockAudioDevice(dev AudioDeviceID)
func Unsupported ¶
func Unsupported()
func VERSIONNUM ¶
func VERSION_ATLEAST ¶
Types ¶
type AudioCVT ¶
type AudioCVT struct { Needed int SrcFormat AudioFormat DstFormat AudioFormat RateIncr float64 Buf *uint8 Len int LenCVT int LenMult int LenRatio float64 FilterIndex int // contains filtered or unexported fields }
type AudioCallback ¶
type AudioCallback C.SDL_AudioCallback
type AudioDeviceID ¶
type AudioDeviceID uint32
type AudioFilter ¶
type AudioFilter C.SDL_AudioFilter
type AudioFormat ¶
type AudioFormat uint16
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 int Format AudioFormat Channels uint8 Silence uint8 Samples uint16 Padding uint16 Size uint32 Callback AudioCallback UserData unsafe.Pointer }
type AudioStatus ¶
type AudioStatus uint
func GetAudioDeviceStatus ¶
func GetAudioDeviceStatus(dev AudioDeviceID) AudioStatus
func GetAudioStatus ¶
func GetAudioStatus() AudioStatus
type BlendMode ¶
type BlendMode C.SDL_BlendMode
type ClipboardEvent ¶
type CommonEvent ¶
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 CreateCursor ¶
func CreateSystemCursor ¶
func CreateSystemCursor(id SystemCursor) *Cursor
func GetDefaultCursor ¶
func GetDefaultCursor() *Cursor
type DisplayMode ¶
func GetClosestDisplayMode ¶
func GetClosestDisplayMode(displayIndex int, mode *DisplayMode, closest *DisplayMode) *DisplayMode
type DollarGestureEvent ¶
type EventFilter ¶
type EventFilter C.SDL_EventFilter
type Finger ¶
func GetTouchFinger ¶
type FingerID ¶
type FingerID C.SDL_FingerID
type GLContext ¶
func GL_CreateContext ¶
type GameController ¶
type GameController C.SDL_GameController
func GameControllerOpen ¶
func GameControllerOpen(joystick_index int) *GameController
func (*GameController) Close ¶
func (gamecontroller *GameController) Close()
func (*GameController) GetAttached ¶
func (gamecontroller *GameController) GetAttached() bool
func (*GameController) GetAxis ¶
func (gamecontroller *GameController) GetAxis(axis GameControllerAxis) int16
func (*GameController) GetBindForAxis ¶
func (gamecontroller *GameController) GetBindForAxis(axis GameControllerAxis) GameControllerButtonBind
func (*GameController) GetBindForButton ¶
func (gamecontroller *GameController) GetBindForButton(button GameControllerButton) GameControllerButtonBind
func (*GameController) GetButton ¶
func (gamecontroller *GameController) GetButton(button GameControllerButton) byte
func (*GameController) GetJoystick ¶
func (gamecontroller *GameController) GetJoystick() *Joystick
type GameControllerAxis ¶
type GameControllerAxis C.SDL_GameControllerAxis
func GameControllerGetAxisFromString ¶
func GameControllerGetAxisFromString(pchString string) GameControllerAxis
type GameControllerBindType ¶
type GameControllerBindType C.SDL_GameControllerBindType
type GameControllerButton ¶
type GameControllerButton C.SDL_GameControllerButton
func GameControllerGetButtonFromString ¶
func GameControllerGetButtonFromString(pchString string) GameControllerButton
type GameControllerButtonBind ¶
type GameControllerButtonBind C.SDL_GameControllerButtonBind
type GestureID ¶
type GestureID C.SDL_GestureID
type Haptic ¶
type Haptic C.SDL_Haptic
func HapticOpen ¶
func HapticOpenFromJoystick ¶
func HapticOpenFromMouse ¶
func HapticOpenFromMouse() *Haptic
func (*Haptic) DestroyEffect ¶
func (*Haptic) EffectSupported ¶
func (haptic *Haptic) EffectSupported(effect *HapticEffect) int
func (*Haptic) GetEffectStatus ¶
func (*Haptic) NewEffect ¶
func (haptic *Haptic) NewEffect(effect *HapticEffect) int
func (*Haptic) NumEffects ¶
func (*Haptic) NumEffectsPlaying ¶
func (*Haptic) RumbleInit ¶
func (*Haptic) RumbleStop ¶
func (*Haptic) RumbleSupported ¶
func (*Haptic) SetAutocenter ¶
func (*Haptic) StopEffect ¶
func (*Haptic) UpdateEffect ¶
func (haptic *Haptic) UpdateEffect(effect int, data *HapticEffect) int
type HapticCondition ¶
type HapticConstant ¶
type HapticCustom ¶
type HapticDirection ¶
type HapticDirection struct { Type byte // contains filtered or unexported fields }
type HapticEffect ¶
type HapticEffect interface{}
type HapticPeriodic ¶
type HapticRamp ¶
type JoyAxisEvent ¶
type JoyAxisEvent struct { Type uint32 Timestamp uint32 Which JoystickID Axis uint8 Value int16 // contains filtered or unexported fields }
type JoyBallEvent ¶
type JoyButtonEvent ¶
type JoyButtonEvent struct { Type uint32 Timestamp uint32 Which JoystickID Button uint8 State uint8 // contains filtered or unexported fields }
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 }
type Joystick ¶
type Joystick C.SDL_Joystick
func JoystickOpen ¶
func (*Joystick) GetAttached ¶
func (*Joystick) GetGUID ¶
func (joystick *Joystick) GetGUID() JoystickGUID
func (*Joystick) InstanceID ¶
func (joystick *Joystick) InstanceID() JoystickID
func (*Joystick) NumButtons ¶
type JoystickGUID ¶
type JoystickGUID C.SDL_JoystickGUID
func JoystickGetDeviceGUID ¶
func JoystickGetDeviceGUID(device_index int) JoystickGUID
func JoystickGetGUIDFromString ¶
func JoystickGetGUIDFromString(pchGUID string) JoystickGUID
type JoystickID ¶
type JoystickID C.SDL_JoystickID
type KeyDownEvent ¶
type KeyUpEvent ¶
type Keymod ¶
type Keymod C.SDL_Keymod
type LogPriority ¶
type LogPriority C.SDL_LogPriority
func LogGetPriority ¶
func LogGetPriority(category int) LogPriority
type MouseButtonEvent ¶
type MouseMotionEvent ¶
type MouseWheelEvent ¶
type MultiGestureEvent ¶
type PixelFormat ¶
type PixelFormat struct { Format uint32 Palette *Palette BitsPerPixels uint8 BytesPerPixel uint8 Padding [2]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 int // contains filtered or unexported fields }
type RWops ¶
func RWFromFile ¶
type Renderer ¶
type Renderer struct { WindowEvent unsafe.Pointer GetOutputSize unsafe.Pointer CreateTexture unsafe.Pointer SetTextureColorMod unsafe.Pointer SetTextureAlphaMod unsafe.Pointer UpdateTexture unsafe.Pointer LockTexture unsafe.Pointer UnlockTexture unsafe.Pointer UpdateViewport unsafe.Pointer UpdateClipRect unsafe.Pointer RenderClear unsafe.Pointer RenderDrawPoints unsafe.Pointer RenderDrawLines unsafe.Pointer RenderFillRects unsafe.Pointer RenderCopy unsafe.Pointer RenderCopyEx unsafe.Pointer RenderReadPixels unsafe.Pointer RenderPresent unsafe.Pointer DestroyTexture unsafe.Pointer DestroyRenderer unsafe.Pointer GL_BindTexture unsafe.Pointer GL_UnbindTexture unsafe.Pointer Info RendererInfo Window *Window Hidden bool LogicalW int LogicalH int LogicalWBackup int LogicalHBackup int Viewport Rect ViewportBackup Rect ClipRect Rect ClipRectBackup Rect Scale FPoint ScaleBackup FPoint Textures *Texture Targets *Texture R uint8 G uint8 B uint8 A uint8 BlendMode BlendMode DriverData unsafe.Pointer // contains filtered or unexported fields }
func CreateSoftwareRenderer ¶
func (*Renderer) CreateTextureFromSurface ¶
func (*Renderer) DrawPoints ¶
func (*Renderer) GetClipRect ¶
func (*Renderer) GetDrawBlendMode ¶
func (*Renderer) GetDrawColor ¶
func (*Renderer) GetRenderTarget ¶
func (*Renderer) GetRendererInfo ¶
func (renderer *Renderer) GetRendererInfo(info *RendererInfo) int
func (*Renderer) GetRendererOutputSize ¶
func (*Renderer) GetViewport ¶
func (*Renderer) ReadPixels ¶
func (*Renderer) RenderTargetSupported ¶
func (*Renderer) SetClipRect ¶
func (*Renderer) SetDrawBlendMode ¶
func (*Renderer) SetDrawColor ¶
func (*Renderer) SetRenderTarget ¶
func (*Renderer) SetViewport ¶
type RendererInfo ¶
type SW_YUVTexture ¶
type Surface ¶
type Surface struct { Flags uint32 Format *PixelFormat W int32 H int32 Pitch int UserData unsafe.Pointer Locked int LockData unsafe.Pointer ClipRect Rect RefCount int // contains filtered or unexported fields }
func CreateRGBSurface ¶
func CreateRGBSurfaceFrom ¶
func LoadBMP_RW ¶
func (*Surface) BlitScaled ¶
func (*Surface) BytesPerPixel ¶
func (*Surface) ConvertFormat ¶
func (*Surface) GetAlphaMod ¶
func (*Surface) GetBlendMode ¶
func (*Surface) GetClipRect ¶
func (*Surface) GetColorKey ¶
func (*Surface) GetColorMod ¶
func (*Surface) LowerBlitScaled ¶
func (*Surface) SetAlphaMod ¶
func (*Surface) SetBlendMode ¶
func (*Surface) SetClipRect ¶
func (*Surface) SetColorMod ¶
func (*Surface) SetPalette ¶
func (*Surface) SoftStretch ¶
type SysWMEvent ¶
type SysWMInfo ¶
type SysWMInfo struct { Version Version Subsystem uint32 // contains filtered or unexported fields }
func (*SysWMInfo) GetCocoaInfo ¶
func (*SysWMInfo) GetDFBInfo ¶
func (*SysWMInfo) GetUIKitInfo ¶
func (*SysWMInfo) GetWindowsInfo ¶
func (info *SysWMInfo) GetWindowsInfo() *WindowsInfo
func (*SysWMInfo) GetX11Info ¶
type SystemCursor ¶
type SystemCursor C.SDL_SystemCursor
type TextEditingEvent ¶
type TextInputEvent ¶
type Texture ¶
type Texture struct { Magic unsafe.Pointer Format uint32 Access int W int H int ModMode int BlendMode BlendMode R uint8 G uint8 B uint8 A uint8 Renderer Renderer Native *Texture Yuv *SW_YUVTexture Pixels unsafe.Pointer Pitch int LockedRect Rect DriverData Rect Prev *Texture Next *Texture }
func CreateTexture ¶
func (*Texture) GL_BindTexture ¶
func (*Texture) GL_UnbindTexture ¶
func (*Texture) GetBlendMode ¶
func (*Texture) SetAlphaMod ¶
func (*Texture) SetBlendMode ¶
type TouchFingerEvent ¶
type Window ¶
type Window C.SDL_Window
func CreateWindow ¶
func CreateWindowFrom ¶
func GetKeyboardFocus ¶
func GetKeyboardFocus() *Window
func GetMouseFocus ¶
func GetMouseFocus() *Window
func GetWindowFromID ¶
func (*Window) GetBrightness ¶
func (*Window) GetGammaRamp ¶
func (*Window) GetMaximumSize ¶
func (*Window) GetMinimumSize ¶
func (*Window) GetPixelFormat ¶
func (*Window) GetPosition ¶
func (*Window) GetRenderer ¶
func (*Window) GetSurface ¶
func (*Window) SetBordered ¶
func (*Window) SetBrightness ¶
func (*Window) SetFullscreen ¶
func (*Window) SetGammaRamp ¶
func (*Window) SetMaximumSize ¶
func (*Window) SetMinimumSize ¶
func (*Window) SetPosition ¶
func (*Window) UpdateSurface ¶
func (*Window) UpdateSurfaceRects ¶
func (*Window) WarpMouseInWindow ¶
type WindowEvent ¶
type WindowsInfo ¶
Source Files
¶
- helpers.go
- sdl.go
- sdl_audio.go
- sdl_blendmode.go
- sdl_clipboard.go
- sdl_cpuinfo.go
- sdl_endian.go
- sdl_error.go
- sdl_events.go
- sdl_gamecontroller.go
- sdl_gesture.go
- sdl_haptic.go
- sdl_joystick.go
- sdl_keyboard.go
- sdl_keycode.go
- sdl_loadso.go
- sdl_log.go
- sdl_mouse.go
- sdl_pixels.go
- sdl_rect.go
- sdl_render.go
- sdl_rwops.go
- sdl_scancode.go
- sdl_surface.go
- sdl_sysrender.go
- sdl_syswm.go
- sdl_timer.go
- sdl_touch.go
- sdl_version.go
- sdl_video.go
- sdl_yuv_sw_c.go
Click to show internal directories.
Click to hide internal directories.