22
edits
| Line 3: | Line 3: | ||
| XUL apps intended to be run by the xulrunner need to be able to flexibly handle command-line arguments. The current system does not allow arbitrary processing by command-line handlers, it is limited to opening XUL windows. Apps (especially utility apps) may wish to exectute arbitrary code and then exit, without ever opening a window. | XUL apps intended to be run by the xulrunner need to be able to flexibly handle command-line arguments. The current system does not allow arbitrary processing by command-line handlers, it is limited to opening XUL windows. Apps (especially utility apps) may wish to exectute arbitrary code and then exit, without ever opening a window. | ||
| Command-line handling is currently done through the [http://lxr.mozilla.org/mozilla/source/xpfe/appshell/public/nsICmdLineService.idl nsICmdLineService] and [http://lxr.mozilla.org/ | Command-line handling is currently done through the [http://lxr.mozilla.org/mozilla/source/xpfe/appshell/public/nsICmdLineService.idl nsICmdLineService] and [http://lxr.mozilla.org/seamonkey/source/toolkit/components/commandlines/public/nsICommandLineHandler.idl nsICommandLineHandler] interfaces. As you can see, the nsICommandLineHandler interface is so weird that we use a C++ macro to implement it for most cases. | ||
| Instead, the command-line handling should be handled through a callback-like interface. Posit a set of interfaces: | Instead, the command-line handling should be handled through a callback-like interface. Posit a set of interfaces: | ||
edits