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

GI.Adw.Objects.ToastOverlay

Description

A widget showing toasts above its content.

<picture> <source srcset="toast-overlay-dark.png" media="(prefers-color-scheme: dark)"> <img src="toast-overlay.png" alt="toast-overlay"> </picture>

Toasts can be shown with [methodtoastOverlay.add_toast].

See [classtoast] for details.

CSS nodes

toastoverlay
├── [child]
├── toast
┊   ├── widget
┊   │   ├── [label.heading]
    │   ╰── [custom title]
    ├── [button]
    ╰── button.circular.flat

AdwToastOverlay's CSS node is called toastoverlay. It contains the child, as well as zero or more toast subnodes.

Each of the toast nodes contains a widget subnode, optionally a button subnode, and another button subnode with .circular and .flat style classes.

The widget subnode contains a label subnode with the .heading style class, or a custom widget provided by the application.

Accessibility

AdwToastOverlay uses the GTK_ACCESSIBLE_ROLE_TAB_GROUP role.

Since: 1.0

Synopsis

Exported types

newtype ToastOverlay Source #

Memory-managed wrapper type.

Constructors

ToastOverlay (ManagedPtr ToastOverlay) 

Instances

Instances details
Eq ToastOverlay Source # 
Instance details

Defined in GI.Adw.Objects.ToastOverlay

GObject ToastOverlay Source # 
Instance details

Defined in GI.Adw.Objects.ToastOverlay

ManagedPtrNewtype ToastOverlay Source # 
Instance details

Defined in GI.Adw.Objects.ToastOverlay

Methods

toManagedPtr :: ToastOverlay -> ManagedPtr ToastOverlay

TypedObject ToastOverlay Source # 
Instance details

Defined in GI.Adw.Objects.ToastOverlay

Methods

glibType :: IO GType

HasParentTypes ToastOverlay Source # 
Instance details

Defined in GI.Adw.Objects.ToastOverlay

IsGValue (Maybe ToastOverlay) Source #

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

Instance details

Defined in GI.Adw.Objects.ToastOverlay

Methods

gvalueGType_ :: IO GType

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

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

type ParentTypes ToastOverlay Source # 
Instance details

Defined in GI.Adw.Objects.ToastOverlay

type ParentTypes ToastOverlay = '[Widget, Object, Accessible, Buildable, ConstraintTarget]

class (GObject o, IsDescendantOf ToastOverlay o) => IsToastOverlay o Source #

Type class for types which can be safely cast to ToastOverlay, for instance with toToastOverlay.

Instances

Instances details
(GObject o, IsDescendantOf ToastOverlay o) => IsToastOverlay o Source # 
Instance details

Defined in GI.Adw.Objects.ToastOverlay

toToastOverlay :: (MonadIO m, IsToastOverlay o) => o -> m ToastOverlay Source #

Cast to ToastOverlay, 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, addToast, 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, updateProperty, updateRelation, updateState, watchClosure.

Getters

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

Setters

setCanFocus, setCanTarget, setChild, 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.

addToast

toastOverlayAddToast Source #

Arguments

:: (HasCallStack, MonadIO m, IsToastOverlay a, IsToast b) 
=> a

self: a toast overlay

-> b

toast: a toast

-> m () 

Displays toast.

Only one toast can be shown at a time; if a toast is already being displayed, either toast or the original toast will be placed in a queue, depending on the priority of toast. See [propertytoast:priority].

If called on a toast that's already displayed, its timeout will be reset.

If called on a toast currently in the queue, the toast will be bumped forward to be shown as soon as possible.

Since: 1.0

getChild

toastOverlayGetChild Source #

Arguments

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

self: a toast overlay

-> m (Maybe Widget)

Returns: the child widget of self

Gets the child widget of self.

Since: 1.0

new

toastOverlayNew Source #

Arguments

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

Returns: the new created AdwToastOverlay

Creates a new AdwToastOverlay.

Since: 1.0

setChild

toastOverlaySetChild Source #

Arguments

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

self: a toast overlay

-> Maybe b

child: the child widget

-> m () 

Sets the child widget of self.

Since: 1.0

Properties

child

The child widget.

Since: 1.0

clearToastOverlayChild :: (MonadIO m, IsToastOverlay o) => o -> m () Source #

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

clear #child

constructToastOverlayChild :: (IsToastOverlay o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o) Source #

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

getToastOverlayChild :: (MonadIO m, IsToastOverlay o) => o -> m (Maybe Widget) Source #

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

get toastOverlay #child

setToastOverlayChild :: (MonadIO m, IsToastOverlay o, IsWidget a) => o -> a -> m () Source #

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

set toastOverlay [ #child := value ]