gi-webkit2-4.0.11: WebKit2 bindings

Copyright Will Thompson, Iñaki García Etxebarria and Jonas Platte LGPL-2.1 Iñaki García Etxebarria (garetxe@gmail.com) None Haskell2010

Description

Synopsis

# Exported types

Constructors

Instances

Instances

 Source # Source #

# Methods

## cancel

Instances

Arguments

 :: (HasCallStack, MonadIO m, IsDownload a) => a download: a Download -> m ()

Cancels the download. When the ongoing download operation is effectively cancelled the signal Download::failed is emitted with DownloadErrorCancelledByUser error.

## getAllowOverwrite

Instances

Arguments

 :: (HasCallStack, MonadIO m, IsDownload a) => a download: a Download -> m Bool Returns: the current value of the Download:allow-overwrite property

Returns the current value of the Download: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.

Since: 2.6

## getDestination

Instances

Arguments

 :: (HasCallStack, MonadIO m, IsDownload a) => a download: a Download -> m Text Returns: the destination URI or Nothing

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

## getElapsedTime

Instances

Arguments

 :: (HasCallStack, MonadIO m, IsDownload a) => a download: a Download -> m Double Returns: seconds since the download was started

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.

## getEstimatedProgress

Instances

Arguments

 :: (HasCallStack, MonadIO m, IsDownload a) => a download: a Download -> m Double Returns: an estimate of the of the percent complete for a download as a range from 0.0 to 1.0.

Gets the value of the Download:estimated-progress property. You can monitor the estimated progress of the download operation by connecting to the notify::estimated-progress signal of download.

Instances

Arguments

 :: (HasCallStack, MonadIO m, IsDownload a) => a download: a Download -> m Word64 Returns: the amount of bytes already downloaded.

Gets the length of the data already downloaded for download in bytes.

## getRequest

Instances

Arguments

 :: (HasCallStack, MonadIO m, IsDownload a) => a download: a Download -> m URIRequest Returns: the URIRequest of download

Retrieves the URIRequest object that backs the download process.

## getResponse

Instances

Arguments

 :: (HasCallStack, MonadIO m, IsDownload a) => a download: a Download -> m URIResponse Returns: the URIResponse, or Nothing if the response hasn't been received yet.

Retrieves the URIResponse object that backs the download process. This method returns Nothing 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.

## getWebView

Instances

Arguments

 :: (HasCallStack, MonadIO m, IsDownload a) => a download: a Download -> m WebView Returns: the WebView that initiated download, or Nothing if download was not initiated by a WebView.

Get the WebView that initiated the download.

## setAllowOverwrite

Instances

Arguments

 :: (HasCallStack, MonadIO m, IsDownload a) => a download: a Download -> Bool allowed: the new value for the Download:allow-overwrite property -> m ()

Sets the Download: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.

Since: 2.6

## setDestination

Instances

Arguments

 :: (HasCallStack, MonadIO m, IsDownload a) => a download: a Download -> Text uri: the destination URI -> m ()

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 Download::decide-destination signal and call downloadSetDestination. 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 downloadSetDestination. If Download::decide-destination signal is not handled and destination URI is not set when the download tranfer starts, the file will be saved with the filename suggested by the server in UserDirectoryDirectoryDownload directory.

# Properties

## response

Instances

 Source # Associated Types Source # Source # type AttrLabel DownloadResponsePropertyInfo = "response" Source # Source # Source # Source #

# Signals

## failed

type C_DownloadFailedCallback = Ptr () -> Ptr GError -> Ptr () -> IO () Source #

Instances

 Source # Associated Types Methods Source #

## finished

Instances

 Source # Associated Types Methods Source #