23.07.2013 Views

Hildon 2.2: the Hildon toolkit for Fremantle - gnome.org

Hildon 2.2: the Hildon toolkit for Fremantle - gnome.org

Hildon 2.2: the Hildon toolkit for Fremantle - gnome.org

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Hildon</strong> <strong>2.2</strong>:<br />

<strong>the</strong> <strong>Hildon</strong> <strong>toolkit</strong> <strong>for</strong> <strong>Fremantle</strong><br />

Maemo Summit 2009 – Westergasfabriek Amsterdam<br />

Alberto Garcia<br />

agarcia@igalia.com<br />

Claudio Saavedra<br />

csaavedra@igalia.com


Introduction


<strong>Hildon</strong> widgets library<br />

● Set of widgets built on top of GTK+<br />

● Created <strong>for</strong> Nokia devices based on <strong>the</strong> Maemo plat<strong>for</strong>m:<br />

–Nokia 770<br />

–Nokia N800<br />

–Nokia N810<br />

–Nokia N900<br />

● Released under <strong>the</strong> GNU LGPL<br />

● Used also in o<strong>the</strong>r projects (e.g Ubuntu Mobile)


Maemo 5 - <strong>Fremantle</strong><br />

● Maemo release <strong>for</strong> <strong>the</strong> Nokia N900<br />

● Modern, usable and finger-friendly UI<br />

● Completely revamped user interface, very different from all<br />

previous versions<br />

● <strong>Hildon</strong> <strong>2.2</strong>.0 released on 24 September 2009


<strong>Hildon</strong> 2.0: Modest<br />

http://www.flickr.com/photos/yerga/ / CC BY-NC 2.0


<strong>Hildon</strong> 2.0: Modest<br />

http://www.flickr.com/photos/yerga/ / CC BY-NC 2.0


<strong>Hildon</strong> <strong>2.2</strong>: Modest


<strong>Hildon</strong> <strong>2.2</strong>: Modest


<strong>Hildon</strong> source lines of code<br />

● <strong>Hildon</strong> 1.0 (16 Apr 2007): 23,026<br />

● <strong>Hildon</strong> 2.0 (10 Oct 2007): 23,690<br />

● <strong>Hildon</strong> <strong>2.2</strong>.0 (24 Sep 2009): 36,291


<strong>Hildon</strong> <strong>2.2</strong>: <strong>the</strong> <strong>Fremantle</strong> release<br />

● Applications as window stacked views<br />

● Buttons as central UI part<br />

● Scrollable widgets are touchable-friendly<br />

● Kinetic scrolling (<strong>Hildon</strong>PannableArea)


O<strong>the</strong>r goals<br />

● New and old-style applications can coexist<br />

● Maintain backward compatibility<br />

–No API breakage<br />

–UI style preserved (where possible)


MathJinni in <strong>Fremantle</strong>


New UI concepts


Window stacks<br />

● Hierarchical <strong>org</strong>anization of windows<br />

● Applications have a main view from which different<br />

subviews can be opened<br />

● Views: implemented with <strong>Hildon</strong>StackableWindow<br />

● Stacks: implemented with <strong>Hildon</strong>WindowStack


Demo


<strong>Hildon</strong>Button: title/value button


<strong>Hildon</strong>PannableArea<br />

● Pannable scrollable window<br />

● Configurable kinetic scrolling<br />

● Gesture detection support<br />

● Easy to port from GtkScrolledWindow<br />

● Based on <strong>the</strong> OpenMoko finger-scroll widget


Demo


<strong>Hildon</strong>TouchSelector and <strong>Hildon</strong>PickerDialog<br />

● Finger-friendly, pannable, multicolumn selector<br />

● Allows single or multiple selections<br />

● Uses GtkTreeView internally<br />

● Exposes GtkTreeModel and GtkCellLayout <strong>for</strong> ease of use<br />

● <strong>Hildon</strong>TouchSelectorEntry: enter non predefined items


<strong>Hildon</strong>PickerButton<br />

● Standard picker button based on <strong>Hildon</strong>TouchSelector<br />

● Inspired by GtkFontButton, GtkFileChooserButton, …<br />

● Finger-friendly replacement <strong>for</strong> GtkComboBox and<br />

GtKComboBoxEntry


<strong>Hildon</strong>DateButton and <strong>Hildon</strong>TimeButton<br />

● Buttons <strong>for</strong> time and date selection<br />

● Derived from <strong>Hildon</strong>PickerButton<br />

● Specialized <strong>Hildon</strong>TouchSelector (<strong>Hildon</strong>DateSelector and<br />

<strong>Hildon</strong>TimeSelector)


Demo


<strong>Hildon</strong>AppMenu<br />

● Simple and finger-friendly menu <strong>for</strong> applications<br />

● Replacement <strong>for</strong> <strong>the</strong> unsuitable Diablo menu<br />

● Standard UI <strong>for</strong> data filtering/<strong>org</strong>anization through "filters"


Demo


O<strong>the</strong>r important improvements<br />

● <strong>Hildon</strong>Banner and <strong>Hildon</strong>Note <strong>the</strong>ming improved<br />

● New progress indicator as window manager decoration<br />

● Text entries with hints<br />

● Action area in GtkTreeView


Development


Massive clean up and deprecation<br />

● There were many (highly) specialized widgets from Chinook<br />

and be<strong>for</strong>e<br />

● Decided to deprecate <strong>the</strong>m<br />

● Examples:<br />

–Code dialog<br />

–Password dialogs<br />

–Login dialog<br />

–<strong>Hildon</strong>Volumebar deprecated in favor of GtkScale


Problems using standard GTK+ widgets<br />

● Theming limitations (e.g. <strong>Hildon</strong>CheckButton)<br />

● Hard to make changes work with legacy applications:<br />

–Maemo 4 and earlier: designed <strong>for</strong> stylus<br />

–<strong>Fremantle</strong>: designed <strong>for</strong> fingers, that is, bigger widgets<br />

–If we supersize all old widgets we can break legacy<br />

applications layout<br />

● New API and helper functions to provide <strong>Fremantle</strong> style<br />

widgets


Maemo GTK+<br />

● Maemo GTK+ is a branch with changes specific to <strong>the</strong><br />

plat<strong>for</strong>m<br />

● We try to keep Maemo GTK+ maintainable and close to<br />

upstream, having only stuff that<br />

– It's on its way to be accepted upstream<br />

– It can only be achieved by modifying GTK+ widgets<br />

internally<br />

● O<strong>the</strong>r widget changes are implemented by subclassing<br />

GTK+ widgets in <strong>Hildon</strong>


Developing <strong>for</strong> <strong>Fremantle</strong><br />

● <strong>Fremantle</strong> apps: quite different from traditional GNOME<br />

apps<br />

● Compiling a GNOME app <strong>for</strong> <strong>Fremantle</strong> and getting a<br />

<strong>Fremantle</strong> style is just impossible<br />

● Extra ef<strong>for</strong>t and knowledge is necessary to achieve <strong>the</strong><br />

<strong>Fremantle</strong> style (but it's worth it)


Things to do<br />

● Make <strong>the</strong> <strong>toolkit</strong> more independent from hildondesktop/maemo<br />

● Analyze which features could be moved/adapted to GTK+<br />

● Provide frequent releases <strong>for</strong> <strong>the</strong> community<br />

● Work in new and interesting widgets toge<strong>the</strong>r with <strong>the</strong><br />

maemo developers community (hint: BOF later today!)<br />

● Color picker? Font picker? Circular touch selector? (hint:<br />

BOF later today!)


Contributing<br />

Mailing list:<br />

https://garage.maemo.<strong>org</strong>/mailman/listinfo/hildon-devel<br />

Code:<br />

Very soon in http://maemo.gitorious.<strong>org</strong>!<br />

Bugzilla:<br />

http://bugs.maemo.<strong>org</strong>


Questions?


Thank You

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!