diff --git a/ibus/interface/ienginefactory.py b/ibus/interface/ienginefactory.py new file mode 100644 index 00000000..a89a8c61 --- /dev/null +++ b/ibus/interface/ienginefactory.py @@ -0,0 +1,32 @@ +import dbus.service +from ibus.common import \ + IBUS_ENGINE_FACTORY_IFACE + +class IEngineFactory (dbus.service.Object): + # define method decorator. + method = lambda **args: \ + dbus.service.method (dbus_interface = IBUS_ENGINE_FACTORY_IFACE, \ + **args) + + # define async method decorator. + async_method = lambda **args: \ + dbus.service.method (dbus_interface = IBUS_ENGINE_FACTORY_IFACE, \ + async_callbacks = ("reply_cb", "error_cb"), \ + **args) + # Return a array. [name, language, icon_path, authors, credits] + @method (out_signature = "as") + def GetInfo (self): pass + + # Factory should allocate all resources in this method + @method () + def Initialize (self): pass + + # Factory should free all allocated resources in this method + @method () + def Uninitialize (self): pass + + # Create an input context and return the id of the context. + # If failed, it will return "" or None. + @method (out_signature = "o") + def CreateEngine (self): pass + diff --git a/ibus/panel.py b/ibus/panel.py new file mode 100644 index 00000000..0a31a7eb --- /dev/null +++ b/ibus/panel.py @@ -0,0 +1,12 @@ +class PanelItem: + pass + +class PanelButton (PanelItem): + pass + +class PanelToggleButton (PanelButton): + pass + +class PanelMenu (PanelItem): + pass +