Versions in this module Expand all Collapse all v0 v0.3.2 Aug 29, 2026 Changes in this version + const RoleWindow v0.3.1 Aug 28, 2026 v0.3.0 Aug 28, 2026 v0.2.0 Aug 28, 2026 Changes in this version type AXWindow + func (w *AXWindow) Attributes() ([]string, error) + func (w *AXWindow) Role() (role, subrole string, err error) v0.1.0 Aug 26, 2026 Changes in this version + const DefaultTolerance + var ErrClosed = errors.New("accessibility: window handle already released") + var ErrNoDisplays = errors.New("accessibility: no displays") + var ErrNoWindow = errors.New("accessibility: no movable window") + var ErrNotTrusted = errors.New("accessibility: this process is not trusted for Accessibility") + var ErrRefused = errors.New("accessibility: the window did not move where it was told") + var ErrUnsupported = errors.New("accessibility: unsupported on this platform (darwin only)") + func CloseWindows(ws []*AXWindow) + func RequestTrust() bool + func SortWindows(windows []WindowInfo) + func Trusted() bool + type AXError int32 + const AXAPIDisabled + const AXActionUnsupported + const AXAttributeUnsupported + const AXCannotComplete + const AXFailure + const AXIllegalArgument + const AXInvalidUIElement + const AXInvalidUIElementObserver + const AXNoValue + const AXNotEnoughPrecision + const AXNotImplemented + const AXNotificationAlreadyRegd + const AXNotificationNotRegistered + const AXNotificationUnsupported + const AXParameterizedAttrUnsupport + const AXSuccess + func (e AXError) Err(op string) error + func (e AXError) Error() string + type AXWindow struct + func AllWindows() ([]*AXWindow, error) + func FocusedWindow() (*AXWindow, error) + func WindowsOf(pid int, appName string) ([]*AXWindow, error) + func (w *AXWindow) App() string + func (w *AXWindow) Close() error + func (w *AXWindow) Frame() (Rect, error) + func (w *AXWindow) Info() (WindowInfo, error) + func (w *AXWindow) PID() int + func (w *AXWindow) Raise() error + func (w *AXWindow) SetPosition(Point) error + func (w *AXWindow) SetPosition(p Point) error + func (w *AXWindow) SetSize(Size) error + func (w *AXWindow) SetSize(s Size) error + func (w *AXWindow) Title() string + type Application struct + Active bool + Bundle string + Name string + PID int + func Applications() ([]Application, error) + func (a Application) String() string + type Display struct + Bounds Rect + ID uint32 + Main bool + func DisplayByID(displays []Display, id uint32) (Display, bool) + func DisplayFor(frame Rect, displays []Display) (Display, bool) + func Displays() ([]Display, error) + func MainDisplay(displays []Display) (Display, bool) + func (d Display) String() string + type Options struct + Inset float64 + NoClamp bool + NoRaise bool + Placement Placement + Tolerance float64 + type Placement int + const Center + const Fill + const Origin + const Relative + func (p Placement) String() string + type Point struct + X float64 + Y float64 + func (p Point) String() string + type Rect struct + H float64 + W float64 + X float64 + Y float64 + func Place(frame Rect, from, to Display, opts *Options) Rect + func (r Rect) Area() float64 + func (r Rect) Bottom() float64 + func (r Rect) Center() Point + func (r Rect) Contains(p Point) bool + func (r Rect) Empty() bool + func (r Rect) Inset(d float64) Rect + func (r Rect) Intersect(o Rect) Rect + func (r Rect) NearlyEqual(o Rect, tol float64) bool + func (r Rect) Offset(dx, dy float64) Rect + func (r Rect) Origin() Point + func (r Rect) Right() float64 + func (r Rect) Size() Size + func (r Rect) String() string + type Result struct + Attempts int + Before Rect + From Display + Got Rect + Moved bool + Raised bool + Resized bool + To Display + Wanted Rect + func Move(w Window, want Rect, opts *Options) (Result, error) + func MoveToDisplay(w Window, to Display, displays []Display, opts *Options) (Result, error) + func (r Result) String() string + type ServerWindow struct + Frame Rect + Layer int + Number int + Owner string + PID int + Title string + func ServerWindows() ([]ServerWindow, error) + func (s ServerWindow) String() string + type Size struct + H float64 + W float64 + func (s Size) String() string + type Trust struct + Bundle string + Bundled bool + Name string + Path string + Responsible string + Trusted bool + func Status() (Trust, error) + func (t Trust) Advice() string + func (t Trust) String() string + type Window interface + Frame func() (Rect, error) + Raise func() error + SetPosition func(Point) error + SetSize func(Size) error + type WindowInfo struct + App string + Display uint32 + Frame Rect + Minimized bool + PID int + Title string + func Annotate(windows []WindowInfo, displays []Display) []WindowInfo + func List() ([]WindowInfo, error) + func (i WindowInfo) String() string