Functions

  auto_exclusive_zone_enable (window)
  init_for_window (window)
  set_anchor (window, edge, anchor_to_edge)
  set_exclusive_zone (window, exclusive_zone)
  set_keyboard_interactivity (window, interacitvity)
  set_layer (window, layer)
  set_margin (window, edge, margin_size)
  set_monitor (window, monitor)
  set_namespace (window, name_space)

Details

GtkLayerShell.auto_exclusive_zone_enable(window)
Parameters:window (Gtk.Window) – A layer surface.

Enables auto exclusive zone for window.

GtkLayerShell.init_for_window(window)
Parameters:window (Gtk.Window) – A Gtk.Window to be turned into a layer surface.

Set the window up to be a layer surface once it is mapped: This must be called before the window is realized.

GtkLayerShell.set_anchor(window, edge, anchor_to_edge)
Parameters:

Set whether window should be anchored to edge.

  • If two perpendicular edges are anchored, the surface with be anchored to that corner
  • If two opposite edges are anchored, the window will be stretched across the screen in that direction

Default is False for each GtkLayerShell.Edge

GtkLayerShell.set_exclusive_zone(window, exclusive_zone)
Parameters:
  • window (Gtk.Window) – A layer surface.
  • exclusive_zone (int) – The size of the exclusive zone.

If auto exclusive zone is enabled, exclusive zone will automatically be set to the size of the window + relevant margin. To disable auto exclusive zone, just set the exclusive zone to 0 or any other fixed value. There is no need to manually set the exclusive zone size when using auto exclusive zone.

Default is 0

GtkLayerShell.set_keyboard_interactivity(window, interacitvity)
Parameters:
  • window (Gtk.Window) – A layer surface.
  • interacitvity (bool) – Whether the layer surface should receive keyboard events.

Whether the window should receive keyboard events from the compositor.

Default is False

GtkLayerShell.set_layer(window, layer)
Parameters:

Set the “layer” on which the surface appears (controls if it is over top of or below other surfaces). If the window is currently mapped, it will get remapped so the change can take effect.

Default is GtkLayerShell.Layer.TOP

GtkLayerShell.set_margin(window, edge, margin_size)
Parameters:

Set the margin for a specific edge of a window. Effects both surface’s distance from the edge and its exclusive zone size (if auto exclusive zone enabled).

Default is 0 for each GtkLayerShell.Edge

GtkLayerShell.set_monitor(window, monitor)
Parameters:
  • window (Gtk.Window) – A layer surface.
  • monitor (Gdk.Monitor) – The output this layer surface will be placed on (None to let the compositor decide).

Set the output for the window to be placed on, or None to let the compositor choose. If the window is currently mapped, it will get remapped so the change can take effect.

Default is None

GtkLayerShell.set_namespace(window, name_space)
Parameters:
  • window (Gtk.Window) – A layer surface.
  • name_space (str) – The namespace of this layer surface.

Set the “namespace” of the surface.

No one is quite sure what this is for, but it probably should be something generic (“panel”, “osk”, etc). The name_space string is copied, and caller maintians ownership of original. If the window is currently mapped, it will get remapped so the change can take effect.

Default is “gtk-layer-shell” (which will be used if set to None)