Search completed in 1.75 seconds.
12 results for "NsIAppStartup":
nsIAppStartup
MozillaTechXPCOMReferenceInterfacensIAppStartup
toolkit/components/startup/public/nsiappstartup.idlscriptable this interface is intended to be used as application startup service.
...to use the service: var appstartup = components.classes["@mozilla.org/toolkit/app-startup;1"] .getservice(components.interfaces.nsiappstartup); method overview void createhiddenwindow(); boolean createstartupstate(in long awindowwidth, in long awindowheight); obsolete since gecko 1.9.1 void destroyhiddenwindow(); void doprofilestartup(in nsicmdlineservice acmdlineservice, in boolean caninteract); obsolete since gecko 1.9.1 void ensure1window(in nsicmdlineservice acmdlineservice); obsolet...
... var aconsoleservice = components.classes["@mozilla.org/consoleservice;1"] .getservice(components.interfaces.nsiconsoleservice); var startupinfo = components.classes["@mozilla.org/toolkit/app-startup;1"] .getservice(ci.nsiappstartup_mozilla_2_0).getstartupinfo(); var keys = object.keys(startupinfo); keys.sort(function(a, b) { return startupinfo[a] - startupinfo[b]; }); for each (var name in keys) { aconsoleservice.logstringmessage(name + ": " + startupinfo[name]); } to calculate how long startup took, compute the difference between the event's timestamp and the timestamp of the process event.
... see also nsicmdlineservice nsiappstartup_mozilla_2_0 ...
nsIAppStartup_MOZILLA_2_0
MozillaTechXPCOMReferenceInterfacensIAppStartup MOZILLA 2 0
toolkit/components/startup/public/nsiappstartup.idlscriptable this lets you get information about the times at which key application startup events occurred.
... 1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) in gecko 4.0 this interface was merged into the nsiappstartup interface.
How to Quit a XUL Application - Archive of obsolete content
ArchiveMozillaXULHow to quit a XUL application
script can attempt to quit a xul application, or force the application to quit, using the nsiappstartup interface.
... getservice(components.interfaces.nsiappstartup); // eattemptquit will try to close each xul window, but the xul window can cancel the quit // process if there is unsaved data.
...components.interfaces.nsiappstartup.eforcequit : components.interfaces.nsiappstartup.eattemptquit; appstartup.quit(quitseverity); } </script> calling this function if there is an uncaught exception, to force the application to quit: <script> try { dosomething(); } catch (e) { quit(true); } </script> the "quit" menuitem should typically prompt the user if there is unsaved data: <menuitem label="quit" oncommand="quit(false);"/> ...
Index
MozillaTechXPCOMIndex
327 nsiappshellservice interfaces, interfaces:scriptable, reference, référence(2), xpcom, xpcom api reference, xpcom interface reference implemented by: @mozilla.org/appshell/appshellservice;1 as a service: 328 nsiappstartup interfaces, interfaces:scriptable, xpcom, xpcom api reference, xpcom interface reference implemented by: @mozilla.org/toolkit/app-startup;1.
... to use the service: 329 nsiappstartup_mozilla_2_0 interfaces, interfaces:scriptable, xpcom, xpcom api reference, xpcom interface reference in gecko 4.0 this interface was merged into the nsiappstartup interface.
Index - Archive of obsolete content
ArchiveIndex
1165 how to quit a xul application xul, xulrunner script can attempt to quit a xul application, or force the application to quit, using the nsiappstartup interface.
Embedding Mozilla in a Java Application using JavaXPCOM - Archive of obsolete content
ArchiveMozillaEmbedding Mozilla in a Java Application using JavaXPCOM
mple: (taken from rayh.co.uk) // note, on linux, gtk has to be already initialized for this code to work mozilla moz = mozilla.getinstance(); // now we need to start an xul application, so we get an instance of the xpcom service manager nsiservicemanager servicemanager = moz.getservicemanager(); // now we need to get the @mozilla.org/toolkit/app-startup;1 service: nsiappstartup appstartup = (nsiappstartup)servicemanager.getservicebycontractid("@mozilla.org/toolkit/app-startup;1", nsiappstartup.ns_iappstartup_iid); // get the nsiwindowwatcher interface to the above nsiwindowcreator windowcreator = (nsiwindowcreator)appstartup.queryinterface(nsiwindowcreator.ns_iwindowcreator_iid); // get the window watcher service nsiwindowwatcher windowwatcher = (n...
Index - Archive of obsolete content
ArchiveMozillaXULIndex
434 how to quit a xul application xul, xulrunner script can attempt to quit a xul application, or force the application to quit, using the nsiappstartup interface.
Code Samples - Archive of obsolete content
ArchiveMozillaXULToolbarsCustom toolbar buttonCode Samples
onst uri = "chrome://calendar/content/" * at the time of writing, sunbird's passwords window is broken close the current window to close the window containing the button, possibly leaving other windows open: close() exit the application to exit the application, first closing all its windows: components .classes['@mozilla.org/toolkit/app-startup;1'] .getservice(components.interfaces.nsiappstartup) .quit(components.interfaces.nsiappstartup.eattemptquit) ...
How to enable locale switching in a XULRunner application - Archive of obsolete content
ArchiveMozillaXULRunnerHow to enable locale switching in a XULRunner application
getservice(components.interfaces.nsiprefbranch); prefs.setcharpref("general.useragent.locale", newlocale); // restart application var appstartup = components.classes["@mozilla.org/toolkit/app-startup;1"] .getservice(components.interfaces.nsiappstartup); appstartup.quit(components.interfaces.nsiappstartup.erestart | components.interfaces.nsiappstartup.eattemptquit); } catch(err) { alert("couldn't change locale: " + err); } } * * * here i include a complete xulrunner application example that demonstrates the locale switching.
Services.jsm
MozillaJavaScript code modulesServices.jsm
prefs nsiprefbranch nsiprefbranch2 nsiprefservice preferences service prompt nsipromptservice prompt service scriptloader mozijssubscriptloader javascript subscript loader service scriptsecuritymanager nsiscriptsecuritymanager script security manager search nsibrowsersearchservice browser search service startup nsiappstartup application startup service storage mozistorageservice storage api service strings nsistringbundleservice string bundle service sysinfo nsipropertybag2 system info service telemetry nsitelemetry telemetry service tm nsithreadmanager thread manager service urifixup nsiurifixup uri fixup service ur...
XPCOM Interface Reference
MozillaTechXPCOMReferenceInterface
ionnsiaccessibleretrievalnsiaccessiblerolensiaccessiblescrolltypensiaccessibleselectablensiaccessiblestatechangeeventnsiaccessiblestatesnsiaccessibletablensiaccessibletablecellnsiaccessibletablechangeeventnsiaccessibletextnsiaccessibletextchangeeventnsiaccessibletreecachensiaccessiblevaluensiaccessiblewin32objectnsialertsservicensiannotationobservernsiannotationservicensiappshellnsiappshellservicensiappstartupnsiappstartup_mozilla_2_0nsiapplicationcachensiapplicationcachechannelnsiapplicationcachecontainernsiapplicationcachenamespacensiapplicationcacheservicensiapplicationupdateservicensiarraynsiasyncinputstreamnsiasyncoutputstreamnsiasyncstreamcopiernsiasyncverifyredirectcallbacknsiauthinformationnsiauthmodulensiauthpromptnsiauthprompt2nsiauthpromptadapterfactorynsiauthpromptcallbacknsiauthpromptprovi...
XPCOM Interface Reference by grouping
MozillaTechXPCOMReferenceReference by grouping
history nsiglobalhistory nsiglobalhistory2 nsiglobalhistory3 ssl nsibadcertlistener2 system action nsicancelable application application nsiapplicationupdateservice nsiappshell nsiappshellservice nsiappstartup xul nsixulappinfo nsixulruntime nsixultemplatebuilder nsixultemplatequeryprocessor nsixultemplateresult bookmark livemark nsilivemarkservice nsinavbookmarkobserver nsinavbookmarksservice ...