Add generated script files in .gitignore.
[ibus.git] / gtk2 / ibusimclient.h
blob48489d2697d311297ce71589b2736c0ddfe29d0e
1 /* vim:set et ts=4: */
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_
23 #include <gtk/gtk.h>
26 * Type macros.
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))
43 #if 0
44 #define DEBUG_FUNCTION_IN g_debug("%s IN", __FUNCTION__);
45 #define DEBUG_FUNCTION_OUT g_debug("%s OUT", __FUNCTION__);
46 #else
47 #define DEBUG_FUNCTION_IN
48 #define DEBUG_FUNCTION_OUT
49 #endif
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"
57 G_BEGIN_DECLS
58 typedef struct _IBusIMClient IBusIMClient;
59 typedef struct _IBusIMClientClass IBusIMClientClass;
60 typedef struct _IBusIMClientPrivate IBusIMClientPrivate;
62 struct _IBusIMClient {
63 GtkObject parent;
64 /* instance members */
65 IBusIMClientPrivate *priv;
68 struct _IBusIMClientClass {
69 GtkObjectClass parent;
70 /* class members */
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,
84 GdkEventKey *key);
85 gboolean ibus_im_client_get_preedit_string
86 (IBusIMClient *client,
87 gchar **str,
88 PangoAttrList **attrs,
89 gint *cursor_pos);
90 void ibus_im_client_set_cursor_location
91 (IBusIMClient *client,
92 GdkRectangle *area);
93 gboolean ibus_im_client_is_enabled (IBusIMClient *client);
96 G_END_DECLS
97 #endif