Enrico Albonico wrote:
hi, I am writing a program that embeds mozilla, now I would like to
'switch' and use xulrunner:
what changes in the code and compilation/linking do I have to do?
There is one important linkage change, and there is a general shift in
embedding strategy:
1) xpcom_core.dll doesn't exist any more: the "internal" xpcom exports are
currently exported from xul.dll, but in future versions they won't be
exported at all. So you can currently continue to use internal linkage
(defining MOZILLA_INTERNAL_API and link against xul.dll), but you should
start moving towards frozen linkage (linking xpcomglue_s.lib). If you don't
know what I'm talking about see http://developer.mozilla.org/en/docs/XPCOM_Glue
2) The old method of statically linking embed_base_s.lib (and calling
NS_InitEmbedding) is still availalable... but there is a new embedding API
provided by libxul which is better: XRE_InitEmbedding. Because this new API
is dynamically linked instead of statically linked it is more stable and
allows us to fix bugs in future versions much more easily.
http://lxr.mozilla.org/mozilla/source/toolkit/xre/nsXULAppAPI.h#269
On the mozilla trunk (XULRunner 1.9) there are additional exported APIs that
make profile handling much easier for embedded applications. See the
XRE_NotifyProfile docs in that same file for information. This API is not
available on the 1.8.0 or 1.8 branch.
On the trunk gtkmozembed is also integrated with libxul, and the plan is to
integrate an ActiveX control implementation and a mac embedding widget into
libxul also in the 1.9 timeframe.
--BDS
_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding