ee = ecore_event_window_match(e->win);
if (!ee) return ECORE_CALLBACK_PASS_ON; /* pass on event */
if (e->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
+ /* some GL drivers are doing buffer copy in a separate thread.
+ * we need to check whether GL driver sends SYNC_DRAW_DONE msg afger copying
+ * that are required in order to exactly render. - added by gl77.lee
+ */
+ if (ee->gl_sync_draw_done < 0)
+ {
+ if (getenv("ECORE_EVAS_GL_SYNC_DRAW_DONE"))
+ ee->gl_sync_draw_done = atoi(getenv("ECORE_EVAS_GL_SYNC_DRAW_DONE"));
+ else
+ ee->gl_sync_draw_done = 0;
+ }
if (first_map_bug < 0)
{
char *bug = NULL;
}
}
+#define _USE_WIN_ROT_EFFECT 1
+
+#if _USE_WIN_ROT_EFFECT
+static void _ecore_evas_x_flush_pre(void *data, Evas *e __UNUSED__, void *event_info __UNUSED__);
+
+typedef struct _Ecore_Evas_X_Rotation_Effect Ecore_Evas_X_Rotation_Effect;
+struct _Ecore_Evas_X_Rotation_Effect
+{
+ Eina_Bool wait_for_comp_reply;
+};
+
+static Ecore_Evas_X_Rotation_Effect _rot_effect =
+{
+ EINA_FALSE
+};
+
+static void
+_ecore_evas_x_rotation_effect_setup(void)
+{
+ _rot_effect.wait_for_comp_reply = EINA_TRUE;
+}
+#endif /* end of _USE_WIN_ROT_EFFECT */
+
static void
_ecore_evas_x_rotation_set(Ecore_Evas *ee, int rotation, int resize)
{
if (ee->rotation == rotation) return;
+ if (!strcmp(ee->driver, "xrender_x11")) return;
+
+#if _USE_WIN_ROT_EFFECT
+ int angles[2];
+ angles[0] = rotation;
+ angles[1] = ee->rotation;
+#endif /* end of _USE_WIN_ROT_EFFECT */
+
if (!strcmp(ee->driver, "opengl_x11"))
{
#ifdef BUILD_ECORE_EVAS_OPENGL_X11
einfo->info.rotation = rotation;
_ecore_evas_x_rotation_set_internal(ee, rotation, resize,
(Evas_Engine_Info *)einfo);
+# if _USE_WIN_ROT_EFFECT
+ ecore_x_window_prop_property_set(ee->prop.window,
+ ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE,
+ ECORE_X_ATOM_CARDINAL, 32, &angles, 2);
+# else
+ ecore_x_window_prop_property_set(ee->prop.window,
+ ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE,
+ ECORE_X_ATOM_CARDINAL, 32, &rotation, 1);
+# endif
#endif /* BUILD_ECORE_EVAS_OPENGL_X11 */
}
else if (!strcmp(ee->driver, "software_x11"))
einfo->info.rotation = rotation;
_ecore_evas_x_rotation_set_internal(ee, rotation, resize,
(Evas_Engine_Info *)einfo);
+# if _USE_WIN_ROT_EFFECT
+ ecore_x_window_prop_property_set(ee->prop.window,
+ ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE,
+ ECORE_X_ATOM_CARDINAL, 32, &angles, 2);
+# else
+ ecore_x_window_prop_property_set(ee->prop.window,
+ ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE,
+ ECORE_X_ATOM_CARDINAL, 32, &rotation, 1);
+# endif
#endif /* BUILD_ECORE_EVAS_SOFTWARE_X11 */
}
else if (!strcmp(ee->driver, "software_16_x11"))
einfo->info.rotation = rotation;
_ecore_evas_x_rotation_set_internal(ee, rotation, resize,
(Evas_Engine_Info *)einfo);
+# if _USE_WIN_ROT_EFFECT
+ ecore_x_window_prop_property_set(ee->prop.window,
+ ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE,
+ ECORE_X_ATOM_CARDINAL, 32, &angles, 2);
+# else
+ ecore_x_window_prop_property_set(ee->prop.window,
+ ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE,
+ ECORE_X_ATOM_CARDINAL, 32, &rotation, 1);
+# endif
#endif /* BUILD_ECORE_EVAS_SOFTWARE_16_X11 */
}
else if (!strcmp(ee->driver, "software_8_x11"))
einfo->info.rotation = rotation;
_ecore_evas_x_rotation_set_internal(ee, rotation, resize,
(Evas_Engine_Info *)einfo);
+# if _USE_WIN_ROT_EFFECT
+ ecore_x_window_prop_property_set(ee->prop.window,
+ ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE,
+ ECORE_X_ATOM_CARDINAL, 32, &angles, 2);
+# else
+ ecore_x_window_prop_property_set(ee->prop.window,
+ ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE,
+ ECORE_X_ATOM_CARDINAL, 32, &rotation, 1);
+# endif
#endif /* BUILD_ECORE_EVAS_SOFTWARE_8_X11 */
}
+
+#if _USE_WIN_ROT_EFFECT
+ _ecore_evas_x_rotation_effect_setup();
+ _ecore_evas_x_flush_pre(ee, NULL, NULL);
+#endif /* end of _USE_WIN_ROT_EFFECT */
}
static void
{
Ecore_Evas *ee = data;
- if ((!ee->no_comp_sync) && (_ecore_evas_app_comp_sync))
+ if ((!ee->no_comp_sync) && (_ecore_evas_app_comp_sync) &&
+ (!ee->gl_sync_draw_done)) // added by gl77.lee
{
if (ee->engine.x.sync_counter)
{
ECORE_MAGIC_SET(ee, ECORE_MAGIC_EVAS);
+ ee->gl_sync_draw_done = -1; // added by gl77.lee
+
_ecore_evas_x_init();
ee->engine.func = (Ecore_Evas_Engine_Func *)&_ecore_x_engine_func;
ee->driver = "opengl_x11";
- ee->semi_sync = 1; // gl engine doesn't need to sync - its whole swaps
+ ee->semi_sync = 0; // gl engine doesn't need to sync - its whole swaps
// ee->no_comp_sync = 1; // gl engine doesn't need to sync - its whole swaps
if (disp_name) ee->name = strdup(disp_name);
(ee, ee->engine.x.win_root, x, y, w, h, 0, 0, opt);
if (!ee->prop.window)
{
+ ERR("evas_engine_info_set() init engine '%s' failed.", ee->driver);
ecore_evas_free(ee);
return NULL;
}
return NULL;
}
}
+ else
+ {
+ ERR("evas_engine_info_set() init engine '%s' failed.", ee->driver);
+ ecore_evas_free(ee);
+ return NULL;
+ }
ecore_x_icccm_hints_set(ee->prop.window,
1 /* accepts_focus */,
return NULL;
}
}
+ else
+ {
+ ERR("evas_engine_info_set() init engine '%s' failed.", ee->driver);
+ ecore_evas_free(ee);
+ return NULL;
+ }
ecore_x_icccm_hints_set(ee->prop.window,
1 /* accepts_focus */,
EAPI void
ecore_imf_context_del(Ecore_IMF_Context *ctx)
{
+ void *data;
+
if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
{
ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
}
if (ctx->klass->del) ctx->klass->del(ctx);
ECORE_MAGIC_SET(ctx, ECORE_MAGIC_NONE);
+
+ EINA_LIST_FREE(ctx->private_key_list, data)
+ free(data);
+
+ EINA_LIST_FREE(ctx->disabled_key_list, data)
+ free(data);
+
+ ctx->private_key_list = NULL;
+ ctx->disabled_key_list = NULL;
+
free(ctx);
}
* @param w cursor width.
* @param h cursor height.
* @ingroup Ecore_IMF_Context_Group
+ * @since 1.1.0
*/
EAPI void
ecore_imf_context_cursor_location_set(Ecore_IMF_Context *ctx, int x, int y, int w, int h)
ctx->data = NULL;
ctx->retrieve_surrounding_func = NULL;
ctx->retrieve_surrounding_data = NULL;
+ ctx->input_panel_x = 0;
+ ctx->input_panel_y = 0;
+ ctx->input_panel_layout = ECORE_IMF_INPUT_PANEL_LAYOUT_NORMAL;
+ ctx->input_panel_orient = ECORE_IMF_INPUT_PANEL_ORIENT_NONE;
+ ctx->use_effect = EINA_TRUE;
+ ctx->callbacks = NULL;
+
return ctx;
}
return ctx->input_panel_enabled;
}
+/**
+ * Set the specific data to pass to the input panel.
+ * this API is used by applications to deliver specific data to the input panel.
+ * the data format MUST be negotiated by both application and the input panel.
+ *
+ * @param ctx An #Ecore_IMF_Context.
+ * @param data The specific data to be set to the input panel.
+ * @param len the length of data
+ * @ingroup Ecore_IMF_Context_IMControl_Group
+ * @since 1.1.0
+ */
+EAPI void
+ecore_imf_context_input_panel_imdata_set (Ecore_IMF_Context *ctx, const char *data, int len)
+{
+ if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
+ {
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+ "ecore_imf_context_input_panel_imdata_set");
+ return;
+ }
+
+ if ((!data) || (len <=0)) return;
+
+ if (ctx->klass->input_panel_imdata_set)
+ ctx->klass->input_panel_imdata_set(ctx, data, len);
+}
+
+/**
+ * Get the specific data of the current active input panel.
+ *
+ * @param ctx An #Ecore_IMF_Context.
+ * @param data The specific data to be got from the input panel
+ * @param len The length of data
+ * @ingroup Ecore_IMF_Context_IMControl_Group
+ * @since 1.1.0
+ */
+EAPI void
+ecore_imf_context_input_panel_imdata_get (Ecore_IMF_Context *ctx, char *data, int *len)
+{
+ if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
+ {
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+ "ecore_imf_context_input_panel_imdata_get");
+ return;
+ }
+
+ if (!data) return;
+
+ if (ctx->klass->input_panel_imdata_get)
+ ctx->klass->input_panel_imdata_get(ctx, data, len);
+}
+
+/**
+ * Get ISE Language of given ISE. -- Not supported for now --
+ * @ingroup Ecore_IMF_Context_IMControl_Group
+ */
+EAPI int
+ecore_imf_context_ise_get_ise_language (Ecore_IMF_Context *ctx, const char* ise_name, char ***langlist)
+{
+ if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
+ {
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+ "ecore_imf_context_ise_get_ise_language");
+ return -1;
+ }
+
+ if (!ise_name) return -1;
+
+ if (ctx->klass->ise_get_ise_language)
+ return ctx->klass->ise_get_ise_language(ctx, ise_name, langlist);
+ else
+ return -1;
+}
+
+/**
+ * Set keyboard language.
+ *
+ * @param ctx An #Ecore_IMF_Context.
+ * @param lang see Ecore_IMF_Input_Panel_Lang
+ * @ingroup Ecore_IMF_Context_IMControl_Group
+ * THIS API IS NOT SUPPORTED NOW
+ * @since 1.1.0
+ */
+EAPI void
+ecore_imf_context_keyboard_language_set (Ecore_IMF_Context *ctx, Ecore_IMF_Keyboard_Lang lang)
+{
+ if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
+ {
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+ "ecore_imf_context_keyboard_language_set");
+ return;
+ }
+// if (ctx->klass->ise_set_language) ctx->klass->ise_set_language(ctx, lang);
+}
+
+/**
+ * Get keyboard language.
+ *
+ * @param ctx An #Ecore_IMF_Context.
+ * @return Ecore_IMF_Input_Panel_Lang
+ * @ingroup Ecore_IMF_Context_IMControl_Group
+ * THIS API IS NOT SUPPORTED NOW
+ * @since 1.1.0
+ */
+EAPI Ecore_IMF_Keyboard_Lang
+ecore_imf_context_keyboard_language_get (Ecore_IMF_Context *ctx)
+{
+ Ecore_IMF_Keyboard_Lang lang = ECORE_IMF_KEYBOARD_LANG_NATIVE;
+
+ if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
+ {
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+ "ecore_imf_context_keyboard_language_get");
+ return lang;
+ }
+/*
+ if (ctx->klass->input_panel_language_get)
+ lang = ctx->klass->input_panel_language_get(ctx);
+*/
+ return lang;
+}
+
+/**
+ * Set ISF Language. -- Not supported for now --
+ * @ingroup Ecore_IMF_Context_IMControl_Group
+ */
+EAPI void
+ecore_imf_context_ise_set_isf_language (Ecore_IMF_Context *ctx, const char* lang)
+{
+ if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
+ {
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+ "ecore_imf_context_ise_set_isf_language");
+ return;
+ }
+
+ if (!lang) return;
+
+ if (ctx->klass->ise_set_isf_language)
+ ctx->klass->ise_set_isf_language(ctx, lang);
+}
+
+/**
+ * Set whether animation effect of the input panel is shown or not.
+ *
+ * @param ctx An #Ecore_IMF_Context.
+ * @param use_effect whether animation effect is shown or not
+ * @ingroup Ecore_IMF_Context_IMControl_Group
+ * @since 1.1.0
+ */
+EAPI void
+ecore_imf_context_input_panel_use_effect_set (Ecore_IMF_Context *ctx, Eina_Bool use_effect)
+{
+ if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
+ {
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+ "ecore_imf_context_input_panel_use_effect_set");
+ return;
+ }
+
+ if (ctx->klass->input_panel_use_effect_set)
+ ctx->klass->input_panel_use_effect_set(ctx, use_effect);
+
+ ctx->use_effect = use_effect;
+}
+
+/**
+ * Get whether the input panel supports animation effect or not when it is shown or hidden.
+ *
+ * @param ctx An #Ecore_IMF_Context.
+ * @param use_effect whether animation effect is shown or not
+ * @ingroup Ecore_IMF_Context_IMControl_Group
+ * @since 1.1.0
+ */
+EAPI Eina_Bool
+ecore_imf_context_input_panel_use_effect_get (Ecore_IMF_Context *ctx)
+{
+ if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
+ {
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+ "ecore_imf_context_input_panel_use_effect_get");
+ return EINA_TRUE;
+ }
+
+ return ctx->use_effect;
+}
+
+/**
+ * Get the position of the current active input panel.
+ *
+ * @param ctx An #Ecore_IMF_Context.
+ * @param x top-left x co-ordinate of the input panel
+ * @param y top-left y co-ordinate of the input panel
+ * @param w width of the input panel
+ * @param h height of the input panel
+ * @ingroup Ecore_IMF_Context_IMControl_Group
+ * @since 1.1.0
+ */
+EAPI void
+ecore_imf_context_input_panel_geometry_get (Ecore_IMF_Context *ctx, int *x, int *y, int *w, int *h)
+{
+ if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
+ {
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+ "ecore_imf_context_input_panel_geometry_get");
+ return;
+ }
+
+ if (ctx->klass->input_panel_geometry_get)
+ ctx->klass->input_panel_geometry_get(ctx, x, y, w, h);
+}
+
+/**
+ * Set the private key of input panel.
+ * Since the second parameter of this API requires a layout index, so before using this API
+ * application has to set a specific layout and that layout index should
+ * be passed in the 2nd argument of this API.
+ *
+ * @param ctx An #Ecore_IMF_Context.
+ * @param layout_index index of layout page to be set
+ * @param img_path the path of image file to be set
+ * @param key_index index of key to be set
+ * @param label text label to be appeared on private key
+ * @param value value of key, If NULL it will use original value of key
+ * @ingroup Ecore_IMF_Context_IMControl_Group
+ * @since 1.1.0
+ */
+EAPI void
+ecore_imf_context_input_panel_private_key_set (Ecore_IMF_Context *ctx, int layout_index, int key_index, const char *img_path, const char *label, int key_value, const char *key_string)
+{
+ Private_Key_Item *key_item;
+ Eina_List *l;
+ Eina_Bool exist = EINA_FALSE;
+
+ if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
+ {
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+ "ecore_imf_context_input_panel_private_key_set");
+ return;
+ }
+
+ if ((!label) && (!img_path)) return;
+
+ EINA_LIST_FOREACH(ctx->private_key_list, l, key_item)
+ {
+ if (key_item && (key_item->layout_idx == layout_index) &&
+ (key_item->key_idx == key_index))
+ {
+ // if exist in the list
+ exist = EINA_TRUE;
+ if (label)
+ {
+ key_item->type = 0;
+ strcpy(key_item->data, label);
+ }
+ else
+ {
+ key_item->type = 1;
+ strcpy(key_item->data, img_path);
+ }
+ key_item->key_value = key_value;
+ strcpy(key_item->key_string, key_string);
+ }
+ }
+
+ if (!exist)
+ {
+ key_item = calloc(1, sizeof(Private_Key_Item));
+ if (!key_item) return;
+
+ key_item->layout_idx = layout_index;
+ key_item->key_idx = key_index;;
+ if (label)
+ {
+ key_item->type = 0;
+ strcpy(key_item->data, label);
+ }
+ else
+ {
+ key_item->type = 1;
+ strcpy(key_item->data, img_path);
+ }
+ key_item->key_value = key_value;
+
+ if (key_string)
+ strcpy(key_item->key_string, key_string);
+
+ ctx->private_key_list = eina_list_append(ctx->private_key_list, key_item);
+ }
+
+// if (ctx->klass->input_panel_private_key_set) ctx->klass->input_panel_private_key_set(ctx, layout_index, key_index, img_path, label, value);
+}
+
+/**
+ * Get the list of private key.
+ *
+ * @param ctx An #Ecore_IMF_Context.
+ * @return Return the list of private key
+ * @ingroup Ecore_IMF_Context_IMControl_Group
+ * @since 1.1.0
+ */
+EAPI Eina_List *
+ecore_imf_context_input_panel_private_key_list_get (Ecore_IMF_Context *ctx)
+{
+ if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
+ {
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+ "ecore_imf_context_input_panel_private_key_list_get");
+ return NULL;
+ }
+
+ return ctx->private_key_list;
+}
+
+/**
+ * Set the key to be disabled.
+ * Since the second parameter of this API requires a layout index, so before using this API application has to set a specific layout and that layout index
+ * should be passed in the 2nd argument of this API.
+ *
+ * @param ctx An #Ecore_IMF_Context.
+ * @param layout_index index of layout page to be set
+ * @param key_index index of key to be set
+ * @param disabled The state
+ * @ingroup Ecore_IMF_Context_IMControl_Group
+ * @since 1.1.0
+ */
+EAPI void
+ecore_imf_context_input_panel_key_disabled_set (Ecore_IMF_Context *ctx, int layout_index, int key_index, Eina_Bool disabled)
+{
+ Disable_Key_Item *key_item;
+ Eina_List *l;
+ Eina_Bool exist = EINA_FALSE;
+
+ if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
+ {
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+ "ecore_imf_context_input_panel_key_disabled_set");
+ return;
+ }
+
+ EINA_LIST_FOREACH(ctx->disabled_key_list, l, key_item)
+ {
+ if (key_item && (key_item->layout_idx == layout_index) &&
+ (key_item->key_idx == key_index))
+ {
+ key_item->disabled = disabled;
+ exist = EINA_TRUE;
+ }
+ }
+
+ if (!exist)
+ {
+ key_item = calloc(1, sizeof(Disable_Key_Item));
+ if (!key_item) return;
+
+ key_item->layout_idx = layout_index;
+ key_item->key_idx = key_index;;
+ key_item->disabled = disabled;
+
+ ctx->disabled_key_list = eina_list_append(ctx->disabled_key_list, key_item);
+ }
+
+// if (ctx->klass->input_panel_key_disabled_set) ctx->klass->input_panel_key_disabled_set(ctx, layout_index, key_index, disabled);
+}
+
+/**
+ * Get the list of disabled keys.
+ *
+ * @param ctx An #Ecore_IMF_Context.
+ * @return Return the list of private key
+ * @ingroup Ecore_IMF_Context_IMControl_Group
+ * @since 1.1.0
+ */
+EAPI Eina_List *
+ecore_imf_context_input_panel_key_disabled_list_get (Ecore_IMF_Context *ctx)
+{
+ return ctx->disabled_key_list;
+}
+
+/**
+ * Restore all default properties of input panel.
+ *
+ * @param ctx An #Ecore_IMF_Context.
+ * @ingroup Ecore_IMF_Context_IMControl_Group
+ * @since 1.1.0
+ */
+EAPI void
+ecore_imf_context_input_panel_reset (Ecore_IMF_Context *ctx)
+{
+ if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
+ {
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+ "ecore_imf_context_input_panel_reset");
+ return;
+ }
+
+ if (ctx->klass->input_panel_reset) ctx->klass->input_panel_reset(ctx);
+}
+
+/**
+ * Set the screen orientation of input panel
+ * To show the keypad in landscape mode application should first call this API with 2nd parameter as 90 or 270.
+ * After then only application should call @ref ecore_imf_context_input_panel_show.
+ *
+ * @param ctx An #Ecore_IMF_Context.
+ * @param orientation the orientation of input panel
+ * @ingroup Ecore_IMF_Context_IMControl_Group
+ * @since 1.1.0
+ */
+EAPI void
+ecore_imf_context_input_panel_orient_set (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Orient orientation)
+{
+ if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
+ {
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+ "ecore_imf_context_input_panel_orient_set");
+ return;
+ }
+
+ if (ctx->klass->input_panel_orient_set)
+ ctx->klass->input_panel_orient_set(ctx, orientation*90);
+
+ ctx->input_panel_orient = orientation;
+}
+
+/**
+ * Get the screen orientation of input panel.
+ *
+ * @param ctx An #Ecore_IMF_Context.
+ * @return The screen orientation of input panel
+ * @ingroup Ecore_IMF_Context_IMControl_Group
+ * @since 1.1.0
+ */
+EAPI Ecore_IMF_Input_Panel_Orient
+ecore_imf_context_input_panel_orient_get (Ecore_IMF_Context *ctx)
+{
+ if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
+ {
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+ "ecore_imf_context_input_panel_orient_get");
+ return ECORE_IMF_INPUT_PANEL_ORIENT_NONE;
+ }
+
+ return ctx->input_panel_orient;
+}
+
+/**
+ * Get name of current active input panel.
+ *
+ * @param ctx An #Ecore_IMF_Context.
+ * @param name input panel name to be got
+ * @ingroup Ecore_IMF_Context_IMControl_Group
+ */
+EAPI void
+ecore_imf_context_ise_get_active_isename (Ecore_IMF_Context *ctx, char* name)
+{
+ if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
+ {
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+ "ecore_imf_context_ise_get_active_isename");
+ return;
+ }
+
+ if (!name) return;
+
+ if (ctx->klass->ise_get_active_isename)
+ ctx->klass->ise_get_active_isename(ctx, name);
+}
+
+/**
+ * Choose the active input panel by its name.
+ *
+ * @param ctx An #Ecore_IMF_Context.
+ * @param name input panel name to be set
+ * @ingroup Ecore_IMF_Context_IMControl_Group
+ */
+EAPI void
+ecore_imf_context_ise_set_active_ise_by_name (Ecore_IMF_Context *ctx, const char* name)
+{
+ if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
+ {
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+ "ecore_imf_context_ise_set_active_ise_by_name");
+ return;
+ }
+
+ if (!name) return;
+
+ if (ctx->klass->ise_set_active_ise_by_name)
+ ctx->klass->ise_set_active_ise_by_name(ctx, name);
+}
+
+/**
+ * Set input panel by its uuid.
+ *
+ * @param ctx An #Ecore_IMF_Context.
+ * @param uuid input panel uuid to be set
+ * @ingroup Ecore_IMF_Context_IMControl_Group
+ */
+EAPI void
+ecore_imf_context_ise_set_active_ise_by_uuid (Ecore_IMF_Context *ctx, const char* uuid)
+{
+ if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
+ {
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+ "ecore_imf_context_ise_set_active_ise_by_uuid");
+ return;
+ }
+
+ if (!uuid) return;
+
+ if (ctx->klass->ise_set_active_ise_by_uuid)
+ ctx->klass->ise_set_active_ise_by_uuid(ctx, uuid);
+}
+
+/**
+ * Get list of input panels.
+ *
+ * @param ctx An #Ecore_IMF_Context.
+ * @param iselist pointer to the list to be got.
+ * @return int ise counter of iselist
+ * @ingroup Ecore_IMF_Context_IMControl_Group
+ */
+EAPI int
+ecore_imf_context_ise_get_iselist (Ecore_IMF_Context *ctx, char*** iselist)
+{
+ if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
+ {
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+ "ecore_imf_context_ise_get_iselist");
+ return -1;
+ }
+
+ if (ctx->klass->ise_get_iselist)
+ return ctx->klass->ise_get_iselist(ctx, iselist);
+ else
+ return -1;
+}
+
+/**
+ * Get state of current active input panel.
+ *
+ * @param ctx An #Ecore_IMF_Context.
+ * @param The state of input panel.
+ * @ingroup Ecore_IMF_Context_IMControl_Group
+ * @since 1.1.0
+ */
+EAPI Ecore_IMF_Input_Panel_State
+ecore_imf_context_input_panel_state_get (Ecore_IMF_Context *ctx)
+{
+ Ecore_IMF_Input_Panel_State state = ECORE_IMF_INPUT_PANEL_STATE_INVALID;
+ if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
+ {
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+ "ecore_imf_context_input_panel_state_get");
+ return ECORE_IMF_INPUT_PANEL_STATE_INVALID;
+ }
+
+ if (ctx->klass->input_panel_state_get)
+ state = ctx->klass->input_panel_state_get(ctx);
+
+ return state;
+}
+
+/**
+ * Register a callback function which will be called if there is change in input panel state,language,mode etc.
+ * In order to deregister the callback function
+ * Use @ref ecore_imf_context_input_panel_event_callback_del.
+ *
+ * @param ctx An #Ecore_IMF_Context
+ * @param type event type
+ * @param func the callback function
+ * @param data application-input panel specific data.
+ * @ingroup Ecore_IMF_Context_IMControl_Group
+ * @since 1.1.0
+ */
+EAPI void
+ecore_imf_context_input_panel_event_callback_add (Ecore_IMF_Context *ctx,
+ Ecore_IMF_Input_Panel_Event type,
+ void (*func) (void *data, Ecore_IMF_Context *ctx, int value),
+ const void *data)
+{
+ if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
+ {
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+ "ecore_imf_context_input_panel_event_callback_add");
+ return;
+ }
+
+ if (ctx->klass->input_panel_event_callback_add)
+ ctx->klass->input_panel_event_callback_add(ctx, type, func, data);
+}
+
+/**
+ * Unregister a callback function which will be called if there is change in input panel state, language, mode etc.
+ *
+ * @param ctx An #Ecore_IMF_Context.
+ * @param func the callback function
+ * @param data application-input panel specific data.
+ * @ingroup Ecore_IMF_Context_IMControl_Group
+ * @since 1.1.0
+ */
+EAPI void
+ecore_imf_context_input_panel_event_callback_del (Ecore_IMF_Context *ctx,
+ Ecore_IMF_Input_Panel_Event type,
+ void (*func) (void *data, Ecore_IMF_Context *ctx, int value))
+{
+ if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
+ {
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+ "ecore_imf_context_input_panel_event_callback_del");
+ return;
+ }
+
+ if (ctx->klass->input_panel_event_callback_del)
+ ctx->klass->input_panel_event_callback_del(ctx, type, func);
+}
+
+/**
+ * Move the soft keyboard to the new position.
+ *
+ * @param ctx An #Ecore_IMF_Context.
+ * @param x X position to move the input panel to
+ * @param y Y position to move the input panel to
+ * @ingroup Ecore_IMF_Context_IMControl_Group
+ * @since 1.1.0
+ */
+EAPI void
+ecore_imf_context_input_panel_move (Ecore_IMF_Context *ctx, int x, int y)
+{
+ if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
+ {
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+ "ecore_imf_context_input_panel_move");
+ return;
+ }
+
+ if (ctx->klass->input_panel_move) ctx->klass->input_panel_move(ctx, x, y);
+ ctx->input_panel_x = x;
+ ctx->input_panel_y = y;
+}
+
+/**
+ * Set the caps mode of the input panel.
+ *
+ * @param ctx An #Ecore_IMF_Context.
+ * @param mode the caps mode
+ * @ingroup Ecore_IMF_Context_IMControl_Group
+ * @since 1.1.0
+ */
+EAPI void
+ecore_imf_context_input_panel_caps_mode_set (Ecore_IMF_Context *ctx,
+ Ecore_IMF_Input_Panel_Caps_Mode mode)
+{
+ if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
+ {
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+ "ecore_imf_context_input_panel_caps_mode_set");
+ return;
+ }
+
+ if (ctx->klass->input_panel_caps_mode_set)
+ ctx->klass->input_panel_caps_mode_set(ctx, mode);
+}