My First Maemo Desktop Widget

You might also like

Download as odp, pdf, or txt
Download as odp, pdf, or txt
You are on page 1of 9

My first desktop widget

Marc Ordinas i Llopis


marcoil
Desktop Widgets

Normal windows with special type:


_NET_WM_WINDOW_TYPE:
_HILDON_WM_WINDOW_TYPE_HOME_APPLET

Composited by the desktop on home

Maemo Barcelona Long Weekend


libhildondesktop

Lifetime management and positioning

Utility class HDHomePluginItem

Visibility and settings

Code at http://maemo.gitorious.org/fremantle-hildon-desktop/libhildondesktop

Maemo Barcelona Long Weekend


Lifetime management

Desktop file describes the widget

Library loaded by hildon-home

Position kept in GConf


Please see the example at

https://garage.maemo.org/svn/maemoexamples/trunk/example_desktop_widget/

Maemo Barcelona Long Weekend


HDHomePluginItem

Base class for desktop widgets

Derived from GtkWindow


Use as a container.

Or, draw directly using cairo.

Maemo Barcelona Long Weekend


Energy saving
is-on-current-desktop property

Listen to notification changes


notify::is-on-current-desktop

If not visible
Don't draw

Use as few resources as possible


Maemo Barcelona Long Weekend
Settings

Set property
HDHomePluginItem::settings

Listen to signal
HDHomePluginItem::show-settings

Maemo Barcelona Long Weekend


Transparency

In the realize method


Set colormap to RGBA.

Set app paintable to true.

In the expose_event method


Draw directly (using cairo, for example).

Maemo Barcelona Long Weekend


Questions?

Examples at
https://garage.maemo.org/projects/maemoexamples/

Maemo Barcelona Long Weekend

You might also like