sdl3-bindgen-sys
Safe HaskellNone
LanguageGHC2021

SDL3.Sys.Bindgen.Touch

Description

SDL offers touch input, on platforms that support it. It can manage multiple touch devices and track multiple fingers on those devices.

Touches are mostly dealt with through the event system, in the SDL_EVENT_FINGER_DOWN, SDL_EVENT_FINGER_MOTION, and SDL_EVENT_FINGER_UP events, but there are also functions to query for hardware details, etc.

The touch system, by default, will also send virtual mouse events; this can be useful for making a some desktop apps work on a phone without significant changes. For apps that care about mouse and touch input separately, they should ignore mouse events that have a which field of SDL_TOUCH_MOUSEID. A unique ID for a touch device.

This ID is valid for the time the device is connected to the system, and is never reused for the lifetime of the application.

The value 0 is an invalid ID.

Since: 3.2.0

Synopsis

Documentation

newtype SDL_TouchID Source #

C declaration
SDL_TouchID, defined at SDL3/SDL_touch.h 62:16

Constructors

SDL_TouchID 

Fields

Instances

Instances details
Bits SDL_TouchID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

FiniteBits SDL_TouchID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Bounded SDL_TouchID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Enum SDL_TouchID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Storable SDL_TouchID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Generic SDL_TouchID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Associated Types

type Rep SDL_TouchID 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

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

Defined in SDL3.Sys.Bindgen.Touch

Num SDL_TouchID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Read SDL_TouchID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Integral SDL_TouchID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Real SDL_TouchID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Show SDL_TouchID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Eq SDL_TouchID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Ord SDL_TouchID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Prim SDL_TouchID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

HasFFIType SDL_TouchID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Associated Types

type FFIType SDL_TouchID 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

ReadRaw SDL_TouchID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

StaticSize SDL_TouchID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

WriteRaw SDL_TouchID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Methods

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

Bitfield SDL_TouchID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

HasCField SDL_TouchID "unwrap" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Associated Types

type CFieldType SDL_TouchID "unwrap" 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

type CFieldType SDL_TouchID "unwrap" = Uint64

Methods

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

ty ~ Uint64 => HasField "unwrap" SDL_TouchID ty Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Methods

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

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

Defined in SDL3.Sys.Bindgen.Touch

Methods

getField :: Ptr SDL_TouchID -> Ptr ty #

type Rep SDL_TouchID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

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

Defined in SDL3.Sys.Bindgen.Touch

type CFieldType SDL_TouchID "unwrap" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

type CFieldType SDL_TouchID "unwrap" = Uint64

newtype SDL_FingerID Source #

A unique ID for a single finger on a touch device.

This ID is valid for the time the finger (stylus, etc) is touching and will be unique for all fingers currently in contact, so this ID tracks the lifetime of a single continuous touch. This value may represent an index, a pointer, or some other unique ID, depending on the platform.

The value 0 is an invalid ID.

C declaration
SDL_FingerID, defined at SDL3/SDL_touch.h 76:16

Since: 3.2.0

Constructors

SDL_FingerID 

Fields

Instances

Instances details
Bits SDL_FingerID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

FiniteBits SDL_FingerID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Bounded SDL_FingerID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Enum SDL_FingerID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Storable SDL_FingerID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Generic SDL_FingerID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Associated Types

type Rep SDL_FingerID 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

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

Defined in SDL3.Sys.Bindgen.Touch

Num SDL_FingerID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Read SDL_FingerID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Integral SDL_FingerID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Real SDL_FingerID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Show SDL_FingerID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Eq SDL_FingerID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Ord SDL_FingerID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Prim SDL_FingerID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

HasFFIType SDL_FingerID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Associated Types

type FFIType SDL_FingerID 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

ReadRaw SDL_FingerID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

StaticSize SDL_FingerID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

WriteRaw SDL_FingerID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Bitfield SDL_FingerID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

HasCField SDL_FingerID "unwrap" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Associated Types

type CFieldType SDL_FingerID "unwrap" 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Methods

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

ty ~ Uint64 => HasField "unwrap" SDL_FingerID ty Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Methods

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

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

Defined in SDL3.Sys.Bindgen.Touch

Methods

getField :: Ptr SDL_FingerID -> Ptr ty #

type Rep SDL_FingerID Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

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

Defined in SDL3.Sys.Bindgen.Touch

type CFieldType SDL_FingerID "unwrap" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

newtype SDL_TouchDeviceType Source #

An enum that describes the type of a touch device.

C declaration
enum SDL_TouchDeviceType, defined at SDL3/SDL_touch.h 83:14

Since: 3.2.0

Constructors

SDL_TouchDeviceType 

Fields

Instances

Instances details
Storable SDL_TouchDeviceType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Generic SDL_TouchDeviceType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Associated Types

type Rep SDL_TouchDeviceType 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

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

Defined in SDL3.Sys.Bindgen.Touch

Show SDL_TouchDeviceType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Eq SDL_TouchDeviceType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Ord SDL_TouchDeviceType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Prim SDL_TouchDeviceType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

CEnum SDL_TouchDeviceType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Associated Types

type CEnumZ SDL_TouchDeviceType 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

SequentialCEnum SDL_TouchDeviceType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

HasFFIType SDL_TouchDeviceType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Associated Types

type FFIType SDL_TouchDeviceType 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

ReadRaw SDL_TouchDeviceType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

StaticSize SDL_TouchDeviceType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

WriteRaw SDL_TouchDeviceType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

HasCField SDL_TouchDeviceType "unwrap" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Associated Types

type CFieldType SDL_TouchDeviceType "unwrap" 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Methods

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

ty ~ CInt => HasField "unwrap" SDL_TouchDeviceType ty Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

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

Defined in SDL3.Sys.Bindgen.Touch

type Rep SDL_TouchDeviceType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

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

Defined in SDL3.Sys.Bindgen.Touch

type FFIType SDL_TouchDeviceType Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

type CFieldType SDL_TouchDeviceType "unwrap" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

pattern SDL_TOUCH_DEVICE_INVALID :: SDL_TouchDeviceType Source #

C declaration
SDL_TOUCH_DEVICE_INVALID, defined at SDL3/SDL_touch.h 85:5

pattern SDL_TOUCH_DEVICE_DIRECT :: SDL_TouchDeviceType Source #

touch screen with window-relative coordinates

C declaration
SDL_TOUCH_DEVICE_DIRECT, defined at SDL3/SDL_touch.h 86:5

pattern SDL_TOUCH_DEVICE_INDIRECT_ABSOLUTE :: SDL_TouchDeviceType Source #

trackpad with absolute device coordinates

C declaration
SDL_TOUCH_DEVICE_INDIRECT_ABSOLUTE, defined at SDL3/SDL_touch.h 87:5

pattern SDL_TOUCH_DEVICE_INDIRECT_RELATIVE :: SDL_TouchDeviceType Source #

trackpad with screen cursor-relative coordinates

C declaration
SDL_TOUCH_DEVICE_INDIRECT_RELATIVE, defined at SDL3/SDL_touch.h 88:5

data SDL_Finger Source #

Data about a single finger in a multitouch event.

Each touch event is a collection of fingers that are simultaneously in contact with the touch device (so a "touch" can be a "multitouch," in reality), and this struct reports details of the specific fingers.

See also
sDL_GetTouchFingers
C declaration
struct SDL_Finger, defined at SDL3/SDL_touch.h 102:16

Since: 3.2.0

Constructors

SDL_Finger 

Fields

  • id :: SDL_FingerID

    the finger ID

    C declaration
    id, defined at SDL3/SDL_touch.h 104:18
  • x :: CFloat

    the x-axis location of the touch event, normalized (0...1)

    C declaration
    x, defined at SDL3/SDL_touch.h 105:11
  • y :: CFloat

    the y-axis location of the touch event, normalized (0...1)

    C declaration
    y, defined at SDL3/SDL_touch.h 106:11
  • pressure :: CFloat

    the quantity of pressure applied, normalized (0...1)

    C declaration
    pressure, defined at SDL3/SDL_touch.h 107:11

Instances

Instances details
Storable SDL_Finger Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Generic SDL_Finger Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Associated Types

type Rep SDL_Finger 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Show SDL_Finger Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Eq SDL_Finger Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

ReadRaw SDL_Finger Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

StaticSize SDL_Finger Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

WriteRaw SDL_Finger Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Methods

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

IsStruct SDL_Finger Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Methods

zero :: SDL_Finger #

HasCField SDL_Finger "id" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Associated Types

type CFieldType SDL_Finger "id" 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Methods

offset# :: Proxy# SDL_Finger -> Proxy# "id" -> Int #

HasCField SDL_Finger "pressure" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Associated Types

type CFieldType SDL_Finger "pressure" 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

type CFieldType SDL_Finger "pressure" = CFloat

Methods

offset# :: Proxy# SDL_Finger -> Proxy# "pressure" -> Int #

HasCField SDL_Finger "x" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Associated Types

type CFieldType SDL_Finger "x" 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Methods

offset# :: Proxy# SDL_Finger -> Proxy# "x" -> Int #

HasCField SDL_Finger "y" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Associated Types

type CFieldType SDL_Finger "y" 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Methods

offset# :: Proxy# SDL_Finger -> Proxy# "y" -> Int #

ty ~ SDL_FingerID => HasField "id" SDL_Finger ty Source #

the finger ID

C declaration
id, defined at SDL3/SDL_touch.h 104:18
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Methods

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

ty ~ CFloat => HasField "pressure" SDL_Finger ty Source #

the quantity of pressure applied, normalized (0...1)

C declaration
pressure, defined at SDL3/SDL_touch.h 107:11
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Methods

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

ty ~ CFloat => HasField "x" SDL_Finger ty Source #

the x-axis location of the touch event, normalized (0...1)

C declaration
x, defined at SDL3/SDL_touch.h 105:11
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Methods

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

ty ~ CFloat => HasField "y" SDL_Finger ty Source #

the y-axis location of the touch event, normalized (0...1)

C declaration
y, defined at SDL3/SDL_touch.h 106:11
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Methods

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

ty ~ SDL_FingerID => HasField "id" (Ptr SDL_Finger) (Ptr ty :: Type) Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Methods

getField :: Ptr SDL_Finger -> Ptr ty #

ty ~ CFloat => HasField "pressure" (Ptr SDL_Finger) (Ptr ty :: Type) Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Methods

getField :: Ptr SDL_Finger -> Ptr ty #

ty ~ CFloat => HasField "x" (Ptr SDL_Finger) (Ptr ty :: Type) Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Methods

getField :: Ptr SDL_Finger -> Ptr ty #

ty ~ CFloat => HasField "y" (Ptr SDL_Finger) (Ptr ty :: Type) Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

Methods

getField :: Ptr SDL_Finger -> Ptr ty #

type Rep SDL_Finger Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

type CFieldType SDL_Finger "id" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

type CFieldType SDL_Finger "pressure" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

type CFieldType SDL_Finger "pressure" = CFloat
type CFieldType SDL_Finger "x" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch

type CFieldType SDL_Finger "y" Source # 
Instance details

Defined in SDL3.Sys.Bindgen.Touch