A single WidSets widget consists of a XML file (widget.xml), a varying number of PNG resources, and a WidSets Scripting Language (WSL) source code file. You can also introduce the stylesheet and the WSL code as embedded resources. To have a better understanding of how the widgets are constructed, please study the example widgets. The WidSet API offers detailed descriptions of the available functions on the scripting side of things.
The widget.xml file allows you to describe widget specific details such as services used by the widget, widget parameters and their editability, the stylesheet of the widget, resources, filters, and layout.
The stylesheet defines the customization of elements. The stylesheet definition can be a reference to a separate file in the widget package, or it can be given as an embedded resource in the widget.xml.
Widgets support PNG images as mobile resources, which need to be referenced within the widget.xml document.
In addition to the mobile image resources, there are three required PNG-files for the WidSets Web site to present the widgets in the library and the Web user interface. The easiest way to create these resources is by taking a screenshots from the emulator.
- web_icon.png – This image is the icon used in the widget library or the widget shelf. The pixel size of this image has to be exactly 60 * 40 px. This image is also visible in the mobile device under the system widget’s library.
- web_maximized.png – This image is the preview image for the widget in the library. It gives the user a picture of how the widget will look in the open view. The pixel size of this image has to be exactly 176 * 208 px.
- web_minimized.png – This image is used for both the WidSets Web site library and the dashboard. It presents the minimized view of the widget on the Web site. The width of the image must be exactly 110 pixels and the height should represent the height of the widget running on the phone.
These three files do not need to be referenced in the widget.xml file, as they are not used as resources by the mobile client.
WSL source code
Widgets with custom functionality also need to include a Archived:WidSets Scripting Language code source file which defines the functionality of the widget. A single widget can only have one WSL file in it, which is compiled to bytecode by either the Archived:WidSets SDK or a WidSets server. The WidSets client can run the bytecode.
Styles and image resources introduced in the widget.xml file can be used from the WSL code.