Documentation
¶
Index ¶
- Variables
- func BorderWidth(win XWin) uint16
- func ButtonWidth(win XWin) uint16
- func CaptureWindow(conn *xgb.Conn, win xproto.Window) *image.NRGBA
- func LoadCursors(x *xgbutil.XUtil)
- func TitleHeight(win XWin) uint16
- func WindowActiveGet(x *xgbutil.XUtil) (xproto.Window, error)
- func WindowExtendedHintsAdd(x *xgbutil.XUtil, win xproto.Window, hint string)
- func WindowExtendedHintsGet(x *xgbutil.XUtil, win xproto.Window) []string
- func WindowExtendedHintsRemove(x *xgbutil.XUtil, win xproto.Window, hint string)
- func WindowName(x *xgbutil.XUtil, win xproto.Window) string
- func WindowTransientForGet(x *xgbutil.XUtil, win xproto.Window) xproto.Window
- type WindowStateAction
- type XWM
- type XWin
Constants ¶
This section is empty.
Variables ¶
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 )
var ( // AllowedActions is the list of actions the window manager allows AllowedActions = []string{ "_NET_WM_ACTION_MOVE", "_NET_WM_ACTION_RESIZE", "_NET_WM_ACTION_MINIMIZE", "_NET_WM_ACTION_MAXIMIZE_HORZ", "_NET_WM_ACTION_MAXIMIZE_VERT", "_NET_WM_ACTION_CLOSE", "_NET_WM_ACTION_FULLSCREEN", } // SupportedHints is the complete list of hints that we support SupportedHints = append(AllowedActions, "_NET_ACTIVE_WINDOW", "_NET_CLIENT_LIST", "_NET_CLIENT_LIST_STACKING", "_NET_CURRENT_DESKTOP", "_NET_DESKTOP_GEOMETRY", "_NET_DESKTOP_VIEWPORT", "_NET_FRAME_EXTENTS", "_NET_MOVERESIZE_WINDOW", "_NET_NUMBER_OF_DESKTOPS", "_NET_WM_FULL_PLACEMENT", "_NET_WM_FULLSCREEN_MONITORS", "_NET_WM_MOVERESIZE", "_NET_WM_NAME", "_NET_WM_STATE", "_NET_WM_STATE_FULLSCREEN", "_NET_WM_STATE_HIDDEN", "_NET_WM_STATE_MAXIMIZED_HORZ", "_NET_WM_STATE_MAXIMIZED_VERT", "_NET_WM_STATE_SKIP_PAGER", "_NET_WM_STATE_SKIP_TASKBAR", "_NET_WORKAREA", "_NET_SUPPORTED", ) )
Functions ¶
func BorderWidth ¶
BorderWidth is the number of pixels required for a border
func ButtonWidth ¶
ButtonWidth is the number of pixels required for a border button
func CaptureWindow ¶
CaptureWindow allows x11 code to get the image representation of a screen area. The window specified will be captured according to its bounds.
func TitleHeight ¶
TitleHeight is the number of pixels required for a title bar
func WindowActiveGet ¶
WindowActiveGet returns the currently active window
func WindowExtendedHintsAdd ¶
WindowExtendedHintsAdd adds a hint to the window
func WindowExtendedHintsGet ¶
WindowExtendedHintsGet returns a hint from the window
func WindowExtendedHintsRemove ¶
WindowExtendedHintsRemove removes a hint from the window
func WindowName ¶
WindowName gets the name of an X window
Types ¶
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 { fynedesk.WindowManager 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 { fynedesk.Window FrameID() xproto.Window ChildID() xproto.Window SizeMin() (uint, uint) SizeMax() (int, int) Geometry() (int, int, uint, uint) Expose() Refresh() SettingsChanged() NotifyBorderChange() NotifyGeometry(int, int, uint, uint) NotifyMoveResizeEnded() NotifyMaximize() NotifyUnMaximize() NotifyFullscreen() NotifyUnFullscreen() NotifyIconify() NotifyUnIconify() 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