#[repr(C)]pub struct _cef_print_handler_t {
pub base: cef_base_ref_counted_t,
pub on_print_start: Option<unsafe extern "C" fn(self_: *mut _cef_print_handler_t, browser: *mut _cef_browser_t)>,
pub on_print_settings: Option<unsafe extern "C" fn(self_: *mut _cef_print_handler_t, browser: *mut _cef_browser_t, settings: *mut _cef_print_settings_t, get_defaults: c_int)>,
pub on_print_dialog: Option<unsafe extern "C" fn(self_: *mut _cef_print_handler_t, browser: *mut _cef_browser_t, has_selection: c_int, callback: *mut _cef_print_dialog_callback_t) -> c_int>,
pub on_print_job: Option<unsafe extern "C" fn(self_: *mut _cef_print_handler_t, browser: *mut _cef_browser_t, document_name: *const cef_string_t, pdf_file_path: *const cef_string_t, callback: *mut _cef_print_job_callback_t) -> c_int>,
pub on_print_reset: Option<unsafe extern "C" fn(self_: *mut _cef_print_handler_t, browser: *mut _cef_browser_t)>,
pub get_pdf_paper_size: Option<unsafe extern "C" fn(self_: *mut _cef_print_handler_t, browser: *mut _cef_browser_t, device_units_per_inch: c_int) -> cef_size_t>,
}Expand description
Implement this structure to handle printing on Linux. Each browser will have only one print job in progress at a time. The functions of this structure will be called on the browser process UI thread.
NOTE: This struct is allocated client-side.
Fields§
§base: cef_base_ref_counted_tBase structure.
on_print_start: Option<unsafe extern "C" fn(self_: *mut _cef_print_handler_t, browser: *mut _cef_browser_t)>Called when printing has started for the specified |browser|. This function will be called before the other OnPrint*() functions and irrespective of how printing was initiated (e.g. cef_browser_host_t::print(), JavaScript window.print() or PDF extension print button).
on_print_settings: Option<unsafe extern "C" fn(self_: *mut _cef_print_handler_t, browser: *mut _cef_browser_t, settings: *mut _cef_print_settings_t, get_defaults: c_int)>Synchronize |settings| with client state. If |get_defaults| is true (1) then populate |settings| with the default print settings. Do not keep a reference to |settings| outside of this callback.
on_print_dialog: Option<unsafe extern "C" fn(self_: *mut _cef_print_handler_t, browser: *mut _cef_browser_t, has_selection: c_int, callback: *mut _cef_print_dialog_callback_t) -> c_int>Show the print dialog. Execute |callback| once the dialog is dismissed. Return true (1) if the dialog will be displayed or false (0) to cancel the printing immediately.
on_print_job: Option<unsafe extern "C" fn(self_: *mut _cef_print_handler_t, browser: *mut _cef_browser_t, document_name: *const cef_string_t, pdf_file_path: *const cef_string_t, callback: *mut _cef_print_job_callback_t) -> c_int>Send the print job to the printer. Execute |callback| once the job is completed. Return true (1) if the job will proceed or false (0) to cancel the job immediately.
on_print_reset: Option<unsafe extern "C" fn(self_: *mut _cef_print_handler_t, browser: *mut _cef_browser_t)>Reset client state related to printing.
get_pdf_paper_size: Option<unsafe extern "C" fn(self_: *mut _cef_print_handler_t, browser: *mut _cef_browser_t, device_units_per_inch: c_int) -> cef_size_t>Return the PDF paper size in device units. Used in combination with cef_browser_host_t::print_to_pdf().
Trait Implementations§
Source§impl Clone for _cef_print_handler_t
impl Clone for _cef_print_handler_t
Source§fn clone(&self) -> _cef_print_handler_t
fn clone(&self) -> _cef_print_handler_t
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more