3. Theme.xml resources

There are 3 types of resources that are currently supported; colors, fonts and pixmaps ( images ). Each resource has an 'id' attribute so it can be later referenced.

Colors

A color looks like;

	<color id="blue" def="#0000ff" />

The definition is in the format #rrggbb[aa]. The alpha part is optional.

Fonts

A font looks like;

	<font id="myfont" def="Sans,fixed bold 8" />

or

	<font id="myfont" def="Sans Serif-8:bold|fixed" />

You can use XFT or GTK2 style font naming.

Pixmaps

A pixmap looks like;

	<pixmap id="close-button" filename="close_button.png" />

The filename lists an image in the current directory. Make sure the image format used is supported by your matchbox build. XPM is always supported but lacks an alpha channel like PNGS.

Our theme file now looks like;

<?xml version="1.0"?>
<theme name="my new theme" 
     author="Matthew Allum - mallum@handhelds.org"
       desc="A simple demonstartion theme" 
    version="1.0" engine_version="1" >

<color id="blue" def="#0000ff" />
<color id="black" def="#ffffff" />
<color id="bluegrey" def="#ccccff" />

<font id="myfont" def="Sans Serif-8|fixed" />

<pixmap id="close-button" filename="close_button.png" />
<pixmap id="next-button"  filename="next_button.png" />

<!-- frame definitions will go here -->

</theme>

Now we have the resources for are theme set up, the next step is to define the actual frame decorations, but first we must learn about the various window types supported by matchbox.