Intialisation and Shutdown
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
|