gi-handy-1.0.4: 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.Carousel

Description

A paginated scrolling widget.

The HdyCarousel widget can be used to display a set of pages with swipe-based navigation between them.

classcarouselIndicatorDots
and [classcarouselIndicatorLines] can be used to provide page indicators for HdyCarousel.

CSS nodes

HdyCarousel has a single CSS node with name carousel.

Since: 1.0

Synopsis

Exported types

newtype Carousel Source #

Memory-managed wrapper type.

Constructors

Carousel (ManagedPtr Carousel) 

Instances

Instances details
Eq Carousel Source # 
Instance details

Defined in GI.Handy.Objects.Carousel

GObject Carousel Source # 
Instance details

Defined in GI.Handy.Objects.Carousel

ManagedPtrNewtype Carousel Source # 
Instance details

Defined in GI.Handy.Objects.Carousel

Methods

toManagedPtr :: Carousel -> ManagedPtr Carousel

TypedObject Carousel Source # 
Instance details

Defined in GI.Handy.Objects.Carousel

Methods

glibType :: IO GType

HasParentTypes Carousel Source # 
Instance details

Defined in GI.Handy.Objects.Carousel

IsGValue (Maybe Carousel) Source #

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

Instance details

Defined in GI.Handy.Objects.Carousel

Methods

gvalueGType_ :: IO GType

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

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

type ParentTypes Carousel Source # 
Instance details

Defined in GI.Handy.Objects.Carousel

type ParentTypes Carousel = '[EventBox, Bin, Container, Widget, Object, ImplementorIface, Buildable, Orientable, Swipeable]

class (GObject o, IsDescendantOf Carousel o) => IsCarousel o Source #

Type class for types which can be safely cast to Carousel, for instance with toCarousel.

Instances

Instances details
(GObject o, IsDescendantOf Carousel o) => IsCarousel o Source # 
Instance details

Defined in GI.Handy.Objects.Carousel

toCarousel :: (MonadIO m, IsCarousel o) => o -> m Carousel Source #

Cast to Carousel, 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, insert, insertActionGroup, intersect, isAncestor, isComposited, isDrawable, isFloating, isFocus, isSensitive, isToplevel, isVisible, keynavFailed, listAccelClosures, listActionPrefixes, listMnemonicLabels, map, mnemonicActivate, modifyBase, modifyBg, modifyCursor, modifyFg, modifyFont, modifyStyle, modifyText, 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, reorder, reparent, resetRcStyles, resetStyle, resizeChildren, runDispose, scrollTo, scrollToFull, 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

getAboveChild, getAccessible, getActionGroup, getAllocatedBaseline, getAllocatedHeight, getAllocatedSize, getAllocatedWidth, getAllocation, getAllowLongSwipes, getAllowMouseDrag, getAllowScrollWheel, getAncestor, getAnimationDuration, getAppPaintable, getBorderWidth, getCanDefault, getCanFocus, getCancelProgress, getChild, 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, getInteractive, getInternalChild, getMapped, getMarginBottom, getMarginEnd, getMarginLeft, getMarginRight, getMarginStart, getMarginTop, getModifierMask, getModifierStyle, getNPages, getName, getNoShowAll, getOpacity, getOrientation, getPangoContext, getParent, getParentWindow, getPath, getPathForChild, getPointer, getPosition, getPreferredHeight, getPreferredHeightAndBaselineForWidth, getPreferredHeightForWidth, getPreferredSize, getPreferredWidth, getPreferredWidthForHeight, getProgress, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRequisition, getResizeMode, getRevealDuration, getRootWindow, getScaleFactor, getScreen, getSensitive, getSettings, getSizeRequest, getSnapPoints, getSpacing, getState, getStateFlags, getStyle, getStyleContext, getSupportMultidevice, getSwipeArea, getSwipeTracker, getTemplateChild, getTooltipMarkup, getTooltipText, getTooltipWindow, getToplevel, getValign, getValignWithBaseline, getVexpand, getVexpandSet, getVisible, getVisibleWindow, getVisual, getWindow.

Setters

setAboveChild, setAccelPath, setAllocation, setAllowLongSwipes, setAllowMouseDrag, setAllowScrollWheel, setAnimationDuration, setAppPaintable, setBorderWidth, setBuildableProperty, setCanDefault, setCanFocus, setChildVisible, setClip, setCompositeName, setData, setDataFull, setDeviceEnabled, setDeviceEvents, setDirection, setDoubleBuffered, setEvents, setFocusChain, setFocusChild, setFocusHadjustment, setFocusOnClick, setFocusVadjustment, setFontMap, setFontOptions, setHalign, setHasTooltip, setHasWindow, setHexpand, setHexpandSet, setInteractive, setMapped, setMarginBottom, setMarginEnd, setMarginLeft, setMarginRight, setMarginStart, setMarginTop, setName, setNoShowAll, setOpacity, setOrientation, setParent, setParentWindow, setProperty, setRealized, setReallocateRedraws, setReceivesDefault, setRedrawOnAllocate, setResizeMode, setRevealDuration, setSensitive, setSizeRequest, setSpacing, setState, setStateFlags, setStyle, setSupportMultidevice, setTooltipMarkup, setTooltipText, setTooltipWindow, setValign, setVexpand, setVexpandSet, setVisible, setVisibleWindow, setVisual, setWindow.

getAllowLongSwipes

carouselGetAllowLongSwipes Source #

Arguments

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

self: a carousel

-> m Bool

Returns: TRUE if long swipes are allowed

Gets whether to allow swiping for more than one page at a time.

Since: 1.2

getAllowMouseDrag

carouselGetAllowMouseDrag Source #

Arguments

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

self: a carousel

-> m Bool

Returns: TRUE if self can be dragged with mouse

Sets whether self can be dragged with mouse pointer.

Since: 1.0

getAllowScrollWheel

carouselGetAllowScrollWheel Source #

Arguments

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

self: a carousel

-> m Bool

Returns: TRUE if self will respond to scroll wheel events

Gets whether self will respond to scroll wheel events.

Since: 1.4

getAnimationDuration

carouselGetAnimationDuration Source #

Arguments

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

self: a carousel

-> m Word32

Returns: animation duration, in milliseconds

Gets animation duration used by [methodcarousel.scroll_to].

Since: 1.0

getInteractive

carouselGetInteractive Source #

Arguments

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

self: a carousel

-> m Bool

Returns: TRUE if self can be swiped

Gets whether self can be navigated.

Since: 1.0

getNPages

carouselGetNPages Source #

Arguments

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

self: a carousel

-> m Word32

Returns: the number of pages in self

Gets the number of pages in self.

Since: 1.0

getPosition

carouselGetPosition Source #

Arguments

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

self: a carousel

-> m Double

Returns: the scroll position

Gets current scroll position in self. It's unitless, 1 matches 1 page.

Since: 1.0

getRevealDuration

carouselGetRevealDuration Source #

Arguments

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

self: a carousel

-> m Word32

Returns: the duration

Gets duration of the animation used when adding or removing pages, in milliseconds.

Since: 1.0

getSpacing

carouselGetSpacing Source #

Arguments

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

self: a carousel

-> m Word32

Returns: spacing between pages

Gets spacing between pages in pixels.

Since: 1.0

insert

carouselInsert Source #

Arguments

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

self: a carousel

-> b

child: a widget to add

-> Int32

position: the position to insert child in

-> m () 

Inserts child into self at position position.

If position is -1, or larger than the number of pages, child will be appended to the end.

Since: 1.0

new

carouselNew Source #

Arguments

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

Returns: the newly created HdyCarousel

Creates a new HdyCarousel.

Since: 1.0

prepend

carouselPrepend Source #

Arguments

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

self: a carousel

-> b

child: a widget to add

-> m () 

Prepends child to self.

Since: 1.0

reorder

carouselReorder Source #

Arguments

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

self: a carousel

-> b

child: a widget to add

-> Int32

position: the position to move child to

-> m () 

Moves child into position position.

If position is -1, or larger than the number of pages, child will be moved to the end.

Since: 1.0

scrollTo

carouselScrollTo Source #

Arguments

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

self: a carousel

-> b

widget: a child of self

-> m () 

Scrolls to widget position with an animation.

propertycarousel:animation-duration
property can be used for controlling the duration.

Since: 1.0

scrollToFull

carouselScrollToFull Source #

Arguments

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

self: a carousel

-> b

widget: a child of self

-> Int64

duration: animation duration, in milliseconds

-> m () 

Scrolls to widget position with an animation.

Since: 1.0

setAllowLongSwipes

carouselSetAllowLongSwipes Source #

Arguments

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

self: a carousel

-> Bool

allowLongSwipes: whether to allow long swipes

-> m () 

Sets whether to allow swiping for more than one page at a time.

Since: 1.2

setAllowMouseDrag

carouselSetAllowMouseDrag Source #

Arguments

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

self: a carousel

-> Bool

allowMouseDrag: whether self can be dragged with mouse pointer

-> m () 

Sets whether self can be dragged with mouse pointer.

If allowMouseDrag is FALSE, dragging is only available on touch.

Since: 1.0

setAllowScrollWheel

carouselSetAllowScrollWheel Source #

Arguments

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

self: a carousel

-> Bool

allowScrollWheel: whether self will respond to scroll wheel events

-> m () 

Sets whether self will respond to scroll wheel events.

Since: 1.4

setAnimationDuration

carouselSetAnimationDuration Source #

Arguments

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

self: a carousel

-> Word32

duration: animation duration, in milliseconds

-> m () 

Sets animation duration used by [methodcarousel.scroll_to].

Since: 1.0

setInteractive

carouselSetInteractive Source #

Arguments

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

self: a carousel

-> Bool

interactive: whether self can be swiped

-> m () 

Sets whether self can be navigated.

This can be used to temporarily disable a [classcarousel] to only allow swiping in a certain state.

Since: 1.0

setRevealDuration

carouselSetRevealDuration Source #

Arguments

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

self: a carousel

-> Word32

revealDuration: the new reveal duration value

-> m () 

Sets duration of the animation used when adding or removing pages, in milliseconds.

Since: 1.0

setSpacing

carouselSetSpacing Source #

Arguments

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

self: a carousel

-> Word32

spacing: the new spacing value

-> m () 

Sets spacing between pages in pixels.

Since: 1.0

Properties

allowLongSwipes

Whether to allow swiping for more than one page at a time.

If the value is FALSE, each swipe can only move to the adjacent pages.

Since: 1.2

constructCarouselAllowLongSwipes :: (IsCarousel o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getCarouselAllowLongSwipes :: (MonadIO m, IsCarousel o) => o -> m Bool Source #

Get the value of the “allow-long-swipes” property. When overloading is enabled, this is equivalent to

get carousel #allowLongSwipes

setCarouselAllowLongSwipes :: (MonadIO m, IsCarousel o) => o -> Bool -> m () Source #

Set the value of the “allow-long-swipes” property. When overloading is enabled, this is equivalent to

set carousel [ #allowLongSwipes := value ]

allowMouseDrag

Sets whether the [classcarousel] can be dragged with mouse pointer.

If the value is FALSE, dragging is only available on touch.

Since: 1.0

constructCarouselAllowMouseDrag :: (IsCarousel o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getCarouselAllowMouseDrag :: (MonadIO m, IsCarousel o) => o -> m Bool Source #

Get the value of the “allow-mouse-drag” property. When overloading is enabled, this is equivalent to

get carousel #allowMouseDrag

setCarouselAllowMouseDrag :: (MonadIO m, IsCarousel o) => o -> Bool -> m () Source #

Set the value of the “allow-mouse-drag” property. When overloading is enabled, this is equivalent to

set carousel [ #allowMouseDrag := value ]

allowScrollWheel

Whether the widget will respond to scroll wheel events.

If the value is FALSE, wheel events will be ignored.

Since: 1.4

constructCarouselAllowScrollWheel :: (IsCarousel o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getCarouselAllowScrollWheel :: (MonadIO m, IsCarousel o) => o -> m Bool Source #

Get the value of the “allow-scroll-wheel” property. When overloading is enabled, this is equivalent to

get carousel #allowScrollWheel

setCarouselAllowScrollWheel :: (MonadIO m, IsCarousel o) => o -> Bool -> m () Source #

Set the value of the “allow-scroll-wheel” property. When overloading is enabled, this is equivalent to

set carousel [ #allowScrollWheel := value ]

animationDuration

Animation duration used by [methodcarousel.scroll_to], in milliseconds.

Since: 1.0

constructCarouselAnimationDuration :: (IsCarousel o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #

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

getCarouselAnimationDuration :: (MonadIO m, IsCarousel o) => o -> m Word32 Source #

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

get carousel #animationDuration

setCarouselAnimationDuration :: (MonadIO m, IsCarousel o) => o -> Word32 -> m () Source #

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

set carousel [ #animationDuration := value ]

interactive

Whether the carousel can be navigated.

This can be used to temporarily disable a HdyCarousel to only allow navigating it in a certain state.

Since: 1.0

constructCarouselInteractive :: (IsCarousel o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getCarouselInteractive :: (MonadIO m, IsCarousel o) => o -> m Bool Source #

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

get carousel #interactive

setCarouselInteractive :: (MonadIO m, IsCarousel o) => o -> Bool -> m () Source #

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

set carousel [ #interactive := value ]

nPages

The number of pages in a [classcarousel].

Since: 1.0

getCarouselNPages :: (MonadIO m, IsCarousel o) => o -> m Word32 Source #

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

get carousel #nPages

position

Current scrolling position, unitless.

1 matches 1 page. Use [methodcarousel.scroll_to] for changing it.

Since: 1.0

getCarouselPosition :: (MonadIO m, IsCarousel o) => o -> m Double Source #

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

get carousel #position

revealDuration

Page reveal duration, in milliseconds.

Since: 1.0

constructCarouselRevealDuration :: (IsCarousel o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #

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

getCarouselRevealDuration :: (MonadIO m, IsCarousel o) => o -> m Word32 Source #

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

get carousel #revealDuration

setCarouselRevealDuration :: (MonadIO m, IsCarousel o) => o -> Word32 -> m () Source #

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

set carousel [ #revealDuration := value ]

spacing

Spacing between pages in pixels.

Since: 1.0

constructCarouselSpacing :: (IsCarousel o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #

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

getCarouselSpacing :: (MonadIO m, IsCarousel o) => o -> m Word32 Source #

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

get carousel #spacing

setCarouselSpacing :: (MonadIO m, IsCarousel o) => o -> Word32 -> m () Source #

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

set carousel [ #spacing := value ]

Signals

pageChanged

type CarouselPageChangedCallback Source #

Arguments

 = Word32

index: the current page

-> IO () 

This signal is emitted after a page has been changed.

It can be used to implement "infinite scrolling" by amending the pages after every scroll.

Since: 1.0

afterCarouselPageChanged :: (IsCarousel a, MonadIO m) => a -> ((?self :: a) => CarouselPageChangedCallback) -> m SignalHandlerId Source #

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

after carousel #pageChanged callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onCarouselPageChanged :: (IsCarousel a, MonadIO m) => a -> ((?self :: a) => CarouselPageChangedCallback) -> m SignalHandlerId Source #

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

on carousel #pageChanged callback