I’m working on some example code for Maemo 5 as standalone modules with full autotools files.
I now have Desktop Widget example code working in the Maemo 5 Beta SDK, showing a simple clock face, using the drawing code from Davyd Madeley’s cairo-based custom widget example, with his kind permission. Implementing a Desktop Widget is much like implementing a regular GTK+ Widget: You can draw in the expose-event handler, or add child GTK+ (or Hildon) widgets.
I’ve filed documentation bugs to make it easier for the next person to figure out how to implement and install Desktop Widgets, and a few bugs about the Hildon documentation in general.
I expect the final Maemo 5 version to have many standard Desktop Widgets, far more attractive than this:
In Desktop Edit mode, you can move the Desktop Widgets around by dragging them with your finger, remove them by touching the X icon, or configure them by touching the spanner icon. You can add extra widgets (if installed) by touching the “Desktop menu”. Note that you need to apt-get update and upgrade after installing the Beta SDK to see the X and spanner icons.
The rendering artifacts (such as the white line at the top) are just a known bug in Xephyr (on the PC). They won’t appear when running on an actual device.