int ime_request_surrounding_text(int maxlen_before, int maxlen_after)
{
- if (!g_running) {
- LOGW("IME_ERROR_NOT_RUNNING");
- return IME_ERROR_NOT_RUNNING;
- }
-
if (!g_event_callback.surrounding_text_updated) {
LOGW("IME_ERROR_NO_CALLBACK_FUNCTION");
return IME_ERROR_NO_CALLBACK_FUNCTION;
}
+ if (!g_running) {
+ LOGW("IME_ERROR_NOT_RUNNING");
+ return IME_ERROR_NOT_RUNNING;
+ }
+
g_core.get_surrounding_text(NULL, maxlen_before, maxlen_after);
return IME_ERROR_NONE;
int ime_create_option_window(void)
{
- if (!g_running) {
- LOGW("IME_ERROR_NOT_RUNNING");
- return IME_ERROR_NOT_RUNNING;
- }
-
if (!g_event_callback.option_window_created || !g_event_callback.option_window_destroyed) {
LOGW("ime_create_option_window_cb() and ime_destroy_option_window_cb() callback functions are not set.");
return IME_ERROR_NO_CALLBACK_FUNCTION;
}
+ if (!g_running) {
+ LOGW("IME_ERROR_NOT_RUNNING");
+ return IME_ERROR_NOT_RUNNING;
+ }
+
if (g_core.create_option_window())
return IME_ERROR_NONE;
else {
int ime_destroy_option_window(Evas_Object *window)
{
+ if (!g_event_callback.option_window_created || !g_event_callback.option_window_destroyed) {
+ LOGW("ime_create_option_window_cb() and ime_destroy_option_window_cb() callback functions are not set.");
+ return IME_ERROR_NO_CALLBACK_FUNCTION;
+ }
+
if (!window) {
LOGW("Window pointer is null.");
return IME_ERROR_INVALID_PARAMETER;
return IME_ERROR_NOT_RUNNING;
}
- if (!g_event_callback.option_window_created || !g_event_callback.option_window_destroyed) {
- LOGW("ime_create_option_window_cb() and ime_destroy_option_window_cb() callback functions are not set.");
- return IME_ERROR_NO_CALLBACK_FUNCTION;
- }
-
g_core.destroy_option_window(window);
return IME_ERROR_NONE;