summaryrefslogtreecommitdiff
path: root/gtk/gtkimcontextsimple.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2018-02-19 18:29:00 -0500
committerMatthias Clasen <mclasen@redhat.com>2018-02-24 21:34:40 -0500
commit29bcc38ae62e73b76f0f663e2ecc5e85bfe4ca46 (patch)
treecff130d8b76d27418228ece1187d98d79133e7c6 /gtk/gtkimcontextsimple.c
parente6bf832514c04a224c799413bdac7489c7fe9186 (diff)
downloadgtk+-29bcc38ae62e73b76f0f663e2ecc5e85bfe4ca46.tar.gz
Convert immodules to use an extension point
Add an extension point called gtk-im-module, which requires the type GtkIMContext. Simplify the loading by using GIO infrastructure. Drop the locale filtering for now, I don't think it is really necessary nowadays. Convert existing platform modules to gio modules. Sill to do: Drop the conditional build machinery. Either always include them, or never.
Diffstat (limited to 'gtk/gtkimcontextsimple.c')
-rw-r--r--gtk/gtkimcontextsimple.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gtk/gtkimcontextsimple.c b/gtk/gtkimcontextsimple.c
index bd85315c18..38ec5f24c2 100644
--- a/gtk/gtkimcontextsimple.c
+++ b/gtk/gtkimcontextsimple.c
@@ -40,6 +40,7 @@
#include "gtkdebug.h"
#include "gtkintl.h"
#include "gtkcomposetable.h"
+#include "gtkimmodule.h"
#include "gtkimcontextsimpleprivate.h"
#include "gtkimcontextsimpleseqs.h"
@@ -164,7 +165,12 @@ static void gtk_im_context_simple_get_preedit_string (GtkIMContext
static void gtk_im_context_simple_set_client_widget (GtkIMContext *context,
GtkWidget *widget);
-G_DEFINE_TYPE_WITH_PRIVATE (GtkIMContextSimple, gtk_im_context_simple, GTK_TYPE_IM_CONTEXT)
+G_DEFINE_TYPE_WITH_CODE (GtkIMContextSimple, gtk_im_context_simple, GTK_TYPE_IM_CONTEXT,
+ G_ADD_PRIVATE (GtkIMContextSimple)
+ g_io_extension_point_implement (GTK_IM_MODULE_EXTENSION_POINT_NAME,
+ g_define_type_id,
+ "gtk-im-context-simple",
+ 10))
static void
gtk_im_context_simple_class_init (GtkIMContextSimpleClass *class)