void nimf_libhangul_reset (NimfEngine *engine, NimfServiceIC *target) { g_debug (G_STRLOC ": %s", G_STRFUNC); g_return_if_fail (NIMF_IS_ENGINE (engine)); NimfLibhangul *hangul = NIMF_LIBHANGUL (engine); /* workaround: ignore reset called by commit callback in application */ if (G_UNLIKELY (hangul->ignore_reset_in_commit_cb && hangul->is_committing)) return; nimf_candidatable_hide (hangul->candidatable); const ucschar *flush; flush = hangul_ic_flush (hangul->context); if (flush[0] != 0) { gchar *text = g_ucs4_to_utf8 (flush, -1, NULL, NULL, NULL); nimf_libhangul_emit_commit (engine, target, text); g_free (text); } nimf_libhangul_update_preedit (engine, target, g_strdup ("")); }
static gboolean on_range_change_value (GtkRange *range, GtkScrollType scroll, gdouble value, NimfCandidate *candidate) { g_debug (G_STRLOC ": %s", G_STRFUNC); NimfEngine *engine = nimf_service_ic_get_engine (candidate->target); g_return_val_if_fail (candidate->target && NIMF_IS_ENGINE (engine), FALSE); NimfEngineClass *engine_class; GtkAdjustment *adjustment; gdouble lower, upper; adjustment = gtk_range_get_adjustment (range); lower = gtk_adjustment_get_lower (adjustment); upper = gtk_adjustment_get_upper (adjustment); if (value < lower) value = lower; if (value > upper - 1) value = upper - 1; engine_class = NIMF_ENGINE_GET_CLASS (engine); if (engine_class->candidate_scrolled) engine_class->candidate_scrolled (engine, candidate->target, value); return FALSE; }
static void on_tree_view_row_activated (GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewColumn *column, NimfCandidate *candidate) { g_debug (G_STRLOC ": %s", G_STRFUNC); NimfEngineClass *engine_class; NimfEngine *engine; engine = nimf_service_ic_get_engine (candidate->target); g_return_if_fail (candidate->target && NIMF_IS_ENGINE (engine)); engine_class = NIMF_ENGINE_GET_CLASS (engine); gchar *text; gint *indices = gtk_tree_path_get_indices (path); text = nimf_candidate_get_selected_text (NIMF_CANDIDATABLE (candidate)); if (engine_class->candidate_clicked) engine_class->candidate_clicked (engine, candidate->target, text, indices[0]); g_free (text); }
void nimf_libhangul_focus_in (NimfEngine *engine, NimfServiceIC *target) { g_debug (G_STRLOC ": %s", G_STRFUNC); g_return_if_fail (NIMF_IS_ENGINE (engine)); }
const gchar * nimf_m17n_get_icon_name (NimfEngine *engine) { g_debug (G_STRLOC ": %s", G_STRFUNC); g_return_val_if_fail (NIMF_IS_ENGINE (engine), NULL); return NIMF_M17N (engine)->id; }
const gchar * nimf_system_keyboard_get_icon_name (NimfEngine *engine) { g_debug (G_STRLOC ": %s", G_STRFUNC); g_return_val_if_fail (NIMF_IS_ENGINE (engine), NULL); return NIMF_SYSTEM_KEYBOARD (engine)->id; }
const gchar * nimf_libhangul_get_icon_name (NimfEngine *engine) { g_debug (G_STRLOC ": %s", G_STRFUNC); g_return_val_if_fail (NIMF_IS_ENGINE (engine), NULL); return NIMF_LIBHANGUL (engine)->id; }