Handy.Window

g Atk.ImplementorIface Atk.ImplementorIface Gtk.Widget Gtk.Widget Atk.ImplementorIface->Gtk.Widget GObject.GInterface GObject.GInterface GObject.GInterface->Atk.ImplementorIface Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gtk.Bin Gtk.Bin Gtk.Window Gtk.Window Gtk.Bin->Gtk.Window Gtk.Buildable->Gtk.Widget Gtk.Container Gtk.Container Gtk.Container->Gtk.Bin Gtk.Widget->Gtk.Container Handy.Window Handy.Window Gtk.Window->Handy.Window

Subclasses:

Handy.PreferencesWindow

Methods

Inherited:

Gtk.Window (119), Gtk.Bin (1), Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10)

Structs:

Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5)

class

new ()

Virtual Methods

Inherited:

Gtk.Window (5), Gtk.Container (10), Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10)

Properties

Inherited:

Gtk.Window (33), Gtk.Container (3), Gtk.Widget (39)

Style Properties

Inherited:

Gtk.Window (2), Gtk.Widget (17)

Signals

Inherited:

Gtk.Window (5), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)

Fields

Inherited:

Gtk.Window (5), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)

Name

Type

Access

Description

parent_instance

Gtk.Window

r

Class Details

class Handy.Window(*args, **kwargs)
Bases:

Gtk.Window

Abstract:

No

Structure:

Handy.WindowClass

A freeform window.

The HdyWindow widget is a subclass of [class`Gtk`.Window] which has no titlebar area and provides rounded corners on all sides, ensuring they can never be overlapped by the content. This makes it safe to use headerbars in the content area as follows:

``xml <object class=”HdyWindow”/>

<child>
<object class=”GtkBox”>

<property name=”visible”>True</property> <property name=”orientation”>vertical</property> <child>

<object class=”HdyHeaderBar”>

<property name=”visible”>True</property> <property name=”show-close-button”>True</property>

</object>

</child> <child>

<!– … –>

</child>

</object>

</child>

</object> ``

It’s recommended to use [class`HeaderBar`] with HdyWindow, as unlike [class`Gtk`.HeaderBar] it remains draggable inside the window. Otherwise, [class`WindowHandle`] can be used.

HdyWindow allows to easily implement titlebar autohiding by putting the headerbar inside a [class`Gtk`.Revealer], and to show titlebar above content by putting it into a [class`Gtk`.Overlay] instead of [class`Gtk`.Box].

If the window has a [class`Gtk`.GLArea], it may bring a slight performance regression when the window is not fullscreen, tiled or maximized.

Using [method`Gtk`.Window.get_titlebar] and [method`Gtk`.Window.set_titlebar] is not supported and will result in a crash.

CSS nodes

HdyWindow has a main CSS node with the name window and style classes .background, .csd and .unified.

The .solid-csd style class on the main node is used for client-side decorations without invisible borders.

HdyWindow also represents window states with the following style classes on the main node: .tiled, .maximized, .fullscreen.

It contains the subnodes decoration for window shadow and/or border, decoration-overlay for the sheen on top of the window, widget.titlebar, and deck, which contains the child inside the window.

New in version 1.0.

classmethod new()
Returns:

the newly created HdyWindow

Return type:

Gtk.Widget

Creates a new HdyWindow.

New in version 1.0.