#[repr(C)]pub struct _cef_dialog_handler_t {
pub base: cef_base_ref_counted_t,
pub on_file_dialog: Option<unsafe extern "C" fn(self_: *mut _cef_dialog_handler_t, browser: *mut _cef_browser_t, mode: cef_file_dialog_mode_t, title: *const cef_string_t, default_file_path: *const cef_string_t, accept_filters: cef_string_list_t, callback: *mut _cef_file_dialog_callback_t) -> c_int>,
}Expand description
Implement this structure to handle dialog events. The functions of this structure will be called on the browser process UI thread.
Fields§
§base: cef_base_ref_counted_tBase structure.
on_file_dialog: Option<unsafe extern "C" fn(self_: *mut _cef_dialog_handler_t, browser: *mut _cef_browser_t, mode: cef_file_dialog_mode_t, title: *const cef_string_t, default_file_path: *const cef_string_t, accept_filters: cef_string_list_t, callback: *mut _cef_file_dialog_callback_t) -> c_int>Called to run a file chooser dialog. |mode| represents the type of dialog to display. |title| to the title to be used for the dialog and may be NULL to show the default title (“Open” or “Save” depending on the mode). |default_file_path| is the path with optional directory and/or file name component that should be initially selected in the dialog. |accept_filters| are used to restrict the selectable file types and may any combination of (a) valid lower-cased MIME types (e.g. “text/” or “image/”), (b) individual file extensions (e.g. “.txt” or “.png”), or (c) combined description and file extension delimited using “|” and “;” (e.g. “Image Types|.png;.gif;.jpg”). To display a custom dialog return true (1) and execute |callback| either inline or at a later time. To display the default dialog return false (0).
Trait Implementations§
Source§impl Clone for _cef_dialog_handler_t
impl Clone for _cef_dialog_handler_t
Source§fn clone(&self) -> _cef_dialog_handler_t
fn clone(&self) -> _cef_dialog_handler_t
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more