gi-adwaita-1.0.5: Adwaita bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Adw.Interfaces.Swipeable

Description

An interface for swipeable widgets.

The AdwSwipeable interface is implemented by all swipeable widgets.

See [classswipeTracker] for details about implementing it.

Synopsis

Exported types

newtype Swipeable Source #

Memory-managed wrapper type.

Constructors

Swipeable (ManagedPtr Swipeable) 

Instances

Instances details
Eq Swipeable Source # 
Instance details

Defined in GI.Adw.Interfaces.Swipeable

GObject Swipeable Source # 
Instance details

Defined in GI.Adw.Interfaces.Swipeable

ManagedPtrNewtype Swipeable Source # 
Instance details

Defined in GI.Adw.Interfaces.Swipeable

Methods

toManagedPtr :: Swipeable -> ManagedPtr Swipeable

TypedObject Swipeable Source # 
Instance details

Defined in GI.Adw.Interfaces.Swipeable

Methods

glibType :: IO GType

HasParentTypes Swipeable Source # 
Instance details

Defined in GI.Adw.Interfaces.Swipeable

IsGValue (Maybe Swipeable) Source #

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

Instance details

Defined in GI.Adw.Interfaces.Swipeable

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe Swipeable -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe Swipeable)

type ParentTypes Swipeable Source # 
Instance details

Defined in GI.Adw.Interfaces.Swipeable

type ParentTypes Swipeable = '[Widget, Object]

class (GObject o, IsDescendantOf Swipeable o) => IsSwipeable o Source #

Type class for types which can be safely cast to Swipeable, for instance with toSwipeable.

Instances

Instances details
(GObject o, IsDescendantOf Swipeable o) => IsSwipeable o Source # 
Instance details

Defined in GI.Adw.Interfaces.Swipeable

toSwipeable :: (MonadIO m, IsSwipeable o) => o -> m Swipeable Source #

Cast to Swipeable, 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

actionSetEnabled, activate, activateAction, activateDefault, addController, addCssClass, addMnemonicLabel, addTickCallback, allocate, bindProperty, bindPropertyFull, childFocus, computeBounds, computeExpand, computePoint, computeTransform, contains, createPangoContext, createPangoLayout, disposeTemplate, dragCheckThreshold, errorBell, forceFloating, freezeNotify, getv, grabFocus, hasCssClass, hasDefault, hasFocus, hasVisibleFocus, hide, inDestruction, initTemplate, insertActionGroup, insertAfter, insertBefore, isAncestor, isDrawable, isFloating, isFocus, isSensitive, isVisible, keynavFailed, listMnemonicLabels, map, measure, mnemonicActivate, notify, notifyByPspec, observeChildren, observeControllers, pick, queueAllocate, queueDraw, queueResize, realize, ref, refSink, removeController, removeCssClass, removeMnemonicLabel, removeTickCallback, resetProperty, resetRelation, resetState, runDispose, shouldLayout, show, sizeAllocate, snapshotChild, stealData, stealQdata, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unsetStateFlags, updateNextAccessibleSibling, updateProperty, updateRelation, updateState, watchClosure.

Getters

getAccessibleParent, getAccessibleRole, getAllocatedBaseline, getAllocatedHeight, getAllocatedWidth, getAllocation, getAncestor, getAtContext, getBounds, getBuildableId, getCanFocus, getCanTarget, getCancelProgress, getChildVisible, getClipboard, getColor, getCssClasses, getCssName, getCursor, getData, getDirection, getDisplay, getDistance, getFirstAccessibleChild, getFirstChild, getFocusChild, getFocusOnClick, getFocusable, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHeight, getHexpand, getHexpandSet, getLastChild, getLayoutManager, getMapped, getMarginBottom, getMarginEnd, getMarginStart, getMarginTop, getName, getNative, getNextAccessibleSibling, getNextSibling, getOpacity, getOverflow, getPangoContext, getParent, getPlatformState, getPreferredSize, getPrevSibling, getPrimaryClipboard, getProgress, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRoot, getScaleFactor, getSensitive, getSettings, getSize, getSizeRequest, getSnapPoints, getStateFlags, getStyleContext, getSwipeArea, getTemplateChild, getTooltipMarkup, getTooltipText, getValign, getVexpand, getVexpandSet, getVisible, getWidth.

Setters

setAccessibleParent, setCanFocus, setCanTarget, setChildVisible, setCssClasses, setCursor, setCursorFromName, setData, setDataFull, setDirection, setFocusChild, setFocusOnClick, setFocusable, setFontMap, setFontOptions, setHalign, setHasTooltip, setHexpand, setHexpandSet, setLayoutManager, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setName, setOpacity, setOverflow, setParent, setProperty, setReceivesDefault, setSensitive, setSizeRequest, setStateFlags, setTooltipMarkup, setTooltipText, setValign, setVexpand, setVexpandSet, setVisible.

getCancelProgress

swipeableGetCancelProgress Source #

Arguments

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

self: a swipeable

-> m Double

Returns: the cancel progress, unitless

Gets the progress self will snap back to after the gesture is canceled.

getDistance

swipeableGetDistance Source #

Arguments

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

self: a swipeable

-> m Double

Returns: the swipe distance in pixels

Gets the swipe distance of self.

This corresponds to how many pixels 1 unit represents.

getProgress

swipeableGetProgress Source #

Arguments

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

self: a swipeable

-> m Double

Returns: the current progress, unitless

Gets the current progress of self.

getSnapPoints

swipeableGetSnapPoints Source #

Arguments

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

self: a swipeable

-> m [Double]

Returns: the snap points

Gets the snap points of self.

Each snap point represents a progress value that is considered acceptable to end the swipe on.

getSwipeArea

swipeableGetSwipeArea Source #

Arguments

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

self: a swipeable

-> NavigationDirection

navigationDirection: the direction of the swipe

-> Bool

isDrag: whether the swipe is caused by a dragging gesture

-> m Rectangle 

Gets the area self can start a swipe from for the given direction and gesture type.

This can be used to restrict swipes to only be possible from a certain area, for example, to only allow edge swipes, or to have a draggable element and ignore swipes elsewhere.

If not implemented, the default implementation returns the allocation of self, allowing swipes from anywhere.