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 |
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
- newtype ToastOverlay = ToastOverlay (ManagedPtr ToastOverlay)
- class (GObject o, IsDescendantOf ToastOverlay o) => IsToastOverlay o
- toToastOverlay :: (MonadIO m, IsToastOverlay o) => o -> m ToastOverlay
- toastOverlayAddToast :: (HasCallStack, MonadIO m, IsToastOverlay a, IsToast b) => a -> b -> m ()
- toastOverlayGetChild :: (HasCallStack, MonadIO m, IsToastOverlay a) => a -> m (Maybe Widget)
- toastOverlayNew :: (HasCallStack, MonadIO m) => m ToastOverlay
- toastOverlaySetChild :: (HasCallStack, MonadIO m, IsToastOverlay a, IsWidget b) => a -> Maybe b -> m ()
- clearToastOverlayChild :: (MonadIO m, IsToastOverlay o) => o -> m ()
- constructToastOverlayChild :: (IsToastOverlay o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o)
- getToastOverlayChild :: (MonadIO m, IsToastOverlay o) => o -> m (Maybe Widget)
- setToastOverlayChild :: (MonadIO m, IsToastOverlay o, IsWidget a) => o -> a -> m ()
Exported types
newtype ToastOverlay Source #
Memory-managed wrapper type.
ToastOverlay (ManagedPtr ToastOverlay) |
Instances
Eq ToastOverlay Source # | |
Defined in GI.Adw.Objects.ToastOverlay (==) :: ToastOverlay -> ToastOverlay -> Bool # (/=) :: ToastOverlay -> ToastOverlay -> Bool # | |
GObject ToastOverlay Source # | |
Defined in GI.Adw.Objects.ToastOverlay | |
ManagedPtrNewtype ToastOverlay Source # | |
Defined in GI.Adw.Objects.ToastOverlay toManagedPtr :: ToastOverlay -> ManagedPtr ToastOverlay | |
TypedObject ToastOverlay Source # | |
Defined in GI.Adw.Objects.ToastOverlay | |
HasParentTypes ToastOverlay Source # | |
Defined in GI.Adw.Objects.ToastOverlay | |
IsGValue (Maybe ToastOverlay) Source # | Convert |
Defined in GI.Adw.Objects.ToastOverlay gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe ToastOverlay -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe ToastOverlay) | |
type ParentTypes ToastOverlay Source # | |
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
(GObject o, IsDescendantOf ToastOverlay o) => IsToastOverlay o Source # | |
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
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
:: (HasCallStack, MonadIO m, IsToastOverlay a, IsToast b) | |
=> a |
|
-> b |
|
-> 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
:: (HasCallStack, MonadIO m, IsToastOverlay a) | |
=> a |
|
-> m (Maybe Widget) | Returns: the child widget of |
Gets the child widget of self
.
Since: 1.0
new
:: (HasCallStack, MonadIO m) | |
=> m ToastOverlay | Returns: the new created |
Creates a new AdwToastOverlay
.
Since: 1.0
setChild
:: (HasCallStack, MonadIO m, IsToastOverlay a, IsWidget b) | |
=> a |
|
-> Maybe b |
|
-> 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 ]