gi-gtk-4.0.4: Gtk bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Gtk.Objects.EventControllerFocus

Description

EventControllerFocus is an event controller meant for situations where you need to know where the focus is.

Synopsis

Exported types

newtype EventControllerFocus Source #

Memory-managed wrapper type.

Constructors

EventControllerFocus (ManagedPtr EventControllerFocus) 

Instances

Instances details
Eq EventControllerFocus Source # 
Instance details

Defined in GI.Gtk.Objects.EventControllerFocus

GObject EventControllerFocus Source # 
Instance details

Defined in GI.Gtk.Objects.EventControllerFocus

ManagedPtrNewtype EventControllerFocus Source # 
Instance details

Defined in GI.Gtk.Objects.EventControllerFocus

TypedObject EventControllerFocus Source # 
Instance details

Defined in GI.Gtk.Objects.EventControllerFocus

Methods

glibType :: IO GType

HasParentTypes EventControllerFocus Source # 
Instance details

Defined in GI.Gtk.Objects.EventControllerFocus

IsGValue (Maybe EventControllerFocus) Source #

Convert EventControllerFocus to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Gtk.Objects.EventControllerFocus

type ParentTypes EventControllerFocus Source # 
Instance details

Defined in GI.Gtk.Objects.EventControllerFocus

class (GObject o, IsDescendantOf EventControllerFocus o) => IsEventControllerFocus o Source #

Type class for types which can be safely cast to EventControllerFocus, for instance with toEventControllerFocus.

Instances

Instances details
(GObject o, IsDescendantOf EventControllerFocus o) => IsEventControllerFocus o Source # 
Instance details

Defined in GI.Gtk.Objects.EventControllerFocus

toEventControllerFocus :: (MonadIO m, IsEventControllerFocus o) => o -> m EventControllerFocus Source #

Cast to EventControllerFocus, for types for which this is known to be safe. For general casts, use castTo.

Methods

containsFocus

eventControllerFocusContainsFocus Source #

Arguments

:: (HasCallStack, MonadIO m, IsEventControllerFocus a) 
=> a

self: a EventControllerFocus

-> m Bool

Returns: True if focus is within self or one of its children

Returns the value of the GtkEventControllerFocus:contains-focus property.

isFocus

eventControllerFocusIsFocus Source #

Arguments

:: (HasCallStack, MonadIO m, IsEventControllerFocus a) 
=> a

self: a EventControllerFocus

-> m Bool

Returns: True if focus is within self but not one of its children

Returns the value of the GtkEventControllerFocus:is-focus property.

new

eventControllerFocusNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m EventControllerFocus

Returns: a new EventControllerFocus

Creates a new event controller that will handle focus events.

Properties

containsFocus

Whether focus is contain in the controllers widget. See See EventControllerFocus:is-focus for whether the focus is in the widget itself or inside a descendent.

When handling focus events, this property is updated before enter or leave are emitted.

getEventControllerFocusContainsFocus :: (MonadIO m, IsEventControllerFocus o) => o -> m Bool Source #

Get the value of the “contains-focus” property. When overloading is enabled, this is equivalent to

get eventControllerFocus #containsFocus

isFocus

Whether focus is in the controllers widget itself, opposed to in a descendent widget. See also EventControllerFocus:contains-focus.

When handling focus events, this property is updated before enter or leave are emitted.

getEventControllerFocusIsFocus :: (MonadIO m, IsEventControllerFocus o) => o -> m Bool Source #

Get the value of the “is-focus” property. When overloading is enabled, this is equivalent to

get eventControllerFocus #isFocus

Signals

enter

type C_EventControllerFocusEnterCallback = Ptr () -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type EventControllerFocusEnterCallback = IO () Source #

This signal is emitted whenever the focus enters into the widget or one of its descendents.

Note that this means you may not get an enter signal even though the widget becomes the focus location, in certain cases (such as when the focus moves from a descendent of the widget to the widget itself). If you are interested in these cases, you can monitor the EventControllerFocus:is-focus property for changes.

afterEventControllerFocusEnter :: (IsEventControllerFocus a, MonadIO m) => a -> EventControllerFocusEnterCallback -> m SignalHandlerId Source #

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

after eventControllerFocus #enter callback

onEventControllerFocusEnter :: (IsEventControllerFocus a, MonadIO m) => a -> EventControllerFocusEnterCallback -> m SignalHandlerId Source #

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

on eventControllerFocus #enter callback

leave

type C_EventControllerFocusLeaveCallback = Ptr () -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type EventControllerFocusLeaveCallback = IO () Source #

This signal is emitted whenever the focus leaves the widget hierarchy that is rooted at the widget that the controller is attached to.

Note that this means you may not get a leave signal even though the focus moves away from the widget, in certain cases (such as when the focus moves from the widget to a descendent). If you are interested in these cases, you can monitor the EventControllerFocus:is-focus property for changes.

afterEventControllerFocusLeave :: (IsEventControllerFocus a, MonadIO m) => a -> EventControllerFocusLeaveCallback -> m SignalHandlerId Source #

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

after eventControllerFocus #leave callback

onEventControllerFocusLeave :: (IsEventControllerFocus a, MonadIO m) => a -> EventControllerFocusLeaveCallback -> m SignalHandlerId Source #

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

on eventControllerFocus #leave callback