Class

WebKit2PrintCustomWidget

[]

Description [src]

class WebKit2.PrintCustomWidget : GObject.Object {
  parent: GObject
}

Allows to embed a custom widget in print dialog.

A WebKitPrintCustomWidget allows to embed a custom widget in the print dialog by connecting to the WebKitPrintOperation::create-custom-widget signal, creating a new WebKitPrintCustomWidget with webkit_print_custom_widget_new() and returning it from there. You can later use webkit_print_operation_run_dialog() to display the dialog.

Unfortunately, use of custom widgets is incompatible with modern containerized application frameworks like Flatpak. A print dialog constructed in the application process will not have access to host printers, so instead it must be constructed by a desktop portal service running on the host system. Because this print dialog runs in a separate process, it’s not possible to attach a custom widget.

Available since:2.16
Deprecated since:2.40

Please do not use it in newly written code.

[]

Hierarchy

hierarchy this WebKitPrintCustomWidget ancestor_0 GObject ancestor_0--this
[]

Ancestors

[]

Constructors

webkit_print_custom_widget_new

Create a new WebKitPrintCustomWidget with given widget and title.

Available since: 2.16

Deprecated since: 2.40

[]

Instance methods

webkit_print_custom_widget_get_title

Return the value of WebKitPrintCustomWidget:title property.

Available since: 2.16

Deprecated since: 2.40

webkit_print_custom_widget_get_widget

Return the value of WebKitPrintCustomWidget:widget property.

Available since: 2.16

Deprecated since: 2.40

Methods inherited from GObject (43)
[]

Properties

WebKit2.PrintCustomWidget:title

The title of the custom widget.

Available since: 2.16

Deprecated since: 2.40

WebKit2.PrintCustomWidget:widget

The custom GtkWidget that will be embedded in the dialog.

Available since: 2.16

Deprecated since: 2.40

[]

Signals

WebKit2.PrintCustomWidget::apply

Emitted right before the printing will start. You should read the information from the widget and update the content based on it if necessary. The widget is not guaranteed to be valid at a later time.

Available since: 2.16

Deprecated since: 2.40

WebKit2.PrintCustomWidget::update

Emitted after change of selected printer in the dialog. The actual page setup and print settings are available and the custom widget can actualize itself according to their values.

Available since: 2.16

Deprecated since: 2.40

Signals inherited from GObject (1)

Class structure

[]

Virtual methods

WebKit2.PrintCustomWidgetClass.apply
No description available.
WebKit2.PrintCustomWidgetClass.update
No description available.