Ardour  9.0-pre0-582-g084a23a80d
gtkimcontext.h
Go to the documentation of this file.
1 /* GTK - The GIMP Toolkit
2  * Copyright (C) 2000 Red Hat Software
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */
19 
20 #ifndef __GTK_IM_CONTEXT_H__
21 #define __GTK_IM_CONTEXT_H__
22 
23 
24 #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
25 #error "Only <gtk/gtk.h> can be included directly."
26 #endif
27 
28 #include <gdk/gdk.h>
29 #include <gtk/gtkobject.h>
30 
31 
32 G_BEGIN_DECLS
33 
34 #define GTK_TYPE_IM_CONTEXT (gtk_im_context_get_type ())
35 #define GTK_IM_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_IM_CONTEXT, GtkIMContext))
36 #define GTK_IM_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_IM_CONTEXT, GtkIMContextClass))
37 #define GTK_IS_IM_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_IM_CONTEXT))
38 #define GTK_IS_IM_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_IM_CONTEXT))
39 #define GTK_IM_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_IM_CONTEXT, GtkIMContextClass))
40 
41 
42 typedef struct _GtkIMContext GtkIMContext;
44 
46 {
47  GObject parent_instance;
48 };
49 
51 {
52  /*< private >*/
53  /* Yes, this should be GObjectClass, be we can't fix it without breaking
54  * binary compatibility - see bug #90935
55  */
57 
58  /*< public >*/
59  /* Signals */
60  void (*preedit_start) (GtkIMContext *context);
61  void (*preedit_end) (GtkIMContext *context);
62  void (*preedit_changed) (GtkIMContext *context);
63  void (*commit) (GtkIMContext *context, const gchar *str);
64  gboolean (*retrieve_surrounding) (GtkIMContext *context);
65  gboolean (*delete_surrounding) (GtkIMContext *context,
66  gint offset,
67  gint n_chars);
68 
69  /* Virtual functions */
70  void (*set_client_window) (GtkIMContext *context,
71  GdkWindow *window);
72  void (*get_preedit_string) (GtkIMContext *context,
73  gchar **str,
74  PangoAttrList **attrs,
75  gint *cursor_pos);
76  gboolean (*filter_keypress) (GtkIMContext *context,
77  GdkEventKey *event);
78  void (*focus_in) (GtkIMContext *context);
79  void (*focus_out) (GtkIMContext *context);
80  void (*reset) (GtkIMContext *context);
81  void (*set_cursor_location) (GtkIMContext *context,
82  GdkRectangle *area);
83  void (*set_use_preedit) (GtkIMContext *context,
84  gboolean use_preedit);
85  void (*set_surrounding) (GtkIMContext *context,
86  const gchar *text,
87  gint len,
88  gint cursor_index);
89  gboolean (*get_surrounding) (GtkIMContext *context,
90  gchar **text,
91  gint *cursor_index);
92  /*< private >*/
93  /* Padding for future expansion */
94  void (*_gtk_reserved1) (void);
95  void (*_gtk_reserved2) (void);
96  void (*_gtk_reserved3) (void);
97  void (*_gtk_reserved4) (void);
98  void (*_gtk_reserved5) (void);
99  void (*_gtk_reserved6) (void);
100 };
101 
102 GType gtk_im_context_get_type (void) G_GNUC_CONST;
103 
105  GdkWindow *window);
107  gchar **str,
108  PangoAttrList **attrs,
109  gint *cursor_pos);
111  GdkEventKey *event);
116  const GdkRectangle *area);
118  gboolean use_preedit);
120  const gchar *text,
121  gint len,
122  gint cursor_index);
124  gchar **text,
125  gint *cursor_index);
127  gint offset,
128  gint n_chars);
129 
130 G_END_DECLS
131 
132 #endif /* __GTK_IM_CONTEXT_H__ */
void gtk_im_context_set_client_window(GtkIMContext *context, GdkWindow *window)
void gtk_im_context_focus_in(GtkIMContext *context)
void gtk_im_context_set_cursor_location(GtkIMContext *context, const GdkRectangle *area)
void gtk_im_context_reset(GtkIMContext *context)
gboolean gtk_im_context_delete_surrounding(GtkIMContext *context, gint offset, gint n_chars)
void gtk_im_context_focus_out(GtkIMContext *context)
void gtk_im_context_get_preedit_string(GtkIMContext *context, gchar **str, PangoAttrList **attrs, gint *cursor_pos)
void gtk_im_context_set_use_preedit(GtkIMContext *context, gboolean use_preedit)
GType gtk_im_context_get_type(void) G_GNUC_CONST
void gtk_im_context_set_surrounding(GtkIMContext *context, const gchar *text, gint len, gint cursor_index)
gboolean gtk_im_context_filter_keypress(GtkIMContext *context, GdkEventKey *event)
gboolean gtk_im_context_get_surrounding(GtkIMContext *context, gchar **text, gint *cursor_index)
void(* set_cursor_location)(GtkIMContext *context, GdkRectangle *area)
Definition: gtkimcontext.h:81
void(* preedit_end)(GtkIMContext *context)
Definition: gtkimcontext.h:61
void(* focus_out)(GtkIMContext *context)
Definition: gtkimcontext.h:79
void(* set_client_window)(GtkIMContext *context, GdkWindow *window)
Definition: gtkimcontext.h:70
gboolean(* get_surrounding)(GtkIMContext *context, gchar **text, gint *cursor_index)
Definition: gtkimcontext.h:89
void(* focus_in)(GtkIMContext *context)
Definition: gtkimcontext.h:78
void(* _gtk_reserved6)(void)
Definition: gtkimcontext.h:99
void(* commit)(GtkIMContext *context, const gchar *str)
Definition: gtkimcontext.h:63
void(* _gtk_reserved3)(void)
Definition: gtkimcontext.h:96
void(* _gtk_reserved2)(void)
Definition: gtkimcontext.h:95
gboolean(* delete_surrounding)(GtkIMContext *context, gint offset, gint n_chars)
Definition: gtkimcontext.h:65
GtkObjectClass parent_class
Definition: gtkimcontext.h:56
void(* reset)(GtkIMContext *context)
Definition: gtkimcontext.h:80
void(* set_use_preedit)(GtkIMContext *context, gboolean use_preedit)
Definition: gtkimcontext.h:83
gboolean(* retrieve_surrounding)(GtkIMContext *context)
Definition: gtkimcontext.h:64
void(* preedit_start)(GtkIMContext *context)
Definition: gtkimcontext.h:60
void(* get_preedit_string)(GtkIMContext *context, gchar **str, PangoAttrList **attrs, gint *cursor_pos)
Definition: gtkimcontext.h:72
void(* _gtk_reserved5)(void)
Definition: gtkimcontext.h:98
gboolean(* filter_keypress)(GtkIMContext *context, GdkEventKey *event)
Definition: gtkimcontext.h:76
void(* _gtk_reserved4)(void)
Definition: gtkimcontext.h:97
void(* preedit_changed)(GtkIMContext *context)
Definition: gtkimcontext.h:62
void(* set_surrounding)(GtkIMContext *context, const gchar *text, gint len, gint cursor_index)
Definition: gtkimcontext.h:85
void(* _gtk_reserved1)(void)
Definition: gtkimcontext.h:94
GObject parent_instance
Definition: gtkimcontext.h:47