Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
EventController
is a base, low-level implementation for event
controllers. Those react to a series of GdkEvents
, and possibly trigger
actions as a consequence of those.
Synopsis
- newtype EventController = EventController (ManagedPtr EventController)
- class (GObject o, IsDescendantOf EventController o) => IsEventController o
- toEventController :: (MonadIO m, IsEventController o) => o -> m EventController
- eventControllerGetCurrentEvent :: (HasCallStack, MonadIO m, IsEventController a) => a -> m (Maybe Event)
- eventControllerGetCurrentEventDevice :: (HasCallStack, MonadIO m, IsEventController a) => a -> m (Maybe Device)
- eventControllerGetCurrentEventState :: (HasCallStack, MonadIO m, IsEventController a) => a -> m [ModifierType]
- eventControllerGetCurrentEventTime :: (HasCallStack, MonadIO m, IsEventController a) => a -> m Word32
- eventControllerGetName :: (HasCallStack, MonadIO m, IsEventController a) => a -> m Text
- eventControllerGetPropagationLimit :: (HasCallStack, MonadIO m, IsEventController a) => a -> m PropagationLimit
- eventControllerGetPropagationPhase :: (HasCallStack, MonadIO m, IsEventController a) => a -> m PropagationPhase
- eventControllerGetWidget :: (HasCallStack, MonadIO m, IsEventController a) => a -> m Widget
- eventControllerReset :: (HasCallStack, MonadIO m, IsEventController a) => a -> m ()
- eventControllerSetName :: (HasCallStack, MonadIO m, IsEventController a) => a -> Text -> m ()
- eventControllerSetPropagationLimit :: (HasCallStack, MonadIO m, IsEventController a) => a -> PropagationLimit -> m ()
- eventControllerSetPropagationPhase :: (HasCallStack, MonadIO m, IsEventController a) => a -> PropagationPhase -> m ()
- constructEventControllerName :: (IsEventController o, MonadIO m) => Text -> m (GValueConstruct o)
- getEventControllerName :: (MonadIO m, IsEventController o) => o -> m Text
- setEventControllerName :: (MonadIO m, IsEventController o) => o -> Text -> m ()
- constructEventControllerPropagationLimit :: (IsEventController o, MonadIO m) => PropagationLimit -> m (GValueConstruct o)
- getEventControllerPropagationLimit :: (MonadIO m, IsEventController o) => o -> m PropagationLimit
- setEventControllerPropagationLimit :: (MonadIO m, IsEventController o) => o -> PropagationLimit -> m ()
- constructEventControllerPropagationPhase :: (IsEventController o, MonadIO m) => PropagationPhase -> m (GValueConstruct o)
- getEventControllerPropagationPhase :: (MonadIO m, IsEventController o) => o -> m PropagationPhase
- setEventControllerPropagationPhase :: (MonadIO m, IsEventController o) => o -> PropagationPhase -> m ()
- getEventControllerWidget :: (MonadIO m, IsEventController o) => o -> m Widget
Exported types
newtype EventController Source #
Memory-managed wrapper type.
Instances
Eq EventController Source # | |
Defined in GI.Gtk.Objects.EventController (==) :: EventController -> EventController -> Bool # (/=) :: EventController -> EventController -> Bool # | |
IsGValue EventController Source # | Convert |
Defined in GI.Gtk.Objects.EventController toGValue :: EventController -> IO GValue # fromGValue :: GValue -> IO EventController # | |
ManagedPtrNewtype EventController Source # | |
Defined in GI.Gtk.Objects.EventController | |
TypedObject EventController Source # | |
Defined in GI.Gtk.Objects.EventController | |
GObject EventController Source # | |
Defined in GI.Gtk.Objects.EventController | |
HasParentTypes EventController Source # | |
Defined in GI.Gtk.Objects.EventController | |
type ParentTypes EventController Source # | |
Defined in GI.Gtk.Objects.EventController |
class (GObject o, IsDescendantOf EventController o) => IsEventController o Source #
Type class for types which can be safely cast to EventController
, for instance with toEventController
.
Instances
(GObject o, IsDescendantOf EventController o) => IsEventController o Source # | |
Defined in GI.Gtk.Objects.EventController |
toEventController :: (MonadIO m, IsEventController o) => o -> m EventController Source #
Cast to EventController
, for types for which this is known to be safe. For general casts, use castTo
.
Methods
Overloaded methods
getCurrentEvent
eventControllerGetCurrentEvent Source #
:: (HasCallStack, MonadIO m, IsEventController a) | |
=> a |
|
-> m (Maybe Event) | Returns: the event is current handled by |
Returns the event that is currently being handled by the
controller, and Nothing
at other times.
getCurrentEventDevice
eventControllerGetCurrentEventDevice Source #
:: (HasCallStack, MonadIO m, IsEventController a) | |
=> a |
|
-> m (Maybe Device) | Returns: device of the event is current handled by |
Returns the device of the event that is currently being
handled by the controller, and Nothing
otherwise.
getCurrentEventState
eventControllerGetCurrentEventState Source #
:: (HasCallStack, MonadIO m, IsEventController a) | |
=> a |
|
-> m [ModifierType] | Returns: modifier state of the event is current handled by |
Returns the modifier state of the event that is currently being handled by the controller, and 0 otherwise.
getCurrentEventTime
eventControllerGetCurrentEventTime Source #
:: (HasCallStack, MonadIO m, IsEventController a) | |
=> a |
|
-> m Word32 | Returns: timestamp of the event is current handled by |
Returns the timestamp of the event that is currently being handled by the controller, and 0 otherwise.
getName
eventControllerGetName Source #
:: (HasCallStack, MonadIO m, IsEventController a) | |
=> a |
|
-> m Text |
Gets the name of controller
.
getPropagationLimit
eventControllerGetPropagationLimit Source #
:: (HasCallStack, MonadIO m, IsEventController a) | |
=> a |
|
-> m PropagationLimit | Returns: the propagation limit |
Gets the propagation limit of the event controller.
getPropagationPhase
eventControllerGetPropagationPhase Source #
:: (HasCallStack, MonadIO m, IsEventController a) | |
=> a |
|
-> m PropagationPhase | Returns: the propagation phase |
Gets the propagation phase at which controller
handles events.
getWidget
eventControllerGetWidget Source #
:: (HasCallStack, MonadIO m, IsEventController a) | |
=> a |
|
-> m Widget | Returns: a |
Returns the Widget
this controller relates to.
reset
:: (HasCallStack, MonadIO m, IsEventController a) | |
=> a |
|
-> m () |
Resets the controller
to a clean state. Every interaction
the controller did through gtk_event_controller_handle_event()
will be dropped at this point.
setName
eventControllerSetName Source #
:: (HasCallStack, MonadIO m, IsEventController a) | |
=> a |
|
-> Text |
|
-> m () |
Sets a name on the controller that can be used for debugging.
setPropagationLimit
eventControllerSetPropagationLimit Source #
:: (HasCallStack, MonadIO m, IsEventController a) | |
=> a |
|
-> PropagationLimit |
|
-> m () |
Sets the event propagation limit on the event controller.
If the limit is set to %gTKLIMITSAMENATIVE
, the controller
won't handle events that are targeted at widgets on a different
surface, such as popovers.
setPropagationPhase
eventControllerSetPropagationPhase Source #
:: (HasCallStack, MonadIO m, IsEventController a) | |
=> a |
|
-> PropagationPhase |
|
-> m () |
Sets the propagation phase at which a controller handles events.
If phase
is PropagationPhaseNone
, no automatic event handling will be
performed, but other additional gesture maintenance will. In that phase,
the events can be managed by calling gtk_event_controller_handle_event()
.
Properties
name
No description available in the introspection data.
constructEventControllerName :: (IsEventController o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “name
” property. This is rarely needed directly, but it is used by new
.
getEventControllerName :: (MonadIO m, IsEventController o) => o -> m Text Source #
Get the value of the “name
” property.
When overloading is enabled, this is equivalent to
get
eventController #name
setEventControllerName :: (MonadIO m, IsEventController o) => o -> Text -> m () Source #
Set the value of the “name
” property.
When overloading is enabled, this is equivalent to
set
eventController [ #name:=
value ]
propagationLimit
The limit for which events this controller will handle.
constructEventControllerPropagationLimit :: (IsEventController o, MonadIO m) => PropagationLimit -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “propagation-limit
” property. This is rarely needed directly, but it is used by new
.
getEventControllerPropagationLimit :: (MonadIO m, IsEventController o) => o -> m PropagationLimit Source #
Get the value of the “propagation-limit
” property.
When overloading is enabled, this is equivalent to
get
eventController #propagationLimit
setEventControllerPropagationLimit :: (MonadIO m, IsEventController o) => o -> PropagationLimit -> m () Source #
Set the value of the “propagation-limit
” property.
When overloading is enabled, this is equivalent to
set
eventController [ #propagationLimit:=
value ]
propagationPhase
The propagation phase at which this controller will handle events.
constructEventControllerPropagationPhase :: (IsEventController o, MonadIO m) => PropagationPhase -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “propagation-phase
” property. This is rarely needed directly, but it is used by new
.
getEventControllerPropagationPhase :: (MonadIO m, IsEventController o) => o -> m PropagationPhase Source #
Get the value of the “propagation-phase
” property.
When overloading is enabled, this is equivalent to
get
eventController #propagationPhase
setEventControllerPropagationPhase :: (MonadIO m, IsEventController o) => o -> PropagationPhase -> m () Source #
Set the value of the “propagation-phase
” property.
When overloading is enabled, this is equivalent to
set
eventController [ #propagationPhase:=
value ]
widget
The widget receiving the GdkEvents
that the controller will handle.
getEventControllerWidget :: (MonadIO m, IsEventController o) => o -> m Widget Source #
Get the value of the “widget
” property.
When overloading is enabled, this is equivalent to
get
eventController #widget