Documentation
¶
Index ¶
- Constants
- Variables
- type Backend
- func (backend *Backend) Activate(handle Handle) error
- func (backend *Backend) Active() (Handle, error)
- func (backend *Backend) Bounds(handle Handle, client bool) (Rect, error)
- func (backend *Backend) Close(handle Handle) error
- func (backend *Backend) PID(handle Handle) (int, error)
- func (backend *Backend) Resolve(target int, isHandle bool) (Handle, error)
- func (backend *Backend) Select(target int, isHandle bool) error
- func (backend *Backend) Selected() Handle
- func (backend *Backend) SetState(handle Handle, state State, enabled bool) error
- func (backend *Backend) SetTopMost(handle Handle, enabled bool) error
- func (backend *Backend) State(handle Handle, state State) (bool, error)
- func (backend *Backend) Title(handle Handle) (string, error)
- func (backend *Backend) TopMost(handle Handle) (bool, error)
- type Handle
- type Rect
- type State
- type System
Constants ¶
View Source
const ( // StateMinimized identifies the minimized/iconic state. StateMinimized = windowbackend.StateMinimized // StateMaximized identifies the maximized/zoomed state. StateMaximized = windowbackend.StateMaximized )
Variables ¶
View Source
var ( // ErrWindowNotFound reports that no window matched the requested target. ErrWindowNotFound = errors.New("windows window not found") // ErrInvalidWindow reports a zero, stale, or otherwise invalid HWND. ErrInvalidWindow = errors.New("invalid Windows window handle") // ErrOperation reports a failed Win32 window operation. ErrOperation = errors.New("windows window operation failed") )
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
Backend resolves window targets and enforces the public operation contract.
func (*Backend) SetTopMost ¶
SetTopMost changes a window's topmost state without moving or resizing it.
type Handle ¶
type Handle = windowbackend.Handle
Handle is a platform-neutral representation of a Windows HWND.
type State ¶
type State = windowbackend.State
State identifies a queryable and mutable Windows presentation state.
type System ¶
type System interface {
ForegroundWindow() Handle
IsWindow(Handle) bool
FindWindowByPID(uint32) (Handle, error)
WindowProcessID(Handle) (uint32, error)
WindowText(Handle) (string, error)
WindowRect(Handle) (Rect, error)
ClientRect(Handle) (Rect, error)
SetForegroundWindow(Handle) error
SetWindowState(Handle, State, bool) error
WindowState(Handle, State) (bool, error)
IsTopMost(Handle) (bool, error)
SetTopMost(Handle, bool) error
CloseWindow(Handle) error
}
System abstracts the Win32 calls used by Backend.
Click to show internal directories.
Click to hide internal directories.