Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
An event related to a scrolling motion.
Synopsis
- newtype ScrollEvent = ScrollEvent (ManagedPtr ScrollEvent)
- class (BoxedPtr o, TypedObject o, IsDescendantOf ScrollEvent o) => IsScrollEvent o
- toScrollEvent :: (MonadIO m, IsScrollEvent o) => o -> m ScrollEvent
- scrollEventGetDeltas :: (HasCallStack, MonadIO m, IsScrollEvent a) => a -> m (Double, Double)
- scrollEventGetDirection :: (HasCallStack, MonadIO m, IsScrollEvent a) => a -> m ScrollDirection
- scrollEventGetUnit :: (HasCallStack, MonadIO m, IsScrollEvent a) => a -> m ScrollUnit
- scrollEventIsStop :: (HasCallStack, MonadIO m, IsScrollEvent a) => a -> m Bool
Exported types
newtype ScrollEvent Source #
Memory-managed wrapper type.
ScrollEvent (ManagedPtr ScrollEvent) |
Instances
Eq ScrollEvent Source # | |
Defined in GI.Gdk.Objects.ScrollEvent (==) :: ScrollEvent -> ScrollEvent -> Bool # (/=) :: ScrollEvent -> ScrollEvent -> Bool # | |
BoxedPtr ScrollEvent Source # | |
Defined in GI.Gdk.Objects.ScrollEvent boxedPtrCopy :: ScrollEvent -> IO ScrollEvent boxedPtrFree :: ScrollEvent -> IO () | |
ManagedPtrNewtype ScrollEvent Source # | |
Defined in GI.Gdk.Objects.ScrollEvent toManagedPtr :: ScrollEvent -> ManagedPtr ScrollEvent | |
TypedObject ScrollEvent Source # | |
Defined in GI.Gdk.Objects.ScrollEvent | |
HasParentTypes ScrollEvent Source # | |
Defined in GI.Gdk.Objects.ScrollEvent | |
type ParentTypes ScrollEvent Source # | |
Defined in GI.Gdk.Objects.ScrollEvent |
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
(BoxedPtr o, TypedObject o, IsDescendantOf ScrollEvent o) => IsScrollEvent o Source # | |
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
Click to display all available methods, including inherited ones
Methods
isStop, ref, triggersContextMenu, unref.
Getters
getAxes, getAxis, getDeltas, getDevice, getDeviceTool, getDirection, getDisplay, getEventSequence, getEventType, getHistory, getModifierState, getPointerEmulated, getPosition, getSeat, getSurface, getTime, getUnit.
Setters
None.
getDeltas
:: (HasCallStack, MonadIO m, IsScrollEvent a) | |
=> a |
|
-> 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 #
:: (HasCallStack, MonadIO m, IsScrollEvent a) | |
=> a |
|
-> m ScrollDirection | Returns: the scroll direction of |
Extracts the direction of a scroll event.
getUnit
:: (HasCallStack, MonadIO m, IsScrollEvent a) | |
=> a |
|
-> 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
:: (HasCallStack, MonadIO m, IsScrollEvent a) | |
=> a |
|
-> m Bool | Returns: |
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.