Skip to content

Gtk.WindowHandle

class — extends Widget, Accessible, Buildable, ConstraintTarget

Implements titlebar functionality for a window.

When added into a window, it can be dragged to move the window, and it implements the right click, double click and middle click behaviors that are expected of a titlebar.

CSS nodes

GtkWindowHandle has a single CSS node with the name windowhandle.

Accessibility

Until GTK 4.10, GtkWindowHandle used the AccessibleRole.group role.

Starting from GTK 4.12, GtkWindowHandle uses the AccessibleRole.generic role.

Constructors

new

@classmethod
def new(cls) -> Widget

Creates a new GtkWindowHandle.

Methods

get_child

def get_child(self) -> Widget | None

Gets the child widget of self.

set_child

def set_child(self, child: Widget | None = ...) -> None

Sets the child widget of self.

Parameters:

  • child — the child widget

Properties

child

child: Widget  # read/write

The child widget.