Package: gtk

Class gtk-window

Superclasses

gtk-bin, gtk-container, gtk-widget, g-initially-unowned, gtk-buildable, g-object, common-lisp:standard-object, common-lisp:t

Documented Subclasses

Direct Slots

type
The type property of type gtk-window-type (Read / Write / Construct)
The type of the window.
Default value: :toplevel
accept-focus
The accept-focus property of type :boolean (Read / Write)
Whether the window should receive the input focus.
Default value: true
application
The application property of type gtk-application (Read / Write)
The gtk-application associated with the window. The application will be kept alive for at least as long as it has any windows associated with it. See the g-application-hold function 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 property to nil.
attached-to
The attached-to property of type gtk-widget (Read / Write / Construct)
The widget to which this window is attached. See the gtk-window-attached-to function. Examples of places where specifying this relation is useful are for instance a gtk-menu created by a gtk-combo-box, a completion popup window created by gtk-entry or a typeahead search entry created by gtk-tree-view.
decorated
The decorated property of type :boolean (Read / Write)
Whether the window should be decorated by the window manager.
Default value: true
default-height
The default-height property of type :int (Read / Write)
The default height of the window, used when initially showing the window.
Allowed values: >= -1
Default value: -1
default-width
The default-width property of type :int (Read / Write)
The default width of the window, used when initially showing the window.
Allowed values: >= -1
Default value: -1
deletable
The deletable property of type :boolean (Read / Write)
Whether the window frame should have a close button.
Default value: true
destroy-with-parent
The destroy-with-parent property of type :boolean (Read / Write)
If this window should be destroyed when the parent is destroyed.
Default value: nil
focus-on-map
The focus-on-map property of type :boolean (Read / Write)
Whether the window should receive the input focus when mapped.
Default value: true
focus-visible
The focus-visible property of type :boolean (Read / Write)
Whether "focus rectangles" are currently visible in this window. This property is maintained by GTK+ based on the gtk-visible-focus setting and user input and should not be set by applications.
Default value: true
gravity
The gravity property of type gdk-gravity (Read / Write)
The window gravity of the window. See the gtk-window-move function and the gdk-gravity enumeration for more details about window gravity.
Default value: :north-west
has-resize-grip
The has-resize-grip property of type :boolean (Read / Write)
Whether the window has a corner resize grip. Note that the resize grip is only shown if the window is actually resizable and not maximized. Use the resize-grip-visible property to find out if the resize grip is currently shown.
Warning: The has-resize-grip property has been deprecated since version 3.14 and should not be used in newly-written code. Resize grips have been removed.
Default value: nil
has-toplevel-focus
The has-toplevel-focus property of type :boolean (Read)
Whether the input focus is within the window.
Default value: nil
hide-titlebar-when-maximized
The hide-titlebar-when-maximized property of type :boolean (Read / Write)
Whether the titlebar should be hidden during maximization.
Default value: nil
icon
The icon property of type gdk-pixbuf (Read / Write)
Icon for the window.
icon-name
The icon-name property of type :string (Read / Write)
The icon-name property specifies the name of the themed icon to use as the window icon. See the gtk-icon-theme class for more details.
Default value: nil
is-active
The is-active property of type :boolean (Read)
Whether the toplevel is the current active window.
Default value: nil
is-maximized
The is-maximized property of type :boolean (Read)
Whether the window is maximized.
Default value: nil
mnemonics-visible
The mnemonics-visible property of type :boolean (Read / Write)
Whether mnemonics are currently visible in this window. This property is maintained by GTK+ based on the gtk-auto-mnemonics setting and user input, and should not be set by applications.
Default value: true
modal
The modal property of type :boolean (Read / Write)
If true, the window is modal. Other windows are not usable while this one is up.
Default value: nil
opacity
The opacity property of type :double (Read / Write)
The requested opacity of the window. See the gtk-window-opacity function for more details about window opacity.
Allowed values: [0,1]
Default value: 1
resizable
The resizable property of type :boolean (Read / Write)
If true, users can resize the window.
Default value: true
resize-grip-visible
The resize-grip-visible property of type :boolean (Read)
Whether a corner resize grip is currently shown.
Warning: The has-resize-grip-visible property has been deprecated since version 3.14 and should not be used in newly-written code. Resize grips have been removed.
Default value: nil
role
The role property of type :string (Read / Write)
Unique identifier for the window to be used when restoring a session.
Default value: nil
screen
The screen property of type gdk-screen (Read / Write)
The screen where this window will be displayed.
skip-pager-hint
The skip-pager-hint property of type :boolean (Read / Write)
True if the window should not be in the pager.
Default value: nil
skip-taskbar-hint
The skip-taskbar-hint property of type :boolean (Read / Write)
True if the window should not be in the task bar.
Default value: nil
startup-id
The startup-id property of type :string (Write)
The startup-id is a write-only property for setting window's startup notification identifier. See the gtk-window-startup-id function for more details.
Default value: nil
title
The title property of type :string (Read / Write)
The title of the window.
Default value: nil
transient-for
The transient-for property of type gtk-window (Read / Write / Construct)
The transient parent of the window. See the gtk-window-transient-for slot access function for more details about transient windows.
type-hint
The type-hint property of type gdk-window-type-hint (Read / Write)
Hint to help the desktop environment understand what kind of window this is and how to treat it.
Default value: :normal
urgency-hint
The urgency-hint property of type :boolean (Read / Write)
True if the window should be brought to the user's attention.
Default value: nil
window-position
The window-position property of type gtk-window-position (Read / Write)
The initial position of the window.
Default value: :none

Details

A gtk-window 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, e. g. to resize it, move it, or close it.

GtkWindow as GtkBuildable

The gtk-window implementation of the gtk-buildable interface supports a custom <accel-groups> element, which supports any number of <group> elements representing the gtk-accel-group objects you want to add to your window. This is synonymous with the gtk-window-add-accel-group function.

Example: A UI definition fragment with accel groups
 <object class="GtkWindow">
   <accel-groups>
     <group name="accelgroup1"/>
   </accel-groups>
 </object>
 <!-- -->
   ...
 <!-- -->
 <object class="GtkAccelGroup" id="accelgroup1"/>    
The gtk-window implementation of the gtk-buildable 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>    
gtk-window 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. gtk-window 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.

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

Style Property Details

decoration-button-layout
The decoration-button-layout style property of type :string (Read)
Decorated button layout.
Default value: "menu:close"
decoration-resize-handle
The decoration-resize-handle style property of type :int (Read / Write)
Decoration resize handle size.
Allowed values: >= 0
Default value: 20

Signal Details

The "activate-default" signal
 lambda (window)    : Action      
The "activate-default" signal is a keybinding signal which gets emitted when the user activates the default widget of window.
window
The window which received the signal.
The "activate-focus" signal
 lambda (window)    : Action      
The "activate-focus" signal is a keybinding signal which gets emitted when the user activates the currently focused widget of window.
window
The window which received the signal.
The "enable-debugging" signal
 lambda (window toggle)    : Action      
The "enable-debugging" signal is a keybinding signal which gets emitted when the user enables or disables interactive debugging. When toggle is true, interactive debugging is toggled on or off, when it is nil, the debugger will be pointed at the widget under the pointer. The default bindings for this signal are Ctrl-Shift-I and Ctrl-Shift-D.
window
The gdk-window object on which the signal is emitted.
toggle
A :boolean which toggles the debugger.
Return
A :boolean which is true if the key binding was handled.
The "keys-changed" signal
 lambda (window)    : Run First      
The "keys-changed" signal gets emitted when the set of accelerators or mnemonics that are associated with window changes.
window
The window which received the signal.
The "set-focus" signal
 lambda (window widget)    : Run Last      
window
The window which received the signal.
 

Slot Access Functions

Inherited Slot Access Functions

See also

2013-7-30