#[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_tBase 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]
- 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
impl Clone for _cef_textfield_t
Source§fn clone(&self) -> _cef_textfield_t
fn clone(&self) -> _cef_textfield_t
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more