#[repr(C)]pub struct _cef_drag_data_t {Show 28 fields
pub base: cef_base_ref_counted_t,
pub clone: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t) -> *mut _cef_drag_data_t>,
pub is_read_only: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t) -> c_int>,
pub is_link: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t) -> c_int>,
pub is_fragment: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t) -> c_int>,
pub is_file: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t) -> c_int>,
pub get_link_url: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t) -> cef_string_userfree_t>,
pub get_link_title: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t) -> cef_string_userfree_t>,
pub get_link_metadata: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t) -> cef_string_userfree_t>,
pub get_fragment_text: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t) -> cef_string_userfree_t>,
pub get_fragment_html: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t) -> cef_string_userfree_t>,
pub get_fragment_base_url: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t) -> cef_string_userfree_t>,
pub get_file_name: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t) -> cef_string_userfree_t>,
pub get_file_contents: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t, writer: *mut _cef_stream_writer_t) -> usize>,
pub get_file_names: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t, names: cef_string_list_t) -> c_int>,
pub get_file_paths: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t, paths: cef_string_list_t) -> c_int>,
pub set_link_url: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t, url: *const cef_string_t)>,
pub set_link_title: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t, title: *const cef_string_t)>,
pub set_link_metadata: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t, data: *const cef_string_t)>,
pub set_fragment_text: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t, text: *const cef_string_t)>,
pub set_fragment_html: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t, html: *const cef_string_t)>,
pub set_fragment_base_url: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t, base_url: *const cef_string_t)>,
pub reset_file_contents: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t)>,
pub add_file: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t, path: *const cef_string_t, display_name: *const cef_string_t)>,
pub clear_filenames: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t)>,
pub get_image: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t) -> *mut _cef_image_t>,
pub get_image_hotspot: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t) -> cef_point_t>,
pub has_image: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t) -> c_int>,
}Expand description
Structure used to represent drag data. The functions of this structure may be called on any thread.
NOTE: This struct is allocated DLL-side.
Fields§
§base: cef_base_ref_counted_tBase structure.
clone: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t) -> *mut _cef_drag_data_t>Returns a copy of the current object.
is_read_only: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t) -> c_int>Returns true (1) if this object is read-only.
is_link: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t) -> c_int>Returns true (1) if the drag data is a link.
is_fragment: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t) -> c_int>Returns true (1) if the drag data is a text or html fragment.
is_file: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t) -> c_int>Returns true (1) if the drag data is a file.
get_link_url: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t) -> cef_string_userfree_t>Return the link URL that is being dragged.
get_link_title: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t) -> cef_string_userfree_t>Return the title associated with the link being dragged.
get_link_metadata: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t) -> cef_string_userfree_t>Return the metadata, if any, associated with the link being dragged.
get_fragment_text: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t) -> cef_string_userfree_t>Return the plain text fragment that is being dragged.
get_fragment_html: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t) -> cef_string_userfree_t>Return the text/html fragment that is being dragged.
get_fragment_base_url: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t) -> cef_string_userfree_t>Return the base URL that the fragment came from. This value is used for resolving relative URLs and may be NULL.
get_file_name: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t) -> cef_string_userfree_t>Return the name of the file being dragged out of the browser window.
get_file_contents: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t, writer: *mut _cef_stream_writer_t) -> usize>Write the contents of the file being dragged out of the web view into |writer|. Returns the number of bytes sent to |writer|. If |writer| is NULL this function will return the size of the file contents in bytes. Call get_file_name() to get a suggested name for the file.
get_file_names: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t, names: cef_string_list_t) -> c_int>Retrieve the list of file names that are being dragged into the browser window.
get_file_paths: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t, paths: cef_string_list_t) -> c_int>Retrieve the list of file paths that are being dragged into the browser window.
set_link_url: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t, url: *const cef_string_t)>Set the link URL that is being dragged.
set_link_title: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t, title: *const cef_string_t)>Set the title associated with the link being dragged.
set_link_metadata: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t, data: *const cef_string_t)>Set the metadata associated with the link being dragged.
set_fragment_text: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t, text: *const cef_string_t)>Set the plain text fragment that is being dragged.
set_fragment_html: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t, html: *const cef_string_t)>Set the text/html fragment that is being dragged.
set_fragment_base_url: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t, base_url: *const cef_string_t)>Set the base URL that the fragment came from.
reset_file_contents: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t)>Reset the file contents. You should do this before calling cef_browser_host_t::DragTargetDragEnter as the web view does not allow us to drag in this kind of data.
add_file: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t, path: *const cef_string_t, display_name: *const cef_string_t)>Add a file that is being dragged into the webview.
clear_filenames: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t)>Clear list of filenames.
get_image: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t) -> *mut _cef_image_t>Get the image representation of drag data. May return NULL if no image representation is available.
get_image_hotspot: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t) -> cef_point_t>Get the image hotspot (drag start location relative to image dimensions).
has_image: Option<unsafe extern "C" fn(self_: *mut _cef_drag_data_t) -> c_int>Returns true (1) if an image representation of drag data is available.
Trait Implementations§
Source§impl Clone for _cef_drag_data_t
impl Clone for _cef_drag_data_t
Source§fn clone(&self) -> _cef_drag_data_t
fn clone(&self) -> _cef_drag_data_t
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more