|
Packit |
3ff832 |
# vim:set et sts=4 sw=4:
|
|
Packit |
3ff832 |
#
|
|
Packit |
3ff832 |
# ibus - The Input Bus
|
|
Packit |
3ff832 |
#
|
|
Packit |
3ff832 |
# Copyright (c) 2007-2010 Peng Huang <shawn.p.huang@gmail.com>
|
|
Packit |
3ff832 |
# Copyright (c) 2007-2010 Red Hat, Inc.
|
|
Packit |
3ff832 |
#
|
|
Packit |
3ff832 |
# This library is free software; you can redistribute it and/or
|
|
Packit |
3ff832 |
# modify it under the terms of the GNU Lesser General Public
|
|
Packit |
3ff832 |
# License as published by the Free Software Foundation; either
|
|
Packit |
3ff832 |
# version 2.1 of the License, or (at your option) any later version.
|
|
Packit |
3ff832 |
#
|
|
Packit |
3ff832 |
# This library is distributed in the hope that it will be useful,
|
|
Packit |
3ff832 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
3ff832 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
3ff832 |
# Lesser General Public License for more details.
|
|
Packit |
3ff832 |
#
|
|
Packit |
3ff832 |
# You should have received a copy of the GNU Lesser General Public
|
|
Packit |
3ff832 |
# License along with this library; if not, write to the Free Software
|
|
Packit |
3ff832 |
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
|
|
Packit |
3ff832 |
# USA
|
|
Packit |
3ff832 |
|
|
Packit |
3ff832 |
__all__ = ("IInputContext", )
|
|
Packit |
3ff832 |
|
|
Packit |
3ff832 |
import dbus.service
|
|
Packit |
3ff832 |
from ibus.common import \
|
|
Packit |
3ff832 |
IBUS_IFACE_INPUT_CONTEXT
|
|
Packit |
3ff832 |
|
|
Packit |
3ff832 |
class IInputContext(dbus.service.Object):
|
|
Packit |
3ff832 |
# define method decorator.
|
|
Packit |
3ff832 |
method = lambda **args: \
|
|
Packit |
3ff832 |
dbus.service.method(dbus_interface=IBUS_IFACE_INPUT_CONTEXT, \
|
|
Packit |
3ff832 |
**args)
|
|
Packit |
3ff832 |
|
|
Packit |
3ff832 |
# define async method decorator.
|
|
Packit |
3ff832 |
async_method = lambda **args: \
|
|
Packit |
3ff832 |
dbus.service.method(dbus_interface=IBUS_IFACE_INPUT_CONTEXT, \
|
|
Packit |
3ff832 |
async_callbacks=("reply_cb", "error_cb"), \
|
|
Packit |
3ff832 |
**args)
|
|
Packit |
3ff832 |
|
|
Packit |
3ff832 |
# define signal decorator.
|
|
Packit |
3ff832 |
signal = lambda **args: \
|
|
Packit |
3ff832 |
dbus.service.signal(dbus_interface=IBUS_IFACE_INPUT_CONTEXT, \
|
|
Packit |
3ff832 |
**args)
|
|
Packit |
3ff832 |
|
|
Packit |
3ff832 |
@async_method(in_signature="uuu", out_signature="b")
|
|
Packit |
3ff832 |
def ProcessKeyEvent(self, keyval, keycode, state, reply_cb, error_cb): pass
|
|
Packit |
3ff832 |
|
|
Packit |
3ff832 |
@method(in_signature="iiii")
|
|
Packit |
3ff832 |
def SetCursorLocation(self, x, y, w, h): pass
|
|
Packit |
3ff832 |
|
|
Packit |
3ff832 |
@method(in_signature="vuu")
|
|
Packit |
3ff832 |
def SetSurroundingText(self, text, cursor_index, anchor_pos): pass
|
|
Packit |
3ff832 |
|
|
Packit |
3ff832 |
@method()
|
|
Packit |
3ff832 |
def FocusIn(self): pass
|
|
Packit |
3ff832 |
|
|
Packit |
3ff832 |
@method()
|
|
Packit |
3ff832 |
def FocusOut(self): pass
|
|
Packit |
3ff832 |
|
|
Packit |
3ff832 |
@method()
|
|
Packit |
3ff832 |
def Reset(self): pass
|
|
Packit |
3ff832 |
|
|
Packit |
3ff832 |
@method(in_signature="u")
|
|
Packit |
3ff832 |
def SetCapabilities(self, caps): pass
|
|
Packit |
3ff832 |
|
|
Packit |
3ff832 |
@method(out_signature="v")
|
|
Packit |
3ff832 |
def GetEngine(self): pass
|
|
Packit |
3ff832 |
|
|
Packit |
3ff832 |
@method(in_signature="s")
|
|
Packit |
3ff832 |
def SetEngine(self, engine_name): pass
|
|
Packit |
3ff832 |
|
|
Packit |
3ff832 |
@method()
|
|
Packit |
3ff832 |
def Destroy(self): pass
|
|
Packit |
3ff832 |
|
|
Packit |
3ff832 |
#sigals
|
|
Packit |
3ff832 |
@signal(signature="v")
|
|
Packit |
3ff832 |
def CommitText(self, text): pass
|
|
Packit |
3ff832 |
|
|
Packit |
3ff832 |
@signal(signature="uuu")
|
|
Packit |
3ff832 |
def ForwardKeyEvent(self, keyval, keycode, state): pass
|
|
Packit |
3ff832 |
|
|
Packit |
3ff832 |
@signal(signature="iu")
|
|
Packit |
3ff832 |
def DeleteSurroundingText(self, offset_from_cursor, nchars): pass
|
|
Packit |
3ff832 |
|
|
Packit |
3ff832 |
@signal(signature="vub")
|
|
Packit |
3ff832 |
def UpdatePreeditText(self, text, cursor_pos, visible): pass
|
|
Packit |
3ff832 |
|
|
Packit |
3ff832 |
@signal()
|
|
Packit |
3ff832 |
def ShowPreeditText(self): pass
|
|
Packit |
3ff832 |
|
|
Packit |
3ff832 |
@signal()
|
|
Packit |
3ff832 |
def HidePreeditText(self): pass
|
|
Packit |
3ff832 |
|
|
Packit |
3ff832 |
@signal(signature="vb")
|
|
Packit |
3ff832 |
def UpdateAuxiliaryText(self, text, visible): pass
|
|
Packit |
3ff832 |
|
|
Packit |
3ff832 |
@signal()
|
|
Packit |
3ff832 |
def ShowAuxiliaryText(self): pass
|
|
Packit |
3ff832 |
|
|
Packit |
3ff832 |
@signal()
|
|
Packit |
3ff832 |
def HideAuxiliaryText(self): pass
|
|
Packit |
3ff832 |
|
|
Packit |
3ff832 |
@signal(signature="vb")
|
|
Packit |
3ff832 |
def UpdateLookupTable(self, lookup_table, visible): pass
|
|
Packit |
3ff832 |
|
|
Packit |
3ff832 |
@signal()
|
|
Packit |
3ff832 |
def ShowLookupTable(self): pass
|
|
Packit |
3ff832 |
|
|
Packit |
3ff832 |
@signal()
|
|
Packit |
3ff832 |
def HideLookupTable(self): pass
|
|
Packit |
3ff832 |
|
|
Packit |
3ff832 |
@signal()
|
|
Packit |
3ff832 |
def PageUpLookupTable(self): pass
|
|
Packit |
3ff832 |
|
|
Packit |
3ff832 |
@signal()
|
|
Packit |
3ff832 |
def PageDownLookupTable(self): pass
|
|
Packit |
3ff832 |
|
|
Packit |
3ff832 |
@signal()
|
|
Packit |
3ff832 |
def CursorUpLookupTable(self): pass
|
|
Packit |
3ff832 |
|
|
Packit |
3ff832 |
@signal()
|
|
Packit |
3ff832 |
def CursorDownLookupTable(self): pass
|
|
Packit |
3ff832 |
|
|
Packit |
3ff832 |
@signal(signature="v")
|
|
Packit |
3ff832 |
def RegisterProperties(self, props): pass
|
|
Packit |
3ff832 |
|
|
Packit |
3ff832 |
@signal(signature="v")
|
|
Packit |
3ff832 |
def UpdateProperty(self, prop): pass
|