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 freeform window.
<picture> <source srcset="window-dark.png" media="(prefers-color-scheme: dark)"> <img src="window.png" alt="window"> </picture>
The AdwWindow
widget is a subclass of Window
which has no
titlebar area. It means HeaderBar
can be used as follows:
xml code
<object class="AdwWindow"> <property name="content"> <object class="GtkBox"> <property name="orientation">vertical</property> <child> <object class="GtkHeaderBar"/> </child> <child> <!-- ... --> </child> </object> </property> </object>
Using Window:titlebar or Window:child
is not supported and will result in a crash. Use [propertywindow
:content]
instead.
Synopsis
- newtype Window = Window (ManagedPtr Window)
- class (GObject o, IsDescendantOf Window o) => IsWindow o
- toWindow :: (MonadIO m, IsWindow o) => o -> m Window
- windowGetContent :: (HasCallStack, MonadIO m, IsWindow a) => a -> m (Maybe Widget)
- windowNew :: (HasCallStack, MonadIO m) => m Window
- windowSetContent :: (HasCallStack, MonadIO m, IsWindow a, IsWidget b) => a -> Maybe b -> m ()
- clearWindowContent :: (MonadIO m, IsWindow o) => o -> m ()
- constructWindowContent :: (IsWindow o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o)
- getWindowContent :: (MonadIO m, IsWindow o) => o -> m (Maybe Widget)
- setWindowContent :: (MonadIO m, IsWindow o, IsWidget a) => o -> a -> m ()
Exported types
Memory-managed wrapper type.
Instances
Eq Window Source # | |
GObject Window Source # | |
Defined in GI.Adw.Objects.Window | |
ManagedPtrNewtype Window Source # | |
Defined in GI.Adw.Objects.Window toManagedPtr :: Window -> ManagedPtr Window | |
TypedObject Window Source # | |
Defined in GI.Adw.Objects.Window | |
HasParentTypes Window Source # | |
Defined in GI.Adw.Objects.Window | |
IsGValue (Maybe Window) Source # | Convert |
Defined in GI.Adw.Objects.Window gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe Window -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe Window) | |
type ParentTypes Window Source # | |
Defined in GI.Adw.Objects.Window type ParentTypes Window = '[Window, Widget, Object, Accessible, Buildable, ConstraintTarget, Native, Root, ShortcutManager] |
class (GObject o, IsDescendantOf Window o) => IsWindow o Source #
Instances
(GObject o, IsDescendantOf Window o) => IsWindow o Source # | |
Defined in GI.Adw.Objects.Window |
Methods
Click to display all available methods, including inherited ones
Methods
actionSetEnabled, activate, activateAction, activateDefault, addController, addCssClass, addMnemonicLabel, addTickCallback, allocate, bindProperty, bindPropertyFull, childFocus, close, computeBounds, computeExpand, computePoint, computeTransform, contains, createPangoContext, createPangoLayout, destroy, disposeTemplate, dragCheckThreshold, errorBell, forceFloating, freezeNotify, fullscreen, fullscreenOnMonitor, getv, grabFocus, hasCssClass, hasDefault, hasFocus, hasGroup, hasVisibleFocus, hide, inDestruction, initTemplate, insertActionGroup, insertAfter, insertBefore, isActive, isAncestor, isDrawable, isFloating, isFocus, isFullscreen, isMaximized, isSensitive, isVisible, keynavFailed, listMnemonicLabels, map, maximize, measure, minimize, mnemonicActivate, notify, notifyByPspec, observeChildren, observeControllers, pick, present, presentWithTime, queueAllocate, queueDraw, queueResize, realize, ref, refSink, removeController, removeCssClass, removeMnemonicLabel, removeTickCallback, resetProperty, resetRelation, resetState, runDispose, shouldLayout, show, sizeAllocate, snapshotChild, stealData, stealQdata, thawNotify, translateCoordinates, triggerTooltipQuery, unfullscreen, unmap, unmaximize, unminimize, unparent, unrealize, unref, unsetStateFlags, updateNextAccessibleSibling, updateProperty, updateRelation, updateState, watchClosure.
Getters
getAccessibleParent, getAccessibleRole, getAllocatedBaseline, getAllocatedHeight, getAllocatedWidth, getAllocation, getAncestor, getApplication, getAtContext, getBounds, getBuildableId, getCanFocus, getCanTarget, getChild, getChildVisible, getClipboard, getColor, getContent, getCssClasses, getCssName, getCursor, getData, getDecorated, getDefaultSize, getDefaultWidget, getDeletable, getDestroyWithParent, getDirection, getDisplay, getFirstAccessibleChild, getFirstChild, getFocus, getFocusChild, getFocusOnClick, getFocusVisible, getFocusable, getFontMap, getFontOptions, getFrameClock, getGroup, getHalign, getHandleMenubarAccel, getHasTooltip, getHeight, getHexpand, getHexpandSet, getHideOnClose, getIconName, getLastChild, getLayoutManager, getMapped, getMarginBottom, getMarginEnd, getMarginStart, getMarginTop, getMnemonicsVisible, getModal, getName, getNative, getNextAccessibleSibling, getNextSibling, getOpacity, getOverflow, getPangoContext, getParent, getPlatformState, getPreferredSize, getPrevSibling, getPrimaryClipboard, getProperty, getQdata, getRealized, getReceivesDefault, getRenderer, getRequestMode, getResizable, getRoot, getScaleFactor, getSensitive, getSettings, getSize, getSizeRequest, getStateFlags, getStyleContext, getSurface, getSurfaceTransform, getTemplateChild, getTitle, getTitlebar, getTooltipMarkup, getTooltipText, getTransientFor, getValign, getVexpand, getVexpandSet, getVisible, getWidth.
Setters
setAccessibleParent, setApplication, setCanFocus, setCanTarget, setChild, setChildVisible, setContent, setCssClasses, setCursor, setCursorFromName, setData, setDataFull, setDecorated, setDefaultSize, setDefaultWidget, setDeletable, setDestroyWithParent, setDirection, setDisplay, setFocus, setFocusChild, setFocusOnClick, setFocusVisible, setFocusable, setFontMap, setFontOptions, setHalign, setHandleMenubarAccel, setHasTooltip, setHexpand, setHexpandSet, setHideOnClose, setIconName, setLayoutManager, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setMnemonicsVisible, setModal, setName, setOpacity, setOverflow, setParent, setProperty, setReceivesDefault, setResizable, setSensitive, setSizeRequest, setStartupId, setStateFlags, setTitle, setTitlebar, setTooltipMarkup, setTooltipText, setTransientFor, setValign, setVexpand, setVexpandSet, setVisible.
getContent
:: (HasCallStack, MonadIO m, IsWindow a) | |
=> a |
|
-> m (Maybe Widget) | Returns: the content widget of |
Gets the content widget of self
.
This method should always be used instead of windowGetChild
.
new
:: (HasCallStack, MonadIO m) | |
=> m Window | Returns: the newly created |
Creates a new AdwWindow
.
setContent
:: (HasCallStack, MonadIO m, IsWindow a, IsWidget b) | |
=> a |
|
-> Maybe b |
|
-> m () |
Sets the content widget of self
.
This method should always be used instead of windowSetChild
.
Properties
content
The content widget.
This property should always be used instead of Window:child.
clearWindowContent :: (MonadIO m, IsWindow o) => o -> m () Source #
Set the value of the “content
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#content
constructWindowContent :: (IsWindow o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “content
” property. This is rarely needed directly, but it is used by new
.
getWindowContent :: (MonadIO m, IsWindow o) => o -> m (Maybe Widget) Source #
Get the value of the “content
” property.
When overloading is enabled, this is equivalent to
get
window #content
setWindowContent :: (MonadIO m, IsWindow o, IsWidget a) => o -> a -> m () Source #
Set the value of the “content
” property.
When overloading is enabled, this is equivalent to
set
window [ #content:=
value ]