WebKit2.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:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class WebKit2.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 theWebKit2.WebView
::run-color-chooser
signal with aWebKit2.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
WebKit2.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
WebKit2.ColorChooserRequest
:rgba
.Finishes self and the input element keeps the current value of
WebKit2.ColorChooserRequest
:rgba
. The signalWebKit2.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¶
- WebKit2.ColorChooserRequest.signals.finished(color_chooser_request)¶
- Signal Name:
finished
- Flags:
- Parameters:
color_chooser_request (
WebKit2.ColorChooserRequest
) – The object which received the signal
Emitted when the request finishes. This signal can be emitted because the user completed the request calling
WebKit2.ColorChooserRequest.finish
(), or cancelled it withWebKit2.ColorChooserRequest.cancel
() or because the color input element is removed from the DOM.New in version 2.8.