Add rpm build scripts.
[ibus.git] / ibus / application.py
blobd5ef8a220a78aa6e52ebd718db7033bd978adaf7
1 # vim:set noet ts=4:
3 # ibus - The Input Bus
5 # Copyright (c) 2007-2008 Huang Peng <shawn.p.huang@gmail.com>
7 # This library is free software; you can redistribute it and/or
8 # modify it under the terms of the GNU Lesser General Public
9 # License as published by the Free Software Foundation; either
10 # version 2 of the License, or (at your option) any later version.
12 # This library is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU Lesser General Public License for more details.
17 # You should have received a copy of the GNU Lesser General Public
18 # License along with this program; if not, write to the
19 # Free Software Foundation, Inc., 59 Temple Place, Suite 330,
20 # Boston, MA 02111-1307 USA
22 import ibus
23 import dbus
25 class Application:
26 def __init__ (self):
27 self._dbusconn = dbus.connection.Connection (ibus.IBUS_ADDR)
28 self._dbusconn.add_signal_receiver (self._disconnected_cb,
29 "Disconnected",
30 dbus_interface = dbus.LOCAL_IFACE)
32 def _disconnected_cb (self):
33 self.on_disconnected ()
35 def on_disconnected (self):
36 pass
38 def run (self):
39 pass