Tichy

From Openmoko

(Difference between revisions)
Jump to: navigation, search
(catchg)
 
(20 intermediate revisions by 8 users not shown)
Line 1: Line 1:
 
{{Languages|Tichy}}
 
{{Languages|Tichy}}
  
[[Image:Tichy-main.png|thumb|tichy main window]]
+
<pre>
 +
      _      _         
 +
  _  (_)    | |         
 +
_| |_ _  ____| |__  _  _
 +
(_  _) |/ ___)  _ \| | | |  A Python Applets Manager
 +
  | |_| ( (___| | | | |_| |
 +
  \__)_|\____)_| |_|\__  |  For Openmoko
 +
                    (____/
 +
 
 +
</pre>
 +
 
 +
[[Image:Tichy-main2.png|thumb|tichy main window]]
 
[[Image:Tichy-drawing.png|thumb|tichy drawing app]]
 
[[Image:Tichy-drawing.png|thumb|tichy drawing app]]
[[Image:Tichy-style.png|thumb|tichy message app]]
+
[[Image:Tichy-style.png|thumb|tichy style app]]
 
[[Image:Tichy-Media.png|thumb|tichy freedesktop app]]
 
[[Image:Tichy-Media.png|thumb|tichy freedesktop app]]
 +
[[Image:Tichy-Keyboard.png|thumb|tichy keyboard app]]
 +
 +
== Warning ==
 +
Tichy currently diverged back from [[Paroli]].
 +
Tichy is a work in progress, for more information and to understand the goals of tichy, please read the README file included in the source repository.
 +
 +
== Tichy webpage ==
 +
http://code.google.com/p/tichy/
  
 
== About ==
 
== About ==
Line 13: Line 32:
 
Tichy provides the following things :
 
Tichy provides the following things :
 
* Graphics User Interface widgets
 
* Graphics User Interface widgets
* Services registering and Requesting (for example an application that want to send a message will request for an application implementing  the message sending service)  
+
* Services registering and Requesting (for example an application that wants to send a message will request for an application implementing  the message sending service)
* Tasklets system (This allow to write callback blocking application as if they where multi-threads)
+
* Tasklets system (This allow to write callback waiting process as if they were threads)
* Abstraction of Item / View (Just explain what you want to show, tichy will generate the widgets)
+
* Abstraction of Item / View
 +
* A plug in system that make it easy to add new functionalities / applets to tichy
  
== Authors ==
+
== How to write an applets / plug-ins for tichy ? ==
* Guillaume "Charlie" Chereau, main developer
+
It is very easy to do. If you want to write a new applet, you just need to create a new directory in tichy/test/plugins/apps/. You can have a look at the other plug-ins to get an idea of how to do it. A basic app look like this :
* Michael "Goodwill" (Did the freedesktop app launcher plugin)
+
  
== Sources ==
+
<pre>
The sources can be found from svn repository on project.openmoko :
+
import tichy
svn checkout svn://svn.projects.openmoko.org/svnroot/tichy
+
import tichy.gui as gui
 +
import tichy.item as item
 +
from tichy.application import Application
  
== Running on the desktop ==
+
class MyApp(Application):
Thanks to the service system, that allow to provide several version of the same service, Tichy can run as well on a desktop computer as on the neo.
+
    name = "My Application"
 +
    icon = 'icon.png'  # to be found in the app directory
  
To run it on the desktop, just download the sources, then go into test, and run  
+
    def run(self, parent):
./tichy
+
    w = gui.Window(parent, modal = True)  # We run into a new modal window
 +
    # Create a new frame with a "back" button on top
 +
    frame = gui.ApplicationFrame(w, self, back_button=True)
  
== Running on neo ==
+
    # This box is used to store the widgets
You will need to compile some files, see the README for more information on how to do it.
+
    box = gui.Box(frame, axis=1)
  
 +
    # Create a text item
 +
    text = item.Text('click to edit', editable = True)
 +
    # Put a view of the item on the screen
 +
    text.view(box)
 +
 +
    # Add a button
 +
    button = gui.Button(box)
 +
    gui.Label(button, "click me")
 +
 +
    def on_click(b):
 +
        # "yield" means "block until the tasklet returns"
 +
        yield gui.Message(w, you just clicked the button)
 +
        button.connect('clicked', on_click)
 +
 +
  yield Wait(frame, 'back')    # Wait until the back button is clicked
 +
  w.close()                    # Don't forget to close the window
 +
</pre>
 +
 +
== Authors ==
 +
* Guillaume "Charlie" Chereau, main developer
 +
* Michael "Goodwill"
 +
 +
== Sources ==
 +
Now Tichy hosted on code.google.com so use svn to fetch:
 +
svn checkout http://tichy.googlecode.com/svn/trunk/ tichy-read-only
 +
 +
== Dependencies ==
 
You need python 2.5 and some libraries installed :
 
You need python 2.5 and some libraries installed :
 
* python-pygame
 
* python-pygame
Line 41: Line 92:
 
* python-gobject
 
* python-gobject
  
[[Category:Applications]]
+
== packages ==
[[Category:Guides]]
+
From the google code page, debian and ipkg packages are available.
 +
 
 +
[[Category:Middleware]]

Latest revision as of 10:58, 19 July 2009


       _       _           
   _  (_)     | |          
 _| |_ _  ____| |__  _   _ 
(_   _) |/ ___)  _ \| | | |  A Python Applets Manager
  | |_| ( (___| | | | |_| |
   \__)_|\____)_| |_|\__  |  For Openmoko
                    (____/ 

tichy main window
tichy drawing app
tichy style app
tichy freedesktop app
tichy keyboard app

Contents

[edit] Warning

Tichy currently diverged back from Paroli. Tichy is a work in progress, for more information and to understand the goals of tichy, please read the README file included in the source repository.

[edit] Tichy webpage

http://code.google.com/p/tichy/

[edit] About

Tichy is a python applets manager for embedded devices.

The goal of the project is to make it easy to write many kind of applications for openmoko using the python language.

Tichy provides the following things :

  • Graphics User Interface widgets
  • Services registering and Requesting (for example an application that wants to send a message will request for an application implementing the message sending service)
  • Tasklets system (This allow to write callback waiting process as if they were threads)
  • Abstraction of Item / View
  • A plug in system that make it easy to add new functionalities / applets to tichy

[edit] How to write an applets / plug-ins for tichy ?

It is very easy to do. If you want to write a new applet, you just need to create a new directory in tichy/test/plugins/apps/. You can have a look at the other plug-ins to get an idea of how to do it. A basic app look like this :

import tichy
import tichy.gui as gui
import tichy.item as item
from tichy.application import Application

class MyApp(Application):
    name = "My Application"
    icon = 'icon.png'   # to be found in the app directory

    def run(self, parent):
    w = gui.Window(parent, modal = True)   # We run into a new modal window
    # Create a new frame with a "back" button on top
    frame = gui.ApplicationFrame(w, self, back_button=True)

    # This box is used to store the widgets
    box = gui.Box(frame, axis=1)

    # Create a text item
    text = item.Text('click to edit', editable = True)
    # Put a view of the item on the screen
    text.view(box)

    # Add a button
    button = gui.Button(box)
    gui.Label(button, "click me")

    def on_click(b):
        # "yield" means "block until the tasklet returns"
        yield gui.Message(w, you just clicked the button)
        button.connect('clicked', on_click)

   yield Wait(frame, 'back')     # Wait until the back button is clicked
   w.close()                     # Don't forget to close the window

[edit] Authors

  • Guillaume "Charlie" Chereau, main developer
  • Michael "Goodwill"

[edit] Sources

Now Tichy hosted on code.google.com so use svn to fetch:

svn checkout http://tichy.googlecode.com/svn/trunk/ tichy-read-only

[edit] Dependencies

You need python 2.5 and some libraries installed :

  • python-pygame
  • python-dbus
  • python-yaml
  • python-gst
  • python-gobject

[edit] packages

From the google code page, debian and ipkg packages are available.

Personal tools


tichy main window
tichy drawing app
tichy message app
tichy freedesktop app

About

Tichy is a python applets manager for embedded devices.

The goal of the project is to make it easy to write many kind of applications for openmoko using the python language.

Tichy provides the following things :

  • Graphics User Interface widgets
  • Services registering and Requesting (for example an application that want to send a message will request for an application implementing the message sending service)
  • Tasklets system (This allow to write callback blocking application as if they where multi-threads)
  • Abstraction of Item / View (Just explain what you want to show, tichy will generate the widgets)

Authors

  • Guillaume "Charlie" Chereau, main developer
  • Michael "Goodwill" (Did the freedesktop app launcher plugin)

Sources

The sources can be found from svn repository on project.openmoko :

svn checkout svn://svn.projects.openmoko.org/svnroot/tichy

Running on the desktop

Thanks to the service system, that allow to provide several version of the same service, Tichy can run as well on a desktop computer as on the neo.

To run it on the desktop, just download the sources, then go into test, and run

./tichy

Running on neo

You will need to compile some files, see the README for more information on how to do it.

You need python 2.5 and some libraries installed :

  • python-pygame
  • python-dbus
  • python-yaml
  • python-gst
  • python-gobject