gtk.window

Module for [Window] class

Types 3

classWindow : gtk.bin.Bin

A GtkWindow is a toplevel window which can contain other widgets. 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 #GtkBuildable interface supports a custom <accel-groups> element, which supports any number of <group> elements representing the #GtkAccelGroup objects you want to add to your window (synonymous with [gtk.window.Window.addAccelGroup].

It also supports the <initial-focus> element, whose name property names the widget to receive the focus when the window is mapped.

An example of a UI definition fragment with accel groups:

<object class="GtkWindow">
 <accel-groups>
   <group name="accelgroup1"/>
 </accel-groups>
 <initial-focus name="thunderclap"/>
</object>

...

<object class="GtkAccelGroup" id="accelgroup1"/>

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

CSS nodes

window.background
├── decoration
├── <titlebar child>.titlebar [.default-decoration]
╰── <child>

GtkWindow has a main CSS node with name window and style class .background, and a subnode with name decoration.

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: .tiled, .maximized, .fullscreen. Specialized types of window often add their own discriminating style classes, such as .popup or .tooltip.

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

Methods
GType _gType() @property
Window self()Returns `this`, for use in `with` statements.
WindowGidBuilder builder()Get builder for [gtk.window.Window] Returns: New builder object
bool acceptFocus() @propertyGet `acceptFocus` property. Returns: Whether the window should receive the input focus.
void acceptFocus(bool propval) @propertySet `acceptFocus` property. Params: propval = Whether the window should receive the input focus.
gtk.application.Application application() @propertyGet `application` property. Returns: The #GtkApplication associated with the window.
void application(gtk.application.Application propval) @propertySet `application` property. Params: propval = The #GtkApplication associated with the window.
gtk.widget.Widget attachedTo() @propertyGet `attachedTo` property. Returns: The widget to which this window is attached. See [gtk.window.Window.setAttachedTo].
void attachedTo(gtk.widget.Widget propval) @propertySet `attachedTo` property. Params: propval = The widget to which this window is attached. See [gtk.window.Window.setAttachedTo].
bool decorated() @propertyGet `decorated` property. Returns: Whether the window should be decorated by the window manager.
void decorated(bool propval) @propertySet `decorated` property. Params: propval = Whether the window should be decorated by the window manager.
int defaultHeight() @property
void defaultHeight(int propval) @property
int defaultWidth() @property
void defaultWidth(int propval) @property
bool deletable() @propertyGet `deletable` property. Returns: Whether the window frame should have a close button.
void deletable(bool propval) @propertySet `deletable` property. Params: propval = Whether the window frame should have a close button.
bool destroyWithParent() @property
void destroyWithParent(bool propval) @property
bool focusOnMap() @propertyGet `focusOnMap` property. Returns: Whether the window should receive the input focus when mapped.
void focusOnMap(bool propval) @propertySet `focusOnMap` property. Params: propval = Whether the window should receive the input focus when mapped.
bool focusVisible() @propertyGet `focusVisible` property. Returns: Whether 'focus rectangles' are currently visible in this window.
void focusVisible(bool propval) @propertySet `focusVisible` property. Params: propval = Whether 'focus rectangles' are currently visible in this window.
gdk.types.Gravity gravity() @propertyGet `gravity` property. Returns: The window gravity of the window. See [gtk.window.Window.move] and #GdkGravity for more details about window gravity.
void gravity(gdk.types.Gravity propval) @propertySet `gravity` property. Params: propval = The window gravity of the window. See [gtk.window.Window.move] and #GdkGravity for more details about window gravity.
bool hasResizeGrip() @propertyGet `hasResizeGrip` property. Returns: Whether the window has a corner resize grip.
void hasResizeGrip(bool propval) @propertySet `hasResizeGrip` property. Params: propval = Whether the window has a corner resize grip.
bool hideTitlebarWhenMaximized() @propertyGet `hideTitlebarWhenMaximized` property. Returns: Whether the titlebar should be hidden during maximization.
void hideTitlebarWhenMaximized(bool propval) @propertySet `hideTitlebarWhenMaximized` property. Params: propval = Whether the titlebar should be hidden during maximization.
void icon(gdkpixbuf.pixbuf.Pixbuf propval) @property
string iconName() @propertyGet `iconName` property. Returns: The :icon-name property specifies the name of the themed icon to use as the window icon. See #GtkIconTheme for more details.
void iconName(string propval) @propertySet `iconName` property. Params: propval = The :icon-name property specifies the name of the themed icon to use as the window icon. See #GtkIconTheme for more details.
bool mnemonicsVisible() @propertyGet `mnemonicsVisible` property. Returns: Whether mnemonics are currently visible in this window.
void mnemonicsVisible(bool propval) @propertySet `mnemonicsVisible` property. Params: propval = Whether mnemonics are currently visible in this window.
bool modal() @property
void modal(bool propval) @property
bool resizable() @property
void resizable(bool propval) @property
bool resizeGripVisible() @propertyGet `resizeGripVisible` property. Returns: Whether a corner resize grip is currently shown.
string role() @property
void role(string propval) @property
void screen(gdk.screen.Screen propval) @property
bool skipPagerHint() @property
void skipPagerHint(bool propval) @property
bool skipTaskbarHint() @property
void skipTaskbarHint(bool propval) @property
void startupId(string propval) @propertySet `startupId` property. Params: propval = The :startup-id is a write-only property for setting window's startup notification identifier. See [gtk.window.Window.setStartupId] for more details.
string title() @property
void title(string propval) @property
gtk.window.Window transientFor() @propertyGet `transientFor` property. Returns: The transient parent of the window. See [gtk.window.Window.setTransientFor] for more details about transient windows.
void transientFor(gtk.window.Window propval) @propertySet `transientFor` property. Params: propval = The transient parent of the window. See [gtk.window.Window.setTransientFor] for more details about transient windows.
void typeHint(gdk.types.WindowTypeHint propval) @property
bool urgencyHint() @property
void urgencyHint(bool propval) @property
gdkpixbuf.pixbuf.Pixbuf[] getDefaultIconList()Gets the value set by [gtk.window.Window.setDefaultIconList]. The list is a copy and should be freed with [glib.list.List.free], but the pixbufs in the list have not had their reference count incre...
string getDefaultIconName()Returns the fallback icon name for windows that has been set with [gtk.window.Window.setDefaultIconName]. The returned string is owned by GTK+ and should not be modified. It is only valid until the...
gtk.widget.Widget[] listToplevels()Returns a 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 ...
void setAutoStartupNotification(bool setting)By default, after showing the first #GtkWindow, GTK+ calls [gdk.global.notifyStartupComplete]. Call this function to disable the automatic startup notification. You might do this if your first win...
void setDefaultIcon(gdkpixbuf.pixbuf.Pixbuf icon)Sets an icon to be used as fallback for windows that haven't had [gtk.window.Window.setIcon] called on them from a pixbuf.
bool setDefaultIconFromFile(string filename)Sets an icon to be used as fallback for windows that haven't had [gtk.window.Window.setIconList] called on them from a file on disk. Warns on failure if err is null.
void setDefaultIconName(string name)Sets an icon to be used as fallback for windows that haven't had [gtk.window.Window.setIconList] called on them from a named themed icon, see [gtk.window.Window.setIconName].
void setInteractiveDebugging(bool enable)Opens or closes the [interactive debugger][interactive-debugging], which offers access to the widget hierarchy of the application and to useful debugging tools.
bool activateDefault()Activates the default widget for the window, unless the current focused widget has been configured to receive the default action (see [gtk.widget.Widget.setReceivesDefault]), in which case the focu...
bool activateFocus()Activates the current focused widget within the window. Returns: true if a widget got activated.
bool activateKey(gdk.event_key.EventKey event)Activates mnemonics and accelerators for this #GtkWindow. This is normally called by the default ::keypressevent handler for toplevel windows, however in some cases it may be useful to call this di...
void addAccelGroup(gtk.accel_group.AccelGroup accelGroup)Associate accelgroup with window, such that calling [gtk.global.accelGroupsActivate] on window will activate accelerators in accelgroup.
void addMnemonic(uint keyval, gtk.widget.Widget target)Adds a mnemonic to this window.
void beginMoveDrag(int button, int rootX, int rootY, uint timestamp)Starts moving a window. This function is used if an application has window movement grips. When GDK can support it, the window movement will be done using the standard mechanism for the [window man...
void beginResizeDrag(gdk.types.WindowEdge edge, int button, int rootX, int rootY, uint timestamp)Starts resizing a window. This function is used if an application has window resizing controls. When GDK can support it, the resize will be done using the standard mechanism for the [window manager...
void close()Requests that the window is closed, similar to what happens when a window manager close button is clicked.
void deiconify()Asks to deiconify (i.e. unminimize) the specified window. Note that you shouldn’t assume the window is definitely deiconified afterward, because other entities (e.g. the user or [window manager][...
void fullscreen()Asks to place window in the fullscreen state. Note that you shouldn’t assume the window is definitely full screen afterward, because other entities (e.g. the user or [window manager][gtk-X11-arch...
void fullscreenOnMonitor(gdk.screen.Screen screen, int monitor)Asks to place window in the fullscreen state. Note that you shouldn't assume the window is definitely full screen afterward.
bool getAcceptFocus()Gets the value set by [gtk.window.Window.setAcceptFocus]. Returns: true if window should receive the input focus
gtk.application.Application getApplication()Gets the #GtkApplication associated with the window (if any). Returns: a #GtkApplication, or null
gtk.widget.Widget getAttachedTo()Fetches the attach widget for this window. See [gtk.window.Window.setAttachedTo]. Returns: the widget where the window is attached, or null if the window is not attached to any widget.
bool getDecorated()Returns whether the window has been set to have decorations such as a title bar via [gtk.window.Window.setDecorated]. Returns: true if the window has been set to have decorations
void getDefaultSize(out int width, out int height)Gets the default size of the window. A value of -1 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...
gtk.widget.Widget getDefaultWidget()Returns the default widget for window. See [gtk.window.Window.setDefault] for more details. Returns: the default widget, or null if there is none.
bool getDeletable()Returns whether the window has been set to have a close button via [gtk.window.Window.setDeletable]. Returns: true if the window has been set to have a close button
bool getDestroyWithParent()Returns whether the window will be destroyed with its transient parent. See gtkwindowsetdestroywith_parent (). Returns: true if the window will be destroyed with its transient parent.
gtk.widget.Widget getFocus()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 `gtkwidget...
bool getFocusOnMap()Gets the value set by [gtk.window.Window.setFocusOnMap]. Returns: true if window should receive the input focus when mapped.
bool getFocusVisible()Gets the value of the #GtkWindow:focus-visible property. Returns: true if “focus rectangles” are supposed to be visible in this window.
gdk.types.Gravity getGravity()Gets the value set by [gtk.window.Window.setGravity]. Returns: window gravity
gtk.window_group.WindowGroup getGroup()Returns the group for window or the default group, if window is null or if window does not have an explicit window group. Returns: the #GtkWindowGroup for a window or the default group
bool getHasResizeGrip()Determines whether the window may have a resize grip. Returns: true if the window has a resize grip
bool getHideTitlebarWhenMaximized()Returns whether the window has requested to have its titlebar hidden when maximized. See gtkwindowsethidetitlebarwhenmaximized (). Returns: true if the window has requested to have its titlebar hid...
gdkpixbuf.pixbuf.Pixbuf getIcon()Gets the value set by [gtk.window.Window.setIcon] (or if you've called [gtk.window.Window.setIconList], gets the first icon in the icon list). Returns: icon for window or null if none
gdkpixbuf.pixbuf.Pixbuf[] getIconList()Retrieves the list of icons set by [gtk.window.Window.setIconList]. The list is copied, but the reference count on each member won’t be incremented. Returns: copy of window’s icon list
string getIconName()Returns the name of the themed icon for the window, see [gtk.window.Window.setIconName]. Returns: the icon name or null if the window has no themed icon
gdk.types.ModifierType getMnemonicModifier()Returns the mnemonic modifier for this window. See [gtk.window.Window.setMnemonicModifier]. Returns: the modifier mask used to activate mnemonics on this window.
bool getMnemonicsVisible()Gets the value of the #GtkWindow:mnemonics-visible property. Returns: true if mnemonics are supposed to be visible in this window.
bool getModal()Returns whether the window is modal. See [gtk.window.Window.setModal]. Returns: true if the window is set to be modal and establishes a grab when shown
double getOpacity()Fetches the requested opacity for this window. See [gtk.window.Window.setOpacity]. Returns: the requested opacity for this window.
void getPosition(out int rootX, out int rootY)This function returns the position you need to pass to [gtk.window.Window.move] to keep window in its current position. This means that the meaning of the returned value varies with window gravity....
bool getResizable()Gets the value set by [gtk.window.Window.setResizable]. Returns: true if the user can resize the window
bool getResizeGripArea(out gdk.rectangle.Rectangle rect)If a window has a resize grip, this will retrieve the grip position, width and height into the specified #GdkRectangle.
string getRole()Returns the role of the window. See [gtk.window.Window.setRole] for further explanation. Returns: the role of the window if set, or null. The returned is owned by the widget and must not be modifie...
gdk.screen.Screen getScreen()Returns the #GdkScreen associated with window. Returns: a #GdkScreen.
void getSize(out int width, out int height)Obtains the current size of window.
bool getSkipPagerHint()Gets the value set by [gtk.window.Window.setSkipPagerHint]. Returns: true if window shouldn’t be in pager
bool getSkipTaskbarHint()Gets the value set by [gtk.window.Window.setSkipTaskbarHint] Returns: true if window shouldn’t be in taskbar
string getTitle()Retrieves the title of the window. See [gtk.window.Window.setTitle]. Returns: the title of the window, or null if none has been set explicitly. The returned string is owned by the widget and must n...
gtk.widget.Widget getTitlebar()Returns the custom titlebar that has been set with [gtk.window.Window.setTitlebar]. Returns: the custom titlebar, or null
gtk.window.Window getTransientFor()Fetches the transient parent for this window. See [gtk.window.Window.setTransientFor]. Returns: the transient parent for this window, or null if no transient parent has been set.
gdk.types.WindowTypeHint getTypeHint()Gets the type hint for this window. See [gtk.window.Window.setTypeHint]. Returns: the type hint for window.
bool getUrgencyHint()Gets the value set by [gtk.window.Window.setUrgencyHint] Returns: true if window is urgent
gtk.types.WindowType getWindowType()Gets the type of the window. See #GtkWindowType. Returns: the type of the window
bool hasGroup()Returns whether window has an explicit window group. Returns: true if window has an explicit window group.
bool hasToplevelFocus()Returns whether the input focus is within this GtkWindow. For real toplevel windows, this is identical to [gtk.window.Window.isActive], but for embedded windows, like #GtkPlug, the results will dif...
void iconify()Asks to iconify (i.e. minimize) the specified window. Note that you shouldn’t assume the window is definitely iconified afterward, because other entities (e.g. the user or [window manager][gtk-X1...
bool isActive()Returns whether the window is part of the current active toplevel. (That is, the toplevel window receiving keystrokes.) The return value is true if the window is active toplevel itself, but also if...
bool isMaximized()Retrieves the current maximized state of window.
void maximize()Asks to maximize window, so that it becomes full-screen. Note that you shouldn’t assume the window is definitely maximized afterward, because other entities (e.g. the user or [window manager][gtk...
bool mnemonicActivate(uint keyval, gdk.types.ModifierType modifier)Activates the targets associated with the mnemonic.
void move(int x, int y)Asks the [window manager][gtk-X11-arch] to move window to the given position. Window managers are free to ignore this; most window managers ignore requests for initial window positions (instead us...
bool parseGeometry(string geometry)Parses a standard X Window System geometry string - see the manual page for X (type “man X”) for details on this. [gtk.window.Window.parseGeometry] does work on all GTK+ ports including Win32 b...
void present()Presents a window to the user. This function should not be used as when it is called, it is too late to gather a valid timestamp to allow focus stealing prevention to work correctly.
void presentWithTime(uint timestamp)Presents a window to the user. This may mean raising the window in the stacking order, deiconifying it, moving it to the current desktop, and/or giving it the keyboard focus, possibly dependent on ...
bool propagateKeyEvent(gdk.event_key.EventKey event)Propagate a key press or release event to the focus widget and up the focus container chain until a widget handles event. This is normally called by the default ::keypressevent and ::keyreleaseeven...
void removeAccelGroup(gtk.accel_group.AccelGroup accelGroup)Reverses the effects of [gtk.window.Window.addAccelGroup].
void removeMnemonic(uint keyval, gtk.widget.Widget target)Removes a mnemonic from this window.
void reshowWithInitialSize()Hides window, then reshows it, resetting the default size and position of the window. Used by GUI builders only.
void resize(int width, int height)Resizes the window as if the user had done so, obeying geometry constraints. The default geometry constraint is that windows may not be smaller than their size request; to override this constraint,...
bool resizeGripIsVisible()Determines whether a resize grip is visible for the specified window. Returns: true if a resize grip exists and is visible
void resizeToGeometry(int width, int height)Like [gtk.window.Window.resize], but width and height are interpreted in terms of the base size and increment set with gtkwindowsetgeometryhints.
void setAcceptFocus(bool setting)Windows may set a hint asking the desktop environment not to receive the input focus. This function sets this hint.
void setApplication(gtk.application.Application application = null)Sets or unsets the #GtkApplication associated with the window.
void setAttachedTo(gtk.widget.Widget attachWidget = null)Marks window as attached to attachwidget. This creates a logical binding between the window and the widget it belongs to, which is used by GTK+ to propagate information such as styling or accessibi...
void setDecorated(bool setting)By default, windows are decorated with a title bar, resize controls, etc. Some [window managers][gtk-X11-arch] allow GTK+ to disable these decorations, creating a borderless window. If you set the...
void setDefault(gtk.widget.Widget defaultWidget = null)The default widget is the widget that’s activated when the user presses Enter in a dialog (for example). This function sets or unsets the default widget for a #GtkWindow. When setting (rather tha...
void setDefaultGeometry(int width, int height)Like [gtk.window.Window.setDefaultSize], but width and height are interpreted in terms of the base size and increment set with gtkwindowsetgeometryhints.
void setDefaultSize(int width, int height)Sets the default size of a window. If the window’s “natural” size (its size request) is larger than the default, the default will be ignored. More generally, if the default size does not obey...
void setDeletable(bool setting)By default, windows have a close button in the window frame. Some [window managers][gtk-X11-arch] allow GTK+ to disable this button. If you set the deletable property to false using this function, ...
void setDestroyWithParent(bool setting)If setting is true, then destroying the transient parent of window will also destroy window itself. This is useful for dialogs that shouldn’t persist beyond the lifetime of the main window they'r...
void setFocus(gtk.widget.Widget focus = null)If focus is not the current focus widget, and is focusable, sets it as the focus widget for the window. If focus is null, unsets the focus widget for this window. To set the focus to a particular w...
void setFocusOnMap(bool setting)Windows may set a hint asking the desktop environment not to receive the input focus when the window is mapped. This function sets this hint.
void setFocusVisible(bool setting)Sets the #GtkWindow:focus-visible property.
void setGeometryHints(gtk.widget.Widget geometryWidget, gdk.types.Geometry geometry, gdk.types.WindowHints geomMask)This function sets up hints about how a window can be resized by the user. You can set a minimum and maximum size; allowed resize increments (e.g. for xterm, you can only resize by the size of a c...
void setGravity(gdk.types.Gravity gravity)Window gravity defines the meaning of coordinates passed to [gtk.window.Window.move]. See [gtk.window.Window.move] and #GdkGravity for more details.
void setHasResizeGrip(bool value)Sets whether window has a corner resize grip.
void setHasUserRefCount(bool setting)Tells GTK+ whether to drop its extra reference to the window when [gtk.widget.Widget.destroy] is called.
void setHideTitlebarWhenMaximized(bool setting)If setting is true, then window will request that it’s titlebar should be hidden when maximized. This is useful for windows that don’t convey any information other than the application name in ...
void setIcon(gdkpixbuf.pixbuf.Pixbuf icon = null)Sets up the icon representing a #GtkWindow. This icon is used when the window is minimized (also known as iconified). Some window managers or desktop environments may also place it in the window f...
bool setIconFromFile(string filename)Sets the icon for window. Warns on failure if err is null.
void setIconList(gdkpixbuf.pixbuf.Pixbuf[] list)Sets up the icon representing a #GtkWindow. The icon is used when the window is minimized (also known as iconified). Some window managers or desktop environments may also place it in the window fr...
void setIconName(string name = null)Sets the icon for the window from a named themed icon. See the docs for #GtkIconTheme for more details. On some platforms, the window icon is not used at all.
void setKeepAbove(bool setting)Asks to keep window above, so that it stays on top. Note that you shouldn’t assume the window is definitely above afterward, because other entities (e.g. the user or [window manager][gtk-X11-arch...
void setKeepBelow(bool setting)Asks to keep window below, so that it stays in bottom. Note that you shouldn’t assume the window is definitely below afterward, because other entities (e.g. the user or [window manager][gtk-X11-a...
void setMnemonicModifier(gdk.types.ModifierType modifier)Sets the mnemonic modifier for this window.
void setMnemonicsVisible(bool setting)Sets the #GtkWindow:mnemonics-visible property.
void setModal(bool modal)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 [gtk.window.Window.setT...
void setOpacity(double opacity)Request the windowing system to make window partially transparent, with opacity 0 being fully transparent and 1 fully opaque. (Values of the opacity parameter are clamped to the [0,1] range.) On X1...
void setPosition(gtk.types.WindowPosition position)Sets a position constraint for this window. If the old or new constraint is [gtk.types.WindowPosition.CenterAlways], this will also cause the window to be repositioned to satisfy the new constraint.
void setResizable(bool resizable)Sets whether the user can resize a window. Windows are user resizable by default.
void setRole(string role)This function is only useful on X11, not with other GTK+ targets.
void setScreen(gdk.screen.Screen screen)Sets the #GdkScreen where the window is displayed; if the window is already mapped, it will be unmapped, and then remapped on the new screen.
void setSkipPagerHint(bool setting)Windows may set a hint asking the desktop environment not to display the window in the pager. This function sets this hint. (A "pager" is any desktop navigation tool such as a workspace switcher th...
void setSkipTaskbarHint(bool setting)Windows may set a hint asking the desktop environment not to display the window in the task bar. This function sets this hint.
void setStartupId(string startupId)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 u...
void setTitle(string title)Sets the title of the #GtkWindow. 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][gtk-X11-arch], so exactly how t...
void setTitlebar(gtk.widget.Widget titlebar = null)Sets a custom titlebar for window.
void setTransientFor(gtk.window.Window parent = null)Dialog windows should be set transient for the main application window they were spawned from. This allows [window managers][gtk-X11-arch] to e.g. keep the dialog on top of the main window, or cent...
void setTypeHint(gdk.types.WindowTypeHint hint)By setting the type hint for the window, you allow the window manager to decorate and handle the window in a way which is suitable to the function of the window in your application.
void setUrgencyHint(bool setting)Windows may set a hint asking the desktop environment to draw the users attention to the window. This function sets this hint.
void setWmclass(string wmclassName, string wmclassClass)Don’t use this function. It sets the X Window System “class” and “name” hints for a window. According to the ICCCM, you should always set these to the same value for all windows in an ap...
void stick()Asks to stick window, which means that it will appear on all user desktops. Note that you shouldn’t assume the window is definitely stuck afterward, because other entities (e.g. the user or [wind...
void unfullscreen()Asks to toggle off the fullscreen state for window. Note that you shouldn’t assume the window is definitely not full screen afterward, because other entities (e.g. the user or [window manager][gt...
void unmaximize()Asks to unmaximize window. Note that you shouldn’t assume the window is definitely unmaximized afterward, because other entities (e.g. the user or [window manager][gtk-X11-arch]) could maximize i...
void unstick()Asks to unstick window, which means that it will appear on only one of the user’s desktops. Note that you shouldn’t assume the window is definitely unstuck afterward, because other entities (e....
gulong connectActivateDefault(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtk.window.Window))) && Parameters!T.length < 2)Connect to `ActivateDefault` signal.
gulong connectActivateFocus(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtk.window.Window))) && Parameters!T.length < 2)Connect to `ActivateFocus` signal.
gulong connectEnableDebugging(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == bool) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] == bool))) && (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gtk.window.Window))) && Parameters!T.length < 3)Connect to `EnableDebugging` signal.
gulong connectKeysChanged(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtk.window.Window))) && Parameters!T.length < 2)Connect to `KeysChanged` signal.
gulong connectSetFocus(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtk.widget.Widget))) && (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gtk.window.Window))) && Parameters!T.length < 3)Connect to `SetFocus` signal.
Constructors
this(void * ptr, Flag!"Take" take)
this(gtk.types.WindowType type)Creates a new #GtkWindow, which is a toplevel window that can contain other widgets. Nearly always, the type of the window should be #GTKWINDOWTOPLEVEL. If you’re implementing something like a po...
Methods
T acceptFocus(bool propval)Set `acceptFocus` property. Params: propval = Whether the window should receive the input focus. Returns: Builder instance for fluent chaining
T application(gtk.application.Application propval)Set `application` property. Params: propval = The #GtkApplication associated with the window.
T attachedTo(gtk.widget.Widget propval)Set `attachedTo` property. Params: propval = The widget to which this window is attached. See [gtk.window.Window.setAttachedTo].
T decorated(bool propval)Set `decorated` property. Params: propval = Whether the window should be decorated by the window manager. Returns: Builder instance for fluent chaining
T defaultHeight(int propval)
T defaultWidth(int propval)
T deletable(bool propval)Set `deletable` property. Params: propval = Whether the window frame should have a close button. Returns: Builder instance for fluent chaining
T destroyWithParent(bool propval)
T focusOnMap(bool propval)Set `focusOnMap` property. Params: propval = Whether the window should receive the input focus when mapped. Returns: Builder instance for fluent chaining
T focusVisible(bool propval)Set `focusVisible` property. Params: propval = Whether 'focus rectangles' are currently visible in this window.
T gravity(gdk.types.Gravity propval)Set `gravity` property. Params: propval = The window gravity of the window. See [gtk.window.Window.move] and #GdkGravity for more details about window gravity. Returns: Builder instance for fluent ...
T hasResizeGrip(bool propval)Set `hasResizeGrip` property. Params: propval = Whether the window has a corner resize grip.
T hideTitlebarWhenMaximized(bool propval)Set `hideTitlebarWhenMaximized` property. Params: propval = Whether the titlebar should be hidden during maximization. Returns: Builder instance for fluent chaining
T iconName(string propval)Set `iconName` property. Params: propval = The :icon-name property specifies the name of the themed icon to use as the window icon. See #GtkIconTheme for more details. Returns: Builder instance for...
T mnemonicsVisible(bool propval)Set `mnemonicsVisible` property. Params: propval = Whether mnemonics are currently visible in this window.
T modal(bool propval)
T resizable(bool propval)
T role(string propval)
T skipPagerHint(bool propval)
T skipTaskbarHint(bool propval)
T startupId(string propval)Set `startupId` property. Params: propval = The :startup-id is a write-only property for setting window's startup notification identifier. See [gtk.window.Window.setStartupId] for more details. Ret...
T title(string propval)
T transientFor(gtk.window.Window propval)Set `transientFor` property. Params: propval = The transient parent of the window. See [gtk.window.Window.setTransientFor] for more details about transient windows. Returns: Builder instance for fl...
T urgencyHint(bool propval)

Fluent builder for [gtk.window.Window]

Methods
Window build()