| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
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
- newtype SDL_MouseID = SDL_MouseID {}
- data SDL_Cursor
- newtype SDL_SystemCursor = SDL_SystemCursor {}
- pattern SDL_SYSTEM_CURSOR_DEFAULT :: SDL_SystemCursor
- pattern SDL_SYSTEM_CURSOR_TEXT :: SDL_SystemCursor
- pattern SDL_SYSTEM_CURSOR_WAIT :: SDL_SystemCursor
- pattern SDL_SYSTEM_CURSOR_CROSSHAIR :: SDL_SystemCursor
- pattern SDL_SYSTEM_CURSOR_PROGRESS :: SDL_SystemCursor
- pattern SDL_SYSTEM_CURSOR_NWSE_RESIZE :: SDL_SystemCursor
- pattern SDL_SYSTEM_CURSOR_NESW_RESIZE :: SDL_SystemCursor
- pattern SDL_SYSTEM_CURSOR_EW_RESIZE :: SDL_SystemCursor
- pattern SDL_SYSTEM_CURSOR_NS_RESIZE :: SDL_SystemCursor
- pattern SDL_SYSTEM_CURSOR_MOVE :: SDL_SystemCursor
- pattern SDL_SYSTEM_CURSOR_NOT_ALLOWED :: SDL_SystemCursor
- pattern SDL_SYSTEM_CURSOR_POINTER :: SDL_SystemCursor
- pattern SDL_SYSTEM_CURSOR_NW_RESIZE :: SDL_SystemCursor
- pattern SDL_SYSTEM_CURSOR_N_RESIZE :: SDL_SystemCursor
- pattern SDL_SYSTEM_CURSOR_NE_RESIZE :: SDL_SystemCursor
- pattern SDL_SYSTEM_CURSOR_E_RESIZE :: SDL_SystemCursor
- pattern SDL_SYSTEM_CURSOR_SE_RESIZE :: SDL_SystemCursor
- pattern SDL_SYSTEM_CURSOR_S_RESIZE :: SDL_SystemCursor
- pattern SDL_SYSTEM_CURSOR_SW_RESIZE :: SDL_SystemCursor
- pattern SDL_SYSTEM_CURSOR_W_RESIZE :: SDL_SystemCursor
- pattern SDL_SYSTEM_CURSOR_COUNT :: SDL_SystemCursor
- newtype SDL_MouseWheelDirection = SDL_MouseWheelDirection {}
- pattern SDL_MOUSEWHEEL_NORMAL :: SDL_MouseWheelDirection
- pattern SDL_MOUSEWHEEL_FLIPPED :: SDL_MouseWheelDirection
- data SDL_CursorFrameInfo = SDL_CursorFrameInfo {
- surface :: Ptr SDL_Surface
- duration :: Uint32
- newtype SDL_MouseButtonFlags = SDL_MouseButtonFlags {}
- sDL_BUTTON_LEFT :: CInt
- sDL_BUTTON_MIDDLE :: CInt
- sDL_BUTTON_RIGHT :: CInt
- sDL_BUTTON_X1 :: CInt
- sDL_BUTTON_X2 :: CInt
- sDL_BUTTON_MASK :: (Sub a0 CInt, Shift CUInt (SubRes a0 CInt)) => a0 -> CUInt
- sDL_BUTTON_LMASK :: CUInt
- sDL_BUTTON_MMASK :: CUInt
- sDL_BUTTON_RMASK :: CUInt
- sDL_BUTTON_X1MASK :: CUInt
- sDL_BUTTON_X2MASK :: CUInt
- newtype SDL_MouseMotionTransformCallback_Aux = SDL_MouseMotionTransformCallback_Aux {}
- newtype SDL_MouseMotionTransformCallback = SDL_MouseMotionTransformCallback {}
Documentation
newtype SDL_MouseID Source #
- C declaration
SDL_MouseID, defined atSDL3/SDL_mouse.h 81:16
Constructors
| SDL_MouseID | |
Instances
data SDL_Cursor Source #
The structure used to identify an SDL cursor.
This is opaque data.
- C declaration
struct SDL_Cursor, defined atSDL3/SDL_mouse.h 90:16
Since: 3.2.0
newtype SDL_SystemCursor Source #
Cursor types for SDL_CreateSystemCursor().
- C declaration
enum SDL_SystemCursor, defined atSDL3/SDL_mouse.h 97:14
Since: 3.2.0
Constructors
| SDL_SystemCursor | |
Instances
| Storable SDL_SystemCursor Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods sizeOf :: SDL_SystemCursor -> Int # alignment :: SDL_SystemCursor -> Int # peekElemOff :: Ptr SDL_SystemCursor -> Int -> IO SDL_SystemCursor # pokeElemOff :: Ptr SDL_SystemCursor -> Int -> SDL_SystemCursor -> IO () # peekByteOff :: Ptr b -> Int -> IO SDL_SystemCursor # pokeByteOff :: Ptr b -> Int -> SDL_SystemCursor -> IO () # peek :: Ptr SDL_SystemCursor -> IO SDL_SystemCursor # poke :: Ptr SDL_SystemCursor -> SDL_SystemCursor -> IO () # | |||||
| Generic SDL_SystemCursor Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Associated Types
Methods from :: SDL_SystemCursor -> Rep SDL_SystemCursor x # to :: Rep SDL_SystemCursor x -> SDL_SystemCursor # | |||||
| Read SDL_SystemCursor Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods readsPrec :: Int -> ReadS SDL_SystemCursor # readList :: ReadS [SDL_SystemCursor] # | |||||
| Show SDL_SystemCursor Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods showsPrec :: Int -> SDL_SystemCursor -> ShowS # show :: SDL_SystemCursor -> String # showList :: [SDL_SystemCursor] -> ShowS # | |||||
| Eq SDL_SystemCursor Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods (==) :: SDL_SystemCursor -> SDL_SystemCursor -> Bool # (/=) :: SDL_SystemCursor -> SDL_SystemCursor -> Bool # | |||||
| Ord SDL_SystemCursor Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods compare :: SDL_SystemCursor -> SDL_SystemCursor -> Ordering # (<) :: SDL_SystemCursor -> SDL_SystemCursor -> Bool # (<=) :: SDL_SystemCursor -> SDL_SystemCursor -> Bool # (>) :: SDL_SystemCursor -> SDL_SystemCursor -> Bool # (>=) :: SDL_SystemCursor -> SDL_SystemCursor -> Bool # max :: SDL_SystemCursor -> SDL_SystemCursor -> SDL_SystemCursor # min :: SDL_SystemCursor -> SDL_SystemCursor -> SDL_SystemCursor # | |||||
| Prim SDL_SystemCursor Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods sizeOfType# :: Proxy SDL_SystemCursor -> Int# # sizeOf# :: SDL_SystemCursor -> Int# # alignmentOfType# :: Proxy SDL_SystemCursor -> Int# # alignment# :: SDL_SystemCursor -> Int# # indexByteArray# :: ByteArray# -> Int# -> SDL_SystemCursor # readByteArray# :: MutableByteArray# s -> Int# -> State# s -> (# State# s, SDL_SystemCursor #) # writeByteArray# :: MutableByteArray# s -> Int# -> SDL_SystemCursor -> State# s -> State# s # setByteArray# :: MutableByteArray# s -> Int# -> Int# -> SDL_SystemCursor -> State# s -> State# s # indexOffAddr# :: Addr# -> Int# -> SDL_SystemCursor # readOffAddr# :: Addr# -> Int# -> State# s -> (# State# s, SDL_SystemCursor #) # writeOffAddr# :: Addr# -> Int# -> SDL_SystemCursor -> State# s -> State# s # setOffAddr# :: Addr# -> Int# -> Int# -> SDL_SystemCursor -> State# s -> State# s # | |||||
| CEnum SDL_SystemCursor Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Associated Types
Methods toCEnum :: CEnumZ SDL_SystemCursor -> SDL_SystemCursor # fromCEnum :: SDL_SystemCursor -> CEnumZ SDL_SystemCursor # declaredValues :: proxy SDL_SystemCursor -> DeclaredValues SDL_SystemCursor # showsUndeclared :: proxy SDL_SystemCursor -> Int -> CEnumZ SDL_SystemCursor -> ShowS # readPrecUndeclared :: ReadPrec SDL_SystemCursor # isDeclared :: SDL_SystemCursor -> Bool # mkDeclared :: CEnumZ SDL_SystemCursor -> Maybe SDL_SystemCursor # | |||||
| SequentialCEnum SDL_SystemCursor Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse | |||||
| HasFFIType SDL_SystemCursor Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Associated Types
Methods toFFIType :: SDL_SystemCursor -> FFIType SDL_SystemCursor # fromFFIType :: FFIType SDL_SystemCursor -> SDL_SystemCursor # | |||||
| ReadRaw SDL_SystemCursor Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods | |||||
| StaticSize SDL_SystemCursor Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods staticSizeOf :: Proxy SDL_SystemCursor -> Int # staticAlignment :: Proxy SDL_SystemCursor -> Int # | |||||
| WriteRaw SDL_SystemCursor Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods writeRaw :: Ptr SDL_SystemCursor -> SDL_SystemCursor -> IO () # | |||||
| HasCField SDL_SystemCursor "unwrap" Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Associated Types
| |||||
| ty ~ CUInt => HasField "unwrap" SDL_SystemCursor ty Source # | |||||
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 # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods getField :: Ptr SDL_SystemCursor -> Ptr ty # | |||||
| type Rep SDL_SystemCursor Source # | |||||
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 # | |||||
Defined in SDL3.Sys.Bindgen.Mouse | |||||
| type FFIType SDL_SystemCursor Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse | |||||
| type CFieldType SDL_SystemCursor "unwrap" Source # | |||||
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 atSDL3/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 atSDL3/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 atSDL3/SDL_mouse.h 101:5
pattern SDL_SYSTEM_CURSOR_CROSSHAIR :: SDL_SystemCursor Source #
Crosshair.
- C declaration
SDL_SYSTEM_CURSOR_CROSSHAIR, defined atSDL3/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 atSDL3/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 atSDL3/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 atSDL3/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 atSDL3/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 atSDL3/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 atSDL3/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 atSDL3/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 atSDL3/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 atSDL3/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 atSDL3/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 atSDL3/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 atSDL3/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 atSDL3/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 atSDL3/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 atSDL3/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 atSDL3/SDL_mouse.h 118:5
pattern SDL_SYSTEM_CURSOR_COUNT :: SDL_SystemCursor Source #
- C declaration
SDL_SYSTEM_CURSOR_COUNT, defined atSDL3/SDL_mouse.h 119:5
newtype SDL_MouseWheelDirection Source #
Scroll direction types for the Scroll event
- C declaration
enum SDL_MouseWheelDirection, defined atSDL3/SDL_mouse.h 127:14
Since: 3.2.0
Constructors
| SDL_MouseWheelDirection | |
Instances
| Storable SDL_MouseWheelDirection Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods sizeOf :: SDL_MouseWheelDirection -> Int # alignment :: SDL_MouseWheelDirection -> Int # peekElemOff :: Ptr SDL_MouseWheelDirection -> Int -> IO SDL_MouseWheelDirection # pokeElemOff :: Ptr SDL_MouseWheelDirection -> Int -> SDL_MouseWheelDirection -> IO () # peekByteOff :: Ptr b -> Int -> IO SDL_MouseWheelDirection # pokeByteOff :: Ptr b -> Int -> SDL_MouseWheelDirection -> IO () # peek :: Ptr SDL_MouseWheelDirection -> IO SDL_MouseWheelDirection # poke :: Ptr SDL_MouseWheelDirection -> SDL_MouseWheelDirection -> IO () # | |||||
| Generic SDL_MouseWheelDirection Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Associated Types
Methods from :: SDL_MouseWheelDirection -> Rep SDL_MouseWheelDirection x # to :: Rep SDL_MouseWheelDirection x -> SDL_MouseWheelDirection # | |||||
| Read SDL_MouseWheelDirection Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse | |||||
| Show SDL_MouseWheelDirection Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods showsPrec :: Int -> SDL_MouseWheelDirection -> ShowS # show :: SDL_MouseWheelDirection -> String # showList :: [SDL_MouseWheelDirection] -> ShowS # | |||||
| Eq SDL_MouseWheelDirection Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods (==) :: SDL_MouseWheelDirection -> SDL_MouseWheelDirection -> Bool # (/=) :: SDL_MouseWheelDirection -> SDL_MouseWheelDirection -> Bool # | |||||
| Ord SDL_MouseWheelDirection Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods compare :: SDL_MouseWheelDirection -> SDL_MouseWheelDirection -> Ordering # (<) :: SDL_MouseWheelDirection -> SDL_MouseWheelDirection -> Bool # (<=) :: SDL_MouseWheelDirection -> SDL_MouseWheelDirection -> Bool # (>) :: SDL_MouseWheelDirection -> SDL_MouseWheelDirection -> Bool # (>=) :: SDL_MouseWheelDirection -> SDL_MouseWheelDirection -> Bool # max :: SDL_MouseWheelDirection -> SDL_MouseWheelDirection -> SDL_MouseWheelDirection # min :: SDL_MouseWheelDirection -> SDL_MouseWheelDirection -> SDL_MouseWheelDirection # | |||||
| Prim SDL_MouseWheelDirection Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods sizeOfType# :: Proxy SDL_MouseWheelDirection -> Int# # sizeOf# :: SDL_MouseWheelDirection -> Int# # alignmentOfType# :: Proxy SDL_MouseWheelDirection -> Int# # alignment# :: SDL_MouseWheelDirection -> Int# # indexByteArray# :: ByteArray# -> Int# -> SDL_MouseWheelDirection # readByteArray# :: MutableByteArray# s -> Int# -> State# s -> (# State# s, SDL_MouseWheelDirection #) # writeByteArray# :: MutableByteArray# s -> Int# -> SDL_MouseWheelDirection -> State# s -> State# s # setByteArray# :: MutableByteArray# s -> Int# -> Int# -> SDL_MouseWheelDirection -> State# s -> State# s # indexOffAddr# :: Addr# -> Int# -> SDL_MouseWheelDirection # readOffAddr# :: Addr# -> Int# -> State# s -> (# State# s, SDL_MouseWheelDirection #) # writeOffAddr# :: Addr# -> Int# -> SDL_MouseWheelDirection -> State# s -> State# s # setOffAddr# :: Addr# -> Int# -> Int# -> SDL_MouseWheelDirection -> State# s -> State# s # | |||||
| CEnum SDL_MouseWheelDirection Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Associated Types
Methods toCEnum :: CEnumZ SDL_MouseWheelDirection -> SDL_MouseWheelDirection # fromCEnum :: SDL_MouseWheelDirection -> CEnumZ SDL_MouseWheelDirection # declaredValues :: proxy SDL_MouseWheelDirection -> DeclaredValues SDL_MouseWheelDirection # showsUndeclared :: proxy SDL_MouseWheelDirection -> Int -> CEnumZ SDL_MouseWheelDirection -> ShowS # readPrecUndeclared :: ReadPrec SDL_MouseWheelDirection # isDeclared :: SDL_MouseWheelDirection -> Bool # mkDeclared :: CEnumZ SDL_MouseWheelDirection -> Maybe SDL_MouseWheelDirection # | |||||
| SequentialCEnum SDL_MouseWheelDirection Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse | |||||
| HasFFIType SDL_MouseWheelDirection Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Associated Types
| |||||
| ReadRaw SDL_MouseWheelDirection Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods readRaw :: Ptr SDL_MouseWheelDirection -> IO SDL_MouseWheelDirection # | |||||
| StaticSize SDL_MouseWheelDirection Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods | |||||
| WriteRaw SDL_MouseWheelDirection Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods writeRaw :: Ptr SDL_MouseWheelDirection -> SDL_MouseWheelDirection -> IO () # | |||||
| HasCField SDL_MouseWheelDirection "unwrap" Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Associated Types
| |||||
| ty ~ CUInt => HasField "unwrap" SDL_MouseWheelDirection ty Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods hasField :: SDL_MouseWheelDirection -> (ty -> SDL_MouseWheelDirection, ty) # | |||||
| ty ~ CUInt => HasField "unwrap" (Ptr SDL_MouseWheelDirection) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods getField :: Ptr SDL_MouseWheelDirection -> Ptr ty # | |||||
| type Rep SDL_MouseWheelDirection Source # | |||||
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 # | |||||
Defined in SDL3.Sys.Bindgen.Mouse | |||||
| type FFIType SDL_MouseWheelDirection Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse | |||||
| type CFieldType SDL_MouseWheelDirection "unwrap" Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse | |||||
pattern SDL_MOUSEWHEEL_NORMAL :: SDL_MouseWheelDirection Source #
The scroll direction is normal
- C declaration
SDL_MOUSEWHEEL_NORMAL, defined atSDL3/SDL_mouse.h 129:5
pattern SDL_MOUSEWHEEL_FLIPPED :: SDL_MouseWheelDirection Source #
The scroll direction is flipped / natural
- C declaration
SDL_MOUSEWHEEL_FLIPPED, defined atSDL3/SDL_mouse.h 130:5
data SDL_CursorFrameInfo Source #
Animated cursor frame info.
- C declaration
struct SDL_CursorFrameInfo, defined atSDL3/SDL_mouse.h 138:16
Since: 3.4.0
Constructors
| SDL_CursorFrameInfo | |
Fields
| |
Instances
| Storable SDL_CursorFrameInfo Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods sizeOf :: SDL_CursorFrameInfo -> Int # alignment :: SDL_CursorFrameInfo -> Int # peekElemOff :: Ptr SDL_CursorFrameInfo -> Int -> IO SDL_CursorFrameInfo # pokeElemOff :: Ptr SDL_CursorFrameInfo -> Int -> SDL_CursorFrameInfo -> IO () # peekByteOff :: Ptr b -> Int -> IO SDL_CursorFrameInfo # pokeByteOff :: Ptr b -> Int -> SDL_CursorFrameInfo -> IO () # peek :: Ptr SDL_CursorFrameInfo -> IO SDL_CursorFrameInfo # poke :: Ptr SDL_CursorFrameInfo -> SDL_CursorFrameInfo -> IO () # | |||||
| Generic SDL_CursorFrameInfo Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Associated Types
Methods from :: SDL_CursorFrameInfo -> Rep SDL_CursorFrameInfo x # to :: Rep SDL_CursorFrameInfo x -> SDL_CursorFrameInfo # | |||||
| Show SDL_CursorFrameInfo Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods showsPrec :: Int -> SDL_CursorFrameInfo -> ShowS # show :: SDL_CursorFrameInfo -> String # showList :: [SDL_CursorFrameInfo] -> ShowS # | |||||
| Eq SDL_CursorFrameInfo Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods (==) :: SDL_CursorFrameInfo -> SDL_CursorFrameInfo -> Bool # (/=) :: SDL_CursorFrameInfo -> SDL_CursorFrameInfo -> Bool # | |||||
| ReadRaw SDL_CursorFrameInfo Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods readRaw :: Ptr SDL_CursorFrameInfo -> IO SDL_CursorFrameInfo # | |||||
| StaticSize SDL_CursorFrameInfo Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods staticSizeOf :: Proxy SDL_CursorFrameInfo -> Int # | |||||
| WriteRaw SDL_CursorFrameInfo Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods writeRaw :: Ptr SDL_CursorFrameInfo -> SDL_CursorFrameInfo -> IO () # | |||||
| IsStruct SDL_CursorFrameInfo Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods | |||||
| HasCField SDL_CursorFrameInfo "duration" Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Associated Types
| |||||
| HasCField SDL_CursorFrameInfo "surface" Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Associated Types
| |||||
| ty ~ Uint32 => HasField "duration" SDL_CursorFrameInfo ty Source # | The frame duration in milliseconds (a duration of 0 is infinite)
| ||||
Defined in SDL3.Sys.Bindgen.Mouse Methods hasField :: SDL_CursorFrameInfo -> (ty -> SDL_CursorFrameInfo, ty) # | |||||
| ty ~ Ptr SDL_Surface => HasField "surface" SDL_CursorFrameInfo ty Source # | The surface data for this frame
| ||||
Defined in SDL3.Sys.Bindgen.Mouse Methods hasField :: SDL_CursorFrameInfo -> (ty -> SDL_CursorFrameInfo, ty) # | |||||
| ty ~ Uint32 => HasField "duration" (Ptr SDL_CursorFrameInfo) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods getField :: Ptr SDL_CursorFrameInfo -> Ptr ty # | |||||
| ty ~ Ptr SDL_Surface => HasField "surface" (Ptr SDL_CursorFrameInfo) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods getField :: Ptr SDL_CursorFrameInfo -> Ptr ty # | |||||
| type Rep SDL_CursorFrameInfo Source # | |||||
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 # | |||||
Defined in SDL3.Sys.Bindgen.Mouse | |||||
| type CFieldType SDL_CursorFrameInfo "surface" Source # | |||||
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 atSDL3/SDL_mouse.h 159:16
Since: 3.2.0
Constructors
| SDL_MouseButtonFlags | |
Instances
| Bits SDL_MouseButtonFlags Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods (.&.) :: SDL_MouseButtonFlags -> SDL_MouseButtonFlags -> SDL_MouseButtonFlags # (.|.) :: SDL_MouseButtonFlags -> SDL_MouseButtonFlags -> SDL_MouseButtonFlags # xor :: SDL_MouseButtonFlags -> SDL_MouseButtonFlags -> SDL_MouseButtonFlags # complement :: SDL_MouseButtonFlags -> SDL_MouseButtonFlags # shift :: SDL_MouseButtonFlags -> Int -> SDL_MouseButtonFlags # rotate :: SDL_MouseButtonFlags -> Int -> SDL_MouseButtonFlags # zeroBits :: SDL_MouseButtonFlags # bit :: Int -> SDL_MouseButtonFlags # setBit :: SDL_MouseButtonFlags -> Int -> SDL_MouseButtonFlags # clearBit :: SDL_MouseButtonFlags -> Int -> SDL_MouseButtonFlags # complementBit :: SDL_MouseButtonFlags -> Int -> SDL_MouseButtonFlags # testBit :: SDL_MouseButtonFlags -> Int -> Bool # bitSizeMaybe :: SDL_MouseButtonFlags -> Maybe Int # bitSize :: SDL_MouseButtonFlags -> Int # isSigned :: SDL_MouseButtonFlags -> Bool # shiftL :: SDL_MouseButtonFlags -> Int -> SDL_MouseButtonFlags # unsafeShiftL :: SDL_MouseButtonFlags -> Int -> SDL_MouseButtonFlags # shiftR :: SDL_MouseButtonFlags -> Int -> SDL_MouseButtonFlags # unsafeShiftR :: SDL_MouseButtonFlags -> Int -> SDL_MouseButtonFlags # rotateL :: SDL_MouseButtonFlags -> Int -> SDL_MouseButtonFlags # rotateR :: SDL_MouseButtonFlags -> Int -> SDL_MouseButtonFlags # popCount :: SDL_MouseButtonFlags -> Int # | |||||
| FiniteBits SDL_MouseButtonFlags Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods finiteBitSize :: SDL_MouseButtonFlags -> Int # | |||||
| Bounded SDL_MouseButtonFlags Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse | |||||
| Enum SDL_MouseButtonFlags Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods succ :: SDL_MouseButtonFlags -> SDL_MouseButtonFlags # pred :: SDL_MouseButtonFlags -> SDL_MouseButtonFlags # toEnum :: Int -> SDL_MouseButtonFlags # fromEnum :: SDL_MouseButtonFlags -> Int # enumFrom :: SDL_MouseButtonFlags -> [SDL_MouseButtonFlags] # enumFromThen :: SDL_MouseButtonFlags -> SDL_MouseButtonFlags -> [SDL_MouseButtonFlags] # enumFromTo :: SDL_MouseButtonFlags -> SDL_MouseButtonFlags -> [SDL_MouseButtonFlags] # enumFromThenTo :: SDL_MouseButtonFlags -> SDL_MouseButtonFlags -> SDL_MouseButtonFlags -> [SDL_MouseButtonFlags] # | |||||
| Storable SDL_MouseButtonFlags Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods sizeOf :: SDL_MouseButtonFlags -> Int # alignment :: SDL_MouseButtonFlags -> Int # peekElemOff :: Ptr SDL_MouseButtonFlags -> Int -> IO SDL_MouseButtonFlags # pokeElemOff :: Ptr SDL_MouseButtonFlags -> Int -> SDL_MouseButtonFlags -> IO () # peekByteOff :: Ptr b -> Int -> IO SDL_MouseButtonFlags # pokeByteOff :: Ptr b -> Int -> SDL_MouseButtonFlags -> IO () # peek :: Ptr SDL_MouseButtonFlags -> IO SDL_MouseButtonFlags # poke :: Ptr SDL_MouseButtonFlags -> SDL_MouseButtonFlags -> IO () # | |||||
| Generic SDL_MouseButtonFlags Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Associated Types
Methods from :: SDL_MouseButtonFlags -> Rep SDL_MouseButtonFlags x # to :: Rep SDL_MouseButtonFlags x -> SDL_MouseButtonFlags # | |||||
| Ix SDL_MouseButtonFlags Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods range :: (SDL_MouseButtonFlags, SDL_MouseButtonFlags) -> [SDL_MouseButtonFlags] # index :: (SDL_MouseButtonFlags, SDL_MouseButtonFlags) -> SDL_MouseButtonFlags -> Int # unsafeIndex :: (SDL_MouseButtonFlags, SDL_MouseButtonFlags) -> SDL_MouseButtonFlags -> Int # inRange :: (SDL_MouseButtonFlags, SDL_MouseButtonFlags) -> SDL_MouseButtonFlags -> Bool # rangeSize :: (SDL_MouseButtonFlags, SDL_MouseButtonFlags) -> Int # unsafeRangeSize :: (SDL_MouseButtonFlags, SDL_MouseButtonFlags) -> Int # | |||||
| Num SDL_MouseButtonFlags Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods (+) :: SDL_MouseButtonFlags -> SDL_MouseButtonFlags -> SDL_MouseButtonFlags # (-) :: SDL_MouseButtonFlags -> SDL_MouseButtonFlags -> SDL_MouseButtonFlags # (*) :: SDL_MouseButtonFlags -> SDL_MouseButtonFlags -> SDL_MouseButtonFlags # negate :: SDL_MouseButtonFlags -> SDL_MouseButtonFlags # abs :: SDL_MouseButtonFlags -> SDL_MouseButtonFlags # | |||||
| Read SDL_MouseButtonFlags Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods readsPrec :: Int -> ReadS SDL_MouseButtonFlags # readList :: ReadS [SDL_MouseButtonFlags] # | |||||
| Integral SDL_MouseButtonFlags Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods quot :: SDL_MouseButtonFlags -> SDL_MouseButtonFlags -> SDL_MouseButtonFlags # rem :: SDL_MouseButtonFlags -> SDL_MouseButtonFlags -> SDL_MouseButtonFlags # div :: SDL_MouseButtonFlags -> SDL_MouseButtonFlags -> SDL_MouseButtonFlags # mod :: SDL_MouseButtonFlags -> SDL_MouseButtonFlags -> SDL_MouseButtonFlags # quotRem :: SDL_MouseButtonFlags -> SDL_MouseButtonFlags -> (SDL_MouseButtonFlags, SDL_MouseButtonFlags) # divMod :: SDL_MouseButtonFlags -> SDL_MouseButtonFlags -> (SDL_MouseButtonFlags, SDL_MouseButtonFlags) # | |||||
| Real SDL_MouseButtonFlags Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods | |||||
| Show SDL_MouseButtonFlags Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods showsPrec :: Int -> SDL_MouseButtonFlags -> ShowS # show :: SDL_MouseButtonFlags -> String # showList :: [SDL_MouseButtonFlags] -> ShowS # | |||||
| Eq SDL_MouseButtonFlags Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods (==) :: SDL_MouseButtonFlags -> SDL_MouseButtonFlags -> Bool # (/=) :: SDL_MouseButtonFlags -> SDL_MouseButtonFlags -> Bool # | |||||
| Ord SDL_MouseButtonFlags Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods compare :: SDL_MouseButtonFlags -> SDL_MouseButtonFlags -> Ordering # (<) :: SDL_MouseButtonFlags -> SDL_MouseButtonFlags -> Bool # (<=) :: SDL_MouseButtonFlags -> SDL_MouseButtonFlags -> Bool # (>) :: SDL_MouseButtonFlags -> SDL_MouseButtonFlags -> Bool # (>=) :: SDL_MouseButtonFlags -> SDL_MouseButtonFlags -> Bool # max :: SDL_MouseButtonFlags -> SDL_MouseButtonFlags -> SDL_MouseButtonFlags # min :: SDL_MouseButtonFlags -> SDL_MouseButtonFlags -> SDL_MouseButtonFlags # | |||||
| Prim SDL_MouseButtonFlags Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods sizeOfType# :: Proxy SDL_MouseButtonFlags -> Int# # sizeOf# :: SDL_MouseButtonFlags -> Int# # alignmentOfType# :: Proxy SDL_MouseButtonFlags -> Int# # alignment# :: SDL_MouseButtonFlags -> Int# # indexByteArray# :: ByteArray# -> Int# -> SDL_MouseButtonFlags # readByteArray# :: MutableByteArray# s -> Int# -> State# s -> (# State# s, SDL_MouseButtonFlags #) # writeByteArray# :: MutableByteArray# s -> Int# -> SDL_MouseButtonFlags -> State# s -> State# s # setByteArray# :: MutableByteArray# s -> Int# -> Int# -> SDL_MouseButtonFlags -> State# s -> State# s # indexOffAddr# :: Addr# -> Int# -> SDL_MouseButtonFlags # readOffAddr# :: Addr# -> Int# -> State# s -> (# State# s, SDL_MouseButtonFlags #) # writeOffAddr# :: Addr# -> Int# -> SDL_MouseButtonFlags -> State# s -> State# s # setOffAddr# :: Addr# -> Int# -> Int# -> SDL_MouseButtonFlags -> State# s -> State# s # | |||||
| HasFFIType SDL_MouseButtonFlags Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Associated Types
| |||||
| ReadRaw SDL_MouseButtonFlags Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods readRaw :: Ptr SDL_MouseButtonFlags -> IO SDL_MouseButtonFlags # | |||||
| StaticSize SDL_MouseButtonFlags Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods | |||||
| WriteRaw SDL_MouseButtonFlags Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods writeRaw :: Ptr SDL_MouseButtonFlags -> SDL_MouseButtonFlags -> IO () # | |||||
| Bitfield SDL_MouseButtonFlags Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods narrow :: SDL_MouseButtonFlags -> Int -> Word64 # extend :: Word64 -> Int -> SDL_MouseButtonFlags # | |||||
| HasCField SDL_MouseButtonFlags "unwrap" Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Associated Types
| |||||
| ty ~ Uint32 => HasField "unwrap" SDL_MouseButtonFlags ty Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods hasField :: SDL_MouseButtonFlags -> (ty -> SDL_MouseButtonFlags, ty) # | |||||
| ty ~ Uint32 => HasField "unwrap" (Ptr SDL_MouseButtonFlags) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods getField :: Ptr SDL_MouseButtonFlags -> Ptr ty # | |||||
| type Rep SDL_MouseButtonFlags Source # | |||||
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 # | |||||
Defined in SDL3.Sys.Bindgen.Mouse | |||||
| type CFieldType SDL_MouseButtonFlags "unwrap" Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse | |||||
sDL_BUTTON_LEFT :: CInt Source #
- C declaration
macro SDL_BUTTON_LEFT, defined atSDL3/SDL_mouse.h 161:9
sDL_BUTTON_MIDDLE :: CInt Source #
- C declaration
macro SDL_BUTTON_MIDDLE, defined atSDL3/SDL_mouse.h 162:9
sDL_BUTTON_RIGHT :: CInt Source #
- C declaration
macro SDL_BUTTON_RIGHT, defined atSDL3/SDL_mouse.h 163:9
sDL_BUTTON_X1 :: CInt Source #
- C declaration
macro SDL_BUTTON_X1, defined atSDL3/SDL_mouse.h 164:9
sDL_BUTTON_X2 :: CInt Source #
- C declaration
macro SDL_BUTTON_X2, defined atSDL3/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 atSDL3/SDL_mouse.h 167:9
sDL_BUTTON_LMASK :: CUInt Source #
- C declaration
macro SDL_BUTTON_LMASK, defined atSDL3/SDL_mouse.h 168:9
sDL_BUTTON_MMASK :: CUInt Source #
- C declaration
macro SDL_BUTTON_MMASK, defined atSDL3/SDL_mouse.h 169:9
sDL_BUTTON_RMASK :: CUInt Source #
- C declaration
macro SDL_BUTTON_RMASK, defined atSDL3/SDL_mouse.h 170:9
sDL_BUTTON_X1MASK :: CUInt Source #
- C declaration
macro SDL_BUTTON_X1MASK, defined atSDL3/SDL_mouse.h 171:9
sDL_BUTTON_X2MASK :: CUInt Source #
- C declaration
macro SDL_BUTTON_X2MASK, defined atSDL3/SDL_mouse.h 172:9
newtype SDL_MouseMotionTransformCallback_Aux Source #
Auxiliary type used by SDL_MouseMotionTransformCallback
- C declaration
SDL_MouseMotionTransformCallback, defined atSDL3/SDL_mouse.h 205:24
Constructors
| SDL_MouseMotionTransformCallback_Aux | |
Instances
| Generic SDL_MouseMotionTransformCallback_Aux Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Associated Types
| |||||
| FromFunPtr SDL_MouseMotionTransformCallback_Aux Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse | |||||
| ToFunPtr SDL_MouseMotionTransformCallback_Aux Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse | |||||
| HasCField SDL_MouseMotionTransformCallback_Aux "unwrap" Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Associated Types
| |||||
| ty ~ (Ptr Void -> Uint64 -> Ptr SDL_Window -> SDL_MouseID -> Ptr CFloat -> Ptr CFloat -> IO ()) => HasField "unwrap" SDL_MouseMotionTransformCallback_Aux ty Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods hasField :: SDL_MouseMotionTransformCallback_Aux -> (ty -> SDL_MouseMotionTransformCallback_Aux, ty) # | |||||
| ty ~ (Ptr Void -> Uint64 -> Ptr SDL_Window -> SDL_MouseID -> Ptr CFloat -> Ptr CFloat -> IO ()) => HasField "unwrap" (Ptr SDL_MouseMotionTransformCallback_Aux) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods getField :: Ptr SDL_MouseMotionTransformCallback_Aux -> Ptr ty # | |||||
| type Rep SDL_MouseMotionTransformCallback_Aux Source # | |||||
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 # | |||||
Defined in SDL3.Sys.Bindgen.Mouse type CFieldType SDL_MouseMotionTransformCallback_Aux "unwrap" = Ptr Void -> Uint64 -> Ptr SDL_Window -> SDL_MouseID -> Ptr CFloat -> Ptr CFloat -> IO () | |||||
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
userdatatoSDL_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 atSDL3/SDL_mouse.h 205:24
Since: 3.4.0
Constructors
| SDL_MouseMotionTransformCallback | |
Instances
| Storable SDL_MouseMotionTransformCallback Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods sizeOf :: SDL_MouseMotionTransformCallback -> Int # alignment :: SDL_MouseMotionTransformCallback -> Int # peekElemOff :: Ptr SDL_MouseMotionTransformCallback -> Int -> IO SDL_MouseMotionTransformCallback # pokeElemOff :: Ptr SDL_MouseMotionTransformCallback -> Int -> SDL_MouseMotionTransformCallback -> IO () # peekByteOff :: Ptr b -> Int -> IO SDL_MouseMotionTransformCallback # pokeByteOff :: Ptr b -> Int -> SDL_MouseMotionTransformCallback -> IO () # peek :: Ptr SDL_MouseMotionTransformCallback -> IO SDL_MouseMotionTransformCallback # poke :: Ptr SDL_MouseMotionTransformCallback -> SDL_MouseMotionTransformCallback -> IO () # | |||||
| Generic SDL_MouseMotionTransformCallback Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Associated Types
| |||||
| Show SDL_MouseMotionTransformCallback Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods showsPrec :: Int -> SDL_MouseMotionTransformCallback -> ShowS # | |||||
| Eq SDL_MouseMotionTransformCallback Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse | |||||
| Ord SDL_MouseMotionTransformCallback Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods compare :: SDL_MouseMotionTransformCallback -> SDL_MouseMotionTransformCallback -> Ordering # (<) :: SDL_MouseMotionTransformCallback -> SDL_MouseMotionTransformCallback -> Bool # (<=) :: SDL_MouseMotionTransformCallback -> SDL_MouseMotionTransformCallback -> Bool # (>) :: SDL_MouseMotionTransformCallback -> SDL_MouseMotionTransformCallback -> Bool # (>=) :: SDL_MouseMotionTransformCallback -> SDL_MouseMotionTransformCallback -> Bool # max :: SDL_MouseMotionTransformCallback -> SDL_MouseMotionTransformCallback -> SDL_MouseMotionTransformCallback # min :: SDL_MouseMotionTransformCallback -> SDL_MouseMotionTransformCallback -> SDL_MouseMotionTransformCallback # | |||||
| HasFFIType SDL_MouseMotionTransformCallback Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Associated Types
| |||||
| ReadRaw SDL_MouseMotionTransformCallback Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse | |||||
| StaticSize SDL_MouseMotionTransformCallback Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse | |||||
| WriteRaw SDL_MouseMotionTransformCallback Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods writeRaw :: Ptr SDL_MouseMotionTransformCallback -> SDL_MouseMotionTransformCallback -> IO () # | |||||
| HasCField SDL_MouseMotionTransformCallback "unwrap" Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Associated Types
| |||||
| ty ~ FunPtr SDL_MouseMotionTransformCallback_Aux => HasField "unwrap" SDL_MouseMotionTransformCallback ty Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods hasField :: SDL_MouseMotionTransformCallback -> (ty -> SDL_MouseMotionTransformCallback, ty) # | |||||
| ty ~ FunPtr SDL_MouseMotionTransformCallback_Aux => HasField "unwrap" (Ptr SDL_MouseMotionTransformCallback) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse Methods getField :: Ptr SDL_MouseMotionTransformCallback -> Ptr ty # | |||||
| type Rep SDL_MouseMotionTransformCallback Source # | |||||
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 # | |||||
| type CFieldType SDL_MouseMotionTransformCallback "unwrap" Source # | |||||
Defined in SDL3.Sys.Bindgen.Mouse | |||||