static engine_loader_dbus_info_s *dbus_info = NULL;
static ISELanguageManager _language_manager;
static bool _engine_loader_event_done = false;
+static bool _will_terminate = false;
static void _server_appeared_cb(GDBusConnection *connection, const gchar *name, const gchar *name_owner, gpointer user_data)
{
if (!dbus_info || !_send_sync_message(dbus_info->gdbus_connection, g_variant_new("()"), &reply, "flush_imengine"))
LOGE("Failed to flush imengine");
- double start_time = ecore_time_get();
- while (!_engine_loader_event_done && (ecore_time_get() - start_time < WAIT_FOR_SYNC_RESPONSE_TIMEOUT))
- ecore_main_loop_iterate();
+ if (!_will_terminate)
+ {
+ double start_time = ecore_time_get();
+ while (!_engine_loader_event_done && (ecore_time_get() - start_time < WAIT_FOR_SYNC_RESPONSE_TIMEOUT))
+ ecore_main_loop_iterate();
+ }
}
void engine_loader_reset_imengine()
if (!dbus_info || !_send_sync_message(dbus_info->gdbus_connection, g_variant_new("()"), &reply, "reset_imengine"))
LOGE("Failed to reset imengine");
- double start_time = ecore_time_get();
- while (!_engine_loader_event_done && (ecore_time_get() - start_time < WAIT_FOR_SYNC_RESPONSE_TIMEOUT))
- ecore_main_loop_iterate();
+ if (!_will_terminate)
+ {
+ double start_time = ecore_time_get();
+ while (!_engine_loader_event_done && (ecore_time_get() - start_time < WAIT_FOR_SYNC_RESPONSE_TIMEOUT))
+ ecore_main_loop_iterate();
+ }
}
void engine_loader_send_imengine_event(int command, uint32_t value)
if (!dbus_info || !_send_async_message(dbus_info->gdbus_connection, g_variant_new("(u)", index), "long_press_candidate_item"))
LOGE("Failed to send long pressed item");
}
+
+void engine_loader_terminate_ise()
+{
+ _will_terminate = true;
+}