_cef_drag_data_t

Struct _cef_drag_data_t 

Source
#[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_t

Base 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

Source§

fn clone(&self) -> _cef_drag_data_t

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for _cef_drag_data_t

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for _cef_drag_data_t

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.