sdl3-bindgen-sys
Safe HaskellNone
LanguageGHC2021

SDL3.Sys.Bindgen.Mouse

Description

Any GUI application has to deal with the mouse, and SDL provides functions to manage mouse input and the displayed cursor.

Most interactions with the mouse will come through the event subsystem. Moving a mouse generates an SDL_EVENT_MOUSE_MOTION event, pushing a button generates SDL_EVENT_MOUSE_BUTTON_DOWN, etc, but one can also query the current state of the mouse at any time with SDL_GetMouseState().

For certain games, it's useful to disassociate the mouse cursor from mouse input. An FPS, for example, would not want the player's motion to stop as the mouse hits the edge of the window. For these scenarios, use SDL_SetWindowRelativeMouseMode(), which hides the cursor, grabs mouse input to the window, and reads mouse input no matter how far it moves.

Games that want the system to track the mouse but want to draw their own cursor can use SDL_HideCursor() and SDL_ShowCursor(). It might be more efficient to let the system manage the cursor, if possible, using SDL_SetCursor() with a custom image made through SDL_CreateColorCursor(), or perhaps just a specific system cursor from SDL_CreateSystemCursor().

SDL can, on many platforms, differentiate between multiple connected mice, allowing for interesting input scenarios and multiplayer games. They can be enumerated with SDL_GetMice(), and SDL will send SDL_EVENT_MOUSE_ADDED and SDL_EVENT_MOUSE_REMOVED events as they are connected and unplugged.

Since many apps only care about basic mouse input, SDL offers a virtual mouse device for touch and pen input, which often can make a desktop application work on a touchscreen phone without any code changes. Apps that care about touch/pen separately from mouse input should filter out events with a which field of SDL_TOUCH_MOUSEID/SDL_PEN_MOUSEID. This is a unique ID for a mouse for the time it is connected to the system, and is never reused for the lifetime of the application.

If the mouse is disconnected and reconnected, it will get a new ID.

The value 0 is an invalid ID.

Since: 3.2.0

Synopsis

Documentation

newtype SDL_MouseID Source #

C declaration
SDL_MouseID, defined at SDL3/SDL_mouse.h 81:16

Constructors

SDL_MouseID 

Fields

Instances

Instances details
Bits SDL_MouseID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

FiniteBits SDL_MouseID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Bounded SDL_MouseID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Enum SDL_MouseID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Storable SDL_MouseID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Generic SDL_MouseID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Associated Types

type Rep SDL_MouseID 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

type Rep SDL_MouseID = D1 ('MetaData "SDL_MouseID" "SDL3.Sys.Bindgen.Mouse" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_MouseID" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Uint32)))
Ix SDL_MouseID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Num SDL_MouseID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Read SDL_MouseID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Integral SDL_MouseID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Real SDL_MouseID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Show SDL_MouseID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Eq SDL_MouseID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Ord SDL_MouseID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Prim SDL_MouseID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

HasFFIType SDL_MouseID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Associated Types

type FFIType SDL_MouseID 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

ReadRaw SDL_MouseID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

StaticSize SDL_MouseID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

WriteRaw SDL_MouseID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Methods

writeRaw :: Ptr SDL_MouseID -> SDL_MouseID -> IO () #

Bitfield SDL_MouseID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

HasCField SDL_MouseID "unwrap" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Associated Types

type CFieldType SDL_MouseID "unwrap" 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

type CFieldType SDL_MouseID "unwrap" = Uint32

Methods

offset# :: Proxy# SDL_MouseID -> Proxy# "unwrap" -> Int #

ty ~ Uint32 => HasField "unwrap" SDL_MouseID ty Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Methods

hasField :: SDL_MouseID -> (ty -> SDL_MouseID, ty) #

ty ~ Uint32 => HasField "unwrap" (Ptr SDL_MouseID) (Ptr ty :: Type) Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Methods

getField :: Ptr SDL_MouseID -> Ptr ty #

type Rep SDL_MouseID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

type Rep SDL_MouseID = D1 ('MetaData "SDL_MouseID" "SDL3.Sys.Bindgen.Mouse" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_MouseID" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Uint32)))
type FFIType SDL_MouseID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

type CFieldType SDL_MouseID "unwrap" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

type CFieldType SDL_MouseID "unwrap" = Uint32

data SDL_Cursor Source #

The structure used to identify an SDL cursor.

This is opaque data.

C declaration
struct SDL_Cursor, defined at SDL3/SDL_mouse.h 90:16

Since: 3.2.0

newtype SDL_SystemCursor Source #

Cursor types for SDL_CreateSystemCursor().

C declaration
enum SDL_SystemCursor, defined at SDL3/SDL_mouse.h 97:14

Since: 3.2.0

Constructors

SDL_SystemCursor 

Fields

Instances

Instances details
Storable SDL_SystemCursor Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Generic SDL_SystemCursor Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Associated Types

type Rep SDL_SystemCursor 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

type Rep SDL_SystemCursor = D1 ('MetaData "SDL_SystemCursor" "SDL3.Sys.Bindgen.Mouse" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_SystemCursor" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CUInt)))
Read SDL_SystemCursor Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Show SDL_SystemCursor Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Eq SDL_SystemCursor Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Ord SDL_SystemCursor Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Prim SDL_SystemCursor Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

CEnum SDL_SystemCursor Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Associated Types

type CEnumZ SDL_SystemCursor 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

SequentialCEnum SDL_SystemCursor Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

HasFFIType SDL_SystemCursor Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Associated Types

type FFIType SDL_SystemCursor 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

ReadRaw SDL_SystemCursor Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

StaticSize SDL_SystemCursor Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

WriteRaw SDL_SystemCursor Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

HasCField SDL_SystemCursor "unwrap" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Associated Types

type CFieldType SDL_SystemCursor "unwrap" 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Methods

offset# :: Proxy# SDL_SystemCursor -> Proxy# "unwrap" -> Int #

ty ~ CUInt => HasField "unwrap" SDL_SystemCursor ty Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Methods

hasField :: SDL_SystemCursor -> (ty -> SDL_SystemCursor, ty) #

ty ~ CUInt => HasField "unwrap" (Ptr SDL_SystemCursor) (Ptr ty :: Type) Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

type Rep SDL_SystemCursor Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

type Rep SDL_SystemCursor = D1 ('MetaData "SDL_SystemCursor" "SDL3.Sys.Bindgen.Mouse" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_SystemCursor" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CUInt)))
type CEnumZ SDL_SystemCursor Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

type FFIType SDL_SystemCursor Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

type CFieldType SDL_SystemCursor "unwrap" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

pattern SDL_SYSTEM_CURSOR_DEFAULT :: SDL_SystemCursor Source #

Default cursor. Usually an arrow.

C declaration
SDL_SYSTEM_CURSOR_DEFAULT, defined at SDL3/SDL_mouse.h 99:5

pattern SDL_SYSTEM_CURSOR_TEXT :: SDL_SystemCursor Source #

Text selection. Usually an I-beam.

C declaration
SDL_SYSTEM_CURSOR_TEXT, defined at SDL3/SDL_mouse.h 100:5

pattern SDL_SYSTEM_CURSOR_WAIT :: SDL_SystemCursor Source #

Wait. Usually an hourglass or watch or spinning ball.

C declaration
SDL_SYSTEM_CURSOR_WAIT, defined at SDL3/SDL_mouse.h 101:5

pattern SDL_SYSTEM_CURSOR_CROSSHAIR :: SDL_SystemCursor Source #

Crosshair.

C declaration
SDL_SYSTEM_CURSOR_CROSSHAIR, defined at SDL3/SDL_mouse.h 102:5

pattern SDL_SYSTEM_CURSOR_PROGRESS :: SDL_SystemCursor Source #

Program is busy but still interactive. Usually it's WAIT with an arrow.

C declaration
SDL_SYSTEM_CURSOR_PROGRESS, defined at SDL3/SDL_mouse.h 103:5

pattern SDL_SYSTEM_CURSOR_NWSE_RESIZE :: SDL_SystemCursor Source #

Double arrow pointing northwest and southeast.

C declaration
SDL_SYSTEM_CURSOR_NWSE_RESIZE, defined at SDL3/SDL_mouse.h 104:5

pattern SDL_SYSTEM_CURSOR_NESW_RESIZE :: SDL_SystemCursor Source #

Double arrow pointing northeast and southwest.

C declaration
SDL_SYSTEM_CURSOR_NESW_RESIZE, defined at SDL3/SDL_mouse.h 105:5

pattern SDL_SYSTEM_CURSOR_EW_RESIZE :: SDL_SystemCursor Source #

Double arrow pointing west and east.

C declaration
SDL_SYSTEM_CURSOR_EW_RESIZE, defined at SDL3/SDL_mouse.h 106:5

pattern SDL_SYSTEM_CURSOR_NS_RESIZE :: SDL_SystemCursor Source #

Double arrow pointing north and south.

C declaration
SDL_SYSTEM_CURSOR_NS_RESIZE, defined at SDL3/SDL_mouse.h 107:5

pattern SDL_SYSTEM_CURSOR_MOVE :: SDL_SystemCursor Source #

Four pointed arrow pointing north, south, east, and west.

C declaration
SDL_SYSTEM_CURSOR_MOVE, defined at SDL3/SDL_mouse.h 108:5

pattern SDL_SYSTEM_CURSOR_NOT_ALLOWED :: SDL_SystemCursor Source #

Not permitted. Usually a slashed circle or crossbones.

C declaration
SDL_SYSTEM_CURSOR_NOT_ALLOWED, defined at SDL3/SDL_mouse.h 109:5

pattern SDL_SYSTEM_CURSOR_POINTER :: SDL_SystemCursor Source #

Pointer that indicates a link. Usually a pointing hand.

C declaration
SDL_SYSTEM_CURSOR_POINTER, defined at SDL3/SDL_mouse.h 110:5

pattern SDL_SYSTEM_CURSOR_NW_RESIZE :: SDL_SystemCursor Source #

Window resize top-left. This may be a single arrow or a double arrow like NWSE_RESIZE.

C declaration
SDL_SYSTEM_CURSOR_NW_RESIZE, defined at SDL3/SDL_mouse.h 111:5

pattern SDL_SYSTEM_CURSOR_N_RESIZE :: SDL_SystemCursor Source #

Window resize top. May be NS_RESIZE.

C declaration
SDL_SYSTEM_CURSOR_N_RESIZE, defined at SDL3/SDL_mouse.h 112:5

pattern SDL_SYSTEM_CURSOR_NE_RESIZE :: SDL_SystemCursor Source #

Window resize top-right. May be NESW_RESIZE.

C declaration
SDL_SYSTEM_CURSOR_NE_RESIZE, defined at SDL3/SDL_mouse.h 113:5

pattern SDL_SYSTEM_CURSOR_E_RESIZE :: SDL_SystemCursor Source #

Window resize right. May be EW_RESIZE.

C declaration
SDL_SYSTEM_CURSOR_E_RESIZE, defined at SDL3/SDL_mouse.h 114:5

pattern SDL_SYSTEM_CURSOR_SE_RESIZE :: SDL_SystemCursor Source #

Window resize bottom-right. May be NWSE_RESIZE.

C declaration
SDL_SYSTEM_CURSOR_SE_RESIZE, defined at SDL3/SDL_mouse.h 115:5

pattern SDL_SYSTEM_CURSOR_S_RESIZE :: SDL_SystemCursor Source #

Window resize bottom. May be NS_RESIZE.

C declaration
SDL_SYSTEM_CURSOR_S_RESIZE, defined at SDL3/SDL_mouse.h 116:5

pattern SDL_SYSTEM_CURSOR_SW_RESIZE :: SDL_SystemCursor Source #

Window resize bottom-left. May be NESW_RESIZE.

C declaration
SDL_SYSTEM_CURSOR_SW_RESIZE, defined at SDL3/SDL_mouse.h 117:5

pattern SDL_SYSTEM_CURSOR_W_RESIZE :: SDL_SystemCursor Source #

Window resize left. May be EW_RESIZE.

C declaration
SDL_SYSTEM_CURSOR_W_RESIZE, defined at SDL3/SDL_mouse.h 118:5

pattern SDL_SYSTEM_CURSOR_COUNT :: SDL_SystemCursor Source #

C declaration
SDL_SYSTEM_CURSOR_COUNT, defined at SDL3/SDL_mouse.h 119:5

newtype SDL_MouseWheelDirection Source #

Scroll direction types for the Scroll event

C declaration
enum SDL_MouseWheelDirection, defined at SDL3/SDL_mouse.h 127:14

Since: 3.2.0

Constructors

SDL_MouseWheelDirection 

Fields

Instances

Instances details
Storable SDL_MouseWheelDirection Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Generic SDL_MouseWheelDirection Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Associated Types

type Rep SDL_MouseWheelDirection 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

type Rep SDL_MouseWheelDirection = D1 ('MetaData "SDL_MouseWheelDirection" "SDL3.Sys.Bindgen.Mouse" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_MouseWheelDirection" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CUInt)))
Read SDL_MouseWheelDirection Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Show SDL_MouseWheelDirection Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Eq SDL_MouseWheelDirection Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Ord SDL_MouseWheelDirection Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Prim SDL_MouseWheelDirection Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

CEnum SDL_MouseWheelDirection Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Associated Types

type CEnumZ SDL_MouseWheelDirection 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

SequentialCEnum SDL_MouseWheelDirection Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

HasFFIType SDL_MouseWheelDirection Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Associated Types

type FFIType SDL_MouseWheelDirection 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

ReadRaw SDL_MouseWheelDirection Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

StaticSize SDL_MouseWheelDirection Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

WriteRaw SDL_MouseWheelDirection Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

HasCField SDL_MouseWheelDirection "unwrap" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Associated Types

type CFieldType SDL_MouseWheelDirection "unwrap" 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

ty ~ CUInt => HasField "unwrap" SDL_MouseWheelDirection ty Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

ty ~ CUInt => HasField "unwrap" (Ptr SDL_MouseWheelDirection) (Ptr ty :: Type) Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

type Rep SDL_MouseWheelDirection Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

type Rep SDL_MouseWheelDirection = D1 ('MetaData "SDL_MouseWheelDirection" "SDL3.Sys.Bindgen.Mouse" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_MouseWheelDirection" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CUInt)))
type CEnumZ SDL_MouseWheelDirection Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

type FFIType SDL_MouseWheelDirection Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

type CFieldType SDL_MouseWheelDirection "unwrap" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

pattern SDL_MOUSEWHEEL_NORMAL :: SDL_MouseWheelDirection Source #

The scroll direction is normal

C declaration
SDL_MOUSEWHEEL_NORMAL, defined at SDL3/SDL_mouse.h 129:5

pattern SDL_MOUSEWHEEL_FLIPPED :: SDL_MouseWheelDirection Source #

The scroll direction is flipped / natural

C declaration
SDL_MOUSEWHEEL_FLIPPED, defined at SDL3/SDL_mouse.h 130:5

data SDL_CursorFrameInfo Source #

Animated cursor frame info.

C declaration
struct SDL_CursorFrameInfo, defined at SDL3/SDL_mouse.h 138:16

Since: 3.4.0

Constructors

SDL_CursorFrameInfo 

Fields

  • surface :: Ptr SDL_Surface

    The surface data for this frame

    C declaration
    surface, defined at SDL3/SDL_mouse.h 140:18
  • duration :: Uint32

    The frame duration in milliseconds (a duration of 0 is infinite)

    C declaration
    duration, defined at SDL3/SDL_mouse.h 141:12

Instances

Instances details
Storable SDL_CursorFrameInfo Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Generic SDL_CursorFrameInfo Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Associated Types

type Rep SDL_CursorFrameInfo 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

type Rep SDL_CursorFrameInfo = D1 ('MetaData "SDL_CursorFrameInfo" "SDL3.Sys.Bindgen.Mouse" "sdl3-bindgen-sys-0.0.1.0-inplace" 'False) (C1 ('MetaCons "SDL_CursorFrameInfo" 'PrefixI 'True) (S1 ('MetaSel ('Just "surface") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Ptr SDL_Surface)) :*: S1 ('MetaSel ('Just "duration") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Uint32)))
Show SDL_CursorFrameInfo Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Eq SDL_CursorFrameInfo Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

ReadRaw SDL_CursorFrameInfo Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

StaticSize SDL_CursorFrameInfo Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

WriteRaw SDL_CursorFrameInfo Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

IsStruct SDL_CursorFrameInfo Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

HasCField SDL_CursorFrameInfo "duration" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Associated Types

type CFieldType SDL_CursorFrameInfo "duration" 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Methods

offset# :: Proxy# SDL_CursorFrameInfo -> Proxy# "duration" -> Int #

HasCField SDL_CursorFrameInfo "surface" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Associated Types

type CFieldType SDL_CursorFrameInfo "surface" 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Methods

offset# :: Proxy# SDL_CursorFrameInfo -> Proxy# "surface" -> Int #

ty ~ Uint32 => HasField "duration" SDL_CursorFrameInfo ty Source #

The frame duration in milliseconds (a duration of 0 is infinite)

C declaration
duration, defined at SDL3/SDL_mouse.h 141:12
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

ty ~ Ptr SDL_Surface => HasField "surface" SDL_CursorFrameInfo ty Source #

The surface data for this frame

C declaration
surface, defined at SDL3/SDL_mouse.h 140:18
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

ty ~ Uint32 => HasField "duration" (Ptr SDL_CursorFrameInfo) (Ptr ty :: Type) Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

ty ~ Ptr SDL_Surface => HasField "surface" (Ptr SDL_CursorFrameInfo) (Ptr ty :: Type) Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

type Rep SDL_CursorFrameInfo Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

type Rep SDL_CursorFrameInfo = D1 ('MetaData "SDL_CursorFrameInfo" "SDL3.Sys.Bindgen.Mouse" "sdl3-bindgen-sys-0.0.1.0-inplace" 'False) (C1 ('MetaCons "SDL_CursorFrameInfo" 'PrefixI 'True) (S1 ('MetaSel ('Just "surface") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Ptr SDL_Surface)) :*: S1 ('MetaSel ('Just "duration") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Uint32)))
type CFieldType SDL_CursorFrameInfo "duration" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

type CFieldType SDL_CursorFrameInfo "surface" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

newtype SDL_MouseButtonFlags Source #

A bitmask of pressed mouse buttons, as reported by SDL_GetMouseState, etc.

  • Button 1: Left mouse button
  • Button 2: Middle mouse button
  • Button 3: Right mouse button
  • Button 4: Side mouse button 1
  • Button 5: Side mouse button 2
See also
sDL_GetMouseState, sDL_GetGlobalMouseState, sDL_GetRelativeMouseState
C declaration
SDL_MouseButtonFlags, defined at SDL3/SDL_mouse.h 159:16

Since: 3.2.0

Constructors

SDL_MouseButtonFlags 

Fields

Instances

Instances details
Bits SDL_MouseButtonFlags Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

FiniteBits SDL_MouseButtonFlags Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Bounded SDL_MouseButtonFlags Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Enum SDL_MouseButtonFlags Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Storable SDL_MouseButtonFlags Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Generic SDL_MouseButtonFlags Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Associated Types

type Rep SDL_MouseButtonFlags 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

type Rep SDL_MouseButtonFlags = D1 ('MetaData "SDL_MouseButtonFlags" "SDL3.Sys.Bindgen.Mouse" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_MouseButtonFlags" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Uint32)))
Ix SDL_MouseButtonFlags Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Num SDL_MouseButtonFlags Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Read SDL_MouseButtonFlags Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Integral SDL_MouseButtonFlags Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Real SDL_MouseButtonFlags Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Show SDL_MouseButtonFlags Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Eq SDL_MouseButtonFlags Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Ord SDL_MouseButtonFlags Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Prim SDL_MouseButtonFlags Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

HasFFIType SDL_MouseButtonFlags Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Associated Types

type FFIType SDL_MouseButtonFlags 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

ReadRaw SDL_MouseButtonFlags Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

StaticSize SDL_MouseButtonFlags Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

WriteRaw SDL_MouseButtonFlags Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Bitfield SDL_MouseButtonFlags Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

HasCField SDL_MouseButtonFlags "unwrap" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Associated Types

type CFieldType SDL_MouseButtonFlags "unwrap" 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Methods

offset# :: Proxy# SDL_MouseButtonFlags -> Proxy# "unwrap" -> Int #

ty ~ Uint32 => HasField "unwrap" SDL_MouseButtonFlags ty Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

ty ~ Uint32 => HasField "unwrap" (Ptr SDL_MouseButtonFlags) (Ptr ty :: Type) Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

type Rep SDL_MouseButtonFlags Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

type Rep SDL_MouseButtonFlags = D1 ('MetaData "SDL_MouseButtonFlags" "SDL3.Sys.Bindgen.Mouse" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_MouseButtonFlags" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Uint32)))
type FFIType SDL_MouseButtonFlags Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

type CFieldType SDL_MouseButtonFlags "unwrap" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

sDL_BUTTON_LEFT :: CInt Source #

C declaration
macro SDL_BUTTON_LEFT, defined at SDL3/SDL_mouse.h 161:9

sDL_BUTTON_MIDDLE :: CInt Source #

C declaration
macro SDL_BUTTON_MIDDLE, defined at SDL3/SDL_mouse.h 162:9

sDL_BUTTON_RIGHT :: CInt Source #

C declaration
macro SDL_BUTTON_RIGHT, defined at SDL3/SDL_mouse.h 163:9

sDL_BUTTON_X1 :: CInt Source #

C declaration
macro SDL_BUTTON_X1, defined at SDL3/SDL_mouse.h 164:9

sDL_BUTTON_X2 :: CInt Source #

C declaration
macro SDL_BUTTON_X2, defined at SDL3/SDL_mouse.h 165:9

sDL_BUTTON_MASK :: (Sub a0 CInt, Shift CUInt (SubRes a0 CInt)) => a0 -> CUInt Source #

C declaration
macro SDL_BUTTON_MASK, defined at SDL3/SDL_mouse.h 167:9

sDL_BUTTON_LMASK :: CUInt Source #

C declaration
macro SDL_BUTTON_LMASK, defined at SDL3/SDL_mouse.h 168:9

sDL_BUTTON_MMASK :: CUInt Source #

C declaration
macro SDL_BUTTON_MMASK, defined at SDL3/SDL_mouse.h 169:9

sDL_BUTTON_RMASK :: CUInt Source #

C declaration
macro SDL_BUTTON_RMASK, defined at SDL3/SDL_mouse.h 170:9

sDL_BUTTON_X1MASK :: CUInt Source #

C declaration
macro SDL_BUTTON_X1MASK, defined at SDL3/SDL_mouse.h 171:9

sDL_BUTTON_X2MASK :: CUInt Source #

C declaration
macro SDL_BUTTON_X2MASK, defined at SDL3/SDL_mouse.h 172:9

newtype SDL_MouseMotionTransformCallback_Aux Source #

Auxiliary type used by SDL_MouseMotionTransformCallback

C declaration
SDL_MouseMotionTransformCallback, defined at SDL3/SDL_mouse.h 205:24

Instances

Instances details
Generic SDL_MouseMotionTransformCallback_Aux Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Associated Types

type Rep SDL_MouseMotionTransformCallback_Aux 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

type Rep SDL_MouseMotionTransformCallback_Aux = D1 ('MetaData "SDL_MouseMotionTransformCallback_Aux" "SDL3.Sys.Bindgen.Mouse" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_MouseMotionTransformCallback_Aux" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Ptr Void -> Uint64 -> Ptr SDL_Window -> SDL_MouseID -> Ptr CFloat -> Ptr CFloat -> IO ()))))
FromFunPtr SDL_MouseMotionTransformCallback_Aux Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

ToFunPtr SDL_MouseMotionTransformCallback_Aux Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

HasCField SDL_MouseMotionTransformCallback_Aux "unwrap" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

ty ~ (Ptr Void -> Uint64 -> Ptr SDL_Window -> SDL_MouseID -> Ptr CFloat -> Ptr CFloat -> IO ()) => HasField "unwrap" SDL_MouseMotionTransformCallback_Aux ty Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

ty ~ (Ptr Void -> Uint64 -> Ptr SDL_Window -> SDL_MouseID -> Ptr CFloat -> Ptr CFloat -> IO ()) => HasField "unwrap" (Ptr SDL_MouseMotionTransformCallback_Aux) (Ptr ty :: Type) Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

type Rep SDL_MouseMotionTransformCallback_Aux Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

type Rep SDL_MouseMotionTransformCallback_Aux = D1 ('MetaData "SDL_MouseMotionTransformCallback_Aux" "SDL3.Sys.Bindgen.Mouse" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_MouseMotionTransformCallback_Aux" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Ptr Void -> Uint64 -> Ptr SDL_Window -> SDL_MouseID -> Ptr CFloat -> Ptr CFloat -> IO ()))))
type CFieldType SDL_MouseMotionTransformCallback_Aux "unwrap" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

newtype SDL_MouseMotionTransformCallback Source #

A callback used to transform mouse motion delta from raw values.

This is called during SDL's handling of platform mouse events to scale the values of the resulting motion delta.

userdata
what was passed as userdata to SDL_SetRelativeMouseTransform().
timestamp
the associated time at which this mouse motion event was received.
window
the associated window to which this mouse motion event was addressed.
mouseID
the associated mouse from which this mouse motion event was emitted.
x
pointer to a variable that will be treated as the resulting x-axis motion.
y
pointer to a variable that will be treated as the resulting y-axis motion.
Thread safety
This callback is called by SDL's internal mouse input processing procedure, which may be a thread separate from the main event loop that is run at realtime priority. Stalling this thread with too much work in the callback can therefore potentially freeze the entire system. Care should be taken with proper synchronization practices when adding other side effects beyond mutation of the x and y values.
See also
sDL_SetRelativeMouseTransform
C declaration
SDL_MouseMotionTransformCallback, defined at SDL3/SDL_mouse.h 205:24

Since: 3.4.0

Instances

Instances details
Storable SDL_MouseMotionTransformCallback Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Generic SDL_MouseMotionTransformCallback Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Associated Types

type Rep SDL_MouseMotionTransformCallback 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

type Rep SDL_MouseMotionTransformCallback = D1 ('MetaData "SDL_MouseMotionTransformCallback" "SDL3.Sys.Bindgen.Mouse" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_MouseMotionTransformCallback" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (FunPtr SDL_MouseMotionTransformCallback_Aux))))
Show SDL_MouseMotionTransformCallback Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Eq SDL_MouseMotionTransformCallback Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

Ord SDL_MouseMotionTransformCallback Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

HasFFIType SDL_MouseMotionTransformCallback Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

ReadRaw SDL_MouseMotionTransformCallback Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

StaticSize SDL_MouseMotionTransformCallback Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

WriteRaw SDL_MouseMotionTransformCallback Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

HasCField SDL_MouseMotionTransformCallback "unwrap" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

ty ~ FunPtr SDL_MouseMotionTransformCallback_Aux => HasField "unwrap" SDL_MouseMotionTransformCallback ty Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

ty ~ FunPtr SDL_MouseMotionTransformCallback_Aux => HasField "unwrap" (Ptr SDL_MouseMotionTransformCallback) (Ptr ty :: Type) Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

type Rep SDL_MouseMotionTransformCallback Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

type Rep SDL_MouseMotionTransformCallback = D1 ('MetaData "SDL_MouseMotionTransformCallback" "SDL3.Sys.Bindgen.Mouse" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_MouseMotionTransformCallback" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (FunPtr SDL_MouseMotionTransformCallback_Aux))))
type FFIType SDL_MouseMotionTransformCallback Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse

type CFieldType SDL_MouseMotionTransformCallback "unwrap" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Mouse