Contents |
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.
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.
Widgets with custom functionality also need to include a 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 SDK tool 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.