Documentation ¶
Index ¶
- func AutoExclusiveZoneEnable(window *gtk.Window)
- func AutoExclusiveZoneIsEnabled(window *gtk.Window) bool
- func GetAnchor(window *gtk.Window, edge Edge) bool
- func GetExclusiveZone(window *gtk.Window) int
- func GetKeyboardInteractivity(window *gtk.Window) bool
- func GetMajorVersion() uint
- func GetMargin(window *gtk.Window, edge Edge) int
- func GetMicroVersion() uint
- func GetMinorVersion() uint
- func GetMonitor(window *gtk.Window) *gdk.Monitor
- func GetNamespace(window *gtk.Window) string
- func GetZwlrLayerSurfaceV1(window *gtk.Window) unsafe.Pointer
- func InitForWindow(window *gtk.Window)
- func IsLayerWindow(window *gtk.Window) bool
- func IsSupported() bool
- func SetAnchor(window *gtk.Window, edge Edge, anchorToEdge bool)
- func SetExclusiveZone(window *gtk.Window, exclusiveZone int)
- func SetKeyboardInteractivity(window *gtk.Window, interacitvity bool)
- func SetLayer(window *gtk.Window, layer Layer)
- func SetMargin(window *gtk.Window, edge Edge, marginSize int)
- func SetMonitor(window *gtk.Window, monitor *gdk.Monitor)
- func SetNamespace(window *gtk.Window, nameSpace string)
- type Caster
- type Edge
- type Layer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AutoExclusiveZoneEnable ¶
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 gtk-layer-shell and not part of the underlying protocol
func GetExclusiveZone ¶
func GetMajorVersion ¶
func GetMajorVersion() uint
func GetMicroVersion ¶
func GetMicroVersion() uint
func GetMinorVersion ¶
func GetMinorVersion() uint
func GetMonitor ¶
GetMonitor nOTE: To get which monitor the surface is actually on, use C.gdk_display_get_monitor_at_window().
func GetNamespace ¶
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 InitForWindow ¶
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
IsSupported may block for a Wayland roundtrip the first time it's called.
func SetAnchor ¶
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 LayerShellEdge
func SetExclusiveZone ¶
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 SetKeyboardInteractivity ¶
SetKeyboardInteractivity whether the window should receive keyboard events from the compositor.
Default is false
func SetLayer ¶
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 K_LAYER_SHELL_LAYER_TOP
func SetMargin ¶
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 LayerShellEdge
func SetMonitor ¶
SetMonitor set the output for the window to be placed on, or nil to let the compositor choose. If the window is currently mapped, it will get remapped so the change can take effect.
Default is nil
func SetNamespace ¶
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 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 nil)
Types ¶
type Edge ¶
type Edge int
const ( // EdgeLeft the left edge of the screen. EdgeLeft Edge = 0 // EdgeRight the right edge of the screen. EdgeRight Edge = 1 // EdgeTop the top edge of the screen. EdgeTop Edge = 2 // EdgeBottom the bottom edge of the screen. EdgeBottom Edge = 3 // EdgeEntryNumber should not be used except to get the number of entries EdgeEntryNumber Edge = 4 )
type Layer ¶
type Layer int
const ( // LayerBackground the background layer. LayerBackground Layer = 0 // LayerBottom the bottom layer. LayerBottom Layer = 1 // LayerTop the top layer. LayerTop Layer = 2 // LayerOverlay the overlay layer. LayerOverlay Layer = 3 // LayerEntryNumber should not be used except to get the number of entries LayerEntryNumber Layer = 4 )