WebKit.ColorChooserRequest¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/c |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Emitted when the request finishes. |
Fields¶
- Inherited:
Class Details¶
- class WebKit.ColorChooserRequest(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
A request to open a color chooser.
Whenever the user interacts with an HTML element, WebKit will need to show a dialog to choose a color. For that to happen in a general way, instead of just opening a
Gtk.ColorChooser
(which might be not desirable in some cases, which could prefer to use their own color chooser dialog), WebKit will fire theWebKit.WebView
::run-color-chooser
signal with aWebKit.ColorChooserRequest
object, which will allow the client application to specify the color to be selected, to inspect the details of the request (e.g. to get initial color) and to cancel the request, in case nothing was selected.In case the client application does not wish to handle this signal, WebKit will provide a default handler which will asynchronously run a regular
Gtk.ColorChooserDialog
for the user to interact with.- cancel()¶
Cancels self and the input element changes to use the initial color.
Cancels self and the input element changes to use the initial color it has before the request started. The signal
WebKit.ColorChooserRequest
::finished
is emitted to notify that the request has finished.New in version 2.8.
- finish()¶
Finishes self and the input element keeps the current value of
WebKit.ColorChooserRequest
:rgba
.Finishes self and the input element keeps the current value of
WebKit.ColorChooserRequest
:rgba
. The signalWebKit.ColorChooserRequest
::finished
is emitted to notify that the request has finished.New in version 2.8.
- get_element_rectangle()¶
- Returns:
a
Gdk.Rectangle
to fill in with the element area- Return type:
rect:
Gdk.Rectangle
Gets the bounding box of the color input element.
New in version 2.8.
Signal Details¶
- WebKit.ColorChooserRequest.signals.finished(color_chooser_request)¶
- Signal Name:
finished
- Flags:
- Parameters:
color_chooser_request (
WebKit.ColorChooserRequest
) – The object which received the signal
Emitted when the request finishes. This signal can be emitted because the user completed the request calling
WebKit.ColorChooserRequest.finish
(), or cancelled it withWebKit.ColorChooserRequest.cancel
() or because the color input element is removed from the DOM.New in version 2.8.