static void hanja_key_list_append_from_string(HanjaKeyList *list, const char* str) { guint keyval = 0; guint modifiers = 0; gboolean res; res = ibus_key_event_from_string(str, &keyval, &modifiers); if (res) { hanja_key_list_append(list, keyval, modifiers); } }
gboolean ibus_hotkey_profile_add_hotkey_from_string (IBusHotkeyProfile *profile, const gchar *str, GQuark event) { guint keyval; guint modifiers; if (ibus_key_event_from_string (str, &keyval, &modifiers) == FALSE) { return FALSE; } return ibus_hotkey_profile_add_hotkey (profile, keyval, modifiers, event); }