From MozillaWiki
Jump to: navigation, search


[GtkMozEmbed] is an embedding API designed many years ago for use in Gtk applications.

See also [source code]

Gtk is built around Glib signals and has a fixed C structure method dispatch design. GtkMozEmbed unfortunately isn't perfect and was designed with basically a single object to represent the entire browser of its time. This didn't scale well and unfortunately wrapping each and every object in Gecko is unreasonable. It is conceivable that someone might someday make a Glib-connect XPTCall layer or something like it that could proxy between XPCOM (or its replacement) and Glib. The main advantage of doing this is that no person would have to manually spend time writing bloaty wrappers for each and every imaginable Gecko object.

Mozilla 2.0 is likely to cause this embedding API to be replaced. The exact plans for this are entirely unknown. Whether there will be a single cross platform, or a per platform API is unknown. If you're interested in expressing your opinions, there's probably a newsgroup that might accept input.

GtkMozEmbed hasn't really had much development in the past years, partly because of a Glib ABI promise (which we intend to break for Mozilla1.9, as the Linux distributors have explained very clearly that they really really really don't care about ABIs at all, as long as there's source compatibility, because as it happens, they rebuild everything for each distribution they make anyway).

See also mailing list: GtkMozEmbed for 1.9


Provide extended Gtk Interface, which should include:

  • Important components, (some of them implemented in XUL inside Gecko)
    • Certificates, Passwords, Download, Upload, History
  • Provide features, that used in most browser applications
    • Cookies, Plug-ins, Preferences, Page/Image saving, Clipboard, Encoding, Zooming
  • Some extensions like Panning and Image Zooming

Source code

All the ongoing changes on GtkMozEmbed are made inside separate branches prefixed with "MICROB". As soon as they are considered stable they suppose to be merged to HEAD. Some of the development "MICROB" branches were merged to HEAD already.

The latest development branch that is going to be merged to HEAD next is MICROB_20070323_BRANCH

There is a query for all the branches made for new GtkMozEmbed: MICROB


The changes made for the original GtkMozEmbed code can be found in this table:

File New Description
gtkmozembedmarshal.list yes Added glib marshal descriptions for new signals
yes Download Object, related to one file transfer request
yes Common GObject with interface for Windowless components.
yes Embedded Password Manager support
yes Misc Embedded functions
yes Embedded Global History support
yes Embedded File Picker interface
yes Embedded Download Manager
yes Embedded Context Menu support
yes Embedded Certificates Listener


The branches made for the new GtkMozEmbed:

Branch Name Description Date branched Status
MICROB_20070323_BRANCH N/A 2007.03.23 Current development
MICROB_20070103_BRANCH Major update 2007.01.03 Merged to trunk on 2007.03.23
MICROB_20061206_BRANCH Global history support, bug fixes 2006.12.06 Merged to trunk on 2007.01.02
MICROB_20061204_BRANCH Bug fixes 2006.12.04 Moved to MICROB_20061206_BRANCH
MICROB_20061031_BRANCH Initial version 2006.10.31 Merged to trunk on 2006.12.03


Sometime this month, the current changes on the MICROB_20070323_BRANCH will be landed on trunk and a new branch will be created for additional work. This pattern should be repeated a number of times during the 1.9 timeline.