gi-gtk4-4.0.12: Gtk 4.x 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.EventControllerLegacy

Contents

- Exported types
- Methods
  - new
- Signals
  - event

Description

Provides raw access to the event stream.

It should only be used as a last resort if none of the other event controllers or gestures do the job.

Synopsis

- newtype EventControllerLegacy = EventControllerLegacy (ManagedPtr EventControllerLegacy)
- class (GObject o, IsDescendantOf EventControllerLegacy o) => IsEventControllerLegacy o
- toEventControllerLegacy :: (MonadIO m, IsEventControllerLegacy o) => o -> m EventControllerLegacy
- eventControllerLegacyNew :: (HasCallStack, MonadIO m) => m EventControllerLegacy
- type EventControllerLegacyEventCallback = Event -> IO Bool
- afterEventControllerLegacyEvent :: (IsEventControllerLegacy a, MonadIO m) => a -> ((?self :: a) => EventControllerLegacyEventCallback) -> m SignalHandlerId
- onEventControllerLegacyEvent :: (IsEventControllerLegacy a, MonadIO m) => a -> ((?self :: a) => EventControllerLegacyEventCallback) -> m SignalHandlerId

# Exported types

newtype EventControllerLegacy Source #

Memory-managed wrapper type.

Constructors

EventControllerLegacy (ManagedPtr EventControllerLegacy) |

#### Instances

Instances details

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

class (GObject o, IsDescendantOf EventControllerLegacy o) => IsEventControllerLegacy o Source #

Type class for types which can be safely cast to `EventControllerLegacy`, for instance with `toEventControllerLegacy`.

#### Instances

Instances details

(GObject o, IsDescendantOf EventControllerLegacy o) => IsEventControllerLegacy o Source # |
Instance details Defined in GI.Gtk.Objects.EventControllerLegacy

toEventControllerLegacy :: (MonadIO m, IsEventControllerLegacy o) => o -> m EventControllerLegacy Source #

Cast to `EventControllerLegacy`, 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, isFloating, notify, notifyByPspec, ref, refSink, reset, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.

#### Getters

getCurrentEvent, getCurrentEventDevice, getCurrentEventState, getCurrentEventTime, getData, getName, getPropagationLimit, getPropagationPhase, getProperty, getQdata, getWidget.

#### Setters

setData, setDataFull, setName, setPropagationLimit, setPropagationPhase, setProperty, setStaticName.

## new

eventControllerLegacyNew Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m EventControllerLegacy | Returns: the newly created event controller.

Creates a new legacy event controller.

# Signals

## event

type EventControllerLegacyEventCallback Source #

Arguments

= Event | `event`: the `GdkEvent` which triggered this signal
-> IO Bool | Returns: `True` to stop other handlers from being invoked for the event and the emission of this signal. `False` to propagate the event further.

Emitted for each GDK event delivered to `controller`.

afterEventControllerLegacyEvent :: (IsEventControllerLegacy a, MonadIO m) => a -> ((?self :: a) => EventControllerLegacyEventCallback) -> m SignalHandlerId Source #

Connect a signal handler for the event signal, to be run after the default handler. When overloading is enabled, this is equivalent to

    after eventControllerLegacy #event callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit `?self` parameter. Note that this requires activating the `ImplicitParams` GHC extension.

onEventControllerLegacyEvent :: (IsEventControllerLegacy a, MonadIO m) => a -> ((?self :: a) => EventControllerLegacyEventCallback) -> m SignalHandlerId Source #

Connect a signal handler for the event signal, to be run before the default handler. When overloading is enabled, this is equivalent to

    on eventControllerLegacy #event callback