gi-handy-1.0.2: libhandy bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Handy.Objects.Deck

Description

A swipeable widget showing one of the visible children at a time.

The HdyDeck widget displays one of the visible children, similar to a Stack. The children are strictly ordered and can be navigated using swipe gestures.

The “over” and “under” stack the children one on top of the other, while the “slide” transition puts the children side by side. While navigating to a child on the side or below can be performed by swiping the current child away, navigating to an upper child requires dragging it from the edge where it resides. This doesn't affect non-dragging swipes.

The “over” and “under” transitions can draw their shadow on top of the window's transparent areas, like the rounded corners. This is a side-effect of allowing shadows to be drawn on top of OpenGL areas. It can be mitigated by using [classwindow] or [classapplicationWindow] as they will crop anything drawn beyond the rounded corners.

CSS nodes

HdyDeck has a single CSS node with name deck.

Since: 1.0

Synopsis

Exported types

newtype Deck Source #

Memory-managed wrapper type.

Constructors

Deck (ManagedPtr Deck) 

Instances

Instances details
Eq Deck Source # 
Instance details

Defined in GI.Handy.Objects.Deck

Methods

(==) :: Deck -> Deck -> Bool #

(/=) :: Deck -> Deck -> Bool #

GObject Deck Source # 
Instance details

Defined in GI.Handy.Objects.Deck

ManagedPtrNewtype Deck Source # 
Instance details

Defined in GI.Handy.Objects.Deck

Methods

toManagedPtr :: Deck -> ManagedPtr Deck

TypedObject Deck Source # 
Instance details

Defined in GI.Handy.Objects.Deck

Methods

glibType :: IO GType

HasParentTypes Deck Source # 
Instance details

Defined in GI.Handy.Objects.Deck

IsGValue (Maybe Deck) Source #

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

Instance details

Defined in GI.Handy.Objects.Deck

Methods

gvalueGType_ :: IO GType

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

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

type ParentTypes Deck Source # 
Instance details

Defined in GI.Handy.Objects.Deck

type ParentTypes Deck = '[Container, Widget, Object, ImplementorIface, Buildable, Orientable, Swipeable]

class (GObject o, IsDescendantOf Deck o) => IsDeck o Source #

Type class for types which can be safely cast to Deck, for instance with toDeck.

Instances

Instances details
(GObject o, IsDescendantOf Deck o) => IsDeck o Source # 
Instance details

Defined in GI.Handy.Objects.Deck

toDeck :: (MonadIO m, IsDeck o) => o -> m Deck Source #

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

activate, add, addAccelerator, addChild, addDeviceEvents, addEvents, addMnemonicLabel, addTickCallback, bindProperty, bindPropertyFull, canActivateAccel, checkResize, childFocus, childGetProperty, childNotify, childNotifyByPspec, childSetProperty, childType, classPath, computeExpand, constructChild, createPangoContext, createPangoLayout, customFinished, customTagEnd, customTagStart, destroy, destroyed, deviceIsShadowed, dragBegin, dragBeginWithCoordinates, dragCheckThreshold, dragDestAddImageTargets, dragDestAddTextTargets, dragDestAddUriTargets, dragDestFindTarget, dragDestGetTargetList, dragDestGetTrackMotion, dragDestSet, dragDestSetProxy, dragDestSetTargetList, dragDestSetTrackMotion, dragDestUnset, dragGetData, dragHighlight, dragSourceAddImageTargets, dragSourceAddTextTargets, dragSourceAddUriTargets, dragSourceGetTargetList, dragSourceSet, dragSourceSetIconGicon, dragSourceSetIconName, dragSourceSetIconPixbuf, dragSourceSetIconStock, dragSourceSetTargetList, dragSourceUnset, dragUnhighlight, draw, emitChildSwitched, ensureStyle, errorBell, event, forall, forceFloating, foreach, freezeChildNotify, freezeNotify, getv, grabAdd, grabDefault, grabFocus, grabRemove, hasDefault, hasFocus, hasGrab, hasRcStyle, hasScreen, hasVisibleFocus, hide, hideOnDelete, inDestruction, initTemplate, inputShapeCombineRegion, insertActionGroup, insertChildAfter, intersect, isAncestor, isComposited, isDrawable, isFloating, isFocus, isSensitive, isToplevel, isVisible, keynavFailed, listAccelClosures, listActionPrefixes, listMnemonicLabels, map, mnemonicActivate, modifyBase, modifyBg, modifyCursor, modifyFg, modifyFont, modifyStyle, modifyText, navigate, notify, notifyByPspec, overrideBackgroundColor, overrideColor, overrideCursor, overrideFont, overrideSymbolicColor, parserFinished, path, prepend, propagateDraw, queueAllocate, queueComputeExpand, queueDraw, queueDrawArea, queueDrawRegion, queueResize, queueResizeNoRedraw, realize, ref, refSink, regionIntersect, registerWindow, remove, removeAccelerator, removeMnemonicLabel, removeTickCallback, renderIcon, renderIconPixbuf, reorderChildAfter, reparent, resetRcStyles, resetStyle, resizeChildren, runDispose, sendExpose, sendFocusChange, shapeCombineRegion, show, showAll, showNow, sizeAllocate, sizeAllocateWithBaseline, sizeRequest, stealData, stealQdata, styleAttach, styleGetProperty, switchChild, thawChildNotify, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unregisterWindow, unsetFocusChain, unsetStateFlags, watchClosure.

Getters

getAccessible, getActionGroup, getAdjacentChild, getAllocatedBaseline, getAllocatedHeight, getAllocatedSize, getAllocatedWidth, getAllocation, getAncestor, getAppPaintable, getBorderWidth, getCanDefault, getCanFocus, getCanSwipeBack, getCanSwipeForward, getCancelProgress, getChildByName, getChildRequisition, getChildVisible, getChildren, getClip, getClipboard, getCompositeName, getData, getDeviceEnabled, getDeviceEvents, getDirection, getDisplay, getDistance, getDoubleBuffered, getEvents, getFocusChain, getFocusChild, getFocusHadjustment, getFocusOnClick, getFocusVadjustment, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHasWindow, getHexpand, getHexpandSet, getHomogeneous, getInternalChild, getInterpolateSize, getMapped, getMarginBottom, getMarginEnd, getMarginLeft, getMarginRight, getMarginStart, getMarginTop, getModifierMask, getModifierStyle, getName, getNoShowAll, getOpacity, getOrientation, getPangoContext, getParent, getParentWindow, getPath, getPathForChild, getPointer, getPreferredHeight, getPreferredHeightAndBaselineForWidth, getPreferredHeightForWidth, getPreferredSize, getPreferredWidth, getPreferredWidthForHeight, getProgress, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRequisition, getResizeMode, getRootWindow, getScaleFactor, getScreen, getSensitive, getSettings, getSizeRequest, getSnapPoints, getState, getStateFlags, getStyle, getStyleContext, getSupportMultidevice, getSwipeArea, getSwipeTracker, getTemplateChild, getTooltipMarkup, getTooltipText, getTooltipWindow, getToplevel, getTransitionDuration, getTransitionRunning, getTransitionType, getValign, getValignWithBaseline, getVexpand, getVexpandSet, getVisible, getVisibleChild, getVisibleChildName, getVisual, getWindow.

Setters

setAccelPath, setAllocation, setAppPaintable, setBorderWidth, setBuildableProperty, setCanDefault, setCanFocus, setCanSwipeBack, setCanSwipeForward, setChildVisible, setClip, setCompositeName, setData, setDataFull, setDeviceEnabled, setDeviceEvents, setDirection, setDoubleBuffered, setEvents, setFocusChain, setFocusChild, setFocusHadjustment, setFocusOnClick, setFocusVadjustment, setFontMap, setFontOptions, setHalign, setHasTooltip, setHasWindow, setHexpand, setHexpandSet, setHomogeneous, setInterpolateSize, setMapped, setMarginBottom, setMarginEnd, setMarginLeft, setMarginRight, setMarginStart, setMarginTop, setName, setNoShowAll, setOpacity, setOrientation, setParent, setParentWindow, setProperty, setRealized, setReallocateRedraws, setReceivesDefault, setRedrawOnAllocate, setResizeMode, setSensitive, setSizeRequest, setState, setStateFlags, setStyle, setSupportMultidevice, setTooltipMarkup, setTooltipText, setTooltipWindow, setTransitionDuration, setTransitionType, setValign, setVexpand, setVexpandSet, setVisible, setVisibleChild, setVisibleChildName, setVisual, setWindow.

getAdjacentChild

deckGetAdjacentChild Source #

Arguments

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

self: a deck

-> NavigationDirection

direction: the direction

-> m (Maybe Widget)

Returns: the previous or next child

Finds the previous or next navigatable child.

Gets the previous or next child. This will be the same widget [methoddeck.navigate] will navigate to.

If there's no child to navigate to, NULL will be returned instead.

Since: 1.0

getCanSwipeBack

deckGetCanSwipeBack Source #

Arguments

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

self: a deck

-> m Bool

Returns: Whether swipe gestures are enabled.

Gets whether swipe gestures for navigating backward are enabled.

Since: 1.0

getCanSwipeForward

deckGetCanSwipeForward Source #

Arguments

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

self: a deck

-> m Bool

Returns: Whether swipe gestures are enabled.

Gets whether swipe gestures for navigating forward enabled.

Since: 1.0

getChildByName

deckGetChildByName Source #

Arguments

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

self: a deck

-> Text

name: the name of the child to find

-> m (Maybe Widget)

Returns: the requested child of self

Finds the child of self with name.

Returns NULL if there is no child with this name.

Since: 1.0

getHomogeneous

deckGetHomogeneous Source #

Arguments

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

self: a deck

-> Orientation

orientation: the orientation

-> m Bool

Returns: whether self is homogeneous for the given orientation

Gets whether self is homogeneous for the given orientation.

Since: 1.0

getInterpolateSize

deckGetInterpolateSize Source #

Arguments

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

self: a deck

-> m Bool

Returns: whether child sizes are interpolated

Gets whether self will interpolate its size when changing the visible child.

Since: 1.0

getTransitionDuration

deckGetTransitionDuration Source #

Arguments

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

self: a deck

-> m Word32

Returns: the mode transition duration, in milliseconds.

Gets the mode transition animation duration for self.

Since: 1.0

getTransitionRunning

deckGetTransitionRunning Source #

Arguments

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

self: a deck

-> m Bool

Returns: whether a transition is currently running

Gets whether a transition is currently running for self.

Since: 1.0

getTransitionType

deckGetTransitionType Source #

Arguments

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

self: a deck

-> m DeckTransitionType

Returns: the current transition type of self

Gets the type of animation used for transitions between children.

Since: 1.0

getVisibleChild

deckGetVisibleChild Source #

Arguments

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

self: a deck

-> m Widget

Returns: the visible child widget

Gets the visible child widget.

Since: 1.0

getVisibleChildName

deckGetVisibleChildName Source #

Arguments

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

self: a deck

-> m Text

Returns: the name of the visible child

Gets the name of the currently visible child widget.

Since: 1.0

insertChildAfter

deckInsertChildAfter Source #

Arguments

:: (HasCallStack, MonadIO m, IsDeck a, IsWidget b, IsWidget c) 
=> a

self: a deck

-> b

child: the widget to insert

-> Maybe c

sibling: the sibling after which to insert child

-> m () 

Inserts child in the position after sibling in the list of children.

If sibling is NULL, inserts child at the first position.

Since: 1.2

navigate

deckNavigate Source #

Arguments

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

self: a deck

-> NavigationDirection

direction: the direction

-> m Bool

Returns: whether the visible child was changed

Navigates to the previous or next child.

The switch is similar to performing a swipe gesture to go in direction.

Since: 1.0

new

deckNew Source #

Arguments

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

Returns: the newly created HdyDeck

Creates a new HdyDeck.

Since: 1.0

prepend

deckPrepend Source #

Arguments

:: (HasCallStack, MonadIO m, IsDeck a, IsWidget b) 
=> a

self: a deck

-> b

child: the widget to prepend

-> m () 

Inserts child at the first position in self.

Since: 1.2

reorderChildAfter

deckReorderChildAfter Source #

Arguments

:: (HasCallStack, MonadIO m, IsDeck a, IsWidget b, IsWidget c) 
=> a

self: a deck

-> b

child: the widget to move, must be a child of self

-> Maybe c

sibling: the sibling to move child after

-> m () 

Moves child to the position after sibling in the list of children.

If sibling is NULL, move child to the first position.

Since: 1.2

setCanSwipeBack

deckSetCanSwipeBack Source #

Arguments

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

self: a deck

-> Bool

canSwipeBack: the new value

-> m () 

Sets whether swipe gestures for navigating backward are enabled.

Since: 1.0

setCanSwipeForward

deckSetCanSwipeForward Source #

Arguments

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

self: a deck

-> Bool

canSwipeForward: the new value

-> m () 

Sets whether swipe gestures for navigating forward are enabled.

Since: 1.0

setHomogeneous

deckSetHomogeneous Source #

Arguments

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

self: a deck

-> Orientation

orientation: the orientation

-> Bool

homogeneous: TRUE to make self homogeneous

-> m () 

Sets whether self is homogeneous for a given orientation.

If set to FALSE, different children can have different size along the opposite orientation.

Since: 1.0

setInterpolateSize

deckSetInterpolateSize Source #

Arguments

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

self: a deck

-> Bool

interpolateSize: the new value

-> m () 

Sets whether self will interpolate its size when changing the visible child.

self will interpolate its size between the current one and the one it'll take after changing the visible child, according to the set transition duration.

Since: 1.0

setTransitionDuration

deckSetTransitionDuration Source #

Arguments

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

self: a deck

-> Word32

duration: the new duration, in milliseconds

-> m () 

Sets the mode transition animation duration for self.

Since: 1.0

setTransitionType

deckSetTransitionType Source #

Arguments

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

self: a deck

-> DeckTransitionType

transition: the new transition type

-> m () 

Sets the type of animation used for transitions between children.

The transition type can be changed without problems at runtime, so it is possible to change the animation based on the child that is about to become current.

Since: 1.0

setVisibleChild

deckSetVisibleChild Source #

Arguments

:: (HasCallStack, MonadIO m, IsDeck a, IsWidget b) 
=> a

self: a deck

-> b

visibleChild: the new child

-> m () 

Sets the currently visible widget.

Since: 1.0

setVisibleChildName

deckSetVisibleChildName Source #

Arguments

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

self: a deck

-> Text

name: the name of a child

-> m () 

Makes the child with the name name visible.

See [methoddeck.set_visible_child] for more details.

Since: 1.0

Properties

canSwipeBack

Whether swipe gestures allow switching to the previous child.

Since: 1.0

constructDeckCanSwipeBack :: (IsDeck o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “can-swipe-back” property. This is rarely needed directly, but it is used by new.

getDeckCanSwipeBack :: (MonadIO m, IsDeck o) => o -> m Bool Source #

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

get deck #canSwipeBack

setDeckCanSwipeBack :: (MonadIO m, IsDeck o) => o -> Bool -> m () Source #

Set the value of the “can-swipe-back” property. When overloading is enabled, this is equivalent to

set deck [ #canSwipeBack := value ]

canSwipeForward

Whether swipe gestures allow switching to the next child.

Since: 1.0

constructDeckCanSwipeForward :: (IsDeck o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “can-swipe-forward” property. This is rarely needed directly, but it is used by new.

getDeckCanSwipeForward :: (MonadIO m, IsDeck o) => o -> m Bool Source #

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

get deck #canSwipeForward

setDeckCanSwipeForward :: (MonadIO m, IsDeck o) => o -> Bool -> m () Source #

Set the value of the “can-swipe-forward” property. When overloading is enabled, this is equivalent to

set deck [ #canSwipeForward := value ]

hhomogeneous

Horizontally homogeneous sizing.

Since: 1.0

constructDeckHhomogeneous :: (IsDeck o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “hhomogeneous” property. This is rarely needed directly, but it is used by new.

getDeckHhomogeneous :: (MonadIO m, IsDeck o) => o -> m Bool Source #

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

get deck #hhomogeneous

setDeckHhomogeneous :: (MonadIO m, IsDeck o) => o -> Bool -> m () Source #

Set the value of the “hhomogeneous” property. When overloading is enabled, this is equivalent to

set deck [ #hhomogeneous := value ]

interpolateSize

Whether or not the size should smoothly change when changing between differently sized children.

Since: 1.0

constructDeckInterpolateSize :: (IsDeck o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “interpolate-size” property. This is rarely needed directly, but it is used by new.

getDeckInterpolateSize :: (MonadIO m, IsDeck o) => o -> m Bool Source #

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

get deck #interpolateSize

setDeckInterpolateSize :: (MonadIO m, IsDeck o) => o -> Bool -> m () Source #

Set the value of the “interpolate-size” property. When overloading is enabled, this is equivalent to

set deck [ #interpolateSize := value ]

transitionDuration

The transition animation duration, in milliseconds.

Since: 1.0

constructDeckTransitionDuration :: (IsDeck o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “transition-duration” property. This is rarely needed directly, but it is used by new.

getDeckTransitionDuration :: (MonadIO m, IsDeck o) => o -> m Word32 Source #

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

get deck #transitionDuration

setDeckTransitionDuration :: (MonadIO m, IsDeck o) => o -> Word32 -> m () Source #

Set the value of the “transition-duration” property. When overloading is enabled, this is equivalent to

set deck [ #transitionDuration := value ]

transitionRunning

Whether or not the transition is currently running.

Since: 1.0

getDeckTransitionRunning :: (MonadIO m, IsDeck o) => o -> m Bool Source #

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

get deck #transitionRunning

transitionType

The type of animation that will be used for transitions between children.

The transition type can be changed without problems at runtime, so it is possible to change the animation based on the child that is about to become current.

Since: 1.0

constructDeckTransitionType :: (IsDeck o, MonadIO m) => DeckTransitionType -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “transition-type” property. This is rarely needed directly, but it is used by new.

getDeckTransitionType :: (MonadIO m, IsDeck o) => o -> m DeckTransitionType Source #

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

get deck #transitionType

setDeckTransitionType :: (MonadIO m, IsDeck o) => o -> DeckTransitionType -> m () Source #

Set the value of the “transition-type” property. When overloading is enabled, this is equivalent to

set deck [ #transitionType := value ]

vhomogeneous

Vertically homogeneous sizing.

Since: 1.0

constructDeckVhomogeneous :: (IsDeck o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “vhomogeneous” property. This is rarely needed directly, but it is used by new.

getDeckVhomogeneous :: (MonadIO m, IsDeck o) => o -> m Bool Source #

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

get deck #vhomogeneous

setDeckVhomogeneous :: (MonadIO m, IsDeck o) => o -> Bool -> m () Source #

Set the value of the “vhomogeneous” property. When overloading is enabled, this is equivalent to

set deck [ #vhomogeneous := value ]

visibleChild

The widget currently visible.

The transition is determined by [propertydeck:transition-type] and [propertydeck:transition-duration]. The transition can be cancelled by the user, in which case visible child will change back to the previously visible child.

Since: 1.0

constructDeckVisibleChild :: (IsDeck o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “visible-child” property. This is rarely needed directly, but it is used by new.

getDeckVisibleChild :: (MonadIO m, IsDeck o) => o -> m Widget Source #

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

get deck #visibleChild

setDeckVisibleChild :: (MonadIO m, IsDeck o, IsWidget a) => o -> a -> m () Source #

Set the value of the “visible-child” property. When overloading is enabled, this is equivalent to

set deck [ #visibleChild := value ]

visibleChildName

The name of the widget currently visible.

Since: 1.0

constructDeckVisibleChildName :: (IsDeck o, MonadIO m) => Text -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “visible-child-name” property. This is rarely needed directly, but it is used by new.

getDeckVisibleChildName :: (MonadIO m, IsDeck o) => o -> m Text Source #

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

get deck #visibleChildName

setDeckVisibleChildName :: (MonadIO m, IsDeck o) => o -> Text -> m () Source #

Set the value of the “visible-child-name” property. When overloading is enabled, this is equivalent to

set deck [ #visibleChildName := value ]