_cef_textfield_t

Struct _cef_textfield_t 

Source
#[repr(C)]
pub struct _cef_textfield_t {
Show 32 fields pub base: cef_view_t, pub set_password_input: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t, password_input: c_int)>, pub is_password_input: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t) -> c_int>, pub set_read_only: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t, read_only: c_int)>, pub is_read_only: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t) -> c_int>, pub get_text: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t) -> cef_string_userfree_t>, pub set_text: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t, text: *const cef_string_t)>, pub append_text: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t, text: *const cef_string_t)>, pub insert_or_replace_text: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t, text: *const cef_string_t)>, pub has_selection: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t) -> c_int>, pub get_selected_text: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t) -> cef_string_userfree_t>, pub select_all: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t, reversed: c_int)>, pub clear_selection: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t)>, pub get_selected_range: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t) -> cef_range_t>, pub select_range: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t, range: *const cef_range_t)>, pub get_cursor_position: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t) -> usize>, pub set_text_color: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t, color: cef_color_t)>, pub get_text_color: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t) -> cef_color_t>, pub set_selection_text_color: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t, color: cef_color_t)>, pub get_selection_text_color: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t) -> cef_color_t>, pub set_selection_background_color: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t, color: cef_color_t)>, pub get_selection_background_color: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t) -> cef_color_t>, pub set_font_list: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t, font_list: *const cef_string_t)>, pub apply_text_color: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t, color: cef_color_t, range: *const cef_range_t)>, pub apply_text_style: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t, style: cef_text_style_t, add: c_int, range: *const cef_range_t)>, pub is_command_enabled: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t, command_id: cef_text_field_commands_t) -> c_int>, pub execute_command: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t, command_id: cef_text_field_commands_t)>, pub clear_edit_history: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t)>, pub set_placeholder_text: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t, text: *const cef_string_t)>, pub get_placeholder_text: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t) -> cef_string_userfree_t>, pub set_placeholder_text_color: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t, color: cef_color_t)>, pub set_accessible_name: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t, name: *const cef_string_t)>,
}
Expand description

A Textfield supports editing of text. This control is custom rendered with no platform-specific code. Methods must be called on the browser process UI thread unless otherwise indicated.

NOTE: This struct is allocated DLL-side.

Fields§

§base: cef_view_t

Base structure.

§set_password_input: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t, password_input: c_int)>

Sets whether the text will be displayed as asterisks.

§is_password_input: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t) -> c_int>

Returns true (1) if the text will be displayed as asterisks.

§set_read_only: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t, read_only: c_int)>

Sets whether the text will read-only.

§is_read_only: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t) -> c_int>

Returns true (1) if the text is read-only.

§get_text: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t) -> cef_string_userfree_t>

Returns the currently displayed text.

§set_text: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t, text: *const cef_string_t)>

Sets the contents to |text|. The cursor will be moved to end of the text if the current position is outside of the text range.

§append_text: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t, text: *const cef_string_t)>

Appends |text| to the previously-existing text.

§insert_or_replace_text: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t, text: *const cef_string_t)>

Inserts |text| at the current cursor position replacing any selected text.

§has_selection: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t) -> c_int>

Returns true (1) if there is any selected text.

§get_selected_text: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t) -> cef_string_userfree_t>

Returns the currently selected text.

§select_all: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t, reversed: c_int)>

Selects all text. If |reversed| is true (1) the range will end at the logical beginning of the text; this generally shows the leading portion of text that overflows its display area.

§clear_selection: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t)>

Clears the text selection and sets the caret to the end.

§get_selected_range: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t) -> cef_range_t>

Returns the selected logical text range.

§select_range: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t, range: *const cef_range_t)>

Selects the specified logical text range.

§get_cursor_position: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t) -> usize>

Returns the current cursor position.

§set_text_color: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t, color: cef_color_t)>

Sets the text color.

§get_text_color: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t) -> cef_color_t>

Returns the text color.

§set_selection_text_color: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t, color: cef_color_t)>

Sets the selection text color.

§get_selection_text_color: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t) -> cef_color_t>

Returns the selection text color.

§set_selection_background_color: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t, color: cef_color_t)>

Sets the selection background color.

§get_selection_background_color: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t) -> cef_color_t>

Returns the selection background color.

§set_font_list: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t, font_list: *const cef_string_t)>

Sets the font list. The format is “<FONT_FAMILY_LIST>,[STYLES] ”, where:

  • FONT_FAMILY_LIST is a comma-separated list of font family names,
  • STYLES is an optional space-separated list of style names (case- sensitive “Bold” and “Italic” are supported), and
  • SIZE is an integer font size in pixels with the suffix “px”.

Here are examples of valid font description strings:

  • “Arial, Helvetica, Bold Italic 14px”
  • “Arial, 14px”
§apply_text_color: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t, color: cef_color_t, range: *const cef_range_t)>

Applies |color| to the specified |range| without changing the default color. If |range| is NULL the color will be set on the complete text contents.

§apply_text_style: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t, style: cef_text_style_t, add: c_int, range: *const cef_range_t)>

Applies |style| to the specified |range| without changing the default style. If |add| is true (1) the style will be added, otherwise the style will be removed. If |range| is NULL the style will be set on the complete text contents.

§is_command_enabled: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t, command_id: cef_text_field_commands_t) -> c_int>

Returns true (1) if the action associated with the specified command id is enabled. See additional comments on execute_command().

§execute_command: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t, command_id: cef_text_field_commands_t)>

Performs the action associated with the specified command id.

§clear_edit_history: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t)>

Clears Edit history.

§set_placeholder_text: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t, text: *const cef_string_t)>

Sets the placeholder text that will be displayed when the Textfield is NULL.

§get_placeholder_text: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t) -> cef_string_userfree_t>

Returns the placeholder text that will be displayed when the Textfield is NULL.

§set_placeholder_text_color: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t, color: cef_color_t)>

Sets the placeholder text color.

§set_accessible_name: Option<unsafe extern "C" fn(self_: *mut _cef_textfield_t, name: *const cef_string_t)>

Set the accessible name that will be exposed to assistive technology (AT).

Trait Implementations§

Source§

impl Clone for _cef_textfield_t

Source§

fn clone(&self) -> _cef_textfield_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_textfield_t

Source§

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

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

impl Copy for _cef_textfield_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.