| Copyright | Will Thompson and Iñaki García Etxebarria |
|---|---|
| License | LGPL-2.1 |
| Maintainer | Iñaki García Etxebarria |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
GI.Clutter.Structs.TouchEvent
Description
Used for touch events.
The type field will be one of EventTypeTouchBegin, EventTypeTouchEnd,
EventTypeTouchUpdate, or EventTypeTouchCancel.
Touch events are grouped into sequences; each touch sequence will begin
with a EventTypeTouchBegin event, progress with EventTypeTouchUpdate
events, and end either with a EventTypeTouchEnd event or with a
EventTypeTouchCancel event.
With multi-touch capable devices there can be multiple event sequence running at the same time.
Since: 1.10
Synopsis
- newtype TouchEvent = TouchEvent (ManagedPtr TouchEvent)
- newZeroTouchEvent :: MonadIO m => m TouchEvent
- getTouchEventAxes :: MonadIO m => TouchEvent -> m Double
- setTouchEventAxes :: MonadIO m => TouchEvent -> Double -> m ()
- clearTouchEventDevice :: MonadIO m => TouchEvent -> m ()
- getTouchEventDevice :: MonadIO m => TouchEvent -> m (Maybe InputDevice)
- setTouchEventDevice :: MonadIO m => TouchEvent -> Ptr InputDevice -> m ()
- getTouchEventFlags :: MonadIO m => TouchEvent -> m [EventFlags]
- setTouchEventFlags :: MonadIO m => TouchEvent -> [EventFlags] -> m ()
- getTouchEventModifierState :: MonadIO m => TouchEvent -> m [ModifierType]
- setTouchEventModifierState :: MonadIO m => TouchEvent -> [ModifierType] -> m ()
- clearTouchEventSequence :: MonadIO m => TouchEvent -> m ()
- getTouchEventSequence :: MonadIO m => TouchEvent -> m (Maybe EventSequence)
- setTouchEventSequence :: MonadIO m => TouchEvent -> Ptr EventSequence -> m ()
- clearTouchEventSource :: MonadIO m => TouchEvent -> m ()
- getTouchEventSource :: MonadIO m => TouchEvent -> m (Maybe Actor)
- setTouchEventSource :: MonadIO m => TouchEvent -> Ptr Actor -> m ()
- clearTouchEventStage :: MonadIO m => TouchEvent -> m ()
- getTouchEventStage :: MonadIO m => TouchEvent -> m (Maybe Stage)
- setTouchEventStage :: MonadIO m => TouchEvent -> Ptr Stage -> m ()
- getTouchEventTime :: MonadIO m => TouchEvent -> m Word32
- setTouchEventTime :: MonadIO m => TouchEvent -> Word32 -> m ()
- getTouchEventType :: MonadIO m => TouchEvent -> m EventType
- setTouchEventType :: MonadIO m => TouchEvent -> EventType -> m ()
- getTouchEventX :: MonadIO m => TouchEvent -> m Float
- setTouchEventX :: MonadIO m => TouchEvent -> Float -> m ()
- getTouchEventY :: MonadIO m => TouchEvent -> m Float
- setTouchEventY :: MonadIO m => TouchEvent -> Float -> m ()
Exported types
newtype TouchEvent Source #
Memory-managed wrapper type.
Constructors
| TouchEvent (ManagedPtr TouchEvent) |
Instances
| Eq TouchEvent Source # | |
Defined in GI.Clutter.Structs.TouchEvent | |
| BoxedPtr TouchEvent Source # | |
Defined in GI.Clutter.Structs.TouchEvent | |
| CallocPtr TouchEvent Source # | |
Defined in GI.Clutter.Structs.TouchEvent Methods boxedPtrCalloc :: IO (Ptr TouchEvent) | |
| ManagedPtrNewtype TouchEvent Source # | |
Defined in GI.Clutter.Structs.TouchEvent Methods toManagedPtr :: TouchEvent -> ManagedPtr TouchEvent | |
| tag ~ 'AttrSet => Constructible TouchEvent tag Source # | |
Defined in GI.Clutter.Structs.TouchEvent Methods new :: MonadIO m => (ManagedPtr TouchEvent -> TouchEvent) -> [AttrOp TouchEvent tag] -> m TouchEvent | |
newZeroTouchEvent :: MonadIO m => m TouchEvent Source #
Construct a TouchEvent struct initialized to zero.
Methods
Properties
axes
reserved
getTouchEventAxes :: MonadIO m => TouchEvent -> m Double Source #
Get the value of the “axes” field.
When overloading is enabled, this is equivalent to
get touchEvent #axes
setTouchEventAxes :: MonadIO m => TouchEvent -> Double -> m () Source #
Set the value of the “axes” field.
When overloading is enabled, this is equivalent to
settouchEvent [ #axes:=value ]
device
the device that originated the event. If you want the physical
device the event originated from, use eventGetSourceDevice
clearTouchEventDevice :: MonadIO m => TouchEvent -> m () Source #
Set the value of the “device” field to Nothing.
When overloading is enabled, this is equivalent to
clear #device
getTouchEventDevice :: MonadIO m => TouchEvent -> m (Maybe InputDevice) Source #
Get the value of the “device” field.
When overloading is enabled, this is equivalent to
get touchEvent #device
setTouchEventDevice :: MonadIO m => TouchEvent -> Ptr InputDevice -> m () Source #
Set the value of the “device” field.
When overloading is enabled, this is equivalent to
settouchEvent [ #device:=value ]
flags
event flags
getTouchEventFlags :: MonadIO m => TouchEvent -> m [EventFlags] Source #
Get the value of the “flags” field.
When overloading is enabled, this is equivalent to
get touchEvent #flags
setTouchEventFlags :: MonadIO m => TouchEvent -> [EventFlags] -> m () Source #
Set the value of the “flags” field.
When overloading is enabled, this is equivalent to
settouchEvent [ #flags:=value ]
modifierState
a bit-mask representing the state
of modifier keys (e.g. Control, Shift, and Alt) and the pointer
buttons. See ModifierType
getTouchEventModifierState :: MonadIO m => TouchEvent -> m [ModifierType] Source #
Get the value of the “modifier_state” field.
When overloading is enabled, this is equivalent to
get touchEvent #modifierState
setTouchEventModifierState :: MonadIO m => TouchEvent -> [ModifierType] -> m () Source #
Set the value of the “modifier_state” field.
When overloading is enabled, this is equivalent to
settouchEvent [ #modifierState:=value ]
sequence
the event sequence that this event belongs to
clearTouchEventSequence :: MonadIO m => TouchEvent -> m () Source #
Set the value of the “sequence” field to Nothing.
When overloading is enabled, this is equivalent to
clear #sequence
getTouchEventSequence :: MonadIO m => TouchEvent -> m (Maybe EventSequence) Source #
Get the value of the “sequence” field.
When overloading is enabled, this is equivalent to
get touchEvent #sequence
setTouchEventSequence :: MonadIO m => TouchEvent -> Ptr EventSequence -> m () Source #
Set the value of the “sequence” field.
When overloading is enabled, this is equivalent to
settouchEvent [ #sequence:=value ]
source
event source actor (unused)
clearTouchEventSource :: MonadIO m => TouchEvent -> m () Source #
Set the value of the “source” field to Nothing.
When overloading is enabled, this is equivalent to
clear #source
getTouchEventSource :: MonadIO m => TouchEvent -> m (Maybe Actor) Source #
Get the value of the “source” field.
When overloading is enabled, this is equivalent to
get touchEvent #source
setTouchEventSource :: MonadIO m => TouchEvent -> Ptr Actor -> m () Source #
Set the value of the “source” field.
When overloading is enabled, this is equivalent to
settouchEvent [ #source:=value ]
stage
event source stage
clearTouchEventStage :: MonadIO m => TouchEvent -> m () Source #
Set the value of the “stage” field to Nothing.
When overloading is enabled, this is equivalent to
clear #stage
getTouchEventStage :: MonadIO m => TouchEvent -> m (Maybe Stage) Source #
Get the value of the “stage” field.
When overloading is enabled, this is equivalent to
get touchEvent #stage
setTouchEventStage :: MonadIO m => TouchEvent -> Ptr Stage -> m () Source #
Set the value of the “stage” field.
When overloading is enabled, this is equivalent to
settouchEvent [ #stage:=value ]
time
event time
getTouchEventTime :: MonadIO m => TouchEvent -> m Word32 Source #
Get the value of the “time” field.
When overloading is enabled, this is equivalent to
get touchEvent #time
setTouchEventTime :: MonadIO m => TouchEvent -> Word32 -> m () Source #
Set the value of the “time” field.
When overloading is enabled, this is equivalent to
settouchEvent [ #time:=value ]
type
event type
getTouchEventType :: MonadIO m => TouchEvent -> m EventType Source #
Get the value of the “type” field.
When overloading is enabled, this is equivalent to
get touchEvent #type
setTouchEventType :: MonadIO m => TouchEvent -> EventType -> m () Source #
Set the value of the “type” field.
When overloading is enabled, this is equivalent to
settouchEvent [ #type:=value ]
x
the X coordinate of the pointer, relative to the stage
getTouchEventX :: MonadIO m => TouchEvent -> m Float Source #
Get the value of the “x” field.
When overloading is enabled, this is equivalent to
get touchEvent #x
setTouchEventX :: MonadIO m => TouchEvent -> Float -> m () Source #
Set the value of the “x” field.
When overloading is enabled, this is equivalent to
settouchEvent [ #x:=value ]
y
the Y coordinate of the pointer, relative to the stage
getTouchEventY :: MonadIO m => TouchEvent -> m Float Source #
Get the value of the “y” field.
When overloading is enabled, this is equivalent to
get touchEvent #y
setTouchEventY :: MonadIO m => TouchEvent -> Float -> m () Source #
Set the value of the “y” field.
When overloading is enabled, this is equivalent to
settouchEvent [ #y:=value ]