Documentation
¶
Overview ¶
Package x11 is the Linux native window shell: a pure-Go X11 client that speaks the wire protocol directly (no Xlib, no CGO). See ../README.md.
Index ¶
- func Open(cfg shell.Config) (shell.Window, error)
- func ParseURIList(s string) []string
- type Error
- type Window
- func (w *Window) Clipboard() string
- func (w *Window) ClipboardHTML() string
- func (w *Window) Close()
- func (w *Window) Events() <-chan shell.Event
- func (w *Window) LastError() *Error
- func (w *Window) OpenURL(raw string) error
- func (w *Window) Present(frame *image.RGBA, damage image.Rectangle)
- func (w *Window) SetClipboard(s string)
- func (w *Window) SetClipboardRich(text, html string)
- func (w *Window) SetCursor(cur shell.Cursor)
- func (w *Window) SetFullscreen(on bool)
- func (w *Window) SetIcon(icon *image.RGBA)
- func (w *Window) SetTitle(t string)
- func (w *Window) Size() (int, int, float64)
- func (w *Window) Sync() error
- func (w *Window) UsesSHM() bool
- func (w *Window) WindowID() uint32
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseURIList ¶
ParseURIList extracts local file paths from a text/uri-list payload.
Types ¶
type Window ¶
type Window struct {
// contains filtered or unexported fields
}
Window is an X11 top-level window implementing shell.Window.
func OpenDisplay ¶
OpenDisplay opens a window on the named display ("" = $DISPLAY).
func (*Window) ClipboardHTML ¶
ClipboardHTML returns the text/html on CLIPBOARD ("" if there is none).
func (*Window) OpenURL ¶
OpenURL opens url with xdg-open. Only URLs with a scheme are accepted so a crafted value can never be interpreted as an option.
func (*Window) SetClipboard ¶
SetClipboard takes ownership of CLIPBOARD and serves s.
func (*Window) SetClipboardRich ¶
SetClipboardRich serves text and its HTML form (the text/html target) (shell.RichClipboard).
func (*Window) SetCursor ¶
SetCursor implements shell.Window using core-font glyph cursors, which need no theme files and work on every server.
func (*Window) SetFullscreen ¶
SetFullscreen asks the window manager (EWMH) to toggle fullscreen; without a window manager it resizes the window to cover the screen itself.
func (*Window) SetIcon ¶
SetIcon sets _NET_WM_ICON from a premultiplied RGBA image (downscaled to at most 256x256 with nearest-neighbour sampling if larger).
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
shelldemo
command
Command shelldemo animates frames into an X11 shell window and prints the achieved Present throughput and latency at a given size, for full-frame and partial-damage updates.
|
Command shelldemo animates frames into an X11 shell window and prints the achieved Present throughput and latency at a given size, for full-frame and partial-damage updates. |