webkit2

package
Version: v0.0.0-...-2aa7e17 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 5, 2021 License: MPL-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
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.

View Source
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()

View Source
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.

View Source
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().

View Source
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.

View Source
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.

View Source
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.

View Source
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().

View Source
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.

View Source
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.

View Source
const MICRO_VERSION = 1

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.

View Source
const MINOR_VERSION = 32

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

This section is empty.

Functions

func DownloadErrorQuark

func DownloadErrorQuark() glib.Quark

func FaviconDatabaseErrorQuark

func FaviconDatabaseErrorQuark() glib.Quark

func GetMajorVersion

func GetMajorVersion() uint32

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.

func GetMicroVersion

func GetMicroVersion() uint32

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.

func GetMinorVersion

func GetMinorVersion() uint32

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.

func JavascriptErrorQuark

func JavascriptErrorQuark() glib.Quark

func MediaKeySystemPermissionGetName

func MediaKeySystemPermissionGetName(request *MediaKeySystemPermissionRequest) string

MediaKeySystemPermissionGetName: get the key system for which access permission is being requested.

func NetworkErrorQuark

func NetworkErrorQuark() glib.Quark

func PluginErrorQuark

func PluginErrorQuark() glib.Quark

func PolicyErrorQuark

func PolicyErrorQuark() glib.Quark

func PrintErrorQuark

func PrintErrorQuark() glib.Quark

func SettingsFontSizeToPixels

func SettingsFontSizeToPixels(points uint32) uint32

SettingsFontSizeToPixels: 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.

func SettingsFontSizeToPoints

func SettingsFontSizeToPoints(pixels uint32) uint32

SettingsFontSizeToPoints: 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.

func SnapshotErrorQuark

func SnapshotErrorQuark() glib.Quark

func URIForDisplay

func URIForDisplay(uri string) string

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.

func UserContentFilterErrorQuark

func UserContentFilterErrorQuark() glib.Quark

func UserMediaPermissionIsForAudioDevice

func UserMediaPermissionIsForAudioDevice(request *UserMediaPermissionRequest) bool

func UserMediaPermissionIsForVideoDevice

func UserMediaPermissionIsForVideoDevice(request *UserMediaPermissionRequest) bool

func UserMessageErrorQuark

func UserMessageErrorQuark() glib.Quark

Types

type ApplicationInfo

type ApplicationInfo struct {
	// contains filtered or unexported fields
}

ApplicationInfo: 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().

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.

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.

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().

type AuthenticationRequest

type AuthenticationRequest struct {
	*externglib.Object
}

func (*AuthenticationRequest) Authenticate

func (request *AuthenticationRequest) Authenticate(credential *Credential)

Authenticate the KitAuthenticationRequest using the KitCredential supplied. To continue without credentials, pass NULL as credential.

func (*AuthenticationRequest) CanSaveCredentials

func (request *AuthenticationRequest) CanSaveCredentials() bool

CanSaveCredentials: 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().

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) Host

func (request *AuthenticationRequest) Host() string

Host: get the host that this authentication challenge is applicable to.

func (*AuthenticationRequest) IsForProxy

func (request *AuthenticationRequest) IsForProxy() bool

IsForProxy: determine whether the authentication challenge is associated with a proxy server rather than an "origin" server.

func (*AuthenticationRequest) IsRetry

func (request *AuthenticationRequest) IsRetry() bool

IsRetry: determine whether this this is a first attempt or a retry for this authentication challenge.

func (*AuthenticationRequest) Port

func (request *AuthenticationRequest) Port() uint32

Port: get the port that this authentication challenge is applicable to.

func (*AuthenticationRequest) ProposedCredential

func (request *AuthenticationRequest) ProposedCredential() *Credential

ProposedCredential: 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.

func (*AuthenticationRequest) Realm

func (request *AuthenticationRequest) Realm() string

Realm: get the realm that this authentication challenge is applicable to.

func (*AuthenticationRequest) Scheme

func (request *AuthenticationRequest) Scheme() AuthenticationScheme

Scheme: get the authentication scheme of the authentication challenge.

func (*AuthenticationRequest) SecurityOrigin

func (request *AuthenticationRequest) SecurityOrigin() *SecurityOrigin

SecurityOrigin: get the KitSecurityOrigin that this authentication challenge is applicable to.

func (*AuthenticationRequest) SetCanSaveCredentials

func (request *AuthenticationRequest) SetCanSaveCredentials(enabled bool)

SetCanSaveCredentials: 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.

func (*AuthenticationRequest) SetProposedCredential

func (request *AuthenticationRequest) SetProposedCredential(credential *Credential)

SetProposedCredential: 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.

type AuthenticationScheme

type AuthenticationScheme int

AuthenticationScheme: enum values representing the authentication scheme.

const (
	// AuthenticationSchemeDefault 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
	// 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

type AutomationBrowsingContextPresentation int

AutomationBrowsingContextPresentation: enum values used for determining the automation browsing context presentation.

const (
	// AutomationBrowsingContextPresentationWindow: window
	AutomationBrowsingContextPresentationWindow AutomationBrowsingContextPresentation = iota
	// AutomationBrowsingContextPresentationTab: tab
	AutomationBrowsingContextPresentationTab
)

func (AutomationBrowsingContextPresentation) String

String returns the name in string for AutomationBrowsingContextPresentation.

type AutomationSession

type AutomationSession struct {
	*externglib.Object
}

func (*AutomationSession) ApplicationInfo

func (session *AutomationSession) ApplicationInfo() *ApplicationInfo

ApplicationInfo: get the KitAutomationSession previously set with webkit_automation_session_set_application_info().

func (*AutomationSession) ID

func (session *AutomationSession) ID() string

ID: get the unique identifier of a KitAutomationSession

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.

type AutoplayPolicy

type AutoplayPolicy int

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

type BackForwardList struct {
	*externglib.Object
}

func (*BackForwardList) BackItem

func (backForwardList *BackForwardList) BackItem() *BackForwardListItem

BackItem returns the item that precedes the current item.

func (*BackForwardList) BackList

func (backForwardList *BackForwardList) BackList() []BackForwardListItem

func (*BackForwardList) BackListWithLimit

func (backForwardList *BackForwardList) BackListWithLimit(limit uint32) []BackForwardListItem

func (*BackForwardList) CurrentItem

func (backForwardList *BackForwardList) CurrentItem() *BackForwardListItem

CurrentItem returns the current item in back_forward_list.

func (*BackForwardList) ForwardItem

func (backForwardList *BackForwardList) ForwardItem() *BackForwardListItem

ForwardItem returns the item that follows the current item.

func (*BackForwardList) ForwardList

func (backForwardList *BackForwardList) ForwardList() []BackForwardListItem

func (*BackForwardList) ForwardListWithLimit

func (backForwardList *BackForwardList) ForwardListWithLimit(limit uint32) []BackForwardListItem

func (*BackForwardList) Length

func (backForwardList *BackForwardList) Length() uint32

func (*BackForwardList) NthItem

func (backForwardList *BackForwardList) NthItem(index int32) *BackForwardListItem

NthItem returns the item at a given index relative to the current item.

type BackForwardListItem

type BackForwardListItem struct {
	externglib.InitiallyUnowned
}

func (*BackForwardListItem) OriginalURI

func (listItem *BackForwardListItem) OriginalURI() string

OriginalURI: see also webkit_back_forward_list_item_get_uri().

func (*BackForwardListItem) Title

func (listItem *BackForwardListItem) Title() string

func (*BackForwardListItem) URI

func (listItem *BackForwardListItem) URI() string

URI: 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().

type CacheModel

type CacheModel int

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 ColorChooserRequest

type ColorChooserRequest struct {
	*externglib.Object
}

func (*ColorChooserRequest) Cancel

func (request *ColorChooserRequest) Cancel()

Cancel 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) ElementRectangle

func (request *ColorChooserRequest) ElementRectangle() gdk.Rectangle

ElementRectangle gets the bounding box of the color input element.

func (*ColorChooserRequest) Finish

func (request *ColorChooserRequest) Finish()

Finish 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

func (*ColorChooserRequest) SetRGBA

func (request *ColorChooserRequest) SetRGBA(rgba *gdk.RGBA)

SetRGBA sets the current RGBA color of request

type ContextMenu

type ContextMenu struct {
	*externglib.Object
}

func NewContextMenu

func NewContextMenu() *ContextMenu

NewContextMenu 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.

func NewContextMenuWithItems

func NewContextMenuWithItems(items []ContextMenuItem) *ContextMenu

NewContextMenuWithItems 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()

func (*ContextMenu) Append

func (menu *ContextMenu) Append(item *ContextMenuItem)

Append adds item at the end of the menu.

func (*ContextMenu) First

func (menu *ContextMenu) First() *ContextMenuItem

First gets the first item in the menu.

func (*ContextMenu) Insert

func (menu *ContextMenu) Insert(item *ContextMenuItem, position int32)

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.

func (*ContextMenu) ItemAtPosition

func (menu *ContextMenu) ItemAtPosition(position uint32) *ContextMenuItem

ItemAtPosition gets the item at the given position in the menu.

func (*ContextMenu) Items

func (menu *ContextMenu) Items() []ContextMenuItem

Items returns the item list of menu.

func (*ContextMenu) Last

func (menu *ContextMenu) Last() *ContextMenuItem

Last gets the last item in the menu.

func (*ContextMenu) MoveItem

func (menu *ContextMenu) MoveItem(item *ContextMenuItem, position int32)

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.

func (*ContextMenu) NItems

func (menu *ContextMenu) NItems() uint32

NItems gets the length of the menu.

func (*ContextMenu) Prepend

func (menu *ContextMenu) Prepend(item *ContextMenuItem)

Prepend adds item at the beginning of the menu.

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.

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.

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().

type ContextMenuAction

type ContextMenuAction int

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 ContextMenuItem

type ContextMenuItem struct {
	externglib.InitiallyUnowned
}

func NewContextMenuItem deprecated

This function has been deprecated.
func NewContextMenuItem(action *gtk.Action) *ContextMenuItem

NewContextMenuItem creates a new KitContextMenuItem for the given action.

Deprecated: Use webkit_context_menu_item_new_from_gaction() instead.

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.

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.

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.

func NewContextMenuItemSeparator

func NewContextMenuItemSeparator() *ContextMenuItem

NewContextMenuItemSeparator creates a new KitContextMenuItem representing a separator.

func NewContextMenuItemWithSubmenu

func NewContextMenuItemWithSubmenu(label string, submenu *ContextMenu) *ContextMenuItem

NewContextMenuItemWithSubmenu creates a new KitContextMenuItem using the given label with a submenu.

func (*ContextMenuItem) Action deprecated

This method has been deprecated.
func (item *ContextMenuItem) Action() *gtk.Action

Action gets the action associated to item as a Action.

Deprecated: Use webkit_context_menu_item_get_gaction() instead.

func (*ContextMenuItem) Gaction

func (item *ContextMenuItem) Gaction() gio.Actioner

Gaction gets the action associated to item as a #GAction.

func (*ContextMenuItem) IsSeparator

func (item *ContextMenuItem) IsSeparator() bool

IsSeparator checks whether item is a separator.

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.

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.

func (*ContextMenuItem) Submenu

func (item *ContextMenuItem) Submenu() *ContextMenu

Submenu gets the submenu of item.

type CookieAcceptPolicy

type CookieAcceptPolicy int

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

type CookieManager struct {
	*externglib.Object
}

func (*CookieManager) AcceptPolicy

func (cookieManager *CookieManager) AcceptPolicy(ctx context.Context, callback gio.AsyncReadyCallback)

AcceptPolicy: asynchronously get the cookie acceptance policy of cookie_manager. Note that when policy was set to WEBKIT_COOKIE_POLICY_ACCEPT_NO_THIRD_PARTY and ITP is enabled, this will return WEBKIT_COOKIE_POLICY_ACCEPT_ALWAYS. See also webkit_website_data_manager_set_itp_enabled().

When the operation is finished, callback will be called. You can then call webkit_cookie_manager_get_accept_policy_finish() to get the result of the operation.

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().

func (*CookieManager) AddCookie

func (cookieManager *CookieManager) AddCookie(ctx context.Context, cookie *soup.Cookie, callback gio.AsyncReadyCallback)

AddCookie: asynchronously add a Cookie to the underlying storage.

When the operation is finished, callback will be called. You can then call webkit_cookie_manager_add_cookie_finish() to get the result of the operation.

func (*CookieManager) AddCookieFinish

func (cookieManager *CookieManager) AddCookieFinish(result gio.AsyncResulter) error

AddCookieFinish: finish an asynchronous operation started with webkit_cookie_manager_add_cookie().

func (*CookieManager) Cookies

func (cookieManager *CookieManager) Cookies(ctx context.Context, uri string, callback gio.AsyncReadyCallback)

Cookies: asynchronously get a list of Cookie from cookie_manager associated with uri, which must be either an HTTP or an HTTPS URL.

When the operation is finished, callback will be called. You can then call webkit_cookie_manager_get_cookies_finish() to get the result of the operation.

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().

func (*CookieManager) DeleteAllCookies deprecated

This method has been deprecated.
func (cookieManager *CookieManager) DeleteAllCookies()

DeleteAllCookies: delete all cookies of cookie_manager

Deprecated: Use webkit_website_data_manager_clear() instead.

func (*CookieManager) DeleteCookie

func (cookieManager *CookieManager) DeleteCookie(ctx context.Context, cookie *soup.Cookie, callback gio.AsyncReadyCallback)

DeleteCookie: asynchronously delete a Cookie from the current session.

When the operation is finished, callback will be called. You can then call webkit_cookie_manager_delete_cookie_finish() to get the result of the operation.

func (*CookieManager) DeleteCookieFinish

func (cookieManager *CookieManager) DeleteCookieFinish(result gio.AsyncResulter) error

DeleteCookieFinish: finish an asynchronous operation started with webkit_cookie_manager_delete_cookie().

func (*CookieManager) DeleteCookiesForDomain deprecated

This method has been deprecated.
func (cookieManager *CookieManager) DeleteCookiesForDomain(domain string)

DeleteCookiesForDomain: remove all cookies of cookie_manager for the given domain.

Deprecated: Use webkit_website_data_manager_remove() instead.

func (*CookieManager) DomainsWithCookies deprecated

This method has been deprecated.
func (cookieManager *CookieManager) DomainsWithCookies(ctx context.Context, callback gio.AsyncReadyCallback)

DomainsWithCookies: asynchronously get the list of domains for which cookie_manager contains cookies.

When the operation is finished, callback will be called. You can then call webkit_cookie_manager_get_domains_with_cookies_finish() to get the result of the operation.

Deprecated: Use webkit_website_data_manager_fetch() instead.

func (*CookieManager) DomainsWithCookiesFinish deprecated

This method has been deprecated.
func (cookieManager *CookieManager) DomainsWithCookiesFinish(result gio.AsyncResulter) ([]string, error)

DomainsWithCookiesFinish: finish an asynchronous operation started with webkit_cookie_manager_get_domains_with_cookies(). The return value is a NULL terminated list of strings which should be released with g_strfreev().

Deprecated: Use webkit_website_data_manager_fetch_finish() instead.

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().

func (*CookieManager) SetPersistentStorage

func (cookieManager *CookieManager) SetPersistentStorage(filename string, storage CookiePersistentStorage)

SetPersistentStorage: 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.

type CookiePersistentStorage

type CookiePersistentStorage int

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: 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 (*Credential) Copy

func (credential *Credential) Copy() *Credential

Copy: make a copy of the KitCredential.

func (*Credential) HasPassword

func (credential *Credential) HasPassword() bool

HasPassword: determine whether this credential has a password stored.

func (*Credential) Password

func (credential *Credential) Password() string

Password: get the password currently held by this KitCredential.

func (*Credential) Persistence

func (credential *Credential) Persistence() CredentialPersistence

Persistence: get the persistence mode currently held by this KitCredential.

func (*Credential) Username

func (credential *Credential) Username() string

Username: get the username currently held by this KitCredential.

type CredentialPersistence

type CredentialPersistence int

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 {
	*externglib.Object

	PermissionRequest
}

type Download

type Download struct {
	*externglib.Object
}

func (*Download) AllowOverwrite

func (download *Download) AllowOverwrite() bool

AllowOverwrite 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.

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) Destination

func (download *Download) Destination() string

Destination obtains the URI to which the downloaded file will be written. You can connect to KitDownload::created-destination to make sure this method returns a valid destination.

func (*Download) ElapsedTime

func (download *Download) ElapsedTime() float64

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.

func (*Download) EstimatedProgress

func (download *Download) EstimatedProgress() float64

EstimatedProgress 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.

func (*Download) ReceivedDataLength

func (download *Download) ReceivedDataLength() uint64

ReceivedDataLength gets the length of the data already downloaded for download in bytes.

func (*Download) Request

func (download *Download) Request() *URIRequest

Request retrieves the KitURIRequest object that backs the download process.

func (*Download) Response

func (download *Download) Response() *URIResponse

Response 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.

func (*Download) SetAllowOverwrite

func (download *Download) SetAllowOverwrite(allowed bool)

SetAllowOverwrite 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.

func (*Download) SetDestination

func (download *Download) SetDestination(uri string)

SetDestination sets the URI 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 URI 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 URI 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.

func (*Download) WebView

func (download *Download) WebView() *WebView

WebView: get the KitWebView that initiated the download.

type DownloadError

type DownloadError int

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 DownloadOverrider

type DownloadOverrider interface {
	DecideDestination(suggestedFilename string) bool
}

DownloadOverrider contains methods that are overridable.

As of right now, interface overriding and subclassing is not supported yet, so the interface currently has no use.

type EditorState

type EditorState struct {
	*externglib.Object
}

func (*EditorState) IsCopyAvailable

func (editorState *EditorState) IsCopyAvailable() bool

IsCopyAvailable gets whether a copy command can be issued.

func (*EditorState) IsCutAvailable

func (editorState *EditorState) IsCutAvailable() bool

IsCutAvailable gets whether a cut command can be issued.

func (*EditorState) IsPasteAvailable

func (editorState *EditorState) IsPasteAvailable() bool

IsPasteAvailable gets whether a paste command can be issued.

func (*EditorState) IsRedoAvailable

func (editorState *EditorState) IsRedoAvailable() bool

IsRedoAvailable gets whether a redo command can be issued.

func (*EditorState) IsUndoAvailable

func (editorState *EditorState) IsUndoAvailable() bool

IsUndoAvailable gets whether an undo command can be issued.

func (*EditorState) TypingAttributes

func (editorState *EditorState) TypingAttributes() uint32

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.

type EditorTypingAttributes

type EditorTypingAttributes int

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

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

type FaviconDatabase struct {
	*externglib.Object
}

func (*FaviconDatabase) Clear

func (database *FaviconDatabase) Clear()

Clear clears all icons from the database.

func (*FaviconDatabase) Favicon

func (database *FaviconDatabase) Favicon(ctx context.Context, pageUri string, callback gio.AsyncReadyCallback)

Favicon: asynchronously obtains a #cairo_surface_t of the favicon for the given page URI. It returns the cached icon if it's in the database asynchronously waiting for the icon to be read from the database.

This is an asynchronous method. When the operation is finished, callback will be invoked. You can then call webkit_favicon_database_get_favicon_finish() to get the result of the operation.

You must call webkit_web_context_set_favicon_database_directory() for the KitWebContext associated with this KitFaviconDatabase before attempting to use this function; otherwise, webkit_favicon_database_get_favicon_finish() will return WEBKIT_FAVICON_DATABASE_ERROR_NOT_INITIALIZED.

func (*FaviconDatabase) FaviconFinish

func (database *FaviconDatabase) FaviconFinish(result gio.AsyncResulter) (*cairo.Surface, error)

FaviconFinish finishes an operation started with webkit_favicon_database_get_favicon().

func (*FaviconDatabase) FaviconURI

func (database *FaviconDatabase) FaviconURI(pageUri string) string

FaviconURI obtains the URI of the favicon for the given page_uri.

type FaviconDatabaseError

type FaviconDatabaseError int

FaviconDatabaseError: enum values used to denote the various errors related to the KitFaviconDatabase.

const (
	// FaviconDatabaseErrorNotInitialized has not been initialized yet
	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 FileChooserRequest

type FileChooserRequest struct {
	*externglib.Object
}

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, 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.

func (*FileChooserRequest) MIMETypesFilter

func (request *FileChooserRequest) MIMETypesFilter() *gtk.FileFilter

MIMETypesFilter: 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.

func (*FileChooserRequest) SelectFiles

func (request *FileChooserRequest) SelectFiles(files []string)

SelectFiles: ask WebKit to select local files for upload and complete the request.

func (*FileChooserRequest) SelectMultiple

func (request *FileChooserRequest) SelectMultiple() bool

SelectMultiple: 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.

func (*FileChooserRequest) SelectedFiles

func (request *FileChooserRequest) SelectedFiles() []string

SelectedFiles: 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.

type FindController

type FindController struct {
	*externglib.Object
}

func (*FindController) CountMatches

func (findController *FindController) CountMatches(searchText string, findOptions uint32, maxMatchCount uint32)

CountMatches 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.

func (*FindController) MaxMatchCount

func (findController *FindController) MaxMatchCount() uint32

MaxMatchCount 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().

func (*FindController) Options

func (findController *FindController) Options() uint32

Options gets a bitmask containing the KitFindOptions associated with the current search.

func (*FindController) Search

func (findController *FindController) Search(searchText string, findOptions uint32, maxMatchCount uint32)

Search 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.

func (*FindController) SearchFinish

func (findController *FindController) SearchFinish()

SearchFinish 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 currently searching for. This text is passed to either webkit_find_controller_search() or webkit_find_controller_count_matches().

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.

type FindOptions

type FindOptions int

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

type FormSubmissionRequest struct {
	*externglib.Object
}

func (*FormSubmissionRequest) Submit

func (request *FormSubmissionRequest) Submit()

Submit: continue the form submission.

func (*FormSubmissionRequest) TextFields deprecated

This method has been deprecated.
func (request *FormSubmissionRequest) TextFields() map[cgo.Handle]cgo.Handle

TextFields: get a Table with the values of the text fields contained in the form associated to request. Note that fields will be missing if the form contains multiple text input elements with the same name, so this function does not reliably return all text fields.

Deprecated: Use webkit_form_submission_request_list_text_fields() instead.

type GeolocationManager

type GeolocationManager struct {
	*externglib.Object
}

func (*GeolocationManager) EnableHighAccuracy

func (manager *GeolocationManager) EnableHighAccuracy() bool

EnableHighAccuracy: get whether high accuracy is enabled.

func (*GeolocationManager) Failed

func (manager *GeolocationManager) Failed(errorMessage string)

Failed: notify manager that determining the position failed.

func (*GeolocationManager) UpdatePosition

func (manager *GeolocationManager) UpdatePosition(position *GeolocationPosition)

UpdatePosition: notify manager that position has been updated to position.

type GeolocationPermissionRequest

type GeolocationPermissionRequest struct {
	*externglib.Object

	PermissionRequest
}

type GeolocationPosition

type GeolocationPosition struct {
	// contains filtered or unexported fields
}

GeolocationPosition 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

func (*GeolocationPosition) SetAltitude

func (position *GeolocationPosition) SetAltitude(altitude float64)

SetAltitude: set the position altitude

func (*GeolocationPosition) SetAltitudeAccuracy

func (position *GeolocationPosition) SetAltitudeAccuracy(altitudeAccuracy float64)

SetAltitudeAccuracy: set the accuracy of position altitude

func (*GeolocationPosition) SetHeading

func (position *GeolocationPosition) SetHeading(heading float64)

SetHeading: set the position heading, as a positive angle between the direction of movement and the North direction, in clockwise direction.

func (*GeolocationPosition) SetSpeed

func (position *GeolocationPosition) SetSpeed(speed float64)

SetSpeed: set the position speed

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.

type HardwareAccelerationPolicy

type HardwareAccelerationPolicy int

HardwareAccelerationPolicy: enum values used for determining the hardware acceleration policy.

const (
	// HardwareAccelerationPolicyOnDemand: hardware acceleration is
	// enabled/disabled as request by web contents.
	HardwareAccelerationPolicyOnDemand HardwareAccelerationPolicy = iota
	// HardwareAccelerationPolicyAlways: hardware acceleration is always
	// enabled, even for websites not requesting it.
	HardwareAccelerationPolicyAlways
	// HardwareAccelerationPolicyNever: hardware acceleration is always
	// disabled, even for websites requesting it.
	HardwareAccelerationPolicyNever
)

func (HardwareAccelerationPolicy) String

String returns the name in string for HardwareAccelerationPolicy.

type HitTestResult

type HitTestResult struct {
	*externglib.Object
}

func (*HitTestResult) Context

func (hitTestResult *HitTestResult) Context() uint32

Context gets the value of the KitHitTestResult:context property.

func (*HitTestResult) ContextIsEditable

func (hitTestResult *HitTestResult) ContextIsEditable() bool

ContextIsEditable gets whether WEBKIT_HIT_TEST_RESULT_CONTEXT_EDITABLE flag is present in KitHitTestResult:context.

func (*HitTestResult) ContextIsImage

func (hitTestResult *HitTestResult) ContextIsImage() bool

ContextIsImage gets whether WEBKIT_HIT_TEST_RESULT_CONTEXT_IMAGE flag is present in KitHitTestResult:context.

func (hitTestResult *HitTestResult) ContextIsLink() bool

ContextIsLink gets whether WEBKIT_HIT_TEST_RESULT_CONTEXT_LINK flag is present in KitHitTestResult:context.

func (*HitTestResult) ContextIsMedia

func (hitTestResult *HitTestResult) ContextIsMedia() bool

ContextIsMedia gets whether WEBKIT_HIT_TEST_RESULT_CONTEXT_MEDIA flag is present in KitHitTestResult:context.

func (*HitTestResult) ContextIsScrollbar

func (hitTestResult *HitTestResult) ContextIsScrollbar() bool

ContextIsScrollbar gets whether WEBKIT_HIT_TEST_RESULT_CONTEXT_SCROLLBAR flag is present in KitHitTestResult:context.

func (*HitTestResult) ContextIsSelection

func (hitTestResult *HitTestResult) ContextIsSelection() bool

ContextIsSelection gets whether WEBKIT_HIT_TEST_RESULT_CONTEXT_SELECTION flag is present in KitHitTestResult:context.

func (*HitTestResult) ImageURI

func (hitTestResult *HitTestResult) ImageURI() string

ImageURI gets the value of the KitHitTestResult:image-uri property.

func (*HitTestResult) LinkLabel

func (hitTestResult *HitTestResult) LinkLabel() string

LinkLabel gets the value of the KitHitTestResult:link-label property.

func (*HitTestResult) LinkTitle

func (hitTestResult *HitTestResult) LinkTitle() string

LinkTitle gets the value of the KitHitTestResult:link-title property.

func (*HitTestResult) LinkURI

func (hitTestResult *HitTestResult) LinkURI() string

LinkURI gets the value of the KitHitTestResult:link-uri property.

func (*HitTestResult) MediaURI

func (hitTestResult *HitTestResult) MediaURI() string

MediaURI gets the value of the KitHitTestResult:media-uri property.

type HitTestResultContext

type HitTestResultContext int

HitTestResultContext: enum values with flags representing the context of a KitHitTestResult.

const (
	// HitTestResultContextDocument: anywhere in the document.
	HitTestResultContextDocument HitTestResultContext = 0b10
	// HitTestResultContextLink element.
	HitTestResultContextLink HitTestResultContext = 0b100
	// HitTestResultContextImage element.
	HitTestResultContextImage HitTestResultContext = 0b1000
	// HitTestResultContextMedia: video or audio element.
	HitTestResultContextMedia HitTestResultContext = 0b10000
	// HitTestResultContextEditable element
	HitTestResultContextEditable HitTestResultContext = 0b100000
	// HitTestResultContextScrollbar element.
	HitTestResultContextScrollbar HitTestResultContext = 0b1000000
	// HitTestResultContextSelection: selected element. Since 2.8
	HitTestResultContextSelection HitTestResultContext = 0b10000000
)

func (HitTestResultContext) Has

Has returns true if h contains other.

func (HitTestResultContext) String

func (h HitTestResultContext) String() string

String returns the names in string for HitTestResultContext.

type ITPFirstParty

type ITPFirstParty struct {
	// contains filtered or unexported fields
}

ITPFirstParty: 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

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.

type ITPThirdParty

type ITPThirdParty struct {
	// contains filtered or unexported fields
}

ITPThirdParty: 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

func (*ITPThirdParty) FirstParties

func (itpThirdParty *ITPThirdParty) FirstParties() []*ITPFirstParty

FirstParties: get the list of KitITPFirstParty under which itp_third_party has been seen.

type InputHints

type InputHints int

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

type InputMethodContext struct {
	*externglib.Object
}

func (*InputMethodContext) FilterKeyEvent

func (context *InputMethodContext) FilterKeyEvent(keyEvent *gdk.EventKey) 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.

func (*InputMethodContext) InputHints

func (context *InputMethodContext) InputHints() InputHints

InputHints: get the value of the KitInputMethodContext:input-hints property.

func (*InputMethodContext) InputPurpose

func (context *InputMethodContext) InputPurpose() InputPurpose

InputPurpose: get the value of the KitInputMethodContext:input-purpose property.

func (*InputMethodContext) NotifyCursorArea

func (context *InputMethodContext) NotifyCursorArea(x int32, y int32, width int32, height int32)

NotifyCursorArea: notify context that cursor area changed in input associated.

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 int32, cursorIndex uint32, selectionIndex uint32)

NotifySurrounding: notify context that the context surrounding the cursor has changed. If there's no selection selection_index is the same as cursor_index.

func (*InputMethodContext) Preedit

func (context *InputMethodContext) Preedit() (string, []InputMethodUnderline, uint32)

Preedit: get the current preedit string for the context, and a list of WebKitInputMethodUnderline to apply to the string. The string will be displayed inserted at cursor_offset.

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.

func (*InputMethodContext) SetInputHints

func (context *InputMethodContext) SetInputHints(hints InputHints)

func (*InputMethodContext) SetInputPurpose

func (context *InputMethodContext) SetInputPurpose(purpose InputPurpose)

SetInputPurpose: set the value of the KitInputMethodContext:input-purpose property.

type InputMethodContextOverrider

type InputMethodContextOverrider interface {
	Committed(text string)
	DeleteSurrounding(offset int32, nChars uint32)
	// 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.
	FilterKeyEvent(keyEvent *gdk.EventKey) bool
	// Preedit: get the current preedit string for the context, and a list of
	// WebKitInputMethodUnderline to apply to the string. The string will be
	// displayed inserted at cursor_offset.
	Preedit() (string, []InputMethodUnderline, uint32)
	// NotifyCursorArea: notify context that cursor area changed in input
	// associated.
	NotifyCursorArea(x int32, y int32, width int32, height int32)
	// NotifyFocusIn: notify context that input associated has gained focus.
	NotifyFocusIn()
	// NotifyFocusOut: notify context that input associated has lost focus.
	NotifyFocusOut()
	// NotifySurrounding: notify context that the context surrounding the cursor
	// has changed. If there's no selection selection_index is the same as
	// cursor_index.
	NotifySurrounding(text string, length uint32, cursorIndex uint32, selectionIndex uint32)
	PreeditChanged()
	PreeditFinished()
	PreeditStarted()
	// Reset the context. This will typically cause the input to clear the
	// preedit state.
	Reset()
	// SetEnablePreedit: set whether context should enable preedit to display
	// feedback.
	SetEnablePreedit(enabled bool)
}

InputMethodContextOverrider contains methods that are overridable.

As of right now, interface overriding and subclassing is not supported yet, so the interface currently has no use.

type InputMethodContexter

type InputMethodContexter interface {
	externglib.Objector

	// FilterKeyEvent: allow key_event to be handled by the input method.
	FilterKeyEvent(keyEvent *gdk.EventKey) bool
	// InputHints: get the value of the KitInputMethodContext:input-hints
	// property.
	InputHints() InputHints
	// InputPurpose: get the value of the KitInputMethodContext:input-purpose
	// property.
	InputPurpose() InputPurpose
	// Preedit: get the current preedit string for the context, and a list of
	// WebKitInputMethodUnderline to apply to the string.
	Preedit() (string, []InputMethodUnderline, uint32)
	// NotifyCursorArea: notify context that cursor area changed in input
	// associated.
	NotifyCursorArea(x int32, y int32, width int32, height int32)
	// NotifyFocusIn: notify context that input associated has gained focus.
	NotifyFocusIn()
	// NotifyFocusOut: notify context that input associated has lost focus.
	NotifyFocusOut()
	// NotifySurrounding: notify context that the context surrounding the cursor
	// has changed.
	NotifySurrounding(text string, length int32, cursorIndex uint32, selectionIndex uint32)
	// Reset the context.
	Reset()
	// SetEnablePreedit: set whether context should enable preedit to display
	// feedback.
	SetEnablePreedit(enabled bool)
	SetInputHints(hints InputHints)
	// SetInputPurpose: set the value of the KitInputMethodContext:input-purpose
	// property.
	SetInputPurpose(purpose InputPurpose)
}

InputMethodContexter describes InputMethodContext's abstract methods.

type InputMethodUnderline

type InputMethodUnderline struct {
	// contains filtered or unexported fields
}

InputMethodUnderline: instance of this type is always passed by reference.

func NewInputMethodUnderline

func NewInputMethodUnderline(startOffset uint32, endOffset uint32) *InputMethodUnderline

NewInputMethodUnderline constructs a struct InputMethodUnderline.

func (*InputMethodUnderline) Copy

func (underline *InputMethodUnderline) Copy() *InputMethodUnderline

Copy: make a copy of the 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.

type InputPurpose

type InputPurpose int

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

type InsecureContentEvent int

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 InstallMissingMediaPluginsPermissionRequest

type InstallMissingMediaPluginsPermissionRequest struct {
	*externglib.Object

	PermissionRequest
}

func (*InstallMissingMediaPluginsPermissionRequest) Description

func (request *InstallMissingMediaPluginsPermissionRequest) Description() string

Description gets the description about the missing plugins provided by the media backend when a media couldn't be played.

type JavascriptError

type JavascriptError int

JavascriptError: enum values used to denote errors happening when executing JavaScript

const (
	// JavascriptErrorScriptFailed: exception was raised in JavaScript execution
	JavascriptErrorScriptFailed JavascriptError = 699
)

func (JavascriptError) String

func (j JavascriptError) String() string

String returns the name in string for JavascriptError.

type JavascriptResult

type JavascriptResult struct {
	// contains filtered or unexported fields
}

JavascriptResult: instance of this type is always passed by reference.

func (*JavascriptResult) JsValue

func (jsResult *JavascriptResult) JsValue() *javascriptcore.Value

JsValue: get the CValue of js_result.

type LoadEvent

type LoadEvent int

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
)

func (LoadEvent) String

func (l LoadEvent) String() string

String returns the name in string for LoadEvent.

type MIMEInfo

type MIMEInfo struct {
	// contains filtered or unexported fields
}

MIMEInfo: instance of this type is always passed by reference.

func (*MIMEInfo) Description

func (info *MIMEInfo) Description() string

Description: deprecated: since version 2.32.

func (*MIMEInfo) Extensions deprecated

This method has been deprecated.
func (info *MIMEInfo) Extensions() []string

Extensions: get the list of file extensions associated to the MIME type of info

Deprecated: since version 2.32.

func (*MIMEInfo) MIMEType

func (info *MIMEInfo) MIMEType() string

MIMEType: deprecated: since version 2.32.

type MediaKeySystemPermissionRequest

type MediaKeySystemPermissionRequest struct {
	*externglib.Object

	PermissionRequest
}
type NavigationAction struct {
	// contains filtered or unexported fields
}

NavigationAction: instance of this type is always passed by reference.

func (navigation *NavigationAction) Copy() *NavigationAction

Copy: make a copy of navigation.

func (navigation *NavigationAction) IsRedirect() bool

IsRedirect returns whether the navigation was redirected.

func (navigation *NavigationAction) IsUserGesture() bool

IsUserGesture: return whether the navigation was triggered by a user gesture like a mouse click.

func (navigation *NavigationAction) Modifiers() uint32

Modifiers: return a bitmask of ModifierType values describing the modifier keys that were in effect when the navigation was requested

func (navigation *NavigationAction) MouseButton() uint32

MouseButton: return the number of the mouse button that triggered the navigation, or 0 if the navigation was not started by a mouse event.

func (navigation *NavigationAction) NavigationType() NavigationType

NavigationType: return the type of action that triggered the navigation.

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.

type NavigationPolicyDecision struct {
	PolicyDecision
}
func (decision *NavigationPolicyDecision) FrameName() string

FrameName gets the value of the KitNavigationPolicyDecision:frame-name property.

This method has been deprecated.
func (decision *NavigationPolicyDecision) Modifiers() uint32

Modifiers gets the value of the KitNavigationPolicyDecision:modifiers property.

Deprecated: Use webkit_navigation_policy_decision_get_navigation_action() instead.

This method has been deprecated.
func (decision *NavigationPolicyDecision) MouseButton() uint32

MouseButton gets the value of the KitNavigationPolicyDecision:mouse-button property.

Deprecated: Use webkit_navigation_policy_decision_get_navigation_action() instead.

func (decision *NavigationPolicyDecision) NavigationAction() *NavigationAction

NavigationAction gets the value of the KitNavigationPolicyDecision:navigation-action property.

This method has been deprecated.
func (decision *NavigationPolicyDecision) NavigationType() NavigationType

NavigationType gets the value of the KitNavigationPolicyDecision:navigation-type property.

Deprecated: Use webkit_navigation_policy_decision_get_navigation_action() instead.

This method has been deprecated.
func (decision *NavigationPolicyDecision) Request() *URIRequest

Request gets the value of the KitNavigationPolicyDecision:request property.

Deprecated: Use webkit_navigation_policy_decision_get_navigation_action() instead.

type NavigationType int

NavigationType: enum values used to denote the various navigation types.

const (
	// NavigationTypeLinkClicked: navigation was triggered by clicking a link.
	NavigationTypeLinkClicked NavigationType = iota
	// NavigationTypeFormSubmitted: navigation was triggered by submitting a
	// form.
	NavigationTypeFormSubmitted
	// NavigationTypeBackForward: navigation was triggered by navigating forward
	// or backward.
	NavigationTypeBackForward
	// NavigationTypeReload: navigation was triggered by reloading.
	NavigationTypeReload
	// NavigationTypeFormResubmitted: navigation was triggered by resubmitting a
	// form.
	NavigationTypeFormResubmitted
	// NavigationTypeOther: navigation was triggered by some other action.
	NavigationTypeOther
)
func (n NavigationType) String() string

String returns the name in string for NavigationType.

type NetworkError

type NetworkError int

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

type NetworkProxyMode int

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: 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.

func (*NetworkProxySettings) Copy

func (proxySettings *NetworkProxySettings) Copy() *NetworkProxySettings

Copy: make a copy of the KitNetworkProxySettings.

type Notification

type Notification struct {
	*externglib.Object
}

func (*Notification) Body

func (notification *Notification) Body() string

Body obtains the 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) ID

func (notification *Notification) ID() uint64

ID obtains the unique id for the notification.

func (*Notification) Tag

func (notification *Notification) Tag() string

Tag obtains the tag identifier for the notification.

func (*Notification) Title

func (notification *Notification) Title() string

Title obtains the title for the notification.

type NotificationPermissionRequest

type NotificationPermissionRequest struct {
	*externglib.Object

	PermissionRequest
}

type OptionMenu

type OptionMenu struct {
	*externglib.Object
}

func (*OptionMenu) ActivateItem

func (menu *OptionMenu) ActivateItem(index uint32)

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.

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) Item

func (menu *OptionMenu) Item(index uint32) *OptionMenuItem

Item returns the KitOptionMenuItem at index in menu.

func (*OptionMenu) NItems

func (menu *OptionMenu) NItems() uint32

NItems gets the length of the menu.

func (*OptionMenu) SelectItem

func (menu *OptionMenu) SelectItem(index uint32)

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.

type OptionMenuItem

type OptionMenuItem struct {
	// contains filtered or unexported fields
}

OptionMenuItem: instance of this type is always passed by reference.

func (*OptionMenuItem) Copy

func (item *OptionMenuItem) Copy() *OptionMenuItem

Copy: make a copy of the KitOptionMenuItem.

func (*OptionMenuItem) IsEnabled

func (item *OptionMenuItem) IsEnabled() bool

IsEnabled: whether a KitOptionMenuItem is enabled.

func (*OptionMenuItem) IsGroupChild

func (item *OptionMenuItem) IsGroupChild() bool

IsGroupChild: whether a KitOptionMenuItem is a group child.

func (*OptionMenuItem) IsGroupLabel

func (item *OptionMenuItem) IsGroupLabel() bool

IsGroupLabel: whether a KitOptionMenuItem is a group label.

func (*OptionMenuItem) IsSelected

func (item *OptionMenuItem) IsSelected() bool

IsSelected: whether a KitOptionMenuItem is the currently selected one.

func (*OptionMenuItem) Label

func (item *OptionMenuItem) Label() string

Label: get the label of a KitOptionMenuItem.

func (*OptionMenuItem) Tooltip

func (item *OptionMenuItem) Tooltip() string

Tooltip: get the tooltip of a KitOptionMenuItem.

type PermissionRequest

type PermissionRequest struct {
	*externglib.Object
}

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 PermissionRequestOverrider

type PermissionRequestOverrider interface {
	// Allow the action which triggered this request.
	Allow()
	// Deny the action which triggered this request.
	Deny()
}

PermissionRequestOverrider contains methods that are overridable.

As of right now, interface overriding and subclassing is not supported yet, so the interface currently has no use.

type PermissionRequester

type PermissionRequester interface {
	externglib.Objector

	// Allow the action which triggered this request.
	Allow()
	// Deny the action which triggered this request.
	Deny()
}

PermissionRequester describes PermissionRequest's abstract methods.

type Plugin

type Plugin struct {
	*externglib.Object
}

func (*Plugin) Description

func (plugin *Plugin) Description() string

Description: deprecated: since version 2.32.

func (*Plugin) MIMEInfoList deprecated

This method has been deprecated.
func (plugin *Plugin) MIMEInfoList() []*MIMEInfo

MIMEInfoList: get information about MIME types handled by the plugin, as a list of KitMimeInfo.

Deprecated: since version 2.32.

func (*Plugin) Name

func (plugin *Plugin) Name() string

Name: deprecated: since version 2.32.

func (*Plugin) Path

func (plugin *Plugin) Path() string

Path: deprecated: since version 2.32.

type PluginError

type PluginError int

PluginError: enum values used to denote the various plugin and multimedia errors.

const (
	// PluginErrorFailed: generic plugin load failure. Deprecated 2.32
	PluginErrorFailed PluginError = 299
	// PluginErrorCannotFindPlugin: load failure due to missing plugin.
	// Deprecated 2.32
	PluginErrorCannotFindPlugin PluginError = 200
	// PluginErrorCannotLoadPlugin: load failure due to inability to load
	// plugin. Deprecated 2.32
	PluginErrorCannotLoadPlugin PluginError = 201
	// PluginErrorJavaUnavailable: load failure due to missing Java support that
	// is required to load plugin. Deprecated 2.32
	PluginErrorJavaUnavailable PluginError = 202
	// PluginErrorConnectionCancelled: load failure due to connection
	// cancellation. Deprecated 2.32
	PluginErrorConnectionCancelled PluginError = 203
	// PluginErrorWillHandleLoad: preliminary load failure for media content
	// types. A new load will be started to perform the media load.
	PluginErrorWillHandleLoad PluginError = 204
)

func (PluginError) String

func (p PluginError) String() string

String returns the name in string for PluginError.

type PointerLockPermissionRequest

type PointerLockPermissionRequest struct {
	*externglib.Object

	PermissionRequest
}

type PolicyDecision

type PolicyDecision struct {
	*externglib.Object
}

func (*PolicyDecision) Download

func (decision *PolicyDecision) Download()

Download: spawn a download from this decision.

func (*PolicyDecision) Ignore

func (decision *PolicyDecision) Ignore()

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 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.

type PolicyDecisionType

type PolicyDecisionType int

PolicyDecisionType: enum values used for determining the type of a policy decision during KitWebView::decide-policy.

const (
	// PolicyDecisionTypeNavigationAction: this type of policy decision is
	// 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 &lt;a&gt; 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

type PolicyDecisioner interface {
	externglib.Objector

	// Download: spawn a download from this decision.
	Download()
	// Ignore the action which triggered this decision.
	Ignore()
	// Use: accept the action which triggered this decision.
	Use()
	// UseWithPolicies: 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.
	UseWithPolicies(policies *WebsitePolicies)
}

PolicyDecisioner describes PolicyDecision's abstract methods.

type PolicyError

type PolicyError int

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 PrintCustomWidget

type PrintCustomWidget struct {
	*externglib.Object
}

func NewPrintCustomWidget

func NewPrintCustomWidget(widget gtk.Widgetter, title string) *PrintCustomWidget

NewPrintCustomWidget: create a new KitPrintCustomWidget with given widget and title. The widget ownership is taken and it is destroyed together with the dialog even if this object could still be alive at that point. You typically want to pass a container widget with multiple widgets in it.

func (*PrintCustomWidget) Title

func (printCustomWidget *PrintCustomWidget) Title() string

Title: return the value of KitPrintCustomWidget:title property for the given print_custom_widget object.

func (*PrintCustomWidget) Widget

func (printCustomWidget *PrintCustomWidget) Widget() gtk.Widgetter

Widget: return the value of KitPrintCustomWidget:widget property for the given print_custom_widget object. The returned value will always be valid if called from KitPrintCustomWidget::apply or KitPrintCustomWidget::update callbacks, but it will be NULL if called after the KitPrintCustomWidget::apply signal is emitted.

type PrintCustomWidgetOverrider

type PrintCustomWidgetOverrider interface {
	Apply(widget gtk.Widgetter)
	Update(widget gtk.Widgetter, pageSetup *gtk.PageSetup, printSettings *gtk.PrintSettings)
}

PrintCustomWidgetOverrider contains methods that are overridable.

As of right now, interface overriding and subclassing is not supported yet, so the interface currently has no use.

type PrintError

type PrintError int

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

type PrintOperation struct {
	*externglib.Object
}

func NewPrintOperation

func NewPrintOperation(webView *WebView) *PrintOperation

NewPrintOperation: create a new KitPrintOperation to print web_view contents.

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.

func (*PrintOperation) Print

func (printOperation *PrintOperation) Print()

Print: 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.

func (*PrintOperation) RunDialog

func (printOperation *PrintOperation) RunDialog(parent *gtk.Window) PrintOperationResponse

RunDialog: 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.

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.

func (*PrintOperation) SetPrintSettings

func (printOperation *PrintOperation) SetPrintSettings(printSettings *gtk.PrintSettings)

SetPrintSettings: 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.

type PrintOperationResponse

type PrintOperationResponse int

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 ProcessModel

type ProcessModel int

ProcessModel: enum values used for determining the KitWebContext process model.

const (
	// ProcessModelSharedSecondaryProcess: deprecated 2.26.
	ProcessModelSharedSecondaryProcess ProcessModel = iota
	// ProcessModelMultipleSecondaryProcesses: use one process for each
	// KitWebView, while still allowing for some of them to share a process in
	// certain situations. The main advantage of this process model is that the
	// rendering process for a web view can crash while the rest of the views
	// keep working normally. This process model is indicated for applications
	// which may use a number of web views and the content of in each must not
	// interfere with the rest — for example a full-fledged web browser with
	// support for multiple tabs.
	ProcessModelMultipleSecondaryProcesses
)

func (ProcessModel) String

func (p ProcessModel) String() string

String returns the name in string for ProcessModel.

type ResponsePolicyDecision

type ResponsePolicyDecision struct {
	PolicyDecision
}

func (*ResponsePolicyDecision) IsMIMETypeSupported

func (decision *ResponsePolicyDecision) IsMIMETypeSupported() bool

IsMIMETypeSupported 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().

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.

func (*ResponsePolicyDecision) Response

func (decision *ResponsePolicyDecision) Response() *URIResponse

Response gets the value of the KitResponsePolicyDecision:response property.

type SaveMode

type SaveMode int

SaveMode: enum values to specify the different ways in which a KitWebView can save its current web page into a self-contained file.

const (
	// SaveModeMhtml: save the current page using the MHTML format.
	SaveModeMhtml SaveMode = iota
)

func (SaveMode) String

func (s SaveMode) String() string

String returns the name in string for SaveMode.

type ScriptDialog

type ScriptDialog struct {
	// contains filtered or unexported fields
}

ScriptDialog: 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: 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

func (*ScriptDialog) DialogType

func (dialog *ScriptDialog) DialogType() ScriptDialogType

DialogType: get the dialog type of a KitScriptDialog.

func (*ScriptDialog) Message

func (dialog *ScriptDialog) Message() string

Message: get the message of a KitScriptDialog.

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.

func (*ScriptDialog) PromptSetText

func (dialog *ScriptDialog) PromptSetText(text string)

PromptSetText: 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.

type ScriptDialogType

type ScriptDialogType int

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 SecurityManager

type SecurityManager struct {
	*externglib.Object
}

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/.

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.

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.

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.

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.

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.

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().

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().

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().

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().

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().

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().

type SecurityOrigin

type SecurityOrigin struct {
	// contains filtered or unexported fields
}

SecurityOrigin: 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.

func (*SecurityOrigin) IsOpaque deprecated

This method has been deprecated.
func (origin *SecurityOrigin) IsOpaque() bool

IsOpaque: this function returns FALSE. KitSecurityOrigin is now a simple wrapper around a &lt;protocol, host, port&gt; triplet, and no longer represents an origin as defined by web standards that may be opaque.

Deprecated: since version 2.32.

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.

func (*SecurityOrigin) Protocol

func (origin *SecurityOrigin) Protocol() string

Protocol gets the protocol of origin.

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.

type Settings

type Settings struct {
	*externglib.Object
}

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().

func (*Settings) AllowFileAccessFromFileUrls

func (settings *Settings) AllowFileAccessFromFileUrls() bool

AllowFileAccessFromFileUrls: get the KitSettings:allow-file-access-from-file-urls property.

func (*Settings) AllowModalDialogs

func (settings *Settings) AllowModalDialogs() bool

AllowModalDialogs: get the KitSettings:allow-modal-dialogs property.

func (*Settings) AllowTopNavigationToDataUrls

func (settings *Settings) AllowTopNavigationToDataUrls() bool

AllowTopNavigationToDataUrls: get the KitSettings:allow-top-navigation-to-data-urls property.

func (*Settings) AllowUniversalAccessFromFileUrls

func (settings *Settings) AllowUniversalAccessFromFileUrls() bool

AllowUniversalAccessFromFileUrls: get the KitSettings:allow-universal-access-from-file-urls property.

func (*Settings) AutoLoadImages

func (settings *Settings) AutoLoadImages() bool

AutoLoadImages: get the KitSettings:auto-load-images property.

func (*Settings) CursiveFontFamily

func (settings *Settings) CursiveFontFamily() string

CursiveFontFamily gets the KitSettings:cursive-font-family property.

func (*Settings) DefaultCharset

func (settings *Settings) DefaultCharset() string

DefaultCharset gets the KitSettings:default-charset property.

func (*Settings) DefaultFontFamily

func (settings *Settings) DefaultFontFamily() string

func (*Settings) DefaultFontSize

func (settings *Settings) DefaultFontSize() uint32

DefaultFontSize gets the KitSettings:default-font-size property.

func (*Settings) DefaultMonospaceFontSize

func (settings *Settings) DefaultMonospaceFontSize() uint32

DefaultMonospaceFontSize gets the KitSettings:default-monospace-font-size property.

func (*Settings) DrawCompositingIndicators

func (settings *Settings) DrawCompositingIndicators() bool

DrawCompositingIndicators: get the KitSettings:draw-compositing-indicators property.

func (*Settings) EnableAccelerated2DCanvas deprecated

This method has been deprecated.
func (settings *Settings) EnableAccelerated2DCanvas() bool

EnableAccelerated2DCanvas: get the KitSettings:enable-accelerated-2d-canvas property.

Deprecated: since version 2.32.

func (*Settings) EnableBackForwardNavigationGestures

func (settings *Settings) EnableBackForwardNavigationGestures() bool

EnableBackForwardNavigationGestures: get the KitSettings:enable-back-forward-navigation-gestures property.

func (*Settings) EnableCaretBrowsing

func (settings *Settings) EnableCaretBrowsing() bool

EnableCaretBrowsing: get the KitSettings:enable-caret-browsing property.

func (*Settings) EnableDeveloperExtras

func (settings *Settings) EnableDeveloperExtras() bool

EnableDeveloperExtras: get the KitSettings:enable-developer-extras property.

func (*Settings) EnableDnsPrefetching

func (settings *Settings) EnableDnsPrefetching() bool

EnableDnsPrefetching: get the KitSettings:enable-dns-prefetching property.

func (*Settings) EnableEncryptedMedia

func (settings *Settings) EnableEncryptedMedia() bool

EnableEncryptedMedia: get the KitSettings:enable-encrypted-media property.

func (*Settings) EnableFrameFlattening

func (settings *Settings) EnableFrameFlattening() bool

EnableFrameFlattening: get the KitSettings:enable-frame-flattening property.

func (*Settings) EnableFullscreen

func (settings *Settings) EnableFullscreen() bool

EnableFullscreen: get the KitSettings:enable-fullscreen property.

func (*Settings) EnableHtml5Database

func (settings *Settings) EnableHtml5Database() bool

EnableHtml5Database: get the KitSettings:enable-html5-database property.

func (*Settings) EnableHtml5LocalStorage

func (settings *Settings) EnableHtml5LocalStorage() bool

EnableHtml5LocalStorage: get the KitSettings:enable-html5-local-storage property.

func (*Settings) EnableHyperlinkAuditing

func (settings *Settings) EnableHyperlinkAuditing() bool

EnableHyperlinkAuditing: get the KitSettings:enable-hyperlink-auditing property.

func (*Settings) EnableJava

func (settings *Settings) EnableJava() bool

EnableJava: get the KitSettings:enable-java property.

func (*Settings) EnableJavascript

func (settings *Settings) EnableJavascript() bool

EnableJavascript: get the KitSettings:enable-javascript property.

func (*Settings) EnableJavascriptMarkup

func (settings *Settings) EnableJavascriptMarkup() bool

EnableJavascriptMarkup: get the KitSettings:enable-javascript-markup property.

func (*Settings) EnableMedia

func (settings *Settings) EnableMedia() bool

EnableMedia: get the KitSettings:enable-media property.

func (*Settings) EnableMediaCapabilities

func (settings *Settings) EnableMediaCapabilities() bool

EnableMediaCapabilities: get the KitSettings:enable-media-capabilities property.

func (*Settings) EnableMediaStream

func (settings *Settings) EnableMediaStream() bool

EnableMediaStream: get the KitSettings:enable-media-stream property.

func (*Settings) EnableMediasource

func (settings *Settings) EnableMediasource() bool

EnableMediasource: get the KitSettings:enable-mediasource property.

func (*Settings) EnableMockCaptureDevices

func (settings *Settings) EnableMockCaptureDevices() bool

EnableMockCaptureDevices: get the KitSettings:enable-mock-capture-devices property.

func (*Settings) EnableOfflineWebApplicationCache

func (settings *Settings) EnableOfflineWebApplicationCache() bool

EnableOfflineWebApplicationCache: get the KitSettings:enable-offline-web-application-cache property.

func (*Settings) EnablePageCache

func (settings *Settings) EnablePageCache() bool

EnablePageCache: get the KitSettings:enable-page-cache property.

func (*Settings) EnablePlugins deprecated

This method has been deprecated.
func (settings *Settings) EnablePlugins() bool

EnablePlugins: get the KitSettings:enable-plugins property.

Deprecated: since version 2.32.

func (*Settings) EnablePrivateBrowsing deprecated

This method has been deprecated.
func (settings *Settings) EnablePrivateBrowsing() bool

EnablePrivateBrowsing: get the KitSettings:enable-private-browsing property.

Deprecated: Use KitWebView:is-ephemeral or KitWebContext:is-ephemeral instead.

func (*Settings) EnableResizableTextAreas

func (settings *Settings) EnableResizableTextAreas() bool

EnableResizableTextAreas: get the KitSettings:enable-resizable-text-areas property.

func (*Settings) EnableSiteSpecificQuirks

func (settings *Settings) EnableSiteSpecificQuirks() bool

EnableSiteSpecificQuirks: get the KitSettings:enable-site-specific-quirks property.

func (*Settings) EnableSmoothScrolling

func (settings *Settings) EnableSmoothScrolling() bool

EnableSmoothScrolling: get the KitSettings:enable-smooth-scrolling property.

func (*Settings) EnableSpatialNavigation

func (settings *Settings) EnableSpatialNavigation() bool

EnableSpatialNavigation: get the KitSettings:enable-spatial-navigation property.

func (settings *Settings) EnableTabsToLinks() bool

EnableTabsToLinks: get the KitSettings:enable-tabs-to-links property.

func (*Settings) EnableWebaudio

func (settings *Settings) EnableWebaudio() bool

EnableWebaudio: get the KitSettings:enable-webaudio property.

func (*Settings) EnableWebgl

func (settings *Settings) EnableWebgl() bool

EnableWebgl: get the KitSettings:enable-webgl property.

func (*Settings) EnableWriteConsoleMessagesToStdout

func (settings *Settings) EnableWriteConsoleMessagesToStdout() bool

EnableWriteConsoleMessagesToStdout: get the KitSettings:enable-write-console-messages-to-stdout property.

func (*Settings) EnableXssAuditor

func (settings *Settings) EnableXssAuditor() bool

EnableXssAuditor: get the KitSettings:enable-xss-auditor property.

func (*Settings) FantasyFontFamily

func (settings *Settings) FantasyFontFamily() string

FantasyFontFamily gets the KitSettings:fantasy-font-family property.

func (*Settings) HardwareAccelerationPolicy

func (settings *Settings) HardwareAccelerationPolicy() HardwareAccelerationPolicy

HardwareAccelerationPolicy: get the KitSettings:hardware-acceleration-policy property.

func (*Settings) JavascriptCanAccessClipboard

func (settings *Settings) JavascriptCanAccessClipboard() bool

JavascriptCanAccessClipboard: get the KitSettings:javascript-can-access-clipboard property.

func (*Settings) JavascriptCanOpenWindowsAutomatically

func (settings *Settings) JavascriptCanOpenWindowsAutomatically() bool

JavascriptCanOpenWindowsAutomatically: get the KitSettings:javascript-can-open-windows-automatically property.

func (*Settings) LoadIconsIgnoringImageLoadSetting

func (settings *Settings) LoadIconsIgnoringImageLoadSetting() bool

LoadIconsIgnoringImageLoadSetting: get the KitSettings:load-icons-ignoring-image-load-setting property.

func (*Settings) MediaContentTypesRequiringHardwareSupport

func (settings *Settings) MediaContentTypesRequiringHardwareSupport() string

MediaContentTypesRequiringHardwareSupport gets the KitSettings:media-content-types-requiring-hardware-support property.

func (*Settings) MediaPlaybackAllowsInline

func (settings *Settings) MediaPlaybackAllowsInline() bool

MediaPlaybackAllowsInline: get the KitSettings:media-playback-allows-inline property.

func (*Settings) MediaPlaybackRequiresUserGesture

func (settings *Settings) MediaPlaybackRequiresUserGesture() bool

MediaPlaybackRequiresUserGesture: get the KitSettings:media-playback-requires-user-gesture property.

func (*Settings) MinimumFontSize

func (settings *Settings) MinimumFontSize() uint32

MinimumFontSize gets the KitSettings:minimum-font-size property.

func (*Settings) MonospaceFontFamily

func (settings *Settings) MonospaceFontFamily() string

MonospaceFontFamily gets the KitSettings:monospace-font-family property.

func (*Settings) PictographFontFamily

func (settings *Settings) PictographFontFamily() string

PictographFontFamily gets the KitSettings:pictograph-font-family property.

func (*Settings) PrintBackgrounds

func (settings *Settings) PrintBackgrounds() bool

PrintBackgrounds: get the KitSettings:print-backgrounds property.

func (*Settings) SansSerifFontFamily

func (settings *Settings) SansSerifFontFamily() string

SansSerifFontFamily gets the KitSettings:sans-serif-font-family property.

func (*Settings) SerifFontFamily

func (settings *Settings) SerifFontFamily() string

SerifFontFamily gets the KitSettings:serif-font-family property.

func (*Settings) SetAllowFileAccessFromFileUrls

func (settings *Settings) SetAllowFileAccessFromFileUrls(allowed bool)

SetAllowFileAccessFromFileUrls: set the KitSettings:allow-file-access-from-file-urls property.

func (*Settings) SetAllowModalDialogs

func (settings *Settings) SetAllowModalDialogs(allowed bool)

SetAllowModalDialogs: set the KitSettings:allow-modal-dialogs property.

func (*Settings) SetAllowTopNavigationToDataUrls

func (settings *Settings) SetAllowTopNavigationToDataUrls(allowed bool)

SetAllowTopNavigationToDataUrls: set the KitSettings:allow-top-navigation-to-data-urls property.

func (*Settings) SetAllowUniversalAccessFromFileUrls

func (settings *Settings) SetAllowUniversalAccessFromFileUrls(allowed bool)

SetAllowUniversalAccessFromFileUrls: set the KitSettings:allow-universal-access-from-file-urls property.

func (*Settings) SetAutoLoadImages

func (settings *Settings) SetAutoLoadImages(enabled bool)

SetAutoLoadImages: set the KitSettings:auto-load-images property.

func (*Settings) SetCursiveFontFamily

func (settings *Settings) SetCursiveFontFamily(cursiveFontFamily string)

SetCursiveFontFamily: set the KitSettings:cursive-font-family property.

func (*Settings) SetDefaultCharset

func (settings *Settings) SetDefaultCharset(defaultCharset string)

SetDefaultCharset: set the KitSettings:default-charset property.

func (*Settings) SetDefaultFontFamily

func (settings *Settings) SetDefaultFontFamily(defaultFontFamily string)

SetDefaultFontFamily: set the KitSettings:default-font-family property.

func (*Settings) SetDefaultFontSize

func (settings *Settings) SetDefaultFontSize(fontSize uint32)

SetDefaultFontSize: set the KitSettings:default-font-size property.

func (*Settings) SetDefaultMonospaceFontSize

func (settings *Settings) SetDefaultMonospaceFontSize(fontSize uint32)

SetDefaultMonospaceFontSize: set the KitSettings:default-monospace-font-size property.

func (*Settings) SetDrawCompositingIndicators

func (settings *Settings) SetDrawCompositingIndicators(enabled bool)

SetDrawCompositingIndicators: set the KitSettings:draw-compositing-indicators property.

func (*Settings) SetEnableAccelerated2DCanvas deprecated

This method has been deprecated.
func (settings *Settings) SetEnableAccelerated2DCanvas(enabled bool)

SetEnableAccelerated2DCanvas: set the KitSettings:enable-accelerated-2d-canvas property.

Deprecated: since version 2.32.

func (*Settings) SetEnableBackForwardNavigationGestures

func (settings *Settings) SetEnableBackForwardNavigationGestures(enabled bool)

SetEnableBackForwardNavigationGestures: set the KitSettings:enable-back-forward-navigation-gestures property.

func (*Settings) SetEnableCaretBrowsing

func (settings *Settings) SetEnableCaretBrowsing(enabled bool)

SetEnableCaretBrowsing: set the KitSettings:enable-caret-browsing property.

func (*Settings) SetEnableDeveloperExtras

func (settings *Settings) SetEnableDeveloperExtras(enabled bool)

SetEnableDeveloperExtras: set the KitSettings:enable-developer-extras property.

func (*Settings) SetEnableDnsPrefetching

func (settings *Settings) SetEnableDnsPrefetching(enabled bool)

SetEnableDnsPrefetching: set the KitSettings:enable-dns-prefetching property.

func (*Settings) SetEnableEncryptedMedia

func (settings *Settings) SetEnableEncryptedMedia(enabled bool)

SetEnableEncryptedMedia: set the KitSettings:enable-encrypted-media property.

func (*Settings) SetEnableFrameFlattening

func (settings *Settings) SetEnableFrameFlattening(enabled bool)

SetEnableFrameFlattening: set the KitSettings:enable-frame-flattening property.

func (*Settings) SetEnableFullscreen

func (settings *Settings) SetEnableFullscreen(enabled bool)

SetEnableFullscreen: set the KitSettings:enable-fullscreen property.

func (*Settings) SetEnableHtml5Database

func (settings *Settings) SetEnableHtml5Database(enabled bool)

SetEnableHtml5Database: set the KitSettings:enable-html5-database property.

func (*Settings) SetEnableHtml5LocalStorage

func (settings *Settings) SetEnableHtml5LocalStorage(enabled bool)

SetEnableHtml5LocalStorage: set the KitSettings:enable-html5-local-storage property.

func (*Settings) SetEnableHyperlinkAuditing

func (settings *Settings) SetEnableHyperlinkAuditing(enabled bool)

SetEnableHyperlinkAuditing: set the KitSettings:enable-hyperlink-auditing property.

func (*Settings) SetEnableJava

func (settings *Settings) SetEnableJava(enabled bool)

SetEnableJava: set the KitSettings:enable-java property.

func (*Settings) SetEnableJavascript

func (settings *Settings) SetEnableJavascript(enabled bool)

SetEnableJavascript: set the KitSettings:enable-javascript property.

func (*Settings) SetEnableJavascriptMarkup

func (settings *Settings) SetEnableJavascriptMarkup(enabled bool)

SetEnableJavascriptMarkup: set the KitSettings:enable-javascript-markup property.

func (*Settings) SetEnableMedia

func (settings *Settings) SetEnableMedia(enabled bool)

SetEnableMedia: set the KitSettings:enable-media property.

func (*Settings) SetEnableMediaCapabilities

func (settings *Settings) SetEnableMediaCapabilities(enabled bool)

SetEnableMediaCapabilities: set the KitSettings:enable-media-capabilities property.

func (*Settings) SetEnableMediaStream

func (settings *Settings) SetEnableMediaStream(enabled bool)

SetEnableMediaStream: set the KitSettings:enable-media-stream property.

func (*Settings) SetEnableMediasource

func (settings *Settings) SetEnableMediasource(enabled bool)

SetEnableMediasource: set the KitSettings:enable-mediasource property.

func (*Settings) SetEnableMockCaptureDevices

func (settings *Settings) SetEnableMockCaptureDevices(enabled bool)

SetEnableMockCaptureDevices: set the KitSettings:enable-mock-capture-devices property.

func (*Settings) SetEnableOfflineWebApplicationCache

func (settings *Settings) SetEnableOfflineWebApplicationCache(enabled bool)

SetEnableOfflineWebApplicationCache: set the KitSettings:enable-offline-web-application-cache property.

func (*Settings) SetEnablePageCache

func (settings *Settings) SetEnablePageCache(enabled bool)

SetEnablePageCache: set the KitSettings:enable-page-cache property.

func (*Settings) SetEnablePlugins deprecated

This method has been deprecated.
func (settings *Settings) SetEnablePlugins(enabled bool)

SetEnablePlugins: set the KitSettings:enable-plugins property.

Deprecated: since version 2.32.

func (*Settings) SetEnablePrivateBrowsing deprecated

This method has been deprecated.
func (settings *Settings) SetEnablePrivateBrowsing(enabled bool)

SetEnablePrivateBrowsing: set the KitSettings:enable-private-browsing property.

Deprecated: Use KitWebView:is-ephemeral or KitWebContext:is-ephemeral instead.

func (*Settings) SetEnableResizableTextAreas

func (settings *Settings) SetEnableResizableTextAreas(enabled bool)

SetEnableResizableTextAreas: set the KitSettings:enable-resizable-text-areas property.

func (*Settings) SetEnableSiteSpecificQuirks

func (settings *Settings) SetEnableSiteSpecificQuirks(enabled bool)

SetEnableSiteSpecificQuirks: set the KitSettings:enable-site-specific-quirks property.

func (*Settings) SetEnableSmoothScrolling

func (settings *Settings) SetEnableSmoothScrolling(enabled bool)

SetEnableSmoothScrolling: set the KitSettings:enable-smooth-scrolling property.

func (*Settings) SetEnableSpatialNavigation

func (settings *Settings) SetEnableSpatialNavigation(enabled bool)

SetEnableSpatialNavigation: set the KitSettings:enable-spatial-navigation property.

func (settings *Settings) SetEnableTabsToLinks(enabled bool)

SetEnableTabsToLinks: set the KitSettings:enable-tabs-to-links property.

func (*Settings) SetEnableWebaudio

func (settings *Settings) SetEnableWebaudio(enabled bool)

SetEnableWebaudio: set the KitSettings:enable-webaudio property.

func (*Settings) SetEnableWebgl

func (settings *Settings) SetEnableWebgl(enabled bool)

SetEnableWebgl: set the KitSettings:enable-webgl property.

func (*Settings) SetEnableWriteConsoleMessagesToStdout

func (settings *Settings) SetEnableWriteConsoleMessagesToStdout(enabled bool)

SetEnableWriteConsoleMessagesToStdout: set the KitSettings:enable-write-console-messages-to-stdout property.

func (*Settings) SetEnableXssAuditor

func (settings *Settings) SetEnableXssAuditor(enabled bool)

SetEnableXssAuditor: set the KitSettings:enable-xss-auditor property.

func (*Settings) SetFantasyFontFamily

func (settings *Settings) SetFantasyFontFamily(fantasyFontFamily string)

SetFantasyFontFamily: set the KitSettings:fantasy-font-family property.

func (*Settings) SetHardwareAccelerationPolicy

func (settings *Settings) SetHardwareAccelerationPolicy(policy HardwareAccelerationPolicy)

SetHardwareAccelerationPolicy: set the KitSettings:hardware-acceleration-policy property.

func (*Settings) SetJavascriptCanAccessClipboard

func (settings *Settings) SetJavascriptCanAccessClipboard(enabled bool)

SetJavascriptCanAccessClipboard: set the KitSettings:javascript-can-access-clipboard property.

func (*Settings) SetJavascriptCanOpenWindowsAutomatically

func (settings *Settings) SetJavascriptCanOpenWindowsAutomatically(enabled bool)

SetJavascriptCanOpenWindowsAutomatically: set the KitSettings:javascript-can-open-windows-automatically property.

func (*Settings) SetLoadIconsIgnoringImageLoadSetting

func (settings *Settings) SetLoadIconsIgnoringImageLoadSetting(enabled bool)

SetLoadIconsIgnoringImageLoadSetting: set the KitSettings:load-icons-ignoring-image-load-setting property.

func (*Settings) SetMediaContentTypesRequiringHardwareSupport

func (settings *Settings) SetMediaContentTypesRequiringHardwareSupport(contentTypes string)

SetMediaContentTypesRequiringHardwareSupport: set the KitSettings:media-content-types-requiring-hardware-support property.

func (*Settings) SetMediaPlaybackAllowsInline

func (settings *Settings) SetMediaPlaybackAllowsInline(enabled bool)

SetMediaPlaybackAllowsInline: set the KitSettings:media-playback-allows-inline property.

func (*Settings) SetMediaPlaybackRequiresUserGesture

func (settings *Settings) SetMediaPlaybackRequiresUserGesture(enabled bool)

SetMediaPlaybackRequiresUserGesture: set the KitSettings:media-playback-requires-user-gesture property.

func (*Settings) SetMinimumFontSize

func (settings *Settings) SetMinimumFontSize(fontSize uint32)

SetMinimumFontSize: set the KitSettings:minimum-font-size property.

func (*Settings) SetMonospaceFontFamily

func (settings *Settings) SetMonospaceFontFamily(monospaceFontFamily string)

SetMonospaceFontFamily: set the KitSettings:monospace-font-family property.

func (*Settings) SetPictographFontFamily

func (settings *Settings) SetPictographFontFamily(pictographFontFamily string)

SetPictographFontFamily: set the KitSettings:pictograph-font-family property.

func (*Settings) SetPrintBackgrounds

func (settings *Settings) SetPrintBackgrounds(printBackgrounds bool)

SetPrintBackgrounds: set the KitSettings:print-backgrounds property.

func (*Settings) SetSansSerifFontFamily

func (settings *Settings) SetSansSerifFontFamily(sansSerifFontFamily string)

SetSansSerifFontFamily: set the KitSettings:sans-serif-font-family property.

func (*Settings) SetSerifFontFamily

func (settings *Settings) SetSerifFontFamily(serifFontFamily string)

SetSerifFontFamily: set the KitSettings:serif-font-family property.

func (*Settings) SetUserAgent

func (settings *Settings) SetUserAgent(userAgent string)

SetUserAgent: set the KitSettings:user-agent property.

func (*Settings) SetUserAgentWithApplicationDetails

func (settings *Settings) SetUserAgentWithApplicationDetails(applicationName string, applicationVersion string)

SetUserAgentWithApplicationDetails: 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.

func (*Settings) SetZoomTextOnly

func (settings *Settings) SetZoomTextOnly(zoomTextOnly bool)

SetZoomTextOnly: set the KitSettings:zoom-text-only property.

func (*Settings) UserAgent

func (settings *Settings) UserAgent() string

UserAgent: get the KitSettings:user-agent property.

func (*Settings) ZoomTextOnly

func (settings *Settings) ZoomTextOnly() bool

ZoomTextOnly: get the KitSettings:zoom-text-only property.

type SnapshotError

type SnapshotError int

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

type SnapshotOptions int

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

type SnapshotRegion int

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

type TLSErrorsPolicy int

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

type URIRequest struct {
	*externglib.Object
}

func NewURIRequest

func NewURIRequest(uri string) *URIRequest

NewURIRequest creates a new KitURIRequest for the given URI.

func (*URIRequest) HttpHeaders

func (request *URIRequest) HttpHeaders() *soup.MessageHeaders

HttpHeaders: get the HTTP headers of a KitURIRequest as a MessageHeaders.

func (*URIRequest) HttpMethod

func (request *URIRequest) HttpMethod() string

HttpMethod: get the HTTP method of the KitURIRequest.

func (*URIRequest) SetURI

func (request *URIRequest) SetURI(uri string)

SetURI: set the URI of request

func (*URIRequest) URI

func (request *URIRequest) URI() string

type URIResponse

type URIResponse struct {
	*externglib.Object
}

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.

func (*URIResponse) HttpHeaders

func (response *URIResponse) HttpHeaders() *soup.MessageHeaders

HttpHeaders: get the HTTP headers of a KitURIResponse as a MessageHeaders.

func (*URIResponse) MIMEType

func (response *URIResponse) MIMEType() string

func (*URIResponse) StatusCode

func (response *URIResponse) StatusCode() uint32

StatusCode: 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.

func (*URIResponse) SuggestedFilename

func (response *URIResponse) SuggestedFilename() string

SuggestedFilename: get the suggested filename for response, as specified by the 'Content-Disposition' HTTP header, or NULL if it's not present.

func (*URIResponse) URI

func (response *URIResponse) URI() string

type URISchemeRequest

type URISchemeRequest struct {
	*externglib.Object
}

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.

func (*URISchemeRequest) FinishError

func (request *URISchemeRequest) FinishError(err error)

FinishError: finish a KitURISchemeRequest with a #GError.

func (*URISchemeRequest) Path

func (request *URISchemeRequest) Path() string

Path: get the URI path of request

func (*URISchemeRequest) Scheme

func (request *URISchemeRequest) Scheme() string

Scheme: get the URI scheme of request

func (*URISchemeRequest) URI

func (request *URISchemeRequest) URI() string

URI: get the URI of request

func (*URISchemeRequest) WebView

func (request *URISchemeRequest) WebView() *WebView

WebView: get the KitWebView that initiated the 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 UserContentFilter

type UserContentFilter struct {
	// contains filtered or unexported fields
}

UserContentFilter: 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 in the KitUserContentFilterStore.

type UserContentFilterError

type UserContentFilterError int
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

type UserContentFilterStore struct {
	*externglib.Object
}

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.

func (*UserContentFilterStore) FetchIdentifiers

func (store *UserContentFilterStore) FetchIdentifiers(ctx context.Context, callback gio.AsyncReadyCallback)

FetchIdentifiers: asynchronously retrieve a list of the identifiers for all the stored filters.

When the operation is finished, callback will be invoked, which then can use webkit_user_content_filter_store_fetch_identifiers_finish() to obtain the list of filter identifiers.

func (*UserContentFilterStore) FetchIdentifiersFinish

func (store *UserContentFilterStore) FetchIdentifiersFinish(result gio.AsyncResulter) []string

FetchIdentifiersFinish finishes an asynchronous fetch of the list of identifiers for the stored filters previously started with webkit_user_content_filter_store_fetch_identifiers().

func (*UserContentFilterStore) Load

func (store *UserContentFilterStore) Load(ctx context.Context, identifier string, callback gio.AsyncReadyCallback)

Load: asynchronously load a content filter given its identifier. The filter must have been previously stored using webkit_user_content_filter_store_save().

When the operation is finished, callback will be invoked, which then can use webkit_user_content_filter_store_load_finish() to obtain the resulting filter.

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().

func (*UserContentFilterStore) Path

func (store *UserContentFilterStore) Path() string

func (*UserContentFilterStore) Remove

func (store *UserContentFilterStore) Remove(ctx context.Context, identifier string, callback gio.AsyncReadyCallback)

Remove: asynchronously remove a content filter given its identifier.

When the operation is finished, callback will be invoked, which then can use webkit_user_content_filter_store_remove_finish() to check whether the removal was successful.

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().

func (*UserContentFilterStore) Save

func (store *UserContentFilterStore) Save(ctx context.Context, identifier string, source *glib.Bytes, callback gio.AsyncReadyCallback)

Save: asynchronously save a content filter from a source rule set in the WebKit content extesions JSON format (https://webkit.org/blog/3476/content-blockers-first-look/).

The identifier can be used afterwards to refer to the filter when using webkit_user_content_filter_store_remove() and webkit_user_content_filter_store_load(). When the identifier has been used in the past, the new filter source will replace the one saved beforehand for the same identifier.

When the operation is finished, callback will be invoked, which then can use webkit_user_content_filter_store_save_finish() to obtain the resulting filter.

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().

func (*UserContentFilterStore) SaveFromFile

func (store *UserContentFilterStore) SaveFromFile(ctx context.Context, identifier string, file gio.Filer, callback gio.AsyncReadyCallback)

SaveFromFile: asynchronously save a content filter from the contents of a file, which must be native to the platform, as checked by g_file_is_native(). See webkit_user_content_filter_store_save() for more details.

When the operation is finished, callback will be invoked, which then can use webkit_user_content_filter_store_save_finish() to obtain the resulting filter.

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().

type UserContentInjectedFrames

type UserContentInjectedFrames int

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

type UserContentManager struct {
	*externglib.Object
}

func NewUserContentManager

func NewUserContentManager() *UserContentManager

NewUserContentManager creates a new user content manager.

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.

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.

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.

func (*UserContentManager) RegisterScriptMessageHandler

func (manager *UserContentManager) RegisterScriptMessageHandler(name string) bool

RegisterScriptMessageHandler registers a new user script message handler. After it is registered, scripts can use window.webkit.messageHandlers.&lt;name&gt;.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:

<informalexample><programlisting> 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"); </programlisting></informalexample>

Registering a script message handler will fail if the requested name has been already registered before.

func (*UserContentManager) RegisterScriptMessageHandlerInWorld

func (manager *UserContentManager) RegisterScriptMessageHandlerInWorld(name string, worldName string) bool

RegisterScriptMessageHandlerInWorld registers a new user script message handler in script world with name world_name. 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.

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

func (*UserContentManager) RemoveFilterByID

func (manager *UserContentManager) RemoveFilterByID(filterId string)

RemoveFilterByID removes a filter from the given KitUserContentManager given the identifier of a KitUserContentFilter as returned by webkit_user_content_filter_get_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().

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().

func (*UserContentManager) UnregisterScriptMessageHandler

func (manager *UserContentManager) UnregisterScriptMessageHandler(name string)

UnregisterScriptMessageHandler unregisters a previously registered message handler.

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().

func (*UserContentManager) UnregisterScriptMessageHandlerInWorld

func (manager *UserContentManager) UnregisterScriptMessageHandlerInWorld(name string, worldName string)

UnregisterScriptMessageHandlerInWorld unregisters a previously registered message handler in script world with name world_name.

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_in_world().

type UserMediaPermissionRequest

type UserMediaPermissionRequest struct {
	*externglib.Object

	PermissionRequest
}

type UserMessage

type UserMessage struct {
	externglib.InitiallyUnowned
}

func NewUserMessage

func NewUserMessage(name string, parameters *glib.Variant) *UserMessage

NewUserMessage: create a new KitUserMessage with name.

func NewUserMessageWithFdList

func NewUserMessageWithFdList(name string, parameters *glib.Variant, fdList *gio.UnixFDList) *UserMessage

NewUserMessageWithFdList: create a new KitUserMessage including also a list of UNIX file descriptors to be sent.

func (*UserMessage) FdList

func (message *UserMessage) FdList() *gio.UnixFDList

FdList: get the message list of file descritpor

func (*UserMessage) Name

func (message *UserMessage) Name() string

Name: get the message name

func (*UserMessage) Parameters

func (message *UserMessage) Parameters() *glib.Variant

Parameters: get the message parameters

func (*UserMessage) SendReply

func (message *UserMessage) SendReply(reply *UserMessage)

SendReply: send a reply to message. If reply is floating, it's consumed. You can only send a reply to a KitUserMessage that has been received.

type UserMessageError

type UserMessageError int

UserMessageError: enum values used to denote errors happening when sending user messages.

const (
	// UserMessageUnhandledMessage 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 UserScript

type UserScript struct {
	// contains filtered or unexported fields
}

UserScript: 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

type UserScriptInjectionTime int

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

type UserStyleLevel int

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: 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

type WebContext struct {
	*externglib.Object
}

func NewWebContext

func NewWebContext() *WebContext

NewWebContext: create a new KitWebContext

func NewWebContextEphemeral

func NewWebContextEphemeral() *WebContext

NewWebContextEphemeral: create a new ephemeral KitWebContext. An ephemeral KitWebContext is a context created with an ephemeral KitWebsiteDataManager. This is just a convenient method to create ephemeral contexts without having to create your own KitWebsiteDataManager. All KitWebView<!-- -->s associated with this context will also be ephemeral. Websites will not store any data in the client storage. This is normally used to implement private instances.

func NewWebContextWithWebsiteDataManager

func NewWebContextWithWebsiteDataManager(manager *WebsiteDataManager) *WebContext

NewWebContextWithWebsiteDataManager: create a new KitWebContext with a KitWebsiteDataManager.

func WebContextGetDefault

func WebContextGetDefault() *WebContext

WebContextGetDefault gets the default web context

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 in directories such as /sys, /proc, and /dev or all of / are not valid.

See also webkit_web_context_set_sandbox_enabled()

func (*WebContext) AllowTLSCertificateForHost

func (context *WebContext) AllowTLSCertificateForHost(certificate gio.TLSCertificater, host string)

AllowTLSCertificateForHost: ignore further TLS errors on the host for the certificate present in info.

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().

func (*WebContext) ClearCache

func (context *WebContext) ClearCache()

ClearCache clears all resources currently cached. See also webkit_web_context_set_cache_model().

func (*WebContext) CookieManager

func (context *WebContext) CookieManager() *CookieManager

CookieManager: get the KitCookieManager of the context's KitWebsiteDataManager.

func (*WebContext) DownloadURI

func (context *WebContext) 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.

func (*WebContext) FaviconDatabase

func (context *WebContext) FaviconDatabase() *FaviconDatabase

FaviconDatabase: get the KitFaviconDatabase associated with context.

To initialize the database you need to call webkit_web_context_set_favicon_database_directory().

func (*WebContext) FaviconDatabaseDirectory

func (context *WebContext) FaviconDatabaseDirectory() string

FaviconDatabaseDirectory: get the directory path being used to store the favicons database for context, or NULL if webkit_web_context_set_favicon_database_directory() hasn't been called yet.

This function will always return the same path after having called webkit_web_context_set_favicon_database_directory() for the first time.

func (*WebContext) GeolocationManager

func (context *WebContext) GeolocationManager() *GeolocationManager

GeolocationManager: get the KitGeolocationManager of context.

func (*WebContext) InitializeNotificationPermissions

func (context *WebContext) InitializeNotificationPermissions(allowedOrigins []*SecurityOrigin, 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.

func (*WebContext) IsAutomationAllowed

func (context *WebContext) IsAutomationAllowed() bool

IsAutomationAllowed: get whether automation is allowed in context. See also webkit_web_context_set_automation_allowed().

func (*WebContext) IsEphemeral

func (context *WebContext) IsEphemeral() bool

IsEphemeral: get whether a KitWebContext is ephemeral.

func (*WebContext) Plugins deprecated

This method has been deprecated.
func (context *WebContext) Plugins(ctx context.Context, callback gio.AsyncReadyCallback)

Plugins: asynchronously get the list of installed plugins.

When the operation is finished, callback will be called. You can then call webkit_web_context_get_plugins_finish() to get the result of the operation.

Deprecated: since version 2.32.

func (*WebContext) PluginsFinish deprecated

This method has been deprecated.
func (context *WebContext) PluginsFinish(result gio.AsyncResulter) ([]Plugin, error)

PluginsFinish: finish an asynchronous operation started with webkit_web_context_get_plugins.

Deprecated: since version 2.32.

func (*WebContext) PrefetchDns

func (context *WebContext) 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.

func (*WebContext) ProcessModel

func (context *WebContext) ProcessModel() ProcessModel

ProcessModel returns the current process model. For more information about this value see webkit_web_context_set_process_model().

func (*WebContext) RegisterURIScheme

func (context *WebContext) RegisterURIScheme(scheme string, callback URISchemeRequestCallback)

RegisterURIScheme: 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.

<informalexample><programlisting> static void about_uri_scheme_request_cb (WebKitURISchemeRequest *request, gpointer user_data) { GInputStream *stream; gsize stream_length; const gchar *path;

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;

    contents = g_strdup_printf ("&lt;html&gt;&lt;body&gt;&lt;p&gt;Example about page&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;");
    stream_length = strlen (contents);
    stream = g_memory_input_stream_new_from_data (contents, stream_length, g_free);
} else {
    GError *error;

    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);

} </programlisting></informalexample>

func (*WebContext) SandboxEnabled

func (context *WebContext) SandboxEnabled() bool

SandboxEnabled: get whether sandboxing is currently enabled.

func (*WebContext) SecurityManager

func (context *WebContext) SecurityManager() *SecurityManager

SecurityManager: get the KitSecurityManager of context.

func (*WebContext) SendMessageToAllExtensions

func (context *WebContext) SendMessageToAllExtensions(message *UserMessage)

SendMessageToAllExtensions: send message to all KitWebExtension<!-- -->s associated to context. If message is floating, it's consumed.