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 __all__
= ("IPanel", )
25 from ibus
.common
import \
28 class IPanel (dbus
.service
.Object
):
29 # define method decorator.
30 method
= lambda **args
: \
31 dbus
.service
.method (dbus_interface
= IBUS_PANEL_IFACE
, \
34 # define signal decorator.
35 signal
= lambda **args
: \
36 dbus
.service
.signal (dbus_interface
= IBUS_PANEL_IFACE
, \
39 # define async method decorator.
40 async_method
= lambda **args
: \
41 dbus
.service
.method (dbus_interface
= IBUS_PANE_IFACE
, \
42 async_callbacks
= ("reply_cb", "error_cb"), \
44 @method (in_signature
= "iiii")
45 def SetCursorLocation (self
, x
, y
, w
, h
): pass
47 @method (in_signature
= "svub")
48 def UpdatePreedit (self
, text
, attrs
, cursor_pos
, visible
): pass
50 @method (in_signature
= "svb")
51 def UpdateAuxString (self
, text
, attrs
, visible
): pass
53 @method (in_signature
= "vb")
54 def UpdateLookupTable (self
, lookup_table
, visible
): pass
56 @method (in_signature
= "v")
57 def RegisterProperties (self
, props
): pass
59 @method (in_signature
= "v")
60 def UpdateProperty (self
, prop
): pass
63 def ShowLanguageBar (self
): pass
66 def HideLanguageBar (self
): pass
68 @method (in_signature
= "s")
69 def FocusIn (self
, ic
): pass
71 @method (in_signature
= "s")
72 def FocusOut (self
, ic
): pass
75 def StatesChanged (self
): pass
78 def Reset (self
): pass
81 def Destroy (self
): pass
85 def PageUp (self
): pass
88 def PageDown (self
): pass
91 def CursorUp (self
): pass
94 def CursorDown (self
): pass
97 def PropertyActivate (self
, prop_name
, prop_state
): pass
100 def PropertyShow (self
, prop_name
): pass
103 def PropertyHide (self
, prop_name
): pass