SideShow Development in Depth
Providing access to information on your PC without having to boot the PC is one of the goals of Windows SideShow™. Windows SideShow device technology consists of a separate screen, CPU, and memory that you can use to view this information. The devices range from displays on the back of laptop lids to remote controls to credit-card sized screens you can put in your pocket. This article will explain how your applications can provide information on a Windows SideShow device.
The COM API contains the full feature set provided by Microsoft to interact with the Windows SideShow platform.
Originally termed auxiliary display technology, Windows SideShow is a Windows Vista™ operating system technology. Microsoft ships the software components needed to utilize a Windows SideShow device as part of Windows Vista. Each application that wishes to display content on a Windows SideShow display needs to create a Windows SideShow gadget. The term gadget can sometimes be confusing as there are other gadget technologies that are not directly related to Windows SideShow.
This article will explore the different options you have to add your application-specific content to Windows SideShow supported devices. The samples that ship with the Microsoft® Windows® SDK are all written in C++ and utilize the COM APIs Windows SideShow supports. I’ll start the exploration here.
The majority of this article will focus on the Managed .NET Framework API and how you can use it to rapidly create Windows SideShow gadgets. You will learn how to add different types of content for a gadget to display and how you can define the navigation between that content.
You can also create a Windows SideShow gadget through another Microsoft gadget technology: Windows Sidebar. Windows Sidebar provides a simple API for creating a Windows SideShow gadget and adding content from a Sidebar gadget.
How it Works
Windows SideShow devices all support a well-defined set of end points. An end point defines a certain format of content that the Windows SideShow devices can display. How the device displays the content is not defined. A wide range of devices with varying capabilities will ship in the coming year, some devices will have monochrome screens, some will have color screens, some screens will be 2-line LCD displays, and some will be 600 x 400 pixel color displays. A Windows SideShow device is not guaranteed to have any specific capabilities. The code that you will write to display your information on a SideShow device will create a gadget and encode the data for a specific end point. The advantage of providing these defined formats is that you do not need to be concerned about writing any device-specific code. All of your code will run on the PC and send the content to the device.
The end points supported on Windows Vista are SCF (Simple Content Format) and iCalendar. SCF is a new XML data format that you can use to describe text, images, dialog boxes, and menus, as well as navigational constructs. All Windows SideShow compatible devices must support SCF. The iCalendar format provides a consistent way to provide calendaring content to the device. However, not all devices will support the iCalendar format.
Windows SideShow manufacturers can define their own end points. These custom data formats allow the OEMs to provide extended feature sets that your applications can reach.
A single Windows Vista PC can support multiple Windows SideShow devices. Users will want to have different information displayed on the different devices. In the Windows Vista Control Panel is a Windows SideShow Control Panel. Users can use this SideShow Control Panel to manage which SideShow gadgets will run on which devices. Figure 1 shows an example of the Windows SideShow Control Panel.
Figure 1: Windows SideShow Control Panel.
If you are not lucky enough to have a real Windows SideShow device, the Windows Platform SDK ships with a device simulator (Figure 2). You can find this simulator in the \bin folder of the Windows SDK. The simulator executable is called VirtualSideShow.exe, but before you run the simulator you will need to register it on your machine by running the WindowsSideShowVirtualDevice with the /regserver parameter. Note that you will need to run the command with elevated permissions for the registration to take effect.
Figure 2: Windows SideShow Simulator.
Microsoft originally designed for Windows SideShow devices (and early prototypes) to run using the .NET Micro Framework. It has become clear that a range of devices available will not run the .NET Micro Framework. As already stated, a Windows SideShow device simply needs to support the required end points. At a number of conferences in 2006, vendors demonstrated Windows Mobile™ devices with support for the SCF end point. If you want to reach the maximum number of Windows SideShow devices, the best option is to send SCF content to the Windows SideShow APIs and leave the rest to the Windows SideShow platform.
Each Windows SideShow gadget has a unique identifier (GUID); this is known as the Application ID. SideShow also identifies the end points by a GUID, or Endpoint ID. Each piece of content for a SideShow gadget has a unique identifier (a 32-bit unsigned integer) called the Content ID.