WebKit2GTK+ Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties | Signals |
WebKitPrintOperation; enum WebKitPrintOperationResponse; WebKitPrintOperation * webkit_print_operation_new (WebKitWebView *web_view
); GtkPrintSettings * webkit_print_operation_get_print_settings (WebKitPrintOperation *print_operation
); void webkit_print_operation_set_print_settings (WebKitPrintOperation *print_operation
,GtkPrintSettings *print_settings
); GtkPageSetup * webkit_print_operation_get_page_setup (WebKitPrintOperation *print_operation
); void webkit_print_operation_set_page_setup (WebKitPrintOperation *print_operation
,GtkPageSetup *page_setup
); WebKitPrintOperationResponse webkit_print_operation_run_dialog (WebKitPrintOperation *print_operation
,GtkWindow *parent
); void webkit_print_operation_print (WebKitPrintOperation *print_operation
);
"page-setup" GtkPageSetup* : Read / Write "print-settings" GtkPrintSettings* : Read / Write "web-view" WebKitWebView* : Read / Write / Construct Only
typedef enum { WEBKIT_PRINT_OPERATION_RESPONSE_PRINT, WEBKIT_PRINT_OPERATION_RESPONSE_CANCEL } WebKitPrintOperationResponse;
Enum values representing the response of the print dialog shown with
webkit_print_operation_run_dialog()
.
WebKitPrintOperation * webkit_print_operation_new (WebKitWebView *web_view
);
Create a new WebKitPrintOperation to print web_view
contents.
|
a WebKitWebView |
Returns : |
a new WebKitPrintOperation. [transfer full] |
GtkPrintSettings * webkit_print_operation_get_print_settings
(WebKitPrintOperation *print_operation
);
Return the current print settings of print_operation
. It returns NULL
until
either webkit_print_operation_set_print_settings()
or webkit_print_operation_run_dialog()
have been called.
|
a WebKitPrintOperation |
Returns : |
the current GtkPrintSettings of print_operation . [transfer none]
|
void webkit_print_operation_set_print_settings (WebKitPrintOperation *print_operation
,GtkPrintSettings *print_settings
);
Set the current print settings of print_operation
. Current print settings are used for
the initial values of the print dialog when webkit_print_operation_run_dialog()
is called.
|
a WebKitPrintOperation |
|
a GtkPrintSettings to set |
GtkPageSetup * webkit_print_operation_get_page_setup
(WebKitPrintOperation *print_operation
);
Return the current page setup of print_operation
. It returns NULL
until
either webkit_print_operation_set_print_settings()
or webkit_print_operation_run_dialog()
have been called.
|
a WebKitPrintOperation |
Returns : |
the current GtkPageSetup of print_operation . [transfer none]
|
void webkit_print_operation_set_page_setup (WebKitPrintOperation *print_operation
,GtkPageSetup *page_setup
);
Set the current page setup of print_operation
. Current page setup is used for the
initial values of the print dialog when webkit_print_operation_run_dialog()
is called.
|
a WebKitPrintOperation |
|
a GtkPageSetup to set |
WebKitPrintOperationResponse webkit_print_operation_run_dialog (WebKitPrintOperation *print_operation
,GtkWindow *parent
);
Run the print dialog and start printing using the options selected by
the user. This method returns when the print dialog is closed.
If the print dialog is cancelled WEBKIT_PRINT_OPERATION_RESPONSE_CANCEL
is returned. If the user clicks on the print button, WEBKIT_PRINT_OPERATION_RESPONSE_PRINT
is returned and the print operation starts. In this case, the "finished"
signal is emitted when the operation finishes.
If the print dialog is not cancelled current print settings and page setup of print_operation
are updated with options selected by the user when Print button is pressed in print dialog.
You can get the updated print settings and page setup by calling
webkit_print_operation_get_print_settings()
and webkit_print_operation_get_page_setup()
after this method.
|
a WebKitPrintOperation |
|
transient parent of the print dialog. [allow-none] |
Returns : |
the WebKitPrintOperationResponse of the print dialog |
void webkit_print_operation_print (WebKitPrintOperation *print_operation
);
Start a print operation using current print settings and page setup
without showing the print dialog. If either print settings or page setup
are not set with webkit_print_operation_set_print_settings()
and
webkit_print_operation_set_page_setup()
, the default options will be used
and the print job will be sent to the default printer.
The "finished" signal is emitted when the printing
operation finishes.
|
a WebKitPrintOperation |
"page-setup"
property"page-setup" GtkPageSetup* : Read / Write
The initial GtkPageSetup for the print operation.
"print-settings"
property"print-settings" GtkPrintSettings* : Read / Write
The initial GtkPrintSettings for the print operation.
"web-view"
property"web-view" WebKitWebView* : Read / Write / Construct Only
The WebKitWebView that will be printed.
"finished"
signalvoid user_function (WebKitPrintOperation *print_operation,
gpointer user_data) : Run Last
Emitted when the print operation has finished doing everything required for printing.
|
the WebKitPrintOperation on which the signal was emitted |
|
user data set when the signal handler was connected. |