GtkWindowControls

gtk.window_controls.WindowControls shows window frame controls.

Typical window frame controls are minimize, maximize and close buttons, and the window icon.

An example GtkWindowControls

gtk.window_controls.WindowControls only displays start or end side of the controls (see gtk.window_controls.WindowControls.PackType), so it's intended to be always used in pair with another gtk.window_controls.WindowControls for the opposite side, for example:

<object class="GtkBox">
  <child>
    <object class="GtkWindowControls">
      <property name="side">start</property>
    </object>
  </child>

  ...

  <child>
    <object class="GtkWindowControls">
      <property name="side">end</property>
    </object>
  </child>
</object>

CSS nodes

windowcontrols
├── [image.icon]
├── [button.minimize]
├── [button.maximize]
╰── [button.close]

A gtk.window_controls.WindowControls' CSS node is called windowcontrols. It contains subnodes corresponding to each title button. Which of the title buttons exist and where they are placed exactly depends on the desktop environment and property@Gtk.WindowControls:decoration-layout value.

When gtk.window_controls.WindowControls.gboolean is true, it gets the .empty style class.

Accessibility

gtk.window_controls.WindowControls uses the gtk.types.AccessibleRole.Group role.

struct GtkWindowControls