HildonDesktopMigration
- Migrating plugins from maemo-af-desktop to hildon-desktop
- Compiling maemo-af-desktop plugins for hildon-desktop
- Porting maemo-af-desktop plugins to the HildonDesktopItem API
MoinMoinWiki Macro: TableOfContents
Migrating plugins from maemo-af-desktop to hildon-desktop
maemo-af-desktop is the desktop process as found on IT-2006 and IT-2007. hildon-desktop is a major rewrite and is available in Sardine and will be the desktop process in later revisions of the Internet Tablets software.
hildon-desktop provides a new unified plugin API for all its containers. The API is based on GTypeModule, plugins are expected to implement a child class of a HildonDesktopItem and return an instance of it.
hildon-desktop also provides a loader for the maemo-af-desktop plugins, to ease the transition. Building a maemo-af-desktop plugin for hildon-desktop requires minor changes to the build (dependencies).
Therefore when migrating their applets to hildon-desktop, developers can choose to: * change their plugins to build against hildon-desktop, but stick to the old API (a few guidelines are given below) * (preferred) move to the new API.
Compiling maemo-af-desktop plugins for hildon-desktop
Hildon Home applets
maemo-af-desktop package used to provide a hildon-home-dev development package. Since the development of plugins for the 3 containers is now unified, this package is gone and shall not be referred as a build dependency.
The package contained a pc file with the location of the .desktop files and the module files. These can now be found in the osso-af-settings (>= 0.9.0) package.
Note that '''Home doesn't call gtk_widget_show_all any longer** on the applet widget, only gtk_widget_show. The applet is responsible to show its internal widgets.
Where to install the .so (module) file
pkg-config hildon-home --variable=pluginlibdir
becomes pkg-config osso-af-settings --variable=legacyhomelibdir
Consequently home applets now have a build dependency on osso-af-settings.
Where to install the .desktop file
pkg-config hildon-home --variable=homedesktopentrydir
becomes pkg-config osso-af-settings --variable=homedesktopentrydir
Header file
hildon-home-dev used to provide a header file with the prototype of the callbacks to implement by the plugin. Since these are by nature exported functions, the prototype is not necessary and the header does not need to be included.
Hildon Task Navigator plugins
maemo-af-desktop package used to provide a hildon-navigator-dev development package. Since the development of plugins for the 3 containers is now unified, this package is gone and shall not be referred as a build dependency.
Where to install the .so file (module)
pkg-config hildon-navigator --variable=pluginlibdir
becomes pkg-config osso-af-settings --variable=legacynavigatorlibdir
Consequently task navigator plugins now have a build dependency on osso-af-settings.
Where to install the .desktop file
pkg-config hildon-navigator --variable=plugindesktopentrydir
becomes pkg-config osso-af-settings --variable=tasknavigatordesktopentrydir
Header file
hildon-navigator-dev used to provide a header file with the prototype of the callbacks to implement by the plugin. Since these are by nature exported functions, the prototype is not necessary and the header does not need to be included.
Hildon Statusbar plugins
Only plugins from IT-2007 are supported.
maemo-af-desktop package used to provide a hildon-status-bar-lib-dev development package. Since the development of plugins for the 3 containers is now unified, this package is gone and shall not be referred as a build dependency.
Where to install the .so file (module)
pkg-config hildon-status-bar-lib --variable=pluginlibdir
becomes pkg-config osso-af-settings --variable=legacystatusbarlibdir
Consequently statusbar plugins now have a build dependency on osso-af-settings.
Where to install the .desktop file
The directory where hildon-desktop expects to find .desktop files for statusbar plugins can be queried with pkg-config osso-af-settings --variable=statusbardesktopentrydir
HildonStatusBarItem wrapper
The old API for statusbar plugins refers to an object type called HildonStatusBarItem defined in
hildon-desktop provides a wrapper around this deprecated object for backwards-compatibility, in the libhildondesktop library. The object is defined in <libhildondesktop/hildon-status-bar-item.h&rt;
Statusbar plugins should therefore:
- link against libhildondesktop0 instead of hildon-status-bar-lib0
- have a build-dependency on libhildondesktop-dev' instead of hildon-status-bar-lib-dev
- include <libhildondesktop/hildon-status-bar-item.h> instead of <hildon-status-bar-lib/hildon-status-bar-item.h>
Porting maemo-af-desktop plugins to the HildonDesktopItem API
The new API is based on GTypeModule. All the plugins for hildon-desktop now share a common API. Plugins are expected to write a widget inheriting from an offspring of the HildonDesktopItem and return an instance of it. Former callbacks to the different plugin types are now replaced with GObject signals.
Further information on writing plugins for hildon-desktop using the new API are found in the HildonDesktopPluginHowto