Versions in this module Expand all Collapse all v0 v0.1.6 Dec 4, 2026 Changes in this version + func SetSwapInterval(interval int) v0.1.5 Dec 3, 2026 v0.1.4 Dec 3, 2026 v0.1.3 Dec 3, 2026 Changes in this version + const GLProfileCompatibility + const GLProfileCore + const GLProfileES + func SetGLContextVersion(major, minor int32, profile uint32) v0.1.2 Dec 3, 2026 Changes in this version + func Lookup(handle uintptr, name string) uintptr + func OpenLibrary(name string) (uintptr, error) v0.1.1 Dec 3, 2026 v0.1.0 Dec 3, 2026 Changes in this version + const ButtonLeft + const ButtonMiddle + const ButtonRight + const EdgeBot + const EdgeLeft + const EdgeNone + const EdgeRight + const EdgeTop + const KeyApostrophe + const KeyBackslash + const KeyCloseBracket + const KeyComma + const KeyDelete + const KeyEnd + const KeyEqual + const KeyF1 + const KeyF10 + const KeyF11 + const KeyF12 + const KeyF2 + const KeyF3 + const KeyF4 + const KeyF5 + const KeyF6 + const KeyF7 + const KeyF8 + const KeyF9 + const KeyGrave + const KeyHome + const KeyInsert + const KeyMinus + const KeyOpenBracket + const KeyPageDown + const KeyPageUp + const KeyPause + const KeyPeriod + const KeySemicolon + const KeySlash + const Keypad0 + const Keypad1 + const Keypad2 + const Keypad3 + const Keypad4 + const Keypad5 + const Keypad6 + const Keypad7 + const Keypad8 + const Keypad9 + const KeypadAsterisk + const KeypadComma + const KeypadDot + const KeypadEnter + const KeypadEquals + const KeypadMinus + const KeypadPercent + const KeypadPlus + const KeypadSlash + const ModAlt + const ModCaps + const ModCtrl + const ModMeta + const ModNone + const ModNum + const ModScroll + const ModShift + const SDL3_EVENT_APP_DID_BACKGROUND + const SDL3_EVENT_APP_DID_FOREGROUND + const SDL3_EVENT_APP_LOW_MEMORY + const SDL3_EVENT_APP_TERMINATING + const SDL3_EVENT_APP_WILL_BACKGROUND + const SDL3_EVENT_APP_WILL_FOREGROUND + const SDL3_EVENT_DISPLAY_ORIENTATION + const SDL3_EVENT_DROP_BEGIN + const SDL3_EVENT_DROP_COMPLETE + const SDL3_EVENT_DROP_FILE + const SDL3_EVENT_DROP_POSITION + const SDL3_EVENT_DROP_TEXT + const SDL3_EVENT_FINGER_CANCELED + const SDL3_EVENT_FINGER_DOWN + const SDL3_EVENT_FINGER_MOTION + const SDL3_EVENT_FINGER_UP + const SDL3_EVENT_JOYSTICK_AXIS + const SDL3_EVENT_JOYSTICK_BALL + const SDL3_EVENT_JOYSTICK_BUTTON_DOWN + const SDL3_EVENT_JOYSTICK_BUTTON_UP + const SDL3_EVENT_JOYSTICK_HAT + const SDL3_EVENT_KEYBOARD_ADDED + const SDL3_EVENT_KEYBOARD_REMOVED + const SDL3_EVENT_KEYMAP_CHANGED + const SDL3_EVENT_KEY_DOWN + const SDL3_EVENT_KEY_UP + const SDL3_EVENT_MOUSE_ADDED + const SDL3_EVENT_MOUSE_BUTTON_DOWN + const SDL3_EVENT_MOUSE_BUTTON_UP + const SDL3_EVENT_MOUSE_MOTION + const SDL3_EVENT_MOUSE_REMOVED + const SDL3_EVENT_MOUSE_WHEEL + const SDL3_EVENT_QUIT + const SDL3_EVENT_SCREEN_KEYBOARD_HIDDEN + const SDL3_EVENT_SCREEN_KEYBOARD_SHOWN + const SDL3_EVENT_SENSOR_UPDATE + const SDL3_EVENT_TEXT_EDITING + const SDL3_EVENT_TEXT_EDITING_CANDIDATES + const SDL3_EVENT_TEXT_INPUT + const SDL3_EVENT_WINDOW_CLOSE_REQUESTED + const SDL3_EVENT_WINDOW_DESTROYED + const SDL3_EVENT_WINDOW_DISPLAY_CHANGED + const SDL3_EVENT_WINDOW_DISPLAY_SCALE_CHANGED + const SDL3_EVENT_WINDOW_ENTER_FULLSCREEN + const SDL3_EVENT_WINDOW_EXPOSED + const SDL3_EVENT_WINDOW_FOCUS_GAINED + const SDL3_EVENT_WINDOW_FOCUS_LOST + const SDL3_EVENT_WINDOW_HDR_STATE_CHANGED + const SDL3_EVENT_WINDOW_HIDDEN + const SDL3_EVENT_WINDOW_HIT_TEST + const SDL3_EVENT_WINDOW_ICCPROF_CHANGED + const SDL3_EVENT_WINDOW_LEAVE_FULLSCREEN + const SDL3_EVENT_WINDOW_MAXIMIZED + const SDL3_EVENT_WINDOW_METAL_VIEW_RESIZED + const SDL3_EVENT_WINDOW_MINIMIZED + const SDL3_EVENT_WINDOW_MOUSE_ENTER + const SDL3_EVENT_WINDOW_MOUSE_LEAVE + const SDL3_EVENT_WINDOW_MOVED + const SDL3_EVENT_WINDOW_OCCLUDED + const SDL3_EVENT_WINDOW_PIXEL_SIZE_CHANGED + const SDL3_EVENT_WINDOW_RESIZED + const SDL3_EVENT_WINDOW_RESTORED + const SDL3_EVENT_WINDOW_SAFE_AREA_CHANGED + const SDL3_EVENT_WINDOW_SHOWN + const SDL3_GL_CONTEXT_MAJOR_VERSION + const SDL3_GL_CONTEXT_MINOR_VERSION + const SDL3_GL_CONTEXT_PROFILE_ES + const SDL3_GL_CONTEXT_PROFILE_MASK + const SDL3_GL_MULTISAMPLEBUFFERS + const SDL3_GL_MULTISAMPLESAMPLES + const SDL3_GL_SHARE_WITH_CURRENT_CONTEXT + const SDL3_HINT_ANDROID_TRAP_BACK_BUTTON + const SDL3_HINT_VIDEO_FORCE_EGL + const SDL3_INIT_VIDEO + const SDL3_KMOD_CAPS + const SDL3_KMOD_LALT + const SDL3_KMOD_LCTRL + const SDL3_KMOD_LGUI + const SDL3_KMOD_LSHIFT + const SDL3_KMOD_NUM + const SDL3_KMOD_RALT + const SDL3_KMOD_RCTRL + const SDL3_KMOD_RGUI + const SDL3_KMOD_RSHIFT + const SDL3_KMOD_SCROLL + const SDL3_PIXELFORMAT_ARGB8888 + const SDL3_SCANCODE_0 + const SDL3_SCANCODE_1 + const SDL3_SCANCODE_2 + const SDL3_SCANCODE_3 + const SDL3_SCANCODE_4 + const SDL3_SCANCODE_5 + const SDL3_SCANCODE_6 + const SDL3_SCANCODE_7 + const SDL3_SCANCODE_8 + const SDL3_SCANCODE_9 + const SDL3_SCANCODE_A + const SDL3_SCANCODE_APOSTROPHE + const SDL3_SCANCODE_B + const SDL3_SCANCODE_BACKSLASH + const SDL3_SCANCODE_BACKSPACE + const SDL3_SCANCODE_C + const SDL3_SCANCODE_COMMA + const SDL3_SCANCODE_D + const SDL3_SCANCODE_DELETE + const SDL3_SCANCODE_DOWN + const SDL3_SCANCODE_E + const SDL3_SCANCODE_END + const SDL3_SCANCODE_EQUAL + const SDL3_SCANCODE_ESCAPE + const SDL3_SCANCODE_F + const SDL3_SCANCODE_F1 + const SDL3_SCANCODE_F10 + const SDL3_SCANCODE_F11 + const SDL3_SCANCODE_F12 + const SDL3_SCANCODE_F2 + const SDL3_SCANCODE_F3 + const SDL3_SCANCODE_F4 + const SDL3_SCANCODE_F5 + const SDL3_SCANCODE_F6 + const SDL3_SCANCODE_F7 + const SDL3_SCANCODE_F8 + const SDL3_SCANCODE_F9 + const SDL3_SCANCODE_G + const SDL3_SCANCODE_GRAVE + const SDL3_SCANCODE_H + const SDL3_SCANCODE_HOME + const SDL3_SCANCODE_I + const SDL3_SCANCODE_INSERT + const SDL3_SCANCODE_J + const SDL3_SCANCODE_K + const SDL3_SCANCODE_KP_0 + const SDL3_SCANCODE_KP_1 + const SDL3_SCANCODE_KP_2 + const SDL3_SCANCODE_KP_3 + const SDL3_SCANCODE_KP_4 + const SDL3_SCANCODE_KP_5 + const SDL3_SCANCODE_KP_6 + const SDL3_SCANCODE_KP_7 + const SDL3_SCANCODE_KP_8 + const SDL3_SCANCODE_KP_9 + const SDL3_SCANCODE_KP_COMMA + const SDL3_SCANCODE_KP_DIVIDE + const SDL3_SCANCODE_KP_ENTER + const SDL3_SCANCODE_KP_EQUALS + const SDL3_SCANCODE_KP_MINUS + const SDL3_SCANCODE_KP_MULTIPLY + const SDL3_SCANCODE_KP_PERIOD + const SDL3_SCANCODE_KP_PLUS + const SDL3_SCANCODE_L + const SDL3_SCANCODE_LALT + const SDL3_SCANCODE_LCTRL + const SDL3_SCANCODE_LEFT + const SDL3_SCANCODE_LEFTBRACKET + const SDL3_SCANCODE_LGUI + const SDL3_SCANCODE_LSHIFT + const SDL3_SCANCODE_M + const SDL3_SCANCODE_MINUS + const SDL3_SCANCODE_N + const SDL3_SCANCODE_O + const SDL3_SCANCODE_P + const SDL3_SCANCODE_PAGEDOWN + const SDL3_SCANCODE_PAGEUP + const SDL3_SCANCODE_PAUSE + const SDL3_SCANCODE_PERIOD + const SDL3_SCANCODE_Q + const SDL3_SCANCODE_R + const SDL3_SCANCODE_RALT + const SDL3_SCANCODE_RCTRL + const SDL3_SCANCODE_RETURN + const SDL3_SCANCODE_RGUI + const SDL3_SCANCODE_RIGHT + const SDL3_SCANCODE_RIGHTBRACKET + const SDL3_SCANCODE_RSHIFT + const SDL3_SCANCODE_S + const SDL3_SCANCODE_SEMICOLON + const SDL3_SCANCODE_SLASH + const SDL3_SCANCODE_SPACE + const SDL3_SCANCODE_T + const SDL3_SCANCODE_TAB + const SDL3_SCANCODE_U + const SDL3_SCANCODE_UP + const SDL3_SCANCODE_V + const SDL3_SCANCODE_W + const SDL3_SCANCODE_X + const SDL3_SCANCODE_Y + const SDL3_SCANCODE_Z + const SDL3_WINDOW_BORDERLESS + const SDL3_WINDOW_FULLSCREEN + const SDL3_WINDOW_HIDDEN + const SDL3_WINDOW_MAXIMIZED + const SDL3_WINDOW_OCCLUDED + const SDL3_WINDOW_OCCLUDED_MULTI + const SDL3_WINDOW_OPENGL + const SDL3_WINDOW_RESIZABLE + const SDL3_WINDOW_TRANSPARENT + const SDL_GL_CONTEXT_MAJOR_VERSION + const SDL_GL_CONTEXT_MINOR_VERSION + const SDL_GL_CONTEXT_PROFILE_ES + const SDL_GL_CONTEXT_PROFILE_MASK + const SDL_HITTEST_DRAGGABLE + const SDL_HITTEST_NORMAL + const SDL_HITTEST_RESIZE_LEFT + const SDL_HITTEST_RESIZE_TOPLEFT + const SDL_INIT_VIDEO + const SDL_KEYDOWN + const SDL_KEYUP + const SDL_MOUSEBUTTONDOWN + const SDL_MOUSEBUTTONUP + const SDL_MOUSEMOTION + const SDL_QUIT + const SDL_WINDOWEVENT + const SDL_WINDOW_OPENGL + const SDL_WINDOW_SHOWN + var ApplyBaseContextState = func() + var FlushBatches = func() + var GLFinish = func() + var GLGetIntegerv = func(pname uint32, data uintptr) + var InvalidateGLStateCache = func() + var LoadGL3Functions = func() + var LoadGLFunctions = func() + var SDL3_AddEventWatch func(filter uintptr, userdata uintptr) bool + var SDL3_CreateSurfaceFrom func(w, h int32, format uint32, pixels unsafe.Pointer, pitch int32) unsafe.Pointer + var SDL3_CreateSystemCursor func(cursorType int32) unsafe.Pointer + var SDL3_CreateWindow func(title uintptr, w int32, h int32, flags uint64) unsafe.Pointer + var SDL3_DestroySurface func(surface unsafe.Pointer) + var SDL3_DestroyWindow func(unsafe.Pointer) + var SDL3_GL_CreateContext func(unsafe.Pointer) unsafe.Pointer + var SDL3_GL_GetProcAddress func(name uintptr) uintptr + var SDL3_GL_MakeCurrent func(unsafe.Pointer, unsafe.Pointer) + var SDL3_GL_MakeCurrentMulti func(win unsafe.Pointer, ctx unsafe.Pointer) bool + var SDL3_GL_SetAttribute func(uint32, int32) + var SDL3_GL_SetAttributeMulti func(attr uint32, value int32) + var SDL3_GL_SetSwapIntervalMulti func(interval int) bool + var SDL3_GL_SwapWindow func(unsafe.Pointer) + var SDL3_GL_SwapWindowMulti func(win unsafe.Pointer) bool + var SDL3_GetClipboardText func() uintptr + var SDL3_GetCurrentVideoDriver func() uintptr + var SDL3_GetErrorMulti func() uintptr + var SDL3_GetGlobalMouseState func(x, y *float32) uint32 + var SDL3_GetModState func() uint16 + var SDL3_GetMouseState func(x, y *float32) uint32 + var SDL3_GetPointerProperty func(props uint32, name uintptr, def uintptr) uintptr + var SDL3_GetTextInputArea func(win unsafe.Pointer, rect unsafe.Pointer, cursor *int32) bool + var SDL3_GetWindowFlagsMulti func(win unsafe.Pointer) uint64 + var SDL3_GetWindowID func(win unsafe.Pointer) uint32 + var SDL3_GetWindowPositionMulti func(win unsafe.Pointer, x, y *int32) + var SDL3_GetWindowProperties func(win unsafe.Pointer) uint32 + var SDL3_GetWindowSafeArea func(win unsafe.Pointer, rect unsafe.Pointer) bool + var SDL3_GetWindowSizeInPixelsMulti func(win unsafe.Pointer, w, h *int32) + var SDL3_GetWindowSizeMulti func(win unsafe.Pointer, w, h *int32) + var SDL3_Init func(uint64) int32 + var SDL3_MaximizeWindow func(win unsafe.Pointer) bool + var SDL3_MinimizeWindow func(win unsafe.Pointer) bool + var SDL3_PollEvent func(event unsafe.Pointer) bool + var SDL3_PushEvent func(ev uintptr) int32 + var SDL3_Quit func() + var SDL3_RaiseWindowMulti func(win unsafe.Pointer) + var SDL3_RestoreWindow func(win unsafe.Pointer) bool + var SDL3_SetClipboardText func(text uintptr) int32 + var SDL3_SetCursor func(cursor unsafe.Pointer) + var SDL3_SetEventFilter func(filter uintptr, userdata uintptr) + var SDL3_SetHintMulti func(name, value uintptr) bool + var SDL3_SetTextInputArea func(win unsafe.Pointer, rect unsafe.Pointer, cursor int32) bool + var SDL3_SetWindowFullscreenMulti func(win unsafe.Pointer, fullscreen bool) bool + var SDL3_SetWindowHitTest func(win unsafe.Pointer, callback uintptr, data unsafe.Pointer) bool + var SDL3_SetWindowIcon func(win unsafe.Pointer, icon unsafe.Pointer) bool + var SDL3_SetWindowPositionMulti func(win unsafe.Pointer, x, y int32) + var SDL3_SetWindowSizeMulti func(win unsafe.Pointer, w, h int32) + var SDL3_SetWindowTitleMulti func(win unsafe.Pointer, title uintptr) + var SDL3_ShowWindowFunc func(unsafe.Pointer) + var SDL3_ShowWindowMulti func(win unsafe.Pointer) + var SDL3_StartTextInput func(win unsafe.Pointer) + var SDL3_StopTextInput func(win unsafe.Pointer) + var SDL3_SyncWindow func(win unsafe.Pointer) bool + var SDL3_free func(ptr uintptr) + var SDL_CreateWindow func(uintptr, int32, int32, int32, int32, uint32) unsafe.Pointer + var SDL_DestroyWindow func(unsafe.Pointer) + var SDL_GL_CreateContext func(unsafe.Pointer) unsafe.Pointer + var SDL_GL_GetProcAddress func(uintptr) uintptr + var SDL_GL_MakeCurrent func(unsafe.Pointer, unsafe.Pointer) + var SDL_GL_SetAttribute func(uint32, int32) + var SDL_GL_SwapWindow func(unsafe.Pointer) + var SDL_Init func(uint32) int32 + var SDL_PollEvent func(unsafe.Pointer) int32 + var SDL_Quit func() + var SetScreenSize = func(width, height float32) + var SwapEGL func() + func AppEventWatchAvailable() bool + func AppEventWatchInstalled() bool + func CreateSDLWindowMulti(title string, width, height int32) (*sdlWin, error) + func DestroySDLWin(h *sdlWin) + func EdgeZone(x, y, w, h float32) uint32 + func EffectiveSize(w *Window) (int32, int32) + func Error() string + func GLProcAddress(name string) uintptr + func GetClipboardText() string + func GetGL3ProcAddress(name string) uintptr + func GetGLProcAddress(name string) uintptr + func GlobalMousePos() (float32, float32) + func Init() error + func InitWindowError() error + func KnownCursorNames() []string + func MakeCurrentSDLWin(h *sdlWin) bool + func MaximizeSDLWin(h *sdlWin) + func MinimizeSDLWin(h *sdlWin) + func MouseLeftDown() bool + func MoveResizeSDLWin(w *Window, x, y, width, height int32) bool + func MoveSDLWinBy(w *Window, x, y int32) + func NoteResizeAck(w *Window, width, height int32) + func PrimarySDLWinHandle() *sdlWin + func PrimarySDLWindowPointer() unsafe.Pointer + func ProcessEvents(win *Window) + func ProcessEventsAndDispatch(win *Window) + func ProcessSDL3Events(win *Window) + func ProcessSDLEvents(win *Window) + func PumpAll() + func PumpEvents(fallback *Window) + func QuerySDLWinSize(h *sdlWin) (int32, int32) + func RaiseSDLWindow(h *sdlWin) + func ResetSizeProbe() + func ResizeSDLWin(h *sdlWin, w, hgt int32) + func ResizeWindow(w *Window, width, height int32) + func RestoreSDLWin(h *sdlWin) + func RunHeadlessDemo(win *Window) + func SDL3PushEvent(buf []byte) + func SDL3_ShowWindow(window unsafe.Pointer) + func SetAppEventHandler(fn func(Event)) + func SetClipboardText(text string) + func SetCursorByName(name string) + func SetFullscreen(w *Window, fullscreen bool) + func SetFullscreenSDLWin(h *sdlWin, fullscreen bool) + func SetSDLWinHitTestHandler(h *sdlWin, fn frameHitFn) + func SetSDLWinTitle(h *sdlWin, title string) + func SetSensorHandler(fn func(sensorID uint32, values [6]float32)) + func SetSwapInterval0() + func SetWindowHitHandler(w *Window, fn func(x, y int32) uint32) + func SetWindowSizeSDLWin(w *Window, width, height int32) bool + func Shutdown() + func SizeProbe(w *Window) + func SwapSDL3Window() + func SwapSDLWin(h *sdlWin) + func SwapSDLWindow() + func SwapWindow() + func ToggleMaximizeSDLWin(h *sdlWin) + func VideoDriver() string + func WindowMaximized(w *Window) bool + func WindowPos(w *Window) (int32, int32) + func WindowSize(w *Window) (int32, int32) + type Event struct + Axis int + Button int + CompLength int + CompStart int + DX float32 + DY float32 + Files []string + Hat int + Height int32 + JoystickID int + Key Keycode + Mod KeyMod + Orientation int + Repeat bool + Rune rune + Text string + TouchID int64 + Touches []Touch + Type EventType + Value float32 + WheelX float32 + WheelY float32 + Width int32 + X float32 + Y float32 + type EventQueue struct + func NewEventQueue() *EventQueue + func (q *EventQueue) Poll() Event + func (q *EventQueue) PollSources() + func (q *EventQueue) PushEvent(e Event) + func (q *EventQueue) RegisterSource(src EventSource) + type EventSource interface + Name func() string + Poll func() []Event + type EventType int + const EventAppLowMemory + const EventAppPause + const EventAppResume + const EventAppTerminating + const EventBack + const EventFileDrop + const EventFocusGained + const EventFocusLost + const EventJoystickAxis + const EventJoystickButtonDown + const EventJoystickButtonUp + const EventJoystickHat + const EventKeyDown + const EventKeyUp + const EventMouseDown + const EventMouseMove + const EventMouseUp + const EventMouseWheel + const EventNone + const EventOrientationChanged + const EventQuit + const EventResize + const EventTextEditing + const EventTextInput + const EventTouchCancel + const EventTouchDown + const EventTouchMove + const EventTouchUp + type KeyMod int + func (m KeyMod) AltDown() bool + func (m KeyMod) ControlDown() bool + func (m KeyMod) MetaDown() bool + func (m KeyMod) OptionDown() bool + func (m KeyMod) ShiftDown() bool + type Keycode int + const Key0 + const Key1 + const Key2 + const Key3 + const Key4 + const Key5 + const Key6 + const Key7 + const Key8 + const Key9 + const KeyA + const KeyB + const KeyBackspace + const KeyC + const KeyD + const KeyDown + const KeyE + const KeyEnter + const KeyEscape + const KeyF + const KeyG + const KeyH + const KeyI + const KeyJ + const KeyK + const KeyL + const KeyLeft + const KeyLeftAlt + const KeyLeftCtrl + const KeyLeftMeta + const KeyLeftShift + const KeyM + const KeyN + const KeyO + const KeyP + const KeyQ + const KeyR + const KeyRight + const KeyRightAlt + const KeyRightCtrl + const KeyRightMeta + const KeyRightShift + const KeyS + const KeySpace + const KeyT + const KeyTab + const KeyU + const KeyUnknown + const KeyUp + const KeyV + const KeyW + const KeyX + const KeyY + const KeyZ + type Touch struct + ID int64 + Pressure float32 + X float32 + Y float32 + type Window struct + OwnsEventPump bool + func GetMainWindow() *Window + func InitWindow(width, height int32) *Window + func OpenWindowNamed(title string, width, height int32) (*Window, error) + func OpenWindowNamedInline(title string, width, height int32) (*Window, error) + func (w *Window) Close() + func (w *Window) Destroy() + func (w *Window) Events() *EventQueue + func (w *Window) Height() int32 + func (w *Window) KeyPressed(key int) bool + func (w *Window) MakeCurrent() bool + func (w *Window) Maximize() + func (w *Window) Maximized() bool + func (w *Window) Minimize() + func (w *Window) MouseButtonPressed(button int) bool + func (w *Window) MousePos() (float32, float32) + func (w *Window) Poll() Event + func (w *Window) PollEvents(handler func(Event)) bool + func (w *Window) PushEvent(e Event) + func (w *Window) Raise() + func (w *Window) RegisterTask(f func()) + func (w *Window) Restore() + func (w *Window) RunFrameTasks() + func (w *Window) RunPendingTasks() + func (w *Window) SafeArea() (x, y, width, height int32, ok bool) + func (w *Window) SetIcon(pixels []uint32, width, height int) bool + func (w *Window) SetSize(width, height int32) + func (w *Window) SetTextInput(active bool, x, y, width, height int32) + func (w *Window) SetTitle(title string) + func (w *Window) ShouldClose() bool + func (w *Window) Swap() + func (w *Window) TextInputArea() (x, y, width, height int32, ok bool) + func (w *Window) ToggleMaximize() + func (w *Window) Width() int32