webkit.color_chooser_request

Module for [ColorChooserRequest] class

Types 3

A request to open a color chooser.

Whenever the user interacts with an <input type='color' /> 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.

Methods
GType _getGType() static nothrow
GType _gType() @property nothrow
ColorChooserRequest self() nothrowReturns `this`, for use in `with` statements.
ColorChooserRequestGidBuilder builder() static nothrowGet builder for [webkit.color_chooser_request.ColorChooserRequest] Returns: New builder object
gdk.rgba.RGBA rgba() @property nothrowGet `rgba` property. Returns: The #GdkRGBA color of the request
void rgba(gdk.rgba.RGBA propval) @property nothrowSet `rgba` property. Params: propval = The #GdkRGBA color of the request
void cancel() nothrowCancels request and the input element changes to use the initial color.
void finish() nothrowFinishes request and the input element keeps the current value of #WebKitColorChooserRequest:rgba.
void getElementRectangle(out gdk.rectangle.Rectangle rect) nothrowGets the bounding box of the color input element.
void getRgba(out gdk.rgba.RGBA rgba) nothrowGets the current #GdkRGBA color of request
void setRgba(gdk.rgba.RGBA rgba) nothrowSets the current #GdkRGBA color of request
gulong connectFinished(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : webkit.color_chooser_request.ColorChooserRequest))) && Parameters!T.length < 2) nothrowConnect to `Finished` signal.
Constructors
this(void * ptr, Flag!"Take" take)

Fluent builder implementation template for webkit.color_chooser_request.ColorChooserRequest

Methods
T rgba(gdk.rgba.RGBA propval) nothrowSet `rgba` property. Params: propval = The #GdkRGBA color of the request Returns: Builder instance for fluent chaining