#!/usr/bin/env python import sys sys.path.insert(0, '../') # Import all the stuffs we need... import tichy import tichy.gui as gui import tichy.item as item import tichy.item.style from tichy.tasklet import Tasklet, Wait from tichy.application import Application import tichy.plugins as plugins from tichy.gui import Vect, Rect from tichy.service import ActionsViewService class MyActionsViewService(Service): service = 'ActionsView' def set_actor(self2, actor, view): from tichy.gui import ApplicationFrame action_bar = view.parent_as(ApplicationFrame).action_bar action_bar.set_actor(actor, view) if __name__ == '__main__': # First we import all the needed plugins plugins.import_single('plugins/styles/style2') plugins.import_single('plugins/apps/drawing') plugins.import_single('plugins/apps/file_browser') plugins.import_single('plugins/apps/keyboard') drawing = Application.find_by_name('Drawing') # TODO: at least remove the create invocation ! style = item.style.Style.find_by_name("black style").create() # The backend SDL painter painter = gui.SdlPainter((480, 640)) loop = gui.SdlEventsLoop() # Create the screen screen = gui.Screen(loop, painter, style = style) loop.window = screen def on_quit(v): print 'quit' loop.quit() # Start the application, and attach a callback on it drawing(screen).start(on_quit) loop.start()