ColorChooserRequest

class ColorChooserRequest(pointer: <Error class: unknown class><<Error class: unknown class>>)

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 #GtkColorChooser (which might be not desirable in some cases, which could prefer to use their own color chooser dialog), WebKit will fire the #WebKitWebView::run-color-chooser signal with a #WebKitColorChooserRequest 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 #GtkColorChooserDialog for the user to interact with.

Skipped during bindings generation

  • method rgba: Property has no getter

Constructors

Link copied to clipboard
constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val webkitColorChooserRequestPointer: <Error class: unknown class><<Error class: unknown class>>

Functions

Link copied to clipboard
fun cancel()

Cancels @request and the input element changes to use the initial color.

Link copied to clipboard
fun connectFinished(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: () -> Unit): <Error class: unknown class>

Emitted when the @request finishes. This signal can be emitted because the user completed the @request calling webkit_color_chooser_request_finish(), or cancelled it with webkit_color_chooser_request_cancel() or because the color input element is removed from the DOM.

Link copied to clipboard
fun finish()

Finishes @request and the input element keeps the current value of #WebKitColorChooserRequest:rgba.

Link copied to clipboard
fun getElementRectangle(rect: <Error class: unknown class>)

Gets the bounding box of the color input element.

Link copied to clipboard
fun getRgba(rgba: <Error class: unknown class>)

Gets the current #GdkRGBA color of @request

Link copied to clipboard
fun setRgba(rgba: <Error class: unknown class>)

Sets the current #GdkRGBA color of @request