gi-webkit-3.0.12: WebKit bindings

CopyrightWill Thompson, Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.WebKit.Objects.WebFrame

Contents

Description

A WebView contains a main WebFrame. A WebFrame contains the content of one URI. The URI and name of the frame can be retrieved, the load status and progress can be observed using the signals and can be controlled using the methods of the WebFrame. A WebFrame can have any number of children and one child can be found by using webkit_web_frame_find_frame.

<informalexample><programlisting> /<!-- -->* Get the frame from the WebView *<!-- -->/ WebKitWebFrame *frame = webkit_web_view_get_main_frame (WEBKIT_WEB_VIEW(my_view)); g_print ("The URI of this frame is 's'", webkit_web_frame_get_uri (frame)); </programlisting></informalexample>

Synopsis

Exported types

newtype WebFrame Source #

Constructors

WebFrame (ManagedPtr WebFrame) 

Instances

GObject WebFrame Source # 
IsObject WebFrame Source # 
IsWebFrame WebFrame Source # 
((~) * info (ResolveWebFrameMethod t WebFrame), MethodInfo * info WebFrame p) => IsLabel t (WebFrame -> p) Source # 

Methods

fromLabel :: Proxy# Symbol t -> WebFrame -> p #

((~) * info (ResolveWebFrameMethod t WebFrame), MethodInfo * info WebFrame p) => IsLabelProxy t (WebFrame -> p) Source # 

Methods

fromLabelProxy :: Proxy Symbol t -> WebFrame -> p #

HasAttributeList * WebFrame Source # 
type AttributeList WebFrame Source # 
type SignalList WebFrame Source # 

Methods

findFrame

webFrameFindFrame Source #

Arguments

:: (HasCallStack, MonadIO m, IsWebFrame a) 
=> a

frame: a WebFrame

-> Text

name: the name of the frame to be found

-> m WebFrame

Returns: the found WebFrame or Nothing in case none is found

For pre-defined names, returns frame if name is "_self" or "_current", returns frame's parent frame if name is "_parent", and returns the main frame if name is "_top". Also returns frame if it is the main frame and name is either "_parent" or "_top". For other names, this function returns the first frame that matches name. This function searches frame and its descendents first, then frame's parent and its children moving up the hierarchy until a match is found. If no match is found in frame's hierarchy, this function will search for a matching frame in other main frame hierarchies. Returns Nothing if no match is found.

getDataSource

webFrameGetDataSource Source #

Arguments

:: (HasCallStack, MonadIO m, IsWebFrame a) 
=> a

frame: a WebFrame

-> m WebDataSource

Returns: the committed WebDataSource.

Returns the committed data source.

Since: 1.1.14

getDomDocument

webFrameGetDomDocument Source #

Arguments

:: (HasCallStack, MonadIO m, IsWebFrame a) 
=> a

frame: a WebFrame

-> m DOMDocument

Returns: the DOMDocument currently loaded in the frame or Nothing if no document is loaded

No description available in the introspection data.

Since: 1.10

getGlobalContext

webFrameGetGlobalContext Source #

Arguments

:: (HasCallStack, MonadIO m, IsWebFrame a) 
=> a

frame: a WebFrame

-> m GlobalContext

Returns: the global JavaScript context GlobalContext

Gets the global JavaScript execution context. Use this function to bridge between the WebKit and JavaScriptCore APIs.

getHorizontalScrollbarPolicy

webFrameGetHorizontalScrollbarPolicy :: (HasCallStack, MonadIO m, IsWebFrame a) => a -> m PolicyType Source #

No description available in the introspection data.

getLoadStatus

webFrameGetLoadStatus Source #

Arguments

:: (HasCallStack, MonadIO m, IsWebFrame a) 
=> a

frame: a WebView

-> m LoadStatus

Returns: The LoadStatus specifying the status of the current load.

Determines the current status of the load.

Since: 1.1.7

getName

data WebFrameGetNameMethodInfo Source #

Instances

((~) * signature (m Text), MonadIO m, IsWebFrame a) => MethodInfo * WebFrameGetNameMethodInfo a signature Source # 

webFrameGetName Source #

Arguments

:: (HasCallStack, MonadIO m, IsWebFrame a) 
=> a

frame: a WebFrame

-> m Text

Returns: the name of frame. This method will return NULL if the WebFrame is invalid or an empty string if it is not backed by a live WebCore frame.

Returns the frame's name

getNetworkResponse

webFrameGetNetworkResponse Source #

Arguments

:: (HasCallStack, MonadIO m, IsWebFrame a) 
=> a

frame: a WebFrame

-> m NetworkResponse

Returns: a NetworkResponse object

Returns a NetworkResponse object representing the response that was given to the request for the given frame, or NULL if the frame was not created by a load. You must unref the object when you are done with it.

Since: 1.1.18

getParent

webFrameGetParent Source #

Arguments

:: (HasCallStack, MonadIO m, IsWebFrame a) 
=> a

frame: a WebFrame

-> m WebFrame

Returns: the parent WebFrame or Nothing in case there is none

Returns the frame's parent frame, or Nothing if it has none.

getProvisionalDataSource

webFrameGetProvisionalDataSource Source #

Arguments

:: (HasCallStack, MonadIO m, IsWebFrame a) 
=> a

frame: a WebFrame

-> m WebDataSource

Returns: the provisional WebDataSource or Nothing if a load request is not in progress.

You use the webkit_web_frame_load_request method to initiate a request that creates a provisional data source. The provisional data source will transition to a committed data source once any data has been received. Use webkit_web_frame_get_data_source to get the committed data source.

Since: 1.1.14

getRangeForWordAroundCaret

webFrameGetRangeForWordAroundCaret Source #

Arguments

:: (HasCallStack, MonadIO m, IsWebFrame a) 
=> a

frame: a WebFrame

-> m DOMRange

Returns: a DOMRange spanning the word where the caret currently is positioned. If there is no caret Nothing will be returned.

Returns a DOMRange for the word where the caret is currently positioned.

@since 1.5.1.

getSecurityOrigin

webFrameGetSecurityOrigin Source #

Arguments

:: (HasCallStack, MonadIO m, IsWebFrame a) 
=> a

frame: a WebFrame

-> m SecurityOrigin

Returns: the security origin of frame

Returns the frame's security origin.

Since: 1.1.14

getTitle

webFrameGetTitle Source #

Arguments

:: (HasCallStack, MonadIO m, IsWebFrame a) 
=> a

frame: a WebFrame

-> m Text

Returns: the title of frame

Returns the frame's document title

getUri

data WebFrameGetUriMethodInfo Source #

Instances

((~) * signature (m Text), MonadIO m, IsWebFrame a) => MethodInfo * WebFrameGetUriMethodInfo a signature Source # 

webFrameGetUri Source #

Arguments

:: (HasCallStack, MonadIO m, IsWebFrame a) 
=> a

frame: a WebFrame

-> m Text

Returns: the URI of frame

Returns the current URI of the contents displayed by the frame

getVerticalScrollbarPolicy

webFrameGetVerticalScrollbarPolicy :: (HasCallStack, MonadIO m, IsWebFrame a) => a -> m PolicyType Source #

No description available in the introspection data.

getWebView

webFrameGetWebView Source #

Arguments

:: (HasCallStack, MonadIO m, IsWebFrame a) 
=> a

frame: a WebFrame

-> m WebView

Returns: the WebView that manages frame

Returns the WebView that manages this WebFrame.

The WebView returned manages the entire hierarchy of WebFrame objects that contains frame.

loadAlternateString

webFrameLoadAlternateString Source #

Arguments

:: (HasCallStack, MonadIO m, IsWebFrame a) 
=> a

frame: a WebFrame

-> Text

content: the alternate content to display as the main page of the frame

-> Text

baseUrl: the base URI for relative locations

-> Text

unreachableUrl: the URL for the alternate page content

-> m () 

Request loading of an alternate content for a URL that is unreachable. Using this method will preserve the back-forward list. The URI passed in baseUrl has to be an absolute URI.

Since: 1.1.6

loadRequest

webFrameLoadRequest Source #

Arguments

:: (HasCallStack, MonadIO m, IsWebFrame a, IsNetworkRequest b) 
=> a

frame: a WebFrame

-> b

request: a NetworkRequest

-> m () 

Connects to a given URI by initiating an asynchronous client request.

Creates a provisional data source that will transition to a committed data source once any data has been received. Use webFrameStopLoading to stop the load. This function is typically invoked on the main frame.

loadString

data WebFrameLoadStringMethodInfo Source #

Instances

((~) * signature (Text -> Text -> Text -> Text -> m ()), MonadIO m, IsWebFrame a) => MethodInfo * WebFrameLoadStringMethodInfo a signature Source # 

webFrameLoadString Source #

Arguments

:: (HasCallStack, MonadIO m, IsWebFrame a) 
=> a

frame: a WebFrame

-> Text

content: an URI string

-> Text

mimeType: the MIME type, or Nothing

-> Text

encoding: the encoding, or Nothing

-> Text

baseUri: the base URI for relative locations

-> m () 

Requests loading of the given content with the specified mimeType, encoding and baseUri.

If mimeType is Nothing, "text/html" is assumed.

If encoding is Nothing, "UTF-8" is assumed.

Since: 1.1.1

loadUri

data WebFrameLoadUriMethodInfo Source #

Instances

((~) * signature (Text -> m ()), MonadIO m, IsWebFrame a) => MethodInfo * WebFrameLoadUriMethodInfo a signature Source # 

webFrameLoadUri Source #

Arguments

:: (HasCallStack, MonadIO m, IsWebFrame a) 
=> a

frame: a WebFrame

-> Text

uri: an URI string

-> m () 

Requests loading of the specified URI string.

Since: 1.1.1

new

webFrameNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsWebView a) 
=> a

webView: the controlling WebView

-> m WebFrame

Returns: a new WebFrame

Deprecated: (Since version 1.0.2)WebFrame can only be used to inspect existingframes.

Creates a new WebFrame initialized with a controlling WebView.

print

data WebFramePrintMethodInfo Source #

Instances

((~) * signature (m ()), MonadIO m, IsWebFrame a) => MethodInfo * WebFramePrintMethodInfo a signature Source # 

webFramePrint Source #

Arguments

:: (HasCallStack, MonadIO m, IsWebFrame a) 
=> a

frame: a WebFrame

-> m () 

Prints the given WebFrame, by presenting a print dialog to the user. If you need more control over the printing process, see webFramePrintFull.

Since: 1.1.5

printFull

webFramePrintFull Source #

Arguments

:: (HasCallStack, MonadIO m, IsWebFrame a, IsPrintOperation b) 
=> a

frame: a WebFrame to be printed

-> b

operation: the PrintOperation to be carried

-> PrintOperationAction

action: the PrintOperationAction to be performed

-> m PrintOperationResult

Returns: The PrintOperationResult specifying the result of this operation. (Can throw GError)

Prints the given WebFrame, using the given PrintOperation and PrintOperationAction. This function wraps a call to printOperationRun for printing the contents of the WebFrame.

Since: 1.1.5

reload

data WebFrameReloadMethodInfo Source #

Instances

((~) * signature (m ()), MonadIO m, IsWebFrame a) => MethodInfo * WebFrameReloadMethodInfo a signature Source # 

webFrameReload Source #

Arguments

:: (HasCallStack, MonadIO m, IsWebFrame a) 
=> a

frame: a WebFrame

-> m () 

Reloads the initial request.

replaceSelection

webFrameReplaceSelection Source #

Arguments

:: (HasCallStack, MonadIO m, IsWebFrame a) 
=> a

frame: a WebKitWeFrame

-> Text

text: the text to insert in place of the current selection

-> m () 

Replaces the current selection in frame, if any, with text.

Since: 1.5.1

stopLoading

webFrameStopLoading Source #

Arguments

:: (HasCallStack, MonadIO m, IsWebFrame a) 
=> a

frame: a WebFrame

-> m () 

Stops any pending loads on frame's data source, and those of its children.

Properties

horizontalScrollbarPolicy

data WebFrameHorizontalScrollbarPolicyPropertyInfo Source #

Instances

AttrInfo WebFrameHorizontalScrollbarPolicyPropertyInfo Source # 
type AttrOrigin WebFrameHorizontalScrollbarPolicyPropertyInfo Source # 
type AttrLabel WebFrameHorizontalScrollbarPolicyPropertyInfo Source # 
type AttrLabel WebFrameHorizontalScrollbarPolicyPropertyInfo = "horizontal-scrollbar-policy"
type AttrGetType WebFrameHorizontalScrollbarPolicyPropertyInfo Source # 
type AttrBaseTypeConstraint WebFrameHorizontalScrollbarPolicyPropertyInfo Source # 
type AttrSetTypeConstraint WebFrameHorizontalScrollbarPolicyPropertyInfo Source # 
type AttrAllowedOps WebFrameHorizontalScrollbarPolicyPropertyInfo Source # 

loadStatus

data WebFrameLoadStatusPropertyInfo Source #

Instances

AttrInfo WebFrameLoadStatusPropertyInfo Source # 
type AttrOrigin WebFrameLoadStatusPropertyInfo Source # 
type AttrLabel WebFrameLoadStatusPropertyInfo Source # 
type AttrGetType WebFrameLoadStatusPropertyInfo Source # 
type AttrBaseTypeConstraint WebFrameLoadStatusPropertyInfo Source # 
type AttrSetTypeConstraint WebFrameLoadStatusPropertyInfo Source # 
type AttrAllowedOps WebFrameLoadStatusPropertyInfo Source # 

name

data WebFrameNamePropertyInfo Source #

Instances

AttrInfo WebFrameNamePropertyInfo Source # 
type AttrOrigin WebFrameNamePropertyInfo Source # 
type AttrLabel WebFrameNamePropertyInfo Source # 
type AttrGetType WebFrameNamePropertyInfo Source # 
type AttrBaseTypeConstraint WebFrameNamePropertyInfo Source # 
type AttrSetTypeConstraint WebFrameNamePropertyInfo Source # 
type AttrAllowedOps WebFrameNamePropertyInfo Source # 

title

data WebFrameTitlePropertyInfo Source #

Instances

AttrInfo WebFrameTitlePropertyInfo Source # 
type AttrOrigin WebFrameTitlePropertyInfo Source # 
type AttrLabel WebFrameTitlePropertyInfo Source # 
type AttrGetType WebFrameTitlePropertyInfo Source # 
type AttrBaseTypeConstraint WebFrameTitlePropertyInfo Source # 
type AttrSetTypeConstraint WebFrameTitlePropertyInfo Source # 
type AttrAllowedOps WebFrameTitlePropertyInfo Source # 

uri

data WebFrameUriPropertyInfo Source #

Instances

AttrInfo WebFrameUriPropertyInfo Source # 
type AttrOrigin WebFrameUriPropertyInfo Source # 
type AttrLabel WebFrameUriPropertyInfo Source # 
type AttrGetType WebFrameUriPropertyInfo Source # 
type AttrBaseTypeConstraint WebFrameUriPropertyInfo Source # 
type AttrSetTypeConstraint WebFrameUriPropertyInfo Source # 
type AttrAllowedOps WebFrameUriPropertyInfo Source # 

verticalScrollbarPolicy

data WebFrameVerticalScrollbarPolicyPropertyInfo Source #

Instances

AttrInfo WebFrameVerticalScrollbarPolicyPropertyInfo Source # 
type AttrOrigin WebFrameVerticalScrollbarPolicyPropertyInfo Source # 
type AttrLabel WebFrameVerticalScrollbarPolicyPropertyInfo Source # 
type AttrLabel WebFrameVerticalScrollbarPolicyPropertyInfo = "vertical-scrollbar-policy"
type AttrGetType WebFrameVerticalScrollbarPolicyPropertyInfo Source # 
type AttrBaseTypeConstraint WebFrameVerticalScrollbarPolicyPropertyInfo Source # 
type AttrSetTypeConstraint WebFrameVerticalScrollbarPolicyPropertyInfo Source # 
type AttrAllowedOps WebFrameVerticalScrollbarPolicyPropertyInfo Source # 

Signals

cleared

type C_WebFrameClearedCallback = Ptr () -> Ptr () -> IO () Source #

hoveringOverLink

insecureContentRun

loadCommitted

type WebFrameLoadCommittedCallback = IO () Source #

Deprecated: Use the "load-status" property instead.

resourceContentLengthReceived

resourceLoadFailed

resourceLoadFinished

resourceRequestStarting

resourceResponseReceived

scrollbarsPolicyChanged

titleChanged

type WebFrameTitleChangedCallback = Text -> IO () Source #

Deprecated: (Since version 1.1.18)Use "notify::title" instead.