gi-gtk-3.0.43: Gtk bindings

Copyright | Will Thompson and Iñaki García Etxebarria
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.Gtk.Objects.EventController

Contents

- Exported types
- Methods
  - getPropagationPhase
  - getWidget
  - handleEvent
  - reset
  - setPropagationPhase
- Properties
  - propagationPhase
  - widget

Description

`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
- eventControllerGetPropagationPhase :: (HasCallStack, MonadIO m, IsEventController a) => a -> m PropagationPhase
- eventControllerGetWidget :: (HasCallStack, MonadIO m, IsEventController a) => a -> m Widget
- eventControllerHandleEvent :: (HasCallStack, MonadIO m, IsEventController a) => a -> Event -> m Bool
- eventControllerReset :: (HasCallStack, MonadIO m, IsEventController a) => a -> m ()
- eventControllerSetPropagationPhase :: (HasCallStack, MonadIO m, IsEventController a) => a -> PropagationPhase -> 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 ()
- constructEventControllerWidget :: (IsEventController o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o)
- getEventControllerWidget :: (MonadIO m, IsEventController o) => o -> m Widget

# Exported types

newtype EventController Source #

Memory-managed wrapper type.

Constructors

EventController (ManagedPtr EventController) |

#### Instances

Instances details

Eq EventController Source # |
Instance details Defined in GI.Gtk.Objects.EventController Methods (==) :: EventController -> EventController -> Bool Source # (/=) :: EventController -> EventController -> Bool Source #
GObject EventController Source # |
Instance details Defined in GI.Gtk.Objects.EventController
ManagedPtrNewtype EventController Source # |
Instance details Defined in GI.Gtk.Objects.EventController Methods toManagedPtr :: EventController -> ManagedPtr EventController Source #
TypedObject EventController Source # |
Instance details Defined in GI.Gtk.Objects.EventController Methods glibType :: IO GType Source #
HasParentTypes EventController Source # |
Instance details Defined in GI.Gtk.Objects.EventController
IsGValue (Maybe EventController) Source # | Convert `EventController` to and from `GValue`. See `toGValue` and `fromGValue`.
Instance details Defined in GI.Gtk.Objects.EventController Methods gvalueGType_ :: IO GType Source # gvalueSet_ :: Ptr GValue -> Maybe EventController -> IO () Source # gvalueGet_ :: Ptr GValue -> IO (Maybe EventController) Source #
type ParentTypes EventController Source # |
Instance details Defined in GI.Gtk.Objects.EventController type ParentTypes EventController = '[Object]

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

Instances details

(GObject o, IsDescendantOf EventController o) => IsEventController o Source # |
Instance details 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

### Click to display all available methods, including inherited ones

Expand

#### Methods

bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, handleEvent, isFloating, notify, notifyByPspec, ref, refSink, reset, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.

#### Getters

getData, getPropagationPhase, getProperty, getQdata, getWidget.

#### Setters

setData, setDataFull, setPropagationPhase, setProperty.

## getPropagationPhase

eventControllerGetPropagationPhase Source #

Arguments

:: (HasCallStack, MonadIO m, IsEventController a) |
=> a | `controller`: a `EventController`
-> m PropagationPhase | Returns: the propagation phase

Gets the propagation phase at which `controller` handles events.

Since: 3.14

## getWidget

eventControllerGetWidget Source #

Arguments

:: (HasCallStack, MonadIO m, IsEventController a) |
=> a | `controller`: a `EventController`
-> m Widget | Returns: a `Widget`

Returns the `Widget` this controller relates to.

Since: 3.14

## handleEvent

eventControllerHandleEvent Source #

Arguments

:: (HasCallStack, MonadIO m, IsEventController a) |
=> a | `controller`: a `EventController`
-> Event | `event`: a `Event`
-> m Bool | Returns: `True` if the event was potentially useful to trigger the controller action

Feeds an events into `controller`, so it can be interpreted and the controller actions triggered.

Since: 3.14

## reset

eventControllerReset Source #

Arguments

:: (HasCallStack, MonadIO m, IsEventController a) |
=> a | `controller`: a `EventController`
-> m () |

Resets the `controller` to a clean state. Every interaction the controller did through `EventController`::`handle-event` will be dropped at this point.

Since: 3.14

## setPropagationPhase

eventControllerSetPropagationPhase Source #

Arguments

:: (HasCallStack, MonadIO m, IsEventController a) |
=> a | `controller`: a `EventController`
-> PropagationPhase | `phase`: a propagation phase
-> 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 `eventControllerHandleEvent`.

Since: 3.14

# Properties

## propagationPhase

The propagation phase at which this controller will handle events.

Since: 3.14

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.

Since: 3.14

constructEventControllerWidget :: (IsEventController o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`widget`” property. This is rarely needed directly, but it is used by `new`.

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