Documentation
¶
Index ¶
- func BlockApp(appName, title, reason string, tags []string) error
- func BlockURL(targetURL, title, reason string, tags []string, appName string) error
- func GetIdentity() (string, error)
- func OnActiveAppTitleChange(_ context.Context, fn func(event NativeEvent))
- func OnIdleChange(callback func(idleSeconds float64))
- func OnTitleChange(callback func(event NativeEvent))
- type AxEventType
- type InstalledBrowser
- type NativeEvent
- type NativeService
- func (s *NativeService) CheckAccessibility() bool
- func (s *NativeService) CheckAutomation(bundleID string) bool
- func (s *NativeService) DisableLoginItem() error
- func (s *NativeService) EnableLoginItem() error
- func (s *NativeService) GetInstalledBrowsers() []InstalledBrowser
- func (s *NativeService) LoginItemEnabled() bool
- func (s *NativeService) OpenSettings()
- func (s *NativeService) RequestAccessibility() bool
- func (s *NativeService) RequestAutomation(bundleID string) bool
- func (s *NativeService) StartObserver()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetIdentity ¶
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 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()
Click to show internal directories.
Click to hide internal directories.