Version: v0.3.0 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2021 License: BSD-3-Clause Imports: 13 Imported by: 0




This section is empty.


View Source
var (
	// DefaultCursor is the default X11 cursor
	DefaultCursor xproto.Cursor
	// CloseCursor is the window close X11 cursor
	CloseCursor xproto.Cursor
	// ResizeBottomCursor is the bottom only resize X11 cursor
	ResizeBottomCursor xproto.Cursor
	// ResizeBottomLeftCursor is the bottom left resize X11 cursor
	ResizeBottomLeftCursor xproto.Cursor
	// ResizeBottomRightCursor is the bottom right resize X11 cursor
	ResizeBottomRightCursor xproto.Cursor
	// ResizeLeftCursor is the left resize X11 cursor
	ResizeLeftCursor xproto.Cursor
	// ResizeRightCursor is the right resize X11 cursor
	ResizeRightCursor xproto.Cursor
	// ResizeTopLeftCursor is the top left resize X11 cursor
	ResizeTopLeftCursor xproto.Cursor
	// ResizeTopRightCursor is the top right resize X11 cursor
	ResizeTopRightCursor xproto.Cursor
View Source
var (
	// AllowedActions is the list of actions the window manager allows
	AllowedActions = []string{

	// SupportedHints is the complete list of hints that we support
	SupportedHints = append(AllowedActions, "_NET_ACTIVE_WINDOW",


func BorderWidth

func BorderWidth(win XWin) uint16

BorderWidth is the number of pixels required for a border

func ButtonWidth

func ButtonWidth(win XWin) uint16

ButtonWidth is the number of pixels required for a border button

func CaptureWindow

func CaptureWindow(conn *xgb.Conn, win xproto.Window) *image.NRGBA

CaptureWindow allows x11 code to get the image representation of a screen area. The window specified will be captured according to its bounds.

func LoadCursors

func LoadCursors(x *xgbutil.XUtil)

LoadCursors sets up the X11 cursors

func TitleHeight

func TitleHeight(win XWin) uint16

TitleHeight is the number of pixels required for a title bar

func WindowActiveGet

func WindowActiveGet(x *xgbutil.XUtil) (xproto.Window, error)

WindowActiveGet returns the currently active window

func WindowExtendedHintsAdd

func WindowExtendedHintsAdd(x *xgbutil.XUtil, win xproto.Window, hint string)

WindowExtendedHintsAdd adds a hint to the window

func WindowExtendedHintsGet

func WindowExtendedHintsGet(x *xgbutil.XUtil, win xproto.Window) []string

WindowExtendedHintsGet returns a hint from the window

func WindowExtendedHintsRemove

func WindowExtendedHintsRemove(x *xgbutil.XUtil, win xproto.Window, hint string)

WindowExtendedHintsRemove removes a hint from the window

func WindowName

func WindowName(x *xgbutil.XUtil, win xproto.Window) string

WindowName gets the name of an X window

func WindowTransientForGet

func WindowTransientForGet(x *xgbutil.XUtil, win xproto.Window) xproto.Window

WindowTransientForGet returns the window ID that the requested window is transient for. A return of 0 means that it is not transient


type WindowStateAction

type WindowStateAction int

WindowStateAction defines actions for manipulating window state

const (
	// WindowStateActionRemove removes a state
	WindowStateActionRemove WindowStateAction = 0
	// WindowStateActionAdd adds a state
	WindowStateActionAdd WindowStateAction = 1
	// WindowStateActionToggle inverts the state of an state
	WindowStateActionToggle WindowStateAction = 2

type XWM

type XWM interface {

	X() *xgbutil.XUtil
	Conn() *xgb.Conn

	RootID() xproto.Window

XWM describes the additional elements that an X11 window manager exposes

type XWin

type XWin interface {

	FrameID() xproto.Window
	ChildID() xproto.Window

	SizeMin() (uint, uint)
	SizeMax() (int, int)
	Geometry() (int, int, uint, uint)


	NotifyGeometry(int, int, uint, uint)


	NotifyMouseDrag(int16, int16)
	NotifyMouseMotion(int16, int16)
	NotifyMousePress(int16, int16, xproto.Button)
	NotifyMouseRelease(int16, int16, xproto.Button)

	QueueMoveResizeGeometry(int, int, uint, uint)

XWin describes the additional functions that X windows need to expose to be managed


Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL