Documentation
¶
Index ¶
- type Backend
- func (b *Backend) Buffer() *graphics.Buffer
- func (b *Backend) Close() error
- func (b *Backend) ClosePopup(p *Popup)
- func (b *Backend) Flush() error
- func (b *Backend) FlushRect(r graphics.Rect) error
- func (b *Backend) HasSystemCursor() bool
- func (b *Backend) Info() string
- func (b *Backend) ListWindows() ([]display.WindowInfo, error)
- func (b *Backend) MousePosition() (int, int)
- func (b *Backend) Open() error
- func (b *Backend) OpenPopup(x, y, w, h int, content graphics.Widget, onClose func()) *Popup
- func (b *Backend) Poll() *graphics.Event
- func (b *Backend) ReconfigureLayer(anchor uint32, exclusive int) error
- func (b *Backend) RegisterShortcut(shortcutID, windowID, scope uint32, key graphics.Key, ...) error
- func (b *Backend) RegisterShortcutEx(shortcutID, windowID, scope uint32, key graphics.Key, ch rune, ...) error
- func (b *Backend) Resize(width, height int) error
- func (b *Backend) SetLayer(layer, anchor uint32, exclusive int)
- func (b *Backend) SetLayerOpaqueHint(opaque bool)
- func (b *Backend) SetScreenSize(_, _ int)
- func (b *Backend) SetSize(width, height int)
- func (b *Backend) SetTitle(title string)
- func (b *Backend) SetWindowState(windowID, action uint32) error
- func (b *Backend) Size() (int, int)
- func (b *Backend) Start()
- func (b *Backend) UnregisterShortcut(shortcutID uint32) error
- type Popup
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
Backend implements graphics.Backend and graphics.InputHandler using the custom display protocol client.
func (*Backend) ClosePopup ¶
ClosePopup destroys a popup window. Safe to call multiple times.
func (*Backend) HasSystemCursor ¶
HasSystemCursor returns true since the server draws the cursor.
func (*Backend) ListWindows ¶
func (b *Backend) ListWindows() ([]display.WindowInfo, error)
ListWindows returns current managed normal windows from the display server.
func (*Backend) MousePosition ¶
MousePosition returns the last known pointer position.
func (*Backend) OpenPopup ¶
OpenPopup creates a popup window positioned relative to the main window. The content widget is rendered into the popup buffer and receives events. onClose is called when the popup is dismissed (e.g. click outside).
func (*Backend) ReconfigureLayer ¶
ReconfigureLayer updates anchor/exclusive for an already-open layer surface. The main layer surface is recreated in-place to apply new positioning.
func (*Backend) RegisterShortcut ¶
func (b *Backend) RegisterShortcut(shortcutID, windowID, scope uint32, key graphics.Key, modifiers graphics.Modifiers) error
RegisterShortcut registers a compositor shortcut for this client. Use ShortcutScopeGlobal for compositor-wide shortcuts and ShortcutScopeClient for shortcuts scoped to this client (optionally a specific window ID).
func (*Backend) RegisterShortcutEx ¶
func (b *Backend) RegisterShortcutEx(shortcutID, windowID, scope uint32, key graphics.Key, ch rune, modifiers graphics.Modifiers) error
RegisterShortcutEx registers a shortcut keyed either by graphics.Key, or by a printable rune when key is graphics.KeyNone.
func (*Backend) Resize ¶
Resize changes the main surface size at runtime. For layer surfaces this allows dynamic content-sized bars/docks.
func (*Backend) SetLayer ¶
SetLayer configures this backend as a layer surface. Call before Open(). Layer surfaces are anchored to screen edges and can reserve exclusive zones (e.g. 32px for a panel).
func (*Backend) SetLayerOpaqueHint ¶
SetLayerOpaqueHint hints that the layer content is fully opaque.
func (*Backend) SetScreenSize ¶
SetScreenSize is a no-op for window-based backends.
func (*Backend) SetWindowState ¶
SetWindowState updates a managed window state (minimize/maximize/restore/focus).
func (*Backend) UnregisterShortcut ¶
UnregisterShortcut removes a previously registered shortcut.