cef_command_line_t

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.

version(cef && embedded_cef_bindings)
extern (C)
struct cef_command_line_t {}

Members

Variables

append_argument
void function(cef_command_line_t* self, const(cef_string_t)* argument) nothrow append_argument;

Add an argument to the end of the command line.

append_switch
void function(cef_command_line_t* self, const(cef_string_t)* name) nothrow append_switch;

Add a switch to the end of the command line.

append_switch_with_value
void function(cef_command_line_t* self, const(cef_string_t)* name, const(cef_string_t)* value) nothrow append_switch_with_value;

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.

base
cef_base_ref_counted_t base;

Base structure.

copy
cef_command_line_t* function(cef_command_line_t* self) nothrow copy;

Returns a writable copy of this object.

get_arguments
void function(cef_command_line_t* self, cef_string_list_t arguments) nothrow get_arguments;

Get the remaining command line arguments.

get_argv
void function(cef_command_line_t* self, cef_string_list_t argv) nothrow get_argv;

Retrieve the original command line string as a vector of strings. The argv array: { program, [(--|-|/)switch[=value]]*, [--], [argument]* }

get_command_line_string
cef_string_userfree_t function(cef_command_line_t* self) nothrow get_command_line_string;

Constructs and returns the represented command line string. Use this function cautiously because quoting behavior is unclear.

get_program
cef_string_userfree_t function(cef_command_line_t* self) nothrow get_program;

Get the program part of the command line string (the first item).

get_switch_value
cef_string_userfree_t function(cef_command_line_t* self, const(cef_string_t)* name) nothrow get_switch_value;

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
void function(cef_command_line_t* self, cef_string_map_t switches) nothrow get_switches;

Returns the map of switch names and values. If a switch has no value an NULL string is returned.

has_arguments
int function(cef_command_line_t* self) nothrow has_arguments;

True if there are remaining command line arguments.

has_switch
int function(cef_command_line_t* self, const(cef_string_t)* name) nothrow has_switch;

Returns true (1) if the command line contains the given switch.

has_switches
int function(cef_command_line_t* self) nothrow has_switches;

Returns true (1) if the command line has switches.

init_from_argv
void function(cef_command_line_t* self, int argc, const(char*)* argv) nothrow init_from_argv;

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
void function(cef_command_line_t* self, const(cef_string_t)* command_line) nothrow init_from_string;

Initialize the command line with the string returned by calling GetCommandLineW(). This function is only supported on Windows.

is_read_only
int function(cef_command_line_t* self) nothrow is_read_only;

Returns true (1) if the values of this object are read-only. Some APIs may expose read-only objects.

is_valid
int function(cef_command_line_t* self) nothrow is_valid;
prepend_wrapper
void function(cef_command_line_t* self, const(cef_string_t)* wrapper) nothrow prepend_wrapper;

Insert a command before the current command. Common for debuggers, like "valgrind" or "gdb --args".

reset
void function(cef_command_line_t* self) nothrow reset;

Reset the command-line switches and arguments but leave the program component unchanged.

set_program
void function(cef_command_line_t* self, const(cef_string_t)* program) nothrow set_program;

Set the program part of the command line string (the first item).

Meta