gi-gtk4-4.0.12: Gtk 4.x bindings

Copyright | Will Thompson and Iñaki García Etxebarria
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.Gtk.Objects.Window

Contents

- Exported types
- Methods
  - close
  - destroy
  - fullscreen
  - fullscreenOnMonitor
  - getApplication
  - getChild
  - getDecorated
  - getDefaultIconName
  - getDefaultSize
  - getDefaultWidget
  - getDeletable
  - getDestroyWithParent
  - getFocus
  - getFocusVisible
  - getGravity
  - getGroup
  - getHandleMenubarAccel
  - getHideOnClose
  - getIconName
  - getMnemonicsVisible
  - getModal
  - getResizable
  - getTitle
  - getTitlebar
  - getToplevels
  - getTransientFor
  - hasGroup
  - isActive
  - isFullscreen
  - isMaximized
  - isSuspended
  - listToplevels
  - maximize
  - minimize
  - new
  - present
  - presentWithTime
  - setApplication
  - setAutoStartupNotification
  - setChild
  - setDecorated
  - setDefaultIconName
  - setDefaultSize
  - setDefaultWidget
  - setDeletable
  - setDestroyWithParent
  - setDisplay
  - setFocus
  - setFocusVisible
  - setGravity
  - setHandleMenubarAccel
  - setHideOnClose
  - setIconName
  - setInteractiveDebugging
  - setMnemonicsVisible
  - setModal
  - setResizable
  - setStartupId
  - setTitle
  - setTitlebar
  - setTransientFor
  - unfullscreen
  - unmaximize
  - unminimize
- Properties
  - application
  - child
  - decorated
  - defaultHeight
  - defaultWidget
  - defaultWidth
  - deletable
  - destroyWithParent
  - display
  - focusVisible
  - focusWidget
  - fullscreened
  - gravity
  - handleMenubarAccel
  - hideOnClose
  - iconName
  - isActive
  - maximized
  - mnemonicsVisible
  - modal
  - resizable
  - startupId
  - suspended
  - title
  - titlebar
  - transientFor
- Signals
  - activateDefault
  - activateFocus
  - closeRequest
  - enableDebugging
  - forceClose
  - keysChanged

Description

A toplevel window which can contain other widgets.

<picture> <source srcset="window-dark.png" media="(prefers-color-scheme: dark)"> <img alt="An example GtkWindow" src="window.png"> </picture>

Windows normally have decorations that are under the control of the windowing system and allow the user to manipulate the window (resize it, move it, close it,...).

# GtkWindow as GtkBuildable

The `GtkWindow` implementation of the `Buildable` interface supports setting a child as the titlebar by specifying “titlebar” as the “type” attribute of a `<child>` element.

# Shortcuts and Gestures

`GtkWindow` supports the following keyboard shortcuts:

- <kbd>F10</kbd> activates the menubar, if present.
- <kbd>Alt</kbd> makes the mnemonics visible while pressed.

The following signals have default keybindings:

- Window::activateDefault
- Window::activateFocus
- Window::enableDebugging

# Actions

`GtkWindow` defines a set of built-in actions:

- `default.activate` activates the default widget.
- `window.minimize` minimizes the window.
- `window.toggle-maximized` maximizes or restores the window.
- `window.close` closes the window.

# CSS nodes

    window.background [.csd / .solid-csd / .ssd] [.maximized / .fullscreen / .tiled]
    ├── <child>
    ╰── <titlebar child>.titlebar [.default-decoration]

`GtkWindow` has a main CSS node with name window and style class .background.

Style classes that are typically used with the main CSS node are .csd (when client-side decorations are in use), .solid-csd (for client-side decorations without invisible borders), .ssd (used by mutter when rendering server-side decorations). GtkWindow also represents window states with the following style classes on the main node: .maximized, .fullscreen, .tiled (when supported, also .tiled-top, .tiled-left, .tiled-right, .tiled-bottom).

`GtkWindow` subclasses often add their own discriminating style classes, such as .dialog, .popup or .tooltip.

Generally, some CSS properties don't make sense on the toplevel window node, such as margins or padding. When client-side decorations without invisible borders are in use (i.e. the .solid-csd style class is added to the main window node), the CSS border of the toplevel window is used for resize drags. In the .csd case, the shadow area outside of the window can be used to resize it.

`GtkWindow` adds the .titlebar and .default-decoration style classes to the widget that is added as a titlebar child.

# Accessibility

`GtkWindow` uses the `AccessibleRoleWindow` role.

From GTK 4.12 to 4.18, it used the `AccessibleRoleApplication` role.

Synopsis

- newtype Window = Window (ManagedPtr Window)
- class (GObject o, IsDescendantOf Window o) => IsWindow o
- toWindow :: (MonadIO m, IsWindow o) => o -> m Window
- windowClose :: (HasCallStack, MonadIO m, IsWindow a) => a -> m ()
- windowDestroy :: (HasCallStack, MonadIO m, IsWindow a) => a -> m ()
- windowFullscreen :: (HasCallStack, MonadIO m, IsWindow a) => a -> m ()
- windowFullscreenOnMonitor :: (HasCallStack, MonadIO m, IsWindow a, IsMonitor b) => a -> b -> m ()
- windowGetApplication :: (HasCallStack, MonadIO m, IsWindow a) => a -> m (Maybe Application)
- windowGetChild :: (HasCallStack, MonadIO m, IsWindow a) => a -> m (Maybe Widget)
- windowGetDecorated :: (HasCallStack, MonadIO m, IsWindow a) => a -> m Bool
- windowGetDefaultIconName :: (HasCallStack, MonadIO m) => m (Maybe Text)
- windowGetDefaultSize :: (HasCallStack, MonadIO m, IsWindow a) => a -> m (Int32, Int32)
- windowGetDefaultWidget :: (HasCallStack, MonadIO m, IsWindow a) => a -> m (Maybe Widget)
- windowGetDeletable :: (HasCallStack, MonadIO m, IsWindow a) => a -> m Bool
- windowGetDestroyWithParent :: (HasCallStack, MonadIO m, IsWindow a) => a -> m Bool
- windowGetFocus :: (HasCallStack, MonadIO m, IsWindow a) => a -> m (Maybe Widget)
- windowGetFocusVisible :: (HasCallStack, MonadIO m, IsWindow a) => a -> m Bool
- windowGetGravity :: (HasCallStack, MonadIO m, IsWindow a) => a -> m WindowGravity
- windowGetGroup :: (HasCallStack, MonadIO m, IsWindow a) => Maybe a -> m WindowGroup
- windowGetHandleMenubarAccel :: (HasCallStack, MonadIO m, IsWindow a) => a -> m Bool
- windowGetHideOnClose :: (HasCallStack, MonadIO m, IsWindow a) => a -> m Bool
- windowGetIconName :: (HasCallStack, MonadIO m, IsWindow a) => a -> m (Maybe Text)
- windowGetMnemonicsVisible :: (HasCallStack, MonadIO m, IsWindow a) => a -> m Bool
- windowGetModal :: (HasCallStack, MonadIO m, IsWindow a) => a -> m Bool
- windowGetResizable :: (HasCallStack, MonadIO m, IsWindow a) => a -> m Bool
- windowGetTitle :: (HasCallStack, MonadIO m, IsWindow a) => a -> m (Maybe Text)
- windowGetTitlebar :: (HasCallStack, MonadIO m, IsWindow a) => a -> m (Maybe Widget)
- windowGetToplevels :: (HasCallStack, MonadIO m) => m ListModel
- windowGetTransientFor :: (HasCallStack, MonadIO m, IsWindow a) => a -> m (Maybe Window)
- windowHasGroup :: (HasCallStack, MonadIO m, IsWindow a) => a -> m Bool
- windowIsActive :: (HasCallStack, MonadIO m, IsWindow a) => a -> m Bool
- windowIsFullscreen :: (HasCallStack, MonadIO m, IsWindow a) => a -> m Bool
- windowIsMaximized :: (HasCallStack, MonadIO m, IsWindow a) => a -> m Bool
- windowIsSuspended :: (HasCallStack, MonadIO m, IsWindow a) => a -> m Bool
- windowListToplevels :: (HasCallStack, MonadIO m) => m [Widget]
- windowMaximize :: (HasCallStack, MonadIO m, IsWindow a) => a -> m ()
- windowMinimize :: (HasCallStack, MonadIO m, IsWindow a) => a -> m ()
- windowNew :: (HasCallStack, MonadIO m) => m Window
- windowPresent :: (HasCallStack, MonadIO m, IsWindow a) => a -> m ()
- windowPresentWithTime :: (HasCallStack, MonadIO m, IsWindow a) => a -> Word32 -> m ()
- windowSetApplication :: (HasCallStack, MonadIO m, IsWindow a, IsApplication b) => a -> Maybe b -> m ()
- windowSetAutoStartupNotification :: (HasCallStack, MonadIO m) => Bool -> m ()
- windowSetChild :: (HasCallStack, MonadIO m, IsWindow a, IsWidget b) => a -> Maybe b -> m ()
- windowSetDecorated :: (HasCallStack, MonadIO m, IsWindow a) => a -> Bool -> m ()
- windowSetDefaultIconName :: (HasCallStack, MonadIO m) => Text -> m ()
- windowSetDefaultSize :: (HasCallStack, MonadIO m, IsWindow a) => a -> Int32 -> Int32 -> m ()
- windowSetDefaultWidget :: (HasCallStack, MonadIO m, IsWindow a, IsWidget b) => a -> Maybe b -> m ()
- windowSetDeletable :: (HasCallStack, MonadIO m, IsWindow a) => a -> Bool -> m ()
- windowSetDestroyWithParent :: (HasCallStack, MonadIO m, IsWindow a) => a -> Bool -> m ()
- windowSetDisplay :: (HasCallStack, MonadIO m, IsWindow a, IsDisplay b) => a -> b -> m ()
- windowSetFocus :: (HasCallStack, MonadIO m, IsWindow a, IsWidget b) => a -> Maybe b -> m ()
- windowSetFocusVisible :: (HasCallStack, MonadIO m, IsWindow a) => a -> Bool -> m ()
- windowSetGravity :: (HasCallStack, MonadIO m, IsWindow a) => a -> WindowGravity -> m ()
- windowSetHandleMenubarAccel :: (HasCallStack, MonadIO m, IsWindow a) => a -> Bool -> m ()
- windowSetHideOnClose :: (HasCallStack, MonadIO m, IsWindow a) => a -> Bool -> m ()
- windowSetIconName :: (HasCallStack, MonadIO m, IsWindow a) => a -> Maybe Text -> m ()
- windowSetInteractiveDebugging :: (HasCallStack, MonadIO m) => Bool -> m ()
- windowSetMnemonicsVisible :: (HasCallStack, MonadIO m, IsWindow a) => a -> Bool -> m ()
- windowSetModal :: (HasCallStack, MonadIO m, IsWindow a) => a -> Bool -> m ()
- windowSetResizable :: (HasCallStack, MonadIO m, IsWindow a) => a -> Bool -> m ()
- windowSetStartupId :: (HasCallStack, MonadIO m, IsWindow a) => a -> Text -> m ()
- windowSetTitle :: (HasCallStack, MonadIO m, IsWindow a) => a -> Maybe Text -> m ()
- windowSetTitlebar :: (HasCallStack, MonadIO m, IsWindow a, IsWidget b) => a -> Maybe b -> m ()
- windowSetTransientFor :: (HasCallStack, MonadIO m, IsWindow a, IsWindow b) => a -> Maybe b -> m ()
- windowUnfullscreen :: (HasCallStack, MonadIO m, IsWindow a) => a -> m ()
- windowUnmaximize :: (HasCallStack, MonadIO m, IsWindow a) => a -> m ()
- windowUnminimize :: (HasCallStack, MonadIO m, IsWindow a) => a -> m ()
- clearWindowApplication :: (MonadIO m, IsWindow o) => o -> m ()
- constructWindowApplication :: (IsWindow o, MonadIO m, IsApplication a) => a -> m (GValueConstruct o)
- getWindowApplication :: (MonadIO m, IsWindow o) => o -> m (Maybe Application)
- setWindowApplication :: (MonadIO m, IsWindow o, IsApplication a) => o -> a -> m ()
- clearWindowChild :: (MonadIO m, IsWindow o) => o -> m ()
- constructWindowChild :: (IsWindow o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o)
- getWindowChild :: (MonadIO m, IsWindow o) => o -> m (Maybe Widget)
- setWindowChild :: (MonadIO m, IsWindow o, IsWidget a) => o -> a -> m ()
- constructWindowDecorated :: (IsWindow o, MonadIO m) => Bool -> m (GValueConstruct o)
- getWindowDecorated :: (MonadIO m, IsWindow o) => o -> m Bool
- setWindowDecorated :: (MonadIO m, IsWindow o) => o -> Bool -> m ()
- constructWindowDefaultHeight :: (IsWindow o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getWindowDefaultHeight :: (MonadIO m, IsWindow o) => o -> m Int32
- setWindowDefaultHeight :: (MonadIO m, IsWindow o) => o -> Int32 -> m ()
- clearWindowDefaultWidget :: (MonadIO m, IsWindow o) => o -> m ()
- constructWindowDefaultWidget :: (IsWindow o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o)
- getWindowDefaultWidget :: (MonadIO m, IsWindow o) => o -> m (Maybe Widget)
- setWindowDefaultWidget :: (MonadIO m, IsWindow o, IsWidget a) => o -> a -> m ()
- constructWindowDefaultWidth :: (IsWindow o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getWindowDefaultWidth :: (MonadIO m, IsWindow o) => o -> m Int32
- setWindowDefaultWidth :: (MonadIO m, IsWindow o) => o -> Int32 -> m ()
- constructWindowDeletable :: (IsWindow o, MonadIO m) => Bool -> m (GValueConstruct o)
- getWindowDeletable :: (MonadIO m, IsWindow o) => o -> m Bool
- setWindowDeletable :: (MonadIO m, IsWindow o) => o -> Bool -> m ()
- constructWindowDestroyWithParent :: (IsWindow o, MonadIO m) => Bool -> m (GValueConstruct o)
- getWindowDestroyWithParent :: (MonadIO m, IsWindow o) => o -> m Bool
- setWindowDestroyWithParent :: (MonadIO m, IsWindow o) => o -> Bool -> m ()
- constructWindowDisplay :: (IsWindow o, MonadIO m, IsDisplay a) => a -> m (GValueConstruct o)
- getWindowDisplay :: (MonadIO m, IsWindow o) => o -> m (Maybe Display)
- setWindowDisplay :: (MonadIO m, IsWindow o, IsDisplay a) => o -> a -> m ()
- constructWindowFocusVisible :: (IsWindow o, MonadIO m) => Bool -> m (GValueConstruct o)
- getWindowFocusVisible :: (MonadIO m, IsWindow o) => o -> m Bool
- setWindowFocusVisible :: (MonadIO m, IsWindow o) => o -> Bool -> m ()
- clearWindowFocusWidget :: (MonadIO m, IsWindow o) => o -> m ()
- constructWindowFocusWidget :: (IsWindow o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o)
- getWindowFocusWidget :: (MonadIO m, IsWindow o) => o -> m (Maybe Widget)
- setWindowFocusWidget :: (MonadIO m, IsWindow o, IsWidget a) => o -> a -> m ()
- constructWindowFullscreened :: (IsWindow o, MonadIO m) => Bool -> m (GValueConstruct o)
- getWindowFullscreened :: (MonadIO m, IsWindow o) => o -> m Bool
- setWindowFullscreened :: (MonadIO m, IsWindow o) => o -> Bool -> m ()
- constructWindowGravity :: (IsWindow o, MonadIO m) => WindowGravity -> m (GValueConstruct o)
- getWindowGravity :: (MonadIO m, IsWindow o) => o -> m WindowGravity
- setWindowGravity :: (MonadIO m, IsWindow o) => o -> WindowGravity -> m ()
- constructWindowHandleMenubarAccel :: (IsWindow o, MonadIO m) => Bool -> m (GValueConstruct o)
- getWindowHandleMenubarAccel :: (MonadIO m, IsWindow o) => o -> m Bool
- setWindowHandleMenubarAccel :: (MonadIO m, IsWindow o) => o -> Bool -> m ()
- constructWindowHideOnClose :: (IsWindow o, MonadIO m) => Bool -> m (GValueConstruct o)
- getWindowHideOnClose :: (MonadIO m, IsWindow o) => o -> m Bool
- setWindowHideOnClose :: (MonadIO m, IsWindow o) => o -> Bool -> m ()
- clearWindowIconName :: (MonadIO m, IsWindow o) => o -> m ()
- constructWindowIconName :: (IsWindow o, MonadIO m) => Text -> m (GValueConstruct o)
- getWindowIconName :: (MonadIO m, IsWindow o) => o -> m (Maybe Text)
- setWindowIconName :: (MonadIO m, IsWindow o) => o -> Text -> m ()
- getWindowIsActive :: (MonadIO m, IsWindow o) => o -> m Bool
- constructWindowMaximized :: (IsWindow o, MonadIO m) => Bool -> m (GValueConstruct o)
- getWindowMaximized :: (MonadIO m, IsWindow o) => o -> m Bool
- setWindowMaximized :: (MonadIO m, IsWindow o) => o -> Bool -> m ()
- constructWindowMnemonicsVisible :: (IsWindow o, MonadIO m) => Bool -> m (GValueConstruct o)
- getWindowMnemonicsVisible :: (MonadIO m, IsWindow o) => o -> m Bool
- setWindowMnemonicsVisible :: (MonadIO m, IsWindow o) => o -> Bool -> m ()
- constructWindowModal :: (IsWindow o, MonadIO m) => Bool -> m (GValueConstruct o)
- getWindowModal :: (MonadIO m, IsWindow o) => o -> m Bool
- setWindowModal :: (MonadIO m, IsWindow o) => o -> Bool -> m ()
- constructWindowResizable :: (IsWindow o, MonadIO m) => Bool -> m (GValueConstruct o)
- getWindowResizable :: (MonadIO m, IsWindow o) => o -> m Bool
- setWindowResizable :: (MonadIO m, IsWindow o) => o -> Bool -> m ()
- constructWindowStartupId :: (IsWindow o, MonadIO m) => Text -> m (GValueConstruct o)
- setWindowStartupId :: (MonadIO m, IsWindow o) => o -> Text -> m ()
- getWindowSuspended :: (MonadIO m, IsWindow o) => o -> m Bool
- clearWindowTitle :: (MonadIO m, IsWindow o) => o -> m ()
- constructWindowTitle :: (IsWindow o, MonadIO m) => Text -> m (GValueConstruct o)
- getWindowTitle :: (MonadIO m, IsWindow o) => o -> m (Maybe Text)
- setWindowTitle :: (MonadIO m, IsWindow o) => o -> Text -> m ()
- clearWindowTitlebar :: (MonadIO m, IsWindow o) => o -> m ()
- constructWindowTitlebar :: (IsWindow o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o)
- getWindowTitlebar :: (MonadIO m, IsWindow o) => o -> m (Maybe Widget)
- setWindowTitlebar :: (MonadIO m, IsWindow o, IsWidget a) => o -> a -> m ()
- clearWindowTransientFor :: (MonadIO m, IsWindow o) => o -> m ()
- constructWindowTransientFor :: (IsWindow o, MonadIO m, IsWindow a) => a -> m (GValueConstruct o)
- getWindowTransientFor :: (MonadIO m, IsWindow o) => o -> m (Maybe Window)
- setWindowTransientFor :: (MonadIO m, IsWindow o, IsWindow a) => o -> a -> m ()
- type WindowActivateDefaultCallback = IO ()
- afterWindowActivateDefault :: (IsWindow a, MonadIO m) => a -> ((?self :: a) => WindowActivateDefaultCallback) -> m SignalHandlerId
- onWindowActivateDefault :: (IsWindow a, MonadIO m) => a -> ((?self :: a) => WindowActivateDefaultCallback) -> m SignalHandlerId
- type WindowActivateFocusCallback = IO ()
- afterWindowActivateFocus :: (IsWindow a, MonadIO m) => a -> ((?self :: a) => WindowActivateFocusCallback) -> m SignalHandlerId
- onWindowActivateFocus :: (IsWindow a, MonadIO m) => a -> ((?self :: a) => WindowActivateFocusCallback) -> m SignalHandlerId
- type WindowCloseRequestCallback = IO Bool
- afterWindowCloseRequest :: (IsWindow a, MonadIO m) => a -> ((?self :: a) => WindowCloseRequestCallback) -> m SignalHandlerId
- onWindowCloseRequest :: (IsWindow a, MonadIO m) => a -> ((?self :: a) => WindowCloseRequestCallback) -> m SignalHandlerId
- type WindowEnableDebuggingCallback = Bool -> IO Bool
- afterWindowEnableDebugging :: (IsWindow a, MonadIO m) => a -> ((?self :: a) => WindowEnableDebuggingCallback) -> m SignalHandlerId
- onWindowEnableDebugging :: (IsWindow a, MonadIO m) => a -> ((?self :: a) => WindowEnableDebuggingCallback) -> m SignalHandlerId
- type WindowForceCloseCallback = IO ()
- afterWindowForceClose :: (IsWindow a, MonadIO m) => a -> ((?self :: a) => WindowForceCloseCallback) -> m SignalHandlerId
- onWindowForceClose :: (IsWindow a, MonadIO m) => a -> ((?self :: a) => WindowForceCloseCallback) -> m SignalHandlerId
- type WindowKeysChangedCallback = IO ()
- afterWindowKeysChanged :: (IsWindow a, MonadIO m) => a -> ((?self :: a) => WindowKeysChangedCallback) -> m SignalHandlerId
- onWindowKeysChanged :: (IsWindow a, MonadIO m) => a -> ((?self :: a) => WindowKeysChangedCallback) -> m SignalHandlerId

# Exported types

newtype Window Source #

Memory-managed wrapper type.

Constructors

Window (ManagedPtr Window) |

#### Instances

Instances details

Eq Window Source # |
Instance details Defined in GI.Gtk.Objects.Window Methods (==) :: Window -> Window -> Bool Source # (/=) :: Window -> Window -> Bool Source #
GObject Window Source # |
Instance details Defined in GI.Gtk.Objects.Window
ManagedPtrNewtype Window Source # |
Instance details Defined in GI.Gtk.Objects.Window Methods toManagedPtr :: Window -> ManagedPtr Window Source #
TypedObject Window Source # |
Instance details Defined in GI.Gtk.Objects.Window Methods glibType :: IO GType Source #
HasParentTypes Window Source # |
Instance details Defined in GI.Gtk.Objects.Window
IsGValue (Maybe Window) Source # | Convert `Window` to and from `GValue`. See `toGValue` and `fromGValue`.
Instance details Defined in GI.Gtk.Objects.Window Methods gvalueGType_ :: IO GType Source # gvalueSet_ :: Ptr GValue -> Maybe Window -> IO () Source # gvalueGet_ :: Ptr GValue -> IO (Maybe Window) Source #
type ParentTypes Window Source # |
Instance details Defined in GI.Gtk.Objects.Window type ParentTypes 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.Gtk.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, 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, updatePlatformState, updateProperty, updateRelation, updateState, watchClosure.

#### Getters

getAccessibleId, getAccessibleParent, getAccessibleRole, getAllocatedBaseline, getAllocatedHeight, getAllocatedWidth, getAllocation, getAncestor, getApplication, getAtContext, getBaseline, getBounds, getBuildableId, getCanFocus, getCanTarget, getChild, getChildVisible, getClipboard, getColor, getCssClasses, getCssName, getCursor, getData, getDecorated, getDefaultSize, getDefaultWidget, getDeletable, getDestroyWithParent, getDirection, getDisplay, getFirstAccessibleChild, getFirstChild, getFocus, getFocusChild, getFocusOnClick, getFocusVisible, getFocusable, getFontMap, getFontOptions, getFrameClock, getGravity, getGroup, getHalign, getHandleMenubarAccel, getHasTooltip, getHeight, getHexpand, getHexpandSet, getHideOnClose, getIconName, getLastChild, getLayoutManager, getLimitEvents, 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, setCssClasses, setCursor, setCursorFromName, setData, setDataFull, setDecorated, setDefaultSize, setDefaultWidget, setDeletable, setDestroyWithParent, setDirection, setDisplay, setFocus, setFocusChild, setFocusOnClick, setFocusVisible, setFocusable, setFontMap, setFontOptions, setGravity, setHalign, setHandleMenubarAccel, setHasTooltip, setHexpand, setHexpandSet, setHideOnClose, setIconName, setLayoutManager, setLimitEvents, 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.

## close

windowClose Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) |
=> a | `window`: a window
-> m () |

Requests that the window is closed.

This is similar to what happens when a window manager close button is clicked.

This function can be used with close buttons in custom titlebars.

## destroy

windowDestroy Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) |
=> a | `window`: the window to destroy
-> m () |

Drops the internal reference GTK holds on toplevel windows.

## fullscreen

windowFullscreen Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) |
=> a | `window`: a window
-> m () |

Asks to place the window in the fullscreen state.

Note that you shouldn’t assume the window is definitely fullscreen afterward, because other entities (e.g. the user or window manager) unfullscreen it again, and not all window managers honor requests to fullscreen windows.

If a window is not explicitly fullscreened or unfullscreened before it is shown, the initial state is at the window managers discretion.

You can track the result of this operation via the Toplevel:state property, or by listening to notifications of the Window:fullscreened property.

## fullscreenOnMonitor

windowFullscreenOnMonitor Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a, IsMonitor b) |
=> a | `window`: a window
-> b | `monitor`: which monitor to go fullscreen on
-> m () |

Asks to place the window in the fullscreen state on the given monitor.

Note that you shouldn't assume the window is definitely fullscreen afterward, or that the windowing system allows fullscreen windows on any given monitor.

You can track the result of this operation via the Toplevel:state property, or by listening to notifications of the Window:fullscreened property.

## getApplication

windowGetApplication Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) |
=> a | `window`: a window
-> m (Maybe Application) | Returns: the application

Gets the application object associated with the window.

## getChild

windowGetChild Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) |
=> a | `window`: a window
-> m (Maybe Widget) | Returns: the child widget of `window`

Gets the child widget of the window.

## getDecorated

windowGetDecorated Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) |
=> a | `window`: a window
-> m Bool | Returns: true if the window has been set to have decorations

Returns whether the window has been set to have decorations.

## getDefaultIconName

windowGetDefaultIconName Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m (Maybe Text) | Returns: the fallback icon name for windows

Returns the fallback icon name for windows.

The returned string is owned by GTK and should not be modified. It is only valid until the next call to `windowSetDefaultIconName`.

## getDefaultSize

windowGetDefaultSize Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) |
=> a | `window`: a window
-> m (Int32, Int32) |

Gets the default size of the window.

A value of 0 for the width or height indicates that a default size has not been explicitly set for that dimension, so the “natural” size of the window will be used.

This function is the recommended way for <https://developer.gnome.org/documentation/tutorials/save-state.html saving window state across restarts of applications>.

## getDefaultWidget

windowGetDefaultWidget Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) |
=> a | `window`: a window
-> m (Maybe Widget) | Returns: the default widget

Returns the default widget for `window`.

## getDeletable

windowGetDeletable Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) |
=> a | `window`: a window
-> m Bool | Returns: true if the window has been set to have a close button

Returns whether the window has been set to have a close button.

## getDestroyWithParent

windowGetDestroyWithParent Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) |
=> a | `window`: a window
-> m Bool | Returns: true if the window will be destroyed with its transient parent

Returns whether the window will be destroyed with its transient parent.

## getFocus

windowGetFocus Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) |
=> a | `window`: a window
-> m (Maybe Widget) | Returns: the currently focused widget

Retrieves the current focused widget within the window.

Note that this is the widget that would have the focus if the toplevel window focused; if the toplevel window is not focused then `gtk_widget_has_focus (widget)` will not be false for the widget.

## getFocusVisible

windowGetFocusVisible Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) |
=> a | `window`: a window
-> m Bool | Returns: true if “focus rectangles” are supposed to be visible in this window

Gets whether “focus rectangles” are supposed to be visible.

## getGravity

windowGetGravity Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) |
=> a | `window`: a window
-> m WindowGravity | Returns: the gravity

Returns the gravity that is used when changing the window size programmatically.

Since: 4.20

## getGroup

windowGetGroup Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) |
=> Maybe a | `window`: a window
-> m WindowGroup | Returns: the window group for `window` or the default group

Returns the group for the window.

If the window has no group, then the default group is returned.

## getHandleMenubarAccel

windowGetHandleMenubarAccel Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) |
=> a | `window`: a window
-> m Bool | Returns: true if the window handles <kbd>F10</kbd>

Returns whether this window reacts to <kbd>F10</kbd> presses by activating a menubar it contains.

Since: 4.2

## getHideOnClose

windowGetHideOnClose Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) |
=> a | `window`: a window
-> m Bool | Returns: true if the window will be hidden

Returns whether the window will be hidden instead of destroyed when the close button is clicked.

## getIconName

windowGetIconName Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) |
=> a | `window`: a window
-> m (Maybe Text) | Returns: the icon name

Returns the name of the themed icon for the window.

## getMnemonicsVisible

windowGetMnemonicsVisible Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) |
=> a | `window`: a window
-> m Bool | Returns: true if mnemonics are supposed to be visible in this window

Gets whether mnemonics are supposed to be visible.

## getModal

windowGetModal Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) |
=> a | `window`: a window
-> m Bool | Returns: true if the window is set to be modal and establishes a grab when shown

Returns whether the window is modal.

## getResizable

windowGetResizable Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) |
=> a | `window`: a window
-> m Bool | Returns: true if the user can resize the window

Gets whether the user can resize the window.

## getTitle

windowGetTitle Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) |
=> a | `window`: a window
-> m (Maybe Text) | Returns: the title

Retrieves the title of the window.

## getTitlebar

windowGetTitlebar Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) |
=> a | `window`: a window
-> m (Maybe Widget) | Returns: the titlebar

Returns the titlebar that has been set with `windowSetTitlebar`.

## getToplevels

windowGetToplevels Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m ListModel | Returns: the list of toplevel widgets

Returns the list of all existing toplevel windows.

If you want to iterate through the list and perform actions involving callbacks that might destroy the widgets or add new ones, be aware that the list of toplevels will change and emit the "items-changed" signal.

## getTransientFor

windowGetTransientFor Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) |
=> a | `window`: a window
-> m (Maybe Window) | Returns: the transient parent

Fetches the transient parent for this window.

## hasGroup

windowHasGroup Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) |
=> a | `window`: a window
-> m Bool | Returns: true if `window` has an explicit window group

Returns whether the window has an explicit window group.

## isActive

windowIsActive Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) |
=> a | `window`: a window
-> m Bool | Returns: true if the window part of the current active window.

Returns whether the window is part of the current active toplevel.

The active toplevel is the window receiving keystrokes.

The return value is `True` if the window is active toplevel itself. You might use this function if you wanted to draw a widget differently in an active window from a widget in an inactive window.

## isFullscreen

windowIsFullscreen Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) |
=> a | `window`: a window
-> m Bool | Returns: whether the window is fullscreen

Retrieves the current fullscreen state of the window.

Note that since fullscreening is ultimately handled by the window manager and happens asynchronously to an application request, you shouldn’t assume the return value of this function changing immediately (or at all), as an effect of calling `windowFullscreen` or `windowUnfullscreen`.

If the window isn't yet mapped, the value returned will whether the initial requested state is fullscreen.

## isMaximized

windowIsMaximized Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) |
=> a | `window`: a window
-> m Bool | Returns: whether the window is maximized

Retrieves the current maximized state of the window.

Note that since maximization is ultimately handled by the window manager and happens asynchronously to an application request, you shouldn’t assume the return value of this function changing immediately (or at all), as an effect of calling `windowMaximize` or `windowUnmaximize`.

If the window isn't yet mapped, the value returned will whether the initial requested state is maximized.

## isSuspended

windowIsSuspended Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) |
=> a | `window`: a window
-> m Bool | Returns: whether the window is suspended

Retrieves the current suspended state of the window.

A window being suspended means it's currently not visible to the user, for example by being on a inactive workspace, minimized, obstructed.

Since: 4.12

## listToplevels

windowListToplevels Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m [Widget] | Returns: list of toplevel widgets

Returns the list of all existing toplevel windows.

The widgets in the list are not individually referenced. If you want to iterate through the list and perform actions involving callbacks that might destroy the widgets, you must call `g_list_foreach (result, (GFunc)g_object_ref, NULL)` first, and then unref all the widgets afterwards.

## maximize

windowMaximize Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) |
=> a | `window`: a window
-> m () |

Asks to maximize the window, so that it fills the screen.

Note that you shouldn’t assume the window is definitely maximized afterward, because other entities (e.g. the user or window manager) could unmaximize it again, and not all window managers support maximization.

It’s permitted to call this function before showing a window, in which case the window will be maximized when it appears onscreen initially.

If a window is not explicitly maximized or unmaximized before it is shown, the initial state is at the window managers discretion. For example, it might decide to maximize a window that almost fills the screen.

You can track the result of this operation via the Toplevel:state property, or by listening to notifications on the Window:maximized property.

## minimize

windowMinimize Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) |
=> a | `window`: a window
-> m () |

Asks to minimize the window.

Note that you shouldn’t assume the window is definitely minimized afterward, because the windowing system might not support this functionality; other entities (e.g. the user or the window manager) could unminimize it again, or there may not be a window manager in which case minimization isn’t possible, etc.

It’s permitted to call this function before showing a window, in which case the window will be minimized before it ever appears onscreen.

You can track result of this operation via the Toplevel:state property.

## new

windowNew Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m Window | Returns: a new `GtkWindow`

Creates a new `GtkWindow`.

To get an undecorated window (without window borders), use `windowSetDecorated`.

All top-level windows created by this function are stored in an internal top-level window list. This list can be obtained from `windowListToplevels`. Due to GTK keeping a reference to the window internally, this function does not return a reference to the caller.

To delete a `GtkWindow`, call `windowDestroy`.

## present

windowPresent Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) |
=> a | `window`: a window
-> m () |

Presents a window to the user.

This may mean raising the window in the stacking order, unminimizing it, moving it to the current desktop and/or giving it the keyboard focus (possibly dependent on the user’s platform, window manager and preferences).

If `window` is hidden, this function also makes it visible.

## presentWithTime

windowPresentWithTime Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) |
=> a | `window`: a window
-> Word32 | `timestamp`: the timestamp of the user interaction (typically a button or key press event) which triggered this call
-> m () |

Deprecated: (Since version 4.14)Use `windowPresent`

Presents a window to the user in response to an user interaction.

See `windowPresent` for more details.

The timestamp should be gathered when the window was requested to be shown (when clicking a link for example), rather than once the window is ready to be shown.

## setApplication

windowSetApplication Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a, IsApplication b) |
=> a | `window`: a window
-> Maybe b | `application`: a `GtkApplication`
-> m () |

Sets or unsets the application object associated with the window.

The application will be kept alive for at least as long as it has any windows associated with it (see `applicationHold` for a way to keep it alive without windows).

Normally, the connection between the application and the window will remain until the window is destroyed, but you can explicitly remove it by setting the `application` to `Nothing`.

This is equivalent to calling `applicationRemoveWindow` and/or `applicationAddWindow` on the old/new applications as relevant.

## setAutoStartupNotification

windowSetAutoStartupNotification Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Bool | `setting`: true to automatically do startup notification
-> m () |

Sets whether the window should request startup notification.

By default, after showing the first window, GTK calls `toplevelSetStartupId`. Call this function to disable the automatic startup notification. You might do this if your first window is a splash screen, and you want to delay notification until after your real main window has been shown, for example.

In that example, you would disable startup notification temporarily, show your splash screen, then re-enable it so that showing the main window would automatically result in notification.

## setChild

windowSetChild Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a, IsWidget b) |
=> a | `window`: a window
-> Maybe b | `child`: the child widget
-> m () |

Sets the child widget of the window.

## setDecorated

windowSetDecorated Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) |
=> a | `window`: a window
-> Bool | `setting`: true to decorate the window
-> m () |

Sets whether the window should be decorated.

By default, windows are decorated with a title bar, resize controls, etc. Some window managers allow GTK to disable these decorations, creating a borderless window. If you set the decorated property to false using this function, GTK will do its best to convince the window manager not to decorate the window. Depending on the system, this function may not have any effect when called on a window that is already visible, so you should call it before calling `widgetShow`.

On Windows, this function always works, since there’s no window manager policy involved.

## setDefaultIconName

windowSetDefaultIconName Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Text | `name`: the name of the themed icon
-> m () |

Sets an icon to be used as fallback.

The fallback icon is used for windows that haven't had `windowSetIconName` called on them.

## setDefaultSize

windowSetDefaultSize Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) |
=> a | `window`: a window
-> Int32 | `width`: width in pixels, or -1 to unset the default width
-> Int32 | `height`: height in pixels, or -1 to unset the default height
-> m () |

Sets the default size of a window.

The default size of a window is the size that will be used if no other constraints apply.

The default size will be updated whenever the window is resized to reflect the new size, unless the window is forced to a size, like when it is maximized or fullscreened.

If the window’s minimum size request is larger than the default, the default will be ignored.

Setting the default size to a value <= 0 will cause it to be ignored and the natural size request will be used instead. It is possible to do this while the window is showing to "reset" it to its initial size.

Unlike `widgetSetSizeRequest`, which sets a size request for a widget and thus would keep users from shrinking the window, this function only sets the initial size, just as if the user had resized the window themselves. Users can still shrink the window again as they normally would. Setting a default size of -1 means to use the “natural” default size (the size request of the window).

If you use this function to reestablish a previously saved window size, note that the appropriate size to save is the one returned by `windowGetDefaultSize`. Using the window allocation directly will not work in all circumstances and can lead to growing or shrinking windows.

## setDefaultWidget

windowSetDefaultWidget Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a, IsWidget b) |
=> a | `window`: a window
-> Maybe b | `defaultWidget`: widget to be the default
-> m () |

Sets the default widget.

The default widget is the widget that is activated when the user presses <kbd>Enter</kbd> in a dialog (for example).

## setDeletable

windowSetDeletable Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) |
=> a | `window`: a window
-> Bool | `setting`: true to decorate the window as deletable
-> m () |

Sets whether the window should be deletable.

By default, windows have a close button in the window frame. Some window managers allow GTK to disable this button. If you set the deletable property to false using this function, GTK will do its best to convince the window manager not to show a close button. Depending on the system, this function may not have any effect when called on a window that is already visible, so you should call it before calling `widgetShow`.

On Windows, this function always works, since there’s no window manager policy involved.

## setDestroyWithParent

windowSetDestroyWithParent Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) |
=> a | `window`: a window
-> Bool | `setting`: whether to destroy the window with its transient parent
-> m () |

Sets whether to destroy the window when the transient parent is destroyed.

This is useful for dialogs that shouldn’t persist beyond the lifetime of the main window they are associated with, for example.

## setDisplay

windowSetDisplay Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a, IsDisplay b) |
=> a | `window`: a window
-> b | `display`: a display
-> m () |

Sets the display where the window is displayed.

If the window is already mapped, it will be unmapped, and then remapped on the new display.

## setFocus

windowSetFocus Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a, IsWidget b) |
=> a | `window`: a window
-> Maybe b | `focus`: the new focus widget
-> m () |

Sets the focus widget.

If `focus` is not the current focus widget, and is focusable, sets it as the focus widget for the window. If `focus` is `Nothing`, unsets the focus widget for this window. To set the focus to a particular widget in the toplevel, it is usually more convenient to use `widgetGrabFocus` instead of this function.

## setFocusVisible

windowSetFocusVisible Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) |
=> a | `window`: a window
-> Bool | `setting`: the new value
-> m () |

Sets whether “focus rectangles” are supposed to be visible.

This property is maintained by GTK based on user input, and should not be set by applications.

## setGravity

windowSetGravity Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) |
=> a | `window`: a window
-> WindowGravity | `gravity`: the new gravity
-> m () |

Sets the gravity that is used when changing the window size programmatically.

Since: 4.20

## setHandleMenubarAccel

windowSetHandleMenubarAccel Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) |
=> a | `window`: a window
-> Bool | `handleMenubarAccel`: true to make `window` handle <kbd>F10</kbd>
-> m () |

Sets whether this window should react to <kbd>F10</kbd> presses by activating a menubar it contains.

Since: 4.2

## setHideOnClose

windowSetHideOnClose Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) |
=> a | `window`: a window
-> Bool | `setting`: whether to hide the window when it is closed
-> m () |

Sets whether clicking the close button will hide the window instead of destroying it.

## setIconName

windowSetIconName Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) |
=> a | `window`: a window
-> Maybe Text | `name`: the name of the themed icon
-> m () |

Sets the icon for the window from a named themed icon.

See the docs for `IconTheme` for more details. On some platforms, the window icon is not used at all.

Note that this has nothing to do with the WM_ICON_NAME property which is mentioned in the ICCCM.

## setInteractiveDebugging

windowSetInteractiveDebugging Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Bool | `enable`: true to enable interactive debugging
-> m () |

Opens or closes the interactive debugger.

The debugger offers access to the widget hierarchy of the application and to useful debugging tools.

This function allows applications that already use <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>I</kbd> (or <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>D</kbd>) for their own key shortcuts to add a different shortcut to open the Inspector.

If you are not overriding the default key shortcuts for the Inspector, you should not use this function.

## setMnemonicsVisible

windowSetMnemonicsVisible Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) |
=> a | `window`: a window
-> Bool | `setting`: the new value
-> m () |

Sets whether mnemonics are supposed to be visible.

This property is maintained by GTK based on user input, and should not be set by applications.

## setModal

windowSetModal Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) |
=> a | `window`: a window
-> Bool | `modal`: whether the window is modal
-> m () |

Sets a window modal or non-modal.

Modal windows prevent interaction with other windows in the same application. To keep modal dialogs on top of main application windows, use `windowSetTransientFor` to make the dialog transient for the parent; most window managers will then disallow lowering the dialog below the parent.

## setResizable

windowSetResizable Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) |
=> a | `window`: a window
-> Bool | `resizable`: true if the user can resize this window
-> m () |

Sets whether the user can resize a window.

Windows are user resizable by default.

## setStartupId

windowSetStartupId Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) |
=> a | `window`: a window
-> Text | `startupId`: a string with startup-notification identifier
-> m () |

Sets the startup notification ID.

Startup notification identifiers are used by desktop environment to track application startup, to provide user feedback and other features. This function changes the corresponding property on the underlying `GdkSurface`.

Normally, startup identifier is managed automatically and you should only use this function in special cases like transferring focus from other processes. You should use this function before calling `windowPresent` or any equivalent function generating a window map event.

This function is only useful on Wayland or X11, not with other GDK backends.

## setTitle

windowSetTitle Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) |
=> a | `window`: a window
-> Maybe Text | `title`: title of the window
-> m () |

Sets the title of the window.

The title of a window will be displayed in its title bar; on the X Window System, the title bar is rendered by the window manager so exactly how the title appears to users may vary according to a user’s exact configuration. The title should help a user distinguish this window from other windows they may have open. A good title might include the application name and current document filename, for example.

Passing `NULL` does the same as setting the title to an empty string.

## setTitlebar

windowSetTitlebar Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a, IsWidget b) |
=> a | `window`: a window
-> Maybe b | `titlebar`: the widget to use as titlebar
-> m () |

Sets a custom titlebar for the window.

A typical widget used here is `HeaderBar`, as it provides various features expected of a titlebar while allowing the addition of child widgets to it.

If you set a custom titlebar, GTK will do its best to convince the window manager not to put its own titlebar on the window. Depending on the system, this function may not work for a window that is already visible, so you set the titlebar before calling `widgetShow`.

## setTransientFor

windowSetTransientFor Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a, IsWindow b) |
=> a | `window`: a window
-> Maybe b | `parent`: parent window
-> m () |

Sets a transient parent for the window.

Dialog windows should be set transient for the main application window they were spawned from. This allows window managers to e.g. keep the dialog on top of the main window, or center the dialog over the main window. `Dialog`.`new_with_buttons`() and other convenience functions in GTK will sometimes call this function on your behalf.

Passing `NULL` for `parent` unsets the current transient window.

On Windows, this function puts the child window on top of the parent, much as the window manager would have done on X.

## unfullscreen

windowUnfullscreen Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) |
=> a | `window`: a window
-> m () |

Asks to remove the fullscreen state for the window, and return to its previous state.

Note that you shouldn’t assume the window is definitely not fullscreen afterward, because other entities (e.g. the user or window manager) could fullscreen it again, and not all window managers honor requests to unfullscreen windows; normally the window will end up restored to its normal state. Just don’t write code that crashes if not.

If a window is not explicitly fullscreened or unfullscreened before it is shown, the initial state is at the window managers discretion.

You can track the result of this operation via the Toplevel:state property, or by listening to notifications of the Window:fullscreened property.

## unmaximize

windowUnmaximize Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) |
=> a | `window`: a window
-> m () |

Asks to unmaximize the window.

Note that you shouldn’t assume the window is definitely unmaximized afterward, because other entities (e.g. the user or window manager) maximize it again, and not all window managers honor requests to unmaximize.

If a window is not explicitly maximized or unmaximized before it is shown, the initial state is at the window managers discretion. For example, it might decide to maximize a window that almost fills the screen.

You can track the result of this operation via the Toplevel:state property, or by listening to notifications on the Window:maximized property.

## unminimize

windowUnminimize Source #

Arguments

:: (HasCallStack, MonadIO m, IsWindow a) |
=> a | `window`: a window
-> m () |

Asks to unminimize the window.

Note that you shouldn’t assume the window is definitely unminimized afterward, because the windowing system might not support this functionality; other entities (e.g. the user or the window manager) could minimize it again, or there may not be a window manager in which case minimization isn’t possible, etc.

You can track result of this operation via the Toplevel:state property.

# Properties

## application

The `GtkApplication` associated with the window.

The application will be kept alive for at least as long as it has any windows associated with it (see `applicationHold` for a way to keep it alive without windows).

Normally, the connection between the application and the window will remain until the window is destroyed, but you can explicitly remove it by setting the this property to `NULL`.

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

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

    clear #application

constructWindowApplication :: (IsWindow o, MonadIO m, IsApplication a) => a -> m (GValueConstruct o) Source #

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

getWindowApplication :: (MonadIO m, IsWindow o) => o -> m (Maybe Application) Source #

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

    get window #application

setWindowApplication :: (MonadIO m, IsWindow o, IsApplication a) => o -> a -> m () Source #

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

    set window [ #application := value ]

## child

The child widget.

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

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

    clear #child

constructWindowChild :: (IsWindow 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`.

getWindowChild :: (MonadIO m, IsWindow o) => o -> m (Maybe Widget) Source #

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

    get window #child

setWindowChild :: (MonadIO m, IsWindow o, IsWidget a) => o -> a -> m () Source #

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

    set window [ #child := value ]

## decorated

Whether the window should have a frame (also known as *decorations*).

constructWindowDecorated :: (IsWindow o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getWindowDecorated :: (MonadIO m, IsWindow o) => o -> m Bool Source #

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

    get window #decorated

setWindowDecorated :: (MonadIO m, IsWindow o) => o -> Bool -> m () Source #

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

    set window [ #decorated := value ]

## defaultHeight

The default height of the window.

constructWindowDefaultHeight :: (IsWindow o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #

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

getWindowDefaultHeight :: (MonadIO m, IsWindow o) => o -> m Int32 Source #

Get the value of the “`default-height`” property. When overloading is enabled, this is equivalent to

    get window #defaultHeight

setWindowDefaultHeight :: (MonadIO m, IsWindow o) => o -> Int32 -> m () Source #

Set the value of the “`default-height`” property. When overloading is enabled, this is equivalent to

    set window [ #defaultHeight := value ]

## defaultWidget

The default widget.

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

Set the value of the “`default-widget`” property to `Nothing`. When overloading is enabled, this is equivalent to

    clear #defaultWidget

constructWindowDefaultWidget :: (IsWindow o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o) Source #

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

getWindowDefaultWidget :: (MonadIO m, IsWindow o) => o -> m (Maybe Widget) Source #

Get the value of the “`default-widget`” property. When overloading is enabled, this is equivalent to

    get window #defaultWidget

setWindowDefaultWidget :: (MonadIO m, IsWindow o, IsWidget a) => o -> a -> m () Source #

Set the value of the “`default-widget`” property. When overloading is enabled, this is equivalent to

    set window [ #defaultWidget := value ]

## defaultWidth

The default width of the window.

constructWindowDefaultWidth :: (IsWindow o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #

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

getWindowDefaultWidth :: (MonadIO m, IsWindow o) => o -> m Int32 Source #

Get the value of the “`default-width`” property. When overloading is enabled, this is equivalent to

    get window #defaultWidth

setWindowDefaultWidth :: (MonadIO m, IsWindow o) => o -> Int32 -> m () Source #

Set the value of the “`default-width`” property. When overloading is enabled, this is equivalent to

    set window [ #defaultWidth := value ]

## deletable

Whether the window frame should have a close button.

constructWindowDeletable :: (IsWindow o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getWindowDeletable :: (MonadIO m, IsWindow o) => o -> m Bool Source #

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

    get window #deletable

setWindowDeletable :: (MonadIO m, IsWindow o) => o -> Bool -> m () Source #

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

    set window [ #deletable := value ]

## destroyWithParent

If this window should be destroyed when the parent is destroyed.

constructWindowDestroyWithParent :: (IsWindow o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getWindowDestroyWithParent :: (MonadIO m, IsWindow o) => o -> m Bool Source #

Get the value of the “`destroy-with-parent`” property. When overloading is enabled, this is equivalent to

    get window #destroyWithParent

setWindowDestroyWithParent :: (MonadIO m, IsWindow o) => o -> Bool -> m () Source #

Set the value of the “`destroy-with-parent`” property. When overloading is enabled, this is equivalent to

    set window [ #destroyWithParent := value ]

## display

The display that will display this window.

constructWindowDisplay :: (IsWindow o, MonadIO m, IsDisplay a) => a -> m (GValueConstruct o) Source #

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

getWindowDisplay :: (MonadIO m, IsWindow o) => o -> m (Maybe Display) Source #

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

    get window #display

setWindowDisplay :: (MonadIO m, IsWindow o, IsDisplay a) => o -> a -> m () Source #

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

    set window [ #display := value ]

## focusVisible

Whether 'focus rectangles' are currently visible in this window.

This property is maintained by GTK based on user input and should not be set by applications.

constructWindowFocusVisible :: (IsWindow o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getWindowFocusVisible :: (MonadIO m, IsWindow o) => o -> m Bool Source #

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

    get window #focusVisible

setWindowFocusVisible :: (MonadIO m, IsWindow o) => o -> Bool -> m () Source #

Set the value of the “`focus-visible`” property. When overloading is enabled, this is equivalent to

    set window [ #focusVisible := value ]

## focusWidget

The focus widget.

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

Set the value of the “`focus-widget`” property to `Nothing`. When overloading is enabled, this is equivalent to

    clear #focusWidget

constructWindowFocusWidget :: (IsWindow o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o) Source #

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

getWindowFocusWidget :: (MonadIO m, IsWindow o) => o -> m (Maybe Widget) Source #

Get the value of the “`focus-widget`” property. When overloading is enabled, this is equivalent to

    get window #focusWidget

setWindowFocusWidget :: (MonadIO m, IsWindow o, IsWidget a) => o -> a -> m () Source #

Set the value of the “`focus-widget`” property. When overloading is enabled, this is equivalent to

    set window [ #focusWidget := value ]

## fullscreened

Whether the window is fullscreen.

Setting this property is the equivalent of calling `windowFullscreen` or `windowUnfullscreen`; either operation is asynchronous, which means you will need to connect to the notify signal in order to know whether the operation was successful.

constructWindowFullscreened :: (IsWindow o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getWindowFullscreened :: (MonadIO m, IsWindow o) => o -> m Bool Source #

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

    get window #fullscreened

setWindowFullscreened :: (MonadIO m, IsWindow o) => o -> Bool -> m () Source #

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

    set window [ #fullscreened := value ]

## gravity

The gravity to use when resizing the window programmatically.

Gravity describes which point of the window we want to keep fixed (meaning that the window will grow in the opposite direction). For example, a gravity of `GTK_WINDOW_GRAVITY_TOP_RIGHT` means that we want the to fix top right corner of the window.

Since: 4.20

constructWindowGravity :: (IsWindow o, MonadIO m) => WindowGravity -> m (GValueConstruct o) Source #

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

getWindowGravity :: (MonadIO m, IsWindow o) => o -> m WindowGravity Source #

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

    get window #gravity

setWindowGravity :: (MonadIO m, IsWindow o) => o -> WindowGravity -> m () Source #

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

    set window [ #gravity := value ]

## handleMenubarAccel

Whether the window frame should handle <kbd>F10</kbd> for activating menubars.

Since: 4.2

constructWindowHandleMenubarAccel :: (IsWindow o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getWindowHandleMenubarAccel :: (MonadIO m, IsWindow o) => o -> m Bool Source #

Get the value of the “`handle-menubar-accel`” property. When overloading is enabled, this is equivalent to

    get window #handleMenubarAccel

setWindowHandleMenubarAccel :: (MonadIO m, IsWindow o) => o -> Bool -> m () Source #

Set the value of the “`handle-menubar-accel`” property. When overloading is enabled, this is equivalent to

    set window [ #handleMenubarAccel := value ]

## hideOnClose

If this window should be hidden instead of destroyed when the user clicks the close button.

constructWindowHideOnClose :: (IsWindow o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getWindowHideOnClose :: (MonadIO m, IsWindow o) => o -> m Bool Source #

Get the value of the “`hide-on-close`” property. When overloading is enabled, this is equivalent to

    get window #hideOnClose

setWindowHideOnClose :: (MonadIO m, IsWindow o) => o -> Bool -> m () Source #

Set the value of the “`hide-on-close`” property. When overloading is enabled, this is equivalent to

    set window [ #hideOnClose := value ]

## iconName

Specifies the name of the themed icon to use as the window icon.

See `IconTheme` for more details.

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

Set the value of the “`icon-name`” property to `Nothing`. When overloading is enabled, this is equivalent to

    clear #iconName

constructWindowIconName :: (IsWindow o, MonadIO m) => Text -> m (GValueConstruct o) Source #

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

getWindowIconName :: (MonadIO m, IsWindow o) => o -> m (Maybe Text) Source #

Get the value of the “`icon-name`” property. When overloading is enabled, this is equivalent to

    get window #iconName

setWindowIconName :: (MonadIO m, IsWindow o) => o -> Text -> m () Source #

Set the value of the “`icon-name`” property. When overloading is enabled, this is equivalent to

    set window [ #iconName := value ]

## isActive

Whether the toplevel is the currently active window.

getWindowIsActive :: (MonadIO m, IsWindow o) => o -> m Bool Source #

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

    get window #isActive

## maximized

Whether the window is maximized.

Setting this property is the equivalent of calling `windowMaximize` or `windowUnmaximize`; either operation is asynchronous, which means you will need to connect to the notify signal in order to know whether the operation was successful.

constructWindowMaximized :: (IsWindow o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getWindowMaximized :: (MonadIO m, IsWindow o) => o -> m Bool Source #

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

    get window #maximized

setWindowMaximized :: (MonadIO m, IsWindow o) => o -> Bool -> m () Source #

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

    set window [ #maximized := value ]

## mnemonicsVisible

Whether mnemonics are currently visible in this window.

This property is maintained by GTK based on user input, and should not be set by applications.

constructWindowMnemonicsVisible :: (IsWindow o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getWindowMnemonicsVisible :: (MonadIO m, IsWindow o) => o -> m Bool Source #

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

    get window #mnemonicsVisible

setWindowMnemonicsVisible :: (MonadIO m, IsWindow o) => o -> Bool -> m () Source #

Set the value of the “`mnemonics-visible`” property. When overloading is enabled, this is equivalent to

    set window [ #mnemonicsVisible := value ]

## modal

If true, the window is modal.

constructWindowModal :: (IsWindow o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getWindowModal :: (MonadIO m, IsWindow o) => o -> m Bool Source #

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

    get window #modal

setWindowModal :: (MonadIO m, IsWindow o) => o -> Bool -> m () Source #

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

    set window [ #modal := value ]

## resizable

If true, users can resize the window.

constructWindowResizable :: (IsWindow o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getWindowResizable :: (MonadIO m, IsWindow o) => o -> m Bool Source #

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

    get window #resizable

setWindowResizable :: (MonadIO m, IsWindow o) => o -> Bool -> m () Source #

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

    set window [ #resizable := value ]

## startupId

A write-only property for setting window's startup notification identifier.

constructWindowStartupId :: (IsWindow o, MonadIO m) => Text -> m (GValueConstruct o) Source #

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

setWindowStartupId :: (MonadIO m, IsWindow o) => o -> Text -> m () Source #

Set the value of the “`startup-id`” property. When overloading is enabled, this is equivalent to

    set window [ #startupId := value ]

## suspended

Whether the window is suspended.

See `windowIsSuspended` for details about what suspended means.

Since: 4.12

getWindowSuspended :: (MonadIO m, IsWindow o) => o -> m Bool Source #

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

    get window #suspended

## title

The title of the window.

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

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

    clear #title

constructWindowTitle :: (IsWindow o, MonadIO m) => Text -> m (GValueConstruct o) Source #

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

getWindowTitle :: (MonadIO m, IsWindow o) => o -> m (Maybe Text) Source #

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

    get window #title

setWindowTitle :: (MonadIO m, IsWindow o) => o -> Text -> m () Source #

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

    set window [ #title := value ]

## titlebar

The titlebar widget.

Since: 4.6

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

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

    clear #titlebar

constructWindowTitlebar :: (IsWindow o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o) Source #

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

getWindowTitlebar :: (MonadIO m, IsWindow o) => o -> m (Maybe Widget) Source #

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

    get window #titlebar

setWindowTitlebar :: (MonadIO m, IsWindow o, IsWidget a) => o -> a -> m () Source #

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

    set window [ #titlebar := value ]

## transientFor

The transient parent of the window.

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

Set the value of the “`transient-for`” property to `Nothing`. When overloading is enabled, this is equivalent to

    clear #transientFor

constructWindowTransientFor :: (IsWindow o, MonadIO m, IsWindow a) => a -> m (GValueConstruct o) Source #

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

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

Get the value of the “`transient-for`” property. When overloading is enabled, this is equivalent to

    get window #transientFor

setWindowTransientFor :: (MonadIO m, IsWindow o, IsWindow a) => o -> a -> m () Source #

Set the value of the “`transient-for`” property. When overloading is enabled, this is equivalent to

    set window [ #transientFor := value ]

# Signals

## activateDefault

type WindowActivateDefaultCallback = IO () Source #

Emitted when the user activates the default widget.

This is a keybinding signal.

The keybindings for this signal are all forms of the <kbd>Enter</kbd> key.

afterWindowActivateDefault :: (IsWindow a, MonadIO m) => a -> ((?self :: a) => WindowActivateDefaultCallback) -> m SignalHandlerId Source #

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

    after window #activateDefault 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.

onWindowActivateDefault :: (IsWindow a, MonadIO m) => a -> ((?self :: a) => WindowActivateDefaultCallback) -> m SignalHandlerId Source #

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

    on window #activateDefault callback

## activateFocus

type WindowActivateFocusCallback = IO () Source #

Emitted when the user activates the currently focused widget of `window`.

This is a keybinding signal.

The default binding for this signal is <kbd>␣</kbd>.

afterWindowActivateFocus :: (IsWindow a, MonadIO m) => a -> ((?self :: a) => WindowActivateFocusCallback) -> m SignalHandlerId Source #

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

    after window #activateFocus 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.

onWindowActivateFocus :: (IsWindow a, MonadIO m) => a -> ((?self :: a) => WindowActivateFocusCallback) -> m SignalHandlerId Source #

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

    on window #activateFocus callback

## closeRequest

type WindowCloseRequestCallback Source #

Arguments

= IO Bool | Returns: true to stop other handlers from being invoked for the signal

Emitted when the user clicks on the close button of the window.

afterWindowCloseRequest :: (IsWindow a, MonadIO m) => a -> ((?self :: a) => WindowCloseRequestCallback) -> m SignalHandlerId Source #

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

    after window #closeRequest 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.

onWindowCloseRequest :: (IsWindow a, MonadIO m) => a -> ((?self :: a) => WindowCloseRequestCallback) -> m SignalHandlerId Source #

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

    on window #closeRequest callback

## enableDebugging

type WindowEnableDebuggingCallback Source #

Arguments

= Bool | `toggle`: toggle the debugger
-> IO Bool | Returns: true if the key binding was handled

Emitted when the user enables or disables interactive debugging.

When `toggle` is true, interactive debugging is toggled on or off, when it is false, the debugger will be pointed at the widget under the pointer.

This is a keybinding signal.

The default bindings for this signal are <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>I</kbd> and <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>D</kbd>.

afterWindowEnableDebugging :: (IsWindow a, MonadIO m) => a -> ((?self :: a) => WindowEnableDebuggingCallback) -> m SignalHandlerId Source #

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

    after window #enableDebugging 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.

onWindowEnableDebugging :: (IsWindow a, MonadIO m) => a -> ((?self :: a) => WindowEnableDebuggingCallback) -> m SignalHandlerId Source #

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

    on window #enableDebugging callback

## forceClose

type WindowForceCloseCallback = IO () Source #

Emitted when the compositor has decided to eliminate a window.

`window` *has* to be in a hidden state after this signal was handled.

Since: 4.24

afterWindowForceClose :: (IsWindow a, MonadIO m) => a -> ((?self :: a) => WindowForceCloseCallback) -> m SignalHandlerId Source #

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

    after window #forceClose 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.

onWindowForceClose :: (IsWindow a, MonadIO m) => a -> ((?self :: a) => WindowForceCloseCallback) -> m SignalHandlerId Source #

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

    on window #forceClose callback

## keysChanged

type WindowKeysChangedCallback = IO () Source #

Deprecated: (Since version 4.10)Use `Shortcut` and `EventController`to implement keyboard shortcuts

Emitted when the set of accelerators or mnemonics that are associated with the window changes.

afterWindowKeysChanged :: (IsWindow a, MonadIO m) => a -> ((?self :: a) => WindowKeysChangedCallback) -> m SignalHandlerId Source #

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

    after window #keysChanged 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.

onWindowKeysChanged :: (IsWindow a, MonadIO m) => a -> ((?self :: a) => WindowKeysChangedCallback) -> m SignalHandlerId Source #

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

    on window #keysChanged callback