Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
Used for touch events.
type
field will be one of EventTypeTouchBegin
, EventTypeTouchUpdate
,
EventTypeTouchEnd
or EventTypeTouchCancel
.
Touch events are grouped into sequences by means of the sequence
field, which can also be obtained with eventGetEventSequence
.
Each sequence begins with a EventTypeTouchBegin
event, followed by
any number of EventTypeTouchUpdate
events, and ends with a EventTypeTouchEnd
(or EventTypeTouchCancel
) event. With multitouch devices, there may be
several active sequences at the same time.
Synopsis
- newtype EventTouch = EventTouch (ManagedPtr EventTouch)
- newZeroEventTouch :: MonadIO m => m EventTouch
- noEventTouch :: Maybe EventTouch
- getEventTouchAxes :: MonadIO m => EventTouch -> m Double
- setEventTouchAxes :: MonadIO m => EventTouch -> Double -> m ()
- clearEventTouchDevice :: MonadIO m => EventTouch -> m ()
- getEventTouchDevice :: MonadIO m => EventTouch -> m (Maybe Device)
- setEventTouchDevice :: MonadIO m => EventTouch -> Ptr Device -> m ()
- getEventTouchEmulatingPointer :: MonadIO m => EventTouch -> m Bool
- setEventTouchEmulatingPointer :: MonadIO m => EventTouch -> Bool -> m ()
- getEventTouchSendEvent :: MonadIO m => EventTouch -> m Int8
- setEventTouchSendEvent :: MonadIO m => EventTouch -> Int8 -> m ()
- clearEventTouchSequence :: MonadIO m => EventTouch -> m ()
- getEventTouchSequence :: MonadIO m => EventTouch -> m (Maybe EventSequence)
- setEventTouchSequence :: MonadIO m => EventTouch -> Ptr EventSequence -> m ()
- getEventTouchState :: MonadIO m => EventTouch -> m [ModifierType]
- setEventTouchState :: MonadIO m => EventTouch -> [ModifierType] -> m ()
- getEventTouchTime :: MonadIO m => EventTouch -> m Word32
- setEventTouchTime :: MonadIO m => EventTouch -> Word32 -> m ()
- getEventTouchType :: MonadIO m => EventTouch -> m EventType
- setEventTouchType :: MonadIO m => EventTouch -> EventType -> m ()
- clearEventTouchWindow :: MonadIO m => EventTouch -> m ()
- getEventTouchWindow :: MonadIO m => EventTouch -> m (Maybe Window)
- setEventTouchWindow :: MonadIO m => EventTouch -> Ptr Window -> m ()
- getEventTouchX :: MonadIO m => EventTouch -> m Double
- setEventTouchX :: MonadIO m => EventTouch -> Double -> m ()
- getEventTouchXRoot :: MonadIO m => EventTouch -> m Double
- setEventTouchXRoot :: MonadIO m => EventTouch -> Double -> m ()
- getEventTouchY :: MonadIO m => EventTouch -> m Double
- setEventTouchY :: MonadIO m => EventTouch -> Double -> m ()
- getEventTouchYRoot :: MonadIO m => EventTouch -> m Double
- setEventTouchYRoot :: MonadIO m => EventTouch -> Double -> m ()
Exported types
newtype EventTouch Source #
Memory-managed wrapper type.
Instances
WrappedPtr EventTouch Source # | |
Defined in GI.Gdk.Structs.EventTouch wrappedPtrCalloc :: IO (Ptr EventTouch) # wrappedPtrCopy :: EventTouch -> IO EventTouch # wrappedPtrFree :: Maybe (FunPtr (Ptr EventTouch -> IO ())) # | |
tag ~ AttrSet => Constructible EventTouch tag Source # | |
Defined in GI.Gdk.Structs.EventTouch new :: MonadIO m => (ManagedPtr EventTouch -> EventTouch) -> [AttrOp EventTouch tag] -> m EventTouch # |
newZeroEventTouch :: MonadIO m => m EventTouch Source #
Construct a EventTouch
struct initialized to zero.
noEventTouch :: Maybe EventTouch Source #
A convenience alias for Nothing
:: Maybe
EventTouch
.
Properties
axes
x
, y
translated to the axes of device
, or Nothing
if device
is
the mouse
getEventTouchAxes :: MonadIO m => EventTouch -> m Double Source #
Get the value of the “axes
” field.
When overloading is enabled, this is equivalent to
get
eventTouch #axes
setEventTouchAxes :: MonadIO m => EventTouch -> Double -> m () Source #
Set the value of the “axes
” field.
When overloading is enabled, this is equivalent to
set
eventTouch [ #axes:=
value ]
device
the master device that the event originated from. Use
eventGetSourceDevice
to get the slave device.
clearEventTouchDevice :: MonadIO m => EventTouch -> m () Source #
Set the value of the “device
” field to Nothing
.
When overloading is enabled, this is equivalent to
clear
#device
getEventTouchDevice :: MonadIO m => EventTouch -> m (Maybe Device) Source #
Get the value of the “device
” field.
When overloading is enabled, this is equivalent to
get
eventTouch #device
setEventTouchDevice :: MonadIO m => EventTouch -> Ptr Device -> m () Source #
Set the value of the “device
” field.
When overloading is enabled, this is equivalent to
set
eventTouch [ #device:=
value ]
emulatingPointer
whether the event should be used for emulating pointer event
getEventTouchEmulatingPointer :: MonadIO m => EventTouch -> m Bool Source #
Get the value of the “emulating_pointer
” field.
When overloading is enabled, this is equivalent to
get
eventTouch #emulatingPointer
setEventTouchEmulatingPointer :: MonadIO m => EventTouch -> Bool -> m () Source #
Set the value of the “emulating_pointer
” field.
When overloading is enabled, this is equivalent to
set
eventTouch [ #emulatingPointer:=
value ]
sendEvent
True
if the event was sent explicitly.
getEventTouchSendEvent :: MonadIO m => EventTouch -> m Int8 Source #
Get the value of the “send_event
” field.
When overloading is enabled, this is equivalent to
get
eventTouch #sendEvent
setEventTouchSendEvent :: MonadIO m => EventTouch -> Int8 -> m () Source #
Set the value of the “send_event
” field.
When overloading is enabled, this is equivalent to
set
eventTouch [ #sendEvent:=
value ]
sequence
the event sequence that the event belongs to
clearEventTouchSequence :: MonadIO m => EventTouch -> m () Source #
Set the value of the “sequence
” field to Nothing
.
When overloading is enabled, this is equivalent to
clear
#sequence
getEventTouchSequence :: MonadIO m => EventTouch -> m (Maybe EventSequence) Source #
Get the value of the “sequence
” field.
When overloading is enabled, this is equivalent to
get
eventTouch #sequence
setEventTouchSequence :: MonadIO m => EventTouch -> Ptr EventSequence -> m () Source #
Set the value of the “sequence
” field.
When overloading is enabled, this is equivalent to
set
eventTouch [ #sequence:=
value ]
state
a bit-mask representing the state of
the modifier keys (e.g. Control, Shift and Alt) and the pointer
buttons. See ModifierType
getEventTouchState :: MonadIO m => EventTouch -> m [ModifierType] Source #
Get the value of the “state
” field.
When overloading is enabled, this is equivalent to
get
eventTouch #state
setEventTouchState :: MonadIO m => EventTouch -> [ModifierType] -> m () Source #
Set the value of the “state
” field.
When overloading is enabled, this is equivalent to
set
eventTouch [ #state:=
value ]
time
the time of the event in milliseconds.
getEventTouchTime :: MonadIO m => EventTouch -> m Word32 Source #
Get the value of the “time
” field.
When overloading is enabled, this is equivalent to
get
eventTouch #time
setEventTouchTime :: MonadIO m => EventTouch -> Word32 -> m () Source #
Set the value of the “time
” field.
When overloading is enabled, this is equivalent to
set
eventTouch [ #time:=
value ]
type
the type of the event (EventTypeTouchBegin
, EventTypeTouchUpdate
,
EventTypeTouchEnd
, EventTypeTouchCancel
)
getEventTouchType :: MonadIO m => EventTouch -> m EventType Source #
Get the value of the “type
” field.
When overloading is enabled, this is equivalent to
get
eventTouch #type
setEventTouchType :: MonadIO m => EventTouch -> EventType -> m () Source #
Set the value of the “type
” field.
When overloading is enabled, this is equivalent to
set
eventTouch [ #type:=
value ]
window
the window which received the event
clearEventTouchWindow :: MonadIO m => EventTouch -> m () Source #
Set the value of the “window
” field to Nothing
.
When overloading is enabled, this is equivalent to
clear
#window
getEventTouchWindow :: MonadIO m => EventTouch -> m (Maybe Window) Source #
Get the value of the “window
” field.
When overloading is enabled, this is equivalent to
get
eventTouch #window
setEventTouchWindow :: MonadIO m => EventTouch -> Ptr Window -> m () Source #
Set the value of the “window
” field.
When overloading is enabled, this is equivalent to
set
eventTouch [ #window:=
value ]
x
the x coordinate of the pointer relative to the window
getEventTouchX :: MonadIO m => EventTouch -> m Double Source #
Get the value of the “x
” field.
When overloading is enabled, this is equivalent to
get
eventTouch #x
setEventTouchX :: MonadIO m => EventTouch -> Double -> m () Source #
Set the value of the “x
” field.
When overloading is enabled, this is equivalent to
set
eventTouch [ #x:=
value ]
xRoot
the x coordinate of the pointer relative to the root of the screen
getEventTouchXRoot :: MonadIO m => EventTouch -> m Double Source #
Get the value of the “x_root
” field.
When overloading is enabled, this is equivalent to
get
eventTouch #xRoot
setEventTouchXRoot :: MonadIO m => EventTouch -> Double -> m () Source #
Set the value of the “x_root
” field.
When overloading is enabled, this is equivalent to
set
eventTouch [ #xRoot:=
value ]
y
the y coordinate of the pointer relative to the window
getEventTouchY :: MonadIO m => EventTouch -> m Double Source #
Get the value of the “y
” field.
When overloading is enabled, this is equivalent to
get
eventTouch #y
setEventTouchY :: MonadIO m => EventTouch -> Double -> m () Source #
Set the value of the “y
” field.
When overloading is enabled, this is equivalent to
set
eventTouch [ #y:=
value ]
yRoot
the y coordinate of the pointer relative to the root of the screen
getEventTouchYRoot :: MonadIO m => EventTouch -> m Double Source #
Get the value of the “y_root
” field.
When overloading is enabled, this is equivalent to
get
eventTouch #yRoot
setEventTouchYRoot :: MonadIO m => EventTouch -> Double -> m () Source #
Set the value of the “y_root
” field.
When overloading is enabled, this is equivalent to
set
eventTouch [ #yRoot:=
value ]