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

GI.Gtk.Objects.EventControllerMotion

Description

EventControllerMotion is an event controller meant for situations where you need to track the position of the pointer.

Synopsis

Exported types

class (GObject o, IsDescendantOf EventControllerMotion o) => IsEventControllerMotion o Source #

Type class for types which can be safely cast to EventControllerMotion, for instance with toEventControllerMotion.

Instances

Instances details
(GObject o, IsDescendantOf EventControllerMotion o) => IsEventControllerMotion o Source # 
Instance details

Defined in GI.Gtk.Objects.EventControllerMotion

toEventControllerMotion :: (MonadIO m, IsEventControllerMotion o) => o -> m EventControllerMotion Source #

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

Methods

Overloaded methods

getPointerOrigin

eventControllerMotionGetPointerOrigin Source #

Arguments

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

controller: a EventControllerMotion

-> m Widget

Returns: the previous pointer focus

Returns the widget that contained the pointer before.

This function can only be used in handlers for the enter and leave signals.

getPointerTarget

eventControllerMotionGetPointerTarget Source #

Arguments

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

controller: a EventControllerMotion

-> m Widget

Returns: the next pointer focus

Returns the widget that will contain the pointer afterwards.

This function can only be used in handlers for the enter and leave signals.

new

eventControllerMotionNew Source #

Creates a new event controller that will handle motion events.

Properties

containsPointerFocus

Whether the pointer is in a descendant of the controllers widget. See EventControllerMotion:is-pointer-focus.

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

getEventControllerMotionContainsPointerFocus :: (MonadIO m, IsEventControllerMotion o) => o -> m Bool Source #

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

get eventControllerMotion #containsPointerFocus

isPointerFocus

Whether the pointer is in the controllers widget itself, as opposed to in a descendent widget. See EventControllerMotion:contains-pointer-focus.

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

getEventControllerMotionIsPointerFocus :: (MonadIO m, IsEventControllerMotion o) => o -> m Bool Source #

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

get eventControllerMotion #isPointerFocus

Signals

enter

type C_EventControllerMotionEnterCallback = Ptr () -> CDouble -> CDouble -> CUInt -> CUInt -> Ptr () -> IO () Source #

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

type EventControllerMotionEnterCallback Source #

Arguments

 = Double

x: the x coordinate

-> Double

y: the y coordinate

-> CrossingMode

crossingMode: the crossing mode of this event

-> NotifyType

notifyType: the kind of crossing event

-> IO () 

Signals that the pointer has entered the widget.

afterEventControllerMotionEnter :: (IsEventControllerMotion a, MonadIO m) => a -> EventControllerMotionEnterCallback -> 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 eventControllerMotion #enter callback

onEventControllerMotionEnter :: (IsEventControllerMotion a, MonadIO m) => a -> EventControllerMotionEnterCallback -> 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 eventControllerMotion #enter callback

leave

type C_EventControllerMotionLeaveCallback = Ptr () -> CUInt -> CUInt -> Ptr () -> IO () Source #

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

type EventControllerMotionLeaveCallback Source #

Arguments

 = CrossingMode

crossingMode: the crossing mode of this event

-> NotifyType

notifyType: the kind of crossing event

-> IO () 

Signals that pointer has left the widget.

afterEventControllerMotionLeave :: (IsEventControllerMotion a, MonadIO m) => a -> EventControllerMotionLeaveCallback -> 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 eventControllerMotion #leave callback

onEventControllerMotionLeave :: (IsEventControllerMotion a, MonadIO m) => a -> EventControllerMotionLeaveCallback -> 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 eventControllerMotion #leave callback

motion

type C_EventControllerMotionMotionCallback = Ptr () -> CDouble -> CDouble -> Ptr () -> IO () Source #

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

type EventControllerMotionMotionCallback Source #

Arguments

 = Double

x: the x coordinate

-> Double

y: the y coordinate

-> IO () 

Emitted when the pointer moves inside the widget.

afterEventControllerMotionMotion :: (IsEventControllerMotion a, MonadIO m) => a -> EventControllerMotionMotionCallback -> m SignalHandlerId Source #

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

after eventControllerMotion #motion callback

onEventControllerMotionMotion :: (IsEventControllerMotion a, MonadIO m) => a -> EventControllerMotionMotionCallback -> m SignalHandlerId Source #

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

on eventControllerMotion #motion callback