Interface

WebKit-6.0WebKitDownloadSignalSignatures

interface SignalSignatures {
    "created-destination": (arg0: string) => void;
    "decide-destination": (arg0: string) => boolean | void;
    failed: (arg0: GLib.Error) => void;
    finished: () => void;
    notify: (arg0: GObject.ParamSpec) => void;
    "notify::allow-overwrite": (pspec: GObject.ParamSpec) => void;
    "notify::destination": (pspec: GObject.ParamSpec) => void;
    "notify::estimated-progress": (pspec: GObject.ParamSpec) => void;
    "notify::response": (pspec: GObject.ParamSpec) => void;
    "received-data": (arg0: number) => void;
}

Hierarchy (View Summary)

Index

Properties

"created-destination": (arg0: string) => void

This signal is emitted after WebKit.Download.SignalSignatures.decide_destination | WebKit.Download::decide-destination and before WebKit.Download.SignalSignatures.received_data | WebKit.Download::received-data to notify that destination file has been created successfully at destination.

"decide-destination": (arg0: string) => boolean | void

This signal is emitted after response is received to decide a destination for the download using webkit_download_set_destination(). If this signal is not handled, the file will be downloaded to GLib.UserDirectory.DIRECTORY_DOWNLOAD directory using suggested_filename.

Since 2.40, you may handle this signal asynchronously by returning true without calling webkit_download_set_destination(). This indicates intent to eventually call webkit_download_set_destination(). In this case, the download will not proceed until the destination is set or cancelled with webkit_download_cancel().

failed: (arg0: GLib.Error) => void

This signal is emitted when an error occurs during the download operation. The given error, of the domain WEBKIT_DOWNLOAD_ERROR, contains further details of the failure. If the download is cancelled with webkit_download_cancel(), this signal is emitted with error WebKit.DownloadError.CANCELLED_BY_USER. The download operation finishes after an error and WebKit.Download::finished signal is emitted after this one.

finished: () => void

This signal is emitted when download finishes successfully or due to an error. In case of errors WebKit.Download::failed signal is emitted before this one.

"notify::allow-overwrite": (pspec: GObject.ParamSpec) => void
"notify::destination": (pspec: GObject.ParamSpec) => void
"notify::estimated-progress": (pspec: GObject.ParamSpec) => void
"notify::response": (pspec: GObject.ParamSpec) => void
"received-data": (arg0: number) => void

This signal is emitted after response is received, every time new data has been written to the destination. It's useful to know the progress of the download operation.

Properties - Inherited from GObject

notify: (arg0: GObject.ParamSpec) => void

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with GObject.ParamFlags.EXPLICIT_NOTIFY, then any call to g_object_set_property() results in ::notify being emitted, even if the new value is the same as the old. If they did pass GObject.ParamFlags.EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.

This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the g_signal_connect() call, like this:

g_signal_connect (text_view->buffer, "notify::paste-target-list",
G_CALLBACK (gtk_text_view_target_list_notify),
text_view)

It is important to note that you must use [canonical parameter names][class@GObject.ParamSpec#parameter-names] as detail strings for the notify signal.