Module dsdl2.mouse

Functions

NameDescription
getCursor() Wraps SDL_GetCursor which gets the current set cursor
getCursorVisibility() Wraps SDL_ShowCursor which sets the visibility of the cursor
getDefaultCursor() Wraps SDL_GetDefaultCursor which gets the default cursor
getGlobalMousePosition() Wraps SDL_GetGlobalMouseState (from SDL 2.0.4) which gets the mouse position globally
getGlobalMouseState() Wraps SDL_GetGlobalMouseState (from SDL 2.0.4) which gets the global states of the mouse buttons
getMouseFocusedWindow() Wraps SDL_GetMouseFocus which gets the mouse-focused window
getMousePosition() Wraps SDL_GetMouseState which gets the mouse position relative to a focused window
getMouseState() Wraps SDL_GetMouseState which gets the states of the mouse buttons
getRelativeMouseMode() Wraps SDL_GetRelativeMouseMode which checks whether relative mouse mode is enabled or not
getRelativeMousePosition() Wraps SDL_GetRelativeMouseState which gets the relative mouse position
getRelativeMouseState() Wraps SDL_GetRelativeMouseState which gets the relative states of the mouse buttons
setCursorVisibility(visible) Wraps SDL_ShowCursor which sets the visibility of the cursor
setGlobalMousePosition(newPosition) Wraps SDL_WarpMouseGlobal (from SDL 2.0.4) which sets the mouse position globally in the display
setMouseCapture(newMouseCapture) Wraps SDL_CaptureMouse (from SDL 2.0.4) which sets mouse capture
setMousePosition(newPosition) Wraps SDL_WarpMouseInWindow which sets the mouse position relative to a focused window
setRelativeMouseMode(newRelativeMouseMode) Wraps SDL_SetRelativeMouseMode which sets relative mouse mode

Classes

NameDescription
Cursor D class that wraps SDL_Cursor which sets cursor appearance

Structs

NameDescription
MouseState D struct that encapsulates mouse button state flags

Enums

NameDescription
MouseButton D enum that wraps SDL_BUTTON_* enumerations
MouseWheel D enum that wraps SDL_MOUSEWHEEL_* enumerations (from SDL 2.0.4)