Ejemplo n.º 1
0
static void
finish_process_key_event_async (GObject *source_object,
                         GAsyncResult *res,
                         gpointer user_data)
{
    IBusInputContext *context = IBUS_INPUT_CONTEXT (source_object);
    GError *error = NULL;
    gboolean result = ibus_input_context_process_key_event_async_finish (context,
                                                                         res,
                                                                         &error);
    g_assert (result || error == NULL);
    g_debug ("ibus_context_process_key_event_async_finish: OK");
    call_next_async_function (context);
}
Ejemplo n.º 2
0
Archivo: main.c Proyecto: Abioy/ibus
static void
_process_key_event_done (GObject      *object,
                         GAsyncResult *res,
                         gpointer      user_data)
{
    IBusInputContext *context = (IBusInputContext *)object;
    IMForwardEventStruct *pfe = (IMForwardEventStruct*) user_data;

    GError *error = NULL;
    gboolean retval = ibus_input_context_process_key_event_async_finish (
            context,
            res,
            &error);

    if (error != NULL) {
        g_warning ("Process Key Event failed: %s.", error->message);
        g_error_free (error);
    }

    if (retval == FALSE) {
        IMForwardEvent (_xims, (XPointer) pfe);
    }
    g_slice_free (IMForwardEventStruct, pfe);
}