Debian Codegraph @

client/gtk2/ibusimcontext.h

raw
1 /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
2 /* vim:set et ts=4: */
3 /* ibus - The Input Bus
4 * Copyright (C) 2008-2010 Peng Huang <[email protected]>
5 * Copyright (C) 2008-2010 Red Hat, Inc.
6 *
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.1 of the License, or (at your option) any later version.
11 *
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 GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
20 * USA
21 */
22 #ifndef __IBUS_IM_CONTEXT_H_
23 #define __IBUS_IM_CONTEXT_H_
24
25 #include <gtk/gtk.h>
26
27 /*
28 * Type macros.
29 */
30 #define IBUS_TYPE_IM_CONTEXT \
31 (ibus_im_context_get_type ())
32 #define IBUS_IM_CONTEXT(obj) \
33 (G_TYPE_CHECK_INSTANCE_CAST ((obj), IBUS_TYPE_IM_CONTEXT, IBusIMContext))
34 #define IBUS_IM_CONTEXT_CLASS(klass) \
35 (G_TYPE_CHECK_CLASS_CAST ((klass), IBUS_TYPE_IM_CONTEXT, IBusIMContextClass))
36 #define IBUS_IS_IM_CONTEXT(obj) \
37 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IBUS_TYPE_IM_CONTEXT))
38 #define IBUS_IS_IM_CONTEXT_CLASS(klass) \
39 (G_TYPE_CHECK_CLASS_TYPE ((klass), IBUS_TYPE_IM_CONTEXT))
40 #define IBUS_IM_CONTEXT_GET_CLASS(obj) \
41 (G_TYPE_CHECK_GET_CLASS ((obj), IBUS_TYPE_IM_CONTEXT, IBusIMContextClass))
42
43 G_BEGIN_DECLS
44 typedef struct _IBusIMContext IBusIMContext;
45 typedef struct _IBusIMContextClass IBusIMContextClass;
46 typedef struct _IBusIMContextPrivate IBusIMContextPrivate;
47
48
49 GType ibus_im_context_get_type (void);
50 IBusIMContext
51 *ibus_im_context_new (void);
52 void ibus_im_context_register_type
53 (GTypeModule *type_module);
54 void ibus_im_context_shutdown
55 (void);
56 const gchar
57 *ibus_im_context_get_ic (IBusIMContext *context);
58 void ibus_im_context_set_ic (IBusIMContext *context,
59 const gchar *ic);
60 void ibus_im_context_enable (IBusIMContext *context);
61 void ibus_im_context_disable (IBusIMContext *context);
62 void ibus_im_context_commit_string
63 (IBusIMContext *context,
64 const gchar *string);
65 void ibus_im_context_update_preedit
66 (IBusIMContext *context,
67 const gchar *string,
68 PangoAttrList *attrs,
69 gint cursor_pos,
70 gboolean visible);
71 void ibus_im_context_show_preedit
72 (IBusIMContext *context);
73 void ibus_im_context_hide_preedit
74 (IBusIMContext *context);
75 G_END_DECLS
76 #endif
77