Documentation
¶
Overview ¶
Package layershell was automatically generated by github.com/bnema/puregotk DO NOT EDIT
Index ¶
- func AutoExclusiveZoneEnable(WindowVar *gtk.Window)
- func AutoExclusiveZoneIsEnabled(WindowVar *gtk.Window) bool
- func Available() bool
- func GetAnchor(WindowVar *gtk.Window, EdgeVar Edge) bool
- func GetExclusiveZone(WindowVar *gtk.Window) int
- func GetMajorVersion() uint
- func GetMargin(WindowVar *gtk.Window, EdgeVar Edge) int
- func GetMicroVersion() uint
- func GetMinorVersion() uint
- func GetMonitor(WindowVar *gtk.Window) *gdk.Monitor
- func GetNamespace(WindowVar *gtk.Window) string
- func GetProtocolVersion() uint
- func GetRespectClose(WindowVar *gtk.Window) bool
- func GetZwlrLayerSurfaceV1(WindowVar *gtk.Window) uintptr
- func InitForWindow(WindowVar *gtk.Window)
- func IsLayerWindow(WindowVar *gtk.Window) bool
- func IsSupported() bool
- func SetAnchor(WindowVar *gtk.Window, EdgeVar Edge, AnchorToEdgeVar bool)
- func SetExclusiveZone(WindowVar *gtk.Window, ExclusiveZoneVar int)
- func SetKeyboardMode(WindowVar *gtk.Window, ModeVar KeyboardMode)
- func SetLayer(WindowVar *gtk.Window, LayerVar Layer)
- func SetMargin(WindowVar *gtk.Window, EdgeVar Edge, MarginSizeVar int)
- func SetMonitor(WindowVar *gtk.Window, MonitorVar *gdk.Monitor)
- func SetNamespace(WindowVar *gtk.Window, NameSpaceVar *string)
- func SetRespectClose(WindowVar *gtk.Window, RespectCloseVar bool)
- type Edge
- type KeyboardMode
- type Layer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AutoExclusiveZoneEnable ¶
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 Available ¶
func Available() bool
Available reports whether the shared library was loaded successfully.
func GetExclusiveZone ¶
func GetMajorVersion ¶
func GetMajorVersion() uint
func GetMicroVersion ¶
func GetMicroVersion() uint
func GetMinorVersion ¶
func GetMinorVersion() uint
func GetMonitor ¶
NOTE: To get which monitor the surface is actually on, use gdk_display_get_monitor_at_surface().
func GetNamespace ¶
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 GetZwlrLayerSurfaceV1 ¶
func InitForWindow ¶
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 IsSupported ¶
func IsSupported() bool
May block for a Wayland roundtrip the first time it's called.
func SetAnchor ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 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