Versions in this module Expand all Collapse all v0 v0.1.0 Jan 27, 2024 Changes in this version + const GSourceRemove + const GdkHintMaxSize + const GdkHintMinSize + const GdkWindowStateFullscreen + const GdkWindowStateIconified + const GdkWindowStateMaximized + const GtkButtonsCancel + const GtkButtonsClose + const GtkButtonsNone + const GtkButtonsOk + const GtkButtonsOkCancel + const GtkButtonsYesNo + const GtkDialogDestroyWithParent + const GtkDialogModal + const GtkDialogUseHeaderBar + const GtkOrientationVertical + var LogWriter = os.Stderr + var PanicHandler = func(v any) + func ToARGB(img *image.RGBA) (int, int, []byte) type App + func (a *App) Dialog() *Dialog + func (a *App) Handle(host string, handler http.Handler) + func (a *App) Menu(icon []byte) *TrayMenu + func (a *App) Notify(title, message string) *Notification type AppOptions + CacheDir string + CacheModel WebkitCacheModel + CookiePolicy WebkitCookiePolicy + DataDir string + Ephemeral bool + Hold bool + ID string + Icon []byte + type Dialog struct + func (d *Dialog) Ask(title string, message string, actions ...string) *MessageDialog + func (d *Dialog) Fail(title string, message string, actions ...string) *MessageDialog + func (d *Dialog) Info(title string, message string, actions ...string) *MessageDialog + func (d *Dialog) Open(title string) *OpenFileDialog + func (d *Dialog) Save(title string) *SaveFileDialog + func (d *Dialog) Warn(title string, message string, actions ...string) *MessageDialog + type JSObject struct + func (jso *JSObject) Get(name string) interface{} + type MenuItem struct + func (item *MenuItem) Checked() bool + func (item *MenuItem) Enabled() bool + func (item *MenuItem) Hidden() bool + func (item *MenuItem) IsCheckbox() bool + func (item *MenuItem) IsRadio() bool + func (item *MenuItem) IsSeparator() bool + func (item *MenuItem) IsSubmenu() bool + func (item *MenuItem) Label() string + func (item *MenuItem) OnClick(f func(bool)) *MenuItem + func (item *MenuItem) SetChecked(checked bool) *MenuItem + func (item *MenuItem) SetDisabled(disabled bool) *MenuItem + func (item *MenuItem) SetHidden(hidden bool) *MenuItem + func (item *MenuItem) SetIcon(icon []byte) *MenuItem + func (item *MenuItem) SetLabel(label string) *MenuItem + type MessageDialog struct + func (d *MessageDialog) AddButton(action string, label string) *MessageDialog + func (d *MessageDialog) AddCancel(action string, label string) *MessageDialog + func (d *MessageDialog) AddDefault(action string, label string) *MessageDialog + func (d *MessageDialog) SetIcon(icon []byte) *MessageDialog + func (d *MessageDialog) Show(callbacks ...func(int)) chan int + type Notification struct + func (n *Notification) Action(label string, callback func()) *Notification + func (n *Notification) Closed(callback func()) *Notification + func (n *Notification) Icon(icon []byte) *Notification + func (n *Notification) Show() (uint32, error) + func (n *Notification) Timeout(timeout time.Duration) *Notification + type OpenFileDialog struct + func (d *OpenFileDialog) AddFilter(displayName, pattern string) *OpenFileDialog + func (d *OpenFileDialog) AllowsMultipleSelection(allowsMultipleSelection bool) *OpenFileDialog + func (d *OpenFileDialog) AllowsOtherFileTypes(allowsOtherFileTypes bool) *OpenFileDialog + func (d *OpenFileDialog) CanChooseDirectories(canChooseDirectories bool) *OpenFileDialog + func (d *OpenFileDialog) CanChooseFiles(canChooseFiles bool) *OpenFileDialog + func (d *OpenFileDialog) CanCreateDirectories(canCreateDirectories bool) *OpenFileDialog + func (d *OpenFileDialog) CanSelectHiddenExtension(canSelectHiddenExtension bool) *OpenFileDialog + func (d *OpenFileDialog) HideExtension(hideExtension bool) *OpenFileDialog + func (d *OpenFileDialog) ResolvesAliases(resolvesAliases bool) *OpenFileDialog + func (d *OpenFileDialog) SetButtonText(text string) *OpenFileDialog + func (d *OpenFileDialog) SetDirectory(directory string) *OpenFileDialog + func (d *OpenFileDialog) Show(callbacks ...func([]string)) chan []string + func (d *OpenFileDialog) ShowHiddenFiles(showHiddenFiles bool) *OpenFileDialog + func (d *OpenFileDialog) TreatsFilePackagesAsDirectories(treatsFilePackagesAsDirectories bool) *OpenFileDialog + type SaveFileDialog struct + func (d *SaveFileDialog) AddFilter(displayName, pattern string) *SaveFileDialog + func (d *SaveFileDialog) AllowsOtherFileTypes(allowOtherFileTypes bool) *SaveFileDialog + func (d *SaveFileDialog) CanCreateDirectories(canCreateDirectories bool) *SaveFileDialog + func (d *SaveFileDialog) CanSelectHiddenExtension(canSelectHiddenExtension bool) *SaveFileDialog + func (d *SaveFileDialog) HideExtension(hideExtension bool) *SaveFileDialog + func (d *SaveFileDialog) SetButtonText(text string) *SaveFileDialog + func (d *SaveFileDialog) SetDirectory(directory string) *SaveFileDialog + func (d *SaveFileDialog) SetFilename(filename string) *SaveFileDialog + func (d *SaveFileDialog) Show(callbacks ...func(string)) chan string + func (d *SaveFileDialog) ShowHiddenFiles(showHiddenFiles bool) *SaveFileDialog + func (d *SaveFileDialog) TreatsFilePackagesAsDirectories(treatsFilePackagesAsDirectories bool) *SaveFileDialog + type TrayMenu struct + func (m *TrayMenu) Add(label string) *MenuItem + func (m *TrayMenu) AddCheckbox(label string, checked bool) *MenuItem + func (m *TrayMenu) AddRadio(label string, checked bool) *MenuItem + func (m *TrayMenu) AddSeparator() + func (m *TrayMenu) AddSubmenu(label string) *TrayMenu + func (m *TrayMenu) Item() *MenuItem + func (m *TrayMenu) SetLabel(label string) + func (m *TrayMenu) Update() + type WebkitCacheModel int + const CacheFull + const CacheLite + const CacheNone + type WebkitCookiePolicy int + const CookiesAcceptAll + const CookiesNoThirdParty + const CookiesRejectAll type Window + func (w *Window) Dialog() *Dialog + func (w *Window) JSCall(js string, fn func(interface{})) func() + func (w *Window) JSEval(js string, fn func(interface{})) func() + func (w *Window) JSPromise(js string, fn func(interface{})) func() + func (w *Window) SetHTML(html string) type WindowOptions + DevToolsEnabled bool v0.0.2 Dec 25, 2023 v0.0.1 Dec 25, 2023 Changes in this version + var URLScheme = "app" + var UserAgent = "webkit2gtk" + type App struct + func New(options AppOptions) *App + func (a *App) CurrentWindow() *Window + func (a *App) Open(options WindowOptions) *Window + func (a *App) Quit() + func (a *App) Run() error + type AppOptions struct + Debug bool + HideOnLastWindowClosed bool + LogWriter io.Writer + Name string + PanicHandler func(any) + type WebkitSettings struct + AllowFileAccessFromFileUrls bool + AllowModalDialogs bool + AllowTopNavigationToDataUrls bool + AllowUniversalAccessFromFileUrls bool + AutoLoadImages bool + CursiveFontFamily string + DefaultCharset string + DefaultFontFamily string + DefaultFontSize uint32 + DefaultMonospaceFontSize uint32 + DisableWebSecurity bool + DrawCompositingIndicators bool + EnableAccelerated2DCanvas bool + EnableBackForwardNavigationGestures bool + EnableCaretBrowsing bool + EnableDeveloperExtras bool + EnableDnsPrefetching bool + EnableEncryptedMedia bool + EnableFrameFlattening bool + EnableFullscreen bool + EnableHtml5Database bool + EnableHtml5LocalStorage bool + EnableHyperlinkAuditing bool + EnableJava bool + EnableJavascript bool + EnableJavascriptMarkup bool + EnableMedia bool + EnableMediaCapabilities bool + EnableMediaSource bool + EnableMediaStream bool + EnableMockCaptureDevices bool + EnableOfflineWebApplicationCache bool + EnablePageCache bool + EnablePlugins bool + EnableResizableTextAreas bool + EnableSiteSpecificQuirks bool + EnableSmoothScrolling bool + EnableSpatialNavigation bool + EnableTabsToLinks bool + EnableWebAudio bool + EnableWebRTC bool + EnableWebgl bool + EnableWriteConsoleMessagesToStdout bool + EnableXssAuditor bool + FantasyFontFamily string + HardwareAccelerationPolicy int + JavascriptCanAccessClipboard bool + JavascriptCanOpenWindowsAutomatically bool + LoadIconsIgnoringImageLoadSetting bool + MediaContentTypesRequiringHardwareSupport string + MediaPlaybackAllowsInline bool + MediaPlaybackRequiresUserGesture bool + MinimumFontSize uint32 + MonospaceFontFamily string + PictographFontFamily string + PrintBackgrounds bool + SansSerifFontFamily string + SerifFontFamily string + UserAgent string + ZoomTextOnly bool + type Window struct + func (w *Window) AddCSS(css string) + func (w *Window) Center() + func (w *Window) Close() + func (w *Window) DisableSizeConstraints() + func (w *Window) ExecJS(js string) + func (w *Window) Focus() + func (w *Window) Fullscreen() + func (w *Window) GetSize() (int, int) + func (w *Window) GetZoom() float64 + func (w *Window) Hide() + func (w *Window) ID() uint + func (w *Window) IsFocused() bool + func (w *Window) IsFullscreen() bool + func (w *Window) IsMaximised() bool + func (w *Window) IsMinimised() bool + func (w *Window) Maximise() + func (w *Window) Minimise() + func (w *Window) Restore() + func (w *Window) SetFrameless(frameless bool) + func (w *Window) SetMaxSize(width, height int) + func (w *Window) SetMinMaxSize(minWidth, minHeight, maxWidth, maxHeight int) + func (w *Window) SetMinSize(width, height int) + func (w *Window) SetOverlay(alwaysOnTop bool) + func (w *Window) SetSize(width, height int) + func (w *Window) SetTitle(title string) + func (w *Window) SetURL(uri string) + func (w *Window) SetZoom(zoom float64) + func (w *Window) Show() + func (w *Window) ToggleDevTools() + func (w *Window) Unfullscreen() + func (w *Window) Unmaximise() + func (w *Window) Unminimise() + func (w *Window) ZoomIn() + func (w *Window) ZoomOut() + func (w *Window) ZoomReset() + type WindowOptions struct + CSS []string + Centered bool + Color string + Define map[string]interface{} + Focused bool + Frameless bool + HTML string + Height int + Hidden bool + HideOnClose bool + JS []string + MaxHeight int + MaxWidth int + MinHeight int + MinWidth int + Name string + OpenInspectorOnStartup bool + Overlay bool + State WindowState + Title string + URL string + WebkitSettings WebkitSettings + Width int + X int + Y int + Zoom float64 + ZoomControlEnabled bool + type WindowState int + const WindowStateFullscreen + const WindowStateMaximised + const WindowStateMinimised + const WindowStateNormal