webkitgtk3-0.13.0.3: Binding to the Webkit library.

Maintainergtk2hs-users@lists.sourceforge.net
Stabilityprovisional
Portabilityportable (depends on GHC)
Safe HaskellNone
LanguageHaskell98

Graphics.UI.Gtk.WebKit.WebDataSource

Contents

Description

Note

Function webkit_web_data_source_get_data haven't binding, no idea how to handle GString

Access to the WebKit Web DataSource

Synopsis

Description

Data source encapsulates the content of a WebKitWebFrame. A WebKitWebFrame has a main resource and subresources and the data source provides access to these resources. When a request gets loaded initially, it is set to a provisional state. The application can request for the request that initiated the load by asking for the provisional data source and invoking the webDataSourceGetInitialRequest method of WebKitWebDataSource. This data source may not have enough data and some methods may return empty values. To get a "full" data source with the data and resources loaded, you need to get the non-provisional data source through WebKitWebFrame's webFrameGetDataSource method. This data source will have the data after everything was loaded. Make sure that the data source was finished loading before using any of its methods. You can do this via webDataSourceIsLoading.

Types

Constructors

webDataSourceNew :: IO WebDataSource Source

Creates a new WebDataSource instance. The URL of the WebDataSource will be set to "about:blank".

Methods

webDataSourceGetData :: WebDataSourceClass self => self -> IO (Maybe ByteString) Source

Returns the raw data that represents the the frame's content. The data will be incomplete until the data has finished loading. Returns Nothing if the web frame hasn't loaded any data. Use webkitWebDataSourceIsLoading to test if data source is in the process of loading.

webDataSourceGetEncoding :: (WebDataSourceClass self, GlibString string) => self -> IO string Source

Returns the text encoding name as set in the WebView, or if not, the text encoding of the response.

webDataSourceGetInitialRequest :: WebDataSourceClass self => self -> IO NetworkRequest Source

Returns a reference to the original request that was used to load the web content. The NetworkRequest returned by this method is the request prior to the "committed" load state. See webDataSourceGetRequest for getting the "committed" request.

webDataSourceGetMainResource :: WebDataSourceClass self => self -> IO WebResource Source

Returns the main resource of the data_source

webDataSourceGetRequest :: WebDataSourceClass self => self -> IO NetworkRequest Source

Returns a NetworkRequest that was used to create this WebDataSource. The NetworkRequest returned by this method is the request that was "committed", and hence, different from the request you get from the webDataSourceGetInitialRequest method.

webDataSourceGetSubresources :: WebDataSourceClass self => self -> IO [WebResource] Source

Gives you a List of WebResource objects that compose the WebView to which this WebDataSource is attached.

webDataSourceGetUnreachableUri :: (WebDataSourceClass self, GlibString string) => self -> IO string Source

Return the unreachable URI of data_source. The dataSource will have an unreachable URL if it was created using WebFrame's webFrameLoadAlternateHtmlString method.

webDataSourceGetWebFrame :: WebDataSourceClass self => self -> IO WebFrame Source

Returns the WebFrame that represents this data source

webDataSourceIsLoading :: WebDataSourceClass self => self -> IO Bool Source

Determines whether the data source is in the process of loading its content.