Re: Embedding Gecko/XULRunner
Benjamin Smedberg <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.embedding |
|---|---|
| Message-ID | <[email protected]> |
On 2/14/2011 3:05 PM, Peter wrote: > However, the documentation on embedding is a bit fuzzy and all over > the place. I am not even completely sure with the terminology as it > keeps changing and is mixed up in the docs. This is because there is little or no embedding community. The Mozilla community is mainly focused on Firefox development, and embedding is not a priority. > Question0: How is embedding Gecko different from embedding XULRunner? > Which of the two have I actually done above? They are the same thing. XULRunner is the shipping "product" which provides the Mozilla web engine, sometimes called gecko. > Question1a: My understanding is that I can build upon GtkEmbedMoz > (provides a gtk widget for the browser content pane - I think) and > TestGtkEmbed (provides the actual window in which GtkEmbedMoz is > displayed - I think) instead of working directly with the embedding > API (too much work). Is My understanding correct? If not, please > correct it. TestGtkEmbed is example code for how you might use GtkEmbedMoz. But in your case, I recommend that you *not* use GtkEmbedMoz except as perhaps a template for embedding, and instead use the embedding API more directly. > Question1b: TestGtkEmbed was compiled as part of XULRunner SDK > compilation. If I am to build upon it, I would obviously have to > compile it as part of my app. However, a lot of stuff goes in > TestGtkEmbed, and I cannot find a good makefile or at least guidance > as to what flags, libs, and include paths to use. Any advice greatly > appreciated. https://developer.mozilla.org/en/XPCOM_Glue > Question2: The ultimate goal would be using the mozilla engine in > headless mode - therefore I would eventually not need any of the gtk > stuff for display. In this case, am I doing an overkill by going > through GtkEmbedMoz? Would it be eventually simpler to use the > embedding API directly. Please comment. The GtkEmbedMoz code will probably be removed in a future release of Mozilla because it is buggy and unmaintained, and not the direction we want for embedding in general. I would recommend using the low-level API if possible. Also, you might want be aware of the gecko headless rendering branch, which is rather old now but might be useful to you: http://hg.mozilla.org/incubator/offscreen/ --BDS