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.
I hope that next Maemo device would support “standard” xhtml+css+js widget framework, like the one that is provided with Nokia phones…
@Manrique: That’s offtopic here. For explicit enhancement requests, feel free to file a ticket in bugs.maemo.org (though »“standard†xhtml+css+js widget framework« sounds very vague and might become a WONTFIX. I don’t think there’s something i’d call standard in this area yet).
Then again, it shouldn’t be that hard to put a GtkWebKit widget in a Maemo Desktop Widget. Then you can do what you like.
@andre: sorry for the offtopic, but it was a fast thought about similar platforms like Nokia WRT (http://www.forum.nokia.com/Resources_and_Information/Explore/Web_Technologies/Web_Runtime/), Opera Widgets (http://widgets.opera.com) and W3C (http://www.w3.org/2008/webapps/) and Bondi (http://bondi.omtp.org/default.aspx) work on this area towards a standard…
@Murray, that’s what I am playing with (and with QtWebkit too)…
Thanks for the example.
What worries me the most is the amount of knowledge required to create such a widget.
(debian packaging,autotools,c programming ,gtk and glibc pragmas,hildon additions)
Lets create some more lightweight ways’ of doing this
keesj,
> What worries me the most is the amount of knowledge required to create such a widget.
Well, it’s incredibly easy for anyone used to using GTK+ already, which is many people.
Otherwise, well, programming is hard.
I believe there is a bookmark system to add simple images that go to websites when clicked. I also hope that Desktop Widgets can be implemented with the python bindings soon, which would be slightly simpler than using C.
Or do you have something else in mind?
The example code link is 404
Maybe: https://garage.maemo.org/svn/maemoexamples/trunk/example_desktop_widget/
Thanks, David. Yes, me moved it to trunk/