Top |
A WebKitPrintCustomWidget allows to embed a custom widget in the print
dialog by connecting to the “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.
WebKitPrintCustomWidget * webkit_print_custom_widget_new (GtkWidget *widget
,const char *title
);
Create a new WebKitPrintCustomWidget with given widget
and title
. The widget
ownership is taken and it is destroyed together with the dialog even if this
object could still be alive at that point. You typically want to pass a container
widget with multiple widgets in it.
Since: 2.16
GtkWidget *
webkit_print_custom_widget_get_widget (WebKitPrintCustomWidget *print_custom_widget
);
Return the value of “widget” property for the given
print_custom_widget
object. The returned value will always be valid if called
from “apply” or “update”
callbacks, but it will be NULL
if called after the
“apply” signal is emitted.
Since: 2.16
const gchar *
webkit_print_custom_widget_get_title (WebKitPrintCustomWidget *print_custom_widget
);
Return the value of “title” property for the given
print_custom_widget
object.
Since: 2.16
“title”
property“title” gchar *
The title of the custom widget.
Flags: Read / Write / Construct Only
Default value: NULL
Since: 2.16
“apply”
signalvoid user_function (WebKitPrintCustomWidget *print_custom_widget, gpointer user_data)
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.
print_custom_widget |
the WebKitPrintCustomWidget on which the signal was emitted |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
Since: 2.16
“update”
signalvoid user_function (WebKitPrintCustomWidget *print_custom_widget, GtkPageSetup *page_setup, GtkPrintSettings *print_settings, gpointer user_data)
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.
print_custom_widget |
the WebKitPrintCustomWidget on which the signal was emitted |
|
page_setup |
actual page setup |
|
print_settings |
actual print settings |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
Since: 2.16