Beispiel #1
0
G_MODULE_EXPORT GtkIMContext *
im_module_create (const gchar *context_id)
{
    if (g_strcmp0 (context_id, "ibus") == 0) {
        IBusIMContext *context;
        context = ibus_im_context_new ();
        return (GtkIMContext *) context;
    }
    return NULL;
}
static Ecore_IMF_Context *
im_module_create()
{
    Ecore_IMF_Context *ctx = NULL;
    IBusIMContext *ctxd = NULL;

    ctxd = ibus_im_context_new();
    if (!ctxd)
      {
         return NULL;
      }

    ctx = ecore_imf_context_new(&ibus_imf_class);
    if (!ctx)
      {
         free(ctxd);
         return NULL;
      }

    ecore_imf_context_data_set(ctx, ctxd);

    return ctx;
}