Customizing the Microsoft Smartphone 2002 Home Screen
Chris Muench
Microsoft MVP
Published October 2002
Revised December 2002
Applies to:
Microsoft® Windows® Powered Smartphone 2002
Summary: Learn about options for customizing the Microsoft Smartphone 2002 Home screen to display required information and to enable end users to personalize the device to suit their needs. (36 printed pages).
Introduction
Home Screen Components
Plug-Ins
Creating the Home Screen
Creating the Layout
Packaging the Home Screen
Creating an Information File
Post-Installation Configuration
Installing Applications on the Device
Installing Ring Tones and Device Sounds
Appendix A: Element Reference
Appendix B: Plug-in Reference
Conclusion
The Microsoft Smartphone 2002 Home screen provides a platform for delivering a customized starting page for end users. The Home screen is the first screen that is displayed each time the device is turned on and is the point from which users will open programs, access personal information, browse the Web, and initiate calls.
As a developer, you can customize the Home screen to display information that your users require, including data from Personal Information Manager (PIM) applications, and Web and network services. You can also modify the Home screen to display brand and logo information, and install multiple Home screen layouts to enable the user to personalize the device by choosing the layout they prefer.
You can fully customize the Home screen by installing new plug-ins and schemes. The plug-ins and schemes can be installed through over-the-air provisioning, by downloading to the device from a web site, or via e-mail attachments.
The components of the Home screen include:
- Layout. Defines which plug-ins are displayed on the home screen, the default formatting, and sets the background image for the Home screen. The layout is specified in the
.home.xml file
. - Color scheme. The default colors that are used on the device. The color scheme is specified in the
.scheme.xml
file. - Background image. The background image for Home screen layout. The background image is specified in a .gif, .jpg, or .bmp file.
The following example illustrates a Home screen with the tulips.jpg
background image, yellow.scheme.xml
, and simple_mru.home.xml
layout. We will use this example throughout this white paper to create the Home screen.
Figure 1. Tulips Home screen
Plug-ins are components that can display information on the Home screen. You can choose from standard plug-ins, or you can write custom Home screen plug-ins to display specific information on the Home screen.
Examples of custom plug-ins can include:
- Basic plug-in, such as including a large clock on the Home screen.
- Entertainment/Content plug-in, such as weather reports, or the status of a game in progress.
- Enterprise plug-in, such as notification of order status to a sales person.
Note For more information about the standard plug-ins, refer to the Microsoft Smartphone 2002 SDK.
The following development tools are required for customizing for the Home screen:
- Microsoft Smartphone 2002 Software Development Kit (SDK). Includes the
CABWizSP
utility. - Microsoft eMbedded Visual C++. Required to develop Home screen plug-ins.
Now you're ready to begin. To create the home screen, use the following step-by-step procedure:
- Create the color scheme and background image.
- Package the home screen.
- Add the layout (if required).
- Add the ring tones (if required).
Note As an optional step, you can write and add a custom plug-in before packaging the home screen. For more information about writing and adding a custom plug-in, refer to the Microsoft Smartphone 2002 SDK.
A color scheme is an XML file that defines the colors for the device, including the optional background image for the Home screen. A scheme file uses the <colorscheme>
tag as its top level tag. The <scheme>
tag can be used within a color scheme to set colors on the device. When the user selects a color scheme file, its settings supercede the color and background settings specified in the Home screen layout file. Scheme files only specify color settings and background settings.
Note The Smartphone 2002 supports Pocket PC 2002 format for color schemes. Use of the Smartphone 2002 format is recommended, as this format is optimized for the Smartphone 2002.
Use the scheme element in layouts to specify the color and gradient scheme. Colors set in the Home screen persist through the navigation bar, menu bar, and on focus highlight. Color schemes can also be specified in a separate XML file that only specifies color scheme. Use the file name format filename.scheme.xml
for these files. Settings in these files override any scheme color settings in the .home.xml
file and apply across the entire device. The user selects a scheme from the Home screen settings. The scheme titles are listed in the <title>
tag, which identifies the titles of the schemes. The lang
attribute of the <title>
tag identifies the language of the tag's content. Only the color element is supported for the scheme element. The color element takes a required name and value attribute, and it is used to set a device color, such as the window background color. The TRANSPARENT
color is not supported for the scheme element.
The following table lists the color attributes supported by Smartphone 2002.
Table 1. Color attributes supported by Smartphone 2002
Name | Items and areas controlled |
---|---|
|
Background color for all application windows and controls, including the transparent portions of the scroll bar stripes. |
|
Text color for list views, controls, and labels. Does not set menu text color, soft key text color, or button text color. |
|
Background color for static controls, such as labels. Also sets the background color for message boxes. |
|
Text color for static controls such as labels. |
|
Color of selection for list views, controls, menus, and soft key buttons. |
|
Color of text when an item has selection, such as a list view element or a control, and highlighted soft keys. |
|
Background color for menus. |
|
Text color for menu items. |
|
Color for disabled text, such as disabled menu items and soft key buttons. |
|
Starting color value for the background gradient. |
|
Ending color value for the background gradient. |
|
Starting color value for the secondary background gradient. |
|
Ending color value for the secondary background gradient. |
|
Gradient highlights are not supported. COLOR_HIGHGRADLEFT and COLOR_HIGHGRADRIGHT must be set to the same value. |
|
Gradient highlights are not supported. COLOR_HIGHGRADLEFT and COLOR_HIGHGRADRIGHT must be set to the same value. |
|
Starting color value for the title bar gradient. |
|
Ending color value for the title bar gradient. |
|
Color for the title bar text. |
|
Color of the dividing line between the main window and the soft key region, and the bounding rectangle around the scroll bar thumb. |
|
Unselected background color for the soft key region. |
|
Unselected text color for the soft key region, navigation glyph and scroll bar thumb. |
|
Color of the stripes on the scroll bar. |
|
Color of the title text in an alert. |
|
Background color for alerts. |
|
Color of the dividing lines on the Home screen. |
|
Color of unselected text on the Home screen. |
|
Color of selected text on the Home screen. |
|
Background color of a selected plug-in on the Home screen. |
The following example illustrates the color scheme file called "yellow.scheme.xml
":
<?xml version="1.0"?>
<colorscheme>
<title lang="0x0409">Yellow</title>
<title lang="0x0809">Yellow</title>
<title lang="0x040c">Yellow</title>
<title lang="0x0407">Yellow</title>
<title lang="0x0410">Yellow</title>
<title lang="0x0816">Yellow</title>
<title lang="0x040a">Yellow</title>
<scheme>
<color name="COLOR_WINDOW" value="#FFFFFF"/>
<color name="COLOR_STATIC" value="#FFFFFF"/>
<color name="COLOR_STATICTEXT" value="#000000"/>
<color name="COLOR_HIGHLIGHT" value="#FFA500"/>
<color name="COLOR_HIGHLIGHTTEXT" value="#000000"/>
<color name="COLOR_MENU" value="#FFE47F"/>
<color name="COLOR_MENUTEXT" value="#000000"/>
<color name="COLOR_GRAYTEXT" value="#808080"/>
<color name="COLOR_GRADLEFT" value="#FFFFFF"/>
<color name="COLOR_GRADRIGHT" value="#FFF2BF"/>
<color name="COLOR_INTGRADLEFT" value="#FFFFFF"/>
<color name="COLOR_INTGRADRIGHT" value="#FFCC00"/>
<color name="COLOR_TRAYGRADLEFT" value="#FFA500"/>
<color name="COLOR_TRAYGRADRIGHT" value="#FFCC00"/>
<color name="COLOR_HIGHGRADLEFT" value="#FFA500"/>
<color name="COLOR_HIGHGRADRIGHT" value="#FFA500"/>
<color name="COLOR_TRAYTEXT" value="#000000"/>
<color name="COLOR_WINDOWFRAME" value="#000000"/>
<color name="COLOR_BTNFACE" value="#FFE47F"/>
<color name="COLOR_BTNTEXT" value="#000000"/>
<color name="COLOR_SCROLLBAR" value="#FFCC00"/>
<color name="COLOR_ALERTWINDOW" value="#FFE47F"/>
<color name="COLOR_ALERTTITLE" value="#FFA500"/>
<color name="COLOR_ALERTRULE" value="#FFA500"/>
<color name="COLOR_HOMERULE" value="#FFA500"/>
<color name="COLOR_HOMETEXT" value="#000000"/>
<color name="COLOR_HOMEHIGHLIGHT" value="#FFA500"/>
<color name="COLOR_HOMEHIGHLIGHTTEXT" value="#FFFFFF"/>
</scheme>
</colorscheme>
The layout uses plug-ins to specify the content that is displayed on the home screen. The order in which the plug-ins are added to the layout file is the order in which the content is displayed on the home screen. The following example illustrates the Full Layout that is included in the Smartphone 2002 product:
Figure 2. Smartphone 2002 Screen Layout
Smartphone 2002 ships with a standard set of plug-ins, which you can use when creating the layout file. The standard plug-ins include:
- E-mail Counts
- All-Day Event
- Calendar
- Call Progress
- Carrier/SIM
- Cell Broadcast/SIM Toolkit
- Clock
- Icon Bar
- Missed Calls
- Messaging Counts
- MRU (Most Recently Used)
- Owner Info
- Profiles
- Text Label
Note For more information about the standard plug-ins, refer to the Microsoft Smartphone 2002 SDK or Appendix B of this document.
Home screen layouts are stored locally in individual files with the home.xml
extension. The layout files are written using a simple XML-based document format. A Home screen layout begins and ends with <home></home>
tags. Within the home block, the following elements must be present:
Table 2. Elements required in the home block
Element | Description |
---|---|
author | Name of the company that authored the layout. |
contacturl | URL for more information on the layout. |
title | Title of the layout. Used in the Home screen control panel when users select the layout to use. |
version | Version identification for the scheme. Format is determined by layout author. |
In addition to the above required elements, the following elements are used to define the actual layout of the screen:
Table 3. Elements used to define the actual layout of the screen
Element | Description |
---|---|
plugin | Inserts a plug-in into the layout. |
text | Contains a string of text for a specific language. |
background | Formats the background of a plug-in or the Home screen. |
format | Controls the formatting of text in a plug-in. |
default | Specifies the default background and formatting attributes for all plug-ins in the layout. |
For elements that accept file location attributes (such as the <plugin>
tag), the file locations (such as background images) take standard Windows-style file references (e.g. "\windows\image.gif
"). You can also use relative filenames for images. For example, if image.gif is in the same directory as the .home.xml
file, you can use "image.gif
" as the file reference.
The following example illustrates the simple layout file called "simple_MRU.home.xml
", which was illustrated at the beginning of this document:
<?xml version="1.0"?>
<home>
<author>Microsoft Corporation</author>
<contacturl>https://www.microsoft.com/</contacturl>
<title>Simple</title>
<title lang="0x0409">Simple (with MRU)</title>
<title lang="0x0809">Simple (with MRU)</title>
<title lang="0x040c">Simple (with MRU)</title>
<title lang="0x0407">Einfach (with MRU)</title>
<title lang="0x0410">Semplice (with MRU)</title>
<title lang="0x0816">Simples (with MRU)</title>
<title lang="0x040a">Simple (with MRU)</title>
<title lang="0x0804">?? (with MRU)</title>
<version>1.0</version>
<background bgimage="\windows\mint.jpg" valign="bottom"/>
<default font-face="nina" font-size="14" padding-left="4"
padding-right="4" bgcolor="transparent" fgcolor="COLOR_HOMETEXT"
padding-top="2">
</default>
<plugin clsid="{837FC251-FE69-43ad-84E0-EBCEDEBA0884}
" name="iconbar" height="20">
<iconbar fgcolor="COLOR_TRAYTEXT"/>
<background gradient="title" bgcolor="COLOR_TRAYGRADLEFT"
b-border-width="1" b-border-color="COLOR_WINDOWFRAME"/>
</plugin>
<plugin clsid="{E09043DF-510E-4841-B652-388316977A7A}"
name="carrier" height="40">
<label>
<text><carrier/></text>
</label>
<clock>
<date valign="top" mode="short" halign="right" w="70"
x="106"/>
<time halign="right" w="70" x="106" y="14"/>
</clock>
</plugin>
<plugin file="sysplug.dll" clsid="{5419F376-6520-4407-B8B8-740F5B353EDA}"
name="label" height="115">
</plugin>
<plugin clsid="{79EFB752-CB70-446d-B317-499723482B3D}
" name="startmru" height="22">
<mru icon-size="16" y="2"/>
</plugin>
</home>
Now you're ready to create the Information File and package the application in a .cab
file.
New Home screen layouts can be delivered to a Smartphone 2002 in the form of download cabinet files (.cabs
). The process for creating a Home screen .cab file is as follows:
- Include the scheme file that you created for the device, including a bitmap file for the background image, if appropriate.
- Create an Information file (
INF
) that describes where each file should be placed on the device. TheINF
file will be read by the CABWizSP utility. - Use CABWizSP to generate a
.cab
file, and then change the extension of the file to .hme. Home Screen layouts use the.hme
extension instead of the .cab extension. - Send the
.hme
file to the device. These files can be downloaded to the device by using Pocket Internet Explorer, or they can be loaded off a MultiMediaCard that is equipped with an autorun application. In addition,.hme
files can be added to the device via e-mail attachments.
The Information file (INF
) describes installation tasks, such as where the files should be placed when the .cab file is installed and which registry keys should be created or modified. The following examples illustrate a typical INF
file that is used to install a home screen.
This example installs a background image and a color scheme:
[Version]
Signature = "$Windows NT$" ; required as-is
Provider = "Microsoft" ; full app name will be
"<Provider> <AppName>"
CESignature = "$Windows CE$" ; required as-is
[CEStrings]
AppName = "Tulips Scheme" ; full app name will be
"<Provider> <AppName>"
[CEDevice.ARM720]
ProcessorType = 0
[SourceDisksNames] ; Location of files to
1 = ,"Common files",,. include. They are
in the current directory.
[SourceDisksFiles]
tulips.jpg = 1
yellow.scheme.xml = 1
[DefaultInstall]
CopyFiles = CopyToHomeDir
[DestinationDirs]
CopyToHomeDir = 0,%CE19%\Home
[CopyToHomeDir]
"Tulips.jpg",tulips.jpg
"yellow.scheme.xml",yellow.scheme.xml
This example installs a background image, color scheme, and layout:
[Version]
Signature = "$Windows NT$" ; required as-is
Provider = "Microsoft" ; full app name will be
"<Provider> <AppName>"
CESignature = "$Windows CE$" ; required as-is
[CEStrings]
AppName = "Tulips Scheme" ; full app name will be
"<Provider> <AppName>"
[CEDevice.ARM720]
ProcessorType = 0
[SourceDisksNames] ; Location of files to
1 = ,"Common files",,. include. They are in the
current directory.
[SourceDisksFiles]
tulips.jpg = 1
yellow.scheme.xml = 1
simple_MRU.home.xml = 1
[DefaultInstall]
CopyFiles = CopyToHomeDir
[DestinationDirs]
CopyToHomeDir = 0,%CE19%\Home
[CopyToHomeDir]
"Tulips.jpg",tulips.jpg
"yellow.scheme.xml",yellow.scheme.xml
"simple_MRU.home.xml",simple_mru.home.xml
This example installs a background image, color scheme, layout, and ring tone:
[Version]
Signature = "$Windows NT$" ; required as-is
Provider = "Microsoft" ; full app name will be
"<Provider> <AppName>"
CESignature = "$Windows CE$" ; required as-is
[CEStrings]
AppName = "Tulips Scheme" ; full app name will be
"<Provider> <AppName>"
[CEDevice.ARM720]
ProcessorType = 0
[SourceDisksNames] ; Location of files to
1 = ,"Common files",,. include. They are in the
current directory.
[SourceDisksFiles]
tulips.jpg = 1
yellow.scheme.xml = 1
ringtone.wav = 1
[DefaultInstall]
CopyFiles = CopyToHomeDir, CopyToSoundsDir
[DestinationDirs]
CopyToHomeDir = 0,%CE19%\Home
CopyToSoundsDir = 0,%CE19%\Sounds
[CopyToHomeDir]
"Tulips.jpg",tulips.jpg
"yellow.scheme.xml",yellow.scheme.xml
[CopyToSoundsDir]
"ringtone.wav",ringtone.wav
Note For more information about the INF file, refer to the Microsoft Smartphone 2002 SDK
The INF
installs the included files (such as background image, color scheme, layout, and ring tone) onto the device, but it does not set the active Home screen, color scheme, or background image to the newly installed files. To automatically switch to the newly installed files, you must include a post-installation configuration file in the .cab
file.
The following example illustrates the postinstall.xml
:
<characteristic type="Home">
<characteristic type="HKCU\ControlPanel\Home">
<parm name="Scheme" value="%CE19%\Home\simple_MRU.home.xml"
translation="install"/>
<parm name="ColorScheme" value="%CE19%\Home\yellow.scheme.xml"
translation="install"/>
<parm name="BgImage" value="%CE19%\Home\Tulips.jpg" translation="install"/>
</characteristic>
</characteristic>
In this example, the %CE19%
entry is replaced by the installer with :"\Application Data\Home".
The "BgImage
" entry changes the background image, the "ColorScheme
" entry changes the color scheme, and the "Scheme" entry changes the home screen layout.
If you want to add a ring tone, include the following XML example in addition to the previous example of the postinstall.xml
file:
<characteristic type="Sounds">
<characteristic type="HKCU\ControlPanel\Sounds">
<characteristic type="RingTone0">
<parm name="Sound" value="%CE19%\Sounds\ringtone.wav" translation="install"/>
</characteristic>
</characteristic>
</characteristic>
Note For more information about post-installation configuration, see the Smartphone 2002 SDK.
CABWizSP is a command-line utility that takes an instruction file (INF
) and optional pre-XML and post-XML files and creates a .cab file that is suitable for the Smartphone 2002. The .cab file contains an XML file with instructions for the file operations and registry changes. The Smartphone CAB Installer and Configuration Manager process the .cab
file after it reaches the device. The syntax for CABWizSP is as follows:
The following example illustrates how to create the .cab file and rename it to the .hme file:
cabwizsp tulips.inf /postxml postinstall.xml /cpu ARM720
move tulips.ARM720.cab tulips.hme
Note For more information about CABWizSP, see the Smartphone 2002 SDK.
Depending on the operator, home screens on a Smartphone 2002 may need to be digitally signed by using the signCode.msi and following the wizard prompts. If this is necessary, refer to the Smartphone 2002 SDK for more information.
After using CABWizSP to package an application, you can install the application on the device by using any of the following methods:
- Posting the .cab file on a Web site for customers to download from Pocket Internet Explorer.
- Docking the device and using Microsoft ActiveSync® to send the application to the device from a desktop computer.
- Sending a link to the
.cab
file in an e-mail message. When a customer clicks the link in the Inbox, the install or update process will automatically be initiated. - Sending the .cab file as an attachment in an e-mail message. When customers open the attachment, the installation process will initiate.
- Distributing the application on a Multimedia memory card (MMC) that customers can plug directly into the handset. This option requires you to provide an autorun install program as well.
Once the .cab
reaches the device, the Smartphone CAB Installer first verifies that the .cab
file is signed, and then extracts the contents of the .cab file. It sends the setup XML file to the Configuration Manager for processing. Configuration Manager calls various Configuration Service Providers (CSPs) to configure the device and complete the installation.
In addition to providing Home screen options, you can provide different ring tone options for users.
The sound formats that are supported in Smartphone 2002 include:
.wav-PCM
, 8 or 16 bit, mono or stereo, sample rate from 8kHz-48kHz.- MIDI-Only Type 0.
Users can acquire new ring tone files by either:
- Downloading a
.wav
or MIDI file through Pocket Internet Explorer. The device router then sends the.wav
file to the proper location on the phone. - Receiving .wav or MIDI files though e-mail. As with downloaded files, the device router sends the
.wav
file to the proper location on the phone.
When the user downloads a ring tone, the shell executes the appropriate program based on the file extension (.wav
or .midi
), the ring tone handler is started and the user can choose whether to play, save, or discard the ring tone. The ring tone is added to the device only if the user chooses to save it. You can install ring tones by storing them in the Sounds directory. This makes them available on the Sounds tab on the Settings page.
The following table lists the ring tones and device sounds that you can use with the Smartphone 2002.
Table 4. Ring tones and device sounds for Smartphone 2002
Parameter | Location | Parameter name |
---|---|---|
Ring Tone | HKCU\ControlPanel\Sounds\ RingTone1 HKCU\ControlPanel\Sounds\ SystemAsterisk | Sound
Sound |
System Default Sound | HKCU\ControlPanel\Sounds\ SystemDefault | Sound |
System Exclamation | HKCU\ControlPanel\Sounds\ SystemExclamation | Sound |
Menu Popup | HKCU\ControlPanel\Sounds\ MenuPopup | Sound |
Menu Command | HKCU\ControlPanel\Sounds\ MenuCommand | Sound |
System Question | HKCU\ControlPanel\Sounds\ SystemQuestion | Sound |
System Start | HKCU\ControlPanel\Sounds\ SystemStart | Sound |
Busy Tone | HKCU\ControlPanel\Sounds\ SystemBusyTone | Sound |
System Call Waiting | HKCU\ControlPanel\Sounds\ SystemCallWaiting | Sound |
Reminder | HKCU\ControlPanel\Sounds\ Reminder | Sound |
HKCU\ControlPanel\Sounds\ E-mail | Sound | |
SMS | HKCU\ControlPanel\Sounds\ SMS | Sound |
Voice Mail | HKCU\ControlPanel\Sounds\ VoiceMail | Sound |
Tool Kit | HKCU\ControlPanel\Sounds\ ToolKit | Sound |
Password | HKCU\ControlPanel\Sounds\ Password | Sound |
Clock | HKCU\ControlPanel\Sounds\ Clock | Sound |
Warning | HKCU\ControlPanel\Sounds\ Warning | Sound |
Ring Tone | HKCU\ControlPanel\Sounds\ RingTone0 | Sound |
Cell Broadcast | HKCU\ControlPanel\Sounds\ CellBroadcast | Sound |
IM | HKCU\ControlPanel\Sounds\IM | Sound |
The <home> element encapsulates an entire home screen layout. It has no attributes.
Example:
<home>
…
</home>
The <plugin> element is used to insert a plug-in into the layout.
Table 5. Required attributes
Attribute | Description |
---|---|
File | Location of the DLL with the plug-in |
clsid | Unique identifier of the plug-in |
height | Height of the plug-in in pixels |
The plug-in element may contain any number of sub elements, which are passed to the DLL for handling by the plug-in itself. This provides plug-in authors with a flexible method of receiving and specifying settings.
Example:
<plugin file="sysplug.dll" clsid="{E09043DF-510E-4841-B652-
388316977A7A}" height="20">
…
</plug-in>
The optional background element specifies the background formatting for home screen layouts and individual plug-ins.
Table 6. Optional attributes
Attribute | Description |
---|---|
Bgcolor | Background color for the plug-in. Default is transparent. |
bgimage | Background image for the plug-in, drawn over top of the background color. Default is system foreground color. |
Halign | Horizontal alignment of the background image within the plug-in's drawable region. Default is left. |
Valign | Vertical alignment of the background image within the plug-in's drawable region. Default is top. |
l-border-width t-border-width r-border-width b-border-width |
Specifies the width of the left/top/right/bottom border in pixels. Default value is no width (i.e. no border). |
l-border-color t-border-color r-border-color b-border-color |
Specifies the color of the left/top/right/bottom border. Default value is no black. |
gradient | Specifies which gradient to use when drawing the background. Possible values are "title" and "app". Default is no gradient. If the plug-in accepts selection and the background is set to app, the background will draw using the selected gradient colors automatically. This can be overridden by using a <format state="selected"/> element within the plug-in. |
Note that borders and border colors are only supported on plug-in backgrounds, not on layout backgrounds.
The background element can also take a standard <format/> sub-element to override the background formatting for specific plug-in states (such as selected). Only the attributes in the above table are used from the <format/> tag; any extra attributes (such as x, y) are ignored.
Example:
<plugin file="sysplug.dll" clsid="{44FA0F8C-082F-42b4-BE49-
82559F23D5D4}">
<background bgcolor="#FFFFFF"/>
<time bgcolor="#0000FF" fgcolor="#FFFF00" mode="24"/>
<date bgcolor="#0000FF" fgcolor="#FF00FF" mode="long"/>
</plug-in>
The text element is for specifying a string of text in a plug-in. It supports attributes that allow a single home screen layout to work on multiple languages.
Table 7. Required attributes
Attribute | Description |
---|---|
Lang | Hex value for the language. Values are:
0x0409: English (U.S.) |
If the language required cannot be found, the text for English is used. If no English text is found, the first available language is used.
Example:
<label bgtext="#FFFFFF">
<text lang="0x0409">Hello</text>
<text lang="0x040c">Bonjour</text>
</label>
The format tag is used to override default visual display of text within a plug-in.
Table 8. Optional attributes
Attribute | Description |
---|---|
state | The plug-in state to which the formatting applies. Default is unselected. Supported states are selected and unselected. |
bgcolor | The background color for the element. The background image is drawn over-top of the background color. Default value is the system background color. 'transparent' is also accepted as a value. Does not apply to text backgrounds. |
bgtext | Background color for text. Default value is transparent. |
font-face | Font face used to display the element's text. Default value is the system font. |
font-size | Size, in pixels, of the font used to display the element's text. Default value is the system size. |
font-style | Whether the font is italics or normal. Default value is normal. |
font-weight | Controls the weight of the font display. Standard values are between 100 and 900, increasing in 100-weight increments. The values 'bold' (equals 700) and 'normal' (equals 400) are also accepted. Default value is 400. |
fgcolor | The foreground color of an element. Default value is the system foreground color. |
halign | The horizontal alignment of an element (usually text). Standard values are 'left', 'center', and 'right'. Default value is left. |
valign | The vertical alignment of an element (usually text). Standard values are 'top', 'center', and 'bottom'. Default value is top. Only applies to single-line text (when specified, text will not wrap and carriage returns will be converted to spaces). |
X | Specifies the starting position on the horizontal axis of a graphical element. Origin is at (0,0). |
Y | Specifies the starting position on the vertical axis of a graphical element. Origin is at (0,0). |
W | Specifies the width of a graphical element. If omitted, the width is assumed to be the width of plug-in's drawable region (typically the screen width). |
H | Specifies the height of a graphical element. If omitted, the height is assumed to be the height of the plug-in's drawable region (typically the height of the background graphic). |
padding-left | Specifices the distance between the bounding rectangle around text and (usually) the left border of the plug-in. Default value 0px. |
padding-right | Specifices the distance between the bounding rectangle around text and (usually) the right border of the plug-in. Default value is 0px. |
padding-top | Specifices the distance between the bounding rectangle around text and (usually) the top border of the plug-in. Default value is 0px. |
padding-bottom | Specifices the distance between the bounding rectangle around text and (usually) the bottom border of the plug-in. Default value is 0px. |
Colors are specified using the HTML/CSS format, #RRGGBB
, where RR, GG,
and BB
are the hex amounts for the red, green, and blue components of the color.
The state
attribute is used to set formatting for a specific plug-in state. Formatting attributes for a specified state override any formatting values specified on a parent element. Formatting attributes omitted from the <format/>
tag are inherited from the parent element, the <default>
tag, and the default specified in the above table (in that order).
Example:
<plugin file="sysplug.dll" clsid="{5419F376-6520-4407-B8B8-
740F5B353EDA}">
<label bgtext="#FFFFFF" fgcolor="#000000">
<format state="selected" bgtext="#0000FF"/>
<text>Hello</text>
</label>
</plug-in>
The <default/>
tag specifies the default text formatting for all plug-ins within the layout. It accepts the standard <format/>
attributes. It may also contain <format/>
sub-elements.
Example:
<default bgtext="#FFFFFF" fgcolor="#FFFFFF">
<format state="selected" bgtext="#0000FF">
</default>
The <scheme>
tag specifies the color and gradient scheme for the entire device. This allows a home screen author to provide colors that match the home screen visuals across the entire device.
One element is supported within the scheme tag: <color>
. The tag takes a required name and value attribute, and it is used to set a device color, such as the window background color. The "transparent" color is not supported within <scheme> tags.
The following table lists the color attributes supported by Smartphone 2002.
Table 9. Color attributes supported by Smartphone 2002
Name | Items and areas controlled |
---|---|
COLOR_WINDOW |
Background color for all application windows and controls, including the transparent portions of the scroll bar stripes. |
COLOR_WINDOWTEXT |
Text color for list views, controls, and labels. Does not set menu text color, soft key text color, or button text color. |
COLOR_STATIC |
Background color for static controls, such as labels. Also sets the background color for message boxes. |
COLOR_STATICTEXT |
Text color for static controls such as labels. |
COLOR_HIGHLIGHT |
Color of selection for list views, controls, menus, and soft key buttons. |
COLOR_HIGHLIGHTTEXT |
Color of text when an item has selection, such as a list view element or a control, and highlighted soft keys. |
COLOR_MENU |
Background color for menus. |
COLOR_MENUTEXT |
Text color for menu items. |
COLOR_GRAYTEXT |
Color for disabled text, such as disabled menu items and soft key buttons. |
COLOR_GRADLEFT |
Starting color value for the background gradient. |
COLOR_GRADRIGHT |
Ending color value for the background gradient. |
COLOR_INTGRADLEFT |
Starting color value for the secondary background gradient. |
COLOR_INTGRADRIGHT |
Ending color value for the secondary background gradient. |
COLOR_HIGHGRADLEFT |
Gradient highlights are not supported. COLOR_HIGHGRADLEFT and COLOR_HIGHGRADRIGHT must be set to the same value. |
COLOR_HIGHGRADRIGHT |
Gradient highlights are not supported. COLOR_HIGHGRADLEFT and COLOR_HIGHGRADRIGHT must be set to the same value. |
COLOR_TRAYGRADLEFT |
Starting color value for the title bar gradient. |
COLOR_TRAYGRADRIGHT |
Ending color value for the title bar gradient. |
COLOR_TRAYTEXT |
Color for the title bar text. |
COLOR_WINDOWFRAME |
Color of the dividing line between the main window and the soft key region, and the bounding rectangle around the scroll bar thumb. |
COLOR_BTNFACE |
Unselected background color for the soft key region. |
COLOR_BTNTEXT |
Unselected text color for the soft key region, navigation glyph and scroll bar thumb. |
COLOR_SCROLLBAR |
Color of the stripes on the scroll bar. |
COLOR_ALERTTITLE |
Color of the title text in an alert. |
COLOR_ALERTWINDOW |
Background color for alerts. |
COLOR_ALERTRULE |
Color of the dividing lines on the Home screen. |
COLOR_HOMERULE |
Color of unselected text on the Home screen. |
COLOR_HOMEHIGHLIGHTTEXT |
Color of selected text on the Home screen. |
COLOR_HOMEHIGHLIGHT |
Background color of a selected plug-in on the Home screen. |
Description: Displays assorted phone status with icons.
Text wraps if necessary: Not applicable.
Receives selection: No.
Hide on phone lock: No.
Class ID: {837FC251-FE69-43ad-84E0-EBCEDEBA0884}
The following icon groups are used in the icon bar:
Group 1: New voice message, new SMS, new email, new fax, IM Notification SIM full, blank
Group 2: Sync error, GPRS coverage
Group 3: Ringer off, blank
Group 4: Roaming, blank
Group 5: Call forward, blank
Group 6: Missed call, blank
Group 7: Selected line, blank
Group 8: Battery charging, low battery, battery strength
Group 9: Call on hold, voice call active, data call active, radio off, no SIM, no service, signal strength
The order of each icon in the group indicates the icon's priority, from highest to lowest. For example, if both a new voice message and a new e-mail message have arrived, the voice message icon will be displayed.
The groups are positioned as follows on a 160x240 device screen:
Figure 3. Positioning of groups on a 160x240 device screen
On screen sizes larger than 160x240, group 1 is anchored on the left side of the icon bar. The remaining icons are right justified, with blank space inserted between group 1 and 2 as needed.
The icon bar plug-in can be configured using the <iconbar/>
element. The following optional attribute is supported:
Table 10. Optional attribute
Attribute | Description |
---|---|
Fgcolor |
The color used to draw the icons. |
To control the background of the icon bar, use the <background/>
tag. The following XML shows an implementation example for this plug-in.
<plugin file="sysplug.dll" clsid="{837FC251-FE69-43ad-84E0-
EBCEDEBA0884}">
<iconbar fgcolor="#FFFF00"/>
<background bgcolor="#0000FF"/>
</plugin>
Description: Displays current PLMN and SIM status errors.
Text wraps if necessary: Yes.
Receives selection: No.
Hide on phone lock: No.
Class ID: {E09043DF-510E-4841-B652-388316977A7A}
The <carrier/> tag is the only supported replacement variable. This tag displays the current carrier status as indicated in the following table.
Table 11. Current carrier status
Status Item | Status Text |
---|---|
Current PLMN | Text returned from radio module |
Invalid SIM | Invalid SIM |
Blocked SIM | SIM Blocked |
Radio Off | Radio Off |
SIM registration fails | SIM Registration Failed |
Looking for a carrier | Searching… |
In addition to the <label/>
element, the carrier/SIM plug-in supports <date/>
and <time/>
elements with a<clock>
element. These elements behave the same way as the <date/>
and <time/>
elements of the clock plug-in.
The following XML shows an implementation example for this plug-in.
<plugin file="sysplug.dll" clsid="{E09043DF-510E-4841-B652-
388316977A7A}" height="40">
<label>
<text><carrier/></text>
</label>
<clock>
<time y="17"/>
</clock>
</plugin>
Refer to the Clock Plug-In for more information. To control the background of the plug-in, use the <background/>
tag.
Description: Displays status of active phone calls, call forwarding, and call barring.
Text wraps if necessary: Yes.
Receives selection: Yes, when call is in progress. Launches call progress. No when a call is not in progress.
Hide on phone lock: No.
Class ID: {37391041-C324-4725-BEE1-3232ED3539CA}
The <progress/> element is the only variable supported. This element indicates the current call progress state according to the values in the following table.
Table 12. Values for the current call progress state
State | Text Displayed |
---|---|
No calls | Nothing, display is blank |
No calls, call forwarding unconditional | 'Call Forwarding' |
No calls, call barring enabled | 'Call Barring' |
Dialing, not connected | 'Dialing <number/name>' |
Single voice call connected | Caller ID information |
Single voice call on hold | Caller ID information, Icon |
Conference voice call | 'Conference' |
Multiple voice calls | 'Multiple Calls' |
Incoming voice call | Caller ID information |
Single data call connected | 'Data Call' |
Ringer off | 'Ringer off' |
Call on hold | 'Hold: <number/name>' |
The caller ID information is one of the following, in priority order from highest to lowest: 'Number blocked', 'Number unavailable', name of caller (if available via contacts lookup or from the network), number of caller.
In addition to the <label>
element, a <format/>
tag can be specified at the top level of the plug-in to indicate that the entire plug-in should hide when no call is in progress. The XML for this behavior is as follows:
<format state="nocall" visible="false"/>
If this tag is omitted, the plug-in is shown when no calls are in progress. To control the background of the plug-in, use the <background/>
tag.
The following XML shows an implementation example for this plug-in.
<plugin file="sysplug.dll" clsid="{37391041-C324-4725-BEE1-
3232ED3539CA}" height="41">
<background>
<format state="selected" bgcolor="#2A2CC5"/>
</background>
<format state="nocall" visible="false"/>
<label>
<text lang="0x0409">Call in progress:</text>
<text lang="0x0809">Call in progress:</text>
<text lang="0x040c">Appel en cours:</text>
<text lang="0x0407">Anruf in Ausfhrung:</text>
<text lang="0x0410">Chiamata in corso:</text>
<text lang="0x0816">Chamada em curso:</text>
<text lang="0x040a">Llamada en curso:</text>
</label>
<label y="17">
<text><progress/></text>
</label>
</plugin>
Description: Displays the system date or time.
Text wraps if necessary: Yes.
Receives selection: No.
Hide on phone lock: No.
Class ID: {44FA0F8C-082F-42b4-BE49-
82559F23D5D4}
Formatting for this plug-in occurs through the <date/>
and <time/>
elements. If either the <date>
or <time/>
elements are omitted, that particular piece of information is not shown.
In addition to the standard format attributes, the <date/>
and <time/>
elements accept the optional attribute in the following table.
Table 13. Optional attribute
Attribute | Description |
---|---|
mode | For <time/> , either "12" (h:mm tt) or "24" (H:mm). For <date/> , either "short" or "long", which format the date according to the short and long formats specified in regional settings. If omitted in the time tag, the current regional setting format is used. If omitted in the date tag, the current regional setting format for short date is used. |
The following XML shows an implementation example for this plug-in.
<plugin file="sysplug.dll" clsid="{44FA0F8C-082F-42b4-
BE49-82559F23D5D4}">
<time bgtext="#0000FF" fgcolor="#FFFF00" mode="24"/>
<date bgtext="#0000FF" fgcolor="#FF00FF" mode="long"/>
</plugin>
Description: Displays the count of missed calls.
Text wraps if necessary: Yes.
Receives selection: Yes. Action launches call history.
Hide on phone lock: No.
Class ID: {0BA8ABB8-1F1D-417f-88C6-DA8530E2E7A6}
The <calls/>
element is the only variable replacement supported, and is replaced with the count of missed calls. To control the background of the plug-in, use the <background/>
tag. To hide the plug-in when there are no missed calls use the state="
nocall"
attribute of the format tag.
The following XML shows an implementation example for this plug-in.
<plugin clsid="{0BA8ABB8-1F1D-417f-88C6-DA8530E2E7A6}
" name="missedcalls" height="20">
<background>
<format state="selected" bgcolor="COLOR_HOMEHIGHLIGHT"/>
</background>
<format state="nocall" visible="false"/>
<label h="16">
<text lang="0x0409">Missed calls: <calls/></text>
</label>
</plugin>
Description: Displays the currently active profile.
Text wraps if necessary: Yes.
Receives selection: Yes. Action launches profile picker.
Hide on phone lock: No.
Class ID: {95976968-45D5-40c9-9779-2B859B1C2FEC}
The <profile/>
element is the only variable replacement supported. To control the background of the plug-in, use the <background/>
tag.
The following XML shows an implementation example for this plug-in.
<plugin file="sysplug.dll" clsid="{95976968-45D5-40c9-9779-2B859B1C2FEC}"
height="20">
<background b-border-width="0">
<format state="selected" bgcolor="#2A2CC5"/>
</background>
<label>
<text lang="0x0409">Profile: <profile/></text>
<text lang="0x0809">Profile:<profile/></text>
<text lang="0x040c">Profil: <profile/></text>
<text lang="0x0407">Profil: <profile/></text>
<text lang="0x0410">Profilo: <profile/></text>
<text lang="0x0816">Perfil: <profile/></text>
<text lang="0x040a">Perfil: <profile/></text>
</label>
</plugin>
Description: Displays cell broadcast- and SIM Toolkit-related messages.
Text wraps if necessary: No (text scrolls horizontally when plug-in has focus).
Receives selection: Yes.
Hide on phone lock: No.
Class ID: {4e822425-a00f-497c-80ff-1c554665a369}
The text is specified using the <scrolltext>
element and its textsource attribute. To control the background of the plug-in, use the <background/>
tag.
The following table lists the supported <scrolltext>
attributes.
Table 14. Supported <scrolltext>
attributes
Attribute | Text displayed |
---|---|
simtkitidletext | SIM Toolkit idle message |
cellbroadcast | Most recently received immediate cell broadcast message |
The plug-in is only visible if the attribute specified in the <scrolltext>
element has text to display (if the SIM Toolkit application has specified an idle text message, or an immediate cell broadcast message has been received, for example).
The following XML shows an implementation example for this plug-in.
<plugin clsid="{4e822425-a00f-497c-80ff-1c554665a369}
" name="cooltext" height="20">
<scrolltext textsource="cellbroadcast"/>
<background>
<format state="selected" bgcolor="COLOR_HOMEHIGHLIGHT"/>
</background>
</plugin>
Description: Displays a static piece of text.
Text wraps if necessary: Yes.
Receives selection: No.
Hide on phone lock: No.
Class ID: {5419F376-6520-4407-B8B8-740F5B353EDA}
The text is specified using the <label>
element. To control the background of the plug-in, use the <background/>
tag.
The following XML shows an implementation example for this plug-in.
<plugin file="sysplug.dll" clsid="{5419F376-6520-4407-B8B8-
740F5B353EDA}">
<label bgtext="#FFFFFF">
<text lang="0x0409">Hello</text>
<text lang="0x040c">Bonjour</text>
</label>
</plugin>
Description: Displays the next appointment on the user's schedule.
Text wraps if necessary: Yes.
Receives selection: Yes. Action launches calendar application.
Hide on phone lock: No.
Class ID: {865A354A-4A96-4687-B001-C155DC0DBE76}
The following variables are supported: <subject/>, <location/>
, and <time/>
. They display the subject of the appointment, the location of the appointment, and the time of the appointment, respectively.
If the appointment takes place on the current day, only the start time of the appointment is shown by the <time/>
variable. If the appointment takes place on a day in the future, both the date and time of the appointment are shown. The date and time are formatted using the current date and time formatting specified within the regional settings.
A conflicting appointment icon can be positioned by using the <conflict>
tag. If the appointment being displayed is in conflict with another, a conflict icon is shown at the location specified by a <format/>
tag using the x and y attributes. Aside from the x and y attributes, all other attributes are ignored in the <format>
tag for the conflict icon.
The precedence order for selecting an appointment to display when there is a conflict is as follows: Busy; Tentative; Free.
The priority of the appointment is not considered. If more than one appointment has the same precedence, the order of the appointments in the database determines the one displayed. Appointments made on the device will not have a priority to synchronize with the desktop.
To control the background of the plug-in, use the <background/>
tag.
The following XML shows an implementation example for this plug-in.
<plugin file="sysplug.dll" clsid="{865A354A-4A96-4687-B001-
C155DC0DBE76}" height="40">
<background>
<format state="selected" bgcolor="#2A2CC5"/>
</background>
<label h="16">
<text><subject/></text>
</label>
<label y="17">
<text><time/></text>
</label>
</plugin>
Description: Displays one of today's all-day appointments on the user's schedule.
Text wraps if necessary: Yes.
Receives selection: Yes. Action launches calendar application.
Hide on phone lock: No.
Class ID: {2FFD93B3-0FF0-4228-A6D6-D2DF177D7D92}
The only supported variable is the <subject/>
element, which displays the subject of the all day event.
In addition to the <label>
element, a <format/>
tag can be specified at the top level of the plug-in to indicate that the entire plug-in should hide when there is no all day event for the current date. The XML for this behavior is as follows.
<format state="noevent" visible="false"/>
If this tag is omitted, the plug-in is shown when no all day events exist for the current date.
The precedence order for selecting an appointment to display when multiple conflict is as follows: Busy; Tentative; Free.
The priority of the appointment is not considered. If more than one appointment has the same precedence, the order of the appointments in the database determines the one displayed.
To control the background of the plug-in, use the<background/>
tag.
The following XML shows an implementation example for this plug-in.
<plugin file="sysplug.dll" clsid="{2FFD93B3-0FF0-4228-A6D6-
D2DF177D7D92}" height="20">
<background>
<format state="selected" bgcolor="#2A2CC5"/>
</background>
<format state="noevent" visible="false"/>
<label h="16">
<text><subject/></text>
</label>
</plugin>
Description: Displays the count of unread messages.
Text wraps if necessary: Yes.
Receives selection: Yes. Action launches messaging application.
Hide on phone lock: No.
Class ID: {2F930BF0-6FE9-4a53-9E17-88E9247BAB48}
The following variables are supported: <unreadEmail/>, <unreadSMS/>, <unreadMMS/>
, and <unreadVMail/>
. They show the count of unread e-mail messages, unread SMS messages, and unread voice mails, respectively. The count of unread voice mails depends on what is reported to the device by SMS notifications from the network.
To control the background of the plug-in, use the <background/>
tag.
The following XML shows an implementation example for this plug-in.
<plugin file="sysplug.dll" clsid="{2F930BF0-6FE9-4a53-9E17-
88E9247BAB48}" height="20">
<background>
<format state="selected" bgcolor="#2A2CC5"/>
</background>
<label>
<text lang="0x0409">E-mail (<unreadEmail/>), SMS
(<unreadSMS/>)</text>
<text lang="0x0809">E-mail (<unreadEmail/>), SMS
(<unreadSMS/>)</text>
<text lang="0x040c">email (<unreadEmail/>), SMS
(<unreadSMS/>)</text>
<text lang="0x0407">E-Mails (<unreadEmail/>), SMS
(<unreadSMS/>)</text>
<text lang="0x0410">E-mail (<unreadEmail/>), SMS
(<unreadSMS/>)</text>
<text lang="0x0816">Correio (<unreadEmail/>), SMS
(<unreadSMS/>)</text>
<text lang="0x040a">Correo (<unreadEmail/>), SMS
(<unreadSMS/>)</text>
</label>
</plugin>
Description: Displays the information from the owner control panel
Text wraps if necessary: Yes
Receives selection: No.
Hide on phone lock: No
Class ID: {4824B576-EFFE-45cf-BAE9-649B930CD244}
The following variables are supported: <name/>, <phone/>, <email/>
, and <notes/>
. They show the owner's name, phone number, e-mail address, and owner notes, respectively.
To control the background of the plug-in, use the <background/>
tag.
The following XML shows an implementation example for this plug-in.
<plugin file="sysplug.dll" clsid="{4824B576-EFFE-45cf-BAE9-
649B930CD244}" height="20">
<background>
<format state="selected" bgcolor="#2A2CC5"/>
</background>
<label>
<text><name/></text>
</label>
</plugin>
Description: Displays icons for the most recently used applications
Text wraps if necessary: Yes
Receives selection: Yes
Hide on phone lock: No
Class ID: {79EFB752-CB70-446d-B317-499723482B3D}
The MRU icons are positioned using the <mru/>
element. The supported attributes of this element are listed in the following table.
Table 15. Supported attributes of the <mru/>
element
Attribute | Description |
---|---|
icon-size | Acceptable values are "16" and "32". Sets the size of the icon shown in the plug-in, either 16x16 or 32x32. The default value is 32. |
highlight | Sets the color of the highlight used to indicate selection. If omitted, COLOR_HOMEHIGHLIGHT is used. |
max-buttons | Maximum number of icons to show in the MRU. Default is the maximum that fit in the plug-in. |
button-image | If specified, points to a bitmap used to indicate selection. This option overrides the highlight attribute. The bitmap is divided horizontally into four equally-sized pieces. The first piece is the selected plug-in, selected app state image. The second piece is the selected plug-in, unselected app state. The third piece is the unselected plug-in, selected app state. The fourth piece is the unselected plug-in, unselected app state. |
button-transparent-color | The color in the button-image bitmap that represents transparency. Default is no transparency. |
x | Starting position for drawing the list of icons along the x axis |
y | Starting position for drawing the list of icons along the y axis |
If no button-image is specified, the spacing between the icons within the icon strip is as follows for 32x32 bit icons:
Figure 4. Spacing between icons for 32x32 bit icons
For 16x16 icons, the spacing is as follows:
Figure 5. Spacing between icons for 16x16 bit icons
When the device is first launched, the plug-in contains five items in the following order:
- Inbox
- Contacts
- Calendar
- Internet Explorer
- Solitaire
The name of the selected application can be displayed using the <appname/>
element. The <appname/>
element supports the standard formatting attributes. The background of the plug-in can be formatted by using an optional <background/>
element.
The following XML shows an implementation example for this plug-in.
<plugin file="sysplug.dll" clsid="{79EFB752-CB70-446d-
B317-499723482B3D}">
<mru x="4" y="4" button-image="\windows\mrubtn.bmp"/>
<appname bgtext="#0000FF" fgcolor="#FFFF00"/>
</plugin>
You should now be familiar with how to customize the Microsoft Smartphone 2002 Home screen by creating the layout, determining the color scheme, setting the background image, packaging the application, and adding optional ring tones.
By customizing the Microsoft Smartphone 2002 Home screen, you can display branding and other required information and enable end users to personalize the device to suit their needs.
If you have feedback about this document, please send e-mail to: toolfb@microsoft.com.