Interface ICefCommandLine

Description
Hierarchy
Fields
Methods
Properties

Unit

Declaration

type ICefCommandLine = interface(ICefBaseRefCounted)

Description

Interface 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 interface can be used before cef_initialize() is called.

UNKNOWN

<see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/capi/cef_command_line_capi.h">CEF source file: /include/capi/cef_command_line_capi.h (cef_command_line_t))

Hierarchy

Overview

Methods

Public function IsValid: Boolean;
Public function IsReadOnly: Boolean;
Public function Copy: ICefCommandLine;
Public procedure InitFromArgv(argc: Integer; const argv: PPAnsiChar);
Public procedure InitFromString(const commandLine: ustring);
Public procedure Reset;
Public function GetCommandLineString: ustring;
Public procedure GetArgv(var args: TStrings);
Public function GetProgram: ustring;
Public procedure SetProgram(const prog: ustring);
Public function HasSwitches: Boolean;
Public function HasSwitch(const name: ustring): Boolean;
Public function GetSwitchValue(const name: ustring): ustring;
Public function GetSwitches(var switches: TStrings): boolean; overload;
Public function GetSwitches(var SwitchKeys, SwitchValues: TStringList): boolean; overload;
Public procedure AppendSwitch(const name: ustring);
Public procedure AppendSwitchWithValue(const name, value: ustring);
Public function HasArguments: Boolean;
Public procedure GetArguments(var arguments: TStrings);
Public procedure AppendArgument(const argument: ustring);
Public procedure PrependWrapper(const wrapper: ustring);

Properties

Public property CommandLineString : ustring read GetCommandLineString;

Description

Methods

Public function IsValid: Boolean;

Returns true (1) if this object is valid. Do not call any other functions if this function returns false (0).

Attributes
GUID['{6B43D21B-0F2C-4B94-B4E6-4AF0D7669D8E}']
Public function IsReadOnly: Boolean;

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

Public function Copy: ICefCommandLine;

Returns a writable copy of this object.

Public procedure InitFromArgv(argc: Integer; const argv: PPAnsiChar);

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.

Public procedure InitFromString(const commandLine: ustring);

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

Public procedure Reset;

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

Public function GetCommandLineString: ustring;

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

Public procedure GetArgv(var args: TStrings);

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

Public function GetProgram: ustring;

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

Public procedure SetProgram(const prog: ustring);

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

Public function HasSwitches: Boolean;

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

Public function HasSwitch(const name: ustring): Boolean;

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

Public function GetSwitchValue(const name: ustring): ustring;

Returns the value associated with the given switch. If the switch has no value or isn't present this function returns the NULL string.

Public function GetSwitches(var switches: TStrings): boolean; overload;

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

Public function GetSwitches(var SwitchKeys, SwitchValues: TStringList): boolean; overload;

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

Public procedure AppendSwitch(const name: ustring);

Add a switch to the end of the command line.

Public procedure AppendSwitchWithValue(const name, value: ustring);

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.

Public function HasArguments: Boolean;

True if there are remaining command line arguments.

Public procedure GetArguments(var arguments: TStrings);

Get the remaining command line arguments.

Public procedure AppendArgument(const argument: ustring);

Add an argument to the end of the command line.

Public procedure PrependWrapper(const wrapper: ustring);

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

Properties

Public property CommandLineString : ustring read GetCommandLineString;

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


Generated by PasDoc 0.16.0-snapshot.