native

package
v0.0.30 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlockApp

func BlockApp(appName, title, reason string, tags []string) error

func BlockURL

func BlockURL(targetURL, title, reason string, tags []string, appName string) error

func GetIdentity

func GetIdentity() (string, error)

func OnActiveAppTitleChange

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

func OnIdleChange added in v0.0.21

func OnIdleChange(callback func(idleSeconds float64))

func OnTitleChange added in v0.0.21

func OnTitleChange(callback 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 InstalledBrowser added in v0.0.28

type InstalledBrowser struct {
	BundleID string `json:"bundleID"`
	Name     string `json:"name"`
}

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

type NativeService added in v0.0.21

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

NativeService is a Wails-bound service for managing OS permissions. On Linux, these are unimplemented stubs.

func NewNativeService added in v0.0.21

func NewNativeService() *NativeService

func (*NativeService) CheckAccessibility added in v0.0.21

func (s *NativeService) CheckAccessibility() bool

func (*NativeService) CheckAutomation added in v0.0.27

func (s *NativeService) CheckAutomation(bundleID string) bool

func (*NativeService) DisableLoginItem added in v0.0.21

func (s *NativeService) DisableLoginItem() error

func (*NativeService) EnableLoginItem added in v0.0.21

func (s *NativeService) EnableLoginItem() error

func (*NativeService) GetInstalledBrowsers added in v0.0.28

func (s *NativeService) GetInstalledBrowsers() []InstalledBrowser

func (*NativeService) LoginItemEnabled added in v0.0.21

func (s *NativeService) LoginItemEnabled() bool

func (*NativeService) OpenSettings added in v0.0.21

func (s *NativeService) OpenSettings()

func (*NativeService) RequestAccessibility added in v0.0.21

func (s *NativeService) RequestAccessibility() bool

func (*NativeService) RequestAutomation added in v0.0.21

func (s *NativeService) RequestAutomation(bundleID string) bool

func (*NativeService) StartObserver added in v0.0.21

func (s *NativeService) StartObserver()

Jump to

Keyboard shortcuts

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