Versions in this module Expand all Collapse all v0 v0.32.0 Jul 31, 2024 Changes in this version + const EventNameSessionCmdGetCookie + const EventNameSessionEventChangedCookie + const EventNameSessionEventGetCookie type Event + CookieName string + CookieValue string type Session + func (s *Session) GetCookie(cookieName string) (err error) v0.31.0 Jul 31, 2024 Changes in this version + const DefaultAcceptTCPTimeout + const DefaultVersionAstilectron + const DefaultVersionElectron + const DockBounceTypeCritical + const DockBounceTypeInformational + const EventNameAppClose + const EventNameAppCmdQuit + const EventNameAppCmdStop + const EventNameAppCrash + const EventNameAppErrorAccept + const EventNameAppEventReady + const EventNameAppEventSecondInstance + const EventNameAppNoAccept + const EventNameAppTooManyAccept + const EventNameDisplayEventAdded + const EventNameDisplayEventMetricsChanged + const EventNameDisplayEventRemoved + const EventNameGlobalShortcutEventTriggered + const EventNameGlobalShortcutsCmdIsRegistered + const EventNameGlobalShortcutsCmdRegister + const EventNameGlobalShortcutsCmdUnregister + const EventNameGlobalShortcutsCmdUnregisterAll + const EventNameGlobalShortcutsEventIsRegistered + const EventNameGlobalShortcutsEventRegistered + const EventNameGlobalShortcutsEventUnregistered + const EventNameGlobalShortcutsEventUnregisteredAll + const EventNameMenuCmdCreate + const EventNameMenuCmdDestroy + const EventNameMenuEventCreated + const EventNameMenuEventDestroyed + const EventNameMenuItemCmdSetChecked + const EventNameMenuItemCmdSetEnabled + const EventNameMenuItemCmdSetLabel + const EventNameMenuItemCmdSetVisible + const EventNameMenuItemEventCheckedSet + const EventNameMenuItemEventClicked + const EventNameMenuItemEventEnabledSet + const EventNameMenuItemEventLabelSet + const EventNameMenuItemEventVisibleSet + const EventNameNotificationEventClicked + const EventNameNotificationEventClosed + const EventNameNotificationEventCreated + const EventNameNotificationEventReplied + const EventNameNotificationEventShown + const EventNamePowerLockScreen + const EventNamePowerOnAC + const EventNamePowerOnBattery + const EventNamePowerResume + const EventNamePowerShutdown + const EventNamePowerSuspend + const EventNamePowerUnlockScreen + const EventNamePowerUserDidBecomeActive + const EventNamePowerUserDidResignActive + const EventNameSessionCmdClearCache + const EventNameSessionCmdFlushStorage + const EventNameSessionCmdLoadExtension + const EventNameSessionEventClearedCache + const EventNameSessionEventFlushedStorage + const EventNameSessionEventLoadedExtension + const EventNameSessionEventWillDownload + const EventNameSubMenuCmdAppend + const EventNameSubMenuCmdClosePopup + const EventNameSubMenuCmdInsert + const EventNameSubMenuCmdPopup + const EventNameSubMenuEventAppended + const EventNameSubMenuEventClosedPopup + const EventNameSubMenuEventInserted + const EventNameSubMenuEventPoppedUp + const EventNameTrayCmdCreate + const EventNameTrayCmdDestroy + const EventNameTrayCmdPopupContextMenu + const EventNameTrayCmdSetImage + const EventNameTrayEventClicked + const EventNameTrayEventContextMenuPoppedUp + const EventNameTrayEventCreated + const EventNameTrayEventDestroyed + const EventNameTrayEventDoubleClicked + const EventNameTrayEventImageSet + const EventNameTrayEventRightClicked + const EventNameWebContentsEventLogin + const EventNameWebContentsEventLoginCallback + const EventNameWindowCmdBlur + const EventNameWindowCmdCenter + const EventNameWindowCmdClose + const EventNameWindowCmdCreate + const EventNameWindowCmdDestroy + const EventNameWindowCmdFocus + const EventNameWindowCmdHide + const EventNameWindowCmdLog + const EventNameWindowCmdMaximize + const EventNameWindowCmdMinimize + const EventNameWindowCmdMove + const EventNameWindowCmdMoveTop + const EventNameWindowCmdResize + const EventNameWindowCmdResizeContent + const EventNameWindowCmdRestore + const EventNameWindowCmdSetAlwaysOnTop + const EventNameWindowCmdSetBounds + const EventNameWindowCmdSetContentProtection + const EventNameWindowCmdSetFullScreen + const EventNameWindowCmdShow + const EventNameWindowCmdUnmaximize + const EventNameWindowCmdUpdateCustomOptions + const EventNameWindowCmdWebContentsCloseDevTools + const EventNameWindowCmdWebContentsExecuteJavaScript + const EventNameWindowCmdWebContentsOpenDevTools + const EventNameWindowEventAlwaysOnTopChanged + const EventNameWindowEventBlur + const EventNameWindowEventClosed + const EventNameWindowEventContentProtectionSet + const EventNameWindowEventDidFinishLoad + const EventNameWindowEventDidGetRedirectRequest + const EventNameWindowEventEnterFullScreen + const EventNameWindowEventFocus + const EventNameWindowEventHide + const EventNameWindowEventLeaveFullScreen + const EventNameWindowEventMaximize + const EventNameWindowEventMinimize + const EventNameWindowEventMove + const EventNameWindowEventMoved + const EventNameWindowEventMovedTop + const EventNameWindowEventReadyToShow + const EventNameWindowEventResize + const EventNameWindowEventResizeContent + const EventNameWindowEventRestore + const EventNameWindowEventShow + const EventNameWindowEventUnmaximize + const EventNameWindowEventUnresponsive + const EventNameWindowEventUpdatedCustomOptions + const EventNameWindowEventWebContentsExecutedJavaScript + const EventNameWindowEventWillMove + const EventNameWindowEventWillNavigate + const MessageBoxTypeError + const MessageBoxTypeInfo + const MessageBoxTypeNone + const MessageBoxTypeQuestion + const MessageBoxTypeWarning + var MenuItemRoleAbout = astikit.StrPtr("about") + var MenuItemRoleClose = astikit.StrPtr("close") + var MenuItemRoleCopy = astikit.StrPtr("copy") + var MenuItemRoleCut = astikit.StrPtr("cut") + var MenuItemRoleDelete = astikit.StrPtr("delete") + var MenuItemRoleEditMenu = astikit.StrPtr("editMenu") + var MenuItemRoleForceReload = astikit.StrPtr("forcereload") + var MenuItemRoleFront = astikit.StrPtr("front") + var MenuItemRoleHelp = astikit.StrPtr("help") + var MenuItemRoleHide = astikit.StrPtr("hide") + var MenuItemRoleHideOthers = astikit.StrPtr("hideothers") + var MenuItemRoleMinimize = astikit.StrPtr("minimize") + var MenuItemRolePaste = astikit.StrPtr("paste") + var MenuItemRolePasteAndMatchStyle = astikit.StrPtr("pasteandmatchstyle") + var MenuItemRoleQuit = astikit.StrPtr("quit") + var MenuItemRoleRedo = astikit.StrPtr("redo") + var MenuItemRoleReload = astikit.StrPtr("reload") + var MenuItemRoleResetZoom = astikit.StrPtr("resetzoom") + var MenuItemRoleSelectAll = astikit.StrPtr("selectall") + var MenuItemRoleServices = astikit.StrPtr("services") + var MenuItemRoleStartSpeaking = astikit.StrPtr("startspeaking") + var MenuItemRoleStopSpeaking = astikit.StrPtr("stopspeaking") + var MenuItemRoleToggleDevTools = astikit.StrPtr("toggledevtools") + var MenuItemRoleToggleFullScreen = astikit.StrPtr("togglefullscreen") + var MenuItemRoleUndo = astikit.StrPtr("undo") + var MenuItemRoleUnhide = astikit.StrPtr("unhide") + var MenuItemRoleWindow = astikit.StrPtr("window") + var MenuItemRoleWindowMenu = astikit.StrPtr("windowMenu") + var MenuItemRoleZoom = astikit.StrPtr("zoom") + var MenuItemRoleZoomIn = astikit.StrPtr("zoomin") + var MenuItemRoleZoomOut = astikit.StrPtr("zoomout") + var MenuItemTypeCheckbox = astikit.StrPtr("checkbox") + var MenuItemTypeNormal = astikit.StrPtr("normal") + var MenuItemTypeRadio = astikit.StrPtr("radio") + var MenuItemTypeSeparator = astikit.StrPtr("separator") + var TitleBarStyleDefault = astikit.StrPtr("default") + var TitleBarStyleHidden = astikit.StrPtr("hidden") + var TitleBarStyleHiddenInset = astikit.StrPtr("hidden-inset") + func AstilectronDownloadSrc(versionAstilectron string) string + func DefaultExecuter(l astikit.SeverityLogger, a *Astilectron, cmd *exec.Cmd) (err error) + func Disembed(ctx context.Context, l astikit.SeverityLogger, d Disembedder, src, dst string) (err error) + func Download(ctx context.Context, l astikit.SeverityLogger, d *astikit.HTTPDownloader, ...) (err error) + func ElectronDownloadSrc(os, arch, versionElectron string) string + func IsValidOS(os string) (ok bool) + func Unzip(ctx context.Context, l astikit.SeverityLogger, src, dst string) (err error) + type Accelerator []string + func NewAccelerator(items ...string) (a *Accelerator) + func (a *Accelerator) MarshalText() ([]byte, error) + func (a *Accelerator) UnmarshalText(b []byte) error + type Astilectron struct + func New(l astikit.StdLogger, o Options) (a *Astilectron, err error) + func (a *Astilectron) Close() + func (a *Astilectron) Displays() []*Display + func (a *Astilectron) Dock() *Dock + func (a *Astilectron) GlobalShortcuts() *GlobalShortcuts + func (a *Astilectron) HandleSignals(hs ...astikit.SignalHandler) + func (a *Astilectron) NewMenu(i []*MenuItemOptions) *Menu + func (a *Astilectron) NewNotification(o *NotificationOptions) *Notification + func (a *Astilectron) NewTray(o *TrayOptions) *Tray + func (a *Astilectron) NewWindow(url string, o *WindowOptions) (*Window, error) + func (a *Astilectron) NewWindowInDisplay(d *Display, url string, o *WindowOptions) (*Window, error) + func (a *Astilectron) On(eventName string, l Listener) + func (a *Astilectron) Paths() Paths + func (a *Astilectron) PrimaryDisplay() *Display + func (a *Astilectron) Quit() error + func (a *Astilectron) SetExecuter(e Executer) *Astilectron + func (a *Astilectron) SetProvisioner(p Provisioner) *Astilectron + func (a *Astilectron) Start() (err error) + func (a *Astilectron) Stop() + func (a *Astilectron) Wait() + type CallbackMessage func(m *EventMessage) + type Disembedder func(src string) ([]byte, error) + type Display struct + func (d Display) Bounds() Rectangle + func (d Display) ID() int64 + func (d Display) IsPrimary() bool + func (d Display) IsTouchAvailable() bool + func (d Display) Rotation() int + func (d Display) ScaleFactor() float64 + func (d Display) Size() Size + func (d Display) WorkArea() Rectangle + func (d Display) WorkAreaSize() Size + type DisplayOptions struct + Bounds *RectangleOptions + ID *int64 + Rotation *int + ScaleFactor *float64 + Size *SizeOptions + TouchSupport *string + WorkArea *RectangleOptions + WorkAreaSize *SizeOptions + type Dock struct + func (d *Dock) Bounce(bounceType string) (id int, err error) + func (d *Dock) BounceDownloads(filePath string) (err error) + func (d *Dock) CancelBounce(id int) (err error) + func (d *Dock) Hide() (err error) + func (d *Dock) NewMenu(i []*MenuItemOptions) *Menu + func (d *Dock) SetBadge(badge string) (err error) + func (d *Dock) SetIcon(image string) (err error) + func (d *Dock) Show() (err error) + func (o Dock) On(eventName string, l Listener) + type Event struct + AuthInfo *EventAuthInfo + Badge *string + BounceType string + Bounds *RectangleOptions + CallbackID string + Code string + Displays *EventDisplays + Enable *bool + FilePath string + GlobalShortcuts *EventGlobalShortcuts + ID *int + Image string + Index *int + Menu *EventMenu + MenuItem *EventMenuItem + MenuItemOptions *MenuItemOptions + MenuItemPosition *int + MenuPopupOptions *MenuPopupOptions + Message *EventMessage + Name string + NotificationOptions *NotificationOptions + Password string + Path string + Reply string + Request *EventRequest + SecondInstance *EventSecondInstance + SessionID string + Supported *Supported + TargetID string + TrayOptions *TrayOptions + URL string + URLNew string + URLOld string + Username string + WindowID string + WindowOptions *WindowOptions + type EventAuthInfo struct + Host string + IsProxy *bool + Port *int + Realm string + Scheme string + type EventDisplays struct + All []*DisplayOptions + Primary *DisplayOptions + type EventGlobalShortcuts struct + Accelerator string + IsRegistered bool + type EventMenu struct + type EventMenuItem struct + ID string + Options *MenuItemOptions + RootID string + SubMenu *EventSubMenu + type EventMessage struct + func (p *EventMessage) MarshalJSON() ([]byte, error) + func (p *EventMessage) Unmarshal(i interface{}) error + func (p *EventMessage) UnmarshalJSON(i []byte) error + type EventRequest struct + Method string + Referrer string + URL string + type EventSecondInstance struct + CommandLine []string + WorkingDirectory string + type EventSubMenu struct + ID string + Items []*EventMenuItem + RootID string + type Executer func(l astikit.SeverityLogger, a *Astilectron, cmd *exec.Cmd) (err error) + type GlobalShortcuts struct + func (gs *GlobalShortcuts) IsRegistered(accelerator string) (isRegistered bool, err error) + func (gs *GlobalShortcuts) Register(accelerator string, callback globalShortcutsCallback) (isRegistered bool, err error) + func (gs *GlobalShortcuts) Unregister(accelerator string) (err error) + func (gs *GlobalShortcuts) UnregisterAll() (err error) + func (o GlobalShortcuts) On(eventName string, l Listener) + type Listener func(e Event) (deleteListener bool) + type ListenerMessage func(m *EventMessage) (v interface{}) + type Menu struct + func (m *Menu) Create() (err error) + func (m *Menu) Destroy() (err error) + func (m Menu) Append(i *MenuItem) (err error) + func (m Menu) ClosePopup() error + func (m Menu) ClosePopupInWindow(w *Window) (err error) + func (m Menu) Insert(pos int, i *MenuItem) (err error) + func (m Menu) Item(indexes ...int) (mi *MenuItem, err error) + func (m Menu) NewItem(o *MenuItemOptions) *MenuItem + func (m Menu) Popup(o *MenuPopupOptions) error + func (m Menu) PopupInWindow(w *Window, o *MenuPopupOptions) (err error) + func (m Menu) SubMenu(indexes ...int) (s *SubMenu, err error) + type MenuItem struct + func (i *MenuItem) SetChecked(checked bool) (err error) + func (i *MenuItem) SetEnabled(enabled bool) (err error) + func (i *MenuItem) SetLabel(label string) (err error) + func (i *MenuItem) SetVisible(visible bool) (err error) + func (i *MenuItem) SubMenu() *SubMenu + func (o MenuItem) On(eventName string, l Listener) + type MenuItemOptions struct + Accelerator *Accelerator + Checked *bool + Enabled *bool + Icon *string + Label *string + OnClick Listener + Position *string + Role *string + SubLabel *string + SubMenu []*MenuItemOptions + Type *string + Visible *bool + type MenuPopupOptions struct + PositioningItem *int + type MessageBoxOptions struct + Buttons []string + CancelID *int + CheckboxChecked *bool + CheckboxLabel string + ConfirmID *int + DefaultID *int + Detail string + Icon string + Message string + NoLink *bool + Title string + Type string + type Notification struct + func (n *Notification) Create() (err error) + func (n *Notification) Show() (err error) + func (o Notification) On(eventName string, l Listener) + type NotificationOptions struct + Body string + HasReply *bool + Icon string + ReplyPlaceholder string + Silent *bool + Sound string + Subtitle string + Title string + type Options struct + AcceptTCPTimeout time.Duration + AppIconDarwinPath string + AppIconDefaultPath string + AppName string + BaseDirectoryPath string + CustomElectronPath string + DataDirectoryPath string + ElectronSwitches []string + SingleInstance bool + SkipSetup bool + TCPPort *int + VersionAstilectron string + VersionElectron string + type Paths struct + func (p Paths) AppExecutable() string + func (p Paths) AppIconDarwinSrc() string + func (p Paths) AppIconDefaultSrc() string + func (p Paths) AstilectronApplication() string + func (p Paths) AstilectronDirectory() string + func (p Paths) AstilectronDownloadDst() string + func (p Paths) AstilectronDownloadSrc() string + func (p Paths) AstilectronUnzipSrc() string + func (p Paths) BaseDirectory() string + func (p Paths) DataDirectory() string + func (p Paths) ElectronDirectory() string + func (p Paths) ElectronDownloadDst() string + func (p Paths) ElectronDownloadSrc() string + func (p Paths) ElectronUnzipSrc() string + func (p Paths) ProvisionStatus() string + func (p Paths) VendorDirectory() string + type Position struct + X int + Y int + type PositionOptions struct + X *int + Y *int + type ProvisionStatus struct + Astilectron *ProvisionStatusPackage + Electron map[string]*ProvisionStatusPackage + type ProvisionStatusPackage struct + Version string + type Provisioner interface + Provision func(ctx context.Context, ...) error + func NewDisembedderProvisioner(d Disembedder, pathAstilectron, pathElectron string, l astikit.StdLogger) Provisioner + type Rectangle struct + type RectangleOptions struct + type Session struct + func (o Session) On(eventName string, l Listener) + func (s *Session) ClearCache() (err error) + func (s *Session) FlushStorage() (err error) + func (s *Session) LoadExtension(path string) (err error) + type Size struct + Height int + Width int + type SizeOptions struct + Height *int + Width *int + type SubMenu struct + func (m SubMenu) Append(i *MenuItem) (err error) + func (m SubMenu) ClosePopup() error + func (m SubMenu) ClosePopupInWindow(w *Window) (err error) + func (m SubMenu) Insert(pos int, i *MenuItem) (err error) + func (m SubMenu) Item(indexes ...int) (mi *MenuItem, err error) + func (m SubMenu) NewItem(o *MenuItemOptions) *MenuItem + func (m SubMenu) Popup(o *MenuPopupOptions) error + func (m SubMenu) PopupInWindow(w *Window, o *MenuPopupOptions) (err error) + func (m SubMenu) SubMenu(indexes ...int) (s *SubMenu, err error) + type Supported struct + Notification *bool + type TrafficLightPosition struct + X *int + Y *int + type Tray struct + func (o Tray) On(eventName string, l Listener) + func (t *Tray) Create() (err error) + func (t *Tray) Destroy() (err error) + func (t *Tray) NewMenu(i []*MenuItemOptions) *Menu + func (t *Tray) PopUpContextMenu(p *TrayPopUpOptions) (err error) + func (t *Tray) SetImage(image string) (err error) + type TrayOptions struct + Image *string + Tooltip *string + type TrayPopUpOptions struct + Menu *Menu + Position *PositionOptions + type WebPreferences struct + AllowRunningInsecureContent *bool + BackgroundThrottling *bool + BlinkFeatures *string + DefaultEncoding *string + DefaultFontFamily map[string]interface{} + DefaultFontSize *int + DefaultMonospaceFontSize *int + DevTools *bool + DisableBlinkFeatures *string + EnableRemoteModule *bool + ExperimentalCanvasFeatures *bool + ExperimentalFeatures *bool + Images *bool + Javascript *bool + MinimumFontSize *int + NodeIntegrationInWorker *bool + Offscreen *bool + Partition *string + Plugins *bool + Preload *string + Sandbox *bool + ScrollBounce *bool + Session map[string]interface{} + TextAreasAreResizable *bool + WebSecurity *bool + Webaudio *bool + Webgl *bool + WebviewTag *bool + ZoomFactor *float64 + type Window struct + Session *Session + func (o Window) On(eventName string, l Listener) + func (w *Window) Blur() (err error) + func (w *Window) Bounds() (rect Rectangle, err error) + func (w *Window) Center() (err error) + func (w *Window) Close() (err error) + func (w *Window) CloseDevTools() (err error) + func (w *Window) Create() (err error) + func (w *Window) Destroy() (err error) + func (w *Window) ExecuteJavaScript(code string) (err error) + func (w *Window) Focus() (err error) + func (w *Window) Hide() (err error) + func (w *Window) IsFullScreen() bool + func (w *Window) IsShown() bool + func (w *Window) Log(message string) (err error) + func (w *Window) Maximize() (err error) + func (w *Window) Minimize() (err error) + func (w *Window) Move(x, y int) (err error) + func (w *Window) MoveInDisplay(d *Display, x, y int) error + func (w *Window) MoveTop() (err error) + func (w *Window) NewMenu(i []*MenuItemOptions) *Menu + func (w *Window) OnLogin(fn func(i Event) (username, password string, err error)) + func (w *Window) OnMessage(l ListenerMessage) + func (w *Window) OpenDevTools() (err error) + func (w *Window) Resize(width, height int) (err error) + func (w *Window) ResizeContent(width, height int) (err error) + func (w *Window) Restore() (err error) + func (w *Window) SendMessage(message interface{}, callbacks ...CallbackMessage) (err error) + func (w *Window) SetAlwaysOnTop(flag bool) (err error) + func (w *Window) SetBounds(r RectangleOptions) (err error) + func (w *Window) SetContentProtection(enable bool) (err error) + func (w *Window) SetFullScreen(enable bool) (err error) + func (w *Window) Show() (err error) + func (w *Window) Unmaximize() (err error) + func (w *Window) UpdateCustomOptions(o WindowCustomOptions) (err error) + type WindowAppDetails struct + AppID *string + AppIconIndex *int + AppIconPath *string + RelaunchCommand *string + RelaunchDisplayName *string + type WindowCustomOptions struct + HideOnClose *bool + MessageBoxOnClose *MessageBoxOptions + MinimizeOnClose *bool + Script string + type WindowLoadOptions struct + ExtraHeaders string + HTTPReferer string + UserAgent string + type WindowOptions struct + AcceptFirstMouse *bool + AlwaysOnTop *bool + AppDetails *WindowAppDetails + AutoHideMenuBar *bool + BackgroundColor *string + Center *bool + Closable *bool + Custom *WindowCustomOptions + DisableAutoHideCursor *bool + EnableLargerThanScreen *bool + Focusable *bool + Frame *bool + Fullscreen *bool + Fullscreenable *bool + HasShadow *bool + Height *int + Icon *string + Kiosk *bool + Load *WindowLoadOptions + MaxHeight *int + MaxWidth *int + Maximizable *bool + MinHeight *int + MinWidth *int + Minimizable *bool + Modal *bool + Movable *bool + Proxy *WindowProxyOptions + Resizable *bool + Show *bool + SkipTaskbar *bool + Title *string + TitleBarStyle *string + TrafficLightPosition *TrafficLightPosition + Transparent *bool + UseContentSize *bool + WebPreferences *WebPreferences + Width *int + X *int + Y *int + type WindowProxyOptions struct + BypassRules string + PACScript string + Rules string