layershell

package
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package layershell was automatically generated by github.com/bnema/puregotk DO NOT EDIT

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AutoExclusiveZoneEnable

func AutoExclusiveZoneEnable(WindowVar *gtk.Window)

When auto exclusive zone is enabled, exclusive zone is automatically 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.

NOTE: you can control the auto exclusive zone by changing the margin on the non-anchored edge. This behavior is specific to gtk4-layer-shell and not part of the underlying protocol

func AutoExclusiveZoneIsEnabled

func AutoExclusiveZoneIsEnabled(WindowVar *gtk.Window) bool

func Available

func Available() bool

Available reports whether the shared library was loaded successfully.

func GetAnchor

func GetAnchor(WindowVar *gtk.Window, EdgeVar Edge) bool

func GetExclusiveZone

func GetExclusiveZone(WindowVar *gtk.Window) int

func GetMajorVersion

func GetMajorVersion() uint

func GetMargin

func GetMargin(WindowVar *gtk.Window, EdgeVar Edge) int

func GetMicroVersion

func GetMicroVersion() uint

func GetMinorVersion

func GetMinorVersion() uint

func GetMonitor

func GetMonitor(WindowVar *gtk.Window) *gdk.Monitor

NOTE: To get which monitor the surface is actually on, use gdk_display_get_monitor_at_surface().

func GetNamespace

func GetNamespace(WindowVar *gtk.Window) string

NOTE: this function does not return ownership of the string. Do not free the returned string. Future calls into the library may invalidate the returned string.

func GetProtocolVersion

func GetProtocolVersion() uint

May block for a Wayland roundtrip the first time it's called.

func GetRespectClose

func GetRespectClose(WindowVar *gtk.Window) bool

func GetZwlrLayerSurfaceV1

func GetZwlrLayerSurfaceV1(WindowVar *gtk.Window) uintptr

func InitForWindow

func InitForWindow(WindowVar *gtk.Window)

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

func IsLayerWindow

func IsLayerWindow(WindowVar *gtk.Window) bool

func IsSupported

func IsSupported() bool

May block for a Wayland roundtrip the first time it's called.

func SetAnchor

func SetAnchor(WindowVar *gtk.Window, EdgeVar Edge, AnchorToEdgeVar bool)

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 #GtkLayerShellEdge

func SetExclusiveZone

func SetExclusiveZone(WindowVar *gtk.Window, ExclusiveZoneVar int)

Has no effect unless the surface is anchored to an edge. Requests that the compositor does not place other surfaces within the given exclusive zone of the anchored edge. For example, a panel can request to not be covered by maximized windows. See wlr-layer-shell-unstable-v1.xml for details.

Default is 0

func SetKeyboardMode

func SetKeyboardMode(WindowVar *gtk.Window, ModeVar KeyboardMode)

Sets if/when @window should receive keyboard events from the compositor, see GtkLayerShellKeyboardMode for details. To control mouse/touch interactivity use input regions, see [#61](https://github.com/wmww/gtk4-layer-shell/issues/61) for details.

Default is %GTK_LAYER_SHELL_KEYBOARD_MODE_NONE

func SetLayer

func SetLayer(WindowVar *gtk.Window, LayerVar Layer)

Set the "layer" on which the surface appears(controls if it is over top of or below other surfaces). The layer may be changed on-the-fly in the current version of the layer shell protocol, but on compositors that only support an older version the @window is remapped so the change can take effect.

Default is %GTK_LAYER_SHELL_LAYER_TOP

func SetMargin

func SetMargin(WindowVar *gtk.Window, EdgeVar Edge, MarginSizeVar int)

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 #GtkLayerShellEdge

func SetMonitor

func SetMonitor(WindowVar *gtk.Window, MonitorVar *gdk.Monitor)

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

Default is %NULL

func SetNamespace

func SetNamespace(WindowVar *gtk.Window, NameSpaceVar *string)

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 maintains ownership of original. If the window is currently mapped, it will get remapped so the change can take effect.

Default is "gtk4-layer-shell" (which will be used if set to %NULL)

func SetRespectClose

func SetRespectClose(WindowVar *gtk.Window, RespectCloseVar bool)

Compositors may send the `zwlr_layer_surface_v1.closed` event in some cases (such as when an output is destroyed). Prior to v1.3 this always triggered a GTK `close-request` signal, which would destroy the window if not intercepted by application code. In v1.3+ this behavior is disabled by default, and can be turned back on by calling this function with %TRUE. To handle the `.closed` event without destroying your window turn respect_close on and connect a `close-request` listener that returns %TRUE.

Types

type Edge

type Edge int
const (

	// The left edge of the screen.
	EdgeLeftValue Edge = 0
	// The right edge of the screen.
	EdgeRightValue Edge = 1
	// The top edge of the screen.
	EdgeTopValue Edge = 2
	// The bottom edge of the screen.
	EdgeBottomValue Edge = 3
)

type KeyboardMode

type KeyboardMode int
const (

	// This window should not receive keyboard events.
	KeyboardModeNoneValue KeyboardMode = 0
	// This window should have exclusive focus if it is on the top or overlay layer.
	KeyboardModeExclusiveValue KeyboardMode = 1
	// The user should be able to focus and unfocues this window in an implementation
	// defined way. Not supported for protocol version < 4.
	KeyboardModeOnDemandValue KeyboardMode = 2
)

func GetKeyboardMode

func GetKeyboardMode(WindowVar *gtk.Window) KeyboardMode

type Layer

type Layer int
const (

	// The background layer.
	LayerBackgroundValue Layer = 0
	// The bottom layer.
	LayerBottomValue Layer = 1
	// The top layer.
	LayerTopValue Layer = 2
	// The overlay layer.
	LayerOverlayValue Layer = 3
)

func GetLayer

func GetLayer(WindowVar *gtk.Window) Layer

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL