diff options
author | Eitan Isaacson <eitan@monotonous.org> | 2011-04-24 16:57:28 -0700 |
---|---|---|
committer | Eitan Isaacson <eitan@monotonous.org> | 2011-05-02 10:21:08 -0700 |
commit | e1ae6ee91507a47cbe2fe537f3107c17390bc0e2 (patch) | |
tree | 04ea360d747c6e489e50c9649fe33cd6723f83a8 /caribou/antler/main.py | |
parent | f195b7aafa878568e7aae8ccc27e3716ae7c21cc (diff) | |
download | caribou-e1ae6ee91507a47cbe2fe537f3107c17390bc0e2.tar.gz |
Major re-work of Python modules:
* Created Antler to use new keyboard model via PyGI
* Rearanged settings to accomodate view/model seperation.
* Created in preferences executable, it will be a standalone
generic caribou settings UI where we will eventually get the important
stuff in GNOME's control panel.
* DBusified the UI.
Diffstat (limited to 'caribou/antler/main.py')
-rw-r--r-- | caribou/antler/main.py | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/caribou/antler/main.py b/caribou/antler/main.py new file mode 100644 index 0000000..ce0eca3 --- /dev/null +++ b/caribou/antler/main.py @@ -0,0 +1,30 @@ +from gi.repository import Caribou +from window import AntlerWindowEntry +from keyboard_view import AntlerKeyboardView +import gobject + +class AntlerKeyboardService(Caribou.KeyboardService): + def __init__(self): + gobject.GObject.__init__(self) + self.register_keyboard("Antler") + self.window = AntlerWindowEntry(AntlerKeyboardView()) + + def run(self): + loop = gobject.MainLoop() + loop.run() + + def do_show(self): + self.window.show_all() + + def do_hide(self): + self.window.hide() + + def do_set_cursor_location (self, x, y, w, h): + self.window.set_cursor_location(x, y, w, h) + + def do_set_entry_location (self, x, y, w, h): + self.window.set_entry_location(x, y, w, h) + +if __name__ == "__main__": + antler_keyboard_service = AntlerKeyboardService() + antler_keyboard_service.run() |