app. New instances cannot be created by a Python program.
Set it to
True to enable 4-way directional pad and
False to disable it.
Nonesets it back to the default value.
>>> import appuifw >>> def cb(fg): ... if(fg): ... print "foreground" ... else: ... print "background" ... >>> appuifw.app.focus=cb >>> # switch to background, following text is printed from callback: >>> background >>> # switch to foreground, following text is printed from callback: >>> foreground
(title, callback)which creates a regular menu item
(title, ((title, callback)[...]))which creates a submenu
title (Unicode) is the name of the item and callback the associated callable object. The maximum allowed number of items in a menu, or items in a submenu, or submenus in a menu is 30.
appuifw.app.menu = [(u"Item 1", item1), (u"Submenu 1", ((u"Subitem 1", subitem1), (u"Subitem 2", subitem2)))]
'automatic'(this is the default value),
appuifw.app.screen='normal' # normal screen with title pane and softkey labels appuifw.app.screen='large' # only softkey labels visible appuifw.app.screen='full' # full screen mode on all devices
appuifw.app.track_allocations = false import my_extension my_extension.do_something() appuifw.app.track_allocations = true
Instances of Application type have the following methods:
Returns as a tuple the size and the position of the requested
The logical layouts are outlined partly in Figure 3.2. The
position is given from the top left corner. The
layout_id can be one of
the constants defined in module appuifw3.1:
>>> import appuifw >>> appuifw.app.layout(appuifw.EMainPane) ((176, 144), (0, 44)) >>> # size and position (x, y) of the main pane in Nokia N70