Q. I'm new to embedding Gecko and I started to look at code in embedding/tests/*.
winEmbed uses XRE_InitEmbedding to initialize the gecko engine while other ports (mfcembed, os2Embed, wxEmbed) use NS_InitEmbedding.
What is the difference and which one should I use?
A. It depends. If you want to embed all of the mozilla code base into your code, then use NS_InitEmbedding. If you want to link only XUL Runner then use XRE_InitEmbedding. If you want to be able to link any mozilla tree, then use neither. Write them out yourself and use InitXPCOM2 or InitXPCOM3.
XRE_InitEmbedding just calls InitXPCOM3 with default XULRunner components.
Here's a post by Benjamin Smedberg about bootstrapping Gecko SDK: Re: XRE_InitEmbedding gecko 1.9 c++
And here's a minimal workable embedding example (gtk).
Here are the basics - a little outdated but mostly valid: Gecko Embedding Basics
See XRE_InitEmbedding() source: xulrunner-1.9.1.3-source\mozilla-1.9.1\toolkit\xre\nsEmbedFunctions.cpp, function XRE_InitEmbedding()
Pokazywanie postów oznaczonych etykietą XRE_InitEmbedding. Pokaż wszystkie posty
Pokazywanie postów oznaczonych etykietą XRE_InitEmbedding. Pokaż wszystkie posty
piątek, 13 listopada 2009
Subskrybuj:
Posty (Atom)