# HG changeset patch # User tasneems@symbian.org # Date 1267845075 28800 # Node ID 716254ccbcc0739283e5e593d9dce962a08c67f1 # Parent 913c9751c067e1995d75648de0a7adc41b850a02 Fixed 2046: WRTKit help topics. Fixed 2170: Added support for Web Developer Library. Fixed 1952: Event Trigger icons unreadable diff -r 913c9751c067 -r 716254ccbcc0 TestBuild-win32.win32.x86.zip Binary file TestBuild-win32.win32.x86.zip has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/.classpath --- a/org.symbian.tools.wrttools.doc.WebDeveloper/.classpath Fri Mar 05 15:43:17 2010 -0800 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/.classpath Fri Mar 05 19:11:15 2010 -0800 @@ -1,6 +1,6 @@ - + diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/.settings/org.eclipse.jdt.core.prefs --- a/org.symbian.tools.wrttools.doc.WebDeveloper/.settings/org.eclipse.jdt.core.prefs Fri Mar 05 15:43:17 2010 -0800 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/.settings/org.eclipse.jdt.core.prefs Fri Mar 05 19:11:15 2010 -0800 @@ -1,8 +1,8 @@ -#Fri Feb 19 11:36:03 PST 2010 +#Fri Mar 05 16:48:58 PST 2010 eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.compliance=1.5 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.6 +org.eclipse.jdt.core.compiler.source=1.5 diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/META-INF/MANIFEST.MF --- a/org.symbian.tools.wrttools.doc.WebDeveloper/META-INF/MANIFEST.MF Fri Mar 05 15:43:17 2010 -0800 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/META-INF/MANIFEST.MF Fri Mar 05 19:11:15 2010 -0800 @@ -1,10 +1,12 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: WebDeveloper -Bundle-SymbolicName: org.symbian.tools.wrttools.doc.WebDeveloper -Bundle-Version: 1.0.0.qualifier -Bundle-Activator: org.symbian.wrttools.doc.webdeveloper.Activator -Require-Bundle: org.eclipse.ui, - org.eclipse.core.runtime -Bundle-ActivationPolicy: lazy -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Manifest-Version: 1.0 +Bundle-Vendor: Nokia +Bundle-Version: 1.4.0 +Bundle-Name: Web Developer's Library 1.4 +Bundle-ManifestVersion: 2 +Bundle-SymbolicName: org.symbian.tools.wrttools.doc.WebDeveloper;singleton:=true +Bundle-Activator: org.symbian.tools.wrttools.doc.WebDeveloper.Activator +Import-Package: org.eclipse.core.runtime, + org.eclipse.ui.plugin, + org.osgi.framework +Bundle-RequiredExecutionEnvironment: J2SE-1.5 + diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/build.properties --- a/org.symbian.tools.wrttools.doc.WebDeveloper/build.properties Fri Mar 05 15:43:17 2010 -0800 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/build.properties Fri Mar 05 19:11:15 2010 -0800 @@ -1,4 +1,5 @@ source.. = src/ output.. = bin/ bin.includes = META-INF/,\ - . + .,\ + plugin.xml diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/AppManagerSampleWgt.wgz Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/AppManagerSampleWgt.wgz has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/CalendarSampleWgt.wgz Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/CalendarSampleWgt.wgz has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/ContactSampleWgt.wgz Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/ContactSampleWgt.wgz has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-0022AED9-7B79-4C96-B82E-8B1EDF455E1D.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-0022AED9-7B79-4C96-B82E-8B1EDF455E1D.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,141 @@ + + +IDataSource.Delete()

IDataSource.Delete()

+

Description:

+

The Delete method deletes an event (entry) from +the event log database.

+

This method can be called both synchronously and asynchronously.

+

Syntax:

+

For synchronous calls:

+
result = so.IDataSource.Delete(criteria);
+ +

For asynchronous calls:

+
result = so.IDataSource.Delete(criteria, callback);
+ +

Arguments:

+
    +
  • criteria:

    + +

    This is an object that specifies which event to delete from the log +event database. For more information about the object properties and how to +define them, see section Criteria for deleting an event.

    + +
  • +
  • callback:

    + +

    The callback argument is the name of the method +that is executed when an asynchronous Delete call has +results or status information to return. You must define this method separately. +Follow the instructions in section Defining the callback handler for an asynchronous method to +define the callback method.

    +

    This argument is used only with an asynchronous Delete call.

    + +
  • +
+

Return value:

+

If synchronous, the Delete method returns an error +code and an error message.

+
+ + + + + + + + + + + + + + + +
Table: Return value +properties for a synchronous Delete
+

Property

+
+

Description

+
+

Value

+
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See Logging Service API error messages.

+
+

If asynchronous, the method returns an object that contains a transaction +ID for the callback instance, +an error code, and an error message (see the following table). When the asynchronous +call has completed, callback returns an object that contains +an error code and an error message (see Table: +Callback return value).

+
+ + + + + + + + + + + + + + + + + + + + + +
Table: Return value +properties for an asynchronous Delete
+

Property

+
+

Description

+
+

Value

+
+

result.TransactionID

+
+

This is a number used as an identification to match transactions started +with the asynchronous Delete call to one or more calls +it generates to callback.

+

This property is only valid for asynchronous calls.

+
 
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See Logging Service API error messages.

+
+

Example code:

+

+

For the complete source of a sample widget +that demonstrates how to use this Service API, see the +full example.

+ + + + +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-00DB3F96-E09F-4CA2-B02D-598EAEF214FF.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-00DB3F96-E09F-4CA2-B02D-598EAEF214FF.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,236 @@ + + +Criteria for +retrieving calendar information

Criteria for +retrieving calendar information

+

The criteria object specifies what calendar +information is returned.

+

Each GetList call +targets one type of calendar information:

+ +

For more information about the types, see the Calendar +Service overview page.

+

The criteria object has two main properties: Type and Filter. +These are described in the following table. Properties enclosed in brackets +are optional.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Criteria object properties
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

criteria.Type

+
+

Specifies the type of calendar information to retrieve.

+

Note: The available Filter properties depend on the selected +type.

+
+
+

string

+
+

Possible values:

+
    +
  • "Calendar"

  • +
  • "CalendarEntry"

  • +
+
+

[criteria.Filter]

+
+

Specifies how the information to be retrieved is filtered.

+

If this property is not specified, GetList returns +a list of all available calendars or calendar entries (instances).

+
+

object

+
+

Object with the properties specified below

+
+

The following properties are only valid if Type is "Calendar"

+
+

[criteria.Filter.DefaultCalendar]

+
+

If this property is set to true, GetList returns +a list with only one item, the default calendar.

+

If this property is set to false, GetList returns +a list of all available calendars, including the default one.

+
+

boolean

+
+

Possible values:

+
    +
  • true

  • +
  • false

  • +
+
+

The following properties are only valid if Type is "CalendarEntry"

+
+

[criteria.Filter.CalendarName]

+
+

Specifies the calendar file from which the information is retrieved.

+

If this property is not specified, the default calendar is used.

+
+

string

+
+

<DriveLetter>:<FileName>

+

For example: "C:Calendar"

+
+

[criteria.Filter.id]

+
+

Specifies the globally unique identifier of a calendar entry. This is +unique across all calendars on any device. If the entry has child entries, +they share the same id as the parent but have unique LocalIds.

+

If this property is specified, GetList returns +the entry whose id matches the specified value. If the +entry has child entries, GetList returns both the parent +and child entries. In this case, the parent entry is the first item in the +returned array.

+

Note: Specify either Filter.id or Filter.LocalId or +neither, but not both. If you specify either one, the other Filter properties +are ignored. If you specify neither, GetList returns +a list of instances.

+
+
+

string

+
 
+

[criteria.Filter.LocalId]

+
+

Specifies the locally unique identifier of a parent entry or child entry. +This is unique within a calendar and distinguishes between parent and child +entries that share the same id.

+

If this property is specified, GetList returns +the parent or child entry whose LocalId matches the specified +value.

+

Note: Specify either Filter.id or Filter.LocalId or +neither, but not both. If you specify either one, the other Filter properties +are ignored. If you specify neither, GetList returns +a list of instances.

+
+
+

string

+
 
+

[criteria.Filter.StartRange]

+
+

If only StartRange is specified, all entries that +occur on or after this date are retrieved.

+

If both StartRange and EndRange are +specified, all entries that occur within these dates are retrieved.

+
+

date object

+
 
+

[criteria.Filter.EndRange]

+
+

If only EndRange is specified, all entries that +occur on or before this date are retrieved.

+

If both StartRange and EndRange are +specified, all entries that occur within these dates are retrieved.

+
+

date object

+
 
+

[criteria.Filter.SearchText]

+
+

Specifies a text string matched against the Summary value +of an entry. The match is not case sensitive.

+

For more information about calendar entries, see section Calendar entries.

+
+

string

+
 
+

[criteria.Filter.Type]

+
+

Specifies the type of calendar entries about which to return information.

+

If this property is not specified or if it is set to "IncludeAll", GetList returns +information about all types of entries.

+
+

string

+
+

Possible values:

+
    +
  • "Anniversary"

  • +
  • "DayEvent"

  • +
  • "Meeting"

  • +
  • "Reminder"

  • +
  • "ToDo"

  • +
  • "IncludeAll"

  • +
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-034D852F-27C5-47D2-9617-B8C92748A49C.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-034D852F-27C5-47D2-9617-B8C92748A49C.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,17 @@ + + +freeram

freeram

+

Syntax:

+
[int] sysinfo.freeram
+

Description:

+

This is a read-only property that returns an integer value indicating the amount of free RAM of a device, measured in bytes.

+

Example code:

+
// get free RAM size in bytes
+var freeRamSize = sysinfo.freeram;
+var freeRamSize /= 1024; // convert to kB
+if (freeRamSize < 100)
+    alert("Low memory");
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-04095E9A-50E7-4E5F-BD6F-71DA281A0080.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-04095E9A-50E7-4E5F-BD6F-71DA281A0080.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,173 @@ + + +getServiceObject()

getServiceObject()

+

Description:

+

The getServiceObject method creates an object that +is used to access the services made available through a Service +API. This object is referred to as a "service object".

+

Syntax:

+
so = device.getServiceObject(provider, interface);
+

Arguments:

+
    +
  • provider:

    + +

    This is a text string that defines the service provider name, that is, +the name of the type of service object to create.

    + +
  • +
  • interface:

    + +

    This is a text string that defines the supported interface for the specified +service provider.

    + +
  • +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Service API providers +and interfaces
+

Service API

+
+

Provider

+
+

Interface

+
+

AppManager

+
+

Service.AppManager

+
+

IAppManager

+
+

Calendar

+
+

Service.Calendar

+
+

IDataSource

+
+

Contacts

+
+

Service.Contact

+
+

IDataSource

+
+

Landmarks

+
+

Service.Landmarks

+
+

IDataSource

+
+

Location

+
+

Service.Location

+
+

ILocation

+
+

Logging

+
+

Service.Logging

+
+

IDataSource

+
+

Media Management

+
+

Service.MediaManagement

+
+

IDataSource

+
+

Messaging

+
+

Service.Messaging

+
+

IMessaging

+
+

Sensor

+
+

Service.Sensor

+
+

ISensor

+
+

SystemInfo

+
+

Service.SysInfo

+
+

ISysInfo

+
+

Return value:

+

If the call succeeds, the getServiceObject method +returns a service object; otherwise it returns undefined.

+

Remarks:

+
    +
  • The getServiceObject method is a factory +method found on the device object.

  • +
  • To ensure backward compatibility, always check in your JavaScript +code that the device object exists before calling the getServiceObject method. +For example:

    + +
    if (device != "undefined")
    +  device.getServiceObject("Service.MediaManagement", "IDataSource");
    +
    + +
  • +
+

Example code:

+

The following example creates a service object for the Media +Management Service API:

+
var so = device.getServiceObject("Service.MediaManagement", "IDataSource");
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-043C7578-485F-4186-830F-013223A156D1.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-043C7578-485F-4186-830F-013223A156D1.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,70 @@ + + +IDataSource.Cancel()

IDataSource.Cancel()

+

Description:

+

The Cancel method cancels an outstanding asynchronous +call made with a Logging Service API method.

+

If a cancel is sent, but the asynchronous call has already been completed, +then result.ErrorCode is set to 0 (success).

+

This is a synchronous method.

+

Syntax:

+
result = so.IDataSource.Cancel(criteria);
+

Arguments:

+
    +
  • criteria:

    + +

    This is an object with the TransactionID property +(number). criteria.TransactionID specifies the transaction +ID of the asynchronous call to cancel. The transaction ID is the result.TransactionID value +that was returned as part of the result of the initial call.

    + +
  • +
+

Return value:

+

The Cancel method returns an object that contains +an error code and an error message.

+
+ + + + + + + + + + + + + + + +
Table: Return value +properties for Cancel
+

Property

+
+

Description

+
+

Value

+
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes .

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See Logging Service API error messages.

+
+

Example code:

+

+

For the complete source of a sample widget that demonstrates how to +use this Service API, see the +full example.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-04ABC9FC-26FE-4854-9F88-63A2C4911886.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-04ABC9FC-26FE-4854-9F88-63A2C4911886.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,37 @@ + + +Providing tactile feedback for user actions

Providing tactile feedback for user actions

Tactile feedback provides users with immediate confirmation that the touch event has been registered. It is especially useful in noisy environments. You can use vibration as tactile feedback on user actions. Tactile feedback is implemented for those common S60 UI components where it has been seen as beneficial. If you create custom components for widgets, consider providing tactile feedback for buttons, sliders, strokes, gestures, and notifications.

+

For general principles on providing tactile feedback, see Tactile feedback.

+

You use JavaScript SystemInfo Service API methods to provide tactile feedback. For more information, see Vibration information and control services.

+

To provide tactile feedback for user actions

    +
  1. Check that vibration is enabled on a mobile device.

    if (sysinfo.vibrasettings==1)
    +	startVibration();
    +
  2. +
  3. Specify settings for the intensity and duration of vibration. The following example specifies maximum intensity for maximum duration when users touch a UI component.

    function startVibration()
    +{
    +   // get the system defined maximum duration
    +   var duration = sysinfo.vibramaxduration;
    +   // get the system defined minimum intensity
    +   var intensity = sysinfo.vibraminintensity
    +   // start vibration
    +   sysinfo.startvibra(duration, intensity);
    +}

    You can also use the startvibra() method of the JavaScript SystemInfo Service API setting to specify the duration and intensity of vibration. For example:

    getSysInfo: function() {
    +	if ( !WrtHelper._sysinfo ) {
    +		WrtHelper._sysinfo = document.getElementById("sysinfo");
    +	
    +	}
    +	
    +	return WrtHelper._sysinfo;
    +},
    +
    +tactileFeedback: function() {
    +	var sysinfo = WrtHelper.getSysInfo();
    +	if (sysinfo.startvibra) 
    +		sysinfo.startvibra(10, 10);
    +},
    +
  4. +
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-05A1F618-5FB1-4821-8408-A213F38F2EDA.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-05A1F618-5FB1-4821-8408-A213F38F2EDA.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,44 @@ + + +Introduction +to widgets

Introduction +to widgets

+

S60 3rd Edition, Feature Pack 2 and later support installing +and running widgets on mobile devices.

+

Default behavior of widgets on mobile devices

From +the mobile device user point of view, the appearance and functionality of +a widget is similar to any other mobile application. Users can download widgets +to mobile devices in several ways, as a wgz file. The device +platform takes care of the actual installation process. For more information +on downloading and installing widgets, see the deployment +methods table.

Once a widget has been installed on a mobile device, +it can be found in the application menu, under the folder that contains installed +applications. The name of this folder varies between mobile devices, and can +be Installations or Applications, +for example. A widget has its own icon and name, which are defined in the widget component files. +The user can launch a widget by navigating to it and opening it.

Widgets +can have a full screen view and a home screen view. In full screen mode, only +one widget can be on the foreground at +a time. The home screen can display several widgets at a time.

Figure: A widget in the Installations folder and a widget using the full screen +of the device

When a widget is running, it is visible in the Open applications list. +To see the list, long-press the menu key.

Figure: A widget in the Open applications list

+

Customization options for the mobile device user

Similarly +to mobile applications, users can also create shortcuts to their widgets. +They can have widgets in the My Today applications list in the Active Idle, +which is intended for frequently used applications. From there, the widget +can be launched by navigating to its icon and selecting it. Users can also +set widgets to the active idle softkeys, so that they can be launched by pressing +the left of right softkey. In addition, users can move widgets into folders +that they have created themselves in the application menu.

Figure: A widget in Active Idle

+

Adding widgets to the home screen

Users can add +widgets to the home screen on compatible +devices. Users cannot interact with a widget in home screen view. It +is a graphical representation of the widget that is for data display only. +The mobile device user must access the full screen view to make selections, +request specific data, and so on. For example, if a weather widget is added +to the home screen, the mobile device user must open it in full screen view +to change the location for local weather. For more information, see Introduction to home screen widgets.

Figure: Widgets on the home screen

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-06861FDF-BF8B-4702-B877-41ED90F587BB.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-06861FDF-BF8B-4702-B877-41ED90F587BB.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,22 @@ + + +Home screen widget appearance

Home screen widget appearance

The dimensions of a widget displayed in the home screen view depend on many factors and may be different for each mobile device.

+

A widget enabled for the home screen has two views, home screen view and a full screen view:

+
    +
  • When mobile device users adds a widget to the home screen, it is launched in home screen view.

  • +
  • When users select the home screen widget, it opens in full screen view.

  • +
  • When users launch a widget independent of the home screen (for example, from Applications ) it is displayed in full screen view.

  • +
+

Figure: Widgets on the home screen

+

The size of the frame in which the home screen widget is displayed depends on:

+
    +
  • The display size of the mobile device. For example, on small screens all home screen widgets are arranged in one column, whereas on larger screens widgets can be arranged in two columns.

  • +
  • The display orientation (portrait or landscape).

  • +
  • The space available on the home screen. For example, some mobile devices may have more mandatory home screen applications than others or they may use dynamic sizing of home screen widgets depending on the number of widgets currently being displayed.

  • +
+

For information on designing your widget for different screen sizes, see Creating content specific to home screen widgets.

+

The home screen widget background is the same as it is in the full screen view. It cannot be adjusted for the home screen because the widget sends a static image to the home screen for display.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-06C803FE-DD16-44B5-B9C7-2EC9D497D425.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-06C803FE-DD16-44B5-B9C7-2EC9D497D425.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,170 @@ + + +Criteria for +retrieving contact information

Criteria for +retrieving contact information

+

The criteria object specifies what contact +information is returned and how the returned information is sorted.

+

Each GetList call +targets one type of contact information:

+
    +
  • Contacts are individual contact entries in a contacts +database. You can retrieve a specific contact or a list of contacts depending +on the filtering criteria.

  • +
  • Contact groups are associations that group individual +contacts together by ID. You can retrieve a specific group or a list of groups +depending on the filtering criteria.

  • +
  • Contacts databases are databases that store information +about contacts and contact groups. You can retrieve a list of all the open +databases.

  • +
+

The criteria object has three main properties: Type, Filter, +and Sort. These are described in the following table. +Properties enclosed in brackets are optional.

+

Note: All string values in the object are Unicode.

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Criteria object properties
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

criteria.Type

+
+

Specifies the type of contact information to retrieve.

+

Note: If this property is set to "Database", the call +automatically retrieves a list of all available databases. No Filter criteria are +used.

+
+
+

string

+
+

Possible values:

+
    +
  • "Contact"

  • +
  • "Group"

  • +
  • "Database"

  • +
+
+

[criteria.Filter]

+
+

Specifies how the information to be retrieved is filtered.

+

This property is valid only if Type is "Contact" or "Group".

+

If this property is not specified and Type is "Contact", +then all contacts are retrieved from the default database.

+

If this property is not specified and Type is "Group", +then all contact groups are retrieved from the default database.

+
+

object

+
+

Object with the properties specified below

+
+

[criteria.Filter.DBUri]

+
+

Specifies the contacts database from which to retrieve the information.

+

If this property is not specified, the default database is used.

+
+

string

+
 
+

[criteria.Filter.id]

+
+

Specifies the unique identifier of the contact or contact group to retrieve.

+

If this property is specified, Filter.DBUri and Filter.SearchVal are +ignored.

+
+

string

+
 
+

[criteria.Filter.SearchVal]

+
+

Specifies a text string by which to search for contacts. The search +is based on first name and last name. Any contact whose first name or last +name contains this string is retrieved.

+

If this property is not specified, all contacts are retrieved from the +database.

+

Note: This property is valid only if Type is "Contact".

+
+
+

string

+
+

The string cannot exceed 255 characters.

+
+

[criteria.Sort]

+
+

Specifies how the returned list of information is sorted.

+

Sorting is based on last name and first name, in that order of priority. +By default, sorting is done in ascending order.

+

Note: Sorting is done only if Type is "Contact". +Sorting is not supported for calls whose Type is "Group" or "Database".

+
+
+

object

+
+

Object with the properties specified below

+
+

[criteria.Sort.Order]

+
+

Specifies the sort order.

+
+

string

+
+

Possible values:

+
    +
  • "Ascending"

  • +
  • "Descending"

  • +
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-08AA357E-7499-4A8E-B756-4FCDFBEDB9FC.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-08AA357E-7499-4A8E-B756-4FCDFBEDB9FC.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,45 @@ + + +startvibra()

startvibra()

+

Syntax:

+
[void] sysinfo.startvibra(Int duration, Int intensity)
+

Description:

+

The startvibra method turns the device vibration on for the specified duration with the specified intensity (frequency).

+

Argument:

+
    +
  • duration:

    + +

    Duration of the vibration measured in milliseconds. The value 0 specifies that the vibration should continue indefinitely or till the hardware-imposed limit, and should be stopped with a call to the stopvibra method.

    +

    duration argument can have the maximum value of vibramaxduration

    + +
  • +
+

Note: A device may have implementation-defined or hardware-imposed limits to the duration of the vibration feature. In such circumstances, any vibration will stop at that limit even if the duration parameter is greater than the limit or specified as infinity.

+
+
    +
  • intensity:

    + +

    Intensity of the vibra is in the range of -100 to 100, which shows the percentage of the vibra motor's full rotation speed. When intensity is negative, the vibra motor rotates in the negative direction. When intensity is positive, the vibra motor rotates in the positive direction.

    + +
  • +
+

Note: The device might have hardware-imposed limits on the supported vibra intensity values, so the actual effect might vary between different hardware.

+
+

Return value:

+

This method does not return a value.

+

Remarks:

+

If the vibration setting in the device's active profile is set to "off", startvibra() will not cause the vibration feature to vibrate. Use the vibrasettings property to detect whether vibration is allowed.

+

Example code:

+
function startVibration()
+{
+   // get the system defined maximum duration
+   var duration = sysinfo.vibramaxduration;
+   // get the system defined minimum intensity
+   var intensity = sysinfo.vibraminintensity
+   // start vibration
+   sysinfo.startvibra(duration, intensity);
+}
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-0A0DE525-723F-45BD-9F10-76AAB4616426.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-0A0DE525-723F-45BD-9F10-76AAB4616426.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,37 @@ + + +drivefree()

drivefree()

+

Syntax:

+
[int] sysinfo.drivefree(String drivename)
+

Description:

+

The drivefree method can be used to detect the space available for memory storage on a device.

+

Argument:

+
    +
  • drivename:

    + +

    Specifies the name of a drive to be examined.

    + +
  • +
+

Return value:

+

If the drive exists, this method returns an integer value indicating the available space on the specified drive, measured in bytes.

+

Example code:

+
function checkDrivesInformation() {
+  var space = 0;
+  // get existing user's drives
+  var allDrives = sysinfo.drivelist;
+  var drives = allDrives.split(" ");
+  // read and print all drives’ name and information
+  for (var i=0; i<drives.length; i++) {
+     space = sysinfo.drivesize(drives[i]);
+     space /=1024; // convert from bytes to kB
+     alert("Total space of drive "+drives[i]+" ="+space+"kB";
+     space = sysinfo.drivefree(drives[i]);
+     space /=1024; // convert from bytes to kB
+     alert("Free space of drive "+drives[i]+" ="+space+"kB";
+     }
+  }
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-0A215AF3-59F0-4158-842C-0D7B030E5EA4.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-0A215AF3-59F0-4158-842C-0D7B030E5EA4.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,202 @@ + + +Service +API error codes

Service +API error codes

+

The following table lists the possible error codes returned by the Service +API methods as part of their return value.

+

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Service API error +codes
+

Error code

+
+

Description

+
+

0

+
+

Success

+
+

1000

+
+

Invalid service argument

+
+

1001

+
+

Unknown argument name

+
+

1002

+
+

Bad argument type

+

This error can occur for any of the following reasons:

+
    +
  • StartRange or EndRange is +not specified or supported for the given Key.

    +
  • +
  • EndRange is less than StartRange.

    +
  • +
  • The sorting Key is not supported.

    +
  • +
+
+

1003

+
+

Missing argument

+
+

1004

+
+

Service not supported

+

This error can occur for any of the following reasons:

+
    +
  • The FileType or Key is +wrong.

  • +
  • The Key is not supported for the given FileType.

    +
  • +
  • A synchronous call is placed instead of an asynchronous one.

    +
  • +
+
+

1005

+
+

Service in use

+
+

1006

+
+

Service not ready

+
+

1007

+
+

No memory

+
+

1008

+
+

Hardware not available

+
+

1009

+
+

Server busy

+

The service provider is busy with an ongoing request and cannot accept +another one.

+
+

1010

+
+

Entry exists

+
+

1011

+
+

Access denied

+
+

1012

+
+

Not found

+
+

1013

+
+

Unknown format

+
+

1014

+
+

General error

+
+

1015

+
+

Cancel success

+
+

1016

+
+

Service timed-out

+
+

1017

+
+

Path not found

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-0D3A1E17-C699-4A9D-9124-9CEB71E2EBBF.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-0D3A1E17-C699-4A9D-9124-9CEB71E2EBBF.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,68 @@ + + +IDataSource.Cancel()

IDataSource.Cancel()

+

Description:

+

The Cancel method cancels an ongoing asynchronous +call made with a Calendar Service API method.

+

This is a synchronous method.

+

Syntax:

+
result = so.IDataSource.Cancel(criteria);
+

Arguments:

+
    +
  • criteria:

    + +

    This is an object with the TransactionID property +(number). criteria.TransactionID specifies the transaction +ID of the asynchronous call to cancel. The transaction ID is the result.TransactionID value +that was returned as part of the result of the initial call.

    + +
  • +
+

Return value:

+

The Cancel method returns an object that contains +an error code and an error message.

+
+ + + + + + + + + + + + + + + + +
Table: Return value +properties for Cancel
+

Property

+
+

Description

+
+

Value

+
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See Calendar Service API error messages.

+
+

Example code:

+

+

For the complete source of a sample widget that demonstrates how to +use this Service API, see the full example.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-0E3095DB-03FF-4240-83F2-6D876AD2083A.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-0E3095DB-03FF-4240-83F2-6D876AD2083A.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,57 @@ + + +Widget component files

Widget component files

A widget consists of several component files. In the development phase, your widget project is just a file system directory, where you create and store the component files. Some of the files are mandatory and must be found in every widget. You must store the mandatory files under the root directory of a widget project. In addition, your widget may have optional component files that you can store either directly under the root directory or in any subfolder under the root directory, except for the icon file.

+

The following figure illustrates the component files of an example widget.

+

Figure: Component files of an example widget

+

The following table lists the typical widget component files and describes their purpose. It also indicates whether a file is mandatory or optional.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Widget component files

File

Use

Location

Description

info.plist

Mandatory

Root directory

An XML-formatted file that contains the property and configuration information of a widget, such as the HTML file used as well as the identifier of the widget.

<name>.html

Mandatory

Root directory

A standard HTML file that mainly contains information for structuring a widget. The name of the HTML file must be predefined within the info.plist properties.

Note: A widget package contains only one HTML file.

icon.png

Optional

Root directory

A custom icon file that represents a widget on a mobile device when it has been installed. The icon image must be in Portable Networking Graphics (PNG) file format. The recommended size of the icon is 88 x 88 pixels. The icon is scaled automatically, based on the device screen resolution.

If the icon.png file is omitted from the widget installation package, the widget appears with a default S60 application icon.

*.css

Optional

Root or any subfolder

External CSS file that defines the style and layout of widget contents. A widget can have as many individual CSS files as needed.

It is also possible to embed the style information within the <name>.html file, thereby allowing the CSS file to be omitted. However, it is strongly recommended that you keep the style information separated from the data (markup) elements.

*.js

Optional

Root or any subfolder

External JavaScript source code that implements the logic of a widget's operations, such as the construction of the widget UI elements, UI interaction, and communication. A widget can have as many individual js files as needed.

It is also possible to embed JavaScript codes within the HTML file, thereby allowing the js file to be omitted. However, it is recommended that you keep the JavaScript codes in a separate file.

*.jpg/bmp/gif/png

Optional

Root or any subfolder

A custom image file that can be used in a widget. A widget can have as many individual image files as needed.

\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-0EF1628D-BAF8-4AC4-BA6C-E1F6A192A7FA_d0e4046_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-0EF1628D-BAF8-4AC4-BA6C-E1F6A192A7FA_d0e4046_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-0EFEA51B-F98B-4C0B-9960-5D6247355ACA.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-0EFEA51B-F98B-4C0B-9960-5D6247355ACA.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,24 @@ + + +Handling selection lists

Handling selection lists

Lists are a basic UI component for displaying all kinds of information, actions, and navigation structures. Editing and organizing information in lists can be made easier by using markable lists. Different line layouts offer flexibility in presenting information; lines can contain different sizes of images and text to suit design needs.

+

Using HTML tags

You can use HTML select tags or JavaScript to create selection lists.

+

To use list components

Create an HTML form element that contains the select tag.

<form action = "">
+<select>
+  <option value = "coffee">Coffee</option>
+  <option value = "tea">Tea</option>
+  <option value = "water">Water</option>
+  </select>
+</form>
+

Using JavaScript to create selection lists

Selection lists allow users to select from a list of options. You can use JavaScript to create selection lists. Specify options as an array of JavaScript objects, where each object represents one option. Each option object has two properties: value and text. The value property can be any JavaScript value, including object references and is used to represent the concrete value of the option. The text property is used to display the option in the user interface. The value could for example be a boolean true or false while the text could be Yes or No.

The set of currently selected options can be set or retrieved from a selection control using getter and setter methods. For single selection controls the selected option is specified as a single reference to one of the options in the control. For multiple selection the selected options are specified as an array of references to zero or more of the options in the control. Refer to the instances of the options in the control; not other instances even if they are identical in value or text.

Selection controls fire SelectionChanged events when the user makes a selection in the control.

For an example of using JavaScript to create a selection list, see WRT Listbox Widget.

+

To create an array of JavaScript objects

For multiple selection, specify an array of references to the options in the control.

// create an array with three options
+var options = [
+        { value: 1, text: "Coffee" },
+        { value: 2, text: "Tea" },
+        { value: 3, text: "Water" }
+    ];
+
+

Using lists in touch devices

Use lists with single-line items and large graphics on touch devices. For more information about touch-specific issues, see Touch-specific issues in lists.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-0F6674AB-EE72-4417-8B27-BFEAC28C26D4_d0e10408_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-0F6674AB-EE72-4417-8B27-BFEAC28C26D4_d0e10408_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-0FCBC574-2328-4986-99D3-7DC4BDE9C3A4.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-0FCBC574-2328-4986-99D3-7DC4BDE9C3A4.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,26 @@ + + +STEW: loading the widget at startup

STEW: loading the widget at startup

This section describes how to load a widget at startup.

+

The init function in the main.js file loads the widget. The function is triggered by the init event of the widget body element. The following code illustrates how to assign a function to the onload event handler, <body onload="javascript:init();">:

+
<body onload="javascript:init();">
+
+function init() {
+	// Disable cursor mode.	
+	widget.setNavigationEnabled( false );
+	
+	// Create the views.
+	widgetMenu = new Menu();
+	loginScreen = new LoginScreen();
+	updateScreen = new UpdateScreen();
+	searchScreen = new SearchScreen();
+	settingsScreen = new SettingsScreen();
+	
+	// Show first view.
+	widgetMenu.activate( Menu.LOGIN_SCREEN );
+}
+
+

The above code creates all the widget views and activates the Login view screen by calling the activate function assigned to the menu option.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-0FEFAF39-7048-4F4A-8676-C4BF1AF37120.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-0FEFAF39-7048-4F4A-8676-C4BF1AF37120.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,20 @@ + + +Localizing widget layout

Localizing widget layout

You can enhance user experience by providing different versions of the widget layout based on the supported languages. For example, when a language is read from right to left, it is recommended that you align the display text and UI elements to the right side, which contrasts with the layout typically used for languages that are read from left to right.

+

To localize the layout of a widget

    +
  1. Create localized CSS files with style information for the languages that require localization.

    The name of the CSS file is arbitrary, but the name must be identical for all supported languages so that you need to specify the name only once in the main HTML document.

  2. +
  3. Store the files into the appropriate language project directories.

  4. +
  5. Import the CSS file in the main HTML file using the @import directive within the <style> tag.

  6. +
  7. Provide a default CSS file with generic style information and store it into the root directory of your widget.

    If a specific language does not require layout localization, the CSS file does not need to be included in the corresponding language project directory. When that language is set as the device language, the default CSS file is loaded and used.

  8. +
+

Example

The following pieces of code provide an example of widget layout localization for Finnish and for a default case:

Specified in the main HTML document:

<style type="text/css">
+   @import "localizedLayout.css";
+</style>

Localized resource location:

[root]\fi.lproj\
+    localizedLayout.css
+

Default resource location:

[root]\
+    localizedLayout.css
+
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-10DA851F-1022-4B8C-8F01-F4242AD6EA08.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-10DA851F-1022-4B8C-8F01-F4242AD6EA08.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,24 @@ + + +Returned +calendar information

Returned +calendar information

+

+

The ReturnValue property returned by GetList is an iterator containing the requested calendar information. Each +item (object) in the iterator corresponds to one calendar or calendar entry, +depending on what type +of calendar information was requested:

+
    +
  • For calendar requests, each item contains the drive letter +and file name for a single calendar. The format is <DriveLetter>:<FileName>. +For example: "C:Calendar"

  • +
  • For calendar entry requests, each item contains the properties +for a single calendar entry. The exact set of properties depends on the type +of the entry. For information about which properties are returned for a given +type, see section Properties and calendar entry types.

    +
  • +
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-10E4BB0E-08E5-40FD-8EB4-A83009F64F19.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-10E4BB0E-08E5-40FD-8EB4-A83009F64F19.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,21 @@ + + +Terms +and abbreviations

Terms +and abbreviations

Term or abbreviation

Meaning

API; Application Programming Interface

Programming interface that supports the process of developing application +programs used to access various services.

CSS; Cascading Style Sheets

Style sheet mechanism that allows authors and readers to attach style +to HTML and XHTML documents and XML applications.

Factory method

A method whose main purpose is creation of objects.

HTML; Hypertext Markup Language

Subset of Standard Generalized Markup Language (SGML) used on the Web. +HTML defines the page layout of a Web page.

JavaScript

Scripting language used in Web pages to provide dynamic content and +enhance the appearance of plain HTML.

Media Gallery

The S60 repository for media files.

Runtime

Execution environment that runs applications or widgets.

S60

A software platform for mobile phones that uses the Symbian OS.

Service API

A set of language-independent APIs provided by the S60 platform and +supported by the S60 runtimes (including WRT, Flash, and Open C). The APIs +are used to access specific information and functionality related to platform +applications and device data.

Widget

Lightweight Web application developed by using the same standards-based +Web technologies that are used to create Web pages: XHTML, Cascading Style +Sheets (CSS), and JavaScript.

WRT; Web Runtime

An extension to the capabilities of the Web Browser for +S60 to support widgets.

XHTML; Extensible Hypertext Markup Language

Markup language that consists of HTML elements combined with the syntax +of XML.

XML; Extensible Markup Language

Subset of Standard Generalized Markup Language (SGML) that describes +a class of data objects called XML documents and partially describes the behavior +of the computer programs that process them.

\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-10F0126C-79CA-47BA-B7CA-53A866EFE04B.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-10F0126C-79CA-47BA-B7CA-53A866EFE04B.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,84 @@ + + +Navigating on screens

Navigating on screens

Navigation is the foundation of a usable and accessible application. Users need to know where they are in the application at all times, even if they are interrupted and have to put the mobile device aside for a while. Minimize the time users have to spend on navigating through menus and options to get to the content.

+

For usability guidelines, see Navigation.

+

Note: The information in this topic does not apply to touch devices. On touch devices, users navigate by touching the controls with a stylus or finger.

+

Selecting a navigation mode

You can use one of the following navigation modes on mobile devices that have a five way navigation pad:

    +
  • Cursor navigation

  • +
  • Tab navigation

  • +
  • Customized navigation

  • +

Figure: Cursor (left) and tab (right) navigation

In the figure, the widget on the left illustrates how users can navigate on the screen by clicking the navigation keys that move the cursor. The widget on the right illustrates how users can move the focus between the Say Hello! button and the Enter your name field by clicking the up and down navigation keys.

Note: Use tab navigation and softkeys as much as possible, because some users might find controlling the cursor with the navigation keys difficult.

For an example of using cursor and tab navigation modes and capturing key events, see the AccuWidget Example on Forum Nokia.

+

Using cursor navigation

In cursor navigation, users control the mouse pointer with the five way navigation pad. When users move the cursor inside the control's area on the screen, the cursor is said to be hovering . User graphical means to indicate hovering. Hovering is similar to focus, but it does not select a control for interaction until users press a selection key.

+

Using tab navigation

While mouse pointer mode is effective for navigating web pages, consider using key navigation for widgets. The simplest form of key navigation is tab navigation. Tab navigation is a special mode in S60 Web Runtime (WRT) widgets that turns off the mouse pointer, and enables users to navigate on screens and select controls using the five way navigation pad.

The downside of tab navigation mode is that the WRT engine controls the tab order. It uses a special algorithm to determine the next closest link to tab to. Tab navigation mode was primarily designed as a web browser feature to enable users to navigate simple vertical lists of links.

You can try tab navigation to see if it produces acceptable results. If not, you can revert to the simpler mouse pointer navigation, or develop a more sophisticated navigation mode by using custom navigation. Tab navigation allows you to collect navigation key events in your code. You can also implement custom navigation by enabling tab navigation and using HTML key events.

+

Customizing navigation

If you are an experienced JavaScript developer, you can capture and process key events to customize navigation. You can control the navigation and UI effects, such as highlighting, programmatically.

However, widgets that rely solely on key events for navigation and input do not work on devices that only support touch interfaces.

In general, browser engines display key event codes in varying ways at JavaScript level. S60 WRT widget text and input field components do not support all key events found in the other browser or widget environments. Make sure that navigation elements appear on the screen and that a JavaScript onClick handler is added to them. An HTML anchor tag is one such example. You can also add onClick handlers to a div element. The JavaScript onClick handler JavaScript function can then activate the appropriate navigation option or action.

+

To toggle between navigation modes

Use the setNavigationEnabled() method of the widget object in your JavaScript files to toggle between the navigation modes.
// Tab mode
+widget.setNavigationEnabled(false); 
+// Cursor mode
+widget.setNavigationEnabled(true);
+

To capture JavaScript key events

    +
  1. Attach key listeners.

  2. +
  3. Disable navigation mode to collect cursor key events.

  4. +
  5. Show key code and character code.

  6. +
  7. Create key events on pages.

  8. +

For example:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+  <head>
+    <script type="text/javascript">		
+			
+      /*
+       * attach key listeners
+       */
+      document.onkeypress = keyPress;
+      document.onkeyup = keyUp;
+      document.onkeydown = keyDown;
+ 
+      /*
+       * disable cursor navigation - otherwise cursor 
+       * key events are not received by keypress callbacks
+       */
+      widget.setNavigationEnabled(false);
+			
+      /*
+       * show keyCode and charCode.
+       */
+      function keyPress(event) {
+	document.getElementById('keypressField').innerHTML = event.keyCode + " / " + 
+event.charCode;
+      }
+      
+      function keyDown(event) {
+	document.getElementById('keydownField').innerHTML = event.keyCode + " / " + 
+event.charCode;
+      }
+			
+      function keyUp(event) {
+	document.getElementById('keyupField').innerHTML = event.keyCode + " / " +
+event.charCode;
+      }
+    </script>
+		
+    </head>
+  <body>
+    keyCode / charCode:
+    
+    <div>
+      KeyPress: 
+      <div id="keypressField"></div>
+    </div>
+    
+    <div>
+      Keydown: 
+      <div id="keydownField"></div>
+    </div>
+    
+    <div>
+      Keyup: 
+      <div id="keyupField"></div>
+    </div>
+ 
+  </body>
+</html>	
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-111DE423-9C84-4E4B-A45E-15081FE2A30D.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-111DE423-9C84-4E4B-A45E-15081FE2A30D.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,34 @@ + + +JavaScript +MenuItem object

JavaScript +MenuItem object

+

The MenuItem object is supported since WRT +1.0.

+

The MenuItem object is a built-in JavaScript object +in the widget engine. The MenuItem object is a reference +type that provides APIs for manipulating a widget's menu items. The MenuItem object +is designed to be used together with the MenuItem object +to create and manipulate the widget's main menu and cascading submenus.

+

The MenuItem object is created by using the new operator.

+

MenuItem object methods:

+ +

MenuItem object property:

+ +

For more general information on constructing an options menu, see Using softkeys.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-11652F7C-4A0A-432D-A7BE-E9C27C32319A.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-11652F7C-4A0A-432D-A7BE-E9C27C32319A.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,174 @@ + + +Criteria for +deleting calendar information

Criteria for +deleting calendar information

+

The criteria object specifies which calendar +or calendar entries to delete. For entries, if no calendar is specified, the +delete operation is performed on the default calendar.

+

The criteria object has two main properties: Type and Data. +These are described in the following table. Properties enclosed in brackets +are optional.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Criteria object properties
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

criteria.Type

+
+

Specifies the type of calendar information to delete.

+
+

string

+
+

Possible values:

+
    +
  • "Calendar"

  • +
  • "CalendarEntry"

  • +
+
+

criteria.Data

+
+

Specifies the calendar information to delete.

+

If deleting a calendar, specify only Data.CalendarName.

+

If deleting calendar entries, specify at least one of the following:

+
    +
  • Data.IdList or Data.LocalIdList

    +
  • +
  • Data.StartRange

  • +
  • Data.EndRange

  • +
  • Data.DeleteAll

  • +
+
+

object

+
+

Object with the properties specified below

+
+

criteria.Data.CalendarName

+
+

If Type is "Calendar", this +is a mandatory property that specifies the calendar to delete. No other criteria are +required.

+

If Type is "CalendarEntry", +this is an optional property that specifies the calendar from which to delete +the entries. If this property is not specified, the default calendar is used.

+
+

string

+
+

<DriveLetter>:<FileName>

+

For example: "C:Calendar"

+
+

[criteria.Data.IdList]

+
+

Specifies the ids of the entries to delete. If +an entry has child entries, both the parent and child entries are deleted. +Invalid values are ignored.

+

Specify either Data.IdList or Data.LocalIdList or +neither, but not both.

+

The first id is specified in Data.IdList[0].

+
+

array of strings

+
 
+

[criteria.Data.LocalIdList]

+
+

Specifies the LocalIds of the entries to delete. +If an entry is a child entry, only it is deleted. Invalid values ignored.

+

+

Specify either Data.IdList or Data.LocalIdList or +neither, but not both.

+

The first LocalId is specified in Data.LocalIdList[0].

+
+

array of strings

+
 
+

[criteria.Data.StartRange]

+
+

If StartRange is specified, all entries that occur +on or after this date are deleted.

+

If both StartRange and EndRange are +specified, all entries that occur within these dates are deleted.

+
+

date object

+
 
+

[criteria.Data.EndRange]

+
+

If EndRange is specified, all entries that occur +on or before this date are deleted.

+

If both StartRange and EndRange are +specified, all entries that occur within these dates are deleted.

+
+

date object

+
 
+

[criteria.Data.DeleteAll]

+
+

If DeleteAll is set to true, +all entries are deleted from the calendar.

+
+

boolean

+
+

Possible values:

+
    +
  • true

  • +
  • false

  • +
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-11D59F76-EC4C-4297-B262-D5174E826B43.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-11D59F76-EC4C-4297-B262-D5174E826B43.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,593 @@ + + +Landmarks Service API example

Landmarks Service API example

+

+

This section presents the full source code of a working sample widget +for the Landmarks Service. +You can download the wgz package for this widget from +section Example widgets.

+

For general information about creating widgets, see section Widget component files.

+

Info.plist

+
<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Nokia//DTD PLIST 1.0//EN" "http://www.nokia.com/NOKIA_COM_1/DTDs/plist-1.0.dtd">
+<plist version="1.0">
+<dict>
+    <key>DisplayName</key>
+    <string>LandmarksSample</string>
+    <key>Identifier</key>
+    <string>com.nokia.widget.sapi.landmarks.sample</string>
+    <key>Version</key>
+    <string>1.0</string>
+    <key>MainHTML</key>
+    <string>landmarks-sample.html</string>
+</dict>
+</plist>
+
+

landmarks-sample.html

+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+    <meta http-equiv="content-type" content="text/html; charset=utf-8">
+    <script type="text/javascript" src="js/landmarks-sample.js" charset="utf-8"></script>
+    <script type="text/javascript" src="js/common.js" charset="utf-8"></script>
+</head>
+<body onload='setup()' bgcolor="#ddeeff">
+    <form>
+        <h3>Landmarks Service API Sample Widget</h3>
+        <input type="button" onclick="addCategory('img1');" value="AddCategory"><img id="img1" src="pic/blank.png" width="25" height="25" align="center"><br>
+        <input type="button" onclick="addLandmark('img2')" value="AddLandmark"><img id="img2" src="pic/blank.png" width="25" height="25" align="center"><br>
+        <input type="button" onclick="getListDatabases('img3')" value="GetListDatabases"><img id="img3" src="pic/blank.png" width="25" height="25" align="center"><br>
+        <input type="button" onclick="getListCategories('img4')" value="GetListCategoriesSync"><img id="img4" src="pic/blank.png" width="25" height="25" align="center"><br>
+        <input type="button" onclick="getListCategoriesAsync('img5')" value="GetListCategoriesAsync"><img id="img5" src="pic/blank.png" width="25" height="25" align="center"><br>
+        <input type="button" onclick="getListLandmarks('img6')" value="GetListLandmarksSync"><img id="img6" src="pic/blank.png" width="25" height="25" align="center"><br>
+        <input type="button" onclick="getListLandmarksAsync('img7')" value="GetListLandmarksAsync"><img id="img7" src="pic/blank.png" width="25" height="25" align="center"><br>
+        <input type="button" onclick="cancelCategoriesAsync('img8')" value="CancelCategoriesAsync"><img id="img8" src="pic/blank.png" width="25" height="25" align="center"><br>
+        <input type="button" onclick="cancelLandmarksAsync('img9')" value="CancelLandmarksAsync"><img id="img9" src="pic/blank.png" width="25" height="25" align="center"><br>
+        <input type="button" onclick="deleteCategory('img10')" value="DeleteCategory"><img id="img10" src="pic/blank.png" width="25" height="25" align="center"><br>
+        <input type="button" onclick="deleteLandmark('img11')" value="DeleteLandMark"><img id="img11" src="pic/blank.png" width="25" height="25" align="center"><br>
+        <input type="button" onclick="exportLandmarks('img12')" value="ExportLandmarks"><img id="img12" src="pic/blank.png" width="25" height="25" align="center"><br>
+        <input type="button" onclick="importLandmarks('img13')" value="ImportLandmarks"><img id="img13" src="pic/blank.png" width="25" height="25" align="center"><br>
+        <input type="button" onclick="organiseLandmarks('img14')" value="OrganiseLandmarks"><img id="img14" src="pic/blank.png" width="25" height="25" align="center"><hr>
+        <div class='landmarks' id='landmarks' bgcolor="#ddeeff" style=width:100%;height:100%;overflow:auto>
+        </div>
+    </form>
+</body>
+</html>
+
+
+

common.js

+
// common.js
+//
+// This file contains some utility functions
+
+// Check the error code and show the information to users
+function checkError(message, resultList, divId, imgId)
+{
+  var errCode = resultList.ErrorCode;
+  var msg = "";
+
+  if (errCode) {
+    msg = message + "<BR>" + "Failed Error: " + errCode + "<BR>";
+    if(resultList.ErrorMessage != undefined)
+      msg += "Error Message: " + resultList.ErrorMessage;
+    showIMG(imgId,"no");
+  } else {
+    showIMG(imgId,"yes");
+  }
+
+  //print error message
+  if(divId != null && divId != undefined)
+    document.getElementById(divId).innerHTML = msg;
+  console.info(msg);
+
+  return errCode;
+}
+
+// Build the message by reading a iteratorable list in a recursive manner
+function showIterableList(iterator)
+{
+  var msg = "";
+  try
+  {
+    iterator.reset();
+    var item;
+    while (( item = iterator.getNext()) != undefined ){
+      msg += showObject( item );
+    }
+  }
+  catch(e)
+  {
+    alert('<showIterableList> ' + e);
+  }
+  return msg;
+}
+
+// Build the message by reading a JS object in a recursive manner
+function showObject( obj )
+{
+  var txt = "";
+  try {
+    if ( typeof obj != 'object' )
+      return "" + obj + '<BR/>';
+    else {
+      for(var key in obj) {
+        txt +=  key + ":";
+        txt += showObject( obj[key] );
+        txt += '<BR/>';
+      }
+      txt += '<BR/>';
+    }
+  }
+  catch (e)
+  {
+    alert("showObject: " + e);
+  }
+  return txt;
+}
+
+// Show the image to indicate the test result
+function showIMG(imgId, isOK)
+{
+  if(imgId == null || imgId == undefined)
+    return;
+
+  if(isOK == "yes")
+    document.getElementById(imgId).src = "pic/yes.png";
+  else if(isOK == "no")
+    document.getElementById(imgId).src = "pic/no.png";
+  else
+    document.getElementById(imgId).src = "pic/blank.png";
+}
+
+// Show elements in object by using 'alert'
+function testObject(obj)
+{
+  var msg = "";
+  for(var key in obj) {
+    msg = msg + ":" + key + "=" + obj[key];
+  }
+  alert(msg);
+}
+
+// Test whether the input is numeric
+function IsNumeric(sText)
+{
+  var ValidChars = "0123456789.";
+  var IsNumber=true;
+  var Char;
+
+  for (i = 0; i < sText.length && IsNumber == true; i++)
+  {
+    Char = sText.charAt(i);
+    if (ValidChars.indexOf(Char) == -1)
+    {
+      IsNumber = false;
+    }
+  }
+  return IsNumber;
+}
+
+

landmarks-sample.js

+
// landmarks-sample.js
+//
+// In this sample Categories will be added, deleted, and listed from default database,
+// Landmarks will be imported, exported, added, deleted, and listed from sample database
+// Also, async operation will be canceled
+
+//SAPI Error Codes
+// 0    - Success
+// 1000 - InvalidServiceArgument
+// 1001 - UnknownArgumentName
+// 1002 - BadArgumentType
+// 1003 - MissingArgument
+// 1004 - ServiceNotSupported
+// 1005 - ServiceInUse
+// 1006 - ServiceNotReady
+// 1007 - NoMemory
+// 1008 - HardwareNotAvailable
+// 1009 - ServerBusy
+// 1010 - EntryExists
+// 1011 - AccessDenied
+// 1012 - NotFound
+// 1013 - UnknownFormat
+// 1014 - GeneralError
+// 1015 - CancelSuccess
+// 1016 - ServiceTimedOut
+// 1017 - PathNotFound
+
+
+// Declare the service object
+var so;
+
+// id of the div used to display information
+const DIV_ID = 'landmarks';
+
+// imgid for callback1 function
+var imgid_callback1;
+
+// imgid for callback2 function
+var imgid_callback2;
+
+// Called from onload()
+function setup()
+{
+  try
+  {
+    so = device.getServiceObject("Service.Landmarks", "IDataSource");
+    console.info("setup: so: %s", so);
+  }
+  catch(e)
+  {
+    alert('<setup> ' +e);
+  }
+}
+
+// Add new Category
+// Note: Category with the CategoryName can not be added twice.
+// So, you should delete just added category first and add category after that
+function addCategory(imgId)
+{
+  // Setup input params using dot syntax
+  var category = new Object();
+  category.CategoryName = 'MyCategory';
+  var criteria = new Object();
+  criteria.Type = 'Category';
+  criteria.Data = category;
+  try
+  {
+    var resultList = so.IDataSource.Add(criteria);
+    checkError("IDataSource::addCategory",resultList,DIV_ID,imgId);
+  }
+  catch(e)
+  {
+    showIMG(imgId,"no");
+    alert ("addCategory: " + e);
+  }
+}
+
+// Populate a Landmark Object with sample data
+function populateLandmark(landmark)
+{
+  var landmarkfields = new Object();
+  landmarkfields.Country = 'USA';
+  landmarkfields.AreaCode = '01803';
+  landmarkfields.City = 'Boston';
+  landmarkfields.District = 'Dist';
+  landmarkfields.Street = 'Wayside Rd';
+  landmarkfields.Telephone = '781-993-9393';
+
+  landmark.DatabaseURI      = 'file://c:eposlm.ldb';
+  landmark.LandmarkName     = 'NewLandmark';
+  landmark.LandmarkDesc     = 'My Landmark';
+  landmark.LandmarkFields   = landmarkfields;
+}
+
+// Add new Landmark (sync operation)
+function addLandmark(imgId)
+{
+  // Setup input params using dot syntax
+  var criteria = new Object();
+  criteria.Type = 'Landmark';
+
+  try
+  {
+    var lm = so.IDataSource.New( criteria );
+    populateLandmark(lm);
+    var criteria1 = new Object();
+    criteria1.Type = 'Landmark';
+    criteria1.Data = lm;
+    var resultList = so.IDataSource.Add(criteria1);
+    checkError("IDataSource::addLandmark",resultList,DIV_ID,imgId);
+  }
+  catch(e)
+  {
+    showIMG(imgId,"no");
+    alert ("addLandmark: " + e);
+  }
+}
+
+
+// Get List of all Databases (sync operation)
+function getListDatabases(imgId)
+{
+  // Setup input params using dot syntax
+  var criteria = new Object();
+  criteria.Type = 'Database';
+  try
+  {
+    var resultList = so.IDataSource.GetList(criteria);
+    if(!checkError("IDataSource::getListDatabases",resultList,DIV_ID,imgId)) {
+      document.getElementById(DIV_ID).innerHTML = showIterableList(resultList.ReturnValue);
+    }
+  }
+  catch(e)
+  {
+    showIMG(imgId,"no");
+    alert ("getListDatabases: " + e);
+  }
+}
+
+// Get List of all Categories (sync operation)
+function getListCategories(imgId)
+{
+  // Setup input params using dot syntax
+  var criteria = new Object();
+  criteria.Type = 'Category';
+  try
+  {
+    var resultList = so.IDataSource.GetList(criteria);
+    if(!checkError("IDataSource::getListCategories",resultList,DIV_ID,imgId)) {
+      document.getElementById(DIV_ID).innerHTML = showIterableList(resultList.ReturnValue);
+    }
+  }
+  catch(e)
+  {
+    showIMG(imgId,"no");
+    alert ("getListCategories: " + e);
+  }
+}
+
+// Get List of all Categories (Async operation)
+function getListCategoriesAsync(imgId)
+{
+  // Setup input params using dot syntax
+  var criteria = new Object();
+  criteria.Type = 'Category';
+  try
+  {
+    imgid_callback1 = imgId;
+    var resultList = so.IDataSource.GetList(criteria, callback1);
+    if(!checkError("IDataSource::getListCategoriesAsync",resultList,DIV_ID,imgId))
+      showIMG(imgId, "");
+  }
+  catch(e)
+  {
+    showIMG(imgId,"no");
+    alert ("addCategory: " + e);
+  }
+}
+
+// Get List of Landmarks (sync operation)
+function getListLandmarks(imgId)
+{
+  var sort = new Object();
+  sort.Key = 'LandmarkName';
+  sort.Order = 'Descending';
+  var criteria = new Object();
+  criteria.Type = 'Landmark';
+  criteria.Sort = sort;
+  try
+  {
+    var resultList = so.IDataSource.GetList(criteria);
+    if(!checkError("IDataSource::getListLandmarks",resultList,DIV_ID,imgId)) {
+      document.getElementById(DIV_ID).innerHTML = showIterableList(resultList.ReturnValue);
+    }
+  }
+  catch(e)
+  {
+    showIMG(imgId,"no");
+    alert ("getListLandmarks: " + e);
+  }
+}
+
+// Get List of Landmarks (Async operation)
+function getListLandmarksAsync(imgId)
+{
+  var sort = new Object();
+  sort.Key = 'LandmarkName';
+  sort.Order = 'Descending';
+  var criteria = new Object();
+  criteria.Type = 'Landmark';
+  criteria.Sort = sort;
+  try
+  {
+    imgid_callback2 = imgId;
+    var resultList = so.IDataSource.GetList(criteria, callback2);
+    if(!checkError("IDataSource::getListLandmarksAsync",resultList,DIV_ID,imgId))
+      showIMG(imgId, "");
+  }
+  catch(e)
+  {
+    showIMG(imgId,"no");
+    alert ("getListLandmarksAsync: " + e);
+  }
+}
+
+// cancel get categories
+function cancelCategoriesAsync(imgId)
+{
+  // Setup input params using dot syntax
+  var criteria = new Object();
+  criteria.Type = 'Category';
+  try
+  {
+    imgid_callback1 = imgId;
+    var resultList = so.IDataSource.GetList(criteria, callback1);
+    if(!checkError("IDataSource::cancelCategoriesAsync",resultList,DIV_ID,imgId)) {
+      showIMG(imgId, "");
+      var criteria2 = new Object();
+      criteria2.TransactionID = resultList.TransactionID;
+      var resultList2 = so.IDataSource.Cancel(criteria2);
+      checkError("IDataSource::cancelCategoriesAsync",resultList2,DIV_ID,imgId);
+    }
+  }
+  catch(e)
+  {
+    showIMG(imgId,"no");
+    alert ("cancelCategoriesAsync: " + e);
+  }
+}
+
+// cancel get landmarks
+function cancelLandmarksAsync(imgId)
+{
+  var sort = new Object();
+  sort.Key = 'LandmarkName';
+  sort.Order = 'Descending';
+  var criteria = new Object();
+  criteria.Type = 'Landmark';
+  criteria.Sort = sort;
+  try
+  {
+    imgid_callback2 = imgId;
+    var resultList = so.IDataSource.GetList(criteria, callback2);
+    if(!checkError("IDataSource::cancelLandmarksAsync",resultList,DIV_ID,imgId)) {
+      showIMG(imgId, "");
+      var criteria2 = new Object();
+      criteria2.TransactionID = resultList.TransactionID;
+      var resultList2 = so.IDataSource.Cancel(criteria2);
+      checkError("IDataSource::cancelLandmarksAsync",resultList2,DIV_ID,imgId);
+    }
+  }
+  catch(e)
+  {
+    showIMG(imgId,"no");
+    alert ("cancelLandmarksAsync: " + e);
+  }
+}
+
+// Delete one Category (sync operation)
+function deleteCategory(imgId)
+{
+  var landmarkIdStr = prompt("Please type the landmark id", "0");
+  if(landmarkIdStr == "" || landmarkIdStr == null)
+    return;
+
+  // Setup input params using dot syntax
+  var data = new Object();
+  data.id = parseInt(landmarkIdStr);
+  var criteria = new Object();
+  criteria.Type = 'Category';
+  criteria.Data = data;
+  try
+  {
+    var resultList = so.IDataSource.Delete(criteria);
+    checkError("IDataSource::deleteCategory",resultList,DIV_ID,imgId);
+  }
+  catch(e)
+  {
+    showIMG(imgId,"no");
+    alert ("deleteCategory: " + e);
+  }
+}
+
+// Delete one Landmark (sync operation)
+function deleteLandmark(imgId)
+{
+  var landmarkIdStr = prompt("Please type the landmark id", "0");
+  if(landmarkIdStr == "" || landmarkIdStr == null)
+    return;
+
+  // Setup input params using dot syntax
+  var data = new Object();
+  data.id = parseInt(landmarkIdStr);
+  var criteria = new Object();
+  criteria.Type = 'Landmark';
+  criteria.Data = data;
+  try
+  {
+    var resultList = so.IDataSource.Delete(criteria);
+    checkError("IDataSource::deleteLandmark",resultList,DIV_ID,imgId);
+  }
+  catch(e)
+  {
+    showIMG(imgId,"no");
+    alert ("deleteLandmark: " + e);
+  }
+}
+
+// Export specific Landmarks to xml file (sync operation)
+// When we export file already exist it returns an errorCode !!!
+function exportLandmarks(imgId)
+{
+  // Setup input params using dot syntax
+  var data = new Object();
+  data.DestinationFile = 'landmarks-export.xml';
+  data.MimeType = 'application/vnd.nokia.landmarkcollection+xml';
+  data.IdList = [ "3", "4" ];
+  var criteria = new Object();
+  criteria.Type = 'Landmark';
+  criteria.Data = data;
+  try
+  {
+    var resultList = so.IDataSource.Export(criteria);
+    checkError("IDataSource::exportLandmarks",resultList,DIV_ID,imgId);
+  }
+  catch(e)
+  {
+    showIMG(imgId,"no");
+    alert ("exportLandmarks: " + e);
+  }
+}
+
+// Import Landmarks from xml file (sync operation)
+function importLandmarks(imgId)
+{
+  // Setup input params using dot syntax
+  var data = new Object();
+  data.SourceFile = 'landmarks-export.xml';
+  data.MimeType = 'application/vnd.nokia.landmarkcollection+xml';
+  var criteria = new Object();
+  criteria.Type = 'Landmark';
+  criteria.Data = data;
+  try
+  {
+    var resultList = so.IDataSource.Import(criteria);
+    checkError("IDataSource::importLandmarks",resultList,DIV_ID,imgId);
+  }
+  catch(e)
+  {
+    showIMG(imgId,"no");
+    alert ("importLandmarks: " + e);
+  }
+}
+
+// Organise Landmarks with entered ladmark id (sync operation)
+function organiseLandmarks(imgId)
+{
+  // Setup input params using dot syntax
+  var landmarkIdStr = prompt("Please type the landmark id", "0");
+  if(landmarkIdStr == "" || landmarkIdStr == null)
+    return;
+
+  var data = new Object();
+  data.id = parseInt(landmarkIdStr);
+  data.IdList = [ "3", "4" ];
+  var criteria = new Object();
+  criteria.Type = 'Landmark';
+  criteria.Data = data;
+  criteria.OperationType = 'Associate';
+  try
+  {
+    var resultList = so.IDataSource.Organise(criteria);
+    checkError("IDataSource::organiseLandmarks",resultList,DIV_ID,imgId);
+  }
+  catch(e)
+  {
+    showIMG(imgId,"no");
+    alert ("organiseLandmarks: " + e);
+  }
+}
+
+// This is the asynchronous callback handler
+function callback1(transId, eventCode, result)
+{
+  console.info("callback1: transId: %d  eventCode: %d result.ErrorCode: %d", transId, eventCode, result.ErrorCode);
+  if(!checkError("IDataSource::getListCategoriesAsync",result,DIV_ID,imgid_callback1)) {
+    document.getElementById(DIV_ID).innerHTML = showIterableList(result.ReturnValue);
+  }
+}
+
+// This is the asynchronous callback handler
+function callback2(transId, eventCode, result)
+{
+  console.info("callback2: transId: %d  eventCode: %d result.ErrorCode: %d", transId, eventCode, result.ErrorCode);
+  if(!checkError("IDataSource::getListLandmarksAsync",result,DIV_ID,imgid_callback2)) {
+    document.getElementById(DIV_ID).innerHTML = showIterableList(result.ReturnValue);
+  }
+}
+
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-13C405C4-F914-469C-84BF-D1EDF0322A24.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-13C405C4-F914-469C-84BF-D1EDF0322A24.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,61 @@ + + +Returned +notification information

Returned +notification information

+

The ReturnValue property returned by callback is an iterator containing the requested notification information +on calendar entry changes. Each item (object) in the iterator corresponds +to one change in the target calendar.

+
+ + + + + + + + + + + + + + + + + + +
Table: ReturnValue properties +for notification information
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

<item>.ChangeType

+
+

Specifies the type of change made in the calendar.

+
+

string

+
+

Possible values:

+
    +
  • "Add"

  • +
  • "Delete"

  • +
  • "Modify"

  • +
  • "Unknown"

  • +
+
+

<item>.LocalId

+
+

Specifies the LocalId of the calendar entry that +was created, deleted, or updated.

+
+

string

+
 
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-13E2DE63-47E5-4E2A-85FF-C8B0CAB9D4DE.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-13E2DE63-47E5-4E2A-85FF-C8B0CAB9D4DE.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,15 @@ + + +Using screen controls

Using screen controls

A control is a user interface element that the user can interact with. Controls are used in PC applications, on web pages, and in mobile device applications. In Web applications, you can use HTML form and control elements or create JavaScript objects. On touch devices, the controls must be big enough to select with a finger. You can customize the controls to make them bigger.

+ +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-13E5F1C9-D033-4260-AEE8-168F2622A147.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-13E5F1C9-D033-4260-AEE8-168F2622A147.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,91 @@ + + +Criteria for +modifying a system attribute value

Criteria for +modifying a system attribute value

+

The criteria object specifies the new value +for the system attribute.

+

The criteria object has three properties: Entity, Key, +and SystemData. These are described in the following +table.

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
Table: Criteria object properties
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

criteria.Entity

+
+

Specifies the entity of the system attribute.

+

Together with Key, this specifies the system attribute +to modify.

+

For more information about entities, see section System attributes.

+
+

string

+
+

For a complete list of supported entities, see section Supported system attributes (entities and keys).

+

For example: "Display"

+
+

criteria.Key

+
+

Specifies the key of the system attribute. The available keys depend +on the entity.

+

Together with Entity, this specifies the system +attribute to modify.

+

For more information about keys, see section System attributes.

+
+

string

+
+

For a complete list of supported keys per entity, see the Key column +of the tables in section Supported system attributes (entities and keys).

+

For example: "Wallpaper"

+
+

criteria.SystemData

+
+

Specifies the new value for the system attribute.

+

The SystemData object has one or more properties +that together represent the system attribute value. The exact set of properties +depends on the system attribute (specifically, on the system data type used +for input).

+

For more information about system attribute values, see section Supported system attributes (entities and keys).

+
+

object

+
+

The object properties depend on the system attribute. See the Input column +cell for the appropriate system attribute in section Supported system attributes (entities and keys).

+

For example, the Display - Wallpaper system attribute +takes StringData information +as input for SetInfo:

+

SystemData.StringData = "C://Data//Others//wallpaper.jpeg"

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-150E440F-56E4-4249-8739-A5A7A2050600.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-150E440F-56E4-4249-8739-A5A7A2050600.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,162 @@ + + +ILocation.GetLocation()

ILocation.GetLocation()

+

Description:

+

The GetLocation method retrieves the current location +of the device.

+

This method can be called both synchronously and asynchronously.

+

Syntax:

+

For synchronous calls:

+
result = so.ILocation.GetLocation(criteria);
+ +

For asynchronous calls:

+
result = so.ILocation.GetLocation(criteria, callback);
+ +

Arguments:

+
    +
  • criteria:

    + +

    This is an object that specifies what type of device location information +is returned and how. For more information about the object properties and +how to define them, see section Criteria for retrieving location information.

    + +
  • +
  • callback:

    + +

    The callback argument is the name of the method +that is executed when an asynchronous GetLocation call +has results or status information to return. You must define this method separately. +Follow the instructions in section Defining the callback handler for an asynchronous method to +define the callback method.

    +

    This argument is used only with an asynchronous GetLocation call.

    + +
  • +
+

Return value:

+

If synchronous, the GetLocation method returns +an object that contains the requested location information, an error code, +and an error message.

+
+ + + + + + + + + + + + + + + + + + + + +
Table: Return value +properties for a synchronous GetLocation
+

Property

+
+

Description

+
+

Value

+
+

result.ReturnValue

+
+

This is an object that contains the requested location information.

+
+

See Returned location information.

+
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See Location Service API error messages.

+
+

If asynchronous, the GetLocation method returns +an object that contains the initial return value for the asynchronous call +it started (see the following table). The actual location information is returned +by the callback method +in the ReturnValue property of its result object. The +returned information is described in section Returned location information.

+
+ + + + + + + + + + + + + + + + + + + + + +
Table: Return value +properties for an asynchronous GetLocation
+

Property

+
+

Description

+
+

Value

+
+

result.TransactionID

+
+

This is a number used as an identification to match transactions started +with the asynchronous GetLocation call to one or more +calls it generates to callback.

+
 
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See Location Service API error messages.

+
+

Remarks:

+
    +
  • The availability of specific location information depends +on the underlying GPS technology. Other factors, such as the number of satellites +available for a location fix, also affect what information can be returned. +You can change the positioning system used by an S60 device from the Settings +> General > Positioning > Positioning methods menu.

  • +
  • It takes time to retrieve the initial position fix. Subsequent +requests are faster.

  • +
+

Example code:

+

+

For the complete source of a sample widget +that demonstrates how to use this Service API, see the +full example.

+ + + + +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-154DA5F4-32F6-42E2-A107-A7C72F6F9DE5.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-154DA5F4-32F6-42E2-A107-A7C72F6F9DE5.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,114 @@ + + +IDataSource.Import()

IDataSource.Import()

+

Description:

+

The Import method imports a contact to a contacts +database. The information must be imported from a vCard file.

+

This method can be called both synchronously and asynchronously.

+

Syntax:

+

For synchronous calls:

+
result = so.IDataSource.Import(criteria);
+ +

For asynchronous calls:

+
result = so.IDataSource.Import(criteria, callback);
+ +

Arguments:

+
    +
  • criteria:

    + +

    This is an object that specifies the contact to import and optionally +the target database. For more information about the object properties and +how to define them, see section Criteria for importing a contact.

    + +
  • +
  • callback:

    + +

    The callback argument is the name of the method +that is executed when an asynchronous Import call has +results or status information to return. You must define this method separately. +Follow the instructions in section Defining the callback handler for an asynchronous method to +define the callback method.

    +

    This argument is used only with an asynchronous Import call.

    + +
  • +
+

Return value:

+

If synchronous, the Import method returns an object +that contains an error code and an error message.

+

If asynchronous, the method returns an object that contains a transaction +ID for the callback instance, +an error code, and an error message. When the asynchronous call has completed, callback returns +an object that contains an error code and an error message (see Table: Callback return value).

+
+ + + + + + + + + + + + + + + + + + + + + +
Table: Return value +properties for Import
+

Property

+
+

Description

+
+

Value

+
+

result.TransactionID

+
+

This is a number used as an identification to match transactions started +with an asynchronous Import call to one or more calls +it generates to callback.

+

This property is only valid for asynchronous calls.

+
 
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See Contacts Service API error messages.

+
+

Remarks:

+
    +
  • The default contacts database is cntdb://c:contacts.cdb.

    +
  • +
  • If the contacts database is specified, the contact is imported +there. If no database is specified, the default database is used. If the default +database does not exist, it is created and the contact is imported there.

    +
  • +
  • SIM card databases only support name and number keys for +vCard.

  • +
+

Example code:

+

+

For the complete source of a sample widget +that demonstrates how to use this Service API, see the +full example.

+ + + + +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-1595C071-A538-4CA8-8D2B-0B8793C5B140-master.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-1595C071-A538-4CA8-8D2B-0B8793C5B140-master.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-1595C071-A538-4CA8-8D2B-0B8793C5B140_d0e10089_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-1595C071-A538-4CA8-8D2B-0B8793C5B140_d0e10089_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-159FCC18-2C9D-49F0-BAC1-DFEAADCF1D89.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-159FCC18-2C9D-49F0-BAC1-DFEAADCF1D89.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,22 @@ + + +Saving battery time

Saving battery time

Mobile devices are not constantly connected to a power source but run on battery power. Latest devices are equipped with large color displays, multi-megapixel cameras, various radio transmitters, advanced multimedia, and other fancy features—all of which consume a lot of power. At the same time, more power-hungry applications that use the new possibilities are provided. Power optimization has become crucial to keep the device power consumption at an acceptable level and to prevent users from running out of battery time.

+

The amount of power an application consumes is affected by:

+
    +
  • Timers.

  • +
  • Backlight.

  • +
  • Network connections.

  • +
  • Sensors.

  • +
+

For more tips on how to manage the power consumption of an application, see Power Management on Forum Nokia.

+

You can use the power information services to determine what the battery level is on a device and whether the charger is connected to the device. For more information, see Power information services.

+

Using timers

You can use timers to update content that you fetch from the device. Observe the following guidelines:

    +
  • Turn off timers when they are no longer needed or when the application is moved to the background.

  • +
  • Do not fire timers at minimum intervals (for example, 10 ms) for long periods of time. Firing timers at longer intervals (for example, every 1 to 2 seconds) does not necessarily have a significant effect.

  • +
+

Using device backlight

The backlight of the mobile device screen consumes energy. Do not override the default backlight settings unless it is absolutely necessary.

+

Creating network connections

Implement a reasonable schedule for retrieving data via network connections. For example, retrieve news data once in an hour. Optimize the amount of data that is transferred. For more information, see Retrieving data.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-15A1A393-FA24-4580-BD71-27E458AD392D-master.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-15A1A393-FA24-4580-BD71-27E458AD392D-master.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-15A1A393-FA24-4580-BD71-27E458AD392D_d0e2127_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-15A1A393-FA24-4580-BD71-27E458AD392D_d0e2127_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-15A1A393-FA24-4580-BD71-27E458AD392D_d0e2510_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-15A1A393-FA24-4580-BD71-27E458AD392D_d0e2510_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-1666F263-F1CB-4928-B2A7-E518B43983BA.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-1666F263-F1CB-4928-B2A7-E518B43983BA.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,10 @@ + + +Handling text input

Handling text input

You can use HTML tags to create text boxes in widgets. The text boxes are mapped to an S60 text box component. The S60 platform interprets the key and character event and determines whether the input is given using the basic mobile device keyboard or a full keyboard and with or without predictive text input. To handle user input in text boxes, examine the textual input value.

+

Figure: Text input field in a widget

+

When a text box is in editing mode, key events are absorbed by the widget engine. Therefore, widgets cannot instantly receive key events to detect which character users enter to the text box. This means that users must select the text box before they can type in it. You can use JavaScript to write a key map engine that detects key events to allow immediate input. This allows you to develop an instant search function where characters are detected immediately after users types them into the search field, for example. For an example of a key map engine, see WRT NumKeyTranslator Widget on the Forum Nokia Wiki.

+

To create text or input dialogs in your widget

Use the <textarea> or <input type="text"> tag in the HTML file, for example.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-16D4BAFC-1AC3-46B5-BA44-4B82014D97E9_d0e9797_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-16D4BAFC-1AC3-46B5-BA44-4B82014D97E9_d0e9797_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-180DCD93-B532-481C-A0B4-E0C1CC7C3440-master.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-180DCD93-B532-481C-A0B4-E0C1CC7C3440-master.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-180DCD93-B532-481C-A0B4-E0C1CC7C3440_d0e2671_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-180DCD93-B532-481C-A0B4-E0C1CC7C3440_d0e2671_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-180F11FD-8D26-4305-814F-01BF8DB2DDC8.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-180F11FD-8D26-4305-814F-01BF8DB2DDC8.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,278 @@ + + +openApplication()

openApplication()

+

Description:

+

The openApplication method enables a widget to launch an S60 mobile application in the stand-alone mode.

+

Syntax:

+
[void] window.widget.openApplication(HexNumber Uid, String param) 
+

or

+
[void] widget.openApplication(HexNumber Uid, String param)
+

Arguments:

+
    +
  • Uid:

    + +

    A hexadecimal number that specifies the UID of the S60 application to be activated. See the table below for example application UIDs.

    + +
  • +
  • param:

    + +

    A text string defining a possible argument string that is accepted by the S60 application to be activated. The arguments vary between applications. For example, when defined for the Web Browser for S60 application (UID: 0x10008D39), the parameter "4"+"<Space>"+"<url>" tells the browser to open with content from a specific URL. The parameter "5" launches the browser with the Start page open. You can also use an empty string with any application, which results in launching the specified application with default behavior.

    + +
  • +
+

Return value:

+

This method does not return a value.

+

Remarks:

+

For security reasons, a widget cannot open another widget by using this method.

+

Example code:

+
// function launches the S60 Profiles application
+widget.openApplication(0x100058F8, "");
+

Example application UIDs:

+

The following table lists some of the applications that can be launched from a widget, as well as the application UIDs.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Application name

+
+

Application UID

+
+

Description

+
+

Web Browser for S60

+
+

0x10008D39

+
+

Default browser application of the S60 platform.

+
+

Messaging

+
+

0x100058C5

+
+

Enables messaging operations, such as sending and receiving text messages and email.

+
+

Contacts

+
+

0x101f4cce

+
+

Enables the mobile device user to store and manage information related to his or her contacts, for example, phone numbers and email addresses.

+
+

Log

+
+

0x101f4cd5

+
+

Provides a record of communication events, such as missed voice calls, duration of the last voice call, and received text messages.

+
+

Profiles

+
+

0x100058F8

+
+

Enables the mobile device user to have different settings for different situations, for example, to set the device ringing type to silent during a meeting or set the vibrating alert on when outdoors.

+
+

Calendar

+
+

0x10005901

+
+

Helps the mobile device user in organizing his or her schedule, for example by adding notes to specific dates.

+
+

Clock

+
+

0x10005903

+
+

Enables the mobile device user to see the date and time for selected cities around the world, as well as set alarms.

+
+

Recorder

+
+

0x100058CA

+
+

Enables the mobile device user to record audio clips.

+
+

Converter

+
+

0x101F4668

+
+

Enables the mobile device user to convert various measures from one unit to another, for example meters to yards.

+
+

Calculator

+
+

0x10005902

+
+

Enables the mobile device user to make basic calculations.

+
+

Notes

+
+

0x1000599d

+
+

Text editor that enables the mobile device user to write, view and edit short textual notes.

+
+

File Manager

+
+

0x101f84eb

+
+

Enables the mobile device user to manage and organize files that are stored in the phone memory of the device or on an external memory card.

+
+

Gallery

+
+

0x101f8599

+
+

Enables the mobile device user to view and manage media files, such as images, music files and video clips.

+
+

Camera - on a device with one camera

+
+

101f857a

+
+

Enables the mobile device user to take and manage still pictures as well as to record short video clips with the digital camera of the device.

+
+

Camera - on a device with two cameras

+
+

101ffa86

+
+

Enables the mobile device user to take and manage still pictures as well as to record short video clips with the digital cameras of the device.

+
+

Music Player

+
+

0x102072c3

+
+

Enables the mobile device user to listen to music and sound files as well as to manage his or her music collection.

+
+

RealPlayer

+
+

0x10005a3e

+
+

Enables the mobile device user to play and manage media files that are stored in the device, such as video clips, or media streams from remote locations.

+
+

Bluetooth

+
+

0x10005951

+
+

Enables the mobile device user to connect to other devices using the Bluetooth local connectivity technology.

+
+

Infrared

+
+

0x1000594d

+
+

Enables the mobile device user to connect to other devices using the infrared technology.

+
+

Settings

+
+

0x100058ec

+
+

Enables the mobile device user to manage application and device settings.

+
+

Themes

+
+

0x10005a32

+
+

Enables the mobile device user to personalize the look and feel of the device with specific UI themes.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-1812A0D5-74CC-4A94-AF91-970465F6A738.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-1812A0D5-74CC-4A94-AF91-970465F6A738.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,186 @@ + +Enabling STEW for the home screen

Enabling STEW for the home screen

Users can add the Simple Texting Example Widget (STEW) to the home screen.

+

The resolution of STEW on the home screen is 309 x 85 pixels and the data is refreshed every 1 second.

+

Figure: STEW on the home screen

+

Before you can add STEW to the home screen, you must create STEW, as instructed in Designing STEW user interface

+

Figure: STEW Update Status view in full screen mode

+

To enable STEW for the home screen

    +
  1. Download the STEW home screen widget source files to your computer.

  2. +
  3. Modify the info.plist file to include the following key:

    <key>MiniViewEnabled</key>
    +<true/> 
    +
    For more information on the info.plist, see Creating the info.plist file.
  4. +
  5. Add a home screen widget area (mini_view) to the main.html file:

    <body onload="javascript:init();" onresize="javascript:onResize();" onshow="javascript:setViewMode();">
    +
    +<div id="container">
    +	...
    +</div> <!-- end of 'container' -->
    +
    +<div id="mini_view" class="hidden">
    +	<table id="mini_view_table" class="miniview_tweets" cellspacing="0">
    +		<tr>
    +			<td id="miniViewLoading"></td>
    +		</tr>
    +	</table>
    +</div>
    +
    +</body>
    +
    For more information on the HTML file, see Creating the widget HTML file.
  6. +
+

To detect screen changes

    +
  1. Add the onshow event handler to the main.html to detect screen (viewport) changes:

    <body onload="javascript:init();" onresize="javascript:onResize();" onshow="javascript:setViewMode();">
  2. +
  3. Modify the onresize method in the main.js file to check whether the widget should be displayed on the home screen or in full screen mode:

    function onResize(){
    +	if ( !Helper.isMiniViewMode() ) {
    +		resizeNormalView();
    +	}
    +	setViewMode();          
    +}
    +

    The function resizeNormalView contains all the code previously implemented in the onresize function.

  4. +
  5. Implement the setViewMode function to show or hide the HTML for the full screen widget or the home screen widget:

    function setViewMode(){
    +	var isInMiniView = Helper.isMiniViewMode();
    +	
    +	if ( isInMiniView ) {
    +		// Hide main screen.
    +		Helper.show( "container", false );
    +		// ... and show MiniView.
    +		Helper.show( "mini_view", true );
    +		miniView.onActivated();
    +	} else {
    +		// Hide MiniView.
    +		Helper.show( "mini_view", false );
    +		miniView.onDeactivated();
    +		// ... and show main screen.
    +		Helper.show( "container", true );
    +	}
    +}
    +
  6. +
  7. To determine whether a widget is running on the home screen, set a threshold value for the screen size in the helper.js file:

    isMiniViewMode: function() {
    +	var size = this.getScreenSize();
    +	return ( size.height < Helper.MINI_VIEW_TRESHOLD );
    +}	
    +
    +Helper.MINI_VIEW_TRESHOLD = 150;
    +

    If the screen size is less than the threshold value, you can assume that the widget is running on the home screen.

  8. +
+

To lay out STEW on the home screen

    +
  1. Create a separate CSS file, miniview.css, that defines the layout of STEW on the home screen:

    /* ******** */
    +/* MINIVIEW */
    +/* ******** */
    +#mini_view {
    +    width: 308px;
    +    height: 85px;
    +		background: white;
    +    overflow: hidden;
    +}
    +
    +#mini_view th {
    +	color: #fff;
    +	font-size: 12px;
    +	font-weight: bold;
    +	background: #7fcce5;
    +	padding: 4px 6px;
    +	text-align: left;
    +}
    +
    +#mini_view .miniview_tweets {
    +    width: 100%;
    +}
    +
    +#mini_view .miniview_tweets .tweet{
    +    background: url(images/tr_bg.png) repeat-x bottom #fff;
    +}
    +
    +#mini_view .miniview_tweets .tweet .image{
    +    padding: 1px 3px 1px 2px;
    +    width: 16px;
    +	min-width: 16px;
    +    vertical-align: top;
    +}
    +
    +#mini_view .miniview_tweets .tweet .image img{ 
    +    width: 100%;
    +}
    +
    +#mini_view .miniview_tweets .tweet .tweet_content{
    +    padding: 2px;
    +    vertical-align: top;
    +}
    +
    +#mini_view .miniview_tweets .tweet .name {
    +    color: #0099cc;
    +    font-size: 12px;
    +    font-weight: bold;
    +}
    +
    +#mini_view .miniview_tweets .tweet .status {
    +    color: #666666;
    +    font-size: 10px;
    +    float: left;
    +}
    +
    +
  2. +
  3. Add a reference to miniview.css to the main.html file:

    <head>
    +	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    +	<link href="style.css" rel="stylesheet" type="text/css">
    +	<link href="style_small.css" rel="stylesheet" type="text/css">
    +	<link href="miniview.css" rel="stylesheet" type="text/css">
    +		...
    +</head>
    +
  4. +
+

To implement the functionality of STEW on the home screen

    +
  1. Implement STEW home screen widget functionality in the MiniView.js file.

  2. +
  3. Users can set the refresh rate for the home screen widget in the STEW Settings view when the widget is running in full screen mode. Create the onActivated function that is called from the setViewMode function to check the refresh rate when the home screen widget is activated:

    function MiniView() {
    +
    +}
    +MiniView.prototype.onActivated = function() {
    +	// Get the refresh rate.
    +	var refresh = parseInt( widget.preferenceForKey( SettingsScreen.KEY_REFRESH ) );
    +	if ( isNaN( refresh ) ) {
    +		refresh = 30000; // Default to 30 seconds.
    +	}
  4. +
  5. Create a timer to refresh the home screen widget at the set intervals. The first refresh happens immediately to fetch the latest status updates.

    	// Start the timer which refreshes the miniview.
    +	var self = this;
    +	this.timerId = setInterval( function(){
    +		self.refresh();
    +	}, refresh );
    +	
    +	// Timer will trigger after the refresh period so refresh manually now.
    +	this.refresh();
    +}
    +
    +MiniView.prototype.refresh = function() {
    +	var self = this;
    +	twitterService.onSuccess = function( response ) { self.onTwitterResponse( response ) }
    +	twitterService.onError = function( status ) { self.onTwitterError( status ) }
    +	
    +	twitterService.getPublicTweets( 3 );
    +}
  6. +
  7. Timers consume battery power on mobile devices. Create a function to stop the timer when the home screen widget is deactivated. The function is called from the setViewMode function.

    MiniView.prototype.onDeactivated = function() {
    +	// Stop timer.
    +	clearInterval( this.timerId );	
    +}
  8. +
  9. Create a function to fetch data for the home screen widget:

    MiniView.prototype.onTwitterResponse = function( response ) {
    +	// Fill in dummy data here.
    +	var tweetsTable = document.getElementById( "mini_view_table" );
    +	var html = Helper.createTableHeader( "Friends and my tweets" );
    +
    +	// Fill in the table.
    +	for ( var i = 0; i < response.length; ++i ) {
    +		var tweet = response[i];
    +		
    +		html += Helper.createStatusRow( tweet.user.profile_image_url,
    +			tweet.user.screen_name,
    +			tweet.text, "", "" );
    +	}
    +	
    +	tweetsTable.innerHTML = html;
    +}
  10. +
  11. If an error occurs during data retrieval, display an error message:

    MiniView.prototype.onTwitterError = function( status ) {
    +	var tweetsTable = document.getElementById( "mini_view_table" );
    +	tweetsTable.innerHTML = "Error...";
    +}
  12. +
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-1A3ECAC1-3F09-4602-A1CD-82164040A664.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-1A3ECAC1-3F09-4602-A1CD-82164040A664.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,32 @@ + + +Web Runtime versions and device support

Web Runtime versions and device support

+

Web Runtime versions

The following table summarizes the changes for each version of the Web Runtime (WRT) environment.

+ + + + + + + + + + + + + + + + +
Table: Web Runtime version information

WRT version

Changes

WRT 1.0

    +
  • First release of the S60 Web Runtime environment.

  • +
  • Support for widgets through built-in JavaScript objects.

  • +

WRT 1.1

    +
  • Support for S60 Platform Services through JavaScript Service APIs.

  • +
  • Support for home screen widgets on compatible S60 5th edition devices, such as the Nokia N97.

  • +

The Web Runtime environment is backward-compatible. Widgets created for WRT 1.0 run normally with WRT 1.1. However, you should take newer technologies, such as different display sizes and the introduction of touch UI, into consideration when running WRT 1.0 widgets on newer mobile devices. Widgets created using the WRT 1.1 Service APIs do not work with WRT 1.0.

For detailed information about the features supported by the WRT versions, see section Web Runtime features. For information about the Internet technology standards supported by WRT, see section Web Runtime standards.

+

Web Runtime device support

WRT 1.0 is supported on S60 3rd Edition, Feature Pack 2 devices.

WRT 1.1 is supported on S60 5th Edition devices.

You can find information about which mobile device models support the Web Runtime environment on the Web Run-Time technology page at the S60 Web site. You can find more specific information about the devices at the Forum Nokia Device Specifications page and the S60 devices page.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-1A678A11-0BDD-4F64-9F40-013F6CDB81D7.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-1A678A11-0BDD-4F64-9F40-013F6CDB81D7.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,26 @@ + + +JavaScript SystemInfo Service API (WRT 1.0)

JavaScript SystemInfo Service API (WRT 1.0)

+

This SystemInfo Service API is supported since WRT 1.0.

+

The SystemInfo Service provides a set of system information services, allowing widgets to access a device's properties and to control certain device features. The SystemInfo Service API is implemented in a plug-in module and it is integrated into the WRT environment.

+

To use the SystemInfo APIs, each widget must load the plug-in module explicitly by defining the following HTML code in its main HTML document:

+
<embed type="application/x-systeminfo-widget" hidden="yes"></embed>
+

Then the reference to the object must be retrieved via a JavaScript code as shown below:

+
var sysinfo = document.embeds[0];
+

Note: In the code above, it is assumed that the embedded systeminfo is the first embed element in the HTML file.

+

Throughout the following sections where syntax and example codes illustrate the usage of the SystemInfo API, it is assumed that the plug-in module is loaded and the reference to the object is defined as sysinfo as implemented above.

+
+

The services provided by the plug-in SystemInfo API can be divided into seven main categories:

+ +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-1A98E402-3609-4E83-A86C-98AB37025A47.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-1A98E402-3609-4E83-A86C-98AB37025A47.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,253 @@ + + +Criteria for +sending a message

Criteria for +sending a message

+

The criteria object specifies what type +of message to send and what the message details are.

+

The properties for this object are described in the following table. +Properties enclosed in brackets are optional.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Criteria object properties
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

criteria.MessageType

+
+

Specifies the type of message to send.

+
+

string

+
+

Possible values:

+
    +
  • "SMS"

  • +
  • "MMS"

  • +
+
+

criteria.To

+
+

Specifies the recipient of the message.

+

If you want to send the message to multiple recipients, use the MessageParam.To property. +You can also specify Cc and Bcc recipients with MessageParam.

+
+

string

+
 
+

[criteria.BodyText]

+
+

Specifies the body text of the message.

+
+

string

+
 
+

[criteria.Subject]

+
+

Specifies the subject of the message.

+

Note: This property is only valid for MMS. SMS does not support subject.

+
+
+

string

+
 
+

[criteria.Attachment]

+
+

Specifies the full path and file name of the attachment.

+

If you want to include multiple attachments to the message, use the MessageParam.AttachmentList property.

+

Note: This property is only valid for MMS. SMS does not support attachments.

+
+
+

string

+
 
+

[criteria.MimeType]

+
+

Specifies the MIME type of the attachment.

+
+

string

+
 
+

[criteria.MessageParam]

+
+

Specifies the full details of the message depending on its type. If +this is an MMS message, the body text is added as a text attachment.

+
+

object

+
+

Object with the properties specified below

+
+

[criteria.MessageParam.To]

+
+

Specifies the recipients of the message.

+

MessageParam.To[0] specifies the first recipient.

+
+

array of strings

+
 
+

[criteria.MessageParam.Cc]

+
+

Specifies the Cc recipients of the message.

+

MessageParam.Cc[0] specifies the first Cc recipient.

+
+

array of strings

+
 
+

[criteria.MessageParam.Bcc]

+
+

Specifies the Bcc recipients of the message.

+

MessageParam.Bcc[0] specifies the first Bcc recipient.

+

This property is only valid for email messages.

+

Note: The Messaging Service does not currently support emails.

+
+
+

array of strings

+
 
+

[criteria.MessageParam.TemplateId]

+
+

Specifies the ID of the message that is used as a template for the message +to be sent.

+

If both BodyText and MessageParam.TemplateId are +specified, and if the template message already contains its own body text, +then both body text strings are included in the message when it is sent, with BodyText appended +to the template body text.

+

+

+

number

+
 
+

[criteria.MessageParam.LaunchEditor]

+
+

If this property is set to "ETrue", the Message +Editor is opened over the Messaging Service application. This allows the user +to edit the message before sending it.

+

The default value is "EFalse".

+
+

boolean

+
+

Possible values:

+
    +
  • "ETrue"

  • +
  • "EFalse"

  • +
+
+

[criteria.MessageParam.AttachmentList]

+
+

Specifies the attachments to include in the message. For each attachment, +its full path and file name and optionally its MIME type are specified.

+

MessageParam.AttachmentList[0] specifies the first +attachment.

+

Note: This property is only valid for MMS. SMS does not support attachments.

+
+
+

array of objects

+
+

Each object in the array contains the properties specified below.

+
+

[criteria.MessageParam.AttachmentList[].FileName]

+
+

Specifies the full path and file name of an attachment.

+

This property is mandatory if the attachment is specified.

+
+

string

+
 
+

[criteria.MessageParam.AttachmentList[].MimeType]

+
+

Specifies the MIME type of an attachment.

+
+

string

+
 
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-1C067AC7-2B92-4EEB-896B-814B4064590F.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-1C067AC7-2B92-4EEB-896B-814B4064590F.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,16 @@ + + +Designing for limited resources

Designing for limited resources

Mobile devices are not constantly connected to power sources or networks by fixed lines. Wireless network connections can still be slower than cable connections. This affects response times when fetching data from Web sites.

+

Take the following issues and considerations into account when designing and developing applications for S60 devices:

+ +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-1D48EF4F-BD40-42D9-9E5A-3B88B948ECE0-master.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-1D48EF4F-BD40-42D9-9E5A-3B88B948ECE0-master.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-1D48EF4F-BD40-42D9-9E5A-3B88B948ECE0_d0e12296_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-1D48EF4F-BD40-42D9-9E5A-3B88B948ECE0_d0e12296_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-1D48EF4F-BD40-42D9-9E5A-3B88B948ECE0_d0e4959_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-1D48EF4F-BD40-42D9-9E5A-3B88B948ECE0_d0e4959_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-1D78998F-2A45-4100-AAD0-FCCAC300DBC1.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-1D78998F-2A45-4100-AAD0-FCCAC300DBC1.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,259 @@ + + +SystemInfo Service API error messages

SystemInfo Service API error messages

+

This section provides information about the error messages returned +by the SystemInfo Service API methods.

+

Generic error messages

+

The following table describes the error messages returned during the +loading of the service provider.

+
+ + + + + + + + + +
Table: Service provider +error messages
+

Error message

+
+

Description

+
+

SysInfo:Requested interface not supported by the provider

+
+

The requested interface is not supported by the service provider.

+
+

The following table describes the error messages returned for unsupported +methods.

+
+ + + + + + + + + +
Table: Unsupported method +error messages
+

Error message

+
+

Description

+
+

SysInfo:<XXXX>: Command Not Supported

+
+

The <XXXX> method is not supported by the service +provider.

+
+

GetInfo

+

The following table describes the error messages returned by GetInfo and callback for GetInfo as +part of their return value.

+
+ + + + + + + + + + + + + + + + + + + + + +
Table: GetInfo error +messages
+

Error message

+
+

Description

+
+

SysInfo:GetInfo: Insufficient Arguments to process

+
+

At least two input criteria are expected to process a GetInfo call.

+
+

SysInfo:GetInfo: Entity: Input Parameter Missing

+
+

The Entity property is missing from the input.

+
+

SysInfo:GetInfo: Key: Input Parameter Missing

+
+

The Key property is missing from the input.

+
+

SysInfo:GetInfo: Incorrect SystemData Type, SystemData Must +be a Map

+
+

The SystemData property is not an object or the +content of the object is invalid.

+
+

SetInfo

+

The following table describes the error messages returned by SetInfo as part of its return value.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: SetInfo error +messages
+

Error message

+
+

Description

+
+

SysInfo:SetInfo: Insufficient Arguments to process

+
+

At least two input criteria are expected to process a SetInfo call.

+
+

SysInfo:SetInfo: Entity: Input Parameter Missing

+
+

The Entity property is missing from the input.

+
+

SysInfo:SetInfo: Key: Input Parameter Missing

+
+

The Key property is missing from the input.

+
+

SysInfo:SetInfo: Incorrect SystemData Type, SystemData Must +be a Map

+
+

The SystemData property is not an object or the +content of the object is invalid.

+
+

SysInfo:SetInfo: SystemData Argument Missing

+
+

The SystemData property is missing from the input.

+
+

SysInfo:SetInfo: ASync Version Not Supported

+
+

The SetInfo method does not support asynchronous +calls.

+
+

GetNotification

+

The following table describes the error messages returned by callback for GetNotification as +part of its return value.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Table: GetNotification +error messages
+

Error message

+
+

Description

+
+

SysInfo:GetNotification: Insufficient Arguments to process

+
+

At least two input criteria are expected to process a GetNotification call.

+
+

SysInfo:GetNotification: Entity: Input Parameter Missing

+
+

The Entity property is missing from the input.

+
+

SysInfo:GetNotification: Key: Input Parameter Missing

+
+

The Key property is missing from the input.

+
+

SysInfo:GetNotification: Incorrect SystemData Type, SystemData +Must be a Map

+
+

The SystemData property is not an object or the +content of the object is invalid.

+
+

SysInfo:GetNotification: Sync Version Not Supported

+
+

The GetNotification method does not support synchronous +calls.

+
+

Cancel

+

The following table describes the error messages returned by Cancel as part of its return value.

+
+ + + + + + + + + + + + + +
Table: Cancel error +messages
+

Error message

+
+

Description

+
+

SysInfo:Cancel: Transaction ID missing

+
+

The TransactionID property is missing from the +input.

+
+

SysInfo:Cancel: Callback object not found

+
+

There is no ongoing asynchronous request with the specified transaction +ID.

+
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-1EFD7043-E9B8-4B4E-9EA6-A20B3EECC14A.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-1EFD7043-E9B8-4B4E-9EA6-A20B3EECC14A.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,19 @@ + + +Developing +widgets

Developing +widgets

This section gives more detailed information on how to create the +widget functionality. Where relevant, links are provided to the Web Runtime +API reference and documentation provided by Forum Nokia.

+ +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-1F17637B-4439-4FFE-AFD8-93D84B01666A.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-1F17637B-4439-4FFE-AFD8-93D84B01666A.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,772 @@ + + +Messaging Service API error messages

Messaging Service API error messages

+

This section provides information about the error messages returned +by the Messaging Service API methods.

+

+

Generic error messages

+

The following table describes the error messages returned during the +loading of the service provider.

+
+ + + + + + + + + + + + + + + + + +
Table: Service provider +error messages
+

Error message

+
+

Description

+
+

Messaging:Interface not supported

+
+

The requested interface is not supported by the service provider.

+
+

Messaging:Interface name missing

+
+

The interface name is missing from the request.

+
+

Messaging:Command not supported

+
+

The specified command is not supported by the interface.

+
+

GetList

+

The following table describes the error messages returned by GetList as part of its return value.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: GetList error +messages
+

Error message

+
+

Description

+
+

Messaging:GetList: Type Type Invalid

+
+

The Type property contains a value with an invalid +type.

+
+

Messaging:GetList: Type Value Incorrect

+
+

The Type property contains an invalid value.

+
+

Messaging:GetList: Type Missing

+
+

The Type property is missing from the input.

+
+

Messaging:GetList: Filter Type Invalid

+
+

The Filter property contains a value with an invalid +type.

+
+

Messaging:GetList: SenderList Type Invalid

+
+

The Filter.SenderList property contains a value +with an invalid type.

+
+

Messaging:GetList: SenderList Element Value Incorrect

+
+

An item in the Filter.SenderList array contains +an invalid value.

+
+

Messaging:GetList: SenderList Element Type Invalid

+
+

An item in the Filter.SenderList array contains +a value with an invalid type.

+
+

Messaging:GetList: MessageTypeList Type Invalid

+
+

The Filter.MessageTypeList property contains a +value with an invalid type.

+
+

Messaging:GetList: MessageTypeList Element Value Incorrect

+
+

An item in the Filter.MessageTypeList array contains +an invalid value.

+
+

Messaging:GetList: MessageTypeList Element Type Invalid

+
+

An item in the Filter.MessageTypeList array contains +a value with an invalid type.

+
+

Messaging:GetList: MessageId Type Invalid

+
+

The Filter.MessageId property contains a value +with an invalid type.

+
+

Messaging:GetList: Subject Type Invalid

+
+

The Filter.Subject property contains a value with +an invalid type.

+
+

Messaging:GetList: StartDate Type Invalid

+
+

The Filter.StartDate property contains a value +with an invalid type.

+
+

Messaging:GetList: StartDate Value Incorrect

+
+

The Filter.StartDate property contains an invalid +value.

+
+

Messaging:GetList: EndDate Type Invalid

+
+

The Filter.EndDate property contains a value with +an invalid type.

+
+

Messaging:GetList: EndDate Value Incorrect

+
+

The Filter.EndDate property contains an invalid +value.

+
+

Messaging:GetList: SortOrder Type Invalid

+
+

The Sort property contains a value with an invalid +type.

+
+

Messaging:GetList: SortOrder Value Incorrect

+
+

The Sort property contains an invalid value.

+
+

Messaging:GetList: Key Type Invalid

+
+

The Sort.Key property contains a value with an +invalid type.

+
+

Messaging:GetList: Order Type Invalid

+
+

The Sort.Order property contains a value with an +invalid type.

+
+

Messaging:GetList: Asynchronous Operation not supported

+
+

The method was called asynchronously. This is not supported.

+
+

Send

+

The following table describes the error messages returned by Send and callback for Send as +part of their return value.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Send error messages
+

Error message

+
+

Description

+
+

Messaging:Send: MessageType Type Invalid

+
+

The MessageType property contains a value with +an invalid type.

+
+

Messaging:Send: MessageType Value Incorrect

+
+

The MessageType property contains an invalid value.

+
+

Messaging:Send: MessageType Missing

+
+

The MessageType property is missing from the input.

+
+

Messaging:Send: To Type Invalid

+
+

The To property contains a value with an invalid +type.

+
+

Messaging:Send: To Value Incorrect

+
+

The To property contains an invalid value.

+
+

Messaging:Send: To Missing

+
+

The To property is missing from the input.

+
+

Messaging:Send: BodyText Type Invalid

+
+

The BodyText property contains a value with an +invalid type.

+
+

Messaging:Send: Subject Type Invalid

+
+

The Subject property contains a value with an invalid +type.

+
+

Messaging:Send: Attachment Type Invalid

+
+

The Attachment property contains a value with an +invalid type.

+
+

Messaging:Send: Attachment Value Incorrect

+
+

The Attachment property contains an invalid value.

+
+

Messaging:Send: MimeType Type Invalid

+
+

The MimeType property contains a value with an +invalid type.

+
+

Messaging:Send: MimeType Value Incorrect

+
+

The MimeType property contains an invalid value.

+
+

Messaging:Send: MessageParam Type Invalid

+
+

The MessageParam property contains a value with +an invalid type.

+
+

Messaging:Send: TemplateId Type Invalid

+
+

The MessageParam.TemplateId property contains a +value with an invalid type.

+
+

Messaging:Send: LaunchEditor Type Invalid

+
+

The MessageParam.LaunchEditor property contains +a value with an invalid type.

+
+

Messaging:Send: To Type Invalid

+
+

The MessageParam.To property contains a value with +an invalid type.

+
+

Messaging:Send: To List Element Type Invalid

+
+

An item in the MessageParam.To array contains a +value with an invalid type.

+
+

Messaging:Send: To List Element Value Incorrect

+
+

An item in the MessageParam.To array contains an +invalid value.

+
+

Messaging:Send: Cc Type Invalid

+
+

The MessageParam.Cc property contains a value with +an invalid type.

+
+

Messaging:Send: Cc List Element Type Invalid

+
+

An item in the MessageParam.Cc array contains a +value with an invalid type.

+
+

Messaging:Send: Cc List Element Value Incorrect

+
+

An item in the MessageParam.Cc array contains an +invalid value.

+
+

Messaging:Send: Bcc Type Invalid

+
+

The MessageParam.Bcc property contains a value +with an invalid type.

+
+

Messaging:Send: Bcc List Element Type Invalid

+
+

An item in the MessageParam.Bcc array contains +a value with an invalid type.

+
+

Messaging:Send: Bcc List Element Value Incorrect

+
+

An item in the MessageParam.Bcc array contains +an invalid value.

+
+

Messaging:Send: AttachmentList Type Invalid

+
+

The MessageParam.AttachmentList property contains +a value with an invalid type.

+
+

Messaging:Send: AttachmentList Element Type Invalid

+
+

An item in the MessageParam.AttachmentList array +contains a value with an invalid type.

+
+

Messaging:Send: FileName Type Invalid

+
+

A MessageParam.AttachmentList[item].FileName property +contains a value with an invalid type.

+
+

Messaging:Send: FileName Value Incorrect

+
+

A MessageParam.AttachmentList[item].FileName property +contains an invalid value.

+
+

Messaging:Send: MimeType Type Invalid

+
+

A MessageParam.AttachmentList[item].MimeType property +contains a value with an invalid type.

+
+

Messaging:Send: MimeType Value Incorrect

+
+

A MessageParam.AttachmentList[item].MimeType property +contains an invalid value.

+
+

RegisterNotification

+

The following table describes the error messages returned by RegisterNotification and callback for RegisterNotification as part of their return value.

+
+ + + + + + + + + + + + + + + + + + + + + +
Table: RegisterNotification +error messages
+

Error message

+
+

Description

+
+

Messaging:RegisterNotification: Type Type Invalid

+
+

The Type property contains a value with an invalid +type.

+
+

Messaging:RegisterNotification: Type Value Incorrect

+
+

The Type property contains an invalid value.

+
+

Messaging:RegisterNotification: Type Missing

+
+

The Type property is missing from the input.

+
+

Messaging:RegisterNotification: Synchronous Operation not +supported

+
+

The method was called synchronously. This is not supported.

+
+

CancelNotification

+

The following table describes the error messages returned by CancelNotification as part of its return value.

+
+ + + + + + + + + + + + + + + + + + + + + +
Table: CancelNotification +error messages
+

Error message

+
+

Description

+
+

Messaging:CancelNotification: Type Type Invalid

+
+

The Type property contains a value with an invalid +type.

+
+

Messaging:CancelNotification: Type Value Incorrect

+
+

The Type property contains an invalid value.

+
+

Messaging:CancelNotification: Type Missing

+
+

The Type property is missing from the input.

+
+

Messaging:CancelNotification: Asynchronous Operation not supported

+
+

The method was called asynchronously. This is not supported.

+
+

ChangeStatus

+

The following table describes the error messages returned by ChangeStatus as part of its return value.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: ChangeStatus +error messages
+

Error message

+
+

Description

+
+

Messaging:ChangeStatus: MessageId Type Invalid

+
+

The MessageId property contains a value with an +invalid type.

+
+

Messaging:ChangeStatus: MessageId Value Incorrect

+
+

The MessageId property contains an invalid value.

+
+

Messaging:ChangeStatus: MessageId Missing

+
+

The MessageId property is missing from the input.

+
+

Messaging:ChangeStatus: Status Type Invalid

+
+

The Status property contains a value with an invalid +type.

+
+

Messaging:ChangeStatus: Status Value Incorrect

+
+

The Status property contains an invalid value.

+
+

Messaging:ChangeStatus: Status Missing

+
+

The Status property is missing from the input.

+
+

Messaging:ChangeStatus: Asynchronous Operation not supported

+
+

The method was called asynchronously. This is not supported.

+
+

Delete

+

The following table describes the error messages returned by Delete as part of its return value.

+
+ + + + + + + + + + + + + + + + + + + + + +
Table: Delete error +messages
+

Error message

+
+

Description

+
+

Messaging:Delete: MessageId Type Invalid

+
+

The MessageId property contains a value with an +invalid type.

+
+

Messaging:Delete: MessageId Value Incorrect

+
+

The MessageId property contains a negative value.

+
+

Messaging:Delete: MessageId Missing

+
+

The MessageId property is missing from the input.

+
+

Messaging:Delete: Asynchronous Operation not supported

+
+

The method was called asynchronously. This is not supported.

+
+

Cancel

+

The following table describes the error messages returned by Cancel as part of its return value.

+
+ + + + + + + + + + + + + +
Table: Cancel error +messages
+

Error message

+
+

Description

+
+

Messaging:Cancel:Invalid TransactionID

+
+

Either an invalid TransactionID was passed or an +asynchronous call associated with this ID has already been completed.

+
+

Messaging:Cancel:Missing TransactionID

+
+

The TransactionID property is missing from the +input.

+
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-1FD5C597-43B8-402E-92B8-FE0787DB4F3B.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-1FD5C597-43B8-402E-92B8-FE0787DB4F3B.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,14 @@ + + +Retrieving STEW data

Retrieving STEW data

You can access Twitter through the REST (Representational State Transfer) API. To select the response format, change the file extension on almost any request URL to get results in that format. One of the supported formats is (JavaScript Object Notation) JSON, which is used in STEW.

+

STEW uses JSON (instead of XML, for example) because JSON text can easily be converted into JavaScript objects using the eval() function which invokes the JavaScript compiler. JSON is a subset of JavaScript, and therefore the compiler correctly parses the text and produces an object structure. For more information about JSON, see the JSON Web site. Requests are made to Twitter REST APIs by using the XMLHttpRequest object. XMLHttpRequest is a DOM API that can be used in JavaScript to transfer text data between a server and a browser.

+

Retrieving data from Twitter comprises the following tasks:

+ +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-20D66938-A870-43D7-9515-AC7E22AEDC14.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-20D66938-A870-43D7-9515-AC7E22AEDC14.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,116 @@ + + +IDataSource.Add()

IDataSource.Add()

+

Description:

+

The Add method adds a contact or contact group +to a contacts database. If the contact or contact group already exists in +the database, it is replaced with the new entry. You can thus use this method +to both add and edit contacts and contact groups. The information is added +to the specified database or, if no database is specified, to the default +one. If the default database does not exist, it is created.

+

This method can be called both synchronously and asynchronously.

+

Syntax:

+

For synchronous calls:

+
result = so.IDataSource.Add(criteria);
+ +

For asynchronous calls:

+
result = so.IDataSource.Add(criteria, callback);
+ +

Arguments:

+
    +
  • criteria:

    + +

    This is an object that specifies what contact information to add or +edit and for which database. For more information about the object properties +and how to define them, see section Criteria for adding and editing contact information.

    + +
  • +
  • callback:

    + +

    The callback argument is the name of the method +that is executed when an asynchronous Add call has results +or status information to return. You must define this method separately. Follow +the instructions in section Defining the callback handler for an asynchronous method to +define the callback method.

    +

    This argument is used only with an asynchronous Add call.

    + +
  • +
+

Return value:

+

If synchronous, the Add method returns an object +that contains an error code and an error message.

+

If asynchronous, the method returns an object that contains a transaction +ID for the callback instance, +an error code, and an error message. When the asynchronous call has completed, callback returns +an object that contains an error code and an error message (see Table: Callback return value).

+
+ + + + + + + + + + + + + + + + + + + + + +
Table: Return value +properties for Add
+

Property

+
+

Description

+
+

Value

+
+

result.TransactionID

+
+

This is a number used as an identification to match transactions started +with an asynchronous Add call to one or more calls it +generates to callback.

+

This property is only valid for asynchronous calls.

+
 
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See Contacts Service API error messages.

+
+

Remarks:

+
    +
  • The default contacts database is cntdb://c:contacts.cdb. +The SIM card database is sim://global_adn.

  • +
  • If a contact or contact group is added with its id property +specified, and the database already contains an entry with that id, +the existing entry is replaced by the new one. If the id is +not specified, a new entry is added to the database.

  • +
+

Example code:

+

+

For the complete source of a sample widget +that demonstrates how to use this Service API, see the +full example.

+ + + + +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-2240F5BE-97BD-4CB3-8DB3-B5CF7C23BF54.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-2240F5BE-97BD-4CB3-8DB3-B5CF7C23BF54.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,96 @@ + + +Accessing +messages and using messaging services

Accessing +messages and using messaging services

+

The Messaging +Service API allows widgets to send, retrieve, and manage +messages using the Messaging Center of a device. You can use the Messaging +Service to create widgets that:

+
    +
  • Send SMS and MMS messages

  • +
  • Retrieve messages stored on the device

  • +
  • Notify the user when new messages arrive

  • +
  • Change the status of a message

  • +
  • Delete messages

  • +
+

Accessing the API and supported methods

+

To create a service +object for the Messaging Service API, use Service.Messaging to +identify the service provider and IMessaging to identify +the supported interface:

+ +
var so = device.getServiceObject("Service.Messasing", "IMessaging");
+

The IMessaging interface provides the following +methods:

+
    +
  • GetList()

    + +

    Use the GetList() method to retrieve messages stored +in the Messaging Center of a device.

    + +
  • +
  • Send()

    + +

    Use the Send() method to send an SMS or MMS message.

    + +
  • +
  • RegisterNotification()

    + +

    Use the RegisterNotification() method to receive +notifications of new incoming messages.

    + +
  • +
  • CancelNotification()

    + +

    Use the CancelNotification() method to cancel notification +of new incoming messages.

    + +
  • +
  • ChangeStatus()

    + +

    Use the ChangeStatus() method to change the read +status of a message.

    + +
  • +
  • Delete()

    + +

    Use the Delete() method to delete a message.

    + +
  • +
  • Cancel()

    + +

    Use the Cancel() method to cancel an ongoing asynchronous +call. This method is valid for any asynchronous call made through the Messaging +Service API.

    + +
  • +
+
+

Using the service in a widget

+

To perform messaging tasks using the Messaging Service API:

+
    +
  1. Create a service +object for the API using device.getServiceObject().

    +
  2. +
  3. Define the +messaging tasks you want to perform and choose the correct methods for them.

    +
  4. +
  5. Optionally, +define how you want the results filtered.

  6. +
  7. Define methods +to process the results.

  8. +
  9. Use the methods +defined in step 2 to perform the messaging tasks. Use asynchronous methods +together with callback().

    +
  10. +
  11. Process the +results in the methods defined in step 4.

  12. +
+

For the complete source of a sample widget that demonstrates how to +use this service, see the full example.

+
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-231C11D4-82B3-4202-8E86-DE8A3556C9DE.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-231C11D4-82B3-4202-8E86-DE8A3556C9DE.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,69 @@ + + +IDataSource.Cancel()

IDataSource.Cancel()

+

Description:

+

The Cancel method cancels an outstanding asynchronous +call made with a Contacts Service API method.

+

This is a synchronous method.

+

Syntax:

+
result = so.IDataSource.Cancel(criteria);
+

Arguments:

+
    +
  • criteria:

    + +

    This is an object with the TransactionID property +(number). criteria.TransactionID specifies the transaction +ID of the asynchronous call to cancel. The transaction ID is the result.TransactionID value +that was returned as part of the result of the initial call.

    + +
  • +
+

Return value:

+

The Cancel method returns an object that contains +an error code and an error message.

+
+ + + + + + + + + + + + + + + + +
Table: Return value +properties for Cancel
+

Property

+
+

Description

+
+

Value

+
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See Contacts Service API error messages.

+
+

Example code:

+

+

For the complete source of a sample widget that demonstrates how to +use this Service API, see the +full example.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-236F8C40-96D8-4408-97A7-CAA7E0B1FE46.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-236F8C40-96D8-4408-97A7-CAA7E0B1FE46.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,32 @@ + + +stopvibra()

stopvibra()

+

Syntax:

+
[void] sysinfo.stopvibra()
+

Description:

+

The stopvibra method immediately interrupts the device vibration that has been started with the startvibra method.

+

Argument:

+

This method does not take any arguments.

+

Return value:

+

This method does not return a value.

+

Example code:

+
function callVibration()
+{
+   // define to vibrate infinitely
+   var duration = 0;
+   // get the system defined minimum intensity
+   var intensity = sysinfo.vibraminintensity
+   // start vibration
+   sysinfo.startvibra(duration, intensity);
+   // press any key to stop vibra
+   document.addEventListener("keypress", kpListener, false);
+}
+function kpListiner(event)
+{
+   sysinfo.stopvibra();
+   document.removeEventListener("keypress", kpListener, false);
+}
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-258A8E34-56F4-4BF2-8C94-F7BB7FAE71F8.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-258A8E34-56F4-4BF2-8C94-F7BB7FAE71F8.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,242 @@ + + +Criteria for +retrieving log events

Criteria for +retrieving log events

+

The criteria object specifies what log event +information is returned.

+

The criteria object has two main properties: Type and Filter. +These are described in the following table. Properties enclosed in brackets +are optional.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Criteria object properties
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

criteria.Type

+
+

Specifies the type of content.

+
+

string

+
+

Possible values:

+
    +
  • "Log"

  • +
+
+

[criteria.Filter]

+
+

Specifies the criteria to search for specific events in the log database.

+

If Filter is not specified, all of the events from +the log database are retrieved.

+
+

object

+
+

Object with the properties specified below

+
+

[criteria.Filter.id]

+
+

Specifies a unique identifier of an event in the log database.

+

Note: When [id] is specified, all other keys are ignored.

+
+
  +

string

+
+

[criteria.Filter.RecentList]

+
+

Creates a view of the most recent 20 events in the specified recent +call list. The recent call list derives from recent log entries (a subset +of all log entries).

+

On successful completion, the view is positioned at the first (most +recent) event in the recent call list.

+

Recent lists do not contain individual entries for duplicate events, +such as two outgoing calls to the same number.

+

Note: When [RecentList] is specified, all other keys +are ignored. If [id] is specified, it takes precedence +and [RecentList] is ignored.

+
+
+

Value - Description:

+

-1 - EKLogNullRecentList

+

1 - EKLogRecentIncomingCalls

+

2 - EKLogRecentOutgoingCalls

+

3 - EKLogRecentMissedCalls

+

A value of -1 - EKLogNullRecentList results in +a view that includes events from all of the recent event lists.

+
+

number

+
+

[criteria.Filter.EventType]

+
+

Specifies a unique identifier for the type of event; such as call, fax, +etc.

+
+

Value - Description:

+

0 - EKLogCallEventType

+

1 - EKLogDataEventType

+

2 - EKLogFaxEventType

+

3 - EKLogShortMessageEventType

+

4 - EKLogPacketDataEventType

+
+

number

+
+

[criteria.Filter.PhoneNumber]

+
+

Specifies the phone number associated with the event.

+

Note: This is used when the number cannot be stored in any other key. For +example, if there is an entry in the contacts database for a person named +Prakash, then RemoteParty is specified as "Prakash" and PhoneNumber is +needed to specify the phone number. If there is no entry for Prakash, RemoteParty is +specified as the phone number.

+
+
+

Up to 100 characters. If the length of the specified string is greater +than 100 characters, the number is truncated.

+
+

string

+
+

[criteria.Filter.RemoteParty]

+
+

Specifies the destination of the outgoing event or the source of incoming +event.

+
+

Up to 64 characters. If the length of the specified string is greater +than 64 characters, the data is truncated.

+
+

string

+
+

[criteria.Filter.Direction]

+
+

Specifies whether the event is incoming, outgoing, or missed and if +it came in on an alternate line.

+

Alternate line refers to the second phone call on the mobile device. +Alternate line values, such as 2 - EIncomingEventAlternateline, +are valid for call events only.

+
+

Value - Description:

+

0 - EIncomingEvent

+

1 - EOutgoingEvent

+

2 - EIncomingEventAlternateline

+

3 - EOutgoingEventAlternateline

+

4 - EFetchedEvent

+

5 - EMissedEvent

+

6 - EMissedEventAlternateline

+
+

number

+
+

[criteria.Filter.DeliveryStatus]

+
+

Specifies whether the event was delivered, is pending, failed to be +delivered, etc.

+
+

Value - Description:

+

0 - EStatusPending

+

1 - EStatusSent

+

2 - EStatusFailed

+

3 - EStatusNone

+

4 - EStatusDone

+

5 - EStatusSent

+

6 - EStatusScheduled

+
+

number

+
+

[criteria.Filter.EndTime]

+
+

Events added to the log after this time will not be retrieved.

+
  +

date object

+
+

[criteria.Filter.LogFlags]

+
+

Specifies the flags for this event. This method does not change any +other flag bit settings.

+
+

Value - Description:

+

0 - EKLogEventContactSearched

+

Note: The EKLogEventContactSearched flag is set when the user searches the +contact database for any operation such as a voice call or SMS.

+
+

1 - EKLogEventRead

+

Note: The EKLogEventRead flag is set when the user "reads" the event in the +log database.

+
+
 
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-270C6C2A-5EBB-4ACC-A231-064F17E85F4A.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-270C6C2A-5EBB-4ACC-A231-064F17E85F4A.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,110 @@ + + +IDataSource.Delete()

IDataSource.Delete()

+

Description:

+

The Delete method deletes a calendar from the device +or one or more entries from a calendar. Entries are deleted from the specified +calendar or, if no calendar is specified, from the default one.

+

For deleting a calendar, this method is called synchronously. For deleting +calendar entries, this method can be called both synchronously and asynchronously.

+

Syntax:

+

For synchronous calls:

+
result = so.IDataSource.Delete(criteria);
+ +

For asynchronous calls:

+
result = so.IDataSource.Delete(criteria, callback);
+ +

Arguments:

+
    +
  • criteria:

    + +

    This is an object that specifies which calendar or calendar entries +to delete. For more information about the object properties and how to define +them, see section Criteria for deleting calendar information.

    + +
  • +
  • callback:

    + +

    The callback argument is the name of the method +that is executed when an asynchronous Delete call has +results or status information to return. You must define this method separately. +Follow the instructions in section Defining the callback handler for an asynchronous method to +define the callback method.

    +

    This argument is used only with an asynchronous Delete call.

    + +
  • +
+

Return value:

+

If synchronous, the Delete method returns an object +that contains an error code and an error message.

+

If asynchronous, the method returns an object that contains a transaction +ID for the callback instance, +an error code, and an error message. When the asynchronous call has completed, callback returns +an object that contains an error code and an error message (see Table: Callback return value).

+
+ + + + + + + + + + + + + + + + + + + + + +
Table: Return value +properties for Delete
+

Property

+
+

Description

+
+

Value

+
+

result.TransactionID

+
+

This is a number used as an identification to match transactions started +with an asynchronous Delete call to one or more calls +it generates to callback.

+

This property is only valid for asynchronous calls.

+
 
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See Calendar Service API error messages.

+
+

Remarks:

+
    +
  • The default calendar cannot be deleted.

  • +
  • To delete a calendar or entries from a calendar, the corresponding +calendar file must exist on the device.

  • +
+

Example code:

+

+

For the complete source of a sample widget +that demonstrates how to use this Service API, see the full example.

+ + + + +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-2786E26F-EF1E-4935-9C5F-56E36717E89D.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-2786E26F-EF1E-4935-9C5F-56E36717E89D.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,16 @@ + + +Web Runtime +standards

Web Runtime +standards

This section describes the standards supported by Web Runtime. For information +about the features that you can build into widgets using Web Runtime, see +section Web Runtime features.

Web Runtime 1.0 and later support the following Internet technology +standards:

  • HTML +4.01 Specification, W3C Recommendation 24 December 1999,

  • XHTML Mobile Profiles Specification, XHTML Mobile Profile +Version 29-Oct-2001, WAP-277-XHTMLMP-20011029-a

  • CSS Level 2 revision 1 (CSS 2.1), WAP CSS Specification Version +26-Oct-2001, WAP-239-WCSS-20011026-a

  • JavaScript 1.5 (ECMA-262 3rd Edition), ECMAScript Language +Specification, 3rd edition (December 1999)

  • The combination of XML, XHTML/HTML, CSS, DOM, and the XMLHttpRequest +object to add Ajax capability to a widget

\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-279A3698-D09B-44BF-8340-739E19F94727.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-279A3698-D09B-44BF-8340-739E19F94727.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,169 @@ + + +ISysInfo.GetInfo()

ISysInfo.GetInfo()

+

Description:

+

The GetInfo method retrieves information about +a system attribute.

+

This method can be called both synchronously and asynchronously.

+

Syntax:

+

For synchronous calls:

+ +
result = so.ISysInfo.GetInfo(criteria);
+

For asynchronous calls:

+ +
result = so.ISysInfo.GetInfo(criteria, callback);
+

Arguments:

+
    +
  • criteria:

    + +

    This is an object that specifies the system attribute about which to +retrieve information. For more information about the object properties and +how to define them, see section Criteria for retrieving system attribute information.

    + +
  • +
  • callback:

    + +

    The callback argument is the name of the method +that is executed when an asynchronous GetInfo call has +results or status information to return. You must define this method separately. +Follow the instructions in section Defining the callback handler for an asynchronous method to +define the callback method.

    +

    This argument is used only with an asynchronous GetInfo call.

    + +
  • +
+

Return value:

+

If synchronous, the GetInfo method returns an object +that contains the requested system attribute information, an error code, and +an error message.

+
+ + + + + + + + + + + + + + + + + + + + +
Table: Return value +properties for a synchronous GetInfo
+

Property

+
+

Description

+
+

Value

+
+

result.ReturnValue

+
+

This is an object (a system attribute object) that contains the requested +system attribute information.

+

For example, if you request drive information using the Memory +- DriveInfo system attribute, the ReturnValue object +contains the properties Entity and Key as +well as the properties for DriveInfo:

+
    +
  • ReturnValue.Entity

  • +
  • ReturnValue.Key

  • +
  • ReturnValue.Drive

  • +
  • ReturnValue.TotalSpace

  • +
  • ReturnValue.FreeSpace

  • +
  • ReturnValue.CriticalSpace

  • +
  • ReturnValue.MediaType

  • +
  • ReturnValue.BatteryState

  • +
  • ReturnValue.DriveName

  • +
+
+

See System attributes.

+
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See SystemInfo Service API error messages.

+
+

If asynchronous, the GetInfo method returns an +object that contains the initial return value for the asynchronous call it +started (see the following table). The actual system attribute information +is returned by the callback method +in the ReturnValue property of its result object. The +returned information (a system attribute object) is described in the preceding +table.

+
+ + + + + + + + + + + + + + + + + + + + + +
Table: Return value +properties for an asynchronous GetInfo
+

Property

+
+

Description

+
+

Value

+
+

result.TransactionID

+
+

This is a number used as an identification to match transactions started +with the asynchronous GetInfo call to one or more calls +it generates to callback.

+
 
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See SystemInfo Service API error messages.

+
+

Example code:

+

+

For the complete source of a sample widget +that demonstrates how to use this Service API, see the +full example.

+ + + + +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-2A567315-DB83-4876-8E78-C3F1944CAB89-master.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-2A567315-DB83-4876-8E78-C3F1944CAB89-master.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-2A567315-DB83-4876-8E78-C3F1944CAB89_d0e1228_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-2A567315-DB83-4876-8E78-C3F1944CAB89_d0e1228_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-2A567315-DB83-4876-8E78-C3F1944CAB89_d0e12345_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-2A567315-DB83-4876-8E78-C3F1944CAB89_d0e12345_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-2A567315-DB83-4876-8E78-C3F1944CAB89_d0e1254_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-2A567315-DB83-4876-8E78-C3F1944CAB89_d0e1254_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-2A74FA05-A13B-4133-8E1A-03152B6B1499.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-2A74FA05-A13B-4133-8E1A-03152B6B1499.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,55 @@ + + +Testing your widget

Testing your widget

Test your widget on a compatible S60 mobile device. Alternatively, you can first use an emulator provided with the S60 C++ SDK and then perform the final testing on the target device.

+

Testing a widget on a mobile device

When you have created your widget functionality and the required widget component files, you need to test it on a mobile device that can run widgets. Use a device that supports the Web Runtime version for which you created the widget.

+

To run a widget on a mobile device

    +
  1. Create a connection from your PC to your mobile device.

    You have several options for connecting your mobile device to your PC, such as a USB cable and Bluetooth connection. Check your mobile device user guide for instructions on how to make a connection. If you choose to use Nokia PC Suite, check the user guide for more information on using this software.

  2. +
  3. Transfer the widget installation package from your PC to your mobile device, for example, using Nokia PC Suite.

  4. +
  5. Activate the widget package to complete the installation.

    The location where the widget package is stored on the mobile device after the transfer, as well as the way to activate the installation, depend on the method of transfer, as shown in the following table.

    + + + + + + + + + + + + + + + + + + + + + + + + +
    Table: Widget installation methods

    Method of transfer

    Location on the device

    How to activate the installation

    Transfer via Bluetooth, email or other communication method

    Inbox folder of the Messaging application

    Using the Messaging application.

    Transfer using a USB cable

    Phone memory, the Other folder

    Using the File Manager (File mgr.) application.

    Transfer using the Web Browser for S60

     

    If the MIME type is specified correctly for the widget package, the installation will be completed automatically. For more information, see section Deploying widgets.

  6. +
  7. After a successful installation, launch the widget by navigating to it and selecting Open.

    After a successful installation, you can find the widget under the application menu, in the folder that contains installed applications. The name of this folder varies between mobile devices, and can be, for example, Installations or Applications.

    Figure: Installations folder in the application menu

  8. +
+

Testing a widget on an emulator

The benefits of testing a widget on an emulator include:

    +
  • You can test the functionality of the widget for free with the emulator.

  • +
  • The file system is located on your PC. This makes it easy for you to install the widget package, test it, then modify it and test it again.

    For example, you can test the layout and style of the widget by testing the widget, then modifying the CSS or HTML file and then testing again to see how the modifications affected the layout. In the figure below, the color of the menu descriptions is changed from white to red.

    Figure: Modifying and testing layout changes

  • +
+

To run a widget on the emulator

    +
  1. If you have not used the emulator before, launch it by selecting S60 Developer Tools > [S60 platform version] > [SDK version] > Emulator in the Windows Start menu and then close it again.

    This step is required only once, when you launch the emulator for the first time. It creates some folders to the emulator file system, such as the destination folder needed in step 2. You can later run widgets on the emulator by starting from step 2.

    Note: Starting the emulator may take a while.

  2. +
  3. Copy the widget installation package (wgz file) to the emulator file system, in folder <SDK installation folder>\epoc32\winscw\c\Data\Others.

    Note: The Data\Others folder is visible in the emulator file system only when you have launched the emulator for the first time and then closed it.

    Figure: Others folder in the emulator file system (S60 3rd Edition FP2 SDK)

  4. +
  5. Launch the emulator by selecting S60 Developer Tools > [S60 platform version] > [SDK version] > Emulator in the Windows Start menu.

  6. +
  7. If you are using the S60 3rd Edition FP2 SDK emulator, open Organiser in the application menu.

    If you are using the S60 5th Edition SDK emulator, open Applications in the application menu.

  8. +
  9. Open the File Manager (File mgr.) application.

    Figure: Opening the File Manager application (S60 3rd Edition FP2 SDK)

  10. +
  11. Go to Phone memory > Other to manage files in the Others folder of the emulator system.

  12. +
  13. Open the widget to launch the installation process.

    The emulator handles the installation of the widget.

    Figure: Launching the installation process (S60 3rd Edition FP2 SDK)

  14. +
  15. When the widget installation is complete, return to the application menu.

  16. +
  17. If you are using the S60 3rd Edition FP2 SDK emulator, open Installations.

    If you are using the S60 5th Edition SDK emulator, open Applications.

    Figure: Installations folder in the application menu (S60 3rd Edition FP2 SDK)

  18. +
  19. Locate the widget in the folder and open it.

    Now the widget should be running on the emulator.

  20. +

Note: It is recommended that you test the emulator Internet connectivity with the Web browser to ensure that you can access the Internet before testing your widget communications feature. For more information on how to test the connectivity, see the documentation in the S60 C++ SDK.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-2B13380C-37C8-473F-B0A7-564439312DA3.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-2B13380C-37C8-473F-B0A7-564439312DA3.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,82 @@ + + +IDataSource.Delete()

IDataSource.Delete()

+

Description:

+

The Delete method deletes a landmark or landmark +category from a landmark database.

+

Note: You cannot delete landmark databases.

+
+

This is a synchronous method.

+

Syntax:

+ +
result = so.IDataSource.Delete(criteria);
+

Arguments:

+
    +
  • criteria:

    + +

    This is an object that specifies the landmark or landmark category to +delete. For more information about the object properties and how to define +them, see section Criteria for deleting landmark information.

    + +
  • +
+

Return value:

+

The Delete method returns an object that contains +an error code and an error message.

+
+ + + + + + + + + + + + + + + +
Table: Return value +properties for Delete
+

Property

+
+

Description

+
+

Value

+
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See Landmarks Service API error messages.

+
+

Remarks:

+
    +
  • If no landmark database is specified, Delete is +performed on the default database. If the default database does not exist, +it is created and set active, but no delete operation is performed. The default +database is file://c:eposlm.ldb.

  • +
  • For more information about landmarks, landmark categories, +and landmark databases, see the Landmarks +Service overview page.

  • +
+

Example code:

+

+

For the complete source of a sample widget +that demonstrates how to use this Service API, see the +full example.

+ + +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-2B27591B-F58B-4C6B-8C35-6F65FCF599C6.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-2B27591B-F58B-4C6B-8C35-6F65FCF599C6.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,401 @@ + + +Properties +and calendar entry types

Properties +and calendar entry types

+

The following table shows the properties valid for a given type of calendar +entry. Brackets indicate that the property is optional. If you try to specify +a property for an entry whose type does not support it, the property is ignored.

+

Note the following when using the Add method +to create or update an entry:

+
    +
  • id and LocalId are +generated automatically by the system when the entry is created. You cannot +specify or modify them.

  • +
  • CalendarName cannot be changed after +the entry has been created. You can specify it for a new entry, but you cannot +modify it afterwards.

  • +
+

For detailed information about the properties and their values, see +section Calendar entry properties.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Supported properties +for different entry types
+

Property

+
+

Anniversary

+
+

DayEvent

+
+

Meeting

+
+

Reminder

+
+

ToDo

+
+

id

+
+

X

+
+

X

+
+

X

+
+

X

+
+

X

+
+

LocalId

+
+

X

+
+

X

+
+

X

+
+

X

+
+

X

+
+

CalendarName

+
+

(X)

+
+

(X)

+
+

(X)

+
+

(X)

+
+

(X)

+
+

Summary

+
+

(X)

+
+

(X)

+
+

(X)

+
+

(X)

+
+

(X)

+
+

SeqNum

+
   +

(X)

+
  
+

StartTime

+
+

X

+
+

X

+
+

X

+
+

X

+
 
+

EndTime

+
  +

(X)

+

Note: Same as StartTime, if not specified

+
+
+

X

+
  +

(X)

+
+

InstanceStartTime

+
   +

(X)

+

Note: This can be specified only when modifying an existing entry.

+
+

Note: GetList returns +this only when id/LocalId is not +specified as filter +input.

+
+
  
+

InstanceEndTime

+
   +

(X)

+

This can be specified only when modifying an existing entry.

+

Note: GetList returns +this only when id/LocalId is not +specified as filter +input.

+
+
  
+

Replication

+
+

(X)

+
+

(X)

+
+

(X)

+
+

(X)

+
+

(X)

+
+

Description

+
+

(X)

+
+

(X)

+
+

(X)

+
+

(X)

+
+

(X)

+
+

Priority

+
+

(X)

+
+

(X)

+
+

(X)

+
+

(X)

+
+

(X)

+
+

AlarmTime

+
+

(X)

+
+

(X)

+
+

(X)

+
+

(X)

+
+

(X)

+
+

Location

+
   +

(X)

+
  
+

Status

+
   +

(X)

+
  +

(X)

+
+

RepeatDates

+
   +

(X)

+
  
+

ExDates

+
   +

(X)

+
  
+

Method

+
   +

(X)

+
  
+

PhoneOwner

+
   +

(X)

+
  
+

Organizer

+
   +

(X)

+
  
+

Attendees

+
   +

(X)

+
  
+

RepeatRule

+
   +

(X)

+

Note: This is only valid for parent entries.

+
+
  
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-2B3FD0AF-2552-46AB-83B5-F404506D16EE.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-2B3FD0AF-2552-46AB-83B5-F404506D16EE.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,377 @@ + + +Landmark

Landmark

+

The following table describes the properties of a landmark object. Properties +enclosed in brackets are optional in method calls.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Landmark object +properties
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

[LandmarkName]

+
+

Specifies the name of the landmark. The name need not be unique within +the database.

+
+

string

+
+

Maximum length 255 characters

+
+

[id]

+
+

Specifies the unique ID of the landmark. This ID is unique only within +the database to which the landmark belongs.

+

The ID is generated automatically when the landmark is added to the +database.

+

Note: This property must not be specified when a new landmark is added to +a database.

+
+
+

string

+
 
+

[CategoryInfo]

+
+

Specifies the IDs of the landmark categories to which the landmark belongs.

+
+

array of strings

+
 
+

[LandmarkDesc]

+
+

Contains a text description for the landmark.

+
+

string

+
+

Maximum length 4095 characters

+
+

[LandmarkPosition]

+
+

Specifies the location of the landmark, expressed as a set of geographical +coordinates.

+
+

object

+
+

See Table: +LandmarkPosition object properties.

+
+

[CoverageRadius]

+
+

Specifies the coverage radius in meters from the coordinates defined +in LandmarkPosition. This indicates the physical area +covered by the landmark, for example a city or town.

+

The landmark can be thought of as a circular area with a center expressed +as LandmarkPosition and a radius expressed as CoverageRadius.

+
+

number

+
 
+

[IconFile]

+
+

Specifies the full path and file name of the icon file that contains +the icon associated with the landmark.

+

Note: Only mbm files are supported.

+
+
+

string

+
+

Maximum length 255 characters

+
+

[IconIndex]

+
+

Specifies the index of the icon within the icon file.

+
+

number

+
 
+

[IconMaskIndex]

+
+

Specifies the index of the icon mask within the icon file.

+
+

number

+
 
+

[LandmarkFields]

+
+

Specifies additional location information about the landmark.

+
+

object

+
+

See Table: +LandmarkFields object properties.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: LandmarkPosition +object properties
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

LandmarkPosition.Latitude

+
+

Specifies the latitude of the landmark location in WGS +84 datum format. This must be specified in decimal degrees.

+

The normal value range is [-90.00, +90.00]. Out-of-range values are +normalized to the range as per standards. Negative degrees indicate west latitude +while positive degrees indicate east latitude.

+
+

number

+
+

[-90.00, +90.00]

+
+

LandmarkPosition.Longitude

+
+

Specifies the longitude of the landmark location in WGS +84 datum format. This must be specified in decimal degrees.

+

The normal value range is [-180.00, +180.00]. Out-of-range values are +normalized to the range as per standards. Negative degrees indicate south +longitude while positive degrees indicate north longitude.

+
+

number

+
+

[-180.00, +180.00]

+
+

[LandmarkPosition.Altitude]

+
+

Specifies the altitude of the landmark location in WGS +84 datum format. The altitude is in meters.

+
+

number

+
 
+

[LandmarkPosition.HAccuracy]

+
+

Specifies the error estimate for horizontal accuracy to [Latitude, Longitude, +and Altitude] in meters.

+
+

number

+
 
+

[LandmarkPosition.VAccuracy]

+
+

Specifies the error estimate for vertical accuracy to [Latitude, Longitude, +and Altitude] in meters.

+
+

number

+
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: LandmarkFields +object properties
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

[LandmarkFields.Street]

+
+

Specifies the street name of the landmark.

+
+

string

+
+

Maximum length 255 characters

+
+

[LandmarkFields.BuildingName]

+
+

Specifies the building name of the landmark.

+
+

string

+
+

Maximum length 255 characters

+
+

[LandmarkFields.District]

+
+

Specifies the district to which the landmark belongs.

+
+

string

+
+

Maximum length 255 characters

+
+

[LandmarkFields.City]

+
+

Specifies the city to which the landmark belongs.

+
+

string

+
+

Maximum length 255 characters

+
+

[LandmarkFields.AreaCode]

+
+

Specifies the area code of the landmark.

+
+

string

+
+

Maximum length 255 characters

+
+

[LandmarkFields.Telephone]

+
+

Specifies the contact number of the landmark.

+
+

string

+
+

Maximum length 255 characters

+
+

[LandmarkFields.Country]

+
+

Specifies the country to which the landmark belongs.

+
+

string

+
+

Maximum length 255 characters

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-2D47E7D9-199D-4D59-BD6A-592FA9F8B16A.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-2D47E7D9-199D-4D59-BD6A-592FA9F8B16A.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,284 @@ + + +AppManager Service API example

AppManager Service API example

+

+

This section presents the full source code of a working sample widget +for the AppManager +Service. You can download the wgz package for +this widget from section Example widgets.

+

For general information about creating widgets, see section Widget component files.

+

For widget development and debugging purposes, this example writes its +output to c:\data\jslog_widget.log using console.info. +For instructions on how to enable logging in the Web browser for S60, see +section JavaScript console.

+

Info.plist

+
<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Nokia//DTD PLIST 1.0//EN" "http://www.nokia.com/NOKIA_COM_1/DTDs/plist-1.0.dtd">
+<plist version="1.0">
+<dict>
+  <key>DisplayName</key>
+  <string>AppManagerSample</string>
+  <key>Identifier</key>
+  <string>com.nokia.widget.sapi.appmanager.sample</string>
+  <key>Version</key>
+  <string>1.0</string>
+  <key>MainHTML</key>
+  <string>appmanager-sample.html</string>
+</dict>
+</plist>
+
+

AppManager-sample.html

+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+  <head>
+    <script type="text/javascript" src="js/common.js"></script>
+    <script type="text/javascript" src="js/appmanager-sample.js"></script>
+  </head>
+  <body id='docBody' bgcolor="#ddeeff" onload="setup()" style=width:100%;height:100%;>
+
+    <form name="frm">
+    	<h3>AppManager API Sample Widget</h3>
+      <input type="button" onclick="getList('img1')" value="GetList"><img id="img1" src="pic/blank.png" width="25" height="25" align="center"><br>
+      <input type="button" onclick="getFilteredList('img2')" value="GetFilteredList"><img id="img2" src="pic/blank.png" width="25" height="25" align="center"><br>
+      <input type="button" onclick="launchDoc('img3')" value="LaunchDoc"><img id="img3" src="pic/blank.png" width="25" height="25" align="center"><br>
+      <input type="button" onclick="launchApp('img4')" value="LaunchApp"><img id="img4" src="pic/blank.png" width="25" height="25" align="center"><br>
+      <input type="button" onclick="launchDocAsync('img5')" value="LaunchDocAsync"><img id="img5" src="pic/blank.png" width="25" height="25" align="center"><br>
+      <input type="button" onclick="launchAppAsync('img6')" value="LaunchAppAsync"><img id="img6" src="pic/blank.png" width="25" height="25" align="center"><br>
+      <input type="button" onclick="cancelLaunchDocAsync('img7')" value="CancelLaunchDocAsync"><img id="img7" src="pic/blank.png" width="25" height="25" align="center"><br>
+      <input type="button" onclick="cancelLaunchAppAsync('img8')" value="CancelLaunchAppAsync"><img id="img8" src="pic/blank.png" width="25" height="25" align="center"><hr>
+      <div class='appman' id='appman' bgcolor="#ddeeff" style=width:100%;height:100%;overflow:auto>
+      </div>
+    </form>
+  </body>
+</html>
+
+

common.js

+
// common.js
+//
+// This file contains some utility functions
+
+// Check the error code and show the information to users
+function checkError(message, resultList, divId, imgId)
+{
+  var errCode = resultList.ErrorCode;
+  var msg = "";
+  
+  if (errCode) {
+    msg = message + "QBRZ" + "Failed Error: " + errCode + "QBRZ";
+    if(resultList.ErrorMessage != undefined)
+      msg += "Error Message: " + resultList.ErrorMessage;
+    showIMG(imgId,"no"); 
+  } else {
+    showIMG(imgId,"yes"); 
+  }
+
+  //Print error message
+  if(divId != null && divId != undefined)
+    document.getElementById(divId).innerHTML = msg;
+  console.info(msg);
+  
+  return errCode;
+}
+
+// Build the message by reading an iterable list in a recursive manner
+function showIterableList(iterator)
+{
+  var msg = "";
+  try
+  {
+    iterator.reset();
+    var item;
+    while (( item = iterator.getNext()) != undefined ){
+       msg += showObject( item );
+    }
+  }
+  catch(e)
+  {
+    alert('QshowIterableListZ ' + e);
+  }
+  return msg;
+}
+
+// Build the message by reading a JS object in a recursive manner
+function showObject( obj )
+{
+  var txt = "";
+  try { 
+    if ( typeof obj != 'object' )
+      return "" + obj + 'QBR/Z';
+    else {
+      for(var key in obj) {
+        txt +=  key + ":";
+        txt += showObject( obj[key] );
+        txt += 'QBR/Z';
+      }
+      txt += 'QBR/Z';
+    }
+  } 
+  catch (e) 
+  {
+    alert("showObject: " + e);
+  }
+  return txt;
+}
+
+// Show the image to indicate the test result
+function showIMG(imgId, isOK) 
+{
+  if(imgId == null || imgId == undefined)
+    return;
+  
+  if(isOK == "yes")
+    document.getElementById(imgId).src = "pic/yes.png";
+  else if(isOK == "no")
+    document.getElementById(imgId).src = "pic/no.png";
+  else
+    document.getElementById(imgId).src = "pic/blank.png";
+}
+
+// Show elements in object by using 'alert'
+function testObject(obj)
+{
+  var msg = "";
+  for(var key in obj) {
+    msg = msg + ":" + key + "=" + obj[key];
+  }
+  alert(msg);
+}
+
+// Test whether the input is numeric
+function IsNumeric(sText)
+{
+  var ValidChars = "0123456789.";
+  var IsNumber=true;
+  var Char;
+  
+  for (i = 0; i Q sText.length && IsNumber == true; i++) 
+  { 
+    Char = sText.charAt(i); 
+    if (ValidChars.indexOf(Char) == -1) 
+    {
+       IsNumber = false;
+    }
+  }
+  return IsNumber; 
+}
+
+
+

AppManager-sample.js

+
// common.js
+//
+// This file contains some utility functions
+
+// Check the error code and show the information to users
+function checkError(message, resultList, divId, imgId)
+{
+  var errCode = resultList.ErrorCode;
+  var msg = "";
+  
+  if (errCode) {
+    msg = message + "QBRZ" + "Failed Error: " + errCode + "QBRZ";
+    if(resultList.ErrorMessage != undefined)
+      msg += "Error Message: " + resultList.ErrorMessage;
+    showIMG(imgId,"no"); 
+  } else {
+    showIMG(imgId,"yes"); 
+  }
+
+  //Print error message
+  if(divId != null && divId != undefined)
+    document.getElementById(divId).innerHTML = msg;
+  console.info(msg);
+  
+  return errCode;
+}
+
+// Build the message by reading an iterable list in a recursive manner
+function showIterableList(iterator)
+{
+  var msg = "";
+  try
+  {
+    iterator.reset();
+    var item;
+    while (( item = iterator.getNext()) != undefined ){
+       msg += showObject( item );
+    }
+  }
+  catch(e)
+  {
+    alert('QshowIterableListZ ' + e);
+  }
+  return msg;
+}
+
+// Build the message by reading a JS object in a recursive manner
+function showObject( obj )
+{
+  var txt = "";
+  try { 
+    if ( typeof obj != 'object' )
+      return "" + obj + 'QBR/Z';
+    else {
+      for(var key in obj) {
+        txt +=  key + ":";
+        txt += showObject( obj[key] );
+        txt += 'QBR/Z';
+      }
+      txt += 'QBR/Z';
+    }
+  } 
+  catch (e) 
+  {
+    alert("showObject: " + e);
+  }
+  return txt;
+}
+
+// Show the image to indicate the test result
+function showIMG(imgId, isOK) 
+{
+  if(imgId == null || imgId == undefined)
+    return;
+  
+  if(isOK == "yes")
+    document.getElementById(imgId).src = "pic/yes.png";
+  else if(isOK == "no")
+    document.getElementById(imgId).src = "pic/no.png";
+  else
+    document.getElementById(imgId).src = "pic/blank.png";
+}
+
+// Show elements in object by using 'alert'
+function testObject(obj)
+{
+  var msg = "";
+  for(var key in obj) {
+    msg = msg + ":" + key + "=" + obj[key];
+  }
+  alert(msg);
+}
+
+// Test whether the input is numeric
+function IsNumeric(sText)
+{
+  var ValidChars = "0123456789.";
+  var IsNumber=true;
+  var Char;
+  
+  for (i = 0; i Q sText.length && IsNumber == true; i++) 
+  { 
+    Char = sText.charAt(i); 
+    if (ValidChars.indexOf(Char) == -1) 
+    {
+       IsNumber = false;
+    }
+  }
+  return IsNumber; 
+}
+
+
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-2D651505-F68C-4053-B565-9FF826C5B897.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-2D651505-F68C-4053-B565-9FF826C5B897.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,39 @@ + + +JavaScript AppManager +Service API

JavaScript AppManager +Service API

+

+

The AppManager +Service API is supported since WRT 1.1.

+

The AppManager Service API allows widgets to access and launch +applications on a mobile device. The API is integrated with WRT through the device object.

+

For an overview of the service and the API, see section Accessing and launching installed applications.

+

Using the AppManager Service API

+

To use the AppManager Service API, your widget must first create a service object for it +using the device.getServiceObject() method. +Use Service.AppManager to identify the service provider +and IAppManager to identify the supported interface:

+
var so = device.getServiceObject("Service.AppManager", "IAppManager");
+ +

This service object can then be used to access the services provided +by the API:

+ +
+

Emulator support

+

The S60 5th Edition SDK emulator provides full support for the AppManager +Service API.

+
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-2D87333D-5475-4A8F-9E98-1EBF8035EF96.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-2D87333D-5475-4A8F-9E98-1EBF8035EF96.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,19 @@ + + +Porting widgets

Porting widgets

+

Although widgets are conceptually similar in different environments, the way they are implemented and built varies depending on the underlying execution environment and the type of browser that is used to run them. Especially the UI resources available may differ notably between environments. For this reason, there are some changes that you need to make manually when porting a widget from a desktop environment to the Web Runtime (WRT) environment of S60 mobile devices.

+

The most important aspects to consider in the porting process include:

+
    +
  • Adjusting UI components

    Due to the differences between the user interface of a desktop environment and that of a mobile device, you need to implement the S60 platform UI requirements on top of your widget. This includes scaling the UI to make it suitable for the mobile device screen size as well as handling possible screen orientation changes. For more information on UI related considerations, see Designing for mobile devices.

  • +
  • Navigation in the widget

    Due to the small screen size and lack of a mouse and a full-size keyboard, the navigation experience of a widget should be made as simple and easy as possible. This may mean adjustments to the navigation mode, scrollbar usage, and key input handling, for example. Consider using softkeys and menu options in your widget.

    For more information, see Managing user interaction and Moving within widgets.

  • +
  • Differences in supported tags and API functionality

    The underlying execution environments for widgets share many common features. However, the WRT environment may include some limitations to tag and method support compared to the environment from which you are porting. On the other hand, the Web Runtime API reference provides some additional features that are mobile device specific.

  • +
  • Differences in file paths

    You may need to modify the file path references of the widget to make it compliant with the file system of the S60 platform.

  • +
  • Plug-in interface support

    Your widget may include functionality that relies on plug-in interface extensions, and the WRT environment may not support such plug-ins. In this case, you may not be able to implement certain functionality in your widget in the WRT environment.

  • +
  • Library support

    The WRT environment only supports libraries that are not copyrighted or protected by any means.

  • +
  • Deployment

    The way in which widgets are deployed to the S60 mobile devices differs from widget deployment in other execution environments. For more information, see sections Widget development process and Deploying widgets.

  • +
+

For more information on porting widgets, see Porting Apple Dashboard Widgets to S60 available at Forum Nokia.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-2EBDD073-499C-4A1E-A0DA-4FF8243A6479.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-2EBDD073-499C-4A1E-A0DA-4FF8243A6479.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,72 @@ + + +IMessaging.Cancel()

IMessaging.Cancel()

+

Description:

+

The Cancel method cancels an outstanding asynchronous Send or RegisterNotification call.

+

Note: To cancel a RegisterNotification call, use CancelNotification instead, +as it provides a more convenient way of doing this.

+
+

This is a synchronous method.

+

Syntax:

+
result = so.IMessaging.Cancel(criteria);
+

Arguments:

+
    +
  • criteria:

    + +

    This is an object with the TransactionID property +(number). criteria.TransactionID specifies the transaction +ID of the Send or RegisterNotification call +to cancel. The transaction ID is the result.TransactionID value +that was returned as part of the result of the initial call.

    +

    + +

  • +
+

Return value:

+

The Cancel method returns an object that contains +an error code and an error message.

+
+ + + + + + + + + + + + + + + + +
Table: Return value +properties for Cancel
+

Property

+
+

Description

+
+

Value

+
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See Messaging Service API error messages.

+
+

Example code:

+

+

For the complete source of a sample widget that demonstrates how to +use this Service API, see the full example.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-2F1A1E1D-EC84-4AE1-8980-3F38A3A653EB_d0e10473_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-2F1A1E1D-EC84-4AE1-8980-3F38A3A653EB_d0e10473_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-2FC0C5D3-CE2A-45BE-B7E9-04A62A099E86.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-2FC0C5D3-CE2A-45BE-B7E9-04A62A099E86.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,114 @@ + + +Media Management Service API error messages

Media Management Service API error messages

+

This section provides information about the error messages returned +by the Media Management Service API methods.

+

GetList

+

The following table describes the error messages returned by GetList and callback for GetList as +part of their return value.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: GetList error +messages
+

Error message

+
+

Description

+
+

MediaMgmt:GetList:Server busy

+
+

The provider is busy processing another request.

+
+

MediaMgmt:GetList:Type Missing

+
+

The Type property is missing from the input.

+
+

MediaMgmt:GetList:Type not supported(should be FileInfo)

+
+

The content type is invalid.

+
+

MediaMgmt:GetList:Filter parameter missing

+
+

The Filter property is missing from the input.

+
+

MediaMgmt:GetList:Filter parameter type mismatch

+
+

The type of the Filter property is invalid.

+
+

MediaMgmt:GetList:Sort parameter type mismatch

+
+

The type of the Sort property is invalid.

+
+

MediaMgmt:GetList:FileType missing in Filter map

+
+

Either the FileType property is not present in +the Filter map or the FileType property +contains a value with an invalid type.

+
+

Cancel

+

The following table describes the error messages returned by Cancel as part of its return value.

+
+ + + + + + + + + + + + + +
Table: Cancel error +messages
+

Error message

+
+

Description

+
+

MediaMgmt:Cancel:Invalid TransactionID

+
+

Either an invalid TransactionID was passed or an +asynchronous call associated with this ID has already been completed.

+
+

MediaMgmt:Cancel:Transaction ID missing

+
+

The TransactionID property is missing from the +input.

+
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-318BD3F5-D351-4BC2-8F4F-6E096A56CD54.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-318BD3F5-D351-4BC2-8F4F-6E096A56CD54.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,24 @@ + + +Display and keypad illumination information and control services

Display and keypad illumination information and control services

\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-350F3C29-923E-4C30-8B14-C3D594BB8E39.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-350F3C29-923E-4C30-8B14-C3D594BB8E39.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,325 @@ + + +Sensor Service API example

Sensor Service API example

+

+

This section presents the full source code of a working sample widget +for the Sensor Service. +You can download the wgz package for this widget from +section Example widgets.

+

For general information about creating widgets, see section Widget component files.

+

For widget development and debugging purposes, this example writes its +output to c:\data\jslog_widget.log using console.info. +For instructions on how to enable logging in the Web browser for S60, see +section JavaScript console.

+

Info.plist

+
<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Nokia//DTD PLIST 1.0//EN" "http://www.nokia.com/NOKIA_COM_1/DTDs/plist-1.0.dtd">
+<plist version="1.0">
+<dict>
+  <key>DisplayName</key>
+  <string>SensorSample</string>
+  <key>Identifier</key>
+  <string>com.nokia.widget.sapi.sensor.sample</string>
+  <key>Version</key>
+  <string>1.0</string>
+  <key>MainHTML</key>
+  <string>sensor-sample.html</string>
+</dict>
+</plist>
+
+

sensor-sample.html

+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+  <head>
+    <script type="text/javascript" src="js/common.js"></script>
+    <script type="text/javascript" src="js/sensor-sample.js" charset="utf-8"></script>
+  </head>
+  <body onload='setup()' bgcolor="#ddeeff">
+    <form name="frm">
+      <h3>Sapi Sensor Sample Widget</h3>
+      <input type="button" onclick="findSensorChannel('img1')" value="FindSensorChannel"><img id="img1" src="pic/blank.png" width="25" height="25" align="center"><br>
+      <input type="button" onclick="getChannelProperty('img2')" value="GetChannelProperty"><img id="img2" src="pic/blank.png" width="25" height="25" align="center"><br>
+      <input type="button" onclick="setChannelProperty('img3')" value="RegisterForNotification"><img id="img5" src="pic/blank.png" width="25" height="25" align="center"><br>
+      <input type="button" onclick="stopReceivingNotification('img6')" value="Cancel"><img id="img6" src="pic/blank.png" width="25" height="25" align="center"><hr>
+      <div class='sensor' id='sensor' bgcolor="#ddeeff" style=width:100%;height:100%;overflow:auto></div>
+    </form>
+  </body>
+</html>
+
+
+

common.js

+
// common.js
+//
+// This file contains some utility functions
+
+// Check the error code and show the information to users
+function checkError(message, resultList, divId, imgId)
+{
+  var errCode = resultList.ErrorCode;
+  var msg = "";
+  
+  if (errCode) {
+    msg = message + "<BR>" + "Failed Error: " + errCode + "<BR>";
+    if(resultList.ErrorMessage != undefined)
+      msg += "Error Message: " + resultList.ErrorMessage;
+    showIMG(imgId,"no"); 
+  } else {
+    showIMG(imgId,"yes"); 
+  }
+
+  //print error message
+  if(divId != null && divId != undefined)
+    document.getElementById(divId).innerHTML = msg;
+  console.info(msg);
+  
+  return errCode;
+}
+
+// Build the message by reading a iteratorable list in a recursive manner
+function showIterableList(iterator)
+{
+  var msg = "";
+  try
+  {
+    iterator.reset();
+    var item;
+    while (( item = iterator.getNext()) != undefined ){
+      msg += showObject( item );
+    }
+  }
+  catch(e)
+  {
+    alert('<showIterableList> ' + e);
+  }
+  return msg;
+}
+
+// Build the message by reading a JS object in a recursive manner
+function showObject( obj )
+{
+  var txt = "";
+  try { 
+    if ( typeof obj != 'object' )
+      return "" + obj + '<BR/>';
+    else {
+      for(var key in obj) {
+        txt +=  key + ":";
+        txt += showObject( obj[key] );
+        txt += '<BR/>';
+      }
+      txt += '<BR/>';
+    }
+  } 
+  catch (e) 
+  {
+    alert("showObject: " + e);
+  }
+  return txt;
+}
+
+// Show the image to indicate the test result
+function showIMG(imgId, isOK) 
+{
+  if(imgId == null || imgId == undefined)
+    return;
+  
+  if(isOK == "yes")
+    document.getElementById(imgId).src = "pic/yes.png";
+  else if(isOK == "no")
+    document.getElementById(imgId).src = "pic/no.png";
+  else
+    document.getElementById(imgId).src = "pic/blank.png";
+}
+
+// Show elements in object by using 'alert'
+function testObject(obj)
+{
+  var msg = "";
+  for(var key in obj) {
+    msg = msg + ":" + key + "=" + obj[key];
+  }
+  alert(msg);
+}
+
+// Test whether the input is numeric
+function IsNumeric(sText)
+{
+  var ValidChars = "0123456789.";
+  var IsNumber=true;
+  var Char;
+  
+  for (i = 0; i < sText.length && IsNumber == true; i++) 
+  { 
+    Char = sText.charAt(i); 
+    if (ValidChars.indexOf(Char) == -1) 
+    {
+      IsNumber = false;
+    }
+  }
+  return IsNumber; 
+}
+
+

sensor-sample.js

+
// sensor-sample.js
+//
+// In this sample the sensor will be found, get and set;
+// Also, async operation will be canceled.
+//
+
+// SAPI Error Codes
+// 0  - Success
+// 1000 - InvalidServiceArgument
+// 1001 - UnknownArgumentName
+// 1002 - BadArgumentType
+// 1003 - MissingArgument
+// 1004 - ServiceNotSupported
+// 1005 - ServiceInUse
+// 1006 - ServiceNotReady
+// 1007 - NoMemory
+// 1008 - HardwareNotAvailable
+// 1009 - ServerBusy
+// 1010 - EntryExists
+// 1011 - AccessDenied
+// 1012 - NotFound
+// 1013 - UnknownFormat
+// 1014 - GeneralError
+// 1015 - CancelSuccess
+// 1016 - ServiceTimedOut
+// 1017 - PathNotFound
+
+// Usage:
+// 1. Call FindSensorChannel (input searchCriterion) - this call obtains a list of maps.The list can be fetched using the key : ReturnValue
+// 2. From the list you need to fetch one ChannelInfo as a map.The fetching depends on how the runtime fetches items from an CLiwDefaultList.
+// 3. It is this ChannelInfo map that needs to be supplied to all the other APIs that follow.
+ 
+// Declare the service object
+var so;
+
+// imgid for callback1 function
+var imgid_callback1;
+
+// id of the div used to display information
+const DIV_ID = 'sensor';
+
+// transaction id
+var transactionID;
+
+// Called from onload()
+function setup()
+{
+  try {
+    so = device.getServiceObject("Service.Sensor", "ISensor");
+    console.info("setup: so: %s", so);
+  }
+  catch (e) {
+    alert('<setup> ' +e);
+  }
+}
+
+//FindSensorChannel - searches and list available sensor channels.
+function findSensorChannel(imgId)
+{
+  var criteria = new Object();
+  criteria.SearchCriterion = "Rotation";
+
+  try
+  {
+    var result = so.ISensor.FindSensorChannel(criteria);
+    if(!checkError("ISensor::findSensorChannel",result,DIV_ID,imgId)) {
+      document.getElementById(DIV_ID).innerHTML = showIterableList(result.ReturnValue);
+    }
+  }
+  catch (e)
+  {
+    showIMG(imgId,"no");
+    alert ("findSensorChannel: " + e);
+  }
+}
+
+// GetChannelProperty
+function getChannelProperty(imgId)
+{
+  var channelInfoMap = new Object();
+  channelInfoMap.ChannelId = 1;
+  channelInfoMap.ContextType = 0;  // 0-not defined; 1- to measure pressure, ...
+  channelInfoMap.Quantity = 0;
+  channelInfoMap.ChannelType = 0 ;
+
+  var criteria = new Object();
+  criteria.PropertyId = "Description";
+  criteria.ChannelInfoMap = channelInfoMap;
+
+  try
+  {
+    var result = so.ISensor.GetChannelProperty(criteria);
+    if(!checkError("ISensor::getChannelProperty",result,DIV_ID,imgId)) {
+      document.getElementById(DIV_ID).innerHTML = showIterableList(result.ReturnValue);
+    }
+  }
+  catch (e)
+  {
+    showIMG(imgId,"no");
+    alert ("getChannelProperty: " + e);
+  }
+}
+
+// RegisterForNotification - register to receive
+// notification about channel data.
+function registerForNotification(imgId)
+{
+  var channelInfoMap = new Object();
+  channelInfoMap.ChannelId = 1;
+  channelInfoMap.ContextType = 0;  // 0-not defined; 1- to measure pressure, ...
+  channelInfoMap.Quantity = 0;
+  channelInfoMap.ChannelType = 0 ;
+
+  var criteria = new Object();
+  criteria.ListeningType = "ChannelData";
+  criteria.ChannelInfoMap = channelInfoMap;
+
+  try
+  {
+    imgid_callback1 = imgId
+    var result = so.ISensor.RegisterForNotification(criteria, callback1);
+    transactionID = result.TransactionID;
+    if(!checkError("ISensor::registerForNotification",result,DIV_ID,imgId)){
+      showIMG(imgId,"");
+    }
+  }
+  catch (e)
+  {
+    showIMG(imgId,"no");
+    alert ("registerForNotification: " + e);
+  }
+}
+
+//Cancel Notification
+function Cancel(imgId)
+{
+  var criteria = new Object();
+  criteria.TransactionID = transactionID;
+  try
+  {
+    var result = so.ISensor.Cancel(criteria);
+    checkError("ISensor::Cancel",result,DIV_ID,imgId)
+  }
+  catch (e)
+  {
+    showIMG(imgId,"no");
+    alert ("Cancel: " + e);
+  }
+}
+
+// This is the asynchronous callback handler
+function callback1(transId, eventCode, result)
+{
+  console.info("callback1: transId: %d  eventCode: %d result.ErrorCode: %d", transId, eventCode, result.ErrorCode);
+  if(!checkError("ISensor::registerForNotification",result,DIV_ID,imgid_callback1)) {
+    document.getElementById(DIV_ID).innerHTML = "Channel Property changes";
+  }
+}
+
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-36434377-FA7E-45F2-AEB3-BA0B7A378422.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-36434377-FA7E-45F2-AEB3-BA0B7A378422.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,156 @@ + + +Criteria for +exporting calendar entries

Criteria for +exporting calendar entries

+

The criteria object specifies the entries +to export and optionally the source calendar.

+

The criteria object has two main properties: Type and Data. +These are described in the following table. Properties enclosed in brackets +are optional.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Criteria object properties
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

criteria.Type

+
+

Specifies the type of calendar information to export. This is always "CalendarEntry".

+
+

string

+
+

Possible values:

+
    +
  • "CalendarEntry"

  • +
+
+

criteria.Data

+
+

Specifies the entries to export.

+
+

object

+
+

Object with the properties specified below

+
+

[criteria.Data.CalendarName]

+
+

Specifies the calendar from which the entries are exported.

+

If this property is not specified, the entries are exported from the +default calendar.

+
+

string

+
+

<DriveLetter>:<FileName>

+

For example: "C:Calendar"

+
+

[criteria.Data.IdList]

+
+

Specifies the ids of the entries to export. If +an entry has child entries, the parent entry and all child entries are exported. +Invalid values are ignored.

+

Specify either Data.IdList or Data.LocalIdList or +neither, but not both. If neither is specified, all entries in the calendar +are exported.

+

The first id is specified in Data.IdList[0].

+
+

array of strings

+
 
+

[criteria.Data.LocalIdList]

+
+

Specifies the LocalIds of the entries to export. +In case of parent and child entries, only the specific entry matching the LocalId is +exported. Invalid values are ignored.

+

Specify either Data.IdList or Data.LocalIdList or +neither, but not both. If neither is specified, all entries in the calendar +are exported.

+

The first LocalId is specified in Data.LocalIdList[0].

+
+

array of strings

+
 
+

[criteria.Data.FileName]

+
+

Specifies the full path and file name of the target file to which the +entries are exported.

+

If this property is not specified, the entries are stored in the ReturnValue property +of the result object.

+
+

string

+
+

The string cannot exceed 239 characters

+

For example: C:\\Data\\exportfile.txt

+
+

criteria.Data.Format

+
+

Specifies the data format in which the entries are exported. The supported +formats are:

+
    +
  • iCal

  • +
  • vCal

  • +
+

For more information about these two formats, see the Calendar +Service overview page.

+
+

string

+
+

Possible values:

+
    +
  • "ICal"

  • +
  • "VCal"

  • +
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-36CDDA1B-3B62-4936-9E06-7935AAD1CD77.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-36CDDA1B-3B62-4936-9E06-7935AAD1CD77.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,27 @@ + + +Designing for dynamic screen orientation

Designing for dynamic screen orientation

Some S60 devices support screen rotation. On these devices, applications can be displayed in portrait or landscape orientation.

+

Screen rotation can be supported in the following ways:

+
    +
  • You can add a menu option to your widget that enables the user to rotate the UI.

  • +
  • Some devices support rotation in response to a user action such as opening a cover or moving a slider. For an example, see STEW: supporting screen rotation.

  • +
  • Some devices enable software developers to use widget object methods to programmatically rotate the screen.

  • +
+

Combine the JavaScript onResize DOM event handler with the height and width properties from the window and screen objects to calculate the effective area or viewport available for a widget. See the Viewport widget for an example of how to determine the effective viewport size.

+

Rotation and softkey styles

In the landscape orientation, the softkeys can either be placed on either side of the display or at the bottom of the display. In the bottom softkey style, the layout is stretched horizontally to fit the screen, leaving the softkeys below the screen as in portrait orientation. Touch devices do not support the bottom softkey style. Design widgets to work in both portrait orientation and landscape orientation with side softkeys.

Figure: Page layout in portrait and landscape

Note: The WRT environment adjusts the softkey labels.

+

To add a rotation command to the options menu

    +
  1. Add a rotation option to the options menu.

    For more information, see Using softkeys.

  2. +
  3. Create the code for the menu option. Check that the device supports screen rotation and use widget object methods to change the screen orientation.

    For example, the following code changes the orientation to landscape if the screen height is less than the screen width:
    if (widget.isrotationsupported)
    +
    +// Change the screen orientation
    +
    +var h = window.screen.height;
    +var w = window.screen.width;
    + 
    +if (h < w)
    +  widget.setDisplayLanscape();
  4. +
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-37C9E5F0-BEA9-4E0B-A40D-B953B3551007.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-37C9E5F0-BEA9-4E0B-A40D-B953B3551007.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,159 @@ + + +IDataSource.GetList()

IDataSource.GetList()

+

Description:

+

The GetList method retrieves a list of contacts, +contact groups, or contacts databases. Contacts and contact groups are retrieved +from the specified contacts database or, if no database is specified, from +the default one.

+

This method can be called both synchronously and asynchronously.

+

Note: Calls that retrieve a list of databases must always be synchronous.

+
+

Syntax:

+

For synchronous calls:

+
result = so.IDataSource.GetList(criteria);
+ +

For asynchronous calls:

+
result = so.IDataSource.GetList(criteria, callback);
+ +

Arguments:

+
    +
  • criteria:

    + +

    This is an object that specifies what contact information is returned +and how the returned information is sorted. For more information about the +object properties and how to define them, see section Criteria for retrieving contact information.

    + +
  • +
  • callback:

    + +

    The callback argument is the name of the method +that is executed when an asynchronous GetList call has +results or status information to return. You must define this method separately. +Follow the instructions in section Defining the callback handler for an asynchronous method to +define the callback method.

    +

    This argument is used only with an asynchronous GetList call.

    + +
  • +
+

Return value:

+

If synchronous, the GetList method returns an object +that contains the requested contact information, an error code, and an error +message.

+
+ + + + + + + + + + + + + + + + + + + + +
Table: Return value +properties for a synchronous GetList
+

Property

+
+

Description

+
+

Value

+
+

result.ReturnValue

+
+

This is an iterator that contains the requested contact information.

+
+

See Returned contact information.

+
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See Contacts Service API error messages.

+
+

If asynchronous, the GetList method returns an +object that contains the initial return value for the asynchronous call it +started (see the following table). The actual contact information is returned +by the callback method +in the ReturnValue property of its result object. The +returned information is described in section Returned contact information.

+
+ + + + + + + + + + + + + + + + + + + + + +
Table: Return value +properties for an asynchronous GetList
+

Property

+
+

Description

+
+

Value

+
+

result.TransactionID

+
+

This is a number used as an identification to match transactions started +with the asynchronous GetList call to one or more calls +it generates to callback.

+
 
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See Contacts Service API error messages.

+
+

Remarks:

+

The default contacts database is cntdb://c:contacts.cdb. +The SIM card database is sim://global_adn.

+

Example code:

+

+

For the complete source of a sample widget +that demonstrates how to use this Service API, see the +full example.

+ + + + +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-386E1E84-6AD0-464F-9228-389126856177.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-386E1E84-6AD0-464F-9228-389126856177.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,29 @@ + + +onchargelevel

onchargelevel

+

Syntax:

+
sysinfo.chargelevel = "batteryLevelChange()";
+
function batteryLevelChange()
+{
+  // ...
+};
+

Description:

+

The onchargelevel property is an event handler for the event of when the battery level is changed. The callback function is assigned by providing the function's name wrapped in a string.

+

For more general information on power consumption and widgets, see Saving battery time.

+

Example code:

+
window.onload = function(){
+ // Get the current battery level
+ var batteryLevel = sysinfo.chargelevel;
+ alert("Current battery level is " + batteryLevel + "%");
+ // Assign an even handler for the charge level change
+ sysinfo.onchargelevel = "batteryLevelChange()";
+}
+function batteryLevelChange()
+{
+ var batteryLevel = sysinfo.chargelevel;
+ alert("Current battery level is " + batteryLevel + "%");
+}
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-387912B8-1FF4-40EE-ABC5-AB50DBF8A137.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-387912B8-1FF4-40EE-ABC5-AB50DBF8A137.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,107 @@ + + +Criteria for +importing landmarks

Criteria for +importing landmarks

+

The criteria object specifies the set of +landmarks to import and optionally the target database.

+

The criteria object has two main properties: Type and Data. +These are described in the following table.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Criteria object properties
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

criteria.Type

+
+

Specifies the type of landmark information to import. This is always "Landmark".

+
+

string

+
+

Possible values:

+
    +
  • "Landmark"

  • +
+
+

criteria.Data

+
+

Specifies the landmarks to import.

+
+

object

+
+

Object with the properties specified below

+
+

[criterias.Data.DatabaseURI]

+
+

Specifies the URI of the landmark database into which the landmarks +are imported.

+

If this property is not specified, the landmarks are imported into the +default database.

+
+

string

+
+

For example: file://c:landmarks.ldb

+
+

criteria.Data.SourceFile

+
+

Specifies the full path and file name of the source file from which +the landmarks are imported.

+
+

string

+
+

For example: c:\\mylandmarks.lmx

+
+

criteria.Data.MimeType

+
+

Specifies the MIME type of the source file.

+

The supported MIME types are described in the document S60 Platform: Landmarks Exchange Format Specification available +on Forum Nokia.

+
+

string

+
+

For example: "application/vnd.nokia.landmarkcollection+xml"

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-38EF5741-0A6A-4A55-BDE5-4DB3F686D21E-master.jpg Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-38EF5741-0A6A-4A55-BDE5-4DB3F686D21E-master.jpg has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-38EF5741-0A6A-4A55-BDE5-4DB3F686D21E_d0e11072_href.jpg Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-38EF5741-0A6A-4A55-BDE5-4DB3F686D21E_d0e11072_href.jpg has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-38EF5741-0A6A-4A55-BDE5-4DB3F686D21E_d0e11135_href.jpg Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-38EF5741-0A6A-4A55-BDE5-4DB3F686D21E_d0e11135_href.jpg has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-38EF5741-0A6A-4A55-BDE5-4DB3F686D21E_d0e11287_href.jpg Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-38EF5741-0A6A-4A55-BDE5-4DB3F686D21E_d0e11287_href.jpg has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-38EF5741-0A6A-4A55-BDE5-4DB3F686D21E_d0e11532_href.jpg Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-38EF5741-0A6A-4A55-BDE5-4DB3F686D21E_d0e11532_href.jpg has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-38EF5741-0A6A-4A55-BDE5-4DB3F686D21E_d0e3492_href.jpg Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-38EF5741-0A6A-4A55-BDE5-4DB3F686D21E_d0e3492_href.jpg has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-39C0BA48-E615-41B1-84FF-D4D0C4597DAB.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-39C0BA48-E615-41B1-84FF-D4D0C4597DAB.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,93 @@ + + +IDataSource.GetList()

IDataSource.GetList()

+

Description:

+

The GetList method retrieves a list of media information +objects from the Media Gallery of the S60 +device. Each object contains information about a single media file.

+

This is an asynchronous method.

+

Syntax:

+
result = so.IDataSource.GetList(criteria, callback);
+ +

Arguments:

+
    +
  • criteria:

    + +

    This is an object that specifies what media information is returned +and how the returned information is sorted. For more information about the +object properties and how to define them, see section Criteria for retrieving media information.

    + +
  • +
  • callback:

    + +

    The callback argument is the name of the method +that is executed when GetList has results or status information +to return. You must define this method separately. Follow the instructions +in section Defining the callback handler for an asynchronous method to +define the callback method.

    + +
  • +
+

Return value:

+

The GetList method returns an object that contains +the initial return value for the asynchronous call it started (see the following +table). The actual media file information is returned by the callback method in the ReturnValue property of its result object. +The returned information is described in section Returned media information.

+
+ + + + + + + + + + + + + + + + + + + + + +
Table: Return value +properties for GetList
+

Property

+
+

Description

+
+

Value

+
+

result.TransactionID

+
+

This is a number used as an identification to match transactions started +with the GetList call to one or more calls it generates +to callback.

+
 
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See Media Management Service API error messages.

+
+

Example code:

+

+

For the complete source of a sample widget +that demonstrates how to use this Service API, see the full example.

+ + +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-3A306F4B-638D-4133-8575-2E269E565B7F.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-3A306F4B-638D-4133-8575-2E269E565B7F.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,69 @@ + + +ISensor.Cancel()

ISensor.Cancel()

+

Description:

+

The Cancel method stops an ongoing RegisterForNotification call.

+

This is a synchronous method.

+

Syntax:

+
result = so.ISensor.Cancel(criteria);
+

Arguments:

+
    +
  • criteria:

    + +

    This is an object with the TransactionID property +(number). criteria.TransactionID specifies the transaction +ID of the RegisterForNotification call to cancel. The +transaction ID is the result.TransactionID value that +was returned as part of the result of the initial call.

    + +
  • +
+

Return value:

+

The Cancel method returns an object that contains +an error code and an error message.

+
+ + + + + + + + + + + + + + + + +
Table: Return value +properties for Cancel
+

Property

+
+

Description

+
+

Value

+
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See Sensor Service API error messages.

+
+

Example code:

+

+

For the complete source of a sample widget that demonstrates how to +use this Service API, see the +full example.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-3BE91359-26F3-44A7-88EE-6087960F67A8-master.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-3BE91359-26F3-44A7-88EE-6087960F67A8-master.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-3BE91359-26F3-44A7-88EE-6087960F67A8_d0e3784_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-3BE91359-26F3-44A7-88EE-6087960F67A8_d0e3784_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-3DA126B3-12E2-44C8-A009-8D25E7B3F7E6.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-3DA126B3-12E2-44C8-A009-8D25E7B3F7E6.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,15 @@ + + +Customizing style sheets for S60 devices

Customizing style sheets for S60 devices

Use cascading style sheets (CSS) to define how pages look and feel. Separate structure from presentation to be able to use the same structure in different contexts and to reformat it with an alternative CSS for different purposes, such as smaller screen sizes and different media types. If you reuse the same CSS resource rules for multiple views, you can make changes to the entire application with one update.

+

The CSS defines the size, margins, color, background color, and other characteristics of each HTML element. You can either embed CSS information in the HTML file or import it from an external stylesheet. For more information, see Creating a CSS file.

+

For an example of using CSS files to render widget views, see the AccuWidget Example on Forum Nokia.

+

Limitations in the Web Runtime

Web Runtime (WRT) does not support the CSS opacity parameter. Use transparent PNG images to create similar functionality, for example, to stretch images across the screen. However, note that partial transparency can consume lots of processing power on the mobile device.

+

Using a CSS reset file

Use a reset CSS file to adjust the CSS to a more accurate layout. This also makes the CSS easier to debug. Store the CSS file in the project folder and refer to it from the HTML file.

The following is a example of a reset.css file.

* {
+   padding: 0;
+   margin: 0;
+   border: 0; 
+} 

For more information on using CSS files according to device screen size, see Using multiple CSS.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-3DA7780D-3B24-40CF-8896-8FA33B5F87FB_d0e1183_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-3DA7780D-3B24-40CF-8896-8FA33B5F87FB_d0e1183_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-3ED63699-D71D-479A-A191-F7145271CCBC.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-3ED63699-D71D-479A-A191-F7145271CCBC.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,11 @@ + + +lightdefaultcycletime

lightdefaultcycletime

+

Syntax:

+
[int] sysinfo.lightdefaultcycletime 
+

Description:

+

This is a read-only property that returns a constant value indicating the default cycle time of when the light is blinking.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-40BE0552-37F0-43C8-9ADC-2A488B032C0D.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-40BE0552-37F0-43C8-9ADC-2A488B032C0D.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,14 @@ + + +identifier

identifier

+

Description:

+

identifier is a read-only property of the widget object. It is the unique string identifier that identifies a widget after it has been installed into a device. The string returned is the value of the Identifier key defined in the widget property list file (info.plist).

+

For more information on the info.plist file, see Widget component files.

+

Syntax:

+
[String] widget.identifier
+

or

+
[String] window.widget.identifier
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-40EAD781-6B30-406E-B05F-0BE932EFE86A.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-40EAD781-6B30-406E-B05F-0BE932EFE86A.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,114 @@ + + +Landmark +category

Landmark +category

+

The following table describes the properties of a landmark category +object.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Landmark category +object properties
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

CategoryName

+
+

Specifies the name of the landmark category. The name is unique within +the database.

+
+

string

+
+

Maximum length 124 characters

+
+

[id]

+
+

Specifies the unique ID of the landmark category. This ID is unique +only within the database to which the category belongs.

+

The ID is generated automatically when the category is added to the +database.

+

Note: This property must not be specified when a new category is added to +a database.

+
+
+

string

+
 
+

[GlobalId]

+
+

Specifies the unique global ID of the landmark category. This ID is +unique across all databases. Global ID is only specified for global categories.

+

This property cannot be modified. If this property is passed as input +in a method call, it is ignored.

+
+

string

+
 
+

[IconFile]

+
+

Specifies the icon file that contains the icon associated with the landmark +category.

+
+

string

+
+

Maximum length 255 characters

+
+

[IconIndex]

+
+

Specifies the index of the icon within the icon file.

+
+

number

+
 
+

[IconMaskIndex]

+
+

Specifies the index of the icon mask within the icon file.

+
+

number

+
 
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-41FAD7DA-0DB7-48E7-BD60-58D6BFD785DA.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-41FAD7DA-0DB7-48E7-BD60-58D6BFD785DA.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,165 @@ + + +IAppManager.LaunchDoc()

IAppManager.LaunchDoc()

+

Description:

+

The LaunchDoc method launches an application based +on a given document. This method automatically determines which application +to launch for the specified document.

+

The application can be launched as chained (embedded) or stand-alone. +For more information about embedded and stand-alone applications, see section Accessing and launching installed applications.

+

This method can be called both synchronously and asynchronously.

+

Syntax:

+

For synchronous calls:

+
result = so.IAppManager.LaunchDoc(criteria);
+ +

For asynchronous calls:

+
result = so.IAppManager.LaunchDoc(criteria, callback);
+ +

Arguments:

+
    +
  • criteria:

    + +

    This is an object that specifies which application to launch. For more +information about the object properties and how to define them, see section Criteria for launching an application.

    + +
  • +
  • callback:

    + +

    The callback argument is the name of the method +that is executed when an asynchronous LaunchDoc call +has status information to return. You must define this method separately. +Follow the instructions in section Defining the callback handler for an asynchronous method to +define the callback method.

    +

    This argument is used only with an asynchronous LaunchDoc call.

    + +
  • +
+

Return value:

+

+

If synchronous, the LaunchDoc method returns an +object that contains the name of the newly created document, if applicable, +an error code, and an error message.

+
+ + + + + + + + + + + + + + + + + + + + +
Table: Return value +properties for a synchronous LaunchDoc
+

Property

+
+

Description

+
+

Value

+
+

[result.ReturnValue]

+
+

This is a string that contains the name of the newly created document, +if any.

+

This property is optional. A new document is created only when both +of the following are true:

+
    +
  • criteria.MIMEType is specified as input.

  • +
  • The launched application creates a new document.

    +
  • +
+

A document name is never returned when criteria.Document is specified as input.

+
 
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See AppManager Service API error messages.

+
+

If asynchronous, the LaunchDoc method returns an +object that contains the initial return value for the asynchronous call it +started (see the following table). The actual result information is returned +by the callback method +in the ReturnValue property of its result object. The +returned information is described in the preceding table.

+

Note: If Cancel is +called on an ongoing asynchronous request, LaunchDoc does +not return a notification when the launched application terminates.

+
+
+ + + + + + + + + + + + + + + + + + + + +
Table: Return value +properties for an asynchronous LaunchDoc
+

Property

+
+

Description

+
+

Value

+
+

result.TransactionID

+
+

This is a number used as an identification to match transactions started +with the asynchronous LaunchDoc call to one or more calls +it generates to callback.

+
 
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See AppManager Service API error messages.

+
+

Example code:

+

+

For the complete source of a sample widget +that demonstrates how to use this Service API, see the +full example.

+ + + + +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-4347A7F1-1560-4B28-B4A8-DC570864F505.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-4347A7F1-1560-4B28-B4A8-DC570864F505.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,72 @@ + + +ISysInfo.SetInfo()

ISysInfo.SetInfo()

+

Description:

+

The SetInfo method modifies the value of a system attribute.

+

This is a synchronous method.

+

Syntax:

+ +
result = so.ISysInfo.SetInfo(criteria);
+

Arguments:

+ +

Return value:

+

The SetInfo method returns an error code and an +error message.

+
+ + + + + + + + + + + + + + + +
Table: Return value +properties for SetInfo
+

Property

+
+

Description

+
+

Value

+
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See SystemInfo Service API error messages.

+
+

Remarks:

+

Only some system attributes can be modified. To find out which system +attributes support SetInfo, see section Supported system attributes (entities and keys).

+

Example code:

+

+

For the complete source of a sample widget +that demonstrates how to use this Service API, see the +full example.

+ + +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-43F2AB31-124B-4654-8AB0-AEEBB6E0447B.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-43F2AB31-124B-4654-8AB0-AEEBB6E0447B.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,120 @@ + + +Change history

Change history

This topic describes the information that has been added to each +version of the Web Developer's Library.

+

Web Developer's Library 1.4

+

Web Developer's Library 1.3

    +
  • Added guidelines for developing usable widgets to the section Designing widgets:

      +
    • Laying out pages—Guidelines +for developing widgets for specific audiences with a simple and clear design +that helps make the most important content obvious.

    • +
    • Designing for mobile devices—Guidelines +for designing widgets that look good on small screens and on different screen +sizes and that adapt when the screen orientation changes from portrait to +landscape.

    • +
    • Porting widgets—Summary +of changes that you need to make manually when porting a widget from a desktop +environment to the Web Runtime (WRT) environment of S60 mobile devices.

    • +
    • Managing user interaction—Guidelines +for designing user interaction methods for devices with the five way navigation +keys or touch screens.

    • +
    • Moving within widgets—Guidelines +for choosing navigation methods.

    • +
    • Designing for limited resources—Guidelines +for using images and scripting effectively, keeping response times short, +saving battery time, dealing with network issues, coping with the processing +limits of the devices, and retrieving data.

    • +
  • +
  • Updated information on the following S60 +Platform Services and added the corresponding JavaScript +Service API references:

  • +
+

Web Developer's Library 1.2

+

Web Developer's Library 1.1

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-440F39F5-9529-4422-A1A2-E5C309CA8750-master.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-440F39F5-9529-4422-A1A2-E5C309CA8750-master.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-440F39F5-9529-4422-A1A2-E5C309CA8750_d0e11769_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-440F39F5-9529-4422-A1A2-E5C309CA8750_d0e11769_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-4541E532-CC1A-4115-8467-7FA1C4378307.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-4541E532-CC1A-4115-8467-7FA1C4378307.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,182 @@ + + +Criteria for +retrieving location information

Criteria for +retrieving location information

+

+

The criteria object specifies what type +of device location information is returned and how.

+

The Location Service supports two types of location information:

+
    +
  • Basic

    + +

    Basic location information includes longitude, latitude, and altitude +estimates.

    + +
  • +
  • Generic

    + +

    Generic location information includes all +possible location data.

    + +
  • +
+

The criteria object has two main properties: LocationInformationClass and Updateoptions. These are described in the following table. Properties enclosed in brackets +are optional.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Criteria object properties
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

[criteria.LocationInformationClass]

+
+

Specifies the type of location information to retrieve. It has two possible +values:

+
    +
  • BasicLocationInformation includes longitude, +latitude, and altitude estimates. This is the default value for this argument.

    +
  • +
  • GenericLocationInfo includes all possible +location data.

  • +
+

Note: There is no guarantee that all the requested information is returned, +whether basic or generic. The availability of specific information depends +on the positioning system used and on other factors such as the number of +satellites that are available when a location fix is obtained.

+

For information on how to ensure that you get at least certain information, +see the Updateoptions.PartialUpdates property.

+
+
+

string

+
+

Possible values:

+
    +
  • "BasicLocationInformation"

  • +
  • "GenericLocationInfo"

  • +
+
+

[criteria.Updateoptions]

+
+

Specifies the update options used while retrieving the location information.

+

If you do not define a particular option, then its default value is +used.

+

Note: The option values must conform to the following order of magnitude:

+

UpdateTimeOut > UpdateInterval > UpdateMaxAge

+

If this order is not maintained, the method returns the SErrArgument error.

+
+
+

object

+
+

Object with the properties specified below

+
+

[criteria.Updateoptions.UpdateInterval]

+
+

Specifies the time interval (in microseconds) between two consecutive +location estimates.

+

This is only used with Trace, +which requests location estimates until cancelled. GetLocation only +requests the location estimate once.

+

The default value is 1000000 (= 1 second).

+
+

number

+
+

0 or a positive integer

+
+

[criteria.Updateoptions.UpdateTimeOut]

+
+

If the location server does not provide location estimates within the +time specified in UpdateTimeOut (in microseconds), the +method returns the SErrTimedOut error.

+

The default value is 15000000 (= 15 seconds).

+
+

number

+
+

0 or a positive integer

+
+

[criteria.Updateoptions.UpdateMaxAge]

+
+

Specifies the expiry time for the location information cache (in microseconds). +When a location request is made, the location information is returned from +the cache (managed by the location server) as long as the cache is not older +than UpdateMaxAge.

+

The default value is 0, meaning that the location +information is never returned from the cache.

+
+

number

+
+

0 or a positive integer

+
+

[criteria.Updateoptions.PartialUpdates]

+
+

Specifies whether longitude, latitude, and altitude information is always +guaranteed.

+

Setting PartialUpdates to false ensures +that the user receives at least BasicLocationInformation (longitude, +latitude, and altitude).

+

Note: Altitude information is returned only if the positioning system supports +it. You can change the positioning system used by an S60 device from the Settings +> General > Positioning > Positioning methods menu.

+
+

If you set this property to true, there are no +guarantees on any specific information being returned, including longitude, +latitude, and altitude.

+

The default value is false.

+
+

boolean

+
+

Possible values:

+
    +
  • true

  • +
  • false

  • +
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-46BD4E18-092D-4CE2-90CF-91F10B2303B0.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-46BD4E18-092D-4CE2-90CF-91F10B2303B0.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,32 @@ + + +Using multiple CSS

Using multiple CSS

If the difference in screen size on the target devices is large (for example, 240 x 320 and 360 x 640), you can use separate CSS files to specify the user interface for each screen size. This also allows you take touch support into consideration. On touch devices, make buttons, text boxes, and other screen controls big enough for users to select them with fingers. On other devices, screen controls can be smaller, because users use the five way navigation pad to move between them.

+

Use JavaScript to determine which CSS file to select on a particular device.

+

For an example of using multiple CSS, see STEW: supporting different screen sizes.

+

To use multiple CSS

    +
  1. Create CSS files that specify styles for different screen sizes.

    For example, style.css to render views on 360 x 640 screens and style_small.css on 240 x 320 screens.

  2. +
  3. Add references to the style sheets to the main.html file.

    <link href="style.css" rel="stylesheet" type="text/css">
    +<link href="style_small.css" rel="stylesheet" type="text/css">
    +
  4. +
  5. Create JavaScript to select the style sheet according to screen size:

    // Set the correct stylesheet depending on whether we are running
    +// on bigger or smaller screens.
    +Helper.applyCorrectStyles();
    +
    applyCorrectStyles: function() {
    +	var largeScreen = Helper.isLargeScreen();
    +	
    +	document.styleSheets[0].disabled = !largeScreen;
    +	document.styleSheets[1].disabled = largeScreen;
    +}
    +
  6. +
  7. Create JavaScript to determine screen size:

    isLargeScreen: function() {
    +	var size = this.getScreenSize();
    +	return ( size.height > Helper.SMALL_SCREEN_TRESHOLD );
    +}
    +
    +Helper.SMALL_SCREEN_TRESHOLD = 320;
    +
  8. +
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-46DB749E-A388-46B2-BB13-A274385CA97C.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-46DB749E-A388-46B2-BB13-A274385CA97C.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,82 @@ + + +ISensor.FindSensorChannel()

ISensor.FindSensorChannel()

+

Description:

+

The FindSensorChannel method searches for sensor +channels available on the device.

+

This is a synchronous method.

+

Syntax:

+ +
result = so.ISensor.FindSensorChannel(criteria);
+

Arguments:

+
    +
  • criteria:

    + +

    This is an object that specifies the search criteria. For more information about the +object properties and how to define them, see section Criteria for searching sensor channels.

    + +
  • +
+

Return value:

+

The FindSensorChannel method returns an object +that contains the requested sensor channel information, an error code, and +an error message.

+
+ + + + + + + + + + + + + + + + + + + + +
Table: Return value +properties for FindSensorChannel
+

Property

+
+

Description

+
+

Value

+
+

result.ReturnValue

+
+

This is an iterator that contains information about +the sensor channels matching the search criteria.

+
+

See Sensor channel information.

+
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See Sensor Service API error messages.

+
+

Example code:

+

+

For the complete source of a sample widget +that demonstrates how to use this Service API, see the +full example.

+ + +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-46EABDC1-37CB-412A-ACAD-1A1A9466BB68.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-46EABDC1-37CB-412A-ACAD-1A1A9466BB68.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,128 @@ + + +Using +platform services

Using +platform services

+

The S60 platform allows widgets installed +on S60 mobile devices to:

+

+

+

+

The Service APIs are supported since WRT 1.1.

+ +

Using S60 Platform Services and Service +APIs

+

Widgets use the S60 Platform Services through JavaScript +Service APIs provided by the Web Runtime environment. Programming a +widget to access a service through its Service API involves two steps:

+
    +
  1. Create a service +object (an object for calling the Service API) using the getServiceObject() factory method provided by the device object. +This method uses a service provider name and an interface name to create the +appropriate service object:

    + +
    var so = device.getServiceObject(provider, interface);
    +

    Each Service API has a service provider name and supports one interface. +The service provider name identifies the Service API while the interface defines +a set of common methods for service objects.

    +

    For example, the service provider name for the Calendar +Service API is Service.Calendar and the supported +interface is IDataSource. To create a Calendar service +object, use the following code:

    +
    var so = device.getServiceObject("Service.Calendar", "IDataSource");
    + +
  2. +
  3. Use the service +object to call the Service API. The calls to the Service API are made through +the supported interface, since it provides the necessary methods.

    + +

    For example, the IDataSource interface defines +the GetList() method, which returns an object as its +return value. To make a GetList() call with the Calendar +service object created above, use the following code:

    +
    var result = so.IDataSource.GetList(criteria);
    + +
  4. +
+

The only exception to the above is the SystemInfo Service API of WRT +1.0, which is a scriptable plug-in. For instructions on using this API, see +section JavaScript SystemInfo Service API (WRT 1.0).

+
+

Arguments and return values

+

Service API methods use JavaScript objects as arguments and return +values. Argument objects can contain primitive types and other objects. Return +value objects can contain primitive types, objects, arrays, and iterators. +A primitive type is a string, number, or boolean. An object is a type of JavaScript object. +It is a collection of properties. An array is a type of object that stores +values that can be primitive types or objects. These values are accessed by +indexing. An iterator is an object used to traverse through an ordered list +of objects. The getNext() method +on the iterator returns the next object in the ordered list.

+ + +
+

Creating objects in JavaScript

+

In JavaScript, you can create an object in three ways.

+

new() with dot notation syntax:

+
// example 1
+var criteria = new Object();
+criteria.Type = 'FileInfo';
+// example 2 - nested object
+var filter = new Object();
+filter.FileType = 'Sound'
+var criteria = new Object();
+criteria.Filter = filter;
+
+

Object literal syntax:

+
var criteria = { 'Type': 'FileInfo', 'Filter': { 'FileType': 'Sound' } };
+

new() with array syntax:

+
// example 1
+var criteria = new Object();
+criteria ['Type'] = 'FileInfo';
+// example 2 - nested object
+var filter = new Object();
+filter['FileType'] = 'Sound'
+var criteria = new Object();
+criteria ['Filter'] = filter;
+
+
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-46FA9398-10C1-429F-B496-EC70E88F9CC7.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-46FA9398-10C1-429F-B496-EC70E88F9CC7.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,21 @@ + + +Retrieving data

Retrieving data

You can retrieve content either from the device or from Web sites. Make the content dynamic rather than static. To keep response times short and avoid cluttering the screen, display only content that users requested.

+

Fetching content from mobile devices

You can use the GetList methods in the JavaScript Service API reference to fetch content from mobile devices that support Web Runtime (WRT) 1.1. For more information about the content that you can fetch, see Using platform services.

You can combine content from the device with content from Web sites.

+

Fetching content from Web sites

You can use the following ways to fetch content from Web sites:

    +
  • HTTP requests

  • +
  • JavaScript Document Object Model (DOM)

  • +
  • Asynchronous JavaScript and XML (AJAX)

  • +

Allow network connections from widgets in the info.plist file. For more information see, Creating the info.plist file.

+

Using HTTP requests

You can use HTTP requests to retrieve data from Web services. You can use the HTTP GET or HTTP POST method to send parameters to Web services through the Representational State Transfer (REST) API. The services return results as a JavaScript Object Notation (JSON) object or XML text. Use the HTTP POST method to retrieve data from SOAP services.

For an example, see Retrieving STEW data.

Note: Set the

Expires response header of the HTTP server reply to minimize the network round-trips to the server. The header tells the application that the file can be cached locally for the specified duration, and is not fetched repeatedly from the server with each page load.
+

Using JavaScript DOM

Use JavaScript to manipulate content dynamically. The DOM functions include document.createElement() and elem.appendChild().

+

Using AJAX

AJAX is a technique that combines JavaScript (or any ECMAScript compatible language), XML (or other transport format), and an object called XMLHttpRequest that allows Web applications to send asynchronous calls to the server without refreshing the page. While the request is going to the server, the user can continue using the page for reading or selecting things.

AJAX uses the following:

    +
  • XHTML as markup language and CSS as styling information.

  • +
  • DOM accessed with a script language.

  • +
  • XMLHttpRequest object to communicate with the server asynchronously.

  • +
  • XML as the message format to transfer data.

  • +

Use AJAX to avoid refreshing pages and to load data faster. Only a portion of the page is transferred, which reduces traffic and communication time.

The mobile device keypad is difficult to type with and makes user input slow. Sites created using AJAX offer also the possibility to auto-fill input fields based on predictive text or previous user entries. For an example, see STEW: managing user interaction

Note: Be conservative with AJAX calls. Do not poll frequently or do not poll at all. Maybe only use AJAX on demand. Fetch all the data in a single AJAX call instead of performing many smaller calls. Use XML format and parse each piece of data from the reply with the standard DOM functions. Send straight XHTML to avoid excessive parsing in the browser.

For examples of using AJAX, see AccuWidget Example and Getting Started With Ajax - Overview and Examples.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-46FAFCDA-BCF3-41CB-B154-C17BBF7CD755.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-46FAFCDA-BCF3-41CB-B154-C17BBF7CD755.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,269 @@ + + +Sensor Service API error messages

Sensor Service API error messages

+

This section provides information about the error messages returned +by the Sensor Service API methods.

+

Generic error messages

+

The following table describes the error messages returned during the +loading of the service provider.

+
+ + + + + + + + + + + + + +
Table: Service provider +error messages
+

Error message

+
+

Description

+
+

Sensors:Requested interface not supported by the provider

+
+

The requested interface is not supported by the service provider.

+
+

Sensors:Interface name missing

+
+

The interface name is missing from the request.

+
+

The following table describes the error messages returned by asynchronous +method calls.

+
+ + + + + + + + + +
Table: Asynchronous +call error messages
+

Error message

+
+

Description

+
+

Sensors:Insufficent argument for asynchronous request

+
+

The callback method is missing.

+
+

FindSensorChannel

+

The following table describes the error messages returned by FindSensorChannel as part of its return value.

+
+ + + + + + + + + + + + + + + + + +
Table: FindSensorChannel +error messages
+

Error message

+
+

Description

+
+

Sensors:FindSensorChannel:Search Criterion Missing

+
+

The channel search criterion is missing from the input.

+
+

Sensors:FindSensorChannel:Invalid Search Criterion

+
+

The channel search criterion is invalid and does not fall within the +specified range of search criterion strings.

+
+

Sensors:FindSensorChannel:Channel search param type invalid

+
+

The type of the parameter passed for the channel search criterion is +invalid.

+
+

RegisterForNotification

+

The following table describes the error messages returned by callback for RegisterForNotification as +part of its return value.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: RegisterForNotification +error messages
+

Error message

+
+

Description

+
+

Sensors:RegisterForNotification:Listening type missing

+
+

The ListeningType property is missing from the +input.

+
+

Sensors:RegisterForNotification:Listening type is invalid

+
+

The ListeningType property contains a value with +an invalid type.

+
+

Sensors:RegisterForNotification:ChannelInfoMap missing

+
+

The ChannelInfoMap property is missing from the +input.

+
+

Sensors:RegisterForNotification:Incomplete input param list

+
+

The input parameter list is incomplete.

+
+

Sensors:RegisterForNotification:Listening type is out of allowed +range

+
+

The value of the ListeningType property falls outside +the allowed range of listening types.

+
+

Sensors:RegisterForNotification:Callback missing

+
+

The callback method is missing.

+
+

Sensors:RegisterForNotification:Notification is already registered +on this channel

+
+

The notification has already been registered by the same user on the +same channel.

+
+

Cancel

+

The following table describes the error messages returned by Cancel as part of its return value.

+
+ + + + + + + + + + + + + +
Table: Cancel error +messages
+

Error message

+
+

Description

+
+

Sensors:Cancel:Transaction ID missing

+
+

The TransactionID property is missing from the +input.

+
+

Sensors:Cancel:Incorrect TransactionID

+
+

The TransactionID property contains an invalid +transaction ID.

+
+

GetChannelProperty

+

The following table describes the error messages returned by GetChannelProperty as part of its return value.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Table: GetChannelProperty +error messages
+

Error message

+
+

Description

+
+

Sensors:GetChannelProperty:Property id missing

+
+

The PropertyId property is missing from the input.

+
+

Sensors:GetChannelProperty:Invalid property id

+
+

The PropertyId input property contains an invalid +value. The value does not fall within the allowed range of property ID strings.

+
+

Sensors:GetChannelProperty:ChannelInfoMap missing

+
+

The ChannelInfoMap property is missing from the +input.

+
+

Sensors:GetChannelProperty:Channel property not supported

+
+

The specified channel property is not supported and hence no value is +returned.

+
+

Sensors:GetChannelProperty:Incomplete input param list

+
+

The input param list is incomplete.

+
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-4718B87C-0FFF-48EC-A47F-5C9F8C2E2A51.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-4718B87C-0FFF-48EC-A47F-5C9F8C2E2A51.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,95 @@ + + +IDataSource.Add()

IDataSource.Add()

+

Description:

+

The Add method creates a new calendar on the device +or adds an entry to a calendar. In the latter case, if an entry with the same LocalId already +exists in the calendar, it is modified accordingly. You can thus use this +method to both add and update calendar entries. The entry is added to the +specified calendar or, if no calendar is specified, to the default one. If +the default calendar does not exist, it is created.

+

This is a synchronous method.

+

Syntax:

+
result = so.IDataSource.Add(criteria);
+ +

Arguments:

+ +

Return value:

+

The Add method returns an object that contains +an error code and an error message. In addition, if a calendar entry was added +or updated, the result object contains the id of that +entry.

+
+ + + + + + + + + + + + + + + + + + + + + +
Table: Return value +properties for Add
+

Property

+
+

Description

+
+

Value

+
+

[result.ReturnValue]

+
+

This is a text string that contains the id of the +entry that was added or updated.

+

If a new calendar was created, this property is not included in the +result object.

+
 
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See Calendar Service API error messages.

+
+

Remarks:

+
    +
  • If an entry is added or updated to a calendar other than +the default one, the corresponding calendar file must exist on the device.

    +
  • +
  • For detailed information about calendar entries, see section Calendar entries.

  • +
+

Example code:

+

+

For the complete source of a sample widget +that demonstrates how to use this Service API, see the full example.

+ + +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-474623C2-0C81-445A-802B-77FA1C8C6C54.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-474623C2-0C81-445A-802B-77FA1C8C6C54.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,440 @@ + + +Criteria for +retrieving media information

Criteria for +retrieving media information

+

The criteria object specifies what media +information is returned and how the returned information is sorted.

+

The criteria object has three main properties: Type, Filter, +and Sort. These are described in the following table. +Properties enclosed in brackets are optional.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Criteria object properties
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

criteria.Type

+
+

Specifies the type of media objects to retrieve.

+
+

string

+
+

Possible values:

+
    +
  • "FileInfo"

  • +
+
+

criteria.Filter

+
+

Specifies how the information to be retrieved is filtered.

+
+

object

+
+

Object with the properties specified below

+
+

criteria.Filter.FileType

+
+

Specifies the type of media files about which to retrieve information.

+
+

string

+
+

Possible values:

+
    +
  • "Music"

  • +
  • "Sound"

  • +
  • "Image"

  • +
  • "Video"

  • +
  • "StreamingURL"

  • +
+
+

[criteria.Filter.Key]

+
+

This property is used together with Filter.StartRange and +optionally Filter.EndRange to specify a further filter +criterion based on a media file property ("key"). If you specify this property, +you must also specify Filter.StartRange.

+

Note: If this property is not specified, then all files of Filter.FileType are +fetched.

+
+

For more information about keys, see Table: +Keys for filtering and sorting.

+
+

string

+
+

Possible values:

+
    +
  • "FileName"

  • +
  • "FileExtension"

  • +
  • "Drive"

  • +
  • "FileSize"

  • +
  • "FileDate"

  • +
  • "MimeType"

  • +
  • "FileNameAndPath"

  • +
  • "SongName"

  • +
  • "Artist"

  • +
  • "Album"

  • +
  • "Genre"

  • +
  • "TrackNumber"

  • +
  • "Composer"

  • +
  • "LinkFirstURL"

  • +
+
+

[criteria.Filter.StartRange]

+
+

Specifies the starting range and is valid for all key types.

+

For example, if you set Filter.Key to "FileName", +specify the file name in this property and leave Filter.EndRange unspecified.

+

This property is mandatory only if you specify Filter.Key.

+
+

string

+
+

Depends on Filter.Key

+
+

[criteria.Filter.EndRange]

+
+

Specifies the end range and is valid for the following keys:

+
    +
  • FileSize

  • +
  • FileDate

  • +
+
+

string

+
+

Depends on Filter.Key

+
+

[criteria.Sort]

+
+

Specifies how the returned list of information is sorted.

+
+

object

+
+

Object with the properties specified below

+
+

[criteria.Sort.Key]

+
+

Specifies the key to sort by.

+

For more information about keys, see Table: +Keys for filtering and sorting.

+
+

string

+
+

Possible values:

+
    +
  • "FileName"

  • +
  • "FileExtension"

  • +
  • "Drive"

  • +
  • "FileSize"

  • +
  • "FileDate"

  • +
  • "MimeType"

  • +
  • "FileNameAndPath"

  • +
  • "SongName"

  • +
  • "Artist"

  • +
  • "Album"

  • +
  • "Genre"

  • +
  • "TrackNumber"

  • +
  • "Composer"

  • +
  • "LinkFirstURL"

  • +
+
+

[criteria.Sort.Order]

+
+

Specifies the sort order.

+

Note: By default, sorting is done in ascending order based on file name.

+
+
+

string

+
+

Possible values:

+
    +
  • "Ascending"

  • +
  • "Descending"

  • +
+
+

The following table describes the possible values for Filter.StartRange and Filter.EndRange depending +on the selected key.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Keys for filtering +and sorting
+

Key

+
+

Description

+
+

Value

+
+

Type

+
+

FileName

+
+

Filter/sort the result by file name.

+
+

Full file name

+
+

string

+
+

FileExtension

+
+

Filter/sort the result by file extension.

+
+

"." + file extension

+
+

string

+
+

Drive

+
+

Filter/sort the result by file drive.

+
+

Drive letter + ":"

+
+

string

+
+

FileSize

+
+

Filter/sort the result by file size.

+
+

File size in bytes

+

Note: Start range and end range are needed.

+
+
+

string

+
+

FileDate

+
+

Filter/sort the result by file date.

+
+

File date as YYYYMMDD:HHMMSS

+

Note: Start range and end range are needed.

+
+
+

string

+
+

FileNameAndPath

+
+

Filter/sort the result by full path and file name.

+
+

Full path including file name

+
+

string

+
+

SongName

+
+

Filter/sort the result by song name.

+
+

Full song name

+
+

string

+
+

Artist

+
+

Filter/sort the result by artist name.

+
+

Full artist name

+
+

string

+
+

Album

+
+

Filter/sort the result by album name.

+
+

Full album name

+
+

string

+
+

Genre

+
+

Filter/sort the result by genre.

+
+

Full genre name

+
+

string

+
+

TrackNumber

+
+

Filter/sort the result by track number.

+
+

Full track number

+
+

string

+
+

Composer

+
+

Filter/sort the result by composer.

+
+

Full composer name

+
+

string

+
+

LinkFirstURL

+
+

Filter/sort the result by URL.

+
+

Full URL of the streaming media file

+
+

string

+
+

MimeType

+
+

Filter/sort the result by MIME type.

+
+

MIME type

+

For example: image/jpg

+
+

string

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-48122EAF-E5D8-46CE-B0F6-E93EDF5FD363.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-48122EAF-E5D8-46CE-B0F6-E93EDF5FD363.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,19 @@ + + +What you need to know

What you need to know

+

This library assumes a good knowledge of the following technologies:

+
    +
  • HTML 4.01

  • +
  • XHTML 1.0

  • +
  • CSS 2.1

  • +
  • JavaScript 1.5 (ECMA-262 3rd Edition)

  • +
  • AJAX

  • +
  • Document object model (DOM)

  • +
+

The subsections below provide additional information that you should know when starting to develop widgets for mobile devices. The information relevant to you varies depending on your background as a developer.

+

Web developers

The widgets discussed in this library are installed on a compatible mobile device and hosted by the Web Runtime (WRT) environment. The WRT environment is based on the WebKit browser engine. Developing widgets for a mobile device is in many ways similar to developing Web pages or widgets for desktop browsers, as widgets and the WRT environment use the same standards and technologies. This means that widgets may be quick to develop and distribute, for example, on your already existing Web site.

When developing widgets, you must take the nature of the mobile device environment into consideration. For more information on how to design usable widgets for mobile devices, see Designing widgets .

The WRT environment supports a slightly different set of Web technologies when compared with the desktop environment: there are limitations but also extensions. For more information, see Web Runtime features.

If you have already developed widgets for desktop browsers, it is possible for you to port them to the mobile device environment. For more information on porting, see section Porting widgets.

+

Java and Symbian C++ developers

The widgets discussed in this library are installed on a compatible mobile device and hosted by the Web Runtime (WRT) environment. Developing widgets is another way of installing an application on an S60 mobile device. However, widgets utilize commonly used Web technologies instead of being based on Symbian C++ or Java.

For information on widget security, see Widget security.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-4A2480A8-4D79-4F5D-9614-74A8934B8952.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-4A2480A8-4D79-4F5D-9614-74A8934B8952.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,82 @@ + + +IAppManager.GetList()

IAppManager.GetList()

+

Description:

+

The GetList method retrieves an iterable list of +either user-installed applications or all applications on the mobile device, +regardless of whether they were preinstalled or installed by the user.

+

This is a synchronous method.

+

Syntax:

+
result = so.IAppManager.GetList(criteria);
+ +

Arguments:

+ +

Return value:

+

The GetList method returns an object that contains +the requested application information, an error code, and an error message

+
+ + + + + + + + + + + + + + + + + + + + +
Table: Return value +properties for GetList
+

Property

+
+

Description

+
+

Value

+
+

result.ReturnValue

+
+

This is an iterator that contains the requested application information.

+
+

See Returned application information.

+
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See AppManager Service API error messages.

+
+

Example code:

+

+

For the complete source of a sample widget +that demonstrates how to use this Service API, see the +full example.

+ + +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-4AB052A7-D87A-48C4-AFD0-4D617B321B90_d0e13020_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-4AB052A7-D87A-48C4-AFD0-4D617B321B90_d0e13020_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-4AE77C0F-577E-4DC7-BC90-40A75C873404.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-4AE77C0F-577E-4DC7-BC90-40A75C873404.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,30 @@ + + +prepareForTransition()

prepareForTransition()

+

Description:

+

The widget's view is composed by HTML elements such as text display area, buttons, edit fields, and so on. The appearance of these HTML elements can be dynamically changed. For example, they can be shown or hidden dynamically using the HTML DOM style object to set the display property to "block" or "none" respectively. For instance:

+

To show an element, call [object].style.display = "block"

+

To hide an element, call [object].style.display = "none"

+

The purpose of the prepareForTransition method is to prepare a widget for a transition state before modifying the widget view by disabling updates to the widget UI. Thus, when modifying a widget view where the appearance of many HTML elements will be changed, prepareForTransition will help to prevent the widget UI from being updated at once and one by one, which could potentially cause screen flickering.

+

Syntax:

+
[void] widget.prepareForTransition(String transitionMode) 
+

or

+
[void] window.widget.prepareForTransition(String transitionMode)
+

Arguments:

+
    +
  • transitionMode:

    + +

    A text string defining a desired transition mode. Currently the only supported transition mode is "fade", which causes the widget's view changing in fading mode.

    + +
  • +
+

Return value:

+

This method does not return a value.

+

Remarks:

+

This method is to be used together with the performTransition method. A widget's screen is not updated until the performTransition method is called.

+

Example code:

+

See the performTransition example code.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-4B7957CA-D6B8-4F8A-8E15-A610D1534D6B.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-4B7957CA-D6B8-4F8A-8E15-A610D1534D6B.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,16 @@ + + +Setting the widget background

Setting the widget background

You can set an image as the widget background in a Cascading Style Sheet (CSS) file that you refer to from the widget HTML file.

+

For example, the following code adds an image called background.png as the widget background. The image is stored in the gfx folder in the widget project folder.

+
html {
+    height: 100%;
+    background: rgb(190, 220, 255) url(../gfx/background.png) no-repeat scroll 0% 0%;
+    font-size: 1em;
+}
+
+

Figure: Widget background file

+

Figure: Widget with the background

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-4BDA5932-90A7-4569-ADA7-27E090D2F447_d0e1195_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-4BDA5932-90A7-4569-ADA7-27E090D2F447_d0e1195_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-4BE0F634-6995-4738-A650-5D3CCBC26647.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-4BE0F634-6995-4738-A650-5D3CCBC26647.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,12 @@ + + +Integrating widgets with devices

Integrating widgets with devices

You deliver widgets to users for deployment on S60 mobile devices in several ways. The most suitable method depends on your business plans. If you distribute widgets on your Web site, users can either download the widget directly to mobile devices or first download them to a PC and then install them on mobile devices.

+ +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-4C79E511-1C1A-475D-BBBB-4F1F6D406340.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-4C79E511-1C1A-475D-BBBB-4F1F6D406340.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,787 @@ + + +System +data types

System +data types

+

System data types determine what kind of values system attributes are +associated with. In JavaScript terms, the specified data type +determines the SystemData (input) and ReturnValue (output) +object properties that represent the value of a system attribute. Depending +on the system data type, there can be one or more properties. Depending on +the system attribute, the data type used for method input may differ from +the data type used for method output.

+

+

The SystemInfo +Service API supports the following system data types:

+ +

The following tables describes the supported system data types. To find +out which system attribute uses which system data type, and whether the same +data type is used for both input and output, see section Supported system attributes (entities and keys).

+
+ + + + + + + + + + + +
Table: Status
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

Status

+
+

Specifies status information about the system attribute.

+
+

number

+
+

For example:

+
    +
  • Battery strength (%): 1 - 100

    +
  • +
  • Network mode: 0 - 2

  • +
+
+ + + + + + + + + + + +
Table: StringData
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

StringData

+
+

Specifies information about the system attribute in text string format.

+

This can be used to indicate wallpaper path, IMEI number, phone model, +manufacturer, and so forth.

+
+

string

+
+

For example:

+
    +
  • Phone model: "N70"

  • +
  • Manufacturer: "Nokia"

  • +
  • Wallpaper path: "C://Data//Others//wallpaper.jpeg"

    +
  • +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: NetworkInfo
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

NetworkName

+
+

Specifies the name of the network connection of the device.

+
+

string

+
 
+

NetworkStatus

+
+

Specifies the status of the network.

+
+

number

+
+

Possible values:

+
    +
  • -1 - Unknown

  • +
  • 0 - Available: Specifies the network +ME can register

  • +
  • 1 - Current: Specifies the currently +registered network

  • +
  • 2 - Forbidden: Specifies that the network +ME is not allowed registering

  • +
+
+

NetworkMode

+
+

Specifies the network technology used by the network.

+
+

number

+
+

Possible values:

+
    +
  • -1 - Unknown

  • +
  • 0 - Unregistered

  • +
  • 1 - Global System for Mobile Communications +(GSM)

  • +
  • 2 - Advanced Mobile Phone System (AMPS)

    +
  • +
  • 3 - Code Division Multiple Access (CDMA95)

    +
  • +
  • 4 - Code Division Multiple Access (CDMA2000)

    +
  • +
  • 5 - Wideband Code Division Multiple +Access (WCDMA)

  • +
  • 6 - Time Division, Code Division Multiple +Access (TDCDMA)

  • +
+
+

CountryCode

+
+

Specifies the Mobile Country Code (MCC).

+
+

string

+
 
+

NetworkCode

+
+

Specifies the Mobile Network Code (MNC).

+
+

string

+
 
+

LocationStatus

+
+

Specifies whether the location area information is valid or not.

+
+

boolean

+
+

Possible values:

+
    +
  • true - Location Area Code (LAC) and +cell ID are valid

  • +
  • false - Location Area Code (LAC) and +cell ID are invalid

  • +
+
+

AreaCode

+
+

Specifies Location Area Code (LAC).

+
+

number

+
 
+

CellId

+
+

Specifies the cell ID.

+
+

number

+
 
+ + + + + + + + + + + +
Table: ConnectionList
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

ConnectionList

+
+

Specifies a list of available active data connections.

+

ConnectionInfo specifies +a data connection.

+
+

iterator

+
+

List of ConnectionInfo objects

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: ConnectionInfo
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

ConnectionStatus

+
+

Specifies the status of the data connection.

+
+

number

+
+

Possible values:

+
    +
  • 0 - Disconnected

  • +
  • 1 - Connected

  • +
+
+

IAPID

+
+

Specifies the access point ID for the data connection.

+
+

number

+
 
+

ConnectionType

+
+

Specifies the type of the data connection.

+
+

number

+
+

Possible values:

+

Note: Unsupported connection types are enclosed in brackets.

+
+
    +
  • -1 - Unknown

  • +
  • 0 - (Circuit Switched Data (CSD))

    +
  • +
  • 1 - (Wideband Code Division Multiple +Access (WCDMA))

  • +
  • 2 - Local Area Network (LAN) [Emulator]

    +
  • +
  • 3 - (Code Division Multiple Access (CDMA2000))

    +
  • +
  • 4 - (General Packet Radio Service (GPRS))

    +
  • +
  • 5 - (High Speed Circuit Switched Data +(HSCSD))

  • +
  • 6 - Enhanced Data rates for Global Evolution +(EDGE), Enhanced GPRS (EGPRS)

  • +
  • 7 - Wireless Local Area Network (WLAN)

    +
  • +
  • 8 - (Bluetooth)

  • +
  • 9 - (Virtual VPN)

  • +
+
+

IAPName

+
+

Specifies the access point name.

+
+

string

+
+

For example: "www.airtelgprs.com"

+
+

NetworkName

+
+

Specifies the network name applicable for WLAN networks.

+
+

string

+
 
+

IAPConnectionName

+
+

Specifies the access point connection name.

+
+

string

+
+

For example: "MobileOffice", "MyGprs"

+
+ + + + + + + + + + + +
Table: AccessoryList
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

AccessoryList

+
+

Specifies a list of connected accessories.

+

AccessoryInfo specifies +an accessory.

+
+

iterator

+
+

List of AccessoryInfo objects

+
+ + + + + + + + + + + + + + + + + +
Table: AccessoryInfo
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

AccessoryType

+
+

Specifies the type of the accessory.

+
+

number

+
+

Possible values:

+
    +
  • -1 - Unknown

  • +
  • 0 - HeadSet

  • +
  • 1 - BTHeadSet

  • +
  • 2 - CarKit

  • +
  • 3 - BTCarKit

  • +
+
+

AccessoryState

+
+

Specifies the connection state of the accessory.

+
+

number

+
+

Possible values:

+
    +
  • -1 - Unknown

  • +
  • 0 - Disconnected

  • +
  • 1 - Connected

  • +
+
+ + + + + + + + + + + +
Table: LanguageList
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

LanguageList

+
+

Specifies a list of supported language enumerations as defined in the +S60 device.

+
+

array of numbers

+
 
+ + + + + + + + + + + + + + + + + +
Table: Version
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

MajorVersion

+
+

Specifies the major version number of the software in the device.

+
+

string

+
+

For example:

+
    +
  • S60 3rd Edition, Feature Pack 2 ("3.2"): 3

    +
  • +
+
+

MinorVersion

+
+

Specifies the minor version number of the software in the device.

+
+

strings

+
+

For example:

+
    +
  • S60 3rd Edition, Feature Pack 2 ("3.2"): 2

    +
  • +
+
+ + + + + + + + + + + +
Table: DriveList
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

DriveList

+
+

Specifies a list of drives in the device.

+

DriveInfo specifies +information about a drive.

+
+

array of strings

+
+

For example:

+
    +
  • DriveList[0]: "C:\\"

    +
  • +
  • DriveList[1]: "D:\\"

    +
  • +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: DriveInfo
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

Drive

+
+

Specifies the drive.

+
+

string

+
+

For example: "C:\\"

+
+

TotalSpace

+
+

Specifies the total memory space in bytes.

+
+

string

+
 
+

FreeSpace

+
+

Specifies the available free memory space in bytes.

+
+

string

+
 
+

CriticalSpace

+
+

Specifies the critical free memory space in bytes.

+
+

number

+
 
+

MediaType

+
+

Specifies the media type of the drive.

+
+

number

+
+

Possible values:

+
    +
  • 0 - MediaNotPresent

  • +
  • 1 - MediaUnknown

  • +
  • 2 - MediaFloppyDisk

  • +
  • 3 - MediaHardDisk

  • +
  • 4 - MediaCdRom

  • +
  • 5 - MediaRam

  • +
  • 6 - MediaFlash

  • +
  • 7 - MediaRom

  • +
  • 8 - MediaRemote

  • +
  • 9 - MediaNANDFlash

  • +
  • 10 - MediaRotatingMedia

  • +
+
+

BatteryState

+
+

Specifies the state of the drive's own battery unit, if any.

+
+

number

+
+

Possible values:

+
    +
  • 0 - BatNotSupported

  • +
  • 1 - BatGood

  • +
  • 2 - BatLow

  • +
+
+

DriveName

+
+

Specifies the drive name.

+
+

string

+
 
+ + + + + + + + + + + + + + + + + +
Table: Resolution
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

XPixels

+
+

Specifies the screen resolution of x-pixels.

+
+

number

+
 
+

YPixels

+
+

Specifies the screen resolution of y-pixels.

+
+

number

+
 
+ + + + + + + + + + + +
Table: StringList
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

StringList

+
+

Specifies a list of the available USB modes.

+
+

array of strings

+
 
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-4CD10DEB-6C79-4320-AC82-F17DD264CF28.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-4CD10DEB-6C79-4320-AC82-F17DD264CF28.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,17 @@ + + +Localizing widget display name

Localizing widget display name

+

The widget display name is a text string defined in the widget info.plist file and specified by the <DisplayName> key.

+

To localize the display name of a widget:

+
    +
  1. Define a localized display name in a file called infoplist.strings.

  2. +
  3. Store the file under the appropriate language project directory.

  4. +
+

The following is an example display name definition in an infoplist.strings file:

+
DisplayName = "Localized name"
+

When a widget is being installed, the installer searches for the infoplist.strings file under a language project directory that matches with the current device system language. If the installer finds the infoplist.strings file and a localized name is provided, the localized name overrides the display name defined in the widget info.plist file.

+

Note: The display name is loaded only once, when a widget is being installed. If users change the system language later, the display name is not changed.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-4D13AF3F-4733-44E7-996F-F27A11C9D6BF_cover.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-4D13AF3F-4733-44E7-996F-F27A11C9D6BF_cover.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,63 @@ + + +Web Developer's Library 1.4

Web Developer's Library 1.4

Welcome to the Web Developer's Library. This library is intended for Web developers creating widgets for S60 mobile devices that support Web Runtime (WRT) version 1.0 or 1.1.

+

Widgets are lightweight applications that are based on standard Web technologies and are typically used to access information on the Web. Widgets run in the WRT environment, which is supported by S60 3rd Edition, Feature Pack 2 and S60 5th Edition. On some S60 5th Edition devices, such as the Nokia N97, users can add widgets to the home screen.

+

You can access the latest version of Web Developer's Library from Forum Nokia.

+

How to get started?

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
What you want to doWhere to start
I want to learn about widgets and the WRT environmentIntroduction to S60 Web Runtime environment
I want to know which mobile devices can run widgetsWeb Runtime versions and device support
I want to learn about designing usable widgetsDesigning widgets
I want to learn about developing widgetsDeveloping widgets
I want to develop widgets that users can add to the home screenDeveloping home screen widgets
I want to develop widgets that use S60 Platform ServicesUsing platform services
I have an existing widget from a desktop environment and I want to port it to the WRT environmentPorting widgets
I want to go directly to the WRT API informationWeb Runtime API reference
I have created a widget and want to test how it worksTesting your widget
I want to see what is available in this libraryLibrary contents
I want to see what is new in this version of the libraryChange history
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-4D4E5B3E-ABC4-43CA-A7E8-027C46BD1FE6.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-4D4E5B3E-ABC4-43CA-A7E8-027C46BD1FE6.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,91 @@ + + +IDataSource.Import()

IDataSource.Import()

+

Description:

+

The Import method imports a set of landmarks to +a landmark database.

+

This is a synchronous method.

+

Syntax:

+ +
result = so.IDataSource.Import(criteria);
+

Arguments:

+
    +
  • criteria:

    + +

    This is an object that specifies the set of landmarks to import and +optionally the target database. For more information about the object properties +and how to define them, see section Criteria for importing landmarks.

    + +
  • +
+

Return value:

+

The Import method returns an object that contains +the imported landmarks, an error code, and an error message.

+
+ + + + + + + + + + + + + + + + + + + + +
Table: Return value +properties for Import
+

Property

+
+

Description

+
+

Value

+
+

result.ReturnValue

+
+

This is an iterator that contains the imported landmarks. Each object +in the iterator is a landmark +object, which contains the information for a single landmark.

+
 
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See Landmarks Service API error messages.

+
+

Remarks:

+
    +
  • If no landmark database is specified, Import is +performed on the default database. If the default database does not exist, +it is created and set active. The default database is file://c:eposlm.ldb.

    +
  • +
  • For more information about landmarks, landmark categories, +and landmark databases, see the Landmarks +Service overview page.

  • +
+

Example code:

+

+

For the complete source of a sample widget +that demonstrates how to use this Service API, see the +full example.

+ + +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-4DDE31C7-EC0D-4EEC-BC3A-A0B0351154F8.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-4DDE31C7-EC0D-4EEC-BC3A-A0B0351154F8.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,84 @@ + + +Accessing +device location information

Accessing +device location information

+

The Location +Service API allows widgets to retrieve information about +the physical location of a device and to perform calculations based on location +information. You can use the Location Service to create widgets that +provide location-based services (LBS). For example, you can create widgets that:

+
    +
  • Provide directions to a destination, for example the nearest +restaurant

  • +
  • Monitor the locations of snow-plowing vehicles

  • +
  • Calculate distances between geographical locations

    +
  • +
+

The Location Service relies on the GPS capabilities of the device to +provide location information. If the device does not include or is not connected +to a positioning system, the service cannot provide such information.

+

Accessing the API and supported methods

+

To create a service +object for the Location Service API, use Service.Location to +identify the service provider and ILocation to identify +the supported interface:

+ +
var so = device.getServiceObject("Service.Location", "ILocation");
+

The ILocation interface provides the following +methods:

+
    +
  • GetLocation()

    + +

    Use the GetLocation() method to retrieve the current +location of the device.

    + +
  • +
  • Trace()

    + +

    Use the Trace() method to retrieve periodic updates +about the current location of the device.

    + +
  • +
  • Calculate()

    + +

    Use the Calculate() method to perform mathematical +calculations based on a source location and a target location.

    + +
  • +
  • CancelNotification()

    + +

    Use the CancelNotification() method to cancel an +ongoing asynchronous call. This method is valid for any asynchronous call +made through the Location Service API.

    + +
  • +
+
+

Using the service in a widget

+

To access location information using the Location Service API:

+
    +
  1. Create a service +object for the API using device.getServiceObject().

    +
  2. +
  3. Define the +tasks you want to perform and choose the correct methods for them.

    +
  4. +
  5. Optionally, +define how you want the results filtered.

  6. +
  7. Define methods +for processing the results.

  8. +
  9. Retrieve the +location information using the methods defined in step 2. Use asynchronous +methods together with callback().

    +
  10. +
  11. Process the +results with the methods defined in step 4.

  12. +
+

For the complete source of a sample widget that demonstrates how to +use this service, see the full example.

+
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-4EBD83E1-B179-4F8B-93AB-4D58C5F749C3.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-4EBD83E1-B179-4F8B-93AB-4D58C5F749C3.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,69 @@ + + +IDataSource.Cancel()

IDataSource.Cancel()

+

Description:

+

The Cancel method cancels an outstanding asynchronous +call.

+

This is a synchronous method.

+

Syntax:

+
result = so.IDataSource.Cancel(criteria);
+

Arguments:

+
    +
  • criteria:

    + +

    This is an object with the TransactionID property +(number). criteria.TransactionID specifies the transaction +ID of the GetList call +to cancel. The transaction ID is the result.TransactionID value +that was returned as part of the result of the GetList call.

    + +
  • +
+

Return value:

+

The Cancel method returns an object that contains +an error code and an error message.

+
+ + + + + + + + + + + + + + + + +
Table: Return value +properties for Cancel
+

Property

+
+

Description

+
+

Value

+
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See Media Management Service API error messages.

+
+

Example code:

+

+

For the complete source of a sample widget that demonstrates how to +use this Service API, see the full example.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-4ECCCBED-DE6D-4366-B037-90E874C4DF5C.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-4ECCCBED-DE6D-4366-B037-90E874C4DF5C.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,639 @@ + + +Landmarks Service API error messages

Landmarks Service API error messages

+

This section provides information about the error messages returned +by the Landmarks Service API methods.

+

Generic error messages

+

The following table describes the error messages returned during the +loading of the service provider.

+
+ + + + + + + + + + + + + + + + + +
Table: Service provider +error messages
+

Error message

+
+

Description

+
+

Landmarks: Interface name is missing

+
+

The interface name is missing from the request.

+
+

Landmarks: Service Command is invalid

+
+

The command passed is not supported by the interface.

+
+

Landmarks: Database URI is invalid

+
+

The database URI passed when loading the interface is invalid.

+
+

The following table describes the error messages returned by asynchronous +method calls.

+
+ + + + + + + + + + + + + +
Table: Asynchronous +call error messages
+

Error message

+
+

Description

+
+

Landmarks: Insufficient arguments for asynchronous request

+
+

The callback method is missing.

+
+

Landmarks: Asynchronous behavior not supported

+
+

The method does not support asynchronous calls.

+
+

New

+

The following table describes the error messages returned by New as part of its return value.

+
+ + + + + + + + + + + + + +
Table: New error messages
+

Error message

+
+

Description

+
+

Landmarks: New: Type is missing

+
+

The Type property is missing from the input or +it contains a value with an invalid type.

+
+

Landmarks: New: Type is invalid Type

+
+

The Type property contains an invalid value.

+
+

GetList

+

The following table describes the error messages returned by GetList and callback for GetList as +part of their return value.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: GetList error +messages
+

Error message

+
+

Description

+
+

Landmarks: GetList: Type is missing

+
+

The Type property is missing from the input or +it contains a value with an invalid type.

+
+

Landmarks: GetList: Type is invalid

+
+

The Type property contains an invalid value.

+
+

Landmarks: GetList: Filter is missing

+
+

The Filter property is missing from the input or +it contains a value with an invalid type.

+
+

Landmarks: GetList: LandmarkPosition is missing

+
+

The Filter.LandmarkPosition property is missing +from the input or it contains a value with an invalid type.

+
+

Landmarks: GetList: Latitude is missing

+
+

The Filter.LandmarkPosition.Latitude property is +missing from the input or it contains a value with an invalid type.

+
+

Landmarks: GetList: Longitude is missing

+
+

The Filter.LandmarkPosition.Longitude property +is missing from the input or it contains a value with an invalid type.

+
+

Landmarks: GetList: BoundedArea is missing

+
+

The Filter.BoundedArea property is missing from +the input or it contains a value with an invalid type.

+
+

Landmarks: GetList: NorthLatitude is missing

+
+

The Filter.BoundedArea.NorthLatitude property is +missing from the input or it contains a value with an invalid type.

+
+

Landmarks: GetList: SouthLatitude is missing

+
+

The Filter.BoundedArea.SouthLatitude property is +missing from the input or it contains a value with an invalid type.

+
+

Landmarks: GetList: EastLongitude is missing

+
+

The Filter.BoundedArea.EastLongitude property is +missing from the input or it contains a value with an invalid type.

+
+

Landmarks: GetList: WestLongitude is missing

+
+

The Filter.BoundedArea.WestLongitude property is +missing from the input or it contains a value with an invalid type.

+
+

Landmarks: GetList: MaximumMatches is invalid

+
+

The Filter.MaximumMatches property is missing from +the input or it contains a value with an invalid type.

+
+

Landmarks: GetList: Sort is missing

+
+

The Sort property is missing from the input or +it contains a value with an invalid type.

+
+

Add

+

The following table describes the error messages returned by Add as part of its return value.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Add error messages
+

Error message

+
+

Description

+
+

Landmarks: Add: Type or Data is missing

+
+

The Type or Data property +is missing from the input.

+
+

Landmarks: Add: Type is invalid

+
+

The Type property contains an invalid value.

+
+

Landmarks: Add: Data is missing

+
+

The Data property is missing from the input or +it contains a value with an invalid type.

+
+

Landmarks: Add: LandmarkPosition is missing

+
+

The Data.LandmarkPosition property is missing from +the input or it contains a value with an invalid type.

+
+

Landmarks: Add: CategoryInfo is missing

+
+

The Data.CategoryInfo property is missing from +the input or it contains a value with an invalid type.

+
+

Landmarks: Add: IconIndex is missing

+
+

The Data.IconIndex property is missing from the +input or it contains a value with an invalid type.

+
+

Landmarks: Add: LandmarkFields is missing

+
+

The Data.LandmarkFields property is missing from +the input or it contains a value with an invalid type.

+
+

Landmarks: Add: CategoryName is missing

+
+

The Data.CategoryName property is missing from +the input or it contains a value with an invalid type.

+
+

Landmarks: Add: DatabaseURI is missing

+
+

The Data.DatabaseURI property is missing from the +input or it contains a value with an invalid type.

+
+

Delete

+

The following table describes the error messages returned by Delete as part of its return value.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Delete error +messages
+

Error message

+
+

Description

+
+

Landmarks: Delete: Type or Data is missing

+
+

The Type or Data property +is missing from the input.

+
+

Landmarks: Delete: Type is invalid

+
+

The Type property contains an invalid value.

+
+

Landmarks: Delete: Data is missing

+
+

The Data property is missing from the input or +it contains a value with an invalid type.

+
+

Landmarks: Delete: Id is missing

+
+

The Data.id property is missing from the input +or it contains a value with an invalid type.

+
+

Landmarks: Delete: DatabaseURI is missing

+
+

The Data.DatabaseURI property is missing from the +input or it contains a value with an invalid type.

+
+

Import

+

The following table describes the error messages returned by Import as part of its return value.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Import error +messages
+

Error message

+
+

Description

+
+

Landmarks: Import: Type or Data is missing

+
+

The Type or Data property +is missing from the input.

+
+

Landmarks: Import: Type is invalid

+
+

The Type property contains an invalid value.

+
+

Landmarks: Import: Data is missing

+
+

The Data property is missing from the input or +it contains a value with an invalid type.

+
+

Landmarks: Import: MimeType is missing

+
+

The Data.MimeType property is missing from the +input or it contains a value with an invalid type.

+
+

Landmarks: Import: SourceFile is missing

+
+

The Data.SourceFile property is missing from the +input or it contains a value with an invalid type.

+
+

Export

+

The following table describes the error messages returned by Export as part of its return value.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Export error +messages
+

Error message

+
+

Description

+
+

Landmarks: Export: Type or data is missing

+
+

The Type or Data property +is missing from the input.

+
+

Landmarks: Export: Type is invalid

+
+

The Type property contains an invalid value.

+
+

Landmarks: Export: Data is missing

+
+

The Data property is missing from the input or +it contains a value with an invalid type.

+
+

Landmarks: Export: MimeType is missing

+
+

The Data.MimeType property is missing from the +input or it contains a value with an invalid type.

+
+

Landmarks: Export: DestinationFile is missing

+
+

The Data.DestinationFile property is missing from +the input or it contains a value with an invalid type.

+
+

Landmarks: Export: IdList is missing

+
+

The Data.IdList property is missing from the input +or it contains a value with an invalid type.

+
+

Landmarks: Export: IdList is empty

+
+

The Data.IdList property contains no IDs.

+
+

Organise

+

The following table describes the error messages returned by Organise as part of its return value.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Organise error +messages
+

Error message

+
+

Description

+
+

Landmarks: Organise: Type or Data or OperationType is missing

+
+

The Type, Data, or OperationType property +is missing from the input.

+
+

Landmarks: Organise: Type is invalid

+
+

The Type property contains an invalid value.

+
+

Landmarks: Organise: Data is missing

+
+

The Data property is missing from the input or +it contains a value with an invalid type.

+
+

Landmarks: Organise: Id is missing

+
+

The Data.id property is missing from the input +or it contains a value with an invalid type.

+
+

Landmarks: Organise: IdList is missing

+
+

The Data.IdList property is missing from the input +or it contains a value with an invalid type.

+
+

Landmarks: Organise: IdList is empty

+
+

The Data.IdList property contains no IDs.

+
+

Landmarks: Organise: OperationType is missing

+
+

The OperationType property is missing from the +input or it contains a value with an invalid type.

+
+

Landmarks: Organise: OperationType is invalid

+
+

The OperationType property contains an invalid +value.

+
+

Cancel

+

The following table describes the error messages returned by Cancel as part of its return value.

+
+ + + + + + + + + + + + + +
Table: Cancel error +messages
+

Error message

+
+

Description

+
+

Landmarks: Cancel: TranscationId is invalid

+
+

The TransactionID property contains an invalid +value or an asynchronous call associated with this ID has already been completed.

+
+

Landmarks: Cancel: TranscationId is missing

+
+

The TransactionID property is missing from the +input.

+
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-4F4EE10B-BC2C-4046-ADDB-AD4B67DB2A11.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-4F4EE10B-BC2C-4046-ADDB-AD4B67DB2A11.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,69 @@ + + +Managing widgets on the home screen

Managing widgets on the home screen

Home screen widgets are WRT widgets that are enabled for the home screen. They have two views, home screen view and a full screen view.

+

Mobile device users can manage widgets on the home screen, as follows:

+
    +
  • Add a widget to the home screen.

  • +
  • Remove a widget from the home screen.

  • +
  • Suspend the home screen by sending from the foreground to the background.

  • +
  • Launch the home screen widget in full view.

  • +
  • Resume the home screen by sending it from the background to the foreground.

  • +
+

Home screen widget features

Mobile device users can access widgets from:

    +
  • Home screen

  • +
  • Applications menu

  • +

The following table lists features of a widget enabled for the home screen and differences in the widget functionality in the home screen view and full screen view.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Widget feature

Home screen view

Full screen view

Users can interact with the widget

No

Yes

Widget appears in the open applications list

No

The home screen is listed in the open applications list but individual home screen widgets are not

Yes

Users can exit the widget

No

Users can remove widgets from the home screen

Yes

However, the widget remains running in the background and is still displayed on the home screen, until users remove it

Users can uninstall the widget

Yes

However, users must first remove the widget from the home screen

Yes

However, users must first remove the widget from the home screen

+

Adding widgets to the home screen

Once mobile device users add widgets to the home screen, they are running. If users launche the widget (for example, from Applications ) the home screen widget is displayed in full screen view. A separate instance of the widget is not launched.

Widgets that you enable for the home screen are automatically added to the list of available content in home screen options in alphabetic order. The name that appears in the list is determined by the DisplayName key in the info.plist file.

Widgets that are currently displayed on the home screen are hidden from the content list. When users uninstall a widget, it is removed from the content list automatically.

The home screen informs the widget when users add a widget to the home screen. The widget responds by:
    +
  1. Launching the widget in the background.

  2. +
  3. Firing onload() and onshow() events.

  4. +
  5. Prompting the user for permissions.

  6. +
  7. Sending bitmap updates of the widget data to the home screen.

  8. +
+

Removing widgets from the home screen

The home screen informs the widget when mobile device users remove a widget from the home screen. The widget shuts down.

+

Suspending the home screen

The home screen is suspended when it is sent to the background. This happens when mobile device users swap to another application, open a home screen widget in full view, and so forth. The widget responds by:
    +
  1. Suspending timers.

  2. +
  3. Suspending bitmap updates of the widget.

  4. +
  5. Firing an onhide() event.

  6. +

Note: The widget does not need to do anything in response to the

onhide() event.
+

Opening home screen widgets in full screen view

The home screen informs the widget when a mobile device user selects a home screen widget to open in full screen view. Note that before informing the widget, the home screen suspends all other widgets on the home screen. The widget responds by:
    +
  1. Starting the JavaScript timers for the widget.

  2. +
  3. Firing onshow() and onresize() events for the widget.

  4. +
+

Resuming the home screen

The home screen is resumed when the home screen is sent to the foreground. For example, when mobile device users swap back to the home screen from another application, users exit full view of a widget added to the home screen, and so forth. The widget responds by:
    +
  1. Starting JavaScript timers for all widgets added to the home screen.

  2. +
  3. Sending onshow() and onresize() events for all widgets added to the home screens.

  4. +
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-4F6019AE-993E-4B22-942F-65878CB0EF47_d0e13006_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-4F6019AE-993E-4B22-942F-65878CB0EF47_d0e13006_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-4F84676A-16EE-4A66-A6DC-67A57001A565.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-4F84676A-16EE-4A66-A6DC-67A57001A565.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,72 @@ + + +Criteria for +requesting notification

Criteria for +requesting notification

+

The criteria object specifies the type +of notification and a minimum time that the notification can complete.

+

The criteria object has two main properties: Type and Filter. +These are described in the following table.

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
Table: Criteria object properties
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

criteria.Type

+
+

Specifies the type of content.

+
+

string

+
+

Possible values:

+
    +
  • "Log"

  • +
+
+

criteria.Filter

+
+

Specifies the time between notifications of changes to the log event +database.

+
+

object

+
+

Object with the properties specified below

+
+

criteria.Filter.DelayTime

+
+

The time in microseconds.

+
+

number

+
 
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-50795090-A429-41CF-8CAA-EA2004D2643A.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-50795090-A429-41CF-8CAA-EA2004D2643A.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,159 @@ + + +AppManager Service API error messages

AppManager Service API error messages

+

This section provides information about the error messages returned +by the AppManager Service API methods.

+

GetList

+

The following table describes the error messages returned by GetList as part of its return value.

+
+ + + + + + + + + + + + + + + + + +
Table: GetList error +messages
+

Error message

+
+

Description

+
+

AppManager : GetList : Typ eMissing

+
+

This indicates that the Type property is missing +from the input or that the type of the Type property +is incorrect.

+
+

AppManager : GetList : Filter type mismatch

+
+

This indicates that the type of the Filter property +is incorrect.

+
+

AppManager : GetList: Asynchronous version of API is not supported

+
+

This indicates that the asynchronous version of GetList method +was called but it is not supported.

+
+

LaunchApp

+

The following table describes the error messages returned by LaunchApp and callback for LaunchApp as +part of its return value.

+
+ + + + + + + + + + + + + + + + + +
Table: LaunchApp error +messages
+

Error message

+
+

Description

+
+

AppManager : LaunchApp : Application ID Missing

+
+

This indicates that ApplicationID property is missing +from the input or the type is incorrect.

+
+

AppManager : LaunchApp : Command Line type mismatch

+
+

This indicates that the type of the CndLine property +is incorrect.

+
+

AppManager : LaunchApp : OptionMap type mismatch

+
+

This indicates that the type of the Options property +is incorrect.

+
+

LaunchDoc

+

The following table describes the error messages returned by LaunchDoc and callback for LaunchDoc as +part of its return value.

+
+ + + + + + + + + + + + + +
Table: LaunchDoc error +messages
+

Error message

+
+

Description

+
+

AppManager : LaunchDoc : Document/MimeType Missing or datatype +mismatch

+
+

This indicates that the Document/MimeType property +is missing from the input or the type is incorrect.

+
+

AppManager : LaunchDoc : OptionMap type mismatch

+
+

This indicates that the type of the Options property +is incorrect.

+
+

Cancel

+

The following table describes the error messages returned by Cancel as part of its return value.

+
+ + + + + + + + + + + + + +
Table: Cancel error +messages
+

Error message

+
+

Description

+
+

AppManager : Cancel: Invalid Transaction ID

+
+

This indicates that either an invalid TransactionID was +passed or an asynchronous call associated with this ID has already been completed.

+
+

AppManager : Cancel: Missing Transaction ID

+
+

This indicates that the TransactionID property +is missing from the input.

+
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-51077516-7EFB-4C49-B964-18814354DD2F.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-51077516-7EFB-4C49-B964-18814354DD2F.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,51 @@ + + +Library contents

Library contents

The Web Developer's Library contains information about designing and developing usable widgets for S60 mobile devices.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SectionContents
Introduction to S60 Web Runtime environment

An overview of widgets and the Web Runtime environment that enables widgets to run on S60 mobile devices. The section lists the supported standards and features, includes version history information, explains how widgets behave on mobile devices, and discusses security aspects.

Designing widgets

Guidelines for designing usable widgets. Where relevant, links are provided to the Web Runtime API reference and documentation on the Web.

Developing widgets

Detailed information on how to implement the widget functionality. Where relevant, links are provided to the Web Runtime API reference and documentation on the Web.

Example widgets

Example widgets that you can download to your PC and then to a mobile device or emulator. You can also examine the source files.

Integrating widgets with devices

Methods for deploying and managing widgets on mobile devices.

Web Runtime API reference

API reference for the S60 5th Edition.

Developer resources

Links to more information on widget development for the S60 platform.

Terms and abbreviationsTerms and abbreviations used in this library.
Discussion about this resourceLink to the feedback channel.
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-521A45D0-9CCD-4BFE-807E-DE731D45EAE4.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-521A45D0-9CCD-4BFE-807E-DE731D45EAE4.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,330 @@ + + +Returned +media information

Returned +media information

+

The ReturnValue property returned by callback is an iterator containing the requested media information. Each item +(object) in the iterator corresponds to one media file, that is, each item +contains the information for a specific file. The exact set of object properties +depends on the media file type defined for filtering in +the GetList call.

+

The following table lists the object properties returned for different +media types. Media files do not always have all the property values defined. +In that case, the properties are optional. Only properties that contain a +value are returned. For example, if a music file does not contain artist information, +the Artist property is not returned as part of the result +object for that file.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: ReturnValue properties +according to media type
+

Property

+
+

Value

+
+

Image

+
+

Sound

+
+

Video

+
+

Music

+
+

Streaming URL

+
+

<item>.Type

+
+

string

+
+

X

+
+

X

+
+

X

+
+

X

+
+

X

+
+

<item>.FileName

+
+

string

+
+

X

+
+

X

+
+

X

+
+

X

+
+

X

+
+

<item>.FileExtension

+
+

string

+
+

X

+
+

X

+
+

X

+
+

X

+
+

X

+
+

<item>.Drive

+
+

string

+
+

X

+
+

X

+
+

X

+
+

X

+
+

X

+
+

<item>.FileSize

+
+

number

+
+

X

+
+

X

+
+

X

+
+

X

+
+

X

+
+

<item>.FileDate

+
+

time

+
+

X

+
+

X

+
+

X

+
+

X

+
+

X

+
+

<item>.FileNameAndPath

+
+

string

+
+

X

+
+

X

+
+

X

+
+

X

+
+

X

+
+

<item>.SongName

+
+

string

+
    +

X

+
 
+

<item>.Artist

+
+

string

+
    +

X

+
 
+

<item>.Album

+
+

string

+
    +

X

+
 
+

<item>.TrackNumber

+
+

string

+
    +

X

+
 
+

<item>.Genre

+
+

string

+
    +

X

+
 
+

<item>.Composer

+
+

string

+
    +

X

+
 
+

<item>.LinkFirstURL

+
+

string

+
     +

X

+
+

<item>.MimeType

+
+

string

+
+

X

+
+

X

+
+

X

+
+

X

+
+

X

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-5277B7B8-722A-48ED-9333-4DD2D6A085C0.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-5277B7B8-722A-48ED-9333-4DD2D6A085C0.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,136 @@ + + +Key event codes supported by WRT

Key event codes supported by WRT

The key event codes that are supported in WRT differ from those used in some browser and widget environments. You need to know the supported key event codes to be able to handle user input correctly.

+

Note: You do not need to know the key event codes when you use the <textarea> or <input type="text"> tag.

+

The following table lists the key event codes that are used in the WRT environment. The code is given in the format event.keyCode/event.charCode. The call termination key is not included in the list, as it only exits the widget. Note that the codes for key press, key down and key up events vary for other than numeric keys.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Key event codes

Key

Key press

Key down

Key up

0

48/48

48/48

48/48

1

49/49

49/49

49/49

2

50/50

50/50

50/50

3

51/51

51/51

51/51

4

52/52

52/52

52/52

5

53/53

53/53

53/53

6

54/54

54/54

54/54

7

55/55

55/55

55/55

8

56/56

56/56

56/56

9

57/57

57/57

57/57

*

56/42

42/42

56/42

#

51/35

35/35

51/35

C (del)

8/8

8/8

8/8

Call creation key (green)

0/63586

63586/63586

0/63586

Center

0/63557

63557/63557

n/a

Left

37/63495

63495/63495

n/a

Up

38/63497

63497/63497

n/a

Right

39/63496

63496/63496

n/a

Down

40/63498

63498/63498

n/a

\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-528CD4D9-2019-4A08-A533-FC918E261AE6.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-528CD4D9-2019-4A08-A533-FC918E261AE6.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,11 @@ + + +lighttargetprimarydisplayandkeyboard

lighttargetprimarydisplayandkeyboard

+

Syntax:

+
[const int] sysinfo.lighttargetprimarydisplayandkeyboard 
+

Description:

+

This is a read-only property that returns a constant value defining the target light to be both the primary display and the keyboard illuminator.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-5295F092-004B-43F4-85DB-7C54ED14D6DB.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-5295F092-004B-43F4-85DB-7C54ED14D6DB.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,106 @@ + + +IMessaging.Send()

IMessaging.Send()

+

Description:

+

The Send method sends an SMS or MMS message.

+

This method can be called both synchronously and asynchronously.

+

Syntax:

+

For synchronous calls:

+
result = so.IMessaging.Send(criteria);
+ +

For asynchronous calls:

+
result = so.IMessaging.Send(criteria, callback);
+ +

Arguments:

+
    +
  • criteria:

    + +

    This is an object that specifies the type and details of the message +to send. For more information about the object properties and how to define +them, see section Criteria for sending a message.

    + +
  • +
  • callback:

    + +

    The callback argument is the name of the method +that is executed when an asynchronous Send call has status +information to return. You must define this method separately. Follow the +instructions in section Defining the callback handler for an asynchronous method to +define the callback method.

    +

    This argument is used only with an asynchronous Send call.

    + +
  • +
+

Return value:

+

If synchronous, the Send method returns an object +that contains an error code and an error message.

+

If asynchronous, the method returns an object that contains a transaction +ID for the callback instance, +an error code, and an error message (see the following table). When the asynchronous +call has completed, callback returns an object that contains +an error code and an error message (see Table: +Callback return value).

+
+ + + + + + + + + + + + + + + + + + + + + +
Table: Return value +properties for Send
+

Property

+
+

Description

+
+

Value

+
+

result.ReturnValue

+
+

This is a number used as an identification to match transactions started +with an asynchronous Send call to one or more calls it +generates to callback.

+

This property is only valid for asynchronous calls.

+
 
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See Messaging Service API error messages.

+
+

Remarks:

+

Apart from status information and transaction IDs for asynchronous calls, +the Send method does not return any result information.

+

Example code:

+

+

For the complete source of a sample widget +that demonstrates how to use this Service API, see the full example.

+ + + + +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-53CE4DE6-F065-4339-8C18-5C30A9540053.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-53CE4DE6-F065-4339-8C18-5C30A9540053.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,44 @@ + + +JavaScript Location +Service API

JavaScript Location +Service API

+

The Location +Service API is supported since WRT 1.1.

+

The Location Service API allows widgets to retrieve information +about the physical location of a device and to perform calculations based +on location information. The API is integrated into WRT through the device object.

+

For an overview of the service and the API, see section Accessing device location information.

+

Using the Location Service API

+

To use the Location Service API, your widget must first create a service object for it +using the device.getServiceObject() method. +Use Service.Location to identify the service provider +and ILocation to identify the supported interface:

+
var so = device.getServiceObject("Service.Location", "ILocation");
+ +

This service object can then be used to access the services provided +by the API:

+ +

For the location services to function on an S60 device, the device must +be location aware. It must include some location information provider, such +as GPS, AGPS, or GPS across Bluetooth.

+
+

Emulator support

+

The S60 5th Edition SDK emulator provides full support for the Location +Service API.

+

GPS data is simulated by using Position System plugins (PSY) as dummy +providers. Dummy providers are available on the emulator by default.

+
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-53F53EE5-D92E-49A9-B882-741D389412BE.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-53F53EE5-D92E-49A9-B882-741D389412BE.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,19 @@ + + +Creating content specific to home screen widgets

Creating content specific to home screen widgets

Home screen widget content should be a subset of the most important data from the full screen widget.

+

Figure: Widgets on the home screen

+

+

Creating the content

Remember the following recommendations when creating content that is specific to a widget displayed in the home screen:

    +
  • The home screen view is a graphical representation of the WRT widget, and therefore users cannot interact with it.

    Remove all HTML and JavaScript that involves user interaction. For example, interaction with the options list, HTML form elements, data selection (such as JavaScript Service API functions), and refresh buttons.

    Also remove content that includes video, animations, and so on.

    You may also want to implement timers for operations that are specific to the widget on the home screen, such as network operations, parsing, and refreshing data.

  • +
  • Data updates may not be consistent due to network access being suspended during a phone call, low battery, and so on.

    Display the time of last update to assist the mobile device user in determining if the data is current.

  • +
  • The home screen view of the widget uses only a small percentage of the display.

    Limit the amount of data displayed. Placing too much content in the home screen view results in a less than optimal widget.

  • +
  • The size of the home screen view may vary depending on the state of the device, such as screen orientation (portrait/landscape), the number of widgets on the home screen, and so on.

    Define content so that it scales according to the environment. For example, use relative values such as a percentage of the window width and height for defining styles and relative values such as font-size: large for defining font sizes.

  • +
+

Initializing the views

Implement code that determines whether to display the widget in either home screen view or full screen view. For more information, see Determining whether to display home screen or full screen. You can initialize the views any way you choose, but we recommend the following approach:

    +
  • Create separate divisions (<div>) for the full screen and home screen content in the HTML file containing your content.

  • +
  • Create separate JavaScript files for the full screen and home screen views.

  • +

For an example, see Enabling STEW for the home screen.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-54013A2F-7503-4DA3-85C7-904BCD98B011.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-54013A2F-7503-4DA3-85C7-904BCD98B011.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,282 @@ + + +Criteria for +adding and updating calendar information

Criteria for +adding and updating calendar information

+

The criteria object specifies the calendar +to create or the calendar entry to add or update:

+ +

The criteria object has two main properties: Type and Item.

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
Table: Criteria object properties (creating +a new calendar)
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

criteria.Type

+
+

Specifies the type of calendar information to add or update.

+

For creating a new calendar, this is always "Calendar".

+
+

string

+
+

Possible values:

+
    +
  • "Calendar"

  • +
+
+

criteria.Item

+
+

Specifies the calendar to create.

+
+

object

+
+

Object with the properties specified below

+
+

criteria.Item.CalendarName

+
+

Specifies the drive letter and file name of the new calendar file.

+
+

string

+
+

<DriveLetter>:<FileName>

+

For example: "C:Calendar"

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Criteria object +properties (adding a new calendar entry)
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

criteria.Type

+
+

Specifies the type of calendar information to add or update.

+

For adding a new calendar entry, this is always "CalendarEntry".

+
+

string

+
+

Possible values:

+
    +
  • "CalendarEntry"

  • +
+
+

criteria.Item

+
+

Specifies the calendar entry to add.

+

The exact set of properties that need to be specified depends on the +type of the entry. For more information about which properties are valid for +a given type, see section Properties and calendar entry types.

+
+

object

+
+

Object with the properties specified below

+
+

[criteria.Item.CalendarName]

+
+

Specifies the calendar file to which the entry is added.

+

If this property is not specified, the entry is added to the default +calendar. If the default calendar does not exist, it is created.

+
+

string

+
+

<DriveLetter>:<FileName>

+

For example: "C:Calendar"

+
+

criteria.Item.<property>

+
+

For detailed information about the properties and their values, see +section Calendar entry properties.

+
+

(depends on the property)

+
+

For example, to add a new meeting:

+

criteria.Item.Type += "Meeting";

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Criteria object +properties (updating a calendar entry)
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

criteria.Type

+
+

Specifies the type of calendar information to add or update.

+

For updating an existing calendar entry, this is always "CalendarEntry".

+
+

string

+
+

Possible values:

+
    +
  • "CalendarEntry"

  • +
+
+

criteria.Item

+
+

Specifies the new information and the calendar entry to update.

+

The exact set of properties that need to be specified depends on the +type of the entry. For more information about which properties are valid for +a given type, see section Properties and calendar entry types.

+
+

object

+
+

Object with the properties specified below

+
+

[criteria.Item.CalendarName]

+
+

Specifies the calendar file on which the update is performed.

+

If this property is not specified, the update is performed on the default +calendar.

+
+

string

+
+

<DriveLetter>:<FileName>

+

For example: "C:Calendar"

+
+

criteria.Item.LocalId

+
+

Identifies the calendar entry to update. This can be either a parent +or child entry.

+
+

string

+
 
+

[criteria.Item.InstanceStartTime]

+
+

In case of a recurring entry, specify InstanceStartTime to +identify the instance to modify. The specified instance is stored as a new +child entry.

+

If this property is not specified, the whole entry is updated.

+
+

date object

+
 
+

criteria.Item.<property>

+
+

For detailed information about the properties and their values, see +section Calendar entry properties.

+

Properties that are not specified remain unchanged.

+
+

(depends on the property)

+
 
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-54D264D2-0E5F-4478-9334-712A9DCD0ABD.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-54D264D2-0E5F-4478-9334-712A9DCD0ABD.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,136 @@ + + +Filter +criteria for landmark categories

Filter +criteria for landmark categories

+

The following table describes the different criteria by which you can +search for landmark categories and lists the required Filter object +properties per criterion. Table: +Filter object properties for a category search describes the actual +properties.

+
+ + + + + + + + + + + +
Table: Category search +criteria
+

Criterion

+
+

Description

+
+

Properties to specify

+
+

Name

+
+

You can search for categories by name. The name search is not case sensitive +and supports wild cards, for example "?" (single character) and "*" (zero +or more characters).

+
+
    +
  • CategoryName

  • +
  • [MaximumMatches]

  • +
  • [PreviousMatchesOnly]

  • +
+
+

The following table describes the Filter object +properties for GetList calls +that retrieve information about landmark categories.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Filter object +properties for a category search
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

[DatabaseURI]

+
+

Specifies the landmark database in which to search for landmark categories. +If this is not specified, the search is performed on the default database.

+
+

string

+
+

Maximum length 255 characters

+
+

[CategoryName]

+
+

Specifies the category name to search by. This is checked against the CategoryName property +of a landmark category.

+

This string is not case sensitive and supports wild cards, for example +"?" (single character) and "*" (zero or more characters).

+
+

string

+
+

Maximum length 124 characters

+
+

[MaximumMatches]

+
+

Specifies the maximum number of landmark category items to retrieve. +If this property is not specified, GetList returns all +categories matching the search criteria.

+
+

number

+
 
+

[PreviousMatchesOnly]

+
+

Specifies whether to perform the search on previous search results only:

+
    +
  • If set to true, GetList searches +for matching landmark categories in previous search results only.

  • +
  • If set to false, GetList performs +a new search on the entire database.

  • +
+

The default value is false.

+
+

boolean

+
+

Possible values:

+
    +
  • true

  • +
  • false

  • +
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-55591BBC-49F8-407D-98F5-1D2FCD5DFB34.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-55591BBC-49F8-407D-98F5-1D2FCD5DFB34.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,166 @@ + + +IDataSource.GetList()

IDataSource.GetList()

+

Description:

+

The GetList method retrieves information about +landmarks, landmark categories, or landmark databases. Landmarks and landmark +categories are retrieved from the specified landmark database or, if no database +is specified, from the default one.

+

This method can be called both synchronously and asynchronously.

+

Note: For retrieving information about databases, only synchronous GetList is +supported.

+
+

Syntax:

+

For synchronous calls:

+ +
result = so.IDataSource.GetList(criteria);
+

For asynchronous calls:

+ +
result = so.IDataSource.GetList(criteria, callback);
+

Arguments:

+
    +
  • criteria:

    + +

    This is an object that specifies what landmark information is returned +and how the returned information is sorted. For more information about the +object properties and how to define them, see section Criteria for retrieving landmark information.

    + +
  • +
  • callback:

    + +

    The callback argument is the name of the method +that is executed when an asynchronous GetList call has +results or status information to return. You must define this method separately. +Follow the instructions in section Defining the callback handler for an asynchronous method to +define the callback method.

    +

    This argument is used only with an asynchronous GetList call.

    + +
  • +
+

Return value:

+

If synchronous, the GetList method returns an object +that contains the requested landmark information, an error code, and an error +message.

+
+ + + + + + + + + + + + + + + + + + + + +
Table: Return value +properties for a synchronous GetList
+

Property

+
+

Description

+
+

Value

+
+

result.ReturnValue

+
+

This is an iterator that contains the requested landmark information.

+
+

See Returned landmark information.

+
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See Landmarks Service API error messages.

+
+

If asynchronous, the GetList method returns an +object that contains the initial return value for the asynchronous call it +started (see the following table). The actual landmark information is returned +by the callback method +in the ReturnValue property of its result object. The +returned information is described in section Returned landmark information.

+
+ + + + + + + + + + + + + + + + + + + + + +
Table: Return value +properties for an asynchronous GetList
+

Property

+
+

Description

+
+

Value

+
+

result.TransactionID

+
+

This is a number used as an identification to match transactions started +with the asynchronous GetList call to one or more calls +it generates to callback.

+
 
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See Landmarks Service API error messages.

+
+

Remarks:

+
    +
  • If GetList is performed on the default +landmark database and it does not exist, it is created and set active. The +default database is file://c:eposlm.ldb.

  • +
  • For more information about landmarks, landmark categories, +and landmark databases, see the Landmarks +Service overview page.

  • +
+

Example code:

+

+

For the complete source of a sample widget +that demonstrates how to use this Service API, see the +full example.

+ + + + +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-55F6778A-D1DA-4288-93B2-0863558D34B7.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-55F6778A-D1DA-4288-93B2-0863558D34B7.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,18 @@ + + +onhide

onhide

+

Description:

+

The onhide property is an event handler for the event of when a widget is switching from the foreground to the background. In other words, when a running widget loses focus, the assigned callback function will be called.

+

This property is useful for managing the functionality of the widget in relation to other applications on the device.

+

Syntax:

+
[void] window.widget.onhide = function() { }
+

or

+
[void] window.widget.onhide = toBackground;
+
function toBackground()
+{
+  // ...
+}
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-5610C4B8-8988-4895-8F88-36F444B4ACFC.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-5610C4B8-8988-4895-8F88-36F444B4ACFC.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,54 @@ + + +setRightSoftkeyLabel()

setRightSoftkeyLabel()

+

Description:

+

Call the setRightSoftkeyLabel method to customize +the label and the operation associated with the right softkey.

+

By default, the right softkey of a device is assigned to the "Exit" +function, which terminates a running widget. The default label depends on +the current used system language (Exit for English).

+

For more general information on using softkeys in your widget, see Using softkeys.

+

Syntax:

+
[void] window.menu.setRightSoftkeyLabel(String label, Function callbackfunc) 
+

or

+
[void] menu.setRightSoftkeyLabel(String label, Function callbackfunc)
+

Arguments:

+
    +
  • label:

    + +

    A text string specifies the label to be shown on the right softkey.

    + +
  • +
  • callbackfunc:

    + +

    A reference to the callback function, which will be called by the system +when the right softkey is pressed.

    + +
  • +
+

Return value:

+

This method does not return a value.

+

Remarks:

+

The default label and "Exit" function of the right softkey can be restored +by calling the setRightSoftkeyLabel with an empty string +('') specified for the label argument and the callbackfunc argument +set to null.

+

Example code:

+
function switchToSettingsView()
+{
+ // implement and show settings
+ ...
+ // customize the right softkey
+ window.menu.setRightSoftkeyLabel('Back', returnToMainView);
+}
+
function returnToMainView()
+{
+  // show main view
+ ...
+ // restore the default right softkey
+ window.menu.setRightSoftkeyLabel('', null);
+}
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-5614CFF0-EF37-46DD-A89D-C2AD6122F6A5.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-5614CFF0-EF37-46DD-A89D-C2AD6122F6A5.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,164 @@ + + +Returned +application information

Returned +application information

+

The ReturnValue property returned by GetList is an iterator containing the requested application information. +Each item (object) in the iterator corresponds to information about one mobile +device application or user-installed application, depending on what +type of application information was requested.

+

The following table describes the information returned for mobile device +applications.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: ReturnValue properties +for mobile device applications
+

Property

+
+

Description

+
+

Value type

+
+

Type

+
+

result.Uid

+
+

Contains a unique ID for the application binary (EXE or DLL).

+
  +

string

+
+

result.Path

+
+

Contains the path of the application. For example, c:\sys\bin\calculator.exe.

+
  +

string

+
+

result.Caption

+
+

Contains the title of the application.

+
  +

string

+
+

result.ShortCaption

+
+

Contains the short title of the application. For example, the short +caption may be displayed beneath an icon on the mobile device.

+
  +

string

+
+

The following table describes the information returned for user-installed +applications.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: ReturnValue properties +for user-installed applications
+

Property

+
+

Description

+
+

Value type

+
+

Type

+
+

result.PackageName

+
+

Contains the name of the application. For example, the package name +may be displayed in a menu on the mobile device.

+
  +

string

+
+

result.Version

+
+

Contains the version of the application.

+

The version consists of two parts:

+
    +
  • Major

  • +
  • Minor

  • +
+

For example, 1.01, where 1 is the major part and .02 is the minor part.

+
  +

string

+
+

result.Uid

+
+

Contains a unique ID for the application binary (EXE or DLL).

+
  +

string

+
+

result.Vendor

+
+

Contains the vendor of the application.

+
  +

string

+
+

result.Drive

+
+

Contains the drive where the application is installed.

+
  +

string

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-56D42F03-F3C2-4977-AC32-772760AE1D4D.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-56D42F03-F3C2-4977-AC32-772760AE1D4D.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,21 @@ + + +Guide to Web Developer's Library

Guide to Web Developer's Library

The Web Developer's Library is a complete package with introductory, getting started, implementation, and API-level information.

+

Intended audience

This library is intended for experienced desktop Web developers who are new to mobile development and mobile application developers familiarizing themselves with the Web Runtime (WRT) environment.

+

Searching the library

You can search for text in the whole library or only in topics you are interested in.

To search for text in all topics:

    +
  1. Type the text to be searched in the Search field.

  2. +
  3. Click Go. Search results are shown in the Search Results tab.

  4. +

You can also limit your search to include only topics in selected chapters by clicking Search scope.

You can use search expressions according to the following examples:

    +
  • touch or copy = touch OR copy finds topics containing at least one of the search items.

  • +
  • touch and copy = touch AND copy = touch copy (with a space between the searched items) finds topics containing both search items.

  • +
  • "Touch UI" finds topics containing the exact search phrase Touch UI.

  • +
+

Navigating the library

The bread crumbs at the top of the right pane show the location of the current topic in the table of contents, enabling you to navigate the table of contents.

The Home button in the top right corner opens the library main page. Use the Go Back and Go Forward buttons next to it to navigate within the history of viewed topics.

+

Printing the library

To print currently displayed topic, click Print Page.

To print a topic and its subtopics:

    +
  1. Select the topic from the table of contents.

  2. +
  3. Click Print Topics above the table of contents and select Print selected topic and all subtopics.

  4. +
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-571AF37F-1E95-462A-92D2-FEA2E62F1559.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-571AF37F-1E95-462A-92D2-FEA2E62F1559.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,26 @@ + + +JavaScript +device object

JavaScript +device object

+

The device object is supported since WRT +1.1.

+

The device object is a built-in JavaScript object +in the widget engine. It was introduced in WRT 1.1 to allow widgets access +to S60 Platform Services through Service APIs. The device object +is used to create service objects for specific Service APIs. These service +objects can then be used to access the services made available through the +Service APIs.

+

The device object can be accessed simply via device. +In the WRT environment, the term device is a reserved +keyword and should not be used as a user-defined global variable name for +other type of objects.

+

device object methods:

+ +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-5720512C-9198-4883-81B1-46F1B963C6B9.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-5720512C-9198-4883-81B1-46F1B963C6B9.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,213 @@ + + +Criteria for +retrieving messaging information

Criteria for +retrieving messaging information

+

The criteria object specifies what messaging +information is returned and how the returned information is sorted.

+

The criteria object has three main properties: Type, Filter, +and Sort. These are described in the following table. +Properties enclosed in brackets are optional.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Criteria object properties
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

criteria.Type

+
+

Specifies the type of messaging objects to retrieve.

+
+

string

+
+

Possible values:

+
    +
  • "Inbox"

  • +
+
+

[criteria.Filter]

+
+

Specifies how the information to be retrieved is filtered.

+
+

object

+
+

Object with the properties specified below

+
+

[criteria.Filter.MessageTypeList]

+
+

Specifies the type or types of messages to retrieve.

+
+

array of strings

+
+

Possible values:

+
    +
  • "SMS"

  • +
  • "MMS"

  • +
  • "unknown"

  • +
+

Note: The current implementation only recognizes SMS and MMS. Other types +of messages are unknown.

+
+
+

[criteria.Filter.MessageId]

+
+

Specifies the unique ID of the message to retrieve.

+

If MessageId is specified, then only the message +with that ID is retrieved.

+
+

number

+
 
+

[criteria.Filter.SenderList]

+
+

Specifies the message recipients. Only messages sent to these recipients +are retrieved.

+
+

array of strings

+
 
+

[criteria.Filter.Subject]

+
+

Specifies the message subjects. Only messages with these subjects are +retrieved.

+

Note: SMS does not support subject. This property is only valid for MMS.

+
+
+

string

+
 
+

[criteria.Filter.StartDate]

+
+

If only StartDate is specified, all messages received +on or after this date are retrieved.

+

If both StartDate and EndDate are +specified, all messages received within these dates are retrieved.

+

If EndDate is earlier than StartDate, +an error is returned.

+
+

date object

+
 
+

[criteria.Filter.EndDate]

+
+

If only EndDate is specified, all messages received +on or before this date are retrieved.

+

If both StartDate and EndDate are +specified, all messages received within these dates are retrieved.

+

If EndDate is earlier than StartDate, +an error is returned.

+
+

date object

+
 
+

[criteria.Sort]

+
+

Specifies how the returned list of information is sorted.

+
+

object

+
+

Object with the properties specified below

+
+

[criteria.Sort.Key]

+
+

Specifies the value to sort by.

+

Note: By default, sorting is done in ascending order based on Date.

+
+
+

string

+
+

Possible values:

+
    +
  • "Date"

  • +
  • "Size"

  • +
  • "Sender"

  • +
  • "Subject"

  • +
  • "MessageId"

  • +
+
+

[criteria.Sort.Order]

+
+

Specifies the sort order.

+
+

string

+
+

Possible values:

+
    +
  • "Ascending"

  • +
  • "Descending"

  • +
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-5906D140-663D-4EE2-B0C1-4FECA5759384.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-5906D140-663D-4EE2-B0C1-4FECA5759384.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,88 @@ + + +STEW: managing user interaction

STEW: managing user interaction

This section contains an example of how users interact with a view and how you save and load persistent data.

+

Figure: STEW Login view

+

The LoginScreen.js file implements the functionality of the STEW Login view. For more information on how to implement the functionality of the other STEW views, see UpdateScreen.js, SearchScreen.js, and SettingsScreen.js.

+

In the LoginScreen function, the onclick event handler is assigned to the Login button and the values of the screen controls that collect user input (Username, Password, and Remember Me ) are remembered.

+
function LoginScreen() {
+	// Get the login button element and assign an event handler to it.
+	var self = this;
+	var loginButton = document.getElementById( "login_button" );
+	loginButton.onclick = function() {
+		 self.onLoginClicked();
+	};
+	
+	// Get all the UI elements that we can interact with.
+	this.tbUsername = document.getElementById( "login_username" );
+	this.tbPassword = document.getElementById( "login_password" );
+	this.cbRememberMe = document.getElementById( "login_remember_me" );	
+}
+
+

Saving persistent data

The onclick event handler triggers the activation of the next view. Users can specify settings to determine which view appears after the Login view, so the logic needs to find out which view is the default view.

If the user checks the Remember Me check box, the credentials are stored. This is done by calling the WRT widget.setPreferenceForKey and widget.preferenceForKey API methods after reading the input for Username, Password, and the Remember Me check box.

LoginScreen.prototype.onLoginClicked = function() {
+	var username = this.tbUsername.value;
+	var password = this.tbPassword.value;
+	var rememberMe = this.cbRememberMe.checked;
+			
+	// Save the data to the storage if the user checked "Remember Me".
+	widget.setPreferenceForKey( rememberMe.toString(), LoginScreen.KEY_REMEMBER_ME );
+	// If "Remember Me" is unchecked, the username and password are cleared because
+	// default values for username and password values are null.
+	widget.setPreferenceForKey( rememberMe ? username : null, LoginScreen.KEY_USERNAME );
+	// REMEMBER: Never store passwords uncoded. See encryption algorithms on
+	// how to encode the password before saving it.
+	widget.setPreferenceForKey( rememberMe ? password : null, LoginScreen.KEY_PASSWORD );
+	
+	// Remember the username and password.
+	twitterService.setCredentials( username, password );
+	
+	// Check which view is the startup view.
+	var startupPage = widget.preferenceForKey( SettingsScreen.KEY_STARTUP_PAGE );
+	if ( startupPage == SettingsScreen.SEARCH_PAGE ) {
+		widgetMenu.activate( Menu.SEARCH_SCREEN );
+	} else {
+		widgetMenu.activate( Menu.UPDATE_STATUS_SCREEN );
+	} 
+}
+

The startup view is stored into the startupPage variable by calling the widget.preferenceForKey API method. The code checks whether the Search view is the startup view. If not, the Update status view is displayed.

+

Loading persistent data

The button menu calls the onActivated function to inform views that they are being activated. In the Login view, this function is implemented and credentials are read if they were saved when users previously used the application. If the value of the key for Remember Me check box is set to true, the function loads the username and password from the widget store using the predefined key constants LoginScreen.KEY_USERNAME and LoginScreen.KEY_PASSWORD.

LoginScreen.prototype.onActivated = function() {
+	// Check if any credentials were stored - if they were, load them
+	// up and prefill the screen.
+	var rememberMe = widget.preferenceForKey( LoginScreen.KEY_REMEMBER_ME );	
+	if ( rememberMe == "true" ) {
+		// Load up the rest; username and password.
+		var username = widget.preferenceForKey( LoginScreen.KEY_USERNAME );
+		var password = widget.preferenceForKey( LoginScreen.KEY_PASSWORD );
+
+		// Assign to UI controls. Also check if username and passwords are not null;
+		// the reason for this is that the user can also check the Remember Me checkbox
+		// on the settings view.
+		if ( username != null ) {
+			this.tbUsername.value = username;	
+		}
+		if ( password != null ) {
+			this.tbPassword.value = password;
+		}		
+		this.cbRememberMe.checked = true;
+	} else {
+		this.tbUsername.value = "";	
+		this.tbPassword.value = "";
+		this.cbRememberMe.checked = false;		
+	}
+}
+
+

Logging users in automatically

If users save their credentials in STEW, they are logged into Twitter automatically when they start STEW. The following code checks that users stored valid credentials and calls the onLoginClicked function, which is also called when users select the Login button.

LoginScreen.prototype.loginIfPossible = function(){
+	var username = this.tbUsername.value;
+	var password = this.tbPassword.value;
+	var rememberMe = this.cbRememberMe.checked;
+
+	// If username and password are provided then login automatically.
+	if ( rememberMe && username && username.length && password && password.length ) {
+		this.onLoginClicked();
+	}	
+}
+
+

Providing users with tactile feedback

Tactile feedback is only triggered when a user interacts with a link element. To provide tactile feedback for screen controls specified as div elements, for example, call the WrtHelper tactileFeedback function.

For more information, see Providing tactile feedback for user actions.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-5949FE0C-207D-4B15-8C03-96AE48986973.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-5949FE0C-207D-4B15-8C03-96AE48986973.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,16 @@ + + +Laying out pages

Laying out pages

Widgets provide users with quick and easy access to Web 2.0 services or content from a Web site. Design widgets for use by a specific user group for a specific purpose. A simple and clear design helps make the most important content obvious. You can use icons and rich image content within the limits of the mobile device processing capacity. However, make sure that your design looks good not only on small screens but also on different sizes of screens and on devices where screen orientation changes from portrait to landscape when users rotate the device.

+

The following sections describe how to lay out pages on small device screens:

+ +

For more information about how to design for mobile device screens, see Designing for mobile devices.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-59A3DC52-36FB-4A05-8D37-0305AE4B80D0.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-59A3DC52-36FB-4A05-8D37-0305AE4B80D0.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,69 @@ + + +Criteria for +deleting an event

Criteria for +deleting an event

+

The criteria object specifies the event +to delete.

+

The criteria object has two main properties: Type and Data. +These are described in the following table.

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
Table: Criteria object properties
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

criteria.Type

+
+

Specifies the type of content.

+
+

string

+
+

Possible values:

+
    +
  • "Log"

  • +
+
+

criteria.Data

+
+

Specifies the event to delete.

+
+

object

+
 
+

criteria.Data.id

+
+

Specifies a unique identifier of the event to delete.

+
+

string

+
 
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-5A23A9AC-2BC4-4D05-82FF-980986CFF4F6.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-5A23A9AC-2BC4-4D05-82FF-980986CFF4F6.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,149 @@ + + +Landmark +database

Landmark +database

+

The following table describes the properties of a landmark database +object.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Landmark database +object properties
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

[DatabaseName]

+
+

Specifies the name of the landmark database. The name need not be unique +within the database.

+
+

string

+
 
+

DatabaseURI

+
+

Specifies the unique URI of the landmark database.

+

The URI consists of a protocol specifier and the database location: <protocol>://<location>. +If no protocol is specified, file:// is used by default.

+

For a local database, the protocol is always file:// and +the location consists of the drive and the database file name. The path to +the file cannot be specified. The extension of the database file name must +be ldb.

+

Note: Remote databases are not currently supported.

+
+
+

string

+
+

For example: file://c:landmarks.ldb

+
+

[DbDrive]

+
+

Specifies the drive on which the database is stored.

+
+

string

+
+

For example: "C"

+
+

[DbProtocol]

+
+

Specifies the protocol for accessing the database.

+
+

string

+
+

For example: "file://"

+
+

[DbMedia]

+
+

Specifies the type of media on which the database is stored.

+
+

number

+
+

Possible values:

+
    +
  • 0 - MediaNotPresent

  • +
  • 1 - MediaUnknown

  • +
  • 2 - MediaFloppyDisk

  • +
  • 3 - MediaHardDisk

  • +
  • 4 - MediaCdRom

  • +
  • 5 - MediaRam

  • +
  • 6 - MediaFlash

  • +
  • 7 - MediaRom

  • +
  • 8 - MediaRemote

  • +
  • 9 - MediaNANDFlash

  • +
  • 10 - MediaRotatingMedia

  • +
+
+

[DbSize]

+
+

Specifies the size of the database in bytes. This is a read-only property.

+
+

number

+
 
+

[DbActive]

+
+

Specifies whether the database is the default landmark database of the +device.

+
+

boolean

+
+

Possible values:

+
    +
  • true - Default database

  • +
  • true - Not the default database

    +
  • +
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-5B0BE2FA-9FBB-4B8D-A1CE-219634C9C27A.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-5B0BE2FA-9FBB-4B8D-A1CE-219634C9C27A.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,52 @@ + + +Determining +whether to display home screen or full screen

Determining +whether to display home screen or full screen

A widget enabled for the home screen has two views, home screen +view and a full screen view. You must implement a function in your widget +that determines in which view to display the widget and call that function +in response to communication from the home screen.

+

The home screen communicates with the widget when users interact with the +home screen. Communication between the home screen and the widget occurs at +the system level, so it happens automatically. When the widget receives communication +from the home screen, it fires the following events:

+
    +
  • onload() and onshow() when +users add a widget to the home screen.

  • +
  • onshow() and onresize() when +the mobile device user selects a home screen widget to launch it in full view.

  • +
  • onshow() and onresize() when +the home screen moves from the background to the foreground.

  • +
+

To determine which view to display

    +
  1. Write JavaScript code +that determines the current screen size and uses that value to initialize +either the home screen view or the full screen view.

    For example, the +following functions set a threshold value of 150 pixels to determine whether +to display the widget in full screen view (initFull) +or home screen view (initHomeScreen).

    function setViewMode(){
    +   var isInHSView = isHSViewMode();
    +	
    +   if ( isInHSView ) {
    +       initHomeScreen();
    +		   
    +	 } else {
    +		   initFull();
    +   }
    +}
    +
    isHSViewMode: function() {
    +	   var size = this.getScreenSize();
    +	   return ( size.height < HS_VIEW_TRESHOLD );
    +}	
    +
    +
    HS_VIEW_TRESHOLD = 150;
    +
  2. +
  3. Call the setViewMode() function +in response to onload(), onshow(), and onresize() events +fired by the widget UI.

    For example, the following HTML code calls setViewMode() in +response to these events.

    <body id="body" onload="setViewMode();" onshow="setViewMode();" onresize="setViewMode();">
  4. +

For an example, see Enabling STEW for the home screen.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-5BB933A3-E1F3-47A5-B85F-A78C988C8779-master.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-5BB933A3-E1F3-47A5-B85F-A78C988C8779-master.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-5BB933A3-E1F3-47A5-B85F-A78C988C8779_d0e11349_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-5BB933A3-E1F3-47A5-B85F-A78C988C8779_d0e11349_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-5BB933A3-E1F3-47A5-B85F-A78C988C8779_d0e11410_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-5BB933A3-E1F3-47A5-B85F-A78C988C8779_d0e11410_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-5BB933A3-E1F3-47A5-B85F-A78C988C8779_d0e4678_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-5BB933A3-E1F3-47A5-B85F-A78C988C8779_d0e4678_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-5D53649F-FDE2-4421-A362-25C91EE76EF4.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-5D53649F-FDE2-4421-A362-25C91EE76EF4.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,835 @@ + + +Calendar +entry properties

Calendar +entry properties

+

+

The following table describes all the possible properties for calendar +entry objects. Each type of entry supports a different subset of these properties. +The exact set of properties used by a given entry depends on its type and +the optional properties specified for it. For information about which properties +are valid for a given type, see section Properties and calendar entry types.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Properties for +calendar entry objects
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

Type

+
+

Specifies the type of the entry.

+
+

string

+
+

Possible values:

+
    +
  • "Anniversary"

  • +
  • "DayEvent"

  • +
  • "Meeting"

  • +
  • "Reminder"

  • +
  • "ToDo"

  • +
+
+

id

+
+

Specifies the globally unique identifier of the entry. This is unique +across all calendars on any device. Child entries share the same id as +their parent entry.

+

Note: id is generated automatically when the entry is +created. It cannot be modified. If the entry is imported to another calendar, +the id remains the same.

+
+
+

string

+
 
+

LocalId

+
+

Specifies the locally unique identifier of the entry. This is unique +only within the calendar to which the entry belongs. LocalId is +used to distinguish between parent and child entries that share the same id.

+

Note: LocalId is generated automatically when the entry +is created. It cannot be modified. If the entry is imported to another calendar, +a new LocalId is generated for it in that calendar.

+
+
+

string

+
 
+

CalendarName

+
+

Specifies the calendar file that contains the entry.

+
+

string

+
+

<DriveLetter>:<FileName>

+

For example: "C:Calendar"

+
+

Summary

+
+

Contains the summary description for the entry.

+
+

string

+
 
+

SeqNum

+
+

Specifies the sequence number for the entry. This is used in group scheduling.

+

The default value is 0.

+
+

number

+
 
+

StartTime

+
+

Specifies the start time for the entry.

+
+

date object

+
 
+

EndTime

+
+

Specifies the end time for the entry.

+
+

date object

+
 
+

InstanceStartTime

+
+

Specifies the start time for the entry instance.

+

Note: This property is only valid for recurring entries.

+
+
+

date object

+
 
+

InstanceEndTime

+
+

Specifies the end time for the entry instance.

+

Note: This property is only valid for recurring entries.

+
+
+

date object

+
 
+

Replication

+
+

Specifies the replication status of the entry.

+

The default value is "Open".

+
+

string

+
+

Possible values:

+
    +
  • "Open" (no restriction on access)

    +
  • +
  • "Private" (data is private, no access)

    +
  • +
  • "Restricted" (data is confidential, +restricted access)

  • +
+
+

Description

+
+

Contains the description for the entry.

+
+

string

+
 
+

Priority

+
+

Specifies the priority of the entry.

+

The default value is 0.

+
+

number

+
+

[0, 255]

+
+

AlarmTime

+
+

Specifies the alarm time for the entry. This must be before StartTime. +However, for ToDo entries, this must be before EndTime.

+
+

date object

+
 
+

Location

+
+

Specifies the name of the location for the meeting.

+
+

string

+
 
+

Status

+
+

Specifies the status of the entry.

+

The default value is "NullStatus".

+
+

string

+
+

Possible values:

+
    +
  • "Tentative" (meetings only)

  • +
  • "Confirmed" (meetings only)

  • +
  • "TodoNeedsAction" (to-dos only)

    +
  • +
  • "TodoCompleted" (to-dos only)

    +
  • +
  • "TodoInProcess" (to-dos only)

    +
  • +
  • "Cancelled"

  • +
  • "NullStatus"

  • +
+
+

RepeatDates

+
+

Specifies a list of out-of-sequence dates on which the entry repeats.

+
+

array of date objects

+
 
+

ExDates

+
+

Specifies a list of exception dates, that is, occurrences in the original +schedule that have been removed and may be replaced with different occurrences.

+
+

array of date objects

+
 
+

Method

+
+

Specifies the method for the entry.

+

The default value is "None".

+

Note: This property is only valid for iCalendar entries.

+
+
  +

Possible values:

+
    +
  • "None"

  • +
  • "Publish"

  • +
  • "Request"

  • +
  • "Reply"

  • +
  • "Add"

  • +
  • "Cancel"

  • +
  • "Refresh"

  • +
  • "Counter"

  • +
  • "DeclineCounter"

  • +
+
+

PhoneOwner

+
+

Specifies the phone owner.

+

The phone owner should match the Address property +of one of the attendees (see Table: +Attendees properties). That is, the phone owner should be an attendee.

+
+

string

+
 
+

Organizer

+
+

Specifies information about the meeting organizer.

+
+

object

+
+

See Table: +Organizer properties.

+
+

Attendees

+
+

Specifies the meeting attendees.

+
+

array of objects

+
+

See Table: +Attendees properties.

+
+

RepeatRule

+
+

Specifies the rules of recurrence for the entry.

+

This is only valid for parent entries. Child entries cannot have their +own RepeatRule.

+
+

object

+
+

See Table: +RepeatRule properties.

+
+

The following table describes the structure of Organizer. +Properties enclosed in brackets are optional.

+
+ + + + + + + + + + + + + + + + +
Table: Organizer properties
+

Property

+
+

Description

+
+

Type

+
+

[Organizer.CommonName]

+
+

Specifies the name of the organizer.

+
+

string

+
+

Organizer.Address

+
+

Specifies the address of the organizer.

+
+

string

+
+

The following table describes the structure of Attendees. +Properties enclosed in brackets are optional.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Attendees properties
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

[Attendees[].CommonName]

+
+

Specifies the common name for group scheduling.

+
+

string

+
 
+

[Attendees[].Role]

+
+

Specifies the role of the attendee.

+

The default value is "Required".

+
+

string

+
+

Possible values:

+
    +
  • "Required"

  • +
  • "Optional"

  • +
  • "NonParticipant"

  • +
  • "Chair"

  • +
+
+

Attendees[].Address

+
+

Specifies the email address of the attendee.

+
+

string

+
 
+

[Attendees[].Status]

+
+

Specifies the status of the attendee.

+

The default value is "NeedsAction".

+
+

string

+
+

Possible values:

+
    +
  • "NeedsAction"

  • +
  • "Accepted"

  • +
  • "Tentative"

  • +
  • "Confirmed"

  • +
  • "Declined"

  • +
  • "Completed"

  • +
  • "Delegated"

  • +
  • "InProcess"

  • +
+
+

[Attendees[].Rsvp]

+
+

Specifies whether or not a response is requested from the attendee.

+

The default value is false.

+
+

boolean

+
+

Possible values:

+
    +
  • true

  • +
  • false

  • +
+
+

The following table describes the structure of RepeatRule. +Properties enclosed in brackets are optional.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: RepeatRule properties
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

RepeatRule.Type

+
+

Specifies the type of recurrence, that is, its frequency.

+

For information about which RepeatRule properties +to define for a given type, see Table: +Valid RepeatRule properties per type of recurrence.

+
+

number

+
+

Possible values:

+
    +
  • 1 (daily)

  • +
  • 2 (weekly)

  • +
  • 3 (monthly)

  • +
  • 4 (yearly)

  • +
+
+

[RepeatRule.StartDate]

+
+

Specifies the start time for the recurrence. If this is not specified, +the StartTime of the entry is used.

+
+

date object

+
 
+

[RepeatRule.UntilDate]

+
+

Specifies the end date for the recurrence. The entry recurs until this +date.

+

UntilDate is automatically modified to match the +start time of the last possible instance of the recurrence. For example, if +the entry is specified to recur monthly from June 1st (StartDate) +to December 30th (UntilDate) on the first day of every +month, the last possible instance of recurrence is December 1st. The system +automatically changes UntilDate to this value.

+

If UntilDate is not specified, the entry recurs +until the last possible date allowed by the calendar.

+
+

date object

+
 
+

[RepeatRule.Interval]

+
+

Specifies the time interval between instances of a recurring entry.

+
+

number

+
 
+

[RepeatRule.DaysInWeek]

+
+

Specifies the days of the week on which the entry recurs.

+
+

array of numbers

+
+

Possible values for an item:

+
    +
  • 0 (Monday)

  • +
  • 1 (Tuesday)

  • +
  • 2 (Wednesday)

  • +
  • 3 (Thursday)

  • +
  • 4 (Friday)

  • +
  • 5 (Saturday)

  • +
  • 6 (Sunday)

  • +
+
+

[RepeatRule.MonthDays]

+
+

Specifies the days of the month on which the entry recurs.

+
+

array of numbers

+
+

Possible values for an item: [0, 30]

+
+

[RepeatRule.DaysOfMonth]

+
+

Specifies the day and week of the month on which the entry recurs.

+
+

array of objects

+
+

The properties of the object items are specified below.

+
+

[RepeatRule.DaysOfMonth[].Day]

+
+

Specifies the day of the week on which the entry recurs.

+
+

number

+
+

Possible values:

+
    +
  • 0 (Monday)

  • +
  • 1 (Tuesday)

  • +
  • 2 (Wednesday)

  • +
  • 3 (Thursday)

  • +
  • 4 (Friday)

  • +
  • 5 (Saturday)

  • +
  • 6 (Sunday)

  • +
+
+

[RepeatRule.DaysOfMonth[].WeekNum]

+
+

Specifies the week of the month on which the entry recurs.

+
+

number

+
+

Possible values:

+
    +
  • 1 (1st week)

  • +
  • 2 (2nd week)

  • +
  • 3 (3rd week)

  • +
  • 4 (4th week)

  • +
  • -1 (last week)

  • +
+
+

[RepeatRule.Month]

+
+

Specifies the month for a yearly recurrence.

+
+

number

+
+

Possible values:

+
    +
  • 0 (January)

  • +
  • 1 (February)

  • +
  • 2 (March)

  • +
  • 3 (April)

  • +
  • 4 (May)

  • +
  • 5 (June)

  • +
  • 6 (July)

  • +
  • 7 (August)

  • +
  • 8 (September)

  • +
  • 9 (October)

  • +
  • 10 (November)

  • +
  • 11 (December)

  • +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Valid +RepeatRule properties per type of recurrence
+

Type of recurrence

+
+

Valid properties

+
+

Notes

+
+

Daily

+
+
    +
  • Type

  • +
  • [Interval]

  • +
  • UntilDate

  • +
+
 
+

Weekly

+
+
    +
  • Type

  • +
  • [Interval]

  • +
  • UntilDate

  • +
  • [DaysInWeek]

  • +
+
+

If DaysInWeek is not specified, it is calculated +from the StartTime of the entry.

+
+

Monthly

+
+
    +
  • Type

  • +
  • [Interval]

  • +
  • UntilDate

  • +
  • [MonthDays] or [DaysOfMonth]

    +
  • +
+
+

If MonthDays/DaysOfMonth is +not specified, it is calculated from the StartTime of +the entry.

+
+

Yearly

+
+
    +
  • Type

  • +
  • [Interval]

  • +
  • UntilDate

  • +
  • [DaysOfMonth]

  • +
  • [Month]

  • +
+
+

Only the first item of DaysOfMonth is used.

+

DaysOfMonth and Month should +be specified together.

+

If DaysOfMonth/Month is not +specified, it is calculated from the StartTime of the +entry.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-5D647EB6-1505-4A97-931B-29D3D9ED4BA1-master.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-5D647EB6-1505-4A97-931B-29D3D9ED4BA1-master.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-5D647EB6-1505-4A97-931B-29D3D9ED4BA1_d0e1795_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-5D647EB6-1505-4A97-931B-29D3D9ED4BA1_d0e1795_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-5DA8B0F1-C299-44C6-90A7-FA12C33C11F8.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-5DA8B0F1-C299-44C6-90A7-FA12C33C11F8.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,12 @@ + + +language

language

+

Syntax:

+
[string] sysinfo.language
+

Description:

+

This is a read-only property that returns a text string containing the two-letter ISO 639-1 code that represents an international language. For a list of ISO 639-1 language codes, see the Language code table in the Symbian OS Library.

+

The returned language code is the current system language being used in a device.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-60B94D3B-4743-4254-8FD9-EB591DAADA0F.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-60B94D3B-4743-4254-8FD9-EB591DAADA0F.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,46 @@ + + +Filter +criteria for landmark databases

Filter +criteria for landmark databases

+

The following table describes the Filter object +properties for GetList calls +that retrieve information about landmark databases.

+
+ + + + + + + + + + + + +
Table: Filter object +properties for a database search
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

[Filter.DbProtocol]

+
+

Specifies the protocol for accessing databases.

+

If this property is specified, GetList returns +a list of all the databases that use this protocol. If the protocol is not +specified, GetList returns a list of all the available +databases.

+
+

string

+
+

For example: "file://"

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-620340F8-F844-445E-80AA-71C757320B7E.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-620340F8-F844-445E-80AA-71C757320B7E.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,393 @@ + + +Location Service API example

Location Service API example

+

+

This section presents the full source code of a working sample widget +for the Location Service. +You can download the wgz package for this widget from +section Example widgets.

+

For general information about creating widgets, see section Widget component files.

+

For widget development and debugging purposes, this example writes its +output to c:\data\jslog_widget.log using console.info. +For instructions on how to enable logging in the Web browser for S60, see +section JavaScript console.

+

Info.plist

+
<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Nokia//DTD PLIST 1.0//EN" "http://www.nokia.com/NOKIA_COM_1/DTDs/plist-1.0.dtd">
+<plist version="1.0">
+<dict>
+  <key>DisplayName</key>
+  <string>LocationSample</string>
+  <key>Identifier</key>
+  <string>com.nokia.widget.sapi.contact.sample</string>
+  <key>Version</key>
+  <string>1.0</string>
+  <key>MainHTML</key>
+  <string>location-sample.html</string>
+</dict>
+</plist>
+
+
+

location-sample.html

+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+  <head>
+    <script type="text/javascript" src="js/common.js"></script>
+    <script type="text/javascript" src="js/location-sample.js"></script>
+  </head>
+  <body id='docBody' bgcolor="#ddeeff" onload="setup()" style=width:100%;height:100%;>
+
+    <form name="frm">
+      <h3>Location API Sample Widget</h3>
+
+      <input type="button" onclick="getLocation('img1')" value="GetLocation"><img id="img1" src="pic/blank.png" width="25" height="25" align="center"><br>
+      <input type="button" onclick="getLocationAsync('img2')" value="GetLocationAsync"><img id="img2" src="pic/blank.png" width="25" height="25" align="center"><br>
+      <input type="button" onclick="traceLocation('img3')" value="Trace"><img id="img3" src="pic/blank.png" width="25" height="25" align="center"><br>
+      <input type="button" onclick="cancelNotification('img4')" value="CancelNotification"><img id="img4" src="pic/blank.png" width="25" height="25" align="center"><br>
+      <input type="button" onclick="calculateLocation('img5')" value="Calculate"><img id="img5" src="pic/blank.png" width="25" height="25" align="center"><br>
+
+      <hr>
+
+      <div class='locationsample' id='locationsample' bgcolor="#ddeeff" style=width:100%;height:100%;overflow:auto></div>
+
+    </form>
+
+  </body>
+</html>
+
+
+

common.js

+
// common.js
+//
+// This file contains some utility functions
+
+// Check the error code and show the information to users
+function checkError(message, resultList, divId, imgId)
+{
+  var errCode = resultList.ErrorCode;
+  var msg = "";
+
+  if (errCode) {
+    msg = message + "<BR>" + "Failed Error: " + errCode + "<BR>";
+    if(resultList.ErrorMessage != undefined)
+      msg += "Error Message: " + resultList.ErrorMessage;
+    showIMG(imgId,"no"); 
+  } else {
+    showIMG(imgId,"yes"); 
+  }
+
+  //print error message
+  if(divId != null && divId != undefined)
+    document.getElementById(divId).innerHTML = msg;
+  console.info(msg);
+
+  return errCode;
+}
+
+// Build the message by reading a iteratorable list in a recursive manner
+function showIterableList(iterator)
+{
+  var msg = "";
+  try
+  {
+    iterator.reset();
+    var item;
+    while (( item = iterator.getNext()) != undefined ){
+      msg += showObject( item );
+    }
+  }
+  catch(e)
+  {
+    alert('<showIterableList> ' + e);
+  }
+  return msg;
+}
+
+// Build the message by reading a JS object in a recursive manner
+function showObject( obj )
+{
+  var txt = "";
+  try { 
+    if ( typeof obj != 'object' )
+      return "" + obj + '<BR/>';
+    else {
+      for(var key in obj) {
+        txt +=  key + ":";
+        txt += showObject( obj[key] );
+        txt += '<BR/>';
+      }
+      txt += '<BR/>';
+    }
+  }
+  catch (e)
+  {
+    alert("showObject: " + e);
+  }
+  return txt;
+}
+
+// Show the image to indicate the test result
+function showIMG(imgId, isOK) 
+{
+  if(imgId == null || imgId == undefined)
+    return;
+
+  if(isOK == "yes")
+    document.getElementById(imgId).src = "pic/yes.png";
+  else if(isOK == "no")
+    document.getElementById(imgId).src = "pic/no.png";
+  else
+    document.getElementById(imgId).src = "pic/blank.png";
+}
+
+// Show elements in object by using 'alert'
+function testObject(obj)
+{
+  var msg = "";
+  for(var key in obj) {
+    msg = msg + ":" + key + "=" + obj[key];
+  }
+  alert(msg);
+}
+
+// Test whether the input is numeric
+function IsNumeric(sText)
+{
+  var ValidChars = "0123456789.";
+  var IsNumber=true;
+  var Char;
+
+  for (i = 0; i < sText.length && IsNumber == true; i++) 
+  {
+    Char = sText.charAt(i); 
+    if (ValidChars.indexOf(Char) == -1) 
+    {
+      IsNumber = false;
+    }
+  }
+  return IsNumber; 
+}
+
+
+

location-sample.js

+
// location-sample.js
+// 
+// In this sample Location will be listed, traced, and calculated. 
+// Also, Also, async operation will be canceled.
+//
+
+//SAPI Error Codes
+// 0  - Success
+// 1000 - InvalidServiceArgument
+// 1001 - UnknownArgumentName
+// 1002 - BadArgumentType
+// 1003 - MissingArgument
+// 1004 - ServiceNotSupported
+// 1005 - ServiceInUse
+// 1006 - ServiceNotReady
+// 1007 - NoMemory
+// 1008 - HardwareNotAvailable
+// 1009 - ServerBusy
+// 1010 - EntryExists
+// 1011 - AccessDenied
+// 1012 - NotFound
+// 1013 - UnknownFormat
+// 1014 - GeneralError
+// 1015 - CancelSuccess
+// 1016 - ServiceTimedOut
+// 1017 - PathNotFound
+
+// Declare the service object 
+var so;
+
+// imgid for callback1 function
+var imgid_callback1;
+
+// imgid for callback2 function
+var imgid_callback2;
+
+// id of the div used to display information
+const DIV_ID = 'locationsample';
+
+// Called from onload()
+function setup()
+{
+  try {
+    so = device.getServiceObject("Service.Location", "ILocation");
+    console.info("setup: so: %s", so);
+  }
+  catch (e) {
+    alert('<setup> ' +e);
+  }
+}
+
+// Get Location
+function getLocation(imgId) {
+
+  // This specifies update option used while retrieving location estimation. 
+  var updateoptions = new Object();
+  // Setting PartialUpdates to 'FALSE' ensures that user get atleast 
+  // BasicLocationInformation (Longitude, Lattitude, and Altitude.)
+  updateoptions.PartialUpdates = false;
+
+  var criteria = new Object();
+  criteria.LocationInformationClass = "GenericLocationInfo";
+  criteria.Updateoptions = updateoptions;
+
+  try {
+    var result = so.ILocation.GetLocation(criteria);
+    if(!checkError("ILocation::getLocation",result,DIV_ID,imgId)) {
+      document.getElementById(DIV_ID).innerHTML = showObject(result.ReturnValue);
+    }
+  }
+  catch (e) {
+    showIMG(imgId,"no");
+    alert ("getLocation: " + e);
+  }
+}
+
+// Get Location Async
+function getLocationAsync(imgId) {
+
+  // This specifies update option used while retrieving location estimation. 
+  var updateoptions = new Object();
+  // Setting PartialUpdates to 'FALSE' ensures that user get atleast 
+  // BasicLocationInformation (Longitude, Lattitude, and Altitude.)
+  updateoptions.PartialUpdates = false;
+
+  var criteria = new Object();
+  criteria.LocationInformationClass = "GenericLocationInfo";
+  criteria.Updateoptions = updateoptions;
+
+  // Set image id for callback1 function
+  imgid_callback1 = imgId;
+
+  try {
+    var result = so.ILocation.GetLocation(criteria, callback1);
+    if(!checkError("ILocation::getLocationAsync",result,DIV_ID,imgId)) {
+      showIMG(imgId,"");
+    }
+  }
+  catch (e) {
+    showIMG(imgId,"no");
+    alert ("getLocationAsync: " + e);
+  }
+}
+
+// Trace Location
+function traceLocation(imgId) {
+
+  // This specifies update option used while retrieving location estimation. 
+  var updateoptions = new Object();
+  // Setting PartialUpdates to 'FALSE' ensures that user get atleast 
+  // BasicLocationInformation (Longitude, Lattitude, and Altitude.)
+  updateoptions.PartialUpdates = false;
+
+  var criteria = new Object();
+  criteria.LocationInformationClass = "GenericLocationInfo";
+  criteria.Updateoptions = updateoptions;
+
+  // Set image id for callback2 function
+  imgid_callback2 = imgId;
+
+  try {
+    var result = so.ILocation.Trace(criteria, callback2);
+    if(!checkError("ILocation::traceLocation",result,DIV_ID,imgId)) {
+      showIMG(imgId,"");
+    }
+  }
+  catch (e) {
+    showIMG(imgId,"no");
+    alert ("traceLocation: " + e);
+  }
+}
+
+// Cancel Notification
+function cancelNotification(imgId) {
+
+  // "TraceCancel"
+  // "GetLocCancel"
+  var msg = "Please enter the type ['GetLocCancel' or 'TraceCancel']";
+  var cancelRequestType = prompt(msg, "TraceCancel");
+
+  if(cancelRequestType == "" || cancelRequestType == null)
+    return;
+
+  var criteria = new Object();
+  criteria.CancelRequestType = cancelRequestType;
+
+  try {
+    var result = so.ILocation.CancelNotification(criteria);
+    checkError("ILocation::cancelNotification",result,DIV_ID,imgId);   
+  }
+  catch (e) {
+    showIMG(imgId,"no");
+    alert ("cancelNotification: " + e);
+  }
+}
+
+// Calculate Location
+function calculateLocation(imgId) {
+
+  // "FindDistance"
+  // "FindBearingTo"
+  // "MoveCoordinates"
+  var msg = "enter ['FindDistance' or 'FindBearingTo' or 'MoveCoordinates']";
+  var mathRequest = prompt(msg, "FindDistance");
+  
+  if(mathRequest == "" || mathRequest == null)
+    return;
+
+  var distanceSrc = new Object();
+  distanceSrc.Latitude = 40.69;
+  distanceSrc.Longitude = 74.04; 
+  distanceSrc.Altitude = 59;
+
+  var distanceDest = new Object();
+  distanceDest.Latitude = 42.48;
+  distanceDest.Longitude = 71.19;
+  distanceDest.Altitude = 2;
+
+  var criteria = new Object();
+  criteria.MathRequest = mathRequest;
+  criteria.DistanceParamSource = distanceSrc;
+  criteria.DistanceParamDestination = distanceDest;
+  // The two parameters below are applicable only for Move coordinates (not for Find Distance and Find Bearing)
+  criteria.MoveByThisDistance = 10.0;
+  criteria.MoveByThisBearing = 10.0;
+
+  try {
+    var result = so.ILocation.Calculate(criteria);
+    if(!checkError("ILocation::Calculate",result,DIV_ID,imgId)) {
+      document.getElementById(DIV_ID).innerHTML = showObject(result.ReturnValue);
+    }
+  }
+  catch (e) {
+    showIMG(imgId,"no");
+    alert ("calculateLocation: " + e);
+  }
+}
+
+// This is the asynchronous callback handler 
+function callback1(transId, eventCode, result)
+{
+  console.info("getLocationAsync: transId: %d  eventCode: %d result.ErrorCode: %d", transId, eventCode, result.ErrorCode);
+  if(!checkError("ILocation::getLocationAsync",result,DIV_ID,imgid_callback1)) {
+    document.getElementById(DIV_ID).innerHTML = showObject(result.ReturnValue);
+  }
+}
+
+// This is the asynchronous callback handler 
+function callback2(transId, eventCode, result)
+{
+  console.info("traceLocation: transId: %d eventCode: %d result.ErrorCode: %d", transId, eventCode, result.ErrorCode);
+  if(!checkError("ILocation::traceLocation",result,DIV_ID,imgid_callback2)) {
+    document.getElementById(DIV_ID).innerHTML = showObject(result.ReturnValue);
+  }
+}
+
+
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-62B95ABA-3E85-4F9B-8103-82348366356E-master.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-62B95ABA-3E85-4F9B-8103-82348366356E-master.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-62B95ABA-3E85-4F9B-8103-82348366356E_d0e10853_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-62B95ABA-3E85-4F9B-8103-82348366356E_d0e10853_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-63189AAF-B987-450D-B605-A75921D2E61D.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-63189AAF-B987-450D-B605-A75921D2E61D.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,80 @@ + + +lightblink()

lightblink()

+

Syntax:

+
[void] sysinfo.lightblink(String lighttarget, Int duration, Int onduration, Int offduration, Int intensity)
+

Description:

+

The lightblink method switches the specified target light on and off (blinking) for the specified duration with the brightness defined by a specified light intensity.

+

Argument:

+
    +
  • lighttarget:

    + +

    Defines which target light should be blinking. Use one of the supported target light properties to specify a target light.

    + +
  • +
  • duration:

    + +

    Defines the period during which the target light is set to blink. The period is measured in milliseconds.

    +

    After the duration expires, the light state of the target will be changed to whatever state was caused by the last infinite time duration call. If there has not been a previous infinite time duration call in a session, the default state determined by the inactivity timer (system backlight timeout) is used.

    +

    If duration is lightinfiniteduration, the target light can be stopped blinking only when some other light control method is called.

    +

    Duration can have the maximum value of lightmaxduration.

    + +
  • +
  • onduration:

    + +

    Defines the period during which the target light is switched on in every blinking cycle. The period is measured in milliseconds.

    +

    onduration argument can have the maximum value of lightmaxduration.

    +

    onduration argument can be the device default cycle duration lightdefaultcycletime. However, if either onduration or offduration is lightdefaultcycletime, both arguments must be lightdefaultcycletime.

    + +
  • +
+

Note: Some devices might not support variable blinking cycle times, in which case the default value will be substituted.

+
+
    +
  • offduration:

    + +

    Defines the period during which the target light is switched off in every blinking cycle. The period is measured in milliseconds.

    +

    offduration argument can have the maximum value of lightmaxduration

    +

    offduration argument can be the device default cycle duration lightdefaultcycletime. However, if either onduration or offduration is lightdefaultcycletime, both must be lightdefaultcycletime.

    + +
  • +
+

Note: Some devices might not support variable blinking cycle times, in which case the default value will be substituted.

+
+
    +
  • intensity:

    + +

    Defines the intensity (brightness) of the target light when it is switched on.

    +

    Use the lightminintensity and the lightmaxintensity to detect the range of supported light intensity, and use any value between the range to avoid providing an invalid intensity value.

    +

    intensity argument can have the device default value lightdefaultintensity.

    + +
  • +
+

Note: All devices might not support a user-defined intensity, in which case the device will behave in its default manner.

+
+

Return value:

+

This method does not return a value.

+

Remarks:

+

Switching the mobile device lights on consumes energy. Therefore, it is recommended that you carefully consider the need for using the lights.

+

Example code:

+
function callLightBlink()
+{
+   // get the Embed element reference
+   var sysinfo = document.embeds[0];
+   /*********************
+   call lightblink() method, which turns on and off the light 
+   of all displays and keyboard with a defined duration 
+   and using the default blinking cycle time with the device 
+   default light intensity
+   *********************/
+   var target =  sysinfo.lighttargetsystem;
+   var duration = 5000; // 5 seconds
+   var onDur = sysinfo. lightdefaultcycletime;
+   var offDur = sysinfo. lightdefaultcycletime;
+   var intensity = sysinfo.lightdefaultintensity;
+   sysinfo.lightblink(target, duration, onDur, offDur, intensity);
+}
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-6359AD9D-2D02-4265-8B47-AF18713AB726.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-6359AD9D-2D02-4265-8B47-AF18713AB726.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,28 @@ + + +getMenuItemByName()

getMenuItemByName()

+

Description:

+

Call the getMenuItemByName method with a specified +menu item's label to retrieve the handle of the menu item instance.

+

For more general information on creating an options menu, see Using softkeys.

+

Syntax:

+
[MenuItem] window.menu.getMenuItemByName(String menuItemLabel) 
+

or

+
[MenuItem] menu.getMenuItemByName(String menuItemLabel)
+

Arguments:

+
    +
  • menuItemLabel:

    + +

    This is the label of an existing menu +item whose handle is being retrieved.

    + +
  • +
+

Return value:

+

The returned value is an instance of the existing MenuItem object. If the label is invalid, the method returns "undefined".

+

Example code:

+

See the example code in the description of the MenuItem.onSelect property.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-63F29096-C1A3-45DB-9E2F-6110562E0237.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-63F29096-C1A3-45DB-9E2F-6110562E0237.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,37 @@ + + +Localizing +widget resources

Localizing +widget resources

You might need to localize widget resources, such as images, to +support multiple languages.

+

To localize widget resources

    +
  1. Create localized versions +of the resources for the languages that require localization.

  2. +
  3. Store the files into +the appropriate language +project directories.

  4. +
  5. Provide default resources +in the widget root directory.

    If a specific language does +not require resource localization, the resource files do not need to be included +in the corresponding language project directory. When that language is set +as the device language, the default resources are loaded and used.

  6. +

When loading a localized resource, specify the path to the resource +file as relative to the widget root directory.

+

Example

The following pieces of code provide an +example of widget resource localization for Finnish, English and for a default +case.

    +
  1. Add the Finnish flag for use when system language is Finnish:

    [root]\fi.lproj\
    +   flag.png
  2. +
  3. Add the English flag for use when the system language is English:

    [root]\en.lproj\
    +   flag.png
  4. +
  5. Add the UN flag for use with any other system language:

    [root]\
    +   flag.png
  6. +
  7. In the JavaScript file that implements the logic of the widget, create +the following code to load and show the appropriate flag dynamically. :

    var flag = document.createElement('img');
    +flag.setAttribute('src', 'flag.png');
    +
  8. +
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-63F4E17E-8895-4054-82AD-762B90610B30.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-63F4E17E-8895-4054-82AD-762B90610B30.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,23 @@ + + +Developing +home screen widgets

Developing +home screen widgets

You can enable WRT widgets for display on the home screen.

+

To develop a home screen widget:

+
    +
  1. To enable a widget +for the home screen, add the MiniViewEnabled key to the info.plist file +of any WRT 1.1 widget.

  2. +
  3. To implement a function +in the widget that determines whether to display content in full screen or +home screen view and to call that function in response to events fired by +the widget, create JavaScript. For more information, see Determining whether to display home screen or full screen.

  4. +
  5. To retrieve data for +the widget in the home screen view, add HTML, JavaScript, and CSS definitions. +For more information, see Creating content specific to home screen widgets.

  6. +
+

For an example of developing a home screen widget, see Enabling STEW for the home screen.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-63F9FB97-9A0D-4DE4-A645-F3DB7DC39716.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-63F9FB97-9A0D-4DE4-A645-F3DB7DC39716.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,19 @@ + + +Using JavaScript controls

Using JavaScript controls

You can create JavaScript objects that contain the state and implement the behavior of a control. The controls take care of drawing themselves, including changing their appearance as a result of various state changes.

+

To create JavaScript controls

Create JavaScript to add screen controls. The following example adds a text box and a button.

var helloButton;
+var nameField;
+
+...
+    // Add a text box to the view
+    nameField = new TextField(null, "Enter your name");
+    mainView.addControl(nameField);
+    
+    // Add a button to the view
+    helloButton = new FormButton(null, "Say Hello!");
+    helloButton.addEventListener("ActionPerformed", helloButtonClicked);
+    mainView.addControl(helloButton);

Figure: Hello World widget

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-64CC3AB4-5444-474A-9470-818F423C5611.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-64CC3AB4-5444-474A-9470-818F423C5611.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,71 @@ + + +IAppManager.Cancel()

IAppManager.Cancel()

+

Description:

+

The Cancel method cancels an outstanding asynchronous +call.

+

If a cancel is sent, but the asynchronous call has already been completed, +then result.Errorcode is set to 0 (success).

+

This is a synchronous method.

+

Syntax:

+
result = so.IAppManager.Cancel(criteria);
+

Arguments:

+
    +
  • criteria:

    + +

    This is an object with the TransactionID property +(number). criteria.TransactionID specifies the transaction +ID of the asynchronous call to cancel. The transaction ID is the result.TransactionID value +that was returned as part of the result of the initial call.

    + +
  • +
+

Return value:

+

The Cancel method returns an object that contains +an error code and an error message.

+
+ + + + + + + + + + + + + + + + +
Table: Return value +properties for Cancel
+

Property

+
+

Description

+
+

Value

+
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See AppManager Service API error messages.

+
+

Example code:

+

+

For the complete source of a sample widget that demonstrates how to +use this Service API, see the +full example.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-6521F749-FA06-493B-A11D-B47F4DC0E6D6.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-6521F749-FA06-493B-A11D-B47F4DC0E6D6.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,15 @@ + + +Power information services

Power information services

+

Power information properties:

+ +

For more general information on power consumption and widgets, see Saving battery time.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-65AAF569-D347-462B-B59A-9D7CA184AB9C.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-65AAF569-D347-462B-B59A-9D7CA184AB9C.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,36 @@ + + +JavaScript Service API reference

JavaScript Service API reference

+

The +Web Runtime environment provides the following JavaScript Service APIs for accessing S60 Platform Services:

+ +

For information about the error codes returned by the Service API methods, +see section Service API error codes.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-65E5FE9D-5585-4A81-A70B-B0F593CE0436-master.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-65E5FE9D-5585-4A81-A70B-B0F593CE0436-master.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-65E5FE9D-5585-4A81-A70B-B0F593CE0436_d0e12357_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-65E5FE9D-5585-4A81-A70B-B0F593CE0436_d0e12357_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-662F2E2E-9538-42E5-9B5A-5664F1C11A9E.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-662F2E2E-9538-42E5-9B5A-5664F1C11A9E.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,106 @@ + + +Accessing +and managing information about contacts

Accessing +and managing information about contacts

+

The Contacts +Service API allows widgets to access and manage information +about contacts. This information can reside in one or more contacts databases +stored on a device or in the SIM card database. You can use the Contacts Service +to create widgets that:

+
    +
  • Retrieve information about contacts, contact groups, and +contacts databases

  • +
  • Create, edit, and delete contacts and contact groups

    +
  • +
  • Import and export contacts

  • +
  • Organize contacts into contact groups

  • +
+

The default contacts database is stored on the device and its URI is cntdb://c:contacts.cdb. +It is created when the first contact is added to it. The URI for the SIM card +database is sim://global_adn.

+

Accessing the API and supported methods

+

To create a service +object for the Contacts Service API, use Service.Contact to +identify the service provider and IDataSource to identify +the supported interface:

+ +
var so = device.getServiceObject("Service.Contact", "IDataSource");
+

The IDataSource interface provides the following +methods:

+
    +
  • GetList()

    + +

    Use the GetList() method to retrieve information +about contacts, contact groups, or contacts databases.

    + +
  • +
  • Add()

    + +

    Use the Add() method to add a contact or contact +group to a contacts database. You can also use this method to edit an existing +contact or contact group.

    + +
  • +
  • Delete()

    + +

    Use the Delete() method to delete one or more contacts +or contact groups from a contacts database.

    + +
  • +
  • Import()

    + +

    Use the Import() method to import a contact to +a contacts database. The information must be imported from a vCard file.

    + +
  • +
  • Export()

    + +

    Use the Export() method to export a contact from +a contacts database. The information is exported to a vCard file.

    + +
  • +
  • Organise()

    + +

    Use the Organise() method to add contacts to a +contact group or to remove contacts from a contact group.

    + +
  • +
  • Cancel()

    + +

    Use the Cancel() method to cancel an ongoing asynchronous +call. This method is valid for any asynchronous call made through the Contacts +Service API.

    + +
  • +
+
+

Using the service in a widget

+

To access and manage information about contacts using the Contacts Service +API:

+
    +
  1. Create a service +object for the API using device.getServiceObject().

    +
  2. +
  3. Define the +tasks you want to perform and choose the correct methods for them.

    +
  4. +
  5. Optionally, +define how you want the results filtered.

  6. +
  7. Define a handler +method to process the results.

  8. +
  9. Use the methods +defined in step 2 to perform the tasks. Use asynchronous methods together +with callback().

    +
  10. +
  11. Process the +results in the handler method defined in step 4.

  12. +
+

For the complete source of a sample widget that demonstrates how to +use this service, see the +full example.

+
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-686FDCE2-4487-4402-8347-875350D30163.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-686FDCE2-4487-4402-8347-875350D30163.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,907 @@ + + +Supported +contact keys

Supported +contact keys

+

+

The information about a contact is represented as keys. Each key corresponds +to a specific piece of information, such as first name, last name, home phone +number, or email address. Each contact has at least one key. The supported +set of keys depends on the contacts database. If you try to add a key to a +database that does not support it, the Add method +returns an error message.

+

The following table lists the combined set of keys supported by databases +compatible with S60 5th Edition:

+
    +
  • The default device database (URI: cntdb://c:contacts.cdb) +supports all the listed keys.

  • +
  • The SIM card database (URI: sim://global_adn) +supports a subset of the listed keys. The supported keys are indicated in +the Supported by SIM column.

  • +
+

In JavaScript, keys are represented as objects, with the key name as +the object name. For example, the ReturnValue iterator +returned by a GetList call might contain the following +keys (objects) for the first contact item:

+
    +
  • ReturnValue[0].FirstName

  • +
  • ReturnValue[0].LastName

  • +
  • ReturnValue[0].LandPhoneHome

    +
  • +
  • ReturnValue[0].EmailHome

  • +
+

Note: The SyncClass key is added to a contact by default, +with the Label property set to "Synchronisation" and +the Value property to "private", +unless specified as "public". Values other than "private" or "public" are +stored as "private".

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Contact keys
+

Key

+
+

Description

+
+

Maximum length

+
+

Supported by SIM

+
+

LastName

+
+

Last name

+
+

50 (14 for SIM)

+
+

X

+
+

FirstName

+
+

First name

+
+

50

+
 
+

Prefix

+
+

Name prefix

+
+

10

+
 
+

Suffix

+
+

Name suffix

+
+

10

+
 
+

SecondName

+
+

Second name

+
+

50

+
 
+

LandPhoneHome

+
+

Home land phone number

+
+

48

+
 
+

MobilePhoneHome

+
+

Home mobile phone number

+
+

48

+
 
+

VideoNumberHome

+
+

Home video number

+
+

48

+
 
+

FaxNumberHome

+
+

Home fax number

+
+

48

+
 
+

VoipHome

+
+

Home VoIP phone number

+
+

100

+
 
+

EmailHome

+
+

Home email address

+
+

150

+
 
+

URLHome

+
+

Home URL

+
+

1000

+
 
+

AddrLabelHome

+
+

Home address label

+
+

250

+
 
+

AddrPOHome

+
+

Home address post office

+
+

20

+
 
+

AddrEXTHome

+
+

Home address extension

+
+

50

+
 
+

AddrStreetHome

+
+

Home address street

+
+

50

+
 
+

AddrLocalHome

+
+

Home address local

+
+

50

+
 
+

AddrRegionHome

+
+

Home address region

+
+

50

+
 
+

AddrPostCodeHome

+
+

Home address postal code

+
+

20

+
 
+

AddrCountryHome

+
+

Home address country

+
+

50

+
 
+

JobTitle

+
+

Job title

+
+

50

+
 
+

CompanyName

+
+

Company name

+
+

50

+
 
+

LandPhoneWork

+
+

Work land phone number

+
+

48

+
 
+

MobilePhoneWork

+
+

Work mobile phone number

+
+

48

+
 
+

VideoNumberWork

+
+

Work video number

+
+

48

+
 
+

FaxNumberWork

+
+

Work fax number

+
+

48

+
 
+

VoipWork

+
+

Work VoIP phone number

+
+

100

+
 
+

EmailWork

+
+

Work email address

+
+

150

+
 
+

URLWork

+
+

Work URL

+
+

1000

+
 
+

AddrLabelWork

+
+

Work address label

+
+

250

+
 
+

AddrPOWork

+
+

Work address post office

+
+

20

+
 
+

AddrEXTWork

+
+

Work address extension

+
+

50

+
 
+

AddrStreetWork

+
+

Work address street

+
+

50

+
 
+

AddrLocalWork

+
+

Work address local

+
+

50

+
 
+

AddrRegionWork

+
+

Work address region

+
+

50

+
 
+

AddrPostCodeWork

+
+

Work address postal code

+
+

20

+
 
+

AddrCountryWork

+
+

Work address country

+
+

50

+
 
+

LandPhoneGen

+
+

General land phone number

+
+

48

+
 
+

MobilePhoneGen

+
+

General mobile phone number

+
+

48

+
+

X

+
+

VideoNumberGen

+
+

General video number

+
+

48

+
 
+

FaxNumberGen

+
+

General fax number

+
+

48

+
 
+

VOIPGen

+
+

General VoIP phone number

+
+

100

+
 
+

POC

+
+

Push to Talk over Cellular (PoC)

+
+

100

+
 
+

SWIS

+
+

"See What I See" (SWIS)

+
+

100

+
 
+

SIP

+
+

SIP identity

+
+

100

+
 
+

EmailGen

+
+

General email address

+
+

150

+
 
+

URLGen

+
+

General URL

+
+

1000

+
 
+

AddrLabelGen

+
+

General address label

+
+

250

+
 
+

AddrPOGen

+
+

General address post office

+
+

20

+
 
+

AddrExtGen

+
+

General address extension

+
+

50

+
 
+

AddrStreetGen

+
+

General address street

+
+

50

+
 
+

AddrLocalGen

+
+

General address local

+
+

50

+
 
+

AddrRegionGen

+
+

General address region

+
+

50

+
 
+

AddrPostCodeGen

+
+

General address postal code

+
+

20

+
 
+

AddrCountryGen

+
+

General address country

+
+

50

+
 
+

PageNumber

+
+

Pager number

+
+

48

+
 
+

DTMFString

+
+

DTMF string

+
+

60

+
 
+

Date

+
+

Date

+
+

This key is in TTime format.

+
 
+

Note

+
+

Note

+
+

1000

+
 
+

Ringtone

+
+

Ring tone

+
+

256

+
 
+

MiddleName

+
+

Middle name

+
+

50

+
 
+

Department

+
+

Department name

+
+

50

+
 
+

AsstName

+
+

Assistant name

+
+

50

+
 
+

Spouse

+
+

Spouse name

+
+

50

+
 
+

Children

+
+

Children

+
+

50

+
 
+

AsstPhone

+
+

Assistant phone number

+
+

50

+
 
+

CarPhone

+
+

Car phone number

+
+

48

+
 
+

Anniversary

+
+

Anniversary

+
+

This key is in TTime format.

+
 
+

SyncClass

+
+

Synchronisation

+

Possible values:

+
    +
  • "Public"

  • +
  • "Private"

  • +
+

Any other value is interpreted as "Private".

+
+

1000

+
 
+

LOCPrivacy

+
+

Locality privacy

+
+

256

+
 
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-697AFF1F-24C7-43BD-A072-8352B3BE973C.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-697AFF1F-24C7-43BD-A072-8352B3BE973C.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,151 @@ + + +IAppManager.LaunchApp()

IAppManager.LaunchApp()

+

Description:

+

The LaunchApp method launches an application based +on a unique ID for the application (UID). It also provides a way to open a +specific document (by specifying a document path), even if it is not the default +file type for the application being launched. For +example, you can specify a path to a document with a .txt extension +to open in WordPad, even though Notepad is the default application for .txt +files.

+

The application can be launched as chained (embedded) or stand-alone. +For more information about embedded and stand-alone applications, see section Accessing and launching installed applications.

+

This method can be called both synchronously and asynchronously.

+

Syntax:

+

For synchronous calls:

+
result = so.IAppManager.LaunchApp(criteria);
+ +

For asynchronous calls:

+
result = so.IAppManager.LaunchApp(criteria, callback);
+ +

Arguments:

+
    +
  • criteria:

    + +

    This is an object that specifies which application to launch. For more +information about the object properties and how to define them, see section Criteria for launching an application.

    + +
  • +
  • callback:

    + +

    The callback argument is the name of the method +that is executed when an asynchronous LaunchApp call +has status information to return. You must define this method separately. +Follow the instructions in section Defining the callback handler for an asynchronous method to +define the callback method.

    +

    This argument is used only with an asynchronous LaunchApp call.

    + +
  • +
+

Return value:

+

If synchronous, the LaunchApp method returns an +object that contains an error code and an error message.

+
+ + + + + + + + + + + + + + + +
Table: Return value +properties for a synchronous LaunchApp
+

Property

+
+

Description

+
+

Value

+
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See AppManager Service API error messages.

+
+

If asynchronous, the method returns an object that contains a transaction +ID for the callback instance, +an error code, and an error message (see the following table). When the asynchronous +call has completed, callback returns an +object that contains an error code and an error message (see Table: Callback return value).

+

Note: If Cancel is +called on an ongoing asynchronous request, LaunchApp will +not return a notification when the launched application terminates.

+
+
+ + + + + + + + + + + + + + + + + + + + +
Table: Return value +properties for an asynchronous LaunchApp
+

Property

+
+

Description

+
+

Value

+
+

result.TransactionID

+
+

This is a number used as an identification to match transactions started +with the asynchronous LaunchApp call to one or more calls +it generates to callback.

+
 
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See AppManager Service API error messages.

+
+

Remarks:

+

Use the GetList method +to retrieve the unique ID of the application to launch.

+

Example code:

+

+

For the complete source of a sample widget +that demonstrates how to use this Service API, see the +full example.

+ + + + +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-69A2FEC3-0BB7-4165-A473-76F1823A4534.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-69A2FEC3-0BB7-4165-A473-76F1823A4534.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,25 @@ + + +setDisplayPortrait()

setDisplayPortrait()

+

Description:

+

The setDisplayPortrait method changes the orientation of a widget's screen to the portrait mode.

+

Syntax:

+
[void] window.widget.setDisplayPortrait(void) 
+

or

+
[void] widget.setDisplayPortrait(void)
+

Arguments:

+

This method does not take any arguments.

+

Return value:

+

This method does not return a value.

+

Remarks:

+

setDisplayPortrait() should be used only if a device supports screen orientation changes. To check this, use the isrotationsupported property.

+

This method only changes the orientation of the screen. It does not change the behavior of other UI components of a device such as the softkeys and their associated keys.

+

For more information on handling screen orientation changes in a widget, see Designing for dynamic screen orientation.

+

Example code:

+
if (widget.isrotationsupported)
+   // change the screen orientation
+   widget.setDisplayPortrait();
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-6B348161-2ED2-498E-A166-C3B28C58BC68.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-6B348161-2ED2-498E-A166-C3B28C58BC68.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,19 @@ + + +Vibration information and control services

Vibration information and control services

+

Vibration control methods:

+ +

Vibration information properties:

+ +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-6C3D58CA-CA4F-432B-898B-4020064E3CE6.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-6C3D58CA-CA4F-432B-898B-4020064E3CE6.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,443 @@ + + +Logging Service API error messages

Logging Service API error messages

+

This section provides information about the error messages returned +by the Logging Service API methods.

+

GetList

+

The following table describes the error messages returned by GetList and callback for GetList as +part of their return value.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: GetList error +messages
+

Error message

+
+

Description

+
+

Logging : GetList : TypeInvalid

+
+

This indicates that the type of the Type property +is incorrect.

+
+

Logging : GetList : TypeMissing

+
+

This indicates that the Type property is missing +from the input.

+
+

Logging : GetList : FilterInvalid

+
+

This indicates that the type of the Filter property +is incorrect.

+
+

Logging : GetList: idInvalid

+
+

This indicates that the type of id is incorrect.

+
+

Logging : GetList: RecentListInvalid

+
+

This indicates that the type of RecentList is incorrect.

+
+

Logging : GetList: PhoneNumberInvalid

+
+

This indicates that the type of PhoneNumber is +incorrect.

+
+

Logging : GetList: DirectionInvalid

+
+

This indicates that the type of Direction is incorrect.

+
+

Logging : GetList: DeliveryStatusInvalid

+
+

This indicates that the type of DeliveryStatus is +incorrect.

+
+

Logging : GetList: LogFlagsInvalid

+
+

This indicates that the type of LogFlagsStatus is +incorrect.

+
+

Logging : GetList: EndTimeInvalid

+
+

This indicates that the type of EndTimeStatus is +incorrect.

+
+

Logging : GetList: RemotePartyInvalid

+
+

This indicates that the type of RemotePartyStatus is +incorrect.

+
+

Logging : GetList: EventTypeInvalid

+
+

This indicates that the type of EventTypeStatus is +incorrect.

+
+

Add

+

The following table describes the error messages returned by Add and callback for Add as +part of their return value.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Add error messages
+

Error message

+
+

Description

+
+

Logging : Add : TypeInvalid

+
+

This indicates that the type of the Type property +is incorrect.

+
+

Logging : Add : TypeMissing

+
+

This indicates that the Type property is missing +from the input.

+
+

Logging : Add : ItemInvalid

+
+

This indicates that the type of the Item property +is incorrect.

+
+

Logging : Add : ItemMissing

+
+

This indicates that the Item property is missing +from the input.

+
+

Logging : Add : EventTypeInvalid

+
+

This indicates that the type of EventType is incorrect.

+
+

Logging : Add : EventTypeMissing

+
+

This indicates that EventType is missing from the +input.

+
+

Logging : Add : RemotePartyInvalid

+
+

This indicates that the type of RemoteParty is +incorrect.

+
+

Logging : Add : EventDurationInvalid

+
+

This indicates that the type of EventDurationInvalid is +incorrect.

+
+

Logging : Add : DeliveryStatusInvalid

+
+

This indicates that the type of DeliveryStatusInvalid is +incorrect.

+
+

Logging : Add : SubjectInvalid

+
+

This indicates that the type of SubjectInvalid is +incorrect.

+
+

Logging : Add : PhoneNumberInvalid

+
+

This indicates that the type of PhoneNumberInvalid is +incorrect.

+
+

Logging : Add : EventDataInvalid

+
+

This indicates that the type of EventDataInvalid is +incorrect.

+
+

Logging : Add : LinkInvalid

+
+

This indicates that the type of LinkInvalid is +incorrect.

+
+

Logging : Add : LogFlagsInvalid

+
+

This indicates that the type of LogFlagsInvalid is +incorrect.

+
+

Logging : Add : DirectionInvalid

+
+

This indicates that the type of DirectionInvalid is +incorrect.

+
+

Delete

+

The following table describes the error messages returned by Delete and callback for Delete as +part of their return value.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Delete error +messages
+

Error message

+
+

Description

+
+

Logging : Delete : TypeInvalid

+
+

This indicates that the type of the Type property +is incorrect.

+
+

Logging : Delete : TypeMissing

+
+

This indicates that theType property is missing +from the input.

+
+

Logging : Delete : DataInvalid

+
+

This indicates that the type of the Data property +is incorrect.

+
+

Logging : Delete : DataMissing

+
+

This indicates that the Data property is missing +from the input.

+
+

Logging : Delete :idInvalid

+
+

This indicates that the type of id is incorrect.

+
+

Logging : Delete : id

+
+

This indicates that id is missing from the input.

+
+

RequestNotification

+

The following table describes the error messages returned by RequestNotification and callback for RequestNotification as part of their return value.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: RequestNotification +error messages
+

Error message

+
+

Description

+
+

Logging : RequestNotification : TypeInvalid

+
+

This indicates that the type of the Type property +is incorrect.

+
+

Logging : RequestNotification : TypeMissing

+
+

This indicates that Type property is missing from +the input.

+
+

Logging : RequestNotification : FilterInvalid

+
+

This indicates that the type of the Filter property +is incorrect.

+
+

Logging : RequestNotification : FilterMissing

+
+

This indicates that the Filter property is missing +from the input.

+
+

Logging : RequestNotification : DelayTimeInvalid

+
+

This indicates that the type of DelayTime is incorrect.

+
+

Logging : RequestNotification : DelayTimerMissing

+
+

This indicates that DelayTime is missing from the +input.

+
+

Cancel

+

The following table describes the error messages returned by Cancel as part of its return value.

+
+ + + + + + + + + + + + + +
Table: RequestNotification +error messages
+

Error message

+
+

Description

+
+

Logging : Cancel: TransactionIdInvalid

+
+

This indicates that either an invalid TransactionID was +passed or an asynchronous call associated with this ID has already been completed.

+
+

Logging : Cancel: TransactionIdMissing

+
+

This indicates that the TransactionID property +is missing from the input.

+
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-6C793265-794B-49DB-BB14-B1D1F5F0CF6C_d0e10613_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-6C793265-794B-49DB-BB14-B1D1F5F0CF6C_d0e10613_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-6CD2776F-A868-4280-967F-4EB426212556.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-6CD2776F-A868-4280-967F-4EB426212556.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,29 @@ + + +JavaScript widget object

JavaScript widget object

+

The widget object is supported since WRT 1.0.

+

The widget object is a built-in JavaScript object in the widget engine. It is extended from the window object to provide widget-specific APIs that perform fundamental operations.

+

The widget object can be accessed via the window object window.widget or simply widget. Thus, in the WRT environment, the term widget is a reserved keyword and should not be used as a user-defined global variable name representing other objects or data types.

+

widget object methods:

+ +

widget object properties:

+ +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-6CD85E8A-698E-4BE2-B965-887E66E51ACC.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-6CD85E8A-698E-4BE2-B965-887E66E51ACC.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,17 @@ + + +isrotationsupported

isrotationsupported

+

Description:

+

isrotationsupported is a read-only property that returns a Boolean value determining if the device supports landscape and portrait screen orientations.

+

If the value is true, the device supports both landscape and portrait screen orientations.

+

For more information on handling screen orientation changes in a widget, see Designing for dynamic screen orientation.

+

Syntax:

+
[Boolean] window.widget.isrotationsupported
+

or

+
[Boolean] widget.isrotationsupported
+

Example code:

+

See the setDisplayLandscape() or setDisplayPortrait() example code

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-6D7228E7-8E06-495D-85F7-A4B1716D4CDE.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-6D7228E7-8E06-495D-85F7-A4B1716D4CDE.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,69 @@ + + +IDataSource.Cancel()

IDataSource.Cancel()

+

Description:

+

The Cancel method cancels an ongoing asynchronous +call made with a Landmarks Service API method.

+

This is a synchronous method.

+

Syntax:

+
result = so.IDataSource.Cancel(criteria);
+

Arguments:

+
    +
  • criteria:

    + +

    This is an object with the TransactionID property +(number). criteria.TransactionID specifies the transaction +ID of the asynchronous call to cancel. The transaction ID is the result.TransactionID value +that was returned as part of the result of the initial call.

    + +
  • +
+

Return value:

+

The Cancel method returns an object that contains +an error code and an error message.

+
+ + + + + + + + + + + + + + + + +
Table: Return value +properties for Cancel
+

Property

+
+

Description

+
+

Value

+
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See Landmarks Service API error messages.

+
+

Example code:

+

+

For the complete source of a sample widget that demonstrates how to +use this Service API, see the +full example.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-6DD2B3D2-BA3B-4936-BBC9-F61B6757B6F8.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-6DD2B3D2-BA3B-4936-BBC9-F61B6757B6F8.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,21 @@ + + +Managing user interaction

Managing user interaction

To create useful widgets, you need to collect information from users about the task at hand. For example, to fetch a route and timetables to a specific location by using public transportation, users need to enter the starting point and the destination. Some S60 devices rely on physical keys such as a five way navigation pad, a keypad, keyboard, and set of labeled soft keys for user input. Some S60 devices support stylus and finger touch screen input.

+

Users enter information by using screen controls, such as check boxes, radio buttons, text fields, and selection lists.

+

Interacting through keypad

To make an application interactive to the mobile device user, you need to handle keypad input in the application, preferably by implementing the functionality in separate JavaScript files. This is in many ways similar to Web application development, but includes some aspects that are specific for the mobile device environment. The keypad input may include the following:

Note: Web Runtime does not support the use of a full keyboard with the mobile device through a Bluetooth connection.

+

Interacting through touch

Touch enables direct manipulation of content and objects, allowing for more natural interaction with the device. This means a completely different user experience and interaction style compared to using a hardware keypad. If the application supports S60 5th Edition devices, keep in mind that the devices might not have a hardware keyboard. Enable users to interact with the application through the touch screen:

For more information about designing for touch devices, see S60 touch.

You can also use custom input methods, such as, strokes, gestures, and custom buttons. For more information, see Custom input methods.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-6F263194-7237-42E8-8DD1-445A69291524.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-6F263194-7237-42E8-8DD1-445A69291524.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,70 @@ + + +Criteria for +retrieving channel property information

Criteria for +retrieving channel property information

+

The criteria object specifies which sensor +channel property to retrieve information about.

+

The criteria object has two main properties: ChannelInfoMap and PropertyId. These are described in the following table.

+
+ + + + + + + + + + + + + + + + + + +
Table: Criteria object properties
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

criteria.ChannelInfoMap

+
+

Specifies the sensor channel of the property.

+

Retrieve this object using the FindSensorChannel method.

+

For more information about the object, see section Sensor channel information.

+
+

object

+
+

See section Sensor channel information.

+
+

criteria.PropertyId

+
+

Specifies the identifier of the property.

+
+

string

+
+

Possible values:

+
    +
  • "Availability"

  • +
  • "ChannelAccuracy"

  • +
  • "ChannelDataFormat"

  • +
  • "ChannelScale"

  • +
  • "ChannelUnit"

  • +
  • "ConnectionType"

  • +
  • "DataRate"

  • +
  • "Description"

  • +
  • "MeasureRange"

  • +
  • "ScaledRange"

  • +
  • "SensorModel"

  • +
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-6FBE64B7-0949-4AAE-B835-52B276540A59.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-6FBE64B7-0949-4AAE-B835-52B276540A59.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,95 @@ + + +Accessing +data from the physical sensors of a device

Accessing +data from the physical sensors of a device

+

The Sensor Service +API allows widgets to access data provided by the +physical sensors of a device. The data from a given sensor is mapped to one +or more sensor channels, which the API can listen to. The available sensors +depend on the device. You can use the Sensor Service to create widgets that:

+
    +
  • Search for sensor channels available on a device

  • +
  • Listen for data provided by one or more sensor channels

    +
  • +
  • Retrieve information about sensor channel properties

    +
  • +
+

Sensor information involves the following concepts:

+
    +
  • Sensor is a physical sensor on a device (a piece of +hardware combined with a software plugin). A single sensor can provide multiple +sensor channels, such as a raw data channel and event channels, or incorporate +multiple sensor readings into a single sensor channel.

  • +
  • Sensor property is a configuration value of a sensor. +The property affects all sensor channels that draw data from the sensor.

    +
  • +
  • Channel is an abstraction of a physical sensor. Data +from one physical sensor can be mapped to multiple sensor channels.

    +
  • +
  • Channel property is a configuration value of a sensor +channel. The property affects all clients listening to the channel.

    +
  • +
+

Accessing the API and supported methods

+

To create a service +object for the Sensor Service API, use Service.Sensor to +identify the service provider and ISensor to identify +the supported interface:

+ +
var so = device.getServiceObject("Service.Sensor", "ISensor");
+

The ISensor interface provides the following methods:

+
    +
  • FindSensorChannel()

    + +

    Use the FindSensorChannel() method to search for +sensor channels available on the device.

    + +
  • +
  • RegisterForNotification()

    + +

    Use the RegisterForNotification() method to receive +data from one sensor channel.

    + +
  • +
  • Cancel()

    + +

    Use the Cancel() method to stop receiving data +provided by a RegisterForNotification() call.

    + +
  • +
  • GetChannelProperty()

    + +

    Use the GetChannelProperty() method to retrieve +information about a sensor channel property.

    + +
  • +
+
+

Using the service in a widget

+

To access sensor data on a device using the Sensor Service API:

+
    +
  1. Create a service +object for the API using device.getServiceObject().

    +
  2. +
  3. Define the +tasks you want to perform and choose the correct methods for them.

    +
  4. +
  5. Optionally, +define how you want the results filtered.

  6. +
  7. Define methods +to process the results.

  8. +
  9. Retrieve the +results using the methods from step 2. Use asynchronous methods together with callback().

    +
  10. +
  11. Process the +results using the methods defined in step 4.

  12. +
+

For the complete source of a sample widget that demonstrates how to +use this service, see the +full example.

+
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-700E79DD-D201-4B68-925F-D65B717BA032.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-700E79DD-D201-4B68-925F-D65B717BA032.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,29 @@ + + +Before +you start

Before +you start

To develop a widget for a mobile device, you need:

  • Desktop computer that can be used to develop Web content

  • Text editor to create HTML, CSS, and JavaScript files

    A text editor such as Notepad is sufficient for developing widgets. +However, you can also use a more advanced development tool. Web developers +can use the same tools that they have used for creating Web content.

  • Graphics program if you need to create images for your widget

  • ZIP utility such as WinZip to +create the widget installation package

  • Desktop Web browser, such as Mozilla +Firefox or Internet Explorer

  • Mobile device that can run widgets

    Use a mobile device for testing your widget. To check +which mobile devices support widgets and the Web Runtime environment, see +section Web Runtime versions and device support.

    Note: S60 3rd Edition, Feature Pack 2 only supports WRT 1.0. If you are developing +the widget for a newer WRT, make sure that your device runs an S60 platform +version that supports that WRT.

    Note: To transfer your widget to a mobile device, you need a connection between +your PC and your mobile device. USB cables and Bluetooth connection are commonly +used for this purpose, but the suitable connection type depends on the mobile +device and PC. Check the documentation of your mobile device for information +on how to make these connections. One typical method is to use the version +of Nokia PC Suite that +is compatible with your mobile device.

    In addition to a mobile device, you can also view and test your widget +with the device emulator included in the S60 C++ SDK package. The SDK is available +for download from Forum +Nokia. To successfully install the SDK, you need to have Microsoft +Windows XP SP2 or later with ActivePerl 5.6.1.x running on your computer. +Check the Installation Guide provided with the SDK for the precise software +requirements.

For an overview of the steps included in the widget development process, +see section Widget development process.

\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-704CF29C-1FDC-4192-9338-C8B9B926111C.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-704CF29C-1FDC-4192-9338-C8B9B926111C.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,33 @@ + + +append()

append()

+

Description:

+

Call the append method to add a menu item to the +top level of the options menu list.

+

Menu items are shown on the options menu list in the order in which +they are appended.

+

For more general information on constructing an options menu, see Using softkeys.

+

Syntax:

+
[void] window.menu.append(MenuItem menuItem)
+

or

+
[void] menu.append(MenuItem menuItem)
+

Arguments:

+
    +
  • menuItem:

    + +

    This is an instance of the MenuItem object +which is being added to the top level of the options menu.

    + +
  • +
+

Return value:

+

This method does not return a value.

+

Remarks:

+

Cascading submenus are created using the MenuItem object. +See also the description of the MenuItem.append method.

+

Example code:

+

See the example code in the description of the MenuItem.onSelect property.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-70769124-8CCC-4389-9C45-2423B8BB04AC.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-70769124-8CCC-4389-9C45-2423B8BB04AC.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,13 @@ + + +Using images in the HTML

Using images in the HTML

You can use all the image types supported by HTML in Web applications.

+

Incorporating images

In the appropriate div element (which controls the page), add one of the following HTML elements:

    +
  • img—For inline images, such as icons or small graphics.

  • +
  • object—For images, applets, and video.

  • +

For example, add the following code to the HTML file to add a reference to an image called image.png stored in the images subfolder in the application project folder:

<img src="images/image.png" alt=""/>

Add the following code to the HTML file to use the OBJECT element to add the same image:

<OBJECT 	data="images/image.png" alt=""
+				type="image/png"
+<OBJECT/>

For more information on adding images to HTML, see Objects, Images, and Applets in the W3C HTML 4.01 Specification.

Store the images either directly under the root directory or in any subfolder under the root directory in the widget project folder. For more information, see Widget component files.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-71A21D8D-78E3-4FEE-9F46-5D175DE5BC12.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-71A21D8D-78E3-4FEE-9F46-5D175DE5BC12.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,77 @@ + + +STEW: implementing a Twitter service

STEW: implementing a Twitter service

Implement a Twitter service to fetch data from Twitter.

+

The TwitterService object that fetches data from Twitter is located in the TwitterService.js file. A REST (Representational State Transfer) API call is created by constructing a URL with the appropriate Twitter method name and parameters. The credentials are encoded in the URL to log users into Twitter automatically. A JSON (JavaScript Object Notation) response is requested and the maximum number of returned responses is set. The URL is passed to the _doRequest function.

+
TwitterService.prototype.getFriendsTweets = function( count, progressId ) {
+	// Build URL and do the request.
+	var url = "http://" + this.username + ":" + this.password + "@twitter.com/statuses/friends_timeline.json?count=" + count;
+	this._doRequest( url );
+}
+
+

The _doRequest function makes an asynchronous request to the URL. The function also sets the type of the request to GET or POST. Before making the actual request by calling the XMLHttpRequest send function a function is assigned to the XMLHttpRequest readystatechange event handler.

+
TwitterService.prototype._doRequest = function( url, type ){
+    this.httpReq = new XMLHttpRequest();
+	
+    var self = this;
+    this.httpReq.onreadystatechange = function() { 
+		self._readyStateChanged(); 
+	};
+
+	// Default to GET HTTP request if none is provided.
+	if ( type == null ) {
+		type = "GET";
+	}
+	
+    this.httpReq.open( type, url, true );			
+    this.httpReq.send( "" );
+}
+
+

The _readyStateChanged function is the heart of the TwitterService. The readystatechange event is not only triggered when the request is complete so whenever the event handler function gets called, the value of the XMLHttpRequest readyState property must be checked. Value 4 (DONE) indicates that the data transfer has been completed or that something went wrong during the transfer. Because it indicates both successful and unsuccessful requests, the response status of the request must be determined by looking at the status property of the XMLHttpRequest. If the value is 200 (OK), the response text is retrieved from the XMLHttpRequest responseText property. Any other value indicates that an error has occurred during the request.

+
TwitterService.prototype._readyStateChanged = function() {
+    // complete request?
+    if ( this.httpReq.readyState == 4 ) {
+        // attempt to get response status
+        var responseStatus = null;
+        try {
+            responseStatus = this.httpReq.status;
+        } 
+		catch (noStatusException) {
+			alert( StringTable.Code.twitterServiceNoStatusAlert );
+		}
+		
+		// Check response status.
+		if ( responseStatus == 200 ) {
+			var res = null;
+			
+			// If response doesn't contain xml, forward text.
+			res = this.httpReq.responseText;
+
+			// Not needed anymore.
+			this.httpReq = null;
+			this.handleSuccessResponse.call( this, res );
+		} else {
+			this.handleErrorResponse.call( this, responseStatus );
+		}
+    }
+}
+
+

Depending on the response status of the request, either handleSuccessResponse or handleErrorResponse is triggered to notify whoever triggered the request. Since this is all done asynchronously, callback functions are used.

+
TwitterService.prototype.handleSuccessResponse = function( arg ) {
+	// Eval the data.
+	var response = eval( "(" + arg  + ")" );
+
+    // Feed fetched and parsed successfully.
+	if ( this.onSuccess )
+		this.onSuccess.call( this, response );	
+}
+	
+TwitterService.prototype.handleErrorResponse = function( status ) {
+	if ( this.onError )
+		this.onError.call( this, status );
+}
+
+

If onSuccess or onError functions are defined, they are called with a response object. For an error response, this object is an integer that indicates the status of the request. For a successful response, before triggering the onSuccess callback, an eval is performed on the response text. This creates JavaScript objects from JSON response text into the response variable, which is then passed as a parameter to the onSuccess callback.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-71BE0F0B-B6B2-475C-A87B-A04E207F3292.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-71BE0F0B-B6B2-475C-A87B-A04E207F3292.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,17 @@ + + +Language project directory

Language project directory

A language project directory is a subfolder under the widget root directory that contains all the localized resources for a specific language.

+

A language project directory is named xx.lproj, where xx is the two-letter ISO 639-1 code that represents an international language and .lproj is a constant string standing for “language project”. For a list of ISO 639-1 language codes, see the Language code table in the Symbian OS Library.

+

Examples of language project directories:

+
    +
  • en.lproj for English

  • +
  • fi.lproj for Finnish

  • +
  • zh_Hans.lproj for Simplified Chinese

  • +
  • zh_Hant.lproj for Traditional Chinese

  • +
+

All language project directories must be located as direct subfolders under the widget root directory.

+

Figure: Example directory structure

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-72B35641-7973-4A16-9B9F-B411107025CB-master.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-72B35641-7973-4A16-9B9F-B411107025CB-master.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-72B35641-7973-4A16-9B9F-B411107025CB_d0e3306_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-72B35641-7973-4A16-9B9F-B411107025CB_d0e3306_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-72B5BFF3-DA09-4475-AA88-865852AAB2F0.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-72B5BFF3-DA09-4475-AA88-865852AAB2F0.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,131 @@ + + +Criteria for +organizing contacts in a contact group

Criteria for +organizing contacts in a contact group

+

The criteria object specifies which contact +group to organize and how. This involves:

+
    +
  • Defining the target group

  • +
  • Defining the target contact or contacts

  • +
  • Defining whether to add the contacts to the group (associate) +or remove the contacts from the group (disassociate)

  • +
  • Optionally defining on which contacts database to perform +the operation

  • +
+

The criteria object has three main properties: Type, Data, +and OperationType. These are described in the following +table. Properties enclosed in brackets are optional.

+

Note: All string values in the object are Unicode.

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Criteria object properties
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

criteria.Type

+
+

Specifies the type of contact information to organize. This is always "Group".

+
+

string

+
+

Possible values:

+
    +
  • "Group"

  • +
+
+

criteria.Data

+
+

Specifies the contact group to organize.

+
+

object

+
+

Object with the properties specified below

+
+

[criteria.Data.DBUri]

+
+

Specifies the contacts database on which to perform the operation.

+

If this property is not specified, the default database is used.

+
+

string

+
 
+

criteria.Data.id

+
+

Specifies the unique identifier of the contact group to organize.

+

Use GetList to +retrieve this ID.

+
+

string

+
 
+

criteria.Data.IdList

+
+

Specifies the unique identifiers of the contacts to add or remove.

+

Data.IdList[0] contains the ID of the first contact.

+

Use GetList to +retrieve these IDs.

+
+

array of strings

+
 
+

criteria.OperationType

+
+

Specifies whether to add the contacts to the group (associate) or remove +the contacts from the group (disassociate).

+
+

string

+
+

Possible values:

+
    +
  • "Associate"

  • +
  • "Disassociate"

  • +
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-7471ECB1-EB67-4794-8D85-4F91F4F43742_d0e10446_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-7471ECB1-EB67-4794-8D85-4F91F4F43742_d0e10446_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-74A4C52A-6150-4237-81B5-A864F01FADF5.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-74A4C52A-6150-4237-81B5-A864F01FADF5.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,122 @@ + + +IMessaging.ChangeStatus()

IMessaging.ChangeStatus()

+

Description:

+

The ChangeStatus method changes the read status +of a message. The status can be "Read", "Unread", "Replied", +or "Forwarded".

+

This is a synchronous method.

+

Syntax:

+
result = so.IMessaging.ChangeStatus(criteria);
+ +

Arguments:

+
    +
  • criteria:

    + +

    This is an object that specifies the message whose status to change +and the new status. The following table describes the properties of this object.

    + +
  • +
+
+ + + + + + + + + + + + + + + + + + +
Table: Criteria object properties
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

criteria.MessageId

+
+

Specifies the unique ID of the message whose status to change.

+
+

number

+
 
+

criteria.Status

+
+

Specifies the new read status for the message.

+
+

string

+
+

Possible values:

+
    +
  • "Read"

  • +
  • "Unread"

  • +
  • "Replied"

  • +
  • "Forwarded"

  • +
+

Replied and Forwarded are +only valid for email messages.

+

Note: The Messaging Service does not currently support emails.

+
+
+

Return value:

+

The ChangeStatus method returns an object that +contains an error code and an error message.

+
+ + + + + + + + + + + + + + + + +
Table: Return value +properties for ChangeStatus
+

Property

+
+

Description

+
+

Value

+
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See Messaging Service API error messages.

+
+

Example code:

+

+

For the complete source of a sample widget +that demonstrates how to use this Service API, see the full example.

+ + +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-775005BC-2FF8-45A9-BBA6-6CED6B5780A2.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-775005BC-2FF8-45A9-BBA6-6CED6B5780A2.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,43 @@ + +Example widgets

Example widgets

+

This section provides you with example widgets that you can download into your PC and then into a mobile device or emulator. To download a widget, click the widget link below. When you click the widget link, you have the option of either viewing the contents of the widget package (Open) or downloading the package (Save).

+

+

STEW

The Simple Texting Example Widget (STEW) allows users to use a free social networking and micro-blogging service called Twitter on mobile devices. Users can send and read status updates, which are text-based posts of up to 140 characters in length. Status updates are displayed on the users' profile pages and delivered to other users who subscribe to them. Users can receive status updates through the Twitter Web site, SMS, RSS, e-mail, or an application such as Twitterrific, Facebook, or this example widget.

Figure: STEW main view

The STEW examples illustrate how to:

+

AccuWidget

AccuWidget is S60 Web Runtime (WRT) widget that allows users to check the current weather conditions and the forecast for the current and the following day. Special attention has been paid to the scalability in various screen resolutions and support for both keypad and touch UI.

Figure: AccuWidget location view

The AccuWidget example demonstrates the following features:

    +
  • Using the XMLHttpRequest API to transfer RSS (XML) data from a Web server. In this example, the AccuWeather service, www.accuweather.com.

  • +
  • Enabling navigation between different views.

  • +
  • Showing a transition effect when switching between views.

  • +
  • Scaling the screen size dynamically to fit different resolutions and orientations by modifying the CSS styles on the fly.

  • +
  • Changing the navigation mode between tab and cursor mode.

  • +
  • Capturing key events and creating a custom effect (highlighting) based on them.

  • +
  • Handling errors, such as no Internet connection and invalid input.

  • +
  • Hiding HTML elements that are irrelevant in the current view. For example, the right navigation arrow is hidden when there are no more forecasts to show.

  • +
  • Using a custom menu (from the WRT API) that is changed dynamically.

  • +

For the source file package, see the AccuWidget Example on Forum Nokia.

+

Keypad widget

The Keypad widget demonstrates capturing key events. By pressing different keys of the mobile keypad, you can see what key and character event codes are used in the Web Runtime environment.

+

Viewport widget

The Viewport widget demonstrates how to combine the JavaScript on resize DOM event handler with the height and width properties from the window and screen objects to calculate the effective area or viewport available for a widget.

+ +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-78D2B232-BC16-4633-8B66-DCD0C496B354.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-78D2B232-BC16-4633-8B66-DCD0C496B354.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,19 @@ + + +Introducing STEW

Introducing STEW

The Simple Texting Example Widget (STEW) example illustrates how to create a simple widget that follows the layout and navigation guidelines for mobile devices.

+

Figure: STEW widget

+

This example illustrates the following widget design principles:

+
    +
  • Designing for the 240 x 320 and the 360 x 640 screen size in both portrait and landscape mode.

  • +
  • Designing for touch devices and providing tactile feedback for selections.

  • +
  • Determining the type of the device that the widget runs on and displaying content appropriately. For example, depending on screen size and touch support.

  • +
  • Moving between controls on a page and between views.

  • +
  • Using soft keys and creating an options menu.

  • +
  • Handling user input from screen controls, such as text fields and check boxes.

  • +
  • Storing user data for future use.

  • +
+

STEW views

When users start STEW for the first time, the Login view opens. Users enter their credentials in the Username and Password fields. They can store the credentials on the device for later use.

Figure: STEW Login view

After successful login, users can send and read updates in the Update Status view.

Figure: STEW Update Status view

Users can use the Search view to search Twitter for usernames or status updates by typing in a search string and selecting the Find button.

Figure: STEW Search view

Users can use the Settings view to define the default page to open when STEW starts and to change the login Remember Me setting.

Figure: STEW Settings view

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-7962116F-3FDB-4960-B1C9-6367451554FD.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-7962116F-3FDB-4960-B1C9-6367451554FD.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,14 @@ + + +Designing simple pages

Designing simple pages

Some of the key elements of visual design are color, contrast, and typography. When you design for mobile devices, keep in mind that the features, restrictions, and challenges of small screens require a visually minimalist design. Efficient visual design for devices goes hand in hand with interaction design, using animations and transitions to guide the user through the interaction flows. In addition to enhancing usability, strong visual design enforces the brand and makes the overall design stand out from the competition.

+

Learning about visual design principles

To make views look good on the small display of a mobile device, you need a good understanding of using the following elements and rendering pages on small platforms:

Keep the design simple and maintain visual clarity. For guidelines and examples, see Visual and graphic design.

+

Rendering pages

You can use cascading style sheet (CSS) to render pages for mobile devices. A CSS contains specifications for standard elements that you can use in views, such as: headings, tables, lists, forms, radio buttons, and check boxes. For more information, see Customizing style sheets for S60 devices.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-7978FAFD-5BAC-45FD-9C44-5CF7BC484A1E.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-7978FAFD-5BAC-45FD-9C44-5CF7BC484A1E.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,170 @@ + + +ISysInfo.GetNotification()

ISysInfo.GetNotification()

+

Description:

+

The GetNotification method notifies the client +when the value of a system +attribute is changed.

+

This is an asynchronous method.

+

Syntax:

+ +
result = so.ISysInfo.GetNotification(criteria, callback);
+

Arguments:

+
    +
  • criteria:

    + +

    This is an object that specifies the system attribute to monitor for +changes. For more information about the object properties and how to define +them, see section Criteria for change notifications.

    + +
  • +
  • callback:

    + +

    The callback argument is the name of the method +that is executed when a GetNotification call has results +or status information to return. You must define this method separately. Follow +the instructions in section Defining the callback handler for an asynchronous method to +define the callback method.

    + +
  • +
+

Return value:

+

The GetNotification method returns an object that +contains the initial return value for the asynchronous call it started (see +the following table). The actual notification information is returned by the callback method +in the ReturnValue property of its result object.

+
+ + + + + + + + + + + + + + + + + + + + + +
Table: Return value +properties for GetNotification
+

Property

+
+

Description

+
+

Value

+
+

result.TransactionID

+
+

This is a number used as an identification to match transactions started +with the asynchronous GetNotification call to one or +more calls it generates to callback.

+
 
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See SystemInfo Service API error messages.

+
+ + + + + + + + + + + + + + + + + + + + +
Table: Return +value properties for GetNotification callback
+

Property

+
+

Description

+
+

Value

+
+

result.ReturnValue

+
+

This is an object (a system attribute object) that contains the information +for the changed system attribute.

+

This object contains the properties Entity and Key as +well as one or more additional properties representing the system attribute +value. The name and type of these properties depend on the specific +system attribute and its system +data type.

+

For example, if you request notification for the Connectivity +- ConnectionStatus system attribute, whose system data type is ConnectionInfo, +callback returns the following properties:

+
    +
  • ReturnValue.Entity

  • +
  • ReturnValue.Key

  • +
  • ReturnValue.ConnectionStatus

    +
  • +
  • ReturnValue.IAPID

  • +
  • ReturnValue.ConnectionType

  • +
  • ReturnValue.IAPName

  • +
  • ReturnValue.NetworkName

  • +
  • ReturnValue.IAPConnectionName

    +
  • +
+
+

See System attributes.

+
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See SystemInfo Service API error messages.

+
+

Remarks:

+ +

Example code:

+

+

For the complete source of a sample widget +that demonstrates how to use this Service API, see the +full example.

+ + +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-798E9CA0-2A46-4D10-B567-04C9567500F4.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-798E9CA0-2A46-4D10-B567-04C9567500F4.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,16 @@ + + +Calendar +entries

Calendar +entries

\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-7A0190CB-545E-48D2-BAF0-D28E03CDFCA5.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-7A0190CB-545E-48D2-BAF0-D28E03CDFCA5.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,107 @@ + + +ILocation.Trace()

ILocation.Trace()

+

Description:

+

The Trace method retrieves periodic updates about +the current location of the device based on a predefined update interval.

+

This is an asynchronous method.

+

Syntax:

+
result = so.ILocation.Trace(criteria, callback);
+ +

Arguments:

+
    +
  • criteria:

    + +

    This is an object that specifies what type of device location information +is returned and how. For more information about the object properties and +how to define them, see section Criteria for retrieving location information.

    + +
  • +
  • callback:

    + +

    The callback argument is the name of the method +that is executed when Trace has results or status information +to return. You must define this method separately. Follow the instructions +in section Defining the callback handler for an asynchronous method to +define the callback method.

    + +
  • +
+

Return value:

+

The Trace method returns an object that contains +the initial return value for the asynchronous call it started (see the following +table). The actual location information is returned by the callback method in the ReturnValue property of its result object. +The returned information is described in section Returned location information.

+
+ + + + + + + + + + + + + + + + + + + + + +
Table: Return value +properties for Trace
+

Property

+
+

Description

+
+

Value

+
+

result.TransactionID

+
+

This is a number used as an identification to match transactions started +with the Trace call to one or more calls it generates +to callback.

+
 
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See Location Service API error messages.

+
+

Remarks:

+
    +
  • Trace retrieves location updates until +cancelled with CancelNotification. +You can therefore have only one Trace call (one instance) +pending or in use at any given time.

  • +
  • The availability of specific location information depends +on the underlying GPS technology. Other factors, such as the number of satellites +available for a location fix, also affect what information can be returned. +You can change the positioning system used by an S60 device from the Settings +> General > Positioning > Positioning methods menu.

  • +
  • It takes time to retrieve the initial position fix. Subsequent +requests are faster.

  • +
+

Example code:

+

+

For the complete source of a sample widget +that demonstrates how to use this Service API, see the +full example.

+ + +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-7A466B60-88DD-4A3A-B64C-E7300D42DA56.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-7A466B60-88DD-4A3A-B64C-E7300D42DA56.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,77 @@ + + +ILocation.CancelNotification()

ILocation.CancelNotification()

+

Description:

+

The CancelNotification method cancels an outstanding +asynchronous call.

+

This is a synchronous method.

+

Syntax:

+
result = so.ILocation.CancelNotification(criteria);
+ +

Arguments:

+
    +
  • criteria:

    + +

    This is an object that specifies whether to cancel a GetLocation call or a Trace call. +The object must contain the CancelRequestType property +(string) that is used to specify the type of call to cancel. The possible +values for criteria.CancelRequestType are:

    +
      +
    • "GetLocCancel" cancels an asynchronous GetLocation call.

      +
    • +
    • "TraceCancel" cancels a Trace call.

      +
    • +
    + +
  • +
+

Return value:

+

The CancelNotification method returns an object +that contains an error code and an error message.

+
+ + + + + + + + + + + + + + + + +
Table: Return value +properties for CancelNotification
+

Property

+
+

Description

+
+

Value

+
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See Location Service API error messages.

+
+

Example code:

+

+

For the complete source of a sample widget +that demonstrates how to use this Service API, see the full example.

+ + +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-7A68BE34-5C07-4008-A886-A20D92669E05.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-7A68BE34-5C07-4008-A886-A20D92669E05.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,50 @@ + + +lightoff()

lightoff()

+

Syntax:

+
[void] sysinfo.lightoff(String lighttarget, Int duration, Int fadeout)
+

Description:

+

The lightoff method switches the specified target light off for the specified duration.

+

Argument:

+
    +
  • lighttarget:

    + +

    Defines which target light should be turned off. Use one of the supported target light properties to specify a target light.

    + +
  • +
  • duration:

    + +

    Defines the period during which the target light is switched off. The period is measured in milliseconds.

    +

    After the duration expires, the light state of the target will be changed to whatever state was caused by the last infinite time duration call. If there has not been a previous infinite time duration call in a session, the default state determined by the inactivity timer (system backlight timeout) is used.

    +

    If duration is lightinfiniteduration, the target light can be turned on only when some other light control method is called.

    + +
  • +
  • fadeout:

    + +

    If true, target lights will not turn off instantly but fade-out smoothly instead. If false, target lights will be turned off immediately.

    + +
  • +
+

Note: All devices might not support fade-out, in which case the device will behave in its default manner.

+
+

Return value:

+

This method does not return a value.

+

Example code:

+
function callLightOff()
+{
+   // get the Embed element reference
+   var sysinfo = document.embeds[0];
+   /*********************
+   call lightoff() method, which turns off the light 
+   of all displays and keyboard for 5 seconds of duration 
+   and using fading out mode
+   *********************/
+   var target =  sysinfo.lighttargetsystem;
+   var duration = 5000; // 5 seconds
+   sysinfo.lightoff(target, duration, true);
+}
+
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-7B55EBBB-B61B-4D2A-B93F-752E3488D58B.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-7B55EBBB-B61B-4D2A-B93F-752E3488D58B.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,396 @@ + + +Filter +criteria for landmarks

Filter +criteria for landmarks

+

The following table describes the different criteria by which you can +search for landmarks and lists the required Filter object +properties per criterion. Table: +Filter object properties for a landmark search describes the actual +properties. To search for landmarks, specify the Filter properties +for one or more criteria.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Landmark search +criteria
+

Criterion

+
+

Description

+
+

Properties to specify

+
+

Area

+
+

You can search for landmarks in a particular geographical area. Specify +the search area by providing the enclosing latitudes and longitudes:

+

-90 <= South Latitude <= North Latitude <= +90

+

-180 <= West Longitude <= East Longitude <= +180

+
+
    +
  • BoundedArea

  • +
  • [MaximumMatches]

  • +
  • [PreviousMatchesOnly]

  • +
+
+

Category

+
+

You can search for landmarks by category. The category name search is +case sensitive and does not support wild cards.

+
+
    +
  • CategoryName

  • +
  • [MaximumMatches]

  • +
  • [PreviousMatchesOnly]

  • +
+
+

Nearest

+
+

You can search for landmarks closest to a specific location (a set of +coordinates).

+

To narrow down the search results, specify MaximumDistance from +the location.

+

If CoverageRadiusOption is set to true, +the system takes into account the coverage radius of a landmark, so that the +effective distance considered is the distance to the center of a landmark +minus its coverage radius. In other words, if the distance between the source +location and the border of a landmark's coverage area falls within MaximumDistance, +the landmark is returned by GetList.

+
+
    +
  • LandmarkPosition

  • +
  • CoverageRadiusOption

  • +
  • MaximumDistance

  • +
  • [MaximumMatches]

  • +
  • [PreviousMatchesOnly]

  • +
+
+

Text

+
+

You can search for landmarks based on a name or description. The text +search is not case sensitive and supports wild cards, for example "?" (single +character) and "*" (zero or more characters).

+
+
    +
  • LandmarkName

  • +
  • LandmarkDesc

  • +
  • [MaximumMatches]

  • +
  • [PreviousMatchesOnly]

  • +
+
+

The following table describes the Filter object +properties for GetList calls +that retrieve information about landmarks.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Filter object +properties for a landmark search
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

[DatabaseURI]

+
+

Specifies the landmark database in which to search for landmarks. If +this is not specified, the search is performed on the default database.

+
+

string

+
+

Maximum length 255 characters

+
+

[LandmarkName]

+
+

Specifies the landmark name to search by. This is checked against the LandmarkName property +of a landmark.

+

This string is not case sensitive and supports wild cards, for example +"?" (single character) and "*" (zero or more characters).

+
+

string

+
+

Maximum length 255 characters

+
+

[LandmarkPosition]

+
+

Specifies the source location to search by. The location is expressed +as latitude, longitude, and altitude. However, only the latitude and longitude +are considered in the search. The source location does not have a coverage +radius.

+

The properties of this object are described in Table: LandmarkPosition object properties.

+

Landmarks are returned in order of ascending distance from the source +location.

+
+

object

+
+

See Table: +LandmarkPosition object properties.

+
+

[CoverageRadiusOption]

+
+

Specifies whether to take into account the coverage radius of a landmark +when calculating the distance between the source location and the landmark.

+

If set to true, the effective distance considered +is the distance to the center of a landmark minus its coverage radius, that +is, the distance to the border of the landmark's coverage area.

+

If set to false, the distance considered is the +distance to the center of a landmark. That is, the landmark's coverage area +is not considered.

+

The default value is false.

+
+

boolean

+
+

Possible values:

+
    +
  • true

  • +
  • false

  • +
+
+

[MaximumDistance]

+
+

Specifies the maximum distance in meters from the source location. Landmarks +that fall outside this radius are not returned by GetList.

+

If CoverageRadiusOption is set to false, +the distance considered is the distance to the center of a landmark.

+

If CoverageRadiusOption is set to true, +the distance considered is the distance to the center of a landmark minus +its coverage radius, that is, the distance to the border of the landmark's +coverage area.

+
+

number

+
 
+

[CategoryName]

+
+

Specifies the landmark category name to search by.

+
+

string

+
+

Maximum length 124 characters

+
+

[LandmarkDesc]

+
+

Specifies the text to be searched for in landmark descriptions. This +is checked against the LandmarkDesc property of a landmark.

+

This string is not case sensitive and supports wild cards, for example +"?" (single character) and "*" (zero or more characters).

+
+

string

+
+

Maximum length 255 characters

+
+

[BoundedArea]

+
+

Specifies the geographical area in which to search for landmarks. The +area is defined as enclosing NSEW latitudes and longitudes:

+

-90 <= South Latitude <= North Latitude <= +90

+

-180 <= West Longitude <= East Longitude <= +180

+

The properties of this object are described in Table: BoundedArea object properties.

+
+

object

+
+

See Table: +BoundedArea object properties.

+
+

[MaximumMatches]

+
+

Specifies the maximum number of landmark items to retrieve. If this +property is not specified, GetList returns all landmarks +matching the search criteria.

+
+

number

+
 
+

[PreviousMatchesOnly]

+
+

Specifies whether to perform the search on previous search results only:

+
    +
  • If set to true, GetList searches +for matching landmarks in previous search results only.

  • +
  • If set to false, GetList performs +a new search on the entire database.

  • +
+

The default value is false.

+
+

boolean

+
+

Possible values:

+
    +
  • true

  • +
  • false

  • +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: BoundedArea +object properties
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

BoundedArea.NorthLatitude

+
+

Specifies the northern-most latitude of the search area in WGS 84 datum format.

+

Note: NorthLatitude >=SouthLatitude

+
+
+

number

+
+

[-90.00, +90.00]

+
+

BoundedArea.SouthLatitude

+
+

Specifies the southern-most latitude of the search area in WGS 84 datum format.

+

Note: SouthLatitude <= NorthLatitude

+
+
+

number

+
+

[-90.00, +90.00]

+
+

BoundedArea.EastLongitude

+
+

Specifies the eastern longitude of the search area in WGS +84 datum format.

+

Note: EastLongitude >= WestLongitude

+
+
+

number

+
+

[-180.00, +180.00]

+
+

BoundedArea.WestLongitude

+
+

Specifies the western longitude of the search area in WGS +84 datum format.

+

Note: WestLongitude <= EastLongitude

+
+
+

number

+
+

[-180.00, +180.00]

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-7B5D75D4-33A1-43A7-84EC-51CEB1CE8D51.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-7B5D75D4-33A1-43A7-84EC-51CEB1CE8D51.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,115 @@ + + +Criteria for +launching an application

Criteria for +launching an application

+

The criteria object specifies the application +to launch.

+

The criteria object has three main properties: Document, MimeType, +and Options. These are described in the following table. +Properties enclosed in brackets are optional.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Criteria
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

criteria.Document

+
+

Specifies the document to launch.

+

If MIMEType is not specified, this property is +mandatory.

+
+

object

+
+

Object with the properties specified below

+
+

criteria.Document.DocumentPath

+
+

Specifies the full path and file name of the document to launch.

+
+

string

+
+

For example, "C:\\Data\\abc.txt".

+
+

criteria.MIMEType

+
+

Specifies the MIME type of the application to launch.

+

If MIMEType is specified, the application being +launched determines whether a new document is created.

+

If Document is not specified, this property is +mandatory.

+
+

string

+
+

For example: image/jpg.

+
+

[criteria.Options]

+
+

Specifies the mode for launching the application based on the given Document or MimeType.

+
+

object

+
+

Object with the properties specified below.

+
+

criteria.Options.Mode

+
+

Specifies whether the launched application is embedded within the application +that called LaunchDoc (chained) or whether the applications +are independent of each other (stand-alone). For more information on chained +and stand-along applications, see section Accessing and launching installed applications.

+

If this property is not specified, the default is "Standalone".

+
+

string

+
+

Possible values:

+
    +
  • "Chained" - the application is embedded +within the application that called LaunchDoc.

    +
  • +
  • "Standalone" - the applications are +independent of each other.

  • +
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-7BC25BBD-5BC2-4E37-A5A1-E85484ED3EF5.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-7BC25BBD-5BC2-4E37-A5A1-E85484ED3EF5.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,11 @@ + + +System language information services

System language information services

+

Language information property:

+ +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-7C0890BC-7931-417B-B4AC-6E77E65A10F3.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-7C0890BC-7931-417B-B4AC-6E77E65A10F3.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,637 @@ + + +Calendar Service API example

Calendar Service API example

+

+

This section presents the full source code of a working sample widget +for the Calendar Service. +You can download the wgz package for this widget from +section Example widgets.

+

For general information about creating widgets, see section Widget component files.

+

For widget development and debugging purposes, this example writes its +output to c:\data\jslog_widget.log using console.info. +For instructions on how to enable logging in the Web browser for S60, see +section JavaScript console.

+

Info.plist

+
<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Nokia//DTD PLIST 1.0//EN" "http://www.nokia.com/NOKIA_COM_1/DTDs/plist-1.0.dtd">
+<plist version="1.0">
+<dict>
+  <key>DisplayName</key>
+  <string>CalendarSample</string>
+  <key>Identifier</key>
+  <string>com.nokia.widget.sapi.calendar.sample</string>
+  <key>Version</key>
+  <string>1.0</string>
+  <key>MainHTML</key>
+  <string>calendar-sample.html</string>
+</dict>
+</plist>
+
+

calendar-sample.html

+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+  <head>
+    <script type="text/javascript" src="js/common.js"></script>
+    <script type="text/javascript" src="js/calendar-sample.js"></script>
+  </head>
+  <body id='docBody' bgcolor="#ddeeff" onload="setup()" style=width:100%;height:100%;>
+    <form name="frm">
+      <h3>Calendar API Sample Widget</h3>
+      <input type="button" onclick="addCalendar('img1')" value="AddCalendar"><img id="img1" src="pic/blank.png" width="25" height="25" align="center"><br>
+      <input type="button" onclick="addMeeting('img2')" value="AddMeeting"><img id="img2" src="pic/blank.png" width="25" height="25" align="center"><br>
+      <input type="button" onclick="getCalendar('img3')" value="GetCalendar"><img id="img3" src="pic/blank.png" width="25" height="25" align="center"><br>
+      <input type="button" onclick="getMeeting('img4')" value="GetMeeting"><img id="img4" src="pic/blank.png" width="25" height="25" align="center"><br>
+      <input type="button" onclick="delCalendar('img5')" value="DeleteCalendar"><img id="img5" src="pic/blank.png" width="25" height="25" align="center"><br>
+      <input type="button" onclick="delAllEntry('img6')" value="DeleteAllEntriesInDefaultCalendar"><img id="img6" src="pic/blank.png" width="25" height="25" align="center"><br>
+      <input type="button" onclick="delAllEntryAsync('img7')" value="DeleteAllEntriesInDefaultCalendarAsync"><img id="img7" src="pic/blank.png" width="25" height="25" align="center"><br>
+      <input type="button" onclick="importEntry('img8')" value="ImportCalendar"><img id="img8" src="pic/blank.png" width="25" height="25" align="center"><br>
+      <input type="button" onclick="exportEntry('img9')" value="ExportCalendar"><img id="img9" src="pic/blank.png" width="25" height="25" align="center"><br>
+      <input type="button" onclick="importEntryAsync('img10')" value="ImportAsync"><img id="img10" src="pic/blank.png" width="25" height="25" align="center"><br>
+      <input type="button" onclick="exportEntryAsync('img11')" value="ExportAsync"><img id="img11" src="pic/blank.png" width="25" height="25" align="center"><br>
+      <input type="button" onclick="requestNotification('img12')" value="RequestNotification"><img id="img12" src="pic/blank.png" width="25" height="25" align="center"><br>
+      <input type="button" onclick="cancelImportEntryAsync('img13')" value="CancelImportAsync"><img id="img13" src="pic/blank.png" width="25" height="25" align="center"><br>
+      <input type="button" onclick="cancelExportEntryAsync('img14')" value="CancelExportAsync"><img id="img14" src="pic/blank.png" width="25" height="25" align="center"><br>
+      <input type="button" onclick="cancelRequestNotification('img15')" value="CancelRequestNotification"><img id="img15" src="pic/blank.png" width="25" height="25" align="center"><br>
+      <hr>
+      <div class='calendarsample' id='calendarsample' bgcolor="#ddeeff" style=width:100%;height:100%;overflow:auto></div>
+    </form>
+  </body>
+</html>
+
+

common.js

+
// common.js
+//
+// This file contains some utility functions
+
+// Check the error code and show the information to users
+function checkError(message, resultList, divId, imgId)
+{
+  var errCode = resultList.ErrorCode;
+  var msg = "";
+
+  if (errCode) {
+    msg = message + "<BR>" + "Failed Error: " + errCode + "<BR>";
+    if(resultList.ErrorMessage != undefined)
+      msg += "Error Message: " + resultList.ErrorMessage;
+    showIMG(imgId,"no");
+  } else {
+    showIMG(imgId,"yes");
+  }
+
+  //print error message
+  if(divId != null && divId != undefined)
+    document.getElementById(divId).innerHTML = msg;
+  console.info(msg);
+
+  return errCode;
+}
+
+// Build the message by reading a iteratorable list in a recursive manner
+function showIterableList(iterator)
+{
+  var msg = "";
+  try
+  {
+    iterator.reset();
+    var item;
+    while (( item = iterator.getNext()) != undefined ){
+      msg += showObject( item );
+    }
+  }
+  catch(e)
+  {
+    alert('<showIterableList> ' + e);
+  }
+  return msg;
+}
+
+// Build the message by reading a JS object in a recursive manner
+function showObject( obj )
+{
+  var txt = "";
+  try {
+    if ( typeof obj != 'object' )
+      return "" + obj + '<BR/>';
+    else {
+      for(var key in obj) {
+        txt +=  key + ":";
+        txt += showObject( obj[key] );
+        txt += '<BR/>';
+      }
+      txt += '<BR/>';
+    }
+  }
+  catch (e)
+  {
+    alert("showObject: " + e);
+  }
+  return txt;
+}
+
+// Show the image to indicate the test result
+function showIMG(imgId, isOK)
+{
+  if(imgId == null || imgId == undefined)
+    return;
+
+  if(isOK == "yes")
+    document.getElementById(imgId).src = "pic/yes.png";
+  else if(isOK == "no")
+    document.getElementById(imgId).src = "pic/no.png";
+  else
+    document.getElementById(imgId).src = "pic/blank.png";
+}
+
+// Show elements in object by using 'alert'
+function testObject(obj)
+{
+  var msg = "";
+  for(var key in obj) {
+    msg = msg + ":" + key + "=" + obj[key];
+  }
+  alert(msg);
+}
+
+// Test whether the input is numeric
+function IsNumeric(sText)
+{
+  var ValidChars = "0123456789.";
+  var IsNumber=true;
+  var Char;
+
+  for (i = 0; i < sText.length && IsNumber == true; i++)
+  {
+    Char = sText.charAt(i);
+    if (ValidChars.indexOf(Char) == -1)
+    {
+      IsNumber = false;
+    }
+  }
+  return IsNumber;
+}
+
+

calendar-sample.js

+
// calendar-sample.js
+//
+// In this sample Calendar and Meeting event will be added, deleted, and listed
+// from default database; Meeting event will be imported and exported; The
+// notification will be send when the calendar changes; Also, async operation will
+// be canceled.
+//
+
+//SAPI Error Codes
+// 0    - Success
+// 1000 - InvalidServiceArgument
+// 1001 - UnknownArgumentName
+// 1002 - BadArgumentType
+// 1003 - MissingArgument
+// 1004 - ServiceNotSupported
+// 1005 - ServiceInUse
+// 1006 - ServiceNotReady
+// 1007 - NoMemory
+// 1008 - HardwareNotAvailable
+// 1009 - ServerBusy
+// 1010 - EntryExists
+// 1011 - AccessDenied
+// 1012 - NotFound
+// 1013 - UnknownFormat
+// 1014 - GeneralError
+// 1015 - CancelSuccess
+// 1016 - ServiceTimedOut
+// 1017 - PathNotFound
+
+// Declare the service object
+var so;
+
+// imgid for callback1 function
+var imgid_callback1;
+
+// imgid for callback2 function
+var imgid_callback2;
+
+// imgid for callback3 function
+var imgid_callback3;
+
+// id of the div used to display information
+const DIV_ID = 'calendarsample';
+
+// Called from onload()
+function setup()
+{
+  try {
+    so = device.getServiceObject("Service.Calendar", "IDataSource");
+    console.info("setup: so: %s", so);
+  }
+  catch (e) {
+    alert('<setup> ' +e);
+  }
+}
+
+//Add a calendar
+function addCalendar(imgId)
+{
+  var calName = prompt("Please enter the calendar name","C:myCalendar");
+  if(calName == "" || calName == null)
+    return;
+
+  var item = new Object();
+  item.CalendarName = calName;
+
+  var criteria = new Object();
+  criteria.Type = "Calendar";
+  criteria.Item = item;
+
+  try {
+    var result = so.IDataSource.Add(criteria);
+    checkError("IDataSource::addCalendar",result,DIV_ID,imgId);
+  }
+  catch (e) {
+    showIMG(imgId,"no");
+    alert ("addCalendar: " + e);
+  }
+}
+
+//Add a meeting
+function addMeeting(imgId)
+{
+  var startDate = new Date("January 6, 2008 19:05:00");
+  var endDate = new Date("January 7, 2008 20:05:00");
+
+  var item = new Object();
+  item.Type = "Meeting";
+  item.StartTime = startDate;
+  item.EndTime = endDate;
+
+  var criteria = new Object();
+  criteria.Type = "CalendarEntry";
+  criteria.Item = item;
+
+  try {
+    var result = so.IDataSource.Add(criteria);
+    checkError("IDataSource::addMeeting",result,DIV_ID,imgId);
+  }
+  catch (e) {
+    showIMG(imgId,"no");
+    alert ("addCalendar: " + e);
+  }
+}
+
+//Get Calendar
+function getCalendar(imgId)
+{
+  // This is an optional parameter. If "DefaultCalendar" is set to true,
+  // GetList returns the list with one element (default calendar) else it
+  // returns a list of all calendars.
+  var filter = new Object();
+  filter.DefaultCalendar = false;
+
+  var criteria = new Object();
+  criteria.Type = "Calendar";
+  criteria.Filter = filter;
+
+  try {
+    imgid_callback1 = imgId;
+    var result = so.IDataSource.GetList(criteria);
+    if(!checkError("IDataSource::getCalendar",result,DIV_ID,imgId)) {
+      document.getElementById(DIV_ID).innerHTML = showIterableList(result.ReturnValue);
+    }
+  }
+  catch (e) {
+    showIMG(imgId,"no");
+    alert ("getCalendar: " + e);
+  }
+}
+
+// Get Meeting
+function getMeeting(imgId)
+{
+  var filter = new Object();
+  filter.Type = "Meeting";
+
+  var criteria = new Object();
+  criteria.Type = "CalendarEntry";
+  criteria.Filter = filter;
+
+  try {
+    var result = so.IDataSource.GetList(criteria);
+    if(!checkError("IDataSource::getMeeting",result,DIV_ID,imgId)) {
+      var msg = "";
+      var meetingObj;
+      var meetingIt = result.ReturnValue;
+      while ((meetingObj = meetingIt.getNext()) != undefined)
+      {
+        msg = msg + "Type: " + meetingObj['Type'] + "<br>";
+        msg = msg + "Summary: " + meetingObj['Summary'] + "<br>";
+        msg = msg + "StartTime: " + meetingObj['StartTime'] + "<br>";
+        msg = msg + "EndTime: " + meetingObj['EndTime'] + "<br>";
+        msg = msg + "Id: " + meetingObj['Id'] + "<br>";
+        msg = msg + "LocalId: " + meetingObj['LocalId'] +"<br><br>";
+      }
+      meetingIt.reset();
+      document.getElementById(DIV_ID).innerHTML = msg;
+    }
+  }
+  catch (e) {
+    showIMG(imgId,"no");
+    alert ("getCalendar: " + e);
+  }
+}
+
+//Delete Calendar
+function delCalendar(imgId)
+{
+  var calName = prompt("Please enter the calendar name", "C:myCalendar");
+  if(calName == "" || calName == null)
+    return;
+
+  var delData = new Object();
+  delData.CalendarName = calName;
+
+  var criteria = new Object();
+  criteria.Type = "Calendar";
+  criteria.Data = delData;
+
+  try {
+    var result = so.IDataSource.Delete(criteria);
+    checkError("IDataSource::delCalendar",result,DIV_ID,imgId);
+  }
+  catch (e) {
+    showIMG(imgId,"no");
+    alert ("delCalendar: " + e);
+  }
+}
+
+//Delete All Entries in Default Calendar
+function delAllEntry(imgId)
+{
+  var delData = new Object();
+  delData.DeleteAll = true;
+
+  var criteria = new Object();
+  criteria.Type = "CalendarEntry";
+  criteria.Data = delData;
+
+  try {
+    var result = so.IDataSource.Delete(criteria);
+    checkError("IDataSource::delAllEntry",result,DIV_ID,imgId);
+  }
+  catch (e) {
+    showIMG(imgId,"no");
+    alert ("delAllEntry: " + e);
+  }
+}
+
+//Delete All Entries in Default Calendar Async
+function delAllEntryAsync(imgId)
+{
+  var delData = new Object();
+  delData.DeleteAll = true;
+
+  var criteria = new Object();
+  criteria.Type = "CalendarEntry";
+  criteria.Data = delData;
+
+  try {
+    imgid_callback4 = imgId;
+    var result = so.IDataSource.Delete(criteria, callback4);
+    if(!checkError("IDataSource::delAllEntryAsync",result,DIV_ID,imgId));
+      showIMG(imgId, "");
+  }
+  catch (e) {
+    showIMG(imgId,"no");
+    alert ("delAllEntryAsync: " + e);
+  }
+}
+
+// Import Entry
+function importEntry(imgId) {
+
+  var fileName = "c:\\data\\calendarFile";
+
+  var impData = new Object();
+  impData.Format = "VCal";
+  impData.FileName = fileName;
+
+  var criteria = new Object();
+  criteria.Type = "CalendarEntry";
+  criteria.Data = impData;
+
+  try {
+    var result = so.IDataSource.Import(criteria);
+    checkError("IDataSource::Import",result,DIV_ID,imgId);
+  }
+  catch (e) {
+    showIMG(imgId,"no");
+    alert ("importEntry: " + e);
+  }
+}
+
+// Export Entry
+function exportEntry(imgId) {
+
+  var fileName = "c:\\data\\calendarFile";
+
+  var exData = new Object();
+  exData.Format = "VCal";
+  exData.FileName = fileName;
+
+  var criteria = new Object();
+  criteria.Type = "CalendarEntry";
+  criteria.Data = exData;
+
+  try {
+    var result = so.IDataSource.Export(criteria);
+    checkError("IDataSource::Export",result,DIV_ID,imgId);
+  }
+  catch (e) {
+    showIMG(imgId,"no");
+    alert ("exportEntry: " + e);
+  }
+}
+
+// Import Entry Async
+function importEntryAsync(imgId) {
+
+  var fileName = "c:\\data\\calendarFile";
+
+  var impData = new Object();
+  impData.Format = "VCal";
+  impData.FileName = fileName;
+
+  var criteria = new Object();
+  criteria.Type = "CalendarEntry";
+  criteria.Data = impData;
+
+  try {
+    imgid_callback1 = imgId;
+    var result = so.IDataSource.Import(criteria, callback1);
+    if(!checkError("IDataSource::ImportAsync",result,DIV_ID,imgId))
+      showIMG(imgId, "");
+  }
+  catch (e) {
+    showIMG(imgId,"no");
+    alert ("importEntryAsync: " + e);
+  }
+}
+
+// Export Entry Async
+function exportEntryAsync(imgId) {
+
+  var fileName = "c:\\data\\calendarFile";
+
+  var exData = new Object();
+  exData.Format = "VCal";
+  exData.FileName = fileName;
+
+  var criteria = new Object();
+  criteria.Type = "CalendarEntry";
+  criteria.Data = exData;
+
+  try {
+    imgid_callback2 = imgId;
+    var result = so.IDataSource.Export(criteria, callback2);
+    if(!checkError("IDataSource::ExportAsync",result,DIV_ID,imgId))
+      showIMG(imgId, "");
+  }
+  catch (e) {
+    showIMG(imgId,"no");
+    alert ("exportEntryAsync: " + e);
+  }
+}
+
+// Cancel Import Entry Async
+function cancelImportEntryAsync(imgId) {
+
+  var fileName = "c:\\data\\calendarFile";
+
+  var impData = new Object();
+  impData.Format = "VCal";
+  impData.FileName = fileName;
+
+  var criteria = new Object();
+  criteria.Type = "CalendarEntry";
+  criteria.Data = impData;
+
+  try {
+    imgid_callback1 = imgId;
+    var result = so.IDataSource.Import(criteria, callback1);
+    if(!checkError("IDataSource::CancelImportAsync",result,DIV_ID,imgId)) {
+      showIMG(imgId, "");
+      var criteria2 = new Object();
+      criteria2.TransactionID = result.TransactionID;
+      var cresult = so.IDataSource.Cancel(criteria2);
+      checkError("IDataSource::CancelImportAsync",cresult,DIV_ID,imgId);
+    }
+  }
+  catch (e) {
+    showIMG(imgId,"no");
+    alert ("cancelImportEntryAsync: " + e);
+  }
+}
+
+// Cancel Export Entry Async
+function cancelExportEntryAsync(imgId) {
+
+  var fileName = "c:\\data\\calendarFile";
+
+  var exData = new Object();
+  exData.Format = "VCal";
+  exData.FileName = fileName;
+
+  var criteria = new Object();
+  criteria.Type = "CalendarEntry";
+  criteria.Data = exData;
+
+  try {
+    imgid_callback2 = imgId;
+    var result = so.IDataSource.Export(criteria, callback2);
+    if(!checkError("IDataSource::CancelExportAsync",result,DIV_ID,imgId)){
+      showIMG(imgId, "");
+      var criteria2 = new Object();
+      criteria2.TransactionID = result.TransactionID;
+      var cresult = so.IDataSource.Cancel(criteria2);
+      checkError("IDataSource::CancelExportAsync",cresult,DIV_ID,imgId);
+    }
+  }
+  catch (e) {
+    showIMG(imgId,"no");
+    alert ("cancelExportEntryAsync: " + e);
+  }
+}
+
+// Request Notification
+function requestNotification(imgId) {
+
+  var criteria = new Object();
+  criteria.Type = "CalendarEntry";
+
+  try {
+    imgid_callback3 = imgId;
+    var result = so.IDataSource.RequestNotification(criteria, callback3);
+    checkError("IDataSource::requestNotification",result,DIV_ID,imgId);
+  }
+  catch (e) {
+    showIMG(imgId,"no");
+    alert ("requestNotification: " + e);
+  }
+}
+
+// Cancel Request Notification
+function cancelRequestNotification(imgId) {
+
+  var criteria = new Object();
+  criteria.Type = "CalendarEntry";
+
+  try {
+    imgid_callback3 = imgId;
+    var result = so.IDataSource.RequestNotification(criteria, callback3);
+    if(!checkError("IDataSource::CancelRequestNotification",result,DIV_ID,imgId)){
+      showIMG(imgId, "");
+      var criteria2 = new Object();
+      criteria2.TransactionID = result.TransactionID;
+      var cresult = so.IDataSource.Cancel(criteria2);
+      checkError("IDataSource::CancelRequestNotification",cresult,DIV_ID,imgId);
+    }
+  }
+  catch (e) {
+    showIMG(imgId,"no");
+    alert ("CancelRequestNotification: " + e);
+  }
+}
+
+// This is the asynchronous callback handler
+function callback1(transId, eventCode, result)
+{
+  console.info("callback1: transId: %d  eventCode: %d result.ErrorCode: %d", transId, eventCode, result.ErrorCode);
+  checkError("IDataSource::ImportAsync",result,DIV_ID,imgid_callback1);
+}
+
+// This is the asynchronous callback handler
+function callback2(transId, eventCode, result)
+{
+  console.info("callback2: transId: %d  eventCode: %d result.ErrorCode: %d", transId, eventCode, result.ErrorCode);
+  checkError("IDataSource::ExportAsync",result,DIV_ID,imgid_callback2);
+}
+
+// This is the asynchronous callback handler
+function callback3(transId, eventCode, result)
+{
+  console.info("callback3: transId: %d  eventCode: %d result.ErrorCode: %d", transId, eventCode, result.ErrorCode);
+  if(!checkError("IDataSource::Notification",result,DIV_ID,imgid_callback3)) {
+    document.getElementById(DIV_ID).innerHTML = showIterableList(result.ReturnValue);
+  }
+}
+
+// This is the asynchronous callback handler
+function callback4(transId, eventCode, result)
+{
+  console.info("callback4: transId: %d  eventCode: %d result.ErrorCode: %d", transId, eventCode, result.ErrorCode);
+  if(!checkError("IDataSource::delAllEntryAsync",result,DIV_ID,imgid_callback4)) {
+    document.getElementById(DIV_ID).innerHTML = showIterableList(result.ReturnValue);
+  }
+}
+
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-7C69DDA4-16F1-4A8F-BDB2-4CB0015B4E81.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-7C69DDA4-16F1-4A8F-BDB2-4CB0015B4E81.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,34 @@ + + +Web Runtime +API reference

Web Runtime +API reference

+

Web Runtime (WRT) for the S60 platform provides support for widgets. +Widgets are small Web applications that can access the wealth of Web-based +information and services. WRT was created by extending the powerful core of +the Web Browser for S60. This open-source engine allows WRT developers to +use familiar industry standards such as HTML, Cascading Style Sheets (CSS), +and Asynchronous JavaScript and XML (AJAX) to build small, standalone Web +applications called widgets.

+

Widgets are mainly implemented using the JavaScript scripting language. +The WRT environment supports JavaScript APIs that conform to the ECMA-262 +3rd Edition specification. WRT also supports the JavaScript DOM (Document +Object Model) and XMLHttpRequest objects. In addition to the standard JavaScript +objects, WRT provides widget-specific extension APIs that allow widgets to +access system properties and services and the mobile environment.

+ +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-7C9CCFF3-A6E0-4593-8315-1A0EAAFD05AF.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-7C9CCFF3-A6E0-4593-8315-1A0EAAFD05AF.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,373 @@ + + +SystemInfo Service API example

SystemInfo Service API example

+

+

This section presents the full source code of a working sample widget +for the SystemInfo +Service. You can download the wgz package for +this widget from section Example widgets.

+

For general information about creating widgets, see section Widget component files.

+

For widget development and debugging purposes, this example writes its +output to c:\data\jslog_widget.log using console.info. +For instructions on how to enable logging in the Web browser for S60, see +section JavaScript console.

+

Info.plist

+
<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Nokia//DTD PLIST 1.0//EN" "http://www.nokia.com/NOKIA_COM_1/DTDs/plist-1.0.dtd">
+<plist version="1.0">
+<dict>
+  <key>DisplayName</key>
+  <string>SysInfoSample</string>
+  <key>Identifier</key>
+  <string>com.nokia.widget.sapi.sysinfo.sample</string>
+  <key>Version</key>
+  <string>1.0</string>
+  <key>MainHTML</key>
+  <string>sysinfo-sample.html</string>
+</dict>
+</plist>
+
+

sysInfo-sample.html

+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+  <head>
+    <script type="text/javascript" src="js/common.js"></script>
+    <script type="text/javascript" src="js/sysinfo-sample.js"></script>
+  </head>
+  <body id='docBody' bgcolor="#ddeeff" onload="setup()" style=width:100%;height:100%;>
+    <form name="frm">
+      <h3>Sysinfo API Sample Widget</h3>
+      <input type="button" onclick="getSysInfo('img1')" value="GetSysInfo"><img id="img1" src="pic/blank.png" width="25" height="25" align="center"><br>
+      <input type="button" onclick="setSysInfo('img2')" value="SetSysInfo"><img id="img2" src="pic/blank.png" width="25" height="25" align="center"><br>
+      <input type="button" onclick="getSysInfoAsync('img3')" value="GetSysInfoAsync"><img id="img3" src="pic/blank.png" width="25" height="25" align="center"><br>
+      <input type="button" onclick="getNotification('img4')" value="GetNotification"><img id="img4" src="pic/blank.png" width="25" height="25" align="center"><br>
+      <input type="button" onclick="cancelGetSysInfoAsync('img5')" value="CancelGetSysInfoAsync"><img id="img5" src="pic/blank.png" width="25" height="25" align="center"><hr>
+      <div class='sysinfo' id='sysinfo' bgcolor="#ddeeff" style=width:100%;height:100%;overflow:auto></div>
+    </form>
+  </body>
+</html>
+
+

common.js

+
// common.js
+//
+// This file contains some utility functions
+
+// Check the error code and show the information to users
+function checkError(message, resultList, divId, imgId)
+{
+  var errCode = resultList.ErrorCode;
+  var msg = "";
+
+  if (errCode) {
+    msg = message + "<BR>" + "Failed Error: " + errCode + "<BR>";
+    if(resultList.ErrorMessage != undefined)
+      msg += "Error Message: " + resultList.ErrorMessage;
+    showIMG(imgId,"no");
+  } else {
+    showIMG(imgId,"yes");
+  }
+
+  //print error message
+  if(divId != null && divId != undefined)
+    document.getElementById(divId).innerHTML = msg;
+  console.info(msg);
+
+  return errCode;
+}
+
+// Build the message by reading a iteratorable list in a recursive manner
+function showIterableList(iterator)
+{
+  var msg = "";
+  try
+  {
+    iterator.reset();
+    var item;
+    while (( item = iterator.getNext()) != undefined ){
+      msg += showObject( item );
+    }
+  }
+  catch(e)
+  {
+    alert('<showIterableList> ' + e);
+  }
+  return msg;
+}
+
+// Build the message by reading a JS object in a recursive manner
+function showObject( obj )
+{
+  var txt = "";
+  try {
+    if ( typeof obj != 'object' )
+      return "" + obj + '<BR/>';
+    else {
+      for(var key in obj) {
+        txt +=  key + ":";
+        txt += showObject( obj[key] );
+        txt += '<BR/>';
+      }
+      txt += '<BR/>';
+    }
+  }
+  catch (e)
+  {
+    alert("showObject: " + e);
+  }
+  return txt;
+}
+
+// Show the image to indicate the test result
+function showIMG(imgId, isOK)
+{
+  if(imgId == null || imgId == undefined)
+    return;
+
+  if(isOK == "yes")
+    document.getElementById(imgId).src = "pic/yes.png";
+  else if(isOK == "no")
+    document.getElementById(imgId).src = "pic/no.png";
+  else
+    document.getElementById(imgId).src = "pic/blank.png";
+}
+
+// Show elements in object by using 'alert'
+function testObject(obj)
+{
+  var msg = "";
+  for(var key in obj) {
+    msg = msg + ":" + key + "=" + obj[key];
+  }
+  alert(msg);
+}
+
+// Test whether the input is numeric
+function IsNumeric(sText)
+{
+  var ValidChars = "0123456789.";
+  var IsNumber=true;
+  var Char;
+
+  for (i = 0; i < sText.length && IsNumber == true; i++)
+  {
+    Char = sText.charAt(i);
+    if (ValidChars.indexOf(Char) == -1)
+    {
+      IsNumber = false;
+    }
+  }
+  return IsNumber;
+}
+
+

sysInfo-sample.js

+
// sysinfo-sample.js
+//
+// In this sample system information will be listed and changed; The
+// notification will be send when the system info changes; Also,
+// async operation will be canceled.
+//
+
+//SAPI Error Codes
+// 0    - Success
+// 1000 - InvalidServiceArgument
+// 1001 - UnknownArgumentName
+// 1002 - BadArgumentType
+// 1003 - MissingArgument
+// 1004 - ServiceNotSupported
+// 1005 - ServiceInUse
+// 1006 - ServiceNotReady
+// 1007 - NoMemory
+// 1008 - HardwareNotAvailable
+// 1009 - ServerBusy
+// 1010 - EntryExists
+// 1011 - AccessDenied
+// 1012 - NotFound
+// 1013 - UnknownFormat
+// 1014 - GeneralError
+// 1015 - CancelSuccess
+// 1016 - ServiceTimedOut
+// 1017 - PathNotFound
+
+// Declare the service object
+var so;
+
+// imgid for callback1 function
+var imgid_callback1;
+
+// imgid for callback2 function
+var imgid_callback2;
+
+// imgid for callback3 function
+var imgid_callback3;
+
+// id of the div used to display information
+const DIV_ID = 'sysinfo';
+
+// Called from onload()
+function setup()
+{
+  try {
+    so = device.getServiceObject("Service.SysInfo", "ISysInfo");
+    console.info("setup: so: %s", so);
+  }
+  catch (e) {
+    alert('<setup> ' +e);
+  }
+}
+
+//Get SysInfo
+function getSysInfo(imgId)
+{
+  // get the entity
+  var entity = prompt("Please enter the Entry", "General");
+  var key = prompt("Please enter the Key", "VibraActive");
+  var criteria = new Object();
+  criteria.Entity = entity;
+  criteria.Key = key;
+
+  try {
+    var result = so.ISysInfo.GetInfo(criteria);
+    if(!checkError("ISysInfo::getSysInfo",result,DIV_ID,imgId)) {
+      document.getElementById(DIV_ID).innerHTML = showObject(result.ReturnValue);
+    }
+  }
+  catch (e) {
+    showIMG(imgId,"no");
+    alert ("getSysInfo: " + e);
+  }
+}
+
+//Set SysInfo
+function setSysInfo(imgId)
+{
+  // get the entity
+  var entity = prompt("Please enter the Entry", "General");
+  var key = prompt("Please enter the Key", "VibraActive");
+  var vals = prompt("Please enter the new Value", 0);
+
+  var systemData = new Object();
+  if(IsNumeric(vals)) {
+    systemData.Status = parseInt(vals);
+  } else {
+    systemData.StringData = vals;
+  }
+
+  var criteria = new Object();
+  criteria.Entity = entity;
+  criteria.Key = key;
+  criteria.SystemData = systemData;
+
+  try {
+    var result = so.ISysInfo.SetInfo(criteria);
+    checkError("ISysInfo::setSysInfo",result,DIV_ID,imgId);
+  }
+  catch (e) {
+    showIMG(imgId,"no");
+    alert ("setSysInfo: " + e);
+  }
+}
+
+//Get SysInfo
+function getSysInfoAsync(imgId)
+{
+  // get the entity
+  var entity = prompt("Please enter the Entry", "Network");
+  var key = prompt("Please enter the Key", "HomeNetwork");
+
+  var criteria = new Object();
+  criteria.Entity = entity;
+  criteria.Key = key;
+
+  try {
+    imgid_callback1 = imgId;
+    var result = so.ISysInfo.GetInfo(criteria, callback1);
+    if(!checkError("ISysInfo::getSysInfoAsync",result,DIV_ID,imgId))
+      showIMG(imgId, "");
+  }
+  catch (e) {
+    showIMG(imgId,"no");
+    alert ("getSysInfoAsync: " + e);
+  }
+}
+
+// set callback function for notification
+function getNotification(imgId)
+{
+  // get the entity
+  var entity = prompt("Please enter the Entry", "General");
+  var key = prompt("Please enter the Key", "VibraActive");
+
+  var criteria = new Object();
+  criteria.Entity = entity;
+  criteria.Key = key;
+
+  try {
+    imgid_callback2 = imgId;
+    var result = so.ISysInfo.GetNotification(criteria,callback2);
+    if(!checkError("ISysInfo::getNotification",result,DIV_ID,imgId))
+      showIMG(imgId, "");
+  }
+  catch (e) {
+    showIMG(imgId,"no");
+    alert ("setSysInfo: " + e);
+  }
+}
+
+//Ccancel SysInfo
+function cancelGetSysInfoAsync(imgId)
+{
+  // get the entity
+  var entity = prompt("Please enter the Entry", "Network");
+  var key = prompt("Please enter the Key", "HomeNetwork");
+
+  var criteria = new Object();
+  criteria.Entity = entity;
+  criteria.Key = key;
+
+  try {
+    imgid_callback3 = imgId;
+    var result = so.ISysInfo.GetInfo(criteria, callback3);
+    if(!checkError("ISysInfo::cancelGetSysInfoAsync",result,DIV_ID,imgId)){
+      var criteria2 = new Object();
+      criteria2.TransactionID = result.TransactionID;
+      var cresult = so.ISysInfo.Cancel(criteria2);
+      checkError("ISysInfo::cancelGetSysInfoAsync",cresult,DIV_ID,imgId);
+    }
+  }
+  catch (e) {
+    showIMG(imgId,"no");
+    alert ("cancelGetSysInfoAsync: " + e);
+  }
+}
+
+// This is the asynchronous callback handler
+function callback1(transId, eventCode, result)
+{
+  console.info("callback1: transId: %d  eventCode: %d result.ErrorCode: %d", transId, eventCode, result.ErrorCode);
+  if(!checkError("callback1::getSysInfoAsync",result,DIV_ID,imgid_callback1)) {
+    document.getElementById(DIV_ID).innerHTML = showObject(result.ReturnValue);
+  }
+}
+
+// This is the asynchronous callback handler
+function callback2(transId, eventCode, result)
+{
+  console.info("callback2: transId: %d  eventCode: %d result.ErrorCode: %d", transId, eventCode, result.ErrorCode);
+  if(!checkError("callback2::getNotification",result,DIV_ID,imgid_callback2)) {
+    document.getElementById(DIV_ID).innerHTML = "Got Notification!Following settings changed!\n" + showObject(result.ReturnValue);
+  }
+}
+
+// This is the asynchronous callback handler
+function callback3(transId, eventCode, result)
+{
+  console.info("callback3: transId: %d  eventCode: %d result.ErrorCode: %d", transId, eventCode, result.ErrorCode);
+  if(!checkError("callback3::getNotification",result,DIV_ID,imgid_callback3)) {
+    document.getElementById(DIV_ID).innerHTML = showObject(result.ReturnValue);
+  }
+}
+
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-7DD6AB91-0582-4A46-9E19-2F12DC2FE674.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-7DD6AB91-0582-4A46-9E19-2F12DC2FE674.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,134 @@ + + +Criteria for +launching an application

Criteria for +launching an application

+

The criteria object specifies the application +to launch.

+

The criteria object has three main properties: ApplicationID, CmdLine, +and Options. These are described in the following table. +Properties enclosed in brackets are optional.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Criteria object properties
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

criteria.ApplicationID

+
+

Specifies a unique ID for the application binary (EXE or DLL).

+

Use the GetList method +to retrieve this ID.

+
+

string

+
+

For example: "s60uid://0x101F857A"

+
+

[criteria.CmdLine]

+
+

Specifies a command line argument which is passed to the application +being launched.

+
+

string

+
 
+

[critia.Options]

+
  +

object

+
+

Object with the properties specified below.

+
+

[critia.Options.Mode]

+
+

Specifies whether the launched application is embedded within the application +that called LaunchApp (chained) or whether the applications +are independent of each other (stand-alone). For more information on chained +and stand-along applications, see section Accessing and launching installed applications.

+

If this property is not specified, the default is "Standalone".

+
+

string

+
+

Possible values:

+
    +
  • "Chained" - The application is embedded +within the application that called LaunchApp.

    +
  • +
  • "Standalone" - The applications are +independent of each other.

  • +
+

+

+

[critia.Options.Position]

+
+

Specifies whether a stand-alone application is launched in the background +or foreground.

+

This property is not valid if the Mode is "Chained" (embedded). +Embedded applications are automatically launched in the foreground.

+

If this property is not specified, the default is "Foreground".

+
+

string

+
+

Possible values:

+
    +
  • "Background" - The stand-alone application +is launched in the background.

  • +
  • "Foreground" - The stand-alone application +is launched in the foreground.

  • +
+
+

[critia.Options.DocumentPath]

+
+

Specifies the full path, including the file name, to the document to +launch.

+
+

string

+
+

For example: "C:\\Data\\abc.txt"

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-7E53CD9F-E213-42E7-8569-02AEA1198E52.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-7E53CD9F-E213-42E7-8569-02AEA1198E52.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,157 @@ + + +IDataSource.GetList()

IDataSource.GetList()

+

Description:

+

The GetList method retrieves an iterable list of +entries from the log event database. The database contains two types of entries, +log entries (all entries) and recent log entries (a subset of all log entries).

+

This method can be called both synchronously and asynchronously.

+

Syntax:

+

For synchronous calls:

+
result = so.IDataSource.GetList(criteria);
+ +

For asynchronous calls:

+
result = so.IDataSource.GetList(criteria, callback);
+ +

Arguments:

+
    +
  • criteria:

    + +

    This is an object that specifies what information is returned from the +log event database. For more information about the object properties and how +to define them, see section Criteria for retrieving log events.

    + +
  • +
  • callback:

    + +

    The callback argument is the name of the method +that is executed when an asynchronous GetList call has +results or status information to return. You must define this method separately. +Follow the instructions in section Defining the callback handler for an asynchronous method to +define the callback method.

    +

    This argument is used only with an asynchronous GetList call.

    + +
  • +
+

Return value:

+

If synchronous, the GetList method returns an object +that contains the requested log event information, an error code, and an error +message.

+
+ + + + + + + + + + + + + + + + + + + + +
Table: Return value +properties for a synchronous GetList
+

Property

+
+

Description

+
+

Value

+
+

result.ReturnValue

+
+

This is an iterator that contains the requested log event information.

+
+

See Returned log event information.

+
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes .

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See Logging Service API error messages.

+
+

If asynchronous, the GetList method returns an +object that contains the initial return value from the asynchronous call that +it started (see the following table). The actual information is returned by +the callback method +in the ReturnValue property of its result object. The +returned information is described in section Returned log event information.

+
+ + + + + + + + + + + + + + + + + + + + + +
Table: Return value +properties for an asynchronous GetList
+

Property

+
+

Description

+
+

Value

+
+

result.TransactionID

+
+

This is a number used as an identification to match transactions started +with the asynchronous GetList call to one or more calls +it generates to callback.

+

This property is only valid for asynchronous calls.

+
 
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See Logging Service API error messages.

+
+

Remarks:

+

To access information about individual log events, iterate through the +list of objects contained in result.ReturnValue.

+

Example code:

+

+

For the complete source of a sample widget +that demonstrates how to use this Service API, see the +full example.

+ + + + +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-7FD32D4D-871F-4251-844C-6CB59B593730.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-7FD32D4D-871F-4251-844C-6CB59B593730.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,238 @@ + + +Returned +sensor data

Returned +sensor data

+

The ReturnValue property returned by callback is an object containing data from one sensor channel. callback returns +an object every time a notification is received for the specified +channel. The exact set of object properties depends on the type of +sensor data provided by the channel:

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Object properties +for AccelerometerAxis data
+

Property

+
+

Type

+
+

Value

+
+

DataType

+
+

string

+
+

"AxisData"

+
+

TimeStamp

+
+

string

+
 
+

XAxisData

+
+

number

+
 
+

YAxisData

+
+

number

+
 
+

ZAxisData

+
+

number

+
 
+ + + + + + + + + + + + + + + + + + + + + +
Table: Object +properties for AccelerometerDoubleTapping data
+

Property

+
+

Type

+
+

Value

+
+

DataType

+
+

string

+
+

"DoubleTappingData"

+
+

TimeStamp

+
+

string

+
 
+

DeviceDirection

+
+

number

+
 
+ + + + + + + + + + + + + + + + + + + + + +
Table: Object +properties for Orientation data
+

Property

+
+

Type

+
+

Value

+
+

DataType

+
+

string

+
+

"OrientationData"

+
+

TimeStamp

+
+

string

+
 
+

DeviceOrientation

+
+

string

+
+

Possible values:

+
    +
  • "Undefined"

  • +
  • "DisplayUp"

  • +
  • "DisplayDown"

  • +
  • "DisplayLeftUp"

  • +
  • "DisplayRightUp"

  • +
  • "DisplayUpwards"

  • +
  • "DisplayDownwards"

  • +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Object +properties for Rotation data
+

Property

+
+

Type

+
+

Value

+
+

DataType

+
+

string

+
+

"RotationData"

+
+

TimeStamp

+
+

string

+
 
+

XRotation

+
+

number

+
 
+

YRotation

+
+

number

+
 
+

ZRotation

+
+

number

+
 
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-8074E501-A64A-41F8-B598-05D8B496438F.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-8074E501-A64A-41F8-B598-05D8B496438F.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,150 @@ + + +Criteria for +retrieving landmark information

Criteria for +retrieving landmark information

+

The criteria object specifies what landmark +information is returned and how the returned information is sorted.

+

Each GetList call +targets one type of landmark information:

+
    +
  • Landmark

  • +
  • Landmark category

  • +
  • Landmark database

  • +
+

For more information about the types, see the Landmarks +Service overview page.

+

The criteria object has three main properties: Type, Filter, +and Sort. These are described in the following table. +Properties enclosed in brackets are optional.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Criteria object properties
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

criteria.Type

+
+

Specifies the type of landmark information to retrieve.

+

Note: The available Filter properties depend on the selected +type.

+
+
+

string

+
+

Possible values:

+
    +
  • "Landmark"

  • +
  • "Category"

  • +
  • "Database"

  • +
+
+

[criteria.Filter]

+
+

Specifies how the information to be retrieved is filtered.

+

The properties of this object depend on the specified Type:

+ +

If the Filter property is not specified, GetList returns +a list of all the available landmarks, landmark categories, or landmark databases, +depending on the specified Type.

+
+

object

+
+

For example:

+

criteria.Filter.LandmarkName

+
+

[criteria.Sort]

+
+

Specifies how the returned list of information is sorted.

+
+

object

+
+

Object with the properties specified below

+
+

[criteria.Sort.Key]

+
+

Specifies the information field (object property) to sort by.

+
+

string

+
+

Possible values:

+
    +
  • If Type is "Landmark": "LandmarkName"

    +
  • +
  • If Type is "Category": "CategoryName"

    +
  • +
  • If Type is "Database": "DatabaseURI"

    +
  • +
+
+

criteria.Sort.Order

+
+

Specifies the sort order.

+

The default value for this property depends on Type:

+
    +
  • If Type is "Landmark": "Ascending"

    +
  • +
  • If Type is "Category": +No default value

  • +
  • If Type is "Database": "Ascending"

    +
  • +
+
+

string

+
+

Possible values:

+
    +
  • "Ascending"

  • +
  • "Descending"

  • +
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-814031D6-BCE6-4536-845E-C5A54EC7A881.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-814031D6-BCE6-4536-845E-C5A54EC7A881.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,18 @@ + + +signalbars

signalbars

+

Syntax:

+
[int] sysinfo.signalbars;
+

Description:

+

This is a read-only property that returns an integer indicating the network signal strength.

+

The returned value is in the range of 0 to 7, where 0 represents no signal and 7 represents the maximum signal strength.

+

For more information on network connection related aspects that you should take into account in your widget, see Dealing with network issues.

+

Example code:

+
// Retrieve the current signal strength
+var signalStrength = sysinfo.signalbars;
+
if (signalStrength == 0)
+alert("No network signal!");
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-83BFFEB2-D4F5-48DF-830A-602961ACD47A.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-83BFFEB2-D4F5-48DF-830A-602961ACD47A.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,89 @@ + + +Moving between views

Moving between views

Design intuitive ways for users to move between views by clicking buttons or links, selecting items, or pressing softkeys.

+

Users can move between views in the following ways:

+
    +
  • Click button controls in views.

    Use JavaScript to open a new page when users click a button.

  • +
  • Select softkeys.

    For example, you can add the Back or Cancel option to the right softkey to take users back to the original page. For more information, see Using softkeys.

  • +
  • Select items in the Options menu.

  • +
  • Click links.

    However, using links in widgets is not recommended. Links are one-way shortcuts; there is no direct path back to the original page.

  • +
+

The AccuWidget example illustrates changing views in different ways.

+

Figure: Selecting a button changes the view

+

The STEW example provides users with different ways to change views depending on whether the widget is run on a touch device. On touch devices, a button menu is provided, whereas an Options menu that is associated with the left soft key is provided on other devices. For more information, see Designing STEW user interface.

+

Figure: STEW button menu

+

To use buttons to change views

    +
  1. In the HTML file, create clickable buttons that users select to change the view.

        <div id="locationsContainer" class="mainContainer">
    +        <h2>Select the location:</h2>
    +            <div id="locations">
    +                <table id="locationTable">
    +                    <tr>
    +                        <td onclick="locationSelected(0, '10001', 'New York');">
    +                            <img src="gfx/city_icons/new_york.png" alt="New York" /><br />
    +                            New York
    +                        </td>
    +                        <td onclick="locationSelected(1, 'EUR|UK|UK241|LONDON', 'London');">
    +                            <img src="gfx/city_icons/london.png" alt="London" /><br />
    +                            London
    +                        </td>
    +                        <td onclick="locationSelected(2, 'EUR|FR|FR012|PARIS|', 'Paris');">
    +                            <img src="gfx/city_icons/paris.png" alt="Paris" /><br />
    +                            Paris
    +                        </td>
    +                    </tr>
    +                    <tr>
    +                        <td onclick="locationSelected(3, 'OCN|AU|NSW|SYDNEY|', 'Sydney');">
    +                            <img src="gfx/city_icons/sydney.png" alt="Sydney" /><br />
    +                            Sydney
    +                        </td>
    +                        <td onclick="locationSelected(4, 'ASI|JP|JA041|TOKYO|', 'Tokyo');">
    +                            <img src="gfx/city_icons/tokyo.png" alt="Tokyo" /><br />
    +                            Tokyo
    +                        </td>
    +                        <td onclick="locationSelected(5, null, 'Custom location');">
    +                            <img src="gfx/city_icons/custom.png" alt="[Custom location]" /><br />
    +                            [Custom location]
    +                    </td>
    +                </tr>
    +            </table>
    +        </div>
    +    </div>
  2. +
  3. Create JavaScript that changes the view. Use the HTML Document Object Model (DOM) style object to show or hide the display and the prepareForTransition() and performTransition() method of the widget object to disable updates to the widget UI to prevent screen flickering when the view changes.

    // Shows the placeholder for weather forecast
    +function showForecast() {
    +    // Reset the currently selected forecast
    +    currentlySelectedForecast = CURRENT;
    +
    +    widget.prepareForTransition("fade");
    +
    +    // Hide the location list and show the forecast view
    +    document.getElementById("locationsContainer").style.display = "none";
    +    document.getElementById("forecastContainer").style.display = "block";
    +
    +    // Change the right softkey so that it shows the location list
    +    window.menu.setRightSoftkeyLabel("Back", showLocations);
    +
    +    // Refresh the view
    +    setTimeout("widget.performTransition();", 0);
    +}
    +
    +// Shows the location table
    +function showLocations() {
    +    widget.prepareForTransition("fade");
    +
    +    // Hide the forecast view and show the city view
    +    document.getElementById("forecastContainer").style.display = "none";
    +    document.getElementById("locationsContainer").style.display = "block";
    +
    +    // Restore the default right softkey
    +    window.menu.setRightSoftkeyLabel("", null);
    +
    +    // Refresh the view
    +    setTimeout("widget.performTransition();", 0);
    +}
  4. +
+

To use softkeys to change views

Enable softkeys and add options to the Options menu to change views, as instructed in Using softkeys.

For an example, see STEW: adding menu options.

+

To use links to change views

If you specify a link to open a URI on the Internet, the new HTML page is loaded so that it replaces the widget main page and there is no way to return to the widget. Therefore, you should use the openURL() method of the widget object to open the specified link in the Web Browser for S60 in stand-alone mode. The widget remains open but is sent to the background.

<a onclick="javascript:widget.openURL(http://www.forum.nokia.com)">Open Forum Nokia</a>
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-85179E6B-E915-4D96-A5D1-D17D7C7180C7.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-85179E6B-E915-4D96-A5D1-D17D7C7180C7.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,21 @@ + + +Getting +started with widgets

Getting +started with widgets

The purpose of this section is to help you get started with developing +widgets. This section gives information on the tools that are required for +developing widgets and provides you with an overview of the steps included +in the development process. It also provides general information on the files +that constitute a widget package.

+ +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-857CF71D-3398-40C2-981A-DEC428A7BA6B.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-857CF71D-3398-40C2-981A-DEC428A7BA6B.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,52 @@ + + +JavaScript +menu object

JavaScript +menu object

+

The menu object is supported since WRT +1.0.

+

The menu object is a built-in JavaScript object +in the widget engine. It is extended from the window object +to provide widget-specific APIs for manipulating widget's options menu and +softkeys.

+

The menu object can be accessed via the window +object window.menu or just simply menu. +Thus, in the WRT environment, the term menu is a reserved +keyword and should not be used as a user-defined global variable name for +other type of objects.

+

A widget's options menu can be constructed using the menu object. +The options menu is automatically associated with the device's left softkey +and it cannot be reassigned to associate with another softkey (for example, +the right softkey). The label of the options menu (the left softkey) is the +system-defined term in the current used system language (for example, Options for +English). Thus, the left softkey label cannot be changed.

+

menu object methods:

+ +

menu object property:

+ +

For more general information on constructing an options menu and manipulating +softkeys, see Using softkeys.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-85F12A75-C9B1-43E3-A052-6EE8745B211F.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-85F12A75-C9B1-43E3-A052-6EE8745B211F.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,19 @@ + + +Landmarks, +categories, and databases

Landmarks, +categories, and databases

+

This section describes the information fields (object properties) associated +with the different Landmarks Service items:

+ +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-860D488F-98AA-4EF2-BDEC-8400A642CBD6.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-860D488F-98AA-4EF2-BDEC-8400A642CBD6.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,28 @@ + + +getMenuItemById()

getMenuItemById()

+

Description:

+

Call the getMenuItemById method with a specified +menu item's identifier to retrieve the handle of the menu item instance.

+

For more general information on creating an options menu, see Using softkeys.

+

Syntax:

+
[MenuItem] window.menu.getMenuItemById(Integer id) 
+

or

+
[MenuItem] menu.getMenuItemById(Integer id)
+

Arguments:

+
    +
  • id:

    + +

    This is the identifier of an existing menu +item whose handle is being retrieved.

    + +
  • +
+

Return value:

+

The returned value is an instance of the existing MenuItem object. If the id is invalid, the method returns "undefined".

+

Example code:

+

See the example code in the description of the MenuItem.onSelect property.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-8722B5DB-5EA6-446D-8C1D-7A0B3D8781EF.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-8722B5DB-5EA6-446D-8C1D-7A0B3D8781EF.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,811 @@ + + +Contacts Service API error messages

Contacts Service API error messages

+

This section provides information about the error messages returned +by the Contacts Service API methods.

+

+

Generic error messages

+

The following table describes the error messages returned during the +loading of the service provider.

+
+ + + + + + + + + + + + + + + + + +
Table: Service provider +error messages
+

Error message

+
+

Description

+
+

Contacts : Requested interface not supported by the provider

+
+

The requested interface is not supported by the service provider.

+
+

Contacts : Interface name missing

+
+

The interface name is missing from the request.

+
+

Contacts : Requested command not supported

+
+

The specified command is not supported by the interface. The name of +the command is invalid.

+
+

The following table describes the error messages returned by asynchronous +method calls.

+
+ + + + + + + + + +
Table: Asynchronous +call error messages
+

Error message

+
+

Description

+
+

Contacts : Callback not found

+
+

The callback method was not called.

+
+

GetList

+

The following table describes the error messages returned by GetList and callback for GetList as +part of their return value.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: GetList error +messages
+

Error message

+
+

Description

+
+

Contacts : GetList : Type is Missing

+
+

The Type property is missing from input.

+
+

Contacts : GetList : Invalid value for Type, Must be Contact/Group/Database

+
+

The Type property contains an invalid value.

+
+

Contacts : GetList : Invalid Sort Type, Object is required

+
+

The Sort property contains a value with an invalid +type. An object is expected.

+
+

Contacts : GetList : Sort Order Value is not a String

+
+

The Sort.Order property contains a value with an +invalid type. A string is expected.

+
+

Contacts : GetList : Invalid Type of Filter, Object is required

+
+

The Filter property contains a value with an invalid +type. An object is expected.

+
+

Contacts : GetList : Wrong Type of Sort Order value

+
+

The Sort.Order property contains an invalid value. +The value must be "Ascending" or "Descending".

+
+

Contacts : GetList : Wrong Type of Search value

+
+

The SearchVal property contains a value with an +invalid type. A string is expected.

+
+

Contacts : GetList : Wrong Type of ContentType

+
+

The Type property contains a value with an invalid +type. A string is expected.

+
+

Add

+

The following table describes the error messages returned by Add and callback for Add as +part of their return value.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Add error messages
+

Error message

+
+

Description

+
+

Contacts : Add : Type is Missing

+
+

The Type property is missing from the input.

+
+

Contacts : Add : Invalid Type, must be Contact/Group

+
+

The Type property contains an invalid value. The +value must be "Contact" or "Group".

+
+

Contacts : Add : Add Data is Missing

+
+

The Data property is missing from the input.

+
+

Contacts : Add : Add data Object is Missing

+
+

The Data property does not contain a value.

+
+

Contacts : Add : Group Label is Missing

+
+

The Data.GroupLabel property is missing from the +input.

+
+

Contacts : Add : Mandatory Argument is not present

+
+

Some mandatory parameters are missing from the input.

+
+

Contacts : Add : Type of Contact Id is wrong

+
+

The Data.id property for the contact contains a +value with an invalid type. A string is expected.

+
+

Contacts : Add : Invalid Type of Data, Object is required

+
+

The Data property contains a value with an invalid +type. An object is expected.

+
+

Contacts : Add : Invalid Type of Field value, Object is required

+
+

A <key>.Value property contains a value with +an invalid type. An object is expected.

+
+

Contacts : Add : Invalid Type of NextField value, Object is +required

+
+

A <key>.Next property contains a value with +an invalid type. An object is expected.

+
+

Contacts : Add : Invalid Type of Id

+
+

The Data.id property for the contact group contains +a value with an invalid type. A string is expected.

+
+

Contacts : Add : Invalid Type of GroupLabel

+
+

The Data.GroupLabel property contains a value with +an invalid type. A string is expected.

+
+

Contacts : Add : Wrong Type of ContentType

+
+

The Type property contains a value with an invalid +type. A string is expected.

+
+

Contacts : Add : At least one field is required

+
+

At least one key (Data.<key>) must be specified.

+
+

Contacts : Add : Group Label is Empty

+
+

The mandatory Data.GroupLabel property is an empty +string.

+
+

Contacts : Add : Invalid Field Key : <key>

+
+

The key (Data.<key>) is not a valid.

+
+

Contacts : Add : Field Key Not Supported on this Database: +<key>

+
+

The key (Data.<key>) is not supported on the +given database.

+
+

Contacts : Add : Field Value too long for key : <key>

+
+

The key (Data.<key>) has a length greater than +the maximum length allowed for that key.

+
+

Delete

+

The following table describes the error messages returned by Delete and callback for Delete as +part of their return value.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Delete error +messages
+

Error message

+
+

Description

+
+

Contacts : Delete : Type is Missing

+
+

The Type property is missing from the input.

+
+

Contacts : Delete : Invalid Type, must be Contact/Group

+
+

The Type property contains an invalid value. The +value must be "Contact" or "Group".

+
+

Contacts : Delete : Delete data Missing

+
+

The Data property is missing from the input.

+
+

Contacts : Delete : Invalid Type of Data , Object is required

+
+

The Data property contains a value with an invalid +type. An object is expected.

+
+

Contacts : Delete : List of Ids is missing

+
+

The list of IDs indicating the contacts or contact groups to be deleted +(Data.IdList) is missing from the input.

+
+

Contacts : Delete : Type of IdList is wrong, List is required

+
+

The Data.IdList property contains a value with +an invalid type. An array is expected.

+
+

Contacts : Delete : Invalid Type of Id

+
+

The Data.id property for the contact or contact +group contains a value with an invalid type. A string is expected.

+
+

Contacts : Delete : Wrong Type of ContentType

+
+

The Type property contains a value with an invalid +type. A string is expected.

+
+

Contacts : Delete : Mandatory Argument is not present

+
+

Some mandatory parameters are missing from the input.

+
+

Import

+

The following table describes the error messages returned by Import and callback for Import as +part of their return value.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Import error +messages
+

Error message

+
+

Description

+
+

Contacts : Import : Type is Missing

+
+

The Type property is missing from the input.

+
+

Contacts : Import : Invalid Type,it must be Contact

+
+

The Type property contains an invalid value. The +value must be "Contact".

+
+

Contacts : Import : Import data Missing

+
+

The Data property is missing from the input.

+
+

Contacts : Import : Invalid Type of Data , Object is required

+
+

The Data property contains a value with an invalid +type. An object is expected.

+
+

Contacts : Import : Import Source Filename is Missing

+
+

The Data.SourceFile property is missing from the +input.

+
+

Contacts : Import : Import Source File is not a String

+
+

The Data.SourceFile property contains a value with +an invalid type. A string is expected.

+
+

Contacts : Import : Wrong Type of ContentType

+
+

The Type property contains a value with an invalid +type. A string is expected.

+
+

Contacts : Import : Mandatory Argument is not present

+
+

Some mandatory parameters are missing from the input.

+
+

Contacts : Import : Import DataBaseUri is not a String

+
+

The Data.DBUri property contains a value with an +invalid type. A string is expected.

+
+

Contacts : Import : Filename too long

+
+

The value of the Data.SourceFile property exceeds +256 characters.

+
+

Export

+

The following table describes the error messages returned by Export and callback for Export as +part of their return value.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Export error +messages
+

Error message

+
+

Description

+
+

Contacts : Export : Type is Missing

+
+

The Type property is missing from the input.

+
+

Contacts : Export : Invalid Type, it must be Contact

+
+

The Type property contains an invalid value. The +value must be "Contact".

+
+

Contacts : Export : Export Data Missing

+
+

The Data property is missing from the input.

+
+

Contacts : Export : Invalid Type of Data , Object is required

+
+

The Data property contains a value with an invalid +type. An object is expected.

+
+

Contacts : Export : Export Destination Filename is Missing

+
+

The Data.DestinationFile property is missing from +the input.

+
+

Contacts : Export : Contact Id to be exported is missing.

+
+

The Data.id property is missing from the input.

+
+

Contacts : Export : Wrong Type of ContentType

+
+

The Type property contains a value with an invalid +type. A string is expected.

+
+

Contacts : Export : Destination Filename is of wrong Type

+
+

The Data.DestinationFile property contains a value +with an invalid type. A string is expected.

+
+

Contacts : Export : Id is of wrong Type

+
+

The Data.id property contains a value with an invalid +type. A string is expected.

+
+

Contacts : Export : Mandatory Argument is not present

+
+

Some mandatory parameters are missing from the input.

+
+

Contacts : Export : Export DataBaseUri is not a String

+
+

The Data.DBUri property contains a value with an +invalid type. A string is expected.

+
+

Contacts : Export : Filename too long

+
+

The value of the Data.DestinationFile property +exceeds 256 characters.

+
+

Organise

+

The following table describes the error messages returned by Organise and callback for Organise as +part of their return value.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Organise error +messages
+

Error message

+
+

Description

+
+

Contacts : Organise : Type is Missing

+
+

The Type property is missing from the input.

+
+

Contacts : Organise : Invalid Content Type, It must be Group

+
+

The Type property contains an invalid value. The +value must be "Group".

+
+

Contacts : Organise : Organise Data is Missing

+
+

The Data property is missing from the input.

+
+

Contacts : Organise : Invalid Type of Data , Object is required

+
+

The Data property contains a value with an invalid +type. An object is expected.

+
+

Contacts : Organise : List of Ids is missing

+
+

The list of contact IDs (Data.IdList) is missing +from the input.

+
+

Contacts : Organise : Id is missing

+
+

The contact group ID (Data.id) is missing from +the input.

+
+

Contacts : Organise : OperationType is Missing

+
+

The OperationType property is missing from the +input.

+
+

Contacts : Organise : Operation Type is Wrong

+
+

The OperationType property contains a value with +an invalid type. A string is expected.

+
+

Contacts : Organise : Invalid Operation Type

+
+

The OperationType property contains an invalid +value. The value must be "Associate" or "Disassociate".

+
+

Contacts : Organise : Id type is wrong

+
+

The Data.id property contains a value with an invalid +type. A string is expected.

+
+

Contacts : Organise : IdList type is wrong

+
+

The Data.IdList property contains a value with +an invalid type. An array is expected.

+
+

Contacts : Organise : Wrong Type of ContentType

+
+

The Type property contains a value with an invalid +type. A string is expected.

+
+

Contacts : Organise : Mandatory Argument is not present

+
+

Some mandatory parameters are missing from the input.

+
+

Contacts : Organise : Id List is empty

+
+

The Data.IdList array contains no items.

+
+

Cancel

+

The following table describes the error messages returned by Cancel as part of its return value.

+
+ + + + + + + + + + + + + +
Table: Cancel error +messages
+

Error message

+
+

Description

+
+

Contacts : Cancel : Cancel Unsuccessful

+
+

The Cancel call was unsuccessful. Check the error code.

+
+

Contacts : Cancel : Transaction ID is Missing

+
+

The TransactionID property is missing from the +input.

+
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-876B67CB-99C0-4925-A51C-646EA5F867B6.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-876B67CB-99C0-4925-A51C-646EA5F867B6.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,28 @@ + + +hideSoftkeys()

hideSoftkeys()

+

Description:

+

Call the hideSoftkeys method to hide the softkey +pane.

+

By default, the device's softkey pane is hidden. The softkey pane is +shown automatically when the end user presses one of the softkeys.

+

For more general information on using softkeys in your widget, see Using softkeys.

+

Syntax:

+
[void] window.menu.hideSoftkeys(void) 
+

or

+
[void] menu.hideSoftkeys(void)
+

Arguments:

+

This method takes no arguments.

+

Return value:

+

This method does not return a value.

+

Example code:

+
function useFullScreen()
+{
+ // choose to hide the softkey pane to get more screen space
+ window.menu.hideSoftkeys();
+ ...
+}
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-8787F2FD-41C1-46EC-B99E-7A9351C5A26B.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-8787F2FD-41C1-46EC-B99E-7A9351C5A26B.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,89 @@ + + +Criteria for +deleting landmark information

Criteria for +deleting landmark information

+

The criteria object specifies the landmark +or landmark category to delete.

+

The criteria object has two main properties: Type and Data. +These are described in the following table.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Criteria object properties
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

criteria.Type

+
+

Specifies the type of landmark information to delete.

+
+

string

+
+

Possible values:

+
    +
  • "Landmark"

  • +
  • "Category"

  • +
+
+

criteria.Data

+
+

Specifies the landmark or landmark category to delete.

+
+

object

+
+

Object with the properties specified below

+
+

[criteria.Data.DatabaseURI]

+
+

Specifies the URI of the landmark database from which to delete the +landmark or landmark category.

+

If this property is not specified, the delete operation is performed +on the default database.

+
+

string

+
+

For example: file://c:landmarks.ldb

+
+

criteria.Data.id

+
+

Specifies the unique ID of the landmark or landmark category to delete.

+

Use the GetList method +to retrieve this ID.

+
  
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-87B333A2-FDA1-4BC3-8803-C5702C5869A1.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-87B333A2-FDA1-4BC3-8803-C5702C5869A1.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,31 @@ + + +setNavigationEnabled()

setNavigationEnabled()

+

Description:

+

The navigation mode in a widget can be toggled between a cursor and a tabbed navigation mode. By default, the browsing mode of a widget is set to use a cursor (pointer). The setNavigationEnabled method is used for changing the widget's navigation mode.

+

The argument navigationType is of Boolean type and can be set to true or false to toggle the navigation mode between the cursor mode and the tab mode respectively.

+

Syntax:

+
[void] window.widget.setNavigationEnabled(Boolean navigationMode) 
+

or

+
[void] widget.setNavigationEnabled(Boolean navigationMode)
+

Arguments:

+
    +
  • navigationMode:

    + +

    Set to true to enable the cursor navigation mode, and set to false to enable the tabbed navigation mode.

    + +
  • +
+

Return value:

+

This method does not return a value.

+

Remarks:

+

Tab navigation is only recommended for simple vertical navigation. Enable the tabbed navigation mode to disable the cursor pointer when using JavaScript to handle key events. For more information, see Navigating on screens.

+

Example code:

+
// Tab mode
+widget.setNavigationEnabled(false); 
+// Cursor mode
+widget.setNavigationEnabled(true);
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-890D2F5C-D43F-44B2-97A0-5F5B9230C85F.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-890D2F5C-D43F-44B2-97A0-5F5B9230C85F.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,163 @@ + + +IDataSource.Export()

IDataSource.Export()

+

Description:

+

The Export method exports entries from a calendar. +The information is exported to an iCal or vCal file. For more information +about these two formats, see the Calendar +Service overview page.

+

This method can be called both synchronously and asynchronously.

+

Syntax:

+

For synchronous calls:

+
result = so.IDataSource.Export(criteria);
+ +

For asynchronous calls:

+
result = so.IDataSource.Export(criteria, callback);
+ +

Arguments:

+
    +
  • criteria:

    + +

    This is an object that specifies the entries to export and optionally +the source calendar. For more information about the object properties and +how to define them, see section Criteria for exporting calendar entries.

    + +
  • +
  • callback:

    + +

    The callback argument is the name of the method +that is executed when an asynchronous Export call has +results or status information to return. You must define this method separately. +Follow the instructions in section Defining the callback handler for an asynchronous method to +define the callback method.

    +

    This argument is used only with an asynchronous Export call.

    + +
  • +
+

Return value:

+

If synchronous, the Export method returns an object +that contains an error code, an error message, and optionally the exported +calendar entries.

+
+ + + + + + + + + + + + + + + + + + + + + +
Table: Return value +properties for a synchronous Export
+

Property

+
+

Description

+
+

Value

+
+

[result.ReturnValue]

+
+

This is a text string that contains the exported entries in the +specified format.

+

This property is only included if Data.FileName was +not specified in the input. +This property serves as a buffer that contains the same data as the target +file would have had it been specified.

+
 
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See Calendar Service API error messages.

+
+

If asynchronous, the Export method returns an object +that contains a transaction ID for the callback instance, +an error code, and an error message (see the following table). When the asynchronous +call has completed, callback returns an object that contains +an error code, an error message, and optionally the exported calendar entries +(see the preceding table).

+
+ + + + + + + + + + + + + + + + + + + + + +
Table: Return value +properties for an asynchronous Export
+

Property

+
+

Description

+
+

Value

+
+

result.TransactionID

+
+

This is a number used as an identification to match transactions started +with an asynchronous Export call to one or more calls +it generates to callback.

+
 
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See Calendar Service API error messages.

+
+

Remarks:

+
    +
  • The calendar file from which the entries are exported must +exist on the device.

  • +
  • For detailed information about calendar entries, see section Calendar entries.

  • +
+

Example code:

+

+

For the complete source of a sample widget +that demonstrates how to use this Service API, see the full example.

+ + + + +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-894E87F7-7146-44DD-8CAF-60F7C446B0D8.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-894E87F7-7146-44DD-8CAF-60F7C446B0D8.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,96 @@ + + +IDataSource.RequestNotification()

IDataSource.RequestNotification()

+

Description:

+

The RequestNotification method registers the widget to receive notifications of changes to the event +log.

+

This is an asynchronous method.

+

Syntax:

+
result = so.IDataSource.RequestNotification(criteria, callback);
+ +

Arguments:

+
    +
  • criteria:

    + +

    This is an object that specifies the request for notification of changes +to the event log. For more information about the object properties and how +to define them, see section Criteria for requesting notification.

    + +
  • +
  • callback:

    + +

    The callback argument is the name of the method +that is executed when an asynchronous RequestNotification call +has results or status information to return. You must define this method separately. +Follow the instructions in section Defining the callback handler for an asynchronous method to +define the callback method.

    + +
  • +
+

Return value:

+

The RequestNotification method returns an object +that contains a transaction ID for the callback instance, +an error code, and an error message (see the following table). When the asynchronous +call has completed, callback returns an object that contains +an error code and an error message (see Table: +Callback return value).

+
+ + + + + + + + + + + + + + + + + + + + + +
Table: Return value +properties for an asynchronous RequestNotification
+

Property

+
+

Description

+
+

Value

+
+

result.TransactionID

+
+

This is a number used as an identification to match transactions started +with the asynchronous GetList call to one or more calls +it generates to callback.

+

This property is only valid for asynchronous calls.

+
 
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See Logging Service API error messages.

+
+

Example code:

+

+

For the complete source of a sample widget +that demonstrates how to use this Service API, see the +full example.

+ + +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-896164BE-C1A6-42BF-B2BD-7C63CF8C166A.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-896164BE-C1A6-42BF-B2BD-7C63CF8C166A.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,18 @@ + + +Memory and file system information services

Memory and file system information services

+

File system service methods:

+ +

Memory and file system information properties:

+ +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-89A7E790-06F0-488E-B833-AC63B9995E25.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-89A7E790-06F0-488E-B833-AC63B9995E25.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,24 @@ + + +Returned +landmark information

Returned +landmark information

+

The ReturnValue property returned by a synchronous GetList call +and by callback for +an asynchronous GetList call is an iterator containing +the requested landmark information. Each item (object) in the iterator corresponds +to one landmark, landmark category, or landmark database, depending on what type of landmark information +was requested. The following sections describe the object properties +returned for each type:

+ +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-8A6C9B2B-F130-4174-B105-C89A0E0469E0.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-8A6C9B2B-F130-4174-B105-C89A0E0469E0.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,11 @@ + + +Beep tone control services

Beep tone control services

+

Beep control method

+ +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-8C55C778-DCB6-48CA-AA88-089720FE4C42_d0e3358_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-8C55C778-DCB6-48CA-AA88-089720FE4C42_d0e3358_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-8DC78944-809B-462B-BEC2-0114696F8B14.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-8DC78944-809B-462B-BEC2-0114696F8B14.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,35 @@ + + +Localizing STEW

Localizing STEW

This example illustrates how to localize a widget into several languages. To be able to localize a widget, you must place all text that is visible on the display into separate JavaScript files.

+

In this example, STEW is localized into Simplified Chinese. For more information about the localization process, see Supporting multiple languages.

+

To localize STEW

    +
  1. Create STEW, as described in the section Introducing STEW.

  2. +
  3. Create a string table in the localizedTextStrings.js file.

  4. +
  5. Translate the display text in the localizedTextStrings.js file into Chinese.

  6. +
  7. Create a folder called zh.lproj in the widget root folder.

  8. +
  9. Store the translated localizedTextStrings.js file in the zh.lproj folder.

  10. +

The users who select Chinese as the language on their devices automatically see all STEW display text in Chinese.

+

Creating the string table

The localizedTextStrings.js file contains a StringTable object that has two properties: HTML and Code.

var StringTable = {
+	
+	HTML: {
+		...
+	},
+
+	Code: {
+		...
+	}
+}
+

The HTML property is a placeholder array of all strings in the main.html file that are visible to users. Each line contains an ID and a text string.

For example, the following code is difficult to localize, because the text is located within the HTML:

<th >Login</th>

To make the code easy to localize, use an ID to refer to the string in the HTML:

 <th id="loginLabel"></th>

Then add the ID to the HTML section of the StringTable object:

HTML: {
+	loginLabel:				"Login"
+}
+

All strings are stored in the StringTable object and mapped to DOM element IDs as the key and text as values. Add a loadStringTable function call to the init function to load the strings to the HTML:

function loadStringTable() {
+	for ( var name in StringTable.HTML ) {
+		var element = document.getElementById( name );
+		element.innerHTML = StringTable.HTML[name];
+	}
+}
+

The function iterates through all the properties it finds in StringTable.HTML, searches for the name from the DOM, and sets the value to innerHTML. The same procedure applies to all strings in the code. The sample below illustrates how the code changes:

statusTd.innerHTML = "<span class='latest'>Latest: </span>" + ...
statusTd.innerHTML = "<span class='latest'>" + StringTable.Code.updateScreenLatest + ": </span>" + ...

Similarly, all display text in the JavaScript files is added to the Code property of the StringTable object.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-8F2A8087-A590-43B8-A1B3-BE986CDCFEEC.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-8F2A8087-A590-43B8-A1B3-BE986CDCFEEC.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,16 @@ + + +drivelist

drivelist

+

Syntax:

+
[string] sysinfo.drivelist
+

Description:

+

This is a read-only property that returns a text string containing all the user's existing drive names separated by a space.

+

The user's drive list also includes the memory card if it is inserted into a device.

+

Note: The ROM (z: drive) and the d: drives in an S60 device are system drives. Thus, they are not reported by the drivelist property.

+
+

Example code:

+

See the drivefree() example code.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-90730500-7FDD-4D32-8C6C-9AE6E01AE08C-master.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-90730500-7FDD-4D32-8C6C-9AE6E01AE08C-master.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-90730500-7FDD-4D32-8C6C-9AE6E01AE08C_d0e1390_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-90730500-7FDD-4D32-8C6C-9AE6E01AE08C_d0e1390_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-90ECCB11-41D3-4022-9DC0-F3770195F7FE_d0e10560_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-90ECCB11-41D3-4022-9DC0-F3770195F7FE_d0e10560_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-9115340A-5D15-4139-A236-945D199583AF.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-9115340A-5D15-4139-A236-945D199583AF.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,290 @@ + + +Calculation criteria

Calculation criteria

+

The criteria object specifies the mathematical +operation to perform and the input values to use in the operation.

+

The Calculate method +supports the following operations:

+
    +
  • FindDistance

    + +

    This operation calculates the distance between two locations. The operation +takes as input the coordinates of the source location and target location. +The return value is the distance in meters.

    + +
  • +
  • FindBearingTo

    + +

    This operation calculates the bearing to a target location from a source +location. The operation takes as input the coordinates of the source location +and target location. The return value is the bearing in degrees counting clockwise +relative to true north.

    + +
  • +
  • MoveCoordinates

    + +

    This operation calculates a new location based on movement from a source +location. The operation takes as input the coordinates of the source location, +the distance moved, and the direction of the movement. The return value consists +of the coordinates of the new location.

    + +
  • +
+

The operations require different input parameters, as summarized in +the following table. The properties that contain the input are described in +detail in Table: +Criteria object properties. The return values are described in section Calculation results.

+
+ + + + + + + + + + + + + + + + + +
Table: Supported operations +and their input
+

Operation

+
+

Input

+
+

FindDistance

+
+

DistanceParamSource

+

DistanceParamDestination

+
+

FindBearingTo

+
+

DistanceParamSource

+

DistanceParamDestination

+
+

MoveCoordinates

+
+

DistanceParamSource

+

MoveByThisDistance

+

MoveByThisBearing

+
+

+

Note: If a longitude or latitude value in the input is outside the expected +range (see the following table), the system attempts to correct the value +automatically. For example, if longitude is set to +185 and latitude to +45, +this is passed on as longitude -175 and latitude +45, since +185 is outside +the expected longitude range of [+180.00, -180.00].

+

Moreover, if a latitude value is outside the expected range, the system +may need to adjust both the latitude and longitude to arrive at the correct +coordinates. For example, if longitude is set to +10 and latitude to +95, +a point on the Western hemisphere near the North Pole, these are adjusted +to longitude -170 and latitude +85. In this case, it is necessary to adjust +both values to maintain the correct location, even though only the original +latitude value is outside the expected range. If only the latitude value were +adjusted, the coordinates (longitude +10, latitude +85) would point to a location +on the Eastern hemisphere.

+
+

The following table describes the properties of the criteria object. Properties enclosed +in brackets are optional.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Criteria object properties
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

criteria.MathRequest

+
+

Specifies the mathematical operation to perform.

+
+

string

+
+

Possible values:

+
    +
  • "FindDistance"

  • +
  • "FindBearingTo"

  • +
  • "MoveCoordinates"

  • +
+
+

criteria.DistanceParamSource

+
+

Specifies the coordinates of the source location.

+

Use the WGS +84 datum with decimal degree representation to reference coordinates.

+
+

object

+
+

Object with the properties specified below

+
+

criteria.DistanceParamSource.Longitude

+
+

Specifies the longitude coordinate of the source location.

+
+

number

+
+

[+180.00, -180.00]

+
+

criteria.DistanceParamSource.Latitude

+
+

Specifies the latitude coordinate of the source location.

+
+

number

+
+

[+90.00, -90.00]

+
+

criteria.DistanceParamSource.Altitude

+
+

Specifies the altitude coordinate of the source location.

+

The altitude value does not affect the result of the calculation. It +is included to maintain a uniform input argument.

+
+

number

+
+

Any integer or decimal

+
+

[criteria.DistanceParamDestination]

+
+

Specifies the coordinates of the target location.

+

This property and its child properties are required when MathRequest is +set to FindDistance or FindBearingTo.

+

Use the WGS +84 datum with decimal degree representation to reference coordinates.

+
+

object

+
+

Object with the properties specified below

+
+

[criteria.DistanceParamDestination.Longitude]

+
+

Specifies the longitude coordinate of the target location.

+
+

number

+
+

[+180.00, -180.00]

+
+

[criteria.DistanceParamDestination.Latitude]

+
+

Specifies the latitude coordinate of the target location.

+
+

number

+
+

[+90.00, -90.00]

+
+

[criteria.DistanceParamDestination.Altitude]

+
+

Specifies the altitude coordinate of the target location.

+

The altitude value does not affect the result of the calculation. It +is included to maintain a uniform input argument.

+
+

number

+
+

Any integer or decimal

+
+

[criteria.MoveByThisDistance]

+
+

Specifies the distance moved, that is, the distance between the source +location and the new location. The distance is in meters.

+

This property is required when MathRequest is set +to MoveCoordinates.

+
+

number

+
+

Any integer or decimal

+
+

[criteria.MoveByThisBearing]

+
+

Specifies the direction of movement from the source location. The direction +is expressed in degrees counting clockwise relative to true north.

+

This property is required when MathRequest is set +to MoveCoordinates.

+
+

number

+
+

Any integer or decimal

+
+

+

\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-91579EE5-A608-401C-82B4-DCF1723EC7B5.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-91579EE5-A608-401C-82B4-DCF1723EC7B5.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,44 @@ + + +JavaScript Messaging +Service API

JavaScript Messaging +Service API

+

The Messaging +Service API is supported since WRT 1.1.

+

The Messaging Service API allows widgets to send, retrieve, +and manage messages using the Messaging Center of a device. The API is integrated +into WRT through the device object.

+

For an overview of the service and the API, see section Accessing messages and using messaging services.

+

Using the Messaging Service API

+

To use the Messaging Service API, your widget must first create a service object for it +using the device.getServiceObject() method. +Use Service.Messaging to identify the service provider +and IMessaging to identify the supported interface:

+
var so = device.getServiceObject("Service.Messaging", "IMessaging");
+ +

This service object can then be used to access the services provided +by the API:

+ +
+

Emulator support

+

The S60 5th Edition SDK emulator provides full support for the Messaging +Service API.

+
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-91B65EA3-06B7-475E-9557-29EE584731E5.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-91B65EA3-06B7-475E-9557-29EE584731E5.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,18 @@ + + +Introduction +to S60 Web Runtime environment

Introduction +to S60 Web Runtime environment

Mobile devices that run S60 3rd Edition, Feature Pack 2 or S60 5th Edition +include the Web Runtime (WRT) environment, which allows widgets to run on +a mobile device. Widgets are lightweight applications that are based on standard +Web technologies and are typically used to access information on the Web.

For information about Web Runtime versions and mobile device support +for Web Runtime, see section Web Runtime versions and device support.

The Web Runtime environment provides widgets with a variety of features +and allows them to access the Internet without the Web Browser for S60 being +launched. For a list of standards supported by WRT, see section Web Runtime standards. +For a list of features supported by WRT, see section Web Runtime features.

Note that in addition to testing your widget on a compatible mobile +device, you can also test it using the emulator included in the S60 Platform +SDK for Symbian OS, for C++ package. For more information on the S60 C++ SDK, +see Before you start.

\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-92BD4759-43FA-482F-A12B-3F5607D4AA35.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-92BD4759-43FA-482F-A12B-3F5607D4AA35.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,899 @@ + + +Calendar Service API error messages

Calendar Service API error messages

+

This section provides information about the error messages returned +by the Calendar Service API methods.

+

+

Generic error messages

+

The following table describes the error messages returned during the +loading of the service provider.

+
+ + + + + + + + + + + + + +
Table: Service provider +error messages
+

Error message

+
+

Description

+
+

Calendar:Interface not supported

+
+

The requested interface is not supported by the service provider.

+
+

Calendar:Interface name missing

+
+

The interface name is missing from the request.

+
+

The following table describes the error messages returned by asynchronous +method calls.

+
+ + + + + + + + + +
Table: Asynchronous +call error messages
+

Error message

+
+

Description

+
+

Calendar:Cmd:Insufficent arguments for asynchronous request

+
+

The Callback method is missing.

+
+

GetList

+

The following table describes the error messages returned by GetList as part of its return value.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: GetList error +messages
+

Error message

+
+

Description

+
+

Calendar:GetList:Type is invalid

+
+

The Type property is missing from input or it contains +an invalid value.

+
+

Calendar:GetList:Filter is invalid

+
+

The Filter property contains a value with an invalid +type.

+
+

Calendar:GetList:DefaultCalendar is invalid

+
+

The Filter.DefaultCalendar property contains a +value with an invalid type.

+
+

Calendar:GetList:Id is invalid

+
+

The Filter.id property contains a value with an +invalid type.

+
+

Calendar:GetList:LocalId is invalid

+
+

The Filter.LocalId property contains a value with +an invalid type.

+
+

Calendar:GetList:StartRange is invalid

+
+

The Filter.StartRange property contains a value +with an invalid type.

+
+

Calendar:GetList:EndRange is invalid

+
+

The Filter.EndRange property contains a value with +an invalid type.

+
+

Calendar:GetList:SearchText is invalid

+
+

The Filter.SearchText property contains a value +with an invalid type.

+
+

Calendar:GetList:CalendarName is invalid

+
+

The Filter.CalendarName property contains a value +with an invalid type.

+
+

Add

+

The following table describes the error messages returned by Add as part of its return value.

+

+

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Add error messages
+

Error message

+
+

Description

+
+

Calendar:Add:Entry Type is invalid

+
+

The Type property contains a value with an invalid +type.

+
+

Calendar:Add:InstanceStartTime is invalid

+
+

The Item.InstanceStartTime property contains a +value with an invalid type.

+
+

Calendar:Add:LocalId is invalid

+
+

The Item.LocalId property contains a value with +an invalid type.

+
+

Calendar:Add:Summary is invalid

+
+

The Item.Summary property contains a value with +an invalid type.

+
+

Calendar:Add:Description is invalid

+
+

The Item.Description property contains a value +with an invalid type.

+
+

Calendar:Add:Location is invalid

+
+

The Item.Location property contains a value with +an invalid type.

+
+

Calendar:Add:Replication is invalid

+
+

The Item.Replication property contains a value +with an invalid type.

+
+

Calendar:Add:Status is invalid

+
+

The Item.Status property contains a value with +an invalid type.

+
+

Calendar:Add:Method is invalid

+
+

The Item.Method property contains a value with +an invalid type.

+
+

Calendar:Add:SeqNum is invalid

+
+

The Item.SeqNum property contains a value with +an invalid type.

+
+

Calendar:Add:Priority is invalid

+
+

The Item.Priority property contains a value with +an invalid type.

+
+

Calendar:Add:StartTime is invalid

+
+

The Item.StartTime property contains a value with +an invalid type.

+
+

Calendar:Add:EndTime is invalid

+
+

The Item.EndTime property contains a value with +an invalid type.

+
+

Calendar:Add:AlarmTime is invalid

+
+

The Item.AlarmTime property contains a value with +an invalid type.

+
+

Calendar:Add:PhoneOwner is invalid

+
+

The Item.PhoneOwner property contains a value with +an invalid type.

+
+

Calendar:Add:Organizer is invalid

+
+

The Item.Organizer property contains a value with +an invalid type or the Item.Organizer.Address property +is missing.

+
+

Calendar:Add:Attendees is invalid

+
+

The Item.Attendees property contains a value with +an invalid type or the Address property of one of the +items is missing.

+
+

Calendar:Add:CommonName is invalid

+
+

The CommonName property for an attendee contains +a value with an invalid type.

+
+

Calendar:Add:Address is invalid

+
+

The Address property for an attendee contains a +value with an invalid type.

+
+

Calendar:Add:Role is invalid

+
+

The Role property for an attendee contains a value +with an invalid type.

+
+

Calendar:Add:Status is invalid

+
+

The Status property for an attendee contains a +value with an invalid type.

+
+

Calendar:Add:Rsvp is invalid

+
+

The Rsvp property for an attendee contains a value +with an invalid type.

+
+

Calendar:Add:RepeatDates is invalid

+
+

The Item.RepeatDates property contains a value +with an invalid type or the values in the array are invalid.

+
+

Calendar:Add:ExDates is invalid

+
+

The Item.ExDates property contains a value with +an invalid type or the values in the array are invalid.

+
+

Calendar:Add:RepeatRule is invalid

+
+

The Item.RepeatRule property contains a value with +an invalid type.

+
+

Calendar:Add:Type is invalid

+
+

The Item.RepeatRule.Type property contains a value +with an invalid type.

+
+

Calendar:Add:Type is missing

+
+

The Item.RepeatRule.Type property is missing from +the input.

+
+

Calendar:Add:DaysInWeek is invalid

+
+

The Item.RepeatRule.DaysInWeek property contains +a value with an invalid type or the values in the array are invalid.

+
+

Calendar:Add:UntilDate is invalid

+
+

The Item.RepeatRule.UntilDate property contains +a value with an invalid type.

+
+

Calendar:Add:RepeatRule:StartDate is invalid

+
+

The Item.RepeatRule.StartDate property contains +a value with an invalid type.

+
+

Calendar:Add:Interval is invalid

+
+

The Item.RepeatRule.Interval property contains +a value with an invalid type.

+
+

Calendar:Add:MonthDays is invalid

+
+

The Item.RepeatRule.MonthDays property contains +a value with an invalid type or the values in the array are invalid.

+
+

Calendar:Add:DaysInWeek is invalid

+
+

The Item.RepeatRule.DaysInWeek property contains +a value with an invalid type or the values in the array are invalid.

+
+

Calendar:Add:DaysOfMonth is invalid

+
+

The Item.RepeatRule.DaysOfMonth property contains +a value with an invalid type or the values in the array are invalid.

+
+

Calendar:Add:RepeatRule:DaysOfMonth:Day

+
+

The Item.RepeatRule.DaysOfMonth.Day property contains +a value with an invalid type.

+
+

Calendar:Add:RepeatRule:DaysOfMonth:WeekNumber

+
+

The Item.RepeatRule.DaysOfMonth.WeekNum property +contains a value with an invalid type.

+
+

Calendar:Add:Month

+
+

The Item.RepeatRule.Month property contains a value +with an invalid type.

+
+

Calendar:Add:Item is invalid

+
+

The Item property contains a value with an invalid +type.

+
+

Calendar:Add:CalendarName is invalid

+
+

The Item.CalendarName property contains a value +with an invalid type.

+
+

Delete

+

The following table describes the error messages returned by Delete and callback for Delete as +part of their return value.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Delete error +messages
+

Error message

+
+

Description

+
+

Calendar:Delete:Type is invalid

+
+

The Type property contains an invalid value.

+
+

Calendar:Delete:CalendarName is missing

+
+

For a delete call with Type = "Calendar", the Data.CalendarName property +is missing from the input.

+
+

Calendar:Delete:CalendarName is invalid

+
+

The Data.CalendarName property contains a value +with an invalid type.

+
+

Calendar:Delete:StartRange is invalid

+
+

The Data.StartRange property contains a value with +an invalid type.

+
+

Calendar:Delete:EndRange is invalid

+
+

The Data.EndRange property contains a value with +an invalid type.

+
+

Calendar:Delete:DeleteAll is invalid

+
+

The Data.DeleteAll property contains a value with +an invalid type.

+
+

Calendar:Delete:IdList is invalid

+
+

The Data.IdList property contains a value with +an invalid type.

+
+

Calendar:Delete:LocalIdList is invalid

+
+

The Data.LocalIdList property contains a value +with an invalid type.

+
+

Calendar:Delete:Data is missing

+
+

For a delete call with Type = "CalendarEntry", +the Data property contains invalid data.

+
+

Calendar:Delete:Data is invalid

+
+

The Data property contains a value with an invalid +type.

+
+

Import

+

The following table describes the error messages returned by Import and callback for Import as +part of their return value.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Import error +messages
+

Error message

+
+

Description

+
+

Calendar:Import:CalendarName is invalid

+
+

The Data.CalendarName property contains a value +with an invalid type.

+
+

Calendar:Import:FileName is invalid

+
+

The Data.FileName property contains a value with +an invalid type or the value exceeds 239 characters.

+
+

Calendar:Import:Type is invalid

+
+

The Type property contains an invalid value.

+
+

Calendar:Import:Data is missing

+
+

The Data property is missing from the input.

+
+

Calendar:Import:Data is invalid

+
+

The Data property contains a value with an invalid +type.

+
+

Calendar:Import:Format is missing

+
+

The Data.Format property is missing from the input.

+
+

Calendar:Import:FileName is missing

+
+

The Data.FileName property is missing from the +input.

+
+

Export

+

The following table describes the error messages returned by Export and callback for Export as +part of their return value.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Export error +messages
+

Error message

+
+

Description

+
+

Calendar:Export:Type is invalid

+
+

The Type property contains an invalid value.

+
+

Calendar:Export:Data is missing

+
+

The Data property is missing from the input.

+
+

Calendar:Export:Data is invalid

+
+

The Data property contains a value with an invalid +type.

+
+

Calendar:Export:Format is missing

+
+

The Data.Format property is missing from the input.

+
+

Calendar:Export:FileName is invalid

+
+

The Data.FileName property contains a value with +an invalid type or the value exceeds 239 characters.

+
+

Calendar:Export:IdList is invalid

+
+

The Data.IdList property contains a value with +an invalid type.

+
+

Calendar:Export:LocalIdList is invalid

+
+

The Data.LocalIdList property contains a value +with an invalid type.

+
+

Calendar:Export:CalendarName is invalid

+
+

The Data.CalendarName property contains a value +with an invalid type.

+
+

RequestNotification

+

The following table describes the error messages returned by callback for RequestNotification as +part of its return value.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: RequestNotification +error messages
+

Error message

+
+

Description

+
+

Calendar:RequestNotification:CalendarName is invalid

+
+

The Filter.CalendarName property contains a value +with an invalid type.

+
+

Calendar:RequestNotification:Type is invalid

+
+

The Type property contains a value with an invalid +type.

+
+

Calendar:RequestNotification:StartRange is invalid

+
+

The Filter.StartRange property contains a value +with an invalid type.

+
+

Calendar:RequestNotification:EndRange is invalid

+
+

The Filter.EndRange property contains a value with +an invalid type.

+
+

Calendar:RequestNotification:IncludeUndatedTodos is invalid

+
+

The Filter.IncludeUndatedTodos property contains +a value with an invalid type.

+
+

Calendar:RequestNotification:LocalIdList is invalid

+
+

The Filter.LocalIdList property contains a value +with an invalid type or the data in the array is invalid.

+
+

Calendar:RequestNotification:Filter is invalid

+
+

The Filter property contains a value with an invalid +type.

+
+

Cancel

+

The following table describes the error messages returned by Cancel as part of its return value.

+
+ + + + + + + + + + + + + +
Table: Cancel error +messages
+

Error message

+
+

Description

+
+

Calendar:Cancel:TransactionID is invalid

+
+

The TransactionID property contains an invalid +value or an asynchronous call associated with this ID has already been completed.

+
+

Calendar:Cancel:TransactionID is missing

+
+

The TransactionID property is missing from the +input.

+
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-92D152D3-E29A-4010-B5A0-9D37A0369A21.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-92D152D3-E29A-4010-B5A0-9D37A0369A21.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,130 @@ + + +Criteria for +exporting a contact

Criteria for +exporting a contact

+

The criteria object specifies the contact +to export and optionally the source database.

+

The criteria object has two main properties: Type and Data. +These are described in the following table. Properties enclosed in brackets +are optional.

+

Note: All string values in the object are Unicode.

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Criteria object properties
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

criteria.Type

+
+

Specifies the type of contact information to export. This is always "Contact".

+
+

string

+
+

Possible values:

+
    +
  • "Contact"

  • +
+
+

criteria.Data

+
+

Specifies the contact to export.

+
+

object

+
+

Object with the properties specified below

+
+

[criteria.Data.DBUri]

+
+

Specifies the contacts database from which the contact is exported.

+

If this property is not specified, the default database is used.

+
+

string

+
 
+

criteria.Data.DestinationFile

+
+

Specifies the full path and file name of the target file to which the +contact is exported. The target file is created during the export and only +contains the exported contact.

+

Note:

    +
  • The target file will be in vCard format. For an example of +this format, see below.

  • +
  • The target file can have any file extension or no extension. +Typically, the extension is .vcf.

  • +
  • If the full path is not specified, the target file is created +in the private folder of the process.

  • +
+
+
+

string

+
+

The string cannot exceed 256 characters.

+
+

criteria.Data.id

+
+

Specifies the unique identifier of the contact to export.

+
+

string

+
 
+

vCard format example

+
BEGIN:VCARD
+VERSION:2.1
+N:Smith;John
+FN:John Smith
+ORG:Company Inc.
+TITLE:CEO
+TEL;WORK:VOICE:(555) 111-1111
+TEL;HOME;VOICE:(555) 222-2222
+ADR;WORK:;;Wall Street;New York City;NY;12345;United States of America
+LABEL;WORK;ENCODING=QUOTED-PRINTABLE:Wall Street=0D=0ANew York City, NY 12345=0D=0AUnited States of America
+ADR;HOME:;;Broadway;New York City;NY;12345;United States of America
+LABEL;HOME;ENCODING=QUOTED-PRINTABLE:Broadway=0D=0ANew York City, NY 12345=0D=0AUnited States of America
+EMAIL;PREF;INTERNET:john.smith@company.com
+REV:2008042T195243Z
+END:VCARD
+
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-92D6E2DB-8BAF-4710-AB23-C16F7DE917CA.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-92D6E2DB-8BAF-4710-AB23-C16F7DE917CA.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,14 @@ + + +Network information services

Network information services

+

Network information properties:

+ +

For more information on network connection related aspects that you should take into account in your widget, see Dealing with network issues.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-9405C97E-4784-4043-BA75-77518EF0A38F.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-9405C97E-4784-4043-BA75-77518EF0A38F.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,56 @@ + + +STEW: indicating progress

STEW: indicating progress

Retrieving data from the Internet might take some time. Provide users with visual feedback on how the operation is progressing. STEW displays a progress indicator during data retrieval from Twitter.

+

The progress indicator is implemented in the main.html file.

+
<!-- LOADER -->
+<div id="loader_popup" class="popup hidden">
+	<table class="popup_window">
+		<tr><td> </td></tr>
+		<tr class="background">
+			<td class="loader">
+				<div class="title">LOADING</div>
+				<img src="images/loader.gif" alt="Loader">
+				<div class="subtitle">Please wait while we process data...</div>
+		    	</td>
+		</tr>                
+		<tr><td> </td></tr>
+	</table>
+</div>
+

The layout of the loader pop up screen is defined in the CSS files.

+

Figure: STEW progress indicator

+

To display the screen when a request is made to the Twitter service and to hide it when a response is received, add the following function to TwitterService.js:

+
TwitterService.prototype.showProgress = function( show ) {
+	if (this.progressId) {
+		if (show == null) 
+			show = true;
+	
+		Helper.show( this.progressId, show );			
+		if (!show) {
+			// If we hide the progress bar, set to null here so we
+			// don't do that twice and overwrite some other manager's
+			// progress bar.
+			this.progressId = null;
+		}
+	}
+}
+
+

Update the functions that get triggered when a request is issued and when a response has been processed, as listed in the code snippet below:

+
TwitterService.prototype._doRequest = function( url, type ) {
+	this.showProgress();
+	...
+}
+
+TwitterService.prototype.handleSuccessResponse = function( arg ) {
+	this.showProgress( false );
+	...
+}
+
+TwitterService.prototype.handleErrorResponse = function( status ) {
+	this.showProgress( false );
+	...
+}
+
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-94946735-D23B-49C6-BB65-8BE31737AE42.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-94946735-D23B-49C6-BB65-8BE31737AE42.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,61 @@ + + +Using softkeys

Using softkeys

Mobile devices provide limited input facilities for the user and controlling the mouse pointer may be difficult to some people. Therefore, it is recommended that you gather user input in your widget using the mobile device softkeys and an options menu instead of buttons and other such UI components on the screen.

+

Note: Consider localizing the softkey labels and menu items of your widget to support multiple languages.

+

Naming softkeys

To make use of a softkey, you need to map it with a function and label it accordingly. The left softkey is automatically mapped to an options menu. Thus, you can only change the label of the right softkey. By default, the right softkey is mapped to the Exit function that exits the widget. In some views, you can map the right softkey to a Cancel or Back option to return to the previous view.

Figure: Using softkeys in a widget

+

To show softkeys

The control pane that shows the softkey labels is hidden by default in widgets. To manipulate the visibility of the labels:

    +
  • Use the showSoftkeys() method of the JavaScript menu object to show softkey labels.

  • +
  • Use the hideSoftkeys() method to hide softkey labels.

  • +

If you rotate the widget screen, the location of the softkey labels changes relative to the other widget UI components. For more information on screen rotation, see Designing for dynamic screen orientation.

+

To set a function for the right softkey

    +
  1. Use the setRightSoftkeyLabel() method of the JavaScript menu object to set a label and function for the softkey.

  2. +
  3. Implement the function in your code.

  4. +
  5. Give the name of the function as a parameter to the setRightSoftkeyLabel() method.

  6. +
+

Creating an options menu

The options menu allows users to control the widget functionality. For example, users can specify settings or move between views in a widget. Examples of options include: Open, Save and Settings. A menu item in the options menu can also open a submenu.

All widgets have an options menu with the option Exit that you cannot remove. Add more options by constructing menu items and appending them to the menu. The label above the left softkey, which can be used to open the options menu and to select an option, is hidden by default. Use the showSoftkeys() method of the JavaScript menu object to make the softkey labels visible in your widget.

Figure: Creating an options menu for a widget

For an example of creating a dynamic options menu that changes depending on the view, see the AccuWidget Example on Forum Nokia.

+

To create an options menu

    +
  1. Create a menu item using the MenuItem object constructor .

  2. +
  3. Add the menu item to the options menu using the append() method of the JavaScript menu object.

  4. +
  5. Repeat this process for each menu item that you want to add.

    The menu items appear in the options menu in the order in which you add them, the first item at the top.

  6. +
  7. Assign functions to the menu items using the onSelect property of the MenuItem object.

    For example, you can create dynamic menu options that change depending on the current selection:

    // Creates the main menu
    +function createMenu() {
    +    // Create the menu items
    +    cursorModeMenuItem = new MenuItem("Cursor mode", CMD_CURSOR_MODE);
    +    tabModeMenuItem = new MenuItem("Tab mode", CMD_TAB_MODE);
    +
    +    // Assign callback functions to menu items
    +    cursorModeMenuItem.onSelect = onMenuItemSelected;
    +    tabModeMenuItem.onSelect = onMenuItemSelected;
    +
    +    // Tab mode is the default so let's add cursor mode item to the main menu
    +    window.menu.append(cursorModeMenuItem);
    +}
    +
    +// Gets called when a menu item is selected
    +function onMenuItemSelected(menuId) {
    +    switch (menuId) {
    +        case CMD_CURSOR_MODE:
    +            // Enable cursor mode navigation
    +            widget.setNavigationEnabled(true);
    +            window.menu.append(tabModeMenuItem);
    +            window.menu.remove(cursorModeMenuItem);
    +            break;
    +        case CMD_TAB_MODE:
    +            // Enable tab mode navigation
    +            widget.setNavigationEnabled(false);
    +            window.menu.append(cursorModeMenuItem);
    +            window.menu.remove(tabModeMenuItem);
    +            break;
    +    }
    +}

    Figure: Dynamic menu items

  8. +
+

To add a submenu to a menu item

    +
  1. Create a submenu item using the MenuItem object constructor.

  2. +
  3. Add the submenu item to the top-level menu item using the append() method of the MenuItem object.

  4. +
  5. Repeat this process for each submenu item that you want to add.

  6. +
  7. Assign functions to the submenu items using the onSelect property of the MenuItem object.

  8. +

Figure: Creating a submenu for a menu item

For example code, see the example of creating a menu in the Web Runtime API reference.
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-94FAF08A-F3E3-4686-A35B-E98EEBF18824.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-94FAF08A-F3E3-4686-A35B-E98EEBF18824.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,212 @@ + + +Criteria for +adding and editing contact information

Criteria for +adding and editing contact information

+

The criteria object specifies what contact +information to add or edit and for which database. The information can be +either a contact or a contact group. For a contact, the actual contact details +are contained in one or more keys, +with each key representing a specific piece of information. If no database +is specified, the information is added to the default database. If the default +database does not exist, it is created.

+

Use the Add method +as follows:

+
    +
  • To add a new contact or contact group, do not set its id property.

    +
  • +
  • To edit an existing contact or contact group, retrieve it +using GetList, +edit the information, and then send it to Add with the id property +unchanged. This overwrites the old entry.

  • +
+

The criteria object has two main properties: Type and Data. +These are described in the following table. Properties enclosed in brackets +are optional.

+

Note: All string values in the object are Unicode.

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Criteria object properties
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

criteria.Type

+
+

Specifies the type of contact information to add or edit.

+
+

string

+
+

Possible values:

+
    +
  • "Contact"

  • +
  • "Group"

  • +
+
+

criteria.Data

+
+

Specifies the contact information to add or edit.

+

If Type is "Contact", this +property takes one or more <key> properties. The number +of keys depends on how much information is added about the contact.

+
+

object

+
+

Object with the properties specified below

+
+

[criteria.Data.DBUri]

+
+

Specifies the contacts database where the information is added or edited.

+

If this property is not specified, the default database is used.

+
+

string

+
 
+

[criteria.Data.id]

+
+

Specifies the unique identifier of the contact or contact group to add +or edit.

+

Note:

    +
  • If you want to add a new entry to the database, do not specify +this property.

  • +
  • If you want to edit (replace) an existing entry in the database, +specify the ID of that entry.

  • +
+
+
+

string

+
 
+

criteria.Data.<key>

+
+

Each key represents one piece of information about the contact, such +as first name, last name, home phone number, or email address. At least one +key must be specified for the contact.

+

For example:

+
    +
  • Data.FirstName

  • +
  • Data.LastName

  • +
  • Data.LandPhoneHome

  • +
  • Data.EmailHome

  • +
+

For a list of supported keys, see section Supported contact keys.

+

Note: This property is valid only if Type is "Contact".

+
+
+

object

+
+

Object with the properties specified below

+
+

criteria.Data.<key>.Label

+
+

Specifies a label that describes the key value.

+
+

string

+
 
+

criteria.Data.<key>.Value

+
+

Specifies the value for the key.

+

If this is an empty string, the property is not included.

+
+

string

+
 
+

[criteria.Data.<key>.Next]

+
+

This is an object that specifies an additional value for the key. This +object contains the same properties as a key: Label, Value, +and optionally Next, where Next is +an object identical to this one, specifying yet another value for the same +key.

+

There is no limit to how many nested values a key can contain.

+

For example, an EmailHome key with two values (two +email addresses) has the following property structure:

+
    +
  • Data.EmailHome

  • +
  • Data.EmailHome.Label

  • +
  • Data.EmailHome.Value

  • +
  • Data.EmailHome.Next

  • +
  • Data.EmailHome.Next.Label

  • +
  • Data.EmailHome.Next.Value

  • +
+

The first email address is contained in Data.EmailHome.Value and +the second one in Data.EmailHome.Next.Value.

+
+

object

+
+

Object with the same properties as Data.<key>

+
+

criteria.Data.GroupLabel

+
+

Specifies the name of the contact group.

+

If the database does not support group labels, this property is ignored. +SIM databases, for example, do not support group labels.

+

Note: This property is valid only if Type is "Group".

+
+
+

string

+
 
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-95C2B298-903A-4B2E-8714-0D2DB91470AA-master.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-95C2B298-903A-4B2E-8714-0D2DB91470AA-master.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-95C2B298-903A-4B2E-8714-0D2DB91470AA_d0e2780_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-95C2B298-903A-4B2E-8714-0D2DB91470AA_d0e2780_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-960AD4A0-AE70-4608-99E7-B663FB99A68D.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-960AD4A0-AE70-4608-99E7-B663FB99A68D.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,36 @@ + + +Constructor

Constructor

+

Description:

+

The new operator creates and instantiates an instance +of the MenuItem object.

+

Syntax:

+
[MenuItem] new MenuItem(String label, Integer id)
+

Arguments:

+
    +
  • label:

    + +

    A text string that defines the label for the menu item.

    + +
  • +
  • id:

    + +

    A unique integer that identifies the menu item.

    + +
  • +
+

Return value:

+

An initialized instance of the MenuItem object.

+

Remarks:

+

If the arguments are not valid, a JavaScript exception indicating the +error type is thrown. A valid argument implies an integer type for id and +a string type for label. The string length for the label is truncated to 40 +characters if it exceeds that limit.

+

Menu items on the whole menu tree are unique and identified by their id.

+

For more general information on constructing an options menu, see Using softkeys.

+

Example code:

+

See the example code in the description of the MenuItem.onSelect property.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-9695EFDE-3134-4AA7-9422-613DEDEAE314.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-9695EFDE-3134-4AA7-9422-613DEDEAE314.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,11 @@ + + +lightmaxintensity

lightmaxintensity

+

Syntax:

+
[const int] sysinfo.lightmaxintensity
+

Description:

+

This is a read-only property that returns a constant value determining the maximum light intensity (highest brightness) supported by a device.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-98509DF5-5035-4E43-925C-50B96CE41F07-master.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-98509DF5-5035-4E43-925C-50B96CE41F07-master.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-98509DF5-5035-4E43-925C-50B96CE41F07_d0e12004_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-98509DF5-5035-4E43-925C-50B96CE41F07_d0e12004_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-98CA07C9-6AA6-44B7-8D0D-17C813277473.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-98CA07C9-6AA6-44B7-8D0D-17C813277473.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,18 @@ + + +Supported image formats

Supported image formats

+

You can insert images in the following formats:

+
    +
  • Portable Networking Graphics (PNG)—A bitmap image format that was designed for transferring images on the Internet. PNG supports palette-based, greyscale, or RPG images. It does not support other color spaces, such as CMYK.

  • +
  • JPEG—A method for compressing photographic images. JPEG is appropriate for continuous-tone still images that contain several shades of different colors.

  • +
  • Graphics Interchange Format (GIF)—A bitmap image format that provides good-quality color images that take up a small amount of space. GIF is appropriate for line drawings with crisp-edged and continuous tone color surfaces which do not contain different shades. When compressing data stored in a GIF file, some information is lost.

  • +
  • Windows bitmaps (BMP)—An image file format used to store digital images. You can add photographic images as bitmap files, even though they do not scale as well as vector graphics. You can use bitmaps as background images, for example.

  • +
  • Scalable Vector Graphics (SVG)—An XML specification and file format for describing two-dimensional vector images. Provides the best scalability, but is not suitable for photographic images. Ideal for icons and logos, for example.

  • +
  • Shockwave Flash (SWF)—A file format for publishing animated vector images, such as animations and applets, on the Internet. For an example, see How to package Flash content in a Widget on the Forum Nokia Wiki.

  • +
  • Tagged Image File Format (TIFF)—A file format for storing images, including photographs and line art.

  • +
  • Wireless Bitmap (WBMP)—A monochrome image file format that is optimized for mobile devices.

  • +
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-9A9AFCBE-29C3-4579-9C5D-3C41CD22C7FA.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-9A9AFCBE-29C3-4579-9C5D-3C41CD22C7FA.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,13 @@ + + +Discussion +about this resource

Discussion +about this resource

If you have any feedback, comments, problems or solutions related to +this resource, please use the link to Discussion +about: Web Developer's Library. Your comments will +be taken into account in development of resources. Also your peer developers +will benefit from the information shared, practical issues you have encountered, +and possible solutions that you've found.

\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-9B63C06E-3FCE-4201-B6C5-4F728894DA40.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-9B63C06E-3FCE-4201-B6C5-4F728894DA40.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,11 @@ + + +lightmaxduration

lightmaxduration

+

Syntax:

+
[int] sysinfo.lightmaxintensity 
+

Description:

+

This is a read-only property that returns an integer value determining the maximum allowed time duration that a device supports. The time duration unit is measured in milliseconds.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-9C85B403-6CFC-4E17-A2B2-AD1AD2F7794D.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-9C85B403-6CFC-4E17-A2B2-AD1AD2F7794D.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,604 @@ + + +Logging Service API example

Logging Service API example

+

+

This section presents the full source code of a working sample widget +for the Logging service. +You can download the wgz package for this widget from +section Example widgets.

+

For general information about creating widgets, see section Widget component files.

+

For widget development and debugging purposes, this example writes its +output to c:\data\jslog_widget.log using console.info. +For instructions on how to enable logging in the Web browser for S60, see +section JavaScript console.

+

Info.plist

+
<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Nokia//DTD PLIST 1.0//EN" "http://www.nokia.com/NOKIA_COM_1/DTDs/plist-1.0.dtd">
+<plist version="1.0">
+<dict>
+  <key>DisplayName</key>
+	 <string>LoggingSample</string>
+	 <key>Identifier</key>
+  <string>com.nokia.widget.sapi.logging.sample</string>
+  <key>Version</key>
+  <string>1.0</string>
+  <key>MainHTML</key>
+  <string>logging-sample.html</string>
+  <key>AllowNetworkAccess</key>
+  <true/>
+</dict>
+</plist>
+
+
+

Logging-sample.html

+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+  <head>
+    <script type="text/javascript" src="js/common.js"></script>
+    <script type="text/javascript" src="js/logging-sample.js"></script>
+  </head>
+  <body id='docBody' bgcolor="#ddeeff" onload="setup()" style=width:100%;height:100%;>
+
+    <form name="frm">
+    	<h3>Logging API Sample Widget</h3>
+     	
+      <input type="button" onclick="addLog('img1')" value="AddLog"><img id="img1" src="pic/blank.png" width="25" height="25" align="center"><br>
+      <input type="button" onclick="delLog('img2')" value="DeleteLog"><img id="img2" src="pic/blank.png" width="25" height="25" align="center"><br>
+      <input type="button" onclick="getLogList('img3')" value="GetLogList"><img id="img3" src="pic/blank.png" width="25" height="25" align="center"><br>
+      <input type="button" onclick="addLogAsync('img4')" value="AddLogAsync"><img id="img4" src="pic/blank.png" width="25" height="25" align="center"><br>
+      <input type="button" onclick="delLogAsync('img5')" value="DeleteLogAsync"><img id="img5" src="pic/blank.png" width="25" height="25" align="center"><br>
+      <input type="button" onclick="getLogListAsync('img6')" value="GetLogListAsync"><img id="img6" src="pic/blank.png" width="25" height="25" align="center"><br>
+      <input type="button" onclick="requestNotification('img7')" value="RequestNotification"><img id="img7" src="pic/blank.png" width="25" height="25" align="center"><br>
+      <input type="button" onclick="cancelAddLogAsync('img8')" value="CancelAddLogAsync"><img id="img8" src="pic/blank.png" width="25" height="25" align="center"><br>
+      <input type="button" onclick="cancelDelLogAsync('img9')" value="CancelDeleteLogAsync"><img id="img9" src="pic/blank.png" width="25" height="25" align="center"><br>
+      <input type="button" onclick="cancelGetLogListAsync('img10')" value="CancelGetLogListAsync"><img id="img10" src="pic/blank.png" width="25" height="25" align="center"><br>
+      <input type="button" onclick="cancelRequestNotification('img11')" value="CancelRequestNotification"><img id="img11" src="pic/blank.png" width="25" height="25" align="center"><br>
+
+			<hr>
+      <div class='loggingsample' id='loggingsample' bgcolor="#ddeeff" style=width:100%;height:100%;overflow:auto>
+      </div>
+    </form>
+  </body>
+</html>
+
+
+

common.js

+
errCode = resultList.ErrorCode;
+  var msg = "";
+  
+  if (errCode) {
+    msg = message + "<BR>" + "Failed Error: " + errCode + "<BR>";
+    if(resultList.ErrorMessage != undefined)
+      msg += "Error Message: " + resultList.ErrorMessage;
+    showIMG(imgId,"no"); 
+  } else {
+    showIMG(imgId,"yes"); 
+  }
+
+  //print error message
+  if(divId != null && divId != undefined)
+    document.getElementById(divId).innerHTML = msg;
+  console.info(msg);
+  
+  return errCode;
+}
+
+// Build the message by reading an iterable list in a recursive manner
+function showIterableList(iterator)
+{
+  var msg = "";
+  try
+  {
+    iterator.reset();
+    var item;
+    while (( item = iterator.getNext()) != undefined ){
+       msg += showObject( item );
+    }
+  }
+  catch(e)
+  {
+    alert('<showIterableList> ' + e);
+  }
+  return msg;
+}
+
+// Build the message by reading a JS object in a recursive manner
+function showObject( obj )
+{
+  var txt = "";
+  try { 
+    if ( typeof obj != 'object' )
+      return "" + obj + '<BR/>';
+    else {
+      for(var key in obj) {
+        txt +=  key + ":";
+        txt += showObject( obj[key] );
+        txt += '<BR/>';
+      }
+      txt += '<BR/>';
+    }
+  } 
+  catch (e) 
+  {
+    alert("showObject: " + e);
+  }
+  return txt;
+}
+
+// Show the image to indicate the test result
+function showIMG(imgId, isOK) 
+{
+  if(imgId == null || imgId == undefined)
+    return;
+  
+  if(isOK == "yes")
+    document.getElementById(imgId).src = "pic/yes.png";
+  else if(isOK == "no")
+    document.getElementById(imgId).src = "pic/no.png";
+  else
+    document.getElementById(imgId).src = "pic/blank.png";
+}
+
+// Show elements in object by using 'alert'
+function testObject(obj)
+{
+  var msg = "";
+  for(var key in obj) {
+    msg = msg + ":" + key + "=" + obj[key];
+  }
+  alert(msg);
+}
+
+// Test whether the input is numeric
+function IsNumeric(sText)
+{
+  var ValidChars = "0123456789.";
+  var IsNumber=true;
+  var Char;
+  
+  for (i = 0; i < sText.length && IsNumber == true; i++) 
+  { 
+    Char = sText.charAt(i); 
+    if (ValidChars.indexOf(Char) == -1) 
+    {
+       IsNumber = false;
+    }
+  }
+  return IsNumber; 
+}
+
+
+

Logging-sample.js

+
// logging-sample.js
+// 
+// In this sample a log event will be added, deleted, and listed. The notification will
+// be sent when the log changes.  Also, an async operation will be cancelled.
+//
+
+//SAPI Error Codes
+// 0  - Success
+// 1000 - InvalidServiceArgument
+// 1001 - UnknownArgumentName
+// 1002 - BadArgumentType
+// 1003 - MissingArgument
+// 1004 - ServiceNotSupported
+// 1005 - ServiceInUse
+// 1006 - ServiceNotReady
+// 1007 - NoMemory
+// 1008 - HardwareNotAvailable
+// 1009 - ServerBusy
+// 1010 - EntryExists
+// 1011 - AccessDenied
+// 1012 - NotFound
+// 1013 - UnknownFormat
+// 1014 - GeneralError
+// 1015 - CancelSuccess
+// 1016 - ServiceTimedOut
+// 1017 - PathNotFound
+
+// Declare the service object 
+var so;
+
+// imgid for callback1 function
+var imgid_callback1;
+
+// imgid for callback2 function
+var imgid_callback2;
+
+// imgid for callback3 function
+var imgid_callback3;
+
+// imgid for callback4 function
+var imgid_callback4;
+
+// id of the div used to display information
+const DIV_ID = 'loggingsample';
+
+// Called from onload()        
+function setup()
+{
+  try {
+    so = device.getServiceObject('Service.Logging', 'IDataSource');
+    console.info("setup: so: %s", so);
+  }
+  catch (e) {
+      alert('<setup> ' +e);
+  }
+}
+
+// Add Log
+function addLog(imgId) {
+  
+  var itemMap = new Object();
+  itemMap.EventType = 3; // ShortMessage event
+  itemMap.RemoteParty = '16172333568';
+  itemMap.PhoneNumber = '17819933882';
+  itemMap.Direction = 1; // outgoing
+  itemMap.Subject = 'Test txt msg';
+  itemMap.Description = 'Hi, this is a text message to you';
+  itemMap.DeliveryStatus = 1;  // Sent 
+
+  var criteria = new Object();
+  criteria.Type = 'Log';
+  criteria.Item = itemMap;
+  
+  try {
+    var result = so.IDataSource.Add(criteria);
+    checkError("IDataSource::Add",result,DIV_ID,imgId);
+  }
+  catch (e) {
+    showIMG(imgId,"no");
+    alert("addLog: " + e);
+  }
+}
+
+// Delete Log
+function delLog(imgId) {
+  
+  // get "id" by using RequestNotification()
+  var logId = prompt("Please enter the target log id", "");
+  if (logId == "" || logId == null)
+    return;
+    
+  var itemData = new Object();
+  itemData.id = logId;
+  
+  var criteria = new Object();
+  criteria.Type = 'Log';
+  criteria.Data = itemData;
+  
+  try {
+    var result = so.IDataSource.Delete(criteria);
+    checkError("IDataSource::Delete",result,DIV_ID,imgId);
+  }
+  catch (e) {
+    showIMG(imgId,"no");
+    alert ("delLog: " + e);
+  }
+}
+
+// Get the List of Log
+function getLogList(imgId) {
+
+  var filterMap = new Object();
+  filterMap.EventType = 3;// shortMessage event
+
+  var criteria = new Object();
+  criteria.Type = 'Log';
+  criteria.Filter = filterMap;  
+  
+  try {
+    var result = so.IDataSource.GetList(criteria);
+    if(!checkError("IDataSource::getLogList",result,DIV_ID,imgId)) {
+      var msg = "";
+      var obj;
+      var it = result.ReturnValue;   
+      while ((obj = it.getNext()) != undefined) {
+        msg = msg + "id: " + obj['id']+ "<br>";
+        msg = msg + "EventType: " + obj['EventType'] + "<br>";
+        msg = msg + "RemoteParty: " + obj['RemoteParty'] + "<br>";
+        msg = msg + "PhoneNumber: " + obj['PhoneNumber'] + "<br>";
+        msg = msg + "Subject: " + obj['Subject'] + "<br>";
+        msg = msg + "Description: " + obj['Description'] + "<br>";
+        msg = msg + "DeliveryStatus: " + obj['DeliveryStatus'] + "<br><br>";
+      }      
+      it.reset();
+      document.getElementById(DIV_ID).innerHTML = msg;
+    }
+  }
+  catch (e) {
+    showIMG(imgId,"no");
+    alert ("getLogList: " + e);
+  }
+}
+
+// Add Log Async
+function addLogAsync(imgId) {
+  
+  var itemMap = new Object();
+  itemMap.EventType = 3; // ShortMessage event
+  itemMap.RemoteParty = '16172333568';
+  itemMap.PhoneNumber = '17819933882';
+  itemMap.Direction = 1; // outgoing
+  itemMap.Subject = 'Test txt msg';
+  itemMap.Description = 'Hi, this is a text message to you';
+  itemMap.DeliveryStatus = 1;  // Sent 
+
+  var criteria = new Object();
+  criteria.Type = 'Log';
+  criteria.Item = itemMap;
+  
+  // Set image id for callback1 function
+  imgid_callback1 = imgId;
+  
+  try {
+    var result = so.IDataSource.Add(criteria, callback1);
+    if(!checkError("IDataSource::addLogAsync",result,DIV_ID,imgId)) {
+      showIMG(imgId,"");
+    }
+  }
+  catch (e) {
+    showIMG(imgId,"no");
+    alert ("addLogAsync: " + e);
+  }
+}
+
+// Delete Log Async
+function delLogAsync(imgId) {
+  
+  // get "id" by using RequestNotification()
+  var logId = prompt("Please enter the target log id", "");
+  if (logId == "" || logId == null)
+    return;
+    
+  var itemData = new Object();
+  itemData.id = logId;
+  
+  var criteria = new Object();
+  criteria.Type = 'Log';
+  criteria.Data = itemData;
+  
+  // Set image id for callback2 function
+  imgid_callback2 = imgId;
+  
+  try {
+    var result = so.IDataSource.Delete(criteria, callback2);
+    if(!checkError("IDataSource::delLogAsync",result,DIV_ID,imgId)) {
+      showIMG(imgId,"");
+    }
+  }
+  catch (e) {
+    showIMG(imgId,"no");
+    alert ("delLogAsync: " + e);
+  }
+}
+
+// Get Log List Async
+function getLogListAsync(imgId) {
+  
+  var filterMap = new Object();
+  filterMap.EventType = 3;
+
+  var criteria = new Object();
+  criteria.Type = 'Log';
+  criteria.Filter = filterMap;  
+  
+  // Set image id for callback3 function
+  imgid_callback3 = imgId;
+  
+  try {
+    var result = so.IDataSource.GetList(criteria, callback3);
+    if(!checkError("IDataSource::getLogListAsync",result,DIV_ID,imgId)) {
+      showIMG(imgId,"");
+    }
+  }
+  catch (e) {
+    showIMG(imgId,"no");
+    alert ("getLogListAsync: " + e);
+  }
+}
+
+// Cancel Add Log Async
+function cancelAddLogAsync(imgId) {
+  
+  var itemMap = new Object();
+  itemMap.EventType = 3; // ShortMessage event
+  itemMap.RemoteParty = '16172333568';
+  itemMap.PhoneNumber = '17819933882';
+  itemMap.Direction = 1; // outgoing
+  itemMap.Subject = 'Test txt msg';
+  itemMap.Description = 'Hi, this is a text message to you';
+  itemMap.DeliveryStatus = 1;  // Sent 
+
+  var criteria = new Object();
+  criteria.Type = 'Log';
+  criteria.Item = itemMap;
+  
+  // Set image id for callback1 function
+  imgid_callback1 = imgId;
+  
+  try {
+    var result = so.IDataSource.Add(criteria, callback1);     
+    if(!checkError("IDataSource::cancelAddLogAsync",result,DIV_ID,imgId)) {
+      showIMG(imgId,"");
+      var criteria2 = new Object();
+      criteria2.TransactionID = result.TransactionID;
+      var result2 = so.IDataSource.Cancel(criteria2);
+      checkError("IDataSource::cancelAddLogAsync",result2,DIV_ID,imgId);      
+    }
+  }
+  catch (e) {
+    showIMG(imgId,"no");
+    alert ("cancelAddLogAsync: " + e);
+  }
+}
+
+// Cancel Delete Log Async
+function cancelDelLogAsync(imgId) {
+  
+  // get "id" by using RequestNotification()
+  var logId = prompt("Please enter the target log id", "");
+  if (logId == "" || logId == null)
+    return;
+    
+  var itemData = new Object();
+  itemData.id = logId;
+  
+  var criteria = new Object();
+  criteria.Type = 'Log';
+  criteria.Data = itemData;
+  
+  // Set image id for callback2 function
+  imgid_callback2 = imgId;
+  
+  try {
+    var result = so.IDataSource.Delete(criteria, callback2);
+    if(!checkError("IDataSource::cancelDelLogAsync",result,DIV_ID,imgId)) {
+      showIMG(imgId,"");
+      var criteria2 = new Object();
+      criteria2.TransactionID = result.TransactionID;
+      var result2 = so.IDataSource.Cancel(criteria2);
+      checkError("IDataSource::cancelDelLogAsync",result2,DIV_ID,imgId);      
+    }
+  }
+  catch (e) {
+    showIMG(imgId,"no");
+    alert ("cancelDelLogAsync: " + e);
+  }
+}
+
+// Cancel Get Log List Async
+function cancelGetLogListAsync(imgId) {
+  
+  var filterMap = new Object();
+  filterMap.EventType = 3;// shortMessage event
+
+  var criteria = new Object();
+  criteria.Type = 'Log';
+  criteria.Filter = filterMap;  
+  
+  // Set image id for callback3 function
+  imgid_callback3 = imgId;
+  
+  try {
+    var result = so.IDataSource.GetList(criteria, callback3);
+    if(!checkError("IDataSource::cancelGetLogListAsync",result,DIV_ID,imgId)) {
+      showIMG(imgId,"");
+      var criteria2 = new Object();
+      criteria2.TransactionID = result.TransactionID;
+      var result2 = so.IDataSource.Cancel(criteria2);
+      checkError("IDataSource::cancelGetLogListAsync",result2,DIV_ID,imgId);
+    }
+  }
+  catch (e) {
+    showIMG(imgId,"no");
+    alert ("cancelGetLogListAsync: " + e);
+  }
+}
+
+// Request Notification
+function requestNotification(imgId) {
+  
+  var filter = new Object();
+  // The Minimum time, in Microseconds,
+  // that elapses before the notification request can complete.
+  filter.DelayTime = 2000000;
+  
+  var criteria = new Object();
+  criteria.Type = 'Log';
+  criteria.Filter = filter;
+
+  // Set image id for callback4 function
+  imgid_callback4 = imgId;
+  
+  try {
+    var result = so.IDataSource.RequestNotification(criteria,callback4);
+    checkError("IDataSource::requestNotification",result,DIV_ID,imgId);
+  }
+  catch (e) {
+    showIMG(imgId,"no");
+    alert ("requestNotification: " + e);
+  }
+}
+
+// Cancel Request Notification
+function cancelRequestNotification(imgId) {
+  
+  var filter = new Object();
+  // The Minimum time, in Microseconds,
+  // that elapses before the notification request can complete.
+  filter.DelayTime = 2000000;
+  
+  var criteria = new Object();
+  criteria.Type = 'Log';
+  criteria.Filter = filter;
+
+  // Set image id for callback4 function
+  imgid_callback4 = imgId;
+  
+  try {
+    var result = so.IDataSource.RequestNotification(criteria,callback4);
+    if(!checkError("IDataSource::cancelRequestNotification",result,DIV_ID,imgId)) {
+      showIMG(imgId,"");
+      var criteria2 = new Object();
+      criteria2.TransactionID = result.TransactionID;
+      var result2 = so.IDataSource.Cancel(criteria2);
+      checkError("IDataSource::cancelRequestNotification",result2,DIV_ID,imgId);
+    }
+  }
+  catch (e) {
+    showIMG(imgId,"no");
+    alert ("cancelRequestNotification: " + e);
+  }
+}
+
+// This is the asynchronous callback handler 
+function callback1(transId, eventCode, result)
+{
+  console.info("addLogAsync: transId: %d  eventCode: %d result.ErrorCode: %d", transId, eventCode, result.ErrorCode);
+  checkError("IDataSource::addLogAsync",result,DIV_ID,imgid_callback1);
+}
+
+// This is the asynchronous callback handler 
+function callback2(transId, eventCode, result)
+{
+  console.info("delLogAsync: transId: %d  eventCode: %d result.ErrorCode: %d", transId, eventCode, result.ErrorCode);
+  checkError("IDataSource::delLogAsync",result,DIV_ID,imgid_callback2);
+}
+
+// This is the asynchronous callback handler
+function callback3(transId, eventCode, result)
+{
+  console.info("getLogListAsync: transId: %d  eventCode: %d result.ErrorCode: %d", transId, eventCode, result.ErrorCode);
+  if(!checkError("IDataSource::getLogListAsync",result,DIV_ID,imgid_callback3)) {
+    var msg = "";
+    var obj;
+    var meetingIt = result.ReturnValue;
+    while ((obj = meetingIt.getNext()) != undefined) {
+      msg = msg + "id: " + obj['id']+ "<br>";
+      msg = msg + "EventType: " + obj['EventType'] + "<br>";
+      msg = msg + "RemoteParty: " + obj['RemoteParty'] + "<br>";
+      msg = msg + "PhoneNumber: " + obj['PhoneNumber'] + "<br>";
+      msg = msg + "Subject: " + obj['Subject'] + "<br>";
+      msg = msg + "Description: " + obj['Description'] + "<br>";
+      msg = msg + "DeliveryStatus: " + obj['DeliveryStatus'] +"<br><br>";
+    }      
+    meetingIt.reset();
+    document.getElementById(DIV_ID).innerHTML = msg;
+  }
+}
+
+// This is the asynchronous callback handler 
+function callback4(transId, eventCode, result)
+{
+  console.info("getLogListAsync: transId: %d  eventCode: %d result.ErrorCode: %d", transId, eventCode, result.ErrorCode);
+  if(!checkError("IDataSource::RequestNotificationAsync",result,DIV_ID,imgid_callback4)) {
+    document.getElementById(DIV_ID).innerHTML = showObject("Event Log has been updated!");
+  }
+}
+
+
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-9E0EC12F-EF50-4831-B0F4-C588590871D8.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-9E0EC12F-EF50-4831-B0F4-C588590871D8.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,12 @@ + + +Designing for mobile devices

Designing for mobile devices

+

If you can create a Web page, you can create a widget. All standard Web technologies, such as XHTML, CSS, Ajax, and Flash, are supported. You can use your existing development tools and content. However, take the following issues and considerations into account when designing and developing widgets for different form factor S60 devices:

+ +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-9E8CBB8A-E918-4208-9F11-D2147A98EC4F.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-9E8CBB8A-E918-4208-9F11-D2147A98EC4F.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,15 @@ + + +networkname

networkname

+

Syntax:

+
[string] sysinfo.networkname;
+

Description:

+

This is a read-only property that returns a string containing the current registered mobile network name defined by the network provider.

+

This information is only available on GSM/WCDMA networks.

+

For more information on network connection related aspects that you should take into account in your widget, see Dealing with network issues.

+

Example code:

+

See the example code in networkregistrationstatus.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-9EA77434-CC44-429F-BDD3-3AF4357CCF69.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-9EA77434-CC44-429F-BDD3-3AF4357CCF69.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,43 @@ + + +Creating styles for dynamic content

Creating styles for dynamic content

You can either develop several versions of a widget or web page for use on different mobile devices or design a layout that can adapt to different screen sizes.

+

Relate the position and size of each screen control to the dimensions of the display. This enables the same set of information to be presented on the screen in all resolutions; higher resolution devices just display finer graphics. However, this layout method works only when the screen aspect ratio is always the same. It does not produce good results when the screen orientation changes. Therefore, scaling should also account for aspect ratio change.

+

Figure: A widget on 360 x 640 and 240 x 320 pixel screens

+

Use a cascading style sheet (CSS) to specify relative measurements for all characteristics, such as line height, margins, padding, of all screen elements. You can use the following relative units to specify the characteristics of screen elements:

+
    +
  • em—font size in relation to the parent element.

  • +
  • ex—font height in relation to the lowercase character x.

  • +
  • px—font size in relation to the resolution of the viewing device.

  • +
+

Mobile devices support a limited number of font sizes. Use relative font sizes instead of absolute font sizes.

+

For an example of how to use CSS to design widgets for multiple screen sizes, see the AccuWidget Example on Forum Nokia.

+

If you want more control on the screen layout for widgets, you can use separate CSS files that are selected for use according to the screen size. For an example, see STEW: supporting different screen sizes.

+

To base the layout on percentage

Use the em unit to specify the characteristics of elements in relation to their parent element. For example, the following example specifies that the font size of a first level heading is 100% greater than that of a second level heading, and that the font size of a second level heading is 50% greater than that of a third level heading:

h1 {
+    display: block;
+    font-size: 2em;
+    margin: .67__qem 0 .67em 0;
+    font-weight: bold;
+}
+
+h2 {
+    display: block;
+    font-size: 1.5em;
+    margin: .83__qem 0 .83em 0;
+    font-weight: bold;
+}

The following example specifies that images are scaled by using per cent and pixel measurements:

    #graphicalForecast img {
+        height: 35%;
+    }
+
+    #locationTable td {
+        width: 52px;
+        height: 52px;
+    }
+
+    #locationTable td img {
+        width: 100%;
+        height: 100%;
+    }
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-9F3218D9-2BEA-417C-8017-E05AC749BF84.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-9F3218D9-2BEA-417C-8017-E05AC749BF84.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,50 @@ + + +STEW: supporting different screen sizes

STEW: supporting different screen sizes

STEW is designed for the 240 x 320 (QVGA) and the 360 x 640 (nHD) screen size. Separate CSS files are used to specify the user interface on each screen size. The nHD devices support touch, and therefore all buttons, text boxes, and other screen controls must be bigger so that users can use fingers or a stylus to select them. On QVGA screens, screen controls can be smaller, because users use the five way navigation pad to move between them.

+

Specifying styles according to screen size

The STEW example uses a CSS file called style.css to render views on nHD screens.

.button {
+	width: 116px;
+	height: 37px;
+	background: url(images/button_bg.png) no-repeat;
+	color: #ffffff;
+	font-size: 20px;
+	font-weight: bold;
+	margin: 3px;
+	padding-top: 12px;
+	display: inline-block;
+	text-align: center;	
+}
+

Another CSS file, style_small.css, is used to render views on QVGA screens.

.button {
+	width: 80px;
+	height: 25px;
+	background: url(images/small_button_bg.png) no-repeat;
+	color: #ffffff;
+	font-size: 14px;
+	font-weight: bold;
+	margin: 2px;
+	padding-top: 9px;
+	display: inline-block;
+	text-align: center;	
+}
+

References to the style sheets are added to the main.html file:

<link href="style.css" rel="stylesheet" type="text/css">
+<link href="style_small.css" rel="stylesheet" type="text/css">
+
+

Selecting the CSS file to use

To avoid having to iterate through all DOM elements and change their style according to the screen size and having to maintain a table of all element IDs and different styles associated to each of them, STEW switches between the two CSS files according to the screen size. The CSS file is selected at application init by adding the applyCorrectStyles helper function to the init function in the main.js file, as follows:

// Set the correct stylesheet depending on whether we are running
+// on bigger or smaller screens.
+Helper.applyCorrectStyles();
+

The applyCorrectStyles function is defined in the Helper.js file:

applyCorrectStyles: function() {
+	var largeScreen = Helper.isLargeScreen();
+	
+	document.styleSheets[0].disabled = !largeScreen;
+	document.styleSheets[1].disabled = largeScreen;
+}
+

The style sheets are embedded as elements in the widget DOM document. The applyCorrectStyles function checks the screen size and disables all the CSS rules in the style sheet that is not used.

The screen resolution could be checked to determine the screen size. However, this example uses a more general solution, which sets a threshold that separates small and large screens.

isLargeScreen: function() {
+	var size = this.getScreenSize();
+	return ( size.height > Helper.SMALL_SCREEN_TRESHOLD );
+}
+
+Helper.SMALL_SCREEN_TRESHOLD = 320;
+

This solution cannot detect all screen sizes, such as 800 x 352 pixels landscape on the Nokia E90, but it is good enough for the target devices in this example.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-9FE7E588-7621-4067-9BEC-4F59855BB42F.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-9FE7E588-7621-4067-9BEC-4F59855BB42F.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,22 @@ + + +onShow

onShow

+

Description:

+

The onShow property of the menu object is an event +handler for the event of when the options menu is open. In other words, when +the end user presses the left softkey, the system will fire an event and a +widget can catch the event by providing a callback function.

+

For more general information on using an options menu in your widget, +see Using softkeys.

+

Syntax:

+
[void] window.menu.onShow = function() { }
+

or

+
[void] menu.onShow = menupaneShown;
+function menupaneShown()
+{
+  // ...
+}
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-9FF007CF-0CFF-4572-B399-B98C4F98C250.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-9FF007CF-0CFF-4572-B399-B98C4F98C250.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,91 @@ + + +Criteria for +deleting contact information

Criteria for +deleting contact information

+

The criteria object specifies which contacts +or contact groups to delete and from which database. If no database is specified, +the information is deleted from the default database.

+

The criteria object has two main properties: Type and Data. +These are described in the following table. Properties enclosed in brackets +are optional.

+

Note: All string values in the object are Unicode.

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Criteria object properties
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

criteria.Type

+
+

Specifies the type of contact information to delete.

+
+

string

+
+

Possible values:

+
    +
  • "Contact"

  • +
  • "Group"

  • +
+
+

criteria.Data

+
+

Specifies the contact information to delete.

+
+

object

+
+

Object with the properties specified below

+
+

[criteria.Data.DBUri]

+
+

Specifies the contacts database from which the information is deleted.

+

If this property is not specified, the default database is used.

+
+

string

+
 
+

criteria.Data.IdList

+
+

Specifies the unique identifiers of the contacts or contact groups to +delete.

+

Data.IdList[0] contains the ID of the first entry.

+
+

array of strings

+
 
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-A022ED1B-E618-4C44-A437-78393900599C.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-A022ED1B-E618-4C44-A437-78393900599C.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,84 @@ + + +onSelect

onSelect

+

Description:

+

The onSelect property of the MenuItem object is an event handler for the event of when the menu item is selected. +In other words, when the end user opens the options menu and selects a menu +item either from the top-level menu list or from a submenu list, the system +will fire an event and a widget can catch the event by providing a callback +function.

+

The callback function is passed with an argument, which is an integer +identifier identifying the menu item that was just selected.

+

It is possible to assign an individual callback function for each menu +item so that the id argument can be ignored.

+

Syntax:

+
MenuItem.onSelect = function(Integer id) { }
+

or

+
MenuItem.onSelect = onMenuItemSelected;
+
function onMenuItemSelected(id)
+{
+  // ...
+}
+

Remarks:

+

Submenu item's callback function must be assigned to the onSelect property +after the parent menu item is appended to the main menu pane.

+

For more general information on constructing an options menu, see Using softkeys.

+

Example code:

+

Creating a menu:

+
window.onload = createMenu();
+
// function to create a menu
+function createMenu()
+{
+  // Create a Menu Object
+  var optionsMenu = window.menu;
+
+  // Set a callback function for Menu
+  optionsMenu.onShow = function()
+  { 
+     alert('Event Trigger: optionsMenu.onShow');
+  }
+
+  // Create two Menu items
+  var m1 = new MenuItem('Beverages', 2001);
+  var m2 = new MenuItem('Snacks', 2002);
+
+  // Assign a callback function for the menu items
+  m1.onSelect = menuEventHandler;
+  m2.onSelect = menuEventHandler;
+
+  // Append two Menu items to Menu
+  optionsMenu.append(m1);
+  optionsMenu.append(m2);
+
+  // Create two more Menu items for Sub-Menu
+  var m11 = new MenuItem('Coca Cola', 3001);
+  var m12 = new MenuItem('Pepsi', 3002);
+
+  // Append two Sub Menu Items to Menu 'Beverages'
+  // get Menu Item reference by ID
+  optionsMenu.getMenuItemById(2001).append(m11);
+
+  // get Menu Item reference by Name
+  optionsMenu.getMenuItemByName('Beverages').append(m12);
+
+  // Assign a callback function for the submenu items
+  m11.onSelect = submenuEventHandler;
+  m12.onSelect = submenuEventHandler;
+}
+

Implement menu event handler:

+
function menuEventHandler(id)
+{
+  switch (id)
+  {
+case 2001:
+break;
+case 2002:
+// do something
+break;
+  }
+}
+
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-A063B243-A746-4E10-8787-A08CD8818118_d0e10708_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-A063B243-A746-4E10-8787-A08CD8818118_d0e10708_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-A33B7539-EE4A-4E0D-B72B-28565AEF369D.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-A33B7539-EE4A-4E0D-B72B-28565AEF369D.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,14 @@ + + +Using graphics and scripting effectively

Using graphics and scripting effectively

If an application uses a lot of resources, keep the graphics as light as possible and maintain a balance between good graphics and resource consumption. You can replace some graphical special effects with code to ensure better performance. For example, you can write code instead of inserting graphics or animation to create highlighted menu options or sparkling stars. You can use JavaScript optimization techniques that improve the user experience of Web applications on mobile devices. Generally, these are the same techniques that are used on desktop browsers.

+

Optimizing image size

Smaller images in terms of both pixel size and color depth conserve memory and load faster. A color depth of 16 bits is a good compromise between looks and size. The screen resolution defines the actual size of graphics on the display. For example, a graphic that looks very small on a large display may become too small on a device with the same number of pixels but a smaller display.

When possible, create images in the intended maximum size, because their quality degrades when you scale them up. Also, high-contrast edges in a image might result in poor quality when scaling down.

You can allow the Web Runtime (WRT) rendering engine to automatically scale images to fit different screen sizes, based on the HTLM IMG tag width and height parameters. However, this can result in poor image quality. For better quality, use a desktop imaging tool to scale images. First convert the image to 24-bit color mode, for example to PNG-24. The increased color depth allows a good scaling tool to add color gradations to perform anti-aliasing on the final image.

+

Optimizing JavaScript

You can optimize JavaScript in the following ways:

    +
  • Use external and not internal JavaScript.

    <script src="url_to_js" type="text/javascript"/>

    External JavaScript files can be cached independently of HTML files, which is good because JavaScript is usually more static than HTML. External JavaScript can be shared between pages. Remember to set the Expires header.

  • +
  • Minimize the size of the final output JavaScript code, for example with automation tools. Strip comments from your code. Strip excess white space. Minimize and pack the code, using GZIP compression. Remember to consider the good balance of the XHTML structure and unobtrusive JavaScript.

  • +
  • Do not run long-running JavaScript functions on page load. Web applications do not multi-task and the browser is thus blocked from the user input for the duration. If you have a long running script, try to speed it up, for example by profiling the functions and improving the XHTML structure.

  • +
  • Do not use JavaScript where CSS can be used instead. For example, implement menus and rollover images with CSS instead of JavaScript.

  • +
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-A3BCF709-0CE9-49DD-9BCD-FD9ADAC0C9D6-master.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-A3BCF709-0CE9-49DD-9BCD-FD9ADAC0C9D6-master.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-A3BCF709-0CE9-49DD-9BCD-FD9ADAC0C9D6_d0e2502_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-A3BCF709-0CE9-49DD-9BCD-FD9ADAC0C9D6_d0e2502_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-A3C4CDE4-4231-463D-B6A8-4969B91BDA0C.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-A3C4CDE4-4231-463D-B6A8-4969B91BDA0C.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,34 @@ + + +STEW: presenting content on screens

STEW: presenting content on screens

Implement functions to display the data that you retrieve from Twitter in the STEW views.

+

The UpdateScreen object in the UpdateScreen.js file sets the onSuccess and onError callback functions to be handled by the onTwitterUserResponse and onTwitterServiceError functions. These functions are triggered when the request is completed, either successfully or with an error. The last line of the following code makes the actual request to Twitter:

+
UpdateScreen.prototype.onActivated = function() {
+	// Add event listeners.
+	var self = this;
+	twitterService.onSuccess = function( response ) {
+self.onTwitterUserResponse( response )
+}
+	twitterService.onError = function( status ) {
+self.onTwitterServiceError( status )
+}
+
+	// Start the request.
+	twitterService.getTweetsForUser( null, 1 );
+}
+
+

The onTwitterUserResponse function illustrates how the response is handled as a JavaScript object:

+
UpdateScreen.prototype.onTwitterUserResponse = function( response ) {
+	// Set my latest status update.
+	var tweet = response[0];
+	this.setMyLatestStatus( tweet.text,
+new Date( tweet.created_at ).toLocaleString() );
+}
+UpdateScreen.prototype.onTwitterServiceError = function( status ) {
+	alert("Error: (" + status + ")" );
+}
+
+

The TwitterService performs the necessary conversions. For more information, see STEW: implementing a Twitter service. The data can be accessed by calling various properties on the object retrieved, such as .text or .created. For more information about the responses and requests that you can make, see the Twitter API documentation.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-A4538B4D-0D90-43F8-B1FA-72F616937760.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-A4538B4D-0D90-43F8-B1FA-72F616937760.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,55 @@ + + +Criteria for +searching sensor channels

Criteria for +searching sensor channels

+

+

The criteria object specifies the criterion +for searching sensor channels.

+

The criteria object has a single property: SearchCriterion. +This is described in the following table.

+
+ + + + + + + + + + + + +
Table: Criteria object properties
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

criteria.SearchCriterion

+
+

Specifies the criterion for searching sensor channels.

+

The possible values describe types of sensor data by which to search +for channels. For example, if this property is set to "Orientation", FindSensorChannel returns +all channels that provide orientation data, that is, data from an orientation +sensor.

+
+

string

+
+

Possible values:

+
    +
  • "All"

  • +
  • "AccelerometerAxis"

  • +
  • "AccelerometerDoubleTapping"

    +
  • +
  • "Orientation"

  • +
  • "Rotation"

  • +
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-A4CEF923-1DE8-46E0-8D42-79AA621A06A2.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-A4CEF923-1DE8-46E0-8D42-79AA621A06A2.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,11 @@ + + +lightinfiniteduration

lightinfiniteduration

+

Syntax:

+
[const int] sysinfo.lightinfiniteduration 
+

Description:

+

This is a read-only property that returns a constant value determining the infinite time duration.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-A509AD23-015E-44D9-97EB-895A75593C87.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-A509AD23-015E-44D9-97EB-895A75593C87.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,107 @@ + + +Criteria for +retrieving information about applications

Criteria for +retrieving information about applications

+

The criteria object specifies what information +is returned about applications on the mobile device.

+

The criteria object has two main properties: Type and Filter. +These are described in the following table. Properties enclosed in brackets +are optional.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Criteria object properties
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

criteria.Type

+
+

Specifies the type of application:

+
    +
  • "UserInstalledPackage" retrieves information +about user-installed applications only. User-installed applications include +either the application and the supporting DLL or the DLLs only.

  • +
  • "Application" retrieves information +about all applications on the mobile device, regardless of whether they were +preinstalled or installed by the user.

  • +
+
+

string

+
+

Possible values:

+
    +
  • "UserInstalledPackage"

  • +
  • "Application"

  • +
+
+

[criteria.Filter]

+
+

Specifies the criteria to use in determining which applications to retrieve +information about.

+

This property is valid only if criteria.Type has value "Application"; +it is ignored for "UserInstalledPackage".

+

If not specified for "Application", information +about all applications on the mobile device is retrieved.

+
+

object

+
+

Object with the properties specified below

+
+

[criteria.Filter.DocumentPath]

+
+

Specifies the full path and file of a document.

+

AppManager determines what applications to get information about from +the document name.

+

If both DocumentPath and MIMEType are +specified, DocumentPath takes precedence.

+
+

string

+
+

For example: "c:\\data\\abcd.txt"

+
+

[criteria.Filter.MIMEType]

+
+

Specifies a MIME type for the applications to get information about.

+

If both DocumentPath and MIMEType are +specified, DocumentPath takes precedence.

+
+

string

+
+

For example: "image/jpeg"

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-A566445D-26D1-460E-8B65-634245774B37_d0e3528_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-A566445D-26D1-460E-8B65-634245774B37_d0e3528_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-A5853293-7B83-4CCE-9C29-B2B8F0CD8A18.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-A5853293-7B83-4CCE-9C29-B2B8F0CD8A18.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,46 @@ + + +JavaScript Contacts +Service API

JavaScript Contacts +Service API

+

The Contacts +Service API is supported since WRT 1.1.

+

The Contacts Service API allows widgets to access and manage +information about contacts. This information can reside in one or more contacts +databases stored on a device or in the SIM card database. The API is integrated +into WRT through the device object.

+

For an overview of the service and the API, see section Accessing and managing information about contacts.

+

Using the Contacts Service API

+

To use the Contacts Service API, your widget must first create a service object for it +using the device.getServiceObject() method. +Use Service.Contact to identify the service provider +and IDataSource to identify the supported interface:

+
var so = device.getServiceObject("Service.Contact", "IDataSource");
+ +

This service object can then be used to access the services provided +by the API:

+ +
+

Emulator support

+

The S60 5th Edition SDK emulator provides full support for the Contacts +Service API. However, SIM-specific operations can only be run on a device.

+
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-A60E9080-A08C-4701-A45E-0D0BAE33C88F.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-A60E9080-A08C-4701-A45E-0D0BAE33C88F.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,13 @@ + + +Keeping response times short

Keeping response times short

In a mobile environment, the users' attention is easily diverted, and therefore users often do not tolerate long delays without any feedback. Mobile applications must respond to user actions faster than desktop computers. Provide users with immediate feedback, even though performing the actual operations may take a longer time.

+

Create a progress indicator to inform users that the application is loading data. For an example of how to create a progress indicator popup for a widget, see STEW: indicating progress.

+

Figure: Progress indicator

+

For general guidelines on acceptable response times on mobile devices, see Actions and feedback.

+

+

+

+

\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-A6C9AF19-6694-478B-A9FE-7898A2091C4B.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-A6C9AF19-6694-478B-A9FE-7898A2091C4B.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,262 @@ + + +Returned +location information

Returned +location information

+

+

The ReturnValue property returned by a synchronous GetLocation call +and by callback for +an asynchronous GetLocation or Trace call +is an object containing the requested device location information. Each property +in the object corresponds to one kind of location information.

+

The exact set of properties included in the ReturnValue object +depends on the criteria defined +for the GetLocation or Trace call +and on the capabilities of the positioning system that provides the location +information for the mobile device. If a particular piece of location information +cannot be retrieved by the positioning system, the property for that information +is not included in the ReturnValue object. For example, +if basic location information is requested, the ReturnValue object +only contains properties for longitude, latitude, and altitude; no other location +information is returned. Similarly, if the positioning system used by the +S60 device cannot provide satellite information, the SatelliteNumView and SatelliteNumViewUsed properties +are not included in ReturnValue.

+

The WGS +84 datum is used to reference coordinates. The representation is +in decimal degrees.

+

The following table describes the location information returned by a GetLocation or Trace call.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: ReturnValue properties +for location information
+

Property

+
+

Description

+
+

Value type

+
+

Location information type

+
+

Longitude

+
+

Longitude estimate in degrees. The value range is [+180, -180].

+
+

number

+
+

Basic or Generic

+
+

Latitude

+
+

Latitude estimate in degrees. The value range is [+90, -90].

+
+

number

+
+

Basic or Generic

+
+

Altitude

+
+

Elevation estimate in meters relative to the WGS 84 datum.

+
+

number

+
+

Basic or Generic

+
+

SatelliteNumView

+
+

Number of satellites currently in view.

+
+

number

+
+

Generic

+
+

SatelliteNumViewUsed

+
+

Number of satellites used to obtain the location fix.

+
+

number

+
+

Generic

+
+

HorizontalSpeed

+
+

Horizontal speed estimate in meters per second. This is the speed of +the device at the time the location fix was obtained.

+
+

number

+
+

Generic

+
+

HorizontalSpeedError

+
+

Horizontal speed error in meters per second.

+
+

number

+
+

Generic

+
+

TrueCourse

+
+

Current direction of movement in degrees in relation to true north.

+
+

number

+
+

Generic

+
+

TrueCourseError

+
+

TrueCourse error in degrees.

+
+

number

+
+

Generic

+
+

MagneticHeading

+
+

Current direction of movement in degrees in relation to magnetic north.

+
+

number

+
+

Generic

+
+

MagneticHeadingError

+
+

MagneticHeading error in degrees.

+
+

number

+
+

Generic

+
+

Heading

+
+

Current instantaneous direction of movement in degrees in relation to +true north.

+

+

+

number

+
+

Generic

+
+

HeadingError

+
+

Heading error in degrees.

+
+

number

+
+

Generic

+
+

MagneticCourse

+
+

Current instantaneous direction of movement in degrees in relation to +magnetic north.

+

+

+

number

+
+

Generic

+
+

MagneticCourseError

+
+

MagneticCourse error in degrees.

+
+

number

+
+

Generic

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-A8DAB890-1BB6-42C6-8448-05F38EAFE985.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-A8DAB890-1BB6-42C6-8448-05F38EAFE985.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,25 @@ + + +setDisplayLandscape()

setDisplayLandscape()

+

Description:

+

The setDisplayLandscape method changes the orientation of a widget's screen to the landscape mode.

+

Syntax:

+
[void] window.widget.setDisplayLandscape(void) 
+

or

+
[void] widget.setDisplayLandscape(void)
+

Arguments:

+

This method does not take any arguments.

+

Return value:

+

This method does not return a value.

+

Remarks:

+

setDisplayLandscape() should be used only if a device supports screen orientation changes. To check this, use the isrotationsupported property.

+

This method only changes the orientation of the screen. It does not change the behavior of other UI components of a device such as the softkeys and their associated keys.

+

For more information on handling screen orientation changes in a widget, see Designing for dynamic screen orientation.

+

Example code:

+
if (widget.isrotationsupported)
+   // change the screen orientation
+   widget.setDisplayLandscape();
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-A9024277-4FA2-429D-9C54-A155ED658B32.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-A9024277-4FA2-429D-9C54-A155ED658B32.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,80 @@ + + +IDataSource.Export()

IDataSource.Export()

+

Description:

+

The Export method exports a set of landmarks from +a landmark database.

+

This is a synchronous method.

+

Syntax:

+ +
result = so.IDataSource.Export(criteria);
+

Arguments:

+
    +
  • criteria:

    + +

    This is an object that specifies the set of landmarks to export and +optionally the source database. For more information about the object properties +and how to define them, see section Criteria for exporting landmarks.

    + +
  • +
+

Return value:

+

The Export method returns an object that contains +an error code and an error message.

+
+ + + + + + + + + + + + + + + +
Table: Return value +properties for Export
+

Property

+
+

Description

+
+

Value

+
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See Landmarks Service API error messages.

+
+

Remarks:

+
    +
  • If no landmark database is specified, Export is +performed on the default database. If the default database does not exist, +it is created and set active. The default database is file://c:eposlm.ldb.

    +
  • +
  • For more information about landmarks, landmark categories, +and landmark databases, see the Landmarks +Service overview page.

  • +
+

Example code:

+

+

For the complete source of a sample widget +that demonstrates how to use this Service API, see the +full example.

+ + +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-A942935B-ACF6-451C-8383-874BEEC52F1A.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-A942935B-ACF6-451C-8383-874BEEC52F1A.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,18 @@ + + +Creating +a JavaScript file

Creating +a JavaScript file

It is recommended that you create a separate JavaScript (js) +file for implementing the widget UI interaction and other operations. This +increases clarity of the code and enables reuse of the code in other widgets. +A widget can have as many JavaScript files as needed.

There are two ways to use an external JavaScript file through the widget's main +HTML file:

  • Specifying a JavaScript file that is included in the widget +package

    Use the <script> tag as follows:

    <script type='text/JavaScript' src='JavaScript.js'></script>
  • Specifying a JavaScript file that is stored in a remote location

    In this case, the JavaScript file is not included in the widget package. +Specify the full URL of the JavaScript source in the src attribute +of the script tag as follows:

    <script type='text/JavaScript' src='http://www.widget.server/JavaScript.js'></script>

Note: When linking to external JavaScript files in a remote location, specify +the AllowNetworkAccess key in the info.plist file as true to allow the widget to connect to the network.

For more information on JavaScript, see the Web +Runtime API reference and the JavaScript +Tutorial published by the World Wide Web Consortium (W3C).

\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-AB8ECBA0-FD4B-4A2F-8199-40C7F7CD51AB.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-AB8ECBA0-FD4B-4A2F-8199-40C7F7CD51AB.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,51 @@ + + +performTransition()

performTransition()

+

Description:

+

The performTransition method operates as a screen update command, which tells the widget UI framework to update the widget screen. It performs the animation while the widget's view is being changed. Currently, only fading animation mode is supported.

+

The performTransition method is to be called together with the prepareForTransition method.

+

Syntax:

+
[void] widget.performTransition(void) 
+

or

+
[void] window.widget.performTransition(void)
+

Arguments:

+

This method does not take any arguments.

+

Return value:

+

This method does not return a value.

+

Example code:

+

Example HTML code:

+
<!-- Main view -->
+<div id='main'>
+  Hello World!
+  <input type="button" value="Config" onclick="toMain(0);" />
+</div>
+<!-- Main view ends -->
+<!-- Config view -->
+<div id='config'>
+  Your world is my world!
+  <input type="button" value="Main" onclick="toMain(1);" />
+</div>
+<!-- Settings view ends -->
+

Example JavaScript code:

+
function toMain(main) {
+  // preparing for Transition
+  widget.prepareForTransition("fade");
+  if (main) { // switching from config view to the main view
+    // hide config view
+    document.getElementById("config").style.display = 'none';
+    // show main view
+    document.getElementById("main").style.display = 'block';
+    }
+  else {  // switching from main view to config view
+    // hide main view
+    document.getElementById("main").style.display = 'none';
+    // show config view
+    document.getElementById("config").style.display = 'block';
+    }
+  // do the Transition to make the fade effect
+  widget.performTransition();
+}
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-AB95A8E1-584D-4A58-9500-FD578F91B1BB_d0e1208_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-AB95A8E1-584D-4A58-9500-FD578F91B1BB_d0e1208_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-ABF4EC7E-557F-4C6D-8B2C-F734A0BBC082.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-ABF4EC7E-557F-4C6D-8B2C-F734A0BBC082.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,93 @@ + + +Criteria for +change notifications

Criteria for +change notifications

+

+

The criteria object specifies the system attribute to +monitor for changes.

+

The criteria object has a three properties: Entity, Key, +and SystemData. These are described in the following +table. Properties enclosed in brackets are optional.

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
Table: Criteria object properties
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

criteria.Entity

+
+

Specifies the entity of the system attribute.

+

Together with Key, this specifies the system attribute +to monitor.

+

For more information about entities, see section System attributes.

+
+

string

+
+

For a complete list of supported entities, see section Supported system attributes (entities and keys).

+

For example: "Battery"

+
+

criteria.Key

+
+

Specifies the key of the system attribute. The available keys depend +on the entity.

+

Together with Entity, this specifies the system +attribute to monitor.

+

For more information about keys, see section System attributes.

+
+

string

+
+

For a complete list of supported keys per entity, see the Key column +of the tables in section Supported system attributes (entities and keys).

+

For example: "BatteryStrength"

+
+

[criteria.SystemData]

+
+

Specifies the value of the system attribute.

+

Some system attributes require this property as input for GetNotification. To find out which attributes, see the Input column of the +tables in section Supported system attributes (entities and keys).

+

The SystemData object has one or more properties +that together represent the system attribute value. The exact set of properties +depends on the system attribute (specifically, on the system data type used +for input).

+

For more information about system attribute values, see sections Supported system attributes (entities and keys).

+
+

object

+
+

The object properties depend on the system attribute. See the Input column +cell for the appropriate system attribute in section Supported system attributes (entities and keys).

+

For example, the Battery - BatteryStrength system +attribute takes Status information as input for GetNotification:

+

SystemData.Status = 50

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-ACC73314-813D-46C7-9500-61A61BA910FA.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-ACC73314-813D-46C7-9500-61A61BA910FA.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,11 @@ + + +vibramaxintensity

vibramaxintensity

+

Syntax:

+
[int] sysinfo.vibramaxintensity
+

Description:

+

This is a read-only property that returns a constant value determining the maximum vibration intensity (highest vibration frequency).

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-AD589188-128C-4A48-B25C-BF0B4D9923C8.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-AD589188-128C-4A48-B25C-BF0B4D9923C8.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,21 @@ + + +clear()

clear()

+

Description:

+

Call the clear method to delete all the menu items +in the options menu pane. This operation will also clear all submenus if such +exist.

+

For more general information on using an options menu in your widget, +see Using softkeys.

+

Syntax:

+
[void] window.menu.clear(void) 
+

or

+
[void] menu.clear(void)
+

Arguments:

+

This method takes no arguments.

+

Return value:

+

This method does not return a value.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-ADE02C34-39FC-4E54-ABF6-536165352004.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-ADE02C34-39FC-4E54-ABF6-536165352004.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,81 @@ + + +Returned +channel property information

Returned +channel property information

+

The ReturnValue property returned by GetChannelProperty is an object containing the information for the +specified sensor channel property.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Object properties +for a sensor channel property
+

Property

+
+

Type

+
+

Value

+
+

PropertyId

+
+

string

+
 
+

PropertyDataType

+
+

number

+
+

Possible values:

+
    +
  • 0 - For number data type (integer)

    +
  • +
  • 1 - For number data type (double)

    +
  • +
  • 2 - For string data type

  • +
+
+

ItemIndex

+
+

number

+
 
+

ReadOnly

+
+

boolean

+
 
+

PropertyValue

+
+

number or string

+
+

The value type depends on the property.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-AE9A928B-F938-49B5-BC9E-72CB42046571.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-AE9A928B-F938-49B5-BC9E-72CB42046571.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,173 @@ + + +Accessing +and managing calendar information

Accessing +and managing calendar information

+

The Calendar +Service API allows widgets to access, create, and manage +calendars and calendar entries stored on a device. You can use the Calendar +Service to create widgets that:

+
    +
  • Retrieve information about calendars and calendar entries

    +
  • +
  • Create and delete calendars

  • +
  • Create, update, and delete entries for a given calendar

    +
  • +
  • Import and export calendar entries

  • +
  • Notify the user when calendar entries are created, updated, +or deleted

  • +
+

Calendar information involves the following concepts:

+
    +
  • Calendar stores calendar entries. There can be one +or more calendars on a device, and each calendar corresponds to a single file +in the device file system.

  • +
  • Calendar entries make up the main content of a calendar. +Each entry belongs to one of the following categories:

    + +
      +
    • Anniversary

    • +
    • Event

    • +
    • Meeting

    • +
    • Reminder

    • +
    • To-do item

    • +
    +

    For more information about calendar entries and what they contain, see +section Calendar entries.

    + +
  • +
  • Recurring entry is an entry that has more than one +occurrence. The rules of recurrence must be defined separately for each entry. +Only meetings can be recurring.

  • +
  • Instance is a specific occurrence of a recurring entry. +Instances are not stored separately (as a rule) but calculated dynamically +based on the entry data and rules of recurrence. Non-recurring entries have +only a single instance.

    + +

    For example, a weekly meeting that occurs once a week for eight weeks +has eight instances. The meeting entry itself is stored only once in the calendar +file, but a calendar application can show each meeting instance separately.

    + +
  • +
  • Parent entry is any original entry. When a new entry +is added to a calendar, the entry is stored as a parent entry. A recurring +parent entry can have one or more child entries.

  • +
  • Child entry is a modified instance of a recurring +parent entry. When an instance (occurrence) of a recurring entry is explicitly +modified, so that it differs in some way from the parent data, it is stored +as a child entry. A parent entry and its child entries share the same id, +but have unique LocalIds. A child entry always has a +single instance.

    + +

    For example, if one of the eight instances of the weekly meeting is +modified to occur at a different time of day than the rest, it is stored as +a child entry. Since it no longer fully conforms to the parent data and cannot +be derived from it, it must be stored as a separate entry.

    + +
  • +
  • Exception is an occurrence in the original schedule +that has been removed and may be replaced with a different occurrence.

    +
  • +
+

Accessing the API and supported methods

+

To create a service +object for the Calendar Service API, use Service.Calendar to +identify the service provider and IDataSource to identify +the supported interface:

+ +
var so = device.getServiceObject("Service.Calendar", "IDataSource");
+

The IDataSource interface provides the following +methods:

+
    +
  • GetList()

    + +

    Use the GetList() method to retrieve information +about calendars and calendar entries.

    + +
  • +
  • Add()

    + +

    Use the Add() method to create a new calendar or +calendar entry. You can also use this method to update an existing calendar +entry.

    + +
  • +
  • Delete()

    + +

    Use the Delete() method to delete a calendar or +one or more entries in a given calendar.

    + +
  • +
  • Import()

    + +

    Use the Import() method to import entries into +a calendar. The information must be imported from an iCal or vCal file (see +below).

    + +
  • +
  • Export()

    + +

    Use the Export() method to export entries from +a calendar. The information is exported to an iCal or vCal file (see below).

    + +
  • +
  • RequestNotification()

    + +

    Use the RequestNotification() method to receive +notifications when entries are created, updated, or deleted in a given calendar.

    + +
  • +
  • Cancel()

    + +

    Use the Cancel() method to cancel an ongoing asynchronous +call. This method is valid for any asynchronous call made through the Calendar +Service API.

    + +
  • +
+
+

iCal and vCal

+

+

iCalendar (iCal) is an RFC standard for calendar data exchange. It allows +for the capture and exchange of information normally stored within a calendar +or scheduling application. It allows users to send meeting requests and tasks +to other users through email. Recipients of the iCalendar email can respond +to the sender easily or counter-propose another meeting date and time. For +more information, see the iCalendar +specification (RFC 2445).

+

vCalendar (vCal) is the precursor of the iCalendar standard. It defines +a format that allows for the capture of information normally stored within +a calendar or scheduling application. The format is suitable as an interchange +format between applications or systems and is intended to be used for exchanging +information about event and to-do types of entities. For more information, +see the vCalendar specification.

+
+

Using the service in a widget

+

To access and manage calendar information using the Calendar Service +API:

+
    +
  1. Create a service +object for the API using device.getServiceObject().

    +
  2. +
  3. Define the +tasks you want to perform and choose the correct methods for them.

    +
  4. +
  5. Optionally, +define how you want the results filtered.

  6. +
  7. Define methods +for processing the results.

  8. +
  9. Use the methods +defined in step 2 to perform the tasks. Use asynchronous methods together +with callback().

    +
  10. +
  11. Process the +results with the methods defined in step 4.

  12. +
+

For the complete source of a sample widget that demonstrates how to +use this service, see the +full example.

+
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-AE9BB3E0-C243-476B-A236-40958A1DAED9.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-AE9BB3E0-C243-476B-A236-40958A1DAED9.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,40 @@ + + +Checking for touch support

Checking for touch support

The Web Runtime (WRT) API does not provide a way to detect whether a device is touch-enabled. You can use simple but error-prone heuristics to detect it.

+

The first S60 touch UI devices have bigger screen resolution than older devices. Therefore, if the queried screen resolution is 360 x 640 (or 640 x 360 in landscape orientation), you can assume that touch UI is supported. On devices that support WRT 1.1, you can use the DisplayResolution attribute of the ISysInfo.GetInfo() method to determine screen resolution.

+

You can also use the screen width and height attributes to determine screen resolution:

+
// Identifies the device by querying its resolution
+function detectResolution() {
+    var screenWidth = screen.width;
+    var screenHeight = screen.height;
+    
+    if (screenWidth == 240 && screenHeight == 320) {
+        resolution = RESOLUTION_QVGA_PORTRAIT;
+    } else if (screenWidth == 320 && screenHeight == 240) {
+        resolution = RESOLUTION_QVGA_LANDSCAPE;
+    } else if (screenWidth == 360 && screenHeight == 640) {
+        resolution = RESOLUTION_NHD_PORTRAIT;
+    } else if (screenWidth == 640 && screenHeight == 360) {
+        resolution = RESOLUTION_NHD_LANDSCAPE;
+    } else if (screenWidth == 800 && screenHeight == 352) {
+        resolution = RESOLUTION_E90_LANDSCAPE;
+    } else {
+        resolution = RESOLUTION_UNDEFINED;
+    }
+}
+
+// Detects whether touch UI is supported
+function detectTouchUI() {
+		// Query the device resolution to determine whether this is a touch device.
+    if (resolution == RESOLUTION_NHD_LANDSCAPE ||
+        resolution == RESOLUTION_NHD_PORTRAIT) {
+        touchSupported = true;
+    } else {
+        touchSupported = false;
+		}
+}
+
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-AEB26A58-1DE2-46CB-81EC-6DB3A477B7A3.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-AEB26A58-1DE2-46CB-81EC-6DB3A477B7A3.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,165 @@ + + +JavaScript SystemInfo +Service API (WRT 1.1)

JavaScript SystemInfo +Service API (WRT 1.1)

+

This SystemInfo Service API +is supported since WRT 1.1.

+

The SystemInfo Service API allows widgets to +access and modify system information on a device. The API is integrated into WRT through +the device object.

+

For an overview of the service and the API, see section Accessing and modifying system information.

+

Using the SystemInfo Service API

+

To use the SystemInfo Service API, your widget must +first create a service object for it +using the device.getServiceObject() method. +Use Service.SysInfo to identify the service provider +and ISysInfo to identify the supported interface:

+ +
var so = device.getServiceObject("Service.SysInfo", "ISysInfo");
+

This service object can then be used to access the services provided +by the API:

+ +
+

Emulator support

+

The S60 5th Edition SDK emulator provides partial support for system +information. The following table lists the system +attributes supported by the emulator.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Supported system +attributes
+

Entity

+
+

Key

+
+

Device

+
+

PlatformVersion

+
  +

PhoneModel

+
 
+

Display

+
+

ScreenSaverTimeout

+
  +

UserInactivity

+
  +

KeyGuardTime

+
  +

AutoLockTime

+
  +

AutoLockStatus

+
  +

Wallpaper

+
  +

LightTimeout

+
  +

DisplayResolution

+
  +

DisplayOrientation

+
 
+

General

+
+

InputLanguage

+
  +

SupportedLanguages

+
  +

PredictiveText

+
 
+

Memory

+
+

ListDrives

+
  +

DriveInfo

+
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-AFA696FC-475B-410D-B0E4-DDC7A3393A09_d0e3248_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-AFA696FC-475B-410D-B0E4-DDC7A3393A09_d0e3248_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-AFAF423C-2193-440D-A2D3-80549FFF0A46-1AFC49140A2B.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-AFAF423C-2193-440D-A2D3-80549FFF0A46-1AFC49140A2B.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,14 @@ + + +Coping with the processing limits of the device

Coping with the processing limits of the device

The processing capabilities of mobile devices are restricted by small runtime and storage memory. Because new S60 devices are constantly being developed, it is not possible to speak in definitive terms about the resources available on an S60 device. For example, the internal memory has evolved from 4 MB to even ten times more in current S60 3rd Edition devices. Still, the amount of memory available to you is limited and should be used carefully.

+

The following guidelines help you create applications that comply with the limited processing capabilities of mobile devices.

+ +

Using IFrames

The in-line frame (IFrame) HTML element allows embedding an HTML document inside another HTML document. IFrames are executed as separate browser windows, which increases memory consumption and negatively affects the performance of applications. In addition, scrolling is not supported in S60 IFrames. Therefore, using IFrames is not recommended in widgets. For more information on using IFrames, see S60 Widgets and IFrames on the Forum Nokia Wiki.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-AFFB2140-ABEF-4E7D-893B-B4CC8912C85F-master.jpg Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-AFFB2140-ABEF-4E7D-893B-B4CC8912C85F-master.jpg has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-AFFB2140-ABEF-4E7D-893B-B4CC8912C85F_d0e3745_href.jpg Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-AFFB2140-ABEF-4E7D-893B-B4CC8912C85F_d0e3745_href.jpg has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-B00941F9-2530-4D3D-BBC7-59EDA3A4C151.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-B00941F9-2530-4D3D-BBC7-59EDA3A4C151.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,21 @@ + + +Web Runtime features

Web Runtime features

This section describes the features that you can build into widgets using Web Runtime (WRT).

+

For information about the standards supported by WRT, see section Web Runtime standards.

+

Web Runtime 1.0 and later features

WRT 1.0 provided support for widgets through built-in JavaScript objects. The following features can be added to widgets using this technology.

Note: The WRT environment is backward-compatible; widgets created for WRT 1.0 run normally with WRT 1.1. However, you should take newer technologies, such as different display sizes and the introduction of touch UI, into consideration when running WRT 1.0 widgets on newer mobile devices.

    +
  • User interaction with the underlying device

    Mobile device users can interact with the device through user input, for example via the options list or softkeys. For more information, see Managing user interaction and the JavaScript menu object.

  • +
  • Self-updating widgets

    Widgets can update themselves by communicating directly with a web service or server. For more information, see Managing widgets on mobile devices.

  • +
  • Navigation

    Mobile device users can navigate the UI using tabs or a cursor. For more information, see Moving within widgets and the setNavigationEnabled() method in the Web Runtime API reference.

  • +
  • Display rotation

    Mobile device users can rotate the display between portrait and landscape orientation. For more information, see Designing for dynamic screen orientation.

  • +
  • Launching S60 applications

    Widgets can launch S60 mobile device applications for their own use. For example, a news widget can launch the Calendar application so that mobile device users can mark an event in their calendar. For more information, see the openApplication() method in the Web Runtime API reference.

  • +
  • Language-specific versions of a widget

    The S60 platform supports multiple languages and allows mobile device users to select the language that their device uses for UI texts. Widget developers can create language-specific versions of a widget to take advantage of this feature. For more information, see Supporting multiple languages.

  • +
  • Dynamically modified web pages

    Widgets can inspect or modify web pages dynamically through the use of DOM Level 2.

  • +
+

Web Runtime 1.1 features

WRT 1.1 added the following features:

    +
  • Support for S60 Platform Services through JavaScript Service APIs. For more information, see Using platform services.

    Note: Widgets created using the WRT 1.1 Service APIs do not work with WRT 1.0.

  • +
  • Support for home screen widgets on compatible devices.

    Widgets that you enable for the home screen work normally in full screen mode on devices that do not have a home screen.

  • +
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-B024688A-3701-4282-9C98-D984477E00C2.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-B024688A-3701-4282-9C98-D984477E00C2.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,60 @@ + + +Criteria for +receiving sensor data

Criteria for +receiving sensor data

+

The criteria object specifies the sensor +channel to listen for data.

+

The criteria object has two main properties: ListeningType and ChannelInfoMap. These are described in the following table.

+
+ + + + + + + + + + + + + + + + + + +
Table: Criteria object properties
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

criteria.ListeningType

+
+

Specifies the type of notification for which to register. This is always "ChannelData".

+
+

string

+
+

Possible values:

+
    +
  • "ChannelData"

  • +
+
+

criteria.ChannelInfoMap

+
+

Specifies the sensor channel to listen for data.

+

Retrieve this object using the FindSensorChannel method.

+

For more information about the object, see section Sensor channel information.

+
+

object

+
+

See section Sensor channel information.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-B0BAAE5B-CA8B-4443-B3E1-CB5AC84B9631.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-B0BAAE5B-CA8B-4443-B3E1-CB5AC84B9631.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,24 @@ + + +Developer +resources

Developer +resources

This section provides links that give more information on subjects related +to widget development for the S60 platform.

Forum Nokia Web sites

Forum Nokia provides documentation, examples, technical support and +community pages for the S60 platform. There are separate technology pages +with documentation and other information on the Web +Runtime environment and widgets. The Forum Nokia Wiki includes code +examples for developing widgets. You might also want to consider +reading tips for power consumption management on the Power Management page provided by Forum Nokia.

Development tools with release notes can be accessed via the Forum Nokia Tools +and SDKs page.

Forum Nokia also publishes mobile +device specifications for more detailed information on each Nokia +mobile device model.

S60 Web site

The S60 Web site is a +source for S60 platform related information, including device +specifications. Especially the Developers +section provides useful information and documentation for developing +for the S60 platform. The Web +Runtime pages also include information on how to get started with +widget development.

Other Web sources

Other widget development related information can be found from the following +sources:

\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-B0F9DE3D-8F22-4976-8BE3-F7F40A90D6FC.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-B0F9DE3D-8F22-4976-8BE3-F7F40A90D6FC.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,46 @@ + + +vibrasettings

vibrasettings

+

Syntax:

+
[int] sysinfo.vibrasettings
+

Description:

+

This is a read-only property that returns the current settings of the vibration mode set in the active user profile.

+

The returned value can be one of the setting values listed in the following table.

+
+ + + + + + + + + + + + + + + + + +
Table: Values returned by vibrasettings
+

Value

+
+

Description

+
+

0

+
+

Not initialized yet or there is an error condition.

+
+

1

+
+

Vibration setting in the user profile is on.

+
+

2

+
+

Vibration setting in the user profile is off.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-B11EEC60-6A5C-40A6-A54A-74504B2BEE4F.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-B11EEC60-6A5C-40A6-A54A-74504B2BEE4F.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,139 @@ + + +Criteria for +change notifications

Criteria for +change notifications

+

The criteria object specifies which calendar +and calendar entries to monitor for changes and when.

+

The criteria object has two main properties: Type and Filter. +These are described in the following table. Properties enclosed in brackets +are optional.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Criteria object properties
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

criteria.Type

+
+

Specifies the type of calendar information to monitor. This is always "CalendarEntry".

+
+

string

+
+

Possible values:

+
    +
  • "CalendarEntry"

  • +
+
+

[criteria.Filter]

+
+

Specifies the calendar and calendar entries to monitor.

+

If this property is not specified, RequestNotification returns +notifications for all entries in the default calendar.

+
+

object

+
+

Object with the properties specified below

+
+

[criteria.Filter.CalendarName]

+
+

Specifies the calendar whose entries to monitor.

+

If this property is not specified, the default calendar is used.

+
+

string

+
+

<DriveLetter>:<FileName>

+

For example: "C:Calendar"

+
+

[criteria.Filter.LocalIdList]

+
+

Specifies the LocalIds of the entries to monitor. +Use GetList to +retrieve these.

+

If this property is not specified, all entries in the calendar are monitored.

+

The first LocalId is specified in Filter.LocalIdList[0].

+
+

array of strings

+
 
+

[criteria.Filter.StartRange]

+
+

If only StartRange is specified, notifications +are returned from this date onwards.

+

If both StartRange and EndRange are +specified, only changes that occur within these dates are notified about.

+

+

+

date object

+
 
+

[criteria.Filter.EndRange]

+
+

If only EndRange is specified, notifications are +returned until this date.

+

If both StartRange and EndRange are +specified, only changes that occur within these dates are notified about.

+

+

+

date object

+
 
+

[criteria.Filter.IncludeUndatedTodos]

+
+

Specifies whether notifications are returned for ToDo entries +that have no date.

+
+

boolean

+
 
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-B12990B6-979C-4BBA-B030-FB7CEC04CB3A.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-B12990B6-979C-4BBA-B030-FB7CEC04CB3A.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,123 @@ + + +STEW: supporting screen rotation

STEW: supporting screen rotation

This example illustrates how to design a widget that supports the changes in screen orientation.

+

Laying out pages in portrait and landscape orientation

STEW is designed for the 240 x 320 (QVGA) and the 360 x 640 (nHD) screen size in both portrait and landscape orientation. To accommodate for the changes in the width and height ratio when moving between portrait and landscape orientation, the position and size of all elements in the HTML and CSS files in the STEW example are specified relatively.

.input_container input {
+	width: 100%;
+	...
+}
+
+.top_bar {
+	width: 100%;
+	...
+}
+
+.status_container table{
+	width: 100%;
+}
+

Figure: STEW Search view in portrait orientation

In most cases, this ensures good user interface display in both portrait and landscape screen orientation on QVGA screens. On nHD screens, additional logic is needed to reposition the navigation menu. In the figure below, the menu is located at the bottom of the screen in portrait orientation, where it takes up a large portion of the screen and reduces the amount of the screen estate available. To fit more content in the view, display the navigation menu at the right side of the screen in landscape orientation.

Figure: STEW Search view in landscape orientation

Use CSS to change the style of the navigation menu when screen orientation changes between portrait and landscape. The following CSS styles are used for portrait orientation:

.buttons_bottom {
+	position: absolute;
+	bottom: 0;
+	left: 0;
+	width: 100%;
+	height: 84px;
+	background: url(images/top_bg.png) bottom repeat-x #b7ecef;
+	text-align: center;
+	padding-top: 2px;
+	border-top: 2px solid #7dcbe5;
+}
+

The following CSS styles are used for landscape orientation:

.buttons_bottom_landscape {
+    position: absolute;
+    top: 0;
+    right: 0;
+    width: 84px;
+    height: 100%;
+    padding-top: 50px;
+    background: url(images/top_bg_landscape.png) right repeat-y #b7ecef;
+    text-align: center;
+    border-left: 2px solid #7dcbe5;
+}
+
+

Detecting screen orientation changes

The following function that is assigned to the onResize event handler in the body element in the HTML file detects screen orientation changes:

<body onload="javascript:init();" onresize="javascript:onResize();">
+

The onResize function is located in the main.js file. In addition, the size of the container must be decreased by the menu height or width to position the button menu and title bar correctly on the screen. First, references to all the DOM elements for the menu, container and content are retrieved. Then the size of the content is calculated by subtracting the menu size from the screen size.

function onResize() {
+	// Get the screen height or width.
+	var screenSize = Helper.getScreenSize();	
+	
+	// On large screens, when rotating, update the
+	// bottom menu layout (bottom with portrait, right with
+	// landscape). Also update the screen container to be smaller
+	// for the amount of the menu to avoid overlapping.
+	var menuStrip = document.getElementById( "menu_strip" );
+	var topBar = document.getElementById( "top_bar" );
+	var container = document.getElementById( "container" );
+	var content = document.getElementById( "content" );
+
+	container.style.width = screenSize.width + "px";
+	container.style.height = screenSize.height + "px";
+	
+	var largeScreen = Helper.isLargeScreen(); 
+	if ( largeScreen ) {
+		// Hide softkeys.
+		menu.hideSoftkeys();
+				
+		// Show menu and resize content.
+		var hidden = (menuStrip.className.indexOf( "hidden" ) != -1);		
+		if ( Helper.isLandscape() ) {
+			menuStrip.className = "buttons_bottom_landscape";
+
+			var width = (screenSize.width - menuStrip.offsetWidth) + "px";
+			if ( widgetMenu.activeScreen == Menu.LOGIN_SCREEN ) {
+				// If we're on login screen the menu isn't shown so update the width.
+				width = screenSize.width + "px";
+			}
+			topBar.style.width = width;
+			content.style.width = width;
+			content.style.height = (screenSize.height - topBar.offsetHeight) + "px";
+		} else {
+			menuStrip.className = "buttons_bottom";
+
+			var width = screenSize.width + "px";
+			topBar.style.width = width;
+			content.style.width = width;
+			content.style.height = (screenSize.height - menuStrip.offsetHeight - topBar.offsetHeight) + "px";
+		}
+		// If the menu was not visible, hide it.
+		if ( hidden ) {
+			menuStrip.className += " hidden";
+		}
+	} else {	
+		// Hide menu strip and resize content.
+		menuStrip.className = "hidden";
+		content.style.width = screenSize.width + "px";
+		content.style.height = screenSize.height + "px";
+	}
+

The code above uses two functions from the Helper class: getScreenSize and isLandscape. The getScreenSize function returns the width and height in a size object. The isLandscape function checks the screen orientation. The screen orientation is assumed to be landscape if the width of the screen is greater than its height.

isLandscape: function() {
+	var size = this.getScreenSize();
+	return ( size.width > size.height );	
+}
+
+

Polling for screen orientation changes

Some devices, such as the first product release of the Nokia 5800, do not support the onResize function. As a workaround for this known issue, a timer is started that polls for screen size changes. The timer is implemented by calling the startResizePoller function of the WrtHelper object.

startResizePoller: function() {
+	if ( Helper.isLargeScreen() ) {		
+		setInterval(WrtHelper._poolResize, 1000);
+	}
+}
+

The _poolResize function checks the current and previous screen size. If the size changed, the function triggers the resize event manually to achieve the same effect as if WRT triggered the event.

_poolResize: function() {
+	var screenSize = Helper.getScreenSize();
+	var height = screenSize.height;
+	var width = screenSize.width;
+			
+	if ( width != WrtHelper._screenWidth || height != WrtHelper._screenHeight ) {
+		WrtHelper._screenWidth = width;
+		WrtHelper._screenHeight = height;
+		
+		// Trigger event.
+		var fireOnThis = document.body;
+		var evObj = document.createEvent("HTMLEvents");
+		evObj.initEvent("resize", true, true);
+		fireOnThis.dispatchEvent(evObj);
+	}
+}
+
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-B1BFA47E-DAC0-40B1-898E-B3FCE14AE78F.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-B1BFA47E-DAC0-40B1-898E-B3FCE14AE78F.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,114 @@ + + +Calculation +results

Calculation +results

+

The ReturnValue property returned by Calculate contains the calculation results for the requested operation. The +type of the value depends on the operation.

+

The following table describes the calculation results returned for each +operation.

+
+ + + + + + + + + + + + + + + + + + + + + +
Table: ReturnValue per +operation
+

Operation

+
+

ReturnValue description

+
+

ReturnValue type

+
+

FindDistance

+
+

Contains the distance between the source location and the target location +in meters.

+
+

number

+
+

FindBearingTo

+
+

Contains the bearing to the target location from the source location. +The bearing is expressed in degrees counting clockwise relative to true north.

+
+

number

+
+

MoveCoordinates

+
+

Contains the coordinates of the new location. The properties of this +object are described in the following table.

+

The coordinates are referenced according to the WGS +84 datum. The representation is in decimal degrees.

+
+

object

+
+ + + + + + + + + + + + + + + + + + + + + +
Table: ReturnValue +object properties for MoveCoordinates
+

Property

+
+

Description

+
+

Type

+
+

Longitude

+
+

Specifies the longitude coordinate of the new location.

+
+

number

+
+

Latitude

+
+

Specifies the latitude coordinate of the new location.

+
+

number

+
+

Altitude

+
+

Specifies the altitude coordinate of the new location.

+
+

number

+
+

+

\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-B2976236-0DC6-4CBB-B2FA-B1A6E6639A1D.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-B2976236-0DC6-4CBB-B2FA-B1A6E6639A1D.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,16 @@ + + +Designing for a specific audience

Designing for a specific audience

Every application you design should have a specific purpose. Find out who will use the application, what they will use it for, and which mobile devices they have. Then design the application to fit a specific context of use.

+

Analyzing users and their tasks

Gather information about the user group to learn about the context the people live in, their current tasks, their problems with current solutions, their needs for new products or services, and underlying motivations that would get them to adopt and use them. Possible methods for gathering the information include interviewing users, observing them at their current tasks, asking them to document their daily activities, and creating questionnaires. For example, gather information about the use of a Web site to determine which content or service is accessed most frequently and would thus make a useful widget.

You can combine content from Web sites with a local context to deliver personalized services that are relevant to your users. For example, a weather widget can use the global positioning system (GPS) in mobile devices to access the user's location and deliver information about the local weather.

For more information on user experience techniques, see Usability in a mobile application development project.

+

Selecting supported devices

You can install and run widgets on devices that support Web Runtime (WRT). Each unique device targets a different market niche, a combination of form, functionality, and price, which expands the total addressable market for mobile applications. The characteristics of your target devices, such as screen size and orientation, touch support, and the availability of a keyboard or home screen, affect widget design.

For more information on the target devices, see Device Specifications.

+

Designing for a specific context of use

When designing for mobile devices, keep in mind the context in which users use their mobile devices:

    +
  • Location—Where and how do users use the widget? Are they standing up or sitting down? Do they have one hand free?

    Design widgets that users can use with one hand, while walking. For more information, see Managing user interaction

  • +
  • Time—How much time can users afford to spend on the widget? How much attention can they give to it?

    Design widgets that fit into the natural flow of users and do not take them out of it. For more information, see Moving within widgets.

  • +
  • Light—Are the users inside or outside? What are the weather conditions?

    Design widgets that users can see even in direct sunlight. For more information, see Designing for small screens.

  • +
  • Situation—Can users or those around them be disturbed by the mobile device?

    Because users take their devices with them everywhere, design widgets that remain silent when devices are set to silent.

  • +
  • Ease of use—How experienced are users in using mobile devices?

    Design widgets that even inexperienced users can use. For more information, see Designing simple pages.

  • +
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-B2BCD2C0-DA4D-4830-9BF3-5DA50879A3A1.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-B2BCD2C0-DA4D-4830-9BF3-5DA50879A3A1.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,845 @@ + + +Contacts Service API example

Contacts Service API example

+

+

This section presents the full source code of a working sample widget +for the Contacts Service. +You can download the wgz package for this widget from +section Example widgets.

+

For general information about creating widgets, see section Widget component files.

+

For widget development and debugging purposes, this example writes its +output to c:\data\jslog_widget.log using console.info. +For instructions on how to enable logging in the Web browser for S60, see +section JavaScript console.

+

Info.plist

+
<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Nokia//DTD PLIST 1.0//EN" "http://www.nokia.com/NOKIA_COM_1/DTDs/plist-1.0.dtd">
+<plist version="1.0">
+<dict>
+  <key>DisplayName</key>
+  <string>ContactSample</string>
+  <key>Identifier</key>
+  <string>com.nokia.widget.sapi.contact.sample</string>
+  <key>Version</key>
+  <string>1.0</string>
+  <key>MainHTML</key>
+  <string>contact-sample.html</string>
+</dict>
+</plist>
+
+

contact-sample.html

+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+  <head>
+    <script type="text/javascript" src="js/common.js"></script>
+    <script type="text/javascript" src="js/contact-sample.js"></script>
+  </head>
+  <body id='docBody' bgcolor="#ddeeff" onload="setup()" style=width:100%;height:100%;>
+    <form name="frm">
+      <h3>Contact API Sample Widget</h3>
+      Async<input type="checkbox" id="async_check" onClick="check_async()">
+      Cancel<input type="checkbox" id="cancel_check" onClick="check_cancel()"><br/>
+      <hr>
+      <input type="button" onclick="addContact('img1')" value="AddContact"><img id="img1" src="pic/blank.png" width="25" height="25" align="center"><br>
+      <input type="button" onclick="delContact('img2')" value="DeleteContact"><img id="img2" src="pic/blank.png" width="25" height="25" align="center"><br>
+      <input type="button" onclick="getContactList('img3')" value="GetContactList"><img id="img3" src="pic/blank.png" width="25" height="25" align="center"><br>
+      <input type="button" onclick="importContact('img4')" value="ImportContact"><img id="img4" src="pic/blank.png" width="25" height="25" align="center"><br>
+      <input type="button" onclick="exportContact('img5')" value="ExportContact"><img id="img5" src="pic/blank.png" width="25" height="25" align="center"><br>
+      <hr>
+      <input type="button" onclick="addGroup('img6')" value="AddGroup"><img id="img6" src="pic/blank.png" width="25" height="25" align="center"><br>
+      <input type="button" onclick="delGroup('img7')" value="DeleteGroup"><img id="img7" src="pic/blank.png" width="25" height="25" align="center"><br>
+      <input type="button" onclick="getGroupList('img8')" value="GetGroupList"><img id="img8" src="pic/blank.png" width="25" height="25" align="center"><br>
+      <input type="button" onclick="organiseGroup('img9')" value="OrganiseGroup"><img id="img9" src="pic/blank.png" width="25" height="25" align="center"><br>
+      <hr>
+      <div class='contactsample' id='contactsample' bgcolor="#ddeeff" style=width:100%;height:100%;overflow:auto></div>
+    </form>
+  </body>
+</html>
+
+
+

common.js

+
// common.js
+//
+// This file contains some utility functions
+
+// Check the error code and show the information to users
+function checkError(message, resultList, divId, imgId)
+{
+  var errCode = resultList.ErrorCode;
+  var msg = "";
+
+  if (errCode) {
+    msg = message + "<BR>" + "Failed Error: " + errCode + "<BR>";
+    if(resultList.ErrorMessage != undefined)
+      msg += "Error Message: " + resultList.ErrorMessage;
+    showIMG(imgId,"no"); 
+  } else {
+    showIMG(imgId,"yes"); 
+  }
+
+  //print error message
+  if(divId != null && divId != undefined)
+    document.getElementById(divId).innerHTML = msg;
+  console.info(msg);
+
+  return errCode;
+}
+
+// Build the message by reading a iteratorable list in a recursive manner
+function showIterableList(iterator)
+{
+  var msg = "";
+  try
+  {
+    iterator.reset();
+    var item;
+    while (( item = iterator.getNext()) != undefined ){
+      msg += showObject( item );
+    }
+  }
+  catch(e)
+  {
+    alert('<showIterableList> ' + e);
+  }
+  return msg;
+}
+
+// Build the message by reading a JS object in a recursive manner
+function showObject( obj )
+{
+  var txt = "";
+  try {
+    if ( typeof obj != 'object' )
+      return "" + obj + '<BR/>';
+    else {
+      for(var key in obj) {
+        txt +=  key + ":";
+        txt += showObject( obj[key] );
+        txt += '<BR/>';
+      }
+      txt += '<BR/>';
+    }
+  }
+  catch (e)
+  {
+    alert("showObject: " + e);
+  }
+  return txt;
+}
+
+// Show the image to indicate the test result
+function showIMG(imgId, isOK) 
+{
+  if(imgId == null || imgId == undefined)
+    return;
+
+  if(isOK == "yes")
+    document.getElementById(imgId).src = "pic/yes.png";
+  else if(isOK == "no")
+    document.getElementById(imgId).src = "pic/no.png";
+  else
+    document.getElementById(imgId).src = "pic/blank.png";
+}
+
+// Show elements in object by using 'alert'
+function testObject(obj)
+{
+  var msg = "";
+  for(var key in obj) {
+    msg = msg + ":" + key + "=" + obj[key];
+  }
+  alert(msg);
+}
+
+// Test whether the input is numeric
+function IsNumeric(sText)
+{
+  var ValidChars = "0123456789.";
+  var IsNumber=true;
+  var Char;
+
+  for (i = 0; i < sText.length && IsNumber == true; i++)
+  {
+    Char = sText.charAt(i);
+    if (ValidChars.indexOf(Char) == -1)
+    {
+      IsNumber = false;
+    }
+  }
+  return IsNumber;
+}
+
+

contact-sample.js

+
// contact-sample.js
+//
+// In this sample Contact and Group will be added, deleted, and listed from
+// default database; Contact will be imported and exported; Group will be
+// organised; Also, async operation will be canceled
+//
+
+//SAPI Error Codes
+// 0    - Success
+// 1000 - InvalidServiceArgument
+// 1001 - UnknownArgumentName
+// 1002 - BadArgumentType
+// 1003 - MissingArgument
+// 1004 - ServiceNotSupported
+// 1005 - ServiceInUse
+// 1006 - ServiceNotReady
+// 1007 - NoMemory
+// 1008 - HardwareNotAvailable
+// 1009 - ServerBusy
+// 1010 - EntryExists
+// 1011 - AccessDenied
+// 1012 - NotFound
+// 1013 - UnknownFormat
+// 1014 - GeneralError
+// 1015 - CancelSuccess
+// 1016 - ServiceTimedOut
+// 1017 - PathNotFound
+
+// declare the service object
+var so;
+
+// async Test Mode
+var asyncMode;
+
+// cancel Test Mode
+var cancelMode;
+
+// imgid for callback1 function
+var imgid_callback1;
+
+// imgid for callback2 function
+var imgid_callback2;
+
+// imgid for callback3 function
+var imgid_callback3;
+
+// imgid for callback4 function
+var imgid_callback4;
+
+// imgid for callback5 function
+var imgid_callback5;
+
+// imgid for callback6 function
+var imgid_callback6;
+
+// imgid for callback7 function
+var imgid_callback7;
+
+// id of the div used to display information
+const DIV_ID = 'contactsample';
+
+// Called from onload()
+function setup()
+{
+  try {
+    so = device.getServiceObject("Service.Contact", "IDataSource");
+    console.info("setup: so: %s", so);
+  }
+  catch (e) {
+    alert('<setup> ' +e);
+  }
+}
+
+// Async checkbox handler
+function check_async() {
+  var asyncChk = document.getElementById("async_check");
+  asyncMode = asyncChk.checked;
+  if (!asyncMode) {
+    var cancelChk = document.getElementById("cancel_check");
+    cancelChk.checked = false;
+    cancelChk = false;
+  }
+}
+
+// cancel checkbox handler
+function check_cancel() {
+  var cancelChk = document.getElementById("cancel_check");
+  cancelMode = cancelChk.checked;
+
+  // if cancel checkbox is selected, the async checkbox should be
+  // selected automatically
+  if(cancelMode) {
+    var asyncChk = document.getElementById("async_check");
+    asyncChk.checked = true;
+    asyncMode = true;
+  }
+}
+
+// Add Contact
+function addContact(imgId) {
+
+  var last = new Object();
+  last.Label = "Last name";
+  last.Value = "Shen";
+
+  var first = new Object();
+  first.Label = "First name";
+  first.Value = "Yi";
+
+  var contactdata = new Object();
+  contactdata.LastName = last;
+  contactdata.FirstName = first;
+
+  var criteria = new Object();
+  criteria.Type = "Contact";
+  criteria.Data = contactdata;
+
+  try {
+    var result;
+    if (!asyncMode && !cancelMode) { // sync
+      result = so.IDataSource.Add(criteria);
+      checkError("IDataSource::addContact",result,DIV_ID,imgId);
+    } else if (asyncMode && !cancelMode) {// async
+      // set the image id for callback1 function
+      imgid_callback1 = imgId;
+      result = so.IDataSource.Add(criteria, callback1);
+      if(!checkError("IDataSource::addContactAsync",result,DIV_ID,imgId)) {
+        showIMG(imgId,"");
+      }
+    } else if (cancelMode){ // cancel
+      // set the image id for callback1 function
+      imgid_callback1 = imgId;
+      result = so.IDataSource.Add(criteria, callback1);
+      if(!checkError("IDataSource::cancelAddContactAsync",result,DIV_ID,imgId)) {
+        showIMG(imgId,"");
+        var criteria2 = new Object();
+        criteria2.TransactionID = result.TransactionID;
+        var result2 =so.IDataSource.Cancel(criteria2);
+        checkError("IDataSource::cancelAddContactAsync",result2,DIV_ID,imgId);
+      }
+    }
+  }
+  catch (e) {
+    showIMG(imgId,"no");
+    alert ("addContact: " + e);
+  }
+}
+
+// Delete Contact
+function delContact(imgId) {
+
+  // using the getFirstId to get the Contact Id
+  // it is impossible to ask user to type the Contact Id because
+  // the id is in binary and hard to be displayed by javascritp
+
+  var contactId = getFirstId("Contact");
+  if(contactId == null) {
+    alert("No contact exists!");
+    return;
+  }
+
+  var contactdata = new Object();
+  contactdata.IdList = new Array();
+  contactdata.IdList[0] = contactId;
+
+  var criteria = new Object();
+  criteria.Type = "Contact";
+  criteria.Data = contactdata;
+
+  try {
+    var result;
+    if (!asyncMode && !cancelMode) { // sync
+      result = so.IDataSource.Delete(criteria);
+      checkError("IDataSource::delContact",result,DIV_ID,imgId);
+    } else if (asyncMode && !cancelMode) {// async
+      // set the image id for callback2 function
+      imgid_callback2 = imgId;
+      result = so.IDataSource.Delete(criteria, callback2);
+      if(!checkError("IDataSource::delContactAsync",result,DIV_ID,imgId)) {
+        showIMG(imgId,"");
+      }
+    } else if (cancelMode){ // cancel
+      // set the image id for callback2 function
+      imgid_callback2 = imgId;
+      result = so.IDataSource.Delete(criteria, callback2);
+      if(!checkError("IDataSource::cancelDelContactAsync",result,DIV_ID,imgId)) {
+        showIMG(imgId,"");
+        var criteria2 = new Object();
+        criteria2.TransactionID = result.TransactionID;
+        var result2 =so.IDataSource.Cancel(criteria2);
+        checkError("IDataSource::cancelDelContactAsync",result2,DIV_ID,imgId);
+      }
+     }
+  }
+  catch (e) {
+    showIMG(imgId,"no");
+    alert ("delContact: " + e);
+  }
+}
+
+// Show Contact List
+// find the property names in AddContact()
+// Note, the contact id cannot be display correctly by javascript because
+// it is a binary number
+function showContactList(iterator) {
+  var msg = "";
+  try
+  {
+    iterator.reset();
+    var item;
+    while (( item = iterator.getNext()) != undefined ){
+      var lastName = item['LastName'];
+      var firstName = item['FirstName'];
+      msg += lastName['Label'] + ":" + lastName['Value'] + "<br>";
+      msg += firstName['Label'] + ":" + firstName['Value'] + "<br>";
+      msg += "<br>";
+    }
+  }
+  catch(e)
+  {
+    alert('<showContacList> ' + e);
+  }
+  return msg;
+}
+
+// Get the first Id
+function getFirstId(type) {
+
+  var criteria = new Object();
+  criteria.Type = type;
+
+  var result;
+  var firstId = null;
+  result = so.IDataSource.GetList(criteria);
+  if(!result.ErrorCode) {
+    var iterator = result.ReturnValue;
+    var item = iterator.getNext();
+    firstId = item['id'];
+  }
+
+  return firstId;
+}
+
+// Get Contact List
+function getContactList(imgId) {
+
+  var criteria = new Object();
+  criteria.Type = "Contact";
+
+  try {
+    var result;
+    if (!asyncMode && !cancelMode) { // sync
+      result = so.IDataSource.GetList(criteria);
+      if(!checkError("IDataSource::getContactList",result,DIV_ID,imgId)) {
+        document.getElementById(DIV_ID).innerHTML = showContactList(result.ReturnValue);
+      }
+    } else if (asyncMode && !cancelMode) {// async
+      // set the image id for callback7 function
+      imgid_callback7 = imgId;
+      result = so.IDataSource.GetList(criteria, callback7);
+      if(!checkError("IDataSource::getContactListAsync",result,DIV_ID,imgId)) {
+        showIMG(imgId,"");
+      }
+    } else if (cancelMode){ // cancel
+      // set the image id for callback7 function
+      imgid_callback7 = imgId;
+      result = so.IDataSource.GetList(criteria, callback7);
+      if(!checkError("IDataSource::cancelGetContactListAsync",result,DIV_ID,imgId)) {
+        showIMG(imgId,"");
+        var criteria2 = new Object();
+        criteria2.TransactionID = result.TransactionID;
+        var result2 =so.IDataSource.Cancel(criteria2);
+        checkError("IDataSource::cancelGetContactListAsync",result2,DIV_ID,imgId);
+      }
+    }
+  }
+  catch (e) {
+    showIMG(imgId,"no");
+    alert ("getContactList: " + e);
+  }
+}
+
+// Import Contact
+function importContact(imgId) {
+
+  var impFileName = prompt("Please enter the file name", "contact-export.txt");
+  if (impFileName == "")
+    return;
+
+  var contactdata = new Object();
+  contactdata.SourceFile = impFileName;
+
+  var criteria = new Object();
+  criteria.Type = "Contact";
+  criteria.Data = contactdata;
+
+  try {
+    var result;
+    if (!asyncMode && !cancelMode) { // sync
+      result = so.IDataSource.Import(criteria);
+      checkError("IDataSource::Import",result,DIV_ID,imgId);
+    } else if (asyncMode && !cancelMode) {// async
+      // set the image id for callback4 function
+      imgid_callback4 = imgId;
+      result = so.IDataSource.Import(criteria, callback4);
+      if(!checkError("IDataSource::ImportAsync",result,DIV_ID,imgId)) {
+        showIMG(imgId,"");
+      }
+    } else if (cancelMode){ // cancel
+      // set the image id for callback4 function
+      imgid_callback4 = imgId;
+      result = so.IDataSource.Import(criteria, callback4);
+      if(!checkError("IDataSource::cancelImportAsync",result,DIV_ID,imgId)) {
+        showIMG(imgId,"");
+        var criteria2 = new Object();
+        criteria2.TransactionID = result.TransactionID;
+        var result2 =so.IDataSource.Cancel(criteria2);
+        checkError("IDataSource::cancelImportAsync",result2,DIV_ID,imgId);
+      }
+    }
+  }
+  catch (e) {
+    showIMG(imgId,"no");
+    alert ("importContact: " + e);
+  }
+}
+
+// Export Contact
+function exportContact(imgId) {
+
+  // using the getFirstId to get the Contact Id
+  // it is impossible to ask user to type the Contact Id because
+  // the id is in binary and hard to be displayed by javascritp
+
+  var contactId = getFirstId("Contact");
+  if(contactId == null) {
+    alert("No contact exists!");
+    return;
+  }
+
+  var expFileName = prompt("Please enter the file name", "contact-export.txt");
+  if (expFileName == "" || expFileName == null)
+    return;
+
+  var contactdata = new Object();
+  contactdata.id = contactId;
+  contactdata.DestinationFile = expFileName;
+
+  var criteria = new Object();
+  criteria.Type = "Contact";
+  criteria.Data = contactdata;
+
+  try {
+    var result;
+    if (!asyncMode && !cancelMode) { // sync
+      result = so.IDataSource.Export(criteria);
+      checkError("IDataSource::Export",result,DIV_ID,imgId);
+    } else if (asyncMode && !cancelMode) {// async
+      // set the image id for callback5 function
+      imgid_callback5 = imgId;
+      result = so.IDataSource.Export(criteria, callback5);
+      if(!checkError("IDataSource::ExportAsync",result,DIV_ID,imgId)) {
+        showIMG(imgId,"");
+      }
+    } else if (cancelMode){ // cancel
+      // set the image id for callback5 function
+      imgid_callback5 = imgId;
+      result = so.IDataSource.Export(criteria, callback5);
+      if(!checkError("IDataSource::cancelExportAsync",result,DIV_ID,imgId)) {
+        showIMG(imgId,"");
+        var criteria2 = new Object();
+        criteria2.TransactionID = result.TransactionID;
+        var result2 =so.IDataSource.Cancel(criteria2);
+        checkError("IDataSource::cancelExportAsync",result2,DIV_ID,imgId);
+      }
+   }
+  }
+  catch (e) {
+    showIMG(imgId,"no");
+    alert ("exportContact: " + e);
+  }
+}
+
+// Add Group
+function addGroup(imgId) {
+
+  var groupdata = new Object();
+  groupdata.GroupLabel = "TestGroupName"
+
+  var criteria = new Object();
+  criteria.Type = "Group";
+  criteria.Data = groupdata;
+
+  try {
+    var result;
+    if (!asyncMode && !cancelMode) { // sync
+      result = so.IDataSource.Add(criteria);
+      checkError("IDataSource::addGroup",result,DIV_ID,imgId);
+    } else if (asyncMode && !cancelMode) {// async
+      // set the image id for callback1 function
+      imgid_callback1 = imgId;
+      result = so.IDataSource.Add(criteria, callback1);
+      if(!checkError("IDataSource::addGroupAsync",result,DIV_ID,imgId)) {
+        showIMG(imgId,"");
+      }
+    } else if (cancelMode){ // cancel
+      // set the image id for callback1 function
+      imgid_callback1 = imgId;
+      result = so.IDataSource.Add(criteria, callback1);
+      if(!checkError("IDataSource::cancelAddGroupAsync",result,DIV_ID,imgId)) {
+        showIMG(imgId,"");
+        var criteria2 = new Object();
+        criteria2.TransactionID = result.TransactionID;
+        var result2 =so.IDataSource.Cancel(criteria2);
+        checkError("IDataSource::cancelAddGroupAsync",result2,DIV_ID,imgId);
+      }
+    }
+  }
+  catch (e) {
+    showIMG(imgId,"no");
+    alert ("addGroup: " + e);
+  }
+}
+
+// Delete Group
+function delGroup(imgId) {
+
+  // using the getFirstId to get the Group Id
+  // it is impossible to ask user to type the Group Id because
+  // the id is in binary and hard to be displayed by javascritp
+
+  var groupId = getFirstId("Group");
+  if(groupId == null) {
+    alert("No Group exists!");
+    return;
+  }
+
+  var groupdata = new Object();
+  groupdata.IdList = new Array();
+  groupdata.IdList[0] = groupId;
+
+  var criteria = new Object();
+  criteria.Type = "Group";
+  criteria.Data = groupdata;
+
+  try {
+    var result;
+    if (!asyncMode && !cancelMode) { // sync
+      result = so.IDataSource.Delete(criteria);
+      checkError("IDataSource::delGroup",result,DIV_ID,imgId);
+    } else if (asyncMode && !cancelMode) {// async
+      // set the image id for callback2 function
+      imgid_callback2 = imgId;
+      result = so.IDataSource.Delete(criteria, callback2);
+      if(!checkError("IDataSource::delGroupAsync",result,DIV_ID,imgId)) {
+        showIMG(imgId,"");
+      }
+    } else if (cancelMode){ // cancel
+      // set the image id for callback2 function
+      imgid_callback2 = imgId;
+      result = so.IDataSource.Delete(criteria, callback2);
+      if(!checkError("IDataSource::cancelDelGroupAsync",result,DIV_ID,imgId)) {
+        showIMG(imgId,"");
+        var criteria2 = new Object();
+        criteria2.TransactionID = result.TransactionID;
+        var result2 =so.IDataSource.Cancel(criteria2);
+        checkError("IDataSource::cancelDelGroupAsync",result2,DIV_ID,imgId);
+      }
+    }
+  }
+  catch (e) {
+    showIMG(imgId,"no");
+    alert ("delGroup: " + e);
+  }
+}
+
+// Show Group List
+// find the property names in AddGroup()
+// Note, the group id cannot be display correctly by javascript because
+// it is a binary number
+function showGroupList(iterator) {
+  var msg = "";
+  try {
+    iterator.reset();
+    var item;
+    while (( item = iterator.getNext()) != undefined ){
+      msg += item['GroupLabel'] + "<br>";
+      var groupList = item['Contents'];
+      if(groupList == null || groupList == undefined)
+        msg += "No group member.<br>";
+      else {
+        var i = 0;
+        for (var key in groupList)
+          i++;
+        msg += "There are " + i +" contacts in this group.<br>";
+      }
+      msg += "<br>";
+    }
+  }
+  catch(e)
+  {
+    alert('<showGroupList> ' + e);
+  }
+  return msg;
+}
+
+// Get Group
+function getGroupList(imgId) {
+
+  var criteria = new Object();
+  criteria.Type = "Group";
+
+  try {
+    var result;
+    if (!asyncMode && !cancelMode) { // sync
+      result = so.IDataSource.GetList(criteria);
+      if(!checkError("IDataSource::getGroupList",result,DIV_ID,imgId)) {
+        document.getElementById(DIV_ID).innerHTML = showGroupList(result.ReturnValue);
+      }
+    } else if (asyncMode && !cancelMode) {// async
+      // set the image id for callback3 function
+      imgid_callback3 = imgId;
+      result = so.IDataSource.GetList(criteria, callback3);
+      if(!checkError("IDataSource::getGroupListAsync",result,DIV_ID,imgId)) {
+        showIMG(imgId,"");
+      }
+    } else if (cancelMode){ // cancel
+      // set the image id for callback3 function
+      imgid_callback3 = imgId;
+      result = so.IDataSource.GetList(criteria, callback3);
+      if(!checkError("IDataSource::cancelGetGroupListAsync",result,DIV_ID,imgId)) {
+        showIMG(imgId,"");
+        var criteria2 = new Object();
+        criteria2.TransactionID = result.TransactionID;
+        var result2 =so.IDataSource.Cancel(criteria2);
+        checkError("IDataSource::cancelGetGroupListAsync",result2,DIV_ID,imgId);
+      }
+    }
+  }
+  catch (e) {
+    showIMG(imgId,"no");
+    alert ("getGroupList: " + e);
+  }
+}
+
+// Organise Group
+function organiseGroup(imgId) {
+
+  // using the getFirstId to get the Group Id
+  // it is impossible to ask user to type the Group Id because
+  // the id is in binary and hard to be displayed by javascritp
+
+  var groupId = getFirstId("Group");
+  if(groupId == null) {
+    alert("No Group exists!");
+    return;
+  }
+
+  // using the getFirstId to get the Contact Id
+  // it is impossible to ask user to type the Contact Id because
+  // the id is in binary and hard to be displayed by javascritp
+
+  var contactId = getFirstId("Contact");
+  if(contactId == null) {
+    alert("No contact exists!");
+    return;
+  }
+
+  //"Associate"
+  //"Disassociate"
+  var msg = "Please enter the operation type ['Associate' or 'Disassociate']";
+  var optype = prompt(msg, "Associate");
+  if (optype == "" || optype == null)
+    return;
+
+  var groupdata = new Object();
+  groupdata.id = groupId;
+  groupdata.IdList = new Array();
+  groupdata.IdList[0] = contactId;
+
+  var criteria = new Object();
+  criteria.Type = "Group";
+  criteria.Data = groupdata;
+  criteria.OperationType = optype;
+
+  try {
+    var result;
+    if (!asyncMode && !cancelMode) { // sync
+      result = so.IDataSource.Organise(criteria);
+      checkError("IDataSource::organiseGroup",result,DIV_ID,imgId);
+    } else if (asyncMode && !cancelMode) {// async
+      // set the image id for callback6 function
+      imgid_callback6 = imgId;
+      result = so.IDataSource.Organise(criteria, callback6);
+      if(!checkError("IDataSource::organiseGroupAsync",result,DIV_ID,imgId)) {
+        showIMG(imgId,"");
+      }
+    } else if (cancelMode){ // cancel
+      // set the image id for callback6 function
+      imgid_callback6 = imgId;
+      result = so.IDataSource.Organise(criteria, callback6);
+      if(!checkError("IDataSource::cancelOrganiseGroupAsync",result,DIV_ID,imgId)) {
+        showIMG(imgId,"");
+        var criteria2 = new Object();
+        criteria2.TransactionID = result.TransactionID;
+        var result2 =so.IDataSource.Cancel(criteria2);
+        checkError("IDataSource::cancelOrganiseGroupAsync",result2,DIV_ID,imgId);
+      }
+    }
+  }
+  catch (e) {
+    showIMG(imgId,"no");
+    alert ("organiseGroup: " + e);
+  }
+}
+
+// This is the asynchronous callback handler
+function callback1(transId, eventCode, result)
+{
+  console.info("addAsync: transId: %d  eventCode: %d result.ErrorCode: %d", transId, eventCode, result.ErrorCode);
+  checkError("IDataSource::addAsync",result,DIV_ID,imgid_callback1);
+}
+
+// This is the asynchronous callback handler
+function callback2(transId, eventCode, result)
+{
+  console.info("delAsync: transId: %d  eventCode: %d result.ErrorCode: %d", transId, eventCode, result.ErrorCode);
+  checkError("IDataSource::delAsync",result,DIV_ID,imgid_callback2);
+}
+
+// This is the asynchronous callback handler
+function callback3(transId, eventCode, result)
+{
+  console.info("getListAsync: transId: %d  eventCode: %d result.ErrorCode: %d", transId, eventCode, result.ErrorCode);
+  if(!checkError("IDataSource::getListAsync",result,DIV_ID,imgid_callback3)) {
+    document.getElementById(DIV_ID).innerHTML = showGroupList(result.ReturnValue);
+  }
+}
+
+// This is the asynchronous callback handler
+function callback4(transId, eventCode, result)
+{
+  console.info("importAsync: transId: %d  eventCode: %d result.ErrorCode: %d", transId, eventCode, result.ErrorCode);
+  checkError("IDataSource::importAsync",result,DIV_ID,imgid_callback4);
+}
+
+// This is the asynchronous callback handler
+function callback5(transId, eventCode, result)
+{
+  console.info("exportAsync: transId: %d  eventCode: %d result.ErrorCode: %d", transId, eventCode, result.ErrorCode);
+  checkError("IDataSource::exportAsync",result,DIV_ID,imgid_callback5);
+}
+
+// This is the asynchronous callback handler
+function callback6(transId, eventCode, result)
+{
+  console.info("organiseAsync: transId: %d  eventCode: %d result.ErrorCode: %d", transId, eventCode, result.ErrorCode);
+  checkError("IDataSource::organiseAsync",result,DIV_ID,imgid_callback6);
+}
+
+// This is the asynchronous callback handler
+function callback7(transId, eventCode, result)
+{
+  console.info("getListAsync: transId: %d  eventCode: %d result.ErrorCode: %d", transId, eventCode, result.ErrorCode);
+  if(!checkError("IDataSource::getListAsync",result,DIV_ID,imgid_callback7)) {
+    document.getElementById(DIV_ID).innerHTML = showContactList(result.ReturnValue);
+  }
+}
+
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-B4897257-F7BC-4C32-9C6C-A577FDAC5D09.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-B4897257-F7BC-4C32-9C6C-A577FDAC5D09.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,102 @@ + + +ISensor.RegisterForNotification()

ISensor.RegisterForNotification()

+

Description:

+

The RegisterForNotification method registers the +client to receive data from one sensor channel.

+

This is an asynchronous method.

+

Syntax:

+ +
result = so.ISensor.RegisterForNotification(criteria, callback);
+

Arguments:

+
    +
  • criteria:

    + +

    This is an object that specifies the sensor channel to listen for data. +For more information about the object properties and how to define them, see +section Criteria for receiving sensor data.

    + +
  • +
  • callback:

    + +

    The callback argument is the name of the method +that is executed when a RegisterForNotification call +has results or status information to return. You must define this method separately. +Follow the instructions in section Defining the callback handler for an asynchronous method to +define the callback method.

    + +
  • +
+

Return value:

+

The RegisterForNotification method returns an object +that contains the initial return value for the asynchronous call it started +(see the following table). The actual sensor data is returned by the callback method +in the ReturnValue property of its result object. The +returned data is described in section Returned sensor data.

+
+ + + + + + + + + + + + + + + + + + + + +
Table: Return value +properties for RegisterForNotification
+

Property

+
+

Description

+
+

Value

+
+

result.TransactionID

+
+

This is a number used as an identification to match transactions started +with the RegisterForNotification call to one or more +calls it generates to callback.

+
 
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See Sensor Service API error messages.

+
+

Remarks:

+
    +
  • RegisterForNotification retrieves sensor +data until cancelled with Cancel.

  • +
  • Invoking the same call on the same sensor channel from the +same user without cancelling the previous RegisterForNotification request +results in an error, since the channel is already listening on the pre-registered +notifications.

  • +
+

Example code:

+

+

For the complete source of a sample widget +that demonstrates how to use this Service API, see the +full example.

+ + +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-B4CB1D93-7418-493A-8ED8-812775ECF341-master.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-B4CB1D93-7418-493A-8ED8-812775ECF341-master.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-B4CB1D93-7418-493A-8ED8-812775ECF341_d0e11778_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-B4CB1D93-7418-493A-8ED8-812775ECF341_d0e11778_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-B584CA90-543B-4AED-B134-A3A616259DB9.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-B584CA90-543B-4AED-B134-A3A616259DB9.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,124 @@ + + +JavaScript +console

JavaScript +console

+

All modern desktop browsers provide features to support developers debugging +JavaScript. While the browsers do not directly integrate true debugging support, +they usually support directing JavaScript error messages and logging statements +to either a console display or popup messages. Mozilla Firefox supports this +feature.

+

Consider the following trivial example of a web page with a JavaScript +error. It calls the method document.writex() which does +not exist.

+
<html>
+<body>
+<script language = "JavaScript">
+document.write('Testing1<br/>\n');
+document.writex('Testing2<br>\n');
+</script>
+Test Page
+</body>
+</html>
+
+
    +
  • SETTINGS

  • +
+

Go to Web > Settings > General and select the following option

+

• Java/ECMA Script

+

This option provides you support to enable/disable JavaScript.

+
+
+ + + + + + + + + + +
+

Enable

+
+

Enable JavaScript Console Support

+
+

Disable

+
+

Disable JavaScript Console Support

+
+

• Java/ECMA Script errors

+

This option provides you choices to display and log errors.

+
+
+ + + + + + + + + + + + + + + + + + +
+

No Notification

+
+

Enable JavaScript Console Support

+
+

Create Log file

+
+

It will create log file to the C:\Data folder of SDK

+
+

Show pop-up notes

+
+

It will show pop-up notes on the emulator screen

+
+

Log and pop-up notes

+
+

It will show pop-up notes and create logs to C:\Data folder +of the SDK

+
+
    +
  • ERROR SCENARIO

  • +
+

Try to run the JavaScript example that has an error. Just like an ordinary +browser, it will display error message based on your selected criteria from +the web settings.

+
+
    +
  • HOW TO USE

  • +
+

Below is the functional description of how this feature can be used.

+
    +
  1. An option +for JavaScript console is added to the Browser settings. There are three options +for this setting: Disable, Prompt and Log.

    +
      +
    • When the Disable option is selected, the JavaScript +console for browser / widgets are disabled.

    • +
    • When the Prompt option is selected, JavaScript errors +and exceptions are presented in a popup dialog

    • +
    • When the Log option is selected, JavaScript errors +and exceptions are logged into a text file that is placed in a user accessible +area of the device’s file system. For example, C:\data

      +
    • +
    +
  2. +
  3. JavaScript +console supports console.log for logging messages to the +console

  4. +
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-B7297E44-2CCE-4098-807B-551684CF608E.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-B7297E44-2CCE-4098-807B-551684CF608E.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,283 @@ + + +Media Management Service API example

Media Management Service API example

+

+

This section presents the full source code of a working sample widget +for the Media Management +Service. The widget is programmed to retrieve audio file information. +You can download the wgz package for this widget from +section Example widgets.

+

For general information about creating widgets, see section Widget component files.

+

For widget development and debugging purposes, this example writes its +output to c:\data\jslog_widget.log using console.info. +For instructions on how to enable logging in the Web browser for S60, see +section JavaScript console.

+

Info.plist

+
<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Nokia//DTD PLIST 1.0//EN" "http://www.nokia.com/NOKIA_COM_1/DTDs/plist-1.0.dtd">
+<plist version="1.0">
+<dict>
+  <key>DisplayName</key>
+  <string>MediaManagementSample</string>
+  <key>Identifier</key>
+  <string>com.nokia.widget.sapi.MediaManagementSample</string>
+  <key>Version</key>
+  <string>1.0</string>
+  <key>MainHTML</key>
+  <string>mediamanagement-sample.html</string>
+</dict>
+</plist>
+
+

mediamanagement-sample.html

+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+  <head>
+    <script type="text/javascript" src="js/common.js"></script>
+    <script type="text/javascript" src="js/mediamanagement-sample.js"></script>
+  </head>
+  <body id="docBody" bgcolor="#ddeeff" onload="setup()" style=width:100%;height:100%;>
+    <form name="frm">
+      <h3>MediaManagement API Sample Widget</h3>
+      <input type="button" onclick="getListAsync('img1')" value="GetListAsync"><img id="img1" src="pic/blank.png" width="25" height="25" align="center">
+      <br>
+      <input type="button" onclick="cancelGetListAsync('img2')" value="CancelGetListAsync"><img id="img2" src="pic/blank.png" width="25" height="25" align="center">
+      <hr>
+      <div class="mediaman" id="mediaman" bgcolor="#ddeeff" style=width:100%;height:100%;overflow:auto></div>
+    </form>
+  </body>
+</html>
+
+

common.js

+
// common.js
+//
+// This file contains some utility functions.
+
+// Check the error code and show the information to users
+function checkError(message, resultList, divId, imgId)
+{
+  var errCode = resultList.ErrorCode;
+  var msg = "";
+
+  if (errCode) {
+    msg = message + "<BR>" + "Failed Error: " + errCode + "<BR>";
+    if(resultList.ErrorMessage != undefined)
+      msg += "Error Message: " + resultList.ErrorMessage;
+    showIMG(imgId,"no");
+  } else {
+    showIMG(imgId,"yes");
+  }
+
+  //print error message
+  if(divId != null && divId != undefined)
+    document.getElementById(divId).innerHTML = msg;
+  console.info(msg);
+
+  return errCode;
+}
+
+// Build the message by reading a iteratorable list in a recursive manner
+function showIterableList(iterator)
+{
+  var msg = "";
+  try
+  {
+    iterator.reset();
+    var item;
+    while (( item = iterator.getNext()) != undefined ){
+      msg += showObject(item);
+    }
+  }
+  catch(e)
+  {
+    alert('<showIterableList> ' + e);
+  }
+  return msg;
+}
+
+// Build the message by reading a JS object in a recursive manner
+function showObject(obj)
+{
+  var txt = "";
+  try {
+    if ( typeof obj != 'object' )
+      return "" + obj + '<BR/>';
+    else {
+      for(var key in obj) {
+        txt +=  key + ":";
+        txt += showObject( obj[key] );
+        txt += '<BR/>';
+      }
+      txt += '<BR/>';
+    }
+  }
+  catch (e)
+  {
+    alert("showObject: " + e);
+  }
+  return txt;
+}
+
+// Show the image to indicate the test result
+function showIMG(imgId, isOK)
+{
+  if(imgId == null || imgId == undefined)
+    return;
+
+  if(isOK == "yes")
+    document.getElementById(imgId).src = "pic/yes.png";
+  else if(isOK == "no")
+    document.getElementById(imgId).src = "pic/no.png";
+  else
+    document.getElementById(imgId).src = "pic/blank.png";
+}
+
+// Show elements in object by using 'alert'
+function testObject(obj)
+{
+  var msg = "";
+  for(var key in obj) {
+    msg = msg + ":" + key + "=" + obj[key];
+  }
+  alert(msg);
+}
+
+// Test whether the input is numeric
+function IsNumeric(sText)
+{
+  var ValidChars = "0123456789.";
+  var IsNumber=true;
+  var Char;
+
+  for (i = 0; i < sText.length && IsNumber == true; i++)
+  {
+    Char = sText.charAt(i);
+    if (ValidChars.indexOf(Char) == -1)
+    {
+      IsNumber = false;
+    }
+  }
+  return IsNumber; 
+}
+
+

mediamanagement-sample.js

+
// mediamanagement-sample.js
+//
+// In this sample the media objects and meta-data from the S60 Media
+// Gallery will be listed; Also, async operation will be canceled.
+//
+//SAPI Error Codes
+// 0    - Success
+// 1000 - InvalidServiceArgument
+// 1001 - UnknownArgumentName
+// 1002 - BadArgumentType
+// 1003 - MissingArgument
+// 1004 - ServiceNotSupported
+// 1005 - ServiceInUse
+// 1006 - ServiceNotReady
+// 1007 - NoMemory
+// 1008 - HardwareNotAvailable
+// 1009 - ServerBusy
+// 1010 - EntryExists
+// 1011 - AccessDenied
+// 1012 - NotFound
+// 1013 - UnknownFormat
+// 1014 - GeneralError
+// 1015 - CancelSuccess
+// 1016 - ServiceTimedOut
+// 1017 - PathNotFound
+
+
+// Declare the service object
+var so;
+
+// imgid for callback1 function
+var imgid_callback1;
+
+// id of the div used to display information
+const DIV_ID = 'mediaman';
+
+
+// Called from onload()
+function setup()
+{
+  try {
+    so = device.getServiceObject("Service.MediaManagement", "IDataSource");
+    console.info("setup: so: %s", so);
+  }
+  catch(e) {
+    alert('<setup> ' +e);
+  }
+}
+
+// Get List Async
+// This method retrieves a list of media objects and meta-data from the S60 Media Gallery.
+// In order to test this method make sure that there are media objects in the media Gallery. 
+function getListAsync(imgId)
+{
+  // Setup input params using dot syntax
+  var criteria = new Object();
+  criteria.Type = 'FileInfo';
+  criteria.Filter = new Object();
+  criteria.Filter.FileType = 'Sound';
+  criteria.Sort = new Object();
+  criteria.Sort.Key = 'FileSize';
+
+  // set the image id for callback function
+  imgid_callback1 = imgId;
+
+  try {
+    // Media Management supports asynchronous call
+    var result = so.IDataSource.GetList(criteria, callback);
+    if(!checkError("IDataSource::getListAsync",result,DIV_ID,imgId))
+      showIMG(imgId,"");
+  }
+  catch (e) {
+    showIMG(imgId,"no");
+    alert ("getListAsync: " + e);
+  }
+}
+
+// This method cancels outstanding asynchronous request.
+function cancelGetListAsync(imgId)
+{
+  // Setup input params using dot syntax
+  var criteria = new Object();
+  criteria.Type = 'FileInfo';
+  criteria.Filter = new Object();
+  criteria.Filter.FileType = 'Sound';
+  criteria.Sort = new Object();
+  criteria.Sort.Key = 'FileSize';
+
+  // set the image id for callback function
+  imgid_callback1 = imgId;
+
+  try {
+    // Media Management supports asynchronous call
+    var result = so.IDataSource.GetList(criteria, callback);
+    if(!checkError("IDataSource::cancelGetListAsync",result,DIV_ID,imgId)){
+      showIMG(imgId,"");
+      var criteria2 = new Object(); 
+      criteria2.TransactionID = result.TransactionID;
+      var cresult = so.IDataSource.Cancel(criteria2);
+      checkError("IDataSource::cancelGetListAsync",cresult,DIV_ID,imgId);
+    }
+  }
+  catch (e) {
+    showIMG(imgId,"no");
+    alert ("cancelGetListAsync: " + e);
+  }
+}
+
+// This is the asynchronous callback handler
+function callback(transId, eventCode, result)
+{
+  console.info("callback: transId: %d  eventCode: %d result.ErrorCode: %d", transId, eventCode, result.ErrorCode);
+  if(!checkError("IDataSource::getListAsync",result,DIV_ID,imgid_callback1)) {
+    document.getElementById(DIV_ID).innerHTML = showIterableList(result.ReturnValue);
+  }
+}
+
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-B74565A3-C981-4377-99F0-FAD87B9E516D.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-B74565A3-C981-4377-99F0-FAD87B9E516D.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,15 @@ + + +Designing for small screens

Designing for small screens

The screen size of mobile devices is significantly smaller than that available on desktop devices. When creating your widget, you should carefully consider what is the most relevant content to present on the UI. It is not reasonable to try and fit all the content on a Web page to a device screen. Moreover, the screen size varies between different mobile devices.

+

For a discussion of the design principles, see Using the small screen effectively.

+

Determining the screen size and resolution

S60 devices can have one or more displays. Some S60 devices support specialized cover screens used only by special features and applications built into the device. Other devices support primary and secondary displays.

The following are examples of display sizes on S60 devices that support Web Runtime (WRT):
    +
  • 240 x 320 pixels portrait

  • +
  • 320 x 240 pixels landscape

  • +
  • 360 x 640 pixels portrait

  • +
  • 640 x 360 pixels landscape

  • +
  • 800 x 352 pixels landscape (Nokia E90)

  • +

Expect future S60 devices to support larger screen resolution.

To find out the screen sizes of your target devices, see Device Specifications. You can filter the devices by platform, device model, or screen size.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-B77C2006-879F-4AC6-B7BF-04B25B563A29.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-B77C2006-879F-4AC6-B7BF-04B25B563A29.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,41 @@ + + +JavaScript Sensor +Service API

JavaScript Sensor +Service API

+

The Sensor Service API +is supported since WRT 1.1.

+

The Sensor Service API allows widgets to +access data provided by the physical sensors of a device. The data from a +given sensor is mapped to one or more sensor channels, which the API can listen +to. The available sensors depend on the device. The API is integrated into WRT through +the device object.

+

For an overview of the service and the API, see section Accessing data from the physical sensors of a device.

+

Using the Sensor Service API

+

To use the Sensor Service API, your widget must +first create a service object for it +using the device.getServiceObject() method. +Use Service.Sensor to identify the service provider and ISensor to +identify the supported interface:

+ +
var so = device.getServiceObject("Service.Sensor", "ISensor");
+

This service object can then be used to access the services provided +by the API:

+ +
+

Emulator support

+

The S60 5th Edition SDK emulator support XML based-simulation for a +few sensors.

+
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-B796D072-4E51-4BC7-9259-84530DB3539D.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-B796D072-4E51-4BC7-9259-84530DB3539D.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,156 @@ + + +System +attributes

System +attributes

+

+

System information is represented as system attributes. Each system +attribute consists of an entity and a key. The entity broadly +represents a device component or feature, such as battery or connectivity. +The key is an attribute of the entity. Entities can have multiple keys, with +each entity-key pair representing a single system attribute. For example, +battery strength and charging status are attributes of battery. The system +attributes for these are Battery - BatteryStrength and Battery +- ChargingStatus, respectively (see Table: +Battery system attributes). Each system attribute has a value that +contains data about the attribute. For some system attributes, the value can +be modified.

+

For more information about the supported system attributes, see section Supported system attributes (entities and keys).

+

For more information about the system data types that determine system +attribute values, see section System data types.

+

In JavaScript, +a system attribute is represented as an object, with the entity, key, and +value as properties of that object:

+
+ + + + + + + + + + + + + + + + + + + + + + + +
Table: System attribute +object
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

Entity

+
+

Specifies the entity of the system attribute.

+

Together with Key, this specifies the system attribute.

+
+

string

+
+

For a complete list of supported entities, see section Supported system attributes (entities and keys).

+
+

Key

+
+

Specifies the key of the system attribute. The available keys depend +on the entity.

+

Together with Entity, this specifies the system +attribute.

+
+

string

+
+

For a complete list of supported keys per entity, see the Key column +of the tables in section Supported system attributes (entities and keys).

+
+

<Value>

+
+

Specifies the value of the system attribute.

+

+

The name, type, and content of this property depend on the system attribute +and whether the system attribute object is used as input or output:

+

INPUT

+

If the system attribute object is used as input for a method call, this +property is an object named SystemData. The actual system +attribute value is represented as one or more properties of the SystemData object. +The exact set of properties depends on the specific +system attribute and its system +data type for input.

+

For example: If you input the Battery - BatteryStrength system +attribute, whose input data type is Status, the criteria argument takes the following +properties:

+
    +
  • criteria.Entity

    +
  • +
  • criteria.Key

    +
  • +
  • criteria.SystemData.Status

    +
  • +
+

Here, criteria is the input object representing +the system attribute, SystemData is the object containing +the system attribute value, and Status is the object +property specifying the actual value (as defined by the system data type).

+

Similarly, if you input the Memory - DriveInfo system +attribute, whose input data type is DriveInfo, the criteria argument takes the following +properties:

+
    +
  • criteria.Entity

    +
  • +
  • criteria.Key

    +
  • +
  • criteria.SystemData.Drive

    +
  • +
  • criteria.SystemData.<...> (other +properties associated with DriveInfo)

  • +
+

OUTPUT

+

If the system attribute object is received as output from a method call, +the system attribute value is represented as one or more properties of the ReturnValue object +returned by the call. The exact set of properties depends on the specific +system attribute and its system +data type for output.

+

For example: If the Battery - BatteryStrength system +attribute, whose output data type is Status, is received as output, the ReturnValue object +contains the following properties:

+
    +
  • ReturnValue.Entity

  • +
  • ReturnValue.Key

  • +
  • ReturnValue.Status

  • +
+

Here, ReturnValue is the output object representing +the system attribute, and Status is the object property +specifying the system attribute value (as defined by the system data type).

+

Similarly, if the Memory - DriveInfo system attribute, +whose output data type is DriveInfo, is received as output, the ReturnValue object +contains the following properties:

+
    +
  • ReturnValue.Entity

  • +
  • ReturnValue.Key

  • +
  • ReturnValue.Drive

  • +
  • ReturnValue.TotalSpace

  • +
  • ReturnValue.FreeSpace

  • +
  • ReturnValue.CriticalSpace

  • +
  • ReturnValue.MediaType

  • +
  • ReturnValue.BatteryState

  • +
  • ReturnValue.DriveName

  • +
+
  +

See the Input and Output columns of the tables in section Supported system attributes (entities and keys).

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-B86F1686-F2AC-438F-8306-4B9D70F879EC.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-B86F1686-F2AC-438F-8306-4B9D70F879EC.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,118 @@ + + +Criteria for +importing calendar entries

Criteria for +importing calendar entries

+

The criteria object specifies the calendar +entries to import and optionally the target calendar.

+

The criteria object has two main properties: Type and Data. +These are described in the following table. Properties enclosed in brackets +are optional.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Criteria object properties
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

criteria.Type

+
+

Specifies the type of calendar information to import. This is always "CalendarEntry".

+
+

string

+
+

Possible values:

+
    +
  • "CalendarEntry"

  • +
+
+

criteria.Data

+
+

Specifies the entries to import.

+
+

object

+
+

Object with the properties specified below

+
+

[criteria.Data.CalendarName]

+
+

Specifies the calendar into which the entries are imported.

+

If this property is not specified, the entries are imported into the +default calendar. If the default calendar does not exist, it is created.

+
+

string

+
+

<DriveLetter>:<FileName>

+

For example: "C:Calendar"

+
+

criteria.Data.FileName

+
+

Specifies the full path and file name of the source file from which +the entries are imported.

+
+

string

+
+

The string cannot exceed 239 characters

+

For example: C:\\Data\\importfile.txt

+
+

criteria.Data.Format

+
+

Specifies the data format of the source file. The supported formats +are:

+
    +
  • iCal

  • +
  • vCal

  • +
+

For more information about these two formats, see the Calendar +Service overview page.

+
+

string

+
+

Possible values:

+
    +
  • "ICal"

  • +
  • "VCal"

  • +
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-B8845FF1-D7F6-476A-8651-8B9C12D8789F.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-B8845FF1-D7F6-476A-8651-8B9C12D8789F.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,49 @@ + + +JavaScript Landmarks +Service API

JavaScript Landmarks +Service API

+

The Landmarks +Service API is supported since WRT 1.1.

+

The Landmarks Service API allows widgets to +access and manage information about landmarks and landmark categories. This +information is stored in one or more landmark databases on a device. The API +is integrated into WRT through the device object.

+

For an overview of the service and the API, see section Accessing and managing information about landmarks.

+

Using the Landmarks Service API

+

To use the Landmarks Service API, your widget must +first create a service object for it +using the device.getServiceObject() method. +Use Service.Landmarks to identify the service provider +and IDataSource to identify the supported interface:

+ +
var so = device.getServiceObject("Service.Landmarks", "IDataSource");
+

This service object can then be used to access the services provided +by the API:

+ +
+

Emulator support

+

The S60 5th Edition SDK emulator provides full support for the Landmarks +Service API.

+
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-B8869924-0E95-4543-954E-5A4246922CB4.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-B8869924-0E95-4543-954E-5A4246922CB4.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,81 @@ + + +IDataSource.Organise()

IDataSource.Organise()

+

Description:

+

The Organise method adds landmarks to a landmark +category (association) or removes landmarks from a landmark category (disassociation). +The same landmark can belong to multiple categories or to no category.

+

This is a synchronous method.

+

Syntax:

+ +
result = so.IDataSource.Organise(criteria);
+

Arguments:

+ +

Return value:

+

The Organise method returns an object that contains +an error code and an error message.

+
+ + + + + + + + + + + + + + + +
Table: Return value +properties for Export
+

Property

+
+

Description

+
+

Value

+
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See Landmarks Service API error messages.

+
+

Remarks:

+
    +
  • If no landmark database is specified, Organise is +performed on the default database. If the default database does not exist, +it is created and set active. The default database is file://c:eposlm.ldb.

    +
  • +
  • For more information about landmarks, landmark categories, +and landmark databases, see the Landmarks +Service overview page.

  • +
+

Example code:

+

+

For the complete source of a sample widget +that demonstrates how to use this Service API, see the +full example.

+ + +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-BBA0299B-81B6-4508-8D5B-5627206CBF7B.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-BBA0299B-81B6-4508-8D5B-5627206CBF7B.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,78 @@ + + +Creating the info.plist file

Creating the info.plist file

+

To create the info.plist file of a widget:

+
    +
  1. Create an XML-formatted document that conforms to the Document Type Definition (DTD) defined by Nokia.

    The properties of a widget are defined in the form of key and value pairs, where a key is a predefined term and a value is a configurable string. The format of the info.plist file and the syntax of the key/value pairs are illustrated in the following sample code:

    <?xml version="1.0" encoding="UTF-8"?>
    +<!DOCTYPE plist PUBLIC "-//Nokia//DTD PLIST 1.0//EN" "http://www.nokia.com/NOKIA_COM_1/DTDs/plist-1.0.dtd">
    +<plist version="1.0">
    +<dict>
    +	<key>DisplayName</key>
    +	<string>WidgetName</string>
    +	<key>Identifier</key>
    +	<string>com.company.widget.projectname</string
    +	<key>MainHTML</key>
    +	<string>Main.html</string>
    +	<key>Version</key>
    +	<string>1.0</string>
    +	<key>AllowNetworkAccess</key>
    +	<false/>
    +	<key>MiniViewEnabled</key>
    +	<true/>
    +</dict>
    +</plist>

    The easiest way to create the info.plist file is to copy from a template that already contains all supported keys and then modify each key accordingly.

  2. +
  3. Save the XML document under the widget project root folder with the name info.plist.

  4. +
+

The following table lists the properties supported in the Web Runtime environment.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Property name

Type

Use

Description

DisplayName

String

Mandatory

The name of the widget to be displayed in the application menu.

Identifier

String

Mandatory

A unique string identifier for the widget. The identifier should specify the company’s reverse domain format, for example.

MainHTML

String

Mandatory

The name of the main HTML file to be loaded when the widget starts running.

Version

String

Optional

The release version of the widget.

Widgets support updates where a new version of a widget is provided on the Web and installed on top of the previous widget version on a mobile device. For more information on creating self-updating widgets, see Managing widgets on mobile devices.

AllowNetworkAccess

Boolean

Optional

Access right to network-based resources or data. If the value is true, access is granted. If the value is false, the widget cannot access the network.

MiniViewEnabled

Boolean

Optional

Enables a widget for the home screen on compatible devices, such as the Nokia N97. If the device does not support home screen widgets, this parameter is ignored and the widget operates normally in full screen mode.

\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-BDBE85E0-2A33-4AE9-92F6-85E1861256F0.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-BDBE85E0-2A33-4AE9-92F6-85E1861256F0.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,25 @@ + + +Runtime +Security Manager

Runtime +Security Manager

This section provides information about an access policy used by the +Runtime Security Manager (security manager) to control access to platform +services for Web Runtime version 1.1 (WRT 1.1) widgets. The security manager +uses this policy to determine whether a widget has access to a platform service +and then prompts the mobile device user accordingly.

The mobile device manufacturer determines the access policy for all +WRT 1.1 widgets launched on that mobile device - it is not customizable by +the widget developer or the mobile device user. WRT 1.1 provides a default +access policy that mobile devices can use if they do not define their own. + This section also provides information about the WRT 1.1 default access policy. + It is not common for mobile devices to customize the default policy but you +should verify this if you are interested in creating a widget for a particular +device. For information on a particular mobile device, see the Device +Specifications page at Forum Nokia.

The widget security lifecycle for WRT 1.1 is as follows:

  • WRT 1.1 files an access policy with the security manager. +For more information on the access policy, see section Runtime Security Manager access policy.

  • The security manager registers a widget when it is installed.

  • WRT 1.1 starts a session with the security manager each time +that it attempts to access a new platform service (by creating a new service +object).

  • During a session, the security manager performs runtime access +control to platform services (prompts the user) according to the access policy +filed for the mobile device.

  • The security manager unregisters a widget when it is uninstalled.

\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-BE6DC1F8-A847-49B5-A3BF-318D0D1E9D8A.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-BE6DC1F8-A847-49B5-A3BF-318D0D1E9D8A.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,27 @@ + + +setDimmed()

setDimmed()

+

Description:

+

Call the setDimmed method to show or hide an existing +menu item. By default, a menu item is shown when it is appended to the options +menu.

+

For more general information on constructing an options menu, see Using softkeys.

+

Syntax:

+
[void] MenuItem.setDimmed(Boolean flag) 
+

Arguments:

+
    +
  • flag:

    + +

    true to hide the menu item, and false to +show the menu item.

    + +
  • +
+

Return value:

+

This method does not return a value.

+

Example code:

+

See the example code in the description of the MenuItem.onSelect property.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-BE6FB5B3-020A-44F3-A4AC-DFD0FEA42B7A.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-BE6FB5B3-020A-44F3-A4AC-DFD0FEA42B7A.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,94 @@ + + +IMessaging.Delete()

IMessaging.Delete()

+

Description:

+

The Delete method deletes a message.

+

This is a synchronous method.

+

Syntax:

+
result = so.IMessaging.Delete(criteria);
+ +

Arguments:

+
    +
  • criteria:

    + +

    This is an object that specifies the message to delete. The following +table describes the properties of this object.

    +

    + +

  • +
+
+ + + + + + + + + + + +
Table: Criteria object properties
+

Property

+
+

Description

+
+

Type

+
+

criteria.MessageId

+
+

Specifies the unique ID of the message to delete.

+
+

number

+
+

Return value:

+

The Delete method returns an object that contains +an error code and an error message.

+
+ + + + + + + + + + + + + + + + +
Table: Return value +properties for Delete
+

Property

+
+

Description

+
+

Value

+
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See Messaging Service API error messages.

+
+

Example code:

+

+

For the complete source of a sample widget +that demonstrates how to use this Service API, see the full example.

+ + +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-BF044B8D-C16A-47DC-84F3-9103D9DCE09B.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-BF044B8D-C16A-47DC-84F3-9103D9DCE09B.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,69 @@ + + +ISysInfo.Cancel()

ISysInfo.Cancel()

+

Description:

+

The Cancel method cancels an ongoing asynchronous +call made with a SystemInfo Service API method.

+

This is a synchronous method.

+

Syntax:

+
result = so.ISysInfo.Cancel(criteria);
+

Arguments:

+
    +
  • criteria:

    + +

    This is an object with the TransactionID property +(number). criteria.TransactionID specifies the transaction +ID of the asynchronous call to cancel. The transaction ID is the result.TransactionID value +that was returned as part of the result of the initial call.

    + +
  • +
+

Return value:

+

The Cancel method returns an object that contains +an error code and an error message.

+
+ + + + + + + + + + + + + + + + +
Table: Return value +properties for Cancel
+

Property

+
+

Description

+
+

Value

+
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See SystemInfo Service API error messages.

+
+

Example code:

+

+

For the complete source of a sample widget that demonstrates how to +use this Service API, see the +full example.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-BFE9DD29-269F-42E3-B151-B816C99082E4-master.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-BFE9DD29-269F-42E3-B151-B816C99082E4-master.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-BFE9DD29-269F-42E3-B151-B816C99082E4_d0e11100_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-BFE9DD29-269F-42E3-B151-B816C99082E4_d0e11100_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-BFE9DD29-269F-42E3-B151-B816C99082E4_d0e11448_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-BFE9DD29-269F-42E3-B151-B816C99082E4_d0e11448_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-C0ADE739-7F72-4D1D-85FC-631983AAE6D5.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-C0ADE739-7F72-4D1D-85FC-631983AAE6D5.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,119 @@ + + +networkregistrationstatus

networkregistrationstatus

+

Syntax:

+
[int] sysinfo.networkregistrationstatus;
+

Description:

+

The networkregistrationstatus property is an integer indicating the current network registration status.

+

The returned value can be one of the statuses listed in the following table.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Values returned by networkregistrationstatus
+

Value

+
+

Description

+
+

0

+
+

Registration status is unknown.

+
+

1

+
+

Not registered. The mobile device cannot detect any other networks and is not currently searching a new operator to register to.

+
+

2

+
+

Not registered. The mobile device can detect other networks on which it is possible to make emergency calls only.

+
+

3

+
+

Not registered, but the mobile device is currently searching for a new operator to register to.

+
+

4

+
+

Registered, network busy.

+
+

5

+
+

Registered on home network.

+
+

6

+
+

Registration denied.

+
+

7

+
+

Registered on visited network (roaming).

+
+

For more information on network connection related aspects that you should take into account in your widget, see Dealing with network issues.

+

Example code:

+
window.onload = function(){
+  // Detect the current status
+  networkRegEventHandler();
+}
+networkRegEventHandler() {
+  var textInfo = null;
+  var networkName = "";
+  var status = sysinfo.networkregistrationstatus;
+  switch (status) {
+     case 0:
+     case 1:
+     case 2:
+     case 3:
+     case 4:
+     case 6:
+         textInfo = "Network registration failed!";
+         break;
+     case 5:
+         networkName = sysinfo.networkname;
+         textInfo ="Registered on home network named );
+         break;
+     case 7:
+         networkName = sysinfo.networkname;
+         textInfo ="Registered on foreign network named );
+         break;
+     default:
+         break;
+  }
+  alert(textInfo + networkname);
+}
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-C12C81D1-13A4-4B8C-81B9-694D414A4A48.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-C12C81D1-13A4-4B8C-81B9-694D414A4A48.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,85 @@ + + +IMessaging.GetList()

IMessaging.GetList()

+

Description:

+

The GetList method retrieves a list of messaging +objects from the Messaging Center of the S60 device. Each object contains +messaging information, that is, header and content data for a single message.

+

This is a synchronous method.

+

Syntax:

+
result = so.IMessaging.GetList(criteria);
+ +

Arguments:

+
    +
  • criteria:

    + +

    This is an object that specifies what messaging information is returned +and how the returned information is sorted. For more information about the +object properties and how to define them, see section Criteria for retrieving messaging information.

    + +
  • +
+

Return value:

+

The GetList method returns an object that contains +the requested messaging information, an error code, and an error message.

+
+ + + + + + + + + + + + + + + + + + + + + +
Table: Return value +properties for GetList
+

Property

+
+

Description

+
+

Value

+
+

result.ReturnValue

+
+

This is an iterator that contains the requested messaging information.

+
+

See Returned messaging information.

+
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See Messaging Service API error messages.

+
+

Remarks:

+

To access information about individual messages, iterate through the +list of objects contained in result.ReturnValue.

+

Example code:

+

+

For the complete source of a sample widget +that demonstrates how to use this Service API, see the full example.

+ + +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-C158B834-9FF8-47C1-B2B5-BA154EBFA8BC.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-C158B834-9FF8-47C1-B2B5-BA154EBFA8BC.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,14 @@ + + +Dealing with network issues

Dealing with network issues

+

Mobile networks are constantly evolving and providing faster data connection speeds between the device and the network. The faster the connection, the less time it takes to transfer Web content. Third generation (3G) networks deliver the speed for browsing the Web smoothly, and the latest advancements (HSDPA, or High-Speed Downlink Packet Access) bring the bandwidth of a fixed Internet connection to the mobile. The data pricing models are changing toward flat-rate data plans for unlimited data transfer. In addition, more and more devices support WLAN and public Wi-Fi hotspots.

+

Even with these improvements, you should consider the following issues:

+
    +
  • Network connection costs

    If users do not have a flat-rate data plan or WLAN support, mobile network connections cost them money. Keep the user informed when establishing connections from your widget, for example, by displaying pop-up views on the screen. Allow users to turn off the pop-up views.

  • +
  • Network connection breaks

    Mobile devices are constantly moving, which causes changes in the network availability. Data connections may suddenly be lost for a shorter or longer period; for example, due to bad radio coverage.

  • +
+

You can use network information services to check the network signal strength, name, and registration status. For more information, see Network information services.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-C1F8A945-7C9C-4E3B-8F54-B9AFC502482A.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-C1F8A945-7C9C-4E3B-8F54-B9AFC502482A.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,11 @@ + + +vibramaxduration

vibramaxduration

+

Syntax:

+
[int] sysinfo.vibramaxduration
+

Description:

+

This is a read-only property that returns a constant value determining the maximum allowed time duration of vibration.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-C247B2C6-F997-42A7-AC7D-7D24F1F77A57_d0e9807_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-C247B2C6-F997-42A7-AC7D-7D24F1F77A57_d0e9807_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-C2731B38-6294-419C-B7E2-AFB918F508D4.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-C2731B38-6294-419C-B7E2-AFB918F508D4.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,83 @@ + + +ISensor.GetChannelProperty()

ISensor.GetChannelProperty()

+

Description:

+

The GetChannelProperty method retrieves information +about a sensor channel property.

+

This is a synchronous method.

+

Syntax:

+ +
result = so.ISensor.GetChannelProperty(criteria);
+

Arguments:

+ +

Return value:

+

The GetChannelProperty method returns an object +that contains the requested channel property information, an error code, and +an error message.

+
+ + + + + + + + + + + + + + + + + + + + +
Table: Return value +properties for GetChannelProperty
+

Property

+
+

Description

+
+

Value

+
+

result.ReturnValue

+
+

This is an object that contains the information for the specified sensor +channel property.

+
+

See Returned channel property information.

+
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See Sensor Service API error messages.

+
+

Example code:

+

+

For the complete source of a sample widget +that demonstrates how to use this Service API, see the +full example.

+ + +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-C294F32D-CAC7-499C-AD4B-701B9AB57ACA.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-C294F32D-CAC7-499C-AD4B-701B9AB57ACA.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,37 @@ + + +Creating the widget HTML file

Creating the widget HTML file

Separate the structure, content, layout, and functionality of a widget into different files. The HTML file defines the structure of the widget UI. Use external style sheets and JavaScript code files for controlling the layout of your widget and for implementing the operations and logic.

+

To create the main HTML file of a widget:

+
    +
  1. Create a standard HTML document for defining the structure of the widget.

    It is recommended that the HTML document follow the HTML 4.01 specifications and the strict DTD.

    Add references to the external style sheets and JavaScript code files that controlling the layout of the widget and implement the operations and logic through the <style> and <script> elements in the head of the HTML document. For more information on creating these files, see sections Creating a CSS file and Creating a JavaScript file.

    The body of the HTML document defines the structure of the widget UI. The following sample code illustrates an HTML file of a widget that has two views and that uses external style sheets and JavaScript files. The views are defined using the <div> tag and id attribute.

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    +<html>
    + <head>
    +  <style type="text/css">
    +			@import "horoscope.css";
    +  </style>
    +  <script type="text/javascript" src="horoscope.js" />
    + </head>
    + <body id="body">
    +    <div id="mainView">
    +			<h2>Chinese Horoscope</h2>
    +			<label for="byear">Enter your birth year:</label>
    +			<input type="text" id="byear" size="4" style='-wap-input-format: "4N"' />
    +			<input type="button" name="calc" value="Tell me"
    +                               onClick="showResult();">
    +			</input>
    +    </div>
    +    <div id="resultView">
    +			<p id="output" class="output"></>P
    +			<img id="character" src="" />
    +			<img id="sign" src="" />
    +    </div>
    + </body>
    +</html>

    For more information on HTML, see the World Wide Web Consortium (W3C) pages.

  2. +
  3. Save the HTML file under the widget project root folder with the name <Widget name>.html.

  4. +
  5. Remember to define the HTML file as the value of the MainHTML property in the widget info.plist file.

  6. +
+

During the runtime of a widget, the main HTML document must not be replaced by any other HTML document. In other words, after the main HTML document of a widget is loaded, widget contents can only be displayed within the main HTML context. If a widget needs to load an extra HTML page, it must do this using the Web Browser for S60 application in a stand-alone mode. For more information on loading HTML pages, see the openURL() method in the Web Runtime API reference.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-C2E995C2-535C-41A2-B69D-D36009BBE8C4.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-C2E995C2-535C-41A2-B69D-D36009BBE8C4.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,88 @@ + + +IDataSource.GetList()

IDataSource.GetList()

+

Description:

+

The GetList method retrieves a list of available +calendars or calendar entries. Calendar entries are retrieved from the specified +calendar or, if no calendar is specified, from the default one.

+

This is a synchronous method.

+

Syntax:

+
result = so.IDataSource.GetList(criteria);
+ +

Arguments:

+
    +
  • criteria:

    + +

    This is an object that specifies what calendar information is returned. +For more information about the object properties and how to define them, see +section Criteria for retrieving calendar information.

    + +
  • +
+

Return value:

+

The GetList method returns an object that contains +the requested calendar information, an error code, and an error message.

+
+ + + + + + + + + + + + + + + + + + + + + +
Table: Return value +properties for GetList
+

Property

+
+

Description

+
+

Value

+
+

result.ReturnValue

+
+

This is an iterator that contains the requested calendar information.

+
+

See Returned calendar information.

+
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See Calendar Service API error messages.

+
+

Remarks:

+
    +
  • If entries are retrieved from a calendar other than the default +one, the corresponding calendar file must exist on the device.

  • +
  • For detailed information about calendar entries, see section Calendar entries.

  • +
+

Example code:

+

+

For the complete source of a sample widget +that demonstrates how to use this Service API, see the full example.

+ + +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-C359CC7E-B8BA-491B-A0C4-0FF1D3C4110C.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-C359CC7E-B8BA-491B-A0C4-0FF1D3C4110C.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,14 @@ + + +Moving within widgets

Moving within widgets

Design intuitive ways for moving between screens and items within a widget. Mobile devices lack a mouse and full-size keyboard, so users must use the five way navigation pad or the touch screen to move within widgets. In addition, many users control the devices with one hand. To create an optimized web experience, allow users to access information with one click; do not make them scroll and type.

+

The following sections describe how to move within widgets:

+ +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-C3AAF370-D049-475B-9D21-3CFC5C83052F.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-C3AAF370-D049-475B-9D21-3CFC5C83052F.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,33 @@ + + +onchargerconnected

onchargerconnected

+

Syntax:

+
sysinfo.onchargerconnected = "chargerConnectedEventHandler()";
+function chargerConnectedEventHandler()
+{
+  // ...
+}
+

Description:

+

The onchargerconnected property is an event handler for the event of when the charger is plugged to or unplugged from the device.

+

Since the event is fired off much faster than the value is updated, it is recommended to read the value after a small delay. See example code for illustration.

+

For more general information on power consumption and widgets, see Saving battery time.

+

Example code:

+
window.onload = function(){
+  // Assign an even handler for the charger 
+  sysinfo.onchargerconnected = "chargerConnectedEvent()";
+}
+function chargerConnectedEvent()
+{
+   setTimeout("readValue();", 500);
+}
+function readValue()
+{
+   if (sysinfo.chargerconnected)
+      alert("Charger is connected");
+   else
+      alert("Charger is not connected");
+}
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-C442113C-5FBE-493E-AD5A-CF0A0FB3C5FD.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-C442113C-5FBE-493E-AD5A-CF0A0FB3C5FD.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,51 @@ + + +Localizing widget display text

Localizing widget display text

Widget display text can be localized at run time to match with the current system language.

+

To localize widget display text

    +
  1. Predefine the display text strings in separate JavaScript files that you create for each supported language.

    The name of the JavaScript file is arbitrary, but the name must be identical for all the supported languages so that you need to specify the name only once in the main HTML document.

  2. +
  3. In the JavaScript files, use arrays for holding the localized text strings.

    The name and structure of the array are arbitrarily implemented but they must be identical for all languages (except for the localized text strings). For an example of creating the array, see Localizing STEW.

  4. +
  5. Store the JavaScript files into the appropriate language project directories.

  6. +
  7. Provide a JavaScript file for default text strings (for example, in English) and store it in the root directory of the widget.

    The default text strings are used in case the current system language does not match with any provided local language. The name of the default text strings file must be identical to the name of the localized text strings files.

  8. +
+

Example

The following pieces of code provide an example of localizing display text to English and Finnish:

Specified in the main HTML document:

<script type="text/javascript" src="localizedTextStrings.js" />

Implemented in a localizedTextStrings.js JavaScript file:

English version for the English language directory en.lproj:

  var localizedMenu = new Array();
+  localizedMenu['setting'] = "Settings";
+  localizedMenu['open'] = "Open";
+  localizedMenu['close'] = "Close";
+   
+  var localizedInfo = new Array();
+  localizedInfo['congrat'] = "Congratulations!";
+

Finnish version for the Finnish language directory fi.lproj:

  var localizedMenu = new Array();
+  localizedMenu['setting'] = "Asetukset";
+  localizedMenu['open'] = "Avaa";
+  localizedMenu['close'] = "Sulje";
+
+  var localizedInfo = new Array();
+  localizedInfo[0] = "Onneksi olkoon!";
+

Default version in English to be stored in the widget root directory:

  var localizedMenu = new Array();
+  localizedMenu['setting'] = "Settings";
+  localizedMenu['open'] = "Open";
+  localizedMenu['close'] = "Close";
+   
+  var localizedInfo = new Array();
+  localizedInfo['congrat'] = "Congratulations!";
+

Defined in the JavaScript file that implements the logic of the widget:

function init() {
+  var settingMenuItem = new MenuItem(loadLocalizedMenu("setting"), 10);
+  var openMenuItem = new MenuItem(loadLocalizedMenu("open"), 11);
+  var playMenuItem = new MenuItem(loadLocalizedMenu("close"), 12);
+  ...
+	 displayInfo(0);
+}
+function displayInfo(index) {
+  alert(localizedInfo[index]);
+}
+function loadLocalizedMenu(index) {
+  if (localizedMenu[index])
+    return localizedMenu[index];
+  else 
+    return "not found";
+}
+
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-C4B403C9-FA4D-47E2-821B-53FE7ACC33E3.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-C4B403C9-FA4D-47E2-821B-53FE7ACC33E3.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,93 @@ + + +Creating HTML controls

Creating HTML controls

+

You can use the following standard HTML controls:

+
    +
  • Push buttons—Perform functions as specified by JavaScript that you associate with the button onclick event.

  • +
  • Check boxes—Allow users to select options by turning them on and off.

  • +
  • Radio buttons—Allow users to select options by turning them on and off. Only one radio button can be turned on at a time.

  • +
  • Menus—Offer users options to choose from.

  • +
  • Text fields—Allow users to input text. For more information, see Handling text input.

  • +
  • Hidden controls—Allow you to submit values with a form and to store information between client/server exchanges that would otherwise be lost because HTTP connections are stateless.

  • +
  • Object controls—Allow you to submit associated values with other controls.

  • +
+

The HTML elements are mapped to standard S60 components on mobile devices. You can use a cascading style sheet (CSS) to define the appearance of the controls.

+

To use HTML controls

    +
  1. Use the HTML input element to create screen controls, such as text fields, check boxes, and buttons.

    <div class="login_container">
    +	<table cellspacing="0">
    +		<tr>
    +			<th>Login</th>
    +		</tr>
    +		<tr>
    +			<td>Please login using you Twitter credentials...</td>
    +		</tr>
    +		<tr>
    +			<td class="table_subtitle">Username</td>
    +		</tr>
    +		<tr>
    +			<td class="input_container">
    +				<input id="login_username" type="text">
    +			</td>
    +		</tr>
    +		<tr>
    +			<td class="table_subtitle">Password</td>
    +		</tr>
    +		<tr>
    +			<td class="input_container">
    +				<input id="login_password" type="password">
    +			</td>
    +		</tr>
    +		<tr>
    +			<td>
    +				<input id="login_remember_me" type="checkbox"><label for="login_remember_me">Remember Me</label>
    +			</td>
    +		</tr>
    +		<tr>
    +			<td class="button_container"><a id="login_button" href="#" class="button">Login</a></td>
    +		</tr>
    +	</table>
    +</div>

    Figure: STEW Login view

  2. +
  3. Create JavaScript to implement the functionality of the controls:

    function LoginScreen() {
    +	// Get the login button element and assign an 'onclick' event to it.
    +	var self = this;
    +	var loginButton = document.getElementById( "login_button" );
    +	loginButton.onclick = function() {
    +		 self.onLoginClicked();
    +	};
    +	
    +	// Get all the UI elements that we can interact with.
    +	this.tbUsername = document.getElementById( "login_username" );
    +	this.tbPassword = document.getElementById( "login_password" );
    +	this.cbRememberMe = document.getElementById( "login_remember_me" );
    +}
    +
    +LoginScreen.prototype.onLoginClicked = function() {
    +	var username = this.tbUsername.value;
    +	var password = this.tbPassword.value;
    +	var rememberMe = this.cbRememberMe.checked;
    +			
    +	// Save the data to the storage if the user checked "Remember Me".
    +	widget.setPreferenceForKey( rememberMe.toString(), LoginScreen.KEY_REMEMBER_ME );
    +	// If "Remember Me" is unchecked, the username and password are cleared because
    +	// default values for username and password values are null.
    +	widget.setPreferenceForKey( rememberMe ? username : null, LoginScreen.KEY_USERNAME );
    +	// REMEMBER: Never store passwords uncoded. See encryption algorithms on
    +	// how to encode the password before saving it.
    +	widget.setPreferenceForKey( rememberMe ? password : null, LoginScreen.KEY_PASSWORD );
    +	
    +	// Remember the username and password.
    +	twitterService.setCredentials( username, password );
    +	
    +	// Check which page is the startup page.
    +	var startupPage = widget.preferenceForKey( SettingsScreen.KEY_STARTUP_PAGE );
    +	if ( startupPage == SettingsScreen.SEARCH_PAGE ) {
    +		widgetMenu.activate( Menu.SEARCH_SCREEN );
    +	} else {
    +		widgetMenu.activate( Menu.UPDATE_STATUS_SCREEN );
    +	} 
    +}
  4. +
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-C4C76205-55BD-4DD1-BA08-6A17B9B696C7.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-C4C76205-55BD-4DD1-BA08-6A17B9B696C7.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,89 @@ + + +Runtime Security Manager access policy

Runtime Security Manager access policy

+

The Runtime Security Manager access policy defines:

+
    +
  • A set of capabilities (read user data, writer user data, and so on) that are allowed automatically (user is not prompted) or granted to the mobile device user via prompts. See below for a list of capabilities supported for WRT 1.1.

  • +
  • The duration of access. The durations supported for WRT 1.1 are one time (oneshot) or while the widget is launched (session).

  • +
+

The following capabilities are supported for WRT 1.1:

+
    +
  • ReadUserData—Grants read access to data confidential to the mobile device user. For example, contacts, messages, appointments, and notes.

  • +
  • WriteUserData—Grants write access to data confidential to the mobile device user.

  • +
  • Location—Grants access to mobile device user location information.

  • +
  • NetworkServices—Grants access to remote services without regard to the mobile device location. For example, voice calls and SMS.

  • +
+

The following table lists the capabilities defined for each SAPI by the default WRT 1.1 access policy. All capabilities are granted for the session.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Default capabilities for WRT 1.1 widgets

Javascript Service API

Capability

Application Manager

ReadUserData

Calendar

ReadUserData

WriteUserData

Location

Location

Logging

ReadUserData

WriteUserData

SystemInfo

ReadUserData

Location

Contacts

ReadUserData

WriteUserData

Landmarks

ReadUserData

WriteUserData

Media Management

None

Messaging

ReadUserData

WriteUserData

NetworkServices

+

For example, the security manager may prompt the mobile device user to allow a widget that was created using the Location Service API to access location information. Access persists while the widget is launched. The security manager prompts the user again the next time the widget is launched.

+

Figure: Accessing location information prompt

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-C55C28BD-5CB8-40C0-9F05-6CED51927956-master.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-C55C28BD-5CB8-40C0-9F05-6CED51927956-master.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-C55C28BD-5CB8-40C0-9F05-6CED51927956_d0e11115_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-C55C28BD-5CB8-40C0-9F05-6CED51927956_d0e11115_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-C55C28BD-5CB8-40C0-9F05-6CED51927956_d0e2283_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-C55C28BD-5CB8-40C0-9F05-6CED51927956_d0e2283_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-C55C28BD-5CB8-40C0-9F05-6CED51927956_d0e3801_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-C55C28BD-5CB8-40C0-9F05-6CED51927956_d0e3801_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-C5E6EDA9-DDE8-44E0-99C1-2031514B3072.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-C5E6EDA9-DDE8-44E0-99C1-2031514B3072.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,134 @@ + + +Criteria for +organizing landmarks in a landmark category

Criteria for +organizing landmarks in a landmark category

+

The criteria object specifies which landmarks +to associate or disassociate and with which landmark category.

+

The criteria object has three main properties: Type, Data, +and OperationType. These are described in the following +table.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Criteria object properties
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

criteria.Type

+
+

Specifies the type of landmark information to organize. This is always "Landmark".

+
+

string

+
+

Possible values:

+
    +
  • "Landmark"

  • +
+
+

criteria.Data

+
+

Specifies which landmarks to organize, in which landmark category, and +how (associate or disassociate).

+
+

object

+
+

Object with the properties specified below

+
+

[criteria.Data.DatabaseURI]

+
+

Specifies the URI of the landmark database in which the landmarks are +organized.

+

If this property is not specified, the landmarks are organized in the +default database.

+
+

string

+
+

For example: file://c:landmarks.ldb

+
+

criteria.Data.id

+
+

Specifies the ID of the landmark category to organize. The specified +landmarks are associated or disassociated with this category.

+

Use the GetList method +to retrieve this ID.

+
+

string

+
 
+

criteria.Data.IdList

+
+

Specifies the IDs of the landmarks to organize. These landmarks are +associated or disassociated with the specified category.

+

Use the GetList method +to retrieve these IDs.

+

Note:

    +
  • If any of the specified landmarks does not exist, it is ignored +and the operation is performed on the other landmarks.

  • +
  • If any of the specified landmarks is already associated/disassociated +with the specified category, it is ignored.

  • +
+
+
+

array of strings

+
 
+

criteria.OperationType

+
+

Specifies whether to add the landmarks to the category (associate) or +remove the landmarks from the category (disassociate).

+
+

string

+
+

Possible values:

+
    +
  • "Associate"

  • +
  • "Disassociate"

  • +
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-C5FB6206-2BEB-494F-A1A4-3573E4310EC3_d0e9819_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-C5FB6206-2BEB-494F-A1A4-3573E4310EC3_d0e9819_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-C6AC727B-52DC-4C7B-8689-19E98126346D.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-C6AC727B-52DC-4C7B-8689-19E98126346D.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,61 @@ + + +STEW: adding JavaScript to drive the widget logic

STEW: adding JavaScript to drive the widget logic

In the STEW example, JavaScript files are used to implement widget functionality.

+

Implementing the button menu

Figure: STEW button menu

The logic for the button menu is implemented in the Menu.js file. A click event handler is assigned to each button by calling the document.getElementById function to retrieve the DOM element of each button. An activate function is assigned to the onclick event handler and executed when the handler is triggered. The function takes the ID of the button as a parameter. It is important to call the function in the correct context.

function Menu() {
+	var self = this;	
+
+	// Handle clicks from menu buttons to activate the relevant views. 
+	var updateButton = document.getElementById( "button_update" );
+	updateButton.onclick = function() {
+		 self.activate( Menu.UPDATE_STATUS_SCREEN );
+	};
+	var searchButton = document.getElementById( "button_search" );
+	searchButton.onclick = function() {
+		 self.activate( Menu.SEARCH_SCREEN );
+	};
+	var settingsButton = document.getElementById( "button_settings" );
+	settingsButton.onclick = function() {
+		 self.activate( Menu.SETTINGS_SCREEN );
+	};		
+}
+
+

Implementing title bar buttons

The STEW title bar displays the widget title as well as Logout and Exit buttons.

Figure: STEW title bar

The logic for the title bar buttons is also implemented in the Menu() function:

var logoutButton = document.getElementById( "button_logout" );
+logoutButton.onclick = function() { widgetMenu.activate( Menu.LOGIN_SCREEN ); };
+var exitButton = document.getElementById( "button_exit" );
+exitButton.onclick = function() { window.close(); };
+
+

Changing views

The activate function shows and hides views according to the view ID that it receives as a parameter. Switching from one view to another requires a major screen update, and therefore the WRT widget.prepareForTransition and widget.performTransition methods are used. This prevents screen flicker and adds a fade effect when the views change.

Menu.prototype.activate = function( screenId ) {	
+	widget.prepareForTransition( "fade" ); 
+	
+	Helper.show( "menu_strip", screenId != Menu.LOGIN_SCREEN );		
+
+	// Show the desired screen.
+	Helper.show( Menu.LOGIN_SCREEN, screenId == Menu.LOGIN_SCREEN );
+	Helper.show( Menu.UPDATE_STATUS_SCREEN, screenId == Menu.UPDATE_STATUS_SCREEN );
+	Helper.show( Menu.SEARCH_SCREEN, screenId == Menu.SEARCH_SCREEN );
+	Helper.show( Menu.SETTINGS_SCREEN, screenId == Menu.SETTINGS_SCREEN );
+			
+	// Update the menu strip manually.
+	// Activate the selected button.
+	this._activateButton( screenId );
+	}	
+	
+	// Known issue: Below line doesn't work if the activation comes from widget's submenu.
+	//widget.performTransition();
+	setTimeout ( "widget.performTransition();", 0 );
+}
+

The code above uses a helper function called show to show and hide views. The function is located in the Helper.js file. The function retrieves the DOM element of the ID it accepts as a parameter and assigns or deletes a hidden style to or from it by using the className property.

+

Activating views

The logic behind each view needs to be informed that the view is being activated, so that the functions assigned to views can be performed when the view is shown. For example, reload data from the storage in the Settings view, refresh data in the Update Status view, and so on. Each view implements an onActivated function to receive notification when it is activated.

if ( screenId == Menu.LOGIN_SCREEN ) {
+	loginScreen.onActivated();
+} else if ( screenId == Menu.UPDATE_STATUS_SCREEN ) {
+	updateScreen.onActivated();
+} else if ( screenId == Menu.SEARCH_SCREEN ) {
+	searchScreen.onActivated();
+} else if ( screenId == Menu.SETTINGS_SCREEN ) {
+	settingsScreen.onActivated();
+}
+
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-C7C3B541-8D28-4DC6-9003-ECF57F26C608.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-C7C3B541-8D28-4DC6-9003-ECF57F26C608.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,137 @@ + + +Defining +the callback handler for an asynchronous method

Defining +the callback handler for an asynchronous method

+

The callback handler method is used with an asynchronous method call +to retrieve the information requested by the call. The asynchronous call initiates +the callback handler and then returns a TransactionID. +This ID is used to map the asynchronous call to the correct callback handler +instance and the result information it returns. You can call the result handler +method from within the callback handler.

+

Define a callback handler method for any Service +API method that is called asynchronously. Use the following method +signature:

+ + + +
callback(transId, eventCode, result)
+

The system supplies the expected arguments:

+
+ + + + + + + + + + + + + + + + + + + + + + +
Table: Callback arguments
+

Argument

+
+

Description

+
+

Value

+
+

transId

+
+

This is a number representing the transaction that called the callback +handler.

+

TransactionID was returned as part of the result +of the initial asynchronous call.

+
 
+

eventCode

+
+

This is a number representing the callback return status.

+
+

Value - Description:

+

2 - Event completed

+

4 - Event error

+

9 - Event in progress

+
+

result

+
+

This is an object for holding the callback return value.

+
+

See the following table.

+
+

The callback handler returns an object that contains the requested information, +an error code, and an error message:

+
+ + + + + + + + + + + + + + + + + + + + + +
Table: Callback return +value
+

Property

+
+

Description

+
+

Value

+
+

[result.ReturnValue]

+
+

This contains the information requested by the asynchronous call that +initiated the callback handler.

+

If an asynchronous call does not request any information to be returned, +this property is not included in the callback return value. In this case, +the callback handler only returns ErrorCode and ErrorMessage.

+
+

Depends on the Service +API and the asynchronous method that was called. Not all calls return +this property. See the appropriate method definition.

+
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

Depends on the Service +API and the asynchronous method that was called. See the appropriate +method definition.

+
+

+ + + +

\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-C8571941-AD6E-4FAD-B4A1-35E7BDB99689.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-C8571941-AD6E-4FAD-B4A1-35E7BDB99689.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,204 @@ + + +Returned +messaging information

Returned +messaging information

+

The ReturnValue property returned by GetList is an iterator containing the requested messaging information. Each +item (object) in the iterator corresponds to one message, that is, each item +contains the data and metadata of a specific message.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: ReturnValue properties +for messaging information
+

Property

+
+

Type

+
+

Notes

+
+

<item>.MessageType

+
+

string

+
+

Possible values:

+
    +
  • "SMS"

  • +
  • "MMS"

  • +
  • "unknown"

  • +
+

The Messaging Service only supports SMS and MMS. Other types of messages +are unknown.

+
+

<item>.Sender

+
+

string

+
 
+

<item>.Subject

+
+

string

+
+

Since SMS does not support subject, this property contains the first +few characters of BodyText.

+
+

<item>.Time

+
+

object

+ +
 
+

<item>.Priority

+
+

string

+
+

Possible values:

+
    +
  • "Low"

  • +
  • "Medium"

  • +
  • "High"

  • +
+
+

<item>.Attachment

+
+

boolean

+
 
+

<item>.Unread

+
+

boolean

+
 
+

<item>.MessageId

+
+

number

+
 
+

<item>.BodyText

+
+

string

+
 
+

<item>.To

+
+

array of strings

+
 
+

<item>.Cc

+
+

array of strings

+
 
+

<item>.Bcc

+
+

array of strings

+
 
+

<item>.AttachmentList

+
+

array of objects

+
+

Each object in the array contains the properties specified below.

+

The first attachment is specified in AttachmentList[0].

+
+

<item>.AttachmentList[].FileName

+
+

string

+
+

This property is only valid for MMS. SMS does not support attachments.

+
+

<item>.AttachmentList[].FileHandle

+
+

string

+
 
+

<item>.AttachmentList[].MimeType

+
+

string

+
 
+

<item>.AttachmentList[].FileSize

+
+

number

+
 
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-CA7C3A7B-6733-47E0-9C6F-FBFB0993F034.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-CA7C3A7B-6733-47E0-9C6F-FBFB0993F034.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,110 @@ + + +IDataSource.Export()

IDataSource.Export()

+

Description:

+

The Export method exports a contact from a contacts +database. The information is exported to a vCard file.

+

This method can be called both synchronously and asynchronously.

+

Syntax:

+

For synchronous calls:

+
result = so.IDataSource.Export(criteria);
+ +

For asynchronous calls:

+
result = so.IDataSource.Export(criteria, callback);
+ +

Arguments:

+
    +
  • criteria:

    + +

    This is an object that specifies the contact to export and optionally +the source database. For more information about the object properties and +how to define them, see section Criteria for exporting a contact.

    + +
  • +
  • callback:

    + +

    The callback argument is the name of the method +that is executed when an asynchronous Export call has +results or status information to return. You must define this method separately. +Follow the instructions in section Defining the callback handler for an asynchronous method to +define the callback method.

    +

    This argument is used only with an asynchronous Export call.

    + +
  • +
+

Return value:

+

If synchronous, the Export method returns an object +that contains an error code and an error message.

+

If asynchronous, the method returns an object that contains a transaction +ID for the callback instance, +an error code, and an error message. When the asynchronous call has completed, callback returns +an object that contains an error code and an error message (see Table: Callback return value).

+
+ + + + + + + + + + + + + + + + + + + + + +
Table: Return value +properties for Export
+

Property

+
+

Description

+
+

Value

+
+

result.TransactionID

+
+

This is a number used as an identification to match transactions started +with an asynchronous Export call to one or more calls +it generates to callback.

+

This property is only valid for asynchronous calls.

+
 
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See Contacts Service API error messages.

+
+

Remarks:

+
    +
  • The default contacts database is cntdb://c:contacts.cdb.

    +
  • +
  • SIM card databases only support name and number keys for +vCard.

  • +
+

Example code:

+

+

For the complete source of a sample widget +that demonstrates how to use this Service API, see the +full example.

+ + + + +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-CABB28B8-D2B1-496B-BD7E-34FF496E60B4.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-CABB28B8-D2B1-496B-BD7E-34FF496E60B4.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,45 @@ + + +JavaScript Calendar +Service API

JavaScript Calendar +Service API

+

The Calendar +Service API is supported since WRT 1.1.

+

The Calendar Service API allows widgets to +access, create, and manage calendars and calendar entries stored on a device. +The API is integrated into WRT through the device object.

+

For an overview of the service and the API, see section Accessing and managing calendar information.

+

Using the Calendar Service API

+

To use the Calendar Service API, your widget must +first create a service object for it +using the device.getServiceObject() method. +Use Service.Calendar to identify the service provider +and IDataSource to identify the supported interface:

+ +
var so = device.getServiceObject("Service.Calendar", "IDataSource");
+

This service object can then be used to access the services provided +by the API:

+ +
+

Emulator support

+

The S60 5th Edition SDK emulator provides full support for the Calendar +Service API.

+
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-CB5F7420-B31B-456E-9148-70B15E082951_d0e10330_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-CB5F7420-B31B-456E-9148-70B15E082951_d0e10330_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-CB5F7420-B31B-456E-9148-70B15E082951_d0e10497_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-CB5F7420-B31B-456E-9148-70B15E082951_d0e10497_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-CCA3FA0B-9D75-453A-947C-B3CB2A85C684.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-CCA3FA0B-9D75-453A-947C-B3CB2A85C684.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,47 @@ + + +Deploying widgets

Deploying widgets

+

The following table lists the methods that are supported for deploying widgets on mobile devices:

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Widget deployment methods

Deployment method

Deployment location on the device

Installation method

Transfer via Bluetooth, email or other communication method

Inbox folder of the Messaging application

Using the Messaging application.

Transfer using a USB cable

Phone memory

Using the File Manager (File mgr.) application.

Transfer via a memory card

Memory card

Using the File Manager (File mgr.) application.

Transfer using the Web Browser for S60

 

If the MIME type is specified correctly for the widget package, the installation will be completed automatically. See the instructions below.

+

+

The Web Runtime (WRT) environment includes a component that is able to detect when the user activates a widget for installation. It recognizes the file as a widget based on the file extension and MIME type. Therefore, if you decide to provide widgets on your Web site for download, you need to do the following to enable successful download and installation on mobile devices:

+
    +
  1. Provide a URL to the widget on the Web site.

  2. +
  3. Specify the MIME type of the widget installation package in the HTTP response header. The MIME type must be application/x-nokia-widget.

    The following is an example of how to define the widget MIME type for an Apache server configuration file:

    AddType x-nokia-widget .wgz
  4. +
+

Widgets do not need to be signed (for example, Symbian Signed) before deploying them on a mobile device.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-CCB9E780-C759-45B2-BBC8-7FAE2102C39F.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-CCB9E780-C759-45B2-BBC8-7FAE2102C39F.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,22 @@ + + +Creating touch controls

Creating touch controls

When you design screen controls for touch-enabled devices, make them big enough to select with a finger.

+

Specifying text box size

Specify text box size in a CSS file.

.input_container input {
+	width: 100%;
+	height: 45px;
+	...
+
+}
+
+

Creating touch buttons

Create clickable HTML elements and make them big enough to select with a finger. Add a JavaScript onClick handler to the buttons to make them clickable.

For example, the following code creates two arrow buttons that users can press to change views.

<div id="navigationLeft" class="navigationBar">
+  <img id="arrowLeft" src="gfx/arrow_left.png" alt="Previous day" onclick="navigationArrowClicked('left');" />
+</div>
+
+<div id="navigationRight" class="navigationBar">
+  <img id="arrowRight" src="gfx/arrow_right.png" alt="Next day" onclick="navigationArrowClicked('right');" />
+</div>
+

Figure: Arrow buttons

You can also create custom controls. For more information, see Customizing screen controls.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-CD495D49-E492-4E88-833D-29EF222B097F.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-CD495D49-E492-4E88-833D-29EF222B097F.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,199 @@ + + +Returned +contact information

Returned +contact information

+

The ReturnValue property returned by a synchronous GetList call +and by callback for +an asynchronous GetList call is an iterator containing +the requested contact information. Each item (object) in the iterator corresponds +to one contact, contact group, or contacts database, depending on what +type of contact information was requested:

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: ReturnValue properties +for a contact
+

Property

+
+

Description

+
+

Type

+
+

<item>.id

+
+

Unique identifier of the contact.

+
+

string

+
+

<item>.<key>

+
+

Each key represents one piece of contact information, such as first +name, last name, home phone number, or email address. For each contact, GetList returns +as many keys as has been defined for that contact.

+

For example:

+
    +
  • <item>.FirstName

  • +
  • <item>.LastName

  • +
  • <item>.LandPhoneHome

  • +
  • <item>.EmailHome

  • +
+

For a list of supported keys, see section Supported contact keys.

+
+

object

+
+

<item>.<key>.Label

+
+

Label that describes the key value.

+
+

string

+
+

<item>.<key>.Value

+
+

Value defined for the key.

+
+

string

+
+

[<item>.<key>.Next]

+
+

This is an object that represents an additional value defined for the +key. This object contains the same properties as a key: Label, Value, +and optionally Next, where Next is +an object identical to this one, representing yet another value defined for +the same key.

+

There is no limit to how many nested values a key can contain.

+

For example, an EmailHome key with two values (two +email addresses) has the following property structure:

+
    +
  • <item>.EmailHome

  • +
  • <item>.EmailHome.Label

  • +
  • <item>.EmailHome.Value

  • +
  • <item>.EmailHome.Next

  • +
  • <item>.EmailHome.Next.Label

    +
  • +
  • <item>.EmailHome.Next.Value

    +
  • +
+

The first email address is contained in <item>.EmailHome.Value and +the second one in <item>.EmailHome.Next.Value.

+
+

object

+
+ + + + + + + + + + + + + + + + + + + + + +
Table: ReturnValue +properties for a contact group
+

Property

+
+

Description

+
+

Type

+
+

<item>.id

+
+

Unique identifier of the contact group.

+
+

string

+
+

<item>.GroupLabel

+
+

Name of the group.

+
+

string

+
+

<item>.Contents

+
+

Contains the IDs of the contacts that belong to the group.

+

Contents[0] contains the ID of the first listed +contact.

+
+

array of strings

+
+ + + + + + + + + + + +
Table: ReturnValue +properties for a contacts database
+

Property

+
+

Description

+
+

Type

+
+

<item>.DBUri

+
+

URI of the contacts database.

+
+

string

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-CE03834C-A275-458D-8FD3-086A472C28E2.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-CE03834C-A275-458D-8FD3-086A472C28E2.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,32 @@ + + +remove()

remove()

+

Description:

+

Call the remove method to remove a menu item from +the top level of the options menu list. If the removed menu item has a cascading +submenu in it, the submenu will also be removed.

+

For more general information on using an options menu in your widget, +see Using softkeys.

+

Syntax:

+
[void] window.menu.remove(MenuItem menuItem) 
+

or

+
[void] menu.remove(MenuItem menuItem)
+

Arguments:

+
    +
  • menuItem:

    + +

    This is an instance of the MenuItem object +which is being removed from the top level of the options menu list.

    + +
  • +
+

Return value:

+

This method does not return a value.

+

Remarks:

+

Menu items in a cascading submenu list are removed using the MenuItem object's method. See the description of the MenuItem.remove method.

+

Example code:

+

See the example code in the description of the MenuItem.onSelect property.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-CEE2FF9C-A78E-4B77-A1DF-E02CAECA2499_d0e5613_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-CEE2FF9C-A78E-4B77-A1DF-E02CAECA2499_d0e5613_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-CF55DBA3-2D4C-4FD0-8A06-862E6128F4E7.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-CF55DBA3-2D4C-4FD0-8A06-862E6128F4E7.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,87 @@ + + +Accessing +device logs

Accessing +device logs

+

The Logging Service +API allows widgets to access mobile device logging +events such as call logs, messaging logs, and data logs. You can use the Logging +Service to create widgets that add, read, and delete logging +events. For example, you can create widgets that:

+
    +
  • Automatically delete the records of received calls older +than a specified number of days

  • +
  • Create unique records of calls based on criteria such as +call duration

  • +
  • Provide useful information to mobile device users such as +the number of MB of data sent and received for the day

  • +
+

Accessing the API and supported methods

+

To create a service +object for the Logging Service API, use Service.Logging to +identify the service provider and IDataSource to identify +the supported interface:

+ +
var so = device.getServiceObject("Service.Logging", "IDataSource");
+

The IDataSource interface provides the following +methods:

+
    +
  • Add()

    + +

    Use the Add() method to add an entry to the event +log; for example, to create new types of application-specific log entries.

    + +
  • +
  • GetList()

    + +

    Use the GetList() method to retrieve event details +such as phone number or call duration from the event log.

    + +
  • +
  • Delete()

    + +

    Use the Delete() method to delete an entry from +the event log.

    + +
  • +
  • RequestNotification()

    + +

    Use the RequestNotification() method to request +notification of updates to the event log.

    + +
  • +
  • Cancel()

    + +

    Use the Cancel() method to cancel an ongoing asynchronous +call. This method is valid for any asynchronous call made through the Logging +Service API.

    + +
  • +
+
+

Using the service in a widget

+

To access and manage logs using the Logging Service API:

+
    +
  1. Create a service +object for the API using device.getServiceObject().

    +
  2. +
  3. Define the +tasks you want to perform and choose the correct methods for them.

    +
  4. +
  5. Optionally, +define how you want the results filtered.

  6. +
  7. Define functions +to process the results.

  8. +
  9. Retrieve the +results.

  10. +
  11. Process the +results.

  12. +
+

For the complete source of a sample widget that demonstrates how to +use this service, see the +full example.

+
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-D14E0D5C-2D99-41C8-8857-455409065500.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-D14E0D5C-2D99-41C8-8857-455409065500.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,93 @@ + + +Criteria for +retrieving system attribute information

Criteria for +retrieving system attribute information

+

The criteria object specifies the system attribute about +which to retrieve information.

+

The criteria object has three properties: Entity, Key, +and SystemData. These are described in the following +table. Properties enclosed in brackets are optional.

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
Table: Criteria object properties
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

criteria.Entity

+
+

Specifies the entity of the system attribute.

+

Together with Key, this specifies the system attribute +to retrieve.

+

For more information about entities, see section System attributes.

+
+

string

+
+

For a complete list of supported entities, see section Supported system attributes (entities and keys).

+

For example: "Memory"

+
+

criteria.Key

+
+

Specifies the key of the system attribute. The available keys depend +on the entity.

+

Together with Entity, this specifies the system +attribute to retrieve.

+

For more information about keys, see section System attributes.

+
+

string

+
+

For a complete list of supported keys per entity, see the Key column +of the tables in section Supported system attributes (entities and keys).

+

For example: "DriveInfo"

+
+

[criteria.SystemData]

+
+

Specifies the value of the system attribute.

+

Some system attributes require this property as input for GetInfo. To find out which attributes, see the Input column of the +tables in section Supported system attributes (entities and keys).

+

The SystemData object has one or more properties +that together represent the system attribute value. The exact set of properties +depends on the system attribute (specifically, on the system data type used +for input).

+

For more information about system attribute values, see section Supported system attributes (entities and keys).

+
+

object

+
+

The object properties depend on the system attribute. See the Input column +cell for the appropriate system attribute in section Supported system attributes (entities and keys).

+

For example, the Memory - DriveInfo system attribute +takes DriveInfo information +as input for GetInfo:

+

SystemData.Drive = "C:\\"

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-D19BB894-371A-4D55-A047-3B2F97673F5F.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-D19BB894-371A-4D55-A047-3B2F97673F5F.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,161 @@ + + +IDataSource.Import()

IDataSource.Import()

+

Description:

+

The Import method imports entries into a calendar. +The information must be imported from an iCal or vCal file. For more information +about these two formats, see the Calendar +Service overview page.

+

This method can be called both synchronously and asynchronously.

+

Syntax:

+

For synchronous calls:

+
result = so.IDataSource.Import(criteria);
+ +

For asynchronous calls:

+
result = so.IDataSource.Import(criteria, callback);
+ +

Arguments:

+
    +
  • criteria:

    + +

    This is an object that specifies the calendar entries to import and +optionally the target calendar. For more information about the object properties +and how to define them, see section Criteria for importing calendar entries.

    + +
  • +
  • callback:

    + +

    The callback argument is the name of the method +that is executed when an asynchronous Import call has +results or status information to return. You must define this method separately. +Follow the instructions in section Defining the callback handler for an asynchronous method to +define the callback method.

    +

    This argument is used only with an asynchronous Import call.

    + +
  • +
+

Return value:

+

If synchronous, the Import method returns an object +that contains a list of the imported calendar entries, an error code, and +an error message.

+
+ + + + + + + + + + + + + + + + + + + + + +
Table: Return value +properties for a synchronous Import
+

Property

+
+

Description

+
+

Value

+
+

result.ReturnValue

+
+

This is an iterator that contains an ordered list of objects. The objects +contain the ids (strings) of the entries that were successfully +imported to the calendar. The same id may be repeated +multiple times in case of child entries.

+
 
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See Calendar Service API error messages.

+
+

If asynchronous, the Import method returns an object +that contains a transaction ID for the callback instance, +an error code, and an error message (see the following table). When the asynchronous +call has completed, callback returns an object that contains +a list of the imported calendar entries, an error code, and an error message +(see the preceding table).

+
+ + + + + + + + + + + + + + + + + + + + + +
Table: Return value +properties for an asynchronous Import
+

Property

+
+

Description

+
+

Value

+
+

result.TransactionID

+
+

This is a number used as an identification to match transactions started +with an asynchronous Import call to one or more calls +it generates to callback.

+
 
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See Calendar Service API error messages.

+
+

Remarks:

+
    +
  • If entries are imported to a calendar other than the default +one, the corresponding calendar file must exist on the device.

  • +
  • For detailed information about calendar entries, see section Calendar entries.

  • +
+

Example code:

+

+

For the complete source of a sample widget +that demonstrates how to use this Service API, see the full example.

+ + + + +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-D2BDE786-CB68-4A2E-9EA9-82E53F6506B3.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-D2BDE786-CB68-4A2E-9EA9-82E53F6506B3.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,24 @@ + + +Life +cycle of a home screen widget

Life +cycle of a home screen widget

+

Home screen widgets have the following life cycle on mobile devices:

+
    +
  1. Users download and install a home screen enabled widget on a +compatible device.

  2. +
  3. Users add +the widget to the home screen.

  4. +
  5. Users select the widget +to open it in full screen view and interact with it by making selections, +requesting specific data, specifying settings, and so on.

    Exiting the +full screen widget does not shut it down. The widget is hidden from view and +remains running in the background.

  6. +
  7. Users remove +widgets from the home screen to shut them down and to uninstall them.

  8. +
  9. Users uninstall widgets.

  10. +
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-D4014B08-C48C-48EB-B3A5-1A09FF636B3C.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-D4014B08-C48C-48EB-B3A5-1A09FF636B3C.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,102 @@ + + +IDataSource.RequestNotification()

IDataSource.RequestNotification()

+

Description:

+

The RequestNotification method notifies the client +when entries are created, updated, or deleted in the specified calendar. If +no calendar is specified, the default calendar is used.

+

This is an asynchronous method.

+

Syntax:

+
result = so.IDataSource.RequestNotification(criteria, callback);
+ +

Arguments:

+
    +
  • criteria:

    + +

    This is an object that specifies which calendar and calendar entries +to monitor for changes and when. For more information about the object properties +and how to define them, see section Criteria for change notifications.

    + +
  • +
  • callback:

    + +

    The callback argument is the name of the method +that is executed when RequestNotification has results +or status information to return. You must define this method separately. Follow +the instructions in section Defining the callback handler for an asynchronous method to +define the callback method.

    + +
  • +
+

Return value:

+

The RequestNotification method returns an object +that contains the initial return value for the asynchronous call it started. +The actual notification information is returned by the callback method in the ReturnValue property of its result object. +The returned information is described in section Returned notification information.

+
+ + + + + + + + + + + + + + + + + + + + + +
Table: Return value +properties for RequestNotification
+

Property

+
+

Description

+
+

Value

+
+

result.TransactionID

+
+

This is a number used as an identification to match transactions started +with a RequestNotification call to one or more calls +it generates to callback.

+
 
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See Calendar Service API error messages.

+
+

Remarks:

+
    +
  • RequestNotification returns notifications +until cancelled with Cancel. You can have +multiple RequestNotification calls (instances) pending +or in use at the same time.

  • +
  • The calendar file to be monitored must exist on the device.

    +
  • +
+

Example code:

+

+

For the complete source of a sample widget +that demonstrates how to use this Service API, see the full example.

+ + +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-D498AD58-DF42-4FBA-8767-91FC624873C0.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-D498AD58-DF42-4FBA-8767-91FC624873C0.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,37 @@ + + +append()

append()

+

Description:

+

Call the append method to add a child menu item +to the parent menu item in the options menu list. This results in the creation +of a submenu list in the menu tree. Use this method to create a cascading +submenu when needed.

+

Menu items are shown on the options menu list in the order in which +they are appended.

+

Syntax:

+
[void] MenuItem.append(MenuItem childMenuItem)
+

Arguments:

+
    +
  • childMenuItem:

    + +

    This is an instance of the MenuItem object +which is being added to the parent menu item. See also the menu.append method description for instructions on how to append a menu item +to the top level of the options menu list.

    + +
  • +
+

Return value:

+

This method does not return a value.

+

Remarks:

+

For devices with a small screen, it is not practical to create multi-level +cascading submenus. Thus, a maximum of two-levels is recommended for submenus.

+

Appending a new menu item fails if it tries to create a duplicate menu +item (it either has the same id or the same label as +an existing menu item).

+

For more general information on constructing an options menu, see Using softkeys.

+

Example code:

+

See the example code in the description of the MenuItem.onSelect property.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-D4DD1C07-C851-40C2-8ED5-30173C093E85_d0e3151_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-D4DD1C07-C851-40C2-8ED5-30173C093E85_d0e3151_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-D52E6081-502D-43F8-AED3-66614F5BC741-master.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-D52E6081-502D-43F8-AED3-66614F5BC741-master.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-D52E6081-502D-43F8-AED3-66614F5BC741_d0e10809_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-D52E6081-502D-43F8-AED3-66614F5BC741_d0e10809_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-D52E6081-502D-43F8-AED3-66614F5BC741_d0e11016_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-D52E6081-502D-43F8-AED3-66614F5BC741_d0e11016_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-D52E6081-502D-43F8-AED3-66614F5BC741_d0e11085_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-D52E6081-502D-43F8-AED3-66614F5BC741_d0e11085_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-D54DEFE7-E878-4530-B707-A5388DFE1D9D.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-D54DEFE7-E878-4530-B707-A5388DFE1D9D.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,19 @@ + + +Designing widgets

Designing widgets

Before starting widget development, analyze and define the requirements, scope, and functionality of the widget to ensure efficient functionality and a smooth user experience. Design the widget for a single purpose and analyze how it can best serve its users. Mobile devices have been designed for use when mobile. Keep the characteristics of mobile devices in mind when you create widgets for them.

+

Top 10 usability guidelines for widgets

The following guidelines are discussed in more detail in the topics in this section. They help you design and develop usable widgets for S60 devices with varying characteristics, such as screen size and support for input methods:

    +
  1. Know your users—Find out who will use the widget, what they will use it for, and which mobile devices they have. Then design the widget to fit a specific context of use.

  2. +
  3. Design for small screens—The screen size of mobile devices is significantly smaller than that available on desktop devices. Carefully consider what is the most relevant content to present on the widget UI, as it might not be reasonable to try and fit as much content into the screen as you might have on a Web page.

  4. +
  5. Design for multiple screen sizes—Relate the position and size of each control to the dimensions of the display. This enables the same set of information to be presented on the screen in all resolutions; higher resolution devices just display finer graphics.

  6. +
  7. Design for changing screen orientation—Some S60 devices support screen rotation. On these devices, applications can be displayed in portrait or landscape orientation. Account for orientation and dynamically adjust the display when the screen is rotated.

  8. +
  9. Design intuitive ways of moving within widgets—Mobile devices lack a mouse and full-size keyboard, so users must use the five way navigation pad to move within widgets. In addition, many users control the devices with one hand. To create an optimized web experience, allow users to access information with one click; do not make them scroll and type.

  10. +
  11. Design for limited input methods—To create widgets that fetch meaningful content from Web sites, you need to collect information from users on the task at hand. S60 devices rely on physical keys such as a five way navigation pad, a keypad, keyboard, and set of labeled soft keys for user input. In addition, some S60 devices support stylus and finger touch screen input. Users enter information by using screen controls, such as lists, check boxes, radio buttons, and text fields.

  12. +
  13. Keep response times short—Latency can cause delays in user interaction. If users perceive a widget as being slow, they are likely to get frustrated and stop using it.

  14. +
  15. Save battery time—Mobile devices are not constantly connected to a power source but run on battery power. Optimize power consumption to keep the total consumption at an acceptable level and to prevent users from running out of battery time.

  16. +
  17. Consider network issues —If users do not have a flat-rate data plan or WLAN support, mobile network connections cost them money. Also, when users move around with the devices, the networks available for connections constantly change.

  18. +
  19. Remember the processing limits of the device—The memory available on devices is limited and you should use it carefully. Although all S60 devices have common functionality, each device is individual in terms of both the resources available and extra features. Therefore, you must consider the constraints of all the target devices.

  20. +

For more information about the characteristics of mobile devices, see Device Specifications.

For more information about user experience techniques for S60 devices, see the Design and User Experience Library.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-D581028C-06ED-422D-866E-AE6C93075084.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-D581028C-06ED-422D-866E-AE6C93075084.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,179 @@ + + +Accessing +and managing information about landmarks

Accessing +and managing information about landmarks

+

The Landmarks +Service API allows widgets to access and manage information +about landmarks and landmark categories. This information is stored in one +or more landmark databases on a device. You can use the Landmarks Service +to create widgets that:

+
    +
  • Retrieve information about landmarks, landmark categories, +and landmark databases

  • +
  • Create, edit, and delete landmarks and landmark categories

    +
  • +
  • Import and export landmarks

  • +
  • Organize landmarks into landmark categories

  • +
+

The Landmarks Service involves the following concepts:

+
    +
  • Landmark is defined as a location with a name. The +location of a landmark is expressed as a set of geographical coordinates accompanied +by either coordinate measurement accuracy information or a textual description, +such as an address. A landmark can be used as Point of Interest (POI). Each +landmark has a unique ID that distinguishes it from other landmarks in the +same database. The ID is assigned when the landmark is added to the database.

    + +

    For detailed information about landmark objects, see section Landmark.

    + +
  • +
  • Landmark category groups landmarks according to type +and interest. For example, a category can denote geographical or architectural +interest, or it can relate to a particular type of attraction or activity. +Each category has a unique name and ID that distinguish it from other categories +in the same database. The ID is assigned when the category is added to the +database.

    + +

    Landmark categories are further classified as follows:

    + +
      +
    • Local categories are created by the user for a specific +database. A local category is only valid for landmarks in the same database +for which the category was created.

    • +
    • Global categories exist across all databases and have +unique global IDs associated with them. Global categories are valid for all +landmarks in all databases. Accommodation, Businesses, and Education, for +example, are global categories.

    • +
    + +

    For detailed information about landmark category objects, see section Landmark category.

    + +
  • +
  • Landmark database stores landmarks and landmark categories. +Each database has a unique URI that identifies the database.

    + +

    Landmark databases are further classified as follows:

    + +
      +
    • Local databases reside on the device or on some device +mapped to the device's file system. The default database is file://c:eposlm.ldb. +If the device does not contain the default database, it is created when it +is called for the first time by a service request.

      + +

      The URI of a local landmark database consists of a protocol specifier +and the database location: file://<location>. If no +protocol is specified, file:// is used by default. The +location consists of the drive and the database file name, for example c:landmarks.ldb. +The path to the file cannot be specified. The extension of the database file +name must be ldb.

      + +
    • +
    • Remote databases reside in third-party servers and +are accessed using a specific protocol. Creating or deleting remote databases +results in adding or removing a bookmark on the device, respectively.

      +

      Note: Remote databases and associated operations are not currently supported.

      +
      +
    • +
    + +

    For detailed information about landmark database objects, see section Landmark database.

    + +
  • +
+

Accessing the API and supported methods

+

To create a service +object for the Landmarks Service API, use Service.Landmarks to +identify the service provider and IDataSource to identify +the supported interface:

+ +
var so = device.getServiceObject("Service.Landmarks", "IDataSource");
+ + + +

+

The IDataSource interface provides the following +methods:

+
    +
  • New()

    + +

    Use the New() method to create an empty landmark +or landmark category item. You can use this item as a template.

    + +
  • +
  • GetList()

    + +

    Use the GetList() method to retrieve information +about landmarks, landmark categories, or landmark databases.

    + +
  • +
  • Add()

    + +

    Use the Add() method to add a new landmark or landmark +category to a landmark database. You can also use this method to edit an existing +landmark or landmark category.

    + +
  • +
  • Delete()

    + +

    Use the Delete() method to delete a landmark or +landmark category from a landmark database.

    +

    Note: You cannot delete landmark databases.

    +
    + +
  • +
  • Import()

    + +

    Use the Import() method to import landmarks to +a landmark database.

    + +
  • +
  • Export()

    + +

    Use the Export() method to export landmarks from +a landmark database.

    + +
  • +
  • Organise()

    + +

    Use the Organise() method to add landmarks to a +landmark category or to remove landmarks from a landmark category.

    + +
  • +
  • Cancel()

    + +

    Use the Cancel() method to cancel an ongoing asynchronous +call. This method is valid for any asynchronous call made through the Landmarks +Service API.

    + +
  • +
+
+

Using the service in a widget

+

To access and manage landmark information using the Landmarks Service +API:

+
    +
  1. Create a service +object for the API using device.getServiceObject().

    +
  2. +
  3. Define the +tasks you want to perform and choose the correct methods for them.

    +
  4. +
  5. Optionally, +define how you want the results filtered.

  6. +
  7. Define methods +to process the results.

  8. +
  9. Retrieve the +results using the methods from step 2. Use asynchronous methods together with callback().

    +
  10. +
  11. Process the +results using the methods defined in step 4.

  12. +
+

For the complete source of a sample widget that demonstrates how to +use this service, see the +full example.

+
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-D66AB112-1BC4-4A88-AFCF-1CDBB94366B7.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-D66AB112-1BC4-4A88-AFCF-1CDBB94366B7.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,64 @@ + + +lighton()

lighton()

+

Syntax:

+
[void] sysinfo.lighton(Int lighttarget, Int duration, Int intensity, Bool fadein)
+

Description:

+

The lighton method switches the specified target light on for a specified duration with the brightness defined by a specified light intensity.

+

Argument:

+
    +
  • lighttarget:

    + +

    Defines which target light should be turned on. Use one of the supported target light properties to specify a target light.

    + +
  • +
  • duration:

    + +

    Defines the period during which the target light is switched on. The period is measured in milliseconds.

    +

    After the duration expires, the light state of the target will be changed to whatever state was caused by the last infinite time duration call. If there has not been a previous infinite time duration call in a session, the default state determined by the inactivity timer (system backlight timeout) is used.

    +

    If duration is lightinfiniteduration, the target light can be turned off only when some other light control method is called.

    +

    Duration can also have the maximum value of lightmaxduration

    + +
  • +
  • intensity:

    + +

    Defines the intensity (brightness) of the light. If intensity is lightdefaultintensity, the device default intensity will be used.

    +

    Use the lightminintensity and the lightmaxintensity to detect the range of supported light intensity, and use any value between the range to avoid providing an invalid intensity value.

    + +
  • +
+

Note: All devices might not support a user-defined intensity, in which case the device will behave in its default manner.

+
+
    +
  • fadein:

    + +

    If true, target lights will not turn on instantly but fade-in smoothly instead. if false, target lights will be turned on without the fading effect.

    + +
  • +
+

Note: All devices might not support fade-in, in which case the device will behave in its default manner.

+
+

Return value:

+

This method does not return a value.

+

Remarks:

+

Switching and keeping the mobile device lights on consumes energy. Therefore, it is recommended that you carefully consider the need for using the lights.

+

Example code:

+
function callLightOn()
+{
+   // get the Embed element reference
+   var sysinfo = document.embeds[0];
+   /*********************
+   call lighton() method, which turns on the light 
+   of all displays and keyboard with the maximum duration 
+   and using the default light intensity with the fade-in 
+   effect
+   *********************/
+   var target =  sysinfo.lighttargetsystem;
+   var duration = sysinfo.lightmaxduration;
+   var intensity = sysinfo.lightdefaultintensity;
+   sysinfo.lighton(target, duration, intensity, true);
+}
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-D71A525A-01E7-403C-802A-8564EF825008-master.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-D71A525A-01E7-403C-802A-8564EF825008-master.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-D71A525A-01E7-403C-802A-8564EF825008_d0e4659_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-D71A525A-01E7-403C-802A-8564EF825008_d0e4659_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-D82B43D9-37B4-482A-87C0-FFCF534C712C.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-D82B43D9-37B4-482A-87C0-FFCF534C712C.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,13 @@ + + +Performing one task in a view

Performing one task in a view

One of the common mistakes when designing for a small screen is trying to fit too many components or too much information in one view. The key to success is prioritization: focus on the essential. However, base your decisions on information, not guesswork.

+

For more information about how to study your users and their tasks, see Designing for a specific audience.

+

To keep pages simple, plan to perform one task in a view. For example, a main view could contain a screen title, a graphic, and buttons for performing the main functions of the widget. If possible, display the content on the main screen.

+

Figure: Example of a view

+

Note: Reserve space for softkeys at the bottom of the screen.

+

The widget package can only contain one HTML file. Use the div tag within the HTML file to create widget views. For more information, see Creating the widget HTML file.

+

For more information about page design, see Ensure visual balance and clear focus indication.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-D85C2567-F041-42A1-A2B5-650FCAAD60A9.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-D85C2567-F041-42A1-A2B5-650FCAAD60A9.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,95 @@ + + +IDataSource.Add()

IDataSource.Add()

+

Description:

+

The Add method adds a new landmark or landmark +category to a landmark database. You can also use this method to edit an existing +landmark or landmark category.

+

This is a synchronous method.

+

Syntax:

+ +
result = so.IDataSource.Add(criteria);
+

Arguments:

+ +

Return value:

+

The Add method returns an object that contains +the ID of the landmark or landmark category that was added or edited, an error +code, and an error message.

+
+ + + + + + + + + + + + + + + + + + + + +
Table: Return value +properties for Add
+

Property

+
+

Description

+
+

Value

+
+

result.ReturnValue

+
+

This is a text string that contains the ID of the landmark or landmark +category that was added or edited.

+
 
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See Landmarks Service API error messages.

+
+

Remarks:

+
    +
  • If a landmark or landmark category is to be edited, it must +exist in the database. Use the GetList method +to retrieve the ID of the landmark or landmark category.

  • +
  • If no landmark database is specified, Add is +performed on the default database. If the default database does not exist, +it is created and set active. The default database is file://c:eposlm.ldb.

    +
  • +
  • For more information about landmarks, landmark categories, +and landmark databases, see the Landmarks +Service overview page.

  • +
+

Example code:

+

+

For the complete source of a sample widget +that demonstrates how to use this Service API, see the +full example.

+ + +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-DA3E6868-F769-4576-A0C3-6776BF358B44.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-DA3E6868-F769-4576-A0C3-6776BF358B44.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,17 @@ + + +Introduction to home screen widgets

Introduction to home screen widgets

Home screen widgets allow users to view dynamic data from several widgets simultaneously without having to launch the widgets on full screen. A home screen widget displays a non-interactive subset of data generated by a full screen widget. For example, you can display market indicators from a stock market widget, local forecast from a weather widget, status updates from a social network widget, or the next appointment from a calendar widget.

+

Figure: Widgets on the home screen

+

When you develop the widget, you decide what data to display on the home screen. Users cannot choose the data to display. For information on defining the widget data to display on the home screen, see Creating content specific to home screen widgets.

+

Widgets display dynamic data on the home screen to provide users with the latest information without having to launch the widget on full screen. Although the data is dynamic, users cannot interact with it.

+

Users can select widgets on the home screen to launch them on full screen on compatible devices. If a device does not support home screen widgets, users can access the features of the widget by launching it in the full screen mode.

+

Some home screen widgets are pre-installed on mobile devices. Some pre-installed widgets cannot be removed, while some can be replaced by widgets that you enable for the home screen.

+

The following sections contain information about WRT widgets on the home screen:

+ +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-DBB90F32-C1FA-4B0C-9BCA-89177140A60D.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-DBB90F32-C1FA-4B0C-9BCA-89177140A60D.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,1697 @@ + + +Supported +system attributes (entities and keys)

Supported +system attributes (entities and keys)

+

The SystemInfo +Service API supports the following system attribute entities:

+ +

The following tables describe the system attributes supported by the +SystemInfo Service API. Read the columns as follows:

+
    +
  • Key specifies the name of the system attribute key. +Together with the entity, this specifies the system attribute; for example: Battery +- BatteryStrength.

  • +
  • Input specifies the system +data type for an input value. The properties specified for a particular +data type are used as the SystemData properties in method +input. NA indicates that no input is applicable.

  • +
  • Output specifies the system +data type for an output value. The properties specified for a particular +data type are used as the ReturnValue properties in method +output.

  • +
  • Value optionally describes the value or the value +range of the system attribute, or provides an example value. This is used +for both input, if valid, and output. For detailed information about system +attribute values, see section System data types.

    +
  • +
  • GetInfo, SetInfo, and GetNotification indicate +whether the system attribute supports the GetInfo, SetInfo, +and GetNotification methods, +respectively.

  • +
  • GetInfo mode indicates whether the system attribute +supports synchronous (Sync) or asynchronous (Async) GetInfo calls.

    +
  • +
  • Capability specifies the Symbian capabilities required +of any process that loads the Web Runtime to +invoke the SystemInfo Service API and access the system attribute.

    +
  • +
+

+

The following table describes the Battery system +attributes.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Battery system +attributes
+

Key

+
+

Input

+
+

Output

+
+

Value

+
+

GetInfo

+
+

SetInfo

+
+

GetNotification

+
+

GetInfo mode

+
+

Capability

+
+

BatteryStrength

+
+

Status

+

Threshold battery strength for notification request

+
+

Status

+
+

0 - 100 %

+
+

X

+
  +

X

+
+

Async

+
+

None

+
+

ChargingStatus

+
+

NA

+
+

Status

+
+

0 - 1

+
+

X

+
  +

X

+
+

Sync

+
+

None

+
+

The following table describes the Connectivity system +attributes.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Connectivity +system attributes
+

Key

+
+

Input

+
+

Output

+
+

Value

+
+

GetInfo

+
+

SetInfo

+
+

GetNotification

+
+

GetInfo mode

+
+

Capability

+
+

BlueTooth

+
+

NA

+
+

Status

+
+

0 - 1

+
+

X

+
  +

X

+
+

Sync

+
+

None

+
+

InfraRed

+
+

NA

+
+

Status

+
+

0 - 1

+
+

X

+
  +

X

+
+

Sync

+
+

None

+
+

ActiveConnections

+
+

NA

+
+

ConnectionList

+
  +

X

+
   +

Async

+
+

None

+
+

ConnectionStatus

+
+

NA

+
+

ConnectionInfo

+
    +

X

+
  +

None

+
+

WLanMacAddress

+
+

NA

+
+

StringData

+
+

For example: "00:18:0f:1e:96:a2"

+
+

X

+
   +

Sync

+
+

None

+
+

The following table describes the Device system +attributes.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Device system +attributes
+

Key

+
+

Input

+
+

Output

+
+

Value

+
+

GetInfo

+
+

SetInfo

+
+

GetNotification

+
+

GetInfo mode

+
+

Capability

+
+

FirmwareVersion

+
+

NA

+
+

StringData

+
+

For example: "V 06.27.1.0_10-07-2006_RM170_NOKIA E50"

+
+

X

+
   +

Sync

+
+

None

+
+

PlatformVersion

+
+

NA

+
+

Version

+
  +

X

+
   +

Sync

+
+

None

+
+

ProductType

+
+

NA

+
+

StringData

+

Note: If this is not specified for the device, GetInfo returns "Unknown" as ProductType.

+
+
+

For example: "RM-160"

+
+

X

+
   +

Sync

+
+

None

+
+

Manufacturer

+
  +

StringData

+
+

For example: "Nokia"

+
+

X

+
   +

Sync

+
+

None

+
+

MachineId

+
+

NA

+
+

Status

+
+

For example: 101FB2B1

+

This is a unique ID.

+
+

X

+
   +

Sync

+
+

None

+
+

PhoneModel

+
+

NA

+
+

StringData

+
+

For example: "E50", "N70"

+
+

X

+
   +

Sync

+
+

None

+
+

IMEI

+
+

NA

+
+

StringData

+
  +

X

+
   +

Sync

+
+

None

+
+

The following table describes the Display system +attributes.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Display system +attributes
+

Key

+
+

Input

+
+

Output

+
+

Value

+
+

GetInfo

+
+

SetInfo

+
+

GetNotification

+
+

GetInfo mode

+
+

Capability

+
+

Brightness

+
+

Status

+
+

Status

+
+

5 - 95 %

+
+

X

+
   +

Sync

+
+

None

+
+

ScreenSaverTimeout

+
+

Status

+
+

Status

+
+

5 - 90 seconds

+
+

X

+
   +

Sync

+
+

None

+
+

UserInactivity

+
+

Status

+

Time in seconds

+
+

Status

+
+

0 - 1 seconds

+
   +

X

+
  +

None

+
+

KeyGuardTime

+
+

Status

+
+

Status

+
+

0 - 3600 seconds

+
+

X

+
   +

Sync

+
+

None

+
+

AutoLockTime

+
+

Status

+
+

Status

+
+

0 - 999 minutes

+
+

X

+
   +

Sync

+
+

None

+
+

AutoLockStatus

+
+

NA

+
+

Status

+
+

0 - 1

+
+

X

+
  +

X

+
+

Sync

+
+

None

+
+

Wallpaper

+
+

StringData

+
  +

Full path and file name; for example: "C://Data//Others//wallpaper.jpeg"

+
  +

X

+
   +

None

+
+

LightTimeout

+
+

NA

+
+

Status

+
+

5 - 60 seconds

+
+

X

+
   +

Sync

+
+

None

+
+

DisplayResolution

+
+

NA

+
+

Resolution

+
  +

X

+
   +

Sync

+
+

None

+
+

DisplayOrientation

+
+

NA

+
+

Status

+
+

0 - 3

+
+

X

+
   +

Sync

+
+

None

+
+

The following table describes the Features system +attributes.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Features system +attributes
+

Key

+
+

Input

+
+

Output

+
+

Value

+
+

GetInfo

+
+

SetInfo

+
+

GetNotification

+
+

GetInfo mode

+
+

Capability

+
+

BlueTooth

+
+

NA

+
+

Status

+
+

0 - 1

+
+

X

+
   +

Sync

+
+

None

+
+

InfraRed

+
+

NA

+
+

Status

+
+

0 - 1

+
+

X

+
   +

Sync

+
+

None

+
+

CAMERA

+
+

NA

+
+

Status

+
+

0 - 1

+
+

X

+
   +

Sync

+
+

None

+
+

MemoryCard

+
+

NA

+
+

Status

+
+

0 - 1

+
+

X

+
   +

Sync

+
+

None

+
+

FMRADIO

+
+

NA

+
+

Status

+
+

0 - 1

+
+

X

+
   +

Sync

+
+

None

+
+

QWERTY

+
+

NA

+
+

Status

+
+

0 - 1

+
+

X

+
   +

Sync

+
+

None

+
+

WLAN

+
+

NA

+
+

Status

+
+

0 - 1

+
+

X

+
   +

Sync

+
+

None

+
+

USB

+
+

NA

+
+

Status

+
+

0 - 1

+
+

X

+
   +

Sync

+
+

None

+
+

Pen

+
+

NA

+
+

Status

+
+

0 - 1

+
+

X

+
   +

Sync

+
+

None

+
+

LED

+
+

NA

+
+

Status

+
+

0 - 1

+
+

X

+
   +

Sync

+
+

None

+
+

CoverUI

+
+

NA

+
+

Status

+
+

0 - 1

+
+

X

+
   +

Sync

+
+

None

+
+

SideVolumeKeys

+
+

NA

+
+

Status

+
+

0 - 1

+
+

X

+
   +

Sync

+
+

None

+
+

Vibra

+
+

NA

+
+

Status

+
+

0 - 1

+
+

X

+
   +

Sync

+
+

None

+
+

The following table describes the General system +attributes.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: General system +attributes
+

Key

+
+

Input

+
+

Output

+
+

Value

+
+

GetInfo

+
+

SetInfo

+
+

GetNotification

+
+

GetInfo mode

+
+

Capability

+
+

AccessoryStatus

+
+

NA

+
+

AccessoryInfo

+
    +

X

+
  +

None

+
+

ConnectedAccessories

+
+

NA

+
+

AccessoryList

+
  +

X

+
   +

Sync

+
+

None

+
+

InputLanguage

+
+

Status

+
+

Status

+
+

S60 language enumeration

+
+

X

+
+

X

+
+

X

+
+

Sync

+
+

None

+
+

SupportedLanguages

+
+

NA

+
+

LanguageList

+
+

List of S60 language enumerations

+
+

X

+
   +

Sync

+
+

None

+
+

PredictiveText

+
+

Status

+
+

Status

+
+

0 - 1

+
+

X

+
+

X

+
+

X

+
+

Sync

+
+

None

+
+

VibraActive

+
+

Status

+
+

Status

+
+

0 - 1

+
+

X

+
+

X

+
+

X

+
+

Sync

+
+

None

+
+

AvailableUSBModes

+
+

NA

+
+

StringList

+
  +

X

+
   +

Sync

+
+

None

+
+

ActiveUSBMode

+
+

NA

+
+

StringData

+
  +

X

+
   +

Sync

+
+

None

+
+

FlipStatus

+
+

NA

+
+

Status

+
+

0 - 1

+
+

X

+
  +

X

+
+

Sync

+
+

None

+
+

GripStatus

+
+

NA

+
+

Status

+
+

0 - 1

+
+

X

+
  +

X

+
+

Sync

+
+

None

+
+

The following table describes the Memory system +attributes.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Memory system +attributes
+

Key

+
+

Input

+
+

Output

+
+

Value

+
+

GetInfo

+
+

SetInfo

+
+

GetNotification

+
+

GetInfo mode

+
+

Capability

+
+

ListDrives

+
+

NA

+
+

DriveList

+
  +

X

+
   +

Sync

+
+

None

+
+

DriveInfo

+
+

DriveInfo

+
+

DriveInfo

+
  +

X

+
   +

Sync

+
+

None

+
+

CriticalMemory

+
+

DriveInfo

+

For notification requests

+
+

StringData

+

Specifies the drive; for example: "C:\\"

+
    +

X

+
  +

None

+
+

MemoryCard

+
+

NA

+
+

Status

+
+

0 - 1

+
+

X

+
  +

X

+
+

Sync

+
+

None

+
+

The following table describes the Network system +attributes.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Network system +attributes
+

Key

+
+

Input

+
+

Output

+
+

Value

+
+

GetInfo

+
+

SetInfo

+
+

GetNotification

+
+

GetInfo mode

+
+

Capability

+
+

SignalStrength

+
+

Status

+

Threshold dB for notification request

+
+

Status

+
+

40 - 110 dB, where 40 is high

+
+

X

+
  +

X

+
+

Async

+
+

None

+
+

RegistrationStatus

+
+

NA

+
+

Status

+
+

0 - 6

+
+

X

+
  +

X

+
+

Sync

+
+

None

+
+

NetworkMode

+
+

NA

+
+

Status

+
+

0 - 2

+
+

X

+
  +

X

+
+

Sync

+
+

None

+
+

CurrentNetwork

+
+

NA

+
+

NetworkInfo

+
  +

X

+
  +

X

+
+

Async

+
+

ReadUserData, Location

+
+

LocationArea

+
+

NA

+
+

Status

+
    +

X

+
  +

ReadUserData, Location

+
+

CellID

+
+

NA

+
+

Status

+
    +

X

+
  +

ReadUserData, Location

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-DBEE8177-7246-4FEE-A0F1-D6AEEA6EA206.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-DBEE8177-7246-4FEE-A0F1-D6AEEA6EA206.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,85 @@ + + +ILocation.Calculate()

ILocation.Calculate()

+

Description:

+

The Calculate method performs mathematical calculations +based on a source location and a target location.

+

This is a synchronous method.

+

Syntax:

+
result = so.ILocation.Calculate(criteria);
+ +

Arguments:

+
    +
  • criteria:

    + +

    This is an object that specifies the mathematical operation to perform +and the input values to use in the operation. For more information about the +object properties and how to define them, see section Calculation criteria.

    + +
  • +
+

Return value:

+

The Calculate method returns an object that contains +the calculation results, an error code, and an error message.

+
+ + + + + + + + + + + + + + + + + + + + +
Table: Return value +properties for Calculate
+

Property

+
+

Description

+
+

Value

+
+

result.ReturnValue

+
+

This contains the results for the requested mathematical operation. +The type of the value depends on the operation.

+
+

See Calculation results.

+
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See Location Service API error messages.

+
+

Remarks:

+

The WGS +84 datum is used to reference coordinates.

+

Example code:

+

+

For the complete source of a sample widget +that demonstrates how to use this Service API, see the +full example.

+ + +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-DBF41DB5-44D7-4822-A611-FBF7DA3A8F3B.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-DBF41DB5-44D7-4822-A611-FBF7DA3A8F3B.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,434 @@ + + +Messaging Service API example

Messaging Service API example

+

+

This section presents the full source code of a working sample widget +for the Messaging Service. +You can download the wgz package for this widget from +section Example widgets.

+

For general information about creating widgets, see section Widget component files.

+

For widget development and debugging purposes, this example writes its +output to c:\data\jslog_widget.log using console.info. +For instructions on how to enable logging in the Web browser for S60, see +section JavaScript console.

+

Info.plist

+
<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Nokia//DTD PLIST 1.0//EN" "http://www.nokia.com/NOKIA_COM_1/DTDs/plist-1.0.dtd">
+<plist version="1.0">
+<dict>
+  <key>DisplayName</key>
+  <string>MessagingSample</string>
+  <key>Identifier</key>
+  <string>com.nokia.widget.sapi.Messaging.sample</string>
+  <key>Version</key>
+  <string>1.0</string>
+  <key>MainHTML</key>
+  <string>messaging-sample.html</string>
+</dict>
+</plist>
+
+

messaging-sample.html

+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+  <meta http-equiv="content-type" content="text/html; charset=utf-8">
+  <script type="text/javascript" src="js/messaging-sample.js" charset="utf-8"></script>
+  <script type="text/javascript" src="js/common.js" charset="utf-8"></script>
+  </head>
+<body onload='setup()' bgcolor="#ddeeff">
+
+  <form name="frm">
+    <h3>Messaging Service API Sample Widget</h3>
+    <input type="button" onclick="getList('img1')" value="GetList"><img id="img1" src="pic/blank.png" width="25" height="25" align="center"><br>
+    <input type="button" onclick="SendMMS('img2')" value="SendMmsSync"><img id="img2" src="pic/blank.png" width="25" height="25" align="center"><br>
+    <input type="button" onclick="SendASyncMMS('img3')" value="SendMmsAsync"><img id="img3" src="pic/blank.png" width="25" height="25" align="center"><br>
+    <input type="button" onclick="cancelSendASyncMMS('img4')" value="cancelSendMmsAsync"><img id="img4" src="pic/blank.png" width="25" height="25" align="center"><br>
+    <input type="button" onclick="Delete('img5')" value="RegisterNotification"><img id="img5" src="pic/blank.png" width="25" height="25" align="center"><br>
+    <input type="button" onclick="ChangeStatus('img6')" value="DeleteMsg"><img id="img6" src="pic/blank.png" width="25" height="25" align="center"><br>
+    <input type="button" onclick="RegisterNotification('img7')" value="RegisterNotification"><img id="img7" src="pic/blank.png" width="25" height="25" align="center"><br>
+    <input type="button" onclick="CancelNotification('img8')" value="DeleteMsg"><img id="img8" src="pic/blank.png" width="25" height="25" align="center"><hr>
+    <div class='messaging' id='messaging' bgcolor="#ddeeff" style=width:100%;height:100%;overflow:auto>
+    </div>
+  </form>
+
+</body>
+</html>
+
+

common.js

+
// common.js
+//
+// This file contains some utility functions
+
+// Check the error code and show the information to users
+function checkError(message, resultList, divId, imgId)
+{
+  var errCode = resultList.ErrorCode;
+  var msg = "";
+
+  if (errCode) {
+    msg = message + "<BR>" + "Failed Error: " + errCode + "<BR>";
+    if(resultList.ErrorMessage != undefined)
+      msg += "Error Message: " + resultList.ErrorMessage;
+    showIMG(imgId,"no");
+  } else {
+    showIMG(imgId,"yes");
+  }
+
+  //print error message
+  if(divId != null && divId != undefined)
+    document.getElementById(divId).innerHTML = msg;
+  console.info(msg);
+
+  return errCode;
+}
+
+// Build the message by reading a iteratorable list in a recursive manner
+function showIterableList(iterator)
+{
+  var msg = "";
+  try
+  {
+    iterator.reset();
+    var item;
+    while (( item = iterator.getNext()) != undefined ){
+      msg += showObject( item );
+    }
+  }
+  catch(e)
+  {
+    alert('<showIterableList> ' + e);
+  }
+  return msg;
+}
+
+// Build the message by reading a JS object in a recursive manner
+function showObject( obj )
+{
+  var txt = "";
+  try {
+    if ( typeof obj != 'object' )
+      return "" + obj + '<BR/>';
+    else {
+      for(var key in obj) {
+        txt +=  key + ":";
+        txt += showObject( obj[key] );
+        txt += '<BR/>';
+      }
+      txt += '<BR/>';
+    }
+  }
+  catch (e)
+  {
+    alert("showObject: " + e);
+  }
+  return txt;
+}
+
+// Show the image to indicate the test result
+function showIMG(imgId, isOK)
+{
+  if(imgId == null || imgId == undefined)
+    return;
+
+  if(isOK == "yes")
+    document.getElementById(imgId).src = "pic/yes.png";
+  else if(isOK == "no")
+    document.getElementById(imgId).src = "pic/no.png";
+  else
+    document.getElementById(imgId).src = "pic/blank.png";
+}
+
+// Show elements in object by using 'alert'
+function testObject(obj)
+{
+  var msg = "";
+  for(var key in obj) {
+    msg = msg + ":" + key + "=" + obj[key];
+  }
+  alert(msg);
+}
+
+// Test whether the input is numeric
+function IsNumeric(sText)
+{
+  var ValidChars = "0123456789.";
+  var IsNumber=true;
+  var Char;
+
+  for (i = 0; i < sText.length && IsNumber == true; i++)
+  {
+    Char = sText.charAt(i);
+    if (ValidChars.indexOf(Char) == -1)
+    {
+      IsNumber = false;
+    }
+  }
+  return IsNumber;
+}
+
+

messaging-sample.js

+
// messaging-sample.js
+//
+// In this sample Messaging will be send, deleted, and listed.
+// Also, async operation will be canceled
+
+//SAPI Error Codes
+// 0    - Success
+// 1000 - InvalidServiceArgument
+// 1001 - UnknownArgumentName
+// 1002 - BadArgumentType
+// 1003 - MissingArgument
+// 1004 - ServiceNotSupported
+// 1005 - ServiceInUse
+// 1006 - ServiceNotReady
+// 1007 - NoMemory
+// 1008 - HardwareNotAvailable
+// 1009 - ServerBusy
+// 1010 - EntryExists
+// 1011 - AccessDenied
+// 1012 - NotFound
+// 1013 - UnknownFormat
+// 1014 - GeneralError
+// 1015 - CancelSuccess
+// 1016 - ServiceTimedOut
+// 1017 - PathNotFound
+
+// Declare the service object
+var so;
+
+// id of the div used to display information
+const DIV_ID = 'messaging';
+
+// imgid for callback1 function
+var imgid_callback1;
+
+// imgid for callback2 function
+var imgid_callback2;
+
+// Test entry point
+function setup()
+{
+  try
+  {
+    so = device.getServiceObject("Service.Messaging", "IMessaging");
+      console.info("setup: so: %s", so);
+  }
+  catch(e)
+  {
+    alert('<setup> ' +e);
+  }
+}
+
+//Get message list
+function getList(imgId)
+{
+  // Setup input params using dot syntax
+  var criteria = new Object();
+  criteria.Type = 'Inbox';
+  criteria.Filter = new Object();
+  criteria.Filter.MessageTypeList = new Array();
+  criteria.Filter.MessageTypeList[0] = 'MMS';
+  criteria.Filter.MessageTypeList[1] = 'SMS';
+
+  try
+  {
+    // Messaging supports synchronous call
+    var result = so.IMessaging.GetList(criteria);
+    if(!checkError("IMessaging::getList",result,DIV_ID,imgId)) {
+      document.getElementById(DIV_ID).innerHTML = showIterableList(result.ReturnValue);
+    }
+  }
+  catch(e)
+  {
+    showIMG(imgId,"no");
+    alert('getList: '+e);
+  }
+}
+
+//send MMS message
+// Sync operation
+function SendMMS(imgId)
+{
+    // Setup input params using dot syntax
+    var criteria = new Object();
+    criteria.MessageType = 'MMS';
+    criteria.To = '4567809';
+    criteria.BodyText ='Hello:TestSendSync: Sending message using SAPI';
+    try
+    {
+      result = so.IMessaging.Send(criteria);
+    checkError("IMessaging::SendMMS",result,DIV_ID,imgId);
+    }
+  catch(e)
+  {
+    showIMG(imgId,"no");
+    alert('SendMMS: '+e);
+  }
+}
+
+//send MMS message
+// Async operation
+function SendASyncMMS(imgId)
+{
+  // Setup input params using dot syntax
+  var criteria = new Object();
+  criteria.MessageType = 'MMS';
+  criteria.To = '9876543210';
+  criteria.BodyText = 'TestSendASync: Sending message using SAPI';
+
+  try
+  {
+    imgid_callback1 = imgId;
+    result = so.IMessaging.Send(criteria, callback1);
+    if(!checkError("IMessaging::SendASyncMMS",result,DIV_ID,imgId)) {
+      showIMG(imgId,"");
+    }
+  }
+  catch(e)
+  {
+    showIMG(imgId,"no");
+    alert('SendASyncMMS: '+e);
+  }
+}
+
+// cancel send MMS message
+// Async operation
+function cancelSendASyncMMS(imgId)
+{
+  // Setup input params using dot syntax
+  var criteria = new Object();
+  criteria.MessageType = 'MMS';
+  criteria.To = '9876543210';
+  criteria.BodyText = 'TestSendASync: Sending message using SAPI';
+
+  try
+  {
+    imgid_callback1 = imgId;
+    result = so.IMessaging.Send(criteria, callback1);
+    if(!checkError("IMessaging::cancelSendASyncMMS",result,DIV_ID,imgId)) {
+      showIMG(imgId,"");
+      var criteria2 = new Object();
+      criteria2.TransactionID = result.TransactionID;
+      var result2 = so.IMessaging.Cancel(criteria2);
+      checkError("IMessaging::cancelSendASyncMMS",result2,DIV_ID,imgId); 
+    }
+  }
+  catch(e)
+  {
+    showIMG(imgId,"no");
+    alert('cancelSendASyncMMS: '+e);
+  }
+}
+
+// function deletes message with specified MessageId
+// sync operation
+function Delete(imgId)
+{
+  var msgIdStr = prompt("Please type the message id", "0");
+  if(msgIdStr == "" || msgIdStr == null)
+    return;
+
+  // Setup input params using dot syntax
+  var msgId = parseInt(msgIdStr);
+  var criteria = new Object();
+  criteria.MessageId = msgId;
+
+  // function sends message
+  try
+  {
+    var result = so.IMessaging.Delete(criteria);
+    checkError("IMessaging::Delete",result,DIV_ID,imgId);
+  }
+  catch(e)
+  {
+    showIMG(imgId,"no");
+    alert('Delete: '+e);
+  }
+}
+
+// function changes status of message
+// Sync operation
+function ChangeStatus(imgId)
+{
+  var msgIdStr = prompt("Please type the message id", "0");
+  if(msgIdStr == "" || msgIdStr == null)
+    return;
+
+  var criteria = new Object();
+  var msgId = parseInt(msgIdStr);
+  criteria.MessageId = msgId;
+  criteria.Status = 'Unread';
+
+  try
+  {
+    var result = so.IMessaging.ChangeStatus(criteria);
+    checkError("IMessaging::ChangeStatus",result,DIV_ID,imgId);
+  }
+  catch(e)
+  {
+    showIMG(imgId,"no");
+    alert('ChangeStatus: '+e);
+  }
+}
+
+// function cancels notification of new messages.
+// sync operation
+function CancelNotification(imgId)
+{
+  var criteria = new Object();
+  criteria.Type = 'NewMessage';
+  try
+  {
+    var result = so.IMessaging.CancelNotification(criteria);
+    checkError("IMessaging::CancelNotification",result,DIV_ID,imgId);
+  }
+  catch(e)
+  {
+    showIMG(imgId,"no");
+    alert('CancelNotification: '+e);
+  }
+}
+
+// function registers for notification of new messages
+// Sync operation
+// to test RegisterNotification(): 1) click on RegisterNotification 2) click on sendMMS button to get callback
+function RegisterNotification(imgId)
+{
+  var criteria = new Object();
+  criteria.Type = 'NewMessage';
+  try
+  {
+    imgid_callback2 = imgId;
+    // Register for notification
+    result = so.IMessaging.RegisterNotification(criteria, callback2);
+    if(!checkError("IMessaging::RegisterNotification",result,DIV_ID,imgId)) {
+      showIMG(imgId,"");
+    }
+  }
+  catch(e)
+  {
+    showIMG(imgId,"no");
+    alert('RegisterNotification: '+e);
+  }
+}
+
+function callback1(transId, eventCode, result)
+{
+  console.info("callback1: transId: %d  eventCode: %d result.ErrorCode: %d", transId, eventCode, result.ErrorCode);
+  if(!checkError("IMessaging::SendASyncMMS",result,DIV_ID,imgid_callback1)) {
+    document.getElementById(DIV_ID).innerHTML = showIterableList(result.ReturnValue);
+  }
+}
+
+function callback2(transId, eventCode, result)
+{
+  console.info("callback2: transId: %d  eventCode: %d result.ErrorCode: %d", transId, eventCode, result.ErrorCode);
+  if(!checkError("IMessaging::SendASyncMMS",result,DIV_ID,imgid_callback2)) {
+    document.getElementById(DIV_ID).innerHTML = "Messaging status was changed";
+  }
+}
+
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-DD35B82F-CB1F-4F7B-A351-C0417E21D5E4.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-DD35B82F-CB1F-4F7B-A351-C0417E21D5E4.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,18 @@ + + +Creating +a CSS file

Creating +a CSS file

It is recommended that you create a separate CSS file for controlling +the style and layout of your widget. A widget can have as many CSS files as +needed. The Web Runtime supports CSS Level 2 syntax and data types. There +are four ways to use an external CSS file through the widget's main HTML file:

  • Importing a style sheet that is included in the widget package

    Use the <style> tag and the @import directive +as follows:

    <style type="text/css"> @import "Stylesheet.css; </style>
  • Linking to a style sheet that is included in the widget package

    Use the <link> tag as follows:

    <link rel="stylesheet" type="text/css" href="Stylesheet.css" />
  • Importing a style sheet from a remote location

    In this scenario, the CSS file is not included in the widget package. +Specify the URL of the style sheet source inside the <style> tag +as follows:

    <style type="text/css"> @import url(http://www.widget.server.com/Stylesheet.css); </style>
  • Linking to a style sheet that is stored in a remote location

    In this case, the CSS file is not included in the widget package. Specify +the URL of the style sheet source in the href attribute of +the <link> tag as follows:

    <link rel="stylesheet" type="text/css" href="http://www.widget.server.com/Stylesheet.css" />

Note: When linking to or importing external CSS files from a remote location, +specify the AllowNetworkAccess key in the info.plist file as true to allow the widget to connect to the network.

For more information on creating CSS files, see the World +Wide Web Consortium (W3C) pages.

\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-DD6F754D-6438-4B4E-8775-7BC1A9C45330.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-DD6F754D-6438-4B4E-8775-7BC1A9C45330.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,121 @@ + + +Criteria for +exporting landmarks

Criteria for +exporting landmarks

+

The criteria object specifies the set of +landmarks to export and optionally the source database.

+

The criteria object has two main properties: Type and Data. +These are described in the following table.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Criteria object properties
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

criteria.Type

+
+

Specifies the type of landmark information to export. This is always "Landmark".

+
+

string

+
+

Possible values:

+
    +
  • "Landmark"

  • +
+
+

criteria.Data

+
+

Specifies the landmarks to export.

+
+

object

+
+

Object with the properties specified below

+
+

[criteria.Data.DatabaseURI]

+
+

Specifies the URI of the landmark database from which the landmarks +are exported.

+

If this property is not specified, the landmarks are exported from the +default database.

+
+

string

+
+

For example: file://c:landmarks.ldb

+
+

criteria.Data.DestinationFile

+
+

Specifies the full path and file name of the target file into which +the landmarks are exported.

+
+

string

+
+

For example: c:\\mylandmarks.lmx

+
+

criteria.Data.IdList

+
+

Specifies the IDs of the landmarks to export.

+

Use the GetList method +to retrieve these IDs.

+
+

array of strings

+
 
+

criteria.Data.MimeType

+
+

Specifies the MIME type of the target file.

+

The supported MIME types are described in the document S60 Platform: Landmarks Exchange Format Specification available +on Forum Nokia.

+
+

string

+
+

For example: "application/vnd.nokia.landmarkcollection+xml"

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-DDF5BDA7-E0DA-40EB-94E7-30824B0F4365.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-DDF5BDA7-E0DA-40EB-94E7-30824B0F4365.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,240 @@ + + +Criteria for +adding a log entry

Criteria for +adding a log entry

+

The criteria object specifies what type +of device log entries are added to the event database and details about the +entry.

+

The criteria object has two main properties: Type and Item. +These are described in the following table. Properties enclosed in brackets +are optional.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Criteria object properties
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

criteria.Type

+
+

Specifies the type of content.

+
+

string

+
+

Possible values:

+
    +
  • "Log"

  • +
+
+

criteria.Item

+
+

Specifies the content of the entry to add to the event log.

+
+

object

+
+

Object with the properties specified below

+
+

criteria.Item.EventType

+
+

Specifies a unique identifier for the type of event.

+
+

number

+
+

Value - Description:

+
    +
  • 0 - EKLogCallEventType

  • +
  • 1 - EKLogDataEventType

  • +
  • 2 - EKLogFaxEventType

  • +
  • 3 - EKLogShortMessageEventType

    +
  • +
  • 4 - EKLogPacketDataEventType

    +
  • +
+
+

[criteria.Item.RemoteParty]

+
+

Specifies the destination of the outgoing event or the source of incoming +event.

+
+

string

+
+

Up to 64 characters. If the length of the specified string is greater +than 64 characters, the data is truncated.

+
+

[criteria.Item.Direction]

+
+

Specifies whether the event is incoming, outgoing, or missed and if +it came in on an alternate line.

+

Alternate line refers to the second phone call on the mobile device. +Alternate line values, such as 2 - EIncomingEventAlternateline, +are valid for call events only.

+
+

number

+
+

Value - Description:

+
    +
  • 0 - EIncomingEvent

  • +
  • 1 - EOutgoingEvent

  • +
  • 2 - EIncomingEventAlternateline

    +
  • +
  • 3 - EOutgoingEventAlternateline

    +
  • +
  • 4 - EFetchedEvent

  • +
  • 5 - EMissedEvent

  • +
  • 6 - EMissedEventAlternateline

    +
  • +
+
+

[criteria.Item.EventDuration]

+
+

Specifies the duration of the event, in seconds.

+
+

number

+
 
+

[criteria.Item.DeliveryStatus]

+
+

Specifies whether the event was delivered, is pending, failed to be +delivered, etc.

+
+

number

+
+

Value - Description:

+
    +
  • 0 - EStatusPending

  • +
  • 1 - EStatusSent

  • +
  • 2 - EStatusFailed

  • +
  • 3 - EStatusNone

  • +
  • 4 - EStatusDone

  • +
  • 5 - EStatusSent

  • +
  • 6 - EStatusScheduled

  • +
+
+

[criteria.Item.Subject]

+
+

Specifies the subject for the event.

+
+

string

+
+

Up to 64 characters. If the length of the specified string is greater +than 64 characters, the data is truncated.

+
+

[criteria.Item.PhoneNumber]

+
+

Specifies the phone number associated with the event.

+

This key is specified when the number cannot be stored in any other +key. For example, if there is an entry in the contacts database for a person +named Prakash, then RemoteParty is specified as "Prakash" +and PhoneNumber is needed to specify the phone number. +If there is no entry for Prakash, RemoteParty is specified +as the phone number.

+
+

string

+
+

Up to 100 characters. If the length of the specified string is greater +than 100 characters, the number is truncated.

+
+

[criteria.Item.Link]

+
+

Specifies an ID (messageID, callID, etc) that links the event being +added to an entity in another application.

+

For example, it might be useful to link the event to an SMS messageID +so that details of the message can be displayed to the mobile device user.

+
+

number

+
 
+

[criteria.Item.LogFlags]

+
+

Specifies the flags for this event. This method does not change any +of the other flag bit settings.

+
+

number

+
+

Possible values:

+

0 - EKLogEventContactSearched

+

Note: The EKLogEventContactSearched flag is set when the user searches the +contact database for any operation such as a voice call or SMS.

+
+

1 - EKLogEventRead

+

Note: The EKLogEventRead flag is set when the user "reads" the event in the +log database.

+
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-DEA4164E-5F03-4B57-97B9-4C6238481F89.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-DEA4164E-5F03-4B57-97B9-4C6238481F89.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,222 @@ + + +Location Service API error messages

Location Service API error messages

+

This section provides information about the error messages returned +by the Location Service API methods.

+

+

GetLocation

+

The following table describes the error messages returned by GetLocation and callback for GetLocation as +part of their return value.

+
+ + + + + + + + + + + + + + + + + + + + + +
Table: GetLocation error +messages
+

Error message

+
+

Description

+
+

Location : GetLocation : Wrong category info should be BasicLocationInformation/GenericLocationInfo

+
+

The LocationInformationClass property contains +an invalid value.

+
+

Location : GetLocation : BadArgument - Updateoptions

+
+

An Updateoptions property has an invalid name.

+
+

Location : GetLocation : Negative Time Interval

+
+

The Updateoptions.UpdateInterval property is negative.

+
+

Location : GetLocation : Updateoptions Type Mismatch

+
+

An Updateoptions property contains a value with +an invalid type.

+
+

Trace

+

The following table describes the error messages returned by Trace and callback for Trace as +part of their return value.

+
+ + + + + + + + + + + + + + + + + + + + + +
Table: Trace error messages
+

Error message

+
+

Description

+
+

Location : Trace : Invalid LocationInformationClass

+
+

The LocationInformationClass property contains +an invalid value.

+
+

Location : Trace : BadArgument - Updateoptions

+
+

An Updateoptions property has an invalid name.

+
+

Location : Trace : Negative Time Interval

+
+

The Updateoptions.UpdateInterval property is negative.

+
+

Location : Trace : Updateoptions Type Mismatch

+
+

An Updateoptions property contains a value with +an invalid type.

+
+

Calculate

+

The following table describes the error messages returned by Calculate as part of its return value.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Calculate error +messages
+

Error message

+
+

Description

+
+

Location : Calculate : Missing argument - MathRequest

+
+

The MathRequest property is missing from the input.

+
+

Location : Calculate : Wrong argument - MathRequest

+
+

The MathRequest property contains an invalid value.

+
+

Location : Calculate : Missing argument - locationcoordinate

+
+

Location coordinates are missing from the input.

+
+

Location : Calculate : Missing argument - MoveByThisDistance

+
+

The MoveByThisDistance property is missing from +the input.

+
+

Location : Calculate : Missing argument - MoveByThisBearing

+
+

The MoveByThisBearing property is missing from +the input.

+
+

Location : Calculate : TypeMismatch - MoveByThisDistance

+
+

The MoveByThisDistance property contains a value +with an invalid type.

+
+

Location : Calculate : TypeMismatch - MoveByThisBearing

+
+

The MoveByThisBearing property contains a value +with an invalid type.

+
+

CancelNotification

+

The following table describes the error messages returned by CancelNotification as part of its return value.

+
+ + + + + + + + + + + + + + + + + +
Table: CancelNotification +error messages
+

Error message

+
+

Description

+
+

Location : Cancel : BadArgument – cancel type

+
+

The cancel type property in the input has an invalid name. The expected +name is CancelRequestType.

+
+

Location : Cancel : Missing cancel type

+
+

The CancelRequestType property is missing from +the input.

+
+

Location : Cancel : Wrong cancel type

+
+

The CancelRequestType property contains an invalid +value.

+
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-DF4D8745-B6D4-4BC4-AF2D-0F71F28E9F27.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-DF4D8745-B6D4-4BC4-AF2D-0F71F28E9F27.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,34 @@ + + +setPreferenceForKey()

setPreferenceForKey()

+

Description:

+

The setPreferenceForKey method allows a key to be stored along with its associated preference. The arguments are like name and value pairs. The preference value for the key is stored persistently, so if the widget or device is restarted, the value is retained. However, the values stored by a widget are removed when a widget is uninstalled from the device. This includes the case when a widget is reinstalled; where the old widget is uninstalled, the new widget is installed.

+

An existing preference can be overwritten with a new value by simply calling the method with the same key and new value.

+

A stored preference for a key can be removed by calling the method with the preference argument set to null

+

Syntax:

+
[void] window.widget.setPreferenceForKey(String preference, String key) 
+

or

+
[void] widget.setPreferenceForKey(String preference, String key)
+

Arguments:

+
    +
  • preference:

    + +

    A text string specifying a reusable value to be stored.

    + +
  • +
  • key:

    + +

    A short text string defined as the name of the preference to be stored.

    + +
  • +
+

Return value:

+

This method does not return a value.

+

Example code:

+
// Save the inputted Search key
+var searchArg = document.forms[0].searchKey.value;
+widget.setPreferenceForKey('searchKey',searchArg);
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-DFEDF3BF-BA73-4418-815C-83B80B888821.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-DFEDF3BF-BA73-4418-815C-83B80B888821.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,101 @@ + + +IMessaging.RegisterNotification()

IMessaging.RegisterNotification()

+

Description:

+

The RegisterNotification method registers the widget to receive notifications of new incoming messages. +For each new message, the method returns the header information of that message.

+

This is an asynchronous method.

+

Syntax:

+
result = so.IMessaging.RegisterNotification(criteria, callback);
+ +

Arguments:

+
    +
  • criteria:

    + +

    This is an object that specifies the request for notification of new +messages. The object must contain the Type property (string), +and this property must contain the value "NewMessage":

    +
    criteria.Type = "NewMessage";
    + + +
  • +
  • callback:

    + +

    The callback argument is the name of the method +that is executed when RegisterNotification has results +or status information to return. You must define this method separately. Follow +the instructions in section Defining the callback handler for an asynchronous method to +define the callback method.

    + +
  • +
+

Return value:

+

The RegisterNotification method returns an object +that contains the initial return value for the asynchronous call it started +(see the following table). The actual notification information is returned +by the callback method +in the ReturnValue property of its result object. The +returned information is described in section Returned notification information.

+
+ + + + + + + + + + + + + + + + + + + + + +
Table: Return value +properties for RegisterNotification
+

Property

+
+

Description

+
+

Value

+
+

result.TransactionID

+
+

This is a number used as an identification to match transactions started +with a RegisterNotification call to one or more calls +it generates to callback.

+
 
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See Messaging Service API error messages.

+
+

Remarks:

+

RegisterNotification retrieves new message updates +until cancelled with CancelNotification (or Cancel). +You can therefore have only one RegisterNotification call +(one instance) pending or in use at any given time.

+

Example code:

+

+

For the complete source of a sample widget +that demonstrates how to use this Service API, see the full example.

+ + +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-E0223DD8-CB25-4990-A369-F2B0A67193B2.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-E0223DD8-CB25-4990-A369-F2B0A67193B2.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,33 @@ + + +Legal notice

Legal notice

+

Copyright © 2009 Nokia Corporation. All rights reserved.

+ +

Nokia and Nokia Connecting People are +registered trademarks of Nokia Corporation. Java and all Java-based marks +are trademarks or registered trademarks of Sun Microsystems, Inc. Other product +and company names mentioned herein may be trademarks or trade names of their +respective owners.

+

Disclaimer

+ +

The information in this document is provided “as is,” with no warranties +whatsoever, including any warranty of merchantability, fitness for any particular +purpose, or any warranty otherwise arising out of any proposal, specification, +or sample. This document is provided for informational purposes only.

+

Nokia Corporation disclaims all liability, including liability for infringement +of any proprietary rights, relating to implementation of information presented +in this document. Nokia Corporation does not warrant or represent that such +use will not infringe such rights.

+

Nokia Corporation retains the right to make changes to this document +at any time, without notice.

+
+

License

+ +

A license is hereby granted to download and print a copy of this document +for personal use only. No other license to any other intellectual property +rights is granted herein.

+
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-E092BF10-C076-4476-9E80-87919940201B.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-E092BF10-C076-4476-9E80-87919940201B.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,77 @@ + + +Accessing +and launching installed applications

Accessing +and launching installed applications

+

The AppManager +Service API allows widgets to access and launch applications +on a device. You can use the AppManager Service to create widgets that:

+
    +
  • Retrieve a list of user-installed applications

  • +
  • Retrieve a list of all applications on the mobile device, +regardless of whether they were preinstalled or installed by the user

    +
  • +
  • Launch an application based on an application UID

    +
  • +
  • Launch an application based on a given document or MIME type

    +
  • +
+

The service allows widgets to launch applications as chained +(embedded) or stand-alone. This provides the following functionality:

+
    +
  • Embedded applications are launched within another application +and share the same process. All UI features (such as the options list and +icons displayed in the header) belong to the launching application, not the +embedded application. For example, embedding the browser to display HTML within +an SMS message is a typical use case. In this case, all UI features belong +to the messaging application.

  • +
  • Stand-alone applications are independent of other applications +- they do not share the same process. Applications can launch other applications +as stand-alone, in which case they run as peer applications. For example, +launching the browser when a user selects a URL within an SMS message is a +typical use case. In this case, the user can swap between the browser and +messaging applications.

  • +
+

Accessing the API and supported methods

+

To create a service +object for the AppManager Service API, use Service.AppManager to +identify the service provider and IAppManager to identify +the supported interface:

+ +
var so = device.getServiceObject("Service.AppManager", "IAppManager");
+

The IAppManager interface provides the following +methods:

+
    +
  • GetList()

    + +

    Use the GetList() method to get a list of user-installed +applications or all applications on the mobile device.

    + +
  • +
  • LaunchApp()

    + +

    Use the LaunchApp() method to launch +an application based on the application UID. Use GetList() to +retrieve the correct UID.

    + +
  • +
  • LaunchDoc()

    + +

    Use the LaunchDoc() method to launch an application +based on a given document or a MIME type.

    + +
  • +
  • Cancel()

    + +

    Use the Cancel() method to cancel an ongoing asynchronous +call. This method is valid for any asynchronous call made through the AppManager +Service API.

    + +
  • +
+

+

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-E0ED671A-BBDA-4C07-828F-BD35782D9B36.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-E0ED671A-BBDA-4C07-828F-BD35782D9B36.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,91 @@ + + +Accessing +and modifying system information

Accessing +and modifying system information

+

The SystemInfo +Service API of WRT 1.1 allows widgets to +access and modify system information on a device. System information is represented +as a set of system attributes. You can use the SystemInfo Service to create widgets that:

+
    +
  • Read and modify system attribute values

  • +
  • Notify the user when system attribute values change

    +
  • +
+

The system attributes are grouped into the following categories:

+
    +
  • Battery

  • +
  • Connectivity

  • +
  • Device

  • +
  • Display

  • +
  • Features

  • +
  • General

  • +
  • Memory

  • +
  • Network

  • +
+

Only a few system attributes are modifiable and support change notifications. +For more information about system attributes, see section System attributes

+

Accessing the API and supported methods

+

To create a service +object for the SystemInfo Service API, use Service.SysInfo to +identify the service provider and ISysInfo to identify +the supported interface:

+ +
var so = device.getServiceObject("Service.SysInfo", "ISysInfo");
+

The ISysInfo interface provides the following methods:

+
    +
  • GetInfo()

    + +

    Use the GetInfo() method to retrieve information +about a system attribute.

    + +
  • +
  • SetInfo()

    + +

    Use the SetInfo() method to modify the value of +a system attribute.

    + +
  • +
  • GetNotification()

    + +

    Use the GetNotification() method to receive a notification +when the value of a system attribute is changed.

    + +
  • +
  • Cancel()

    + +

    Use the Cancel() method to cancel an ongoing asynchronous +call. This method is valid for any asynchronous call made through the SystemInfo +Service API.

    + +
  • +
+
+

Using the service in a widget

+

To access and modify system information using the SystemInfo Service +API:

+
    +
  1. Create a service +object for the API using device.getServiceObject().

    +
  2. +
  3. Define the +tasks you want to perform and choose the correct methods for them.

    +
  4. +
  5. Optionally, +define how you want the results filtered.

  6. +
  7. Define methods +to process the results.

  8. +
  9. Retrieve the +results using the methods from step 2. Use asynchronous methods together with callback().

    +
  10. +
  11. Process the +results using the methods defined in step 4.

  12. +
+

For the complete source of a sample widget that demonstrates how to +use this service, see the +full example.

+
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-E138B464-2086-4E74-B356-ACF8687BBB5A.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-E138B464-2086-4E74-B356-ACF8687BBB5A.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,110 @@ + + +IDataSource.New()

IDataSource.New()

+

Description:

+

The New method creates an empty landmark or landmark +category item. You can use the new item as a template.

+

This is a synchronous method.

+

Syntax:

+ +
result = so.IDataSource.New(criteria);
+

Arguments:

+
    +
  • criteria:

    + +

    This is an object that specifies the type of item to create. The following +table describes the properties of this object.

    + +
  • +
+
+ + + + + + + + + + +
Table: Criteria object properties
+

Property

+
+

Description

+
+

Value

+
+

criteria.Type

+
+

This is a text string that specifies the type of item to create.

+
+

Possible values:

+
    +
  • "Landmark"

  • +
  • "Category"

  • +
+
+

Return value:

+

The New method returns an object that contains +the empty item that it created, an error code, and an error message.

+
+ + + + + + + + + + + + + + + + + + + + +
Table: Return value +properties for New
+

Property

+
+

Description

+
+

Value

+
+

result.ReturnValue

+
+

This is an object that contains the empty landmark or landmark category +item.

+
+

See Landmark or Landmark category, depending on which +type of item was created.

+
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See Landmarks Service API error messages.

+
+

Example code:

+

+

For the complete source of a sample widget +that demonstrates how to use this Service API, see the +full example.

+ + +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-E2FDB3FB-2B5E-430C-81B5-9C0C22C4CC04.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-E2FDB3FB-2B5E-430C-81B5-9C0C22C4CC04.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,72 @@ + + +IMessaging.CancelNotification()

IMessaging.CancelNotification()

+

Description:

+

The CancelNotification method cancels notification +of new incoming messages.

+

This is a synchronous method.

+

Syntax:

+
result = so.IMessaging.CancelNotification(criteria);
+ +

Arguments:

+
    +
  • criteria:

    + +

    This is an object that specifies the request for cancelling notification +of new messages. The object must contain the Type property +(string), and this property must contain the value "NewMessage":

    +
    criteria.Type = "NewMessage";
    + + +
  • +
+

Return value:

+

The CancelNotification method returns an object +that contains an error code and an error message.

+
+ + + + + + + + + + + + + + + + +
Table: Return value +properties for CancelNotification
+

Property

+
+

Description

+
+

Value

+
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See Messaging Service API error messages.

+
+

Example code:

+

+

For the complete source of a sample widget +that demonstrates how to use this Service API, see the full example.

+ + +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-E3D26890-581A-427F-8AFF-16081528A8B8.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-E3D26890-581A-427F-8AFF-16081528A8B8.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,71 @@ + + +Accessing +information about media files stored on a device

Accessing +information about media files stored on a device

+

The Media Management +Service API allows widgets to retrieve information about +the media files stored in the Media Gallery of a device. You can use the Media +Management Service to access information about the following types of media:

+
    +
  • Music

  • +
  • Sounds

  • +
  • Images

  • +
  • Video

  • +
  • Streaming media

  • +
+

Using the Media Management Service, you can create widgets, +such as a custom photo viewer or audio player, that display or otherwise incorporate +media.

+

Accessing the API and supported methods

+

To create a service +object for the Media Management Service API, use Service.MediaManagement to +identify the service provider and IDataSource to identify +the supported interface:

+ +
var so = device.getServiceObject("Service.MediaManagement", "IDataSource");
+

The IDataSource interface provides the following +methods:

+
    +
  • GetList()

    + +

    Use the GetList() method to retrieve information +from a given service or data source on the device.

    + +
  • +
  • Cancel()

    + +

    Use the Cancel() method to cancel an ongoing asynchronous +call. This method is valid for any asynchronous call made through the Media +Management Service API.

    + +
  • +
+
+

Using the service in a widget

+

To access media file information using the Media Management Service +API:

+
    +
  1. Create a service +object for the API using device.getServiceObject().

    +
  2. +
  3. Define the +type of media about which you want to retrieve information.

  4. +
  5. Optionally, +define how you want the results sorted.

  6. +
  7. Define a handler +method to process the results.

  8. +
  9. Retrieve the +media file information using GetList() together +with callback().

    +
  10. +
  11. Process the +results in the handler method defined in step 4.

  12. +
+

For the complete source of a sample widget that demonstrates how to +use this service, see the full example.

+
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-E3EA4F85-E0AE-42AB-8E51-EFD3F0E0A51E.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-E3EA4F85-E0AE-42AB-8E51-EFD3F0E0A51E.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,23 @@ + + +Supporting multiple languages

Supporting multiple languages

The S60 platform supports multiple languages, and mobile device users can select the language used by their devices for UI texts. The Web Runtime (WRT) environment provides localization support, so if you plan to provide your widget to mobile device users in multiple countries around the world, you should consider supporting several languages in your widget.

+

In addition to UI text strings that are language dependent, a widget may contain data types that require localization according to the target country or region. Examples of such data types include date and time formatting, time zone and currency. Also images may need to be localized.

+

Note: To enable localization of your widget, do not hard code text strings in your widget HTML or JavaScript files.

+

The WRT environment uses different language versions of a widget through resource loading. You need to implement localization information for your widget in resource-specific files that you store under language project directories. When a resource that is defined relatively to the widget root directory is to be loaded, the system first looks for the resource within the language project directory that matches with the current device language. If the localized resource is found, it is loaded and used. Otherwise the default resource under the root directory of the widget is loaded. The resources for the default language are always stored directly under the root directory.

+

For an example of localizing a widget, see Localizing STEW.

+

To support multiple languages

    +
  1. Create a language project directory at the root level of your widget for each language that you plan to support, for example en.lproj and fi.lproj for English and Finnish.

    Note: You do not need to create a language project directory for the default language, as the files for the default language are stored directly at the root of the widget.

  2. +
  3. Localize the display name of the widget using infoplist.strings files.

  4. +
  5. Localize the display texts of the widget using separate JavaScript files for text strings.

  6. +
  7. Localize any resources, such as images, if they are language or region dependent.

  8. +
+

Selecting the widget language

The WRT environment loads localized resources from language project directories only when the location of the resources is defined relatively to the root directory of the widget. Localized resources are used in the following contexts:

    +
  • The @import directive is used in the main HTML document. For example:

    @import "localizedStyle.css"
  • +
  • A resource is loaded dynamically using JavaScript code. For example:

    document.getElementById('image').setAttribute('src', 'image.jpg');
  • +
  • The src attribute of an HTML tag is used. For example:

    <script src='localizedScript.js' />
    +<img src="localizedImage.gif" />
  • +

Checking the current language setting of the device and using that language for the widget is done automatically when the widget is launched. If the user changes the language setting of the device while the widget is running, this will cause the widget to exit and the mobile device to reboot.

Note: Changing the language of the widget may also affect the layout of the UI. For example, supporting a right-to-left language in your widget may require that you mirror some UI components around the Y axis. To localize the widget layout, use CSS files for each layout type and specify the file in the main HTML file. For more information, see section Localizing widget layout.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-E5684FF0-28C9-4721-9421-6B9432087086.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-E5684FF0-28C9-4721-9421-6B9432087086.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,38 @@ + + +JavaScript Media +Management Service API

JavaScript Media +Management Service API

+

The Media Management +Service API is supported since WRT 1.1.

+

The Media Management Service API allows widgets to retrieve information +(metadata) about the media files stored in the Media Gallery of a device. +The API is integrated into WRT through the device object.

+

For an overview of the service and the API, see section Accessing information about media files stored on a device.

+

Using the Media Management Service API

+

To use the Media Management Service API, your widget must first create a service object for it +using the device.getServiceObject() method. +Use Service.MediaManagement to identify the service provider +and IDataSource to identify the supported interface:

+
var so = device.getServiceObject("Service.MediaManagement", "IDataSource");
+ +

This service object can then be used to access the services provided +by the API:

+ +
+

Emulator support

+

The S60 5th Edition SDK emulator provides full support for the Media +Management Service API.

+

Retrieving media file information from a memory card is only possible +on a physical device. In the emulator, drive E: simulates the memory card +installed on a physical device.

+
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-E5AF6C82-3A6E-47DE-BF58-750D97AAD70E.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-E5AF6C82-3A6E-47DE-BF58-750D97AAD70E.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,20 @@ + + +Widget development process

Widget development process

+

The widget development process includes several steps. It is important that you go through all these steps.

+

To develop a widget for S60 mobile devices:

+
    +
  1. Define the purpose and scope of your service and design the widget.

    Before starting widget development, analyze and define the requirements, scope, and functionality of the widget to ensure efficient functionality and a smooth user experience. Design the widget for a single purpose and analyze how it can best serve its users. Carefully consider the special features of the mobile device environment when you design the implementation. For more information, see Designing widgets.

    This step also involves choosing the Web Runtime (WRT) version for which you develop the widget. Different versions support different features. The functionality of the widget determines which features it uses. While the WRT environment is backward-compatible, so that widgets created for an earlier version run also on a newer one, the opposite is not guaranteed. The WRT version you choose thus determines not only the available features for implementing your widget but also the range of devices that can run the widget. For more information, see sections Web Runtime features and Web Runtime versions and device support.

    Your design should also take into consideration whether the target devices support user interaction by touch and running widgets on the home screen. For more information on home screen widgets, see Introduction to home screen widgets.
  2. +
  3. Create the widget functionality and all the required component files.

    Widgets are based on standard Web technologies, so you can develop your widget using the same tools that you would use to create Web content. For instructions on how to implement the widget functionality, see section Developing widgets. For more information on the required widget component files, see section Widget component files. For code examples, see the section Web Runtime API reference and the Web Runtime Code Examples available at Forum Nokia.

    It is also possible for you to port existing widgets from the Web or desktop environment to S60 mobile devices. For more information on important porting related considerations and changes that you may need to make, see section Porting widgets.

  4. +
  5. Create the widget installation package:

      +
    1. Select the file system directory that contains the widget component files.

    2. +
    3. Right-click to create a ZIP archive of the directory using a ZIP utility, such as WinZip.

      Note: The directory must be included in the ZIP archive. That is, the root of the ZIP archive must contain the directory, which in turn contains the widget component files.

    4. +
    5. Rename the ZIP file manually to have a .wgz extension.

    6. +
  6. +
  7. Test the widget.

    You can test your widget on a compatible S60 mobile device or on the emulator included in the S60 C++ SDK. For more information on testing widgets, see section Testing your widget.

  8. +
  9. Publish the widget and offer it to end users for installation on S60 mobile devices.

    For more information on deploying widgets, see section Deploying widgets.

  10. +
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-E6C99179-3126-49F6-8E40-FB07E6FF8E38.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-E6C99179-3126-49F6-8E40-FB07E6FF8E38.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,15 @@ + + +chargerconnected

chargerconnected

+

Syntax:

+
[boolean] sysinfo.chargerconnected;
+

Description:

+

This is a read-only property that returns a Boolean value indicating the status of the changer.

+

If the charger is connected, the returned value is 1; otherwise it is 0.

+

For more general information on power consumption and widgets, see Saving battery time.

+

Example code:

+

See the example code in onchargerconnected.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-E6FAAB7C-EE2D-4464-9D0F-B1D89E26ABCF.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-E6FAAB7C-EE2D-4464-9D0F-B1D89E26ABCF.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,114 @@ + + +IDataSource.Delete()

IDataSource.Delete()

+

Description:

+

The Delete method deletes one or more contacts +or contact groups from a contacts database. The information is deleted from +the specified database or, if no database is specified, from the default one.

+

This method can be called both synchronously and asynchronously.

+

Syntax:

+

For synchronous calls:

+
result = so.IDataSource.Delete(criteria);
+ +

For asynchronous calls:

+
result = so.IDataSource.Delete(criteria, callback);
+ +

Arguments:

+
    +
  • criteria:

    + +

    This is an object that specifies which contacts or contact groups to +delete and from which database. For more information about the object properties +and how to define them, see section Criteria for deleting contact information.

    + +
  • +
  • callback:

    + +

    The callback argument is the name of the method +that is executed when an asynchronous Delete call has +results or status information to return. You must define this method separately. +Follow the instructions in section Defining the callback handler for an asynchronous method to +define the callback method.

    +

    This argument is used only with an asynchronous Delete call.

    + +
  • +
+

Return value:

+

If synchronous, the Delete method returns an object +that contains an error code and an error message.

+

If asynchronous, the method returns an object that contains a transaction +ID for the callback instance, +an error code, and an error message. When the asynchronous call has completed, callback returns +an object that contains an error code and an error message (see Table: Callback return value).

+
+ + + + + + + + + + + + + + + + + + + + + +
Table: Return value +properties for Delete
+

Property

+
+

Description

+
+

Value

+
+

result.TransactionID

+
+

This is a number used as an identification to match transactions started +with an asynchronous Delete call to one or more calls +it generates to callback.

+

This property is only valid for asynchronous calls.

+
 
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See Contacts Service API error messages.

+
+

Remarks:

+
    +
  • The default contacts database is cntdb://c:contacts.cdb. +The SIM card database is sim://global_adn.

  • +
  • The contacts or contacts groups to be deleted must exist +in the specified database. Use GetList to +retrieve the IDs of the entries you want to delete.

  • +
  • If you delete a contacts group, the contacts associated with +that group are not deleted. Only the group item is deleted.

  • +
+

Example code:

+

+

For the complete source of a sample widget +that demonstrates how to use this Service API, see the +full example.

+ + + + +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-E75BCEAE-6673-4ADF-9DC2-058F0C8C0DBB.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-E75BCEAE-6673-4ADF-9DC2-058F0C8C0DBB.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,34 @@ + + +Using focus

Using focus

Placing focus points on items on screens allows users to select them. For example, users can activate text fields to type text, open lists to select items, or press buttons to execute functions. When using mobile devices, users have a shorter attention spans and are frequently distracted from the task at hand. You should not trust users to remember what they were doing on the device before they were distracted. Make the focus of the controls stand out visually by highlighting it on the screen. You can highlight items by placing a border around buttons or text fields or by using a selection bar in lists.

+

Specifying focus points

Use the five point navigation key to move the focus between items on the screen. Observe the following general rules:

    +
  • You can specify several focus points within a widget. You do not need to activate focus points separately.

  • +
  • Decide which focus point the focus is on when the widget opens.

  • +
  • On key press, move focus to the closest focus point in the selected direction.

  • +
  • You can allow users to select focus points to open applications, perform functions, and open popup windows.

  • +

For examples of setting focus, see the AccuWeather Example on Forum Nokia.

+

Using focus on touch devices

On touch devices, users can use a finger or stylus to select items on screens. To allow users to perform their tasks fluently, enable direct manipulation of items and minimize the need to switch from touch to hardware keys. Allow users to complete their tasks using the same interaction method that they started it with.

+

To specify focus points within widgets

Use the HTML Document Object Management (DOM) focus() method to set focus on a DOM text object.

<html>
+<head>
+<script type="text/javascript">
+function setFocus()
+  {
+  document.getElementById('text1').focus()
+  }
+function loseFocus()
+  {
+  document.getElementById('text1').blur()
+  }
+</script>
+</head>
+<body><form>
+<input type="text" id="text1" />
+<br />
+<input type="button" onclick="setFocus()" value="Set focus" />
+<input type="button" onclick="loseFocus()" value="Lose focus" />
+</form></body>
+</html>
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-E869B263-7EBF-4590-890B-563871C438C6.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-E869B263-7EBF-4590-890B-563871C438C6.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,33 @@ + + +remove()

remove()

+

Description:

+

Call the remove method to remove a child menu item +and its children (if any) from the parent menu item.

+

Syntax:

+
[void] MenuItem.remove(MenuItem childMenuItem) 
+

Arguments:

+
    +
  • childMenuItem:

    + +

    This is an instance of the MenuItem object +which is being removed from the parent menu item. See also the menu.remove method description for instructions on how to remove a menu item +from the top level of the options menu list.

    + +
  • +
+

Return value:

+

This method does not return a value.

+

Remarks:

+

To remove a menu item and its children from the top level of the options +menu list, use the menu object's +method. See the menu.remove method +description.

+

For more general information on using an options menu in your widget, +see Using softkeys.

+

Example code:

+

See the example code in the description of the MenuItem.onSelect property.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-E8E82EBC-05E6-49A2-9451-BF02986BCEE8.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-E8E82EBC-05E6-49A2-9451-BF02986BCEE8.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,33 @@ + + +preferenceForKey()

preferenceForKey()

+

Description:

+

The preferenceForKey method allows a previously stored preference to be restored.

+

Syntax:

+
[string] window.widget.preferenceForKey(String key) 
+

or

+
[string] widget.preferenceForKey(String key)
+

Arguments:

+
    +
  • key:

    + +

    A text string specifying the name that represents the preference to be restored.

    + +
  • +
+

Return value:

+

A text string contains the preference value associated with the specified key.

+

If the key does not exist, the return value is "undefined".

+

Example code:

+
// Check for the existence of searchKey
+if(widget.preferenceForKey('searchKey'))
+{
+ // get the searchKey from the preference
+ var searchArg = widget.preferenceForKey('searchKey');
+ // set the search argument to the search field
+ document.forms[0].searchKey.value = searchArg;
+}
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-E9A578AA-58C5-4902-B418-4CE44EA40D5D.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-E9A578AA-58C5-4902-B418-4CE44EA40D5D.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,16 @@ + + +Accessing +system information and controlling device features

Accessing +system information and controlling device features

\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-EAE0823B-5914-49C2-9DBC-15B61DE49E60.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-EAE0823B-5914-49C2-9DBC-15B61DE49E60.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,27 @@ + + +Managing widgets on mobile devices

Managing widgets on mobile devices

+

Managing widgets on a mobile device is very straightforward, as most of the management is performed automatically by the S60 platform and the Web Runtime (WRT) environment. Managing a widget means handling its general cooperation with the platform and other applications on the device, including:

+
    +
  • Launching a widget

  • +
  • Moving a widget to the background or foreground

  • +
  • Exiting a widget

  • +
  • Creating a self-updating widget

  • +
+

Launching a widget

When you implement the widget deployment correctly, a widget can be installed successfully on a mobile device. Once installed, the widget is treated in many ways the same as any mobile application. First of all, it is automatically added to the S60 application menu. Users can launch the widget by navigating to it and opening it, or possibly by pressing a softkey. In addition to creating all the mandatory widget component files, with all the mandatory properties defined, no special registering is required to enable launching.

For more information on launching widgets, see section Introduction to widgets.

+

Moving a widget to the background/foreground

When a widget is running, it is automatically moved to the background if there is an incoming call, for example. If you launch an S60 mobile application from your widget, it appears in the foreground and the widget is moved to the background. When the application is closed, the widget returns to the foreground. The same happens when you launch a Web page from your widget. The Web page is accessed using the Web Browser for S60.

For more information on launching an application from a widget, see the openApplication() method in the Web Runtime API reference. For more information on launching a Web page, see the openURL() method.

You can make your widget react in a certain way when it is moved to the foreground or to the background by using the onshow and onhide properties.

+

Exiting a widget

Users can exit a widget in several ways:

    +
  • Right softkey

    The right softkey is, by default, assigned to the "Exit" function, which terminates a running widget. So if you have not associated a new operation with the right softkey, your widget exits when the user presses this softkey.

    Note: The control pane that shows the softkey labels is hidden by default in widgets. To have the softkey labels visible, use the showSoftkeys() method. To hide the softkey labels again, call hideSoftkeys().

  • +
  • Options menu

    There is also an Exit option in the Options menu of every widget. This requires no implementation in the widget code. For more information on the Options menu, see section Using softkeys and the JavaScript menu object in the Web Runtime API reference.

    Figure: Exiting a widget using the Options menu

  • +
  • Call termination key

    If users press the call termination key, the widget automatically exits. This functionality requires no implementation in the widget code.

    Figure: Call termination key

  • +
+

Creating self-updating widgets

In the JavaScript code of your widget, you can implement functionality that enables the widget to update itself without user action. Updates require a Web service or server from which the widget can query information on possible new widget versions.

To enable self-updating in a widget:

    +
  1. Use a variable for indicating the current version of the widget.

  2. +
  3. Send XMLHttpRequest to the Web server to query whether there is a new version of the widget available.

    The reply sent by the Web server should include a URL for the widget update.

  4. +
  5. Compare the server answer to the value of the current version variable.

  6. +
  7. If there is a newer version of the widget available on the server, launch the browser using the URL of the new widget version.

    When the new version of the widget has been downloaded to the mobile device, the S60 Software Installer receives the widget and installs it on top of the old version.

  8. +

For an example of how to create a self-updating widget, see How to create self-updating WRT widgets available at Forum Nokia.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-EB2043BB-E557-429B-BA0A-E350A6D06597.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-EB2043BB-E557-429B-BA0A-E350A6D06597.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,21 @@ + +Designing STEW user interface

Designing STEW user interface

This example describes how to design a usable user interface for a widget.

+
+

Designing a usable widget user interface comprises the following tasks:

+ +

To create STEW

    +
  1. Download the STEW home screen widget source files to your computer.

  2. +
  3. Follow the instructions to create STEW.

  4. +
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-EC9DB569-733E-47A8-AD2D-B878B38660B9.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-EC9DB569-733E-47A8-AD2D-B878B38660B9.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,80 @@ + + +Presenting content on screens

Presenting content on screens

You can retrieve widget content from Web sites. On devices that support the Web Runtime (WRT) 1.1 environment, you can also retrieve content from the device, such as messages or calendar entries. To keep response times short and avoid cluttering the screen, display only content that is relevant to users. To make the content dynamic rather than static, design ways for refreshing it when necessary.

+

Making the most important content obvious

Display the most relevant information first and reserve enough space around it on the screen. You can hide options in a menu or on other views.

Use colors and symbols to highlight and group related items. For design principles and examples, see Ensure visual balance and clear focus indication.

+

Refreshing content

If you fetch the content from the device, use timers to update it frequently. For more information on using timers effectively, see Saving battery time. If you fetch the content from a Web site, allow users to determine how often to refresh content. You can provide them with a refresh interval setting or refresh option.

If refreshing data fails, show the latest update. Display error messages or indicate graphically that refreshing the information failed.

+

To add a refresh option

    +
  1. Use the MenuItem object constructor to create the Refresh menu item.

  2. +
  3. Use the append() method of the JavaScript menu object to add the Refresh item to the Options menu.

  4. +
  5. Assign functions to the menu items using the onSelect property of the MenuItem object.

  6. +

For more information on how to add an item to the options menu, see Using softkeys.

For example code, see the example of creating a menu in the Web Runtime API reference.

+

To add a refresh interval setting

    +
  1. Use the instructions above to add a Settings item to the Options menu.

  2. +
  3. Create a Settings page.

  4. +
  5. Create a Refresh setting.

    For example, the following code in the main HTML file creates a selection list with different options to refresh the screen.

    <tr>
    +	<td class="table_subtitle">MiniView Refresh</td>
    +</tr>
    +<tr>
    +	<td class="select_container">
    +		<select id="drop_refresh">
    +			<option value="30000">30 seconds</option>
    +			<option value="100000">1 minute</option>
    +			<option value="200000">2 minutes</option>
    +			<option value="500000">5 minutes</option>
    +		</select>
    +	</td>
    +</tr>

    Figure: Settings page with refresh options

  6. +
  7. Implement the functions to refresh the data in your code.

    MiniView.prototype.onActivated = function() {
    +	// Get the refresh rate.
    +	var refresh = parseInt( widget.preferenceForKey( SettingsScreen.KEY_REFRESH ) );
    +	if ( isNaN( refresh ) ) {
    +		refresh = 30000; // Default to 30 seconds.
    +	}
    +
    +	// Start the timer which refreshes the miniview.
    +	var self = this;
    +	this.timerId = setInterval( function(){
    +		self.refresh();
    +	}, refresh );
    +	
    +	// Timer will trigger after the refresh period so refresh manually now.
    +	this.refresh();
    +}
    +
    +MiniView.prototype.refresh = function() {
    +	var self = this;
    +	twitterService.onSuccess = function( response ) { self.onTwitterResponse( response ) }
    +	twitterService.onError = function( status ) { self.onTwitterError( status ) }
    +	
    +	twitterService.getPublicTweets( 3 );
    +}MiniView.prototype.onDeactivated = function() {
    +	// Stop timer.
    +	clearInterval( this.timerId );	
    +}
    +
    +MiniView.prototype.onTwitterResponse = function( response ) {
    +	// Fill in dummy data here.
    +	var tweetsTable = document.getElementById( "mini_view_table" );
    +	var html = Helper.createTableHeader( "Friends and my tweets" );
    +
    +	// Fill in the table.
    +	for ( var i = 0; i < response.length; ++i ) {
    +		var tweet = response[i];
    +		
    +		html += Helper.createStatusRow( tweet.user.profile_image_url,
    +			tweet.user.screen_name,
    +			tweet.text, "", "" );
    +	}
    +	
    +	tweetsTable.innerHTML = html;
    +}
    +
    +MiniView.prototype.onTwitterError = function( status ) {
    +	var tweetsTable = document.getElementById( "mini_view_table" );
    +	tweetsTable.innerHTML = "Error...";
    +}
  8. +

For a full example, see the STEW example.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-ED04600B-B079-4BC9-84B1-507604C09A4C.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-ED04600B-B079-4BC9-84B1-507604C09A4C.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,14 @@ + + +Working with images

Working with images

Even though devices support complicated animations and 3D images, they consume processing power. If an application uses a lot of resources, keep the graphics as light as possible and maintain a balance between nice graphics and resource consumption. Consider the different graphics formats that are available and optimize the image size. Also, consider which graphics are necessary for the application, and which can be removed if performance is negatively affected. You can also set an image as the widget background.

+

For more information on incorporating different image types, see:

+ +

For more information about optimizing image size for mobile devices, see Using graphics and scripting effectively.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-ED95464B-9BA7-4294-A06F-CA80429B70ED.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-ED95464B-9BA7-4294-A06F-CA80429B70ED.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,25 @@ + + +showSoftkeys()

showSoftkeys()

+

Description:

+

Call the showSoftkeys method to display the softkey +pane at all times.

+

By default, the device's softkey pane is hidden. The softkey pane is +shown either by programmatically calling the showSoftkeys method +or when the end user presses one of the softkeys.

+

For more general information on using softkeys in your widget, see Using softkeys.

+

Syntax:

+
[void] window.menu.showSoftkeys(void) 
+

or

+
[void] menu.showSoftkeys(void)
+

Arguments:

+

This method takes no arguments.

+

Return value:

+

This method does not return a value.

+

Example code:

+
 // choose to show the softkey pane at all times
+ window.menu.showSoftkeys();
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-EDB0A0D5-D7D7-460A-8D1B-BB7890B85782_d0e10362_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-EDB0A0D5-D7D7-460A-8D1B-BB7890B85782_d0e10362_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-EE119DD2-C37A-473C-B428-21408867D583.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-EE119DD2-C37A-473C-B428-21408867D583.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,96 @@ + + +Customizing screen controls

Customizing screen controls

You cannot change the size of the standard HTML radio buttons and check boxes. To make them bigger, you must design your own controls. You only need to do this for touch devices.

+

Check boxes and radio buttons are composed of two elements: input and label. The label element contains the text associated with the control whereas the input is the actual check box. Even if you increase the font size of the label to make it bigger, the control remains small. To create a larger control, position the check box or radio button off-screen to hide it by setting it a negative absolute position. Then set a background image for the label that looks like a check box or a radio button. Offset the label text to reveal the background image which shows the control.

+

Figure: Customizing check boxes and radio buttons

+

For an example of how to create custom controls, see the STEW example files.

+

To create custom controls

Figure: STEW Settings view with custom controls

    +
  1. Wrap the input and label in an unordered list (ul) to enable absolute vertical positioning of the input element and top-down navigation:

    <ul class="cb">
    +	<li><input id="login_remember_me" type="checkbox"><label id="loginLabelRememberMe" for="login_remember_me"></label></li>
    +</ul>
    +
  2. +
  3. Add styles for the HTML elements to the CSS file. Reset default layout for the ul and li elements and bulleted lists. Position the input element off-screen by setting it a negative absolute position, and specify an image for the label background.

    /* ************************* */
    +/* BIGGER CHECKBOX FOR TOUCH */
    +/* ************************* */
    +.cb {
    +	list-style: none;
    +	padding: 0;
    +	margin: 0;
    +}
    +
    +.cb li{
    +	padding: 0;
    +	margin: 0;
    +}
    +
    +.cb li label {
    +	background: transparent url(images/checkbox.png) no-repeat scroll 0 6px;
    +	padding: 8px 0 5px 30px;
    +	display: block;
    +	font-size: 20px;
    +	font-weight: bold;
    +	height: 25px;
    +}
    +
    +.cb li.checked label {
    +	background-image: url(images/checkbox_activated.png);
    +}
    +
    +.cb li input {
    +	position: absolute; left: -9999px;
    +}
    +
  4. +
  5. To add logic to custom controls, add JavaScript code to the constructor of the LoginScreen object in the LoginScreen.js file. The following code implements the functionality of the Remember Me check box:

    function LoginScreen() {
    +	...
    +	this.cbRememberMe = document.getElementById( "login_remember_me" );
    +	// Click handling via styles for touch screens.
    +	this.cbRememberMe.onclick = function() {
    +		Helper.handleCustomControlClick( self.cbRememberMe );
    +	};
    +}
    +
  6. +
  7. Assign a function to the onclick event handler of the custom control and call a helper function that changes the style of the parent item depending on whether the checked property is set for the control:

    handleCustomControlClick: function( control ) {
    +	control.parentNode.className = control.checked ? "checked" : "";
    +}
    +

    Assign the event handler to the input control and set the style to the parent node of the input element to enable using the HTML input as the basis of the control even though it is off-screen, and therefore invisible. Style the label element of the container list item, but get the parent node instead of searching for a sibling item of the appropriate type. The state of the control and events is reused from the input and label HTML composite, and therefore you need not implement them.

  8. +
  9. To hide the custom controls on smaller screens and devices that do not support touch, redefine the styles and reposition all controls in the CSS file:

    /* *************************** */
    +/* CLEAR THE STYLES FOR BIGGER */
    +/* CHECKBOX FOR TOUCH          */
    +/* *************************** */
    +.cb {
    +	list-style: none;
    +	padding: 0;
    +	margin: 0;
    +}
    +
    +.cb li{
    +	padding: 0;
    +	padding-bottom: 3px;
    +	margin: 0;
    +	position: relative;
    +	clear: both;
    +}
    +
    +.cb li label {
    +	padding: 2px 0 0 17px;
    +	background: none;
    +	font-weight: bold;
    +	font-size: 12px;
    +	float: left;
    +}
    +
    +.cb li.checked label {
    +	background-image: none;
    +}
    +
    +.cb li input {
    +	float: left;
    +	left: auto;
    +	display: block;
    +}
    +
  10. +
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-EEC3199A-50A8-4A26-914D-B66CB9CA1271.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-EEC3199A-50A8-4A26-914D-B66CB9CA1271.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,11 @@ + + +lighttargetsystem

lighttargetsystem

+

Syntax:

+
[const int] sysinfo.lighttargetsystem 
+

Description:

+

This is a read-only property that returns a constant value defining the target light to be all displays (primary and secondary if exists) and the keyboard illuminator.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-EED2A703-672F-4723-87AE-26EA53C7E9E6.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-EED2A703-672F-4723-87AE-26EA53C7E9E6.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,46 @@ + + +STEW: adding menu options

STEW: adding menu options

STEW is designed for the 240 x 320 (QVGA) and the 360 x 640 (nHD) screen size. The nHD screens are touch enabled and have enough space to fit a button navigation menu. However, a button menu would reserve too much space on QVGA screens, and therefore softkeys and menu items are used instead.

+

The Web Runtime (WRT) allows you to create or modify menu items dynamically and to associate them with the left softkey. The following code in the menu.js file extends the Menu object and adds a method that detects the screen size:

+
function Menu() {
+	var self = this;	
+	// Check the screen size we are running on.
+	if ( Helper.isLargeScreen() ) {
+		// nHD code listed in previous text. 
+		...
+	} else {
+		// Create phone's softmenu.
+		this.miUpdateTwitter = new MenuItem( StringTable.Code.menuUpdateTwitter, 9000 );
+		var miUpdate = new MenuItem( StringTable.Code.menuUpdate, 9001 );
+		var miSearch = new MenuItem( StringTable.Code.menuSearch, 9002 );
+		var miSettings = new MenuItem( StringTable.Code.menuSettings, 9003 );
+		var miLogout = new MenuItem( StringTable.Code.menuLogout, 9004 );
+	
+	  	// Assign a callback function for the menu items
+	  	this.miUpdateTwitter.onSelect = function () { updateScreen.onUpdateClicked(); };
+	  	miUpdate.onSelect = function () { self.activate( Menu.UPDATE_STATUS_SCREEN ); };
+	  	miSearch.onSelect = function () { self.activate( Menu.SEARCH_SCREEN ); };
+	  	miSettings.onSelect = function () { self.activate( Menu.SETTINGS_SCREEN ); };
+		miLogout.onSelect = function () { widgetMenu.activate( Menu.LOGIN_SCREEN ); };
+		
+		// Add them to the top-level menu. Don't forget to dim out
+		// the "Update Twitter" menu item since it is only shown on the
+		// Update screen for faster navigation.
+		this.miUpdateTwitter.setDimmed( true );
+		menu.append( this.miUpdateTwitter );
+		menu.append( miUpdate );
+		menu.append( miSearch );
+		menu.append( miSettings );		
+		menu.append( miLogout );		
+	}
+	
+}
+
+

The menu object and the MenuItem object are used to create an Options menu that contains the same functions as the button menu on nHD screens. The Options menu is associated with the left softkey.

+

Figure: STEW Update Status view with an Options menu

+

The miUpdateTwitter menu item is remembered and dimmed to display it only in the Update Status view.

+

For more information about using softkeys and adding options to a menu, see Using softkeys.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-EF4E58FF-E9EA-429C-9D3D-5F0911B534CA.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-EF4E58FF-E9EA-429C-9D3D-5F0911B534CA.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,11 @@ + + +lightminintensity

lightminintensity

+

Syntax:

+
[const int] sysinfo.lightminintensity
+

Description:

+

This is a read-only property that returns a constant value determining the minimum light intensity (lowest brightness) supported by a device.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-EFCCE3CA-A1D2-4CD0-8D10-BD6320B19E5A.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-EFCCE3CA-A1D2-4CD0-8D10-BD6320B19E5A.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,28 @@ + + +openURL()

openURL()

+

Description:

+

The openURL method opens a specified link in the Web Browser for S60 in the stand-alone mode. The widget remains open but is sent to the background.

+

Syntax:

+
[void] window.widget.openURL(String url) 
+

or

+
[void] widget.openURL(String url)
+

Arguments:

+
    +
  • url:

    + +

    A compact string specifying a link to a resource to be opened. The URL string format is compliant with the RFC-1738 specification and must be encoded if it contains non-ASCII characters.

    + +
  • +
+

Return value:

+

This method does not return a value.

+

Remarks:

+

The WRT environment does not enforce any restrictions on the URL scheme. Supported URL schemes and restrictions (if any) are applied by the Web Browser for S60.

+

Example code:

+
var url = "http://www.S60.com/browser";
+widget.openURL(url);
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-F003B7DD-E450-49AD-B447-C5132FE47D3C.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-F003B7DD-E450-49AD-B447-C5132FE47D3C.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,38 @@ + + +JavaScript Logging +Service API

JavaScript Logging +Service API

+

The Logging service API +is supported since WRT 1.1.

+

The Logging Service API allows widgets to add, read, and +delete logging events such as call logs, messaging logs, and so forth. The +API is integrated into WRT through the device object.

+

For an overview of the service and the API, see section Accessing device logs.

+

Using the Logging Service API

+

To use the Logging Service API, your widget must first create a service object for it +using the device.getServiceObject() method. +Use Service.Logging to identify the service provider +and IDataSource to identify the supported interface:

+
var so = device.getServiceObject("Service.Logging", "IDataSource");
+

This service object can then be used to access the services provided +by the API:

+ +
+

Emulator support

+

The S60 5th Edition SDK emulator provides full support for the Logging +Service API.

+
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-F13F64A5-FFB0-4928-A888-BF2501E42091.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-F13F64A5-FFB0-4928-A888-BF2501E42091.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,15 @@ + + +chargelevel

chargelevel

+

Syntax:

+
[int] sysinfo.chargelevel;
+

Description:

+

This is a read-only property that returns an integer indicating the current battery level.

+

The returned value is in the range of 0 to 100 as a percentage of the maximum battery level.

+

For more general information on power consumption and widgets, see Saving battery time.

+

Example code:

+

See the example code in onchargelevel.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-F146B956-77AE-41B5-BA17-20F48AF8DBA7.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-F146B956-77AE-41B5-BA17-20F48AF8DBA7.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,152 @@ + + +IDataSource.Add()

IDataSource.Add()

+

Description:

+

The Add method adds an event (entry) to the event +log database.

+

This method can be called both synchronously and asynchronously.

+

Syntax:

+

For synchronous calls:

+
result = so.IDataSource.Add(criteria);
+ +

For asynchronous calls:

+
result = so.IDataSource.Add(criteria, callback);
+ +

Arguments:

+
    +
  • criteria:

    + +

    This is an object that specifies what type of device log entries are +added to the event database and details about the entry. For more information +about the object properties and how to define them, see section Criteria for adding a log entry.

    + +
  • +
  • callback:

    + +

    The callback argument is the name of the method +that is executed when an asynchronous Add call has results +or status information to return. You must define this method separately. Follow +the instructions in section Defining the callback handler for an asynchronous method to +define the callback method.

    +

    This argument is used only with an asynchronous Add call.

    + +
  • +
+

Return value:

+

If synchronous, the Add method returns an object +that contains a unique identifier for the log entry, an error code, and an +error message.

+
+ + + + + + + + + + + + + + + + + + + + +
Table: Return value +properties for a synchronous Add
+

Property

+
+

Description

+
+

Value

+
+

result.ReturnValue

+
+

This is a text string that contains the unique identifier of the log +entry that was added to the event log database.

+
 
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes .

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See Logging Service API error messages.

+
+

If asynchronous, the Add method returns an object +that contains the initial return value from the asynchronous call that it +started (see the following table). The actual logging information is returned +by the callback method +in the ReturnValue property of its result object. The +returned information is described in the preceding table.

+
+ + + + + + + + + + + + + + + + + + + + + +
Table: Return value +properties for an asynchronous Add
+

Property

+
+

Description

+
+

Value

+
+

result.TransactionID

+
+

This is a number used as an identification to match transactions started +with the asynchronous Add call to one or more calls it +generates to callback.

+

This property is only valid for asynchronous calls.

+
 
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See Logging Service API error messages.

+
+

Example code:

+

+

For the complete source of a sample widget +that demonstrates how to use this Service API, see the +full example.

+ + + + +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-F18FD3A0-9CCC-4117-8CC4-4222842E8C59.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-F18FD3A0-9CCC-4117-8CC4-4222842E8C59.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,18 @@ + + +onshow

onshow

+

Description:

+

The onshow property is an event handler for the event of when a widget is switching from the background to the foreground. In other words, when an opened widget gains focus, the assigned callback function will be called.

+

This property is useful for managing the functionality of the widget in relation to other applications on the device.

+

Syntax:

+
[void] window.widget.onshow = function() { }
+

or

+
[void] window.widget.onshow = toForeground;
+
function  toForeground()
+{
+ // ...
+}
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-F22F30CF-0BCB-4720-9F47-691BDC517E5C.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-F22F30CF-0BCB-4720-9F47-691BDC517E5C.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,221 @@ + + +Returned +log event information

Returned +log event information

+

The ReturnValue property returned by a synchronous GetList call +and by callback for +an asynchronous GelList call is an iterator containing +information about the requested entries in the event log. Each item (object) +in the iterator corresponds to one entry in the event log.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: ReturnValue properties +for entries in the event log
+

Property

+
+

Description

+
+

Value type

+
+

Type

+
+

<item>.EventType

+
+

Contains a unique identifier for the type of entry.

+
+

Possible values:

+

0 - EKLogCallEventType

+

1 - EKLogDataEventType

+

2 - EKLogFaxEventType

+

3 - EKLogShortMessageEventType

+

4 - EKLogPacketDataEventType

+
+

number

+
+

<item>.RemoteParty

+
+

Contains the destination of the outgoing event or the source of incoming +event.

+
+

Up to 64 characters. If the length of the specified string is greater +than 64 characters, the data is truncated.

+
+

string

+
+

<item>.Direction

+
+

Contains whether the event is incoming, outgoing, or missed and if it +came in on an alternate line.

+

Alternate line refers to the second phone call on the mobile device. +Alternate line values, such as 2 - EIncomingEventAlternateline, +are valid for call events only.

+
+

Possible values:

+

0 - EIncomingEvent

+

1 - EOutgoingEvent

+

2 - EIncomingEventAlternateline

+

3 - EOutgoingEventAlternateline

+

4 - EFetchedEvent

+

5 - EMissedEvent

+

6 - EMissedEventAlternateline

+
+

number

+
+

<item>.EventTime

+
+

Contains the time at which the event was created. The mobile device +automatically sets this time.

+
  +

string

+
+

<item>.EventDuration

+
+

Contains the duration of the event, in seconds.

+
  +

number

+
+

<item>.DeliveryStatus

+
+

Contains whether the event was delivered, is pending, failed to be delivered, +etc.

+
+

Possible Values:

+

0 - EStatusPending

+

1 - EStatusSent

+

2 - EStatusFailed

+

3 - EStatusNone

+

4 - EStatusDone

+

5 - EStatusSent

+

6 - EStatusScheduled

+
+

number

+
+

<item>.Subject

+
+

Contains the subject for the event.

+
  +

string

+
+

<item>.PhoneNumber

+
+

Contains the phone number associated with the event.

+
  +

string

+
+

<item>.Description

+
+

Contains information about the type of event, such as voice call or +short message. The mobile device automatically defines this description.

+
  +

string

+
+

<item>.Link

+
+

Contains an ID that links the log event to an entity in another application. +For example, the log event can be associated with a call ID or message ID +for emails and faxes.

+
  +

number

+
+

<item>.id

+
+

Contains a unique identifier of the event in the log database.

+
  +

string

+
+

<item>.LogFlags

+
+

Contains the flags for this event.

+
+

Possible values:

+

0 - EKLogEventContactSearched

+

Note: The EKLogEventContactSearched flag is set when the user searches the +contact database for any operation such as a voice call or SMS.

+
+

1 - EKLogEventRead

+

Note: The EKLogEventRead flag is set when the user "reads" the event in the +log database.

+
+
+

number

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-F26B6080-87E3-4AE1-82D6-B571158F0449.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-F26B6080-87E3-4AE1-82D6-B571158F0449.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,11 @@ + + +vibraminintensity

vibraminintensity

+

Syntax:

+
[int] sysinfo.vibraminintensity
+

Description:

+

This is a read-only property that returns a constant value determining the minimum vibration intensity (lowest vibration frequency).

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-F2CE0F94-324C-4D45-BD37-DA55F9DAC077.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-F2CE0F94-324C-4D45-BD37-DA55F9DAC077.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,113 @@ + + +IDataSource.Organise()

IDataSource.Organise()

+

Description:

+

The Organise method adds contacts to a contact +group (association) or removes contacts from a contact group (disassociation). +The operation is performed on the specified database or, if no database is +specified, on the default one.

+

This method can be called both synchronously and asynchronously.

+

Syntax:

+

For synchronous calls:

+
result = so.IDataSource.Organise(criteria);
+ +

For asynchronous calls:

+
result = so.IDataSource.Organise(criteria, callback);
+ +

Arguments:

+
    +
  • criteria:

    + +

    This is an object that specifies which contact group to organize and +how. For more information about the object properties and how to define them, +see section Criteria for organizing contacts in a contact group.

    + +
  • +
  • callback:

    + +

    The callback argument is the name of the method +that is executed when an asynchronous Organise call has +results or status information to return. You must define this method separately. +Follow the instructions in section Defining the callback handler for an asynchronous method to +define the callback method.

    +

    This argument is used only with an asynchronous Organise call.

    + +
  • +
+

Return value:

+

If synchronous, the Organise method returns an +object that contains an error code and an error message.

+

If asynchronous, the method returns an object that contains a transaction +ID for the callback instance, +an error code, and an error message. When the asynchronous call has completed, callback returns +an object that contains an error code and an error message (see Table: Callback return value).

+
+ + + + + + + + + + + + + + + + + + + + + +
Table: Return value +properties for Organise
+

Property

+
+

Description

+
+

Value

+
+

result.TransactionID

+
+

This is a number used as an identification to match transactions started +with an asynchronous Organise call to one or more calls +it generates to callback.

+

This property is only valid for asynchronous calls.

+
 
+

result.ErrorCode

+
+

This is a number that specifies a predefined error code.

+
+

See Service API error codes.

+
+

result.ErrorMessage

+
+

This is a text string that describes the error.

+
+

See Contacts Service API error messages.

+
+

Remarks:

+
    +
  • The default contacts database is cntdb://c:contacts.cdb.

    +
  • +
  • Organise is not supported for SIM card +databases, since contact groups cannot be created in a SIM card database.

    +
  • +
+

Example code:

+

+

For the complete source of a sample widget +that demonstrates how to use this Service API, see the +full example.

+ + + + +
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-F4DF6925-6F88-4774-8074-ACC6B009D02A-master.jpg Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-F4DF6925-6F88-4774-8074-ACC6B009D02A-master.jpg has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-F4DF6925-6F88-4774-8074-ACC6B009D02A_d0e3690_href.jpg Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-F4DF6925-6F88-4774-8074-ACC6B009D02A_d0e3690_href.jpg has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-F51B8923-8A46-49A0-B307-E84194904454.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-F51B8923-8A46-49A0-B307-E84194904454.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,11 @@ + + +lightdefaultintensity

lightdefaultintensity

+

Syntax:

+
[const int] sysinfo.lightdefaultintensity 
+

Description:

+

This is a read-only property that returns a constant value determining the default light intensity (default brightness) preset for a device.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-F631E6D3-AA0A-4C4E-95C4-13F9CA3F8AFF.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-F631E6D3-AA0A-4C4E-95C4-13F9CA3F8AFF.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,117 @@ + + +Criteria for +importing a contact

Criteria for +importing a contact

+

The criteria object specifies the contact +to import and optionally the target database.

+

The criteria object has two main properties: Type and Data. +These are described in the following table. Properties enclosed in brackets +are optional.

+

Note: All string values in the object are Unicode.

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Criteria object properties
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

criteria.Type

+
+

Specifies the type of contact information to import. This is always "Contact".

+
+

string

+
+

Possible values:

+
    +
  • "Contact"

  • +
+
+

criteria.Data

+
+

Specifies the contact to import.

+
+

object

+
+

Object with the properties specified below

+
+

[criteria.Data.DBUri]

+
+

Specifies the contacts database to which the contact is imported.

+

If this property is not specified, the default database is used. If +the default database does not exist, a new database is created and the contact +is imported there.

+
+

string

+
 
+

criteria.Data.SourceFile

+
+

Specifies the full path and file name of the source file from which +the contact is imported.

+

Note:

    +
  • The source file must in vCard format. For an example of this +format, see below.

  • +
  • The source file can have any file extension or no extension. +Typically, the extension is .vcf.

  • +
+
+
+

string

+
+

The string cannot exceed 256 characters.

+
+

vCard format example

+
BEGIN:VCARD
+VERSION:2.1
+N:Smith;John
+FN:John Smith
+ORG:Company Inc.
+TITLE:CEO
+TEL;WORK:VOICE:(555) 111-1111
+TEL;HOME;VOICE:(555) 222-2222
+ADR;WORK:;;Wall Street;New York City;NY;12345;United States of America
+LABEL;WORK;ENCODING=QUOTED-PRINTABLE:Wall Street=0D=0ANew York City, NY 12345=0D=0AUnited States of America
+ADR;HOME:;;Broadway;New York City;NY;12345;United States of America
+LABEL;HOME;ENCODING=QUOTED-PRINTABLE:Broadway=0D=0ANew York City, NY 12345=0D=0AUnited States of America
+EMAIL;PREF;INTERNET:john.smith@company.com
+REV:2008042T195243Z
+END:VCARD
+
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-F6A64898-72AD-4F15-ADCB-3E623E3E403F.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-F6A64898-72AD-4F15-ADCB-3E623E3E403F.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,117 @@ + + +STEW: defining the HTML and CSS structure

STEW: defining the HTML and CSS structure

This section illustrates how to create the basic HTML and CSS structure for a widget.

+

Creating widget views

The content div element in the main.html file is a container for all the widget views. Each view is also a div element that is embedded as a child element of the content element. The views are hidden through the hidden CSS style and shown dynamically by the JavaScript code that runs the widget logic. Each child div (login, update_status, search, and settings) contains view specific elements.

<html>
+<body>
+
+<div id="container">
+	
+	
+	<!-- ***** -->
+	<!-- TITLE -->
+	<div id="top_bar">
+        <table cellspacing="0" class="top_table">
+            <tr>
+                <td class="top_button">
+			<a id="button_logout" href="#" class="button hidden"></a>
+                </td>
+                <td class="top_title"><div class="stew_title"></div></td>
+                <td class="top_button">
+			<a id="button_exit" href="#" class="button red hidden"></a>
+                </td>
+            </tr>
+        </table> 
+	</div>	 <!-- end of 'top_bar' -->
+
+	<div id="content">
+	
+	<!-- ***** -->
+	<!-- LOGIN -->
+	<div id="login" class="hidden">
+	</div> <!-- end of 'login' -->
+	
+	<!-- ************* -->
+	<!-- UPDATE STATUS -->
+	<div id="update_status" class="hidden">
+	</div> <!-- end of 'update_status' -->
+	
+	<!-- ****** -->
+	<!-- SEARCH -->
+	<div id="search" class="hidden">
+	</div> <!-- end of 'friends_status' -->
+	
+	<!-- ******** -->
+	<!-- SETTINGS -->
+	<div id="settings" class="hidden">
+	</div> <!-- end of 'settings' -->
+	
+		</div> <!-- end of 'content' -->
+
+	<div id="menu_strip" class="buttons_bottom hidden">
+		<div id="button_container_update" class="button_container"><a id="button_update" class="button_bottom" href="#">Update</a></div>
+		<div id="button_container_search" class="button_container"><a id="button_search" class="button_bottom" href="#">Search</a></div>
+		<div id="button_container_settings" class="button_container"><a id="button_settings" class="button_bottom" href="#">Settings</a></div>
+	</div> 
+	
+</div> <!-- end of 'container' -->
+
+</body>
+</html>
+
+

Creating a title bar

The top_bar div element specifies the title bar for the widget. It contains the widget title and two buttons: Logout and Exit.

For more information about how to use JavaScript to implement the functionality of the buttons, see STEW: adding JavaScript to drive the widget logic.

+

Creating the Login view

The Login view is used as an example of creating views within the HTML file. For more information about how to create the other STEW views, see the main.html example file.

Figure: STEW Login view

The Login view contains the following elements:

    +
  • The first div specifies the title of the widget.

  • +
  • The second div is a formatting container for a table that contains all the elements through which the user interacts with the widget:

      +
    • An input element to enter the username.

    • +
    • An input element to enter the password.

    • +
    • A check box input element that allows the user to save their credentials on the device.

    • +
    • A link element that is styled as a button.

    • +

    Using an HTML table as a container for all of the controls allows users to navigate from the top of the view down towards the end of the view. This navigation style works best on mobile device screens and is easiest for users. In addition, this navigation style enables adjusting the view dynamically on screens of different sizes.

  • +
<!-- ***** -->
+<!-- LOGIN -->
+<div id="login" class="hidden">
+	<div class="top_bar">
+		<div class="stew_title"></div>
+	</div>
+		
+	<div class="login_container">
+		<table cellspacing="0">
+			<tr>
+				<th>Login</th>
+			</tr>
+			<tr>
+				<td>Please login using you Twitter credentials...</td>
+			</tr>
+			<tr>
+				<td class="table_subtitle">Username</td>
+			</tr>
+			<tr>
+				<td class="input_container">
+					<input id="login_username" type="text">
+				</td>
+			</tr>
+			<tr>
+				<td class="table_subtitle">Password</td>
+			</tr>
+			<tr>
+				<td class="input_container">
+					<input id="login_password" type="password">
+				</td>
+			</tr>
+			<tr>
+				<td>
+					<input id="login_remember_me" type="checkbox"><label for="login_remember_me">Remember Me</label>
+				</td>
+			</tr>        
+			<tr>
+				<td class="button_container"><a id="login_button" href="#" class="button"></a></td>
+			</tr>        
+		</table>     
+	</div>
+</div> <!-- end of 'login' -->
+
+

Creating a button menu

The last div element in the HTML, menu_strip, defines an on screen menu that is displayed on devices with large screens.

Figure: STEW button menu

The menu consists of three div elements. Each div element specifies the background of a button that can have an activated state to indicate the currently active view. In this example, the activated style is added to the element which visually changes the background color of a button. For example, the Update button is active in the figure above. Within each div element, a link element specifies the button image and text. When the user presses a button, the associated view appears. The functionality to change the style and display a view is implemented by using JavaScript.

The link elements are used instead of using two background pictures in each div element to indicate the active status to support tactile feedback and localization. Only link elements support tactile feedback. It is easier to replace text than to regenerate the whole image for a language version.

For more information on how to create the functionality of the menu, see STEW: adding JavaScript to drive the widget logic.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-F7A8BF61-042E-4B80-9959-DEDF65BD9153.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-F7A8BF61-042E-4B80-9959-DEDF65BD9153.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,17 @@ + + +Widget +security

Widget +security

WRT 1.0 and later support the following security policy.

The security management of widgets running on S60 mobile devices is +based on a sandbox security model. Specifically:

  • Widgets do not need to be signed.

  • All widgets are currently considered untrusted by the device +platform. This means that access to platform services (such as user data) +is controlled and that mobile device users must grant permission before a +widget can access network services.

  • Widgets access the network through the Web Browser for S60.

  • Widgets access S60 platform services through scriptable plugins +or Javascript Service APIs (see below for a list of plugins and Service APIs). + For WRT 1.0, the Web Runtime controls access to platform services through +the Web Browser for S60. Starting in WRT 1.1, the Web Runtime utilizes a +common component called the Runtime Security Manager to enable access control +to platform services. For more information, see section Runtime Security Manager.

The Javascript Service APIs are:

The plugins are:

\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-F7E268AD-E112-4564-BB1D-4BD1E111A767.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-F7E268AD-E112-4564-BB1D-4BD1E111A767.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,117 @@ + + +Returned +notification information

Returned +notification information

+

The ReturnValue property returned by callback is an array of objects containing the requested notification information +on new messages. Each item (object) in the array corresponds to one new message +and contains the header information for that message.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: ReturnValue properties +for notification information
+

Property

+
+

Type

+
+

Notes

+
+

<item>.MessageType

+
+

string

+
+

Possible values:

+
    +
  • "SMS"

  • +
  • "MMS"

  • +
  • "unknown"

  • +
+

The Messaging Service only supports SMS and MMS. Other types of messages +are unknown.

+
+

<item>.Sender

+
+

string

+
 
+

<item>.Subject

+
+

string

+
+

Since SMS does not support subject, this property contains the first +few characters of BodyText.

+
+

<item>.Time

+
+

object

+
 
+

<item>.Priority

+
+

string

+
+

Possible values:

+
    +
  • "Low"

  • +
  • "Medium"

  • +
  • "High"

  • +
+
+

<item>.Attachment

+
+

boolean

+
 
+

<item>.Unread

+
+

boolean

+
 
+

<item>.MessageId

+
+

number

+
 
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-F97A125E-0DCC-4E4A-B607-42068DBD12EC.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-F97A125E-0DCC-4E4A-B607-42068DBD12EC.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,107 @@ + + +Criteria for +adding and editing landmark information

Criteria for +adding and editing landmark information

+

The criteria object specifies the landmark +or landmark category to add or edit.

+

The criteria object has two main properties: Type and Data. +These are described in the following table.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Criteria object properties
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

criteria.Type

+
+

Specifies the type of landmark information to add or edit.

+
+

string

+
+

Possible values:

+
    +
  • "Landmark"

  • +
  • "Category"

  • +
+
+

criteria.Data

+
+

Specifies the information to add or edit.

+

The exact set of properties that need to be specified depends on the +type of information. Moreover:

+
    +
  • To add a new landmark or landmark category, do not specify +the Data.id property. The system generates the new ID +automatically.

  • +
  • To edit an existing landmark or landmark category, first +retrieve the correct ID using GetList, +and then specify this ID as the Data.id property. Do +not change the ID value.

  • +
+
+

object

+
+

Object with the properties specified below

+
+

[criteria.Data.DatabaseURI]

+
+

Specifies the URI of the landmark database on which the add or edit +operation is performed.

+

If this property is not specified, the operation is performed on the +default database.

+
+

string

+
+

For example: file://c:landmarks.ldb

+
+

criteria.Data.<property>

+
+

Specifies one of the properties for the landmark or landmark category +to add or edit:

+ +
+

(depends on the property)

+
 
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-F9E3AC4C-2883-450F-835C-B5F8E2AC6325.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-F9E3AC4C-2883-450F-835C-B5F8E2AC6325.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,40 @@ + + +beep()

beep()

+

Syntax:

+
[void] sysinfo.beep(Int frequency, Int duration)
+

Description:

+

The beep method produces a beep tone in a specified frequency for a specified duration.

+

Argument:

+
    +
  • frequency:

    + +

    Defines the frequency of the tone measured in Hz (Hertz).

    + +
  • +
+

Note: The maximum and minimum values for frequency are naturally device-specific. If the specified frequency is out of the device's supported range, the maximum frequency is applied.

+
+
    +
  • duration:

    + +

    Defines the duration of how long the beep tone lasts. The period is measured in milliseconds.

    +

    If the duration is 0, the beep tone will last infinitely.

    + +
  • +
+

Return value:

+

This method does not return a value.

+

Remarks:

+

To stop an infinitive beep, call the beep method again with any value that is different from 0.

+

Example code:

+
function beepAlert()
+{
+   // call the beep function with frequency 220Hz 
+   // for the duration 2 seconds
+   sysinfo.beep(220, 2000);
+}
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-FB8200EB-F24B-41BE-9939-3F0485D492E9_d0e9558_href.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-FB8200EB-F24B-41BE-9939-3F0485D492E9_d0e9558_href.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-FD1799EE-A7AB-488C-9159-2BC315058DC0.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-FD1799EE-A7AB-488C-9159-2BC315058DC0.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,23 @@ + + +drivesize()

drivesize()

+

Syntax:

+
[int] sysinfo.drivesize(String drivename)
+

Description:

+

The drivesize method can be used to detect the total size of an existing memory storage in a device.

+

Argument:

+
    +
  • drivename:

    + +

    A string that specifies the name of a drive to be examined.

    + +
  • +
+

Return value:

+

If the drive exists, this method returns an integer value indicating the total size of the specified drive, measured in bytes.

+

Example code:

+

See the drivefree() example code.

+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-FEB5D463-F6A1-44D9-9456-D95DE4BAED77.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-FEB5D463-F6A1-44D9-9456-D95DE4BAED77.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,180 @@ + + +Sensor +channel information

Sensor +channel information

+

The Sensor Service API uses objects to represent sensor channels. One +object contains the information for one sensor channel (see the following +table). The Sensor Service API methods use these sensor channel objects as +follows:

+
    +
  • FindSensorChannel

    + +

    The ReturnValue property of the result object is +an iterator containing +the requested sensor channel information. Each item (object) in the iterator corresponds +to one sensor channel matching the search +criteria specified for the FindSensorChannel call.

    + +
  • +
  • RegisterForNotification

    + +

    The criteria.ChannelInfoMap property used +for input is a sensor channel object. It specifies the channel from which +the RegisterForNotification call registers to receive +data.

    + +
  • +
  • GetChannelProperty

    + +

    The criteria.ChannelInfoMap property used +for input is a sensor channel object. It specifies the channel of the property +about which the GetChannelProperty call retrieves information.

    + +
  • +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table: Sensor channel +object properties
+

Property

+
+

Description

+
+

Type

+
+

Value

+
+

ChannelId

+
+

Specifies the inique identifier of the channel.

+
+

number

+
 
+

ContextType

+
+

Specifies the context in which the channel is available.

+
+

number

+
+

Possible values:

+
    +
  • 0 - Not defined

  • +
  • 1 - Ambient sensor, for example to measure +pressure

  • +
  • 2 - Provides information on the device

    +
  • +
  • 3 - Measures user-initiated stimulus

    +
  • +
+
+

Quantity

+
+

Specifies the quantity being sensed.

+
+

number

+
+

Possible values:

+
    +
  • 0 - Not defined

  • +
  • 10 - Acceleration

  • +
  • 11 - Tapping

  • +
  • 12 - Orientation

  • +
  • 13 - Rotation

  • +
  • 14 - Magnetic

  • +
  • 15 - Tilt

  • +
+
+

ChannelType

+
+

Specifies the type of the channel. This is the unique identifier of +the Sensor Subsystem (SSY) that provides data for this channel.

+

Each physical sensor registers to the S60 sensor framework as a Sensor +Subsystem that provides specific sensor data. If the physical sensor provides +multiple types of data, it can register a separate SSY for each type. For +example, a sensor that provides both orientation and rotation data can register +one SSY for orientation data and another for rotation data. ChannelType thus +identifies a particular SSY representing the channel.

+
+

number

+
 
+

Location

+
+

Specifies the location of the sensor related to the channel.

+
+

string

+
 
+

VendorId

+
+

Specifies the vendor ID of the sensor related to the channel.

+
+

string

+
 
+

DataItemSize

+
+

Specifies the data item size delivered in the channel.

+
+

number

+
 
+

ChannelDataTypeId

+
+

Specifies the unique data type identifier for the data being sensed.

+
+

number

+
 
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-FED41C53-03B6-44A8-BEBB-0576E037B62B.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-FED41C53-03B6-44A8-BEBB-0576E037B62B.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,15 @@ + + +totalram

totalram

+

Syntax:

+
[int] sysinfo.totalram
+

Description:

+

This is a read-only property that returns an integer value indicating the total amount of RAM of a device, measured in bytes.

+

Example code:

+
// get total RAM size in bytes
+var totalRamSize = sysinfo.totalram;
+alert("Total RAM size is " + totalRamSize/1024 + "kB");
+
\ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/KeypadWgt.wgz Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/KeypadWgt.wgz has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/LandmarksSampleWgt.wgz Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/LandmarksSampleWgt.wgz has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/LocationSampleWgt.wgz Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/LocationSampleWgt.wgz has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/LoggingSampleWgt.wgz Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/LoggingSampleWgt.wgz has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/MediaMgmtSampleWgt.wgz Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/MediaMgmtSampleWgt.wgz has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/MessagingSampleWgt.wgz Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/MessagingSampleWgt.wgz has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/Sensors-test-Automation.wgz Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/Sensors-test-Automation.wgz has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/SysInfoSampleWgt.wgz Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/SysInfoSampleWgt.wgz has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/css/common.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/css/common.css Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,162 @@ +html, body, h1, h2, h3, h4, h5, h6, p, dl, dt, dd, div, blockquote, table, caption { + font-family: arial, helvetica, sans-serif; +} +tt, code, span.system, pre, span.command-sem, span.filename-sem, span.parameter-sem, span.prog-code-sem, span.user-input-sem, span.command-code, span.parameter-code { + font-family: "courier new", courier, monospace; +} +table.legend { + font-size: 10px; +} +span.alarm-sem, span.error-sem, span.feature-sem, span.message-sem, span.notice-sem, span.state-sem, span.command-sem, span.filename-sem, span.parameter-sem, span.prog-code-sem, span.user-input-sem, sub, sup { + font-size: 11px; +} +html, body, h5, h6, p, dl, dt, dd, div, blockquote, table, caption, pre.long { + font-size: 12px; +} +tt, code, span.system, pre, code.command a, code.glossary a { + font-size: 14px; +} +h3, h4 { + font-size: 15px; +} +.autogenerated { + font-size: 12px; +} +h1, h2 { + font-size: 19px; +} +/* +html, body, h1, h2, h3, tt, i, b, sub, sup, code, p, li, li, dl, dt, dd, div, blockquote, table, caption, tr, th, td { + font-style: normal; +} +*/ +h4, h5, h6, i, em { + font-style: italic; +} +em { + font-weight: inherit; +} +/* +html, body, h1, h2, h2 span.block-title, h3, h5, h6, tt, i, b, sub, sup, code, p, li, dl, dt, dd, div, blockquote, table, caption, tr, td { + font-weight: normal; +} +*/ +h1, h3, h4, h5, b, code.command a, code.glossary a, p.term, p.figure-caption, p.equation-caption, caption, thead td, th, th p, td.term, div.action-in-short p, dt.note-caption, dt.caution-caption, dt.warning-caption, p.title, span.gui-component-sem, span.menupath-sem, span.user-input-sem, span.see-pl-type-sem, span.see-pl-type-code, span.block-title { + font-weight: bold; +} +/* +html, body, h1, h2, h3, h4, h5, h6, tt, i, b, sub, sup, em, code, p, img, li, th p, li, dl, dt, dd, div, blockquote, table, table.legend, caption, tr, th, td { + font-variant: normal; +} +*/ +span.keys-sem { + font-variant: small-caps; +} +html, body { + background: #ffffff none repeat scroll 0% 0%; +} +html, body, p, ul, ol, li, div.onestep, div.branch, div.text, div.content { + color: #000000; +} +/* +h1, h2, h3, h4, h5, h6, li.procedure, dt.note-caption, dt.caution-caption, .title, div.action-in-short p { +*/ +h1, h2 { + color: #0054b7; +} +dt.warning-caption { + color: red; +} +a { + color: #000092; +} +a:visited { + color: purple; +} +a:hover, a:focus { + color: #009933; +} +html, body, table, table-def.list, td.def, th.term, td.term { + text-align: left; +} +img.Metainfo { + text-align: right; +} +sub { + vertical-align: sub; +} +sup { + vertical-align: super; +} +table, table-def.list, td.def, th.term, td.term { + vertical-align: text-top; +} +table { + empty-cells: show; +} +span.ExpCollAll { + text-decoration: underline; +} +html, body { + margin-top: 12px; +} +html, body { + margin-right: 20px; +} +html, body { + margin-bottom: 12px; +} +ul, ol { + margin-bottom: 15px; +} +li { + margin-bottom: 3px; +} +table { + margin-bottom: 1em; +} +html, body { + margin-left: 20px; +} +table.def-list { + margin-left: 5mm; +} +dl.gui-comp, div.steps, div.onestep, div.branch, div.text, div.content, div.or-steps, div.or-sequence, div.gui-comp { + margin: 5mm; +} +th.term { + padding-right: 2mm; +} +th.term, td.def { + padding-bottom: 0.6em; +} +html, body, h1, h2, h3, h4, h5, h6 { + display: block; +} +tt, i, b, sub, sup, em, code, a, img, code.command a, code.glossary a, span, span.block-title { + display: inline; +} +pre, pre.long { + white-space: pre; +} +ol, div.steps ol, ol.type-odd { + list-style-type: decimal; +} +div.steps div.steps ol, ol.type-even { + list-style-type: lower-alpha; +} +img { + border-style: none; +} +span.comment { + display: none; +} +sup, sub { + font-size: 9px; + line-height: 9px; + vertical-align: 4px; +} +em.uicontrol, em.display-text { + font-weight: normal; + font-style: italic; +} \ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/css/debug-pdf.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/css/debug-pdf.css Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,10 @@ +@import url('pdf.css'); +thead, +#head ul { + background-color: rgb(183, 20, 20); +} +.debug { + color: rgb(183, 20, 20); + text-transform: uppercase; + margin-left: 1em; +} \ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/css/dtddoc.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/css/dtddoc.css Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,54 @@ +body { + font-family: "Arial Unicode MS", sans-serif; + font-size: 12px; +} +h3 { + border-bottom: solid 1px black; +} +.fixed { + font-style: italic; +} +.required { + font-weight: bold; +} +table.attributes { + border-collapse: collapse; +} +table.attributes, +table.attributes tr, +table.attributes td, +table.attributes th { + border: solid 1px black; +} +table.attributes th { + background-color: #03C; + color: white; +} +table.attributes tr { + vertical-align: top; +} +table.attributes th { + text-align: left; +} +table.attributes td, +table.attributes th { + padding: 1px 3px; +} +table.attributes td li { + line-height: 100%; +} +.element > p, +.element > table { + margin-left: 16px; +} +.parameterEntityContent { + font-family: monospace; + font-size: 0.8em; +} +.enumeration { + margin: 0; + padding-left: 1em; +} +.contentModel { + font-family: monospace; +} \ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/css/eclipse.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/css/eclipse.css Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,22 @@ +/** + * This stylesheet contains amendments and modifications to the NWG base stylesheets for Eclipse XHTML. + */ + +body { + margin: 9px; +} +div.body { + margin: 0; +} +div.contentFull { + padding: 0; +} +div.contentLeft { + padding: 0; +} +.breadcrumbs { + margin-top: 0; +} +h1.pageHeading { + margin-top: 5px; +} \ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/css/html.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/css/html.css Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,7 @@ +table { + border-collapse: collapse; +} +/* to remove HTML border definition */ +table, thead, tbody, tr, td, th { + border-style: none; +} \ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/css/nwg.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/css/nwg.css Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,315 @@ +/** + * This stylesheet contains amendments and modifications to the NWG base stylesheets. + */ + +/* LAYOUT */ + +div.body { + width: auto; + margin: 25px 0 0 0; +} + +div.contentFull { + min-height: 0; + padding: 0 25px 25px 25px; + width: auto; +} + +div.contentLeft { + width: auto; + float: none; + display: block; + padding: 0 25px 25px 25px; +} + +div.footer { + margin: 0px; + padding: 1em 0 0 0; + width: auto; +} + +/* HEADER */ + +.logo { + margin: 0; + padding: 20px 0 0 10px; +} +.header .confidentiality { + float: right; + padding: 3px 20px; + background-color: #CC0000; + color: white; + text-transform: uppercase; +} + +h1.pageHeading { + color: #0054b7; + line-height: 24px; +} + +/* NAVIGATION */ +/* 1st level navigation */ +/* 2nd level navigation */ +/* 3rd level navigation */ + +div.nav3 { + margin: 0; + padding: 0; +} +.nav3 ul { + display: block; + padding: 0; + margin: 0; + list-style-position: outside +} +.nav3 li { + display: block; + list-style: none; + padding: 0 0 0 12px; + margin: 2px 0 0 0; + white-space: nowrap; + background-image: none; + /* XXX: To fix IE behavior that adds a break into the flow when horizontal overflow occurs. */ + border: 1px solid white; +} +.nav3 * { + vertical-align: middle; +} +.nav3 li.on, +.nav3 li.on3, +.nav3 li.on4, +.nav3 li.on5 { + background-image: url("../images/arrow.gif"); + background-repeat: no-repeat; + color: #666; +} +.nav3 a, +.nav3 a:visited { + color: rgb(0, 51, 204); + text-decoration: none; +} + +div.nav3 { + width: 100%; + margin-top: 0px; +} + +/* 4th level navigation */ +/* toolbar navigation */ +/* MAIN BODY CONTENT */ +/* comparison-related */ +/* primary */ +/* teasers */ +/* form-related */ + +table { + border: 1px solid #999; +} +caption { + caption-side: bottom; + text-align: left; +} +div.table-description { + /*margin-top: -10px;*/ + font-size: 10px; +} +td, +th { + padding: 3px 5px; +} +th > p:first-child, +td > p:first-child { + margin-top: 0; +} +thead tr th, tbody tr th { + border-left: 1px solid #999; + border-right: 1px solid #999; +} + +.comment { + margin: 5px; + padding: 5px; + border: solid 1px gray; + background-color: silver; +} +pre { + margin: 10px 10px; +} +/* center vertical margins for block-level elements */ +p, +table, +ul, +ol, +dl, +div.p, +.olchildlink, +.ulchildlink { + margin-top: 5px; + margin-bottom: 5px; +} +.codeblock { + background-color: #EEE; + padding: 5px; +} +.listing pre { + margin: 0 10px; +} +.listing { + padding: 5px 0; + margin-top: 10px; + border-top: solid 1px black; + border-bottom: solid 1px black; +} +.listing-title { + margin: 0; +} + +/* child related links */ +.ulchildlink { + background: none; +} + +/* SIDEBAR */ + +div.sbFooter { + height: 4px; +} + +/* COLORS: Only the color attribute is specified */ +/* POPUP */ +/* Tools: download, bookmark, print */ + +/** EXTENSIONS **/ + +.note { + margin: 2px 15px; +} +.breadcrumbs { + font-size: 10px; + margin-bottom: 12px; + margin-top: -12px; +} +.in-page-navigation { + margin-top: 12px; + font-size: 10px; +} +.in-page-navigation table { + margin: 0; + padding: 0; + border: none; +} +.unicode { + font-family: "Arial Unicode MS", sans-serif; +} + +/* semantic elements */ + + +.parmname, +.uicontrol, +.wintitle { + font-weight: bold; +} +.varname { + font-style: italic; +} +.cmdname, +.systemoutput, +.filepath { + font-style: normal; + font-family: monospace; +} +.userinput { + font-weight: bold; + font-family: monospace; +} +.shortcut { + text-decoration: underline; +} + +/* infobox */ + +.info-icon { + float: right; + padding-right: 25px; +} +.info-icon a { + text-decoration: none; +} +.info-icon img { + width: 12px; +} + +#infobox { + padding: 10px 10px 10px 45px; + background-image: url('../images/info.gif'); + background-repeat: no-repeat; + background-position: 10px 20px; +} +#infobox table { + margin: 0; +} +#infobox table td{ + white-space: nowrap; +} +#infobox .hidden { + display: none; +} + +/* Conversion specific classes */ + +.conversion-error-message { + color: red; + font-weight: bold; + cursor: help; +} + +/* Table of contents */ + +.toc-controller, +.toc-space { + padding: 0 2px; + margin: 0 0.5em 0 0; + border: solid 1px black; + font-family: monospace; + font-size: 10px; + line-height: 8px; +} +.toc-controller { + cursor: pointer; +} +.toc-controller:hover { + color: gray; +} +.toc-space { + visibility: hidden; +} +.button-manual_sync-container { + text-align: right; +} +.button-manual_sync { + font-size: 10px; + margin-right: 5px; +} +.toc-title { + padding: 0px 2px !important; +} +li.on3 > .toc-title { + background-color: Highlight !important; + color: HighlightText !important; +} +/* IE6 */ +/* +a.on3, span.on3 { + background-color: Highlight !important; + color: HighlightText !important; +} +*/ + +/* Conditions */ + +.condition-start, +.condition-end { + color: blue; + cursor: help; +} \ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/css/pdf.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/css/pdf.css Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,72 @@ +@import url('common.css'); +input { + font-family: monospace; +} +.track { + background-color: silver; +} +table { + border-collapse: collapse; +} +table, tr, td { + border: solid 1px black; +} +td, th { + padding: 2px 5px; +} +thead { + background-color: rgb(0, 85, 183); + color: white; +} +html, body { + padding: 0; + margin: 0; +} +#body { + padding: 16px; +} +#head h1 { + display: block; + font-size: 12px; + margin: 20px 0 20px 10px; + color: #666; +} +#head h1 span { + vertical-align: bottom; +} +#head h1 img { + display: inline; + margin-right: 20px; + vertical-align: bottom; +} +#head ul { + display: block; + padding: 0 0 0 10px; + margin: 0; + background-color: #0033cc;/*rgb(0, 85, 183);*/ + clear: left; +} +#head ul li { + display: inline; + list-style-type: none; + margin: 0; + padding: 2px 5px; + font-size: 12px; + line-height: 18px; + border-right: dotted 1px white; + color: white; + font-weight: bold; +} +#head ul li a { + color: white; + text-decoration: none; +} +#head ul li a:hover { + text-decoration: underline; +} +#head ul li.active { + background-color: #CCC; +} +#head ul li.active a { + color: black; +} diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/css/portal.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/css/portal.css Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,96 @@ +/*Portal styles*/ +div.prim-channel{ + font-size: 11px; + width: 534px; + margin: 0; +} + +div.prim-channel h1{ + color: #ffffff; + display: block; + font-family: arial,helvetica,sans-serif; + font-size: 12px; + font-weight: bold; + margin: 0px; + padding: 6px 0 7px 9px; +} + +div.prim-channel h1.bl{ + background: url(../images/prim_channel_bl_header.gif) top right no-repeat #FFF; +} + +div.prim-channel h1.org{ + background: url(../images/prim_channel_org_header.gif) top right no-repeat #FFF; +} + +div.prim-channel h1.grn{ + background: url(../images/prim_channel_grn_header.gif) top right no-repeat #FFF; +} + +div.prim-channel .prim-channel-body{ + background: #FFF; + border: 1px solid #666; + border-top: none; + color: #666; + display: block; + margin: -4px 0 10px 0; + padding: 8px 8px 7px 8px; +} + +div#sec-channel-wrapper-left{ + float: left; + margin: 0 10px 0 0; + width: 262px; +} + +div#sec-channel-wrapper-right{ + float: left; + width: 262px; +} + +div.sec-channel{ + font-size: 11px; + width: 262px; + float: left; +} + +div.sec-channel .left{ + margin-right: 10px; +} + +div.sec-channel h1{ + color: #ffffff; + display: block; + font-family: arial,helvetica,sans-serif; + font-size: 12px; + font-weight: bold; + margin: 0px; + padding: 6px 0 7px 9px; +} + +div.sec-channel h1.bl{ + background: url(../images/sec_channel_bl_header.gif) top right no-repeat #FFF; +} + +div.sec-channel h1.org{ + background: url(../images/sec_channel_org_header.gif) top right no-repeat #FFF; +} + +div.sec-channel h1.grn{ + background: url(../images/sec_channel_grn_header.gif) top right no-repeat #FFF; +} + +div.sec-channel .sec-channel-body{ + background: #FFF; + border: 1px solid #666; + border-top: none; + color: #666; + display: block; + margin: -4px 0 10px 0; + padding: 8px 8px 7px 8px; +} + +span.channel-controls{ + float: right; + margin: -23px 5px 0 0; +} \ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/css/print.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/css/print.css Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,113 @@ +/************************************** + PRINT STYLESHEET PROPERTIES FOR: + Internet Explorer 5+ + Mozilla 1.6+ + Netscape 7+ + Opera 7+ + + Version 2.3.0 + --------------------------------- + If you need to create new styles, + do not add it in this file, instead + create a new CSS file, called + "print_custom.css" and reference + it from your XHTML file(s). +**************************************/ + + +/* LAYOUT */ +div.nav { + border-top: 2px solid #03C; + display: block; + margin: 10px 0 20px 0; + padding: 0 0 0 0; + width: 100%; + } + +div.n1, div.n2 { + display: none; + } + +div.toolBar { + display: none; + } + +div.body { + margin: 0 0 0 10px; + width: 576px; + } + +div.contentFull, div.contentRight, div.contentMiddle, div.contentLeft { + width: 576px; + } + +div.bodyPop { + width: 576px; + } +div.bodyPop div.content { + padding: 0 38px 50px 10px; + } +div.header div.btnPop { + display: none; + } + +div.sidebar { + display: none; + } + +div.navFooter { + display: none; + } +div.copy { + width: 576px; + } +div.footerPop { + width: 576px; + } + + +/* HEADER */ +.logo { + margin-left: 0; + } +.service { + display: none; + } + + +/* NAVIGATION */ +a:link, a:visited, a:hover, a:active { + color: #000; + text-decoration: none; + } +/* 3rd level navigation */ +div.nav3 { + display: none; + } +/* 4th level navigation */ +div.nav4 { + display: none; + } + + +/* MAIN BODY CONTENT */ +.ftNote a:link, .ftNote a:active, .ftNote a:visited, .ftNote a:hover { + color: #999; + text-decoration: none; + } + +thead tr.title td a:link, thead tr.title td a:visited, thead tr.title td a:active, thead tr.title td a:hover +tbody tr.title td a:link, tbody tr.title td a:visited, tbody tr.title td a:active, tbody tr.title td a:hover { + color: #000; + text-decoration: none; + } + +thead tr td.titleOn a:link, thead tr td.titleOn a:visited, thead tr td.titleOn a:active, thead tr td.titleOn a:hover { + color: #FFF; + text-decoration: none; + } + +/* Tools: download, bookmark, print */ +div.download, div.print { + display: none; + } \ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/css/s60/style.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/css/s60/style.css Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,323 @@ +/* +Style sheet for S60 API reference +version 0.1 + +History +0.1 OOjala Cleaned up original RoboHelp version + +*/ + +body { + color: #000000; + background-color: #ffffff; + /*font-size: 80%;*/ + font-size: 10pt; + font-family: Arial, sans-serif; + /*line-height: 125%;*/ +} + +p { + font-weight: normal; +} + +code { + /*font-size: 150%;*/ + font-size: 10pt; +} + +h1 { + line-height: 125%; + font-size: 20pt; + font-weight: bold; + font-style: normal; +} + +h2 { + line-height: 125%; + font-size: 16pt; + font-weight: bold; + font-style: normal; +} + +h3 { + font-size: 14pt; + font-weight: bold; +} + +h4 { + font-size: 12pt; + font-weight: bold; +} + +h5 { + font-size: 11pt; + font-weight: bold; +} + +h6 { + font-size: 10pt; + font-weight: bold; +} + +/* ------------------- LINKS ------------------- */ + +a img { + border: 0; +} + +a:link { + color: #0033cc; +} + +a:visited { + color: #0033cc; +} + +a:hover { + color: #ffaa00; +} + +a.qindex { +} + +a.el { + font-weight: normal; +} + +a.code { + font-weight: normal; + color: #4444ee; +} + +/* ------------------- LISTS ------------------- */ + +/* #### check */ +dl.el { + margin-left: -1cm; +} + +div.toc ul { + font-weight: normal; + list-style-type: none; + margin-left: 2em; + padding-left: 0; +} + +div.tabs ul { + padding: 3px 0; + margin-left: 0; + border-bottom: 1px solid #778; +} + +div.tabs li { + list-style: none; + margin: 0; + display: inline; + + border: 1px solid #778; + border-bottom: none; + background: #eef; + + padding: 3px 0.5em; + margin-left: 3px; +} + +div.tabs ul li a { + padding: 0; + margin: 0; +/* + padding: 3px 0.5em; + margin-left: 3px; + + border: 1px solid #778; + border-bottom: none; + background: #eef; +*/ + text-decoration: none; +} + + +div.tabs ul li#current { + background: #ed7; +} + + +/* ------------------- DIV ------------------- */ + +div.fragment { + width: 100%; + border: none; + background-color: #eeeeee; +} + +div.example { + width: 100%; + border: none; + background-color: #eeeeee; +} + +pre.fragment { + width: 100%; + /*border: 1px solid black;*/ + background-color: #eeeeee; + font-size: 10pt; +} + +#footerLeft { + float: left; + width: 50%; + margin-top: 0; + padding-top: 0; + font-size: 8pt; +} + +#footerRight { + margin-top: 0; + padding-top: 0; + text-align: right; +} + + +/* ------------------- TABLE ------------------- */ + +table { + border-collapse: collapse; + border-style: hidden; + font-size: 10pt; + /*caption-side: bottom;*/ +} + +table caption { + padding: 4px; + text-align: left; + margin-bottom: 0.5em; +} + +.specTable thead { + background-color: #eeeeee; + border-bottom: 5px double black; + text-align: left; + padding: 5px; +} + +.specTable thead td { + border: none; + font-weight: bold; +} + +th { + background-color: #eeeeee; + border-style: hidden; + border-bottom: 5px double black; + text-align: left; + padding: 5px; +} + +/* tr:hover { background: yellow; } */ + +table p { + padding-top: 0px; + margin-top: 0px; + line-height: 100%; +} + +.specTable td { + border-right: 1px solid black; + border-bottom: 1px dashed #cacaca; + vertical-align: top; + padding: 5px; +} + +col.qref { + border: 1px solid black; +} + +td.mdescLeft { + padding: 0px 8px 4px 8px; + font-style: italic; + background-color: #FAFAFA; + border: 1px none #E0E0E0; + margin: 0px; +} + +td.mdescRight { + padding: 0px 8px 4px 8px; + font-style: italic; + background-color: #FAFAFA; + border: 1px none #E0E0E0; + margin: 0px; +} + +td.memItemLeft { + padding: 1px 0px 0px 8px; + margin: 4px; + border: 1px none #E0E0E0; + border-top: 1px solid #E0E0E0; + background-color: #FAFAFA; +} + +td.memItemRight { + padding: 1px 8px 0px 8px; + margin: 4px; + border: 1px none #E0E0E0; + border-top: 1px solid #E0E0E0; + background-color: #FAFAFA; +} + +td.md { + background-color: #f0f0f0; + line-height: 150%; + font-family: "Courier New", Courier, monospace; +} + +td.mdrow { + background-color: #F0F0F0; + line-height: 150%; +} + +td.mdname1 { + background-color: #F0F0F0; + line-height: 150%; + font-family: "Courier New", Courier, monospace; +} + +td.mdname { + background-color: #F0F0F0; + line-height: 150%; + font-family: "Courier New", Courier, monospace; +} + + +/* ------------------- SPAN ------------------- */ + +/* span class="keyword"? */ +font.keyword { + color: #008000; +} + +font.keywordtype { + color: #604020; +} + +font.keywordflow { + color: #e08000; +} + +font.comment { + color: #800000; +} + +font.preprocessor { + color: #806020; +} + +font.stringliteral { + color: #002080; +} + +font.charliteral { + color: #008080; +} + + +/* ------------------- END ------------------- */ diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/css/sidebar.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/css/sidebar.css Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,56 @@ +body, html { + margin: 0; + padding: 0; +} +body, html { + margin: 10px; + font-size: 11px; + font-family: arial, helvetica, sans-serif; + line-height: 20px; + font-weight: bold; + text-decoration: none; + color: #0033CC; +} +h1 { + font-size: 16px; + margin: 5px 0; + border-bottom: solid 1px #0033CC; +} +h2 { + font-size: 14px; + margin: 0px; +} +ul { + display: block; + margin: 0; + padding: 0 0 15px 0; +} +li { + display: block; + margin-left: 0; + list-style: none; + padding-left: 15px; +} +.active { + background-color: white; +} +li ul { + padding-top: 0; + padding-bottom: 0; +} +li ul li { + font-weight: normal; +} +a { + color: #0033CC; + padding-left: 15px; +} +a:visited { + color: #0033CC; +} +a:active { + color: #888888; + background-image: url('http://nokia.com/pics/arrow.gif'); + background-position: 0px 1px; + background-repeat: no-repeat; +} \ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/css/style.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/css/style.css Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,1370 @@ +/************************************** + PRINT STYLESHEET PROPERTIES FOR: + Internet Explorer 5+ + Mozilla 1.6+ + Netscape 7+ + Opera 7+ + + Version 2.3.0 + --------------------------------- + If you need to create new styles, + do not add it in this file, instead + create a new CSS file, called + "style_custom.css" and reference + it from your XHTML file(s). +**************************************/ + + +/* LAYOUT */ +div.header { + display: block; + } + +div.nav { + display: block; + margin: 20px 0 0 0; + padding: 0px; + } + +div.toolBar { + clear: left; + display: block; + } + +div.tools { + display: block; + float: right; + margin: 0px; + width: 758px; + } + +div.body { + clear: both; + display: block; + margin: 20px 0 0 38px; + padding: 0px; + width: 712px; + } +div.body#toolbar { + margin-top: 0px; +} + +/* content area width: 712px */ +div.contentFull { + display: block; + float: left; + margin: 0px; + min-height: 200px; + padding: 0 0 50px 0; + width: 712px; + } +/* content area width: 576px */ +div.contentRight { + display: block; + float: left; + margin: 0px; + min-height: 200px; + padding: 0 0 50px 0; + width: 576px; + } +/* content area width: 398px */ +div.contentMiddle { + display: block; + float: left; + margin: 0px; + min-height: 200px; + padding: 0 0 50px 0; + width: 398px; + } +/* content area width: 534px */ +div.contentLeft { + display: block; + float: left; + margin: 0px; + min-height: 200px; + padding: 0 0 50px 0; + width: 534px; + } + +div.contentLeft h2{ + font-size: 12px; + margin: 20px 0 10px 0; + padding: 0px; + color: #000; +} + +div.contentLeft h2.verify-hdr{ + float: left; + font-size: 12px; + margin: 20px 0 10px 0; + padding: 0px; + color: #000; +} + +div.contentLeft a.chng{ + margin: 20px 0 0 10px; + float: left; + clear: right; +} + +#altHomepage { + padding-top: 60px; + } +div#altHomepage h1, div#altHomepage div.prTxt { + margin-left: 136px; + } + +div.secondary { + clear-after: both; + display: block; + margin: 0px; + padding: 0px; + width: 100%; + } +/* begin: for Netscape 6 */ +div.secondary:after { + content: ""; + display: block; + height: 0; + clear: both; + } +/* end: for Netscape 6 */ + +div.sidebar { + display: block; + float: left; + margin: 0 0 0 14px; + min-height: 200px; + padding: 0 0 50px 0; + } +div.sidebar#tools { + margin: 20px 0 0 14px; + } + +div.footer { + clear: both; + display: block; + margin: 0px; + padding: 0 0 20px 0; + position: relative; + width: 750px; + } +div.navFooter, div.copy { + clear: both; + color: #999; + display: block; + text-align: center; + width: 750px; + } +div.copy { + font-size: 11px; + } + +div.row { + clear: both; + margin-bottom: 5px; + } +div.row div.center { + clear: both; + width: 100%; + } +div.row div.left { + float: left; + width: 50%; + } +div.row div.right { + float: right; + width: 50%; + } +div.row span.left { + float: left; + text-align: left; + width: 50%; + } +div.row span.right { + float: right; + text-align: right; + width: 50%; + } + + +/* HEADER */ +.logo { + margin: 20px 0 0 10px; + } +.siteIdentifier { + color: #666; + font-size: 12px; + font-weight: bold; + left: 180px; + position: absolute; + top: 27px; + width: 350px; + } +.service { + display: block; + left: 350px; + position: absolute; + text-align: right; + top: 3px; + width: 400px; +} +.svcTools { + color: #999; + } +div.svcTools a:link, div.svcTools a:visited, div.svcTools a:active { + color: #666; + font-size: 11px; + text-decoration: none; + } +div.svcTools a:hover { + color: #666; + font-size: 11px; + text-decoration: underline; + } + +div.svcSearch { + margin: 3px 0 0 0; + } +div.svcSearch div.button { + float: right; + } +div.svcSearch div.input { + float: right; + padding: 0 5px 0 0; + } +div.svcSearch div.input input { + font-size: 11px; + margin: 1px 0 0 0; + width: 100px; + } +div.svcSearch div.label { + float: right; + padding: 7px 5px 0 0; + } + + +/* NAVIGATION */ +a:link { + color: #03C; + text-decoration: underline; + } +a:visited { + color: #909; + text-decoration: underline; + } +a:hover { + text-decoration: underline !important; + } +a:active { + text-decoration: underline; + } + +/* 1st level navigation */ +div.nav div.n1 { + background: #03c; + clear: both; + height: 19px; + padding-left: 13px; + } +div.nav div.n1 a { + background:url(../images/line_nav_l1.gif) repeat-y right center; + color: #fff; + display: block; + float: left; + font-size: 12px; + font-weight: bold; + line-height: 13px; + margin: 0 -1px; + padding: 3px 10px; + text-decoration: none; + } +div.nav div.n1 a.n1on{ + color:#000; + background: #ccc; + } + +/* 2nd level navigation */ +div.nav div.n2 { + background: #ccc; + clear: both; + height: 19px; + padding-left: 13px; + } +div.nav div.n2 a { + background:url(../images/line_nav_l2.gif) repeat-y right center; + color: #000; + display: block; + float: left; + font-size: 12px; + font-weight: bold; + line-height: 13px; + margin: 0 -1px; + padding: 3px 10px; + text-decoration: none; + } +div.nav div.n2 a.n2on{ + background: #fff; + } + +/* 3rd level navigation */ +div.nav3 { + color: #666; + display: block; + float: left; + margin: 20px 10px 0 0; + width: 126px; + } +div.nav3 h2 { + font-size: 12px; + font-weight: bold; + margin: 0px; + padding: 0 0 10px 12px; + } +div.nav3 h2 a:visited { + color: #909; + text-decoration: none; + } +div.nav3 h2 a:link { + color: #03C; + text-decoration: none; + } +div.nav3 h2 a:hover { + text-decoration: underline !important; + } +div.nav3 h2 a:active { + text-decoration: none; + } + +div.nav3 div.links a { + clear: both; + display: block; + padding: 0 0 0 12px; + color: #03C; + text-decoration: none; + } +div.nav3 div.links a:visited { + color: #909; + } +div.nav3 div.links a:hover { + text-decoration: underline !important; + } +div.nav3 div.links div.on3 { + background: url(../images/arrow.gif) top left no-repeat; + display: block; + padding: 0 0 0 12px; + } + + +/* 4th level navigation */ +div.nav4 { + color: #666; + display: block; + float: left; + margin: 0 0 0 12px; + /*margin: 0 0 0 5px;*/ +} +div.nav4 div.links a { + clear: both; + display: block; + padding: 0 0 0 12px; + color: #03C; + text-decoration: none; +} +div.nav4 div.links a:visited { + color: #909; +} +div.nav4 div.links a:hover { + text-decoration: underline !important; +} +div.nav4 div.links div.on4 { + background: url(../images/arrow.gif) top left no-repeat; + display: block; + padding: 0 0 0 12px; +} + +/* 5th level navigation */ +div.nav5 { + color: #666; + display: block; + float: left; + margin: 0 0 0 12px; + /*margin: 0 0 0 5px;*/ +} +div.nav5 div.links a { + clear: both; + display: block; + padding: 0 0 0 12px; + color: #03C; + text-decoration: none; +} +div.nav5 div.links a:visited { + color: #909; +} +div.nav5 div.links a:hover { + text-decoration: underline !important; +} +div.nav5 div.links div.on5 { + background: url(../images/arrow.gif) top left no-repeat; + display: block; + padding: 0 0 0 12px; +} + + +/* toolbar navigation */ +div.toolCap { + background: url(../images/line_tool.gif) no-repeat; + float: right; + height: 18px; + width: 3px; + width/* */:/**/4px; + } +div.toolLnk { + background: url(../images/arrow_green_right.gif) left no-repeat; + border-bottom: 1px solid #009; + display: block; + float: right; + padding: 1px 8px 0 6px; + height: 18px; + height/* */:/**/16px; + } +div.toolLnk a:link, div.toolLnk a:visited, div.toolLnk a:active { + color: #666; + font-size: 11px; + text-decoration: none; + } +div.toolLnk a:hover { + color: #666; + font-size: 11px; + text-decoration: underline !important; + } +div.toolPadL { + border-bottom: 1px solid #009; + float: right; + height: 17px; + width: 1px; + } +div.toolPadR { + height:17px; + width:1px; + } +td.toolL { + text-align: right; + vertical-align: top; + width: 750px; + } +td.toolR { + border-bottom:1px solid #009; + width: 100%; + } +/* begin: Hide from Opera 7 */ +html*td.toolR { + border-bottom:1px solid #009; + width: auto; + } +/* end: Hide from Opera 7 */ + +/* MAIN BODY CONTENT */ +.alignL { + text-align: left; + } +.alignR { + text-align: right; + } + +body { + font-size: 11px; + font-family: arial,helvetica,sans-serif; + margin: 0px; + padding: 0px; + } + +div.center { + margin: 0 auto 0 auto; + text-align: center; + } + +/* comparison-related */ +.cmpEl { + display: block; + float: left; + vertical-align: top; + } + +tbody tr.cmpDataH td { + border-bottom: 1px solid #999; + padding: 10px 5px 5px 5px; + vertical-align: top; + } +tbody tr.cmpDataV td { + padding: 10px 5px 5px 5px; + vertical-align: top; + } +.cmpImg { + display: block; + float: left; + vertical-align: top; + } + +.creationDate { + color: #666; + padding: 0 0 10px 0; + } + +.floatL { + float: left; + } +.floatR { + float: right; + } + +.ftNote { + color: #999; + padding: 3px 0 0 0; + } +.ftNote a:link, .ftNote a:active, .ftNote a:visited { + color: #999; + text-decoration: none; + } +.ftNote a:hover { + color: #999; + text-decoration: underline !important; + } + +/* primary */ +.img72 { + display: block; + float: left; + padding: 0 10px 0 0; + vertical-align: top; + width: 62px; + } +.img195 { + display: block; + float: left; + padding: 0 10px 20px 0; + } +.txt188 { + display: block; + float: left; + padding: 0 10px 0 0; + width: 178px; + } +.txt193 { + display: block; + float: left; + width: 193px; + } + +div.prImg { + margin: 0 0 10px 0; + } +.prTxt { + font-size: 12px; + font-family: arial,helvetica,sans-serif; + line-height: 16px; + margin: 0 0 10px 0; + } + +.prTxt img.prt{ + margin-right: 10px; +} + +a:link.prt{ + color: #FF6600 !important; + text-decoration: underline !important; +} + +a:visited.prt{ + color: #FF6600 !important; + text-decoration: underline !important; +} + +a:hover.prt{ + color: #FF6600 !important; + text-decoration: underline !important; +} + +div.inset { + display: block; + float: left; + padding: 0 10px 10px 0; + } + +div.editorial div.prTxt { + display: block; + float: left; + margin: 0px; + padding: 0px; + width: 262px; + } + +div.txt { + clear: left; + margin: 0 0 20px 0; + } +div.txt h2 { + font-size: 12px; + font-weight: bold; + margin: 0px; + padding: 0 0 5px 0; + } + +/* teasers */ +div.tsr1 { + display: block; + float: left; + margin: 0 0 20px 10px; + width: 126px; + } +div.tsr1 h2 { + font-size: 12px; + margin: 0 0 10px 0; + padding: 0px; + } + +div.tsr1Left { + display: block; + float: left; + margin: 0 0 20px 0; + width: 126px; + } +div.tsr1Left h2 { + font-size: 12px; + margin: 0 0 10px 0; + padding: 0px; + } + +/* 2-column teaser */ +div.tsr2Left { + display: block; + float: left; + margin: 0 0 20px 0; + width: 262px; + } +div.tsr2Left h2 { + font-size: 12px; + margin: 0 0 10px 0; + padding: 0px; + } +div.tsr2 { + display: block; + float: left; + margin: 0 0 20px 10px; + width: 262px; + } +div.tsr2 h2 { + font-size: 12px; + margin: 0 0 10px 0; + padding: 0px; + } + +div.sidebar div.sb div.sbBody select, div.sidebar div.sb div.sbBody input.txt { + font-size: 11px; + width: 120px; + } + +.error { + width: 534px; + } +.errorImg { + display: block; + float: left; + width: 32px; + } +.errorTxt { + display: block; + float: left; + font-size: 12px; + padding: 4px 0 0 0; + width: 502px; + } +.errorMsg { + color: #F00; + padding: 0 0 10px 0; + } + + +/* form-related */ +fieldset { + border: 1px solid #ccc; + /* + border: none; + */ + margin-bottom: 20px; + padding-bottom: 5px; + } +form { + margin: 0px; + } +form input.img { + border: none; + margin: 5px 0 0 0; + } +img.date { + margin:0 0 -3px 3px; + } +input.txt { + font-size: 11px; + width: 170px; + } +input.txtError { + background: #ffc; + font-size: 11px; + width: 170px; + } +label { + cursor: pointer; + text-align: left; + } +label.req { + font-weight: bold; + } +label.error { + color: #f00; + } +label.reqError { + color: #f00; + font-weight: bold; + } +legend { + font-size: 1.1em; + font-weight: bold; + } +optgroup { + font-size: 1em; + } +select { + font-size: 11px; + width: 176px; + } +textarea { + font-family: arial,helvetica,sans-serif; + font-size: 11px; + height: 75px; + width: 170px; + } +td.frmLblBottom { + text-align: right; + vertical-align: bottom; + width: 40%; + } +td.frmLblTop { + padding-top: 10px; + text-align: right; + vertical-align: top; + width: 40%; + } +tr.spacer { + height: 20px; + } + +h1 { + color: #000; + font-size: 16px; + font-weight: bold; + margin: 5px 0 10px 0; + } +h1.noMargin { + color: #000; + font-size: 16px; + font-weight: bold; + margin: 5px 0 3px 0; + } + +h1.pageHeading { + color: #000; + font-family: Nokia Sans SemiBold,arial,helvetica,sans-serif; + font-size: 22px; + font-weight: normal; + margin: 0 0 10px 0; + } +h1.pageHeadingRed { + color: #f00; + font-family: Nokia Sans SemiBold,arial,helvetica,sans-serif; + font-size: 22px; + font-weight: normal; + margin: 0 0 10px 0; + } + +.hgt5 { + clear: left; + margin: 5px 0 0 0; + } +.hgt10 { + clear: left; + margin: 10px 0 0 0; + } +.hgt20 { + clear: left; + margin: 20px 0 0 0; + } + +hr { + background: #CCC; + border-top: 1px #CCC; + clear: left; + color: #CCC; + height: 1px; + margin: 0 0 10px 0; + width: 100%; + } + +hr.drk { + background: #666; + border-top: 1px #666; + clear: left; + color: #666; + height: 1px; + margin: 0 0 10px 0; + width: 100%; +} + +img { + border: none; + } + +img.btn { + margin: 5px 0 0 0; + } +img.ph { + background: #CFF; + border: 1px solid #000; + } + +.marginBottom { + margin-bottom: 3px; + } + +p { + margin: 10px 0 0 0; + } + +table.numFound { + color: #999; +} + +div.pagination { + clear: both; + margin: 0px; + text-align: right; + margin-bottom: 3px; + /*margin-bottom: 0px;*/ + } + +td div.pagination { + clear: both; + margin: 0px; + text-align: right; + } + +div.pagination span { + color: #666; + padding: 0 0 0 5px; + } + +.price126 { + border-top: 2px solid #093; + border-bottom: 2px solid #093; + margin: 5px 0 0 0; + width: 126px; + } +.price195 { + border-top: 2px solid #093; + border-bottom: 2px solid #093; + margin: 5px 0 10px 0; + width: 195px; + } +.priceAmt { + padding: 5px; + } + +td { + font-size: 11px; + font-family: arial,helvetica,sans-serif; + } + +table thead tr th,/*td*/ +table tbody tr th { + font-weight: bold; + } + +thead tr.title td, tbody tr.title td { + background: #E6E6E6; + border-top: 1px solid #999; + border-bottom: 1px solid #999; + font-size: 12px; + font-weight: bold; + white-space: nowrap; + } +thead tr.title td a:link, thead tr.title td a:visited, thead tr.title td a:active, +tbody tr.title td a:link, tbody tr.title td a:visited, tbody tr.title td a:active { + color: #000; + text-decoration: none; + } +thead tr.title td a:hover, +tbody tr.title td a:hover { + color: #000; + text-decoration: underline; + } + +thead tr td.titleOn { + background: #999; + border-top: 1px solid #999; + border-bottom: 1px solid #999; + color: #FFF; + font-size: 12px; + } +thead tr td.titleOn a:link, thead tr td.titleOn a:visited, thead tr td.titleOn a:active { + color: #FFF; + text-decoration: none; + } +thead tr td.titleOn a:hover { + color: #FFF; + text-decoration: underline; + } + +thead tr th, tbody tr th { + background: #E6E6E6; + border-top: 1px solid #999; + border-bottom: 1px solid #999; + font-size: 12px; + font-weight: bold; + text-align: left; + white-space: nowrap; + } +thead tr th a:link, thead tr th a:visited, thead tr th a:active, +tbody tr th a:link, tbody tr th a:visited, tbody tr th a:active { + color: #000; + text-decoration: none; + } +thead tr th a:hover, +tbody tr th a:hover { + color: #000; + text-decoration: underline; + } + +thead tr th.on { + background: #999; + border-top: 1px solid #999; + border-bottom: 1px solid #999; + color: #FFF; + font-size: 12px; + } +thead tr th.on a:link, thead tr th.on a:visited, thead tr th.on a:active { + color: #FFF; + text-decoration: none; + } +thead tr th.on a:hover { + color: #FFF; + text-decoration: underline; + } + +tbody tr td.footer { + border-bottom: 1px solid #999; + } +tfoot tr td.footer { + border-bottom: 1px solid #999; + } + +td.vaTop { + vertical-align: top; + } +td.vaBtm { + vertical-align: bottom; + } + +ol { + margin: 0; + margin-left: 17px; + /*margin-left: 22px;*/ + padding: 0; + } + +ul { + list-style: none; + margin: 0; + padding: 0; + } + +ul.black li { + background: url('../images/li_bla.gif') no-repeat top left ; + padding-left: 8px; + } + +ul li { + background: url('../images/li_blu.gif') no-repeat top left ; + padding-left: 8px; + } + +div.w288 { + display: block; + float: left; + padding: 0 10px 0 0; + width: 278px; + } +div.w288 h2 { + font-size: 12px; + font-weight: bold; + margin: 0px; + padding: 0 0 5px 0; + } + +.old { + font-style: italic; + } + +/* SIDEBAR */ +div.siteHelper { + margin: 0 0 10px 0; + width: 164px; + } + +.shBg { + background: url(../images/right_column_dot.gif) #999; + } +.shTxt { + background: #E6E6E6; + padding: 3px 0 3px 7px; + } + +div.sb { + margin: 0px; + width: 164px; + } +div.sbHeading h1 { + background: url(../images/sb_header.gif) top right no-repeat #FFF; + color: #666; + display: block; + font-family: arial,helvetica,sans-serif; + font-size: 12px; + font-weight: bold; + margin: 0px; + padding: 6px 0 7px 9px; + } +div.sbBody h2 { + color: #666666; + font-family: arial,helvetica,sans-serif; + font-size: 11px; + font-weight: bold; + margin: 0px; + padding: 0px; + } +div.sbBody { + background: #FFF; + border: 1px solid #CCC; + border-bottom: none; + color: #666; + display: block; + margin: -2px 0 0 0; + padding: 8px 8px 7px 8px; + width: 146px; + } +div.txtFull, div.sbBody ul { + width: 146px; + } +div.sbFooter { + background: url(../images/sb_footer.gif) top no-repeat #FFF; + display: block; + margin: -2px 0 0 0; + padding: 0px; + width: 164px; + } + + +/* COLORS: Only the color attribute is specified */ +tr.bg { + background: #e6e6e6; + } + +.black { + color: #000; + } +.blue { + color: #03C; + } +.green { + color: #093; + } +.grey { + color: #666; + } +.greyLight { + color: #999; + } +.red { + color: #F00; + } + + +/* POPUP */ +div.navPop { + border-top: 2px solid #03C; + display: block; + margin: 10px 0 0 0; + padding: 0px; + width: 100%; + } + +div.btnPop { + margin: -14px 0 0 0; + text-align: right; + width: 100%; + } +div.btnPop div { + margin-right: 10px; + } + +div.bodyPop { + display: block; + margin: 10px 0 0 0; + width: 100%; + } +div.bodyPop div.content { + padding: 0 38px 50px 38px; + } + +div.footerPop { + clear: both; + color: #999; + height: 26px; + margin: 0; + text-align: center; + width: 100%; + } + + +/* Tools: download, bookmark, print */ +div.download { + background: url(../images/ico_download.gif) top right no-repeat; + margin: 0 0 5px 0; + padding: 0 13px 0 0; + white-space: nowrap; + } +div.download a:link, div.download a:visited, div.download a:active, div.download a:hover { + color: #f60; + font-size: 11px; + font-weight: bold; + text-decoration: none !important; + } +div.print { + background: url(../images/ico_print.gif) left no-repeat; + margin: 0; + padding: 0 0 0 13px; + white-space: nowrap; + } +div.print a:link, div.print a:visited, div.print a:active, div.print a:hover { + color: #f60; + font-size: 11px; + text-decoration: underline; + } + + +/* Tabs */ +/* Page Container, tab navigation width, depending on the template width */ +div.full { + width: 712px; + } +div.right { + width: 576px; + } +div.middle { + width: 398px; + } +div.left { + width: 534px; + } + +/* Tab Container, Left and Right end caps */ +div.tab { + /*background: url('../images/tab_bg_border.gif') repeat-x bottom left;*/ + clear: both; + font-family: arial, helvetica, sans-serif; + font-size: 11px; + width: 100%; + } +div.tab div.left { + border-bottom: 1px solid #666; + display: block; + float: left; + margin: 0; + padding: 0; + height: 20px; + /*height: 21px;*/ + width: 20px; + } +div.tab div.right { + background: url('../images/tab_end.gif') no-repeat top left; + border-bottom: 1px solid #666; + display: block; + float: left; + height: 20px; + /*height: 21px;*/ + margin: 0; + padding: 0px; + width: 20px; + } +div.tab div.filler { + border-bottom: 1px solid #666; + height: 20px; + /*height: 21px;*/ + width: 100%; + } + +/* Tab "OFF" state attributes */ +div.tab div.off { + background: url('../images/tab_off_left.gif') no-repeat top left; + display: block; + float: left; + margin: 0; + padding: 0 0 0 5px; + } +div.tab div.off div { + background: url('../images/tab_off_strip.gif') repeat-x top left; + display: block; + float: left; + margin: 0 0 0 3px; + padding: 0; + } +div.tab div.off div a { + background: url('../images/tab_off_right.gif') no-repeat top right; + color: #000; + display: block; + float: left; + height: 21px; + margin: 0; + padding: 5px 14px 0 7px; + /*padding: 5px 14px 0 4px;*/ + text-decoration: none; + white-space: nowrap; + } +div.tab div.off div a:hover { + text-decoration: underline !important; + } + +/* Tab "ON" state attributes */ +div.tab div.on { + background: url('../images/tab_on_left.gif') no-repeat top left; + display: block; + float: left; + margin: 0; + padding: 0 0 0 5px; + } +div.tab div.on div { + background: url('../images/tab_on_strip.gif') repeat-x top left; + cursor: default; + display: block; + float: left; + margin: 0 0 0 6px; + /*margin: 0 0 0 3px;*/ + padding: 0; + } +div.tab div.on div div#on { + background: url('../images/tab_on_right.gif') no-repeat top right; + color: #000; + display: block; + float: left; + font-weight: bold; + height: 21px; + margin: 0; + padding: 5px 14px 0 4px; + white-space: nowrap; + } + + +/* WEBCAST Template -specific */ +/* webcast containers */ +div.webcast { + margin: 20px; + /*margin: 0 20px 20px 20px;*/ + } +div.webcast table { + background:url(../images/wc_bg_gradient.gif) repeat-x; + } + +/* table/iframe container borders */ +td.border_t { + background: url(../images/wc_border_t.gif) repeat-x top; + } +td.border_r { + background: url(../images/wc_border_r.gif) repeat-y right; + } +td.border_b { + background: url(../images/wc_border_b.gif) repeat-x bottom; + } +td.border_l { + background: url(../images/wc_border_l.gif) repeat-y left; + } + +/* iframes */ +iframe#video { + border: 1px solid #999; + height: 180px; + margin: 0 0 10px 0; + padding: 0; + width: 238px; + } +iframe#video_status { + border: none; + height: 24px; + margin: 0 0 10px 0; + padding: 0; + width: 240px; + } +iframe#video_control { + border: none; + height: 35px; + margin: 0 0 10px 0; + /*margin: 0 0 5px 0;*/ + padding: 0; + width: 240px; + } +iframe#toc { + border: 1px solid #999; + height: 200px; + margin: 5px 0 0px 0; + padding: 0; + width: 238px; + } +iframe#main { + border: 1px solid #999; + height: 353px; + margin: 0 0 20px 0; + padding: 0; + width: 468px; + } +iframe#exdocs_tabs { + border: none; + height: 21px; + margin: 0 0 10px 0; + padding: 0; + width: 468px; + } +iframe#exdocs_docs { + border: 1px solid #999; + height: 95px; + /*height: 104px;*/ + margin: 0; + padding: 0; + width: 466px; + } + +li.pdf { + font-size: 12px; + background: url('../images/ico_pdf.gif') no-repeat top left ; + padding-left: 20px; + padding-bottom: 3px; + } +li.ppt { + font-size: 12px; + background: url('../images/ico_ppt.gif') no-repeat top left ; + padding-left: 20px; + padding-bottom: 3px; + } +li.word { + font-size: 12px; + background: url('../images/ico_word.gif') no-repeat top left ; + padding-left: 20px; + padding-bottom: 3px; + } +/* END Webcast Template */ \ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/css/style_cart.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/css/style_cart.css Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,457 @@ +/*BEGIN shopping cart template*/ +div#cart{ + border-top: 1px solid #999; + color: #666; +} + +div#cart a.chng{ + margin: 21px 0 0 10px; + float: left; + clear: right; + font-weight: bold; + text-decoration: underline; +} + +div#cart form{ + margin: 0 0 0 0; +} + +div#cart form input{ + width: 30px; + font-size: 10px; + text-align: right; +} + +div#cart th{ + border-top: 0 !important; + font-weight: normal; +} + +div#cart th.item-desc{ + padding-left:7px; + white-space:normal; +} + +div#cart th.item-total{ + font-weight: bold; + text-align: right; + padding: 0 7px 0 0; + width: 70px; +} + +div#cart th.item-qty{ + text-align: center; + padding: 0 7px 0 0; + width: 70px; +} + +div#cart th.item-price{ + text-align: right; + padding: 0 7px 0 0; + width: 70px; +} + +div#cart tr.dash-row td{ + border-bottom: 1px dashed #ccc; + padding-top: 7px; + padding-bottom: 7px; +} + +div#cart td.item-desc{ + padding-left:7px; +} + +div#cart td.item-desc .ship-est{ + color: #999; +} + +div#cart td.item-total{ + font-weight: bold; + text-align: right; + padding: 0 7px 0 0; +} + +div#cart td.item-qty{ + text-align: center; + padding: 0 7px 0 0; +} + +div#cart td.item-qty a{ + font-size: 9px; +} + +div#cart td.item-price{ + text-align: right; + padding: 0 7px 0 0; +} + +div#cart td.cart-sub{ + text-align: right; + padding: 10px 7px 0 0; + font-weight: bold; +} + +div#cart td.cart-sub-total{ + text-align: right; + padding: 10px 7px 0px 0; + font-weight: bold; +} + +div#cart td.cart-sub-verify{ + text-align: right; + padding: 10px 7px 0 0; +} + +div#cart td.cart-ship-total-verify{ + text-align: right; + padding: 0 7px 0px 0; +} + +div#cart td.cart-tax-total-verify{ + text-align: right; + padding: 0 7px 10px 0; +} + +div#cart td.cart-est-total-verify{ + text-align: right; + padding: 10px 7px 10px 0; + font-weight: bold; + border-top: 1px dashed #999 ; +} + +div#cart td.update-total{ + text-align: right; + padding: 10px 7px 20px 0 !important; +} + +div#cart tr.solid-row td{ + empty-cells: show; + border-bottom: 1px solid #999; + padding-top: 7px; + padding-bottom: 7px; +} + +div#cart td.cont-shop{ + padding: 10px 7px 0 0; +} + +div#cart td.checkout{ + text-align: right; + padding: 10px 0px 0 0; +} + +div.step-ind{ + margin: 0 0 10px 0; +} + +div.step-ind a:link, div.step-ind a:visited, div.step-ind a:hover, div.step-ind a:active{ + text-decoration: none !important; + color: #0033cc; +} + +div.step-ind span{ + color:#999; + clear: both; + padding-right: 15px; +} + +div.step-ind span img{ + padding-right: 5px; +} + +div#cart #new-customer{ + float: left; + width: 256px; + padding: 0 10px 0 0; +} + +div#cart #return-customer{ + width: 257px; + float: left; + padding: 0 0 0 10px; + border-left: 1px dashed #999 ; +} + +div#cart #return-customer form{ + text-align: right; + margin: 0 0 0 0; + width: 210px; +} + +div#cart #return-customer form input{ + width: 100px; + font-size: 10px; + text-align: left; +} + +div#cart #return-customer .forget-pword{ + text-align: left; + padding: 10px 0 0 0; +} + +div#cart #payment-method form{ + margin: 0 0 0 0; + width: 548px; +} + +div#cart #payment-method form table{ + width: 548px; +} + +div#cart #payment-method td.frm-left{ + text-align: left; +} + +div#cart #payment-method td.frm-left-yr{ + text-align: left; + width: 164px; +} + +div#cart #payment-method form input.txt{ + width: 140px; + text-align:left; +} + +div#cart #payment-method form input.txt-sec-code{ + width: 40px; + text-align:left; +} + +div#cart #payment-method form select.exp{ + width: 120px; + text-align:left; +} + +div#cart #payment-method form select.yr{ + width: 60px; + text-align:left; +} + +div#cart #payment-method form input.cc-radio{ + text-align:left; + margin: 0 0 0 -10px; +} + +div#cart #payment-method form img{ + margin: 0 5px 0 -5px; + text-align:left; +} + +div#cart #payment-method form a{ + text-align:left; + font-size: 9px; +} + +div#cart td.frmLblBottom { + text-align: right; + vertical-align: bottom; + width: 200px; +} + +div#cart td.frmLblBottom-yr { + text-align: right; + vertical-align: bottom; + width: 35px; +} + +div#cart #payment-method td.frm-left-mth{ + text-align: left; + width: 50px; +} + +div#cart #payment-method form input.save-cc{ + text-align:left; + margin: 0 -5px 0 -8px; +} + +div#cart #payment-method td.checkout{ + text-align: right; + border-top: 1px solid #999 ; + padding: 10px 0 0 0; +} + +div#cart .spacer{ +height: 20px; +} + +div#cart #billing-info{ + float: left; + width: 256px; + padding: 0 10px 0 0; + border-right: 1px dashed #999 ; +} + +div#cart #billing-info table{ + clear: left; +} + +div#cart #shipping-info{ + float: left; +clear: right; + width: 257px; + float: left; + padding: 0 0 0 10px; +} + +div#cart #shipping-info table{ + clear: left; +} + +div#cart #shipping_location{ + clear: left; + border-top: 1px solid #999; + margin-top: 10px; +} + +div#cart #shipping_location .check-box{ + float: left; + margin: -3px -5px 0 -10px; +} + +div#cart #shipping_location .check-txt{ + float: left; + margin: 0 0 10px 0; +} + +div#cart #create_id{ + clear: left; + border-top: 1px solid #999; +} + +div#cart #email_notification{ + clear: left; + border-top: 1px solid #999; +} + +div#cart #email_notification .check-box{ + float: left; + margin: -3px -5px 0 -10px; +} + +div#cart #email_notification .check-txt{ + float: left; + margin: 0 0 10px 0; + width: 500px; +} + +div#cart #submit-form{ + clear: left; + border-top: 1px solid #999; + text-align: right; +} + +div#cart #submit-form img{ + margin-top: 20px; +} + +div#cart form.bill_ship_form{ + margin: 0 0 0 0; +} + +div#cart form.bill_ship_form input{ + width: 160px; + text-align:left; +} + +div#cart form.bill_ship_form select.st{ + width: 60px; + text-align:left; +} + +div#cart form.bill_ship_form input.zip1{ + width: 35px; + text-align:left; +} + +div#cart form.bill_ship_form input.zip2{ + width: 30px; + text-align:left; +} + +div#cart form.bill_ship_form select.cnty{ + width: 160px; +} + +div#cart form.bill_ship_form input.ph1{ + width: 22px; + text-align:left; +} + +div#cart form.bill_ship_form input.ph2{ + width: 27px; + text-align:left; +} + +div#cart form.bill_ship_form td.frm-left{ + text-align: left; +} + +div#cart form.bill_ship_form .check-box{ + float: left; + margin: 6px -5px 20px -75px; +} + +div#cart form.bill_ship_form .check-txt{ + float: left; + margin: 10px 0 20px -65px; +} + +div#cart form.bill_ship_form input.promo{ + width: 40px !important; +} + +div#bill-ship-wrapper{ + border: 0; + height: 135px; +} + +div#bill-ship-conf-wrapper{ + height: 120px; +} + +div#payment-promo-wrapper{ + border-top: 1px solid #999; +} + +div#cart #payment-info{ + float: left; + clear: left; + width: 256px; + padding: 0 10px 0 0; + border-right: 1px dashed #999; +} + +div#cart #payment-info table{ + clear: left; +} + +div#cart #promo{ + width: 257px; + float: left; + padding: 0 0 0 10px; +} + +div#cart #promo table{ + clear: left; +} + +div#cart #shipping_method{ + clear: left; + border-top: 1px solid #999; + border-bottom: 1px solid #999; + margin: 10px 0 0 0; + padding-bottom: 10px; +} + +div#cart #prt img{ +margin-right: 10px; +} + +div#cart #prt a{ + color: #FF6600; +} + +div#order_summ{ + border-top: 1px solid #999; +} +/*END shopping cart template*/ \ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/css/tabs_table.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/css/tabs_table.css Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,31 @@ +/* table-based tabs -specific */ +table.tab tr td.off { + background: url('../images/tab_off_strip.gif'); + cursor: pointer; + display: block; + font-family: arial; + font-size: 11px; + height: 16px; + margin: 0; + padding: 5px 3px 0 3px; + white-space: nowrap; + } +table.tab tr td.off a { + color: #000; + text-decoration: none; + } +table.tab tr td.off a:hover { + text-decoration: underline; + } +table.tab tr td.on { + background: url('../images/tab_on_strip.gif'); + cursor: default; + display: block; + font-family: arial; + font-size: 11px; + font-weight: bold; + height: 16px; + margin: 0; + padding: 5px 3px 0 3px; + white-space: nowrap; + } \ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/images/arrow.gif Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/images/arrow.gif has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/images/li_blu.gif Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/images/li_blu.gif has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/images/s60/Icon_S60_Closed.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/images/s60/Icon_S60_Closed.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/images/s60/Icon_S60_Open.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/images/s60/Icon_S60_Open.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/images/s60/Icon_S60_Topic.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/images/s60/Icon_S60_Topic.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/images/s60/S60tag_RGB.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/images/s60/S60tag_RGB.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/images/s60/toolbar.png Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/images/s60/toolbar.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/images/xhtml/container_obj.gif Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/images/xhtml/container_obj.gif has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/images/xhtml/e_synch_nav.gif Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/images/xhtml/e_synch_nav.gif has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/images/xhtml/minus.gif Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/images/xhtml/minus.gif has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/images/xhtml/pdf.gif Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/images/xhtml/pdf.gif has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/images/xhtml/plus.gif Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/images/xhtml/plus.gif has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/images/xhtml/toc_closed.gif Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/images/xhtml/toc_closed.gif has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/images/xhtml/toc_open.gif Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/images/xhtml/toc_open.gif has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/images/xhtml/topic.gif Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/images/xhtml/topic.gif has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/js/common.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/js/common.js Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,149 @@ +/** + * Check required support for TOC. + */ +function support() { + if (document.getElementsByTagName && document.styleSheets) { + tocSupported = true; + } +} + +/** Flag if dynamic TOC is supported */ +var tocSupported = false; +support(); +/** Current active TOC node. */ +var currentHighlight = null; + +/** Regexp for backslash, used to turn Windows pseudo-URLs to URLs. */ +var slashRegExp = new RegExp("\\\\", "g"); + +function getBaseUrl() { + var topLocation = window.top.location; + var i = topLocation.pathname.indexOf(URL_BASE); + if (i != -1) { + return topLocation.protocol + "//" + + topLocation.hostname + (topLocation.port == "" ? "" : ":" + topLocation.port) + + topLocation.pathname.substring(0, i).replace(slashRegExp, "/"); + } else if (topLocation.pathname.substring(topLocation.pathname.length - 1) == "/") { + return topLocation.protocol + "//" + + topLocation.hostname + (topLocation.port == "" ? "" : ":" + topLocation.port) + + topLocation.pathname; + } else { + return undefined; + } +} + +/* +var isIE = (window.navigator.appVersion.indexOf("MSIE 6") !== -1); +*/ + +/** + * Hightlight TOC node. + * + * @param node TOC node to highlight + */ +function highlightTocItem(node) { + if (tocSupported) { + // turn old off +/* + if (isIE) { + var lis = node.ownerDocument.getElementsByTagName("*"); + for (var i = 0; i < lis.length; i++) { + removeClass(lis.item(i), TOC_CLASS_ACTIVE); + } + } else { +*/ + if (currentHighlight === null || !isClass(currentHighlight, TOC_CLASS_ACTIVE)) { + // turn all off + var lis = node.ownerDocument.getElementsByTagName(TOC_ELEMENT_ITEM); + for (var i = 0; i < lis.length; i++) { + removeClass(lis.item(i), TOC_CLASS_ACTIVE); + } + } else { + removeClass(currentHighlight, TOC_CLASS_ACTIVE); + } +/* + } +*/ + // turn this on + addClass(node.parentNode, TOC_CLASS_ACTIVE); + currentHighlight = node.parentNode; +/* + // IE6 addition, because it doesn't support > in CSS selectors + if (isIE) { + addClass(node, TOC_CLASS_ACTIVE); + } +*/ + } +} + +/** + * Toggle child node display. + * + * @param n Target node of the event. + */ +//moved to toc.js +/* +function toggle(n) { + // toggle controller + if (isClass(n, "toc-controller-open")) { + n.firstChild.data = "+"; + switchClass(n, "toc-controller-closed", "toc-controller-open"); + } else { + n.firstChild.data = "-"; + switchClass(n, "toc-controller-open", "toc-controller-closed"); + } + // toggle content + i = getNextSiblingByTagName(n.parentNode.firstChild, "ul"); + if (i != null) { + if (i.style.display == "none") { + i.style.display = "block"; + } else { + i.style.display = "none"; + } + } +} +*/ + +/* Move to common utils. */ + +/** + * Get first child element by element name. + * + * @param node parent element + * @param name element name of the desired child elements + * @return DOM Element, null if none found + * @type Object + */ +function getFirstChildElementByTagName(node, name) { + var tag = undefined; + if (name !== undefined) { + tag = name.toLowerCase(); + } + for (var n = node.firstChild; n != null; n = n.nextSibling) { + if (n.nodeType == 1 && (name === undefined || n.nodeName.toLowerCase() == tag)) { + return n; + } + } + return null; +} + +/** + * Get first element by class name. + * + * @param node DOM node whose descendants select + * @param cls class name + * @param elem element name (optional) + * @return DOM Element, null if none found + * @type Object + */ +function getFirstElementByClassName(node, cls, elem) { + if (elem === undefined) { + elem = "*"; + } + for (var el = document.getElementsByTagName(elem), i = 0; i < el.length; i++) { + if (isClass(el[i], cls)) { + return el[i]; + } + } + return null; +} \ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/js/dtddoc.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/js/dtddoc.js Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,26 @@ +if (window.top.developerMode === undefined) { + window.top.developerMode = false; +} +if (window.top.developerMode) { + document.getElementById("developer-style").disabled = true; +} + +function switchStylesheetHandler(event) { + window.top.developerMode = !(window.top.developerMode); + document.getElementById("developer-style").disabled = window.top.developerMode; + var b = getTargetNode(event); + if (b) { + b.firstChild.data = (window.top.developerMode ? "hide" : "show") + " advanced"; + } +} + +function init() { + var h = document.getElementById("header-links"); + if (h) { + var b = document.createElement("button"); + b.appendChild(document.createTextNode((window.top.developerMode ? "hide" : "show") + " advanced")); + attachEventListener(b, "click", switchStylesheetHandler); + h.insertBefore(document.createTextNode(" "), h.firstChild); + h.insertBefore(b, h.firstChild); + } +} \ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/js/gui.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/js/gui.js Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,128 @@ +var TOC_CLASS_ACTIVE = "on3"; +var TOC_CLASS_COLLAPSED = "toc-controller-closed"; +var TOC_CLASS_EXPANDED = "toc-controller-open"; +var TOC_CLASS_CONTROL = "toc-controller"; +var TOC_CLASS_SPACE = "toc-space"; +var TOC_DISPLAY_COLLAPSED = "none"; +var TOC_DISPLAY_EXPANDED = "block"; + +/** + * Check required support for TOC. + */ +function support() { + if (document.getElementsByTagName && document.styleSheets) { + tocSupported = true; + } else { + //alert("Dynamic TOC not available."); + } +} + +/** Flag if dynamic TOC is supported */ +var tocSupported = false; +support(); +/** Current active TOC node. */ +var currentHighlight = null; +/** Process start time stamp. */ +var processStart; +/** Process end time stamp. */ +var processEnd; +/** Last process duration. */ +var processDuration + + +/** + * Hightlight TOC node. + * + * @param node TOC node to highlight + */ +function highlightTocItem(node) { + if (tocSupported) { + // turn old off + if (currentHighlight === null || !isClass(currentHighlight, TOC_CLASS_ACTIVE)) { + // turn all off + var li = getFirstElementByClassName(node.ownerDocument, TOC_CLASS_ACTIVE, TOC_ITEM); + if (li !== null) { + removeClass(li, TOC_CLASS_ACTIVE); + } + } else { + removeClass(currentHighlight, TOC_CLASS_ACTIVE); + } + // turn this on + addClass(node.parentNode, TOC_CLASS_ACTIVE); + currentHighlight = node.parentNode; + } +} + +/** + * Toggle child node display. + * + * @param n Target node of the event. + */ +function toggle(n) { + if (isClass(n, TOC_CLASS_EXPANDED)) { + tocNodeCollapse(n); + } else { + tocNodeExpand(n); + } +} + +/** + * Expand TOC node. + * + * @param n TOC node + */ +function tocNodeExpand(n, collapseOverride) { + if (collapseOverride === undefined) { + collapseOverride = true; + } + n.firstChild.data = TOC_SYMBOL_EXPANDED; + switchClass(n, TOC_CLASS_EXPANDED, TOC_CLASS_COLLAPSED); + var ul = getNextSiblingByTagName(n.nextSibling, TOC_ELEMENT_BLOCK); + if (ul !== null) { + if (childCollapse && collapseOverride) { + var li = getChildElementsByTagName(ul, "li"); + for (var i = 0; i < li.length; i++) { + collapseChildBlocks(li[i]); + } + } + ul.style.display = TOC_DISPLAY_EXPANDED; + //switchClass(ul, "toc-expanded", "toc-collapsed"); + } +} + +/** + * Collapse TOC node. + * + * @param n TOC node + */ +function tocNodeCollapse(n) { + n.firstChild.data = TOC_SYMBOL_COLLAPSED; + switchClass(n, TOC_CLASS_COLLAPSED, TOC_CLASS_EXPANDED); + var ul = getNextSiblingByTagName(n.nextSibling, TOC_ELEMENT_BLOCK); + if (ul !== null) { + ul.style.display = TOC_DISPLAY_COLLAPSED; + //switchClass(ul, "toc-collapsed", "toc-expanded"); + } +} + +/** + * Signal start of processing. + * + * @param message Message description of the process start + */ +function startProcess(message) { + processStart = new Date(); + window.status = (message === undefined ? "" : message); +} + +/** + * Signal end of processing. + * + * @param message Message description of the process result + */ +function endProcess(message) { + processEnd = new Date(); + window.status = (message === undefined ? "" : message); + processDuration = processEnd - processStart; +} + diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/js/infobox.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/js/infobox.js Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,25 @@ +/** + * Infobox on load. Resize the window to show only content. + */ +function initInfo(event) { + var box = document.getElementById("infobox"); + var tables = document.getElementsByTagName("table"); + if (box !== null && tables.length > 0) { + var innerWidth = window.innerWidth || box.offsetHeight; + var innerHeight = window.innerHeight || box.offsetHeight; + var w; + var h; + if (window.outerWidth && window.outerHeight) { + w = tables[0].clientWidth + 57; + h = box.clientHeight; + w += window.outerWidth - innerWidth; + h += window.outerHeight - innerHeight; + } else { + w = tables[0].clientWidth + 57; + h = innerHeight; + w += 40; + h += 40; + } + window.resizeTo(w, h); + } +} diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/js/page.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/js/page.js Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,158 @@ +// TODO: move these constants to common.js +var URL_BASE = "index.html"; +var URL_SEPARATOR = "?content="; +var URL_SEPARATOR_PATTERN = "\\?content=(.+)$"; + +/** + * Initialize links + */ +function initPage() { + initialTocSync(); + /* + if (tocSupported) { + var as = document.getElementsByTagName("a"); + for (var i = 0; i < as.length; i++) { + attachEventListener(as[i], "click", syncTocHandler); + if (as[i].addEventListener) { + as[i].addEventListener("mousedown", syncTocHandler, false); + } else if (as[i].attachEvent) { + as[i].setAttribute("onmousedown", syncTocHandlerIE); + } + } + } + */ +} + +/** + * Do initial TOC synchronization. + */ +function initialTocSync() { + if (automaticSync) { + var baseUrl = getBaseUrl(); + var contentUrl = String(window.location); + var href = getRelativeUrl(contentUrl, baseUrl); + findTocItem(href); + } +} + +/** + * TOC sync + */ +function syncTocHandler(event) { + if (tocSupported) { + var n = getTargetNode(event); + var href = n.getAttribute("href"); + /* + if (isClass(n, "javadoc_ref")) { + if (href.indexOf('#') != -1) { + href = href.substring(0, url.indexOf('#')); + } + var a = href.split("/"); + var last = a.length - 1; + while (a[last].indexOf(".") != -1) { + last--; + } + a = a.slice(0, last + 1); + href = a.join("/") + "/package-summary.html"; + alert(n.getAttribute("href") + "\n" + href); + } + */ + findTocItem(href); + } +} + +/** + * Find current TOC node. + * + * TODO: move to common.js + */ +function findTocItem(url) { + if (tocSupported) { + var u = url; + if (url.indexOf('#') != -1) { + u = u.substring(0, url.indexOf('#')); + } + var baseUrl = getBaseUrl(); + if (!window.parent.frames.toc) { return; } + var d = window.parent.frames.toc.document; + var aes = d.getElementsByTagName(TOC_ELEMENT_LINK); + for (var i = 0; i < aes.length; i++) { + if (compareTocUrl(aes[i], getRelativeUrl(aes[i].href, baseUrl), u)) { + highlightTocItem(aes[i]); + // make sure TOC is expanded if needed + var item = aes[i].parentNode; + /* + if (childCollapse) { + collapseChildBlocks(item); + } + */ + while (item != null) { + if (item.parentNode && item.parentNode.nodeName.toLowerCase() == TOC_ELEMENT_BLOCK && + item.parentNode.parentNode && item.parentNode.parentNode.nodeName.toLowerCase() == TOC_ELEMENT_ITEM) { + item = item.parentNode.parentNode; + if (item.firstChild && item.firstChild.firstChild && item.firstChild.firstChild.data == TOC_SYMBOL_COLLAPSED) { + //toggle(n.firstChild); + tocNodeExpand(item.firstChild, false); + } + } else { + item = null; + } + } + break; + } + } + } +} + +/** + * Compare TOC link URL with document URL. + * + * TODO: move to common.js + * + * @param link TOC link element + * @param tocUrl Relative TOC url + * @param docUrl Relative document URL + */ +function compareTocUrl(link, tocUrl, docUrl) { + var _tocUrl = tocUrl.replace("\\", "/"); + var _docUrl = docUrl.replace("\\", "/"); + return _tocUrl === _docUrl; +} + +var infoWindow; + +/** + * Open info window. + * + * @param event activation event + */ +function openInfo(href) { + //var target = getTargetNode(event) + //var href = target.getAttribute("href"); + + if(infoWindow == null || infoWindow.closed) { + var width = 450; + var height = 110 + 20; + var left = window.screen.width / 2 - width; + var top = window.screen.height / 2 - height; + var infoWindow = window.open(href, "info", + "left=" + left + ",top=" + top + ",height=" + height + ",width=" + width + + ",menubar=no,toolbar=no,location=no,status=no,scrollbars=no,resizable=yes"); + } else { + infoWindow.location = href; + } + infoWindow.focus(); + + if (event.stopPropagation) { + event.stopPropagation(); + } else { + event.cancelBubble = true; + } + if (event.preventDefault) { + event.preventDefault(); + } else { + event.returnValue = false; + } + + return false; +} \ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/js/s60/nav.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/js/s60/nav.js Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,135 @@ +// Fix IE bug: when frameset is opened in a new window with "Open in +// new window", "main" frame name is set for frameset, not content +// frame. +if (window.name === "nav" && + window.parent.name === "main" && + window.parent.frameElement === null) { + window.parent.name = ""; +} + +/** + * Initialize navigation frame document. + */ +function initNav() { + setMainFrameContents(); + resizeFrame(); +} + +/** + * Sets the main frame contents if frameset URL contains definition for it. + */ +function setMainFrameContents() { + if (window.parent !== undefined && + window.parent.frames.main !== undefined && + window.parent.frames.toc !== undefined) { + var u = new RegExp(URL_SEPARATOR_PATTERN); + var l = window.parent.location.href; + var c = l.match(u); + if (c !== null && c.length !== 1) { + var mainUrl = c[1]; + findTocItem(mainUrl); + window.parent.frames.main.location.href = mainUrl; + } + } +} + +/** + * Add permalink button to document header. + */ +function addPermalinkButton() { + var div = document.createElement("div"); + div.style.padding = "2px"; + div.style.textAlign = "right"; + var button = document.createElement("button"); + button.appendChild(document.createTextNode("Permalink")); + attachEventListener(button, "click", openPermalink); + div.appendChild(button); + var body = document.getElementsByTagName("body"); + if (body.length > 0) { + body[0].insertBefore(div, body[0].firstChild); + } +} + +/** + * Permalink button click handler. + */ +function openPermalink(event) { + if (window.parent !== undefined && window.parent.frames.main !== undefined) { + var contentUrl = String(window.parent.frames.main.location.href); + var baseUrl = getBaseUrl(); + var mainUrl = getRelativeUrl(contentUrl, baseUrl); + window.parent.location.href = URL_BASE + URL_SEPARATOR + mainUrl; + } +} + +/** + * Generate TOC synchronization button. + */ +function addSyncButton() { + if (!automaticSync) { + //var b = document.createElement("img"); + //b.src = "images/xhtml/e_synch_nav.gif"; + var b = document.createElement("button"); + b.appendChild(document.createTextNode(STATIC_STRING_TOC_SYNC)); + b.title = STATIC_STRING_TOC_SYNC_HELP; + addClass(b, "button-manual_sync"); + attachEventListener(b, "click", manualSyncTocHandler); + var bc = document.createElement("div"); + addClass(bc, "button-manual_sync-container"); + bc.appendChild(b); + var nav3 = getFirstElementByClassName(document, "nav3", "div"); + if (nav3 !== null) { + nav3.insertBefore(bc, nav3.firstChild); + } + } +} + +/** + * Button listener for manual TOC sync. + */ +function manualSyncTocHandler(event) { + startProcess("Synchronizing TOC"); + var b = getTargetNode(event); + var contentUrl = String(window.top.frames.main.location.href); + var baseUrl = getBaseUrl(); + var href = getRelativeUrl(contentUrl, baseUrl); + findTocItem(href); + endProcess("Done"); +} + +/** + * TOC frame toggler. + */ +function toggleTocFrame(event) { + var target = getTargetNode(event); + var frame = window.parent.toc.frameElement; + var cols = frame.parentNode.cols; + if (cols == "0, *") { + if (previousTocWidth === undefined) { + previousTocWidth = "300, *"; + } + frame.parentNode.setAttribute("cols", previousTocWidth); + target.firstChild.data = "Hide TOC"; + target.title = "Hides TOC"; + } else { + previousTocWidth = String(cols); + frame.parentNode.setAttribute("cols", "0, *"); + target.firstChild.data = "Show TOC"; + target.title = "Shows TOC"; + } +} +var previousTocWidth; + +/** + * Rezide nav frame to minimum height. + */ +function resizeFrame() { + var div = document.getElementById("toolbar"); + if (div) { + // extra 2 pixels for IE6 + var height = div.offsetTop + div.offsetHeight + 2; + if (window.frameElement && window.frameElement.parentNode) { + window.frameElement.parentNode.rows = height + ",*"; + } + } +} \ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/js/s60/page.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/js/s60/page.js Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,46 @@ +/** +* Initialize page +*/ +function initPage() { + verifyContainer(); + //addPermalinkButton(); + initialTocSync(); +} + +/** + * Compare TOC link URL with document URL. + * + * @param link TOC link element + * @param tocUrl Relative TOC url + * @param docUrl Relative document URL + */ +function compareTocUrl(link, tocUrl, docUrl) { + var _tocUrl = tocUrl.replace("\\", "/"); + var _docUrl = docUrl.replace("\\", "/"); + if (_tocUrl === _docUrl) { + return true; + } else if (javadocUrl.test(tocUrl)) { + var strippedTocUrl = _tocUrl.replace(stripLastSlash, "$1"); + var strippedDocUrl = _docUrl.replace(stripLastSlash, "$1"); + return strippedTocUrl === strippedDocUrl; + } + return false; +} + +var javadocUrl = new RegExp("[\\\\\\/](overview-summary\\.html|package-summary\\.html)$"); +var stripLastSlash = new RegExp("(^.+[\\\\\\/]).*$"); + +/** + * Verify page is loaded into main frame. + */ +function verifyContainer() { + if (window.frameElement === null || + window.frameElement.name !== "main") { + var u = new RegExp(".*[\\\\\\/](.+)"); + var l = window.location.href; + var c = l.match(u); + if (c !== null && c.length !== 1) { + window.location.href = URL_BASE + URL_SEPARATOR + c[1]; + } + } +} \ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/js/s60/toc.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/js/s60/toc.js Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,20 @@ +initialCollapse = false; +childCollapse = true; +automaticSync = false; +addControllers = false; + +/** + * Initialize TOC. + */ +function initToc() { + if (tocSupported) { + startProcess("Initializing TOC"); + addTocControllers(); + //addSyncButton(); + var baseUrl = getBaseUrl(); + var contentUrl = String(window.top.frames.main.location.href) + var href = getRelativeUrl(contentUrl, baseUrl); + findTocItem(href); + endProcess("Done"); + } +} \ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/js/toc.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/js/toc.js Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,280 @@ +/* Constants */ + +var STATIC_STRING_TOC_SYNC = "TOC Sync"; +var STATIC_STRING_TOC_SYNC_HELP = "Refresh / Show current topic"; + +/** TOC item element name. */ +var TOC_ELEMENT_ITEM = "li"; +/** TOC block element name. */ +var TOC_ELEMENT_BLOCK = "ul"; +/** TOC controller element name. */ +var TOC_ELEMENT_CONTROL = "span"; +/** TOC link element name. */ +var TOC_ELEMENT_LINK = "a"; +/** TOC controller expanded symbol. */ +var TOC_SYMBOL_EXPANDED = "-"; +/** TOC controller collapsed symbol. */ +var TOC_SYMBOL_COLLAPSED = "+"; + +/* TODO: move to common. */ +var TOC_CLASS_ACTIVE = "on3"; +var TOC_CLASS_COLLAPSED = "toc-controller-closed"; +var TOC_CLASS_EXPANDED = "toc-controller-open"; +var TOC_CLASS_CONTROL = "toc-controller"; +var TOC_CLASS_SPACE = "toc-space"; +var TOC_CLASS_TITLE = "toc-title"; +var TOC_DISPLAY_COLLAPSED = "none"; +var TOC_DISPLAY_EXPANDED = "block"; + +/* Variables */ + +/** Should TOC be initially fully collapsed. */ +var initialCollapse = true; +/** Should node's children be collapsed upon expanding a node. */ +var childCollapse = false; +/** Synchronize TOC automatically on link traversal. */ +var automaticSync = true; +/** Add controllers to TOC on load. */ +var addControllers = true; + +/** + * Add TOC controllers. + */ +function addTocControllers() { + var nl = getFirstElementByClassName(document, "nav3", "div"); + if (nl === null) { + return; + } + if (addControllers) { + var lis = nl.getElementsByTagName(TOC_ELEMENT_ITEM); + for (var j = 0; j < lis.length; j++) { + var li = lis[j]; + // check that list item is a toc item title + var title = null; + for (var child = li.firstChild; child !== null; child = child.nextSibling) { + if (isClass(child, TOC_CLASS_TITLE)) { + title = child; + break; + } + } + if (title !== null) { + var uls = li.getElementsByTagName(TOC_ELEMENT_BLOCK); + if (uls.length !== 0) { + // add controller + var c = document.createElement(TOC_ELEMENT_CONTROL); + addClass(c, TOC_CLASS_CONTROL); +// if (initialCollapse) { +// addClass(c, TOC_CLASS_COLLAPSED); +// c.appendChild(document.createTextNode(TOC_SYMBOL_EXPANDED)); +// } else { + addClass(c, TOC_CLASS_EXPANDED); + c.appendChild(document.createTextNode(TOC_SYMBOL_COLLAPSED)); +// } + attachEventListener(c, "click", toggleHandler); + li.insertBefore(c, li.firstChild); + // hide kids + if (initialCollapse) { + collapseChildBlocks(li); + } + } else { + // add space + var sp = document.createElement(TOC_ELEMENT_CONTROL); + addClass(sp, TOC_CLASS_SPACE); + var pls = document.createTextNode("x"); + sp.appendChild(pls); + li.insertBefore(sp, li.firstChild); + } + attachEventListener(title, "click", tocItemClickHandler); + } + } + // hide kids + } else if (initialCollapse) { + var lis = nl.getElementsByTagName(TOC_ELEMENT_ITEM); + for (var j = 0; j < lis.length; j++) { + var li = lis[j]; + collapseChildBlocks(li); + } + + } + /* + } else if (childCollapse) { + var nl = getFirstElementByClassName(document, "nav3", "div"); + if (nl !== null) { + var tocRoot = getFirstChildElementByTagName(nl, TOC_ELEMENT_BLOCK); + if (tocRoot !== null) { + var li = getChildElementsByTagName(tocRoot, TOC_ELEMENT_ITEM); + for (var i = 0; i < li.length; i++) { + collapseChildBlocks(li[i]); + } + } + } + } + */ +} + +/** + * Collapse child TOC blocks. + * + * @param li TOC item whose child TOC blocks to collapse. + */ +function collapseChildBlocks(li) { + for (var k = li.firstChild; k != null; k = k.nextSibling) { + if (k.nodeType == 1 && k.nodeName.toLowerCase() == TOC_ELEMENT_CONTROL && isClass(k, TOC_CLASS_CONTROL)) { + if (isClass(k, TOC_CLASS_EXPANDED)) { + tocNodeCollapse(k); + } + break; + } + /* + else if (k.nodeType == 1 && k.nodeName.toLowerCase() == TOC_ELEMENT_BLOCK) { + k.style.display = "none"; + } + */ + } +} + +/** + * Toggle child node display. + */ +function toggleHandler(event) { + toggle(getTargetNode(event)); +} + +/** + * Set current node as current. + */ +function tocItemClickHandler(event) { + var t = getTargetNode(event); + highlightTocItem(t); + var p = t.parentNode.firstChild; + if (p !== null && isClass(p, "toc-controller") && isClass(p, TOC_CLASS_COLLAPSED)) { + tocNodeExpand(p); + } +} + +/** + * Generate TOC synchronization button. + */ +function addSyncButton() { + if (!automaticSync) { + //var b = document.createElement("img"); + //b.src = "images/xhtml/e_synch_nav.gif"; + var b = document.createElement("button"); + b.appendChild(document.createTextNode(STATIC_STRING_TOC_SYNC)); + b.title = STATIC_STRING_TOC_SYNC_HELP; + addClass(b, "button-manual_sync"); + attachEventListener(b, "click", manualSyncTocHandler); + var bc = document.createElement("div"); + addClass(bc, "button-manual_sync-container"); + bc.appendChild(b); + var nav3 = getFirstElementByClassName(document, "nav3", "div"); + if (nav3 !== null) { + nav3.insertBefore(bc, nav3.firstChild); + } + } +} + +/** + * Button listener for manual TOC sync. + */ +function manualSyncTocHandler(event) { + startProcess("Synchronizing TOC"); + var b = getTargetNode(event); + var baseUrl = getBaseUrl(); + var contentUrl = String(window.top.frames.main.location.href); + var href = getRelativeUrl(contentUrl, baseUrl); + findTocItem(href); + endProcess("Done"); +} + +/** + * Initialize TOC. + */ +function initToc() { + if (tocSupported) { + startProcess("Initializing TOC"); + addTocControllers(); + addSyncButton(); + endProcess("Done"); + } +} + +/* Move to common. */ + +/** + * Toggle child node display. + * + * @param n Target node of the event. + */ +function toggle(n) { + if (isClass(n, TOC_CLASS_EXPANDED)) { + tocNodeCollapse(n); + } else { + tocNodeExpand(n); + } +} + +/** + * Expand TOC node. + * + * @param n TOC node + */ +function tocNodeExpand(n, collapseOverride) { + if (collapseOverride === undefined) { + collapseOverride = true; + } + n.firstChild.data = TOC_SYMBOL_EXPANDED; + switchClass(n, TOC_CLASS_EXPANDED, TOC_CLASS_COLLAPSED); + var ul = getNextSiblingByTagName(n.nextSibling, TOC_ELEMENT_BLOCK); + if (ul !== null) { + // collapse children + if (childCollapse && collapseOverride) { + var li = getChildElementsByTagName(ul, "li"); + for (var i = 0; i < li.length; i++) { + collapseChildBlocks(li[i]); + } + } + ul.style.display = TOC_DISPLAY_EXPANDED; + //switchClass(ul, "toc-expanded", "toc-collapsed"); + } +} + +/** + * Collapse TOC node. + * + * @param n TOC node + */ +function tocNodeCollapse(n) { + n.firstChild.data = TOC_SYMBOL_COLLAPSED; + switchClass(n, TOC_CLASS_COLLAPSED, TOC_CLASS_EXPANDED); + var ul = getNextSiblingByTagName(n.nextSibling, TOC_ELEMENT_BLOCK); + if (ul !== null) { + ul.style.display = TOC_DISPLAY_COLLAPSED; + //switchClass(ul, "toc-collapsed", "toc-expanded"); + } +} + +var processStart; +var processEnd; +var processDuration + +/** + * Signal start of processing. + * + * @param message Message description of the process start + */ +function startProcess(message) { + processStart = new Date(); + window.status = (message === undefined ? "" : message); +} + +/** + * Signal end of processing. + * + * @param message Message description of the process result + */ +function endProcess(message) { + processEnd = new Date(); + window.status = (message === undefined ? "" : message); + processDuration = processEnd - processStart; +} diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/js/utils.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/js/utils.js Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,671 @@ +// ARRAY FUNTIONS + +/** + * Test is some array member is equal (===) to tested value. + * + * @param arr array to test + * @param value value to test + * @type Boolean + */ +function inArray(arr, value) { + for (var i = 0; i < arr.length; i++) { + if (arr[i] === value) { + return true; + } + } + return false; +} + +// STRING FUNCTIONS + + +/** + * Get relative URL. + * + * @param url URL string + * @return relative part of the URL + * @type String + */ +function getRelativeUrl(url, baseUrl) { + if (baseUrl === undefined) { + var i = url.lastIndexOf("/"); + if (i != -1) { + return url.substring(i + 1); + } else { + return url; + } + } else { + if (url.substring(0, baseUrl.length) === baseUrl) { + return url.substring(baseUrl.length); + } else { + return undefined; + } + } +} + +/** + * Fix file scheme URLs generated by IE. + * + * @param url file scheme URL to fix + */ +/* +function fixUrl(url) { + var _url; + if (pathFileUrl.test(url)) { + _url = url.replace(pathFileUrl, "file:///$1/$2"); + } else { + _url = url; + } + return _url.replace("\\", "/"); + +} +var pathFileUrl = new RegExp("^file://([a-zA-Z]:)[\\\\/](.+)$"); +*/ + +/** + * Get string value for array where list is in prose. + * + * @param array array to get the string value for + * @type String + * @return array string value in prose + */ +function toProseString(array) { + switch (array.length) { + case 0: + return ""; + case 1: + return array[0]; + case 2: + return array[0] + " and " + array[1]; + default: + var t = ""; + for (var i = 0; i < array.length - 1; i++) { + t += array[i] + ", "; + } + return t + "and " + array[array.length - 1]; + } +} + + +// EVENT FUNCTIONS + +/** + * Stop event. + * + * @param event event to stop + */ +function stopEvent(event) { + if (event.stopPropagation) { + event.stopPropagation(); + } else { + event.cancelBubble = true; + } + if (event.preventDefault) { + event.preventDefault(); + } else { + event.returnValue = false; + } +} + +/** + * Return target node of an event. + * + * @return target node of the event + * @type Node + */ +function getTargetNode(event) { + if (event.target) { + return event.target; + } else if (event.srcElement) { + return event.srcElement; + } else { + return null; + } +} + +/** + * Attach event listener to a DOM node. + * + * @param node DOM node to attach lister to + * @param type Type of event to catch + * @param func Function to act as the handler + */ +function attachEventListener(node, type, func) { + if (node.addEventListener) { + node.addEventListener(type, func, false); + } else if (node.attachEvent) { + node.attachEvent("on" + type, function() { func.call(this, event); } ); + } +} + + +// CSS CLASS FUNCTIONS + + +/** + * Switch class of an element. + * + * @param n Element node to change the class of + * @param f Class to change from + * @param t Class to change to + * @param arr Class array (optional) + */ +function switchClass(n, f, t, arr) { + if (arr === undefined) { + arr = getClassArray(n.className); + } + for (var i = 0; i < arr.length; i++) { + if (arr[i] == f) { + arr[i] = t; + } else if (arr[i] == t) { + arr[i] = f; + } + } + n.className = arr.join(" "); +} + +/** + * Test if element is of class. + * + * @param n Element node to test + * @param c Class to test for + * @param arr Class array (optional) + * @return boolean value if element is of the tested class + */ +function isClass(n, c, arr) { + if (arr === undefined) { + arr = getClassArray(n.className); + } + for (var i = 0; i < arr.length; i++) { + if (arr[i] == c) { + return true; + } + } + return false; +} + +/** + * Add class to an element. + * + * @param n Element node to add the class to + * @param c Class to add + * @param arr Class array (optional) + */ +function addClass(n, c, arr) { + if (arr === undefined) { + arr = getClassArray(n.className); + } + if (!isClass(n, c, arr)) { + n.className = n.className + " " + c; + } +} + +/** + * Remove class + * + * @param n Element node to remove the class from + * @param c Class to remove + * @param arr Class array (optional) + */ +function removeClass(n, c, arr) { + if (arr === undefined) { + arr = getClassArray(n.className); + } + if (isClass(n, c, arr)) { + var ret = []; + for (var i = 0; i < arr.length; i++) { + if (arr[i] != c) { + ret.push(arr[i]); + } + } + n.className = ret.join(" "); + } +} + +/** + * Get class names as an array + * + * @param c class name + * @return array of class members + * @type Array + */ +function getClassArray(c) { + return String(c).split(" "); +} + + +// COLLECTION CLASSES + + +/** + * Multi value Map. + * + * Usage: + * + * >> var m = new Map(); + * >> m.put("a", "first"); + * >> m.put("a", "second"); + * >> m.size(); + * 1 + * >> m.get("a"); + * ["first", "second"] + * + * @constructor + * @param {Boolean} multi Boolean to define whether map will store dublicate values into an array + */ +function Map(multi) { + this.keys = []; + this.values = []; + this.multi = (multi === undefined ? false : multi); +} +Map.prototype.toString = function() { + var val = "[Object Map"; + if (this.keys.length !== 0) { + val += ": {"; + for (var i = 0; i < this.keys.length; i++) { + if (i !== 0) { + val += "; "; + } + val += this.keys[i] + ":"; + for (var j = 0; j < this.values[i].length; j++) { + if (j !== 0) { + val += ","; + } + val += " " + this.values[i][j].toString(); + } + + } + val += "}"; + } + val += "]"; + return val; +}; +/** + * @param {String} key + * @param {Object} value + */ +Map.prototype.put = function(key, value) { + var index = this._find(key); + var a; + if (index != -1 ) { + a = this.values[index]; + } else { + index = this.keys.length; + this.keys[index] = key; + a = []; + } + if (this.multi) { + a[a.length] = value; + } else { + a[0] = value; + } + this.values[index] = a; +}; +/** + * @param {String} key + * @type Object + */ +Map.prototype.get = function(key) { + var index = this._find(key); + if (index != -1) { + if (this.multi) { + return this.values[index]; + } else { + return this.values[index][0]; + } + } else { + return null; + } +}; +/** + * Iterator for the value set. + * + * @return Iterator for the values + * @type ArrayIterator + */ +Map.prototype.iterator = function(key) { + var index = this._find(key); + var val; + if (index != -1) { + val = this.values[index]; + } else { + val = []; + } + return new ArrayIterator(val); +}; +/** + * @type Number + */ +Map.prototype.size = function() { + return this.keys.length; +}; +/** + * @param {String} key + * @type Number + */ +Map.prototype._find = function(key) { + var index = -1; + for (var i = 0; i < this.keys.length; i++) { + if (this.keys[i] == key) { + index = i; + break; + } + } + return index; +}; + +/** + * Map. + * + * Usage: + * + * >> var m = new SingleValueMap(); + * >> m.put("a", "first"); + * >> m.put("a", "second"); + * >> m.size(); + * 1 + * >> m.get("a"); + * "second" + * + * @constructor + */ +function SingleValueMap() { + this.keys = []; + this.values = []; + this.multi = false; +} +SingleValueMap.prototype = new Map(false); +SingleValueMap.prototype.toString = function() { + return "[Object SingleValueMap]"; +}; + +/** + * Set. + * + * @constructor + */ +function Set() { + this.keys = []; +} +Set.prototype.toString = function() { + var val = "[object Set"; + if (this.keys.length > 0) { + val += ":"; + for (var i = 0; i < this.keys.length; i++) { + if (i !== 0) { + val += ","; + } + val += " " + this.keys[i]; + } + } + val += "]"; + return val; +}; +Set.prototype.add = function(value) { + var i = this.m_find(value); + if (i == -1) { + this.keys[this.keys.length] = value; + } +}; +Set.prototype.iterator = function() { + return new ArrayIterator(this.keys); +}; +Set.prototype.size = Map.prototype.size; +Set.prototype.m_find = Map.prototype._find; + +/** + * Array Iterator + * + * Usage: + * + * >> var arr = new Array("a", "b", "c"); + * >> for (var itr = new ArrayIterator(arr); itr.hasNext();) { + * >> alert(itr.next()); + * >> } + * "a" + * "b" + * "c" + * + * @constructor + * @param {Array} arrayLike array to iterate through + */ +function ArrayIterator(arrayLike) { + this.arrayLike = arrayLike; + this.i = 0; + NoSuchElementException = function() {}; + NoSuchElementException.prototype = new Error(); + NoSuchElementException.prototype.name = 'NoSuchElementException'; + NoSuchElementException.prototype.message = 'Iteration has no more elements'; +} +/** + * String value of the object. + * + * @type String + */ +ArrayIterator.prototype.toString = function() { + return "[Object ArrayIterator]"; +}; +/** + * @type Object + */ +ArrayIterator.prototype.next = function() { + if (!this.hasNext()) { + throw new NoSuchElementException(); + } + if (this.arrayLike.item) { + return this.arrayLike.item(this.i++); + } else { + return this.arrayLike[this.i++]; + } +}; +/*/ + * @type Boolean + */ +ArrayIterator.prototype.hasNext = function() { + return this.i < this.arrayLike.length; +}; + + +// DOM FUNCTIONS + + +/** + * Get next sibling by element name + * + * @param n current element + * @param t element name of the desired sibling + * @return next sibling element with a given name or null if not found + * @type Element + */ +function getNextSiblingByTagName(n, t) { + if (n != null) { + var tag = t.toLowerCase(); + var i = n; + while (true) { + if (i.nodeType == 1 && i.nodeName.toLowerCase() == tag) { + return i; + } + if (i.nextSibling != null) { + i = i.nextSibling; + } else { + return null; + } + } + } + return null; +} + +/** + * Get child elements by element name. + * + * @param node parent element + * @param name element name of the desired child elements + * @return array of child elements + * @type Array + */ +function getChildElementsByTagName(node, name) { + var buf = []; + var tag = undefined; + if (name !== undefined) { + tag = name.toLowerCase(); + } + for (var n = node.firstChild; n != null; n = n.nextSibling) { + if (n.nodeType == 1 && (name === undefined || n.nodeName.toLowerCase() == tag)) { + buf[buf.length] = n; + } + } + return buf; +} + +/** + * Get first child element by element name. + * + * @param node parent element + * @param name element name of the desired child elements + * @return DOM Element, null if none found + * @type Object + */ +function getFirstChildElementByTagName(node, name) { + var tag = undefined; + if (name !== undefined) { + tag = name.toLowerCase(); + } + for (var n = node.firstChild; n != null; n = n.nextSibling) { + if (n.nodeType == 1 && (name === undefined || n.nodeName.toLowerCase() == tag)) { + return n; + } + } + return null; +} + + +/** + * Wrap child nodes of an element to wrapper element. + * + * @param parent element whose child nodes to wrapper + * @param wrapper wrapper element + */ +function wrapChildElements(parent, wrapper) { + for (var c = parent.firstChild, n = null; c != null; c = parent.firstChild) { + n = parent.removeChild(c); + wrapper.appendChild(n); + } + parent.appendChild(wrapper); +} + +/** + * Get elements by class name. + * + * @param node DOM node whose descendants select + * @param cls class name + * @param elem element name (optional) + * @return array of DOM nodes + * @type Array + */ +function getElementsByClassName(node, cls, elem) { + if (elem === undefined) { + elem = "*"; + } + var res = []; + for (var el = document.getElementsByTagName(elem), i = 0; i < el.length; i++) { + if (isClass(el[i], cls)) { + res[res.length] = el[i]; + } + } + return res; +} + +/** + * Get first element by class name. + * + * @param node DOM node whose descendants select + * @param cls class name + * @param elem element name (optional) + * @return DOM Element, null if none found + * @type Object + */ +function getFirstElementByClassName(node, cls, elem) { + if (elem === undefined) { + elem = "*"; + } + for (var el = document.getElementsByTagName(elem), i = 0; i < el.length; i++) { + if (isClass(el[i], cls)) { + return el[i]; + } + } + return null; +} + +// FORM FUNCTIONS + +function formSubmitHandler(event) { + var f = getTargetNode(event); + if (!validateForm(f)) { + stopEvent(event); + } +} + +/** + * Validate form + * + * @param form form to validate + * @type Boolean + * @return boolean value whether validation was successful + */ +function validateForm(form) { + var isValid = true; + var labels; + var r = []; + var missing; + var col = form.elements; + elements: for (var i = 0; i < col.length; i++) { + if (isClass(col[i], "required") && !col[i].disabled) { + var f = col[col[i].name]; + var valid = false; + if (col[i].type === "checkbox" || col[i].type === "radio") { + if (col[i].value != f[0].value) { // test only the first + continue; + } + for (var j = 0; j < f.length; j++) { + if (f[j].checked && f[j].className.indexOf("nonrequired") == -1) { + continue elements; + } + } + } else if (col[i].type === "select-one") { + if (!isClass(col[i][col[i].selectedIndex], "nonvalue")) { + continue; + } + } else { + if (f.value !== "") { + continue; + } + } + + if (labels === undefined) { + labels = form.getElementsByTagName("label"); + } + var label; + for (j = 0; j < labels.length; j++) { + if (labels[j].htmlFor == col[i].name) { + label = labels[j]; + } + } + if (!valid) { + isValid = false; + if (missing === undefined) { + missing = []; + } + missing[missing.length] = label.firstChild.data; + addClass(label, "form_invalid"); + } else { + removeClass(label, "form_invalid"); + } + } + } + if (!isValid) { + window.alert("Required field" + (missing.length < 2 ? "" : "s") + + " " + toProseString(missing) + + " " + (missing.length < 2 ? "has" : "have") + " no value"); + } + return isValid; +} \ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/stew.wgz Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/stew.wgz has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/viewport.wgz Binary file org.symbian.tools.wrttools.doc.WebDeveloper/html/viewport.wgz has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/plugin.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/plugin.xml Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,10 @@ + + + + + + + + + \ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/src/org/symbian/tools/wrttools/doc/WebDeveloper/Activator.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/src/org/symbian/tools/wrttools/doc/WebDeveloper/Activator.java Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,50 @@ +package org.symbian.tools.wrttools.doc.WebDeveloper; + + +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends AbstractUIPlugin { + + // The plug-in ID + public static final String PLUGIN_ID = "org.symbian.tools.wrttools.doc.WebDeveloper"; + + // The shared instance + private static Activator plugin; + + /** + * The constructor + */ + public Activator() { + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } +} diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/src/org/symbian/wrttools/doc/webdeveloper/Activator.java --- a/org.symbian.tools.wrttools.doc.WebDeveloper/src/org/symbian/wrttools/doc/webdeveloper/Activator.java Fri Mar 05 15:43:17 2010 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ -package org.symbian.wrttools.doc.webdeveloper; - -import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.osgi.framework.BundleContext; - -/** - * The activator class controls the plug-in life cycle - */ -public class Activator extends AbstractUIPlugin { - - // The plug-in ID - public static final String PLUGIN_ID = "org.symbian.tools.wrttools.doc.WebDeveloper"; - - // The shared instance - private static Activator plugin; - - /** - * The constructor - */ - public Activator() { - } - - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) - */ - public void start(BundleContext context) throws Exception { - super.start(context); - plugin = this; - } - - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) - */ - public void stop(BundleContext context) throws Exception { - plugin = null; - super.stop(context); - } - - /** - * Returns the shared instance - * - * @return the shared instance - */ - public static Activator getDefault() { - return plugin; - } - -} diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/toc.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/toc.xml Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,464 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.previewer/.classpath --- a/org.symbian.tools.wrttools.previewer/.classpath Fri Mar 05 15:43:17 2010 -0800 +++ b/org.symbian.tools.wrttools.previewer/.classpath Fri Mar 05 19:11:15 2010 -0800 @@ -1,6 +1,6 @@ - + diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.previewer/.settings/org.eclipse.jdt.core.prefs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.previewer/.settings/org.eclipse.jdt.core.prefs Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,8 @@ +#Fri Mar 05 17:04:06 PST 2010 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.5 diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.previewer/META-INF/MANIFEST.MF --- a/org.symbian.tools.wrttools.previewer/META-INF/MANIFEST.MF Fri Mar 05 15:43:17 2010 -0800 +++ b/org.symbian.tools.wrttools.previewer/META-INF/MANIFEST.MF Fri Mar 05 19:11:15 2010 -0800 @@ -15,8 +15,7 @@ org.symbian.tools.wrttools;bundle-version="1.0.0", org.mozilla.xulrunner;bundle-version="1.9.1";resolution:=optional Bundle-ActivationPolicy: lazy -Bundle-RequiredExecutionEnvironment: J2SE-1.5, - JavaSE-1.6 +Bundle-RequiredExecutionEnvironment: J2SE-1.5 Export-Package: org.symbian.tools.wrttools.previewer, org.symbian.tools.wrttools.previewer.http Import-Package: javax.servlet;version="2.5.0", diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.previewer/preview/css/style.css --- a/org.symbian.tools.wrttools.previewer/preview/css/style.css Fri Mar 05 15:43:17 2010 -0800 +++ b/org.symbian.tools.wrttools.previewer/preview/css/style.css Fri Mar 05 19:11:15 2010 -0800 @@ -297,7 +297,8 @@ div#PreferencesBtn{ width: 75px; height: 85px; - background-image: url(../images/settings-icon.png); +/* background-image: url(../images/settings-icon.png); */ + background-image: url(../images/settings_2.png); position: absolute; top: 10px; left: 10px; @@ -306,6 +307,7 @@ } div#PreferencesBtn:hover{ + background-image: url(../images/settings_1.png); background-position: left top; } @@ -454,28 +456,47 @@ } div#event-battery.active:hover, div#event-messaging.active:hover, div#event-memory.active:hover{ - background-position: 0px -50px; +/* background-position: 0px -50px; */ + background-position: 0px -100px; border: 1px solid #75ea4f; } div#event-messaging.inactive, div#event-memory.inactive{ - background-position: 0px -100px; +/* background-position: 0px -100px; */ + background-position: 0px -50px; border: 1px solid #676767; } div#event-battery{ - background-image: url(../images/battery-icon.png); +/* background-image: url(../images/battery-icon.png); */ + background-image: url(../images/battery_1.png); } div#event-messaging{ - background-image: url(../images/messaging-icon.gif); +/* background-image: url(../images/messaging-icon.gif); */ + background-image: url(../images/messaging_1.png); } div#event-memory{ - background-image: url(../images/memory-icon.png); +/* background-image: url(../images/memory-icon.png); */ + background-image: url(../images/memory_1.png); +} + + +div#event-battery.active:hover{ + background-image: url(../images/battery_2.png); } +div#event-messaging.active:hover{ + background-image: url(../images/messaging_2.png); +} + +div#event-memory.active:hover{ + background-image: url(../images/memory_2.png); +} + + div.ui-panel{ height:30px; } diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.previewer/preview/images/battery_1.png Binary file org.symbian.tools.wrttools.previewer/preview/images/battery_1.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.previewer/preview/images/battery_2.png Binary file org.symbian.tools.wrttools.previewer/preview/images/battery_2.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.previewer/preview/images/memory_1.png Binary file org.symbian.tools.wrttools.previewer/preview/images/memory_1.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.previewer/preview/images/memory_2.png Binary file org.symbian.tools.wrttools.previewer/preview/images/memory_2.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.previewer/preview/images/memory_3.png Binary file org.symbian.tools.wrttools.previewer/preview/images/memory_3.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.previewer/preview/images/messaging_1.png Binary file org.symbian.tools.wrttools.previewer/preview/images/messaging_1.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.previewer/preview/images/messaging_2.png Binary file org.symbian.tools.wrttools.previewer/preview/images/messaging_2.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.previewer/preview/images/messaging_3.png Binary file org.symbian.tools.wrttools.previewer/preview/images/messaging_3.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.previewer/preview/images/settings_1.png Binary file org.symbian.tools.wrttools.previewer/preview/images/settings_1.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.previewer/preview/images/settings_2.png Binary file org.symbian.tools.wrttools.previewer/preview/images/settings_2.png has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.previewer/preview/script/jquery-ui/css/ui-darkness/images/panel preview.jpg Binary file org.symbian.tools.wrttools.previewer/preview/script/jquery-ui/css/ui-darkness/images/panel preview.jpg has changed diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.previewer/preview/script/jquery-ui/css/ui-darkness/ui.all.css --- a/org.symbian.tools.wrttools.previewer/preview/script/jquery-ui/css/ui-darkness/ui.all.css Fri Mar 05 15:43:17 2010 -0800 +++ b/org.symbian.tools.wrttools.previewer/preview/script/jquery-ui/css/ui-darkness/ui.all.css Fri Mar 05 19:11:15 2010 -0800 @@ -1,643 +1,647 @@ -/** - * Copyright (c) 2009-2010 Symbian Foundation and/or its subsidiary(-ies). - * All rights reserved. - * This component and the accompanying materials are made available - * under the terms of the License "Eclipse Public License v1.0" - * which accompanies this distribution, and is available - * at the URL "http://www.eclipse.org/legal/epl-v10.html". - * - * Initial Contributors: - * Symbian Foundation - initial contribution. - * Contributors: - */ - -/* - * jQuery UI screen structure and presentation - * This CSS file was generated by ThemeRoller, a Filament Group Project for jQuery UI - * Author: Scott Jehl, scott@filamentgroup.com, http://www.filamentgroup.com - * Visit ThemeRoller.com -*/ - -/* - * Note: If your ThemeRoller settings have a font size set in ems, your components will scale according to their parent element's font size. - * As a rule of thumb, set your body's font size to 62.5% to make 1em = 10px. - * body {font-size: 62.5%;} -*/ - - - -/*UI accordion*/ -.ui-accordion { - /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; - font-family: Segoe UI, Arial, sans-serif; - font-size: 0.8em; - border-bottom: 1px solid #666666; -} -.ui-accordion-group { - /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; - border: 1px solid #666666; - border-bottom: none; -} -.ui-accordion-header { - /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; - cursor: pointer; - background: #555555 url(images/555555_40x100_textures_02_glass_20.png) 0 50% repeat-x; -} -.ui-accordion-header a { - /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; - display: block; - font-size: 0.8em; - font-weight: bold; - text-decoration: none; - padding: .5em .5em .5em 1.7em; - color: #eeeeee; - background: url(images/cccccc_7x7_arrow_right.gif) .5em 50% no-repeat; -} -.ui-accordion-header a:hover { - background: url(images/ffffff_7x7_arrow_right.gif) .5em 50% no-repeat; - color: #ffffff; -} -.ui-accordion-header:hover { - background: #0078a3 url(images/0078a3_40x100_textures_02_glass_40.png) 0 50% repeat-x; - color: #ffffff; -} -.selected .ui-accordion-header, .selected .ui-accordion-header:hover { - background: #f58400 url(images/f58400_40x100_textures_05_inset_soft_30.png) 0 50% repeat-x; -} -.selected .ui-accordion-header a, .selected .ui-accordion-header a:hover { - color: #ffffff; - background: url(images/222222_7x7_arrow_down.gif) .5em 50% no-repeat; -} -.ui-accordion-content { - background: #000000 url(images/000000_40x100_textures_05_inset_soft_25.png) 0 bottom repeat-x; - color: #ffffff; - font-size: 0.8em; -} -.ui-accordion-content p { - padding: 0.8em 1.7em 0.6em; -} - - - - - - -/*UI tabs*/ -.ui-tabs-nav { - /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; - font-family: Segoe UI, Arial, sans-serif; - font-size: 1.0.8em; -/* - float: left; - -*/ position: relative; - z-index: 1; -/* - border-right: 1px solid #666666; -*/ - bottom: -1px; -} -.ui-tabs-nav ul { - /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; -} -.ui-tabs-nav li { - /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; - float: left; - border: 1px solid #666666; - border-right: none; -} -.ui-tabs-nav li a { - /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; - float: left; - font-size: 0.8em; - font-weight: bold; - text-decoration: none; - padding: .5em 1.7em; - color: #eeeeee; - background: #555555 url(images/555555_40x100_textures_02_glass_20.png) 0 50% repeat-x; -} -.ui-tabs-nav li a:hover { - background: #0078a3 url(images/0078a3_40x100_textures_02_glass_40.png) 0 50% repeat-x; - color: #ffffff; -} -.ui-tabs-nav li.ui-tabs-selected { - border-bottom-color: #f58400; -} -.ui-tabs-nav li.ui-tabs-selected a, .ui-tabs-nav li.ui-tabs-selected a:hover { - background: #f58400 url(images/f58400_40x100_textures_05_inset_soft_30.png) 0 50% repeat-x; - color: #ffffff; -} -.ui-tabs-panel { - /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; - font-family: Segoe UI, Arial, sans-serif; - clear:left; - border-top: 1px solid #666666; -/* - background: #000000 url(images/000000_40x100_textures_05_inset_soft_25.png) 0 bottom repeat-x; - -*/ color: #ffffff; - padding: 15px; - font-size: 1.0.8em; -} -.ui-tabs-hide { - display: none;/* for accessible hiding: position: absolute; left: -99999999px*/; -} - - - - - -/*slider*/ -.ui-slider { - /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; - font-family: Segoe UI, Arial, sans-serif; - font-size: 1.0.8em; - background: #000000 url(images/000000_40x100_textures_05_inset_soft_25.png) 0 bottom repeat-x; - border: 1px solid #666666; - height: .8em; - position: relative; -} -.ui-slider-handle { - /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; - position: absolute; - z-index: 2; - top: -7px; -/* width: 1.2em; - height: 1.2em; - background: #555555 url(images/555555_40x100_textures_02_glass_20.png) 0 50% repeat-x; - border: 1px solid #666666; -*/ - background-image: url(images/slider-handle.png); - background-repeat: no-repeat; - background-position: 0px 0px; - height: 19px; - width: 17px; -} -.ui-slider-handle:hover { - background-position: 0px -19px; -} -.ui-slider-handle-active, .ui-slider-handle-active:hover { - background-position: 0px -38px; -} -.ui-slider-range { - /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; - height: .8em; - background: #0078a3 url(images/0078a3_40x100_textures_02_glass_40.png) 0 50% repeat-x; - position: absolute; - border: 1px solid #666666; - border-left: 0; - border-right: 0; - top: -1px; - z-index: 1; - opacity:.7; -/* - filter:Alpha(Opacity=70); - -*/} - - - - - - -/*dialog*/ -.ui-dialog { - /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; - font-family: Segoe UI, Arial, sans-serif; - font-size: 0.9em; - background: #000000 url(images/000000_40x100_textures_05_inset_soft_25.png) 0 bottom repeat-x; - color: #ffffff; - border: 4px solid #666666; - position: relative; -} -.ui-resizable-handle { - position: absolute; - font-size: 0.1px; - z-index: 99999; -} -.ui-resizable .ui-resizable-handle { - display: block; -} -body .ui-resizable-disabled .ui-resizable-handle { display: none; } /* use 'body' to make it more specific (css order) */ -body .ui-resizable-autohide .ui-resizable-handle { display: none; } /* use 'body' to make it more specific (css order) */ -.ui-resizable-n { - cursor: n-resize; - height: 7px; - width: 100%; - top: -5px; - left: 0px; -} -.ui-resizable-s { - cursor: s-resize; - height: 7px; - width: 100%; - bottom: -5px; - left: 0px; -} -.ui-resizable-e { - cursor: e-resize; - width: 7px; - right: -5px; - top: 0px; - height: 100%; -} -.ui-resizable-w { - cursor: w-resize; - width: 7px; - left: -5px; - top: 0px; - height: 100%; -} -.ui-resizable-se { - cursor: se-resize; - width: 13px; - height: 13px; - right: 0px; - bottom: 0px; - background: url(images/cccccc_11x11_icon_resize_se.gif) no-repeat 0 0; -} -.ui-resizable-sw { - cursor: sw-resize; - width: 9px; - height: 9px; - left: 0px; - bottom: 0px; -} -.ui-resizable-nw { - cursor: nw-resize; - width: 9px; - height: 9px; - left: 0px; - top: 0px; -} -.ui-resizable-ne { - cursor: ne-resize; - width: 9px; - height: 9px; - right: 0px; - top: 0px; -} -.ui-dialog-titlebar { - /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; - padding: .5em 1.5em .5em 0.8em; - color: #eeeeee; - background: #555555 url(images/555555_40x100_textures_02_glass_20.png) 0 50% repeat-x; - border-bottom: 1px solid #666666; - font-size: 0.8em; - font-weight: bold; - position: relative; -} -.ui-dialog-title {} -.ui-dialog-titlebar-close { - /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; - background: url(images/cccccc_11x11_icon_close.gif) 0 0 no-repeat; - position: absolute; - right: 8px; - top: .7em; - width: 11px; - height: 11px; - z-index: 100; - cursor: pointer !important; -} -.ui-dialog-titlebar-close-hover, .ui-dialog-titlebar-close:hover { - background: url(images/ffffff_11x11_icon_close.gif) 0 0 no-repeat; -} -.ui-dialog-titlebar-close:active { - background: url(images/222222_11x11_icon_close.gif) 0 0 no-repeat; -} -.ui-dialog-titlebar-close span { - display: none; -} -.ui-dialog-content { - /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; - color: #ffffff; -/* - padding: 1.5em 1.7em; -*/ - padding-left: 1px; -} -.ui-dialog-buttonpane { - position: absolute; - bottom: 0; - width: 100%; - text-align: left; - border-top: 1px solid #666666; - background: #000000; -} -.ui-dialog-buttonpane button { - margin: .5em 8px .5em 0; - color: #eeeeee; - background: #555555 url(images/555555_40x100_textures_02_glass_20.png) 0 50% repeat-x; - font-size: 0.8em; - font-weight: bolder; - border: 1px solid #666666; - cursor: pointer; - padding: .2em .6em .3em .6em; - line-height: 1.4em; - float: right; -} -.ui-dialog-buttonpane button:hover { - color: #ffffff; - background: #0078a3 url(images/0078a3_40x100_textures_02_glass_40.png) 0 50% repeat-x; - border: 1px solid #4bd94b; -} -.ui-dialog-buttonpane button:active { - color: #ffffff; - background: #f58400 url(images/f58400_40x100_textures_05_inset_soft_30.png) 0 50% repeat-x; - border: 1px solid #ffaf0f; -} -/* This file skins dialog */ -.ui-dialog.ui-draggable .ui-dialog-titlebar, -.ui-dialog.ui-draggable .ui-dialog-titlebar { - cursor: move; -} - - - - - - - -/*datepicker*/ -/* Main Style Sheet for jQuery UI date picker */ -.ui-datepicker-div, .ui-datepicker-inline, #ui-datepicker-div { - /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; - font-family: Segoe UI, Arial, sans-serif; - background: #000000 url(images/000000_40x100_textures_05_inset_soft_25.png) 0 bottom repeat-x; - font-size: 1.0.8em; - border: 4px solid #666666; - width: 15.5em; - padding: 2.5em .5em .5em .5em; - position: relative; -} -.ui-datepicker-div, #ui-datepicker-div { - z-index: 9999; /*must have*/ - display: none; -} -.ui-datepicker-inline { - float: left; - display: block; -} -.ui-datepicker-control { - display: none; -} -.ui-datepicker-current { - display: none; -} -.ui-datepicker-next, .ui-datepicker-prev { - position: absolute; - left: .5em; - top: .5em; - background: #555555 url(images/555555_40x100_textures_02_glass_20.png) 0 50% repeat-x; -} -.ui-datepicker-next { - left: 14.6em; -} -.ui-datepicker-next:hover, .ui-datepicker-prev:hover { - background: #0078a3 url(images/0078a3_40x100_textures_02_glass_40.png) 0 50% repeat-x; -} -.ui-datepicker-next a, .ui-datepicker-prev a { - text-indent: -999999px; - width: 1.3em; - height: 1.4em; - display: block; - font-size: 0.8em; - background: url(images/cccccc_7x7_arrow_left.gif) 50% 50% no-repeat; - border: 1px solid #666666; - cursor: pointer; -} -.ui-datepicker-next a { - background: url(images/cccccc_7x7_arrow_right.gif) 50% 50% no-repeat; -} -.ui-datepicker-prev a:hover { - background: url(images/ffffff_7x7_arrow_left.gif) 50% 50% no-repeat; -} -.ui-datepicker-next a:hover { - background: url(images/ffffff_7x7_arrow_right.gif) 50% 50% no-repeat; -} -.ui-datepicker-prev a:active { - background: url(images/222222_7x7_arrow_left.gif) 50% 50% no-repeat; -} -.ui-datepicker-next a:active { - background: url(images/222222_7x7_arrow_right.gif) 50% 50% no-repeat; -} -.ui-datepicker-header select { - border: 1px solid #666666; - color: #eeeeee; - background: #555555; - font-size: 0.8em; - line-height: 1.4em; - position: absolute; - top: .5em; - margin: 0 !important; -} -.ui-datepicker-header option:focus, .ui-datepicker-header option:hover { - background: #0078a3; -} -.ui-datepicker-header select.ui-datepicker-new-month { - width: 7em; - left: 2.2em; -} -.ui-datepicker-header select.ui-datepicker-new-year { - width: 5em; - left: 9.4em; -} -table.ui-datepicker { - width: 15.5em; - text-align: right; -} -table.ui-datepicker td a { - padding: .0.8em .3em .0.8em 0; - display: block; - color: #eeeeee; - background: #555555 url(images/555555_40x100_textures_02_glass_20.png) 0 50% repeat-x; - cursor: pointer; - border: 1px solid #000000; -} -table.ui-datepicker td a:hover { - border: 1px solid #4bd94b; - color: #ffffff; - background: #0078a3 url(images/0078a3_40x100_textures_02_glass_40.png) 0 50% repeat-x; -} -table.ui-datepicker td a:active { - border: 1px solid #ffaf0f; - color: #ffffff; - background: #f58400 url(images/f58400_40x100_textures_05_inset_soft_30.png) 0 50% repeat-x; -} -table.ui-datepicker .ui-datepicker-title-row td { - padding: .3em 0; - text-align: center; - font-size: .9em; - color: #ffffff; - text-transform: uppercase; -} -table.ui-datepicker .ui-datepicker-title-row td a { - color: #ffffff; -} -.ui-datepicker-cover { - display: none; - display: block; - position: absolute; - z-index: -1; -/* - filter: mask(); - -*/ top: -4px; - left: -4px; - width: 193px; - height: 200px; -} - - - - - - - - - - - - - - -/* -Generic ThemeRoller Classes ->> Make your jQuery Components ThemeRoller-Compatible! -*/ - -/*component global class*/ -.ui-component { - /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; - font-family: Segoe UI, Arial, sans-serif; - font-size: 1.0.8em; -} -/*component content styles*/ -.ui-component-content { - border: 1px solid #666666; - background: #000000 url(images/000000_40x100_textures_05_inset_soft_25.png) 0 bottom repeat-x; - color: #ffffff; -} -.ui-component-content a { - color: #ffffff; - text-decoration: underline; -} -/*component states*/ -.ui-default-state { - border: 1px solid #666666; - background: #555555 url(images/555555_40x100_textures_02_glass_20.png) 0 50% repeat-x; - font-weight: bold; - color: #eeeeee !important; -} -.ui-default-state a { - color: #eeeeee; -} -.ui-default-state:hover, .ui-hover-state { - border: 1px solid #4bd94b; - background: #0078a3 url(images/0078a3_40x100_textures_02_glass_40.png) 0 50% repeat-x; - font-weight: bold; - color: #ffffff !important; -} -.ui-hover-state a { - color: #ffffff; -} -.ui-default-state:active, .ui-active-state { - border: 1px solid #ffaf0f; - background: #f58400 url(images/f58400_40x100_textures_05_inset_soft_30.png) 0 50% repeat-x; - font-weight: bold; - color: #ffffff !important; - outline: none; -} -.ui-active-state a { - color: #ffffff; - outline: none; -} -/*icons*/ -.ui-arrow-right-default {background: url(images/cccccc_7x7_arrow_right.gif) no-repeat 50% 50%;} -.ui-arrow-right-default:hover, .ui-arrow-right-hover {background: url(images/ffffff_7x7_arrow_right.gif) no-repeat 50% 50%;} -.ui-arrow-right-default:active, .ui-arrow-right-active {background: url(images/222222_7x7_arrow_right.gif) no-repeat 50% 50%;} -.ui-arrow-right-content {background: url(images/cccccc_7x7_arrow_right.gif) no-repeat 50% 50%;} - -.ui-arrow-left-default {background: url(images/cccccc_7x7_arrow_left.gif) no-repeat 50% 50%;} -.ui-arrow-left-default:hover, .ui-arrow-left-hover {background: url(images/ffffff_7x7_arrow_left.gif) no-repeat 50% 50%;} -.ui-arrow-left-default:active, .ui-arrow-left-active {background: url(images/222222_7x7_arrow_left.gif) no-repeat 50% 50%;} -.ui-arrow-left-content {background: url(images/cccccc_7x7_arrow_left.gif) no-repeat 50% 50%;} - -.ui-arrow-down-default {background: url(images/cccccc_7x7_arrow_down.gif) no-repeat 50% 50%;} -.ui-arrow-down-default:hover, .ui-arrow-down-hover {background: url(images/ffffff_7x7_arrow_down.gif) no-repeat 50% 50%;} -.ui-arrow-down-default:active, .ui-arrow-down-active {background: url(images/222222_7x7_arrow_down.gif) no-repeat 50% 50%;} -.ui-arrow-down-content {background: url(images/cccccc_7x7_arrow_down.gif) no-repeat 50% 50%;} - -.ui-arrow-up-default {background: url(images/cccccc_7x7_arrow_up.gif) no-repeat 50% 50%;} -.ui-arrow-up-default:hover, .ui-arrow-up-hover {background: url(images/ffffff_7x7_arrow_up.gif) no-repeat 50% 50%;} -.ui-arrow-up-default:active, .ui-arrow-up-active {background: url(images/222222_7x7_arrow_up.gif) no-repeat 50% 50%;} -.ui-arrow-up-content {background: url(images/cccccc_7x7_arrow_up.gif) no-repeat 50% 50%;} - -.ui-close-default {background: url(images/cccccc_11x11_icon_close.gif) no-repeat 50% 50%;} -.ui-close-default:hover, .ui-close-hover {background: url(images/ffffff_11x11_icon_close.gif) no-repeat 50% 50%;} -.ui-close-default:active, .ui-close-active {background: url(images/222222_11x11_icon_close.gif) no-repeat 50% 50%;} -.ui-close-content {background: url(images/222222_11x11_icon_close.gif) no-repeat 50% 50%;} - -.ui-folder-closed-default {background: url(images/cccccc_11x11_icon_folder_closed.gif) no-repeat 50% 50%;} -.ui-folder-closed-default:hover, .ui-folder-closed-hover {background: url(images/ffffff_11x11_icon_folder_closed.gif) no-repeat 50% 50%;} -.ui-folder-closed-default:active, .ui-folder-closed-active {background: url(images/222222_11x11_icon_folder_closed.gif) no-repeat 50% 50%;} -.ui-folder-closed-content {background: url(images/cccccc_11x11_icon_folder_closed.gif) no-repeat 50% 50%;} - -.ui-folder-open-default {background: url(images/cccccc_11x11_icon_folder_open.gif) no-repeat 50% 50%;} -.ui-folder-open-default:hover, .ui-folder-open-hover {background: url(images/ffffff_11x11_icon_folder_open.gif) no-repeat 50% 50%;} -.ui-folder-open-default:active, .ui-folder-open-active {background: url(images/222222_11x11_icon_folder_open.gif) no-repeat 50% 50%;} -.ui-folder-open-content {background: url(images/222222_11x11_icon_folder_open.gif) no-repeat 50% 50%;} - -.ui-doc-default {background: url(images/cccccc_11x11_icon_doc.gif) no-repeat 50% 50%;} -.ui-doc-default:hover, .ui-doc-hover {background: url(images/ffffff_11x11_icon_doc.gif) no-repeat 50% 50%;} -.ui-doc-default:active, .ui-doc-active {background: url(images/222222_11x11_icon_doc.gif) no-repeat 50% 50%;} -.ui-doc-content {background: url(images/cccccc_11x11_icon_doc.gif) no-repeat 50% 50%;} - -.ui-arrows-leftright-default {background: url(images/cccccc_11x11_icon_arrows_leftright.gif) no-repeat 50% 50%;} -.ui-arrows-leftright-default:hover, .ui-arrows-leftright-hover {background: url(images/ffffff_11x11_icon_arrows_leftright.gif) no-repeat 50% 50%;} -.ui-arrows-leftright-default:active, .ui-arrows-leftright-active {background: url(images/222222_11x11_icon_arrows_leftright.gif) no-repeat 50% 50%;} -.ui-arrows-leftright-content {background: url(images/cccccc_11x11_icon_arrows_leftright.gif) no-repeat 50% 50%;} - -.ui-arrows-updown-default {background: url(images/cccccc_11x11_icon_arrows_updown.gif) no-repeat 50% 50%;} -.ui-arrows-updown-default:hover, .ui-arrows-updown-hover {background: url(images/ffffff_11x11_icon_arrows_updown.gif) no-repeat 50% 50%;} -.ui-arrows-updown-default:active, .ui-arrows-updown-active {background: url(images/222222_11x11_icon_arrows_updown.gif) no-repeat 50% 50%;} -.ui-arrows-updown-content {background: url(images/cccccc_11x11_icon_arrows_updown.gif) no-repeat 50% 50%;} - -.ui-minus-default {background: url(images/cccccc_11x11_icon_minus.gif) no-repeat 50% 50%;} -.ui-minus-default:hover, .ui-minus-hover {background: url(images/ffffff_11x11_icon_minus.gif) no-repeat 50% 50%;} -.ui-minus-default:active, .ui-minus-active {background: url(images/222222_11x11_icon_minus.gif) no-repeat 50% 50%;} -.ui-minus-content {background: url(images/cccccc_11x11_icon_minus.gif) no-repeat 50% 50%;} - -.ui-plus-default {background: url(images/cccccc_11x11_icon_plus.gif) no-repeat 50% 50%;} -.ui-plus-default:hover, .ui-plus-hover {background: url(images/ffffff_11x11_icon_plus.gif) no-repeat 50% 50%;} -.ui-plus-default:active, .ui-plus-active {background: url(images/222222_11x11_icon_plus.gif) no-repeat 50% 50%;} -.ui-plus-content {background: url(images/cccccc_11x11_icon_plus.gif) no-repeat 50% 50%;} - -/*hidden elements*/ -.ui-hidden { - display: none;/* for accessible hiding: position: absolute; left: -99999999px*/; -} -.ui-accessible-hidden { - position: absolute; left: -99999999px; -} -/*reset styles*/ -.ui-reset { - /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; -} -/*clearfix class*/ -.ui-clearfix:after { - content: "."; - display: block; - height: 0; - clear: both; - visibility: hidden; -} -.ui-clearfix {display: block;} -/* Hides from IE-mac \*/ -* html .ui-clearfix {height: 1%;} -.ui-clearfix {display: block;} -/* End hide from IE-mac */ - -/* Note: for resizable styles, use the styles listed above in the dialog section */ - - +/** + * Copyright (c) 2009-2010 Symbian Foundation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Symbian Foundation - initial contribution. + * Contributors: + */ + +/* + * jQuery UI screen structure and presentation + * This CSS file was generated by ThemeRoller, a Filament Group Project for jQuery UI + * Author: Scott Jehl, scott@filamentgroup.com, http://www.filamentgroup.com + * Visit ThemeRoller.com +*/ + +/* + * Note: If your ThemeRoller settings have a font size set in ems, your components will scale according to their parent element's font size. + * As a rule of thumb, set your body's font size to 62.5% to make 1em = 10px. + * body {font-size: 62.5%;} +*/ + + + +/*UI accordion*/ +.ui-accordion { + /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; + font-family: Segoe UI, Arial, sans-serif; + font-size: 0.8em; + border-bottom: 1px solid #666666; +} +.ui-accordion-group { + /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; + border: 1px solid #666666; + border-bottom: none; +} +.ui-accordion-header { + /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; + cursor: pointer; + background: #555555 url(images/555555_40x100_textures_02_glass_20.png) 0 50% repeat-x; +} +.ui-accordion-header a { + /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; + display: block; + font-size: 0.8em; + font-weight: bold; + text-decoration: none; + padding: .5em .5em .5em 1.7em; + color: #eeeeee; + background: url(images/cccccc_7x7_arrow_right.gif) .5em 50% no-repeat; +} +.ui-accordion-header a:hover { + background: url(images/ffffff_7x7_arrow_right.gif) .5em 50% no-repeat; + color: #ffffff; +} +.ui-accordion-header:hover { + background: #0078a3 url(images/0078a3_40x100_textures_02_glass_40.png) 0 50% repeat-x; + color: #ffffff; +} +.selected .ui-accordion-header, .selected .ui-accordion-header:hover { + background: #f58400 url(images/f58400_40x100_textures_05_inset_soft_30.png) 0 50% repeat-x; +} +.selected .ui-accordion-header a, .selected .ui-accordion-header a:hover { + color: #ffffff; + background: url(images/222222_7x7_arrow_down.gif) .5em 50% no-repeat; +} +.ui-accordion-content { + background: #000000 url(images/000000_40x100_textures_05_inset_soft_25.png) 0 bottom repeat-x; + color: #ffffff; + font-size: 0.8em; +} +.ui-accordion-content p { + padding: 0.8em 1.7em 0.6em; +} + + + + + + +/*UI tabs*/ +.ui-tabs-nav { + /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; + font-family: Segoe UI, Arial, sans-serif; + font-size: 1.0.8em; +/* + float: left; + +*/ position: relative; + z-index: 1; +/* + border-right: 1px solid #666666; +*/ + bottom: -1px; +} +.ui-tabs-nav ul { + /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; +} +.ui-tabs-nav li { + /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; + float: left; + border: 1px solid #666666; + border-right: none; +} +.ui-tabs-nav li a { + /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; + float: left; + font-size: 0.8em; + font-weight: bold; + text-decoration: none; + padding: .5em 1.7em; + color: #eeeeee; + background: #555555 url(images/555555_40x100_textures_02_glass_20.png) 0 50% repeat-x; +} +.ui-tabs-nav li a:hover { + background: #0078a3 url(images/0078a3_40x100_textures_02_glass_40.png) 0 50% repeat-x; + color: #ffffff; +} +.ui-tabs-nav li.ui-tabs-selected { + border-bottom-color: #f58400; +} +.ui-tabs-nav li.ui-tabs-selected a, .ui-tabs-nav li.ui-tabs-selected a:hover { + background: #f58400 url(images/f58400_40x100_textures_05_inset_soft_30.png) 0 50% repeat-x; + color: #ffffff; +} +.ui-tabs-panel { + /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; + font-family: Segoe UI, Arial, sans-serif; + clear:left; + border-top: 1px solid #666666; + +/* + background: #000000 url(images/000000_40x100_textures_05_inset_soft_25.png) 0 bottom repeat-x; + +*/ color: #ffffff; + padding: 15px; + font-size: 1.0.8em; +} +.ui-tabs-hide { + display: none;/* for accessible hiding: position: absolute; left: -99999999px*/; +} + + + + + +/*slider*/ +.ui-slider { + /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; + font-family: Segoe UI, Arial, sans-serif; + font-size: 1.0.8em; + background: #000000 url(images/000000_40x100_textures_05_inset_soft_25.png) 0 bottom repeat-x; + border: 1px solid #666666; + height: .8em; + position: relative; +} +.ui-slider-handle { + /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; + position: absolute; + z-index: 2; + top: -7px; +/* width: 1.2em; + height: 1.2em; + background: #555555 url(images/555555_40x100_textures_02_glass_20.png) 0 50% repeat-x; + border: 1px solid #666666; +*/ + background-image: url(images/slider-handle.png); + background-repeat: no-repeat; + background-position: 0px 0px; + height: 19px; + width: 17px; +} +.ui-slider-handle:hover { + background-position: 0px -19px; +} +.ui-slider-handle-active, .ui-slider-handle-active:hover { + background-position: 0px -38px; +} +.ui-slider-range { + /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; + height: .8em; + background: #0078a3 url(images/0078a3_40x100_textures_02_glass_40.png) 0 50% repeat-x; + position: absolute; + border: 1px solid #666666; + border-left: 0; + border-right: 0; + top: -1px; + z-index: 1; + opacity:.7; +/* + filter:Alpha(Opacity=70); + +*/} + + + + + + +/*dialog*/ +.ui-dialog { + /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; + font-family: Segoe UI, Arial, sans-serif; + font-size: 0.9em; +/* background: #000000 url(images/000000_40x100_textures_05_inset_soft_25.png) 0 bottom repeat-x; */ + background: #333333 url(images/000000_40x100_textures_05_inset_soft_25.png) 0 bottom repeat-x; + color: #ffffff; +/* border: 4px solid #666666; */ + border: 4px solid #333; + position: relative; +} +.ui-resizable-handle { + position: absolute; + font-size: 0.1px; + z-index: 99999; +} +.ui-resizable .ui-resizable-handle { + display: block; +} +body .ui-resizable-disabled .ui-resizable-handle { display: none; } /* use 'body' to make it more specific (css order) */ +body .ui-resizable-autohide .ui-resizable-handle { display: none; } /* use 'body' to make it more specific (css order) */ +.ui-resizable-n { + cursor: n-resize; + height: 7px; + width: 100%; + top: -5px; + left: 0px; +} +.ui-resizable-s { + cursor: s-resize; + height: 7px; + width: 100%; + bottom: -5px; + left: 0px; +} +.ui-resizable-e { + cursor: e-resize; + width: 7px; + right: -5px; + top: 0px; + height: 100%; +} +.ui-resizable-w { + cursor: w-resize; + width: 7px; + left: -5px; + top: 0px; + height: 100%; +} +.ui-resizable-se { + cursor: se-resize; + width: 13px; + height: 13px; + right: 0px; + bottom: 0px; + background: url(images/cccccc_11x11_icon_resize_se.gif) no-repeat 0 0; +} +.ui-resizable-sw { + cursor: sw-resize; + width: 9px; + height: 9px; + left: 0px; + bottom: 0px; +} +.ui-resizable-nw { + cursor: nw-resize; + width: 9px; + height: 9px; + left: 0px; + top: 0px; +} +.ui-resizable-ne { + cursor: ne-resize; + width: 9px; + height: 9px; + right: 0px; + top: 0px; +} +.ui-dialog-titlebar { + /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; + padding: .5em 1.5em .5em 0.8em; + color: #eeeeee; +/* background: #555555 url(images/555555_40x100_textures_02_glass_20.png) 0 50% repeat-x; */ + background: #FF0000 url(images/555555_40x100_textures_02_glass_20.png) 0 50% repeat-x; + border-bottom: 1px solid #666666; + font-size: 0.8em; + font-weight: bold; + position: relative; +} +.ui-dialog-title {} +.ui-dialog-titlebar-close { + /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; + background: url(images/cccccc_11x11_icon_close.gif) 0 0 no-repeat; + position: absolute; + right: 8px; + top: .7em; + width: 11px; + height: 11px; + z-index: 100; + cursor: pointer !important; +} +.ui-dialog-titlebar-close-hover, .ui-dialog-titlebar-close:hover { + background: url(images/ffffff_11x11_icon_close.gif) 0 0 no-repeat; +} +.ui-dialog-titlebar-close:active { + background: url(images/222222_11x11_icon_close.gif) 0 0 no-repeat; +} +.ui-dialog-titlebar-close span { + display: none; +} +.ui-dialog-content { + /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; + color: #ffffff; +/* + padding: 1.5em 1.7em; +*/ + padding-left: 1px; +} +.ui-dialog-buttonpane { + position: absolute; + bottom: 0; + width: 100%; + text-align: left; + border-top: 1px solid #666666; + background: #000000; +} +.ui-dialog-buttonpane button { + margin: .5em 8px .5em 0; + color: #eeeeee; + background: #555555 url(images/555555_40x100_textures_02_glass_20.png) 0 50% repeat-x; + font-size: 0.8em; + font-weight: bolder; + border: 1px solid #666666; + cursor: pointer; + padding: .2em .6em .3em .6em; + line-height: 1.4em; + float: right; +} +.ui-dialog-buttonpane button:hover { + color: #ffffff; + background: #0078a3 url(images/0078a3_40x100_textures_02_glass_40.png) 0 50% repeat-x; + border: 1px solid #4bd94b; +} +.ui-dialog-buttonpane button:active { + color: #ffffff; + background: #f58400 url(images/f58400_40x100_textures_05_inset_soft_30.png) 0 50% repeat-x; + border: 1px solid #ffaf0f; +} +/* This file skins dialog */ +.ui-dialog.ui-draggable .ui-dialog-titlebar, +.ui-dialog.ui-draggable .ui-dialog-titlebar { + cursor: move; +} + + + + + + + +/*datepicker*/ +/* Main Style Sheet for jQuery UI date picker */ +.ui-datepicker-div, .ui-datepicker-inline, #ui-datepicker-div { + /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; + font-family: Segoe UI, Arial, sans-serif; + background: #000000 url(images/000000_40x100_textures_05_inset_soft_25.png) 0 bottom repeat-x; + font-size: 1.0.8em; + border: 4px solid #666666; + width: 15.5em; + padding: 2.5em .5em .5em .5em; + position: relative; +} +.ui-datepicker-div, #ui-datepicker-div { + z-index: 9999; /*must have*/ + display: none; +} +.ui-datepicker-inline { + float: left; + display: block; +} +.ui-datepicker-control { + display: none; +} +.ui-datepicker-current { + display: none; +} +.ui-datepicker-next, .ui-datepicker-prev { + position: absolute; + left: .5em; + top: .5em; + background: #555555 url(images/555555_40x100_textures_02_glass_20.png) 0 50% repeat-x; +} +.ui-datepicker-next { + left: 14.6em; +} +.ui-datepicker-next:hover, .ui-datepicker-prev:hover { + background: #0078a3 url(images/0078a3_40x100_textures_02_glass_40.png) 0 50% repeat-x; +} +.ui-datepicker-next a, .ui-datepicker-prev a { + text-indent: -999999px; + width: 1.3em; + height: 1.4em; + display: block; + font-size: 0.8em; + background: url(images/cccccc_7x7_arrow_left.gif) 50% 50% no-repeat; + border: 1px solid #666666; + cursor: pointer; +} +.ui-datepicker-next a { + background: url(images/cccccc_7x7_arrow_right.gif) 50% 50% no-repeat; +} +.ui-datepicker-prev a:hover { + background: url(images/ffffff_7x7_arrow_left.gif) 50% 50% no-repeat; +} +.ui-datepicker-next a:hover { + background: url(images/ffffff_7x7_arrow_right.gif) 50% 50% no-repeat; +} +.ui-datepicker-prev a:active { + background: url(images/222222_7x7_arrow_left.gif) 50% 50% no-repeat; +} +.ui-datepicker-next a:active { + background: url(images/222222_7x7_arrow_right.gif) 50% 50% no-repeat; +} +.ui-datepicker-header select { + border: 1px solid #666666; + color: #eeeeee; + background: #555555; + font-size: 0.8em; + line-height: 1.4em; + position: absolute; + top: .5em; + margin: 0 !important; +} +.ui-datepicker-header option:focus, .ui-datepicker-header option:hover { + background: #0078a3; +} +.ui-datepicker-header select.ui-datepicker-new-month { + width: 7em; + left: 2.2em; +} +.ui-datepicker-header select.ui-datepicker-new-year { + width: 5em; + left: 9.4em; +} +table.ui-datepicker { + width: 15.5em; + text-align: right; +} +table.ui-datepicker td a { + padding: .0.8em .3em .0.8em 0; + display: block; + color: #eeeeee; + background: #555555 url(images/555555_40x100_textures_02_glass_20.png) 0 50% repeat-x; + cursor: pointer; + border: 1px solid #000000; +} +table.ui-datepicker td a:hover { + border: 1px solid #4bd94b; + color: #ffffff; + background: #0078a3 url(images/0078a3_40x100_textures_02_glass_40.png) 0 50% repeat-x; +} +table.ui-datepicker td a:active { + border: 1px solid #ffaf0f; + color: #ffffff; + background: #f58400 url(images/f58400_40x100_textures_05_inset_soft_30.png) 0 50% repeat-x; +} +table.ui-datepicker .ui-datepicker-title-row td { + padding: .3em 0; + text-align: center; + font-size: .9em; + color: #ffffff; + text-transform: uppercase; +} +table.ui-datepicker .ui-datepicker-title-row td a { + color: #ffffff; +} +.ui-datepicker-cover { + display: none; + display: block; + position: absolute; + z-index: -1; +/* + filter: mask(); + +*/ top: -4px; + left: -4px; + width: 193px; + height: 200px; +} + + + + + + + + + + + + + + +/* +Generic ThemeRoller Classes +>> Make your jQuery Components ThemeRoller-Compatible! +*/ + +/*component global class*/ +.ui-component { + /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; + font-family: Segoe UI, Arial, sans-serif; + font-size: 1.0.8em; +} +/*component content styles*/ +.ui-component-content { + border: 1px solid #666666; + background: #000000 url(images/000000_40x100_textures_05_inset_soft_25.png) 0 bottom repeat-x; + color: #ffffff; +} +.ui-component-content a { + color: #ffffff; + text-decoration: underline; +} +/*component states*/ +.ui-default-state { + border: 1px solid #666666; + background: #555555 url(images/555555_40x100_textures_02_glass_20.png) 0 50% repeat-x; + font-weight: bold; + color: #eeeeee !important; +} +.ui-default-state a { + color: #eeeeee; +} +.ui-default-state:hover, .ui-hover-state { + border: 1px solid #4bd94b; + background: #0078a3 url(images/0078a3_40x100_textures_02_glass_40.png) 0 50% repeat-x; + font-weight: bold; + color: #ffffff !important; +} +.ui-hover-state a { + color: #ffffff; +} +.ui-default-state:active, .ui-active-state { + border: 1px solid #ffaf0f; + background: #f58400 url(images/f58400_40x100_textures_05_inset_soft_30.png) 0 50% repeat-x; + font-weight: bold; + color: #ffffff !important; + outline: none; +} +.ui-active-state a { + color: #ffffff; + outline: none; +} +/*icons*/ +.ui-arrow-right-default {background: url(images/cccccc_7x7_arrow_right.gif) no-repeat 50% 50%;} +.ui-arrow-right-default:hover, .ui-arrow-right-hover {background: url(images/ffffff_7x7_arrow_right.gif) no-repeat 50% 50%;} +.ui-arrow-right-default:active, .ui-arrow-right-active {background: url(images/222222_7x7_arrow_right.gif) no-repeat 50% 50%;} +.ui-arrow-right-content {background: url(images/cccccc_7x7_arrow_right.gif) no-repeat 50% 50%;} + +.ui-arrow-left-default {background: url(images/cccccc_7x7_arrow_left.gif) no-repeat 50% 50%;} +.ui-arrow-left-default:hover, .ui-arrow-left-hover {background: url(images/ffffff_7x7_arrow_left.gif) no-repeat 50% 50%;} +.ui-arrow-left-default:active, .ui-arrow-left-active {background: url(images/222222_7x7_arrow_left.gif) no-repeat 50% 50%;} +.ui-arrow-left-content {background: url(images/cccccc_7x7_arrow_left.gif) no-repeat 50% 50%;} + +.ui-arrow-down-default {background: url(images/cccccc_7x7_arrow_down.gif) no-repeat 50% 50%;} +.ui-arrow-down-default:hover, .ui-arrow-down-hover {background: url(images/ffffff_7x7_arrow_down.gif) no-repeat 50% 50%;} +.ui-arrow-down-default:active, .ui-arrow-down-active {background: url(images/222222_7x7_arrow_down.gif) no-repeat 50% 50%;} +.ui-arrow-down-content {background: url(images/cccccc_7x7_arrow_down.gif) no-repeat 50% 50%;} + +.ui-arrow-up-default {background: url(images/cccccc_7x7_arrow_up.gif) no-repeat 50% 50%;} +.ui-arrow-up-default:hover, .ui-arrow-up-hover {background: url(images/ffffff_7x7_arrow_up.gif) no-repeat 50% 50%;} +.ui-arrow-up-default:active, .ui-arrow-up-active {background: url(images/222222_7x7_arrow_up.gif) no-repeat 50% 50%;} +.ui-arrow-up-content {background: url(images/cccccc_7x7_arrow_up.gif) no-repeat 50% 50%;} + +.ui-close-default {background: url(images/cccccc_11x11_icon_close.gif) no-repeat 50% 50%;} +.ui-close-default:hover, .ui-close-hover {background: url(images/ffffff_11x11_icon_close.gif) no-repeat 50% 50%;} +.ui-close-default:active, .ui-close-active {background: url(images/222222_11x11_icon_close.gif) no-repeat 50% 50%;} +.ui-close-content {background: url(images/222222_11x11_icon_close.gif) no-repeat 50% 50%;} + +.ui-folder-closed-default {background: url(images/cccccc_11x11_icon_folder_closed.gif) no-repeat 50% 50%;} +.ui-folder-closed-default:hover, .ui-folder-closed-hover {background: url(images/ffffff_11x11_icon_folder_closed.gif) no-repeat 50% 50%;} +.ui-folder-closed-default:active, .ui-folder-closed-active {background: url(images/222222_11x11_icon_folder_closed.gif) no-repeat 50% 50%;} +.ui-folder-closed-content {background: url(images/cccccc_11x11_icon_folder_closed.gif) no-repeat 50% 50%;} + +.ui-folder-open-default {background: url(images/cccccc_11x11_icon_folder_open.gif) no-repeat 50% 50%;} +.ui-folder-open-default:hover, .ui-folder-open-hover {background: url(images/ffffff_11x11_icon_folder_open.gif) no-repeat 50% 50%;} +.ui-folder-open-default:active, .ui-folder-open-active {background: url(images/222222_11x11_icon_folder_open.gif) no-repeat 50% 50%;} +.ui-folder-open-content {background: url(images/222222_11x11_icon_folder_open.gif) no-repeat 50% 50%;} + +.ui-doc-default {background: url(images/cccccc_11x11_icon_doc.gif) no-repeat 50% 50%;} +.ui-doc-default:hover, .ui-doc-hover {background: url(images/ffffff_11x11_icon_doc.gif) no-repeat 50% 50%;} +.ui-doc-default:active, .ui-doc-active {background: url(images/222222_11x11_icon_doc.gif) no-repeat 50% 50%;} +.ui-doc-content {background: url(images/cccccc_11x11_icon_doc.gif) no-repeat 50% 50%;} + +.ui-arrows-leftright-default {background: url(images/cccccc_11x11_icon_arrows_leftright.gif) no-repeat 50% 50%;} +.ui-arrows-leftright-default:hover, .ui-arrows-leftright-hover {background: url(images/ffffff_11x11_icon_arrows_leftright.gif) no-repeat 50% 50%;} +.ui-arrows-leftright-default:active, .ui-arrows-leftright-active {background: url(images/222222_11x11_icon_arrows_leftright.gif) no-repeat 50% 50%;} +.ui-arrows-leftright-content {background: url(images/cccccc_11x11_icon_arrows_leftright.gif) no-repeat 50% 50%;} + +.ui-arrows-updown-default {background: url(images/cccccc_11x11_icon_arrows_updown.gif) no-repeat 50% 50%;} +.ui-arrows-updown-default:hover, .ui-arrows-updown-hover {background: url(images/ffffff_11x11_icon_arrows_updown.gif) no-repeat 50% 50%;} +.ui-arrows-updown-default:active, .ui-arrows-updown-active {background: url(images/222222_11x11_icon_arrows_updown.gif) no-repeat 50% 50%;} +.ui-arrows-updown-content {background: url(images/cccccc_11x11_icon_arrows_updown.gif) no-repeat 50% 50%;} + +.ui-minus-default {background: url(images/cccccc_11x11_icon_minus.gif) no-repeat 50% 50%;} +.ui-minus-default:hover, .ui-minus-hover {background: url(images/ffffff_11x11_icon_minus.gif) no-repeat 50% 50%;} +.ui-minus-default:active, .ui-minus-active {background: url(images/222222_11x11_icon_minus.gif) no-repeat 50% 50%;} +.ui-minus-content {background: url(images/cccccc_11x11_icon_minus.gif) no-repeat 50% 50%;} + +.ui-plus-default {background: url(images/cccccc_11x11_icon_plus.gif) no-repeat 50% 50%;} +.ui-plus-default:hover, .ui-plus-hover {background: url(images/ffffff_11x11_icon_plus.gif) no-repeat 50% 50%;} +.ui-plus-default:active, .ui-plus-active {background: url(images/222222_11x11_icon_plus.gif) no-repeat 50% 50%;} +.ui-plus-content {background: url(images/cccccc_11x11_icon_plus.gif) no-repeat 50% 50%;} + +/*hidden elements*/ +.ui-hidden { + display: none;/* for accessible hiding: position: absolute; left: -99999999px*/; +} +.ui-accessible-hidden { + position: absolute; left: -99999999px; +} +/*reset styles*/ +.ui-reset { + /*resets*/margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; +} +/*clearfix class*/ +.ui-clearfix:after { + content: "."; + display: block; + height: 0; + clear: both; + visibility: hidden; +} +.ui-clearfix {display: block;} +/* Hides from IE-mac \*/ +* html .ui-clearfix {height: 1%;} +.ui-clearfix {display: block;} +/* End hide from IE-mac */ + +/* Note: for resizable styles, use the styles listed above in the dialog section */ + + diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.wrttools.doc.WRTKit/.classpath --- a/org.symbian.wrttools.doc.WRTKit/.classpath Fri Mar 05 15:43:17 2010 -0800 +++ b/org.symbian.wrttools.doc.WRTKit/.classpath Fri Mar 05 19:11:15 2010 -0800 @@ -1,6 +1,6 @@ - + diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.wrttools.doc.WRTKit/.settings/org.eclipse.jdt.core.prefs --- a/org.symbian.wrttools.doc.WRTKit/.settings/org.eclipse.jdt.core.prefs Fri Mar 05 15:43:17 2010 -0800 +++ b/org.symbian.wrttools.doc.WRTKit/.settings/org.eclipse.jdt.core.prefs Fri Mar 05 19:11:15 2010 -0800 @@ -1,8 +1,12 @@ -#Wed Jan 27 16:56:27 PST 2010 +#Fri Mar 05 16:32:41 PST 2010 eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.6 +org.eclipse.jdt.core.compiler.source=1.5 diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.wrttools.doc.WRTKit/META-INF/MANIFEST.MF --- a/org.symbian.wrttools.doc.WRTKit/META-INF/MANIFEST.MF Fri Mar 05 15:43:17 2010 -0800 +++ b/org.symbian.wrttools.doc.WRTKit/META-INF/MANIFEST.MF Fri Mar 05 19:11:15 2010 -0800 @@ -7,5 +7,5 @@ Require-Bundle: org.eclipse.ui, org.eclipse.core.runtime Bundle-ActivationPolicy: lazy -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Bundle-RequiredExecutionEnvironment: J2SE-1.5 diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.wrttools.doc.WRTKit/plugin.xml --- a/org.symbian.wrttools.doc.WRTKit/plugin.xml Fri Mar 05 15:43:17 2010 -0800 +++ b/org.symbian.wrttools.doc.WRTKit/plugin.xml Fri Mar 05 19:11:15 2010 -0800 @@ -7,9 +7,6 @@ file="toc.xml" primary="true"> - -