| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
SDL3.Sys.Bindgen.Pen
Description
SDL pen event handling.
SDL provides an API for pressure-sensitive pen (stylus and/or eraser) handling, e.g., for input and drawing tablets or suitably equipped mobile / tablet devices.
To get started with pens, simply handle pen events:
- SDL_EVENT_PEN_PROXIMITY_IN, SDL_EVENT_PEN_PROXIMITY_OUT (SDL_PenProximityEvent)
- SDL_EVENT_PEN_DOWN, SDL_EVENT_PEN_UP (SDL_PenTouchEvent)
- SDL_EVENT_PEN_MOTION (SDL_PenMotionEvent)
- SDL_EVENT_PEN_BUTTON_DOWN, SDL_EVENT_PEN_BUTTON_UP (SDL_PenButtonEvent)
- SDL_EVENT_PEN_AXIS (SDL_PenAxisEvent)
Pens may provide more than simple touch input; they might have other axes, such as pressure, tilt, rotation, etc.
When a pen starts providing input, SDL will assign it a unique SDL_PenID, which will remain for the life of the process, as long as the pen stays connected. A pen leaving proximity (being taken far enough away from the digitizer tablet that it no longer reponds) and then coming back should fire proximity events, but the SDL_PenID should remain consistent. Unplugging the digitizer and reconnecting may cause future input to have a new SDL_PenID, as SDL may not know that this is the same hardware.
Please note that various platforms vary wildly in how (and how well) they support pen input. If your pen supports some piece of functionality but SDL doesn't seem to, it might actually be the operating system's fault. For example, some platforms can manage multiple devices at the same time, but others will make any connected pens look like a single logical device, much how all USB mice connected to a computer will move the same system cursor. Other platforms might not support pen buttons, or the distance axis, etc. Very few platforms can even report what functionality the pen supports in the first place, so best practices is to either build UI to let the user configure their pens, or be prepared to handle new functionality for a pen the first time an event is reported. SDL pen instance IDs.
Zero is used to signify an invalid/null device.
These show up in pen events when SDL sees input from them. They remain consistent as long as SDL can recognize a tool to be the same pen; but if a pen's digitizer table is physically detached from the computer, it might get a new ID when reconnected, as SDL won't know it's the same device.
These IDs are only stable within a single run of a program; the next time a program is run, the pen's ID will likely be different, even if the hardware hasn't been disconnected, etc.
Since: 3.2.0
Synopsis
- newtype SDL_PenID = SDL_PenID {}
- newtype SDL_PenInputFlags = SDL_PenInputFlags {}
- sDL_PEN_INPUT_DOWN :: CUInt
- sDL_PEN_INPUT_BUTTON_1 :: CUInt
- sDL_PEN_INPUT_BUTTON_2 :: CUInt
- sDL_PEN_INPUT_BUTTON_3 :: CUInt
- sDL_PEN_INPUT_BUTTON_4 :: CUInt
- sDL_PEN_INPUT_BUTTON_5 :: CUInt
- sDL_PEN_INPUT_ERASER_TIP :: CUInt
- sDL_PEN_INPUT_IN_PROXIMITY :: CUInt
- newtype SDL_PenAxis = SDL_PenAxis {}
- pattern SDL_PEN_AXIS_PRESSURE :: SDL_PenAxis
- pattern SDL_PEN_AXIS_XTILT :: SDL_PenAxis
- pattern SDL_PEN_AXIS_YTILT :: SDL_PenAxis
- pattern SDL_PEN_AXIS_DISTANCE :: SDL_PenAxis
- pattern SDL_PEN_AXIS_ROTATION :: SDL_PenAxis
- pattern SDL_PEN_AXIS_SLIDER :: SDL_PenAxis
- pattern SDL_PEN_AXIS_TANGENTIAL_PRESSURE :: SDL_PenAxis
- pattern SDL_PEN_AXIS_COUNT :: SDL_PenAxis
- newtype SDL_PenDeviceType = SDL_PenDeviceType {}
- pattern SDL_PEN_DEVICE_TYPE_INVALID :: SDL_PenDeviceType
- pattern SDL_PEN_DEVICE_TYPE_UNKNOWN :: SDL_PenDeviceType
- pattern SDL_PEN_DEVICE_TYPE_DIRECT :: SDL_PenDeviceType
- pattern SDL_PEN_DEVICE_TYPE_INDIRECT :: SDL_PenDeviceType
Documentation
- C declaration
SDL_PenID, defined atSDL3/SDL_pen.h 93:16
Instances
newtype SDL_PenInputFlags Source #
Pen input flags, as reported by various pen events' pen_state field.
- C declaration
SDL_PenInputFlags, defined atSDL3/SDL_pen.h 114:16
Since: 3.2.0
Constructors
| SDL_PenInputFlags | |
Instances
| Bits SDL_PenInputFlags Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen Methods (.&.) :: SDL_PenInputFlags -> SDL_PenInputFlags -> SDL_PenInputFlags # (.|.) :: SDL_PenInputFlags -> SDL_PenInputFlags -> SDL_PenInputFlags # xor :: SDL_PenInputFlags -> SDL_PenInputFlags -> SDL_PenInputFlags # complement :: SDL_PenInputFlags -> SDL_PenInputFlags # shift :: SDL_PenInputFlags -> Int -> SDL_PenInputFlags # rotate :: SDL_PenInputFlags -> Int -> SDL_PenInputFlags # zeroBits :: SDL_PenInputFlags # bit :: Int -> SDL_PenInputFlags # setBit :: SDL_PenInputFlags -> Int -> SDL_PenInputFlags # clearBit :: SDL_PenInputFlags -> Int -> SDL_PenInputFlags # complementBit :: SDL_PenInputFlags -> Int -> SDL_PenInputFlags # testBit :: SDL_PenInputFlags -> Int -> Bool # bitSizeMaybe :: SDL_PenInputFlags -> Maybe Int # bitSize :: SDL_PenInputFlags -> Int # isSigned :: SDL_PenInputFlags -> Bool # shiftL :: SDL_PenInputFlags -> Int -> SDL_PenInputFlags # unsafeShiftL :: SDL_PenInputFlags -> Int -> SDL_PenInputFlags # shiftR :: SDL_PenInputFlags -> Int -> SDL_PenInputFlags # unsafeShiftR :: SDL_PenInputFlags -> Int -> SDL_PenInputFlags # rotateL :: SDL_PenInputFlags -> Int -> SDL_PenInputFlags # rotateR :: SDL_PenInputFlags -> Int -> SDL_PenInputFlags # popCount :: SDL_PenInputFlags -> Int # | |||||
| FiniteBits SDL_PenInputFlags Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen | |||||
| Bounded SDL_PenInputFlags Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen | |||||
| Enum SDL_PenInputFlags Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen Methods succ :: SDL_PenInputFlags -> SDL_PenInputFlags # pred :: SDL_PenInputFlags -> SDL_PenInputFlags # toEnum :: Int -> SDL_PenInputFlags # fromEnum :: SDL_PenInputFlags -> Int # enumFrom :: SDL_PenInputFlags -> [SDL_PenInputFlags] # enumFromThen :: SDL_PenInputFlags -> SDL_PenInputFlags -> [SDL_PenInputFlags] # enumFromTo :: SDL_PenInputFlags -> SDL_PenInputFlags -> [SDL_PenInputFlags] # enumFromThenTo :: SDL_PenInputFlags -> SDL_PenInputFlags -> SDL_PenInputFlags -> [SDL_PenInputFlags] # | |||||
| Storable SDL_PenInputFlags Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen Methods sizeOf :: SDL_PenInputFlags -> Int # alignment :: SDL_PenInputFlags -> Int # peekElemOff :: Ptr SDL_PenInputFlags -> Int -> IO SDL_PenInputFlags # pokeElemOff :: Ptr SDL_PenInputFlags -> Int -> SDL_PenInputFlags -> IO () # peekByteOff :: Ptr b -> Int -> IO SDL_PenInputFlags # pokeByteOff :: Ptr b -> Int -> SDL_PenInputFlags -> IO () # peek :: Ptr SDL_PenInputFlags -> IO SDL_PenInputFlags # poke :: Ptr SDL_PenInputFlags -> SDL_PenInputFlags -> IO () # | |||||
| Generic SDL_PenInputFlags Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen Associated Types
Methods from :: SDL_PenInputFlags -> Rep SDL_PenInputFlags x # to :: Rep SDL_PenInputFlags x -> SDL_PenInputFlags # | |||||
| Ix SDL_PenInputFlags Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen Methods range :: (SDL_PenInputFlags, SDL_PenInputFlags) -> [SDL_PenInputFlags] # index :: (SDL_PenInputFlags, SDL_PenInputFlags) -> SDL_PenInputFlags -> Int # unsafeIndex :: (SDL_PenInputFlags, SDL_PenInputFlags) -> SDL_PenInputFlags -> Int # inRange :: (SDL_PenInputFlags, SDL_PenInputFlags) -> SDL_PenInputFlags -> Bool # rangeSize :: (SDL_PenInputFlags, SDL_PenInputFlags) -> Int # unsafeRangeSize :: (SDL_PenInputFlags, SDL_PenInputFlags) -> Int # | |||||
| Num SDL_PenInputFlags Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen Methods (+) :: SDL_PenInputFlags -> SDL_PenInputFlags -> SDL_PenInputFlags # (-) :: SDL_PenInputFlags -> SDL_PenInputFlags -> SDL_PenInputFlags # (*) :: SDL_PenInputFlags -> SDL_PenInputFlags -> SDL_PenInputFlags # negate :: SDL_PenInputFlags -> SDL_PenInputFlags # abs :: SDL_PenInputFlags -> SDL_PenInputFlags # signum :: SDL_PenInputFlags -> SDL_PenInputFlags # fromInteger :: Integer -> SDL_PenInputFlags # | |||||
| Read SDL_PenInputFlags Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen Methods readsPrec :: Int -> ReadS SDL_PenInputFlags # readList :: ReadS [SDL_PenInputFlags] # | |||||
| Integral SDL_PenInputFlags Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen Methods quot :: SDL_PenInputFlags -> SDL_PenInputFlags -> SDL_PenInputFlags # rem :: SDL_PenInputFlags -> SDL_PenInputFlags -> SDL_PenInputFlags # div :: SDL_PenInputFlags -> SDL_PenInputFlags -> SDL_PenInputFlags # mod :: SDL_PenInputFlags -> SDL_PenInputFlags -> SDL_PenInputFlags # quotRem :: SDL_PenInputFlags -> SDL_PenInputFlags -> (SDL_PenInputFlags, SDL_PenInputFlags) # divMod :: SDL_PenInputFlags -> SDL_PenInputFlags -> (SDL_PenInputFlags, SDL_PenInputFlags) # toInteger :: SDL_PenInputFlags -> Integer # | |||||
| Real SDL_PenInputFlags Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen Methods toRational :: SDL_PenInputFlags -> Rational # | |||||
| Show SDL_PenInputFlags Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen Methods showsPrec :: Int -> SDL_PenInputFlags -> ShowS # show :: SDL_PenInputFlags -> String # showList :: [SDL_PenInputFlags] -> ShowS # | |||||
| Eq SDL_PenInputFlags Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen Methods (==) :: SDL_PenInputFlags -> SDL_PenInputFlags -> Bool # (/=) :: SDL_PenInputFlags -> SDL_PenInputFlags -> Bool # | |||||
| Ord SDL_PenInputFlags Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen Methods compare :: SDL_PenInputFlags -> SDL_PenInputFlags -> Ordering # (<) :: SDL_PenInputFlags -> SDL_PenInputFlags -> Bool # (<=) :: SDL_PenInputFlags -> SDL_PenInputFlags -> Bool # (>) :: SDL_PenInputFlags -> SDL_PenInputFlags -> Bool # (>=) :: SDL_PenInputFlags -> SDL_PenInputFlags -> Bool # max :: SDL_PenInputFlags -> SDL_PenInputFlags -> SDL_PenInputFlags # min :: SDL_PenInputFlags -> SDL_PenInputFlags -> SDL_PenInputFlags # | |||||
| Prim SDL_PenInputFlags Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen Methods sizeOfType# :: Proxy SDL_PenInputFlags -> Int# # sizeOf# :: SDL_PenInputFlags -> Int# # alignmentOfType# :: Proxy SDL_PenInputFlags -> Int# # alignment# :: SDL_PenInputFlags -> Int# # indexByteArray# :: ByteArray# -> Int# -> SDL_PenInputFlags # readByteArray# :: MutableByteArray# s -> Int# -> State# s -> (# State# s, SDL_PenInputFlags #) # writeByteArray# :: MutableByteArray# s -> Int# -> SDL_PenInputFlags -> State# s -> State# s # setByteArray# :: MutableByteArray# s -> Int# -> Int# -> SDL_PenInputFlags -> State# s -> State# s # indexOffAddr# :: Addr# -> Int# -> SDL_PenInputFlags # readOffAddr# :: Addr# -> Int# -> State# s -> (# State# s, SDL_PenInputFlags #) # writeOffAddr# :: Addr# -> Int# -> SDL_PenInputFlags -> State# s -> State# s # setOffAddr# :: Addr# -> Int# -> Int# -> SDL_PenInputFlags -> State# s -> State# s # | |||||
| HasFFIType SDL_PenInputFlags Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen Associated Types
Methods toFFIType :: SDL_PenInputFlags -> FFIType SDL_PenInputFlags # fromFFIType :: FFIType SDL_PenInputFlags -> SDL_PenInputFlags # | |||||
| ReadRaw SDL_PenInputFlags Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen Methods | |||||
| StaticSize SDL_PenInputFlags Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen Methods staticSizeOf :: Proxy SDL_PenInputFlags -> Int # | |||||
| WriteRaw SDL_PenInputFlags Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen Methods writeRaw :: Ptr SDL_PenInputFlags -> SDL_PenInputFlags -> IO () # | |||||
| Bitfield SDL_PenInputFlags Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen | |||||
| HasCField SDL_PenInputFlags "unwrap" Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen Associated Types
| |||||
| ty ~ Uint32 => HasField "unwrap" SDL_PenInputFlags ty Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen Methods hasField :: SDL_PenInputFlags -> (ty -> SDL_PenInputFlags, ty) # | |||||
| ty ~ Uint32 => HasField "unwrap" (Ptr SDL_PenInputFlags) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen Methods getField :: Ptr SDL_PenInputFlags -> Ptr ty # | |||||
| type Rep SDL_PenInputFlags Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen type Rep SDL_PenInputFlags = D1 ('MetaData "SDL_PenInputFlags" "SDL3.Sys.Bindgen.Pen" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_PenInputFlags" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Uint32))) | |||||
| type FFIType SDL_PenInputFlags Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen | |||||
| type CFieldType SDL_PenInputFlags "unwrap" Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen | |||||
sDL_PEN_INPUT_DOWN :: CUInt Source #
pen is pressed down
- C declaration
macro SDL_PEN_INPUT_DOWN, defined atSDL3/SDL_pen.h 116:9
sDL_PEN_INPUT_BUTTON_1 :: CUInt Source #
button 1 is pressed
- C declaration
macro SDL_PEN_INPUT_BUTTON_1, defined atSDL3/SDL_pen.h 117:9
sDL_PEN_INPUT_BUTTON_2 :: CUInt Source #
button 2 is pressed
- C declaration
macro SDL_PEN_INPUT_BUTTON_2, defined atSDL3/SDL_pen.h 118:9
sDL_PEN_INPUT_BUTTON_3 :: CUInt Source #
button 3 is pressed
- C declaration
macro SDL_PEN_INPUT_BUTTON_3, defined atSDL3/SDL_pen.h 119:9
sDL_PEN_INPUT_BUTTON_4 :: CUInt Source #
button 4 is pressed
- C declaration
macro SDL_PEN_INPUT_BUTTON_4, defined atSDL3/SDL_pen.h 120:9
sDL_PEN_INPUT_BUTTON_5 :: CUInt Source #
button 5 is pressed
- C declaration
macro SDL_PEN_INPUT_BUTTON_5, defined atSDL3/SDL_pen.h 121:9
sDL_PEN_INPUT_ERASER_TIP :: CUInt Source #
eraser tip is used
- C declaration
macro SDL_PEN_INPUT_ERASER_TIP, defined atSDL3/SDL_pen.h 122:9
sDL_PEN_INPUT_IN_PROXIMITY :: CUInt Source #
pen is in proximity (since SDL 3.4.0)
- C declaration
macro SDL_PEN_INPUT_IN_PROXIMITY, defined atSDL3/SDL_pen.h 123:9
newtype SDL_PenAxis Source #
Pen axis indices.
These are the valid values for the axis field in SDL_PenAxisEvent. All axes are either normalised to 0..1 or report a (positive or negative) angle in degrees, with 0.0 representing the centre. Not all pens/backends support all axes: unsupported axes are always zero.
To convert angles for tilt and rotation into vector representation, use SDL_sinf on the XTILT, YTILT, or ROTATION component, for example:
SDL_sinf(xtilt * SDL_PI_F / 180.0).
- C declaration
enum SDL_PenAxis, defined atSDL3/SDL_pen.h 140:14
Since: 3.2.0
Constructors
| SDL_PenAxis | |
Instances
| Storable SDL_PenAxis Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen Methods sizeOf :: SDL_PenAxis -> Int # alignment :: SDL_PenAxis -> Int # peekElemOff :: Ptr SDL_PenAxis -> Int -> IO SDL_PenAxis # pokeElemOff :: Ptr SDL_PenAxis -> Int -> SDL_PenAxis -> IO () # peekByteOff :: Ptr b -> Int -> IO SDL_PenAxis # pokeByteOff :: Ptr b -> Int -> SDL_PenAxis -> IO () # peek :: Ptr SDL_PenAxis -> IO SDL_PenAxis # poke :: Ptr SDL_PenAxis -> SDL_PenAxis -> IO () # | |||||
| Generic SDL_PenAxis Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen Associated Types
| |||||
| Read SDL_PenAxis Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen Methods readsPrec :: Int -> ReadS SDL_PenAxis # readList :: ReadS [SDL_PenAxis] # readPrec :: ReadPrec SDL_PenAxis # readListPrec :: ReadPrec [SDL_PenAxis] # | |||||
| Show SDL_PenAxis Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen Methods showsPrec :: Int -> SDL_PenAxis -> ShowS # show :: SDL_PenAxis -> String # showList :: [SDL_PenAxis] -> ShowS # | |||||
| Eq SDL_PenAxis Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen | |||||
| Ord SDL_PenAxis Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen Methods compare :: SDL_PenAxis -> SDL_PenAxis -> Ordering # (<) :: SDL_PenAxis -> SDL_PenAxis -> Bool # (<=) :: SDL_PenAxis -> SDL_PenAxis -> Bool # (>) :: SDL_PenAxis -> SDL_PenAxis -> Bool # (>=) :: SDL_PenAxis -> SDL_PenAxis -> Bool # max :: SDL_PenAxis -> SDL_PenAxis -> SDL_PenAxis # min :: SDL_PenAxis -> SDL_PenAxis -> SDL_PenAxis # | |||||
| Prim SDL_PenAxis Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen Methods sizeOfType# :: Proxy SDL_PenAxis -> Int# # sizeOf# :: SDL_PenAxis -> Int# # alignmentOfType# :: Proxy SDL_PenAxis -> Int# # alignment# :: SDL_PenAxis -> Int# # indexByteArray# :: ByteArray# -> Int# -> SDL_PenAxis # readByteArray# :: MutableByteArray# s -> Int# -> State# s -> (# State# s, SDL_PenAxis #) # writeByteArray# :: MutableByteArray# s -> Int# -> SDL_PenAxis -> State# s -> State# s # setByteArray# :: MutableByteArray# s -> Int# -> Int# -> SDL_PenAxis -> State# s -> State# s # indexOffAddr# :: Addr# -> Int# -> SDL_PenAxis # readOffAddr# :: Addr# -> Int# -> State# s -> (# State# s, SDL_PenAxis #) # writeOffAddr# :: Addr# -> Int# -> SDL_PenAxis -> State# s -> State# s # setOffAddr# :: Addr# -> Int# -> Int# -> SDL_PenAxis -> State# s -> State# s # | |||||
| CEnum SDL_PenAxis Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen Associated Types
Methods toCEnum :: CEnumZ SDL_PenAxis -> SDL_PenAxis # fromCEnum :: SDL_PenAxis -> CEnumZ SDL_PenAxis # declaredValues :: proxy SDL_PenAxis -> DeclaredValues SDL_PenAxis # showsUndeclared :: proxy SDL_PenAxis -> Int -> CEnumZ SDL_PenAxis -> ShowS # readPrecUndeclared :: ReadPrec SDL_PenAxis # isDeclared :: SDL_PenAxis -> Bool # mkDeclared :: CEnumZ SDL_PenAxis -> Maybe SDL_PenAxis # | |||||
| SequentialCEnum SDL_PenAxis Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen | |||||
| HasFFIType SDL_PenAxis Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen Associated Types
Methods toFFIType :: SDL_PenAxis -> FFIType SDL_PenAxis # | |||||
| ReadRaw SDL_PenAxis Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen Methods readRaw :: Ptr SDL_PenAxis -> IO SDL_PenAxis # | |||||
| StaticSize SDL_PenAxis Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen | |||||
| WriteRaw SDL_PenAxis Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen Methods writeRaw :: Ptr SDL_PenAxis -> SDL_PenAxis -> IO () # | |||||
| HasCField SDL_PenAxis "unwrap" Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen Associated Types
| |||||
| ty ~ CUInt => HasField "unwrap" SDL_PenAxis ty Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen Methods hasField :: SDL_PenAxis -> (ty -> SDL_PenAxis, ty) # | |||||
| ty ~ CUInt => HasField "unwrap" (Ptr SDL_PenAxis) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen Methods getField :: Ptr SDL_PenAxis -> Ptr ty # | |||||
| type Rep SDL_PenAxis Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen type Rep SDL_PenAxis = D1 ('MetaData "SDL_PenAxis" "SDL3.Sys.Bindgen.Pen" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_PenAxis" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CUInt))) | |||||
| type CEnumZ SDL_PenAxis Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen | |||||
| type FFIType SDL_PenAxis Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen | |||||
| type CFieldType SDL_PenAxis "unwrap" Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen | |||||
pattern SDL_PEN_AXIS_PRESSURE :: SDL_PenAxis Source #
Pen pressure. Unidirectional: 0 to 1.0
- C declaration
SDL_PEN_AXIS_PRESSURE, defined atSDL3/SDL_pen.h 142:5
pattern SDL_PEN_AXIS_XTILT :: SDL_PenAxis Source #
Pen horizontal tilt angle. Bidirectional: -90.0 to 90.0 (left-to-right).
- C declaration
SDL_PEN_AXIS_XTILT, defined atSDL3/SDL_pen.h 143:5
pattern SDL_PEN_AXIS_YTILT :: SDL_PenAxis Source #
Pen vertical tilt angle. Bidirectional: -90.0 to 90.0 (top-to-down).
- C declaration
SDL_PEN_AXIS_YTILT, defined atSDL3/SDL_pen.h 144:5
pattern SDL_PEN_AXIS_DISTANCE :: SDL_PenAxis Source #
Pen distance to drawing surface. Unidirectional: 0.0 to 1.0
- C declaration
SDL_PEN_AXIS_DISTANCE, defined atSDL3/SDL_pen.h 145:5
pattern SDL_PEN_AXIS_ROTATION :: SDL_PenAxis Source #
Pen barrel rotation. Bidirectional: -180 to 179.9 (clockwise, 0 is facing up, -180.0 is facing down).
- C declaration
SDL_PEN_AXIS_ROTATION, defined atSDL3/SDL_pen.h 146:5
pattern SDL_PEN_AXIS_SLIDER :: SDL_PenAxis Source #
Pen finger wheel or slider (e.g., Airbrush Pen). Unidirectional: 0 to 1.0
- C declaration
SDL_PEN_AXIS_SLIDER, defined atSDL3/SDL_pen.h 147:5
pattern SDL_PEN_AXIS_TANGENTIAL_PRESSURE :: SDL_PenAxis Source #
Pressure from squeezing the pen ("barrel pressure").
- C declaration
SDL_PEN_AXIS_TANGENTIAL_PRESSURE, defined atSDL3/SDL_pen.h 148:5
pattern SDL_PEN_AXIS_COUNT :: SDL_PenAxis Source #
Total known pen axis types in this version of SDL. This number may grow in future releases!
- C declaration
SDL_PEN_AXIS_COUNT, defined atSDL3/SDL_pen.h 149:5
newtype SDL_PenDeviceType Source #
An enum that describes the type of a pen device.
A "direct" device is a pen that touches a graphic display (like an Apple Pencil on an iPad's screen). "Indirect" devices touch an external tablet surface that is connected to the machine but is not a display (like a lower-end Wacom tablet connected over USB).
Apps may use this information to decide if they should draw a cursor; if the pen is touching the screen directly, a cursor doesn't make sense and can be in the way, but becomes necessary for indirect devices to know where on the display they are interacting.
- C declaration
enum SDL_PenDeviceType, defined atSDL3/SDL_pen.h 167:14
Since: 3.4.0
Constructors
| SDL_PenDeviceType | |
Instances
| Storable SDL_PenDeviceType Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen Methods sizeOf :: SDL_PenDeviceType -> Int # alignment :: SDL_PenDeviceType -> Int # peekElemOff :: Ptr SDL_PenDeviceType -> Int -> IO SDL_PenDeviceType # pokeElemOff :: Ptr SDL_PenDeviceType -> Int -> SDL_PenDeviceType -> IO () # peekByteOff :: Ptr b -> Int -> IO SDL_PenDeviceType # pokeByteOff :: Ptr b -> Int -> SDL_PenDeviceType -> IO () # peek :: Ptr SDL_PenDeviceType -> IO SDL_PenDeviceType # poke :: Ptr SDL_PenDeviceType -> SDL_PenDeviceType -> IO () # | |||||
| Generic SDL_PenDeviceType Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen Associated Types
Methods from :: SDL_PenDeviceType -> Rep SDL_PenDeviceType x # to :: Rep SDL_PenDeviceType x -> SDL_PenDeviceType # | |||||
| Read SDL_PenDeviceType Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen Methods readsPrec :: Int -> ReadS SDL_PenDeviceType # readList :: ReadS [SDL_PenDeviceType] # | |||||
| Show SDL_PenDeviceType Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen Methods showsPrec :: Int -> SDL_PenDeviceType -> ShowS # show :: SDL_PenDeviceType -> String # showList :: [SDL_PenDeviceType] -> ShowS # | |||||
| Eq SDL_PenDeviceType Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen Methods (==) :: SDL_PenDeviceType -> SDL_PenDeviceType -> Bool # (/=) :: SDL_PenDeviceType -> SDL_PenDeviceType -> Bool # | |||||
| Ord SDL_PenDeviceType Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen Methods compare :: SDL_PenDeviceType -> SDL_PenDeviceType -> Ordering # (<) :: SDL_PenDeviceType -> SDL_PenDeviceType -> Bool # (<=) :: SDL_PenDeviceType -> SDL_PenDeviceType -> Bool # (>) :: SDL_PenDeviceType -> SDL_PenDeviceType -> Bool # (>=) :: SDL_PenDeviceType -> SDL_PenDeviceType -> Bool # max :: SDL_PenDeviceType -> SDL_PenDeviceType -> SDL_PenDeviceType # min :: SDL_PenDeviceType -> SDL_PenDeviceType -> SDL_PenDeviceType # | |||||
| Prim SDL_PenDeviceType Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen Methods sizeOfType# :: Proxy SDL_PenDeviceType -> Int# # sizeOf# :: SDL_PenDeviceType -> Int# # alignmentOfType# :: Proxy SDL_PenDeviceType -> Int# # alignment# :: SDL_PenDeviceType -> Int# # indexByteArray# :: ByteArray# -> Int# -> SDL_PenDeviceType # readByteArray# :: MutableByteArray# s -> Int# -> State# s -> (# State# s, SDL_PenDeviceType #) # writeByteArray# :: MutableByteArray# s -> Int# -> SDL_PenDeviceType -> State# s -> State# s # setByteArray# :: MutableByteArray# s -> Int# -> Int# -> SDL_PenDeviceType -> State# s -> State# s # indexOffAddr# :: Addr# -> Int# -> SDL_PenDeviceType # readOffAddr# :: Addr# -> Int# -> State# s -> (# State# s, SDL_PenDeviceType #) # writeOffAddr# :: Addr# -> Int# -> SDL_PenDeviceType -> State# s -> State# s # setOffAddr# :: Addr# -> Int# -> Int# -> SDL_PenDeviceType -> State# s -> State# s # | |||||
| CEnum SDL_PenDeviceType Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen Associated Types
Methods toCEnum :: CEnumZ SDL_PenDeviceType -> SDL_PenDeviceType # fromCEnum :: SDL_PenDeviceType -> CEnumZ SDL_PenDeviceType # declaredValues :: proxy SDL_PenDeviceType -> DeclaredValues SDL_PenDeviceType # showsUndeclared :: proxy SDL_PenDeviceType -> Int -> CEnumZ SDL_PenDeviceType -> ShowS # readPrecUndeclared :: ReadPrec SDL_PenDeviceType # isDeclared :: SDL_PenDeviceType -> Bool # mkDeclared :: CEnumZ SDL_PenDeviceType -> Maybe SDL_PenDeviceType # | |||||
| SequentialCEnum SDL_PenDeviceType Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen | |||||
| HasFFIType SDL_PenDeviceType Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen Associated Types
Methods toFFIType :: SDL_PenDeviceType -> FFIType SDL_PenDeviceType # fromFFIType :: FFIType SDL_PenDeviceType -> SDL_PenDeviceType # | |||||
| ReadRaw SDL_PenDeviceType Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen Methods | |||||
| StaticSize SDL_PenDeviceType Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen Methods staticSizeOf :: Proxy SDL_PenDeviceType -> Int # | |||||
| WriteRaw SDL_PenDeviceType Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen Methods writeRaw :: Ptr SDL_PenDeviceType -> SDL_PenDeviceType -> IO () # | |||||
| HasCField SDL_PenDeviceType "unwrap" Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen Associated Types
| |||||
| ty ~ CInt => HasField "unwrap" SDL_PenDeviceType ty Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen Methods hasField :: SDL_PenDeviceType -> (ty -> SDL_PenDeviceType, ty) # | |||||
| ty ~ CInt => HasField "unwrap" (Ptr SDL_PenDeviceType) (Ptr ty :: Type) Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen Methods getField :: Ptr SDL_PenDeviceType -> Ptr ty # | |||||
| type Rep SDL_PenDeviceType Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen type Rep SDL_PenDeviceType = D1 ('MetaData "SDL_PenDeviceType" "SDL3.Sys.Bindgen.Pen" "sdl3-bindgen-sys-0.0.1.0-inplace" 'True) (C1 ('MetaCons "SDL_PenDeviceType" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CInt))) | |||||
| type CEnumZ SDL_PenDeviceType Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen | |||||
| type FFIType SDL_PenDeviceType Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen | |||||
| type CFieldType SDL_PenDeviceType "unwrap" Source # | |||||
Defined in SDL3.Sys.Bindgen.Pen | |||||
pattern SDL_PEN_DEVICE_TYPE_INVALID :: SDL_PenDeviceType Source #
Not a valid pen device.
- C declaration
SDL_PEN_DEVICE_TYPE_INVALID, defined atSDL3/SDL_pen.h 169:5
pattern SDL_PEN_DEVICE_TYPE_UNKNOWN :: SDL_PenDeviceType Source #
Don't know specifics of this pen.
- C declaration
SDL_PEN_DEVICE_TYPE_UNKNOWN, defined atSDL3/SDL_pen.h 170:5
pattern SDL_PEN_DEVICE_TYPE_DIRECT :: SDL_PenDeviceType Source #
Pen touches display.
- C declaration
SDL_PEN_DEVICE_TYPE_DIRECT, defined atSDL3/SDL_pen.h 171:5
pattern SDL_PEN_DEVICE_TYPE_INDIRECT :: SDL_PenDeviceType Source #
Pen touches something that isn't the display.
- C declaration
SDL_PEN_DEVICE_TYPE_INDIRECT, defined atSDL3/SDL_pen.h 172:5