3.2 globalui -- Interface to the S60 global UI notifiers

Availability: S60.

The globalui module offers an interface to the S60 global UI notifiers. This allows a global note and query to be launched from an application which does not have a UI environment. The globalui module have functions:

global_note( note_text[, type])
Displays a note of the chosen type with note_text (Unicode). The default value for type is 'info'. type can be one of the following strings: 'error', 'text', 'warn', 'charging', 'wait', 'perm','not_charging', 'battery_full', 'battery_low', 'recharge_battery', or 'confirm'.

global_query( query_text[, timeout])
Displays a global confirmation query with query_text (Unicode). Returns 1 when the user presses 'Yes' and 0 otherwise. If the user does not respond to the query within timeout seconds, returns None. If the timeout value is 0, then the query waits indefinitely for user input. The default value for timeout is 0. The timeout value should be an integer.

global_msg_query( query_text, header_text[, timeout])
Displays a global message query with query_text(Unicode). header_text is used to set the heading string of the query. Returns 1 when the user presses 'OK' and 0 otherwise. If the user does not respond to the query within timeout seconds, returns None. If the timeout value is 0, then the query waits indefinitely for user input. The default value for timeout is 0. The timeout value should be an integer.

global_popup_menu( option_items[, header_text, timeout])
Displays a global menu with option_items(Unicode). header_text is used to set the heading string of the menu. If no value is passed for header_text, then the header will not be displayed. Returns the index value of the selected item from the list. If the user does not respond to the menu within timeout seconds, returns None. If the timeout value is 0, then the menu waits indefinitely for the input. The default value for timeout is 0. The timeout value should be an integer.

Example:

>>> import globalui, time
...
>>> text_to_show = u"text for showing note"
>>> globalui.global_note(text_to_show,'error')
>>> time.sleep(6)
>>> globalui.global_note(text_to_show)
>>> time.sleep(6)
>>> result = globalui.global_query(u"do you want to continue ?")
>>> time.sleep(6)
>>> listresult = globalui.global_popup_menu([u"MenuItem1", u"MenuItem2"],u"Select item",5)
...

See About this document... for information on suggesting changes.