Tag Archives: Openismus

Openismus 2009 T-Shirts

As per tradition, the new Openismus T-Shirts are ready for GUADEC 2009 (GCDS). They are again unlike last year’s, and simple enough to wear among civilians. We were a little rushed this year but they turned out nice. Thanks to Kat for fixing things in Inkscape and getting them done.

We only printed a limited number, so seek out an Openismus developer over the first weekend to get yours.

Now that we’ve found a place to get these done in Berlin we’ll probably do a new design (2009 1/2) for the Maemo Summit in Amsterdam in October.

Openismus T-Shirts 2009

Openismus T-Shirts 2009, modelled by Michael Hasselmann

maemomm API reference

We have cleaned up the maemomm API reference and put the result online. Here’s an example for the Hildon::TouchSelector widget. Pages such as that are linked often from the “Programming with maemomm” book.

Like the gtkmm API reference, the maemomm API reference is partly autogenerated from the C API reference, with some clever automatic changes, and some manual overrides, so it will improve as the hildon C API reference documentation improves.

Maemo: APIs and Porting

This post is a general ramble about the limits of keeping API the same on significantly different platforms. It uses Maemo’s Hildon and Maemo’s Qt as examples, but don’t get offended. Hildon’s new UI in Maemo 5 is wonderfully appropriate for small touch-screen devices, and the API is the best that the developers could do in the short time available, in their circumstances.  Not much can be changed in Hildon now anyway until a theoretical Maemo 6. And Maemo’s Qt is only just getting started.

Hildon: Secret, Then Public, Then Secret, Then Public

The first version of Maemo’s Hildon API added lots of API to hildon itself, and to the Maemo version of GTK+. It also made some inappropriate changes to default behavior. These things happen when work is done in secret, because people can’t complain until too late. Much of this was corrected in Maemo Diablo, as changes were sent upstream to GTK+.

Then Nokia made Hildon’s development secret again and added lots of new API. That’s now public again. Some simple things should be patches to GTK+ that can eventually be accepted in upstream GTK+. For other things, it’s debatable whether we would want the change in functionality to be obvious in the code (via #ifdefs), or if the standard GTK+ widgets should just behave differently when the same code runs on Maemo. For various things, both opinions are valid. But that discussion never happened because the API was not published until it was too late to change it significantly.

Too Much Simple New API

I think the new Maemo 5 Hildon API leans too much towards extra API. For instance:

  • You must use HildonButton, HildonEntry and HildonTextView instead of GtkButton, GtkEntry, and  GtkTextView. These have extra features, but they could be added to the GTK+ widgets.
  • You must use HildonCheckButton instead of GtkCheckButton or GtkRadioButton, though that’s really just to get a slightly different appearance.
  • You must use HildonWindow instead of GtkWindow.
  • HildonNote and HildonBanner add timed behaviour and convenience API that could just be in GtkDialog.
  • HildonAppMenu is just a glorified grid container, needing significant changes to application code, instead of the regular GTK+ menu APIs being changed to behave differently on Maemo. Now you can’t use GtkMenu, GtkUIManager or Glade for menus. Menus really must be made simpler for Maemo applications, but that’s no reason to completely change the menu API.
  • You must use HildonTouchSelector (via a HildonPickerButton) instead of a GtkComboBox. Admittedly it would be particularly difficult to make GtkComboBox act like a (pannable) HildonTouchSelector, and GtkComboBox would need extra API to allow multiple-selection. But there would be great benefits for application coders from that hard work.
  • You must use HildonWizardDialog instead of GtkAssistant. This dates from before GtkAssistant existed, but the Hildon developers seem to have forgotten to deprecate it and adapt GtkAssistant for Maemo 5.
  • You must use HildonFileChooserDialog instead of GtkFileChooserDialog or the other GtkFileChooserWidgets. These hildon-fm widgets have almost no documentation, so there’s no obvious reason for their existence.

Note that extra API is not just annoying when porting (requiring ifdefs) but also makes existing generic GTK+ documentation and skills less relevant to Maemo. Just because a UI has a wonderful new look and feel, that doesn’t mean you need a lots of arbitray new API to make things feel new and different for the developer too.

Too Much Surprising New Behavior

Where Hildon _has_ changed the GTK+ implementation instead of adding new API, it’s done it for situations that are too complex or where the changed behavior is annoyingly arbitrary. This is particularly annoying because there are reasonable uses of the original widgets even in a Maemo application. For instance:

  • The GtkTreeView’s selection and activation behavior is apparently entirely different, though I admittedly don’t know all the details yet. It apparently feels like a different widget so it probably should be a different class. Column headers are off by default too.
  • GtkEntry (ignoring that you should use HildonEntry) still defaults to auto-capitalization. I don’t think this is the common case. Most text in entry widgets is not a sentence or a name.

In these cases, the developers have justified the annoying new defaults by saying that it’s what the Maemo UI guidelines demand, ignoring that those guidelines do not say how the UI should be achieved in terms of API. Simply telling application developers to call extra API when using Maemo would have the same results without the annoyance.

Will Qt Make Better Choices?

Qt has long touted the similarity of its API across three major desktop platforms (Linux, Windows, Macintosh), though the nativeness of the results is debatable. At least Windows applications have no consistency anyway.

The Maemo Qt developers insist that they will stick to this even when porting to Maemo – probably the first popular Qt platform with a significantly different UI and desktop environment, requiring new concepts that are not yet in the Qt API.

I think that’s a good idea, though I doubt that it will really be possible. When I asked (threaded view) them, I discovered that they really hadn’t thought much about it yet and weren’t able to address my specific examples with anything other than a repeat of the Qt “deploy without rewriting the source code” mantra. Surprisingly there are not that many people working on Maemo’s Qt and it’s obviously far from ready for Maemo 5’s new UI. Nokia acquired all the Trolltech/”Qt Software” developers but if they have been redirected to work on Maemo then it’s not happening in public.

Hopefully they will at least choose to lean more towards maintaining API compatibility while adding API only where absolutely necessary. I think it must be a little of both.

maemomm for Maemo 5 and Screenshots

David King blogged that we have draft documentation online for the Maemomm (C++) API for Maemo 5.

The text needs to be filled out a little and corrected here and there. But we have figured out how to actually use the new widgets, as shown by our example code. And the list of screenshots of the examples is probably the first time you’ll see most of the new Hildon widgets all together. It’s radically different to the previous Maemo UI, rightly so.

TouchSelector: Single Column, with two cell renderers.

Xephyr on Ubuntu Jaunty

Many Maemo developers have noticed that the version of Xephyr (xserver-xephyr) on Ubuntu Jaunty crashes very easily, making the SDK nearly useless. I uploaded a Xepyhr version to the Openismus PPA with the patch applied to fix the crash. Maybe one of the open launchpad bugs is relevant.

I wouldn’t generally advise you to upgrade to Ubuntu Jaunty anyway, certainly not if you have Intel graphics (for instance on my Lenovo X61) – ironically the very graphics hardware that you’d expect to work with Linux.

Openismus at GUADEC 2009

We’ve booked our flights and hotel rooms for GUADEC in July. I mean, our new administration person, Ekaterina (Kat) has. André, Karsten, Johannes, David, and myself will be there. Unfortunately, our other developers are too busy on customer projects to attend this year.

Most of us are only there for the core days. Well, it looks like Saturday, Monday, and Tuesday are core days, but the schedule is not as clear about that as it has been in the past.

It’s more expensive than I think we were promised when Gran Canaria was proposed as a venue – around 700 Euros per person for hotel and flight from Germany. After Istanbul this is becoming a worrying trend. And I find the vague referral to “the travel agency” rather distasteful.

On the plus side, the recommended Hotel Fataga is cheaper than stated on the website. They do have single rooms for 65 Euros per night instead of just doubles for single use at 84 Euros per night. Actually, I’m surprised that they aren’t booked out already. We couldn’t find anything cheaper closer that was not likely to involve annoying travel delays (remember the bus for GUADEC in Villanova?). I generally wish that the web site was a wiki like in the past, so we could question and correct the information.

Also, there is no charge for conference attendance this year, even for companies.

Maemo 5 Desktop Widget Example

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:

maemo_beta_sdk_clock_in_edit_mode

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.

libglom is now 100% non-UI

libglom has been mostly theoretical until now. But I just removed all the UI code and the GTK+ dependency so it can now be used realistically by applications other than Glom itself. This small libglom document-parsing C++ example shows how easily you can get the basic details of the Glom system. This is only in svn for now.

And here is a small libglom test case in Java. (Yes, that’s not a well structured junit test case – I’m just throwing code in there as I  create the API.)

I’m using SWIG to create a Java API for the libglom C++ API. SWIG seems very capable and handles real C++, but the syntax is alien to me so I’d be very glad if a SWIG expert chose to do that job for me.