2 /* IBus - The Input Bus
3 * Copyright (C) 2008-2009 Huang Peng <shawn.p.huang@gmail.com>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
20 #ifndef __IBUS_IM_CLIENT_H_
21 #define __IBUS_IM_CLIENT_H_
29 /* define GOBJECT macros */
30 #define IBUS_TYPE_IM_CLIENT \
31 (ibus_im_client_get_type ())
32 #define IBUS_IM_CLIENT(obj) \
33 (GTK_CHECK_CAST ((obj), IBUS_TYPE_IM_CLIENT, IBusIMClient))
34 #define IBUS_IM_CLIENT_CLASS(klass) \
35 (GTK_CHECK_CLASS_CAST ((klass), IBUS_TYPE_IM_CLIENT, IBusIMClientClass))
36 #define IBUS_IS_IM_CLIENT(obj) \
37 (GTK_CHECK_TYPE ((obj), IBUS_TYPE_IM_CLIENT))
38 #define IBUS_IS_IM_CLIENT_CLASS(klass) \
39 (GTK_CHECK_CLASS_TYPE ((klass), IBUS_TYPE_IM_CLIENT))
40 #define IBUS_IM_CLIENT_GET_CLASS(obj) \
41 (GTK_CHECK_GET_CLASS ((obj), IBUS_TYPE_IM_CLIENT, IBusIMClientClass))
44 #define DEBUG_FUNCTION_IN g_debug("%s IN", __FUNCTION__);
45 #define DEBUG_FUNCTION_OUT g_debug("%s OUT", __FUNCTION__);
47 #define DEBUG_FUNCTION_IN
48 #define DEBUG_FUNCTION_OUT
53 #define IBUS_DBUS_SERVICE "org.freedesktop.ibus"
54 #define IBUS_DBUS_INTERFACE "org.freedesktop.ibus.Manager"
55 #define IBUS_DBUS_PATH "/org/freedesktop/ibus/Manager"
58 typedef struct _IBusIMClient IBusIMClient
;
59 typedef struct _IBusIMClientClass IBusIMClientClass
;
60 typedef struct _IBusIMClientPrivate IBusIMClientPrivate
;
62 struct _IBusIMClient
{
64 /* instance members */
65 IBusIMClientPrivate
*priv
;
68 struct _IBusIMClientClass
{
69 GtkObjectClass parent
;
73 GType
ibus_im_client_get_type (void);
74 IBusIMClient
*ibus_im_client_get_client (void);
75 void ibus_im_client_register_type (GTypeModule
*type_module
);
76 void ibus_im_client_shutdown (void);
77 void ibus_im_client_focus_in (IBusIMClient
*client
);
78 void ibus_im_client_focus_out (IBusIMClient
*client
);
79 void ibus_im_client_set_im_context (IBusIMClient
*client
,
80 GtkIMContext
*context
);
81 GtkIMContext
*ibus_im_client_get_im_context (IBusIMClient
*client
);
82 void ibus_im_client_reset (IBusIMClient
*client
);
83 gboolean
ibus_im_client_filter_keypress (IBusIMClient
*client
,
85 gboolean ibus_im_client_get_preedit_string
86 (IBusIMClient
*client
,
88 PangoAttrList
**attrs
,
90 void ibus_im_client_set_cursor_location
91 (IBusIMClient
*client
,
93 gboolean
ibus_im_client_is_enabled (IBusIMClient
*client
);