PyMaemo/Python-osso examples
(package link, wikify slightly) |
(add link) |
||
Line 1: | Line 1: | ||
- | This document shows some examples of the functionalities available in the [http://maemo.org/packages/view/python-osso/ python-osso package]. | + | This document shows some examples of the functionalities available in the [http://maemo.org/packages/view/python-osso/ python-osso package]. See also the [[Documentation/Maemo 5 Developer Guide/Application Development/LibOSSO library|documentation for the libosso]] library. |
== List of examples == | == List of examples == |
Latest revision as of 09:50, 25 October 2010
This document shows some examples of the functionalities available in the python-osso package. See also the documentation for the libosso library.
Contents |
[edit] List of examples
[edit] Application
This example shows how to bring an application to foreground using osso.Application.application_top().
- osso_test_app.py - Application that will be brought to foreground.
- osso_test_app.service - Service file for the target application.
- osso_test_sender.py - Application that will call the OSSO service.
[edit] Auto-saving / State Saving
These examples show how to use the auto-saving and state saving features from python-osso. Each file is a separate example.
- osso_test_autosave.py - The same objects from the example below, but instead of calling the save function directly, any changes call
user_data_changed
, and when exitingforce_autosave
is called. - osso_test_statesaving.py - Creates a
gtk.Entry
and agtk.HScale
. It saves the state when the application goes to background or exits, restoring the state on the next startup, unless the device resets or is turned off.
[edit] Device State
These examples show how to interact with the display and the device.
- osso_test_device_on.py - Requests to turn on the display.
- osso_test_device_blank_pause.py - Requests to do not blank the screen. This will keep the screen on for 60 seconds.
- osso_test_device_state_cb.py - Registers a callback for device state changes (Offline mode, etc...).
[edit] Help
These examples show how to use HELP and enable the "?" button in dialogs
- osso_test_help.py - Shows two buttons: one to load a help topic and another to open a dialog with an "?" button in titlebar.
[edit] MIME
These examples show how use the MIME functions.
- osso_test_mime_category.py - Prints the category the specified mime type is in.
- osso_test_mime_default-app.py - Prints information about the current default application for the given mime type.
- osso_test_mime_open.py - Opens an file using the default application for its mime type.
- osso_test_mime_icons.py - Shows icons associated with a given mime type.
[edit] Plugin
This example shows how to load plugins.
- test_plugin_app.py - Loads the test plugin.
- testplugin.c - Test plugin.
- testplugin.desktop - Desktop file for the test plugin.
[edit] RPC
These examples show how to make remote procedure calls using python-osso.
- osso_test_sender.py - GUI app that requests a service from the target app.
- osso_test_receiver.py - Sample service that will be called by
osso_test_sender.py
[edit] Status Bar
This example shows how to send events to status bar applets.
- osso_test_statusbar.py - Requests the display applet to change the display brightness.
[edit] System Note
These examples show how to use notification dialogs with applications that run without GUI.
- osso_test_note_dialog.py - Shows a dialog note.
- osso_test_note_infoprint.py - Shows an information banner.
[edit] Time Notification
This example registers a callback and tries to set the system time. Notice: Currently this won't change the time. (Even in C).
- This page was last modified on 25 October 2010, at 09:50.
- This page has been accessed 10,605 times.