Documentation
¶
Index ¶
- Variables
- type App
- type AppOptions
- type WebkitSettings
- type Window
- 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
- type WindowState
Constants ¶
This section is empty.
Variables ¶
View Source
var URLScheme = "app"
View Source
var UserAgent = "webkit2gtk"
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
func New ¶
func New(options AppOptions) *App
func (*App) CurrentWindow ¶
type AppOptions ¶
type WebkitSettings ¶
type WebkitSettings struct {
EnableJavascript bool
AutoLoadImages bool
LoadIconsIgnoringImageLoadSetting bool
EnableOfflineWebApplicationCache bool
EnableHtml5LocalStorage bool
EnableHtml5Database bool
EnableXssAuditor bool
EnableFrameFlattening bool
EnablePlugins bool
EnableJava bool
JavascriptCanOpenWindowsAutomatically bool
EnableHyperlinkAuditing bool
DefaultFontFamily string
MonospaceFontFamily string
SerifFontFamily string
SansSerifFontFamily string
CursiveFontFamily string
FantasyFontFamily string
PictographFontFamily string
DefaultFontSize uint32
DefaultMonospaceFontSize uint32
MinimumFontSize uint32
DefaultCharset string
EnableDeveloperExtras bool
EnableResizableTextAreas bool
EnableTabsToLinks bool
EnableDnsPrefetching bool
EnableCaretBrowsing bool
EnableFullscreen bool
PrintBackgrounds bool
EnableWebAudio bool
EnableWebgl bool
AllowModalDialogs bool
ZoomTextOnly bool
JavascriptCanAccessClipboard bool
MediaPlaybackRequiresUserGesture bool
MediaPlaybackAllowsInline bool
DrawCompositingIndicators bool
EnableSiteSpecificQuirks bool
EnablePageCache bool
UserAgent string
EnableSmoothScrolling bool
EnableAccelerated2DCanvas bool
EnableWriteConsoleMessagesToStdout bool
EnableMediaStream bool
EnableMockCaptureDevices bool
EnableMediaSource bool
EnableEncryptedMedia bool
EnableMediaCapabilities bool
AllowFileAccessFromFileUrls bool
AllowUniversalAccessFromFileUrls bool
HardwareAccelerationPolicy int
EnableJavascriptMarkup bool
EnableMedia bool
MediaContentTypesRequiringHardwareSupport string
EnableWebRTC bool
DisableWebSecurity bool
}
type Window ¶
type Window struct {
// contains filtered or unexported fields
}
func (*Window) DisableSizeConstraints ¶
func (w *Window) DisableSizeConstraints()
func (*Window) Fullscreen ¶
func (w *Window) Fullscreen()
func (*Window) IsFullscreen ¶
func (*Window) IsMaximised ¶
func (*Window) IsMinimised ¶
func (*Window) SetFrameless ¶
func (*Window) SetMaxSize ¶
func (*Window) SetMinMaxSize ¶
func (*Window) SetMinSize ¶
func (*Window) SetOverlay ¶
func (*Window) ToggleDevTools ¶
func (w *Window) ToggleDevTools()
func (*Window) Unfullscreen ¶
func (w *Window) Unfullscreen()
func (*Window) Unmaximise ¶
func (w *Window) Unmaximise()
func (*Window) Unminimise ¶
func (w *Window) Unminimise()
type WindowOptions ¶
type WindowOptions struct {
// Name is a unique identifier of the window.
Name string
// Title is the title of the page.
Title string
// URL is the URL of the page to load.
URL string
// HTML Content to load (if URL is not set).
HTML string
// CSS to load after the page has loaded.
CSS []string
// JS to load after the page has loaded.
JS []string
// Define global Variables and APIs.
Define map[string]interface{}
// Width is the starting width of the window.
Width int
// Height is the starting height of the window.
Height int
// Overlay will make the window float above other windows.
Overlay bool
// Frameless will remove the window frame.
Frameless bool
// MinWidth is the minimum width of the window.
MinWidth int
// MinHeight is the minimum height of the window.
MinHeight int
// MaxWidth is the maximum width of the window.
MaxWidth int
// MaxHeight is the maximum height of the window.
MaxHeight int
// State indicates the state of the window when it is first shown.
// Default: WindowStateNormal
State WindowState
// Centered will Center the window on the screen.
Centered bool
// Color specified the window color as a hex string (#RGB, #RGBA, #RRGGBB, #RRGGBBAA)
Color string
// X is the starting X position of the window.
X int
// Y is the starting Y position of the window.
Y int
// Hidden will Hide the window when it is first created.
Hidden bool
// Zoom is the initial Zoom level of the window.
Zoom float64
// ZoomControlEnabled will enable the Zoom control.
ZoomControlEnabled bool
// OpenInspectorOnStartup will open the inspector when the window is first shown.
OpenInspectorOnStartup bool
// Focused indicates the window should be focused when initially shown
Focused bool
// HideOnClose will hide the window when it is closed instead of destroying it.
HideOnClose bool
// WebkitSettings exposes the underlying WebkitSettings object.
WebkitSettings WebkitSettings
}
type WindowState ¶
type WindowState int
const ( WindowStateNormal WindowState = iota WindowStateMinimised WindowStateMaximised WindowStateFullscreen )
Click to show internal directories.
Click to hide internal directories.