Documentation
¶
Overview ¶
Package shell implements xdg-shell: the window roles clients request and the configure handshake the window manager drives.
Index ¶
- Constants
- Variables
- func NewHandle() (string, error)
- type Activate
- type Adjustment
- type Anchor
- type Change
- type Edges
- type Gravity
- type Icon
- type IconImage
- type Interactivity
- type Layer
- type LayerState
- type LayerSurface
- func (l *LayerSurface) AckConfigure(obj *swlr.ZwlrLayerSurfaceV1, serial uint32) error
- func (l *LayerSurface) Applied() image.Point
- func (l *LayerSurface) Close() error
- func (l *LayerSurface) Committed(s *surface.Surface) error
- func (l *LayerSurface) Configure(size image.Point) error
- func (l *LayerSurface) Current() LayerState
- func (l *LayerSurface) Destroy(*swlr.ZwlrLayerSurfaceV1) error
- func (l *LayerSurface) GetPopup(_ *swlr.ZwlrLayerSurfaceV1, res *sxdg.XdgPopup) error
- func (l *LayerSurface) HandoverPrelude(st *server.Stream, res *sw.WlSurface) (bool, error)
- func (l *LayerSurface) Live() bool
- func (l *LayerSurface) Mapped() bool
- func (l *LayerSurface) Namespace() string
- func (l *LayerSurface) Output() *sw.WlOutput
- func (*LayerSurface) Placement() image.Rectangle
- func (l *LayerSurface) Popups() []*Popup
- func (l *LayerSurface) RoleName() string
- func (l *LayerSurface) SetAnchor(obj *swlr.ZwlrLayerSurfaceV1, anchor Edges) error
- func (l *LayerSurface) SetExclusiveEdge(obj *swlr.ZwlrLayerSurfaceV1, edge Edges) error
- func (l *LayerSurface) SetExclusiveZone(_ *swlr.ZwlrLayerSurfaceV1, zone int32) error
- func (l *LayerSurface) SetKeyboardInteractivity(obj *swlr.ZwlrLayerSurfaceV1, k Interactivity) error
- func (l *LayerSurface) SetLayer(_ *swlr.ZwlrLayerSurfaceV1, layer Layer) error
- func (l *LayerSurface) SetMargin(_ *swlr.ZwlrLayerSurfaceV1, top, right, bottom, left int32) error
- func (l *LayerSurface) SetSize(_ *swlr.ZwlrLayerSurfaceV1, w, h uint32) error
- func (l *LayerSurface) Surface() *surface.Surface
- type Listener
- type LockSurface
- func (s *LockSurface) AckConfigure(obj *sel.ExtSessionLockSurfaceV1, serial uint32) error
- func (s *LockSurface) Committed(sf *surface.Surface) error
- func (*LockSurface) Destroy(*sel.ExtSessionLockSurfaceV1) error
- func (s *LockSurface) Output() *sw.WlOutput
- func (*LockSurface) Placement() image.Rectangle
- func (*LockSurface) RoleName() string
- func (s *LockSurface) Surface() *surface.Surface
- type Margin
- type Move
- type Popup
- func (p *Popup) Box() image.Rectangle
- func (p *Popup) Destroy(*sxdg.XdgPopup) error
- func (p *Popup) Geometry() image.Rectangle
- func (p *Popup) Grab(obj *sxdg.XdgPopup, _ *sw.WlSeat, serial uint32) error
- func (p *Popup) Mapped() bool
- func (p *Popup) Popups() []*Popup
- func (p *Popup) Reconstrain() error
- func (p *Popup) Reposition(_ *sxdg.XdgPopup, pos *sxdg.XdgPositioner, token uint32) error
- func (p *Popup) Root() PopupRoot
- func (p *Popup) Surface() *surface.Surface
- type PopupRoot
- type Positioner
- type Request
- type Resize
- type SessionLock
- type SetFullscreen
- type SetMaximized
- type SetMinimized
- type Shell
- type ShowWindowMenu
- type State
- type Toplevel
- func (t *Toplevel) Acked(serial uint32) bool
- func (t *Toplevel) AppID() string
- func (t *Toplevel) Configure(s State) (uint32, error)
- func (t *Toplevel) Current() State
- func (t *Toplevel) Description() string
- func (t *Toplevel) Destroy(*sxdg.XdgToplevel) error
- func (t *Toplevel) Dialog() bool
- func (t *Toplevel) Geometry() image.Rectangle
- func (t *Toplevel) ID() uint32
- func (t *Toplevel) Icon() *Icon
- func (t *Toplevel) LatestSerial() uint32
- func (t *Toplevel) Mapped() bool
- func (t *Toplevel) MaxSize() image.Point
- func (t *Toplevel) MinSize() image.Point
- func (t *Toplevel) Modal() bool
- func (t *Toplevel) Move(_ *sxdg.XdgToplevel, _ *sw.WlSeat, serial uint32) error
- func (t *Toplevel) Parent() *Toplevel
- func (t *Toplevel) Ping() error
- func (t *Toplevel) Popups() []*Popup
- func (t *Toplevel) Requested() State
- func (t *Toplevel) Resize(obj *sxdg.XdgToplevel, _ *sw.WlSeat, serial uint32, ...) error
- func (t *Toplevel) SendClose() error
- func (t *Toplevel) ServerDecorated() bool
- func (t *Toplevel) SetAppID(_ *sxdg.XdgToplevel, appID string) error
- func (t *Toplevel) SetFullscreen(*sxdg.XdgToplevel, *sw.WlOutput) error
- func (t *Toplevel) SetMaxSize(obj *sxdg.XdgToplevel, w, h int32) error
- func (t *Toplevel) SetMaximized(*sxdg.XdgToplevel) error
- func (t *Toplevel) SetMinSize(obj *sxdg.XdgToplevel, w, h int32) error
- func (t *Toplevel) SetMinimized(*sxdg.XdgToplevel) error
- func (t *Toplevel) SetParent(obj *sxdg.XdgToplevel, parent *sxdg.XdgToplevel) error
- func (t *Toplevel) SetTitle(_ *sxdg.XdgToplevel, title string) error
- func (t *Toplevel) ShowWindowMenu(_ *sxdg.XdgToplevel, _ *sw.WlSeat, serial uint32, x, y int32) error
- func (t *Toplevel) Surface() *surface.Surface
- func (t *Toplevel) Tag() string
- func (t *Toplevel) Title() string
- func (t *Toplevel) UnsetFullscreen(*sxdg.XdgToplevel) error
- func (t *Toplevel) UnsetMaximized(*sxdg.XdgToplevel) error
- func (t *Toplevel) WantsFullscreen() bool
- func (t *Toplevel) WantsMaximized() bool
- type ToplevelState
- type XdgSurface
- func (xs *XdgSurface) AckConfigure(obj *sxdg.XdgSurface, serial uint32) error
- func (xs *XdgSurface) Committed(s *surface.Surface) error
- func (xs *XdgSurface) Destroy(obj *sxdg.XdgSurface) error
- func (xs *XdgSurface) Geometry() image.Rectangle
- func (xs *XdgSurface) GetPopup(obj *sxdg.XdgSurface, res *sxdg.XdgPopup, parent *sxdg.XdgSurface, ...) (sxdg.XdgPopupHandler, error)
- func (xs *XdgSurface) GetToplevel(obj *sxdg.XdgSurface, res *sxdg.XdgToplevel) (sxdg.XdgToplevelHandler, error)
- func (xs *XdgSurface) HandoverPrelude(st *server.Stream, res *sw.WlSurface) (bool, error)
- func (xs *XdgSurface) Placement() image.Rectangle
- func (l *XdgSurface) Popups() []*Popup
- func (xs *XdgSurface) RoleName() string
- func (xs *XdgSurface) SetWindowGeometry(obj *sxdg.XdgSurface, x, y, w, h int32) error
Constants ¶
View Source
const (
PingTimeout = 5 * time.Second
)
Variables ¶
View Source
var IconSizes = []int32{16, 32, 64}
Functions ¶
Types ¶
type Adjustment ¶
type Adjustment = sxdg.XdgPositionerConstraintAdjustment
type Anchor ¶
type Anchor = sxdg.XdgPositionerAnchor
type Edges ¶
type Edges = swlr.ZwlrLayerSurfaceV1Anchor
type Gravity ¶
type Gravity = sxdg.XdgPositionerGravity
type Interactivity ¶
type Interactivity = swlr.ZwlrLayerSurfaceV1KeyboardInteractivity
type Layer ¶
type Layer = swlr.ZwlrLayerShellV1Layer
type LayerState ¶
type LayerSurface ¶
type LayerSurface struct {
// contains filtered or unexported fields
}
func (*LayerSurface) AckConfigure ¶
func (l *LayerSurface) AckConfigure(obj *swlr.ZwlrLayerSurfaceV1, serial uint32) error
func (*LayerSurface) Applied ¶
func (l *LayerSurface) Applied() image.Point
func (*LayerSurface) Close ¶
func (l *LayerSurface) Close() error
func (*LayerSurface) Current ¶
func (l *LayerSurface) Current() LayerState
func (*LayerSurface) Destroy ¶
func (l *LayerSurface) Destroy(*swlr.ZwlrLayerSurfaceV1) error
func (*LayerSurface) GetPopup ¶
func (l *LayerSurface) GetPopup(_ *swlr.ZwlrLayerSurfaceV1, res *sxdg.XdgPopup) error
func (*LayerSurface) HandoverPrelude ¶
func (*LayerSurface) Live ¶
func (l *LayerSurface) Live() bool
func (*LayerSurface) Mapped ¶
func (l *LayerSurface) Mapped() bool
func (*LayerSurface) Namespace ¶
func (l *LayerSurface) Namespace() string
func (*LayerSurface) Output ¶
func (l *LayerSurface) Output() *sw.WlOutput
func (*LayerSurface) Placement ¶
func (*LayerSurface) Placement() image.Rectangle
func (*LayerSurface) RoleName ¶
func (l *LayerSurface) RoleName() string
func (*LayerSurface) SetAnchor ¶
func (l *LayerSurface) SetAnchor(obj *swlr.ZwlrLayerSurfaceV1, anchor Edges) error
func (*LayerSurface) SetExclusiveEdge ¶
func (l *LayerSurface) SetExclusiveEdge(obj *swlr.ZwlrLayerSurfaceV1, edge Edges) error
func (*LayerSurface) SetExclusiveZone ¶
func (l *LayerSurface) SetExclusiveZone(_ *swlr.ZwlrLayerSurfaceV1, zone int32) error
func (*LayerSurface) SetKeyboardInteractivity ¶
func (l *LayerSurface) SetKeyboardInteractivity(obj *swlr.ZwlrLayerSurfaceV1, k Interactivity) error
func (*LayerSurface) SetLayer ¶
func (l *LayerSurface) SetLayer(_ *swlr.ZwlrLayerSurfaceV1, layer Layer) error
func (*LayerSurface) SetMargin ¶
func (l *LayerSurface) SetMargin(_ *swlr.ZwlrLayerSurfaceV1, top, right, bottom, left int32) error
func (*LayerSurface) SetSize ¶
func (l *LayerSurface) SetSize(_ *swlr.ZwlrLayerSurfaceV1, w, h uint32) error
func (*LayerSurface) Surface ¶
func (l *LayerSurface) Surface() *surface.Surface
type Listener ¶
type Listener interface {
ToplevelInitialCommit(t *Toplevel) error
ToplevelMapped(t *Toplevel) error
ToplevelUnmapped(t *Toplevel) error
ToplevelChanged(t *Toplevel, c Change) error
ToplevelRequest(t *Toplevel, r Request) error
ClientResponsive(c *server.Client, responsive bool) error
PopupConstraint(root PopupRoot) image.Rectangle
LayerCommitted(l *LayerSurface) error
LayerUnmapped(l *LayerSurface) error
LayerDestroyed(l *LayerSurface) error
PopupMapped(p *Popup) error
PopupUnmapped(p *Popup) error
UserActive(c *server.Client, serial uint32) bool
MintActivationToken(c *server.Client, serial uint32) (string, error)
GrabChanged() error
LockChanged() error
LockReleasing() error
LockOutputSize(output *sw.WlOutput) (image.Point, bool)
}
type LockSurface ¶
type LockSurface struct {
// contains filtered or unexported fields
}
func (*LockSurface) AckConfigure ¶
func (s *LockSurface) AckConfigure(obj *sel.ExtSessionLockSurfaceV1, serial uint32) error
func (*LockSurface) Destroy ¶
func (*LockSurface) Destroy(*sel.ExtSessionLockSurfaceV1) error
func (*LockSurface) Output ¶
func (s *LockSurface) Output() *sw.WlOutput
func (*LockSurface) Placement ¶
func (*LockSurface) Placement() image.Rectangle
func (*LockSurface) RoleName ¶
func (*LockSurface) RoleName() string
func (*LockSurface) Surface ¶
func (s *LockSurface) Surface() *surface.Surface
type Popup ¶
type Popup struct {
// contains filtered or unexported fields
}
func (*Popup) Reconstrain ¶
func (*Popup) Reposition ¶
type Positioner ¶
type Resize ¶
type Resize struct {
Serial uint32
Edges sxdg.XdgToplevelResizeEdge
}
type SessionLock ¶
type SessionLock struct {
// contains filtered or unexported fields
}
func (*SessionLock) Destroy ¶
func (l *SessionLock) Destroy(obj *sel.ExtSessionLockV1) error
func (*SessionLock) GetLockSurface ¶
func (l *SessionLock) GetLockSurface(obj *sel.ExtSessionLockV1, res *sel.ExtSessionLockSurfaceV1, wl *sw.WlSurface, output *sw.WlOutput) (sel.ExtSessionLockSurfaceV1Handler, error)
func (*SessionLock) UnlockAndDestroy ¶
func (l *SessionLock) UnlockAndDestroy(obj *sel.ExtSessionLockV1) error
type SetFullscreen ¶
type SetFullscreen struct{ On bool }
type SetMaximized ¶
type SetMaximized struct{ On bool }
type SetMinimized ¶
type SetMinimized struct{}
type Shell ¶
type Shell struct {
// contains filtered or unexported fields
}
func (*Shell) ConfirmLock ¶
func (*Shell) DismissGrab ¶
func (*Shell) LockConfirmed ¶
func (*Shell) LockSurfaces ¶
func (sh *Shell) LockSurfaces() []*LockSurface
func (*Shell) ReconfigureLock ¶
type ShowWindowMenu ¶
type State ¶
type State struct {
Size image.Point
Bounds image.Point
States []ToplevelState
}
func (State) Has ¶
func (s State) Has(st ToplevelState) bool
type Toplevel ¶
type Toplevel struct {
// contains filtered or unexported fields
}
func (*Toplevel) Description ¶
func (*Toplevel) LatestSerial ¶
func (*Toplevel) Resize ¶
func (t *Toplevel) Resize(obj *sxdg.XdgToplevel, _ *sw.WlSeat, serial uint32, edges sxdg.XdgToplevelResizeEdge) error
func (*Toplevel) ServerDecorated ¶
func (*Toplevel) SetFullscreen ¶
func (*Toplevel) SetMaxSize ¶
func (t *Toplevel) SetMaxSize(obj *sxdg.XdgToplevel, w, h int32) error
func (*Toplevel) SetMaximized ¶
func (t *Toplevel) SetMaximized(*sxdg.XdgToplevel) error
func (*Toplevel) SetMinSize ¶
func (t *Toplevel) SetMinSize(obj *sxdg.XdgToplevel, w, h int32) error
func (*Toplevel) SetMinimized ¶
func (t *Toplevel) SetMinimized(*sxdg.XdgToplevel) error
func (*Toplevel) SetParent ¶
func (t *Toplevel) SetParent(obj *sxdg.XdgToplevel, parent *sxdg.XdgToplevel) error
func (*Toplevel) ShowWindowMenu ¶
func (*Toplevel) UnsetFullscreen ¶
func (t *Toplevel) UnsetFullscreen(*sxdg.XdgToplevel) error
func (*Toplevel) UnsetMaximized ¶
func (t *Toplevel) UnsetMaximized(*sxdg.XdgToplevel) error
func (*Toplevel) WantsFullscreen ¶
func (*Toplevel) WantsMaximized ¶
type ToplevelState ¶
type ToplevelState = sxdg.XdgToplevelState
type XdgSurface ¶
type XdgSurface struct {
// contains filtered or unexported fields
}
func (*XdgSurface) AckConfigure ¶
func (xs *XdgSurface) AckConfigure(obj *sxdg.XdgSurface, serial uint32) error
func (*XdgSurface) Destroy ¶
func (xs *XdgSurface) Destroy(obj *sxdg.XdgSurface) error
func (*XdgSurface) Geometry ¶
func (xs *XdgSurface) Geometry() image.Rectangle
func (*XdgSurface) GetPopup ¶
func (xs *XdgSurface) GetPopup(obj *sxdg.XdgSurface, res *sxdg.XdgPopup, parent *sxdg.XdgSurface, pos *sxdg.XdgPositioner) (sxdg.XdgPopupHandler, error)
func (*XdgSurface) GetToplevel ¶
func (xs *XdgSurface) GetToplevel(obj *sxdg.XdgSurface, res *sxdg.XdgToplevel) (sxdg.XdgToplevelHandler, error)
func (*XdgSurface) HandoverPrelude ¶
func (*XdgSurface) Placement ¶
func (xs *XdgSurface) Placement() image.Rectangle
func (*XdgSurface) RoleName ¶
func (xs *XdgSurface) RoleName() string
func (*XdgSurface) SetWindowGeometry ¶
func (xs *XdgSurface) SetWindowGeometry(obj *sxdg.XdgSurface, x, y, w, h int32) error
Click to show internal directories.
Click to hide internal directories.