Theme Management API

From WebOS Internals
Revision as of 21:25, 29 January 2010 by Egaudet (talk | contribs) (New page: == Theme Management API == This is an initial attempt at hashing out a secure, reliable Theme Management API. One of the main goals is to modify as little as we can of stock Palm files. ...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Theme Management API

This is an initial attempt at hashing out a secure, reliable Theme Management API. One of the main goals is to modify as little as we can of stock Palm files. The first step is launcher icon replacement, which currently consists of overwriting/replacing icon.png files.

Launcher Icons

Instead of replacing icon.png files, the new theme API will use C service to call applicationManager/updateLaunchPointIcon {} service method. This will change a launcher icon on the fly.

Overwrite CSS classes

The next part of themeing will be overwriting CSS classes (of any app's stylesheet as well as Palm stock global stylesheets). This will require a small patch to the framework to load a theme's CSS on top of any css being loaded.

Theme Designer API

In order to accomplish the icon and css replacements/overwrites, designers will put full paths to icon.png files for any app they want to replace the launch icon for inside of their theme directory. They will also put full paths to any CSS file including a class they would like to overwrite in their theme directory.

Each theme will supply a THEME_DIR consisting of these elements, for example a tiny theme that replaced messaging launcher icon and changed the symbol popup selected character color from blue to red would consist of a theme directory we will name tmapi_example will be supplied with the following:

tmapi_example/usr/palm/applications/com.palm.app.messaging/icon.png tmapi_example/usr/palm/frameworks/mojo/submissions/200.72/stylesheets/global.css

The global.css would contain only:

span.selected-char {

 color: red;

}


"Installing" the theme would simply be moving the tmapi_example directory to /media/internal/.themes/

.ipk files containing themes installing them /media/internal/.themes will be possible for easy preware installation of themes.