gi-gdk-4.0.5: Gdk bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Gdk.Objects.ScrollEvent

Description

An event related to a scrolling motion.

Synopsis

Exported types

newtype ScrollEvent Source #

Memory-managed wrapper type.

Constructors

ScrollEvent (ManagedPtr ScrollEvent) 

Instances

Instances details
Eq ScrollEvent Source # 
Instance details

Defined in GI.Gdk.Objects.ScrollEvent

BoxedPtr ScrollEvent Source # 
Instance details

Defined in GI.Gdk.Objects.ScrollEvent

ManagedPtrNewtype ScrollEvent Source # 
Instance details

Defined in GI.Gdk.Objects.ScrollEvent

Methods

toManagedPtr :: ScrollEvent -> ManagedPtr ScrollEvent

TypedObject ScrollEvent Source # 
Instance details

Defined in GI.Gdk.Objects.ScrollEvent

Methods

glibType :: IO GType

HasParentTypes ScrollEvent Source # 
Instance details

Defined in GI.Gdk.Objects.ScrollEvent

type ParentTypes ScrollEvent Source # 
Instance details

Defined in GI.Gdk.Objects.ScrollEvent

type ParentTypes ScrollEvent = '[Event]

class (BoxedPtr o, TypedObject o, IsDescendantOf ScrollEvent o) => IsScrollEvent o Source #

Type class for types which can be safely cast to ScrollEvent, for instance with toScrollEvent.

Instances

Instances details
(BoxedPtr o, TypedObject o, IsDescendantOf ScrollEvent o) => IsScrollEvent o Source # 
Instance details

Defined in GI.Gdk.Objects.ScrollEvent

toScrollEvent :: (MonadIO m, IsScrollEvent o) => o -> m ScrollEvent Source #

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

Methods

getDeltas

scrollEventGetDeltas Source #

Arguments

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

event: a scroll event

-> m (Double, Double) 

Extracts the scroll deltas of a scroll event.

The deltas will be zero unless the scroll direction is ScrollDirectionSmooth.

For the representation unit of these deltas, see scrollEventGetUnit.

getDirection

scrollEventGetDirection Source #

Arguments

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

event: a scroll event

-> m ScrollDirection

Returns: the scroll direction of event

Extracts the direction of a scroll event.

getUnit

scrollEventGetUnit Source #

Arguments

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

event: a scroll event.

-> m ScrollUnit

Returns: the scroll unit.

Extracts the scroll delta unit of a scroll event.

The unit will always be ScrollUnitWheel if the scroll direction is not ScrollDirectionSmooth.

Since: 4.8

isStop

scrollEventIsStop Source #

Arguments

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

event: a scroll event

-> m Bool

Returns: True if the event is a scroll stop event

Check whether a scroll event is a stop scroll event.

Scroll sequences with smooth scroll information may provide a stop scroll event once the interaction with the device finishes, e.g. by lifting a finger. This stop scroll event is the signal that a widget may trigger kinetic scrolling based on the current velocity.

Stop scroll events always have a delta of 0/0.