focusedwindow

package
v0.0.0-...-84a99a9 Latest Latest
Warning

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

Go to latest
Published: May 11, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package focusedwindow is a windows implementation of determining the currently focused window using user32 and syscall

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNoFocusedWindow returned if no title is found for a focused window
	ErrNoFocusedWindow = errors.New("no focused window")
	// ErrNoTitle returned if a title is not found
	ErrNoTitle = errors.New("no title")
)

Functions

This section is empty.

Types

type FocusedWindow

type FocusedWindow struct {
	// contains filtered or unexported fields
}

FocusedWindow stores relevant sys calls for determining a focused window

func New

func New() FocusedWindow

New returns a focused window using user32

func (*FocusedWindow) Title

func (s *FocusedWindow) Title() (string, error)

Title returns the title of a currently focused window or an error

Jump to

Keyboard shortcuts

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