Documentation
¶
Overview ¶
Package webkitwebprocessextension was automatically generated by github.com/jwijenbergh/puregotk DO NOT EDIT
Package webkitwebprocessextension was automatically generated by github.com/jwijenbergh/puregotk DO NOT EDIT
Package webkitwebprocessextension was automatically generated by github.com/jwijenbergh/puregotk DO NOT EDIT
Package webkitwebprocessextension was automatically generated by github.com/jwijenbergh/puregotk DO NOT EDIT
Package webkitwebprocessextension was automatically generated by github.com/jwijenbergh/puregotk DO NOT EDIT
Package webkitwebprocessextension was automatically generated by github.com/jwijenbergh/puregotk DO NOT EDIT
Package webkitwebprocessextension was automatically generated by github.com/jwijenbergh/puregotk DO NOT EDIT
Package webkitwebprocessextension was automatically generated by github.com/jwijenbergh/puregotk DO NOT EDIT
Package webkitwebprocessextension was automatically generated by github.com/jwijenbergh/puregotk DO NOT EDIT
Package webkitwebprocessextension was automatically generated by github.com/jwijenbergh/puregotk DO NOT EDIT
Package webkitwebprocessextension was automatically generated by github.com/jwijenbergh/puregotk DO NOT EDIT
Package webkitwebprocessextension was automatically generated by github.com/jwijenbergh/puregotk DO NOT EDIT
Package webkitwebprocessextension was automatically generated by github.com/jwijenbergh/puregotk DO NOT EDIT
Package webkitwebprocessextension was automatically generated by github.com/jwijenbergh/puregotk DO NOT EDIT
Package webkitwebprocessextension was automatically generated by github.com/jwijenbergh/puregotk DO NOT EDIT
Index ¶
- func ConsoleMessageGLibType() types.GType
- func ConsoleMessageLevelGLibType() types.GType
- func ConsoleMessageSourceGLibType() types.GType
- func ContextMenuGLibType() types.GType
- func ContextMenuItemGLibType() types.GType
- func FrameGLibType() types.GType
- func HitTestResultGLibType() types.GType
- func ScriptWorldGLibType() types.GType
- func URIRequestGLibType() types.GType
- func URIResponseGLibType() types.GType
- func UserMessageErrorQuark() glib.Quark
- func UserMessageGLibType() types.GType
- func WebEditorGLibType() types.GType
- func WebFormManagerGLibType() types.GType
- func WebFormManagerInputElementAutoFill(ElementVar *javascriptcore.Value, ValueVar string)
- func WebFormManagerInputElementIsAutoFilled(ElementVar *javascriptcore.Value) bool
- func WebFormManagerInputElementIsUserEdited(ElementVar *javascriptcore.Value) bool
- func WebHitTestResultGLibType() types.GType
- func WebPageGLibType() types.GType
- func WebProcessExtensionGLibType() types.GType
- type ConsoleMessage
- func (x *ConsoleMessage) Copy() *ConsoleMessage
- func (x *ConsoleMessage) Free()
- func (x *ConsoleMessage) GetLevel() ConsoleMessageLevel
- func (x *ConsoleMessage) GetLine() uint
- func (x *ConsoleMessage) GetSource() ConsoleMessageSource
- func (x *ConsoleMessage) GetSourceId() string
- func (x *ConsoleMessage) GetText() string
- func (x *ConsoleMessage) GoPointer() uintptr
- type ConsoleMessageLevel
- type ConsoleMessageSource
- type ContextMenu
- func (x *ContextMenu) Append(ItemVar *ContextMenuItem)
- func (x *ContextMenu) First() *ContextMenuItem
- func (x *ContextMenu) GetEvent() *gdk.Event
- func (x *ContextMenu) GetItemAtPosition(PositionVar uint) *ContextMenuItem
- func (x *ContextMenu) GetItems() *glib.List
- func (x *ContextMenu) GetNItems() uint
- func (x *ContextMenu) GetUserData() *glib.Variant
- func (c *ContextMenu) GoPointer() uintptr
- func (x *ContextMenu) Insert(ItemVar *ContextMenuItem, PositionVar int)
- func (x *ContextMenu) Last() *ContextMenuItem
- func (x *ContextMenu) MoveItem(ItemVar *ContextMenuItem, PositionVar int)
- func (x *ContextMenu) Prepend(ItemVar *ContextMenuItem)
- func (x *ContextMenu) Remove(ItemVar *ContextMenuItem)
- func (x *ContextMenu) RemoveAll()
- func (c *ContextMenu) SetGoPointer(ptr uintptr)
- func (x *ContextMenu) SetUserData(UserDataVar *glib.Variant)
- type ContextMenuAction
- type ContextMenuClass
- type ContextMenuItem
- func ContextMenuItemNewFromInternalPtr(ptr uintptr) *ContextMenuItem
- func NewContextMenuItemFromGaction(ActionVar gio.Action, LabelVar string, TargetVar *glib.Variant) *ContextMenuItem
- func NewContextMenuItemFromStockAction(ActionVar ContextMenuAction) *ContextMenuItem
- func NewContextMenuItemFromStockActionWithLabel(ActionVar ContextMenuAction, LabelVar string) *ContextMenuItem
- func NewContextMenuItemSeparator() *ContextMenuItem
- func NewContextMenuItemWithSubmenu(LabelVar string, SubmenuVar *ContextMenu) *ContextMenuItem
- func (x *ContextMenuItem) GetGaction() *gio.ActionBase
- func (x *ContextMenuItem) GetStockAction() ContextMenuAction
- func (x *ContextMenuItem) GetSubmenu() *ContextMenu
- func (c *ContextMenuItem) GoPointer() uintptr
- func (x *ContextMenuItem) IsSeparator() bool
- func (c *ContextMenuItem) SetGoPointer(ptr uintptr)
- func (x *ContextMenuItem) SetSubmenu(SubmenuVar *ContextMenu)
- type ContextMenuItemClass
- type Frame
- func (x *Frame) GetId() uint64
- func (x *Frame) GetJsContext() *javascriptcore.Context
- func (x *Frame) GetJsContextForScriptWorld(WorldVar *ScriptWorld) *javascriptcore.Context
- func (x *Frame) GetUri() string
- func (c *Frame) GoPointer() uintptr
- func (x *Frame) IsMainFrame() bool
- func (c *Frame) SetGoPointer(ptr uintptr)
- type FrameClass
- type HitTestResult
- func (x *HitTestResult) ContextIsEditable() bool
- func (x *HitTestResult) ContextIsImage() bool
- func (x *HitTestResult) ContextIsLink() bool
- func (x *HitTestResult) ContextIsMedia() bool
- func (x *HitTestResult) ContextIsScrollbar() bool
- func (x *HitTestResult) ContextIsSelection() bool
- func (x *HitTestResult) GetContext() uint
- func (x *HitTestResult) GetImageUri() string
- func (x *HitTestResult) GetLinkLabel() string
- func (x *HitTestResult) GetLinkTitle() string
- func (x *HitTestResult) GetLinkUri() string
- func (x *HitTestResult) GetMediaUri() string
- func (x *HitTestResult) GetPropertyContext() uint
- func (x *HitTestResult) GetPropertyImageUri() string
- func (x *HitTestResult) GetPropertyLinkLabel() string
- func (x *HitTestResult) GetPropertyLinkTitle() string
- func (x *HitTestResult) GetPropertyLinkUri() string
- func (x *HitTestResult) GetPropertyMediaUri() string
- func (c *HitTestResult) GoPointer() uintptr
- func (c *HitTestResult) SetGoPointer(ptr uintptr)
- func (x *HitTestResult) SetPropertyContext(value uint)
- func (x *HitTestResult) SetPropertyImageUri(value string)
- func (x *HitTestResult) SetPropertyLinkLabel(value string)
- func (x *HitTestResult) SetPropertyLinkTitle(value string)
- func (x *HitTestResult) SetPropertyLinkUri(value string)
- func (x *HitTestResult) SetPropertyMediaUri(value string)
- type HitTestResultClass
- type HitTestResultContext
- type ScriptWorld
- type ScriptWorldClass
- type URIRequest
- func (x *URIRequest) GetHttpHeaders() *soup.MessageHeaders
- func (x *URIRequest) GetHttpMethod() string
- func (x *URIRequest) GetPropertyUri() string
- func (x *URIRequest) GetUri() string
- func (c *URIRequest) GoPointer() uintptr
- func (c *URIRequest) SetGoPointer(ptr uintptr)
- func (x *URIRequest) SetPropertyUri(value string)
- func (x *URIRequest) SetUri(UriVar string)
- type URIRequestClass
- type URIResponse
- func (x *URIResponse) GetContentLength() uint64
- func (x *URIResponse) GetHttpHeaders() *soup.MessageHeaders
- func (x *URIResponse) GetMimeType() string
- func (x *URIResponse) GetPropertyContentLength() uint64
- func (x *URIResponse) GetPropertyHttpHeaders() uintptr
- func (x *URIResponse) GetPropertyMimeType() string
- func (x *URIResponse) GetPropertyStatusCode() uint
- func (x *URIResponse) GetPropertySuggestedFilename() string
- func (x *URIResponse) GetPropertyUri() string
- func (x *URIResponse) GetStatusCode() uint
- func (x *URIResponse) GetSuggestedFilename() string
- func (x *URIResponse) GetUri() string
- func (c *URIResponse) GoPointer() uintptr
- func (c *URIResponse) SetGoPointer(ptr uintptr)
- type URIResponseClass
- type UserMessage
- func (x *UserMessage) GetFdList() *gio.UnixFDList
- func (x *UserMessage) GetName() string
- func (x *UserMessage) GetParameters() *glib.Variant
- func (x *UserMessage) GetPropertyName() string
- func (x *UserMessage) GetPropertyParameters() uintptr
- func (c *UserMessage) GoPointer() uintptr
- func (x *UserMessage) SendReply(ReplyVar *UserMessage)
- func (c *UserMessage) SetGoPointer(ptr uintptr)
- func (x *UserMessage) SetPropertyName(value string)
- func (x *UserMessage) SetPropertyParameters(value uintptr)
- type UserMessageClass
- type UserMessageError
- type WebEditor
- type WebEditorClass
- type WebFormManager
- func (x *WebFormManager) ConnectFormControlsAssociated(cb *func(WebFormManager, uintptr, []javascriptcore.Value)) uint
- func (x *WebFormManager) ConnectWillSendSubmitEvent(cb *func(WebFormManager, uintptr, uintptr, uintptr)) uint
- func (x *WebFormManager) ConnectWillSubmitForm(cb *func(WebFormManager, uintptr, uintptr, uintptr)) uint
- func (c *WebFormManager) GoPointer() uintptr
- func (c *WebFormManager) SetGoPointer(ptr uintptr)
- type WebFormManagerClass
- type WebHitTestResult
- func (x *WebHitTestResult) ContextIsEditable() bool
- func (x *WebHitTestResult) ContextIsImage() bool
- func (x *WebHitTestResult) ContextIsLink() bool
- func (x *WebHitTestResult) ContextIsMedia() bool
- func (x *WebHitTestResult) ContextIsScrollbar() bool
- func (x *WebHitTestResult) ContextIsSelection() bool
- func (x *WebHitTestResult) GetContext() uint
- func (x *WebHitTestResult) GetImageUri() string
- func (x *WebHitTestResult) GetJsNode(WorldVar *ScriptWorld) *javascriptcore.Value
- func (x *WebHitTestResult) GetLinkLabel() string
- func (x *WebHitTestResult) GetLinkTitle() string
- func (x *WebHitTestResult) GetLinkUri() string
- func (x *WebHitTestResult) GetMediaUri() string
- func (c *WebHitTestResult) GoPointer() uintptr
- func (c *WebHitTestResult) SetGoPointer(ptr uintptr)
- type WebHitTestResultClass
- type WebPage
- func (x *WebPage) ConnectConsoleMessageSent(cb *func(WebPage, uintptr)) uint
- func (x *WebPage) ConnectContextMenu(cb *func(WebPage, uintptr, uintptr) bool) uint
- func (x *WebPage) ConnectDocumentLoaded(cb *func(WebPage)) uint
- func (x *WebPage) ConnectSendRequest(cb *func(WebPage, uintptr, uintptr) bool) uint
- func (x *WebPage) ConnectUserMessageReceived(cb *func(WebPage, uintptr) bool) uint
- func (x *WebPage) GetEditor() *WebEditor
- func (x *WebPage) GetFormManager(WorldVar *ScriptWorld) *WebFormManager
- func (x *WebPage) GetId() uint64
- func (x *WebPage) GetMainFrame() *Frame
- func (x *WebPage) GetPropertyUri() string
- func (x *WebPage) GetUri() string
- func (c *WebPage) GoPointer() uintptr
- func (x *WebPage) SendMessageToView(MessageVar *UserMessage, CancellableVar *gio.Cancellable, ...)
- func (x *WebPage) SendMessageToViewFinish(ResultVar gio.AsyncResult) (*UserMessage, error)
- func (c *WebPage) SetGoPointer(ptr uintptr)
- type WebPageClass
- type WebProcessExtension
- func (x *WebProcessExtension) ConnectPageCreated(cb *func(WebProcessExtension, uintptr)) uint
- func (x *WebProcessExtension) ConnectUserMessageReceived(cb *func(WebProcessExtension, uintptr)) uint
- func (x *WebProcessExtension) GetPage(PageIdVar uint64) *WebPage
- func (c *WebProcessExtension) GoPointer() uintptr
- func (x *WebProcessExtension) SendMessageToContext(MessageVar *UserMessage, CancellableVar *gio.Cancellable, ...)
- func (x *WebProcessExtension) SendMessageToContextFinish(ResultVar gio.AsyncResult) (*UserMessage, error)
- func (c *WebProcessExtension) SetGoPointer(ptr uintptr)
- type WebProcessExtensionClass
- type WebProcessExtensionInitializeFunction
- type WebProcessExtensionInitializeWithUserDataFunction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConsoleMessageGLibType ¶
func ContextMenuGLibType ¶
func ContextMenuItemGLibType ¶
func FrameGLibType ¶
func HitTestResultGLibType ¶
func ScriptWorldGLibType ¶
func URIRequestGLibType ¶
func URIResponseGLibType ¶
func UserMessageErrorQuark ¶
Gets the quark for the domain of user message errors.
func UserMessageGLibType ¶
func WebEditorGLibType ¶
func WebFormManagerGLibType ¶
func WebFormManagerInputElementAutoFill ¶
func WebFormManagerInputElementAutoFill(ElementVar *javascriptcore.Value, ValueVar string)
Set the value of an HTML input element as if it had been edited by the user, triggering a change event, and set it as filled automatically. If @element is not an HTML input element this function does nothing.
func WebFormManagerInputElementIsAutoFilled ¶
func WebFormManagerInputElementIsAutoFilled(ElementVar *javascriptcore.Value) bool
Get whether @element is an HTML input element that has been filled automatically.
func WebFormManagerInputElementIsUserEdited ¶
func WebFormManagerInputElementIsUserEdited(ElementVar *javascriptcore.Value) bool
Get whether @element is an HTML text input element that has been edited by a user action.
func WebPageGLibType ¶
Types ¶
type ConsoleMessage ¶
type ConsoleMessage struct {
// contains filtered or unexported fields
}
func (*ConsoleMessage) Copy ¶
func (x *ConsoleMessage) Copy() *ConsoleMessage
Make a copy of @console_message.
func (*ConsoleMessage) GetLevel ¶
func (x *ConsoleMessage) GetLevel() ConsoleMessageLevel
Gets the log level of a #WebKitConsoleMessage
func (*ConsoleMessage) GetLine ¶
func (x *ConsoleMessage) GetLine() uint
Gets the line number of a #WebKitConsoleMessage
func (*ConsoleMessage) GetSource ¶
func (x *ConsoleMessage) GetSource() ConsoleMessageSource
Gets the source of a #WebKitConsoleMessage
func (*ConsoleMessage) GetSourceId ¶
func (x *ConsoleMessage) GetSourceId() string
Gets the source identifier of a #WebKitConsoleMessage
func (*ConsoleMessage) GetText ¶
func (x *ConsoleMessage) GetText() string
Gets the text message of a #WebKitConsoleMessage
func (*ConsoleMessage) GoPointer ¶
func (x *ConsoleMessage) GoPointer() uintptr
type ConsoleMessageLevel ¶
type ConsoleMessageLevel int
Enum values used to denote the various levels of console messages.
const ( // Information message. WebkitConsoleMessageLevelInfoValue ConsoleMessageLevel = 0 // Log message. WebkitConsoleMessageLevelLogValue ConsoleMessageLevel = 1 // Warning message. WebkitConsoleMessageLevelWarningValue ConsoleMessageLevel = 2 // Error message. WebkitConsoleMessageLevelErrorValue ConsoleMessageLevel = 3 // Debug message. WebkitConsoleMessageLevelDebugValue ConsoleMessageLevel = 4 )
type ConsoleMessageSource ¶
type ConsoleMessageSource int
Enum values used to denote the various sources of console messages.
const ( // Message produced by JavaScript. WebkitConsoleMessageSourceJavascriptValue ConsoleMessageSource = 0 // Network messages. WebkitConsoleMessageSourceNetworkValue ConsoleMessageSource = 1 // Messages produced by console API. WebkitConsoleMessageSourceConsoleApiValue ConsoleMessageSource = 2 // Security messages. WebkitConsoleMessageSourceSecurityValue ConsoleMessageSource = 3 // Other messages. WebkitConsoleMessageSourceOtherValue ConsoleMessageSource = 4 )
type ContextMenu ¶
Represents the context menu in a #WebKitWebView.
#WebKitContextMenu represents a context menu containing #WebKitContextMenuItem<!-- -->s in a #WebKitWebView.
When a #WebKitWebView is about to display the context menu, it emits the #WebKitWebView::context-menu signal, which has the #WebKitContextMenu as an argument. You can modify it, adding new submenus that you can create with webkit_context_menu_new(), adding new #WebKitContextMenuItem<!-- -->s with webkit_context_menu_prepend(), webkit_context_menu_append() or webkit_context_menu_insert(), maybe after having removed the existing ones with webkit_context_menu_remove_all().
func ContextMenuNewFromInternalPtr ¶
func ContextMenuNewFromInternalPtr(ptr uintptr) *ContextMenu
func NewContextMenu ¶
func NewContextMenu() *ContextMenu
Creates a new #WebKitContextMenu object.
Creates a new #WebKitContextMenu object to be used as a submenu of an existing #WebKitContextMenu. The context menu of a #WebKitWebView is created by the view and passed as an argument of #WebKitWebView::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 #WebKitContextMenu with a list of initial items.
func NewContextMenuWithItems ¶
func NewContextMenuWithItems(ItemsVar *glib.List) *ContextMenu
Creates a new #WebKitContextMenu object with the given items.
Creates a new #WebKitContextMenu object to be used as a submenu of an existing #WebKitContextMenu with the given initial items. See also webkit_context_menu_new()
func (*ContextMenu) Append ¶
func (x *ContextMenu) Append(ItemVar *ContextMenuItem)
Adds @item at the end of the @menu.
func (*ContextMenu) First ¶
func (x *ContextMenu) First() *ContextMenuItem
Gets the first item in the @menu.
func (*ContextMenu) GetEvent ¶
func (x *ContextMenu) GetEvent() *gdk.Event
Gets the #GdkEvent that triggered the context menu. This function only returns a valid #GdkEvent when called for a #WebKitContextMenu passed to #WebKitWebView::context-menu signal; in all other cases, %NULL is returned.
The returned #GdkEvent is expected to be one of the following types: <itemizedlist> <listitem><para> a #GdkEventButton of type %GDK_BUTTON_PRESS when the context menu was triggered with mouse. </para></listitem> <listitem><para> a #GdkEventKey of type %GDK_KEY_PRESS if the keyboard was used to show the menu. </para></listitem> <listitem><para> a generic #GdkEvent of type %GDK_NOTHING when the #GtkWidget::popup-menu signal was used to show the context menu. </para></listitem> </itemizedlist>
func (*ContextMenu) GetItemAtPosition ¶
func (x *ContextMenu) GetItemAtPosition(PositionVar uint) *ContextMenuItem
Gets the item at the given position in the @menu.
func (*ContextMenu) GetItems ¶
func (x *ContextMenu) GetItems() *glib.List
Returns the item list of @menu.
func (*ContextMenu) GetNItems ¶
func (x *ContextMenu) GetNItems() uint
Gets the length of the @menu.
func (*ContextMenu) GetUserData ¶
func (x *ContextMenu) GetUserData() *glib.Variant
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().
func (*ContextMenu) GoPointer ¶
func (c *ContextMenu) GoPointer() uintptr
func (*ContextMenu) Insert ¶
func (x *ContextMenu) Insert(ItemVar *ContextMenuItem, PositionVar int)
Inserts @item into the @menu at the given position.
If @position is negative, or is larger than the number of items in the #WebKitContextMenu, the item is added on to the end of the @menu. The first position is 0.
func (*ContextMenu) Last ¶
func (x *ContextMenu) Last() *ContextMenuItem
Gets the last item in the @menu.
func (*ContextMenu) MoveItem ¶
func (x *ContextMenu) MoveItem(ItemVar *ContextMenuItem, PositionVar int)
Moves @item to the given position in the @menu.
If @position is negative, or is larger than the number of items in the #WebKitContextMenu, the item is added on to the end of the @menu. The first position is 0.
func (*ContextMenu) Prepend ¶
func (x *ContextMenu) Prepend(ItemVar *ContextMenuItem)
Adds @item at the beginning of the @menu.
func (*ContextMenu) Remove ¶
func (x *ContextMenu) Remove(ItemVar *ContextMenuItem)
Removes @item from the @menu.
See also webkit_context_menu_remove_all() to remove all items.
func (*ContextMenu) SetGoPointer ¶
func (c *ContextMenu) SetGoPointer(ptr uintptr)
func (*ContextMenu) SetUserData ¶
func (x *ContextMenu) SetUserData(UserDataVar *glib.Variant)
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.
type ContextMenuAction ¶
type ContextMenuAction int
Enum values used to denote the stock actions for #WebKitContextMenuItem<!-- -->s
const ( // No action, used by separator menu items. WebkitContextMenuActionNoActionValue ContextMenuAction = 0 // Open current link. WebkitContextMenuActionOpenLinkValue ContextMenuAction = 1 // Open current link in a new window. WebkitContextMenuActionOpenLinkInNewWindowValue ContextMenuAction = 2 // Download link destination. WebkitContextMenuActionDownloadLinkToDiskValue ContextMenuAction = 3 // Copy link location to the clipboard. WebkitContextMenuActionCopyLinkToClipboardValue ContextMenuAction = 4 // Open current image in a new window. WebkitContextMenuActionOpenImageInNewWindowValue ContextMenuAction = 5 // Download current image. WebkitContextMenuActionDownloadImageToDiskValue ContextMenuAction = 6 // Copy current image to the clipboard. WebkitContextMenuActionCopyImageToClipboardValue ContextMenuAction = 7 // Copy current image location to the clipboard. WebkitContextMenuActionCopyImageUrlToClipboardValue ContextMenuAction = 8 // Open current frame in a new window. WebkitContextMenuActionOpenFrameInNewWindowValue ContextMenuAction = 9 // Load the previous history item. WebkitContextMenuActionGoBackValue ContextMenuAction = 10 // Load the next history item. WebkitContextMenuActionGoForwardValue ContextMenuAction = 11 // Stop any ongoing loading operation. WebkitContextMenuActionStopValue ContextMenuAction = 12 // Reload the contents of current view. WebkitContextMenuActionReloadValue ContextMenuAction = 13 // Copy current selection the clipboard. WebkitContextMenuActionCopyValue ContextMenuAction = 14 // Cut current selection to the clipboard. WebkitContextMenuActionCutValue ContextMenuAction = 15 // Paste clipboard contents. WebkitContextMenuActionPasteValue ContextMenuAction = 16 // Delete current selection. WebkitContextMenuActionDeleteValue ContextMenuAction = 17 // Select all text. WebkitContextMenuActionSelectAllValue ContextMenuAction = 18 // Input methods menu. WebkitContextMenuActionInputMethodsValue ContextMenuAction = 19 // Unicode menu. WebkitContextMenuActionUnicodeValue ContextMenuAction = 20 // A proposed replacement for a misspelled word. WebkitContextMenuActionSpellingGuessValue ContextMenuAction = 21 // An indicator that spellchecking found no proposed replacements. WebkitContextMenuActionNoGuessesFoundValue ContextMenuAction = 22 // Causes the spellchecker to ignore the word for this session. WebkitContextMenuActionIgnoreSpellingValue ContextMenuAction = 23 // Causes the spellchecker to add the word to the dictionary. WebkitContextMenuActionLearnSpellingValue ContextMenuAction = 24 // Ignore grammar. WebkitContextMenuActionIgnoreGrammarValue ContextMenuAction = 25 // Font options menu. WebkitContextMenuActionFontMenuValue ContextMenuAction = 26 // Bold. WebkitContextMenuActionBoldValue ContextMenuAction = 27 // Italic. WebkitContextMenuActionItalicValue ContextMenuAction = 28 // Underline. WebkitContextMenuActionUnderlineValue ContextMenuAction = 29 // Outline. WebkitContextMenuActionOutlineValue ContextMenuAction = 30 // Open current element in the inspector. WebkitContextMenuActionInspectElementValue ContextMenuAction = 31 // Open current video element in a new window. WebkitContextMenuActionOpenVideoInNewWindowValue ContextMenuAction = 32 // Open current audio element in a new window. WebkitContextMenuActionOpenAudioInNewWindowValue ContextMenuAction = 33 // Copy video link location in to the clipboard. WebkitContextMenuActionCopyVideoLinkToClipboardValue ContextMenuAction = 34 // Copy audio link location in to the clipboard. WebkitContextMenuActionCopyAudioLinkToClipboardValue ContextMenuAction = 35 // Enable or disable media controls. WebkitContextMenuActionToggleMediaControlsValue ContextMenuAction = 36 // Enable or disable media loop. WebkitContextMenuActionToggleMediaLoopValue ContextMenuAction = 37 // Show current video element in fullscreen mode. WebkitContextMenuActionEnterVideoFullscreenValue ContextMenuAction = 38 // Play current media element. WebkitContextMenuActionMediaPlayValue ContextMenuAction = 39 // Pause current media element. WebkitContextMenuActionMediaPauseValue ContextMenuAction = 40 // Mute current media element. WebkitContextMenuActionMediaMuteValue ContextMenuAction = 41 // Download video to disk. Since 2.2 WebkitContextMenuActionDownloadVideoToDiskValue ContextMenuAction = 42 // Download audio to disk. Since 2.2 WebkitContextMenuActionDownloadAudioToDiskValue ContextMenuAction = 43 // Insert an emoji. Since 2.26 WebkitContextMenuActionInsertEmojiValue ContextMenuAction = 44 // Paste clipboard contents as plain text. Since 2.30 WebkitContextMenuActionPasteAsPlainTextValue ContextMenuAction = 45 // Custom action defined by applications. WebkitContextMenuActionCustomValue ContextMenuAction = 10000 )
type ContextMenuClass ¶
type ContextMenuClass struct {
ParentClass gobject.ObjectClass
// contains filtered or unexported fields
}
func (*ContextMenuClass) GoPointer ¶
func (x *ContextMenuClass) GoPointer() uintptr
type ContextMenuItem ¶
type ContextMenuItem struct {
gobject.InitiallyUnowned
}
One item of a #WebKitContextMenu.
The #WebKitContextMenu is composed of #WebKitContextMenuItem<!-- -->s. These items can be created from a #GtkAction, from a #WebKitContextMenuAction or from a #WebKitContextMenuAction and a label. These #WebKitContextMenuAction<!-- -->s denote stock actions for the items. You can also create separators and submenus.
func ContextMenuItemNewFromInternalPtr ¶
func ContextMenuItemNewFromInternalPtr(ptr uintptr) *ContextMenuItem
func NewContextMenuItemFromGaction ¶
func NewContextMenuItemFromGaction(ActionVar gio.Action, LabelVar string, TargetVar *glib.Variant) *ContextMenuItem
Creates a new #WebKitContextMenuItem for the given @action and @label.
On activation @target will be passed as parameter to the callback.
func NewContextMenuItemFromStockAction ¶
func NewContextMenuItemFromStockAction(ActionVar ContextMenuAction) *ContextMenuItem
Creates a new #WebKitContextMenuItem 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 #WebKitContextMenuItem created with a #WebKitContextMenuAction with webkit_context_menu_item_get_gaction() and connect to the #GSimpleAction::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(ActionVar ContextMenuAction, LabelVar string) *ContextMenuItem
Creates a new #WebKitContextMenuItem for the given stock action using the given @label.
Stock actions have a predefined label, this method can be used to create a #WebKitContextMenuItem for a #WebKitContextMenuAction but using a custom label.
func NewContextMenuItemSeparator ¶
func NewContextMenuItemSeparator() *ContextMenuItem
Creates a new #WebKitContextMenuItem representing a separator.
func NewContextMenuItemWithSubmenu ¶
func NewContextMenuItemWithSubmenu(LabelVar string, SubmenuVar *ContextMenu) *ContextMenuItem
Creates a new #WebKitContextMenuItem using the given @label with a submenu.
func (*ContextMenuItem) GetGaction ¶
func (x *ContextMenuItem) GetGaction() *gio.ActionBase
Gets the action associated to @item as a #GAction.
func (*ContextMenuItem) GetStockAction ¶
func (x *ContextMenuItem) GetStockAction() ContextMenuAction
Gets the #WebKitContextMenuAction of @item.
If the #WebKitContextMenuItem was not created for a stock action %WEBKIT_CONTEXT_MENU_ACTION_CUSTOM will be returned. If the #WebKitContextMenuItem is a separator %WEBKIT_CONTEXT_MENU_ACTION_NO_ACTION will be returned.
func (*ContextMenuItem) GetSubmenu ¶
func (x *ContextMenuItem) GetSubmenu() *ContextMenu
Gets the submenu of @item.
func (*ContextMenuItem) GoPointer ¶
func (c *ContextMenuItem) GoPointer() uintptr
func (*ContextMenuItem) IsSeparator ¶
func (x *ContextMenuItem) IsSeparator() bool
Checks whether @item is a separator.
func (*ContextMenuItem) SetGoPointer ¶
func (c *ContextMenuItem) SetGoPointer(ptr uintptr)
func (*ContextMenuItem) SetSubmenu ¶
func (x *ContextMenuItem) SetSubmenu(SubmenuVar *ContextMenu)
Sets or replaces the @item submenu.
If @submenu is %NULL the current submenu of @item is removed.
type ContextMenuItemClass ¶
type ContextMenuItemClass struct {
ParentClass gobject.InitiallyUnownedClass
// contains filtered or unexported fields
}
func (*ContextMenuItemClass) GoPointer ¶
func (x *ContextMenuItemClass) GoPointer() uintptr
type Frame ¶
A web page frame.
Each `WebKitWebPage` has at least one main frame, and can have any number of subframes.
func FrameNewFromInternalPtr ¶
func (*Frame) GetId ¶
Gets the process-unique identifier of this #WebKitFrame. No other frame in the same web process will have the same ID; however, frames in other web processes may.
func (*Frame) GetJsContext ¶
func (x *Frame) GetJsContext() *javascriptcore.Context
Get the JavaScript execution context of @frame. Use this function to bridge between the WebKit and JavaScriptCore APIs.
func (*Frame) GetJsContextForScriptWorld ¶
func (x *Frame) GetJsContextForScriptWorld(WorldVar *ScriptWorld) *javascriptcore.Context
Get the JavaScript execution context of @frame for the given #WebKitScriptWorld.
func (*Frame) IsMainFrame ¶
Gets whether @frame is the main frame of a #WebKitWebPage
func (*Frame) SetGoPointer ¶
type FrameClass ¶
type FrameClass struct {
ParentClass gobject.ObjectClass
// contains filtered or unexported fields
}
func (*FrameClass) GoPointer ¶
func (x *FrameClass) GoPointer() uintptr
type HitTestResult ¶
Result of a Hit Test.
A Hit Test is an operation to get context information about a given point in a #WebKitWebView. #WebKitHitTestResult represents the result of a Hit Test. It provides context information about what is at the coordinates of the Hit Test, such as if there's a link, an image or a media.
You can get the context of the HitTestResult with webkit_hit_test_result_get_context() that returns a bitmask of #WebKitHitTestResultContext flags. You can also use webkit_hit_test_result_context_is_link(), webkit_hit_test_result_context_is_image() and webkit_hit_test_result_context_is_media() to determine whether there's a link, image or a media element at the coordinates of the Hit Test. Note that it's possible that several #WebKitHitTestResultContext flags are active at the same time, for example if there's a link containing an image.
When the mouse is moved over a #WebKitWebView a Hit Test is performed for the mouse coordinates and #WebKitWebView::mouse-target-changed signal is emitted with a #WebKitHitTestResult.
func HitTestResultNewFromInternalPtr ¶
func HitTestResultNewFromInternalPtr(ptr uintptr) *HitTestResult
func (*HitTestResult) ContextIsEditable ¶
func (x *HitTestResult) ContextIsEditable() bool
Gets whether %WEBKIT_HIT_TEST_RESULT_CONTEXT_EDITABLE flag is present in #WebKitHitTestResult:context.
func (*HitTestResult) ContextIsImage ¶
func (x *HitTestResult) ContextIsImage() bool
Gets whether %WEBKIT_HIT_TEST_RESULT_CONTEXT_IMAGE flag is present in #WebKitHitTestResult:context.
func (*HitTestResult) ContextIsLink ¶
func (x *HitTestResult) ContextIsLink() bool
Gets whether %WEBKIT_HIT_TEST_RESULT_CONTEXT_LINK flag is present in #WebKitHitTestResult:context.
func (*HitTestResult) ContextIsMedia ¶
func (x *HitTestResult) ContextIsMedia() bool
Gets whether %WEBKIT_HIT_TEST_RESULT_CONTEXT_MEDIA flag is present in #WebKitHitTestResult:context.
func (*HitTestResult) ContextIsScrollbar ¶
func (x *HitTestResult) ContextIsScrollbar() bool
Gets whether %WEBKIT_HIT_TEST_RESULT_CONTEXT_SCROLLBAR flag is present in #WebKitHitTestResult:context.
func (*HitTestResult) ContextIsSelection ¶
func (x *HitTestResult) ContextIsSelection() bool
Gets whether %WEBKIT_HIT_TEST_RESULT_CONTEXT_SELECTION flag is present in #WebKitHitTestResult:context.
func (*HitTestResult) GetContext ¶
func (x *HitTestResult) GetContext() uint
Gets the value of the #WebKitHitTestResult:context property.
func (*HitTestResult) GetImageUri ¶
func (x *HitTestResult) GetImageUri() string
Gets the value of the #WebKitHitTestResult:image-uri property.
func (*HitTestResult) GetLinkLabel ¶
func (x *HitTestResult) GetLinkLabel() string
Gets the value of the #WebKitHitTestResult:link-label property.
func (*HitTestResult) GetLinkTitle ¶
func (x *HitTestResult) GetLinkTitle() string
Gets the value of the #WebKitHitTestResult:link-title property.
func (*HitTestResult) GetLinkUri ¶
func (x *HitTestResult) GetLinkUri() string
Gets the value of the #WebKitHitTestResult:link-uri property.
func (*HitTestResult) GetMediaUri ¶
func (x *HitTestResult) GetMediaUri() string
Gets the value of the #WebKitHitTestResult:media-uri property.
func (*HitTestResult) GetPropertyContext ¶ added in v0.0.4
func (x *HitTestResult) GetPropertyContext() uint
GetPropertyContext gets the "context" property. Bitmask of #WebKitHitTestResultContext flags representing the context of the #WebKitHitTestResult.
func (*HitTestResult) GetPropertyImageUri ¶ added in v0.0.4
func (x *HitTestResult) GetPropertyImageUri() string
GetPropertyImageUri gets the "image-uri" property. The URI of the image if flag %WEBKIT_HIT_TEST_RESULT_CONTEXT_IMAGE is present in #WebKitHitTestResult:context
func (*HitTestResult) GetPropertyLinkLabel ¶ added in v0.0.4
func (x *HitTestResult) GetPropertyLinkLabel() string
GetPropertyLinkLabel gets the "link-label" property. The label of the link if flag %WEBKIT_HIT_TEST_RESULT_CONTEXT_LINK is present in #WebKitHitTestResult:context
func (*HitTestResult) GetPropertyLinkTitle ¶ added in v0.0.4
func (x *HitTestResult) GetPropertyLinkTitle() string
GetPropertyLinkTitle gets the "link-title" property. The title of the link if flag %WEBKIT_HIT_TEST_RESULT_CONTEXT_LINK is present in #WebKitHitTestResult:context
func (*HitTestResult) GetPropertyLinkUri ¶ added in v0.0.4
func (x *HitTestResult) GetPropertyLinkUri() string
GetPropertyLinkUri gets the "link-uri" property. The URI of the link if flag %WEBKIT_HIT_TEST_RESULT_CONTEXT_LINK is present in #WebKitHitTestResult:context
func (*HitTestResult) GetPropertyMediaUri ¶ added in v0.0.4
func (x *HitTestResult) GetPropertyMediaUri() string
GetPropertyMediaUri gets the "media-uri" property. The URI of the media if flag %WEBKIT_HIT_TEST_RESULT_CONTEXT_MEDIA is present in #WebKitHitTestResult:context
func (*HitTestResult) GoPointer ¶
func (c *HitTestResult) GoPointer() uintptr
func (*HitTestResult) SetGoPointer ¶
func (c *HitTestResult) SetGoPointer(ptr uintptr)
func (*HitTestResult) SetPropertyContext ¶ added in v0.0.4
func (x *HitTestResult) SetPropertyContext(value uint)
SetPropertyContext sets the "context" property. Bitmask of #WebKitHitTestResultContext flags representing the context of the #WebKitHitTestResult.
func (*HitTestResult) SetPropertyImageUri ¶ added in v0.0.4
func (x *HitTestResult) SetPropertyImageUri(value string)
SetPropertyImageUri sets the "image-uri" property. The URI of the image if flag %WEBKIT_HIT_TEST_RESULT_CONTEXT_IMAGE is present in #WebKitHitTestResult:context
func (*HitTestResult) SetPropertyLinkLabel ¶ added in v0.0.4
func (x *HitTestResult) SetPropertyLinkLabel(value string)
SetPropertyLinkLabel sets the "link-label" property. The label of the link if flag %WEBKIT_HIT_TEST_RESULT_CONTEXT_LINK is present in #WebKitHitTestResult:context
func (*HitTestResult) SetPropertyLinkTitle ¶ added in v0.0.4
func (x *HitTestResult) SetPropertyLinkTitle(value string)
SetPropertyLinkTitle sets the "link-title" property. The title of the link if flag %WEBKIT_HIT_TEST_RESULT_CONTEXT_LINK is present in #WebKitHitTestResult:context
func (*HitTestResult) SetPropertyLinkUri ¶ added in v0.0.4
func (x *HitTestResult) SetPropertyLinkUri(value string)
SetPropertyLinkUri sets the "link-uri" property. The URI of the link if flag %WEBKIT_HIT_TEST_RESULT_CONTEXT_LINK is present in #WebKitHitTestResult:context
func (*HitTestResult) SetPropertyMediaUri ¶ added in v0.0.4
func (x *HitTestResult) SetPropertyMediaUri(value string)
SetPropertyMediaUri sets the "media-uri" property. The URI of the media if flag %WEBKIT_HIT_TEST_RESULT_CONTEXT_MEDIA is present in #WebKitHitTestResult:context
type HitTestResultClass ¶
type HitTestResultClass struct {
ParentClass gobject.ObjectClass
// contains filtered or unexported fields
}
func (*HitTestResultClass) GoPointer ¶
func (x *HitTestResultClass) GoPointer() uintptr
type HitTestResultContext ¶
type HitTestResultContext int
Enum values with flags representing the context of a #WebKitHitTestResult.
const ( // anywhere in the document. WebkitHitTestResultContextDocumentValue HitTestResultContext = 2 // a hyperlink element. WebkitHitTestResultContextLinkValue HitTestResultContext = 4 // an image element. WebkitHitTestResultContextImageValue HitTestResultContext = 8 // a video or audio element. WebkitHitTestResultContextMediaValue HitTestResultContext = 16 // an editable element WebkitHitTestResultContextEditableValue HitTestResultContext = 32 // a scrollbar element. WebkitHitTestResultContextScrollbarValue HitTestResultContext = 64 // a selected element. Since 2.8 WebkitHitTestResultContextSelectionValue HitTestResultContext = 128 )
type ScriptWorld ¶
func NewScriptWorld ¶
func NewScriptWorld() *ScriptWorld
Creates a new isolated #WebKitScriptWorld. Scripts executed in isolated worlds have access to the DOM but not to other variable or functions created by the page. The #WebKitScriptWorld is created with a generated unique name. Use webkit_script_world_new_with_name() if you want to create it with a custom name. You can get the JavaScript execution context of a #WebKitScriptWorld for a given #WebKitFrame with webkit_frame_get_javascript_context_for_script_world().
func NewScriptWorldWithName ¶
func NewScriptWorldWithName(NameVar string) *ScriptWorld
Creates a new isolated #WebKitScriptWorld with a name. Scripts executed in isolated worlds have access to the DOM but not to other variable or functions created by the page. You can get the JavaScript execution context of a #WebKitScriptWorld for a given #WebKitFrame with webkit_frame_get_javascript_context_for_script_world().
func ScriptWorldGetDefault ¶
func ScriptWorldGetDefault() *ScriptWorld
Get the default #WebKitScriptWorld. This is the normal script world where all scripts are executed by default. You can get the JavaScript execution context of a #WebKitScriptWorld for a given #WebKitFrame with webkit_frame_get_javascript_context_for_script_world().
func ScriptWorldNewFromInternalPtr ¶
func ScriptWorldNewFromInternalPtr(ptr uintptr) *ScriptWorld
func (*ScriptWorld) ConnectWindowObjectCleared ¶
func (x *ScriptWorld) ConnectWindowObjectCleared(cb *func(ScriptWorld, uintptr, uintptr)) uint
Emitted when the JavaScript window object in a #WebKitScriptWorld has been cleared. This is the preferred place to set custom properties on the window object using the JavaScriptCore API. You can get the window object of @frame from the JavaScript execution context of @world that is returned by webkit_frame_get_js_context_for_script_world().
func (*ScriptWorld) GetName ¶
func (x *ScriptWorld) GetName() string
Get the name of a #WebKitScriptWorld.
func (*ScriptWorld) GoPointer ¶
func (c *ScriptWorld) GoPointer() uintptr
func (*ScriptWorld) SetGoPointer ¶
func (c *ScriptWorld) SetGoPointer(ptr uintptr)
type ScriptWorldClass ¶
type ScriptWorldClass struct {
ParentClass gobject.ObjectClass
// contains filtered or unexported fields
}
func (*ScriptWorldClass) GoPointer ¶
func (x *ScriptWorldClass) GoPointer() uintptr
type URIRequest ¶
Represents a URI request.
A #WebKitURIRequest can be created with a URI using the webkit_uri_request_new() method, and you can get the URI of an existing request with the webkit_uri_request_get_uri() one.
func NewURIRequest ¶
func NewURIRequest(UriVar string) *URIRequest
Creates a new #WebKitURIRequest for the given URI.
func URIRequestNewFromInternalPtr ¶
func URIRequestNewFromInternalPtr(ptr uintptr) *URIRequest
func (*URIRequest) GetHttpHeaders ¶
func (x *URIRequest) GetHttpHeaders() *soup.MessageHeaders
Get the HTTP headers of a #WebKitURIRequest as a #SoupMessageHeaders.
func (*URIRequest) GetHttpMethod ¶
func (x *URIRequest) GetHttpMethod() string
Get the HTTP method of the #WebKitURIRequest.
func (*URIRequest) GetPropertyUri ¶ added in v0.0.4
func (x *URIRequest) GetPropertyUri() string
GetPropertyUri gets the "uri" property. The URI to which the request will be made.
func (*URIRequest) GoPointer ¶
func (c *URIRequest) GoPointer() uintptr
func (*URIRequest) SetGoPointer ¶
func (c *URIRequest) SetGoPointer(ptr uintptr)
func (*URIRequest) SetPropertyUri ¶ added in v0.0.4
func (x *URIRequest) SetPropertyUri(value string)
SetPropertyUri sets the "uri" property. The URI to which the request will be made.
type URIRequestClass ¶
type URIRequestClass struct {
ParentClass gobject.ObjectClass
// contains filtered or unexported fields
}
func (*URIRequestClass) GoPointer ¶
func (x *URIRequestClass) GoPointer() uintptr
type URIResponse ¶
Represents an URI response.
A #WebKitURIResponse contains information such as the URI, the status code, the content length, the mime type, the HTTP status or the suggested filename.
func URIResponseNewFromInternalPtr ¶
func URIResponseNewFromInternalPtr(ptr uintptr) *URIResponse
func (*URIResponse) GetContentLength ¶
func (x *URIResponse) GetContentLength() uint64
Get the expected content length of the #WebKitURIResponse.
It can be 0 if the server provided an incorrect or missing Content-Length.
func (*URIResponse) GetHttpHeaders ¶
func (x *URIResponse) GetHttpHeaders() *soup.MessageHeaders
Get the HTTP headers of a #WebKitURIResponse as a #SoupMessageHeaders.
func (*URIResponse) GetMimeType ¶
func (x *URIResponse) GetMimeType() string
Gets the MIME type of the response.
func (*URIResponse) GetPropertyContentLength ¶ added in v0.0.4
func (x *URIResponse) GetPropertyContentLength() uint64
GetPropertyContentLength gets the "content-length" property. The expected content length of the response.
func (*URIResponse) GetPropertyHttpHeaders ¶ added in v0.0.4
func (x *URIResponse) GetPropertyHttpHeaders() uintptr
GetPropertyHttpHeaders gets the "http-headers" property. The HTTP headers of the response, or %NULL if the response is not an HTTP response.
func (*URIResponse) GetPropertyMimeType ¶ added in v0.0.4
func (x *URIResponse) GetPropertyMimeType() string
GetPropertyMimeType gets the "mime-type" property. The MIME type of the response.
func (*URIResponse) GetPropertyStatusCode ¶ added in v0.0.4
func (x *URIResponse) GetPropertyStatusCode() uint
GetPropertyStatusCode gets the "status-code" property. The status code of the response as returned by the server.
func (*URIResponse) GetPropertySuggestedFilename ¶ added in v0.0.4
func (x *URIResponse) GetPropertySuggestedFilename() string
GetPropertySuggestedFilename gets the "suggested-filename" property. The suggested filename for the URI response.
func (*URIResponse) GetPropertyUri ¶ added in v0.0.4
func (x *URIResponse) GetPropertyUri() string
GetPropertyUri gets the "uri" property. The URI for which the response was made.
func (*URIResponse) GetStatusCode ¶
func (x *URIResponse) GetStatusCode() uint
Get the status code of the #WebKitURIResponse.
Get the status code of the #WebKitURIResponse as returned by the server. It will normally be a #SoupKnownStatusCode, for example %SOUP_STATUS_OK, though the server can respond with any unsigned integer.
func (*URIResponse) GetSuggestedFilename ¶
func (x *URIResponse) GetSuggestedFilename() string
Get the suggested filename for @response.
Get the suggested filename for @response, as specified by the 'Content-Disposition' HTTP header, or %NULL if it's not present.
func (*URIResponse) GetUri ¶
func (x *URIResponse) GetUri() string
Gets the URI which resulted in the response.
func (*URIResponse) GoPointer ¶
func (c *URIResponse) GoPointer() uintptr
func (*URIResponse) SetGoPointer ¶
func (c *URIResponse) SetGoPointer(ptr uintptr)
type URIResponseClass ¶
type URIResponseClass struct {
ParentClass gobject.ObjectClass
// contains filtered or unexported fields
}
func (*URIResponseClass) GoPointer ¶
func (x *URIResponseClass) GoPointer() uintptr
type UserMessage ¶
type UserMessage struct {
gobject.InitiallyUnowned
}
Message that can be sent between the UI process and web process extensions.
A WebKitUserMessage is a message that can be used for the communication between the UI process and web process extensions. A WebKitUserMessage always has a name, and it can also include parameters and UNIX file descriptors. Messages can be sent from a #WebKitWebContext to all web process extensions, from a web process extension to its corresponding #WebKitWebContext, and from a #WebKitWebView to its corresponding #WebKitWebPage (and vice versa). One to one messages can be replied to directly with webkit_user_message_send_reply().
func NewUserMessage ¶
func NewUserMessage(NameVar string, ParametersVar *glib.Variant) *UserMessage
Create a new #WebKitUserMessage with @name.
func NewUserMessageWithFdList ¶
func NewUserMessageWithFdList(NameVar string, ParametersVar *glib.Variant, FdListVar *gio.UnixFDList) *UserMessage
Create a new #WebKitUserMessage including also a list of UNIX file descriptors to be sent.
func UserMessageNewFromInternalPtr ¶
func UserMessageNewFromInternalPtr(ptr uintptr) *UserMessage
func (*UserMessage) GetFdList ¶
func (x *UserMessage) GetFdList() *gio.UnixFDList
Get the @message list of file descritpor.
func (*UserMessage) GetParameters ¶
func (x *UserMessage) GetParameters() *glib.Variant
Get the @message parameters.
func (*UserMessage) GetPropertyName ¶ added in v0.0.4
func (x *UserMessage) GetPropertyName() string
GetPropertyName gets the "name" property. The name of the user message.
func (*UserMessage) GetPropertyParameters ¶ added in v0.0.4
func (x *UserMessage) GetPropertyParameters() uintptr
GetPropertyParameters gets the "parameters" property. The parameters of the user message as a #GVariant, or %NULL if the message doesn't include parameters. Note that only complete types are allowed.
func (*UserMessage) GoPointer ¶
func (c *UserMessage) GoPointer() uintptr
func (*UserMessage) SendReply ¶
func (x *UserMessage) SendReply(ReplyVar *UserMessage)
Send a reply to an user message.
If @reply is floating, it's consumed. You can only send a reply to a #WebKitUserMessage that has been received.
func (*UserMessage) SetGoPointer ¶
func (c *UserMessage) SetGoPointer(ptr uintptr)
func (*UserMessage) SetPropertyName ¶ added in v0.0.4
func (x *UserMessage) SetPropertyName(value string)
SetPropertyName sets the "name" property. The name of the user message.
func (*UserMessage) SetPropertyParameters ¶ added in v0.0.4
func (x *UserMessage) SetPropertyParameters(value uintptr)
SetPropertyParameters sets the "parameters" property. The parameters of the user message as a #GVariant, or %NULL if the message doesn't include parameters. Note that only complete types are allowed.
type UserMessageClass ¶
type UserMessageClass struct {
ParentClass gobject.InitiallyUnownedClass
// contains filtered or unexported fields
}
func (*UserMessageClass) GoPointer ¶
func (x *UserMessageClass) GoPointer() uintptr
type UserMessageError ¶
type UserMessageError int
Enum values used to denote errors happening when sending user messages.
const ( // The message was not handled by the receiver. WebkitUserMessageUnhandledMessageValue UserMessageError = 0 )
type WebEditor ¶
Access to editing capabilities of a #WebKitWebPage.
The WebKitWebEditor provides access to various editing capabilities of a #WebKitWebPage such as a possibility to react to the current selection in #WebKitWebPage.
func (*WebEditor) ConnectSelectionChanged ¶
This signal is emitted for every selection change inside a #WebKitWebPage as well as for every caret position change as the caret is a collapsed selection.
func (*WebEditor) SetGoPointer ¶
type WebEditorClass ¶
type WebEditorClass struct {
ParentClass gobject.ObjectClass
// contains filtered or unexported fields
}
func (*WebEditorClass) GoPointer ¶
func (x *WebEditorClass) GoPointer() uintptr
type WebFormManager ¶
Form manager of a #WebKitWebPage in a #WebKitScriptWorld
func WebFormManagerNewFromInternalPtr ¶
func WebFormManagerNewFromInternalPtr(ptr uintptr) *WebFormManager
func (*WebFormManager) ConnectFormControlsAssociated ¶
func (x *WebFormManager) ConnectFormControlsAssociated(cb *func(WebFormManager, uintptr, []javascriptcore.Value)) uint
Emitted after form elements (or form associated elements) are associated to @frame. This is useful to implement form auto filling for web pages where form fields are added dynamically. This signal might be emitted multiple times for the same frame.
Note that this signal could be also emitted when form controls are moved between forms. In that case, the @elements array carries the list of those elements which have moved.
Clients should take a reference to the members of the @elements array if it is desired to keep them alive after the signal handler returns.
func (*WebFormManager) ConnectWillSendSubmitEvent ¶
func (x *WebFormManager) ConnectWillSendSubmitEvent(cb *func(WebFormManager, uintptr, uintptr, uintptr)) uint
This signal is emitted when the DOM submit event is about to be fired for @form. JavaScript code may rely on the submit event to detect that the user has clicked on a submit button, and to possibly cancel the form submission before #WebKitWebFormManager::will-submit-form signal is emitted. However, beware that, for historical reasons, the submit event is not emitted at all if the form submission is triggered by JavaScript. For these reasons, this signal may not be used to reliably detect whether a form will be submitted. Instead, use it to detect if a user has clicked on a form's submit button even if JavaScript later cancels the form submission, or to read the values of the form's fields even if JavaScript later clears certain fields before submitting. This may be needed, for example, to implement a robust browser password manager, as some misguided websites may use such techniques to attempt to thwart password managers.
func (*WebFormManager) ConnectWillSubmitForm ¶
func (x *WebFormManager) ConnectWillSubmitForm(cb *func(WebFormManager, uintptr, uintptr, uintptr)) uint
This signal is emitted when @form will imminently be submitted. It can no longer be cancelled. This event always occurs immediately before a form is submitted to its target, so use this event to reliably detect when a form is submitted. This signal is emitted after #WebKitWebFormManager::will-send-submit-event if that signal is emitted.
func (*WebFormManager) GoPointer ¶
func (c *WebFormManager) GoPointer() uintptr
func (*WebFormManager) SetGoPointer ¶
func (c *WebFormManager) SetGoPointer(ptr uintptr)
type WebFormManagerClass ¶
type WebFormManagerClass struct {
ParentClass gobject.ObjectClass
// contains filtered or unexported fields
}
func (*WebFormManagerClass) GoPointer ¶
func (x *WebFormManagerClass) GoPointer() uintptr
type WebHitTestResult ¶
Result of a Hit Test (Web Process Extensions).
WebKitWebHitTestResult extends #WebKitHitTestResult to provide information about the #WebKitDOMNode in the coordinates of the Hit Test.
func WebHitTestResultNewFromInternalPtr ¶
func WebHitTestResultNewFromInternalPtr(ptr uintptr) *WebHitTestResult
func (*WebHitTestResult) ContextIsEditable ¶
func (x *WebHitTestResult) ContextIsEditable() bool
Check whether there is an editable element at the hit test position.
Checks whether %WEBKIT_HIT_TEST_RESULT_CONTEXT_EDITABLE flag is present in the context flags.
func (*WebHitTestResult) ContextIsImage ¶
func (x *WebHitTestResult) ContextIsImage() bool
Check whether there is an image element at the hit test position.
Checks whether %WEBKIT_HIT_TEST_RESULT_CONTEXT_IMAGE flag is present in the context flags.
func (*WebHitTestResult) ContextIsLink ¶
func (x *WebHitTestResult) ContextIsLink() bool
Check whether there is a link element at the hit test position.
Checks whether %WEBKIT_HIT_TEST_RESULT_CONTEXT_LINK flag is present in the context flags.
func (*WebHitTestResult) ContextIsMedia ¶
func (x *WebHitTestResult) ContextIsMedia() bool
Check whether there is a media element at the hit test position.
Checks whether %WEBKIT_HIT_TEST_RESULT_CONTEXT_MEDIA flag is present in the context flags.
func (*WebHitTestResult) ContextIsScrollbar ¶
func (x *WebHitTestResult) ContextIsScrollbar() bool
Check whether there is a scrollbar at the hit test position.
Checks whether %WEBKIT_HIT_TEST_RESULT_CONTEXT_SCROLLBAR flag is present in the context flags.
func (*WebHitTestResult) ContextIsSelection ¶
func (x *WebHitTestResult) ContextIsSelection() bool
Check whether there is a selected element at the hit test position.
Checks whether %WEBKIT_HIT_TEST_RESULT_CONTEXT_SELECTION flag is present in the context flags.
func (*WebHitTestResult) GetContext ¶
func (x *WebHitTestResult) GetContext() uint
Gets the the context flags for the hit test result.
func (*WebHitTestResult) GetImageUri ¶
func (x *WebHitTestResult) GetImageUri() string
Obtains the URI associated with the image element at the hit test position.
func (*WebHitTestResult) GetJsNode ¶
func (x *WebHitTestResult) GetJsNode(WorldVar *ScriptWorld) *javascriptcore.Value
Get the #JSCValue for the DOM node in @world at the coordinates of the Hit Test.
func (*WebHitTestResult) GetLinkLabel ¶
func (x *WebHitTestResult) GetLinkLabel() string
Obtains the label associated with the link element at the hit test position.
func (*WebHitTestResult) GetLinkTitle ¶
func (x *WebHitTestResult) GetLinkTitle() string
Obtains the title associated with the link element at the hit test position.
func (*WebHitTestResult) GetLinkUri ¶
func (x *WebHitTestResult) GetLinkUri() string
Obtains the URI associated with the link element at the hit test position.
func (*WebHitTestResult) GetMediaUri ¶
func (x *WebHitTestResult) GetMediaUri() string
Obtains the URI associated with the media element at the hit test position.
func (*WebHitTestResult) GoPointer ¶
func (c *WebHitTestResult) GoPointer() uintptr
func (*WebHitTestResult) SetGoPointer ¶
func (c *WebHitTestResult) SetGoPointer(ptr uintptr)
type WebHitTestResultClass ¶
type WebHitTestResultClass struct {
ParentClass gobject.ObjectClass
// contains filtered or unexported fields
}
func (*WebHitTestResultClass) GoPointer ¶
func (x *WebHitTestResultClass) GoPointer() uintptr
type WebPage ¶
A loaded web page.
func (*WebPage) ConnectConsoleMessageSent ¶
Emitted when a message is sent to the console. This can be a message produced by the use of JavaScript console API, a JavaScript exception, a security error or other errors, warnings, debug or log messages. The @console_message contains information of the message.
func (*WebPage) ConnectContextMenu ¶
Emitted before a context menu is displayed in the UI Process to give the application a chance to customize the proposed menu, build its own context menu or pass user data to the UI Process. This signal is useful when the information available in the UI Process is not enough to build or customize the context menu, for example, to add menu entries depending on the node at the coordinates of the @hit_test_result. Otherwise, it's recommended to use #WebKitWebView::context-menu signal instead.
func (*WebPage) ConnectDocumentLoaded ¶
This signal is emitted when the DOM document of a #WebKitWebPage has been loaded.
You can wait for this signal to get the DOM document
func (*WebPage) ConnectSendRequest ¶
This signal is emitted when @request is about to be sent to the server. This signal can be used to modify the #WebKitURIRequest that will be sent to the server. You can also cancel the resource load operation by connecting to this signal and returning %TRUE.
In case of a server redirection this signal is emitted again with the @request argument containing the new request to be sent to the server due to the redirection and the @redirected_response parameter containing the response received by the server for the initial request.
Modifications to the #WebKitURIRequest and its associated #SoupMessageHeaders will be taken into account when the request is sent over the network.
func (*WebPage) ConnectUserMessageReceived ¶
This signal is emitted when a #WebKitUserMessage is received from the #WebKitWebView corresponding to @web_page. You can reply to the message using webkit_user_message_send_reply().
You can handle the user message asynchronously by calling g_object_ref() on @message and returning %TRUE. If the last reference of @message is removed and the message has been replied, the operation in the #WebKitWebView will finish with error %WEBKIT_USER_MESSAGE_UNHANDLED_MESSAGE.
func (*WebPage) GetFormManager ¶
func (x *WebPage) GetFormManager(WorldVar *ScriptWorld) *WebFormManager
Get the #WebKitWebFormManager of @web_page in @world.
func (*WebPage) GetMainFrame ¶
Returns the main frame of a #WebKitWebPage.
func (*WebPage) GetPropertyUri ¶ added in v0.0.4
GetPropertyUri gets the "uri" property. The current active URI of the #WebKitWebPage.
func (*WebPage) GetUri ¶
Returns the current active URI of @web_page.
You can monitor the active URI by connecting to the notify::uri signal of @web_page.
func (*WebPage) SendMessageToView ¶
func (x *WebPage) SendMessageToView(MessageVar *UserMessage, CancellableVar *gio.Cancellable, CallbackVar *gio.AsyncReadyCallback, UserDataVar uintptr)
Send @message to the #WebKitWebView corresponding to @web_page. If @message is floating, it's consumed.
If you don't expect any reply, or you simply want to ignore it, you can pass %NULL as @callback. When the operation is finished, @callback will be called. You can then call webkit_web_page_send_message_to_view_finish() to get the message reply.
func (*WebPage) SendMessageToViewFinish ¶
func (x *WebPage) SendMessageToViewFinish(ResultVar gio.AsyncResult) (*UserMessage, error)
Finish an asynchronous operation started with webkit_web_page_send_message_to_view().
func (*WebPage) SetGoPointer ¶
type WebPageClass ¶
type WebPageClass struct {
ParentClass gobject.ObjectClass
// contains filtered or unexported fields
}
func (*WebPageClass) GoPointer ¶
func (x *WebPageClass) GoPointer() uintptr
type WebProcessExtension ¶
Represents an extension of the web process.
WebKitWebProcessExtension is a loadable module for the web process. It allows you to execute code in the web process and being able to use the DOM API, to change any request or to inject custom JavaScript code, for example.
To create a WebKitWebProcessExtension you should write a module with an initialization function that could be either webkit_web_process_extension_initialize() with prototype #WebKitWebProcessExtensionInitializeFunction or webkit_web_process_extension_initialize_with_user_data() with prototype #WebKitWebProcessExtensionInitializeWithUserDataFunction. This function has to be public and it has to use the #G_MODULE_EXPORT macro. It is called when the web process is initialized.
```c static void web_page_created_callback (WebKitWebProcessExtension *extension,
WebKitWebPage *web_page,
gpointer user_data)
{
g_print ("Page %d created for %s\n",
webkit_web_page_get_id (web_page),
webkit_web_page_get_uri (web_page));
}
G_MODULE_EXPORT void webkit_web_process_extension_initialize (WebKitWebProcessExtension *extension)
{
g_signal_connect (extension, "page-created",
G_CALLBACK (web_page_created_callback),
NULL);
}
```
The previous piece of code shows a trivial example of an extension that notifies when a #WebKitWebPage is created.
WebKit has to know where it can find the created WebKitWebProcessExtension. To do so you should use the webkit_web_context_set_web_extensions_directory() function. The signal #WebKitWebContext::initialize-web-extensions is the recommended place to call it.
To provide the initialization data used by the webkit_web_process_extension_initialize_with_user_data() function, you have to call webkit_web_context_set_web_extensions_initialization_user_data() with the desired data as parameter. You can see an example of this in the following piece of code:
```c #define WEB_EXTENSIONS_DIRECTORY // ...
static void initialize_web_extensions (WebKitWebContext *context,
gpointer user_data)
{
// Web Extensions get a different ID for each Web Process
static guint32 unique_id = 0;
webkit_web_context_set_web_extensions_directory (
context, WEB_EXTENSIONS_DIRECTORY);
webkit_web_context_set_web_extensions_initialization_user_data (
context, g_variant_new_uint32 (unique_id++));
}
int main (int argc, char **argv)
{
g_signal_connect (webkit_web_context_get_default (),
"initialize-web-extensions",
G_CALLBACK (initialize_web_extensions),
NULL);
GtkWidget *view = webkit_web_view_new ();
// ...
}
```
func WebProcessExtensionNewFromInternalPtr ¶
func WebProcessExtensionNewFromInternalPtr(ptr uintptr) *WebProcessExtension
func (*WebProcessExtension) ConnectPageCreated ¶
func (x *WebProcessExtension) ConnectPageCreated(cb *func(WebProcessExtension, uintptr)) uint
This signal is emitted when a new #WebKitWebPage is created in the Web Process.
func (*WebProcessExtension) ConnectUserMessageReceived ¶
func (x *WebProcessExtension) ConnectUserMessageReceived(cb *func(WebProcessExtension, uintptr)) uint
This signal is emitted when a #WebKitUserMessage is received from the #WebKitWebContext corresponding to @extension. Messages sent by #WebKitWebContext are always broadcasted to all web extensions and they can't be replied to. Calling webkit_user_message_send_reply() will do nothing.
func (*WebProcessExtension) GetPage ¶
func (x *WebProcessExtension) GetPage(PageIdVar uint64) *WebPage
Get the web page of the given @page_id.
func (*WebProcessExtension) GoPointer ¶
func (c *WebProcessExtension) GoPointer() uintptr
func (*WebProcessExtension) SendMessageToContext ¶
func (x *WebProcessExtension) SendMessageToContext(MessageVar *UserMessage, CancellableVar *gio.Cancellable, CallbackVar *gio.AsyncReadyCallback, UserDataVar uintptr)
Send @message to the #WebKitWebContext corresponding to @extension. If @message is floating, it's consumed.
If you don't expect any reply, or you simply want to ignore it, you can pass %NULL as @calback. When the operation is finished, @callback will be called. You can then call webkit_web_process_extension_send_message_to_context_finish() to get the message reply.
func (*WebProcessExtension) SendMessageToContextFinish ¶
func (x *WebProcessExtension) SendMessageToContextFinish(ResultVar gio.AsyncResult) (*UserMessage, error)
Finish an asynchronous operation started with webkit_web_process_extension_send_message_to_context().
func (*WebProcessExtension) SetGoPointer ¶
func (c *WebProcessExtension) SetGoPointer(ptr uintptr)
type WebProcessExtensionClass ¶
type WebProcessExtensionClass struct {
ParentClass gobject.ObjectClass
// contains filtered or unexported fields
}
func (*WebProcessExtensionClass) GoPointer ¶
func (x *WebProcessExtensionClass) GoPointer() uintptr
type WebProcessExtensionInitializeFunction ¶
type WebProcessExtensionInitializeFunction func(uintptr)
Type definition for a function that will be called to initialize the web extension when the web process starts.
type WebProcessExtensionInitializeWithUserDataFunction ¶
Type definition for a function that will be called to initialize the web extensions when the web process starts, and which receives as additional argument the user data set with webkit_web_context_set_web_process_extensions_initialization_user_data().
Source Files
¶
- WebKitConsoleMessage.go
- WebKitContextMenu.go
- WebKitContextMenuActions.go
- WebKitContextMenuItem.go
- WebKitFrame.go
- WebKitHitTestResult.go
- WebKitScriptWorld.go
- WebKitURIRequest.go
- WebKitURIResponse.go
- WebKitUserMessage.go
- WebKitWebEditor.go
- WebKitWebFormManager.go
- WebKitWebHitTestResult.go
- WebKitWebPage.go
- WebKitWebProcessExtension.go