Documentation ¶
Index ¶
- Constants
- Variables
- func DownloadErrorQuark() glib.Quark
- func FaviconDatabaseErrorQuark() glib.Quark
- func GetMajorVersion() uint
- func GetMicroVersion() uint
- func GetMinorVersion() uint
- func JavascriptErrorQuark() glib.Quark
- func MediaErrorQuark() glib.Quark
- func MediaKeySystemPermissionGetName(request *MediaKeySystemPermissionRequest) string
- func NetworkErrorQuark() glib.Quark
- func NetworkSessionSetMemoryPressureSettings(settings *MemoryPressureSettings)
- func PolicyErrorQuark() glib.Quark
- func PrintErrorQuark() glib.Quark
- func SettingsFontSizeToPixels(points uint32) uint32
- func SettingsFontSizeToPoints(pixels uint32) uint32
- func SnapshotErrorQuark() glib.Quark
- func URIForDisplay(uri string) string
- func UserContentFilterErrorQuark() glib.Quark
- func UserMediaPermissionIsForAudioDevice(request *UserMediaPermissionRequest) bool
- func UserMediaPermissionIsForDisplayDevice(request *UserMediaPermissionRequest) bool
- func UserMediaPermissionIsForVideoDevice(request *UserMediaPermissionRequest) bool
- func UserMessageErrorQuark() glib.Quark
- type ApplicationInfo
- type AuthenticationRequest
- func (request *AuthenticationRequest) Authenticate(credential *Credential)
- func (request *AuthenticationRequest) CanSaveCredentials() bool
- func (request *AuthenticationRequest) Cancel()
- func (request *AuthenticationRequest) CertificatePINFlags() gio.TLSPasswordFlags
- func (request *AuthenticationRequest) ConnectAuthenticated(f func(credential *Credential)) coreglib.SignalHandle
- func (request *AuthenticationRequest) ConnectCancelled(f func()) coreglib.SignalHandle
- func (request *AuthenticationRequest) Host() string
- func (request *AuthenticationRequest) IsForProxy() bool
- func (request *AuthenticationRequest) IsRetry() bool
- func (request *AuthenticationRequest) Port() uint
- func (request *AuthenticationRequest) ProposedCredential() *Credential
- func (request *AuthenticationRequest) Realm() string
- func (request *AuthenticationRequest) Scheme() AuthenticationScheme
- func (request *AuthenticationRequest) SecurityOrigin() *SecurityOrigin
- func (request *AuthenticationRequest) SetCanSaveCredentials(enabled bool)
- func (request *AuthenticationRequest) SetProposedCredential(credential *Credential)
- type AuthenticationRequestClass
- type AuthenticationRequestOverrides
- type AuthenticationScheme
- type AutomationBrowsingContextPresentation
- type AutomationSession
- type AutomationSessionClass
- type AutomationSessionOverrides
- type AutoplayPolicy
- type BackForwardList
- func (backForwardList *BackForwardList) BackItem() *BackForwardListItem
- func (backForwardList *BackForwardList) BackList() []*BackForwardListItem
- func (backForwardList *BackForwardList) BackListWithLimit(limit uint) []*BackForwardListItem
- func (backForwardList *BackForwardList) ConnectChanged(f func(itemAdded *BackForwardListItem, itemsRemoved unsafe.Pointer)) coreglib.SignalHandle
- func (backForwardList *BackForwardList) CurrentItem() *BackForwardListItem
- func (backForwardList *BackForwardList) ForwardItem() *BackForwardListItem
- func (backForwardList *BackForwardList) ForwardList() []*BackForwardListItem
- func (backForwardList *BackForwardList) ForwardListWithLimit(limit uint) []*BackForwardListItem
- func (backForwardList *BackForwardList) Length() uint
- func (backForwardList *BackForwardList) NthItem(index int) *BackForwardListItem
- type BackForwardListClass
- type BackForwardListItem
- type BackForwardListItemClass
- type BackForwardListItemOverrides
- type BackForwardListOverrides
- type CacheModel
- type ClipboardPermissionRequest
- type ClipboardPermissionRequestClass
- type ClipboardPermissionRequestOverrides
- type ColorChooserRequest
- func (request *ColorChooserRequest) Cancel()
- func (request *ColorChooserRequest) ConnectFinished(f func()) coreglib.SignalHandle
- func (request *ColorChooserRequest) ElementRectangle() *gdk.Rectangle
- func (request *ColorChooserRequest) Finish()
- func (request *ColorChooserRequest) RGBA() *gdk.RGBA
- func (request *ColorChooserRequest) SetRGBA(rgba *gdk.RGBA)
- type ColorChooserRequestClass
- type ColorChooserRequestOverrides
- type ContextMenu
- func (menu *ContextMenu) Append(item *ContextMenuItem)
- func (menu *ContextMenu) Event() gdk.Eventer
- func (menu *ContextMenu) First() *ContextMenuItem
- func (menu *ContextMenu) Insert(item *ContextMenuItem, position int)
- func (menu *ContextMenu) ItemAtPosition(position uint) *ContextMenuItem
- func (menu *ContextMenu) Items() []*ContextMenuItem
- func (menu *ContextMenu) Last() *ContextMenuItem
- func (menu *ContextMenu) MoveItem(item *ContextMenuItem, position int)
- func (menu *ContextMenu) NItems() uint
- func (menu *ContextMenu) Prepend(item *ContextMenuItem)
- func (menu *ContextMenu) Remove(item *ContextMenuItem)
- func (menu *ContextMenu) RemoveAll()
- func (menu *ContextMenu) SetUserData(userData *glib.Variant)
- func (menu *ContextMenu) UserData() *glib.Variant
- type ContextMenuAction
- type ContextMenuClass
- type ContextMenuItem
- func NewContextMenuItemFromGaction(action gio.Actioner, label string, target *glib.Variant) *ContextMenuItem
- func NewContextMenuItemFromStockAction(action ContextMenuAction) *ContextMenuItem
- func NewContextMenuItemFromStockActionWithLabel(action ContextMenuAction, label string) *ContextMenuItem
- func NewContextMenuItemSeparator() *ContextMenuItem
- func NewContextMenuItemWithSubmenu(label string, submenu *ContextMenu) *ContextMenuItem
- type ContextMenuItemClass
- type ContextMenuItemOverrides
- type ContextMenuOverrides
- type CookieAcceptPolicy
- type CookieManager
- func (cookieManager *CookieManager) AcceptPolicyFinish(result gio.AsyncResulter) (CookieAcceptPolicy, error)
- func (cookieManager *CookieManager) AddCookieFinish(result gio.AsyncResulter) error
- func (cookieManager *CookieManager) AllCookiesFinish(result gio.AsyncResulter) ([]*soup.Cookie, error)
- func (cookieManager *CookieManager) ConnectChanged(f func()) coreglib.SignalHandle
- func (cookieManager *CookieManager) CookiesFinish(result gio.AsyncResulter) ([]*soup.Cookie, error)
- func (cookieManager *CookieManager) DeleteCookieFinish(result gio.AsyncResulter) error
- func (cookieManager *CookieManager) ReplaceCookiesFinish(result gio.AsyncResulter) error
- func (cookieManager *CookieManager) SetAcceptPolicy(policy CookieAcceptPolicy)
- func (cookieManager *CookieManager) SetPersistentStorage(filename string, storage CookiePersistentStorage)
- type CookieManagerClass
- type CookieManagerOverrides
- type CookiePersistentStorage
- type Credential
- func NewCredential(username string, password string, persistence CredentialPersistence) *Credential
- func NewCredentialForCertificate(certificate gio.TLSCertificater, persistence CredentialPersistence) *Credential
- func NewCredentialForCertificatePIN(pin string, persistence CredentialPersistence) *Credential
- func (credential *Credential) Certificate() gio.TLSCertificater
- func (credential *Credential) Copy() *Credential
- func (credential *Credential) HasPassword() bool
- func (credential *Credential) Password() string
- func (credential *Credential) Persistence() CredentialPersistence
- func (credential *Credential) Username() string
- type CredentialPersistence
- type DeviceInfoPermissionRequest
- type DeviceInfoPermissionRequestClass
- type DeviceInfoPermissionRequestOverrides
- type Download
- func (download *Download) AllowOverwrite() bool
- func (download *Download) Cancel()
- func (download *Download) ConnectCreatedDestination(f func(destination string)) coreglib.SignalHandle
- func (download *Download) ConnectDecideDestination(f func(suggestedFilename string) (ok bool)) coreglib.SignalHandle
- func (download *Download) ConnectFailed(f func(err error)) coreglib.SignalHandle
- func (download *Download) ConnectFinished(f func()) coreglib.SignalHandle
- func (download *Download) ConnectReceivedData(f func(dataLength uint64)) coreglib.SignalHandle
- func (download *Download) Destination() string
- func (download *Download) ElapsedTime() float64
- func (download *Download) EstimatedProgress() float64
- func (download *Download) ReceivedDataLength() uint64
- func (download *Download) Request() *URIRequest
- func (download *Download) Response() *URIResponse
- func (download *Download) SetAllowOverwrite(allowed bool)
- func (download *Download) SetDestination(destination string)
- func (download *Download) WebView() *WebView
- type DownloadClass
- type DownloadError
- type DownloadOverrides
- type EditorState
- func (editorState *EditorState) IsCopyAvailable() bool
- func (editorState *EditorState) IsCutAvailable() bool
- func (editorState *EditorState) IsPasteAvailable() bool
- func (editorState *EditorState) IsRedoAvailable() bool
- func (editorState *EditorState) IsUndoAvailable() bool
- func (editorState *EditorState) TypingAttributes() uint
- type EditorStateClass
- type EditorStateOverrides
- type EditorTypingAttributes
- type FaviconDatabase
- func (database *FaviconDatabase) Clear()
- func (database *FaviconDatabase) ConnectFaviconChanged(f func(pageUri, faviconUri string)) coreglib.SignalHandle
- func (database *FaviconDatabase) FaviconFinish(result gio.AsyncResulter) (gdk.Texturer, error)
- func (database *FaviconDatabase) FaviconURI(pageUri string) string
- type FaviconDatabaseClass
- type FaviconDatabaseError
- type FaviconDatabaseOverrides
- type Feature
- type FeatureList
- type FeatureStatus
- type FileChooserRequest
- func (request *FileChooserRequest) Cancel()
- func (request *FileChooserRequest) MIMETypes() []string
- func (request *FileChooserRequest) MIMETypesFilter() *gtk.FileFilter
- func (request *FileChooserRequest) SelectFiles(files []string)
- func (request *FileChooserRequest) SelectMultiple() bool
- func (request *FileChooserRequest) SelectedFiles() []string
- type FileChooserRequestClass
- type FileChooserRequestOverrides
- type FindController
- func (findController *FindController) ConnectCountedMatches(f func(matchCount uint)) coreglib.SignalHandle
- func (findController *FindController) ConnectFailedToFindText(f func()) coreglib.SignalHandle
- func (findController *FindController) ConnectFoundText(f func(matchCount uint)) coreglib.SignalHandle
- func (findController *FindController) CountMatches(searchText string, findOptions uint32, maxMatchCount uint)
- func (findController *FindController) MaxMatchCount() uint
- func (findController *FindController) Options() uint32
- func (findController *FindController) Search(searchText string, findOptions uint32, maxMatchCount uint)
- func (findController *FindController) SearchFinish()
- func (findController *FindController) SearchNext()
- func (findController *FindController) SearchPrevious()
- func (findController *FindController) SearchText() string
- func (findController *FindController) WebView() *WebView
- type FindControllerClass
- type FindControllerOverrides
- type FindOptions
- type FormSubmissionRequest
- type FormSubmissionRequestClass
- type FormSubmissionRequestOverrides
- type GeolocationManager
- func (manager *GeolocationManager) ConnectStart(f func() (ok bool)) coreglib.SignalHandle
- func (manager *GeolocationManager) ConnectStop(f func()) coreglib.SignalHandle
- func (manager *GeolocationManager) EnableHighAccuracy() bool
- func (manager *GeolocationManager) Failed(errorMessage string)
- func (manager *GeolocationManager) UpdatePosition(position *GeolocationPosition)
- type GeolocationManagerClass
- type GeolocationManagerOverrides
- type GeolocationPermissionRequest
- type GeolocationPermissionRequestClass
- type GeolocationPermissionRequestOverrides
- type GeolocationPosition
- func (position *GeolocationPosition) Copy() *GeolocationPosition
- func (position *GeolocationPosition) SetAltitude(altitude float64)
- func (position *GeolocationPosition) SetAltitudeAccuracy(altitudeAccuracy float64)
- func (position *GeolocationPosition) SetHeading(heading float64)
- func (position *GeolocationPosition) SetSpeed(speed float64)
- func (position *GeolocationPosition) SetTimestamp(timestamp uint64)
- type HardwareAccelerationPolicy
- type HitTestResult
- func (hitTestResult *HitTestResult) Context() uint
- func (hitTestResult *HitTestResult) ContextIsEditable() bool
- func (hitTestResult *HitTestResult) ContextIsImage() bool
- func (hitTestResult *HitTestResult) ContextIsLink() bool
- func (hitTestResult *HitTestResult) ContextIsMedia() bool
- func (hitTestResult *HitTestResult) ContextIsScrollbar() bool
- func (hitTestResult *HitTestResult) ContextIsSelection() bool
- func (hitTestResult *HitTestResult) ImageURI() string
- func (hitTestResult *HitTestResult) LinkLabel() string
- func (hitTestResult *HitTestResult) LinkTitle() string
- func (hitTestResult *HitTestResult) LinkURI() string
- func (hitTestResult *HitTestResult) MediaURI() string
- type HitTestResultClass
- type HitTestResultContext
- type HitTestResultOverrides
- type ITPFirstParty
- type ITPThirdParty
- type InputHints
- type InputMethodContext
- func (context *InputMethodContext) ConnectCommitted(f func(text string)) coreglib.SignalHandle
- func (context *InputMethodContext) ConnectDeleteSurrounding(f func(offset int, nChars uint)) coreglib.SignalHandle
- func (context *InputMethodContext) ConnectPreeditChanged(f func()) coreglib.SignalHandle
- func (context *InputMethodContext) ConnectPreeditFinished(f func()) coreglib.SignalHandle
- func (context *InputMethodContext) ConnectPreeditStarted(f func()) coreglib.SignalHandle
- func (context *InputMethodContext) FilterKeyEvent(keyEvent gdk.Eventer) bool
- func (context *InputMethodContext) InputHints() InputHints
- func (context *InputMethodContext) InputPurpose() InputPurpose
- func (context *InputMethodContext) NotifyCursorArea(x, y, width, height int)
- func (context *InputMethodContext) NotifyFocusIn()
- func (context *InputMethodContext) NotifyFocusOut()
- func (context *InputMethodContext) NotifySurrounding(text string, length int, cursorIndex, selectionIndex uint)
- func (context *InputMethodContext) Preedit() (string, []*InputMethodUnderline, uint)
- func (context *InputMethodContext) Reset()
- func (context *InputMethodContext) SetEnablePreedit(enabled bool)
- func (context *InputMethodContext) SetInputHints(hints InputHints)
- func (context *InputMethodContext) SetInputPurpose(purpose InputPurpose)
- type InputMethodContextClass
- type InputMethodContextOverrides
- type InputMethodContexter
- type InputMethodUnderline
- type InputPurpose
- type InsecureContentEvent
- type JavascriptError
- type LoadEvent
- type MediaCaptureState
- type MediaError
- type MediaKeySystemPermissionRequest
- type MediaKeySystemPermissionRequestClass
- type MediaKeySystemPermissionRequestOverrides
- type MemoryPressureSettings
- func (settings *MemoryPressureSettings) ConservativeThreshold() float64
- func (settings *MemoryPressureSettings) Copy() *MemoryPressureSettings
- func (settings *MemoryPressureSettings) KillThreshold() float64
- func (settings *MemoryPressureSettings) MemoryLimit() uint
- func (settings *MemoryPressureSettings) PollInterval() float64
- func (settings *MemoryPressureSettings) SetConservativeThreshold(value float64)
- func (settings *MemoryPressureSettings) SetKillThreshold(value float64)
- func (settings *MemoryPressureSettings) SetMemoryLimit(memoryLimit uint)
- func (settings *MemoryPressureSettings) SetPollInterval(value float64)
- func (settings *MemoryPressureSettings) SetStrictThreshold(value float64)
- func (settings *MemoryPressureSettings) StrictThreshold() float64
- type NavigationAction
- func (navigation *NavigationAction) Copy() *NavigationAction
- func (navigation *NavigationAction) FrameName() string
- func (navigation *NavigationAction) IsRedirect() bool
- func (navigation *NavigationAction) IsUserGesture() bool
- func (navigation *NavigationAction) Modifiers() uint
- func (navigation *NavigationAction) MouseButton() uint
- func (navigation *NavigationAction) NavigationType() NavigationType
- func (navigation *NavigationAction) Request() *URIRequest
- type NavigationPolicyDecision
- type NavigationPolicyDecisionClass
- type NavigationPolicyDecisionOverrides
- type NavigationType
- type NetworkError
- type NetworkProxyMode
- type NetworkProxySettings
- type NetworkSession
- func (session *NetworkSession) AllowTLSCertificateForHost(certificate gio.TLSCertificater, host string)
- func (session *NetworkSession) ConnectDownloadStarted(f func(download *Download)) coreglib.SignalHandle
- func (session *NetworkSession) CookieManager() *CookieManager
- func (session *NetworkSession) DownloadURI(uri string) *Download
- func (session *NetworkSession) IsEphemeral() bool
- func (session *NetworkSession) ItpEnabled() bool
- func (session *NetworkSession) ItpSummaryFinish(result gio.AsyncResulter) ([]*ITPThirdParty, error)
- func (session *NetworkSession) PersistentCredentialStorageEnabled() bool
- func (session *NetworkSession) PrefetchDns(hostname string)
- func (session *NetworkSession) SetItpEnabled(enabled bool)
- func (session *NetworkSession) SetPersistentCredentialStorageEnabled(enabled bool)
- func (session *NetworkSession) SetProxySettings(proxyMode NetworkProxyMode, proxySettings *NetworkProxySettings)
- func (session *NetworkSession) SetTLSErrorsPolicy(policy TLSErrorsPolicy)
- func (session *NetworkSession) TLSErrorsPolicy() TLSErrorsPolicy
- func (session *NetworkSession) WebsiteDataManager() *WebsiteDataManager
- type NetworkSessionClass
- type NetworkSessionOverrides
- type Notification
- func (notification *Notification) Body() string
- func (notification *Notification) Clicked()
- func (notification *Notification) Close()
- func (notification *Notification) ConnectClicked(f func()) coreglib.SignalHandle
- func (notification *Notification) ConnectClosed(f func()) coreglib.SignalHandle
- func (notification *Notification) ID() uint64
- func (notification *Notification) Tag() string
- func (notification *Notification) Title() string
- type NotificationClass
- type NotificationOverrides
- type NotificationPermissionRequest
- type NotificationPermissionRequestClass
- type NotificationPermissionRequestOverrides
- type OptionMenu
- func (menu *OptionMenu) ActivateItem(index uint)
- func (menu *OptionMenu) Close()
- func (menu *OptionMenu) ConnectClose(f func()) coreglib.SignalHandle
- func (menu *OptionMenu) Event() gdk.Eventer
- func (menu *OptionMenu) Item(index uint) *OptionMenuItem
- func (menu *OptionMenu) NItems() uint
- func (menu *OptionMenu) SelectItem(index uint)
- type OptionMenuClass
- type OptionMenuItem
- func (item *OptionMenuItem) Copy() *OptionMenuItem
- func (item *OptionMenuItem) IsEnabled() bool
- func (item *OptionMenuItem) IsGroupChild() bool
- func (item *OptionMenuItem) IsGroupLabel() bool
- func (item *OptionMenuItem) IsSelected() bool
- func (item *OptionMenuItem) Label() string
- func (item *OptionMenuItem) Tooltip() string
- type OptionMenuOverrides
- type PermissionRequest
- type PermissionRequestInterface
- type PermissionRequester
- type PermissionState
- type PermissionStateQuery
- type PointerLockPermissionRequest
- type PointerLockPermissionRequestClass
- type PointerLockPermissionRequestOverrides
- type PolicyDecision
- type PolicyDecisionClass
- type PolicyDecisionOverrides
- type PolicyDecisionType
- type PolicyDecisioner
- type PolicyError
- type PrintError
- type PrintOperation
- func (printOperation *PrintOperation) ConnectFailed(f func(err error)) coreglib.SignalHandle
- func (printOperation *PrintOperation) ConnectFinished(f func()) coreglib.SignalHandle
- func (printOperation *PrintOperation) PageSetup() *gtk.PageSetup
- func (printOperation *PrintOperation) Print()
- func (printOperation *PrintOperation) PrintSettings() *gtk.PrintSettings
- func (printOperation *PrintOperation) RunDialog(parent *gtk.Window) PrintOperationResponse
- func (printOperation *PrintOperation) SetPageSetup(pageSetup *gtk.PageSetup)
- func (printOperation *PrintOperation) SetPrintSettings(printSettings *gtk.PrintSettings)
- type PrintOperationClass
- type PrintOperationOverrides
- type PrintOperationResponse
- type ResponsePolicyDecision
- type ResponsePolicyDecisionClass
- type ResponsePolicyDecisionOverrides
- type SaveMode
- type ScriptDialog
- func (dialog *ScriptDialog) Close()
- func (dialog *ScriptDialog) ConfirmSetConfirmed(confirmed bool)
- func (dialog *ScriptDialog) DialogType() ScriptDialogType
- func (dialog *ScriptDialog) Message() string
- func (dialog *ScriptDialog) PromptGetDefaultText() string
- func (dialog *ScriptDialog) PromptSetText(text string)
- type ScriptDialogType
- type ScriptMessageReply
- type SecurityManager
- func (securityManager *SecurityManager) RegisterURISchemeAsCorsEnabled(scheme string)
- func (securityManager *SecurityManager) RegisterURISchemeAsDisplayIsolated(scheme string)
- func (securityManager *SecurityManager) RegisterURISchemeAsEmptyDocument(scheme string)
- func (securityManager *SecurityManager) RegisterURISchemeAsLocal(scheme string)
- func (securityManager *SecurityManager) RegisterURISchemeAsNoAccess(scheme string)
- func (securityManager *SecurityManager) RegisterURISchemeAsSecure(scheme string)
- func (securityManager *SecurityManager) URISchemeIsCorsEnabled(scheme string) bool
- func (securityManager *SecurityManager) URISchemeIsDisplayIsolated(scheme string) bool
- func (securityManager *SecurityManager) URISchemeIsEmptyDocument(scheme string) bool
- func (securityManager *SecurityManager) URISchemeIsLocal(scheme string) bool
- func (securityManager *SecurityManager) URISchemeIsNoAccess(scheme string) bool
- func (securityManager *SecurityManager) URISchemeIsSecure(scheme string) bool
- type SecurityManagerClass
- type SecurityManagerOverrides
- type SecurityOrigin
- type Settings
- func (settings *Settings) AllowFileAccessFromFileUrls() bool
- func (settings *Settings) AllowModalDialogs() bool
- func (settings *Settings) AllowTopNavigationToDataUrls() bool
- func (settings *Settings) AllowUniversalAccessFromFileUrls() bool
- func (settings *Settings) AutoLoadImages() bool
- func (settings *Settings) CursiveFontFamily() string
- func (settings *Settings) DefaultCharset() string
- func (settings *Settings) DefaultFontFamily() string
- func (settings *Settings) DefaultFontSize() uint32
- func (settings *Settings) DefaultMonospaceFontSize() uint32
- func (settings *Settings) DisableWebSecurity() bool
- func (settings *Settings) DrawCompositingIndicators() bool
- func (settings *Settings) EnableBackForwardNavigationGestures() bool
- func (settings *Settings) EnableCaretBrowsing() bool
- func (settings *Settings) EnableDeveloperExtras() bool
- func (settings *Settings) EnableDnsPrefetching() bool
- func (settings *Settings) EnableEncryptedMedia() bool
- func (settings *Settings) EnableFullscreen() bool
- func (settings *Settings) EnableHtml5Database() bool
- func (settings *Settings) EnableHtml5LocalStorage() bool
- func (settings *Settings) EnableHyperlinkAuditing() bool
- func (settings *Settings) EnableJavascript() bool
- func (settings *Settings) EnableJavascriptMarkup() bool
- func (settings *Settings) EnableMedia() bool
- func (settings *Settings) EnableMediaCapabilities() bool
- func (settings *Settings) EnableMediaStream() bool
- func (settings *Settings) EnableMediasource() bool
- func (settings *Settings) EnableMockCaptureDevices() bool
- func (settings *Settings) EnableOfflineWebApplicationCache() bool
- func (settings *Settings) EnablePageCache() bool
- func (settings *Settings) EnableResizableTextAreas() bool
- func (settings *Settings) EnableSiteSpecificQuirks() bool
- func (settings *Settings) EnableSmoothScrolling() bool
- func (settings *Settings) EnableSpatialNavigation() bool
- func (settings *Settings) EnableTabsToLinks() bool
- func (settings *Settings) EnableWebaudio() bool
- func (settings *Settings) EnableWebgl() bool
- func (settings *Settings) EnableWebrtc() bool
- func (settings *Settings) EnableWriteConsoleMessagesToStdout() bool
- func (settings *Settings) FantasyFontFamily() string
- func (settings *Settings) FeatureEnabled(feature *Feature) bool
- func (settings *Settings) HardwareAccelerationPolicy() HardwareAccelerationPolicy
- func (settings *Settings) JavascriptCanAccessClipboard() bool
- func (settings *Settings) JavascriptCanOpenWindowsAutomatically() bool
- func (settings *Settings) LoadIconsIgnoringImageLoadSetting() booldeprecated
- func (settings *Settings) MediaContentTypesRequiringHardwareSupport() string
- func (settings *Settings) MediaPlaybackAllowsInline() bool
- func (settings *Settings) MediaPlaybackRequiresUserGesture() bool
- func (settings *Settings) MinimumFontSize() uint32
- func (settings *Settings) MonospaceFontFamily() string
- func (settings *Settings) PictographFontFamily() string
- func (settings *Settings) PrintBackgrounds() bool
- func (settings *Settings) SansSerifFontFamily() string
- func (settings *Settings) SerifFontFamily() string
- func (settings *Settings) SetAllowFileAccessFromFileUrls(allowed bool)
- func (settings *Settings) SetAllowModalDialogs(allowed bool)
- func (settings *Settings) SetAllowTopNavigationToDataUrls(allowed bool)
- func (settings *Settings) SetAllowUniversalAccessFromFileUrls(allowed bool)
- func (settings *Settings) SetAutoLoadImages(enabled bool)
- func (settings *Settings) SetCursiveFontFamily(cursiveFontFamily string)
- func (settings *Settings) SetDefaultCharset(defaultCharset string)
- func (settings *Settings) SetDefaultFontFamily(defaultFontFamily string)
- func (settings *Settings) SetDefaultFontSize(fontSize uint32)
- func (settings *Settings) SetDefaultMonospaceFontSize(fontSize uint32)
- func (settings *Settings) SetDisableWebSecurity(disabled bool)
- func (settings *Settings) SetDrawCompositingIndicators(enabled bool)
- func (settings *Settings) SetEnableBackForwardNavigationGestures(enabled bool)
- func (settings *Settings) SetEnableCaretBrowsing(enabled bool)
- func (settings *Settings) SetEnableDeveloperExtras(enabled bool)
- func (settings *Settings) SetEnableDnsPrefetching(enabled bool)
- func (settings *Settings) SetEnableEncryptedMedia(enabled bool)
- func (settings *Settings) SetEnableFullscreen(enabled bool)
- func (settings *Settings) SetEnableHtml5Database(enabled bool)
- func (settings *Settings) SetEnableHtml5LocalStorage(enabled bool)
- func (settings *Settings) SetEnableHyperlinkAuditing(enabled bool)
- func (settings *Settings) SetEnableJavascript(enabled bool)
- func (settings *Settings) SetEnableJavascriptMarkup(enabled bool)
- func (settings *Settings) SetEnableMedia(enabled bool)
- func (settings *Settings) SetEnableMediaCapabilities(enabled bool)
- func (settings *Settings) SetEnableMediaStream(enabled bool)
- func (settings *Settings) SetEnableMediasource(enabled bool)
- func (settings *Settings) SetEnableMockCaptureDevices(enabled bool)
- func (settings *Settings) SetEnableOfflineWebApplicationCache(enabled bool)
- func (settings *Settings) SetEnablePageCache(enabled bool)
- func (settings *Settings) SetEnableResizableTextAreas(enabled bool)
- func (settings *Settings) SetEnableSiteSpecificQuirks(enabled bool)
- func (settings *Settings) SetEnableSmoothScrolling(enabled bool)
- func (settings *Settings) SetEnableSpatialNavigation(enabled bool)
- func (settings *Settings) SetEnableTabsToLinks(enabled bool)
- func (settings *Settings) SetEnableWebaudio(enabled bool)
- func (settings *Settings) SetEnableWebgl(enabled bool)
- func (settings *Settings) SetEnableWebrtc(enabled bool)
- func (settings *Settings) SetEnableWriteConsoleMessagesToStdout(enabled bool)
- func (settings *Settings) SetFantasyFontFamily(fantasyFontFamily string)
- func (settings *Settings) SetFeatureEnabled(feature *Feature, enabled bool)
- func (settings *Settings) SetHardwareAccelerationPolicy(policy HardwareAccelerationPolicy)
- func (settings *Settings) SetJavascriptCanAccessClipboard(enabled bool)
- func (settings *Settings) SetJavascriptCanOpenWindowsAutomatically(enabled bool)
- func (settings *Settings) SetLoadIconsIgnoringImageLoadSetting(enabled bool)deprecated
- func (settings *Settings) SetMediaContentTypesRequiringHardwareSupport(contentTypes string)
- func (settings *Settings) SetMediaPlaybackAllowsInline(enabled bool)
- func (settings *Settings) SetMediaPlaybackRequiresUserGesture(enabled bool)
- func (settings *Settings) SetMinimumFontSize(fontSize uint32)
- func (settings *Settings) SetMonospaceFontFamily(monospaceFontFamily string)
- func (settings *Settings) SetPictographFontFamily(pictographFontFamily string)
- func (settings *Settings) SetPrintBackgrounds(printBackgrounds bool)
- func (settings *Settings) SetSansSerifFontFamily(sansSerifFontFamily string)
- func (settings *Settings) SetSerifFontFamily(serifFontFamily string)
- func (settings *Settings) SetUserAgent(userAgent string)
- func (settings *Settings) SetUserAgentWithApplicationDetails(applicationName, applicationVersion string)
- func (settings *Settings) SetZoomTextOnly(zoomTextOnly bool)
- func (settings *Settings) UserAgent() string
- func (settings *Settings) ZoomTextOnly() bool
- type SettingsClass
- type SettingsOverrides
- type SnapshotError
- type SnapshotOptions
- type SnapshotRegion
- type TLSErrorsPolicy
- type URIRequest
- type URIRequestClass
- type URIRequestOverrides
- type URIResponse
- func (response *URIResponse) ContentLength() uint64
- func (response *URIResponse) HTTPHeaders() *soup.MessageHeaders
- func (response *URIResponse) MIMEType() string
- func (response *URIResponse) StatusCode() uint
- func (response *URIResponse) SuggestedFilename() string
- func (response *URIResponse) URI() string
- type URIResponseClass
- type URIResponseOverrides
- type URISchemeRequest
- func (request *URISchemeRequest) Finish(stream gio.InputStreamer, streamLength int64, contentType string)
- func (request *URISchemeRequest) FinishError(err error)
- func (request *URISchemeRequest) FinishWithResponse(response *URISchemeResponse)
- func (request *URISchemeRequest) HTTPBody() gio.InputStreamer
- func (request *URISchemeRequest) HTTPHeaders() *soup.MessageHeaders
- func (request *URISchemeRequest) HTTPMethod() string
- func (request *URISchemeRequest) Path() string
- func (request *URISchemeRequest) Scheme() string
- func (request *URISchemeRequest) URI() string
- func (request *URISchemeRequest) WebView() *WebView
- type URISchemeRequestCallback
- type URISchemeRequestClass
- type URISchemeRequestOverrides
- type URISchemeResponse
- type URISchemeResponseClass
- type URISchemeResponseOverrides
- type UserContentFilter
- type UserContentFilterError
- type UserContentFilterStore
- func (store *UserContentFilterStore) FetchIdentifiersFinish(result gio.AsyncResulter) []string
- func (store *UserContentFilterStore) LoadFinish(result gio.AsyncResulter) (*UserContentFilter, error)
- func (store *UserContentFilterStore) Path() string
- func (store *UserContentFilterStore) RemoveFinish(result gio.AsyncResulter) error
- func (store *UserContentFilterStore) SaveFinish(result gio.AsyncResulter) (*UserContentFilter, error)
- func (store *UserContentFilterStore) SaveFromFileFinish(result gio.AsyncResulter) (*UserContentFilter, error)
- type UserContentFilterStoreClass
- type UserContentFilterStoreOverrides
- type UserContentInjectedFrames
- type UserContentManager
- func (manager *UserContentManager) AddFilter(filter *UserContentFilter)
- func (manager *UserContentManager) AddScript(script *UserScript)
- func (manager *UserContentManager) AddStyleSheet(stylesheet *UserStyleSheet)
- func (manager *UserContentManager) ConnectScriptMessageReceived(f func(value *javascriptcore.Value)) coreglib.SignalHandle
- func (manager *UserContentManager) ConnectScriptMessageWithReplyReceived(f func(value *javascriptcore.Value, reply *ScriptMessageReply) (ok bool)) coreglib.SignalHandle
- func (manager *UserContentManager) RegisterScriptMessageHandler(name, worldName string) bool
- func (manager *UserContentManager) RegisterScriptMessageHandlerWithReply(name, worldName string) bool
- func (manager *UserContentManager) RemoveAllFilters()
- func (manager *UserContentManager) RemoveAllScripts()
- func (manager *UserContentManager) RemoveAllStyleSheets()
- func (manager *UserContentManager) RemoveFilter(filter *UserContentFilter)
- func (manager *UserContentManager) RemoveFilterByID(filterId string)
- func (manager *UserContentManager) RemoveScript(script *UserScript)
- func (manager *UserContentManager) RemoveStyleSheet(stylesheet *UserStyleSheet)
- func (manager *UserContentManager) UnregisterScriptMessageHandler(name, worldName string)
- type UserContentManagerClass
- type UserContentManagerOverrides
- type UserMediaPermissionRequest
- type UserMediaPermissionRequestClass
- type UserMediaPermissionRequestOverrides
- type UserMessage
- type UserMessageClass
- type UserMessageError
- type UserMessageOverrides
- type UserScript
- type UserScriptInjectionTime
- type UserStyleLevel
- type UserStyleSheet
- type WebContext
- func (context *WebContext) AddPathToSandbox(path string, readOnly bool)
- func (context *WebContext) CacheModel() CacheModel
- func (context *WebContext) ConnectAutomationStarted(f func(session *AutomationSession)) coreglib.SignalHandle
- func (context *WebContext) ConnectInitializeNotificationPermissions(f func()) coreglib.SignalHandle
- func (context *WebContext) ConnectInitializeWebProcessExtensions(f func()) coreglib.SignalHandle
- func (context *WebContext) ConnectUserMessageReceived(f func(message *UserMessage) (ok bool)) coreglib.SignalHandle
- func (context *WebContext) GeolocationManager() *GeolocationManager
- func (context *WebContext) InitializeNotificationPermissions(allowedOrigins, disallowedOrigins []*SecurityOrigin)
- func (context *WebContext) IsAutomationAllowed() bool
- func (context *WebContext) NetworkSessionForAutomation() *NetworkSession
- func (context *WebContext) RegisterURIScheme(scheme string, callback URISchemeRequestCallback)
- func (context *WebContext) SecurityManager() *SecurityManager
- func (context *WebContext) SendMessageToAllExtensions(message *UserMessage)
- func (context *WebContext) SetAutomationAllowed(allowed bool)
- func (context *WebContext) SetCacheModel(cacheModel CacheModel)
- func (context *WebContext) SetPreferredLanguages(languages []string)
- func (context *WebContext) SetSpellCheckingEnabled(enabled bool)
- func (context *WebContext) SetSpellCheckingLanguages(languages []string)
- func (context *WebContext) SetWebProcessExtensionsDirectory(directory string)
- func (context *WebContext) SetWebProcessExtensionsInitializationUserData(userData *glib.Variant)
- func (context *WebContext) SpellCheckingEnabled() bool
- func (context *WebContext) SpellCheckingLanguages() []string
- func (context *WebContext) TimeZoneOverride() string
- type WebContextClass
- type WebContextOverrides
- type WebExtensionMode
- type WebInspector
- func (inspector *WebInspector) Attach()
- func (inspector *WebInspector) AttachedHeight() uint
- func (inspector *WebInspector) CanAttach() bool
- func (inspector *WebInspector) Close()
- func (inspector *WebInspector) ConnectAttach(f func() (ok bool)) coreglib.SignalHandle
- func (inspector *WebInspector) ConnectBringToFront(f func() (ok bool)) coreglib.SignalHandle
- func (inspector *WebInspector) ConnectClosed(f func()) coreglib.SignalHandle
- func (inspector *WebInspector) ConnectDetach(f func() (ok bool)) coreglib.SignalHandle
- func (inspector *WebInspector) ConnectOpenWindow(f func() (ok bool)) coreglib.SignalHandle
- func (inspector *WebInspector) Detach()
- func (inspector *WebInspector) InspectedURI() string
- func (inspector *WebInspector) IsAttached() bool
- func (inspector *WebInspector) Show()
- func (inspector *WebInspector) WebView() *WebViewBase
- type WebInspectorClass
- type WebInspectorOverrides
- type WebProcessTerminationReason
- type WebResource
- func (resource *WebResource) ConnectFailed(f func(err error)) coreglib.SignalHandle
- func (resource *WebResource) ConnectFailedWithTLSErrors(f func(certificate gio.TLSCertificater, errors gio.TLSCertificateFlags)) coreglib.SignalHandle
- func (resource *WebResource) ConnectFinished(f func()) coreglib.SignalHandle
- func (resource *WebResource) ConnectSentRequest(f func(request *URIRequest, redirectedResponse *URIResponse)) coreglib.SignalHandle
- func (resource *WebResource) DataFinish(result gio.AsyncResulter) ([]byte, error)
- func (resource *WebResource) Response() *URIResponse
- func (resource *WebResource) URI() string
- type WebResourceClass
- type WebResourceOverrides
- type WebView
- func (webView *WebView) AutomationPresentationType() AutomationBrowsingContextPresentation
- func (webView *WebView) BackForwardList() *BackForwardList
- func (webView *WebView) BackgroundColor() *gdk.RGBA
- func (webView *WebView) CallAsyncJavascriptFunctionFinish(result gio.AsyncResulter) (*javascriptcore.Value, error)
- func (webView *WebView) CameraCaptureState() MediaCaptureState
- func (webView *WebView) CanExecuteEditingCommandFinish(result gio.AsyncResulter) error
- func (webView *WebView) CanGoBack() bool
- func (webView *WebView) CanGoForward() bool
- func (webView *WebView) CanShowMIMEType(mimeType string) bool
- func (webView *WebView) ConnectAuthenticate(f func(request *AuthenticationRequest) (ok bool)) coreglib.SignalHandle
- func (webView *WebView) ConnectClose(f func()) coreglib.SignalHandle
- func (webView *WebView) ConnectContextMenu(f func(contextMenu *ContextMenu, hitTestResult *HitTestResult) (ok bool)) coreglib.SignalHandle
- func (webView *WebView) ConnectContextMenuDismissed(f func()) coreglib.SignalHandle
- func (webView *WebView) ConnectCreate(f func(navigationAction *NavigationAction) (widget gtk.Widgetter)) coreglib.SignalHandle
- func (webView *WebView) ConnectDecidePolicy(f func(decision PolicyDecisioner, decisionType PolicyDecisionType) (ok bool)) coreglib.SignalHandle
- func (webView *WebView) ConnectEnterFullscreen(f func() (ok bool)) coreglib.SignalHandle
- func (webView *WebView) ConnectInsecureContentDetected(f func(event InsecureContentEvent)) coreglib.SignalHandle
- func (webView *WebView) ConnectLeaveFullscreen(f func() (ok bool)) coreglib.SignalHandle
- func (webView *WebView) ConnectLoadChanged(f func(loadEvent LoadEvent)) coreglib.SignalHandle
- func (webView *WebView) ConnectLoadFailed(f func(loadEvent LoadEvent, failingUri string, err error) (ok bool)) coreglib.SignalHandle
- func (webView *WebView) ConnectLoadFailedWithTLSErrors(f func(failingUri string, certificate gio.TLSCertificater, ...) (ok bool)) coreglib.SignalHandle
- func (webView *WebView) ConnectMouseTargetChanged(f func(hitTestResult *HitTestResult, modifiers uint)) coreglib.SignalHandle
- func (webView *WebView) ConnectPermissionRequest(f func(request PermissionRequester) (ok bool)) coreglib.SignalHandle
- func (webView *WebView) ConnectPrint(f func(printOperation *PrintOperation) (ok bool)) coreglib.SignalHandle
- func (webView *WebView) ConnectQueryPermissionState(f func(query *PermissionStateQuery) (ok bool)) coreglib.SignalHandle
- func (webView *WebView) ConnectReadyToShow(f func()) coreglib.SignalHandle
- func (webView *WebView) ConnectResourceLoadStarted(f func(resource *WebResource, request *URIRequest)) coreglib.SignalHandle
- func (webView *WebView) ConnectRunAsModal(f func()) coreglib.SignalHandle
- func (webView *WebView) ConnectRunColorChooser(f func(request *ColorChooserRequest) (ok bool)) coreglib.SignalHandle
- func (webView *WebView) ConnectRunFileChooser(f func(request *FileChooserRequest) (ok bool)) coreglib.SignalHandle
- func (webView *WebView) ConnectScriptDialog(f func(dialog *ScriptDialog) (ok bool)) coreglib.SignalHandle
- func (webView *WebView) ConnectShowNotification(f func(notification *Notification) (ok bool)) coreglib.SignalHandle
- func (webView *WebView) ConnectShowOptionMenu(f func(menu *OptionMenu, rectangle *gdk.Rectangle) (ok bool)) coreglib.SignalHandle
- func (webView *WebView) ConnectSubmitForm(f func(request *FormSubmissionRequest)) coreglib.SignalHandle
- func (webView *WebView) ConnectUserMessageReceived(f func(message *UserMessage) (ok bool)) coreglib.SignalHandle
- func (webView *WebView) ConnectWebProcessTerminated(f func(reason WebProcessTerminationReason)) coreglib.SignalHandle
- func (webView *WebView) Context() *WebContext
- func (webView *WebView) CustomCharset() string
- func (webView *WebView) DefaultContentSecurityPolicy() string
- func (webView *WebView) DisplayCaptureState() MediaCaptureState
- func (webView *WebView) DownloadURI(uri string) *Download
- func (webView *WebView) EditorState() *EditorState
- func (webView *WebView) EstimatedLoadProgress() float64
- func (webView *WebView) EvaluateJavascriptFinish(result gio.AsyncResulter) (*javascriptcore.Value, error)
- func (webView *WebView) ExecuteEditingCommand(command string)
- func (webView *WebView) ExecuteEditingCommandWithArgument(command, argument string)
- func (webView *WebView) Favicon() gdk.Texturer
- func (webView *WebView) FindController() *FindController
- func (webView *WebView) GoBack()
- func (webView *WebView) GoForward()
- func (webView *WebView) GoToBackForwardListItem(listItem *BackForwardListItem)
- func (webView *WebView) InputMethodContext() InputMethodContexter
- func (webView *WebView) Inspector() *WebInspector
- func (webView *WebView) IsControlledByAutomation() bool
- func (webView *WebView) IsEditable() bool
- func (webView *WebView) IsLoading() bool
- func (webView *WebView) IsMuted() bool
- func (webView *WebView) IsPlayingAudio() bool
- func (webView *WebView) IsWebProcessResponsive() bool
- func (webView *WebView) LoadAlternateHtml(content, contentUri, baseUri string)
- func (webView *WebView) LoadBytes(bytes *glib.Bytes, mimeType, encoding, baseUri string)
- func (webView *WebView) LoadHtml(content, baseUri string)
- func (webView *WebView) LoadPlainText(plainText string)
- func (webView *WebView) LoadRequest(request *URIRequest)
- func (webView *WebView) LoadURI(uri string)
- func (webView *WebView) MainResource() *WebResource
- func (webView *WebView) MicrophoneCaptureState() MediaCaptureState
- func (webView *WebView) NetworkSession() *NetworkSession
- func (webView *WebView) PageID() uint64
- func (webView *WebView) Reload()
- func (webView *WebView) ReloadBypassCache()
- func (webView *WebView) RestoreSessionState(state *WebViewSessionState)
- func (webView *WebView) SaveFinish(result gio.AsyncResulter) (gio.InputStreamer, error)
- func (webView *WebView) SaveToFileFinish(result gio.AsyncResulter) error
- func (webView *WebView) SendMessageToPageFinish(result gio.AsyncResulter) (*UserMessage, error)
- func (webView *WebView) SessionState() *WebViewSessionState
- func (webView *WebView) SetBackgroundColor(rgba *gdk.RGBA)
- func (webView *WebView) SetCameraCaptureState(state MediaCaptureState)
- func (webView *WebView) SetCorsAllowlist(allowlist []string)
- func (webView *WebView) SetCustomCharset(charset string)
- func (webView *WebView) SetDisplayCaptureState(state MediaCaptureState)
- func (webView *WebView) SetEditable(editable bool)
- func (webView *WebView) SetInputMethodContext(context InputMethodContexter)
- func (webView *WebView) SetIsMuted(muted bool)
- func (webView *WebView) SetMicrophoneCaptureState(state MediaCaptureState)
- func (webView *WebView) SetSettings(settings *Settings)
- func (webView *WebView) SetZoomLevel(zoomLevel float64)
- func (webView *WebView) Settings() *Settings
- func (webView *WebView) SnapshotFinish(result gio.AsyncResulter) (gdk.Texturer, error)
- func (webView *WebView) StopLoading()
- func (webView *WebView) TLSInfo() (gio.TLSCertificater, gio.TLSCertificateFlags, bool)
- func (webView *WebView) TerminateWebProcess()
- func (webView *WebView) Title() string
- func (webView *WebView) TryClose()
- func (webView *WebView) URI() string
- func (webView *WebView) UserContentManager() *UserContentManager
- func (webView *WebView) WebExtensionMode() WebExtensionMode
- func (webView *WebView) WebsitePolicies() *WebsitePolicies
- func (webView *WebView) WindowProperties() *WindowProperties
- func (webView *WebView) ZoomLevel() float64
- type WebViewBase
- type WebViewBaseClass
- type WebViewBaseOverrides
- type WebViewClass
- type WebViewOverrides
- type WebViewSessionState
- type WebsiteData
- type WebsiteDataAccessPermissionRequest
- type WebsiteDataAccessPermissionRequestClass
- type WebsiteDataAccessPermissionRequestOverrides
- type WebsiteDataManager
- func (manager *WebsiteDataManager) BaseCacheDirectory() string
- func (manager *WebsiteDataManager) BaseDataDirectory() string
- func (manager *WebsiteDataManager) ClearFinish(result gio.AsyncResulter) error
- func (manager *WebsiteDataManager) FaviconDatabase() *FaviconDatabase
- func (manager *WebsiteDataManager) FaviconsEnabled() bool
- func (manager *WebsiteDataManager) FetchFinish(result gio.AsyncResulter) ([]*WebsiteData, error)
- func (manager *WebsiteDataManager) IsEphemeral() bool
- func (manager *WebsiteDataManager) ItpSummaryFinish(result gio.AsyncResulter) ([]*ITPThirdParty, error)
- func (manager *WebsiteDataManager) RemoveFinish(result gio.AsyncResulter) error
- func (manager *WebsiteDataManager) SetFaviconsEnabled(enabled bool)
- type WebsiteDataManagerClass
- type WebsiteDataManagerOverrides
- type WebsiteDataTypes
- type WebsitePolicies
- type WebsitePoliciesClass
- type WebsitePoliciesOverrides
- type WindowProperties
- func (windowProperties *WindowProperties) Fullscreen() bool
- func (windowProperties *WindowProperties) Geometry() *gdk.Rectangle
- func (windowProperties *WindowProperties) LocationbarVisible() bool
- func (windowProperties *WindowProperties) MenubarVisible() bool
- func (windowProperties *WindowProperties) Resizable() bool
- func (windowProperties *WindowProperties) ScrollbarsVisible() bool
- func (windowProperties *WindowProperties) StatusbarVisible() bool
- func (windowProperties *WindowProperties) ToolbarVisible() bool
- type WindowPropertiesClass
- type WindowPropertiesOverrides
Constants ¶
const EDITING_COMMAND_COPY = "Copy"
EDITING_COMMAND_COPY: copy clipboard command. Copies the current selection inside a KitWebView to the clipboard. You can check whether it's possible to execute the command with webkit_web_view_can_execute_editing_command(). In general it's possible to copy to the clipboard when there is an active selection inside the KitWebView.
const EDITING_COMMAND_CREATE_LINK = "CreateLink"
EDITING_COMMAND_CREATE_LINK: create link command. Creates a link element that is inserted at the current cursor position. If there's a selection, the selected text will be used as the link text, otherwise the URL itself will be used. It receives the link URL as argument. This command should be executed with webkit_web_view_execute_editing_command_with_argument().
const EDITING_COMMAND_CUT = "Cut"
EDITING_COMMAND_CUT: cut clipboard command. Copies the current selection inside a KitWebView to the clipboard and deletes the selected content. You can check whether it's possible to execute the command with webkit_web_view_can_execute_editing_command(). In general it's possible to cut to the clipboard when the KitWebView content is editable and there is an active selection.
const EDITING_COMMAND_INSERT_IMAGE = "InsertImage"
EDITING_COMMAND_INSERT_IMAGE: insert image command. Creates an image element that is inserted at the current cursor position. It receives an URI as argument, that is used as the image source. This command should be executed with webkit_web_view_execute_editing_command_with_argument().
const EDITING_COMMAND_PASTE = "Paste"
EDITING_COMMAND_PASTE: paste clipboard command. Pastes the contents of the clipboard to a KitWebView. You can check whether it's possible to execute the command with webkit_web_view_can_execute_editing_command(). In general it's possible to paste from the clipboard when the KitWebView content is editable and clipboard is not empty.
const EDITING_COMMAND_PASTE_AS_PLAIN_TEXT = "PasteAsPlainText"
EDITING_COMMAND_PASTE_AS_PLAIN_TEXT: paste as plaintext clipboard command. Pastes the contents of the clipboard to a KitWebView, with formatting removed. You can check whether it's possible to execute the command with webkit_web_view_can_execute_editing_command(). In general it's possible to paste from the clipboard when the KitWebView content is editable and clipboard is not empty.
const EDITING_COMMAND_REDO = "Redo"
EDITING_COMMAND_REDO: redo command. Redoes a previously undone editing command in a KitWebView. You can check whether it's possible to execute the command with webkit_web_view_can_execute_editing_command(). It's only possible to redo a command when it has been previously undone.
const EDITING_COMMAND_SELECT_ALL = "SelectAll"
EDITING_COMMAND_SELECT_ALL: select all command. Selects all the content of the current text field in a KitWebView. It is always possible to select all text, no matter whether the KitWebView content is editable or not. You can still check it with webkit_web_view_can_execute_editing_command().
const EDITING_COMMAND_UNDO = "Undo"
EDITING_COMMAND_UNDO: undo command. Undoes the last editing command in a KitWebView. You can check whether it's possible to execute the command with webkit_web_view_can_execute_editing_command(). It's only possible to undo a command after a previously executed editing operation.
const MAJOR_VERSION = 2
MAJOR_VERSION: like webkit_get_major_version(), but from the headers used at application compile time, rather than from the library linked against at application run time.
const MICRO_VERSION = 4
MICRO_VERSION: like webkit_get_micro_version(), but from the headers used at application compile time, rather than from the library linked against at application run time.
const MINOR_VERSION = 42
MINOR_VERSION: like webkit_get_minor_version(), but from the headers used at application compile time, rather than from the library linked against at application run time.
Variables ¶
var ( GTypeCookieAcceptPolicy = coreglib.Type(C.webkit_cookie_accept_policy_get_type()) GTypeCookiePersistentStorage = coreglib.Type(C.webkit_cookie_persistent_storage_get_type()) GTypeCookieManager = coreglib.Type(C.webkit_cookie_manager_get_type()) )
GType values.
var ( GTypeCredentialPersistence = coreglib.Type(C.webkit_credential_persistence_get_type()) GTypeCredential = coreglib.Type(C.webkit_credential_get_type()) )
GType values.
var ( GTypeEditorTypingAttributes = coreglib.Type(C.webkit_editor_typing_attributes_get_type()) GTypeEditorState = coreglib.Type(C.webkit_editor_state_get_type()) )
GType values.
var ( GTypeDownloadError = coreglib.Type(C.webkit_download_error_get_type()) GTypeJavascriptError = coreglib.Type(C.webkit_javascript_error_get_type()) GTypeNetworkError = coreglib.Type(C.webkit_network_error_get_type()) GTypePolicyError = coreglib.Type(C.webkit_policy_error_get_type()) GTypePrintError = coreglib.Type(C.webkit_print_error_get_type()) GTypeSnapshotError = coreglib.Type(C.webkit_snapshot_error_get_type()) )
GType values.
var ( GTypeFaviconDatabaseError = coreglib.Type(C.webkit_favicon_database_error_get_type()) GTypeFaviconDatabase = coreglib.Type(C.webkit_favicon_database_get_type()) )
GType values.
var ( GTypeFeatureStatus = coreglib.Type(C.webkit_feature_status_get_type()) GTypeFeature = coreglib.Type(C.webkit_feature_get_type()) GTypeFeatureList = coreglib.Type(C.webkit_feature_list_get_type()) )
GType values.
var ( GTypeFindOptions = coreglib.Type(C.webkit_find_options_get_type()) GTypeFindController = coreglib.Type(C.webkit_find_controller_get_type()) )
GType values.
var ( GTypeGeolocationManager = coreglib.Type(C.webkit_geolocation_manager_get_type()) GTypeGeolocationPosition = coreglib.Type(C.webkit_geolocation_position_get_type()) )
GType values.
var ( GTypeHitTestResultContext = coreglib.Type(C.webkit_hit_test_result_context_get_type()) GTypeHitTestResult = coreglib.Type(C.webkit_hit_test_result_get_type()) )
GType values.
var ( GTypeInputPurpose = coreglib.Type(C.webkit_input_purpose_get_type()) GTypeInputHints = coreglib.Type(C.webkit_input_hints_get_type()) GTypeInputMethodContext = coreglib.Type(C.webkit_input_method_context_get_type()) GTypeInputMethodUnderline = coreglib.Type(C.webkit_input_method_underline_get_type()) )
GType values.
var ()
GType values.
var ( GTypeNetworkProxyMode = coreglib.Type(C.webkit_network_proxy_mode_get_type()) GTypeNetworkProxySettings = coreglib.Type(C.webkit_network_proxy_settings_get_type()) )
GType values.
var ( GTypePrintOperationResponse = coreglib.Type(C.webkit_print_operation_response_get_type()) GTypePrintOperation = coreglib.Type(C.webkit_print_operation_get_type()) )
GType values.
var ( GTypeScriptDialogType = coreglib.Type(C.webkit_script_dialog_type_get_type()) GTypeScriptDialog = coreglib.Type(C.webkit_script_dialog_get_type()) )
GType values.
var ( GTypeUserContentInjectedFrames = coreglib.Type(C.webkit_user_content_injected_frames_get_type()) GTypeUserScriptInjectionTime = coreglib.Type(C.webkit_user_script_injection_time_get_type()) GTypeUserStyleLevel = coreglib.Type(C.webkit_user_style_level_get_type()) GTypeUserScript = coreglib.Type(C.webkit_user_script_get_type()) GTypeUserStyleSheet = coreglib.Type(C.webkit_user_style_sheet_get_type()) )
GType values.
var ( GTypeUserMessageError = coreglib.Type(C.webkit_user_message_error_get_type()) GTypeUserMessage = coreglib.Type(C.webkit_user_message_get_type()) )
GType values.
var ( GTypeCacheModel = coreglib.Type(C.webkit_cache_model_get_type()) GTypeWebContext = coreglib.Type(C.webkit_web_context_get_type()) )
GType values.
var ( GTypeInsecureContentEvent = coreglib.Type(C.webkit_insecure_content_event_get_type()) GTypeLoadEvent = coreglib.Type(C.webkit_load_event_get_type()) GTypePolicyDecisionType = coreglib.Type(C.webkit_policy_decision_type_get_type()) GTypeSaveMode = coreglib.Type(C.webkit_save_mode_get_type()) GTypeSnapshotRegion = coreglib.Type(C.webkit_snapshot_region_get_type()) GTypeSnapshotOptions = coreglib.Type(C.webkit_snapshot_options_get_type()) GTypeWebView = coreglib.Type(C.webkit_web_view_get_type()) )
GType values.
var ( GTypeITPFirstParty = coreglib.Type(C.webkit_itp_first_party_get_type()) GTypeITPThirdParty = coreglib.Type(C.webkit_itp_third_party_get_type()) )
GType values.
var ( GTypeAutoplayPolicy = coreglib.Type(C.webkit_autoplay_policy_get_type()) GTypeWebsitePolicies = coreglib.Type(C.webkit_website_policies_get_type()) )
GType values.
var (
GTypeApplicationInfo = coreglib.Type(C.webkit_application_info_get_type())
)
GType values.
var (
GTypeAuthenticationRequest = coreglib.Type(C.webkit_authentication_request_get_type())
)
GType values.
var (
GTypeAuthenticationScheme = coreglib.Type(C.webkit_authentication_scheme_get_type())
)
GType values.
var (
GTypeAutomationBrowsingContextPresentation = coreglib.Type(C.webkit_automation_browsing_context_presentation_get_type())
)
GType values.
var (
GTypeAutomationSession = coreglib.Type(C.webkit_automation_session_get_type())
)
GType values.
var (
GTypeBackForwardList = coreglib.Type(C.webkit_back_forward_list_get_type())
)
GType values.
var (
GTypeBackForwardListItem = coreglib.Type(C.webkit_back_forward_list_item_get_type())
)
GType values.
var (
GTypeClipboardPermissionRequest = coreglib.Type(C.webkit_clipboard_permission_request_get_type())
)
GType values.
var (
GTypeColorChooserRequest = coreglib.Type(C.webkit_color_chooser_request_get_type())
)
GType values.
var (
GTypeContextMenu = coreglib.Type(C.webkit_context_menu_get_type())
)
GType values.
var (
GTypeContextMenuAction = coreglib.Type(C.webkit_context_menu_action_get_type())
)
GType values.
var (
GTypeContextMenuItem = coreglib.Type(C.webkit_context_menu_item_get_type())
)
GType values.
var (
GTypeDeviceInfoPermissionRequest = coreglib.Type(C.webkit_device_info_permission_request_get_type())
)
GType values.
var (
GTypeDownload = coreglib.Type(C.webkit_download_get_type())
)
GType values.
var (
GTypeFileChooserRequest = coreglib.Type(C.webkit_file_chooser_request_get_type())
)
GType values.
var (
GTypeFormSubmissionRequest = coreglib.Type(C.webkit_form_submission_request_get_type())
)
GType values.
var (
GTypeGeolocationPermissionRequest = coreglib.Type(C.webkit_geolocation_permission_request_get_type())
)
GType values.
var (
GTypeHardwareAccelerationPolicy = coreglib.Type(C.webkit_hardware_acceleration_policy_get_type())
)
GType values.
var (
GTypeMediaCaptureState = coreglib.Type(C.webkit_media_capture_state_get_type())
)
GType values.
var (
GTypeMediaError = coreglib.Type(C.webkit_media_error_get_type())
)
GType values.
var (
GTypeMediaKeySystemPermissionRequest = coreglib.Type(C.webkit_media_key_system_permission_request_get_type())
)
GType values.
var (
GTypeMemoryPressureSettings = coreglib.Type(C.webkit_memory_pressure_settings_get_type())
)
GType values.
var (
)GType values.
var (
GTypeNetworkSession = coreglib.Type(C.webkit_network_session_get_type())
)
GType values.
var (
GTypeNotification = coreglib.Type(C.webkit_notification_get_type())
)
GType values.
var (
GTypeNotificationPermissionRequest = coreglib.Type(C.webkit_notification_permission_request_get_type())
)
GType values.
var (
GTypeOptionMenu = coreglib.Type(C.webkit_option_menu_get_type())
)
GType values.
var (
GTypeOptionMenuItem = coreglib.Type(C.webkit_option_menu_item_get_type())
)
GType values.
var (
GTypePermissionRequest = coreglib.Type(C.webkit_permission_request_get_type())
)
GType values.
var (
GTypePermissionState = coreglib.Type(C.webkit_permission_state_get_type())
)
GType values.
var (
GTypePermissionStateQuery = coreglib.Type(C.webkit_permission_state_query_get_type())
)
GType values.
var (
GTypePointerLockPermissionRequest = coreglib.Type(C.webkit_pointer_lock_permission_request_get_type())
)
GType values.
var (
GTypePolicyDecision = coreglib.Type(C.webkit_policy_decision_get_type())
)
GType values.
var (
GTypeResponsePolicyDecision = coreglib.Type(C.webkit_response_policy_decision_get_type())
)
GType values.
var (
GTypeScriptMessageReply = coreglib.Type(C.webkit_script_message_reply_get_type())
)
GType values.
var (
GTypeSecurityManager = coreglib.Type(C.webkit_security_manager_get_type())
)
GType values.
var (
GTypeSecurityOrigin = coreglib.Type(C.webkit_security_origin_get_type())
)
GType values.
var (
GTypeSettings = coreglib.Type(C.webkit_settings_get_type())
)
GType values.
var (
GTypeTLSErrorsPolicy = coreglib.Type(C.webkit_tls_errors_policy_get_type())
)
GType values.
var (
GTypeURIRequest = coreglib.Type(C.webkit_uri_request_get_type())
)
GType values.
var (
GTypeURIResponse = coreglib.Type(C.webkit_uri_response_get_type())
)
GType values.
var (
GTypeURISchemeRequest = coreglib.Type(C.webkit_uri_scheme_request_get_type())
)
GType values.
var (
GTypeURISchemeResponse = coreglib.Type(C.webkit_uri_scheme_response_get_type())
)
GType values.
var (
GTypeUserContentFilter = coreglib.Type(C.webkit_user_content_filter_get_type())
)
GType values.
var (
GTypeUserContentFilterError = coreglib.Type(C.webkit_user_content_filter_error_get_type())
)
GType values.
var (
GTypeUserContentFilterStore = coreglib.Type(C.webkit_user_content_filter_store_get_type())
)
GType values.
var (
GTypeUserContentManager = coreglib.Type(C.webkit_user_content_manager_get_type())
)
GType values.
var (
GTypeUserMediaPermissionRequest = coreglib.Type(C.webkit_user_media_permission_request_get_type())
)
GType values.
var (
GTypeWebExtensionMode = coreglib.Type(C.webkit_web_extension_mode_get_type())
)
GType values.
var (
GTypeWebInspector = coreglib.Type(C.webkit_web_inspector_get_type())
)
GType values.
var (
GTypeWebProcessTerminationReason = coreglib.Type(C.webkit_web_process_termination_reason_get_type())
)
GType values.
var (
GTypeWebResource = coreglib.Type(C.webkit_web_resource_get_type())
)
GType values.
var (
GTypeWebViewBase = coreglib.Type(C.webkit_web_view_base_get_type())
)
GType values.
var (
GTypeWebViewSessionState = coreglib.Type(C.webkit_web_view_session_state_get_type())
)
GType values.
var (
GTypeWebsiteData = coreglib.Type(C.webkit_website_data_get_type())
)
GType values.
var (
GTypeWebsiteDataAccessPermissionRequest = coreglib.Type(C.webkit_website_data_access_permission_request_get_type())
)
GType values.
var (
GTypeWebsiteDataManager = coreglib.Type(C.webkit_website_data_manager_get_type())
)
GType values.
var (
GTypeWebsiteDataTypes = coreglib.Type(C.webkit_website_data_types_get_type())
)
GType values.
var (
GTypeWindowProperties = coreglib.Type(C.webkit_window_properties_get_type())
)
GType values.
Functions ¶
func DownloadErrorQuark ¶
func DownloadErrorQuark() glib.Quark
DownloadErrorQuark gets the quark for the domain of download errors.
The function returns the following values:
- quark: download error domain.
func FaviconDatabaseErrorQuark ¶
func FaviconDatabaseErrorQuark() glib.Quark
FaviconDatabaseErrorQuark gets the quark for the domain of favicon database errors.
The function returns the following values:
- quark: favicon database error domain.
func GetMajorVersion ¶
func GetMajorVersion() uint
GetMajorVersion returns the major version number of the WebKit library.
(e.g. in WebKit version 1.8.3 this is 1.)
This function is in the library, so it represents the WebKit library your code is running against. Contrast with the BKIT_MAJOR_VERSION macro, which represents the major version of the WebKit headers you have included when compiling your code.
The function returns the following values:
- guint: major version number of the WebKit library.
func GetMicroVersion ¶
func GetMicroVersion() uint
GetMicroVersion returns the micro version number of the WebKit library.
(e.g. in WebKit version 1.8.3 this is 3.)
This function is in the library, so it represents the WebKit library your code is running against. Contrast with the BKIT_MICRO_VERSION macro, which represents the micro version of the WebKit headers you have included when compiling your code.
The function returns the following values:
- guint: micro version number of the WebKit library.
func GetMinorVersion ¶
func GetMinorVersion() uint
GetMinorVersion returns the minor version number of the WebKit library.
(e.g. in WebKit version 1.8.3 this is 8.)
This function is in the library, so it represents the WebKit library your code is running against. Contrast with the BKIT_MINOR_VERSION macro, which represents the minor version of the WebKit headers you have included when compiling your code.
The function returns the following values:
- guint: minor version number of the WebKit library.
func JavascriptErrorQuark ¶
func JavascriptErrorQuark() glib.Quark
JavascriptErrorQuark gets the quark for the domain of JavaScript errors.
The function returns the following values:
- quark: javaScript error domain.
func MediaErrorQuark ¶
func MediaErrorQuark() glib.Quark
MediaErrorQuark gets the quark for the domain of media errors.
The function returns the following values:
- quark: media error domin.
func MediaKeySystemPermissionGetName ¶
func MediaKeySystemPermissionGetName(request *MediaKeySystemPermissionRequest) string
MediaKeySystemPermissionGetName: get the key system for which access permission is being requested.
The function takes the following parameters:
- request: KitMediaKeySystemPermissionRequest.
The function returns the following values:
- utf8: key system name for request.
func NetworkErrorQuark ¶
func NetworkErrorQuark() glib.Quark
NetworkErrorQuark gets the quark for the domain of networking errors.
The function returns the following values:
- quark: network error domain.
func NetworkSessionSetMemoryPressureSettings ¶
func NetworkSessionSetMemoryPressureSettings(settings *MemoryPressureSettings)
NetworkSessionSetMemoryPressureSettings sets settings as the KitMemoryPressureSettings.
Sets settings as the KitMemoryPressureSettings to be used by the network process created by any instance of KitNetworkSession after this function is called.
Be sure to call this function before creating any KitNetworkSession.
The periodic check for used memory is disabled by default on network processes. This will be enabled only if custom settings have been set using this function. After that, in order to remove the custom settings and disable the periodic check, this function must be called passing NULL as the value of settings.
The function takes the following parameters:
- settings: webKitMemoryPressureSettings.
func PolicyErrorQuark ¶
func PolicyErrorQuark() glib.Quark
PolicyErrorQuark gets the quark for the domain of policy errors.
The function returns the following values:
- quark: policy error domain.
func PrintErrorQuark ¶
func PrintErrorQuark() glib.Quark
PrintErrorQuark gets the quark for the domain of printing errors.
The function returns the following values:
- quark: print error domain.
func SettingsFontSizeToPixels ¶
SettingsFontSizeToPixels: convert points to the equivalent value in pixels.
Convert points to the equivalent value in pixels, based on the current screen DPI. Applications can use this function to convert font size values in points to font size values in pixels when setting the font size properties of KitSettings.
The function takes the following parameters:
- points: font size in points to convert to pixels.
The function returns the following values:
- guint32: equivalent font size in pixels.
func SettingsFontSizeToPoints ¶
SettingsFontSizeToPoints: convert pixels to the equivalent value in points.
Convert pixels to the equivalent value in points, based on the current screen DPI. Applications can use this function to convert font size values in pixels to font size values in points when getting the font size properties of KitSettings.
The function takes the following parameters:
- pixels: font size in pixels to convert to points.
The function returns the following values:
- guint32: equivalent font size in points.
func SnapshotErrorQuark ¶
func SnapshotErrorQuark() glib.Quark
SnapshotErrorQuark gets the quark for the domain of page snapshot errors.
The function returns the following values:
- quark: snapshot error domain.
func URIForDisplay ¶
URIForDisplay: use this function to format a URI for display.
The URIs used internally by WebKit may contain percent-encoded characters or Punycode, which are not generally suitable to display to users. This function provides protection against IDN homograph attacks, so in some cases the host part of the returned URI may be in Punycode if the safety check fails.
The function takes the following parameters:
- uri: URI to be converted.
The function returns the following values:
- utf8 (optional): uri suitable for display, or NULL in case of error.
func UserContentFilterErrorQuark ¶
func UserContentFilterErrorQuark() glib.Quark
UserContentFilterErrorQuark gets the quark for the domain of user content filter errors.
The function returns the following values:
- quark: user content filter error domain.
func UserMediaPermissionIsForAudioDevice ¶
func UserMediaPermissionIsForAudioDevice(request *UserMediaPermissionRequest) bool
UserMediaPermissionIsForAudioDevice: check whether the permission request is for an audio device.
The function takes the following parameters:
- request: KitUserMediaPermissionRequest.
The function returns the following values:
- ok: TRUE if access to an audio device was requested.
func UserMediaPermissionIsForDisplayDevice ¶
func UserMediaPermissionIsForDisplayDevice(request *UserMediaPermissionRequest) bool
UserMediaPermissionIsForDisplayDevice: check whether the permission request is for a display device.
The function takes the following parameters:
- request: KitUserMediaPermissionRequest.
The function returns the following values:
- ok: TRUE if access to a display device was requested.
func UserMediaPermissionIsForVideoDevice ¶
func UserMediaPermissionIsForVideoDevice(request *UserMediaPermissionRequest) bool
UserMediaPermissionIsForVideoDevice: check whether the permission request is for a video device.
The function takes the following parameters:
- request: KitUserMediaPermissionRequest.
The function returns the following values:
- ok: TRUE if access to a video device was requested.
func UserMessageErrorQuark ¶
func UserMessageErrorQuark() glib.Quark
UserMessageErrorQuark gets the quark for the domain of user message errors.
The function returns the following values:
- quark: user message error domain.
Types ¶
type ApplicationInfo ¶
type ApplicationInfo struct {
// contains filtered or unexported fields
}
ApplicationInfo: information about an application running in automation mode.
An instance of this type is always passed by reference.
func NewApplicationInfo ¶
func NewApplicationInfo() *ApplicationInfo
NewApplicationInfo constructs a struct ApplicationInfo.
func (*ApplicationInfo) Name ¶
func (info *ApplicationInfo) Name() string
Name: get the name of the application.
If webkit_application_info_set_name() hasn't been called with a valid name, this returns g_get_prgname().
The function returns the following values:
- utf8: application name.
func (*ApplicationInfo) SetName ¶
func (info *ApplicationInfo) SetName(name string)
SetName: set the name of the application.
If not provided, or NULL is passed, g_get_prgname() will be used.
The function takes the following parameters:
- name: application name.
func (*ApplicationInfo) SetVersion ¶
func (info *ApplicationInfo) SetVersion(major uint64, minor uint64, micro uint64)
SetVersion: set the application version.
If the application doesn't use the format major.minor.micro you can pass 0 as the micro to use major.minor, or pass 0 as both micro and minor to use only major number. Any other format must be converted to major.minor.micro so that it can be used in version comparisons.
The function takes the following parameters:
- major version number.
- minor version number.
- micro version number.
func (*ApplicationInfo) Version ¶
func (info *ApplicationInfo) Version() (major uint64, minor uint64, micro uint64)
Version: get the application version previously set with webkit_application_info_set_version().
The function returns the following values:
- major: return location for the major version number.
- minor (optional): return location for the minor version number.
- micro (optional): return location for the micro version number.
type AuthenticationRequest ¶
AuthenticationRequest represents an authentication request.
Whenever a client attempts to load a page protected by HTTP authentication, credentials will need to be provided to authorize access. To allow the client to decide how it wishes to handle authentication, WebKit will fire a KitWebView::authenticate signal with a WebKitAuthenticationRequest object to provide client side authentication support. Credentials are exposed through the KitCredential object.
In case the client application does not wish to handle this signal WebKit will provide a default handler. To handle authentication asynchronously, simply increase the reference count of the WebKitAuthenticationRequest object.
func (*AuthenticationRequest) Authenticate ¶
func (request *AuthenticationRequest) Authenticate(credential *Credential)
Authenticate the KitAuthenticationRequest.
Authenticate the KitAuthenticationRequest using the KitCredential supplied. To continue without credentials, pass NULL as credential.
The function takes the following parameters:
- credential (optional) or NULL.
func (*AuthenticationRequest) CanSaveCredentials ¶
func (request *AuthenticationRequest) CanSaveCredentials() bool
CanSaveCredentials: determine whether this KitAuthenticationRequest should allow the storage of credentials.
Determine whether the authentication method associated with this KitAuthenticationRequest should allow the storage of credentials. This will return FALSE if WebKit doesn't support credential storing, if private browsing is enabled, or if persistent credential storage has been disabled in KitWebsiteDataManager, unless credentials saving has been explicitly enabled with webkit_authentication_request_set_can_save_credentials().
The function returns the following values:
- ok: TRUE if WebKit can store credentials or FALSE otherwise.
func (*AuthenticationRequest) Cancel ¶
func (request *AuthenticationRequest) Cancel()
Cancel the authentication challenge.
This will also cancel the page loading and result in a KitWebView::load-failed signal with a KitNetworkError of type WEBKIT_NETWORK_ERROR_CANCELLED being emitted.
func (*AuthenticationRequest) CertificatePINFlags ¶
func (request *AuthenticationRequest) CertificatePINFlags() gio.TLSPasswordFlags
CertificatePINFlags: get the PasswordFlags of the WEBKIT_AUTHENTICATION_SCHEME_CLIENT_CERTIFICATE_PIN_REQUESTED authentication challenge.
The function returns the following values:
- tlsPasswordFlags: PasswordFlags.
func (*AuthenticationRequest) ConnectAuthenticated ¶
func (request *AuthenticationRequest) ConnectAuthenticated(f func(credential *Credential)) coreglib.SignalHandle
ConnectAuthenticated: this signal is emitted when the user authentication request succeeded. Applications handling their own credential storage should connect to this signal to save the credentials.
func (*AuthenticationRequest) ConnectCancelled ¶
func (request *AuthenticationRequest) ConnectCancelled(f func()) coreglib.SignalHandle
ConnectCancelled: this signal is emitted when the user authentication request is cancelled. It allows the application to dismiss its authentication dialog in case of page load failure for example.
func (*AuthenticationRequest) Host ¶
func (request *AuthenticationRequest) Host() string
Host: get the host that this authentication challenge is applicable to.
The function returns the following values:
- utf8: host of request.
func (*AuthenticationRequest) IsForProxy ¶
func (request *AuthenticationRequest) IsForProxy() bool
IsForProxy: determine whether the authentication challenge is associated with a proxy server.
Determine whether the authentication challenge is associated with a proxy server rather than an "origin" server.
The function returns the following values:
- ok: TRUE if authentication is for a proxy or FALSE otherwise.
func (*AuthenticationRequest) IsRetry ¶
func (request *AuthenticationRequest) IsRetry() bool
IsRetry: determine whether this this is a first attempt or a retry for this authentication challenge.
The function returns the following values:
- ok: TRUE if authentication attempt is a retry or FALSE otherwise.
func (*AuthenticationRequest) Port ¶
func (request *AuthenticationRequest) Port() uint
Port: get the port that this authentication challenge is applicable to.
The function returns the following values:
- guint: port of request.
func (*AuthenticationRequest) ProposedCredential ¶
func (request *AuthenticationRequest) ProposedCredential() *Credential
ProposedCredential: get the KitCredential of the proposed authentication challenge.
Get the KitCredential of the proposed authentication challenge that was stored from a previous session. The client can use this directly for authentication or construct their own KitCredential.
The function returns the following values:
- credential encapsulating credential details or NULL if there is no stored credential.
func (*AuthenticationRequest) Realm ¶
func (request *AuthenticationRequest) Realm() string
Realm: get the realm that this authentication challenge is applicable to.
The function returns the following values:
- utf8: realm of request.
func (*AuthenticationRequest) Scheme ¶
func (request *AuthenticationRequest) Scheme() AuthenticationScheme
Scheme: get the authentication scheme of the authentication challenge.
The function returns the following values:
- authenticationScheme of request.
func (*AuthenticationRequest) SecurityOrigin ¶
func (request *AuthenticationRequest) SecurityOrigin() *SecurityOrigin
SecurityOrigin: get the KitSecurityOrigin that this authentication challenge is applicable to.
The function returns the following values:
- securityOrigin: newly created KitSecurityOrigin.
func (*AuthenticationRequest) SetCanSaveCredentials ¶
func (request *AuthenticationRequest) SetCanSaveCredentials(enabled bool)
SetCanSaveCredentials: set whether the authentication method associated with request should allow the storage of credentials.
Set whether the authentication method associated with request should allow the storage of credentials. This should be used by applications handling their own credentials storage to indicate that it should be supported even when internal credential storage is disabled or unsupported. Note that storing of credentials will not be allowed on ephemeral sessions in any case.
The function takes the following parameters:
- enabled: value to set.
func (*AuthenticationRequest) SetProposedCredential ¶
func (request *AuthenticationRequest) SetProposedCredential(credential *Credential)
SetProposedCredential: set the KitCredential of the proposed authentication challenge.
Set the KitCredential of the proposed authentication challenge that was stored from a previous session. This should only be used by applications handling their own credential storage. (When using the default WebKit credential storage, webkit_authentication_request_get_proposed_credential() already contains previously-stored credentials.) Passing a NULL credential will clear the proposed credential.
The function takes the following parameters:
- credential or NULL.
type AuthenticationRequestClass ¶
type AuthenticationRequestClass struct {
// contains filtered or unexported fields
}
AuthenticationRequestClass: instance of this type is always passed by reference.
type AuthenticationRequestOverrides ¶
type AuthenticationRequestOverrides struct { }
AuthenticationRequestOverrides contains methods that are overridable.
type AuthenticationScheme ¶
AuthenticationScheme: enum values representing the authentication scheme.
const ( // AuthenticationSchemeDefault: default authentication scheme of WebKit. AuthenticationSchemeDefault AuthenticationScheme = 1 // AuthenticationSchemeHTTPBasic: basic authentication scheme as defined in // RFC 2617. AuthenticationSchemeHTTPBasic AuthenticationScheme = 2 // AuthenticationSchemeHTTPDigest: digest authentication scheme as defined // in RFC 2617. AuthenticationSchemeHTTPDigest AuthenticationScheme = 3 // AuthenticationSchemeHtmlForm: HTML Form authentication. AuthenticationSchemeHtmlForm AuthenticationScheme = 4 // AuthenticationSchemeNtlm: NTLM Microsoft proprietary authentication // scheme. AuthenticationSchemeNtlm AuthenticationScheme = 5 // AuthenticationSchemeNegotiate: negotiate (or SPNEGO) authentication // scheme as defined in RFC 4559. AuthenticationSchemeNegotiate AuthenticationScheme = 6 // AuthenticationSchemeClientCertificateRequested: client Certificate // Authentication (see RFC 2246). AuthenticationSchemeClientCertificateRequested AuthenticationScheme = 7 // AuthenticationSchemeServerTrustEvaluationRequested: server Trust // Authentication. AuthenticationSchemeServerTrustEvaluationRequested AuthenticationScheme = 8 // AuthenticationSchemeClientCertificatePINRequested: client certificate PIN // required for use. Since: 2.34. AuthenticationSchemeClientCertificatePINRequested AuthenticationScheme = 9 // AuthenticationSchemeUnknown: authentication scheme unknown. AuthenticationSchemeUnknown AuthenticationScheme = 100 )
func (AuthenticationScheme) String ¶
func (a AuthenticationScheme) String() string
String returns the name in string for AuthenticationScheme.
type AutomationBrowsingContextPresentation ¶
AutomationBrowsingContextPresentation: enum values used for determining the automation browsing context presentation.
const ( // AutomationBrowsingContextPresentationWindow: window. AutomationBrowsingContextPresentationWindow AutomationBrowsingContextPresentation = iota // AutomationBrowsingContextPresentationTab: tab. AutomationBrowsingContextPresentationTab )
func (AutomationBrowsingContextPresentation) String ¶
func (a AutomationBrowsingContextPresentation) String() string
String returns the name in string for AutomationBrowsingContextPresentation.
type AutomationSession ¶
AutomationSession: automation Session.
WebKitAutomationSession represents an automation session of a WebKitWebContext. When a new session is requested, a WebKitAutomationSession is created and the signal WebKitWebContext::automation-started is emitted with the WebKitAutomationSession as argument. Then, the automation client can request the session to create a new KitWebView to interact with it. When this happens the signal KitAutomationSession::create-web-view is emitted.
func (*AutomationSession) ApplicationInfo ¶
func (session *AutomationSession) ApplicationInfo() *ApplicationInfo
ApplicationInfo: get the the previously set KitAutomationSession.
Get the KitAutomationSession previously set with webkit_automation_session_set_application_info().
The function returns the following values:
- applicationInfo of session, or NULL if no one has been set.
func (*AutomationSession) ConnectCreateWebView ¶
func (session *AutomationSession) ConnectCreateWebView(f func() (webView *WebView)) coreglib.SignalHandle
ConnectCreateWebView: this signal is emitted when the automation client requests a new browsing context to interact with it. The callback handler should return a KitWebView created with KitWebView:is-controlled-by-automation construct property enabled and KitWebView:automation-presentation-type construct property set if needed.
If the signal is emitted with "tab" detail, the returned KitWebView should be a new web view added to a new tab of the current browsing context window. If the signal is emitted with "window" detail, the returned KitWebView should be a new web view added to a new window. When creating a new web view and there's an active browsing context, the new window or tab shouldn't be focused.
func (*AutomationSession) ID ¶
func (session *AutomationSession) ID() string
ID: get the unique identifier of a KitAutomationSession.
The function returns the following values:
- utf8: unique identifier of session.
func (*AutomationSession) SetApplicationInfo ¶
func (session *AutomationSession) SetApplicationInfo(info *ApplicationInfo)
SetApplicationInfo: set the application information to session.
This information will be used by the driver service to match the requested capabilities with the actual application information. If this information is not provided to the session when a new automation session is requested, the creation might fail if the client requested a specific browser name or version. This will not have any effect when called after the automation session has been fully created, so this must be called in the callback of KitWebContext::automation-started signal.
The function takes the following parameters:
- info: KitApplicationInfo.
type AutomationSessionClass ¶
type AutomationSessionClass struct {
// contains filtered or unexported fields
}
AutomationSessionClass: instance of this type is always passed by reference.
type AutomationSessionOverrides ¶
type AutomationSessionOverrides struct { }
AutomationSessionOverrides contains methods that are overridable.
type AutoplayPolicy ¶
AutoplayPolicy: enum values used to specify autoplay policies.
const ( // AutoplayAllow: do not restrict autoplay. AutoplayAllow AutoplayPolicy = iota // AutoplayAllowWithoutSound: allow videos to autoplay if they have no audio // track, or if their audio track is muted. AutoplayAllowWithoutSound // AutoplayDeny: never allow autoplay. AutoplayDeny )
func (AutoplayPolicy) String ¶
func (a AutoplayPolicy) String() string
String returns the name in string for AutoplayPolicy.
type BackForwardList ¶
BackForwardList: list of visited pages.
WebKitBackForwardList maintains a list of visited pages used to navigate to recent pages. Items are inserted in the list in the order they are visited.
WebKitBackForwardList also maintains the notion of the current item (which is always at index 0), the preceding item (which is at index -1), and the following item (which is at index 1). Methods webkit_web_view_go_back() and webkit_web_view_go_forward() move the current item backward or forward by one. Method webkit_web_view_go_to_back_forward_list_item() sets the current item to the specified item. All other methods returning KitBackForwardListItem<!-- -->s do not change the value of the current item, they just return the requested item or items.
func (*BackForwardList) BackItem ¶
func (backForwardList *BackForwardList) BackItem() *BackForwardListItem
BackItem returns the item that precedes the current item.
The function returns the following values:
- backForwardListItem (optional): KitBackForwardListItem preceding the current item or NULL.
func (*BackForwardList) BackList ¶
func (backForwardList *BackForwardList) BackList() []*BackForwardListItem
BackList: obtain the list of items preceding the current one.
The function returns the following values:
- list of items preceding the current item.
func (*BackForwardList) BackListWithLimit ¶
func (backForwardList *BackForwardList) BackListWithLimit(limit uint) []*BackForwardListItem
BackListWithLimit: obtain a list up to some number of items preceding the current one.
The function takes the following parameters:
- limit: number of items to retrieve.
The function returns the following values:
- list of items preceding the current item limited by limit.
func (*BackForwardList) ConnectChanged ¶
func (backForwardList *BackForwardList) ConnectChanged(f func(itemAdded *BackForwardListItem, itemsRemoved unsafe.Pointer)) coreglib.SignalHandle
ConnectChanged: this signal is emitted when back_forward_list changes. This happens when the current item is updated, a new item is added or one or more items are removed. Note that both item_added and items_removed can NULL when only the current item is updated. Items are only removed when the list is cleared or the maximum items limit is reached.
func (*BackForwardList) CurrentItem ¶
func (backForwardList *BackForwardList) CurrentItem() *BackForwardListItem
CurrentItem returns the current item in back_forward_list.
The function returns the following values:
- backForwardListItem (optional): KitBackForwardListItem or NULL if back_forward_list is empty.
func (*BackForwardList) ForwardItem ¶
func (backForwardList *BackForwardList) ForwardItem() *BackForwardListItem
ForwardItem returns the item that follows the current item.
The function returns the following values:
- backForwardListItem (optional): KitBackForwardListItem following the current item or NULL.
func (*BackForwardList) ForwardList ¶
func (backForwardList *BackForwardList) ForwardList() []*BackForwardListItem
ForwardList: obtain the list of items following the current one.
The function returns the following values:
- list of items following the current item.
func (*BackForwardList) ForwardListWithLimit ¶
func (backForwardList *BackForwardList) ForwardListWithLimit(limit uint) []*BackForwardListItem
ForwardListWithLimit: obtain a list up to some number of items following the current one.
The function takes the following parameters:
- limit: number of items to retrieve.
The function returns the following values:
- list of items following the current item limited by limit.
func (*BackForwardList) Length ¶
func (backForwardList *BackForwardList) Length() uint
Length: obtain the amount of items in the list.
The function returns the following values:
- guint: length of back_forward_list.
func (*BackForwardList) NthItem ¶
func (backForwardList *BackForwardList) NthItem(index int) *BackForwardListItem
NthItem returns the item at a given index relative to the current item.
The function takes the following parameters:
- index of the item.
The function returns the following values:
- backForwardListItem (optional): KitBackForwardListItem located at the specified index relative to the current item or NULL.
type BackForwardListClass ¶
type BackForwardListClass struct {
// contains filtered or unexported fields
}
BackForwardListClass: instance of this type is always passed by reference.
type BackForwardListItem ¶
type BackForwardListItem struct { coreglib.InitiallyUnowned // contains filtered or unexported fields }
BackForwardListItem: one item of the KitBackForwardList.
A history item is part of the KitBackForwardList and consists out of a title and a URI.
func (*BackForwardListItem) OriginalURI ¶
func (listItem *BackForwardListItem) OriginalURI() string
OriginalURI: obtain the original URI of the item.
See also webkit_back_forward_list_item_get_uri().
The function returns the following values:
- utf8: original URI of list_item or NULL when the original URI is empty.
func (*BackForwardListItem) Title ¶
func (listItem *BackForwardListItem) Title() string
Title: obtain the title of the item.
The function returns the following values:
- utf8: page title of list_item or NULL when the title is empty.
func (*BackForwardListItem) URI ¶
func (listItem *BackForwardListItem) URI() string
URI: obtain the URI of the item.
This URI may differ from the original URI if the page was, for example, redirected to a new location. See also webkit_back_forward_list_item_get_original_uri().
The function returns the following values:
- utf8: URI of list_item or NULL when the URI is empty.
type BackForwardListItemClass ¶
type BackForwardListItemClass struct {
// contains filtered or unexported fields
}
BackForwardListItemClass: instance of this type is always passed by reference.
type BackForwardListItemOverrides ¶
type BackForwardListItemOverrides struct { }
BackForwardListItemOverrides contains methods that are overridable.
type BackForwardListOverrides ¶
type BackForwardListOverrides struct { }
BackForwardListOverrides contains methods that are overridable.
type CacheModel ¶
CacheModel: enum values used for determining the KitWebContext cache model.
const ( // CacheModelDocumentViewer: disable the cache completely, which // substantially reduces memory usage. Useful for applications that only // access a single local file, with no navigation to other pages. No remote // resources will be cached. CacheModelDocumentViewer CacheModel = iota // CacheModelWebBrowser: improve document load speed substantially by // caching a very large number of resources and previously viewed content. CacheModelWebBrowser // CacheModelDocumentBrowser: cache model optimized for viewing a series of // local files -- for example, a documentation viewer or a website designer. // WebKit will cache a moderate number of resources. CacheModelDocumentBrowser )
func (CacheModel) String ¶
func (c CacheModel) String() string
String returns the name in string for CacheModel.
type ClipboardPermissionRequest ¶
type ClipboardPermissionRequest struct { *coreglib.Object PermissionRequest // contains filtered or unexported fields }
ClipboardPermissionRequest: permission request for reading clipboard contents.
WebKitClipboardPermissionRequest represents a request for permission to decide whether WebKit can access the clipboard to read its contents through the Async Clipboard API.
When a WebKitClipboardPermissionRequest is not handled by the user, it is denied by default.
type ClipboardPermissionRequestClass ¶
type ClipboardPermissionRequestClass struct {
// contains filtered or unexported fields
}
ClipboardPermissionRequestClass: instance of this type is always passed by reference.
type ClipboardPermissionRequestOverrides ¶
type ClipboardPermissionRequestOverrides struct { }
ClipboardPermissionRequestOverrides contains methods that are overridable.
type ColorChooserRequest ¶
ColorChooserRequest: request to open a color chooser.
Whenever the user interacts with an <input type='color' /> HTML element, WebKit will need to show a dialog to choose a color. For that to happen in a general way, instead of just opening a ColorChooser (which might be not desirable in some cases, which could prefer to use their own color chooser dialog), WebKit will fire the KitWebView::run-color-chooser signal with a KitColorChooserRequest object, which will allow the client application to specify the color to be selected, to inspect the details of the request (e.g. to get initial color) and to cancel the request, in case nothing was selected.
In case the client application does not wish to handle this signal, WebKit will provide a default handler which will asynchronously run a regular ColorChooserDialog for the user to interact with.
func (*ColorChooserRequest) Cancel ¶
func (request *ColorChooserRequest) Cancel()
Cancel cancels request and the input element changes to use the initial color.
Cancels request and the input element changes to use the initial color it has before the request started. The signal KitColorChooserRequest::finished is emitted to notify that the request has finished.
func (*ColorChooserRequest) ConnectFinished ¶
func (request *ColorChooserRequest) ConnectFinished(f func()) coreglib.SignalHandle
ConnectFinished is emitted when the request finishes. This signal can be emitted because the user completed the request calling webkit_color_chooser_request_finish(), or cancelled it with webkit_color_chooser_request_cancel() or because the color input element is removed from the DOM.
func (*ColorChooserRequest) ElementRectangle ¶
func (request *ColorChooserRequest) ElementRectangle() *gdk.Rectangle
ElementRectangle gets the bounding box of the color input element.
The function returns the following values:
- rect to fill in with the element area.
func (*ColorChooserRequest) Finish ¶
func (request *ColorChooserRequest) Finish()
Finish finishes request and the input element keeps the current value of KitColorChooserRequest:rgba.
Finishes request and the input element keeps the current value of KitColorChooserRequest:rgba. The signal KitColorChooserRequest::finished is emitted to notify that the request has finished.
func (*ColorChooserRequest) RGBA ¶
func (request *ColorChooserRequest) RGBA() *gdk.RGBA
RGBA gets the current RGBA color of request.
The function returns the following values:
- rgba to fill in with the current color.
func (*ColorChooserRequest) SetRGBA ¶
func (request *ColorChooserRequest) SetRGBA(rgba *gdk.RGBA)
SetRGBA sets the current RGBA color of request.
The function takes the following parameters:
- rgba: pointer RGBA.
type ColorChooserRequestClass ¶
type ColorChooserRequestClass struct {
// contains filtered or unexported fields
}
ColorChooserRequestClass: instance of this type is always passed by reference.
type ColorChooserRequestOverrides ¶
type ColorChooserRequestOverrides struct { }
ColorChooserRequestOverrides contains methods that are overridable.
type ContextMenu ¶
ContextMenu represents the context menu in a KitWebView.
KitContextMenu represents a context menu containing KitContextMenuItem<!-- -->s in a KitWebView.
When a KitWebView is about to display the context menu, it emits the KitWebView::context-menu signal, which has the KitContextMenu as an argument. You can modify it, adding new submenus that you can create with webkit_context_menu_new(), adding new KitContextMenuItem<!-- -->s with webkit_context_menu_prepend(), webkit_context_menu_append() or webkit_context_menu_insert(), maybe after having removed the existing ones with webkit_context_menu_remove_all().
func NewContextMenu ¶
func NewContextMenu() *ContextMenu
NewContextMenu creates a new KitContextMenu object.
Creates a new KitContextMenu object to be used as a submenu of an existing KitContextMenu. The context menu of a KitWebView is created by the view and passed as an argument of KitWebView::context-menu signal. To add items to the menu use webkit_context_menu_prepend(), webkit_context_menu_append() or webkit_context_menu_insert(). See also webkit_context_menu_new_with_items() to create a KitContextMenu with a list of initial items.
The function returns the following values:
- contextMenu: newly created KitContextMenu object.
func NewContextMenuWithItems ¶
func NewContextMenuWithItems(items []*ContextMenuItem) *ContextMenu
NewContextMenuWithItems creates a new KitContextMenu object with the given items.
Creates a new KitContextMenu object to be used as a submenu of an existing KitContextMenu with the given initial items. See also webkit_context_menu_new().
The function takes the following parameters:
- items of KitContextMenuItem.
The function returns the following values:
- contextMenu: newly created KitContextMenu object.
func (*ContextMenu) Append ¶
func (menu *ContextMenu) Append(item *ContextMenuItem)
Append adds item at the end of the menu.
The function takes the following parameters:
- item to add.
func (*ContextMenu) Event ¶
func (menu *ContextMenu) Event() gdk.Eventer
Event gets the Event that triggered the context menu. This function only returns a valid Event when called for a KitContextMenu passed to KitWebView::context-menu signal; in all other cases, NULL is returned.
The returned Event is expected to be one of the following types: <itemizedlist> <listitem><para> a EventButton of type GDK_BUTTON_PRESS when the context menu was triggered with mouse. </para></listitem> <listitem><para> a EventKey of type GDK_KEY_PRESS if the keyboard was used to show the menu. </para></listitem> <listitem><para> a generic Event of type GDK_NOTHING when the Widget::popup-menu signal was used to show the context menu. </para></listitem> </itemizedlist>.
The function returns the following values:
- event: menu event or NULL.
func (*ContextMenu) First ¶
func (menu *ContextMenu) First() *ContextMenuItem
First gets the first item in the menu.
The function returns the following values:
- contextMenuItem: first KitContextMenuItem of menu, or NULL if the KitContextMenu is empty.
func (*ContextMenu) Insert ¶
func (menu *ContextMenu) Insert(item *ContextMenuItem, position int)
Insert inserts item into the menu at the given position.
If position is negative, or is larger than the number of items in the KitContextMenu, the item is added on to the end of the menu. The first position is 0.
The function takes the following parameters:
- item to add.
- position to insert the item.
func (*ContextMenu) ItemAtPosition ¶
func (menu *ContextMenu) ItemAtPosition(position uint) *ContextMenuItem
ItemAtPosition gets the item at the given position in the menu.
The function takes the following parameters:
- position of the item, counting from 0.
The function returns the following values:
- contextMenuItem at position position in menu, or NULL if the position is off the end of the menu.
func (*ContextMenu) Items ¶
func (menu *ContextMenu) Items() []*ContextMenuItem
Items returns the item list of menu.
The function returns the following values:
- list of KitContextMenuItem<!-- -->s.
func (*ContextMenu) Last ¶
func (menu *ContextMenu) Last() *ContextMenuItem
Last gets the last item in the menu.
The function returns the following values:
- contextMenuItem: last KitContextMenuItem of menu, or NULL if the KitContextMenu is empty.
func (*ContextMenu) MoveItem ¶
func (menu *ContextMenu) MoveItem(item *ContextMenuItem, position int)
MoveItem moves item to the given position in the menu.
If position is negative, or is larger than the number of items in the KitContextMenu, the item is added on to the end of the menu. The first position is 0.
The function takes the following parameters:
- item to add.
- position: new position to move the item.
func (*ContextMenu) NItems ¶
func (menu *ContextMenu) NItems() uint
NItems gets the length of the menu.
The function returns the following values:
- guint: number of KitContextMenuItem<!-- -->s in menu.
func (*ContextMenu) Prepend ¶
func (menu *ContextMenu) Prepend(item *ContextMenuItem)
Prepend adds item at the beginning of the menu.
The function takes the following parameters:
- item to add.
func (*ContextMenu) Remove ¶
func (menu *ContextMenu) Remove(item *ContextMenuItem)
Remove removes item from the menu.
See also webkit_context_menu_remove_all() to remove all items.
The function takes the following parameters:
- item to remove.
func (*ContextMenu) RemoveAll ¶
func (menu *ContextMenu) RemoveAll()
RemoveAll removes all items of the menu.
func (*ContextMenu) SetUserData ¶
func (menu *ContextMenu) SetUserData(userData *glib.Variant)
SetUserData sets user data to menu.
This function can be used from a Web Process extension to set user data that can be retrieved from the UI Process using webkit_context_menu_get_user_data(). If the user_data #GVariant is floating, it is consumed.
The function takes the following parameters:
- userData: #GVariant.
func (*ContextMenu) UserData ¶
func (menu *ContextMenu) UserData() *glib.Variant
UserData gets the user data of menu.
This function can be used from the UI Process to get user data previously set from the Web Process with webkit_context_menu_set_user_data().
The function returns the following values:
- variant: user data of menu, or NULL if menu doesn't have user data.
type ContextMenuAction ¶
ContextMenuAction: enum values used to denote the stock actions for KitContextMenuItem<!-- -->s.
const ( // ContextMenuActionNoAction: no action, used by separator menu items. ContextMenuActionNoAction ContextMenuAction = 0 // ContextMenuActionOpenLink: open current link. ContextMenuActionOpenLink ContextMenuAction = 1 // ContextMenuActionOpenLinkInNewWindow: open current link in a new window. ContextMenuActionOpenLinkInNewWindow ContextMenuAction = 2 // ContextMenuActionDownloadLinkToDisk: download link destination. ContextMenuActionDownloadLinkToDisk ContextMenuAction = 3 // ContextMenuActionCopyLinkToClipboard: copy link location to the // clipboard. ContextMenuActionCopyLinkToClipboard ContextMenuAction = 4 // ContextMenuActionOpenImageInNewWindow: open current image in a new // window. ContextMenuActionOpenImageInNewWindow ContextMenuAction = 5 // ContextMenuActionDownloadImageToDisk: download current image. ContextMenuActionDownloadImageToDisk ContextMenuAction = 6 // ContextMenuActionCopyImageToClipboard: copy current image to the // clipboard. ContextMenuActionCopyImageToClipboard ContextMenuAction = 7 // ContextMenuActionCopyImageURLToClipboard: copy current image location to // the clipboard. ContextMenuActionCopyImageURLToClipboard ContextMenuAction = 8 // ContextMenuActionOpenFrameInNewWindow: open current frame in a new // window. ContextMenuActionOpenFrameInNewWindow ContextMenuAction = 9 // ContextMenuActionGoBack: load the previous history item. ContextMenuActionGoBack ContextMenuAction = 10 // ContextMenuActionGoForward: load the next history item. ContextMenuActionGoForward ContextMenuAction = 11 // ContextMenuActionStop: stop any ongoing loading operation. ContextMenuActionStop ContextMenuAction = 12 // ContextMenuActionReload: reload the contents of current view. ContextMenuActionReload ContextMenuAction = 13 // ContextMenuActionCopy: copy current selection the clipboard. ContextMenuActionCopy ContextMenuAction = 14 // ContextMenuActionCut: cut current selection to the clipboard. ContextMenuActionCut ContextMenuAction = 15 // ContextMenuActionPaste: paste clipboard contents. ContextMenuActionPaste ContextMenuAction = 16 // ContextMenuActionDelete: delete current selection. ContextMenuActionDelete ContextMenuAction = 17 // ContextMenuActionSelectAll: select all text. ContextMenuActionSelectAll ContextMenuAction = 18 // ContextMenuActionInputMethods: input methods menu. ContextMenuActionInputMethods ContextMenuAction = 19 // ContextMenuActionUnicode: unicode menu. ContextMenuActionUnicode ContextMenuAction = 20 // ContextMenuActionSpellingGuess: proposed replacement for a misspelled // word. ContextMenuActionSpellingGuess ContextMenuAction = 21 // ContextMenuActionNoGuessesFound: indicator that spellchecking found no // proposed replacements. ContextMenuActionNoGuessesFound ContextMenuAction = 22 // ContextMenuActionIgnoreSpelling causes the spellchecker to ignore the // word for this session. ContextMenuActionIgnoreSpelling ContextMenuAction = 23 // ContextMenuActionLearnSpelling causes the spellchecker to add the word to // the dictionary. ContextMenuActionLearnSpelling ContextMenuAction = 24 // ContextMenuActionIgnoreGrammar: ignore grammar. ContextMenuActionIgnoreGrammar ContextMenuAction = 25 // ContextMenuActionFontMenu: font options menu. ContextMenuActionFontMenu ContextMenuAction = 26 // ContextMenuActionBold: bold. ContextMenuActionBold ContextMenuAction = 27 // ContextMenuActionItalic: italic. ContextMenuActionItalic ContextMenuAction = 28 // ContextMenuActionUnderline: underline. ContextMenuActionUnderline ContextMenuAction = 29 // ContextMenuActionOutline: outline. ContextMenuActionOutline ContextMenuAction = 30 // ContextMenuActionInspectElement: open current element in the inspector. ContextMenuActionInspectElement ContextMenuAction = 31 // ContextMenuActionOpenVideoInNewWindow: open current video element in a // new window. ContextMenuActionOpenVideoInNewWindow ContextMenuAction = 32 // ContextMenuActionOpenAudioInNewWindow: open current audio element in a // new window. ContextMenuActionOpenAudioInNewWindow ContextMenuAction = 33 // ContextMenuActionCopyVideoLinkToClipboard: copy video link location in to // the clipboard. ContextMenuActionCopyVideoLinkToClipboard ContextMenuAction = 34 // ContextMenuActionCopyAudioLinkToClipboard: copy audio link location in to // the clipboard. ContextMenuActionCopyAudioLinkToClipboard ContextMenuAction = 35 // ContextMenuActionToggleMediaControls: enable or disable media controls. ContextMenuActionToggleMediaControls ContextMenuAction = 36 // ContextMenuActionToggleMediaLoop: enable or disable media loop. ContextMenuActionToggleMediaLoop ContextMenuAction = 37 // ContextMenuActionEnterVideoFullscreen: show current video element in // fullscreen mode. ContextMenuActionEnterVideoFullscreen ContextMenuAction = 38 // ContextMenuActionMediaPlay: play current media element. ContextMenuActionMediaPlay ContextMenuAction = 39 // ContextMenuActionMediaPause: pause current media element. ContextMenuActionMediaPause ContextMenuAction = 40 // ContextMenuActionMediaMute: mute current media element. ContextMenuActionMediaMute ContextMenuAction = 41 // ContextMenuActionDownloadVideoToDisk: download video to disk. Since 2.2. ContextMenuActionDownloadVideoToDisk ContextMenuAction = 42 // ContextMenuActionDownloadAudioToDisk: download audio to disk. Since 2.2. ContextMenuActionDownloadAudioToDisk ContextMenuAction = 43 // ContextMenuActionInsertEmoji: insert an emoji. Since 2.26. ContextMenuActionInsertEmoji ContextMenuAction = 44 // ContextMenuActionPasteAsPlainText: paste clipboard contents as plain // text. Since 2.30. ContextMenuActionPasteAsPlainText ContextMenuAction = 45 // ContextMenuActionCustom: custom action defined by applications. ContextMenuActionCustom ContextMenuAction = 10000 )
func (ContextMenuAction) String ¶
func (c ContextMenuAction) String() string
String returns the name in string for ContextMenuAction.
type ContextMenuClass ¶
type ContextMenuClass struct {
// contains filtered or unexported fields
}
ContextMenuClass: instance of this type is always passed by reference.
type ContextMenuItem ¶
type ContextMenuItem struct { coreglib.InitiallyUnowned // contains filtered or unexported fields }
ContextMenuItem: one item of a KitContextMenu.
The KitContextMenu is composed of KitContextMenuItem<!-- -->s. These items can be created from a Action, from a KitContextMenuAction or from a KitContextMenuAction and a label. These KitContextMenuAction<!-- -->s denote stock actions for the items. You can also create separators and submenus.
func NewContextMenuItemFromGaction ¶
func NewContextMenuItemFromGaction(action gio.Actioner, label string, target *glib.Variant) *ContextMenuItem
NewContextMenuItemFromGaction creates a new KitContextMenuItem for the given action and label.
On activation target will be passed as parameter to the callback.
The function takes the following parameters:
- action: #GAction.
- label: menu item label text.
- target (optional) to use as the action target.
The function returns the following values:
- contextMenuItem: newly created KitContextMenuItem object.
func NewContextMenuItemFromStockAction ¶
func NewContextMenuItemFromStockAction(action ContextMenuAction) *ContextMenuItem
NewContextMenuItemFromStockAction creates a new KitContextMenuItem for the given stock action.
Stock actions are handled automatically by WebKit so that, for example, when a menu item created with a WEBKIT_CONTEXT_MENU_ACTION_STOP is activated the action associated will be handled by WebKit and the current load operation will be stopped. You can get the #GAction of a KitContextMenuItem created with a KitContextMenuAction with webkit_context_menu_item_get_gaction() and connect to the Action::activate signal to be notified when the item is activated, but you can't prevent the associated action from being performed.
The function takes the following parameters:
- action stock action.
The function returns the following values:
- contextMenuItem: newly created KitContextMenuItem object.
func NewContextMenuItemFromStockActionWithLabel ¶
func NewContextMenuItemFromStockActionWithLabel(action ContextMenuAction, label string) *ContextMenuItem
NewContextMenuItemFromStockActionWithLabel creates a new KitContextMenuItem for the given stock action using the given label.
Stock actions have a predefined label, this method can be used to create a KitContextMenuItem for a KitContextMenuAction but using a custom label.
The function takes the following parameters:
- action stock action.
- label: custom label text to use instead of the predefined one.
The function returns the following values:
- contextMenuItem: newly created KitContextMenuItem object.
func NewContextMenuItemSeparator ¶
func NewContextMenuItemSeparator() *ContextMenuItem
NewContextMenuItemSeparator creates a new KitContextMenuItem representing a separator.
The function returns the following values:
- contextMenuItem: newly created KitContextMenuItem object.
func NewContextMenuItemWithSubmenu ¶
func NewContextMenuItemWithSubmenu(label string, submenu *ContextMenu) *ContextMenuItem
NewContextMenuItemWithSubmenu creates a new KitContextMenuItem using the given label with a submenu.
The function takes the following parameters:
- label: menu item label text.
- submenu to set.
The function returns the following values:
- contextMenuItem: newly created KitContextMenuItem object.
func (*ContextMenuItem) Gaction ¶
func (item *ContextMenuItem) Gaction() *gio.Action
Gaction gets the action associated to item as a #GAction.
The function returns the following values:
- action associated to the KitContextMenuItem, or NULL if item is a separator.
func (*ContextMenuItem) IsSeparator ¶
func (item *ContextMenuItem) IsSeparator() bool
IsSeparator checks whether item is a separator.
The function returns the following values:
- ok: TRUE is item is a separator or FALSE otherwise.
func (*ContextMenuItem) SetSubmenu ¶
func (item *ContextMenuItem) SetSubmenu(submenu *ContextMenu)
SetSubmenu sets or replaces the item submenu.
If submenu is NULL the current submenu of item is removed.
The function takes the following parameters:
- submenu (optional): KitContextMenu.
func (*ContextMenuItem) StockAction ¶
func (item *ContextMenuItem) StockAction() ContextMenuAction
StockAction gets the KitContextMenuAction of item.
If the KitContextMenuItem was not created for a stock action WEBKIT_CONTEXT_MENU_ACTION_CUSTOM will be returned. If the KitContextMenuItem is a separator WEBKIT_CONTEXT_MENU_ACTION_NO_ACTION will be returned.
The function returns the following values:
- contextMenuAction of item.
func (*ContextMenuItem) Submenu ¶
func (item *ContextMenuItem) Submenu() *ContextMenu
Submenu gets the submenu of item.
The function returns the following values:
- contextMenu representing the submenu of item or NULL if item doesn't have a submenu.
type ContextMenuItemClass ¶
type ContextMenuItemClass struct {
// contains filtered or unexported fields
}
ContextMenuItemClass: instance of this type is always passed by reference.
type ContextMenuItemOverrides ¶
type ContextMenuItemOverrides struct { }
ContextMenuItemOverrides contains methods that are overridable.
type ContextMenuOverrides ¶
type ContextMenuOverrides struct { }
ContextMenuOverrides contains methods that are overridable.
type CookieAcceptPolicy ¶
CookieAcceptPolicy: enum values used to denote the cookie acceptance policies.
const ( // CookiePolicyAcceptAlways: accept all cookies unconditionally. CookiePolicyAcceptAlways CookieAcceptPolicy = iota // CookiePolicyAcceptNever: reject all cookies unconditionally. CookiePolicyAcceptNever // CookiePolicyAcceptNoThirdParty: accept only cookies set by the main // document loaded. CookiePolicyAcceptNoThirdParty )
func (CookieAcceptPolicy) String ¶
func (c CookieAcceptPolicy) String() string
String returns the name in string for CookieAcceptPolicy.
type CookieManager ¶
CookieManager defines how to handle cookies in a KitWebContext.
The WebKitCookieManager defines how to set up and handle cookies. You can get it from a KitWebsiteDataManager with webkit_website_data_manager_get_cookie_manager(), and use it to set where to store cookies with webkit_cookie_manager_set_persistent_storage(), or to set the acceptance policy, with webkit_cookie_manager_get_accept_policy().
func (*CookieManager) AcceptPolicyFinish ¶
func (cookieManager *CookieManager) AcceptPolicyFinish(result gio.AsyncResulter) (CookieAcceptPolicy, error)
AcceptPolicyFinish: finish an asynchronous operation started with webkit_cookie_manager_get_accept_policy().
The function takes the following parameters:
- result: Result.
The function returns the following values:
- cookieAcceptPolicy: cookie acceptance policy of cookie_manager as a KitCookieAcceptPolicy.
func (*CookieManager) AddCookieFinish ¶
func (cookieManager *CookieManager) AddCookieFinish(result gio.AsyncResulter) error
AddCookieFinish: finish an asynchronous operation started with webkit_cookie_manager_add_cookie().
The function takes the following parameters:
- result: Result.
func (*CookieManager) AllCookiesFinish ¶
func (cookieManager *CookieManager) AllCookiesFinish(result gio.AsyncResulter) ([]*soup.Cookie, error)
AllCookiesFinish: finish an asynchronous operation started with webkit_cookie_manager_get_all_cookies().
The return value is a List of Cookie instances which should be released with g_list_free_full() and soup_cookie_free().
The function takes the following parameters:
- result: Result.
The function returns the following values:
- list of Cookie instances.
func (*CookieManager) ConnectChanged ¶
func (cookieManager *CookieManager) ConnectChanged(f func()) coreglib.SignalHandle
ConnectChanged: this signal is emitted when cookies are added, removed or modified.
func (*CookieManager) CookiesFinish ¶
func (cookieManager *CookieManager) CookiesFinish(result gio.AsyncResulter) ([]*soup.Cookie, error)
CookiesFinish: finish an asynchronous operation started with webkit_cookie_manager_get_cookies().
The return value is a List of Cookie instances which should be released with g_list_free_full() and soup_cookie_free().
The function takes the following parameters:
- result: Result.
The function returns the following values:
- list of Cookie instances.
func (*CookieManager) DeleteCookieFinish ¶
func (cookieManager *CookieManager) DeleteCookieFinish(result gio.AsyncResulter) error
DeleteCookieFinish: finish an asynchronous operation started with webkit_cookie_manager_delete_cookie().
The function takes the following parameters:
- result: Result.
func (*CookieManager) ReplaceCookiesFinish ¶
func (cookieManager *CookieManager) ReplaceCookiesFinish(result gio.AsyncResulter) error
ReplaceCookiesFinish: finish an asynchronous operation started with webkit_cookie_manager_replace_cookies().
The function takes the following parameters:
- result: Result.
func (*CookieManager) SetAcceptPolicy ¶
func (cookieManager *CookieManager) SetAcceptPolicy(policy CookieAcceptPolicy)
SetAcceptPolicy: set the cookie acceptance policy of cookie_manager as policy.
Note that ITP has its own way to handle third-party cookies, so when it's enabled, and policy is set to WEBKIT_COOKIE_POLICY_ACCEPT_NO_THIRD_PARTY, WEBKIT_COOKIE_POLICY_ACCEPT_ALWAYS will be used instead. Once disabled, the policy will be set back to WEBKIT_COOKIE_POLICY_ACCEPT_NO_THIRD_PARTY. See also webkit_website_data_manager_set_itp_enabled().
The function takes the following parameters:
- policy: KitCookieAcceptPolicy.
func (*CookieManager) SetPersistentStorage ¶
func (cookieManager *CookieManager) SetPersistentStorage(filename string, storage CookiePersistentStorage)
SetPersistentStorage: set non-session cookies.
Set the filename where non-session cookies are stored persistently using storage as the format to read/write the cookies. Cookies are initially read from filename to create an initial set of cookies. Then, non-session cookies will be written to filename when the WebKitCookieManager::changed signal is emitted. By default, cookie_manager doesn't store the cookies persistently, so you need to call this method to keep cookies saved across sessions.
This method should never be called on a KitCookieManager associated to an ephemeral KitWebsiteDataManager.
The function takes the following parameters:
- filename to read to/write from.
- storage: KitCookiePersistentStorage.
type CookieManagerClass ¶
type CookieManagerClass struct {
// contains filtered or unexported fields
}
CookieManagerClass: instance of this type is always passed by reference.
type CookieManagerOverrides ¶
type CookieManagerOverrides struct { }
CookieManagerOverrides contains methods that are overridable.
type CookiePersistentStorage ¶
CookiePersistentStorage: enum values used to denote the cookie persistent storage types.
const ( // CookiePersistentStorageText cookies are stored in a text file in the // Mozilla "cookies.txt" format. CookiePersistentStorageText CookiePersistentStorage = iota // CookiePersistentStorageSqlite cookies are stored in a SQLite file in the // current Mozilla format. CookiePersistentStorageSqlite )
func (CookiePersistentStorage) String ¶
func (c CookiePersistentStorage) String() string
String returns the name in string for CookiePersistentStorage.
type Credential ¶
type Credential struct {
// contains filtered or unexported fields
}
Credential groups information used for user authentication.
An instance of this type is always passed by reference.
func NewCredential ¶
func NewCredential(username string, password string, persistence CredentialPersistence) *Credential
NewCredential constructs a struct Credential.
func NewCredentialForCertificate ¶
func NewCredentialForCertificate(certificate gio.TLSCertificater, persistence CredentialPersistence) *Credential
NewCredentialForCertificate constructs a struct Credential.
func NewCredentialForCertificatePIN ¶
func NewCredentialForCertificatePIN(pin string, persistence CredentialPersistence) *Credential
NewCredentialForCertificatePIN constructs a struct Credential.
func (*Credential) Certificate ¶
func (credential *Credential) Certificate() gio.TLSCertificater
Certificate: get the certificate currently held by this KitCredential.
The function returns the following values:
- tlsCertificate or NULL.
func (*Credential) Copy ¶
func (credential *Credential) Copy() *Credential
Copy: make a copy of the KitCredential.
The function returns the following values:
- ret: copy of passed in KitCredential.
func (*Credential) HasPassword ¶
func (credential *Credential) HasPassword() bool
HasPassword: determine whether this credential has a password stored.
The function returns the following values:
- ok: TRUE if the credential has a password or FALSE otherwise.
func (*Credential) Password ¶
func (credential *Credential) Password() string
Password: get the password currently held by this KitCredential.
The function returns the following values:
- utf8: password stored in the KitCredential.
func (*Credential) Persistence ¶
func (credential *Credential) Persistence() CredentialPersistence
Persistence: get the persistence mode currently held by this KitCredential.
The function returns the following values:
- credentialPersistence stored in the KitCredential.
func (*Credential) Username ¶
func (credential *Credential) Username() string
Username: get the username currently held by this KitCredential.
The function returns the following values:
- utf8: username stored in the KitCredential.
type CredentialPersistence ¶
CredentialPersistence: enum values representing the duration for which a credential persists.
const ( // CredentialPersistenceNone: credential does not persist. CredentialPersistenceNone CredentialPersistence = iota // CredentialPersistenceForSession: credential persists for session only. CredentialPersistenceForSession // CredentialPersistencePermanent: credential persists permanently. CredentialPersistencePermanent )
func (CredentialPersistence) String ¶
func (c CredentialPersistence) String() string
String returns the name in string for CredentialPersistence.
type DeviceInfoPermissionRequest ¶
type DeviceInfoPermissionRequest struct { *coreglib.Object PermissionRequest // contains filtered or unexported fields }
DeviceInfoPermissionRequest: permission request for accessing user's audio/video devices.
WebKitUserMediaPermissionRequest represents a request for permission to whether WebKit should be allowed to access the user's devices information when requested through the enumerateDevices API.
When a WebKitDeviceInfoPermissionRequest is not handled by the user, it is denied by default.
type DeviceInfoPermissionRequestClass ¶
type DeviceInfoPermissionRequestClass struct {
// contains filtered or unexported fields
}
DeviceInfoPermissionRequestClass: instance of this type is always passed by reference.
type DeviceInfoPermissionRequestOverrides ¶
type DeviceInfoPermissionRequestOverrides struct { }
DeviceInfoPermissionRequestOverrides contains methods that are overridable.
type Download ¶
Download: object used to communicate with the application when downloading.
KitDownload carries information about a download request and response, including a KitURIRequest and a KitURIResponse objects. The application may use this object to control the download process, or to simply figure out what is to be downloaded, and handle the download process itself.
func (*Download) AllowOverwrite ¶
AllowOverwrite returns the current value of the KitDownload:allow-overwrite property.
Returns the current value of the KitDownload:allow-overwrite property, which determines whether the download will overwrite an existing file on disk, or if it will fail if the destination already exists.
The function returns the following values:
- ok: current value of the KitDownload:allow-overwrite property.
func (*Download) Cancel ¶
func (download *Download) Cancel()
Cancel cancels the download.
When the ongoing download operation is effectively cancelled the signal KitDownload::failed is emitted with WEBKIT_DOWNLOAD_ERROR_CANCELLED_BY_USER error.
func (*Download) ConnectCreatedDestination ¶
func (download *Download) ConnectCreatedDestination(f func(destination string)) coreglib.SignalHandle
ConnectCreatedDestination: this signal is emitted after KitDownload::decide-destination and before KitDownload::received-data to notify that destination file has been created successfully at destination.
func (*Download) ConnectDecideDestination ¶
func (download *Download) ConnectDecideDestination(f func(suggestedFilename string) (ok bool)) coreglib.SignalHandle
ConnectDecideDestination: this signal is emitted after response is received to decide a destination for the download using webkit_download_set_destination(). If this signal is not handled, the file will be downloaded to G_USER_DIRECTORY_DOWNLOAD directory using suggested_filename.
Since 2.40, you may handle this signal asynchronously by returning TRUE without calling webkit_download_set_destination(). This indicates intent to eventually call webkit_download_set_destination(). In this case, the download will not proceed until the destination is set or cancelled with webkit_download_cancel().
func (*Download) ConnectFailed ¶
func (download *Download) ConnectFailed(f func(err error)) coreglib.SignalHandle
ConnectFailed: this signal is emitted when an error occurs during the download operation. The given error, of the domain WEBKIT_DOWNLOAD_ERROR, contains further details of the failure. If the download is cancelled with webkit_download_cancel(), this signal is emitted with error WEBKIT_DOWNLOAD_ERROR_CANCELLED_BY_USER. The download operation finishes after an error and KitDownload::finished signal is emitted after this one.
func (*Download) ConnectFinished ¶
func (download *Download) ConnectFinished(f func()) coreglib.SignalHandle
ConnectFinished: this signal is emitted when download finishes successfully or due to an error. In case of errors KitDownload::failed signal is emitted before this one.
func (*Download) ConnectReceivedData ¶
func (download *Download) ConnectReceivedData(f func(dataLength uint64)) coreglib.SignalHandle
ConnectReceivedData: this signal is emitted after response is received, every time new data has been written to the destination. It's useful to know the progress of the download operation.
func (*Download) Destination ¶
Destination obtains the destination to which the downloaded file will be written.
You can connect to KitDownload::created-destination to make sure this method returns a valid destination.
The function returns the following values:
- utf8 (optional): destination or NULL.
func (*Download) ElapsedTime ¶
ElapsedTime gets the elapsed time in seconds, including any fractional part.
If the download finished, had an error or was cancelled this is the time between its start and the event.
The function returns the following values:
- gdouble seconds since the download was started.
func (*Download) EstimatedProgress ¶
EstimatedProgress gets the value of the KitDownload:estimated-progress property. Gets the value of the KitDownload:estimated-progress property. You can monitor the estimated progress of the download operation by connecting to the notify::estimated-progress signal of download.
The function returns the following values:
- gdouble: estimate of the of the percent complete for a download as a range from 0.0 to 1.0.
func (*Download) ReceivedDataLength ¶
ReceivedDataLength gets the length of the data already downloaded for download.
Gets the length of the data already downloaded for download in bytes.
The function returns the following values:
- guint64: amount of bytes already downloaded.
func (*Download) Request ¶
func (download *Download) Request() *URIRequest
Request retrieves the KitURIRequest object that backs the download process.
The function returns the following values:
- uriRequest of download.
func (*Download) Response ¶
func (download *Download) Response() *URIResponse
Response retrieves the KitURIResponse object that backs the download process.
Retrieves the KitURIResponse object that backs the download process. This method returns NULL if called before the response is received from the server. You can connect to notify::response signal to be notified when the response is received.
The function returns the following values:
- uriResponse or NULL if the response hasn't been received yet.
func (*Download) SetAllowOverwrite ¶
SetAllowOverwrite sets the KitDownload:allow-overwrite property.
Sets the KitDownload:allow-overwrite property, which determines whether the download may overwrite an existing file on disk, or if it will fail if the destination already exists.
The function takes the following parameters:
- allowed: new value for the KitDownload:allow-overwrite property.
func (*Download) SetDestination ¶
SetDestination sets the destination to which the downloaded file will be written.
This method should be called before the download transfer starts or it will not have any effect on the ongoing download operation. To set the destination using the filename suggested by the server connect to KitDownload::decide-destination signal and call webkit_download_set_destination(). If you want to set a fixed destination that doesn't depend on the suggested filename you can connect to notify::response signal and call webkit_download_set_destination().
If KitDownload::decide-destination signal is not handled and destination is not set when the download transfer starts, the file will be saved with the filename suggested by the server in G_USER_DIRECTORY_DOWNLOAD directory.
The function takes the following parameters:
- destination: destination.
type DownloadClass ¶
type DownloadClass struct {
// contains filtered or unexported fields
}
DownloadClass: instance of this type is always passed by reference.
type DownloadError ¶
DownloadError: enum values used to denote the various download errors.
const ( // DownloadErrorNetwork: download failure due to network error. DownloadErrorNetwork DownloadError = 499 // DownloadErrorCancelledByUser: download was cancelled by user. DownloadErrorCancelledByUser DownloadError = 400 // DownloadErrorDestination: download failure due to destination error. DownloadErrorDestination DownloadError = 401 )
func (DownloadError) String ¶
func (d DownloadError) String() string
String returns the name in string for DownloadError.
type DownloadOverrides ¶
type DownloadOverrides struct { }
DownloadOverrides contains methods that are overridable.
type EditorState ¶
EditorState: web editor state.
WebKitEditorState represents the state of a KitWebView editor. Use webkit_web_view_get_editor_state() to get the WebKitEditorState of a KitWebView.
func (*EditorState) IsCopyAvailable ¶
func (editorState *EditorState) IsCopyAvailable() bool
IsCopyAvailable gets whether a copy command can be issued.
The function returns the following values:
- ok: TRUE if copy is currently available.
func (*EditorState) IsCutAvailable ¶
func (editorState *EditorState) IsCutAvailable() bool
IsCutAvailable gets whether a cut command can be issued.
The function returns the following values:
- ok: TRUE if cut is currently available.
func (*EditorState) IsPasteAvailable ¶
func (editorState *EditorState) IsPasteAvailable() bool
IsPasteAvailable gets whether a paste command can be issued.
The function returns the following values:
- ok: TRUE if paste is currently available.
func (*EditorState) IsRedoAvailable ¶
func (editorState *EditorState) IsRedoAvailable() bool
IsRedoAvailable gets whether a redo command can be issued.
The function returns the following values:
- ok: TRUE if redo is currently available.
func (*EditorState) IsUndoAvailable ¶
func (editorState *EditorState) IsUndoAvailable() bool
IsUndoAvailable gets whether an undo command can be issued.
The function returns the following values:
- ok: TRUE if undo is currently available.
func (*EditorState) TypingAttributes ¶
func (editorState *EditorState) TypingAttributes() uint
TypingAttributes gets the typing attributes at the current cursor position.
If there is a selection, this returns the typing attributes of the selected text. Note that in case of a selection, typing attributes are considered active only when they are present throughout the selection.
The function returns the following values:
- guint: bitmask of KitEditorTypingAttributes flags.
type EditorStateClass ¶
type EditorStateClass struct {
// contains filtered or unexported fields
}
EditorStateClass: instance of this type is always passed by reference.
type EditorStateOverrides ¶
type EditorStateOverrides struct { }
EditorStateOverrides contains methods that are overridable.
type EditorTypingAttributes ¶
EditorTypingAttributes: enum values with flags representing typing attributes.
const ( // EditorTypingAttributeNone: no typing attributes. EditorTypingAttributeNone EditorTypingAttributes = 0b10 // EditorTypingAttributeBold: bold typing attribute. EditorTypingAttributeBold EditorTypingAttributes = 0b100 // EditorTypingAttributeItalic: italic typing attribute. EditorTypingAttributeItalic EditorTypingAttributes = 0b1000 // EditorTypingAttributeUnderline: underline typing attribute. EditorTypingAttributeUnderline EditorTypingAttributes = 0b10000 // EditorTypingAttributeStrikethrough: strikethrough typing attribute. EditorTypingAttributeStrikethrough EditorTypingAttributes = 0b100000 )
func (EditorTypingAttributes) Has ¶
func (e EditorTypingAttributes) Has(other EditorTypingAttributes) bool
Has returns true if e contains other.
func (EditorTypingAttributes) String ¶
func (e EditorTypingAttributes) String() string
String returns the names in string for EditorTypingAttributes.
type FaviconDatabase ¶
FaviconDatabase provides access to the icons associated with web sites.
WebKit will automatically look for available icons in <link> elements on opened pages as well as an existing favicon.ico and load the images found into a memory cache if possible. That cache is frozen to an on-disk database for persistence.
If KitSettings:enable-private-browsing is TRUE, new icons won't be added to the on-disk database and no existing icons will be deleted from it. Nevertheless, WebKit will still store them in the in-memory cache during the current execution.
func (*FaviconDatabase) Clear ¶
func (database *FaviconDatabase) Clear()
Clear clears all icons from the database.
func (*FaviconDatabase) ConnectFaviconChanged ¶
func (database *FaviconDatabase) ConnectFaviconChanged(f func(pageUri, faviconUri string)) coreglib.SignalHandle
ConnectFaviconChanged: this signal is emitted when the favicon URI of page_uri has been changed to favicon_uri in the database. You can connect to this signal and call webkit_favicon_database_get_favicon() to get the favicon. If you are interested in the favicon of a KitWebView it's easier to use the KitWebView:favicon property. See webkit_web_view_get_favicon() for more details.
func (*FaviconDatabase) FaviconFinish ¶
func (database *FaviconDatabase) FaviconFinish(result gio.AsyncResulter) (gdk.Texturer, error)
FaviconFinish finishes an operation started with webkit_favicon_database_get_favicon().
The function takes the following parameters:
- result obtained from the ReadyCallback passed to webkit_favicon_database_get_favicon().
The function returns the following values:
- texture: new favicon image, or NULL in case of error.
func (*FaviconDatabase) FaviconURI ¶
func (database *FaviconDatabase) FaviconURI(pageUri string) string
FaviconURI obtains the URI of the favicon for the given page_uri.
The function takes the following parameters:
- pageUri: URI of the page containing the icon.
The function returns the following values:
- utf8: newly allocated URI for the favicon, or NULL if the database doesn't have a favicon for page_uri.
type FaviconDatabaseClass ¶
type FaviconDatabaseClass struct {
// contains filtered or unexported fields
}
FaviconDatabaseClass: instance of this type is always passed by reference.
type FaviconDatabaseError ¶
FaviconDatabaseError: enum values used to denote the various errors related to the KitFaviconDatabase.
const ( // FaviconDatabaseErrorNotInitialized is closed. FaviconDatabaseErrorNotInitialized FaviconDatabaseError = iota // FaviconDatabaseErrorFaviconNotFound: there is not an icon available for // the requested URL. FaviconDatabaseErrorFaviconNotFound // FaviconDatabaseErrorFaviconUnknown: there might be an icon for the // requested URL, but its data is unknown at the moment. FaviconDatabaseErrorFaviconUnknown )
func (FaviconDatabaseError) String ¶
func (f FaviconDatabaseError) String() string
String returns the name in string for FaviconDatabaseError.
type FaviconDatabaseOverrides ¶
type FaviconDatabaseOverrides struct { }
FaviconDatabaseOverrides contains methods that are overridable.
type Feature ¶
type Feature struct {
// contains filtered or unexported fields
}
Feature describes a web engine feature that may be toggled at runtime.
The WebKit web engine includes a set of features which may be toggled programmatically, each one represented by a KitFeature that provides information about it:
- A unique “identifier”: feature.GetIdentifier.
- A “default value”, which indicates whether the option is enabled automatically: feature.GetDefaultValue.
- Its “status”, which determines whether it should be considered user-settable and its development stage (see featurestatus for details): feature.GetStatus.
- A category, which may be used to group features together: feature.GetCategory.
- An optional short “name” which can be presented to an user: feature.GetName.
- An optional longer “detailed” description: feature.GetDetails.
The lists of available features can be obtained with settings.GetAllFeatures(), settings.GetExperimentalFeatures(), and settings.GetDevelopmentFeatures()). As a rule of thumb, applications which may want to allow users (i.e. web developers) to test WebKit features should use the list of experimental features. Additionally, applications might want to expose development features *when targeting technically inclined users* for early testing of in-development features (i.e. in “technology preview” or “canary” builds).
Applications **must not** expose the list of all features to end users because they often lack descriptions and control parts of the web engine which are either intended to be used during development of WebKit itself, or in specific scenarios to tweak how WebKit integrates with the application.
An instance of this type is always passed by reference.
func (*Feature) Category ¶
Category gets the category of the feature.
Applications which include user interface to toggle features may want to use the category to group related features together.
The function returns the following values:
- utf8: feature category.
func (*Feature) DefaultValue ¶
DefaultValue gets whether the feature is enabled by default.
The default value may be used by applications which include user interface to toggle features to restore its settings to their defaults. Note that whether a feature is actually enabled must be checked with settings.GetFeatureEnabled.
The function returns the following values:
- ok: whether the feature is enabled by default.
func (*Feature) Details ¶
Details gets a description for the feature.
The detailed description should be considered an additional clarification on the purpose of the feature, to be used as complementary aid to be displayed along the feature name returned by feature.GetName. The returned string is suitable to be displayed to end users, but it should not be relied upon being localized.
Note that some *features may not* have a detailed description, and NULL is returned in this case.
The function returns the following values:
- utf8 (optional): feature description.
func (*Feature) Identifier ¶
Identifier gets a string that uniquely identifies the feature.
The function returns the following values:
- utf8: identifier string for the feature.
func (*Feature) Name ¶
Name gets a short name for the feature.
The returned string is suitable to be displayed to end users, but it should not be relied upon being localized.
Note that some *features may not* have a short name, and NULL is returned in this case.
The function returns the following values:
- utf8 (optional): short feature name.
func (*Feature) Status ¶
func (feature *Feature) Status() FeatureStatus
Status gets the status of the feature.
The function returns the following values:
- featureStatus: feature status.
type FeatureList ¶
type FeatureList struct {
// contains filtered or unexported fields
}
FeatureList contains a set of toggle-able web engine features.
The list supports passing around a set of feature objects and iterating over them:
g_autoptr(WebKitFeatureList) list = webkit_settings_get_experimental_features(); for (gsize i = 0; i < webkit_feature_list_get_length(list): i++) { WebKitFeature *feature = webkit_feature_list_get(list, i); // Do something with "feature". }
Lists of features can be obtained with settings.GetExperimentalFeatures(), settings.GetDevelopmentFeatures(), and settings.GetAllFeatures().
An instance of this type is always passed by reference.
func SettingsGetAllFeatures ¶
func SettingsGetAllFeatures() *FeatureList
SettingsGetAllFeatures gets the list of all available WebKit features.
Features can be toggled with settings.SetFeatureEnabled, and their current state determined with settings.GetFeatureEnabled.
Note that most applications should use settings.GetDevelopmentFeatures() and settings.GetExperimentalFeatures() instead.
The function returns the following values:
- featureList: list of all features.
func SettingsGetDevelopmentFeatures ¶
func SettingsGetDevelopmentFeatures() *FeatureList
SettingsGetDevelopmentFeatures gets the list of available development WebKit features.
The returned features are a subset of those returned by settings.GetAllFeatures(), and includes those which web and WebKit developers might find useful, but in general should *not* be exposed to end users; see featurestatus for more details.
The function returns the following values:
- featureList: list of development features.
func SettingsGetExperimentalFeatures ¶
func SettingsGetExperimentalFeatures() *FeatureList
SettingsGetExperimentalFeatures gets the list of available experimental WebKit features.
The returned features are a subset of those returned by settings.GetAllFeatures(), and includes those which certain applications may want to expose to end users; see featurestatus for more details.
The function returns the following values:
- featureList: list of experimental features.
func (*FeatureList) Get ¶
func (featureList *FeatureList) Get(index uint) *Feature
Get gets a feature given its index.
The function takes the following parameters:
- index of the feature.
The function returns the following values:
- feature at index.
func (*FeatureList) Length ¶
func (featureList *FeatureList) Length() uint
Length gets the number of elements in the feature list.
The function returns the following values:
gsize: number of elements.
Since 2.42.
type FeatureStatus ¶
FeatureStatus describes the status of a webkitfeature.
The status for a given feature can be obtained with webkit_feature_get_status.
const ( // FeatureStatusEmbedder: feature that adjust behaviour for specific // application needs. The feature is not part of a Web platform feature, // not a mature feature intended to be always on. FeatureStatusEmbedder FeatureStatus = iota // FeatureStatusUnstable: feature in development. The feature may be // unfinished, and there are no guarantees about its safety and stability. FeatureStatusUnstable // FeatureStatusInternal: feature for debugging the WebKit engine. The // feature is not generally useful for user or web developers, and always // disabled by default. FeatureStatusInternal // FeatureStatusDeveloper: feature for web developers. The feature is not // generally useful for end users, and always disabled by default. FeatureStatusDeveloper // FeatureStatusTestable: feature in active development and complete enough // for testing. The feature may not be yet ready to ship and is disabled by // default. FeatureStatusTestable // FeatureStatusPreview: feature ready to be tested by users. The feature // is disabled by default, but may be enabled by applications automatically // e.g. in their “technology preview” or “beta” versions. FeatureStatusPreview // FeatureStatusStable: feature ready for general use. The feature is // enabled by default, but it may still be toggled to support debugging and // testing. FeatureStatusStable // FeatureStatusMature: feature in general use. The feature is always // enabled and in general there should be no user-facing interface to toggle // it. FeatureStatusMature )
func (FeatureStatus) String ¶
func (f FeatureStatus) String() string
String returns the name in string for FeatureStatus.
type FileChooserRequest ¶
FileChooserRequest: request to open a file chooser.
Whenever the user interacts with an HTML input element with file type, WebKit will need to show a dialog to choose one or more files to be uploaded to the server along with the rest of the form data. For that to happen in a general way, instead of just opening a FileChooserDialog (which might be not desirable in some cases, which could prefer to use their own file chooser dialog), WebKit will fire the KitWebView::run-file-chooser signal with a KitFileChooserRequest object, which will allow the client application to specify the files to be selected, to inspect the details of the request (e.g. if multiple selection should be allowed) and to cancel the request, in case nothing was selected.
In case the client application does not wish to handle this signal, WebKit will provide a default handler which will asynchronously run a regular FileChooserDialog for the user to interact with.
func (*FileChooserRequest) Cancel ¶
func (request *FileChooserRequest) Cancel()
Cancel: ask WebKit to cancel the request.
It's important to do this in case no selection has been made in the client, otherwise the request won't be properly completed and the browser will keep the request pending forever, which might cause the browser to hang.
func (*FileChooserRequest) MIMETypes ¶
func (request *FileChooserRequest) MIMETypes() []string
MIMETypes: get the list of MIME types the file chooser dialog should handle.
Get the list of MIME types the file chooser dialog should handle, in the format specified in RFC 2046 for "media types". Its contents depend on the value of the 'accept' attribute for HTML input elements. This function should normally be called before presenting the file chooser dialog to the user, to decide whether to allow the user to select multiple files at once or only one.
The function returns the following values:
- utf8s: a NULL-terminated array of strings if a list of accepted MIME types is defined or NULL otherwise, meaning that any MIME type should be accepted. This array and its contents are owned by WebKit and should not be modified or freed.
func (*FileChooserRequest) MIMETypesFilter ¶
func (request *FileChooserRequest) MIMETypesFilter() *gtk.FileFilter
MIMETypesFilter: get the filter currently associated with the request.
Get the filter currently associated with the request, ready to be used by FileChooser. This function should normally be called before presenting the file chooser dialog to the user, to decide whether to apply a filter so the user would not be allowed to select files with other MIME types.
See webkit_file_chooser_request_get_mime_types() if you are interested in getting the list of accepted MIME types.
The function returns the following values:
- fileFilter if a list of accepted MIME types is defined or NULL otherwise. The returned object is owned by WebKit should not be modified or freed.
func (*FileChooserRequest) SelectFiles ¶
func (request *FileChooserRequest) SelectFiles(files []string)
SelectFiles: ask WebKit to select local files for upload and complete the request.
The function takes the following parameters:
- files: a NULL-terminated array of strings, containing paths to local files.
func (*FileChooserRequest) SelectMultiple ¶
func (request *FileChooserRequest) SelectMultiple() bool
SelectMultiple: whether the file chooser should allow selecting multiple files.
Determine whether the file chooser associated to this KitFileChooserRequest should allow selecting multiple files, which depends on the HTML input element having a 'multiple' attribute defined.
The function returns the following values:
- ok: TRUE if the file chooser should allow selecting multiple files or FALSE otherwise.
func (*FileChooserRequest) SelectedFiles ¶
func (request *FileChooserRequest) SelectedFiles() []string
SelectedFiles: get the list of selected files associated to the request.
Get the list of selected files currently associated to the request. Initially, the return value of this method contains any files selected in previous file chooser requests for this HTML input element. Once webkit_file_chooser_request_select_files, the value will reflect whatever files are given.
This function should normally be called only before presenting the file chooser dialog to the user, to decide whether to perform some extra action, like pre-selecting the files from a previous request.
The function returns the following values:
- utf8s: a NULL-terminated array of strings if there are selected files associated with the request or NULL otherwise. This array and its contents are owned by WebKit and should not be modified or freed.
type FileChooserRequestClass ¶
type FileChooserRequestClass struct {
// contains filtered or unexported fields
}
FileChooserRequestClass: instance of this type is always passed by reference.
type FileChooserRequestOverrides ¶
type FileChooserRequestOverrides struct { }
FileChooserRequestOverrides contains methods that are overridable.
type FindController ¶
FindController controls text search in a KitWebView.
A KitFindController is used to search text in a KitWebView. You can get a KitWebView<!-- -->'s KitFindController with webkit_web_view_get_find_controller(), and later use it to search for text using webkit_find_controller_search(), or get the number of matches using webkit_find_controller_count_matches(). The operations are asynchronous and trigger signals when ready, such as KitFindController::found-text, KitFindController::failed-to-find-text or KitFindController::counted-matches<!-- -->.
func (*FindController) ConnectCountedMatches ¶
func (findController *FindController) ConnectCountedMatches(f func(matchCount uint)) coreglib.SignalHandle
ConnectCountedMatches: this signal is emitted when the KitFindController has counted the number of matches for a given text after a call to webkit_find_controller_count_matches().
func (*FindController) ConnectFailedToFindText ¶
func (findController *FindController) ConnectFailedToFindText(f func()) coreglib.SignalHandle
ConnectFailedToFindText: this signal is emitted when a search operation does not find any result for the given text. It will be issued if the text is not found asynchronously after a call to webkit_find_controller_search(), webkit_find_controller_search_next() or webkit_find_controller_search_previous().
func (*FindController) ConnectFoundText ¶
func (findController *FindController) ConnectFoundText(f func(matchCount uint)) coreglib.SignalHandle
ConnectFoundText: this signal is emitted when a given text is found in the web page text. It will be issued if the text is found asynchronously after a call to webkit_find_controller_search(), webkit_find_controller_search_next() or webkit_find_controller_search_previous().
func (*FindController) CountMatches ¶
func (findController *FindController) CountMatches(searchText string, findOptions uint32, maxMatchCount uint)
CountMatches counts the number of matches for search_text.
Counts the number of matches for search_text found in the KitWebView with the provided find_options. The number of matches will be provided by the KitFindController::counted-matches signal.
The function takes the following parameters:
- searchText: text to look for.
- findOptions: bitmask with the KitFindOptions used in the search.
- maxMatchCount: maximum number of matches allowed in the search.
func (*FindController) MaxMatchCount ¶
func (findController *FindController) MaxMatchCount() uint
MaxMatchCount gets the maximum number of matches to report.
Gets the maximum number of matches to report during a text lookup. This number is passed as the last argument of webkit_find_controller_search() or webkit_find_controller_count_matches().
The function returns the following values:
- guint: maximum number of matches to report.
func (*FindController) Options ¶
func (findController *FindController) Options() uint32
Options gets the KitFindOptions for the current search.
Gets a bitmask containing the KitFindOptions associated with the current search.
The function returns the following values:
- guint32: bitmask containing the KitFindOptions associated with the current search.
func (*FindController) Search ¶
func (findController *FindController) Search(searchText string, findOptions uint32, maxMatchCount uint)
Search looks for search_text associated with find_controller.
Looks for search_text in the KitWebView associated with find_controller since the beginning of the document highlighting up to max_match_count matches. The outcome of the search will be asynchronously provided by the KitFindController::found-text and KitFindController::failed-to-find-text signals.
To look for the next or previous occurrences of the same text with the same find options use webkit_find_controller_search_next() and/or webkit_find_controller_search_previous(). The KitFindController will use the same text and options for the following searches unless they are modified by another call to this method.
Note that if the number of matches is higher than max_match_count then KitFindController::found-text will report G_MAXUINT matches instead of the actual number.
Callers should call webkit_find_controller_search_finish() to finish the current search operation.
The function takes the following parameters:
- searchText: text to look for.
- findOptions: bitmask with the KitFindOptions used in the search.
- maxMatchCount: maximum number of matches allowed in the search.
func (*FindController) SearchFinish ¶
func (findController *FindController) SearchFinish()
SearchFinish finishes a find operation.
Finishes a find operation started by webkit_find_controller_search(). It will basically unhighlight every text match found.
This method will be typically called when the search UI is closed/hidden by the client application.
func (*FindController) SearchNext ¶
func (findController *FindController) SearchNext()
SearchNext looks for the next occurrence of the search text.
Calling this method before webkit_find_controller_search() or webkit_find_controller_count_matches() is a programming error.
func (*FindController) SearchPrevious ¶
func (findController *FindController) SearchPrevious()
SearchPrevious looks for the previous occurrence of the search text.
Calling this method before webkit_find_controller_search() or webkit_find_controller_count_matches() is a programming error.
func (*FindController) SearchText ¶
func (findController *FindController) SearchText() string
SearchText gets the text that find_controller is searching for.
Gets the text that find_controller is currently searching for. This text is passed to either webkit_find_controller_search() or webkit_find_controller_count_matches().
The function returns the following values:
- utf8: text to look for in the KitWebView.
func (*FindController) WebView ¶
func (findController *FindController) WebView() *WebView
WebView gets the KitWebView this find controller is associated to.
Do not dereference the returned instance as it belongs to the KitFindController.
The function returns the following values:
- webView: KitWebView.
type FindControllerClass ¶
type FindControllerClass struct {
// contains filtered or unexported fields
}
FindControllerClass: instance of this type is always passed by reference.
type FindControllerOverrides ¶
type FindControllerOverrides struct { }
FindControllerOverrides contains methods that are overridable.
type FindOptions ¶
FindOptions: enum values used to specify search options.
const ( // FindOptionsNone: no search flags, this means a case sensitive, no wrap, // forward only search. FindOptionsNone FindOptions = 0b0 // FindOptionsCaseInsensitive: case insensitive search. FindOptionsCaseInsensitive FindOptions = 0b1 // FindOptionsAtWordStarts: search text only at the begining of the words. FindOptionsAtWordStarts FindOptions = 0b10 // FindOptionsTreatMedialCapitalAsWordStart: treat capital letters in the // middle of words as word start. FindOptionsTreatMedialCapitalAsWordStart FindOptions = 0b100 // FindOptionsBackwards: search backwards. FindOptionsBackwards FindOptions = 0b1000 // FindOptionsWrapAround: if not present search will stop at the end of the // document. FindOptionsWrapAround FindOptions = 0b10000 )
func (FindOptions) Has ¶
func (f FindOptions) Has(other FindOptions) bool
Has returns true if f contains other.
func (FindOptions) String ¶
func (f FindOptions) String() string
String returns the names in string for FindOptions.
type FormSubmissionRequest ¶
FormSubmissionRequest represents a form submission request.
When a form is about to be submitted in a KitWebView, the KitWebView::submit-form signal is emitted. Its request argument contains information about the text fields of the form, that are typically used to store login information, returned as lists by webkit_form_submission_request_list_text_fields(). You can submit the form with webkit_form_submission_request_submit().
func (*FormSubmissionRequest) Submit ¶
func (request *FormSubmissionRequest) Submit()
Submit: continue the form submission.
type FormSubmissionRequestClass ¶
type FormSubmissionRequestClass struct {
// contains filtered or unexported fields
}
FormSubmissionRequestClass: instance of this type is always passed by reference.
type FormSubmissionRequestOverrides ¶
type FormSubmissionRequestOverrides struct { }
FormSubmissionRequestOverrides contains methods that are overridable.
type GeolocationManager ¶
GeolocationManager: geolocation manager.
WebKitGeolocationManager provides API to get the geographical position of the user. Once a KitGeolocationPermissionRequest is allowed, when WebKit needs to know the user location KitGeolocationManager::start signal is emitted. If the signal is handled and returns TRUE, the application is responsible for providing the position every time it's updated by calling webkit_geolocation_manager_update_position(). The signal KitGeolocationManager::stop will be emitted when location updates are no longer needed.
func (*GeolocationManager) ConnectStart ¶
func (manager *GeolocationManager) ConnectStart(f func() (ok bool)) coreglib.SignalHandle
ConnectStart: signal is emitted to notify that manager needs to start receiving position updates. After this signal is emitted the user should provide the updates using webkit_geolocation_manager_update_position() every time the position changes, or use webkit_geolocation_manager_failed() in case it isn't possible to determine the current position.
If the signal is not handled, WebKit will try to determine the position using GeoClue if available.
func (*GeolocationManager) ConnectStop ¶
func (manager *GeolocationManager) ConnectStop(f func()) coreglib.SignalHandle
ConnectStop: signal is emitted to notify that manager doesn't need to receive position updates anymore.
func (*GeolocationManager) EnableHighAccuracy ¶
func (manager *GeolocationManager) EnableHighAccuracy() bool
EnableHighAccuracy: get whether high accuracy is enabled.
The function returns the following values:
- ok: whether the setting is enabled.
func (*GeolocationManager) Failed ¶
func (manager *GeolocationManager) Failed(errorMessage string)
Failed: notify manager that determining the position failed.
The function takes the following parameters:
- errorMessage: error message.
func (*GeolocationManager) UpdatePosition ¶
func (manager *GeolocationManager) UpdatePosition(position *GeolocationPosition)
UpdatePosition: notify manager that position has been updated to position.
The function takes the following parameters:
- position: KitGeolocationPosition.
type GeolocationManagerClass ¶
type GeolocationManagerClass struct {
// contains filtered or unexported fields
}
GeolocationManagerClass: instance of this type is always passed by reference.
type GeolocationManagerOverrides ¶
type GeolocationManagerOverrides struct { }
GeolocationManagerOverrides contains methods that are overridable.
type GeolocationPermissionRequest ¶
type GeolocationPermissionRequest struct { *coreglib.Object PermissionRequest // contains filtered or unexported fields }
GeolocationPermissionRequest: permission request for sharing the user's location.
WebKitGeolocationPermissionRequest represents a request for permission to decide whether WebKit should provide the user's location to a website when requested through the Geolocation API.
When a WebKitGeolocationPermissionRequest is not handled by the user, it is denied by default.
When embedding web views in your application, you *must* configure an application identifier to allow web content to use geolocation services. The identifier *must* match the name of the .desktop file which describes the application, sans the suffix.
If your application uses #GApplication (or any subclass like Application), WebKit will automatically use the identifier returned by g_application_get_application_id(). This is the recommended approach for enabling geolocation in applications.
If an identifier cannot be obtained through #GApplication, the value returned by g_get_prgname() will be used instead as a fallback. For programs which cannot use #GApplication, calling g_set_prgname() early during initialization is needed when the name of the executable on disk does not match the name of a valid .desktop file.
type GeolocationPermissionRequestClass ¶
type GeolocationPermissionRequestClass struct {
// contains filtered or unexported fields
}
GeolocationPermissionRequestClass: instance of this type is always passed by reference.
type GeolocationPermissionRequestOverrides ¶
type GeolocationPermissionRequestOverrides struct { }
GeolocationPermissionRequestOverrides contains methods that are overridable.
type GeolocationPosition ¶
type GeolocationPosition struct {
// contains filtered or unexported fields
}
GeolocationPosition: opaque struct to provide position updates to a KitGeolocationManager.
WebKitGeolocationPosition is an opaque struct used to provide position updates to a KitGeolocationManager using webkit_geolocation_manager_update_position().
An instance of this type is always passed by reference.
func NewGeolocationPosition ¶
func NewGeolocationPosition(latitude float64, longitude float64, accuracy float64) *GeolocationPosition
NewGeolocationPosition constructs a struct GeolocationPosition.
func (*GeolocationPosition) Copy ¶
func (position *GeolocationPosition) Copy() *GeolocationPosition
Copy: make a copy of the KitGeolocationPosition.
The function returns the following values:
- geolocationPosition: copy of position.
func (*GeolocationPosition) SetAltitude ¶
func (position *GeolocationPosition) SetAltitude(altitude float64)
SetAltitude: set the position altitude.
The function takes the following parameters:
- altitude in meters.
func (*GeolocationPosition) SetAltitudeAccuracy ¶
func (position *GeolocationPosition) SetAltitudeAccuracy(altitudeAccuracy float64)
SetAltitudeAccuracy: set the accuracy of position altitude.
The function takes the following parameters:
- altitudeAccuracy: accuracy of position altitude in meters.
func (*GeolocationPosition) SetHeading ¶
func (position *GeolocationPosition) SetHeading(heading float64)
SetHeading: set the position heading.
Set the position heading, as a positive angle between the direction of movement and the North direction, in clockwise direction.
The function takes the following parameters:
- heading in degrees.
func (*GeolocationPosition) SetSpeed ¶
func (position *GeolocationPosition) SetSpeed(speed float64)
SetSpeed: set the position speed.
The function takes the following parameters:
- speed in meters per second.
func (*GeolocationPosition) SetTimestamp ¶
func (position *GeolocationPosition) SetTimestamp(timestamp uint64)
SetTimestamp: set the position timestamp.
By default it's the time when the position was created.
The function takes the following parameters:
- timestamp in seconds since the epoch, or 0 to use current time.
type HardwareAccelerationPolicy ¶
HardwareAccelerationPolicy: enum values used for determining the hardware acceleration policy.
const ( // HardwareAccelerationPolicyAlways: hardware acceleration is always // enabled, even for websites not requesting it. HardwareAccelerationPolicyAlways HardwareAccelerationPolicy = iota // HardwareAccelerationPolicyNever: hardware acceleration is always // disabled, even for websites requesting it. HardwareAccelerationPolicyNever )
func (HardwareAccelerationPolicy) String ¶
func (h HardwareAccelerationPolicy) String() string
String returns the name in string for HardwareAccelerationPolicy.
type HitTestResult ¶
HitTestResult: result of a Hit Test.
A Hit Test is an operation to get context information about a given point in a KitWebView. KitHitTestResult represents the result of a Hit Test. It provides context information about what is at the coordinates of the Hit Test, such as if there's a link, an image or a media.
You can get the context of the HitTestResult with webkit_hit_test_result_get_context() that returns a bitmask of KitHitTestResultContext flags. You can also use webkit_hit_test_result_context_is_link(), webkit_hit_test_result_context_is_image() and webkit_hit_test_result_context_is_media() to determine whether there's a link, image or a media element at the coordinates of the Hit Test. Note that it's possible that several KitHitTestResultContext flags are active at the same time, for example if there's a link containing an image.
When the mouse is moved over a KitWebView a Hit Test is performed for the mouse coordinates and KitWebView::mouse-target-changed signal is emitted with a KitHitTestResult.
func (*HitTestResult) Context ¶
func (hitTestResult *HitTestResult) Context() uint
Context gets the value of the KitHitTestResult:context property.
The function returns the following values:
- guint: bitmask of KitHitTestResultContext flags.
func (*HitTestResult) ContextIsEditable ¶
func (hitTestResult *HitTestResult) ContextIsEditable() bool
ContextIsEditable gets whether WEBKIT_HIT_TEST_RESULT_CONTEXT_EDITABLE flag is present in KitHitTestResult:context.
The function returns the following values:
- ok: TRUE if there's an editable element at the coordinates of the hit_test_result, or FALSE otherwise.
func (*HitTestResult) ContextIsImage ¶
func (hitTestResult *HitTestResult) ContextIsImage() bool
ContextIsImage gets whether WEBKIT_HIT_TEST_RESULT_CONTEXT_IMAGE flag is present in KitHitTestResult:context.
The function returns the following values:
- ok: TRUE if there's an image element in the coordinates of the Hit Test, or FALSE otherwise.
func (*HitTestResult) ContextIsLink ¶
func (hitTestResult *HitTestResult) ContextIsLink() bool
ContextIsLink gets whether WEBKIT_HIT_TEST_RESULT_CONTEXT_LINK flag is present in KitHitTestResult:context.
The function returns the following values:
- ok: TRUE if there's a link element in the coordinates of the Hit Test, or FALSE otherwise.
func (*HitTestResult) ContextIsMedia ¶
func (hitTestResult *HitTestResult) ContextIsMedia() bool
ContextIsMedia gets whether WEBKIT_HIT_TEST_RESULT_CONTEXT_MEDIA flag is present in KitHitTestResult:context.
The function returns the following values:
- ok: TRUE if there's a media element in the coordinates of the Hit Test, or FALSE otherwise.
func (*HitTestResult) ContextIsScrollbar ¶
func (hitTestResult *HitTestResult) ContextIsScrollbar() bool
ContextIsScrollbar gets whether WEBKIT_HIT_TEST_RESULT_CONTEXT_SCROLLBAR flag is present in KitHitTestResult:context.
The function returns the following values:
- ok: TRUE if there's a scrollbar element at the coordinates of the hit_test_result, or FALSE otherwise.
func (*HitTestResult) ContextIsSelection ¶
func (hitTestResult *HitTestResult) ContextIsSelection() bool
ContextIsSelection gets whether WEBKIT_HIT_TEST_RESULT_CONTEXT_SELECTION flag is present in KitHitTestResult:context.
The function returns the following values:
- ok: TRUE if there's a selected element at the coordinates of the hit_test_result, or FALSE otherwise.
func (*HitTestResult) ImageURI ¶
func (hitTestResult *HitTestResult) ImageURI() string
ImageURI gets the value of the KitHitTestResult:image-uri property.
The function returns the following values:
- utf8: URI of the image element in the coordinates of the Hit Test, or NULL if there isn't an image element in hit_test_result context.
func (*HitTestResult) LinkLabel ¶
func (hitTestResult *HitTestResult) LinkLabel() string
LinkLabel gets the value of the KitHitTestResult:link-label property.
The function returns the following values:
- utf8: label of the link element in the coordinates of the Hit Test, or NULL if there isn't a link element in hit_test_result context or the link element doesn't have a label.
func (*HitTestResult) LinkTitle ¶
func (hitTestResult *HitTestResult) LinkTitle() string
LinkTitle gets the value of the KitHitTestResult:link-title property.
The function returns the following values:
- utf8: title of the link element in the coordinates of the Hit Test, or NULL if there isn't a link element in hit_test_result context or the link element doesn't have a title.
func (*HitTestResult) LinkURI ¶
func (hitTestResult *HitTestResult) LinkURI() string
LinkURI gets the value of the KitHitTestResult:link-uri property.
The function returns the following values:
- utf8: URI of the link element in the coordinates of the Hit Test, or NULL if there isn't a link element in hit_test_result context.
func (*HitTestResult) MediaURI ¶
func (hitTestResult *HitTestResult) MediaURI() string
MediaURI gets the value of the KitHitTestResult:media-uri property.
The function returns the following values:
- utf8: URI of the media element in the coordinates of the Hit Test, or NULL if there isn't a media element in hit_test_result context.
type HitTestResultClass ¶
type HitTestResultClass struct {
// contains filtered or unexported fields
}
HitTestResultClass: instance of this type is always passed by reference.
type HitTestResultContext ¶
HitTestResultContext: enum values with flags representing the context of a KitHitTestResult.
const ( // HitTestResultContextDocument: anywhere in the document. HitTestResultContextDocument HitTestResultContext = 0b10 // HitTestResultContextLink: hyperlink element. HitTestResultContextLink HitTestResultContext = 0b100 // HitTestResultContextImage: image element. HitTestResultContextImage HitTestResultContext = 0b1000 // HitTestResultContextMedia: video or audio element. HitTestResultContextMedia HitTestResultContext = 0b10000 // HitTestResultContextEditable: editable element. HitTestResultContextEditable HitTestResultContext = 0b100000 // HitTestResultContextScrollbar: scrollbar element. HitTestResultContextScrollbar HitTestResultContext = 0b1000000 // HitTestResultContextSelection: selected element. Since 2.8. HitTestResultContextSelection HitTestResultContext = 0b10000000 )
func (HitTestResultContext) Has ¶
func (h HitTestResultContext) Has(other HitTestResultContext) bool
Has returns true if h contains other.
func (HitTestResultContext) String ¶
func (h HitTestResultContext) String() string
String returns the names in string for HitTestResultContext.
type HitTestResultOverrides ¶
type HitTestResultOverrides struct { }
HitTestResultOverrides contains methods that are overridable.
type ITPFirstParty ¶
type ITPFirstParty struct {
// contains filtered or unexported fields
}
ITPFirstParty describes a first party origin.
An instance of this type is always passed by reference.
func (*ITPFirstParty) Domain ¶
func (itpFirstParty *ITPFirstParty) Domain() string
Domain: get the domain name of itp_first_party.
The function returns the following values:
- utf8: domain name.
func (*ITPFirstParty) LastUpdateTime ¶
func (itpFirstParty *ITPFirstParty) LastUpdateTime() *glib.DateTime
LastUpdateTime: get the last time a KitITPThirdParty has been seen under itp_first_party.
Each WebKitITPFirstParty is created by webkit_itp_third_party_get_first_parties() and therefore corresponds to exactly one KitITPThirdParty.
The function returns the following values:
- dateTime: last update time as a Time.
func (*ITPFirstParty) WebsiteDataAccessAllowed ¶
func (itpFirstParty *ITPFirstParty) WebsiteDataAccessAllowed() bool
WebsiteDataAccessAllowed: get whether itp_first_party has granted website data access to its KitITPThirdParty.
Each WebKitITPFirstParty is created by webkit_itp_third_party_get_first_parties() and therefore corresponds to exactly one KitITPThirdParty.
The function returns the following values:
- ok: TRUE if website data access has been granted, or FALSE otherwise.
type ITPThirdParty ¶
type ITPThirdParty struct {
// contains filtered or unexported fields
}
ITPThirdParty describes a third party origin.
An instance of this type is always passed by reference.
func (*ITPThirdParty) Domain ¶
func (itpThirdParty *ITPThirdParty) Domain() string
Domain: get the domain name of itp_third_party.
The function returns the following values:
- utf8: domain name.
func (*ITPThirdParty) FirstParties ¶
func (itpThirdParty *ITPThirdParty) FirstParties() []*ITPFirstParty
FirstParties: get the list of KitITPFirstParty under which itp_third_party has been seen.
The function returns the following values:
- list of KitITPFirstParty.
type InputHints ¶
InputHints: enum values used to describe hints that might be taken into account by input methods.
const ( // InputHintNone: no special behavior suggested. InputHintNone InputHints = 0b0 // InputHintSpellcheck: suggest spell checking. InputHintSpellcheck InputHints = 0b1 // InputHintLowercase: suggest to not autocapitlize. InputHintLowercase InputHints = 0b10 // InputHintUppercaseChars: suggest to capitalize all text. InputHintUppercaseChars InputHints = 0b100 // InputHintUppercaseWords: suggest to capitalize the first character of // each word. InputHintUppercaseWords InputHints = 0b1000 // InputHintUppercaseSentences: suggest to capitalize the first word of each // sentence. InputHintUppercaseSentences InputHints = 0b10000 // InputHintInhibitOSK: suggest to not show an onscreen keyboard. InputHintInhibitOSK InputHints = 0b100000 )
func (InputHints) Has ¶
func (i InputHints) Has(other InputHints) bool
Has returns true if i contains other.
func (InputHints) String ¶
func (i InputHints) String() string
String returns the names in string for InputHints.
type InputMethodContext ¶
InputMethodContext: base class for input method contexts.
WebKitInputMethodContext defines the interface to implement WebKit input methods. The input methods are used by WebKit, when editable content is focused, to map from key events to Unicode character strings.
An input method may consume multiple key events in sequence and finally output the composed result. This is called preediting, and an input method may provide feedback about this process by displaying the intermediate composition states as preedit text.
func BaseInputMethodContext ¶
func BaseInputMethodContext(obj InputMethodContexter) *InputMethodContext
BaseInputMethodContext returns the underlying base object.
func (*InputMethodContext) ConnectCommitted ¶
func (context *InputMethodContext) ConnectCommitted(f func(text string)) coreglib.SignalHandle
ConnectCommitted is emitted when a complete input sequence has been entered by the user. This can be a single character immediately after a key press or the final result of preediting.
func (*InputMethodContext) ConnectDeleteSurrounding ¶
func (context *InputMethodContext) ConnectDeleteSurrounding(f func(offset int, nChars uint)) coreglib.SignalHandle
ConnectDeleteSurrounding is emitted when the input method wants to delete the context surrounding the cursor. If offset is a negative value, it means a position before the cursor.
func (*InputMethodContext) ConnectPreeditChanged ¶
func (context *InputMethodContext) ConnectPreeditChanged(f func()) coreglib.SignalHandle
ConnectPreeditChanged is emitted whenever the preedit sequence currently being entered has changed. It is also emitted at the end of a preedit sequence, in which case webkit_input_method_context_get_preedit() returns the empty string.
func (*InputMethodContext) ConnectPreeditFinished ¶
func (context *InputMethodContext) ConnectPreeditFinished(f func()) coreglib.SignalHandle
ConnectPreeditFinished is emitted when a preediting sequence has been completed or canceled.
func (*InputMethodContext) ConnectPreeditStarted ¶
func (context *InputMethodContext) ConnectPreeditStarted(f func()) coreglib.SignalHandle
ConnectPreeditStarted is emitted when a new preediting sequence starts.
func (*InputMethodContext) FilterKeyEvent ¶
func (context *InputMethodContext) FilterKeyEvent(keyEvent gdk.Eventer) bool
FilterKeyEvent: allow key_event to be handled by the input method.
If TRUE is returned, then no further processing should be done for the key event.
The function takes the following parameters:
- keyEvent: key event to filter.
The function returns the following values:
- ok: TRUE if the key event was handled, or FALSE otherwise.
func (*InputMethodContext) InputHints ¶
func (context *InputMethodContext) InputHints() InputHints
InputHints: get the value of the KitInputMethodContext:input-hints property.
The function returns the following values:
- inputHints of the input associated with context.
func (*InputMethodContext) InputPurpose ¶
func (context *InputMethodContext) InputPurpose() InputPurpose
InputPurpose: get the value of the KitInputMethodContext:input-purpose property.
The function returns the following values:
- inputPurpose of the input associated with context.
func (*InputMethodContext) NotifyCursorArea ¶
func (context *InputMethodContext) NotifyCursorArea(x, y, width, height int)
NotifyCursorArea: notify context that cursor area changed in input associated.
The function takes the following parameters:
- x coordinate of cursor location.
- y coordinate of cursor location.
- width of cursor area.
- height of cursor area.
func (*InputMethodContext) NotifyFocusIn ¶
func (context *InputMethodContext) NotifyFocusIn()
NotifyFocusIn: notify context that input associated has gained focus.
func (*InputMethodContext) NotifyFocusOut ¶
func (context *InputMethodContext) NotifyFocusOut()
NotifyFocusOut: notify context that input associated has lost focus.
func (*InputMethodContext) NotifySurrounding ¶
func (context *InputMethodContext) NotifySurrounding(text string, length int, cursorIndex, selectionIndex uint)
NotifySurrounding: notify context that the context surrounding the cursor has changed.
If there's no selection selection_index is the same as cursor_index.
The function takes the following parameters:
- text surrounding the insertion point.
- length of text, or -1 if text is nul-terminated.
- cursorIndex: byte index of the insertion cursor within text.
- selectionIndex: byte index of the selection cursor within text.
func (*InputMethodContext) Preedit ¶
func (context *InputMethodContext) Preedit() (string, []*InputMethodUnderline, uint)
Preedit: get the pre-edit string and a list of WebKitInputMethodUnderline.
Get the current pre-edit string for the context, and a list of WebKitInputMethodUnderline to apply to the string. The string will be displayed inserted at cursor_offset.
The function returns the following values:
- text (optional): location to store the preedit string.
- underlines (optional): location to store the underlines as a #GList of KitInputMethodUnderline.
- cursorOffset (optional): location to store the position of cursor in preedit string.
func (*InputMethodContext) Reset ¶
func (context *InputMethodContext) Reset()
Reset the context.
This will typically cause the input to clear the preedit state.
func (*InputMethodContext) SetEnablePreedit ¶
func (context *InputMethodContext) SetEnablePreedit(enabled bool)
SetEnablePreedit: set whether context should enable preedit to display feedback.
The function takes the following parameters:
- enabled: whether to enable preedit.
func (*InputMethodContext) SetInputHints ¶
func (context *InputMethodContext) SetInputHints(hints InputHints)
SetInputHints: set the value of the KitInputMethodContext:input-hints property.
The function takes the following parameters:
- hints: KitInputHints.
func (*InputMethodContext) SetInputPurpose ¶
func (context *InputMethodContext) SetInputPurpose(purpose InputPurpose)
SetInputPurpose: set the value of the KitInputMethodContext:input-purpose property.
The function takes the following parameters:
- purpose: KitInputPurpose.
type InputMethodContextClass ¶
type InputMethodContextClass struct {
// contains filtered or unexported fields
}
InputMethodContextClass: instance of this type is always passed by reference.
type InputMethodContextOverrides ¶
type InputMethodContextOverrides struct { // The function takes the following parameters: // Committed func(text string) // The function takes the following parameters: // // - offset // - nChars // DeleteSurrounding func(offset int, nChars uint) // FilterKeyEvent: allow key_event to be handled by the input method. // // If TRUE is returned, then no further processing should be done for the // key event. // // The function takes the following parameters: // // - keyEvent: key event to filter. // // The function returns the following values: // // - ok: TRUE if the key event was handled, or FALSE otherwise. // FilterKeyEvent func(keyEvent gdk.Eventer) bool // Preedit: get the pre-edit string and a list of // WebKitInputMethodUnderline. // // Get the current pre-edit string for the context, and a list of // WebKitInputMethodUnderline to apply to the string. The string will be // displayed inserted at cursor_offset. // // The function returns the following values: // // - text (optional): location to store the preedit string. // - underlines (optional): location to store the underlines as a #GList // of KitInputMethodUnderline. // - cursorOffset (optional): location to store the position of cursor in // preedit string. // Preedit func() (string, []*InputMethodUnderline, uint) // NotifyCursorArea: notify context that cursor area changed in input // associated. // // The function takes the following parameters: // // - x coordinate of cursor location. // - y coordinate of cursor location. // - width of cursor area. // - height of cursor area. // NotifyCursorArea func(x, y, width, height int) // NotifyFocusIn: notify context that input associated has gained focus. NotifyFocusIn func() // NotifyFocusOut: notify context that input associated has lost focus. NotifyFocusOut func() // NotifySurrounding: notify context that the context surrounding the cursor // has changed. // // If there's no selection selection_index is the same as cursor_index. // // The function takes the following parameters: // // - text surrounding the insertion point. // - length of text, or -1 if text is nul-terminated. // - cursorIndex: byte index of the insertion cursor within text. // - selectionIndex: byte index of the selection cursor within text. // NotifySurrounding func(text string, length, cursorIndex, selectionIndex uint) PreeditChanged func() PreeditFinished func() PreeditStarted func() // Reset the context. // // This will typically cause the input to clear the preedit state. Reset func() // SetEnablePreedit: set whether context should enable preedit to display // feedback. // // The function takes the following parameters: // // - enabled: whether to enable preedit. // SetEnablePreedit func(enabled bool) }
InputMethodContextOverrides contains methods that are overridable.
type InputMethodContexter ¶
type InputMethodContexter interface { coreglib.Objector // contains filtered or unexported methods }
InputMethodContexter describes types inherited from class InputMethodContext.
To get the original type, the caller must assert this to an interface or another type.
type InputMethodUnderline ¶
type InputMethodUnderline struct {
// contains filtered or unexported fields
}
InputMethodUnderline: range of text in an preedit string to be shown underlined.
An instance of this type is always passed by reference.
func NewInputMethodUnderline ¶
func NewInputMethodUnderline(startOffset uint, endOffset uint) *InputMethodUnderline
NewInputMethodUnderline constructs a struct InputMethodUnderline.
func (*InputMethodUnderline) Copy ¶
func (underline *InputMethodUnderline) Copy() *InputMethodUnderline
Copy: make a copy of the KitInputMethodUnderline.
The function returns the following values:
- inputMethodUnderline: copy of passed in KitInputMethodUnderline.
func (*InputMethodUnderline) SetColor ¶
func (underline *InputMethodUnderline) SetColor(rgba *gdk.RGBA)
SetColor: set the color of the underline.
If rgba is NULL the foreground text color will be used for the underline too.
The function takes the following parameters:
- rgba (optional) or NULL.
type InputPurpose ¶
InputPurpose: enum values used to describe the primary purpose of the active editable element.
const ( // InputPurposeFreeForm: editable element expects any characters. InputPurposeFreeForm InputPurpose = iota // InputPurposeDigits: editable element expects digits. InputPurposeDigits // InputPurposeNumber: editable element expects a number. InputPurposeNumber // InputPurposePhone: editable element expects a telephone. InputPurposePhone // InputPurposeURL: editable element expects a URL. InputPurposeURL // InputPurposeEmail: editable element expects an email. InputPurposeEmail // InputPurposePassword: editable element expects a password. InputPurposePassword )
func (InputPurpose) String ¶
func (i InputPurpose) String() string
String returns the name in string for InputPurpose.
type InsecureContentEvent ¶
InsecureContentEvent: enum values used to denote the different events which can trigger the detection of insecure content.
const ( // InsecureContentRun: insecure content has been detected by trying to // execute any kind of logic (e.g. a script) from an untrusted source. InsecureContentRun InsecureContentEvent = iota // InsecureContentDisplayed: insecure content has been detected by trying to // display any kind of resource (e.g. an image) from an untrusted source. InsecureContentDisplayed )
func (InsecureContentEvent) String ¶
func (i InsecureContentEvent) String() string
String returns the name in string for InsecureContentEvent.
type JavascriptError ¶
JavascriptError: enum values used to denote errors happening when executing JavaScript.
const ( // JavascriptErrorScriptFailed: exception was raised in JavaScript // execution. JavascriptErrorScriptFailed JavascriptError = 699 // JavascriptErrorInvalidParameter: unsupported parameter has been used to // call and async function from API. Since 2.40. JavascriptErrorInvalidParameter JavascriptError = 600 // JavascriptErrorInvalidResult: result of JavaScript execution could not be // returned. Since 2.40. JavascriptErrorInvalidResult JavascriptError = 601 )
func (JavascriptError) String ¶
func (j JavascriptError) String() string
String returns the name in string for JavascriptError.
type LoadEvent ¶
LoadEvent: enum values used to denote the different events that happen during a KitWebView load operation.
const ( // LoadStarted: new load request has been made. No data has been received // yet, empty structures have been allocated to perform the load; the load // may still fail due to transport issues such as not being able to resolve // a name, or connect to a port. LoadStarted LoadEvent = iota // LoadRedirected: provisional data source received a server redirect. LoadRedirected // LoadCommitted: content started arriving for a page load. The necessary // transport requirements are established, and the load is being performed. LoadCommitted // LoadFinished: load completed. All resources are done loading or there was // an error during the load operation. LoadFinished )
type MediaCaptureState ¶
MediaCaptureState: enum values used to specify the capture state of a media device.
const ( // MediaCaptureStateNone: media capture is disabled. MediaCaptureStateNone MediaCaptureState = iota // MediaCaptureStateActive: media capture is active. MediaCaptureStateActive // MediaCaptureStateMuted: media capture is muted. MediaCaptureStateMuted )
func (MediaCaptureState) String ¶
func (m MediaCaptureState) String() string
String returns the name in string for MediaCaptureState.
type MediaError ¶
MediaError: enum values used to denote the various media errors.
const ( // MediaErrorWillHandleLoad: preliminary load failure for media content // types. A new load will be started to perform the media load. Since: 2.40. MediaErrorWillHandleLoad MediaError = 204 )
func (MediaError) String ¶
func (m MediaError) String() string
String returns the name in string for MediaError.
type MediaKeySystemPermissionRequest ¶
type MediaKeySystemPermissionRequest struct { *coreglib.Object PermissionRequest // contains filtered or unexported fields }
MediaKeySystemPermissionRequest: permission request for using an EME Content Decryption Module.
WebKitMediaKeySystemPermissionRequest represents a request for permission to decide whether WebKit should use the given CDM to access protected media when requested through the MediaKeySystem API.
When a WebKitMediaKeySystemPermissionRequest is not handled by the user, it is denied by default.
When handling this permission request the application may perform additional installation of the requested CDM, unless it is already present on the host system.
type MediaKeySystemPermissionRequestClass ¶
type MediaKeySystemPermissionRequestClass struct {
// contains filtered or unexported fields
}
MediaKeySystemPermissionRequestClass: instance of this type is always passed by reference.
type MediaKeySystemPermissionRequestOverrides ¶
type MediaKeySystemPermissionRequestOverrides struct { }
MediaKeySystemPermissionRequestOverrides contains methods that are overridable.
type MemoryPressureSettings ¶
type MemoryPressureSettings struct {
// contains filtered or unexported fields
}
MemoryPressureSettings: boxed type representing the settings for the memory pressure handler
KitMemoryPressureSettings is a boxed type that can be used to provide some custom settings to control how the memory pressure situations are handled by the different processes.
The memory pressure system implemented inside the different process will try to keep the memory usage under the defined memory limit. In order to do that, it will check the used memory with a user defined frequency and decide whether it should try to release memory. The thresholds passed will define how urgent is to release that memory.
Take into account that badly defined parameters can greatly reduce the performance of the engine. For example, setting memory limit too low with a fast poll interval can cause the process to constantly be trying to release memory.
A KitMemoryPressureSettings can be passed to a KitWebContext constructor, and the settings will be applied to all the web processes created by that context.
A KitMemoryPressureSettings can be passed to webkit_website_data_manager_set_memory_pressure_settings(), and the settings will be applied to all the network processes created after that call by any instance of KitWebsiteDataManager.
An instance of this type is always passed by reference.
func NewMemoryPressureSettings ¶
func NewMemoryPressureSettings() *MemoryPressureSettings
NewMemoryPressureSettings constructs a struct MemoryPressureSettings.
func (*MemoryPressureSettings) ConservativeThreshold ¶
func (settings *MemoryPressureSettings) ConservativeThreshold() float64
ConservativeThreshold gets the conservative memory usage threshold.
The function returns the following values:
- gdouble: value in the (0, 1) range.
func (*MemoryPressureSettings) Copy ¶
func (settings *MemoryPressureSettings) Copy() *MemoryPressureSettings
Copy: make a copy of settings.
The function returns the following values:
- memoryPressureSettings: copy of of the passed KitMemoryPressureSettings.
func (*MemoryPressureSettings) KillThreshold ¶
func (settings *MemoryPressureSettings) KillThreshold() float64
KillThreshold gets the kill memory usage threshold.
The function returns the following values:
- gdouble: positive value, can be zero.
func (*MemoryPressureSettings) MemoryLimit ¶
func (settings *MemoryPressureSettings) MemoryLimit() uint
MemoryLimit gets the memory usage limit.
The function returns the following values:
- guint: current value, in megabytes.
func (*MemoryPressureSettings) PollInterval ¶
func (settings *MemoryPressureSettings) PollInterval() float64
PollInterval gets the interval at which memory usage is checked.
The function returns the following values:
- gdouble: current interval value, in seconds.
func (*MemoryPressureSettings) SetConservativeThreshold ¶
func (settings *MemoryPressureSettings) SetConservativeThreshold(value float64)
SetConservativeThreshold sets the memory limit for the conservative policy to start working.
Sets value as the fraction of the defined memory limit where the conservative policy starts working. This policy will try to reduce the memory footprint by releasing non critical memory.
The threshold must be bigger than 0 and smaller than 1, and it must be smaller than the strict threshold defined in settings. The default value is 0.33.
The function takes the following parameters:
- value: fraction of the memory limit where the conservative policy starts working.
func (*MemoryPressureSettings) SetKillThreshold ¶
func (settings *MemoryPressureSettings) SetKillThreshold(value float64)
SetKillThreshold sets value as the fraction of the defined memory limit where the process will be killed.
The threshold must be a value bigger or equal to 0. A value of 0 means that the process is never killed. If the threshold is not 0, then it must be bigger than the strict threshold defined in settings. The threshold can also have values bigger than 1. The default value is 0.
The function takes the following parameters:
- value: fraction of the memory limit where the process will be killed because of excessive memory usage.
func (*MemoryPressureSettings) SetMemoryLimit ¶
func (settings *MemoryPressureSettings) SetMemoryLimit(memoryLimit uint)
SetMemoryLimit sets memory_limit the memory limit value to settings.
The default value is the system's RAM size with a maximum of 3GB.
The function takes the following parameters:
- memoryLimit: amount of memory (in MB) that the process is allowed to use.
func (*MemoryPressureSettings) SetPollInterval ¶
func (settings *MemoryPressureSettings) SetPollInterval(value float64)
SetPollInterval sets value as the poll interval used by settings.
The poll interval value must be bigger than 0. The default value is 30 seconds.
The function takes the following parameters:
- value: period (in seconds) between memory usage measurements.
func (*MemoryPressureSettings) SetStrictThreshold ¶
func (settings *MemoryPressureSettings) SetStrictThreshold(value float64)
SetStrictThreshold sets the memory limit for the strict policy to start working.
Sets value as the fraction of the defined memory limit where the strict policy starts working. This policy will try to reduce the memory footprint by releasing critical memory.
The threshold must be bigger than 0 and smaller than 1. Also, it must be bigger than the conservative threshold defined in settings, and smaller than the kill threshold if the latter is not 0. The default value is 0.5.
The function takes the following parameters:
- value: fraction of the memory limit where the strict policy starts working.
func (*MemoryPressureSettings) StrictThreshold ¶
func (settings *MemoryPressureSettings) StrictThreshold() float64
StrictThreshold gets the strict memory usage threshold.
The function returns the following values:
- gdouble: value in the (0, 1) range.
type NavigationAction ¶
type NavigationAction struct {
// contains filtered or unexported fields
}
NavigationAction provides details about interaction resulting in a resource load.
An instance of this type is always passed by reference.
func (*NavigationAction) Copy ¶
func (navigation *NavigationAction) Copy() *NavigationAction
Copy: make a copy of navigation.
The function returns the following values:
- navigationAction: copy of passed in KitNavigationAction.
func (*NavigationAction) FrameName ¶
func (navigation *NavigationAction) FrameName() string
FrameName gets the navigation target frame name. For example if navigation was triggered by clicking a link with a target attribute equal to "_blank", this will return the value of that attribute. In all other cases this function will return NULL.
The function returns the following values:
- utf8 (optional): name of the new frame this navigation action targets or NULL.
func (*NavigationAction) IsRedirect ¶
func (navigation *NavigationAction) IsRedirect() bool
IsRedirect returns whether the navigation was redirected.
The function returns the following values:
- ok: TRUE if the original navigation was redirected, FALSE otherwise.
func (*NavigationAction) IsUserGesture ¶
func (navigation *NavigationAction) IsUserGesture() bool
IsUserGesture: return whether the navigation was triggered by a user gesture like a mouse click.
The function returns the following values:
- ok: whether navigation action is a user gesture.
func (*NavigationAction) Modifiers ¶
func (navigation *NavigationAction) Modifiers() uint
Modifiers: return the modifier keys.
Return a bitmask of ModifierType values describing the modifier keys that were in effect when the navigation was requested.
The function returns the following values:
- guint: modifier keys.
func (*NavigationAction) MouseButton ¶
func (navigation *NavigationAction) MouseButton() uint
MouseButton: return the number of the mouse button that triggered the navigation.
Return the number of the mouse button that triggered the navigation, or 0 if the navigation was not started by a mouse event.
The function returns the following values:
- guint: mouse button number or 0.
func (*NavigationAction) NavigationType ¶
func (navigation *NavigationAction) NavigationType() NavigationType
NavigationType: return the type of action that triggered the navigation.
The function returns the following values:
- navigationType: KitNavigationType.
func (*NavigationAction) Request ¶
func (navigation *NavigationAction) Request() *URIRequest
Request: return the KitURIRequest associated with the navigation action.
Modifications to the returned object are <emphasis>not</emphasis> taken into account when the request is sent over the network, and is intended only to aid in evaluating whether a navigation action should be taken or not. To modify requests before they are sent over the network the KitPage::send-request signal can be used instead.
The function returns the following values:
- uriRequest: KitURIRequest.
type NavigationPolicyDecision ¶
type NavigationPolicyDecision struct { // contains filtered or unexported fields }
NavigationPolicyDecision: policy decision for navigation actions.
WebKitNavigationPolicyDecision represents a policy decision for events associated with navigations. If the value of KitNavigationPolicyDecision:mouse-button is not 0, then the navigation was triggered by a mouse event.
func (*NavigationPolicyDecision) NavigationAction ¶
func (decision *NavigationPolicyDecision) NavigationAction() *NavigationAction
NavigationAction gets the value of the KitNavigationPolicyDecision:navigation-action property.
The function returns the following values:
- navigationAction triggering this policy decision.
type NavigationPolicyDecisionClass ¶
type NavigationPolicyDecisionClass struct {
// contains filtered or unexported fields
}
NavigationPolicyDecisionClass: instance of this type is always passed by reference.
func (*NavigationPolicyDecisionClass) ParentClass ¶
func (n *NavigationPolicyDecisionClass) ParentClass() *PolicyDecisionClass
type NavigationPolicyDecisionOverrides ¶
type NavigationPolicyDecisionOverrides struct { }
NavigationPolicyDecisionOverrides contains methods that are overridable.
type NavigationType ¶
NavigationType: enum values used to denote the various navigation types.
const ( NavigationType = iota // form. NavigationTypeFormSubmitted // or backward. NavigationTypeBackForward NavigationTypeReload // form. NavigationTypeFormResubmitted NavigationTypeOther )NavigationTypeLinkClicked
func (NavigationType) String ¶
func (n NavigationType) String() string
String returns the name in string for NavigationType.
type NetworkError ¶
NetworkError: enum values used to denote the various network errors.
const ( // NetworkErrorFailed: generic load failure. NetworkErrorFailed NetworkError = 399 // NetworkErrorTransport: load failure due to transport error. NetworkErrorTransport NetworkError = 300 // NetworkErrorUnknownProtocol: load failure due to unknown protocol. NetworkErrorUnknownProtocol NetworkError = 301 // NetworkErrorCancelled: load failure due to cancellation. NetworkErrorCancelled NetworkError = 302 // NetworkErrorFileDoesNotExist: load failure due to missing file. NetworkErrorFileDoesNotExist NetworkError = 303 )
func (NetworkError) String ¶
func (n NetworkError) String() string
String returns the name in string for NetworkError.
type NetworkProxyMode ¶
NetworkProxyMode: enum values used to set the network proxy mode.
const ( // NetworkProxyModeDefault: use the default proxy of the system. NetworkProxyModeDefault NetworkProxyMode = iota // NetworkProxyModeNoProxy: do not use any proxy. NetworkProxyModeNoProxy // NetworkProxyModeCustom: use custom proxy settings. NetworkProxyModeCustom )
func (NetworkProxyMode) String ¶
func (n NetworkProxyMode) String() string
String returns the name in string for NetworkProxyMode.
type NetworkProxySettings ¶
type NetworkProxySettings struct {
// contains filtered or unexported fields
}
NetworkProxySettings configures network proxies.
WebKitNetworkProxySettings can be used to provide a custom proxy configuration to a KitWebContext. You need to call webkit_web_context_set_network_proxy_settings() with WEBKIT_NETWORK_PROXY_MODE_CUSTOM and a WebKitNetworkProxySettings.
An instance of this type is always passed by reference.
func NewNetworkProxySettings ¶
func NewNetworkProxySettings(defaultProxyUri string, ignoreHosts []string) *NetworkProxySettings
NewNetworkProxySettings constructs a struct NetworkProxySettings.
func (*NetworkProxySettings) AddProxyForScheme ¶
func (proxySettings *NetworkProxySettings) AddProxyForScheme(scheme string, proxyUri string)
AddProxyForScheme adds a URI-scheme-specific proxy.
URIs whose scheme matches uri_scheme will be proxied via proxy_uri. As with the default proxy URI, if proxy_uri starts with "socks://", it will be treated as referring to all three of the socks5, socks4a, and socks4 proxy types.
The function takes the following parameters:
- scheme: URI scheme to add a proxy for.
- proxyUri: proxy URI to use for uri_scheme.
func (*NetworkProxySettings) Copy ¶
func (proxySettings *NetworkProxySettings) Copy() *NetworkProxySettings
Copy: make a copy of the KitNetworkProxySettings.
The function returns the following values:
- networkProxySettings: copy of passed in KitNetworkProxySettings.
type NetworkSession ¶
NetworkSession manages network configuration.
func NetworkSessionGetDefault ¶
func NetworkSessionGetDefault() *NetworkSession
NetworkSessionGetDefault: get the default network session. The default network session is created using webkit_network_session_new() and passing NULL as data and cache directories.
The function returns the following values:
- networkSession: KitNetworkSession.
func NewNetworkSession ¶
func NewNetworkSession(dataDirectory, cacheDirectory string) *NetworkSession
NewNetworkSession creates a new KitNetworkSession with a persistent KitWebsiteDataManager. The parameters data_directory and cache_directory will be used as construct properties of the KitWebsiteDataManager of the network session. Note that if NULL is passed, the default directory will be passed to KitWebsiteDataManager so that webkit_website_data_manager_get_base_data_directory() and webkit_website_data_manager_get_base_cache_directory() always return a value for non ephemeral sessions.
It must be passed as construct parameter of a KitWebView.
The function takes the following parameters:
- dataDirectory (optional): base directory for data, or NULL.
- cacheDirectory (optional): base directory for caches, or NULL.
The function returns the following values:
- networkSession: newly created KitNetworkSession.
func NewNetworkSessionEphemeral ¶
func NewNetworkSessionEphemeral() *NetworkSession
NewNetworkSessionEphemeral creates a new KitNetworkSession with an ephemeral KitWebsiteDataManager.
The function returns the following values:
- networkSession: new ephemeral KitNetworkSession.
func (*NetworkSession) AllowTLSCertificateForHost ¶
func (session *NetworkSession) AllowTLSCertificateForHost(certificate gio.TLSCertificater, host string)
AllowTLSCertificateForHost: ignore further TLS errors on the host for the certificate present in info.
The function takes the following parameters:
- certificate: Certificate.
- host for which a certificate is to be allowed.
func (*NetworkSession) ConnectDownloadStarted ¶
func (session *NetworkSession) ConnectDownloadStarted(f func(download *Download)) coreglib.SignalHandle
ConnectDownloadStarted: this signal is emitted when a new download request is made.
func (*NetworkSession) CookieManager ¶
func (session *NetworkSession) CookieManager() *CookieManager
CookieManager: get the KitCookieManager of session.
The function returns the following values:
- cookieManager: KitCookieManager.
func (*NetworkSession) DownloadURI ¶
func (session *NetworkSession) DownloadURI(uri string) *Download
DownloadURI requests downloading of the specified URI string.
The download operation will not be associated to any KitWebView, if you are interested in starting a download from a particular KitWebView use webkit_web_view_download_uri() instead.
The function takes the following parameters:
- uri: URI to download.
The function returns the following values:
- download: new KitDownload representing the download operation.
func (*NetworkSession) IsEphemeral ¶
func (session *NetworkSession) IsEphemeral() bool
IsEphemeral: get whether session is ephemeral. A KitNetworkSession is ephemeral when its KitWebsiteDataManager is ephemeral. See KitWebsiteDataManager:is-ephemeral for more details.
The function returns the following values:
- ok: TRUE if session is pehmeral, or FALSE otherwise.
func (*NetworkSession) ItpEnabled ¶
func (session *NetworkSession) ItpEnabled() bool
ItpEnabled: get whether Intelligent Tracking Prevention (ITP) is enabled or not.
The function returns the following values:
- ok: TRUE if ITP is enabled, or FALSE otherwise.
func (*NetworkSession) ItpSummaryFinish ¶
func (session *NetworkSession) ItpSummaryFinish(result gio.AsyncResulter) ([]*ITPThirdParty, error)
ItpSummaryFinish: finish an asynchronous operation started with webkit_network_session_get_itp_summary().
The function takes the following parameters:
- result: Result.
The function returns the following values:
- list of KitITPThirdParty. You must free the #GList with g_list_free() and unref the KitITPThirdParty<!-- -->s with webkit_itp_third_party_unref() when you're done with them.
func (*NetworkSession) PersistentCredentialStorageEnabled ¶
func (session *NetworkSession) PersistentCredentialStorageEnabled() bool
PersistentCredentialStorageEnabled: get whether persistent credential storage is enabled or not.
See also webkit_network_session_set_persistent_credential_storage_enabled().
The function returns the following values:
- ok: TRUE if persistent credential storage is enabled, or FALSE otherwise.
func (*NetworkSession) PrefetchDns ¶
func (session *NetworkSession) PrefetchDns(hostname string)
PrefetchDns: resolve the domain name of the given hostname in advance, so that if a URI of hostname is requested the load will be performed more quickly.
The function takes the following parameters:
- hostname to be resolved.
func (*NetworkSession) SetItpEnabled ¶
func (session *NetworkSession) SetItpEnabled(enabled bool)
SetItpEnabled: enable or disable Intelligent Tracking Prevention (ITP).
When ITP is enabled resource load statistics are collected and used to decide whether to allow or block third-party cookies and prevent user tracking. Note that while ITP is enabled the accept policy WEBKIT_COOKIE_POLICY_ACCEPT_NO_THIRD_PARTY is ignored and WEBKIT_COOKIE_POLICY_ACCEPT_ALWAYS is used instead. See also webkit_cookie_session_set_accept_policy().
The function takes the following parameters:
- enabled: value to set.
func (*NetworkSession) SetPersistentCredentialStorageEnabled ¶
func (session *NetworkSession) SetPersistentCredentialStorageEnabled(enabled bool)
SetPersistentCredentialStorageEnabled: enable or disable persistent credential storage.
When enabled, which is the default for non-ephemeral sessions, the network process will try to read and write HTTP authentiacation credentials from persistent storage.
The function takes the following parameters:
- enabled: value to set.
func (*NetworkSession) SetProxySettings ¶
func (session *NetworkSession) SetProxySettings(proxyMode NetworkProxyMode, proxySettings *NetworkProxySettings)
SetProxySettings: set the network proxy settings to be used by connections started in session session.
By default WEBKIT_NETWORK_PROXY_MODE_DEFAULT is used, which means that the system settings will be used (g_proxy_resolver_get_default()). If you want to override the system default settings, you can either use WEBKIT_NETWORK_PROXY_MODE_NO_PROXY to make sure no proxies are used at all, or WEBKIT_NETWORK_PROXY_MODE_CUSTOM to provide your own proxy settings. When proxy_mode is WEBKIT_NETWORK_PROXY_MODE_CUSTOM proxy_settings must be a valid KitNetworkProxySettings; otherwise, proxy_settings must be NULL.
The function takes the following parameters:
- proxyMode: KitNetworkProxyMode.
- proxySettings (optional) or NULL.
func (*NetworkSession) SetTLSErrorsPolicy ¶
func (session *NetworkSession) SetTLSErrorsPolicy(policy TLSErrorsPolicy)
SetTLSErrorsPolicy: set the TLS errors policy of session as policy.
The function takes the following parameters:
- policy: KitTLSErrorsPolicy.
func (*NetworkSession) TLSErrorsPolicy ¶
func (session *NetworkSession) TLSErrorsPolicy() TLSErrorsPolicy
TLSErrorsPolicy: get the TLS errors policy of session.
The function returns the following values:
- tlsErrorsPolicy: KitTLSErrorsPolicy.
func (*NetworkSession) WebsiteDataManager ¶
func (session *NetworkSession) WebsiteDataManager() *WebsiteDataManager
WebsiteDataManager: get the KitWebsiteDataManager of session.
The function returns the following values:
- websiteDataManager: KitWebsiteDataManager.
type NetworkSessionClass ¶
type NetworkSessionClass struct {
// contains filtered or unexported fields
}
NetworkSessionClass: instance of this type is always passed by reference.
type NetworkSessionOverrides ¶
type NetworkSessionOverrides struct { }
NetworkSessionOverrides contains methods that are overridable.
type Notification ¶
Notification holds information about a notification that should be shown to the user.
func (*Notification) Body ¶
func (notification *Notification) Body() string
Body obtains the body for the notification.
The function returns the following values:
- utf8: body for the notification.
func (*Notification) Clicked ¶
func (notification *Notification) Clicked()
Clicked tells WebKit the notification has been clicked.
This will emit the KitNotification::clicked signal.
func (*Notification) Close ¶
func (notification *Notification) Close()
Close closes the notification.
func (*Notification) ConnectClicked ¶
func (notification *Notification) ConnectClicked(f func()) coreglib.SignalHandle
ConnectClicked is emitted when a notification has been clicked. See webkit_notification_clicked().
func (*Notification) ConnectClosed ¶
func (notification *Notification) ConnectClosed(f func()) coreglib.SignalHandle
ConnectClosed is emitted when a notification has been withdrawn.
The default handler will close the notification using libnotify, if built with support for it.
func (*Notification) ID ¶
func (notification *Notification) ID() uint64
ID obtains the unique id for the notification.
The function returns the following values:
- guint64: unique id for the notification.
func (*Notification) Tag ¶
func (notification *Notification) Tag() string
Tag obtains the tag identifier for the notification.
The function returns the following values:
- utf8 (optional): tag for the notification.
func (*Notification) Title ¶
func (notification *Notification) Title() string
Title obtains the title for the notification.
The function returns the following values:
- utf8: title for the notification.
type NotificationClass ¶
type NotificationClass struct {
// contains filtered or unexported fields
}
NotificationClass: instance of this type is always passed by reference.
type NotificationOverrides ¶
type NotificationOverrides struct { }
NotificationOverrides contains methods that are overridable.
type NotificationPermissionRequest ¶
type NotificationPermissionRequest struct { *coreglib.Object PermissionRequest // contains filtered or unexported fields }
NotificationPermissionRequest: permission request for displaying web notifications.
WebKitNotificationPermissionRequest represents a request for permission to decide whether WebKit should provide the user with notifications through the Web Notification API.
When a WebKitNotificationPermissionRequest is not handled by the user, it is denied by default.
type NotificationPermissionRequestClass ¶
type NotificationPermissionRequestClass struct {
// contains filtered or unexported fields
}
NotificationPermissionRequestClass: instance of this type is always passed by reference.
type NotificationPermissionRequestOverrides ¶
type NotificationPermissionRequestOverrides struct { }
NotificationPermissionRequestOverrides contains methods that are overridable.
type OptionMenu ¶
OptionMenu represents the dropdown menu of a select element in a KitWebView.
When a select element in a KitWebView needs to display a dropdown menu, the signal KitWebView::show-option-menu is emitted, providing a WebKitOptionMenu with the KitOptionMenuItem<!-- -->s that should be displayed.
func (*OptionMenu) ActivateItem ¶
func (menu *OptionMenu) ActivateItem(index uint)
ActivateItem activates the KitOptionMenuItem at index in menu.
Activating an item changes the value of the element making the item the active one. You are expected to close the menu with webkit_option_menu_close() after activating an item, calling this function again will have no effect.
The function takes the following parameters:
- index of the item.
func (*OptionMenu) Close ¶
func (menu *OptionMenu) Close()
Close: request to close a KitOptionMenu.
This emits WebKitOptionMenu::close signal. This function should always be called to notify WebKit that the associated menu has been closed. If the menu is closed and neither webkit_option_menu_select_item() nor webkit_option_menu_activate_item() have been called, the element value remains unchanged.
func (*OptionMenu) ConnectClose ¶
func (menu *OptionMenu) ConnectClose(f func()) coreglib.SignalHandle
ConnectClose is emitted when closing a KitOptionMenu is requested. This can happen when the user explicitly calls webkit_option_menu_close() or when the element is detached from the current page.
func (*OptionMenu) Event ¶
func (menu *OptionMenu) Event() gdk.Eventer
Event gets the Event that triggered the dropdown menu. If menu was not triggered by a user interaction, like a mouse click, NULL is returned.
The function returns the following values:
- event: menu event or NULL.
func (*OptionMenu) Item ¶
func (menu *OptionMenu) Item(index uint) *OptionMenuItem
Item returns the KitOptionMenuItem at index in menu.
The function takes the following parameters:
- index of the item.
The function returns the following values:
- optionMenuItem of menu.
func (*OptionMenu) NItems ¶
func (menu *OptionMenu) NItems() uint
NItems gets the length of the menu.
The function returns the following values:
- guint: number of KitOptionMenuItem<!-- -->s in menu.
func (*OptionMenu) SelectItem ¶
func (menu *OptionMenu) SelectItem(index uint)
SelectItem selects the KitOptionMenuItem at index in menu.
Selecting an item changes the text shown by the combo button, but it doesn't change the value of the element. You need to explicitly activate the item with webkit_option_menu_select_item() or close the menu with webkit_option_menu_close() in which case the currently selected item will be activated.
The function takes the following parameters:
- index of the item.
type OptionMenuClass ¶
type OptionMenuClass struct {
// contains filtered or unexported fields
}
OptionMenuClass: instance of this type is always passed by reference.
type OptionMenuItem ¶
type OptionMenuItem struct {
// contains filtered or unexported fields
}
OptionMenuItem: one item of a KitOptionMenu.
The KitOptionMenu is composed of WebKitOptionMenuItem<!-- -->s. A WebKitOptionMenuItem always has a label and can contain a tooltip text. You can use the WebKitOptionMenuItem of a KitOptionMenu to build your own menus.
An instance of this type is always passed by reference.
func (*OptionMenuItem) Copy ¶
func (item *OptionMenuItem) Copy() *OptionMenuItem
Copy: make a copy of the KitOptionMenuItem.
The function returns the following values:
- optionMenuItem: copy of passed in KitOptionMenuItem.
func (*OptionMenuItem) IsEnabled ¶
func (item *OptionMenuItem) IsEnabled() bool
IsEnabled: whether a KitOptionMenuItem is enabled.
The function returns the following values:
- ok: TRUE if the item is enabled or FALSE otherwise.
func (*OptionMenuItem) IsGroupChild ¶
func (item *OptionMenuItem) IsGroupChild() bool
IsGroupChild: whether a KitOptionMenuItem is a group child.
The function returns the following values:
- ok: TRUE if the item is a group child or FALSE otherwise.
func (*OptionMenuItem) IsGroupLabel ¶
func (item *OptionMenuItem) IsGroupLabel() bool
IsGroupLabel: whether a KitOptionMenuItem is a group label.
The function returns the following values:
- ok: TRUE if the item is a group label or FALSE otherwise.
func (*OptionMenuItem) IsSelected ¶
func (item *OptionMenuItem) IsSelected() bool
IsSelected: whether a KitOptionMenuItem is the currently selected one.
The function returns the following values:
- ok: TRUE if the item is selected or FALSE otherwise.
func (*OptionMenuItem) Label ¶
func (item *OptionMenuItem) Label() string
Label: get the label of a KitOptionMenuItem.
The function returns the following values:
- utf8: label of item.
func (*OptionMenuItem) Tooltip ¶
func (item *OptionMenuItem) Tooltip() string
Tooltip: get the tooltip of a KitOptionMenuItem.
The function returns the following values:
- utf8: tooltip of item, or NULL.
type OptionMenuOverrides ¶
type OptionMenuOverrides struct { }
OptionMenuOverrides contains methods that are overridable.
type PermissionRequest ¶
PermissionRequest: permission request.
There are situations where an embedder would need to ask the user for permission to do certain types of operations, such as switching to fullscreen mode or reporting the user's location through the standard Geolocation API. In those cases, WebKit will emit a KitWebView::permission-request signal with a KitPermissionRequest object attached to it.
PermissionRequest wraps an interface. This means the user can get the underlying type by calling Cast().
func (*PermissionRequest) Allow ¶
func (request *PermissionRequest) Allow()
Allow the action which triggered this request.
func (*PermissionRequest) Deny ¶
func (request *PermissionRequest) Deny()
Deny the action which triggered this request.
type PermissionRequestInterface ¶
type PermissionRequestInterface struct {
// contains filtered or unexported fields
}
PermissionRequestInterface: instance of this type is always passed by reference.
type PermissionRequester ¶
type PermissionRequester interface { coreglib.Objector // Allow the action which triggered this request. Allow() // Deny the action which triggered this request. Deny() }
PermissionRequester describes PermissionRequest's interface methods.
type PermissionState ¶
PermissionState: enum values representing query permission results.
const ( // PermissionStateGranted access to the feature is granted. PermissionStateGranted PermissionState = iota // PermissionStateDenied access to the feature is denied. PermissionStateDenied // PermissionStatePrompt access to the feature has to be requested via user // prompt. PermissionStatePrompt )
func (PermissionState) String ¶
func (p PermissionState) String() string
String returns the name in string for PermissionState.
type PermissionStateQuery ¶
type PermissionStateQuery struct {
// contains filtered or unexported fields
}
PermissionStateQuery: this query represents a user's choice to allow or deny access to "powerful features" of the platform, as specified in the [Permissions W3C Specification](https://w3c.github.io/permissions/).
When signalled by the KitWebView through the query-permission-state signal, the application has to eventually respond, via webkit_permission_state_query_finish(), whether it grants, denies or requests a dedicated permission prompt for the given query.
When a KitPermissionStateQuery is not handled by the user, the user-agent is instructed to prompt the user for the given permission.
An instance of this type is always passed by reference.
func (*PermissionStateQuery) Finish ¶
func (query *PermissionStateQuery) Finish(state PermissionState)
Finish: notify the web-engine of the selected permission state for the given query. This function should only be called as a response to the WebKitWebView::query-permission-state signal.
The function takes the following parameters:
- state: KitPermissionState.
func (*PermissionStateQuery) Name ¶
func (query *PermissionStateQuery) Name() string
Name: get the permission name for which access is being queried.
The function returns the following values:
- utf8: permission name for query.
func (*PermissionStateQuery) SecurityOrigin ¶
func (query *PermissionStateQuery) SecurityOrigin() *SecurityOrigin
SecurityOrigin: get the permission origin for which access is being queried.
The function returns the following values:
- securityOrigin representing the origin from which the query was emitted.
type PointerLockPermissionRequest ¶
type PointerLockPermissionRequest struct { *coreglib.Object PermissionRequest // contains filtered or unexported fields }
PointerLockPermissionRequest: permission request for locking the pointer.
WebKitPointerLockPermissionRequest represents a request for permission to decide whether WebKit can lock the pointer device when requested by web content.
When a WebKitPointerLockPermissionRequest is not handled by the user, it is allowed by default.
type PointerLockPermissionRequestClass ¶
type PointerLockPermissionRequestClass struct {
// contains filtered or unexported fields
}
PointerLockPermissionRequestClass: instance of this type is always passed by reference.
type PointerLockPermissionRequestOverrides ¶
type PointerLockPermissionRequestOverrides struct { }
PointerLockPermissionRequestOverrides contains methods that are overridable.
type PolicyDecision ¶
PolicyDecision: pending policy decision.
Often WebKit allows the client to decide the policy for certain operations. For instance, a client may want to open a link in a new tab, block a navigation entirely, query the user or trigger a download instead of a navigation. In these cases WebKit will fire the KitWebView::decide-policy signal with a KitPolicyDecision object. If the signal handler does nothing, WebKit will act as if webkit_policy_decision_use() was called as soon as signal handling completes. To make a policy decision asynchronously, simply increment the reference count of the KitPolicyDecision object.
func BasePolicyDecision ¶
func BasePolicyDecision(obj PolicyDecisioner) *PolicyDecision
BasePolicyDecision returns the underlying base object.
func (*PolicyDecision) Download ¶
func (decision *PolicyDecision) Download()
Download: spawn a download from this decision.
func (*PolicyDecision) Ignore ¶
func (decision *PolicyDecision) Ignore()
Ignore this would cancel the request.
Ignore the action which triggered this decision. For instance, for a KitResponsePolicyDecision, this would cancel the request.
func (*PolicyDecision) Use ¶
func (decision *PolicyDecision) Use()
Use: accept the action which triggered this decision.
func (*PolicyDecision) UseWithPolicies ¶
func (decision *PolicyDecision) UseWithPolicies(policies *WebsitePolicies)
UseWithPolicies: accept the navigation action and continue with provided policies.
Accept the navigation action which triggered this decision, and continue with policies affecting all subsequent loads of resources in the origin associated with the accepted navigation action.
For example, a navigation decision to a video sharing website may be accepted under the priviso no movies are allowed to autoplay. The autoplay policy in this case would be set in the policies.
The function takes the following parameters:
- policies: KitWebsitePolicies.
type PolicyDecisionClass ¶
type PolicyDecisionClass struct {
// contains filtered or unexported fields
}
PolicyDecisionClass: instance of this type is always passed by reference.
type PolicyDecisionOverrides ¶
type PolicyDecisionOverrides struct { }
PolicyDecisionOverrides contains methods that are overridable.
type PolicyDecisionType ¶
PolicyDecisionType: enum values used for determining the type of a policy decision during KitWebView::decide-policy.
const ( // requested when WebKit is about to navigate to a new page in either // the main frame or a subframe. Acceptable policy decisions are either // webkit_policy_decision_use() or webkit_policy_decision_ignore(). This // type of policy decision is always a KitNavigationPolicyDecision. PolicyDecisionTypeNavigationAction PolicyDecisionType = iota // PolicyDecisionTypeNewWindowAction: this type of policy decision // is requested when WebKit is about to create a new window. // Acceptable policy decisions are either webkit_policy_decision_use() or // webkit_policy_decision_ignore(). This type of policy decision is always a // KitNavigationPolicyDecision. These decisions are useful for implementing // special actions for new windows, such as forcing the new window to open // in a tab when a keyboard modifier is active or handling a special target // attribute on <a> elements. PolicyDecisionTypeNewWindowAction // PolicyDecisionTypeResponse: this type of decision is used when WebKit // has received a response for a network resource and is about to start // the load. Note that these resources include all subresources of a page // such as images and stylesheets as well as main documents. Appropriate // policy responses to this decision are webkit_policy_decision_use(), // webkit_policy_decision_ignore(), or webkit_policy_decision_download(). // This type of policy decision is always a KitResponsePolicyDecision. This // decision is useful for forcing some types of resources to be downloaded // rather than rendered in the WebView or to block the transfer of resources // entirely. PolicyDecisionTypeResponse )
func (PolicyDecisionType) String ¶
func (p PolicyDecisionType) String() string
String returns the name in string for PolicyDecisionType.
type PolicyDecisioner ¶
PolicyDecisioner describes types inherited from class PolicyDecision.
To get the original type, the caller must assert this to an interface or another type.
type PolicyError ¶
PolicyError: enum values used to denote the various policy errors.
const ( // PolicyErrorFailed: generic load failure due to policy error. PolicyErrorFailed PolicyError = 199 // PolicyErrorCannotShowMIMEType: load failure due to unsupported mime type. PolicyErrorCannotShowMIMEType PolicyError = 100 // PolicyErrorCannotShowURI: load failure due to URI that can not be shown. PolicyErrorCannotShowURI PolicyError = 101 // PolicyErrorFrameLoadInterruptedByPolicyChange: load failure due to frame // load interruption by policy change. PolicyErrorFrameLoadInterruptedByPolicyChange PolicyError = 102 // PolicyErrorCannotUseRestrictedPort: load failure due to port restriction. PolicyErrorCannotUseRestrictedPort PolicyError = 103 )
func (PolicyError) String ¶
func (p PolicyError) String() string
String returns the name in string for PolicyError.
type PrintError ¶
PrintError: enum values used to denote the various print errors.
const ( // PrintErrorGeneral: unspecified error during a print operation. PrintErrorGeneral PrintError = 599 // PrintErrorPrinterNotFound: selected printer cannot be found. PrintErrorPrinterNotFound PrintError = 500 // PrintErrorInvalidPageRange: invalid page range. PrintErrorInvalidPageRange PrintError = 501 )
func (PrintError) String ¶
func (p PrintError) String() string
String returns the name in string for PrintError.
type PrintOperation ¶
PrintOperation controls a print operation.
A KitPrintOperation controls a print operation in WebKit. With a similar API to PrintOperation, it lets you set the print settings with webkit_print_operation_set_print_settings() or display the print dialog with webkit_print_operation_run_dialog().
func NewPrintOperation ¶
func NewPrintOperation(webView *WebView) *PrintOperation
NewPrintOperation: create a new KitPrintOperation to print web_view contents.
The function takes the following parameters:
- webView: KitWebView.
The function returns the following values:
- printOperation: new KitPrintOperation.
func (*PrintOperation) ConnectFailed ¶
func (printOperation *PrintOperation) ConnectFailed(f func(err error)) coreglib.SignalHandle
ConnectFailed is emitted when an error occurs while printing. The given error, of the domain WEBKIT_PRINT_ERROR, contains further details of the failure. The KitPrintOperation::finished signal is emitted after this one.
func (*PrintOperation) ConnectFinished ¶
func (printOperation *PrintOperation) ConnectFinished(f func()) coreglib.SignalHandle
ConnectFinished is emitted when the print operation has finished doing everything required for printing.
func (*PrintOperation) PageSetup ¶
func (printOperation *PrintOperation) PageSetup() *gtk.PageSetup
PageSetup: return the current page setup of print_operation.
It returns NULL until either webkit_print_operation_set_page_setup() or webkit_print_operation_run_dialog() have been called.
The function returns the following values:
- pageSetup: current PageSetup of print_operation.
func (*PrintOperation) Print ¶
func (printOperation *PrintOperation) Print()
Print: start a print operation using current print settings and page setup.
Start a print operation using current print settings and page setup without showing the print dialog. If either print settings or page setup are not set with webkit_print_operation_set_print_settings() and webkit_print_operation_set_page_setup(), the default options will be used and the print job will be sent to the default printer. The KitPrintOperation::finished signal is emitted when the printing operation finishes. If an error occurs while printing the signal KitPrintOperation::failed is emitted before KitPrintOperation::finished.
func (*PrintOperation) PrintSettings ¶
func (printOperation *PrintOperation) PrintSettings() *gtk.PrintSettings
PrintSettings: return the current print settings of print_operation.
It returns NULL until either webkit_print_operation_set_print_settings() or webkit_print_operation_run_dialog() have been called.
The function returns the following values:
- printSettings: current PrintSettings of print_operation.
func (*PrintOperation) RunDialog ¶
func (printOperation *PrintOperation) RunDialog(parent *gtk.Window) PrintOperationResponse
RunDialog: run the print dialog and start printing.
Run the print dialog and start printing using the options selected by the user. This method returns when the print dialog is closed. If the print dialog is cancelled WEBKIT_PRINT_OPERATION_RESPONSE_CANCEL is returned. If the user clicks on the print button, WEBKIT_PRINT_OPERATION_RESPONSE_PRINT is returned and the print operation starts. In this case, the KitPrintOperation::finished signal is emitted when the operation finishes. If an error occurs while printing, the signal KitPrintOperation::failed is emitted before KitPrintOperation::finished. If the print dialog is not cancelled current print settings and page setup of print_operation are updated with options selected by the user when Print button is pressed in print dialog. You can get the updated print settings and page setup by calling webkit_print_operation_get_print_settings() and webkit_print_operation_get_page_setup() after this method.
The function takes the following parameters:
- parent (optional): transient parent of the print dialog.
The function returns the following values:
- printOperationResponse of the print dialog.
func (*PrintOperation) SetPageSetup ¶
func (printOperation *PrintOperation) SetPageSetup(pageSetup *gtk.PageSetup)
SetPageSetup: set the current page setup of print_operation.
Current page setup is used for the initial values of the print dialog when webkit_print_operation_run_dialog() is called.
The function takes the following parameters:
- pageSetup to set.
func (*PrintOperation) SetPrintSettings ¶
func (printOperation *PrintOperation) SetPrintSettings(printSettings *gtk.PrintSettings)
SetPrintSettings: set the current print settings of print_operation.
Set the current print settings of print_operation. Current print settings are used for the initial values of the print dialog when webkit_print_operation_run_dialog() is called.
The function takes the following parameters:
- printSettings to set.
type PrintOperationClass ¶
type PrintOperationClass struct {
// contains filtered or unexported fields
}
PrintOperationClass: instance of this type is always passed by reference.
type PrintOperationOverrides ¶
type PrintOperationOverrides struct { }
PrintOperationOverrides contains methods that are overridable.
type PrintOperationResponse ¶
PrintOperationResponse: enum values representing the response of the print dialog shown with webkit_print_operation_run_dialog().
const ( // PrintOperationResponsePrint: print button was clicked in print dialog. PrintOperationResponsePrint PrintOperationResponse = iota // PrintOperationResponseCancel: print dialog was cancelled. PrintOperationResponseCancel )
func (PrintOperationResponse) String ¶
func (p PrintOperationResponse) String() string
String returns the name in string for PrintOperationResponse.
type ResponsePolicyDecision ¶
type ResponsePolicyDecision struct { PolicyDecision // contains filtered or unexported fields }
ResponsePolicyDecision: policy decision for resource responses.
WebKitResponsePolicyDecision represents a policy decision for a resource response, whether from the network or the local system. A very common use case for these types of decision is deciding whether or not to download a particular resource or to load it normally.
func (*ResponsePolicyDecision) IsMIMETypeSupported ¶
func (decision *ResponsePolicyDecision) IsMIMETypeSupported() bool
IsMIMETypeSupported gets whether the MIME type of the response can be displayed in the KitWebView.
Gets whether the MIME type of the response can be displayed in the KitWebView that triggered this policy decision request. See also webkit_web_view_can_show_mime_type().
The function returns the following values:
- ok: TRUE if the MIME type of the response is supported or FALSE otherwise.
func (*ResponsePolicyDecision) IsMainFrameMainResource ¶
func (decision *ResponsePolicyDecision) IsMainFrameMainResource() bool
IsMainFrameMainResource gets whether the request is the main frame main resource.
The function returns the following values:
- ok: TRUE if the request is the main frame main resouce or FALSE otherwise.
func (*ResponsePolicyDecision) Request ¶
func (decision *ResponsePolicyDecision) Request() *URIRequest
Request: return the KitURIRequest associated with the response decision.
Modifications to the returned object are <emphasis>not</emphasis> taken into account when the request is sent over the network, and is intended only to aid in evaluating whether a response decision should be taken or not. To modify requests before they are sent over the network the KitPage::send-request signal can be used instead.
The function returns the following values:
- uriRequest: URI request that is associated with this policy decision.
func (*ResponsePolicyDecision) Response ¶
func (decision *ResponsePolicyDecision) Response() *URIResponse
Response gets the value of the KitResponsePolicyDecision:response property.
The function returns the following values:
- uriResponse: URI response that is associated with this policy decision.
type ResponsePolicyDecisionClass ¶
type ResponsePolicyDecisionClass struct {
// contains filtered or unexported fields
}
ResponsePolicyDecisionClass: instance of this type is always passed by reference.
func (*ResponsePolicyDecisionClass) ParentClass ¶
func (r *ResponsePolicyDecisionClass) ParentClass() *PolicyDecisionClass
type ResponsePolicyDecisionOverrides ¶
type ResponsePolicyDecisionOverrides struct { }
ResponsePolicyDecisionOverrides contains methods that are overridable.
type SaveMode ¶
SaveMode: enum values to specify the different ways in which a KitWebView can save its current web page into a self-contained file.
type ScriptDialog ¶
type ScriptDialog struct {
// contains filtered or unexported fields
}
ScriptDialog carries details to be shown in user-facing dialogs.
An instance of this type is always passed by reference.
func (*ScriptDialog) Close ¶
func (dialog *ScriptDialog) Close()
Close dialog.
When handling a KitScriptDialog asynchronously (webkit_script_dialog_ref() was called in KitWebView::script-dialog callback), this function needs to be called to notify that we are done with the script dialog. The dialog will be closed on destruction if this function hasn't been called before.
func (*ScriptDialog) ConfirmSetConfirmed ¶
func (dialog *ScriptDialog) ConfirmSetConfirmed(confirmed bool)
ConfirmSetConfirmed: set whether the user confirmed the dialog.
This method is used for WEBKIT_SCRIPT_DIALOG_CONFIRM and WEBKIT_SCRIPT_DIALOG_BEFORE_UNLOAD_CONFIRM dialogs when KitWebView::script-dialog signal is emitted to set whether the user confirmed the dialog or not. The default implementation of KitWebView::script-dialog signal sets TRUE when the OK or Stay buttons are clicked and FALSE otherwise. It's an error to use this method with a KitScriptDialog that is not of type WEBKIT_SCRIPT_DIALOG_CONFIRM or WEBKIT_SCRIPT_DIALOG_BEFORE_UNLOAD_CONFIRM.
The function takes the following parameters:
- confirmed: whether user confirmed the dialog.
func (*ScriptDialog) DialogType ¶
func (dialog *ScriptDialog) DialogType() ScriptDialogType
DialogType: get the dialog type of a KitScriptDialog.
The function returns the following values:
- scriptDialogType of dialog.
func (*ScriptDialog) Message ¶
func (dialog *ScriptDialog) Message() string
Message: get the message of a KitScriptDialog.
The function returns the following values:
- utf8: message of dialog.
func (*ScriptDialog) PromptGetDefaultText ¶
func (dialog *ScriptDialog) PromptGetDefaultText() string
PromptGetDefaultText: get the default text of a KitScriptDialog of type WEBKIT_SCRIPT_DIALOG_PROMPT.
It's an error to use this method with a KitScriptDialog that is not of type WEBKIT_SCRIPT_DIALOG_PROMPT.
The function returns the following values:
- utf8: default text of dialog.
func (*ScriptDialog) PromptSetText ¶
func (dialog *ScriptDialog) PromptSetText(text string)
PromptSetText: set the text entered by the user in the dialog.
This method is used for WEBKIT_SCRIPT_DIALOG_PROMPT dialogs when KitWebView::script-dialog signal is emitted to set the text entered by the user. The default implementation of KitWebView::script-dialog signal sets the text of the entry form when OK button is clicked, otherwise NULL is set. It's an error to use this method with a KitScriptDialog that is not of type WEBKIT_SCRIPT_DIALOG_PROMPT.
The function takes the following parameters:
- text to set.
type ScriptDialogType ¶
ScriptDialogType: enum values used for determining the type of KitScriptDialog.
const ( // ScriptDialogAlert: alert script dialog, used to show a message to the // user. ScriptDialogAlert ScriptDialogType = iota // ScriptDialogConfirm: confirm script dialog, used to ask confirmation to // the user. ScriptDialogConfirm // ScriptDialogPrompt: prompt script dialog, used to ask information to the // user. ScriptDialogPrompt // ScriptDialogBeforeUnloadConfirm: before unload confirm dialog, used to // ask confirmation to leave the current page to the user. Since 2.12. ScriptDialogBeforeUnloadConfirm )
func (ScriptDialogType) String ¶
func (s ScriptDialogType) String() string
String returns the name in string for ScriptDialogType.
type ScriptMessageReply ¶
type ScriptMessageReply struct {
// contains filtered or unexported fields
}
ScriptMessageReply: reply for a script message received. If no reply has been sent by the user, an automatically generated reply with undefined value with be sent.
An instance of this type is always passed by reference.
func (*ScriptMessageReply) ReturnErrorMessage ¶
func (scriptMessageReply *ScriptMessageReply) ReturnErrorMessage(errorMessage string)
ReturnErrorMessage: reply to a script message with an error message.
The function takes the following parameters:
- errorMessage: error message to return as specified by the user's script message.
func (*ScriptMessageReply) ReturnValue ¶
func (scriptMessageReply *ScriptMessageReply) ReturnValue(replyValue *javascriptcore.Value)
ReturnValue: reply to a script message with a value.
This function can be called twice for passing the reply value in.
The function takes the following parameters:
- replyValue: reply value of the provided script message.
type SecurityManager ¶
SecurityManager controls security settings in a KitWebContext.
The KitSecurityManager defines security settings for URI schemes in a KitWebContext. Get it from the context with webkit_web_context_get_security_manager(), and use it to register a URI scheme with a certain security level, or to check if it already has it.
func (*SecurityManager) RegisterURISchemeAsCorsEnabled ¶
func (securityManager *SecurityManager) RegisterURISchemeAsCorsEnabled(scheme string)
RegisterURISchemeAsCorsEnabled: register scheme as a CORS (Cross-origin resource sharing) enabled scheme.
This means that CORS requests are allowed. See W3C CORS specification http://www.w3.org/TR/cors/.
The function takes the following parameters:
- scheme: URI scheme.
func (*SecurityManager) RegisterURISchemeAsDisplayIsolated ¶
func (securityManager *SecurityManager) RegisterURISchemeAsDisplayIsolated(scheme string)
RegisterURISchemeAsDisplayIsolated: register scheme as a display isolated scheme.
This means that pages cannot display these URIs unless they are from the same scheme.
The function takes the following parameters:
- scheme: URI scheme.
func (*SecurityManager) RegisterURISchemeAsEmptyDocument ¶
func (securityManager *SecurityManager) RegisterURISchemeAsEmptyDocument(scheme string)
RegisterURISchemeAsEmptyDocument: register scheme as an empty document scheme.
This means that they are allowed to commit synchronously.
The function takes the following parameters:
- scheme: URI scheme.
func (*SecurityManager) RegisterURISchemeAsLocal ¶
func (securityManager *SecurityManager) RegisterURISchemeAsLocal(scheme string)
RegisterURISchemeAsLocal: register scheme as a local scheme.
This means that other non-local pages cannot link to or access URIs of this scheme.
The function takes the following parameters:
- scheme: URI scheme.
func (*SecurityManager) RegisterURISchemeAsNoAccess ¶
func (securityManager *SecurityManager) RegisterURISchemeAsNoAccess(scheme string)
RegisterURISchemeAsNoAccess: register scheme as a no-access scheme.
This means that pages loaded with this URI scheme cannot access pages loaded with any other URI scheme.
The function takes the following parameters:
- scheme: URI scheme.
func (*SecurityManager) RegisterURISchemeAsSecure ¶
func (securityManager *SecurityManager) RegisterURISchemeAsSecure(scheme string)
RegisterURISchemeAsSecure: register scheme as a secure scheme.
This means that mixed content warnings won't be generated for this scheme when included by an HTTPS page.
The function takes the following parameters:
- scheme: URI scheme.
func (*SecurityManager) URISchemeIsCorsEnabled ¶
func (securityManager *SecurityManager) URISchemeIsCorsEnabled(scheme string) bool
URISchemeIsCorsEnabled: whether scheme is considered as a CORS enabled scheme.
See also webkit_security_manager_register_uri_scheme_as_cors_enabled().
The function takes the following parameters:
- scheme: URI scheme.
The function returns the following values:
- ok: TRUE if scheme is a CORS enabled scheme or FALSE otherwise.
func (*SecurityManager) URISchemeIsDisplayIsolated ¶
func (securityManager *SecurityManager) URISchemeIsDisplayIsolated(scheme string) bool
URISchemeIsDisplayIsolated: whether scheme is considered as a display isolated scheme.
See also webkit_security_manager_register_uri_scheme_as_display_isolated().
The function takes the following parameters:
- scheme: URI scheme.
The function returns the following values:
- ok: TRUE if scheme is a display isolated scheme or FALSE otherwise.
func (*SecurityManager) URISchemeIsEmptyDocument ¶
func (securityManager *SecurityManager) URISchemeIsEmptyDocument(scheme string) bool
URISchemeIsEmptyDocument: whether scheme is considered as an empty document scheme.
See also webkit_security_manager_register_uri_scheme_as_empty_document().
The function takes the following parameters:
- scheme: URI scheme.
The function returns the following values:
- ok: TRUE if scheme is an empty document scheme or FALSE otherwise.
func (*SecurityManager) URISchemeIsLocal ¶
func (securityManager *SecurityManager) URISchemeIsLocal(scheme string) bool
URISchemeIsLocal: whether scheme is considered as a local scheme.
See also webkit_security_manager_register_uri_scheme_as_local().
The function takes the following parameters:
- scheme: URI scheme.
The function returns the following values:
- ok: TRUE if scheme is a local scheme or FALSE otherwise.
func (*SecurityManager) URISchemeIsNoAccess ¶
func (securityManager *SecurityManager) URISchemeIsNoAccess(scheme string) bool
URISchemeIsNoAccess: whether scheme is considered as a no-access scheme.
See also webkit_security_manager_register_uri_scheme_as_no_access().
The function takes the following parameters:
- scheme: URI scheme.
The function returns the following values:
- ok: TRUE if scheme is a no-access scheme or FALSE otherwise.
func (*SecurityManager) URISchemeIsSecure ¶
func (securityManager *SecurityManager) URISchemeIsSecure(scheme string) bool
URISchemeIsSecure: whether scheme is considered as a secure scheme.
See also webkit_security_manager_register_uri_scheme_as_secure().
The function takes the following parameters:
- scheme: URI scheme.
The function returns the following values:
- ok: TRUE if scheme is a secure scheme or FALSE otherwise.
type SecurityManagerClass ¶
type SecurityManagerClass struct {
// contains filtered or unexported fields
}
SecurityManagerClass: instance of this type is always passed by reference.
type SecurityManagerOverrides ¶
type SecurityManagerOverrides struct { }
SecurityManagerOverrides contains methods that are overridable.
type SecurityOrigin ¶
type SecurityOrigin struct {
// contains filtered or unexported fields
}
SecurityOrigin: security boundary for websites.
KitSecurityOrigin is a representation of a security domain defined by websites. A security origin consists of a protocol, a hostname, and an optional port number.
Resources with the same security origin can generally access each other for client-side scripting or database access. When comparing origins, beware that if both protocol and host are NULL, the origins should not be treated as equal.
An instance of this type is always passed by reference.
func NewSecurityOrigin ¶
func NewSecurityOrigin(protocol string, host string, port uint16) *SecurityOrigin
NewSecurityOrigin constructs a struct SecurityOrigin.
func NewSecurityOriginForURI ¶
func NewSecurityOriginForURI(uri string) *SecurityOrigin
NewSecurityOriginForURI constructs a struct SecurityOrigin.
func (*SecurityOrigin) Host ¶
func (origin *SecurityOrigin) Host() string
Host gets the hostname of origin.
It is reasonable for this to be NULL if its protocol does not require a host component.
The function returns the following values:
- utf8 (optional): host of the KitSecurityOrigin.
func (*SecurityOrigin) Port ¶
func (origin *SecurityOrigin) Port() uint16
Port gets the port of origin.
This function will always return 0 if the port is the default port for the given protocol. For example, http://example.com has the same security origin as http://example.com:80, and this function will return 0 for a KitSecurityOrigin constructed from either URI.
The function returns the following values:
- guint16: port of the KitSecurityOrigin.
func (*SecurityOrigin) Protocol ¶
func (origin *SecurityOrigin) Protocol() string
Protocol gets the protocol of origin.
The function returns the following values:
- utf8 (optional): protocol of the KitSecurityOrigin.
func (*SecurityOrigin) String ¶
func (origin *SecurityOrigin) String() string
String gets a string representation of origin.
The string representation is a valid URI with only protocol, host, and port components, or NULL.
The function returns the following values:
- utf8 (optional): URI representing origin.
type Settings ¶
Settings: control the behaviour of a KitWebView.
KitSettings can be applied to a KitWebView to control text charset, color, font sizes, printing mode, script support, loading of images and various other things on a KitWebView. After creation, a KitSettings object contains default settings.
// Disable JavaScript WebKitSettings *settings = webkit_web_view_group_get_settings (my_view_group); webkit_settings_set_enable_javascript (settings, FALSE);.
func NewSettings ¶
func NewSettings() *Settings
NewSettings creates a new KitSettings instance with default values.
It must be manually attached to a KitWebView. See also webkit_settings_new_with_settings().
The function returns the following values:
- settings: new KitSettings instance.
func (*Settings) AllowFileAccessFromFileUrls ¶
AllowFileAccessFromFileUrls: get the KitSettings:allow-file-access-from-file-urls property.
The function returns the following values:
- ok: TRUE If file access from file URLs is allowed or FALSE otherwise.
func (*Settings) AllowModalDialogs ¶
AllowModalDialogs: get the KitSettings:allow-modal-dialogs property.
The function returns the following values:
- ok: TRUE if it's allowed to create and run modal dialogs or FALSE otherwise.
func (*Settings) AllowTopNavigationToDataUrls ¶
AllowTopNavigationToDataUrls: get the KitSettings:allow-top-navigation-to-data-urls property.
The function returns the following values:
- ok: TRUE If navigation to data URLs from the top frame is allowed or FALSE\ otherwise.
func (*Settings) AllowUniversalAccessFromFileUrls ¶
AllowUniversalAccessFromFileUrls: get the KitSettings:allow-universal-access-from-file-urls property.
The function returns the following values:
- ok: TRUE If universal access from file URLs is allowed or FALSE otherwise.
func (*Settings) AutoLoadImages ¶
AutoLoadImages: get the KitSettings:auto-load-images property.
The function returns the following values:
- ok: TRUE If auto loading of images is enabled or FALSE otherwise.
func (*Settings) CursiveFontFamily ¶
CursiveFontFamily gets the KitSettings:cursive-font-family property.
The function returns the following values:
- utf8: default font family used to display content marked with cursive font.
func (*Settings) DefaultCharset ¶
DefaultCharset gets the KitSettings:default-charset property.
The function returns the following values:
- utf8: default charset.
func (*Settings) DefaultFontFamily ¶
DefaultFontFamily gets the KitSettings:default-font-family property.
The function returns the following values:
- utf8: default font family used to display content that does not specify a font.
func (*Settings) DefaultFontSize ¶
DefaultFontSize gets the KitSettings:default-font-size property.
The function returns the following values:
- guint32: default font size, in pixels.
func (*Settings) DefaultMonospaceFontSize ¶
DefaultMonospaceFontSize gets the KitSettings:default-monospace-font-size property.
The function returns the following values:
- guint32: default monospace font size, in pixels.
func (*Settings) DisableWebSecurity ¶
DisableWebSecurity: get the KitSettings:disable-web-security property.
The function returns the following values:
- ok: TRUE If web security support is disabled or FALSE otherwise.
func (*Settings) DrawCompositingIndicators ¶
DrawCompositingIndicators: get the KitSettings:draw-compositing-indicators property.
The function returns the following values:
- ok: TRUE If compositing borders are drawn or FALSE otherwise.
func (*Settings) EnableBackForwardNavigationGestures ¶
EnableBackForwardNavigationGestures: get the KitSettings:enable-back-forward-navigation-gestures property.
The function returns the following values:
- ok: TRUE if horizontal swipe gesture will trigger back-forward navigaiton or FALSE otherwise.
func (*Settings) EnableCaretBrowsing ¶
EnableCaretBrowsing: get the KitSettings:enable-caret-browsing property.
The function returns the following values:
- ok: TRUE If caret browsing is enabled or FALSE otherwise.
func (*Settings) EnableDeveloperExtras ¶
EnableDeveloperExtras: get the KitSettings:enable-developer-extras property.
The function returns the following values:
- ok: TRUE If developer extras is enabled or FALSE otherwise.
func (*Settings) EnableDnsPrefetching ¶
EnableDnsPrefetching: get the KitSettings:enable-dns-prefetching property.
The function returns the following values:
- ok: TRUE If DNS prefetching is enabled or FALSE otherwise.
func (*Settings) EnableEncryptedMedia ¶
EnableEncryptedMedia: get the KitSettings:enable-encrypted-media property.
The function returns the following values:
- ok: TRUE if EncryptedMedia support is enabled or FALSE otherwise.
func (*Settings) EnableFullscreen ¶
EnableFullscreen: get the KitSettings:enable-fullscreen property.
The function returns the following values:
- ok: TRUE If fullscreen support is enabled or FALSE otherwise.
func (*Settings) EnableHtml5Database ¶
EnableHtml5Database: get the KitSettings:enable-html5-database property.
The function returns the following values:
- ok: TRUE if IndexedDB support is enabled or FALSE otherwise.
func (*Settings) EnableHtml5LocalStorage ¶
EnableHtml5LocalStorage: get the KitSettings:enable-html5-local-storage property.
The function returns the following values:
- ok: TRUE If HTML5 local storage support is enabled or FALSE otherwise.
func (*Settings) EnableHyperlinkAuditing ¶
EnableHyperlinkAuditing: get the KitSettings:enable-hyperlink-auditing property.
The function returns the following values:
- ok: TRUE If hyper link auditing is enabled or FALSE otherwise.
func (*Settings) EnableJavascript ¶
EnableJavascript: get the KitSettings:enable-javascript property.
The function returns the following values:
- ok: TRUE If JavaScript is enabled or FALSE otherwise.
func (*Settings) EnableJavascriptMarkup ¶
EnableJavascriptMarkup: get the KitSettings:enable-javascript-markup property.
The function returns the following values:
- ok: TRUE if JavaScript markup is enabled or FALSE otherwise.
func (*Settings) EnableMedia ¶
EnableMedia: get the KitSettings:enable-media property.
The function returns the following values:
- ok: TRUE if media support is enabled or FALSE otherwise.
func (*Settings) EnableMediaCapabilities ¶
EnableMediaCapabilities: get the KitSettings:enable-media-capabilities property.
The function returns the following values:
- ok: TRUE if MediaCapabilities support is enabled or FALSE otherwise.
func (*Settings) EnableMediaStream ¶
EnableMediaStream: get the KitSettings:enable-media-stream property.
The function returns the following values:
- ok: TRUE If mediastream support is enabled or FALSE otherwise.
func (*Settings) EnableMediasource ¶
EnableMediasource: get the KitSettings:enable-mediasource property.
The function returns the following values:
- ok: TRUE If MediaSource support is enabled or FALSE otherwise.
func (*Settings) EnableMockCaptureDevices ¶
EnableMockCaptureDevices: get the KitSettings:enable-mock-capture-devices property.
The function returns the following values:
- ok: TRUE If mock capture devices is enabled or FALSE otherwise.
func (*Settings) EnableOfflineWebApplicationCache ¶
EnableOfflineWebApplicationCache: get the KitSettings:enable-offline-web-application-cache property.
The function returns the following values:
- ok: TRUE If HTML5 offline web application cache support is enabled or FALSE otherwise.
func (*Settings) EnablePageCache ¶
EnablePageCache: get the KitSettings:enable-page-cache property.
The function returns the following values:
- ok: TRUE if page cache enabled or FALSE otherwise.
func (*Settings) EnableResizableTextAreas ¶
EnableResizableTextAreas: get the KitSettings:enable-resizable-text-areas property.
The function returns the following values:
- ok: TRUE If text areas can be resized or FALSE otherwise.
func (*Settings) EnableSiteSpecificQuirks ¶
EnableSiteSpecificQuirks: get the KitSettings:enable-site-specific-quirks property.
The function returns the following values:
- ok: TRUE if site specific quirks are enabled or FALSE otherwise.
func (*Settings) EnableSmoothScrolling ¶
EnableSmoothScrolling: get the KitSettings:enable-smooth-scrolling property.
The function returns the following values:
- ok: TRUE if smooth scrolling is enabled or FALSE otherwise.
func (*Settings) EnableSpatialNavigation ¶
EnableSpatialNavigation: get the KitSettings:enable-spatial-navigation property.
The function returns the following values:
- ok: TRUE If HTML5 spatial navigation support is enabled or FALSE otherwise.
func (*Settings) EnableTabsToLinks ¶
EnableTabsToLinks: get the KitSettings:enable-tabs-to-links property.
The function returns the following values:
- ok: TRUE If tabs to link is enabled or FALSE otherwise.
func (*Settings) EnableWebaudio ¶
EnableWebaudio: get the KitSettings:enable-webaudio property.
The function returns the following values:
- ok: TRUE If webaudio support is enabled or FALSE otherwise.
func (*Settings) EnableWebgl ¶
EnableWebgl: get the KitSettings:enable-webgl property.
The function returns the following values:
- ok: TRUE If WebGL support is enabled or FALSE otherwise.
func (*Settings) EnableWebrtc ¶
EnableWebrtc: get the settings:enable-webrtc property.
The function returns the following values:
- ok: TRUE If WebRTC support is enabled or FALSE otherwise.
func (*Settings) EnableWriteConsoleMessagesToStdout ¶
EnableWriteConsoleMessagesToStdout: get the KitSettings:enable-write-console-messages-to-stdout property.
The function returns the following values:
- ok: TRUE if writing console messages to stdout is enabled or FALSE otherwise.
func (*Settings) FantasyFontFamily ¶
FantasyFontFamily gets the KitSettings:fantasy-font-family property.
The function returns the following values:
- utf8: default font family used to display content marked with fantasy font.
func (*Settings) FeatureEnabled ¶
FeatureEnabled gets whether a feature is enabled.
The function takes the following parameters:
- feature to toggle.
The function returns the following values:
- ok: whether the feature is enabled.
func (*Settings) HardwareAccelerationPolicy ¶
func (settings *Settings) HardwareAccelerationPolicy() HardwareAccelerationPolicy
HardwareAccelerationPolicy: get the KitSettings:hardware-acceleration-policy property.
The function returns the following values:
- hardwareAccelerationPolicy: KitHardwareAccelerationPolicy.
func (*Settings) JavascriptCanAccessClipboard ¶
JavascriptCanAccessClipboard: get the KitSettings:javascript-can-access-clipboard property.
The function returns the following values:
- ok: TRUE If javascript-can-access-clipboard is enabled or FALSE otherwise.
func (*Settings) JavascriptCanOpenWindowsAutomatically ¶
JavascriptCanOpenWindowsAutomatically: get the KitSettings:javascript-can-open-windows-automatically property.
The function returns the following values:
- ok: TRUE If JavaScript can open window automatically or FALSE otherwise.
func (*Settings) LoadIconsIgnoringImageLoadSetting
deprecated
func (*Settings) MediaContentTypesRequiringHardwareSupport ¶
MediaContentTypesRequiringHardwareSupport gets the KitSettings:media-content-types-requiring-hardware-support property.
The function returns the following values:
- utf8: media content types requiring hardware support, or NULL.
func (*Settings) MediaPlaybackAllowsInline ¶
MediaPlaybackAllowsInline: get the KitSettings:media-playback-allows-inline property.
The function returns the following values:
- ok: TRUE If inline playback is allowed for media or FALSE if only fullscreen playback is allowed.
func (*Settings) MediaPlaybackRequiresUserGesture ¶
MediaPlaybackRequiresUserGesture: get the KitSettings:media-playback-requires-user-gesture property.
The function returns the following values:
- ok: TRUE If an user gesture is needed to play or load media or FALSE if no user gesture is needed.
func (*Settings) MinimumFontSize ¶
MinimumFontSize gets the KitSettings:minimum-font-size property.
The function returns the following values:
- guint32: minimum font size, in pixels.
func (*Settings) MonospaceFontFamily ¶
MonospaceFontFamily gets the KitSettings:monospace-font-family property.
The function returns the following values:
- utf8: default font family used to display content marked with monospace font.
func (*Settings) PictographFontFamily ¶
PictographFontFamily gets the KitSettings:pictograph-font-family property.
The function returns the following values:
- utf8: default font family used to display content marked with pictograph font.
func (*Settings) PrintBackgrounds ¶
PrintBackgrounds: get the KitSettings:print-backgrounds property.
The function returns the following values:
- ok: TRUE If background images should be printed or FALSE otherwise.
func (*Settings) SansSerifFontFamily ¶
SansSerifFontFamily gets the KitSettings:sans-serif-font-family property.
The function returns the following values:
- utf8: default font family used to display content marked with sans-serif font.
func (*Settings) SerifFontFamily ¶
SerifFontFamily gets the KitSettings:serif-font-family property.
The function returns the following values:
- utf8: default font family used to display content marked with serif font.
func (*Settings) SetAllowFileAccessFromFileUrls ¶
SetAllowFileAccessFromFileUrls: set the KitSettings:allow-file-access-from-file-urls property.
The function takes the following parameters:
- allowed: value to be set.
func (*Settings) SetAllowModalDialogs ¶
SetAllowModalDialogs: set the KitSettings:allow-modal-dialogs property.
The function takes the following parameters:
- allowed: value to be set.
func (*Settings) SetAllowTopNavigationToDataUrls ¶
SetAllowTopNavigationToDataUrls: set the KitSettings:allow-top-navigation-to-data-urls property.
The function takes the following parameters:
- allowed: value to be set.
func (*Settings) SetAllowUniversalAccessFromFileUrls ¶
SetAllowUniversalAccessFromFileUrls: set the KitSettings:allow-universal-access-from-file-urls property.
The function takes the following parameters:
- allowed: value to be set.
func (*Settings) SetAutoLoadImages ¶
SetAutoLoadImages: set the KitSettings:auto-load-images property.
The function takes the following parameters:
- enabled: value to be set.
func (*Settings) SetCursiveFontFamily ¶
SetCursiveFontFamily: set the KitSettings:cursive-font-family property.
The function takes the following parameters:
- cursiveFontFamily: new default cursive font family.
func (*Settings) SetDefaultCharset ¶
SetDefaultCharset: set the KitSettings:default-charset property.
The function takes the following parameters:
- defaultCharset: default charset to be set.
func (*Settings) SetDefaultFontFamily ¶
SetDefaultFontFamily: set the KitSettings:default-font-family property.
The function takes the following parameters:
- defaultFontFamily: new default font family.
func (*Settings) SetDefaultFontSize ¶
SetDefaultFontSize: set the KitSettings:default-font-size property.
The function takes the following parameters:
- fontSize: default font size to be set in pixels.
func (*Settings) SetDefaultMonospaceFontSize ¶
SetDefaultMonospaceFontSize: set the KitSettings:default-monospace-font-size property.
The function takes the following parameters:
- fontSize: default monospace font size to be set in pixels.
func (*Settings) SetDisableWebSecurity ¶
SetDisableWebSecurity: set the KitSettings:disable-web-security property.
The function takes the following parameters:
- disabled: value to be set.
func (*Settings) SetDrawCompositingIndicators ¶
SetDrawCompositingIndicators: set the KitSettings:draw-compositing-indicators property.
The function takes the following parameters:
- enabled: value to be set.
func (*Settings) SetEnableBackForwardNavigationGestures ¶
SetEnableBackForwardNavigationGestures: set the KitSettings:enable-back-forward-navigation-gestures property.
The function takes the following parameters:
- enabled: value to be set.
func (*Settings) SetEnableCaretBrowsing ¶
SetEnableCaretBrowsing: set the KitSettings:enable-caret-browsing property.
The function takes the following parameters:
- enabled: value to be set.
func (*Settings) SetEnableDeveloperExtras ¶
SetEnableDeveloperExtras: set the KitSettings:enable-developer-extras property.
The function takes the following parameters:
- enabled: value to be set.
func (*Settings) SetEnableDnsPrefetching ¶
SetEnableDnsPrefetching: set the KitSettings:enable-dns-prefetching property.
The function takes the following parameters:
- enabled: value to be set.
func (*Settings) SetEnableEncryptedMedia ¶
SetEnableEncryptedMedia: set the KitSettings:enable-encrypted-media property.
The function takes the following parameters:
- enabled: value to be set.
func (*Settings) SetEnableFullscreen ¶
SetEnableFullscreen: set the KitSettings:enable-fullscreen property.
The function takes the following parameters:
- enabled: value to be set.
func (*Settings) SetEnableHtml5Database ¶
SetEnableHtml5Database: set the KitSettings:enable-html5-database property.
The function takes the following parameters:
- enabled: value to be set.
func (*Settings) SetEnableHtml5LocalStorage ¶
SetEnableHtml5LocalStorage: set the KitSettings:enable-html5-local-storage property.
The function takes the following parameters:
- enabled: value to be set.
func (*Settings) SetEnableHyperlinkAuditing ¶
SetEnableHyperlinkAuditing: set the KitSettings:enable-hyperlink-auditing property.
The function takes the following parameters:
- enabled: value to be set.
func (*Settings) SetEnableJavascript ¶
SetEnableJavascript: set the KitSettings:enable-javascript property.
The function takes the following parameters:
- enabled: value to be set.
func (*Settings) SetEnableJavascriptMarkup ¶
SetEnableJavascriptMarkup: set the KitSettings:enable-javascript-markup property.
The function takes the following parameters:
- enabled: value to be set.
func (*Settings) SetEnableMedia ¶
SetEnableMedia: set the KitSettings:enable-media property.
The function takes the following parameters:
- enabled: value to be set.
func (*Settings) SetEnableMediaCapabilities ¶
SetEnableMediaCapabilities: set the KitSettings:enable-media-capabilities property.
The function takes the following parameters:
- enabled: value to be set.
func (*Settings) SetEnableMediaStream ¶
SetEnableMediaStream: set the KitSettings:enable-media-stream property.
The function takes the following parameters:
- enabled: value to be set.
func (*Settings) SetEnableMediasource ¶
SetEnableMediasource: set the KitSettings:enable-mediasource property.
The function takes the following parameters:
- enabled: value to be set.
func (*Settings) SetEnableMockCaptureDevices ¶
SetEnableMockCaptureDevices: set the KitSettings:enable-mock-capture-devices property.
The function takes the following parameters:
- enabled: value to be set.
func (*Settings) SetEnableOfflineWebApplicationCache ¶
SetEnableOfflineWebApplicationCache: set the KitSettings:enable-offline-web-application-cache property.
The function takes the following parameters:
- enabled: value to be set.
func (*Settings) SetEnablePageCache ¶
SetEnablePageCache: set the KitSettings:enable-page-cache property.
The function takes the following parameters:
- enabled: value to be set.
func (*Settings) SetEnableResizableTextAreas ¶
SetEnableResizableTextAreas: set the KitSettings:enable-resizable-text-areas property.
The function takes the following parameters:
- enabled: value to be set.
func (*Settings) SetEnableSiteSpecificQuirks ¶
SetEnableSiteSpecificQuirks: set the KitSettings:enable-site-specific-quirks property.
The function takes the following parameters:
- enabled: value to be set.
func (*Settings) SetEnableSmoothScrolling ¶
SetEnableSmoothScrolling: set the KitSettings:enable-smooth-scrolling property.
The function takes the following parameters:
- enabled: value to be set.
func (*Settings) SetEnableSpatialNavigation ¶
SetEnableSpatialNavigation: set the KitSettings:enable-spatial-navigation property.
The function takes the following parameters:
- enabled: value to be set.
func (*Settings) SetEnableTabsToLinks ¶
SetEnableTabsToLinks: set the KitSettings:enable-tabs-to-links property.
The function takes the following parameters:
- enabled: value to be set.
func (*Settings) SetEnableWebaudio ¶
SetEnableWebaudio: set the KitSettings:enable-webaudio property.
The function takes the following parameters:
- enabled: value to be set.
func (*Settings) SetEnableWebgl ¶
SetEnableWebgl: set the KitSettings:enable-webgl property.
The function takes the following parameters:
- enabled: value to be set.
func (*Settings) SetEnableWebrtc ¶
SetEnableWebrtc: set the settings:enable-webrtc property.
Setting this property to TRUE implies the media-stream web-setting will also be enabled.
The function takes the following parameters:
- enabled: value to be set.
func (*Settings) SetEnableWriteConsoleMessagesToStdout ¶
SetEnableWriteConsoleMessagesToStdout: set the KitSettings:enable-write-console-messages-to-stdout property.
The function takes the following parameters:
- enabled: value to be set.
func (*Settings) SetFantasyFontFamily ¶
SetFantasyFontFamily: set the KitSettings:fantasy-font-family property.
The function takes the following parameters:
- fantasyFontFamily: new default fantasy font family.
func (*Settings) SetFeatureEnabled ¶
SetFeatureEnabled enables or disables a feature.
The current status of the feature can be determined with webkit_settings_get_feature_enabled. To reset a feature to its initial status, pass the value returned by webkit_feature_get_default_value as the enabled parameter.
The function takes the following parameters:
- feature to toggle.
- enabled: whether the feature will be enabled.
func (*Settings) SetHardwareAccelerationPolicy ¶
func (settings *Settings) SetHardwareAccelerationPolicy(policy HardwareAccelerationPolicy)
SetHardwareAccelerationPolicy: set the KitSettings:hardware-acceleration-policy property.
The function takes the following parameters:
- policy: KitHardwareAccelerationPolicy.
func (*Settings) SetJavascriptCanAccessClipboard ¶
SetJavascriptCanAccessClipboard: set the KitSettings:javascript-can-access-clipboard property.
The function takes the following parameters:
- enabled: value to be set.
func (*Settings) SetJavascriptCanOpenWindowsAutomatically ¶
SetJavascriptCanOpenWindowsAutomatically: set the KitSettings:javascript-can-open-windows-automatically property.
The function takes the following parameters:
- enabled: value to be set.
func (*Settings) SetLoadIconsIgnoringImageLoadSetting
deprecated
func (*Settings) SetMediaContentTypesRequiringHardwareSupport ¶
SetMediaContentTypesRequiringHardwareSupport: set the KitSettings:media-content-types-requiring-hardware-support property.
The function takes the following parameters:
- contentTypes (optional): list of media content types requiring hardware support split by semicolons (:) or NULL to use the default value.
func (*Settings) SetMediaPlaybackAllowsInline ¶
SetMediaPlaybackAllowsInline: set the KitSettings:media-playback-allows-inline property.
The function takes the following parameters:
- enabled: value to be set.
func (*Settings) SetMediaPlaybackRequiresUserGesture ¶
SetMediaPlaybackRequiresUserGesture: set the KitSettings:media-playback-requires-user-gesture property.
The function takes the following parameters:
- enabled: value to be set.
func (*Settings) SetMinimumFontSize ¶
SetMinimumFontSize: set the KitSettings:minimum-font-size property.
The function takes the following parameters:
- fontSize: minimum font size to be set in pixels.
func (*Settings) SetMonospaceFontFamily ¶
SetMonospaceFontFamily: set the KitSettings:monospace-font-family property.
The function takes the following parameters:
- monospaceFontFamily: new default monospace font family.
func (*Settings) SetPictographFontFamily ¶
SetPictographFontFamily: set the KitSettings:pictograph-font-family property.
The function takes the following parameters:
- pictographFontFamily: new default pictograph font family.
func (*Settings) SetPrintBackgrounds ¶
SetPrintBackgrounds: set the KitSettings:print-backgrounds property.
The function takes the following parameters:
- printBackgrounds: value to be set.
func (*Settings) SetSansSerifFontFamily ¶
SetSansSerifFontFamily: set the KitSettings:sans-serif-font-family property.
The function takes the following parameters:
- sansSerifFontFamily: new default sans-serif font family.
func (*Settings) SetSerifFontFamily ¶
SetSerifFontFamily: set the KitSettings:serif-font-family property.
The function takes the following parameters:
- serifFontFamily: new default serif font family.
func (*Settings) SetUserAgent ¶
SetUserAgent: set the KitSettings:user-agent property.
The function takes the following parameters:
- userAgent (optional): new custom user agent string or NULL to use the default user agent.
func (*Settings) SetUserAgentWithApplicationDetails ¶
func (settings *Settings) SetUserAgentWithApplicationDetails(applicationName, applicationVersion string)
SetUserAgentWithApplicationDetails: set the KitSettings:user-agent property by appending the application details.
Set the KitSettings:user-agent property by appending the application details to the default user agent. If no application name or version is given, the default user agent used will be used. If only the version is given, the default engine version is used with the given application name.
The function takes the following parameters:
- applicationName (optional): application name used for the user agent or NULL to use the default user agent.
- applicationVersion (optional): application version for the user agent or NULL to user the default version.
func (*Settings) SetZoomTextOnly ¶
SetZoomTextOnly: set the KitSettings:zoom-text-only property.
The function takes the following parameters:
- zoomTextOnly: value to be set.
func (*Settings) UserAgent ¶
UserAgent: get the KitSettings:user-agent property.
The function returns the following values:
- utf8: current value of the user-agent property.
func (*Settings) ZoomTextOnly ¶
ZoomTextOnly: get the KitSettings:zoom-text-only property.
The function returns the following values:
- ok: TRUE If zoom level of the view should only affect the text or FALSE if all view contents should be scaled.
type SettingsClass ¶
type SettingsClass struct {
// contains filtered or unexported fields
}
SettingsClass: instance of this type is always passed by reference.
type SettingsOverrides ¶
type SettingsOverrides struct { }
SettingsOverrides contains methods that are overridable.
type SnapshotError ¶
SnapshotError: enum values used to denote errors happening when creating snapshots of KitWebView.
const ( // SnapshotErrorFailedToCreate: error occurred when creating a webpage // snapshot. SnapshotErrorFailedToCreate SnapshotError = 799 )
func (SnapshotError) String ¶
func (s SnapshotError) String() string
String returns the name in string for SnapshotError.
type SnapshotOptions ¶
SnapshotOptions: enum values used to specify options when taking a snapshot from a KitWebView.
const ( // SnapshotOptionsNone: do not include any special options. SnapshotOptionsNone SnapshotOptions = 0b0 // SnapshotOptionsIncludeSelectionHighlighting: whether to include in the // snapshot the highlight of the selected content. SnapshotOptionsIncludeSelectionHighlighting SnapshotOptions = 0b1 // SnapshotOptionsTransparentBackground: do not fill the background with // white before rendering the snapshot. Since 2.8. SnapshotOptionsTransparentBackground SnapshotOptions = 0b10 )
func (SnapshotOptions) Has ¶
func (s SnapshotOptions) Has(other SnapshotOptions) bool
Has returns true if s contains other.
func (SnapshotOptions) String ¶
func (s SnapshotOptions) String() string
String returns the names in string for SnapshotOptions.
type SnapshotRegion ¶
SnapshotRegion: enum values used to specify the region from which to get a KitWebView snapshot.
const ( // SnapshotRegionVisible specifies a snapshot only for the area that is // visible in the webview. SnapshotRegionVisible SnapshotRegion = iota // SnapshotRegionFullDocument: snapshot of the entire document. SnapshotRegionFullDocument )
func (SnapshotRegion) String ¶
func (s SnapshotRegion) String() string
String returns the name in string for SnapshotRegion.
type TLSErrorsPolicy ¶
TLSErrorsPolicy: enum values used to denote the TLS errors policy.
const ( // TLSErrorsPolicyIgnore: ignore TLS errors. TLSErrorsPolicyIgnore TLSErrorsPolicy = iota // TLSErrorsPolicyFail: TLS errors will emit // KitWebView::load-failed-with-tls-errors and, if the signal is // handled, finish the load. In case the signal is not handled, // KitWebView::load-failed is emitted before the load finishes. TLSErrorsPolicyFail )
func (TLSErrorsPolicy) String ¶
func (t TLSErrorsPolicy) String() string
String returns the name in string for TLSErrorsPolicy.
type URIRequest ¶
URIRequest represents a URI request.
A KitURIRequest can be created with a URI using the webkit_uri_request_new() method, and you can get the URI of an existing request with the webkit_uri_request_get_uri() one.
func NewURIRequest ¶
func NewURIRequest(uri string) *URIRequest
NewURIRequest creates a new KitURIRequest for the given URI.
The function takes the following parameters:
- uri: URI.
The function returns the following values:
- uriRequest: new KitURIRequest.
func (*URIRequest) HTTPHeaders ¶
func (request *URIRequest) HTTPHeaders() *soup.MessageHeaders
HTTPHeaders: get the HTTP headers of a KitURIRequest as a MessageHeaders.
The function returns the following values:
- messageHeaders with the HTTP headers of request or NULL if request is not an HTTP request.
func (*URIRequest) HTTPMethod ¶
func (request *URIRequest) HTTPMethod() string
HTTPMethod: get the HTTP method of the KitURIRequest.
The function returns the following values:
- utf8: HTTP method of the KitURIRequest or NULL if request is not an HTTP request.
func (*URIRequest) SetURI ¶
func (request *URIRequest) SetURI(uri string)
SetURI: set the URI of request.
The function takes the following parameters:
- uri: URI.
func (*URIRequest) URI ¶
func (request *URIRequest) URI() string
URI obtains the request URI.
The function returns the following values:
- utf8: request URI, as a string.
type URIRequestClass ¶
type URIRequestClass struct {
// contains filtered or unexported fields
}
URIRequestClass: instance of this type is always passed by reference.
type URIRequestOverrides ¶
type URIRequestOverrides struct { }
URIRequestOverrides contains methods that are overridable.
type URIResponse ¶
URIResponse represents an URI response.
A KitURIResponse contains information such as the URI, the status code, the content length, the mime type, the HTTP status or the suggested filename.
func (*URIResponse) ContentLength ¶
func (response *URIResponse) ContentLength() uint64
ContentLength: get the expected content length of the KitURIResponse.
It can be 0 if the server provided an incorrect or missing Content-Length.
The function returns the following values:
- guint64: expected content length of response.
func (*URIResponse) HTTPHeaders ¶
func (response *URIResponse) HTTPHeaders() *soup.MessageHeaders
HTTPHeaders: get the HTTP headers of a KitURIResponse as a MessageHeaders.
The function returns the following values:
- messageHeaders with the HTTP headers of response or NULL if response is not an HTTP response.
func (*URIResponse) MIMEType ¶
func (response *URIResponse) MIMEType() string
MIMEType gets the MIME type of the response.
The function returns the following values:
- utf8: MIME type, as a string.
func (*URIResponse) StatusCode ¶
func (response *URIResponse) StatusCode() uint
StatusCode: get the status code of the KitURIResponse.
Get the status code of the KitURIResponse as returned by the server. It will normally be a KnownStatusCode, for example SOUP_STATUS_OK, though the server can respond with any unsigned integer.
The function returns the following values:
- guint status code of response.
func (*URIResponse) SuggestedFilename ¶
func (response *URIResponse) SuggestedFilename() string
SuggestedFilename: get the suggested filename for response.
Get the suggested filename for response, as specified by the 'Content-Disposition' HTTP header, or NULL if it's not present.
The function returns the following values:
- utf8: suggested filename or NULL if the 'Content-Disposition' HTTP header is not present.
func (*URIResponse) URI ¶
func (response *URIResponse) URI() string
URI gets the URI which resulted in the response.
The function returns the following values:
- utf8: response URI, as a string.
type URIResponseClass ¶
type URIResponseClass struct {
// contains filtered or unexported fields
}
URIResponseClass: instance of this type is always passed by reference.
type URIResponseOverrides ¶
type URIResponseOverrides struct { }
URIResponseOverrides contains methods that are overridable.
type URISchemeRequest ¶
URISchemeRequest represents a URI scheme request.
If you register a particular URI scheme in a KitWebContext, using webkit_web_context_register_uri_scheme(), you have to provide a KitURISchemeRequestCallback. After that, when a URI request is made with that particular scheme, your callback will be called. There you will be able to access properties such as the scheme, the URI and path, and the KitWebView that initiated the request, and also finish the request with webkit_uri_scheme_request_finish().
func (*URISchemeRequest) Finish ¶
func (request *URISchemeRequest) Finish(stream gio.InputStreamer, streamLength int64, contentType string)
Finish a KitURISchemeRequest by setting the contents of the request and its mime type.
The function takes the following parameters:
- stream to read the contents of the request.
- streamLength: length of the stream or -1 if not known.
- contentType (optional): content type of the stream or NULL if not known.
func (*URISchemeRequest) FinishError ¶
func (request *URISchemeRequest) FinishError(err error)
FinishError: finish a KitURISchemeRequest with a #GError.
The function takes the following parameters:
- err that will be passed to the KitWebView.
func (*URISchemeRequest) FinishWithResponse ¶
func (request *URISchemeRequest) FinishWithResponse(response *URISchemeResponse)
FinishWithResponse: finish a KitURISchemeRequest by returning a KitURISchemeResponse.
The function takes the following parameters:
- response: KitURISchemeResponse.
func (*URISchemeRequest) HTTPBody ¶
func (request *URISchemeRequest) HTTPBody() gio.InputStreamer
HTTPBody: get the request body.
The function returns the following values:
- inputStream: (nullable): the body of the request.
func (*URISchemeRequest) HTTPHeaders ¶
func (request *URISchemeRequest) HTTPHeaders() *soup.MessageHeaders
HTTPHeaders: get the MessageHeaders of the request.
The function returns the following values:
- messageHeaders of the request.
func (*URISchemeRequest) HTTPMethod ¶
func (request *URISchemeRequest) HTTPMethod() string
HTTPMethod: get the HTTP method of the request.
The function returns the following values:
- utf8: HTTP method of the request.
func (*URISchemeRequest) Path ¶
func (request *URISchemeRequest) Path() string
Path: get the URI path of request.
The function returns the following values:
- utf8: URI path of request.
func (*URISchemeRequest) Scheme ¶
func (request *URISchemeRequest) Scheme() string
Scheme: get the URI scheme of request.
The function returns the following values:
- utf8: URI scheme of request.
func (*URISchemeRequest) URI ¶
func (request *URISchemeRequest) URI() string
URI: get the URI of request.
The function returns the following values:
- utf8: full URI of request.
func (*URISchemeRequest) WebView ¶
func (request *URISchemeRequest) WebView() *WebView
WebView: get the KitWebView that initiated the request.
The function returns the following values:
- webView that initiated request.
type URISchemeRequestCallback ¶
type URISchemeRequestCallback func(request *URISchemeRequest)
URISchemeRequestCallback: type definition for a function that will be called back when an URI request is made for a user registered URI scheme.
type URISchemeRequestClass ¶
type URISchemeRequestClass struct {
// contains filtered or unexported fields
}
URISchemeRequestClass: instance of this type is always passed by reference.
type URISchemeRequestOverrides ¶
type URISchemeRequestOverrides struct { }
URISchemeRequestOverrides contains methods that are overridable.
type URISchemeResponse ¶
URISchemeResponse represents a URI scheme response.
If you register a particular URI scheme in a KitWebContext, using webkit_web_context_register_uri_scheme(), you have to provide a KitURISchemeRequestCallback. After that, when a URI response is made with that particular scheme, your callback will be called. There you will be able to provide more response parameters when the methods and properties of a KitURISchemeRequest is not enough.
When you finished setting up your KitURISchemeResponse, call webkit_uri_request_finish_with_response() with it to return the response.
func NewURISchemeResponse ¶
func NewURISchemeResponse(inputStream gio.InputStreamer, streamLength int64) *URISchemeResponse
NewURISchemeResponse: create a new KitURISchemeResponse.
The function takes the following parameters:
- inputStream to read the contents of the request.
- streamLength: length of the stream or -1 if not known.
The function returns the following values:
- uriSchemeResponse: newly created KitURISchemeResponse.
func (*URISchemeResponse) SetContentType ¶
func (response *URISchemeResponse) SetContentType(contentType string)
SetContentType sets the content type for the response.
The function takes the following parameters:
- contentType: content type of the stream.
func (*URISchemeResponse) SetHTTPHeaders ¶
func (response *URISchemeResponse) SetHTTPHeaders(headers *soup.MessageHeaders)
SetHTTPHeaders: assign the provided MessageHeaders to the response.
headers need to be of the type SOUP_MESSAGE_HEADERS_RESPONSE. Any existing headers will be overwritten.
The function takes the following parameters:
- headers: HTTP headers to be set.
func (*URISchemeResponse) SetStatus ¶
func (response *URISchemeResponse) SetStatus(statusCode uint, reasonPhrase string)
SetStatus sets the status code and reason phrase for the response.
If status_code is a known value and reason_phrase is NULL, the reason_phrase will be set automatically.
The function takes the following parameters:
- statusCode: HTTP status code to be returned.
- reasonPhrase (optional): reason phrase.
type URISchemeResponseClass ¶
type URISchemeResponseClass struct {
// contains filtered or unexported fields
}
URISchemeResponseClass: instance of this type is always passed by reference.
type URISchemeResponseOverrides ¶
type URISchemeResponseOverrides struct { }
URISchemeResponseOverrides contains methods that are overridable.
type UserContentFilter ¶
type UserContentFilter struct {
// contains filtered or unexported fields
}
UserContentFilter: compiled set of rules which applied to resource loads.
An instance of this type is always passed by reference.
func (*UserContentFilter) Identifier ¶
func (userContentFilter *UserContentFilter) Identifier() string
Identifier: obtain the identifier previously used to save the user_content_filter.
Obtain the identifier previously used to save the user_content_filter in the KitUserContentFilterStore.
The function returns the following values:
- utf8: identifier for the filter.
type UserContentFilterError ¶
UserContentFilterError errors that can occur while compiling content filters.
const ( // UserContentFilterErrorInvalidSource: JSON source for a content filter is // invalid. UserContentFilterErrorInvalidSource UserContentFilterError = iota // UserContentFilterErrorNotFound: requested content filter could not be // found. UserContentFilterErrorNotFound )
func (UserContentFilterError) String ¶
func (u UserContentFilterError) String() string
String returns the name in string for UserContentFilterError.
type UserContentFilterStore ¶
UserContentFilterStore handles storage of user content filters on disk.
The WebKitUserContentFilterStore provides the means to import and save JSON rule sets (https://webkit.org/blog/3476/content-blockers-first-look/), which can be loaded later in an efficient manner. Once filters are stored, the KitUserContentFilter objects which represent them can be added to a KitUserContentManager with webkit_user_content_manager_add_filter().
JSON rule sets are imported using webkit_user_content_filter_store_save() and stored on disk in an implementation defined format. The contents of a filter store must be managed using the KitUserContentFilterStore: a list of all the stored filters can be obtained with webkit_user_content_filter_store_fetch_identifiers(), webkit_user_content_filter_store_load() can be used to retrieve a previously saved filter, and removed from the store with webkit_user_content_filter_store_remove().
func NewUserContentFilterStore ¶
func NewUserContentFilterStore(storagePath string) *UserContentFilterStore
NewUserContentFilterStore: create a new KitUserContentFilterStore to manipulate filters stored at storage_path.
The path must point to a local filesystem, and will be created if needed.
The function takes the following parameters:
- storagePath: path where data for filters will be stored on disk.
The function returns the following values:
- userContentFilterStore: newly created KitUserContentFilterStore.
func (*UserContentFilterStore) FetchIdentifiersFinish ¶
func (store *UserContentFilterStore) FetchIdentifiersFinish(result gio.AsyncResulter) []string
FetchIdentifiersFinish finishes an asynchronous fetch of the list of stored filters.
Finishes an asynchronous fetch of the list of identifiers for the stored filters previously started with webkit_user_content_filter_store_fetch_identifiers().
The function takes the following parameters:
- result: Result.
The function returns the following values:
- utf8s: NULL-terminated list of filter identifiers.
func (*UserContentFilterStore) LoadFinish ¶
func (store *UserContentFilterStore) LoadFinish(result gio.AsyncResulter) (*UserContentFilter, error)
LoadFinish finishes an asynchronous filter load previously started with webkit_user_content_filter_store_load().
The function takes the following parameters:
- result: Result.
The function returns the following values:
- userContentFilter or NULL if the load failed.
func (*UserContentFilterStore) Path ¶
func (store *UserContentFilterStore) Path() string
Path gets the storage path for user content filters.
The function returns the following values:
- utf8: path, as a string.
func (*UserContentFilterStore) RemoveFinish ¶
func (store *UserContentFilterStore) RemoveFinish(result gio.AsyncResulter) error
RemoveFinish finishes an asynchronous filter removal previously started with webkit_user_content_filter_store_remove().
The function takes the following parameters:
- result: Result.
func (*UserContentFilterStore) SaveFinish ¶
func (store *UserContentFilterStore) SaveFinish(result gio.AsyncResulter) (*UserContentFilter, error)
SaveFinish finishes an asynchronous filter save previously started with webkit_user_content_filter_store_save().
The function takes the following parameters:
- result: Result.
The function returns the following values:
- userContentFilter or NULL if saving failed.
func (*UserContentFilterStore) SaveFromFileFinish ¶
func (store *UserContentFilterStore) SaveFromFileFinish(result gio.AsyncResulter) (*UserContentFilter, error)
SaveFromFileFinish finishes and asynchronous filter save previously started with webkit_user_content_filter_store_save_from_file().
The function takes the following parameters:
- result: Result.
The function returns the following values:
- userContentFilter or NULL if saving failed.
type UserContentFilterStoreClass ¶
type UserContentFilterStoreClass struct {
// contains filtered or unexported fields
}
UserContentFilterStoreClass: instance of this type is always passed by reference.
type UserContentFilterStoreOverrides ¶
type UserContentFilterStoreOverrides struct { }
UserContentFilterStoreOverrides contains methods that are overridable.
type UserContentInjectedFrames ¶
UserContentInjectedFrames specifies in which frames user style sheets are to be inserted in.
const ( // UserContentInjectAllFrames: insert the user style sheet in all the frames // loaded by the web view, including nested frames. This is the default. UserContentInjectAllFrames UserContentInjectedFrames = iota // UserContentInjectTopFrame: insert the user style sheet *only* in the // top-level frame loaded by the web view, and *not* in the nested frames. UserContentInjectTopFrame )
func (UserContentInjectedFrames) String ¶
func (u UserContentInjectedFrames) String() string
String returns the name in string for UserContentInjectedFrames.
type UserContentManager ¶
UserContentManager manages user-defined content which affects web pages.
Using a KitUserContentManager user CSS style sheets can be set to be injected in the web pages loaded by a KitWebView, by webkit_user_content_manager_add_style_sheet().
To use a KitUserContentManager, it must be created using webkit_user_content_manager_new(), and then used to construct a KitWebView. User style sheets can be created with webkit_user_style_sheet_new().
User style sheets can be added and removed at any time, but they will affect the web pages loaded afterwards.
func NewUserContentManager ¶
func NewUserContentManager() *UserContentManager
NewUserContentManager creates a new user content manager.
The function returns the following values:
- userContentManager: KitUserContentManager.
func (*UserContentManager) AddFilter ¶
func (manager *UserContentManager) AddFilter(filter *UserContentFilter)
AddFilter adds a KitUserContentFilter to the given KitUserContentManager.
The same KitUserContentFilter can be reused with multiple KitUserContentManager instances.
Filters need to be saved and loaded from KitUserContentFilterStore.
The function takes the following parameters:
- filter: KitUserContentFilter.
func (*UserContentManager) AddScript ¶
func (manager *UserContentManager) AddScript(script *UserScript)
AddScript adds a KitUserScript to the given KitUserContentManager.
The same KitUserScript can be reused with multiple KitUserContentManager instances.
The function takes the following parameters:
- script: KitUserScript.
func (*UserContentManager) AddStyleSheet ¶
func (manager *UserContentManager) AddStyleSheet(stylesheet *UserStyleSheet)
AddStyleSheet adds a KitUserStyleSheet to the given KitUserContentManager.
The same KitUserStyleSheet can be reused with multiple KitUserContentManager instances.
The function takes the following parameters:
- stylesheet: KitUserStyleSheet.
func (*UserContentManager) ConnectScriptMessageReceived ¶
func (manager *UserContentManager) ConnectScriptMessageReceived(f func(value *javascriptcore.Value)) coreglib.SignalHandle
ConnectScriptMessageReceived: this signal is emitted when JavaScript in a web view calls <code>window.webkit.messageHandlers.<name>.postMessage()</code>, after registering <code><name></code> using webkit_user_content_manager_register_script_message_handler().
func (*UserContentManager) ConnectScriptMessageWithReplyReceived ¶
func (manager *UserContentManager) ConnectScriptMessageWithReplyReceived(f func(value *javascriptcore.Value, reply *ScriptMessageReply) (ok bool)) coreglib.SignalHandle
ConnectScriptMessageWithReplyReceived: this signal is emitted when JavaScript in a web view calls <code>window.webkit.messageHandlers.<name>.postMessage()</code>, after registering <code><name></code> using webkit_user_content_manager_register_script_message_handler_with_reply()
The given reply can be used to send a return value with webkit_script_message_reply_return_value() or an error message with webkit_script_message_reply_return_error_message(). If none of them are called, an automatic reply with an undefined value will be sent.
It is possible to handle the reply asynchronously, by simply calling g_object_ref() on the reply and returning TRUE.
func (*UserContentManager) RegisterScriptMessageHandler ¶
func (manager *UserContentManager) RegisterScriptMessageHandler(name, worldName string) bool
RegisterScriptMessageHandler registers a new user script message handler in script world.
After it is registered, scripts can use window.webkit.messageHandlers.<name>.postMessage(value) to send messages. Those messages are received by connecting handlers to the KitUserContentManager::script-message-received signal. The handler name is used as the detail of the signal. To avoid race conditions between registering the handler name, and starting to receive the signals, it is recommended to connect to the signal *before* registering the handler name:
WebKitWebView *view = webkit_web_view_new (); WebKitUserContentManager *manager = webkit_web_view_get_user_content_manager (); g_signal_connect (manager, "script-message-received::foobar", G_CALLBACK (handle_script_message), NULL); webkit_user_content_manager_register_script_message_handler (manager, "foobar");
Registering a script message handler will fail if the requested name has been already registered before.
If NULL is passed as the world_name, the default world will be used.
The registered handler can be unregistered by using webkit_user_content_manager_unregister_script_message_handler().
The function takes the following parameters:
- name: name of the script message channel.
- worldName (optional): name of a KitScriptWorld.
The function returns the following values:
- ok: TRUE if message handler was registered successfully, or FALSE otherwise.
func (*UserContentManager) RegisterScriptMessageHandlerWithReply ¶
func (manager *UserContentManager) RegisterScriptMessageHandlerWithReply(name, worldName string) bool
RegisterScriptMessageHandlerWithReply registers a new user script message handler in script world with name world_name.
Different from webkit_user_content_manager_register_script_message_handler(), when using this function to register the handler, the connected signal is script-message-with-reply-received, and a reply provided by the user is expected. Otherwise, the user will receive a default undefined value.
If NULL is passed as the world_name, the default world will be used. See webkit_user_content_manager_register_script_message_handler() for full description.
Registering a script message handler will fail if the requested name has been already registered before.
The registered handler can be unregistered by using webkit_user_content_manager_unregister_script_message_handler().
The function takes the following parameters:
- name: name of the script message channel world_name (nullable): the name of a KitScriptWorld.
- worldName
The function returns the following values:
- ok: TRUE if message handler was registered successfully, or FALSE otherwise.
func (*UserContentManager) RemoveAllFilters ¶
func (manager *UserContentManager) RemoveAllFilters()
RemoveAllFilters removes all content filters from the given KitUserContentManager.
func (*UserContentManager) RemoveAllScripts ¶
func (manager *UserContentManager) RemoveAllScripts()
RemoveAllScripts removes all user scripts from the given KitUserContentManager
See also webkit_user_content_manager_remove_script().
func (*UserContentManager) RemoveAllStyleSheets ¶
func (manager *UserContentManager) RemoveAllStyleSheets()
RemoveAllStyleSheets removes all user style sheets from the given KitUserContentManager.
func (*UserContentManager) RemoveFilter ¶
func (manager *UserContentManager) RemoveFilter(filter *UserContentFilter)
RemoveFilter removes a filter from the given KitUserContentManager.
Since 2.24.
The function takes the following parameters:
- filter: KitUserContentFilter.
func (*UserContentManager) RemoveFilterByID ¶
func (manager *UserContentManager) RemoveFilterByID(filterId string)
RemoveFilterByID removes a filter by the given identifier.
Removes a filter from the given KitUserContentManager given the identifier of a KitUserContentFilter as returned by webkit_user_content_filter_get_identifier().
The function takes the following parameters:
- filterId: filter identifier.
func (*UserContentManager) RemoveScript ¶
func (manager *UserContentManager) RemoveScript(script *UserScript)
RemoveScript removes a KitUserScript from the given KitUserContentManager.
See also webkit_user_content_manager_remove_all_scripts().
The function takes the following parameters:
- script: KitUserScript.
func (*UserContentManager) RemoveStyleSheet ¶
func (manager *UserContentManager) RemoveStyleSheet(stylesheet *UserStyleSheet)
RemoveStyleSheet removes a KitUserStyleSheet from the given KitUserContentManager.
See also webkit_user_content_manager_remove_all_style_sheets().
The function takes the following parameters:
- stylesheet: KitUserStyleSheet.
func (*UserContentManager) UnregisterScriptMessageHandler ¶
func (manager *UserContentManager) UnregisterScriptMessageHandler(name, worldName string)
UnregisterScriptMessageHandler unregisters a previously registered message handler in script world with name world_name. If NULL is passed as the world_name, the default world will be used.
Note that this does *not* disconnect handlers for the KitUserContentManager::script-message-received signal; they will be kept connected, but the signal will not be emitted unless the handler name is registered again.
See also webkit_user_content_manager_register_script_message_handler().
The function takes the following parameters:
- name: name of the script message channel.
- worldName (optional): name of a KitScriptWorld.
type UserContentManagerClass ¶
type UserContentManagerClass struct {
// contains filtered or unexported fields
}
UserContentManagerClass: instance of this type is always passed by reference.
type UserContentManagerOverrides ¶
type UserContentManagerOverrides struct { }
UserContentManagerOverrides contains methods that are overridable.
type UserMediaPermissionRequest ¶
type UserMediaPermissionRequest struct { *coreglib.Object PermissionRequest // contains filtered or unexported fields }
UserMediaPermissionRequest: permission request for accessing user's audio/video devices.
WebKitUserMediaPermissionRequest represents a request for permission to decide whether WebKit should be allowed to access the user's audio and video source devices when requested through the getUserMedia API.
When a WebKitUserMediaPermissionRequest is not handled by the user, it is denied by default.
type UserMediaPermissionRequestClass ¶
type UserMediaPermissionRequestClass struct {
// contains filtered or unexported fields
}
UserMediaPermissionRequestClass: instance of this type is always passed by reference.
type UserMediaPermissionRequestOverrides ¶
type UserMediaPermissionRequestOverrides struct { }
UserMediaPermissionRequestOverrides contains methods that are overridable.
type UserMessage ¶
type UserMessage struct { coreglib.InitiallyUnowned // contains filtered or unexported fields }
UserMessage: message that can be sent between the UI process and web process extensions.
A WebKitUserMessage is a message that can be used for the communication between the UI process and web process extensions. A WebKitUserMessage always has a name, and it can also include parameters and UNIX file descriptors. Messages can be sent from a KitWebContext to all web process extensions, from a web process extension to its corresponding KitWebContext, and from a KitWebView to its corresponding KitWebPage (and vice versa). One to one messages can be replied to directly with webkit_user_message_send_reply().
func NewUserMessage ¶
func NewUserMessage(name string, parameters *glib.Variant) *UserMessage
NewUserMessage: create a new KitUserMessage with name.
The function takes the following parameters:
- name: message name.
- parameters (optional): message parameters as a #GVariant, or NULL.
The function returns the following values:
- userMessage: newly created KitUserMessage object.
func (*UserMessage) Name ¶
func (message *UserMessage) Name() string
Name: get the message name.
The function returns the following values:
- utf8: message name.
func (*UserMessage) Parameters ¶
func (message *UserMessage) Parameters() *glib.Variant
Parameters: get the message parameters.
The function returns the following values:
- variant (optional): message parameters.
func (*UserMessage) SendReply ¶
func (message *UserMessage) SendReply(reply *UserMessage)
SendReply: send a reply to an user message.
If reply is floating, it's consumed. You can only send a reply to a KitUserMessage that has been received.
The function takes the following parameters:
- reply to send as reply.
type UserMessageClass ¶
type UserMessageClass struct {
// contains filtered or unexported fields
}
UserMessageClass: instance of this type is always passed by reference.
type UserMessageError ¶
UserMessageError: enum values used to denote errors happening when sending user messages.
const ( // UserMessageUnhandledMessage: message was not handled by the receiver. UserMessageUnhandledMessage UserMessageError = iota )
func (UserMessageError) String ¶
func (u UserMessageError) String() string
String returns the name in string for UserMessageError.
type UserMessageOverrides ¶
type UserMessageOverrides struct { }
UserMessageOverrides contains methods that are overridable.
type UserScript ¶
type UserScript struct {
// contains filtered or unexported fields
}
UserScript: javaScript snippet which can be injected in loaded pages.
An instance of this type is always passed by reference.
func NewUserScript ¶
func NewUserScript(source string, injectedFrames UserContentInjectedFrames, injectionTime UserScriptInjectionTime, allowList []string, blockList []string) *UserScript
NewUserScript constructs a struct UserScript.
func NewUserScriptForWorld ¶
func NewUserScriptForWorld(source string, injectedFrames UserContentInjectedFrames, injectionTime UserScriptInjectionTime, worldName string, allowList []string, blockList []string) *UserScript
NewUserScriptForWorld constructs a struct UserScript.
type UserScriptInjectionTime ¶
UserScriptInjectionTime specifies at which place of documents an user script will be inserted.
const ( // UserScriptInjectAtDocumentStart: insert the code of the user script at // the beginning of loaded documents. This is the default. UserScriptInjectAtDocumentStart UserScriptInjectionTime = iota // UserScriptInjectAtDocumentEnd: insert the code of the user script at the // end of the loaded documents. UserScriptInjectAtDocumentEnd )
func (UserScriptInjectionTime) String ¶
func (u UserScriptInjectionTime) String() string
String returns the name in string for UserScriptInjectionTime.
type UserStyleLevel ¶
UserStyleLevel specifies how to treat an user style sheet.
const ( // UserStyleLevelUser: style sheet is an user style sheet, its contents // always override other style sheets. This is the default. UserStyleLevelUser UserStyleLevel = iota // UserStyleLevelAuthor: style sheet will be treated as if it was provided // by the loaded documents. That means other user style sheets may still // override it. UserStyleLevelAuthor )
func (UserStyleLevel) String ¶
func (u UserStyleLevel) String() string
String returns the name in string for UserStyleLevel.
type UserStyleSheet ¶
type UserStyleSheet struct {
// contains filtered or unexported fields
}
UserStyleSheet: CSS style sheet which can be injected in loaded pages.
An instance of this type is always passed by reference.
func NewUserStyleSheet ¶
func NewUserStyleSheet(source string, injectedFrames UserContentInjectedFrames, level UserStyleLevel, allowList []string, blockList []string) *UserStyleSheet
NewUserStyleSheet constructs a struct UserStyleSheet.
func NewUserStyleSheetForWorld ¶
func NewUserStyleSheetForWorld(source string, injectedFrames UserContentInjectedFrames, level UserStyleLevel, worldName string, allowList []string, blockList []string) *UserStyleSheet
NewUserStyleSheetForWorld constructs a struct UserStyleSheet.
type WebContext ¶
WebContext manages aspects common to all KitWebView<!-- -->s
The KitWebContext manages all aspects common to all KitWebView<!-- -->s.
You can define the KitCacheModel with webkit_web_context_set_cache_model(), depending on the needs of your application. You can access the KitSecurityManager to specify the behaviour of your application regarding security using webkit_web_context_get_security_manager().
It is also possible to change your preferred language or enable spell checking, using webkit_web_context_set_preferred_languages(), webkit_web_context_set_spell_checking_languages() and webkit_web_context_set_spell_checking_enabled().
You can use webkit_web_context_register_uri_scheme() to register custom URI schemes, and manage several other settings.
TLS certificate validation failure is now treated as a transport error by default. To handle TLS failures differently, you can connect to KitWebView::load-failed-with-tls-errors. Alternatively, you can use webkit_web_context_set_tls_errors_policy() to set the policy WEBKIT_TLS_ERRORS_POLICY_IGNORE; however, this is not appropriate for Internet applications.
func NewWebContext ¶
func NewWebContext() *WebContext
NewWebContext: create a new KitWebContext.
The function returns the following values:
- webContext: newly created KitWebContext.
func WebContextGetDefault ¶
func WebContextGetDefault() *WebContext
WebContextGetDefault gets the default web context.
The function returns the following values:
- webContext: KitWebContext.
func (*WebContext) AddPathToSandbox ¶
func (context *WebContext) AddPathToSandbox(path string, readOnly bool)
AddPathToSandbox adds a path to be mounted in the sandbox.
path must exist before any web process has been created; otherwise, it will be silently ignored. It is a fatal error to add paths after a web process has been spawned.
Paths under /sys, /proc, and /dev are invalid. Attempting to add all of / is not valid. Since 2.40, adding the user's entire home directory or /home is also not valid.
See also webkit_web_context_set_sandbox_enabled().
The function takes the following parameters:
- path: absolute path to mount in the sandbox.
- readOnly: if TRUE the path will be read-only.
func (*WebContext) CacheModel ¶
func (context *WebContext) CacheModel() CacheModel
CacheModel returns the current cache model.
For more information about this value check the documentation of the function webkit_web_context_set_cache_model().
The function returns the following values:
- cacheModel: current KitCacheModel.
func (*WebContext) ConnectAutomationStarted ¶
func (context *WebContext) ConnectAutomationStarted(f func(session *AutomationSession)) coreglib.SignalHandle
ConnectAutomationStarted: this signal is emitted when a new automation request is made. Note that it will never be emitted if automation is not enabled in context, see webkit_web_context_set_automation_allowed() for more details.
func (*WebContext) ConnectInitializeNotificationPermissions ¶
func (context *WebContext) ConnectInitializeNotificationPermissions(f func()) coreglib.SignalHandle
ConnectInitializeNotificationPermissions: this signal is emitted when a KitWebContext needs to set initial notification permissions for a web process. It is emitted when a new web process is about to be launched, and signals the most appropriate moment to use webkit_web_context_initialize_notification_permissions(). If no notification permissions have changed since the last time this signal was emitted, then there is no need to call webkit_web_context_initialize_notification_permissions() again.
func (*WebContext) ConnectInitializeWebProcessExtensions ¶
func (context *WebContext) ConnectInitializeWebProcessExtensions(f func()) coreglib.SignalHandle
ConnectInitializeWebProcessExtensions: this signal is emitted when a new web process is about to be launched. It signals the most appropriate moment to use webkit_web_context_set_web_process_extensions_initialization_user_data() and webkit_web_context_set_web_process_extensions_directory().
func (*WebContext) ConnectUserMessageReceived ¶
func (context *WebContext) ConnectUserMessageReceived(f func(message *UserMessage) (ok bool)) coreglib.SignalHandle
ConnectUserMessageReceived: this signal is emitted when a KitUserMessage is received from a web process extension. You can reply to the message using webkit_user_message_send_reply().
You can handle the user message asynchronously by calling g_object_ref() on message and returning TRUE.
func (*WebContext) GeolocationManager ¶
func (context *WebContext) GeolocationManager() *GeolocationManager
GeolocationManager: get the KitGeolocationManager of context.
The function returns the following values:
- geolocationManager of context.
func (*WebContext) InitializeNotificationPermissions ¶
func (context *WebContext) InitializeNotificationPermissions(allowedOrigins, disallowedOrigins []*SecurityOrigin)
InitializeNotificationPermissions sets initial desktop notification permissions for the context.
allowed_origins and disallowed_origins must each be #GList of KitSecurityOrigin objects representing origins that will, respectively, either always or never have permission to show desktop notifications. No KitNotificationPermissionRequest will ever be generated for any of the security origins represented in allowed_origins or disallowed_origins. This function is necessary because some webpages proactively check whether they have permission to display notifications without ever creating a permission request.
This function only affects web processes that have not already been created. The best time to call it is when handling KitWebContext::initialize-notification-permissions so as to ensure that new web processes receive the most recent set of permissions.
The function takes the following parameters:
- allowedOrigins of security origins.
- disallowedOrigins of security origins.
func (*WebContext) IsAutomationAllowed ¶
func (context *WebContext) IsAutomationAllowed() bool
IsAutomationAllowed: get whether automation is allowed in context.
See also webkit_web_context_set_automation_allowed().
The function returns the following values:
- ok: TRUE if automation is allowed or FALSE otherwise.
func (*WebContext) NetworkSessionForAutomation ¶
func (context *WebContext) NetworkSessionForAutomation() *NetworkSession
NetworkSessionForAutomation: get the KitNetworkSession used for automation sessions started in context.
The function returns the following values:
- networkSession (optional) or NULL if automation is not enabled.
func (*WebContext) RegisterURIScheme ¶
func (context *WebContext) RegisterURIScheme(scheme string, callback URISchemeRequestCallback)
RegisterURIScheme: register scheme in context.
Register scheme in context, so that when an URI request with scheme is made in the KitWebContext, the KitURISchemeRequestCallback registered will be called with a KitURISchemeRequest. It is possible to handle URI scheme requests asynchronously, by calling g_object_ref() on the KitURISchemeRequest and calling webkit_uri_scheme_request_finish() later when the data of the request is available or webkit_uri_scheme_request_finish_error() in case of error.
static void about_uri_scheme_request_cb (WebKitURISchemeRequest *request, gpointer user_data) { GInputStream *stream; gsize stream_length; const gchar *path = webkit_uri_scheme_request_get_path (request); if (!g_strcmp0 (path, "memory")) { // Create a GInputStream with the contents of memory about page, and set its length to stream_length } else if (!g_strcmp0 (path, "applications")) { // Create a GInputStream with the contents of applications about page, and set its length to stream_length } else if (!g_strcmp0 (path, "example")) { gchar *contents = g_strdup_printf ("<html><body><p>Example about page</p></body></html>"); stream_length = strlen (contents); stream = g_memory_input_stream_new_from_data (contents, stream_length, g_free); } else { GError *error = g_error_new (ABOUT_HANDLER_ERROR, ABOUT_HANDLER_ERROR_INVALID, "Invalid about:s page.", path); webkit_uri_scheme_request_finish_error (request, error); g_error_free (error); return; } webkit_uri_scheme_request_finish (request, stream, stream_length, "text/html"); g_object_unref (stream); }.
The function takes the following parameters:
- scheme: network scheme to register.
- callback: KitURISchemeRequestCallback.
func (*WebContext) SecurityManager ¶
func (context *WebContext) SecurityManager() *SecurityManager
SecurityManager: get the KitSecurityManager of context.
The function returns the following values:
- securityManager of context.
func (*WebContext) SendMessageToAllExtensions ¶
func (context *WebContext) SendMessageToAllExtensions(message *UserMessage)
SendMessageToAllExtensions: send message to all web process extensions associated to context.
If message is floating, it's consumed.
The function takes the following parameters:
- message: KitUserMessage.
func (*WebContext) SetAutomationAllowed ¶
func (context *WebContext) SetAutomationAllowed(allowed bool)
SetAutomationAllowed: set whether automation is allowed in context.
When automation is enabled the browser could be controlled by another process by requesting an automation session. When a new automation session is requested the signal KitWebContext::automation-started is emitted. Automation is disabled by default, so you need to explicitly call this method passing TRUE to enable it.
Note that only one KitWebContext can have automation enabled, so this will do nothing if there's another KitWebContext with automation already enabled.
The function takes the following parameters:
- allowed: value to set.
func (*WebContext) SetCacheModel ¶
func (context *WebContext) SetCacheModel(cacheModel CacheModel)
SetCacheModel specifies a usage model for WebViews.
Specifies a usage model for WebViews, which WebKit will use to determine its caching behavior. All web views follow the cache model. This cache model determines the RAM and disk space to use for caching previously viewed content .
Research indicates that users tend to browse within clusters of documents that hold resources in common, and to revisit previously visited documents. WebKit and the frameworks below it include built-in caches that take advantage of these patterns, substantially improving document load speed in browsing situations. The WebKit cache model controls the behaviors of all of these caches, including various WebCore caches.
Browsers can improve document load speed substantially by specifying WEBKIT_CACHE_MODEL_WEB_BROWSER. Applications without a browsing interface can reduce memory usage substantially by specifying WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER. The default value is WEBKIT_CACHE_MODEL_WEB_BROWSER.
The function takes the following parameters:
- cacheModel: KitCacheModel.
func (*WebContext) SetPreferredLanguages ¶
func (context *WebContext) SetPreferredLanguages(languages []string)
SetPreferredLanguages: set the list of preferred languages.
Set the list of preferred languages, sorted from most desirable to least desirable. The list will be used in the following ways:
- Determining how to build the Accept-Language HTTP header that will be included in the network requests started by the KitWebContext.
- Setting the values of navigator.language and navigator.languages.
- The first item in the list sets the default locale for JavaScript Intl functions.
The function takes the following parameters:
- languages (optional): NULL-terminated list of language identifiers.
func (*WebContext) SetSpellCheckingEnabled ¶
func (context *WebContext) SetSpellCheckingEnabled(enabled bool)
SetSpellCheckingEnabled: enable or disable the spell checking feature.
The function takes the following parameters:
- enabled: value to be set.
func (*WebContext) SetSpellCheckingLanguages ¶
func (context *WebContext) SetSpellCheckingLanguages(languages []string)
SetSpellCheckingLanguages: set the list of spell checking languages to be used for spell checking.
The locale string typically is in the form lang_COUNTRY, where lang is an ISO-639 language code, and COUNTRY is an ISO-3166 country code. For instance, sv_FI for Swedish as written in Finland or pt_BR for Portuguese as written in Brazil.
You need to call this function with a valid list of languages at least once in order to properly enable the spell checking feature in WebKit.
The function takes the following parameters:
- languages: NULL-terminated list of spell checking languages.
func (*WebContext) SetWebProcessExtensionsDirectory ¶
func (context *WebContext) SetWebProcessExtensionsDirectory(directory string)
SetWebProcessExtensionsDirectory: set the directory where WebKit will look for web process extensions.
This method must be called before loading anything in this context, otherwise it will not have any effect. You can connect to KitWebContext::initialize-web-process-extensions to call this method before anything is loaded.
The function takes the following parameters:
- directory to add.
func (*WebContext) SetWebProcessExtensionsInitializationUserData ¶
func (context *WebContext) SetWebProcessExtensionsInitializationUserData(userData *glib.Variant)
SetWebProcessExtensionsInitializationUserData: set user data to be passed to Web Extensions on initialization.
The data will be passed to the KitWebProcessExtensionInitializeWithUserDataFunction. This method must be called before loading anything in this context, otherwise it will not have any effect. You can connect to KitWebContext::initialize-web-process-extensions to call this method before anything is loaded.
The function takes the following parameters:
- userData: #GVariant.
func (*WebContext) SpellCheckingEnabled ¶
func (context *WebContext) SpellCheckingEnabled() bool
SpellCheckingEnabled: get whether spell checking feature is currently enabled.
The function returns the following values:
- ok: TRUE If spell checking is enabled, or FALSE otherwise.
func (*WebContext) SpellCheckingLanguages ¶
func (context *WebContext) SpellCheckingLanguages() []string
SpellCheckingLanguages: get the the list of spell checking languages.
Get the the list of spell checking languages associated with context, or NULL if no languages have been previously set.
See webkit_web_context_set_spell_checking_languages() for more details on the format of the languages in the list.
The function returns the following values:
- utf8s: NULL-terminated array of languages if available, or NULL otherwise.
func (*WebContext) TimeZoneOverride ¶
func (context *WebContext) TimeZoneOverride() string
TimeZoneOverride: get the KitWebContext:time-zone-override property.
The function returns the following values:
type WebContextClass ¶
type WebContextClass struct {
// contains filtered or unexported fields
}
WebContextClass: instance of this type is always passed by reference.
type WebContextOverrides ¶
type WebContextOverrides struct { }
WebContextOverrides contains methods that are overridable.
type WebExtensionMode ¶
WebExtensionMode: enum values used for setting if a KitWebView is intended for WebExtensions.
const ( // WebExtensionModeNone: not for an extension. WebExtensionModeNone WebExtensionMode = iota // WebExtensionModeManifestv2: for a ManifestV2 extension. WebExtensionModeManifestv2 // WebExtensionModeManifestv3: for a ManifestV3 extension. WebExtensionModeManifestv3 )
func (WebExtensionMode) String ¶
func (w WebExtensionMode) String() string
String returns the name in string for WebExtensionMode.
type WebInspector ¶
WebInspector access to the WebKit inspector.
The WebKit Inspector is a graphical tool to inspect and change the content of a KitWebView. It also includes an interactive JavaScript debugger. Using this class one can get a Widget which can be embedded into an application to show the inspector.
The inspector is available when the KitSettings of the KitWebView has set the KitSettings:enable-developer-extras to true, otherwise no inspector is available.
// Enable the developer extras WebKitSettings *settings = webkit_web_view_get_settings (WEBKIT_WEB_VIEW(my_webview)); g_object_set (G_OBJECT(settings), "enable-developer-extras", TRUE, NULL); // Load some data or reload to be able to inspect the page webkit_web_view_load_uri (WEBKIT_WEB_VIEW(my_webview), "http://www.gnome.org"); // Show the inspector WebKitWebInspector *inspector = webkit_web_view_get_inspector (WEBKIT_WEB_VIEW(my_webview)); webkit_web_inspector_show (WEBKIT_WEB_INSPECTOR(inspector));.
func (*WebInspector) Attach ¶
func (inspector *WebInspector) Attach()
Attach: request inspector to be attached.
The signal KitWebInspector::attach will be emitted. If the inspector is already attached it does nothing.
func (*WebInspector) AttachedHeight ¶
func (inspector *WebInspector) AttachedHeight() uint
AttachedHeight: get the height that the inspector view when attached.
Get the height that the inspector view should have when it's attached. If the inspector view is not attached this returns 0.
The function returns the following values:
- guint: height of the inspector view when attached.
func (*WebInspector) CanAttach ¶
func (inspector *WebInspector) CanAttach() bool
CanAttach: whether the inspector can be attached to the same window that contains the inspected view.
The function returns the following values:
- ok: TRUE if there is enough room for the inspector view inside the window that contains the inspected view, or FALSE otherwise.
func (*WebInspector) Close ¶
func (inspector *WebInspector) Close()
Close: request inspector to be closed.
func (*WebInspector) ConnectAttach ¶
func (inspector *WebInspector) ConnectAttach(f func() (ok bool)) coreglib.SignalHandle
ConnectAttach is emitted when the inspector is requested to be attached to the window where the inspected web view is. If this signal is not handled the inspector view will be automatically attached to the inspected view, so you only need to handle this signal if you want to attach the inspector view yourself (for example, to add the inspector view to a browser tab).
To prevent the inspector view from being attached you can connect to this signal and simply return TRUE.
func (*WebInspector) ConnectBringToFront ¶
func (inspector *WebInspector) ConnectBringToFront(f func() (ok bool)) coreglib.SignalHandle
ConnectBringToFront is emitted when the inspector should be shown.
If the inspector is not attached the inspector window should be shown on top of any other windows. If the inspector is attached the inspector view should be made visible. For example, if the inspector view is attached using a tab in a browser window, the browser window should be raised and the tab containing the inspector view should be the active one. In both cases, if this signal is not handled, the default implementation calls gtk_window_present() on the current toplevel Window of the inspector view.
func (*WebInspector) ConnectClosed ¶
func (inspector *WebInspector) ConnectClosed(f func()) coreglib.SignalHandle
ConnectClosed is emitted when the inspector page is closed. If you are using your own inspector window, you should connect to this signal and destroy your window.
func (*WebInspector) ConnectDetach ¶
func (inspector *WebInspector) ConnectDetach(f func() (ok bool)) coreglib.SignalHandle
ConnectDetach is emitted when the inspector is requested to be detached from the window it is currently attached to. The inspector is detached when the inspector page is about to be closed, and this signal is emitted right before KitWebInspector::closed, or when the user clicks on the detach button in the inspector view to show the inspector in a separate window. In this case the signal KitWebInspector::open-window is emitted after this one.
To prevent the inspector view from being detached you can connect to this signal and simply return TRUE.
func (*WebInspector) ConnectOpenWindow ¶
func (inspector *WebInspector) ConnectOpenWindow(f func() (ok bool)) coreglib.SignalHandle
ConnectOpenWindow is emitted when the inspector is requested to open in a separate window. If this signal is not handled, a Window with the inspector will be created and shown, so you only need to handle this signal if you want to use your own window. This signal is emitted after KitWebInspector::detach to show the inspector in a separate window after being detached.
To prevent the inspector from being shown you can connect to this signal and simply return TRUE.
func (*WebInspector) Detach ¶
func (inspector *WebInspector) Detach()
Detach: request inspector to be detached.
The signal KitWebInspector::detach will be emitted. If the inspector is already detached it does nothing.
func (*WebInspector) InspectedURI ¶
func (inspector *WebInspector) InspectedURI() string
InspectedURI: get the URI that is currently being inspected.
This can be NULL if nothing has been loaded yet in the inspected view, if the inspector has been closed or when inspected view was loaded from a HTML string instead of a URI.
The function returns the following values:
- utf8: URI that is currently being inspected or NULL.
func (*WebInspector) IsAttached ¶
func (inspector *WebInspector) IsAttached() bool
IsAttached: whether the inspector view is currently attached to the same window that contains the inspected view.
The function returns the following values:
- ok: TRUE if inspector is currently attached or FALSE otherwise.
func (*WebInspector) Show ¶
func (inspector *WebInspector) Show()
Show: request inspector to be shown.
func (*WebInspector) WebView ¶
func (inspector *WebInspector) WebView() *WebViewBase
WebView: get the KitWebViewBase used to display the inspector.
This might be NULL if the inspector hasn't been loaded yet, or it has been closed.
The function returns the following values:
- webViewBase used to display the inspector or NULL.
type WebInspectorClass ¶
type WebInspectorClass struct {
// contains filtered or unexported fields
}
WebInspectorClass: instance of this type is always passed by reference.
type WebInspectorOverrides ¶
type WebInspectorOverrides struct { }
WebInspectorOverrides contains methods that are overridable.
type WebProcessTerminationReason ¶
WebProcessTerminationReason: enum values used to specify the reason why the web process terminated abnormally.
const ( // WebProcessCrashed: web process crashed. WebProcessCrashed WebProcessTerminationReason = iota // WebProcessExceededMemoryLimit: web process exceeded the memory limit. WebProcessExceededMemoryLimit // WebProcessTerminatedByApi: web process termination was requested by an // API call. Since: 2.34. WebProcessTerminatedByApi )
func (WebProcessTerminationReason) String ¶
func (w WebProcessTerminationReason) String() string
String returns the name in string for WebProcessTerminationReason.
type WebResource ¶
WebResource represents a resource at the end of a URI.
A KitWebResource encapsulates content for each resource at the end of a particular URI. For example, one KitWebResource will be created for each separate image and stylesheet when a page is loaded.
You can access the response and the URI for a given KitWebResource, using webkit_web_resource_get_uri() and webkit_web_resource_get_response(), as well as the raw data, using webkit_web_resource_get_data().
func (*WebResource) ConnectFailed ¶
func (resource *WebResource) ConnectFailed(f func(err error)) coreglib.SignalHandle
ConnectFailed: this signal is emitted when an error occurs during the resource load operation.
func (*WebResource) ConnectFailedWithTLSErrors ¶
func (resource *WebResource) ConnectFailedWithTLSErrors(f func(certificate gio.TLSCertificater, errors gio.TLSCertificateFlags)) coreglib.SignalHandle
ConnectFailedWithTLSErrors: this signal is emitted when a TLS error occurs during the resource load operation.
func (*WebResource) ConnectFinished ¶
func (resource *WebResource) ConnectFinished(f func()) coreglib.SignalHandle
ConnectFinished: this signal is emitted when the resource load finishes successfully or due to an error. In case of errors KitWebResource::failed signal is emitted before this one.
func (*WebResource) ConnectSentRequest ¶
func (resource *WebResource) ConnectSentRequest(f func(request *URIRequest, redirectedResponse *URIResponse)) coreglib.SignalHandle
ConnectSentRequest: this signal is emitted when request has been sent to the server. In case of a server redirection this signal is emitted again with the request argument containing the new request sent to the server due to the redirection and the redirected_response parameter containing the response received by the server for the initial request.
func (*WebResource) DataFinish ¶
func (resource *WebResource) DataFinish(result gio.AsyncResulter) ([]byte, error)
DataFinish: finish an asynchronous operation started with webkit_web_resource_get_data().
The function takes the following parameters:
- result: Result.
The function returns the following values:
- guint8s: a string with the data of resource, or NULL in case of error. if length is not NULL, the size of the data will be assigned to it.
func (*WebResource) Response ¶
func (resource *WebResource) Response() *URIResponse
Response retrieves the KitURIResponse of the resource load operation.
This method returns NULL if called before the response is received from the server. You can connect to notify::response signal to be notified when the response is received.
The function returns the following values:
- uriResponse or NULL if the response hasn't been received yet.
func (*WebResource) URI ¶
func (resource *WebResource) URI() string
URI returns the current active URI of resource.
The active URI might change during a load operation:
<orderedlist> <listitem><para> When the resource load starts, the active URI is the requested URI </para></listitem> <listitem><para> When the initial request is sent to the server, KitWebResource::sent-request signal is emitted without a redirected response, the active URI is the URI of the request sent to the server. </para></listitem> <listitem><para> In case of a server redirection, KitWebResource::sent-request signal is emitted again with a redirected response, the active URI is the URI the request was redirected to. </para></listitem> <listitem><para> When the response is received from the server, the active URI is the final one and it will not change again. </para></listitem> </orderedlist>
You can monitor the active URI by connecting to the notify::uri signal of resource.
The function returns the following values:
- utf8: current active URI of resource.
type WebResourceClass ¶
type WebResourceClass struct {
// contains filtered or unexported fields
}
WebResourceClass: instance of this type is always passed by reference.
type WebResourceOverrides ¶
type WebResourceOverrides struct { }
WebResourceOverrides contains methods that are overridable.
type WebView ¶
type WebView struct { WebViewBase // contains filtered or unexported fields }
WebView: central class of the WPE WebKit and WebKitGTK APIs.
KitWebView is the central class of the WPE WebKit and WebKitGTK APIs. It is responsible for managing the drawing of the content and forwarding of events. You can load any URI into the KitWebView or a data string. With KitSettings you can control various aspects of the rendering and loading of the content.
Note that in WebKitGTK, KitWebView is scrollable by itself, so you don't need to embed it in a ScrolledWindow.
func NewWebView ¶
func NewWebView() *WebView
NewWebView creates a new KitWebView with the default KitWebContext.
Creates a new KitWebView with the default KitWebContext and no KitUserContentManager associated with it. See also webkit_web_view_new_with_context(), webkit_web_view_new_with_user_content_manager(), and webkit_web_view_new_with_settings().
The function returns the following values:
- webView: newly created KitWebView widget.
func (*WebView) AutomationPresentationType ¶
func (webView *WebView) AutomationPresentationType() AutomationBrowsingContextPresentation
AutomationPresentationType: get the presentation type of KitWebView when created for automation.
The function returns the following values:
- automationBrowsingContextPresentation: KitAutomationBrowsingContextPresentation.
func (*WebView) BackForwardList ¶
func (webView *WebView) BackForwardList() *BackForwardList
BackForwardList obtains the KitBackForwardList associated with the given KitWebView.
The KitBackForwardList is owned by the KitWebView.
The function returns the following values:
- backForwardList: KitBackForwardList.
func (*WebView) BackgroundColor ¶
func (webView *WebView) BackgroundColor() *gdk.RGBA
BackgroundColor gets the color that is used to draw the web_view background.
Gets the color that is used to draw the web_view background before the actual contents are rendered. For more information see also webkit_web_view_set_background_color().
The function returns the following values:
- rgba to fill in with the background color.
func (*WebView) CallAsyncJavascriptFunctionFinish ¶
func (webView *WebView) CallAsyncJavascriptFunctionFinish(result gio.AsyncResulter) (*javascriptcore.Value, error)
CallAsyncJavascriptFunctionFinish: finish an asynchronous operation started with webkit_web_view_call_async_javascript_function().
The function takes the following parameters:
- result: Result.
The function returns the following values:
- value with the return value of the async function or NULL in case of error.
func (*WebView) CameraCaptureState ¶
func (webView *WebView) CameraCaptureState() MediaCaptureState
CameraCaptureState: get the camera capture state of a KitWebView.
The function returns the following values:
- mediaCaptureState of the camera device. If KitSettings:enable-mediastream is FALSE, this method will return WEBKIT_MEDIA_CAPTURE_STATE_NONE.
func (*WebView) CanExecuteEditingCommandFinish ¶
CanExecuteEditingCommandFinish: finish an asynchronous operation started with webkit_web_view_can_execute_editing_command().
The function takes the following parameters:
- result: Result.
func (*WebView) CanGoBack ¶
CanGoBack determines whether web_view has a previous history item.
The function returns the following values:
- ok: TRUE if able to move back or FALSE otherwise.
func (*WebView) CanGoForward ¶
CanGoForward determines whether web_view has a next history item.
The function returns the following values:
- ok: TRUE if able to move forward or FALSE otherwise.
func (*WebView) CanShowMIMEType ¶
CanShowMIMEType: whether or not a MIME type can be displayed in web_view.
The function takes the following parameters:
- mimeType: MIME type.
The function returns the following values:
- ok: TRUE if the MIME type mime_type can be displayed or FALSE otherwise.
func (*WebView) ConnectAuthenticate ¶
func (webView *WebView) ConnectAuthenticate(f func(request *AuthenticationRequest) (ok bool)) coreglib.SignalHandle
ConnectAuthenticate: this signal is emitted when the user is challenged with HTTP authentication. To let the application access or supply the credentials as well as to allow the client application to either cancel the request or perform the authentication, the signal will pass an instance of the KitAuthenticationRequest in the request argument. To handle this signal asynchronously you should keep a ref of the request and return TRUE. To disable HTTP authentication entirely, connect to this signal and simply return TRUE.
The default signal handler will run a default authentication dialog asynchronously for the user to interact with.
func (*WebView) ConnectClose ¶
func (webView *WebView) ConnectClose(f func()) coreglib.SignalHandle
ConnectClose is emitted when closing a KitWebView is requested. This occurs when a call is made from JavaScript's <function>window.close</function> function or after trying to close the web_view with webkit_web_view_try_close(). It is the owner's responsibility to handle this signal to hide or destroy the KitWebView, if necessary.
func (*WebView) ConnectContextMenu ¶
func (webView *WebView) ConnectContextMenu(f func(contextMenu *ContextMenu, hitTestResult *HitTestResult) (ok bool)) coreglib.SignalHandle
ConnectContextMenu is emitted when a context menu is about to be displayed to give the application a chance to customize the proposed menu, prevent the menu from being displayed, or build its own context menu. <itemizedlist> <listitem><para> To customize the proposed menu you can use webkit_context_menu_prepend(), webkit_context_menu_append() or webkit_context_menu_insert() to add new KitContextMenuItem<!-- -->s to context_menu, webkit_context_menu_move_item() to reorder existing items, or webkit_context_menu_remove() to remove an existing item. The signal handler should return FALSE, and the menu represented by context_menu will be shown. </para></listitem> <listitem><para> To prevent the menu from being displayed you can just connect to this signal and return TRUE so that the proposed menu will not be shown. </para></listitem> <listitem><para> To build your own menu, you can remove all items from the proposed menu with webkit_context_menu_remove_all(), add your own items and return FALSE so that the menu will be shown. You can also ignore the proposed KitContextMenu, build your own Menu and return TRUE to prevent the proposed menu from being shown. </para></listitem> <listitem><para> If you just want the default menu to be shown always, simply don't connect to this signal because showing the proposed context menu is the default behaviour. </para></listitem> </itemizedlist>
If the signal handler returns FALSE the context menu represented by context_menu will be shown, if it return TRUE the context menu will not be shown.
The proposed KitContextMenu passed in context_menu argument is only valid during the signal emission.
func (*WebView) ConnectContextMenuDismissed ¶
func (webView *WebView) ConnectContextMenuDismissed(f func()) coreglib.SignalHandle
ConnectContextMenuDismissed is emitted after KitWebView::context-menu signal, if the context menu is shown, to notify that the context menu is dismissed.
func (*WebView) ConnectCreate ¶
func (webView *WebView) ConnectCreate(f func(navigationAction *NavigationAction) (widget gtk.Widgetter)) coreglib.SignalHandle
ConnectCreate is emitted when the creation of a new KitWebView is requested. If this signal is handled the signal handler should return the newly created KitWebView.
The KitNavigationAction parameter contains information about the navigation action that triggered this signal.
The new KitWebView must be related to web_view, see KitWebView:related-view for more details.
The new KitWebView should not be displayed to the user until the KitWebView::ready-to-show signal is emitted.
func (*WebView) ConnectDecidePolicy ¶
func (webView *WebView) ConnectDecidePolicy(f func(decision PolicyDecisioner, decisionType PolicyDecisionType) (ok bool)) coreglib.SignalHandle
ConnectDecidePolicy: this signal is emitted when WebKit is requesting the client to decide a policy decision, such as whether to navigate to a page, open a new window or whether or not to download a resource. The KitNavigationPolicyDecision passed in the decision argument is a generic type, but should be casted to a more specific type when making the decision. For example:
static gboolean decide_policy_cb (WebKitWebView *web_view, WebKitPolicyDecision *decision, WebKitPolicyDecisionType type) { switch (type) { case WEBKIT_POLICY_DECISION_TYPE_NAVIGATION_ACTION: { WebKitNavigationPolicyDecision *navigation_decision = WEBKIT_NAVIGATION_POLICY_DECISION (decision); // Make a policy decision here break; } case WEBKIT_POLICY_DECISION_TYPE_NEW_WINDOW_ACTION: { WebKitNavigationPolicyDecision *navigation_decision = WEBKIT_NAVIGATION_POLICY_DECISION (decision); // Make a policy decision here break; } case WEBKIT_POLICY_DECISION_TYPE_RESPONSE: WebKitResponsePolicyDecision *response = WEBKIT_RESPONSE_POLICY_DECISION (decision); // Make a policy decision here break; default: // Making no decision results in webkit_policy_decision_use() return FALSE; } return TRUE; }
It is possible to make policy decision asynchronously, by simply calling g_object_ref() on the decision argument and returning TRUE to block the default signal handler. If the last reference is removed on a KitPolicyDecision and no decision has been made explicitly, webkit_policy_decision_use() will be the default policy decision. The default signal handler will simply call webkit_policy_decision_use(). Only the first policy decision chosen for a given KitPolicyDecision will have any affect.
func (*WebView) ConnectEnterFullscreen ¶
func (webView *WebView) ConnectEnterFullscreen(f func() (ok bool)) coreglib.SignalHandle
ConnectEnterFullscreen is emitted when JavaScript code calls <function>element.webkitRequestFullScreen</function>. If the signal is not handled the KitWebView will proceed to full screen its top level window. This signal can be used by client code to request permission to the user prior doing the full screen transition and eventually prepare the top-level window (e.g. hide some widgets that would otherwise be part of the full screen window).
func (*WebView) ConnectInsecureContentDetected ¶
func (webView *WebView) ConnectInsecureContentDetected(f func(event InsecureContentEvent)) coreglib.SignalHandle
ConnectInsecureContentDetected: this signal is emitted when insecure content has been detected in a page loaded through a secure connection. This typically means that a external resource from an unstrusted source has been run or displayed, resulting in a mix of HTTPS and non-HTTPS content.
You can check the event parameter to know exactly which kind of event has been detected (see KitInsecureContentEvent).
func (*WebView) ConnectLeaveFullscreen ¶
func (webView *WebView) ConnectLeaveFullscreen(f func() (ok bool)) coreglib.SignalHandle
ConnectLeaveFullscreen is emitted when the KitWebView is about to restore its top level window out of its full screen state. This signal can be used by client code to restore widgets hidden during the KitWebView::enter-fullscreen stage for instance.
func (*WebView) ConnectLoadChanged ¶
func (webView *WebView) ConnectLoadChanged(f func(loadEvent LoadEvent)) coreglib.SignalHandle
ConnectLoadChanged is emitted when a load operation in web_view changes. The signal is always emitted with WEBKIT_LOAD_STARTED when a new load request is made and WEBKIT_LOAD_FINISHED when the load finishes successfully or due to an error. When the ongoing load operation fails KitWebView::load-failed signal is emitted before KitWebView::load-changed is emitted with WEBKIT_LOAD_FINISHED. If a redirection is received from the server, this signal is emitted with WEBKIT_LOAD_REDIRECTED after the initial emission with WEBKIT_LOAD_STARTED and before WEBKIT_LOAD_COMMITTED. When the page content starts arriving the signal is emitted with WEBKIT_LOAD_COMMITTED event.
You can handle this signal and use a switch to track any ongoing load operation.
static void web_view_load_changed (WebKitWebView *web_view, WebKitLoadEvent load_event, gpointer user_data) { switch (load_event) { case WEBKIT_LOAD_STARTED: // New load, we have now a provisional URI provisional_uri = webkit_web_view_get_uri (web_view); // Here we could start a spinner or update the // location bar with the provisional URI break; case WEBKIT_LOAD_REDIRECTED: redirected_uri = webkit_web_view_get_uri (web_view); break; case WEBKIT_LOAD_COMMITTED: // The load is being performed. Current URI is // the final one and it won't change unless a new // load is requested or a navigation within the // same page is performed uri = webkit_web_view_get_uri (web_view); break; case WEBKIT_LOAD_FINISHED: // Load finished, we can now stop the spinner break; } }.
func (*WebView) ConnectLoadFailed ¶
func (webView *WebView) ConnectLoadFailed(f func(loadEvent LoadEvent, failingUri string, err error) (ok bool)) coreglib.SignalHandle
ConnectLoadFailed is emitted when an error occurs during a load operation. If the error happened when starting to load data for a page load_event will be WEBKIT_LOAD_STARTED. If it happened while loading a committed data source load_event will be WEBKIT_LOAD_COMMITTED. Since a load error causes the load operation to finish, the signal WebKitWebView::load-changed will always be emitted with WEBKIT_LOAD_FINISHED event right after this one.
By default, if the signal is not handled, a stock error page will be displayed. You need to handle the signal if you want to provide your own error page.
func (*WebView) ConnectLoadFailedWithTLSErrors ¶
func (webView *WebView) ConnectLoadFailedWithTLSErrors(f func(failingUri string, certificate gio.TLSCertificater, errors gio.TLSCertificateFlags) (ok bool)) coreglib.SignalHandle
ConnectLoadFailedWithTLSErrors is emitted when a TLS error occurs during a load operation. To allow an exception for this certificate and the host of failing_uri use webkit_web_context_allow_tls_certificate_for_host().
To handle this signal asynchronously you should call g_object_ref() on certificate and return TRUE.
If FALSE is returned, KitWebView::load-failed will be emitted. The load will finish regardless of the returned value.
func (*WebView) ConnectMouseTargetChanged ¶
func (webView *WebView) ConnectMouseTargetChanged(f func(hitTestResult *HitTestResult, modifiers uint)) coreglib.SignalHandle
ConnectMouseTargetChanged: this signal is emitted when the mouse cursor moves over an element such as a link, image or a media element. To determine what type of element the mouse cursor is over, a Hit Test is performed on the current mouse coordinates and the result is passed in the hit_test_result argument. The modifiers argument is a bitmask of ModifierType flags indicating the state of modifier keys. The signal is emitted again when the mouse is moved out of the current element with a new hit_test_result.
func (*WebView) ConnectPermissionRequest ¶
func (webView *WebView) ConnectPermissionRequest(f func(request PermissionRequester) (ok bool)) coreglib.SignalHandle
ConnectPermissionRequest: this signal is emitted when WebKit is requesting the client to decide about a permission request, such as allowing the browser to switch to fullscreen mode, sharing its location or similar operations.
A possible way to use this signal could be through a dialog allowing the user decide what to do with the request:
static gboolean permission_request_cb (WebKitWebView *web_view, WebKitPermissionRequest *request, GtkWindow *parent_window) { GtkWidget *dialog = gtk_message_dialog_new (parent_window, GTK_DIALOG_MODAL, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, "Allow Permission Request?"); gtk_widget_show (dialog); gint result = gtk_dialog_run (GTK_DIALOG (dialog)); switch (result) { case GTK_RESPONSE_YES: webkit_permission_request_allow (request); break; default: webkit_permission_request_deny (request); break; } gtk_widget_destroy (dialog); return TRUE; }
It is possible to handle permission requests asynchronously, by simply calling g_object_ref() on the request argument and returning TRUE to block the default signal handler. If the last reference is removed on a KitPermissionRequest and the request has not been handled, webkit_permission_request_deny() will be the default action.
If the signal is not handled, the request will be completed automatically by the specific KitPermissionRequest that could allow or deny it. Check the documentation of classes implementing KitPermissionRequest interface to know their default action.
func (*WebView) ConnectPrint ¶
func (webView *WebView) ConnectPrint(f func(printOperation *PrintOperation) (ok bool)) coreglib.SignalHandle
ConnectPrint is emitted when printing is requested on web_view, usually by a JavaScript call, before the print dialog is shown. This signal can be used to set the initial print settings and page setup of print_operation to be used as default values in the print dialog. You can call webkit_print_operation_set_print_settings() and webkit_print_operation_set_page_setup() and then return FALSE to propagate the event so that the print dialog is shown.
You can connect to this signal and return TRUE to cancel the print operation or implement your own print dialog.
func (*WebView) ConnectQueryPermissionState ¶
func (webView *WebView) ConnectQueryPermissionState(f func(query *PermissionStateQuery) (ok bool)) coreglib.SignalHandle
ConnectQueryPermissionState: this signal allows the User-Agent to respond to permission requests for powerful features, as specified by the Permissions W3C Specification (https://w3c.github.io/permissions/). You can reply to the query using webkit_permission_state_query_finish().
You can handle the query asynchronously by calling webkit_permission_state_query_ref() on query and returning TRUE. If the last reference of query is removed and the query has not been handled, the query result will be set to WEBKIT_QUERY_PERMISSION_PROMPT.
func (*WebView) ConnectReadyToShow ¶
func (webView *WebView) ConnectReadyToShow(f func()) coreglib.SignalHandle
ConnectReadyToShow is emitted after KitWebView::create on the newly created KitWebView when it should be displayed to the user. When this signal is emitted all the information about how the window should look, including size, position, whether the location, status and scrollbars should be displayed, is already set on the KitWindowProperties of web_view. See also webkit_web_view_get_window_properties().
func (*WebView) ConnectResourceLoadStarted ¶
func (webView *WebView) ConnectResourceLoadStarted(f func(resource *WebResource, request *URIRequest)) coreglib.SignalHandle
ConnectResourceLoadStarted is emitted when a new resource is going to be loaded. The request parameter contains the KitURIRequest that will be sent to the server. You can monitor the load operation by connecting to the different signals of resource.
func (*WebView) ConnectRunAsModal ¶
func (webView *WebView) ConnectRunAsModal(f func()) coreglib.SignalHandle
ConnectRunAsModal is emitted after KitWebView::ready-to-show on the newly created KitWebView when JavaScript code calls <function>window.showModalDialog</function>. The purpose of this signal is to allow the client application to prepare the new view to behave as modal. Once the signal is emitted a new main loop will be run to block user interaction in the parent KitWebView until the new dialog is closed.
func (*WebView) ConnectRunColorChooser ¶
func (webView *WebView) ConnectRunColorChooser(f func(request *ColorChooserRequest) (ok bool)) coreglib.SignalHandle
ConnectRunColorChooser: this signal is emitted when the user interacts with a <input type='color' /> HTML element, requesting from WebKit to show a dialog to select a color. To let the application know the details of the color chooser, as well as to allow the client application to either cancel the request or perform an actual color selection, the signal will pass an instance of the KitColorChooserRequest in the request argument.
It is possible to handle this request asynchronously by increasing the reference count of the request.
The default signal handler will asynchronously run a regular ColorChooser for the user to interact with.
func (*WebView) ConnectRunFileChooser ¶
func (webView *WebView) ConnectRunFileChooser(f func(request *FileChooserRequest) (ok bool)) coreglib.SignalHandle
ConnectRunFileChooser: this signal is emitted when the user interacts with a <input type='file' /> HTML element, requesting from WebKit to show a dialog to select one or more files to be uploaded. To let the application know the details of the file chooser, as well as to allow the client application to either cancel the request or perform an actual selection of files, the signal will pass an instance of the KitFileChooserRequest in the request argument.
The default signal handler will asynchronously run a regular FileChooserDialog for the user to interact with.
func (*WebView) ConnectScriptDialog ¶
func (webView *WebView) ConnectScriptDialog(f func(dialog *ScriptDialog) (ok bool)) coreglib.SignalHandle
ConnectScriptDialog is emitted when JavaScript code calls <function>window.alert</function>, <function>window.confirm</function> or <function>window.prompt</function>, or when <function>onbeforeunload</function> event is fired. The dialog parameter should be used to build the dialog. If the signal is not handled a different dialog will be built and shown depending on the dialog type: <itemizedlist> <listitem><para> WEBKIT_SCRIPT_DIALOG_ALERT: message dialog with a single Close button. </para></listitem> <listitem><para> WEBKIT_SCRIPT_DIALOG_CONFIRM: message dialog with OK and Cancel buttons. </para></listitem> <listitem><para> WEBKIT_SCRIPT_DIALOG_PROMPT: message dialog with OK and Cancel buttons and a text entry with the default text. </para></listitem> <listitem><para> WEBKIT_SCRIPT_DIALOG_BEFORE_UNLOAD_CONFIRM: message dialog with Stay and Leave buttons. </para></listitem> </itemizedlist>
It is possible to handle the script dialog request asynchronously, by simply caling webkit_script_dialog_ref() on the dialog argument and calling webkit_script_dialog_close() when done. If the last reference is removed on a KitScriptDialog and the dialog has not been closed, webkit_script_dialog_close() will be called.
func (*WebView) ConnectShowNotification ¶
func (webView *WebView) ConnectShowNotification(f func(notification *Notification) (ok bool)) coreglib.SignalHandle
ConnectShowNotification: this signal is emitted when a notification should be presented to the user. The notification is kept alive until either: 1) the web page cancels it or 2) a navigation happens.
The default handler will emit a notification using libnotify, if built with support for it.
func (*WebView) ConnectShowOptionMenu ¶
func (webView *WebView) ConnectShowOptionMenu(f func(menu *OptionMenu, rectangle *gdk.Rectangle) (ok bool)) coreglib.SignalHandle
ConnectShowOptionMenu: this signal is emitted when a select element in web_view needs to display a dropdown menu. This signal can be used to show a custom menu, using menu to get the details of all items that should be displayed. The area of the element in the KitWebView is given as rectangle parameter, it can be used to position the menu. To handle this signal asynchronously you should keep a ref of the menu.
The default signal handler will pop up a Menu.
func (*WebView) ConnectSubmitForm ¶
func (webView *WebView) ConnectSubmitForm(f func(request *FormSubmissionRequest)) coreglib.SignalHandle
ConnectSubmitForm: this signal is emitted when a form is about to be submitted. The request argument passed contains information about the text fields of the form. This is typically used to store login information that can be used later to pre-fill the form. The form will not be submitted until webkit_form_submission_request_submit() is called.
It is possible to handle the form submission request asynchronously, by simply calling g_object_ref() on the request argument and calling webkit_form_submission_request_submit() when done to continue with the form submission. If the last reference is removed on a KitFormSubmissionRequest and the form has not been submitted, webkit_form_submission_request_submit() will be called.
func (*WebView) ConnectUserMessageReceived ¶
func (webView *WebView) ConnectUserMessageReceived(f func(message *UserMessage) (ok bool)) coreglib.SignalHandle
ConnectUserMessageReceived: this signal is emitted when a KitUserMessage is received from the KitWebPage corresponding to web_view. You can reply to the message using webkit_user_message_send_reply().
You can handle the user message asynchronously by calling g_object_ref() on message and returning TRUE. If the last reference of message is removed and the message has not been replied to, the operation in the KitWebPage will finish with error WEBKIT_USER_MESSAGE_UNHANDLED_MESSAGE.
func (*WebView) ConnectWebProcessTerminated ¶
func (webView *WebView) ConnectWebProcessTerminated(f func(reason WebProcessTerminationReason)) coreglib.SignalHandle
ConnectWebProcessTerminated: this signal is emitted when the web process terminates abnormally due to reason.
func (*WebView) Context ¶
func (webView *WebView) Context() *WebContext
Context gets the web context of web_view.
The function returns the following values:
- webContext of the view.
func (*WebView) CustomCharset ¶
CustomCharset returns the current custom character encoding name of web_view.
The function returns the following values:
- utf8: current custom character encoding name or NULL if no custom character encoding has been set.
func (*WebView) DefaultContentSecurityPolicy ¶
DefaultContentSecurityPolicy gets the configured default Content-Security-Policy.
The function returns the following values:
- utf8 (optional): default policy or NULL.
func (*WebView) DisplayCaptureState ¶
func (webView *WebView) DisplayCaptureState() MediaCaptureState
DisplayCaptureState: get the display capture state of a KitWebView.
The function returns the following values:
- mediaCaptureState of the display device. If KitSettings:enable-mediastream is FALSE, this method will return WEBKIT_MEDIA_CAPTURE_STATE_NONE.
func (*WebView) DownloadURI ¶
DownloadURI requests downloading of the specified URI string for web_view.
The function takes the following parameters:
- uri: URI to download.
The function returns the following values:
- download: new KitDownload representing the download operation.
func (*WebView) EditorState ¶
func (webView *WebView) EditorState() *EditorState
EditorState gets the web editor state of web_view.
The function returns the following values:
- editorState of the view.
func (*WebView) EstimatedLoadProgress ¶
EstimatedLoadProgress gets the value of the KitWebView:estimated-load-progress property.
You can monitor the estimated progress of a load operation by connecting to the notify::estimated-load-progress signal of web_view.
The function returns the following values:
- gdouble: estimate of the of the percent complete for a document load as a range from 0.0 to 1.0.
func (*WebView) EvaluateJavascriptFinish ¶
func (webView *WebView) EvaluateJavascriptFinish(result gio.AsyncResulter) (*javascriptcore.Value, error)
EvaluateJavascriptFinish: finish an asynchronous operation started with webkit_web_view_evaluate_javascript().
The function takes the following parameters:
- result: Result.
The function returns the following values:
- value with the result of the last executed statement in script or NULL in case of error.
func (*WebView) ExecuteEditingCommand ¶
ExecuteEditingCommand: request to execute the given command for web_view.
You can use webkit_web_view_can_execute_editing_command() to check whether it's possible to execute the command.
The function takes the following parameters:
- command to execute.
func (*WebView) ExecuteEditingCommandWithArgument ¶
ExecuteEditingCommandWithArgument: request to execute the given command with argument for web_view.
You can use webkit_web_view_can_execute_editing_command() to check whether it's possible to execute the command.
The function takes the following parameters:
- command to execute.
- argument: command argument.
func (*WebView) Favicon ¶
func (webView *WebView) Favicon() gdk.Texturer
Favicon returns favicon currently associated to web_view.
Returns favicon currently associated to web_view, if any. You can connect to notify::favicon signal of web_view to be notified when the favicon is available.
The function returns the following values:
- texture: favicon image or NULL if there's no icon associated with web_view.
func (*WebView) FindController ¶
func (webView *WebView) FindController() *FindController
FindController gets the KitFindController.
Gets the KitFindController that will allow the caller to query the KitWebView for the text to look for.
The function returns the following values:
- findController associated to this particular KitWebView.
func (*WebView) GoBack ¶
func (webView *WebView) GoBack()
GoBack loads the previous history item.
You can monitor the load operation by connecting to KitWebView::load-changed signal.
func (*WebView) GoForward ¶
func (webView *WebView) GoForward()
GoForward loads the next history item.
You can monitor the load operation by connecting to KitWebView::load-changed signal.
func (*WebView) GoToBackForwardListItem ¶
func (webView *WebView) GoToBackForwardListItem(listItem *BackForwardListItem)
GoToBackForwardListItem loads the specific history item list_item.
You can monitor the load operation by connecting to KitWebView::load-changed signal.
The function takes the following parameters:
- listItem: KitBackForwardListItem.
func (*WebView) InputMethodContext ¶
func (webView *WebView) InputMethodContext() InputMethodContexter
InputMethodContext: get the KitInputMethodContext currently in use by web_view.
Get the KitInputMethodContext currently in use by web_view, or NULL if no input method is being used.
The function returns the following values:
- inputMethodContext (optional) or NULL.
func (*WebView) Inspector ¶
func (webView *WebView) Inspector() *WebInspector
Inspector: get the KitWebInspector associated to web_view.
The function returns the following values:
- webInspector of web_view.
func (*WebView) IsControlledByAutomation ¶
IsControlledByAutomation: get whether a KitWebView was created with KitWebView:is-controlled-by-automation property enabled.
Only KitWebView<!-- -->s controlled by automation can be used in an automation session.
The function returns the following values:
- ok: TRUE if web_view is controlled by automation, or FALSE otherwise.
func (*WebView) IsEditable ¶
IsEditable gets whether the user is allowed to edit the HTML document.
When web_view is not editable an element in the HTML document can only be edited if the CONTENTEDITABLE attribute has been set on the element or one of its parent elements. By default a KitWebView is not editable.
The function returns the following values:
- ok: TRUE if the user is allowed to edit the HTML document, or FALSE otherwise.
func (*WebView) IsLoading ¶
IsLoading gets the value of the KitWebView:is-loading property.
You can monitor when a KitWebView is loading a page by connecting to notify::is-loading signal of web_view. This is useful when you are interesting in knowing when the view is loading something but not in the details about the status of the load operation, for example to start a spinner when the view is loading a page and stop it when it finishes.
The function returns the following values:
- ok: TRUE if web_view is loading a page or FALSE otherwise.
func (*WebView) IsMuted ¶
IsMuted gets the mute state of web_view.
The function returns the following values:
- ok: TRUE if web_view audio is muted or FALSE is audio is not muted.
func (*WebView) IsPlayingAudio ¶
IsPlayingAudio gets the value of the KitWebView:is-playing-audio property.
You can monitor when a page in a KitWebView is playing audio by connecting to the notify::is-playing-audio signal of web_view. This is useful when the application wants to provide visual feedback when a page is producing sound.
The function returns the following values:
- ok: TRUE if a page in web_view is playing audio or FALSE otherwise.
func (*WebView) IsWebProcessResponsive ¶
IsWebProcessResponsive: get whether the current web process of a KitWebView is responsive.
The function returns the following values:
- ok: TRUE if the web process attached to web_view is responsive, or FALSE otherwise.
func (*WebView) LoadAlternateHtml ¶
LoadAlternateHtml: load the given content string for the URI content_uri.
This allows clients to display page-loading errors in the KitWebView itself. When this method is called from KitWebView::load-failed signal to show an error page, then the back-forward list is maintained appropriately. For everything else this method works the same way as webkit_web_view_load_html().
The function takes the following parameters:
- content: new content to display as the main page of the web_view.
- contentUri: URI for the alternate page content.
- baseUri (optional): base URI for relative locations or NULL.
func (*WebView) LoadBytes ¶
LoadBytes: load the specified bytes into web_view using the given mime_type and encoding.
When mime_type is NULL, it defaults to "text/html". When encoding is NULL, it defaults to "UTF-8". When base_uri is NULL, it defaults to "about:blank". You can monitor the load operation by connecting to KitWebView::load-changed signal.
The function takes the following parameters:
- bytes: input data to load.
- mimeType (optional): MIME type of bytes, or NULL.
- encoding (optional): character encoding of bytes, or NULL.
- baseUri (optional): base URI for relative locations or NULL.
func (*WebView) LoadHtml ¶
LoadHtml: load the given content string with the specified base_uri.
If base_uri is not NULL, relative URLs in the content will be resolved against base_uri and absolute local paths must be children of the base_uri. For security reasons absolute local paths that are not children of base_uri will cause the web process to terminate. If you need to include URLs in content that are local paths in a different directory than base_uri you can build a data URI for them. When base_uri is NULL, it defaults to "about:blank". The mime type of the document will be "text/html". You can monitor the load operation by connecting to KitWebView::load-changed signal.
The function takes the following parameters:
- content: HTML string to load.
- baseUri (optional): base URI for relative locations or NULL.
func (*WebView) LoadPlainText ¶
LoadPlainText: load the specified plain_text string into web_view.
The mime type of document will be "text/plain". You can monitor the load operation by connecting to KitWebView::load-changed signal.
The function takes the following parameters:
- plainText: plain text to load.
func (*WebView) LoadRequest ¶
func (webView *WebView) LoadRequest(request *URIRequest)
LoadRequest requests loading of the specified KitURIRequest.
You can monitor the load operation by connecting to KitWebView::load-changed signal.
The function takes the following parameters:
- request to load.
func (*WebView) LoadURI ¶
LoadURI requests loading of the specified URI string.
You can monitor the load operation by connecting to KitWebView::load-changed signal.
The function takes the following parameters:
- uri: URI string.
func (*WebView) MainResource ¶
func (webView *WebView) MainResource() *WebResource
MainResource: return the main resource of web_view.
The function returns the following values:
- webResource: main KitWebResource of the view or NULL if nothing has been loaded.
func (*WebView) MicrophoneCaptureState ¶
func (webView *WebView) MicrophoneCaptureState() MediaCaptureState
MicrophoneCaptureState: get the microphone capture state of a KitWebView.
The function returns the following values:
- mediaCaptureState of the microphone device. If KitSettings:enable-mediastream is FALSE, this method will return WEBKIT_MEDIA_CAPTURE_STATE_NONE.
func (*WebView) NetworkSession ¶
func (webView *WebView) NetworkSession() *NetworkSession
NetworkSession: get the KitNetworkSession associated to web_view.
The function returns the following values:
- networkSession: KitNetworkSession.
func (*WebView) PageID ¶
PageID: get the identifier of the KitWebPage corresponding to the KitWebView.
The function returns the following values:
- guint64: page ID of web_view.
func (*WebView) Reload ¶
func (webView *WebView) Reload()
Reload reloads the current contents of web_view.
See also webkit_web_view_reload_bypass_cache().
func (*WebView) ReloadBypassCache ¶
func (webView *WebView) ReloadBypassCache()
ReloadBypassCache reloads the current contents of web_view without using any cached data.
func (*WebView) RestoreSessionState ¶
func (webView *WebView) RestoreSessionState(state *WebViewSessionState)
RestoreSessionState: restore the web_view session state from state.
The function takes the following parameters:
- state: KitWebViewSessionState.
func (*WebView) SaveFinish ¶
SaveFinish: finish an asynchronous operation started with webkit_web_view_save().
The function takes the following parameters:
- result: Result.
The function returns the following values:
- inputStream with the result of saving the current web page or NULL in case of error.
func (*WebView) SaveToFileFinish ¶
SaveToFileFinish: finish an asynchronous operation started with webkit_web_view_save_to_file().
The function takes the following parameters:
- result: Result.
func (*WebView) SendMessageToPageFinish ¶
func (webView *WebView) SendMessageToPageFinish(result gio.AsyncResulter) (*UserMessage, error)
SendMessageToPageFinish: finish an asynchronous operation started with webkit_web_view_send_message_to_page().
The function takes the following parameters:
- result: Result.
The function returns the following values:
- userMessage with the reply or NULL in case of error.
func (*WebView) SessionState ¶
func (webView *WebView) SessionState() *WebViewSessionState
SessionState gets the current session state of web_view.
The function returns the following values:
- webViewSessionState: KitWebViewSessionState.
func (*WebView) SetBackgroundColor ¶
func (webView *WebView) SetBackgroundColor(rgba *gdk.RGBA)
SetBackgroundColor sets the color that will be used to draw the web_view background.
Sets the color that will be used to draw the web_view background before the actual contents are rendered. Note that if the web page loaded in web_view specifies a background color, it will take precedence over the rgba color. By default the web_view background color is opaque white. Note that the parent window must have a RGBA visual and Widget:app-paintable property set to TRUE for backgrounds colors to work.
static void browser_window_set_background_color (BrowserWindow *window, const GdkRGBA *rgba) { WebKitWebView *web_view; GdkScreen *screen = gtk_window_get_screen (GTK_WINDOW (window)); GdkVisual *rgba_visual = gdk_screen_get_rgba_visual (screen); if (!rgba_visual) return; gtk_widget_set_visual (GTK_WIDGET (window), rgba_visual); gtk_widget_set_app_paintable (GTK_WIDGET (window), TRUE); web_view = browser_window_get_web_view (window); webkit_web_view_set_background_color (web_view, rgba); }.
The function takes the following parameters:
- rgba: RGBA.
func (*WebView) SetCameraCaptureState ¶
func (webView *WebView) SetCameraCaptureState(state MediaCaptureState)
SetCameraCaptureState: set the camera capture state of a KitWebView.
If KitSettings:enable-mediastream is FALSE, this method will have no visible effect. Once the state of the device has been set to WEBKIT_MEDIA_CAPTURE_STATE_NONE it cannot be changed anymore. The page can however request capture again using the mediaDevices API.
The function takes the following parameters:
- state: KitMediaCaptureState.
func (*WebView) SetCorsAllowlist ¶
SetCorsAllowlist sets the allowlist for CORS.
Sets the allowlist for which Cross-Origin Resource Sharing (https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) checks are disabled in web_view. URI patterns must be of the form [protocol]://[host]/path, each component may contain the wildcard character (*) to represent zero or more other characters. All three components are required and must not be omitted from the URI patterns.
Disabling CORS checks permits resources from other origins to load allowlisted resources. It does not permit the allowlisted resources to load resources from other origins.
If this function is called multiple times, only the allowlist set by the most recent call will be effective.
The function takes the following parameters:
- allowlist (optional) of URI patterns, or NULL.
func (*WebView) SetCustomCharset ¶
SetCustomCharset sets the current custom character encoding override of web_view.
The custom character encoding will override any text encoding detected via HTTP headers or META tags. Calling this method will stop any current load operation and reload the current page. Setting the custom character encoding to NULL removes the character encoding override.
The function takes the following parameters:
- charset (optional): character encoding name or NULL.
func (*WebView) SetDisplayCaptureState ¶
func (webView *WebView) SetDisplayCaptureState(state MediaCaptureState)
SetDisplayCaptureState: set the display capture state of a KitWebView.
If KitSettings:enable-mediastream is FALSE, this method will have no visible effect. Once the state of the device has been set to WEBKIT_MEDIA_CAPTURE_STATE_NONE it cannot be changed anymore. The page can however request capture again using the mediaDevices API.
The function takes the following parameters:
- state: KitMediaCaptureState.
func (*WebView) SetEditable ¶
SetEditable sets whether the user is allowed to edit the HTML document.
If editable is TRUE, web_view allows the user to edit the HTML document. If editable is FALSE, an element in web_view's document can only be edited if the CONTENTEDITABLE attribute has been set on the element or one of its parent elements. By default a KitWebView is not editable.
Normally, a HTML document is not editable unless the elements within the document are editable. This function provides a way to make the contents of a KitWebView editable without altering the document or DOM structure.
The function takes the following parameters:
- editable indicating the editable state.
func (*WebView) SetInputMethodContext ¶
func (webView *WebView) SetInputMethodContext(context InputMethodContexter)
SetInputMethodContext: set the KitInputMethodContext to be used by web_view.
Set the KitInputMethodContext to be used by web_view, or NULL to not use any input method. Note that the same KitInputMethodContext can't be set on more than one KitWebView at the same time.
The function takes the following parameters:
- context (optional) to set, or NULL.
func (*WebView) SetIsMuted ¶
SetIsMuted sets the mute state of web_view.
The function takes the following parameters:
- muted: mute flag.
func (*WebView) SetMicrophoneCaptureState ¶
func (webView *WebView) SetMicrophoneCaptureState(state MediaCaptureState)
SetMicrophoneCaptureState: set the microphone capture state of a KitWebView.
If KitSettings:enable-mediastream is FALSE, this method will have no visible effect. Once the state of the device has been set to WEBKIT_MEDIA_CAPTURE_STATE_NONE it cannot be changed anymore. The page can however request capture again using the mediaDevices API.
The function takes the following parameters:
- state: KitMediaCaptureState.
func (*WebView) SetSettings ¶
SetSettings sets the KitSettings to be applied to web_view.
The existing KitSettings of web_view will be replaced by settings. New settings are applied immediately on web_view. The same KitSettings object can be shared by multiple KitWebView<!-- -->s.
The function takes the following parameters:
- settings: KitSettings.
func (*WebView) SetZoomLevel ¶
SetZoomLevel: set the zoom level of web_view.
Set the zoom level of web_view, i.e. the factor by which the view contents are scaled with respect to their original size.
The function takes the following parameters:
- zoomLevel: zoom level.
func (*WebView) Settings ¶
Settings gets the KitSettings currently applied to web_view.
If no other KitSettings have been explicitly applied to web_view with webkit_web_view_set_settings(), the default KitSettings will be returned. This method always returns a valid KitSettings object. To modify any of the web_view settings, you can either create a new KitSettings object with webkit_settings_new(), setting the desired preferences, and then replace the existing web_view settings with webkit_web_view_set_settings() or get the existing web_view settings and update it directly. KitSettings objects can be shared by multiple KitWebView<!-- -->s, so modifying the settings of a KitWebView would affect other KitWebView<!-- -->s using the same KitSettings.
The function returns the following values:
- settings attached to web_view.
func (*WebView) SnapshotFinish ¶
SnapshotFinish finishes an asynchronous operation started with webkit_web_view_get_snapshot().
The function takes the following parameters:
- result: Result.
The function returns the following values:
- texture: image with the retrieved snapshot, or NULL in case of error.
func (*WebView) StopLoading ¶
func (webView *WebView) StopLoading()
StopLoading stops any ongoing loading operation in web_view.
This method does nothing if no content is being loaded. If there is a loading operation in progress, it will be cancelled and KitWebView::load-failed signal will be emitted with WEBKIT_NETWORK_ERROR_CANCELLED error.
func (*WebView) TLSInfo ¶
TLSInfo retrieves the Certificate associated with the main resource of web_view.
Retrieves the Certificate associated with the main resource of web_view, and the CertificateFlags showing what problems, if any, have been found with that certificate. If the connection is not HTTPS, this function returns FALSE. This function should be called after a response has been received from the server, so you can connect to KitWebView::load-changed and call this function when it's emitted with WEBKIT_LOAD_COMMITTED event.
Note that this function provides no information about the security of the web page if the current KitTLSErrorsPolicy is WEBKIT_TLS_ERRORS_POLICY_IGNORE, as subresources of the page may be controlled by an attacker. This function may safely be used to determine the security status of the current page only if the current KitTLSErrorsPolicy is WEBKIT_TLS_ERRORS_POLICY_FAIL, in which case subresources that fail certificate verification will be blocked.
The function returns the following values:
- certificate: return location for a Certificate.
- errors: return location for a CertificateFlags the verification status of certificate.
- ok: TRUE if the web_view connection uses HTTPS and a response has been received from the server, or FALSE otherwise.
func (*WebView) TerminateWebProcess ¶
func (webView *WebView) TerminateWebProcess()
TerminateWebProcess terminates the web process associated to web_view.
When the web process gets terminated using this method, the KitWebView::web-process-terminated signal is emitted with WEBKIT_WEB_PROCESS_TERMINATED_BY_API as the reason for termination.
func (*WebView) Title ¶
Title gets the value of the KitWebView:title property.
You can connect to notify::title signal of web_view to be notified when the title has been received.
The function returns the following values:
- utf8: main frame document title of web_view.
func (*WebView) TryClose ¶
func (webView *WebView) TryClose()
TryClose tries to close the web_view.
This will fire the onbeforeunload event to ask the user for confirmation to close the page. If there isn't an onbeforeunload event handler or the user confirms to close the page, the KitWebView::close signal is emitted, otherwise nothing happens.
func (*WebView) URI ¶
URI returns the current active URI of web_view.
The active URI might change during a load operation:
<orderedlist> <listitem><para> When nothing has been loaded yet on web_view the active URI is NULL. </para></listitem> <listitem><para> When a new load operation starts the active URI is the requested URI: <itemizedlist> <listitem><para> If the load operation was started by webkit_web_view_load_uri(), the requested URI is the given one. </para></listitem> <listitem><para> If the load operation was started by webkit_web_view_load_html(), the requested URI is "about:blank". </para></listitem> <listitem><para> If the load operation was started by webkit_web_view_load_alternate_html(), the requested URI is content URI provided. </para></listitem> <listitem><para> If the load operation was started by webkit_web_view_go_back() or webkit_web_view_go_forward(), the requested URI is the original URI of the previous/next item in the KitBackForwardList of web_view. </para></listitem> <listitem><para> If the load operation was started by webkit_web_view_go_to_back_forward_list_item(), the requested URI is the opriginal URI of the given KitBackForwardListItem. </para></listitem> </itemizedlist> </para></listitem> <listitem><para> If there is a server redirection during the load operation, the active URI is the redirected URI. When the signal KitWebView::load-changed is emitted with WEBKIT_LOAD_REDIRECTED event, the active URI is already updated to the redirected URI. </para></listitem> <listitem><para> When the signal KitWebView::load-changed is emitted with WEBKIT_LOAD_COMMITTED event, the active URI is the final one and it will not change unless a new load operation is started or a navigation action within the same page is performed. </para></listitem> </orderedlist>
You can monitor the active URI by connecting to the notify::uri signal of web_view.
The function returns the following values:
- utf8: current active URI of web_view or NULL if nothing has been loaded yet.
func (*WebView) UserContentManager ¶
func (webView *WebView) UserContentManager() *UserContentManager
UserContentManager gets the user content manager associated to web_view.
The function returns the following values:
- userContentManager associated with the view.
func (*WebView) WebExtensionMode ¶
func (webView *WebView) WebExtensionMode() WebExtensionMode
WebExtensionMode: get the view's KitWebExtensionMode.
The function returns the following values:
- webExtensionMode: KitWebExtensionMode.
func (*WebView) WebsitePolicies ¶
func (webView *WebView) WebsitePolicies() *WebsitePolicies
WebsitePolicies gets the default website policies.
Gets the default website policies set on construction in the web_view. These can be overridden on a per-origin basis via the KitWebView::decide-policy signal handler.
See also webkit_policy_decision_use_with_policies().
The function returns the following values:
- websitePolicies: default KitWebsitePolicies associated with the view.
func (*WebView) WindowProperties ¶
func (webView *WebView) WindowProperties() *WindowProperties
WindowProperties: get the KitWindowProperties object.
Get the KitWindowProperties object containing the properties that the window containing web_view should have.
The function returns the following values:
- windowProperties of web_view.
type WebViewBase ¶
type WebViewBase struct { gtk.Widget // contains filtered or unexported fields }
type WebViewBaseClass ¶
type WebViewBaseClass struct {
// contains filtered or unexported fields
}
WebViewBaseClass: instance of this type is always passed by reference.
func (*WebViewBaseClass) ParentClass ¶
func (w *WebViewBaseClass) ParentClass() *gtk.WidgetClass
type WebViewBaseOverrides ¶
type WebViewBaseOverrides struct { }
WebViewBaseOverrides contains methods that are overridable.
type WebViewClass ¶
type WebViewClass struct {
// contains filtered or unexported fields
}
WebViewClass: instance of this type is always passed by reference.
func (*WebViewClass) Parent ¶
func (w *WebViewClass) Parent() *WebViewBaseClass
type WebViewOverrides ¶
type WebViewOverrides struct { // The function takes the following parameters: // // The function returns the following values: // Authenticate func(request *AuthenticationRequest) bool Close func() // The function takes the following parameters: // // - contextMenu // - hitTestResult // // The function returns the following values: // ContextMenu func(contextMenu *ContextMenu, hitTestResult *HitTestResult) bool ContextMenuDismissed func() // The function takes the following parameters: // // - decision // - typ // // The function returns the following values: // DecidePolicy func(decision PolicyDecisioner, typ PolicyDecisionType) bool // The function returns the following values: // EnterFullscreen func() bool // The function takes the following parameters: // InsecureContentDetected func(event InsecureContentEvent) // The function returns the following values: // LeaveFullscreen func() bool // The function takes the following parameters: // LoadChanged func(loadEvent LoadEvent) // The function takes the following parameters: // // - loadEvent // - failingUri // - err // // The function returns the following values: // LoadFailed func(loadEvent LoadEvent, failingUri string, err error) bool // The function takes the following parameters: // // - failingUri // - certificate // - errors // // The function returns the following values: // LoadFailedWithTLSErrors func(failingUri string, certificate gio.TLSCertificater, errors gio.TLSCertificateFlags) bool // The function takes the following parameters: // // - hitTestResult // - modifiers // MouseTargetChanged func(hitTestResult *HitTestResult, modifiers uint) // The function takes the following parameters: // // The function returns the following values: // PermissionRequest func(permissionRequest PermissionRequester) bool // The function takes the following parameters: // // The function returns the following values: // Print func(printOperation *PrintOperation) bool // The function takes the following parameters: // // The function returns the following values: // QueryPermissionState func(query *PermissionStateQuery) bool ReadyToShow func() // The function takes the following parameters: // // - resource // - request // ResourceLoadStarted func(resource *WebResource, request *URIRequest) RunAsModal func() // The function takes the following parameters: // // The function returns the following values: // RunColorChooser func(request *ColorChooserRequest) bool // The function takes the following parameters: // // The function returns the following values: // RunFileChooser func(request *FileChooserRequest) bool // The function takes the following parameters: // // The function returns the following values: // ScriptDialog func(dialog *ScriptDialog) bool // The function takes the following parameters: // // The function returns the following values: // ShowNotification func(notification *Notification) bool // The function takes the following parameters: // // - menu // - rectangle // // The function returns the following values: // ShowOptionMenu func(menu *OptionMenu, rectangle *gdk.Rectangle) bool // The function takes the following parameters: // SubmitForm func(request *FormSubmissionRequest) // The function takes the following parameters: // // The function returns the following values: // UserMessageReceived func(message *UserMessage) bool // The function returns the following values: // WebProcessCrashed func() bool // The function takes the following parameters: // WebProcessTerminated func(reason WebProcessTerminationReason) }
WebViewOverrides contains methods that are overridable.
type WebViewSessionState ¶
type WebViewSessionState struct {
// contains filtered or unexported fields
}
WebViewSessionState handles serialization of a web view's browsing state.
An instance of this type is always passed by reference.
func NewWebViewSessionState ¶
func NewWebViewSessionState(data *glib.Bytes) *WebViewSessionState
NewWebViewSessionState constructs a struct WebViewSessionState.
func (*WebViewSessionState) Serialize ¶
func (state *WebViewSessionState) Serialize() *glib.Bytes
Serialize serializes a KitWebViewSessionState.
The function returns the following values:
- bytes containing the state serialized.
type WebsiteData ¶
type WebsiteData struct {
// contains filtered or unexported fields
}
WebsiteData: data stored locally by a web site.
WebKitWebsiteData represents data stored in the client by a particular website. A website is normally a set of URLs grouped by domain name. You can get the website name, which is usually the domain, with webkit_website_data_get_name(). Documents loaded from the file system, like file:// URIs, are all grouped in the same WebKitWebsiteData with the name "Local files".
A website can store different types of data in the client side. KitWebsiteDataTypes is an enum containing all the possible data types; use webkit_website_data_get_types() to get the bitmask of data types. It's also possible to know the size of the data stored for some of the KitWebsiteDataTypes by using webkit_website_data_get_size().
A list of WebKitWebsiteData can be retrieved with webkit_website_data_manager_fetch(). See KitWebsiteDataManager for more information.
An instance of this type is always passed by reference.
func (*WebsiteData) Name ¶
func (websiteData *WebsiteData) Name() string
Name gets the name of KitWebsiteData.
This is the website name, normally represented by a domain or host name. All local documents are grouped in the same KitWebsiteData using the name "Local files".
The function returns the following values:
- utf8: website name of website_data.
func (*WebsiteData) Size ¶
func (websiteData *WebsiteData) Size(types WebsiteDataTypes) uint64
Size gets the size of the data of types types in a KitWebsiteData.
Note that currently the data size is only known for WEBKIT_WEBSITE_DATA_DISK_CACHE data type so for all other types 0 will be returned.
The function takes the following parameters:
- types: bitmask of KitWebsiteDataTypes.
The function returns the following values:
- guint64: size of website_data for the given types.
func (*WebsiteData) Types ¶
func (websiteData *WebsiteData) Types() WebsiteDataTypes
Types gets the types of data stored in the client for a KitWebsiteData.
These are the types actually present, not the types queried with webkit_website_data_manager_fetch().
The function returns the following values:
- websiteDataTypes: bitmask of KitWebsiteDataTypes in website_data.
type WebsiteDataAccessPermissionRequest ¶
type WebsiteDataAccessPermissionRequest struct { *coreglib.Object PermissionRequest // contains filtered or unexported fields }
WebsiteDataAccessPermissionRequest: permission request for accessing website data from third-party domains.
WebKitWebsiteDataAccessPermissionRequest represents a request for permission to allow a third-party domain access its cookies.
When a WebKitWebsiteDataAccessPermissionRequest is not handled by the user, it is denied by default.
func (*WebsiteDataAccessPermissionRequest) CurrentDomain ¶
func (request *WebsiteDataAccessPermissionRequest) CurrentDomain() string
CurrentDomain: get the current domain being browsed.
The function returns the following values:
- utf8: current domain name.
func (*WebsiteDataAccessPermissionRequest) RequestingDomain ¶
func (request *WebsiteDataAccessPermissionRequest) RequestingDomain() string
RequestingDomain: get the domain requesting permission to access its cookies while browsing the current domain.
The function returns the following values:
- utf8: requesting domain name.
type WebsiteDataAccessPermissionRequestClass ¶
type WebsiteDataAccessPermissionRequestClass struct {
// contains filtered or unexported fields
}
WebsiteDataAccessPermissionRequestClass: instance of this type is always passed by reference.
type WebsiteDataAccessPermissionRequestOverrides ¶
type WebsiteDataAccessPermissionRequestOverrides struct { }
WebsiteDataAccessPermissionRequestOverrides contains methods that are overridable.
type WebsiteDataManager ¶
WebsiteDataManager manages data stored locally by web sites.
You can use WebKitWebsiteDataManager to configure the local directories where website data will be stored. Use KitWebsiteDataManager:base-data-directory and KitWebsiteDataManager:base-cache-directory set a common base directory for all website data and caches.
A WebKitWebsiteDataManager can be ephemeral, in which case all the directory configuration is not needed because website data will never persist. You can create an ephemeral WebKitWebsiteDataManager with webkit_website_data_manager_new_ephemeral().
WebKitWebsiteDataManager can also be used to fetch website data, remove data stored by particular websites, or clear data for all websites modified since a given period of time.
func (*WebsiteDataManager) BaseCacheDirectory ¶
func (manager *WebsiteDataManager) BaseCacheDirectory() string
BaseCacheDirectory: get the KitWebsiteDataManager:base-cache-directory property.
The function returns the following values:
- utf8 (optional): base directory for caches, or NULL if KitWebsiteDataManager:base-cache-directory was not provided or manager is ephemeral.
func (*WebsiteDataManager) BaseDataDirectory ¶
func (manager *WebsiteDataManager) BaseDataDirectory() string
BaseDataDirectory: get the KitWebsiteDataManager:base-data-directory property.
The function returns the following values:
- utf8 (optional): base directory for website data, or NULL if KitWebsiteDataManager:base-data-directory was not provided or manager is ephemeral.
func (*WebsiteDataManager) ClearFinish ¶
func (manager *WebsiteDataManager) ClearFinish(result gio.AsyncResulter) error
ClearFinish: finish an asynchronous operation started with webkit_website_data_manager_clear().
The function takes the following parameters:
- result: Result.
func (*WebsiteDataManager) FaviconDatabase ¶
func (manager *WebsiteDataManager) FaviconDatabase() *FaviconDatabase
FaviconDatabase: get the KitFaviconDatabase of manager.
The function returns the following values:
- faviconDatabase (optional) or NULL if website icons are disabled.
func (*WebsiteDataManager) FaviconsEnabled ¶
func (manager *WebsiteDataManager) FaviconsEnabled() bool
FaviconsEnabled: get whether website icons are enabled.
The function returns the following values:
- ok: TRUE if website icons are enabled, or FALSE otherwise.
func (*WebsiteDataManager) FetchFinish ¶
func (manager *WebsiteDataManager) FetchFinish(result gio.AsyncResulter) ([]*WebsiteData, error)
FetchFinish: finish an asynchronous operation started with webkit_website_data_manager_fetch().
The function takes the following parameters:
- result: Result.
The function returns the following values:
- list of KitWebsiteData. You must free the #GList with g_list_free() and unref the KitWebsiteData<!-- -->s with webkit_website_data_unref() when you're done with them.
func (*WebsiteDataManager) IsEphemeral ¶
func (manager *WebsiteDataManager) IsEphemeral() bool
IsEphemeral: get whether a KitWebsiteDataManager is ephemeral.
See KitWebsiteDataManager:is-ephemeral for more details.
The function returns the following values:
- ok: TRUE if manager is ephemeral or FALSE otherwise.
func (*WebsiteDataManager) ItpSummaryFinish ¶
func (manager *WebsiteDataManager) ItpSummaryFinish(result gio.AsyncResulter) ([]*ITPThirdParty, error)
ItpSummaryFinish: finish an asynchronous operation started with webkit_website_data_manager_get_itp_summary().
The function takes the following parameters:
- result: Result.
The function returns the following values:
- list of KitITPThirdParty. You must free the #GList with g_list_free() and unref the KitITPThirdParty<!-- -->s with webkit_itp_third_party_unref() when you're done with them.
func (*WebsiteDataManager) RemoveFinish ¶
func (manager *WebsiteDataManager) RemoveFinish(result gio.AsyncResulter) error
RemoveFinish: finish an asynchronous operation started with webkit_website_data_manager_remove().
The function takes the following parameters:
- result: Result.
func (*WebsiteDataManager) SetFaviconsEnabled ¶
func (manager *WebsiteDataManager) SetFaviconsEnabled(enabled bool)
SetFaviconsEnabled: set whether website icons are enabled. Website icons are disabled by default. When website icons are disabled, the KitFaviconDatabase of manager is closed and its reference removed, so webkit_website_data_manager_get_favicon_database() will return NULL. If website icons are enabled again, a new KitFaviconDatabase will be created.
The function takes the following parameters:
- enabled: value to set.
type WebsiteDataManagerClass ¶
type WebsiteDataManagerClass struct {
// contains filtered or unexported fields
}
WebsiteDataManagerClass: instance of this type is always passed by reference.
type WebsiteDataManagerOverrides ¶
type WebsiteDataManagerOverrides struct { }
WebsiteDataManagerOverrides contains methods that are overridable.
type WebsiteDataTypes ¶
WebsiteDataTypes: enum values with flags representing types of Website data.
const ( // WebsiteDataMemoryCache: memory cache. WebsiteDataMemoryCache WebsiteDataTypes = 0b1 // WebsiteDataDiskCache: HTTP disk cache. WebsiteDataDiskCache WebsiteDataTypes = 0b10 // WebsiteDataOfflineApplicationCache: offline web application cache. WebsiteDataOfflineApplicationCache WebsiteDataTypes = 0b100 // WebsiteDataSessionStorage: session storage data. WebsiteDataSessionStorage WebsiteDataTypes = 0b1000 // WebsiteDataLocalStorage: local storage data. WebsiteDataLocalStorage WebsiteDataTypes = 0b10000 // WebsiteDataIndexeddbDatabases: indexedDB databases. WebsiteDataIndexeddbDatabases WebsiteDataTypes = 0b100000 // WebsiteDataCookies: cookies. WebsiteDataCookies WebsiteDataTypes = 0b1000000 // WebsiteDataDeviceIDHashSalt: hash salt used to generate the device ids // used by webpages. WebsiteDataDeviceIDHashSalt WebsiteDataTypes = 0b10000000 // WebsiteDataHstsCache: HSTS cache. WebsiteDataHstsCache WebsiteDataTypes = 0b100000000 // WebsiteDataItp: intelligent Tracking Prevention data. WebsiteDataItp WebsiteDataTypes = 0b1000000000 // WebsiteDataServiceWorkerRegistrations: service worker registrations. WebsiteDataServiceWorkerRegistrations WebsiteDataTypes = 0b10000000000 // WebsiteDataDomCache: DOM (CacheStorage) cache. WebsiteDataDomCache WebsiteDataTypes = 0b100000000000 // WebsiteDataAll: all types. WebsiteDataAll WebsiteDataTypes = 0b111111111111 )
func (WebsiteDataTypes) Has ¶
func (w WebsiteDataTypes) Has(other WebsiteDataTypes) bool
Has returns true if w contains other.
func (WebsiteDataTypes) String ¶
func (w WebsiteDataTypes) String() string
String returns the names in string for WebsiteDataTypes.
type WebsitePolicies ¶
WebsitePolicies: view specific website policies.
WebKitWebsitePolicies allows you to configure per-page policies, currently only autoplay policies are supported.
func NewWebsitePolicies ¶
func NewWebsitePolicies() *WebsitePolicies
NewWebsitePolicies: create a new KitWebsitePolicies.
The function returns the following values:
- websitePolicies: newly created KitWebsitePolicies.
func (*WebsitePolicies) AutoplayPolicy ¶
func (policies *WebsitePolicies) AutoplayPolicy() AutoplayPolicy
AutoplayPolicy: get the KitWebsitePolicies:autoplay property.
The function returns the following values:
- autoplayPolicy: KitAutoplayPolicy.
type WebsitePoliciesClass ¶
type WebsitePoliciesClass struct {
// contains filtered or unexported fields
}
WebsitePoliciesClass: instance of this type is always passed by reference.
type WebsitePoliciesOverrides ¶
type WebsitePoliciesOverrides struct { }
WebsitePoliciesOverrides contains methods that are overridable.
type WindowProperties ¶
WindowProperties: window properties of a KitWebView.
The content of a KitWebView can request to change certain properties of the window containing the view. This can include the x, y position of the window, the width and height but also if a toolbar, scrollbar, statusbar, locationbar should be visible to the user, and the request to show the KitWebView fullscreen.
The KitWebView::ready-to-show signal handler is the proper place to apply the initial window properties. Then you can monitor the KitWindowProperties by connecting to ::notify signal.
static void ready_to_show_cb (WebKitWebView *web_view, gpointer user_data) { GtkWidget *window; WebKitWindowProperties *window_properties; gboolean visible; // Create the window to contain the WebKitWebView. window = browser_window_new (); gtk_container_add (GTK_CONTAINER (window), GTK_WIDGET (web_view)); gtk_widget_show (GTK_WIDGET (web_view)); // Get the WebKitWindowProperties of the web view and monitor it. window_properties = webkit_web_view_get_window_properties (web_view); g_signal_connect (window_properties, "notify::geometry", G_CALLBACK (window_geometry_changed), window); g_signal_connect (window_properties, "notify::toolbar-visible", G_CALLBACK (window_toolbar_visibility_changed), window); g_signal_connect (window_properties, "notify::menubar-visible", G_CALLBACK (window_menubar_visibility_changed), window); // Apply the window properties before showing the window. visible = webkit_window_properties_get_toolbar_visible (window_properties); browser_window_set_toolbar_visible (BROWSER_WINDOW (window), visible); visible = webkit_window_properties_get_menubar_visible (window_properties); browser_window_set_menubar_visible (BROWSER_WINDOW (window), visible); if (webkit_window_properties_get_fullscreen (window_properties)) { gtk_window_fullscreen (GTK_WINDOW (window)); } else { GdkRectangle geometry; gtk_window_set_resizable (GTK_WINDOW (window), webkit_window_properties_get_resizable (window_properties)); webkit_window_properties_get_geometry (window_properties, &geometry); gtk_window_move (GTK_WINDOW (window), geometry.x, geometry.y); gtk_window_resize (GTK_WINDOW (window), geometry.width, geometry.height); } gtk_widget_show (window); }.
func (*WindowProperties) Fullscreen ¶
func (windowProperties *WindowProperties) Fullscreen() bool
Fullscreen: get whether the window should be shown in fullscreen state or not.
The function returns the following values:
- ok: TRUE if the window should be fullscreen or FALSE otherwise.
func (*WindowProperties) Geometry ¶
func (windowProperties *WindowProperties) Geometry() *gdk.Rectangle
Geometry: get the geometry the window should have on the screen when shown.
The function returns the following values:
- geometry: return location for the window geometry.
func (*WindowProperties) LocationbarVisible ¶
func (windowProperties *WindowProperties) LocationbarVisible() bool
LocationbarVisible: get whether the window should have the locationbar visible or not.
The function returns the following values:
- ok: TRUE if locationbar should be visible or FALSE otherwise.
func (*WindowProperties) MenubarVisible ¶
func (windowProperties *WindowProperties) MenubarVisible() bool
MenubarVisible: get whether the window should have the menubar visible or not.
The function returns the following values:
- ok: TRUE if menubar should be visible or FALSE otherwise.
func (*WindowProperties) Resizable ¶
func (windowProperties *WindowProperties) Resizable() bool
Resizable: get whether the window should be resizable by the user or not.
The function returns the following values:
- ok: TRUE if the window should be resizable or FALSE otherwise.
func (*WindowProperties) ScrollbarsVisible ¶
func (windowProperties *WindowProperties) ScrollbarsVisible() bool
ScrollbarsVisible: get whether the window should have the scrollbars visible or not.
The function returns the following values:
- ok: TRUE if scrollbars should be visible or FALSE otherwise.
func (*WindowProperties) StatusbarVisible ¶
func (windowProperties *WindowProperties) StatusbarVisible() bool
StatusbarVisible: get whether the window should have the statusbar visible or not.
The function returns the following values:
- ok: TRUE if statusbar should be visible or FALSE otherwise.
func (*WindowProperties) ToolbarVisible ¶
func (windowProperties *WindowProperties) ToolbarVisible() bool
ToolbarVisible: get whether the window should have the toolbar visible or not.
The function returns the following values:
- ok: TRUE if toolbar should be visible or FALSE otherwise.
type WindowPropertiesClass ¶
type WindowPropertiesClass struct {
// contains filtered or unexported fields
}
WindowPropertiesClass: instance of this type is always passed by reference.
type WindowPropertiesOverrides ¶
type WindowPropertiesOverrides struct { }
WindowPropertiesOverrides contains methods that are overridable.
Source Files ¶
- WebKitApplicationInfo.go
- WebKitAuthenticationRequest.go
- WebKitAuthenticationRequest_2_2.go
- WebKitAuthenticationRequest_export.go
- WebKitAutomationSession.go
- WebKitAutomationSession_2_18.go
- WebKitAutomationSession_2_28.go
- WebKitAutomationSession_export.go
- WebKitBackForwardList.go
- WebKitBackForwardListItem.go
- WebKitBackForwardList_export.go
- WebKitClipboardPermissionRequest.go
- WebKitClipboardPermissionRequest_2_42.go
- WebKitColorChooserRequest.go
- WebKitColorChooserRequest_export.go
- WebKitContextMenu.go
- WebKitContextMenuActions.go
- WebKitContextMenuItem.go
- WebKitCookieManager.go
- WebKitCookieManager_export.go
- WebKitCredential_2_2.go
- WebKitDeviceInfoPermissionRequest.go
- WebKitDeviceInfoPermissionRequest_2_24.go
- WebKitDownload.go
- WebKitDownload_export.go
- WebKitEditingCommands.go
- WebKitEditingCommands_2_10.go
- WebKitEditingCommands_2_30.go
- WebKitEditorState.go
- WebKitEditorState_2_10.go
- WebKitError.go
- WebKitError_2_24.go
- WebKitError_2_40.go
- WebKitFaviconDatabase.go
- WebKitFaviconDatabase_export.go
- WebKitFeature_2_42.go
- WebKitFileChooserRequest.go
- WebKitFindController.go
- WebKitFindController_export.go
- WebKitFormSubmissionRequest.go
- WebKitGeolocationManager.go
- WebKitGeolocationManager_2_26.go
- WebKitGeolocationManager_export.go
- WebKitGeolocationPermissionRequest.go
- WebKitHitTestResult.go
- WebKitInputMethodContext_2_28.go
- WebKitInputMethodContext_export.go
- WebKitMediaKeySystemPermissionRequest.go
- WebKitMediaKeySystemPermissionRequest_2_32.go
- WebKitMemoryPressureSettings_2_34.go
- WebKitNavigationAction.go
- WebKitNavigationPolicyDecision.go
- WebKitNetworkProxySettings_2_16.go
- WebKitNetworkSession.go
- WebKitNetworkSession_2_40.go
- WebKitNetworkSession_export.go
- WebKitNotification.go
- WebKitNotificationPermissionRequest.go
- WebKitNotificationPermissionRequest_2_8.go
- WebKitNotification_2_8.go
- WebKitNotification_export.go
- WebKitOptionMenu.go
- WebKitOptionMenuItem_2_18.go
- WebKitOptionMenu_2_18.go
- WebKitOptionMenu_export.go
- WebKitPermissionRequest.go
- WebKitPermissionStateQuery.go
- WebKitPermissionStateQuery_2_40.go
- WebKitPointerLockPermissionRequest.go
- WebKitPointerLockPermissionRequest_2_28.go
- WebKitPolicyDecision.go
- WebKitPrintOperation.go
- WebKitPrintOperation_export.go
- WebKitResponsePolicyDecision.go
- WebKitScriptDialog.go
- WebKitSecurityManager.go
- WebKitSecurityOrigin_2_16.go
- WebKitSettings.go
- WebKitSettings_2_16.go
- WebKitSettings_2_20.go
- WebKitSettings_2_42.go
- WebKitURIRequest.go
- WebKitURIResponse.go
- WebKitURISchemeRequest.go
- WebKitURISchemeResponse.go
- WebKitURIUtilities_2_24.go
- WebKitUserContentFilterStore.go
- WebKitUserContentFilterStore_2_24.go
- WebKitUserContentManager.go
- WebKitUserContentManager_2_40.go
- WebKitUserContentManager_2_6.go
- WebKitUserContentManager_export.go
- WebKitUserContent_2_24.go
- WebKitUserContent_2_6.go
- WebKitUserMediaPermissionRequest.go
- WebKitUserMediaPermissionRequest_2_34.go
- WebKitUserMediaPermissionRequest_2_8.go
- WebKitUserMessage.go
- WebKitUserMessage_2_28.go
- WebKitVersion.go
- WebKitWebContext.go
- WebKitWebContext_export.go
- WebKitWebInspector.go
- WebKitWebInspector_export.go
- WebKitWebResource.go
- WebKitWebResource_export.go
- WebKitWebView.go
- WebKitWebViewBase.go
- WebKitWebViewGtk4_2_16.go
- WebKitWebViewGtk4_export.go
- WebKitWebViewSessionState_2_12.go
- WebKitWebView_2_20.go
- WebKitWebView_2_34.go
- WebKitWebView_2_38.go
- WebKitWebView_export.go
- WebKitWebsiteDataAccessPermissionRequest.go
- WebKitWebsiteDataAccessPermissionRequest_2_30.go
- WebKitWebsiteDataManager.go
- WebKitWebsiteDataManager_2_10.go
- WebKitWebsiteDataManager_2_30.go
- WebKitWebsiteData_2_16.go
- WebKitWebsitePolicies.go
- WebKitWebsitePolicies_2_30.go
- WebKitWindowProperties.go
- webkit.go
- webkit_export.go