gi-adwaita-1.0.7: 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.Window

Description

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. Instead, [classtoolbarView] can be used together with [classheaderBar] or HeaderBar as follows:

xml code

<object class="AdwWindow">
  <property name="content">
    <object class="AdwToolbarView">
      <child type="top">
        <object class="AdwHeaderBar"/>
      </child>
      <property name="content">
        <!-- ... -->
      </property>
    </object>
  </property>
</object>

Using Window:titlebar or Window:child is not supported and will result in a crash. Use [propertywindow:content] instead.

Dialogs

AdwWindow can contain [classdialog]. Use [methoddialog.present] with the window or a widget within a window to show a dialog.

Breakpoints

AdwWindow can be used with [classbreakpoint] the same way as [classbreakpointBin]. Refer to that widget's documentation for details.

Example:

xml code

<object class="AdwWindow">
  <property name="width-request">360</property>
  <property name="height-request">200</property>
  <property name="content">
    <object class="AdwToolbarView">
      <child type="top">
        <object class="AdwHeaderBar"/>
      </child>
      <property name="content">
        <!-- ... -->
      </property>
      <child type="bottom">
        <object class="GtkActionBar" id="bottom_bar">
          <property name="revealed">True</property>
          <property name="visible">False</property>
        </object>
      </child>
    </object>
  </property>
  <child>
    <object class="AdwBreakpoint">
      <condition>max-width: 500px</condition>
      <setter object="bottom_bar" property="visible">True</setter>
    </object>
  </child>
</object>

Like AdwBreakpointBin, if breakpoints are used, AdwWindow doesn't have a minimum size, and Widget:widthRequest and Widget:heightRequest properties must be set manually.

Synopsis

Exported types

newtype Window Source #

Memory-managed wrapper type.

Constructors

Window (ManagedPtr Window) 

Instances

Instances details
Eq Window Source # 
Instance details

Defined in GI.Adw.Objects.Window

Methods

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

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

GObject Window Source # 
Instance details

Defined in GI.Adw.Objects.Window

ManagedPtrNewtype Window Source # 
Instance details

Defined in GI.Adw.Objects.Window

Methods

toManagedPtr :: Window -> ManagedPtr Window

TypedObject Window Source # 
Instance details

Defined in GI.Adw.Objects.Window

Methods

glibType :: IO GType

HasParentTypes Window Source # 
Instance details

Defined in GI.Adw.Objects.Window

IsGValue (Maybe Window) Source #

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

Instance details

Defined in GI.Adw.Objects.Window

Methods

gvalueGType_ :: IO GType

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

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

type ParentTypes Window Source # 
Instance details

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 #

Type class for types which can be safely cast to Window, for instance with toWindow.

Instances

Instances details
(GObject o, IsDescendantOf Window o) => IsWindow o Source # 
Instance details

Defined in GI.Adw.Objects.Window

toWindow :: (MonadIO m, IsWindow o) => o -> m Window Source #

Cast to Window, 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, addBreakpoint, addController, addCssClass, addMnemonicLabel, addTickCallback, allocate, announce, 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, isSuspended, 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, getBaseline, getBounds, getBuildableId, getCanFocus, getCanTarget, getChild, getChildVisible, getClipboard, getColor, getContent, getCssClasses, getCssName, getCurrentBreakpoint, getCursor, getData, getDecorated, getDefaultSize, getDefaultWidget, getDeletable, getDestroyWithParent, getDialogs, 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, getVisibleDialog, 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.

addBreakpoint

windowAddBreakpoint Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a, IsBreakpoint b) 
=> a

self: a window

-> b

breakpoint: the breakpoint to add

-> m () 

Adds breakpoint to self.

Since: 1.4

getContent

windowGetContent Source #

Arguments

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

self: a window

-> m (Maybe Widget)

Returns: the content widget of self

Gets the content widget of self.

This method should always be used instead of windowGetChild.

getCurrentBreakpoint

windowGetCurrentBreakpoint Source #

Arguments

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

self: a window

-> m (Maybe Breakpoint)

Returns: the current breakpoint

Gets the current breakpoint.

Since: 1.4

getDialogs

windowGetDialogs Source #

Arguments

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

self: a window

-> m ListModel

Returns: a list model for the dialogs of self

Returns a ListModel that contains the open dialogs of self.

This can be used to keep an up-to-date view.

Since: 1.5

getVisibleDialog

windowGetVisibleDialog Source #

Arguments

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

self: a window

-> m (Maybe Dialog)

Returns: the visible dialog

Returns the currently visible dialog in self, if there's one.

Since: 1.5

new

windowNew Source #

Arguments

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

Returns: the newly created AdwWindow

Creates a new AdwWindow.

setContent

windowSetContent Source #

Arguments

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

self: a window

-> Maybe b

content: the content widget

-> 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 ]

currentBreakpoint

The current breakpoint.

Since: 1.4

getWindowCurrentBreakpoint :: (MonadIO m, IsWindow o) => o -> m (Maybe Breakpoint) Source #

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

get window #currentBreakpoint

dialogs

The open dialogs.

Since: 1.5

getWindowDialogs :: (MonadIO m, IsWindow o) => o -> m (Maybe ListModel) Source #

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

get window #dialogs

visibleDialog

The currently visible dialog

Since: 1.5

getWindowVisibleDialog :: (MonadIO m, IsWindow o) => o -> m (Maybe Dialog) Source #

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

get window #visibleDialog