#[repr(C)]pub struct _cef_command_line_t {Show 22 fields
pub base: cef_base_ref_counted_t,
pub is_valid: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t) -> c_int>,
pub is_read_only: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t) -> c_int>,
pub copy: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t) -> *mut _cef_command_line_t>,
pub init_from_argv: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t, argc: c_int, argv: *const *const c_char)>,
pub init_from_string: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t, command_line: *const cef_string_t)>,
pub reset: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t)>,
pub get_argv: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t, argv: cef_string_list_t)>,
pub get_command_line_string: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t) -> cef_string_userfree_t>,
pub get_program: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t) -> cef_string_userfree_t>,
pub set_program: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t, program: *const cef_string_t)>,
pub has_switches: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t) -> c_int>,
pub has_switch: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t, name: *const cef_string_t) -> c_int>,
pub get_switch_value: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t, name: *const cef_string_t) -> cef_string_userfree_t>,
pub get_switches: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t, switches: cef_string_map_t)>,
pub append_switch: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t, name: *const cef_string_t)>,
pub append_switch_with_value: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t, name: *const cef_string_t, value: *const cef_string_t)>,
pub has_arguments: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t) -> c_int>,
pub get_arguments: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t, arguments: cef_string_list_t)>,
pub append_argument: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t, argument: *const cef_string_t)>,
pub prepend_wrapper: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t, wrapper: *const cef_string_t)>,
pub remove_switch: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t, name: *const cef_string_t)>,
}Expand description
Structure used to create and/or parse command line arguments. Arguments with “–”, “-” and, on Windows, “/” prefixes are considered switches. Switches will always precede any arguments without switch prefixes. Switches can optionally have a value specified using the “=” delimiter (e.g. “-switch=value”). An argument of “–” will terminate switch parsing with all subsequent tokens, regardless of prefix, being interpreted as non-switch arguments. Switch names should be lowercase ASCII and will be converted to such if necessary. Switch values will retain the original case and UTF8 encoding. This structure can be used before cef_initialize() is called.
NOTE: This struct is allocated DLL-side.
Fields§
§base: cef_base_ref_counted_tBase structure.
is_valid: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t) -> c_int>Returns true (1) if this object is valid. Do not call any other functions if this function returns false (0).
is_read_only: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t) -> c_int>Returns true (1) if the values of this object are read-only. Some APIs may expose read-only objects.
copy: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t) -> *mut _cef_command_line_t>Returns a writable copy of this object.
init_from_argv: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t, argc: c_int, argv: *const *const c_char)>Initialize the command line with the specified |argc| and |argv| values. The first argument must be the name of the program. This function is only supported on non-Windows platforms.
init_from_string: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t, command_line: *const cef_string_t)>Initialize the command line with the string returned by calling GetCommandLineW(). This function is only supported on Windows.
reset: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t)>Reset the command-line switches and arguments but leave the program component unchanged.
get_argv: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t, argv: cef_string_list_t)>Retrieve the original command line string as a vector of strings. The argv
array: { program, [(--|-|/)switch[=value]]*, [--], [argument]* }
get_command_line_string: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t) -> cef_string_userfree_t>Constructs and returns the represented command line string. Use this function cautiously because quoting behavior is unclear.
get_program: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t) -> cef_string_userfree_t>Get the program part of the command line string (the first item).
set_program: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t, program: *const cef_string_t)>Set the program part of the command line string (the first item).
has_switches: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t) -> c_int>Returns true (1) if the command line has switches.
has_switch: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t, name: *const cef_string_t) -> c_int>Returns true (1) if the command line contains the given switch.
get_switch_value: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t, name: *const cef_string_t) -> cef_string_userfree_t>Returns the value associated with the given switch. If the switch has no value or isn’t present this function returns the NULL string.
get_switches: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t, switches: cef_string_map_t)>Returns the map of switch names and values. If a switch has no value an NULL string is returned.
append_switch: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t, name: *const cef_string_t)>Add a switch to the end of the command line.
append_switch_with_value: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t, name: *const cef_string_t, value: *const cef_string_t)>Add a switch with the specified value to the end of the command line. If the switch has no value pass an NULL value string.
has_arguments: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t) -> c_int>True if there are remaining command line arguments.
get_arguments: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t, arguments: cef_string_list_t)>Get the remaining command line arguments.
append_argument: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t, argument: *const cef_string_t)>Add an argument to the end of the command line.
prepend_wrapper: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t, wrapper: *const cef_string_t)>Insert a command before the current command. Common for debuggers, like “valgrind” or “gdb –args”.
remove_switch: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t, name: *const cef_string_t)>Remove a switch from the command line. If no such switch is present, this has no effect.
Trait Implementations§
Source§impl Clone for _cef_command_line_t
impl Clone for _cef_command_line_t
Source§fn clone(&self) -> _cef_command_line_t
fn clone(&self) -> _cef_command_line_t
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more