You are currently viewing a snapshot of www.mozilla.org taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to www.mozilla.org, please file a bug.



Gecko setup/teardown [ << Previous | Contents | Next >> ]
There are general statup/shutdown/process event functions that you need to utilize.
  • Setup
    extern nsresult NS_InitEmbedding(nsILocalFile *mozBinDirectory,
             nsIDirectoryServiceProvider *appFileLocProvider);
    • mozBinDirectory - location of your executable
    • appFileLocProvider - a file location object that points Gecko to various, pre-defined files.
    • Embedding APIs are not multi-threaded.
  • Teardown
    extern nsresult NS_TermEmbedding();
    • cleans up Gecko state and is called at app exit/shutdown.
    • Mozilla is not un-loadable.
  • Event handling
    nsresult NS_DoIdleEmbeddingStuff()
    • currently windows only (timer firing)
    • reserved for internal event handling activity