cef_textfield_t

Type Alias cef_textfield_t 

Source
pub type cef_textfield_t = _cef_textfield_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.

Aliased Type§

#[repr(C)]
pub struct cef_textfield_t {
Show 32 fields pub base: _cef_view_t, pub set_password_input: Option<unsafe extern "C" fn(*mut _cef_textfield_t, i32)>, pub is_password_input: Option<unsafe extern "C" fn(*mut _cef_textfield_t) -> i32>, pub set_read_only: Option<unsafe extern "C" fn(*mut _cef_textfield_t, i32)>, pub is_read_only: Option<unsafe extern "C" fn(*mut _cef_textfield_t) -> i32>, pub get_text: Option<unsafe extern "C" fn(*mut _cef_textfield_t) -> *mut _cef_string_utf16_t>, pub set_text: Option<unsafe extern "C" fn(*mut _cef_textfield_t, *const _cef_string_utf16_t)>, pub append_text: Option<unsafe extern "C" fn(*mut _cef_textfield_t, *const _cef_string_utf16_t)>, pub insert_or_replace_text: Option<unsafe extern "C" fn(*mut _cef_textfield_t, *const _cef_string_utf16_t)>, pub has_selection: Option<unsafe extern "C" fn(*mut _cef_textfield_t) -> i32>, pub get_selected_text: Option<unsafe extern "C" fn(*mut _cef_textfield_t) -> *mut _cef_string_utf16_t>, pub select_all: Option<unsafe extern "C" fn(*mut _cef_textfield_t, i32)>, pub clear_selection: Option<unsafe extern "C" fn(*mut _cef_textfield_t)>, pub get_selected_range: Option<unsafe extern "C" fn(*mut _cef_textfield_t) -> _cef_range_t>, pub select_range: Option<unsafe extern "C" fn(*mut _cef_textfield_t, *const _cef_range_t)>, pub get_cursor_position: Option<unsafe extern "C" fn(*mut _cef_textfield_t) -> usize>, pub set_text_color: Option<unsafe extern "C" fn(*mut _cef_textfield_t, u32)>, pub get_text_color: Option<unsafe extern "C" fn(*mut _cef_textfield_t) -> u32>, pub set_selection_text_color: Option<unsafe extern "C" fn(*mut _cef_textfield_t, u32)>, pub get_selection_text_color: Option<unsafe extern "C" fn(*mut _cef_textfield_t) -> u32>, pub set_selection_background_color: Option<unsafe extern "C" fn(*mut _cef_textfield_t, u32)>, pub get_selection_background_color: Option<unsafe extern "C" fn(*mut _cef_textfield_t) -> u32>, pub set_font_list: Option<unsafe extern "C" fn(*mut _cef_textfield_t, *const _cef_string_utf16_t)>, pub apply_text_color: Option<unsafe extern "C" fn(*mut _cef_textfield_t, u32, *const _cef_range_t)>, pub apply_text_style: Option<unsafe extern "C" fn(*mut _cef_textfield_t, cef_text_style_t, i32, *const _cef_range_t)>, pub is_command_enabled: Option<unsafe extern "C" fn(*mut _cef_textfield_t, cef_text_field_commands_t) -> i32>, pub execute_command: Option<unsafe extern "C" fn(*mut _cef_textfield_t, cef_text_field_commands_t)>, pub clear_edit_history: Option<unsafe extern "C" fn(*mut _cef_textfield_t)>, pub set_placeholder_text: Option<unsafe extern "C" fn(*mut _cef_textfield_t, *const _cef_string_utf16_t)>, pub get_placeholder_text: Option<unsafe extern "C" fn(*mut _cef_textfield_t) -> *mut _cef_string_utf16_t>, pub set_placeholder_text_color: Option<unsafe extern "C" fn(*mut _cef_textfield_t, u32)>, pub set_accessible_name: Option<unsafe extern "C" fn(*mut _cef_textfield_t, *const _cef_string_utf16_t)>,
}

Fields§

§base: _cef_view_t

Base structure.

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

Sets whether the text will be displayed as asterisks.

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

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

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

Sets whether the text will read-only.

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

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

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

Returns the currently displayed text.

§set_text: Option<unsafe extern "C" fn(*mut _cef_textfield_t, *const _cef_string_utf16_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(*mut _cef_textfield_t, *const _cef_string_utf16_t)>

Appends |text| to the previously-existing text.

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

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

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

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

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

Returns the currently selected text.

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

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(*mut _cef_textfield_t)>

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

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

Returns the selected logical text range.

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

Selects the specified logical text range.

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

Returns the current cursor position.

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

Sets the text color.

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

Returns the text color.

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

Sets the selection text color.

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

Returns the selection text color.

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

Sets the selection background color.

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

Returns the selection background color.

§set_font_list: Option<unsafe extern "C" fn(*mut _cef_textfield_t, *const _cef_string_utf16_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(*mut _cef_textfield_t, u32, *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(*mut _cef_textfield_t, cef_text_style_t, i32, *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(*mut _cef_textfield_t, cef_text_field_commands_t) -> i32>

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(*mut _cef_textfield_t, cef_text_field_commands_t)>

Performs the action associated with the specified command id.

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

Clears Edit history.

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

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

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

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

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

Sets the placeholder text color.

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

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