Gtkmozembed

From MozillaWiki
Jump to: navigation, search

Introduction

[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

Goals

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

Components

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
gtkmozembed_download.h
gtkmozembed_download.cpp
yes Download Object, related to one file transfer request
gtkmozembed_common.h
gtkmozembed_common.cpp
yes Common GObject with interface for Windowless components.
EmbedPasswordMgr.h
EmbedPasswordMgr.cpp
yes Embedded Password Manager support
EmbedGtkTools.h
EmbedGtkTools.cpp
yes Misc Embedded functions
EmbedGlobalHistory.h
EmbedGlobalHistory.cpp
yes Embedded Global History support
EmbedFilePicker.h
EmbedFilePicker.cpp
yes Embedded File Picker interface
EmbedDownloadMgr.h
EmbedDownloadMgr.cpp
yes Embedded Download Manager
EmbedContextMenuInfo.h
EmbedContextMenuInfo.cpp
yes Embedded Context Menu support
EmbedCertificates.h
EmbedCertificates.cpp
yes Embedded Certificates Listener

Progress

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

Plans

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.