@mozilla.org/toolkit/command-line;1
This component implements the following interfaces:
Constants
| PRUint32 | nsICommandLine.STATE_INITIAL_LAUNCH | = 0 |
| PRUint32 | nsICommandLine.STATE_REMOTE_AUTO | = 1 |
| PRUint32 | nsICommandLine.STATE_REMOTE_EXPLICIT | = 2 |
Properties
readonly PRInt32 nsICommandLine.length
Number of arguments in the command line. The application name is not part of the command line.
PRBool nsICommandLine.preventDefault
There may be a command-line handler which performs a default action if there was no explicit action on the command line (open a default browser window, for example). This flag allows the default action to be prevented.
readonly PRUint32 nsICommandLine.state
The type of command line being processed.
STATE_INITIAL_LAUNCH is the first launch of the application instance. STATE_REMOTE_AUTO is a remote command line automatically redirected to this instance. STATE_REMOTE_EXPLICIT is a remote command line explicitly redirected to this instance using xremote/windde/appleevents.
readonly nsIDOMWindow nsICommandLine.windowContext
A window to be targeted by this command line. In most cases, this will be null (xremote will sometimes set this attribute).
readonly nsIFile nsICommandLine.workingDirectory
The working directory for this command line. Use this property instead of the working directory for the current process, since a redirected command line may have had a different working directory.
Methods
| Interface | Method |
|---|---|
| nsICommandLine |
PRInt32 findFlag ( AString flag , PRBool caseSensitive )
|
| nsICommandLine |
AString getArgument ( PRInt32 index )
|
| nsICommandLine |
PRBool handleFlag ( AString flag , PRBool caseSensitive )
|
| nsICommandLine |
AString handleFlagWithParam ( AString flag , PRBool caseSensitive )
|
| nsICommandLine |
void removeArguments ( PRInt32 start , PRInt32 end )
|
| nsICommandLine |
nsIFile resolveFile ( AString argument )
|
| nsICommandLine |
nsIURI resolveURI ( AString argument )
|
Reference documentation is generated from Mozilla's source.
