summaryrefslogtreecommitdiff
path: root/gtk/gtkimcontext.c
diff options
context:
space:
mode:
authorMatthias Clasen <matthiasc@src.gnome.org>2006-05-02 23:56:43 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2006-05-02 23:56:43 +0000
commitf26aad1916445d25c99878138dfc384de67a2060 (patch)
treeb72263ecb326e82a49f1e8d1871ec4288b8aa299 /gtk/gtkimcontext.c
parent33cddd12d78abb2efe6facba9c859017f8df9819 (diff)
downloadgtk+-f26aad1916445d25c99878138dfc384de67a2060.tar.gz
Boilerplate reduction
Diffstat (limited to 'gtk/gtkimcontext.c')
-rw-r--r--gtk/gtkimcontext.c32
1 files changed, 1 insertions, 31 deletions
diff --git a/gtk/gtkimcontext.c b/gtk/gtkimcontext.c
index 877fd19fed..f2d88497cc 100644
--- a/gtk/gtkimcontext.c
+++ b/gtk/gtkimcontext.c
@@ -37,9 +37,6 @@ enum {
static guint im_context_signals[LAST_SIGNAL] = { 0 };
-static void gtk_im_context_class_init (GtkIMContextClass *class);
-static void gtk_im_context_init (GtkIMContext *im_context);
-
static void gtk_im_context_real_get_preedit_string (GtkIMContext *context,
gchar **str,
PangoAttrList **attrs,
@@ -54,34 +51,7 @@ static void gtk_im_context_real_set_surrounding (GtkIMContext *context,
gint len,
gint cursor_index);
-GType
-gtk_im_context_get_type (void)
-{
- static GType im_context_type = 0;
-
- if (!im_context_type)
- {
- static const GTypeInfo im_context_info =
- {
- sizeof (GtkIMContextClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) gtk_im_context_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (GtkIMContext),
- 0, /* n_preallocs */
- (GInstanceInitFunc) gtk_im_context_init,
- NULL, /* value_table */
- };
-
- im_context_type =
- g_type_register_static (G_TYPE_OBJECT, I_("GtkIMContext"),
- &im_context_info, G_TYPE_FLAG_ABSTRACT);
- }
-
- return im_context_type;
-}
+G_DEFINE_TYPE (GtkIMContext, gtk_im_context, G_TYPE_OBJECT);
static void
gtk_im_context_class_init (GtkIMContextClass *klass)