native

package
v0.0.19 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlockApp

func BlockApp(name string) error

func BlockURL

func BlockURL(url string, title string, reason string, tags string, bundleID string) error

func GetIdentity

func GetIdentity() (string, error)

func MinimiseApp

func MinimiseApp(bundleID string) error

func OnActiveAppTitleChange

func OnActiveAppTitleChange(_ context.Context, fn func(event NativeEvent))

Types

type AxEventType

type AxEventType int

AxEventType represents the type of accessibility event

const (
	// AxEventTypeTitle is fired when the frontmost window's title changes
	AxEventTypeTitle AxEventType = 1
	// AxEventTypeIdle is fired when user idle state changes
	AxEventTypeIdle AxEventType = 2
)

type NativeEvent

type NativeEvent struct {
	Type           AxEventType
	PID            int
	ExecutablePath string
	AppName        string
	BundleID       string
	Icon           string
	Title          string
	AppIcon        string // base64 encoded PNG
	URL            string
}

NativeEvent represents an accessibility event from the observer

func (*NativeEvent) BrowserHostname

func (e *NativeEvent) BrowserHostname() string

func (*NativeEvent) Domain

func (e *NativeEvent) Domain() string

Jump to

Keyboard shortcuts

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