From bdf4ef6970ec897e9ef9fdf578da1f45dcb65f54 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Tue, 20 Jul 2010 18:19:18 +0900 Subject: [PATCH] Remove deprecated Ecore_IMF APIs --- debian/changelog | 8 + debian/libecore-dev.install | 1 - src/lib/ecore_imf/Ecore_IMF.h | 478 ++++------------------------------ src/lib/ecore_imf/Makefile.am | 3 +- src/lib/ecore_imf/ecore_imf_context.c | 357 ++----------------------- src/lib/ecore_imf/keydefs.h | 150 ----------- 6 files changed, 79 insertions(+), 918 deletions(-) delete mode 100644 src/lib/ecore_imf/keydefs.h diff --git a/debian/changelog b/debian/changelog index 02ae43d..b81ae52 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +ecore (0.9.9.060+svn.49540slp2+3build10) unstable; urgency=low + + * Remove deprecated Ecore_IMF APIs. + * Git: 165.213.180.234:/git/slp/pkgs/ecore + * Tag: ecore_0.9.9.060+svn.49540slp2+3build10 + + -- Jihoon Kim Tue, 20 Jul 2010 18:17:00 +0900 + ecore (0.9.9.060+svn.49540slp2+3build09) unstable; urgency=low * Repackage for beat release. diff --git a/debian/libecore-dev.install b/debian/libecore-dev.install index e864e08..f3ecad6 100755 --- a/debian/libecore-dev.install +++ b/debian/libecore-dev.install @@ -1,5 +1,4 @@ debian/tmp/usr/include/Ecore*.h -debian/tmp/usr/include/keydefs.h debian/tmp/usr/lib/libecore*.a debian/tmp/usr/lib/libecore*.la debian/tmp/usr/lib/libecore*.so diff --git a/src/lib/ecore_imf/Ecore_IMF.h b/src/lib/ecore_imf/Ecore_IMF.h index 8c42f61..d3501e6 100644 --- a/src/lib/ecore_imf/Ecore_IMF.h +++ b/src/lib/ecore_imf/Ecore_IMF.h @@ -6,7 +6,6 @@ #define _ECORE_IMF_H #include -#include #include #ifdef EAPI @@ -55,14 +54,6 @@ extern "C" { #endif - typedef struct - { - int x; /**< x-coordinate of Input panel window from left edge of screen*/ - int y; /**< y-coordinate of Input panel window from top edge of screen*/ - int width; /**< width of Input panel window from x- coordinate*/ - int height; /**< height of Input panel window from y- coordinate*/ - } ISE_RECT; - // will be deleted soon /* ecore_imf_context_ise_state_add_listener() flag */ typedef enum @@ -138,27 +129,6 @@ extern "C" { ISE_MODE_INVALID } ISE_MODE; - // will be deleted soon, Use Ecore_IMF_Input_Panel_Layout instead - typedef enum - { - ISE_LAYOUT_NORMAL, /**< default 4x4 layout */ - ISE_LAYOUT_NUMBER, /**< number layout*/ - ISE_LAYOUT_EMAIL, /**< Email layout*/ - ISE_LAYOUT_URL, /**< URL layout*/ - ISE_LAYOUT_PHONENUMBER, /**< Phone Number layout*/ - ISE_LAYOUT_IP, /**< IP layout */ - ISE_LAYOUT_CUSTOM_1 = 10, /* Reserved for future use */ - ISE_LAYOUT_CUSTOM_2, - ISE_LAYOUT_CUSTOM_3, - ISE_LAYOUT_CUSTOM_4, - ISE_LAYOUT_CUSTOM_5, - ISE_LAYOUT_CUSTOM_6, - ISE_LAYOUT_CUSTOM_7, - ISE_LAYOUT_CUSTOM_8, - ISE_LAYOUT_CUSTOM_9, - ISE_LAYOUT_INVALID - } ISE_LAYOUT; - typedef enum { ECORE_IMF_INPUT_PANEL_LAYOUT_NORMAL, /**< default 4x4 layout */ @@ -180,39 +150,18 @@ extern "C" { ECORE_IMF_INPUT_PANEL_LAYOUT_INVALID } Ecore_IMF_Input_Panel_Layout; - // will be deprecated - typedef enum - { - ISE_LANG_ENGLISH, /**< English */ - ISE_LANG_FRENCH, /**< French */ - ISE_LANG_SPANISH, /**< Spanish */ - ISE_LANG_DUTCH, /**< Dutch */ - ISE_LANG_GERMAN, /**< German */ - ISE_LANG_ITALIAN, /**< Italian */ - ISE_LANG_PORTUGUESE,/**< Portuguese */ - ISE_LANG_TURKISH, /**< Turkish */ - ISE_LANG_KOREAN, /**< Korean */ - ISE_LANG_CHINESE, /**< Chinese */ - ISE_LANG_JAPANESE, /**< Japanese */ - ISE_LANG_HINDI, /**< Hindi */ - ISE_LANG_THAI, /**< Thai */ - ISE_LANG_GREEK, /**< Greek */ - ISE_LANG_INVALID - } ISE_LANG; - typedef enum { - ECORE_IMF_INPUT_PANEL_LANG_AUTOMATIC, /**< Native */ + ECORE_IMF_INPUT_PANEL_LANG_AUTOMATIC, /**< Automatic */ ECORE_IMF_INPUT_PANEL_LANG_ALPHABET, /**< Alphabet */ } Ecore_IMF_Input_Panel_Lang; typedef enum { ECORE_IMF_KEYBOARD_LANG_NATIVE, /**< Native */ - ECORE_IMF_KEYBOARD_LANG_ALPHABET, /**< Alphabet */ + ECORE_IMF_KEYBOARD_LANG_ALPHABET, /**< Alphabet */ } Ecore_IMF_Keyboard_Lang; - typedef enum { ECORE_IMF_AUTOCORRECTION_DEFAULT, @@ -497,17 +446,17 @@ extern "C" { int (*filter_event) (Ecore_IMF_Context *ctx, Ecore_IMF_Event_Type type, Ecore_IMF_Event *event); /* Input Panel Control APIs */ - int (*ise_show) (Ecore_IMF_Context *ctx, Evas_Object *obj, ISE_STATE state); - int (*input_panel_hide) (Ecore_IMF_Context *ctx); - int (*control_panel_show) (Ecore_IMF_Context *ctx); - int (*control_panel_hide) (Ecore_IMF_Context *ctx); + int (*ise_show) (Ecore_IMF_Context *ctx, Evas_Object *obj, ISE_STATE state); + int (*input_panel_hide) (Ecore_IMF_Context *ctx); + int (*control_panel_show) (Ecore_IMF_Context *ctx); + int (*control_panel_hide) (Ecore_IMF_Context *ctx); - int (*ise_mode_set) (Ecore_IMF_Context *ctx, ISE_MODE mode); /* will de deprecated */ - int (*ise_mode_get) (Ecore_IMF_Context *ctx, ISE_MODE *mode); /* will de deprecated */ + int (*ise_mode_set) (Ecore_IMF_Context *ctx, ISE_MODE mode); /* will de deprecated */ + int (*ise_mode_get) (Ecore_IMF_Context *ctx, ISE_MODE *mode); /* will de deprecated */ int (*input_panel_language_set) (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Lang lang); Ecore_IMF_Input_Panel_Lang (*input_panel_language_get) (Ecore_IMF_Context *ctx); - int (*ise_get_ise_language) (Ecore_IMF_Context *ctx, const char* input_panel_name, char*** langlist); - int (*ise_set_isf_language) (Ecore_IMF_Context *ctx, const char* lang); + int (*ise_get_ise_language) (Ecore_IMF_Context *ctx, const char* input_panel_name, char*** langlist); + int (*ise_set_isf_language) (Ecore_IMF_Context *ctx, const char* lang); int (*input_panel_imdata_set) (Ecore_IMF_Context *ctx, const char* data, int len); int (*input_panel_imdata_get) (Ecore_IMF_Context *ctx, char* data, int *len); @@ -540,9 +489,9 @@ extern "C" { void (*input_panel_key_disabled_set) (Ecore_IMF_Context *ctx, int layout_index, int key_index, Eina_Bool disabled); - int (*input_panel_show) (Ecore_IMF_Context *ctx); + int (*input_panel_show) (Ecore_IMF_Context *ctx); - void (*input_panel_use_effect_set) (Ecore_IMF_Context *ctx, Eina_Bool use_effect); + void (*input_panel_use_effect_set) (Ecore_IMF_Context *ctx, Eina_Bool use_effect); void (*input_panel_move) (Ecore_IMF_Context *ctx, int x, int y); @@ -601,60 +550,33 @@ extern "C" { EAPI void ecore_imf_context_delete_surrounding_event_add(Ecore_IMF_Context *ctx, int offset, int n_chars); /** - * @defgroup Ecore_IMF_Context_IMControl_Group Ecore Input Method Context IMControl Functions - * - * Functions that should be used by EFL applications to operate ISF and ISE. - */ - - /** - * Get imf_context to map to real loaded context APIs, e.g. APIs provided by isf context or other context. - * In this case, the return context is used as the 1st input paramete of all IMControl APIs. - * @ingroup Ecore_IMF_Context_IMControl_Group - */ - EINA_DEPRECATED EAPI Ecore_IMF_Context* ecore_get_imf_context(); - - /** * Show the current active ISE with given state. * To use this API applicaiton should include Ecore_IMF.h header file. - * Before calling this API, every application should call ecore_imf_init() to initialize the ecore_imf shared library. * The first parameter i.e Ecore_IMF_Context *ctx is used to map the ecore_imf API into real implemented API which is inside ISF. * @param ctx context used to map real loaded APIs - * @param obj evas object to be operated when ISE shows - * @param state see ISE_STATE * @ingroup Ecore_IMF_Context_IMControl_Group * @code * #include * - * static void create_entry(void *data, Evas_Object *obj, void *event_info) + * static void entry_application(appdata * ad) * { - * ecore_imf_init(); - * Evas_Object *en = obj; + * Evas_Object *en; + * en = elm_entry_add(ad->win_main); * Ecore_IMF_Context *imf_context = elm_entry_imf_context_get(en); * if(imf_context) * { - * //Note: this API MUST be called before calling ecore_imf_context_input_panel_set_** APIs and ecore_imf_context_input_panel_show. - * //show ise window + * // show input panel window * ecore_imf_context_input_panel_show (imf_context); * } - * ecore_imf_shutdown(); - * } - * - * static void entry_application(appdata * ad) - * { - * Evas_Object *en; - * en = elm_entry_add(ad->win_main); - * evas_object_smart_callback_add(en, "clicked", create_entry, ad); * } * * @endcode */ - EINA_DEPRECATED EAPI void ecore_imf_context_ise_show(Ecore_IMF_Context *ctx, Evas_Object *obj, ISE_STATE state); EAPI void ecore_imf_context_input_panel_show(Ecore_IMF_Context *ctx); /** * Hide the current active ISE. * To use this API applicaiton should include Ecore_IMF.h header file. - * Before calling this API, every application should call ecore_imf_init() to initialize the ecore_imf shared library. * The first parameter i.e Ecore_IMF_Context *ctx is used to map the ecore_imf API into real implemented API which is inside ISF. * @param ctx context used to map real loaded APIs * @ingroup Ecore_IMF_Context_IMControl_Group @@ -663,15 +585,12 @@ extern "C" { * * static void button_clicked_cb(void *data, Evas_Object *obj, void *event_info) * { - * ecore_imf_init(); * Ecore_IMF_Context *imf_context = elm_entry_imf_context_get(obj); * * if(imf_context) * { * ecore_imf_context_input_panel_hide (imf_context); * } - * - * ecore_imf_shutdown(); * } * * static void entry_application(appdata * ad) @@ -683,118 +602,62 @@ extern "C" { * * @endcode */ - EINA_DEPRECATED EAPI void ecore_imf_context_ise_hide(Ecore_IMF_Context *ctx); EAPI void ecore_imf_context_input_panel_hide(Ecore_IMF_Context *ctx); /** - * Show ISE control panel. + * Show control panel. * @param ctx context used to map real loaded APIs * @ingroup Ecore_IMF_Context_IMControl_Group * * ISE control panel shows ISE list and provides setup of each ISE * THIS API IS NOT SUPPORTED NOW */ - EINA_DEPRECATED EAPI void ecore_imf_context_ise_control_panel_show (Ecore_IMF_Context *ctx); EAPI void ecore_imf_context_control_panel_show (Ecore_IMF_Context *ctx); /** - * Hide ISE control panel. + * Hide control panel. * @param ctx context used to map real loaded APIs * @ingroup Ecore_IMF_Context_IMControl_Group * * ISE control panel shows ISE list and provides setup of each ISE * THIS API IS NOT SUPPORTED NOW */ - EINA_DEPRECATED EAPI void ecore_imf_context_ise_control_panel_hide (Ecore_IMF_Context *ctx); EAPI void ecore_imf_context_control_panel_hide (Ecore_IMF_Context *ctx); /** - * Set ISE Mode before show ISE. - * To use this API applicaiton should include Ecore_IMF.h header file. - * Before calling this API, every application should call ecore_imf_init() to initialize the ecore_imf shared library. - * The first parameter i.e Ecore_IMF_Context *ctx is used to map the ecore_imf API into real implemented API which is inside ISF. + * Set ISE Language before show ISE. * @param ctx context used to map real loaded APIs - * @param mode see Ecore_IMF_Input_Panel_Mode + * @param lang see Ecore_IMF_Input_Panel_Lang * @ingroup Ecore_IMF_Context_IMControl_Group - * @code - * #include - * - * static void create_entry(struct appdata *ad) - * { - * ecore_imf_init(); - * ISE_MODE mode = ISE_MODE_NUMBER; - * - * Evas_Object *en; - * en = elm_entry_add(ad->layout_main); - * Ecore_IMF_Context *imf_context = elm_entry_imf_context_get(obj); - * - * if (imf_context) - * { - * ecore_imf_context_input_panel_mode_set (imf_context, mode); - * ecore_imf_context_input_panel_show (imf_context); - * } - * - * //do imf related things - * - * ecore_imf_shutdown(); - * - * //do imf irrelated things - * } - * @endcode + * THIS API IS NOT SUPPORTED NOW */ - EINA_DEPRECATED EAPI void ecore_imf_context_ise_set_mode (Ecore_IMF_Context *ctx, ISE_MODE mode); + EAPI void ecore_imf_context_input_panel_language_set (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Lang lang); /** - * Get ISE Mode of current active ISE. - * To use this API applicaiton should include Ecore_IMF.h header file. - * Before calling this API, every application should call ecore_imf_init() to initialize the ecore_imf shared library. - * The first parameter i.e Ecore_IMF_Context *ctx is used to map the ecore_imf API into real implemented API which is inside ISF. + * Get ISE Language of current active ISE. * @param ctx context used to map real loaded APIs - * @param mode see ISE_MODE + * @return Ecore_IMF_Input_Panel_Lang * @ingroup Ecore_IMF_Context_IMControl_Group - * @code - * #include - * - * static void create_entry(struct appdata *ad) - * { - * ecore_imf_init(); - * ISE_MODE mode; - * - * Evas_Object *en; - * en = elm_entry_add(ad->layout_main); - * elm_layout_content_set(ad->layout_main, "entry", en); - * - * Ecore_IMF_Context *imf_context = elm_entry_imf_context_get(en); - * - * if (imf_context) - * { - * //here u can see what the current mode is. - * ecore_imf_context_ise_get_mode (imf_context, &mode); - * } + * THIS API IS NOT SUPPORTED NOW */ - EINA_DEPRECATED EAPI void ecore_imf_context_ise_get_mode (Ecore_IMF_Context *ctx, ISE_MODE *mode); + EAPI Ecore_IMF_Input_Panel_Lang ecore_imf_context_input_panel_language_get (Ecore_IMF_Context *ctx); /** - * Set ISE Language before show ISE. + * Set keyboard language. * @param ctx context used to map real loaded APIs - * @param lang see ISE_LANG + * @param lang see Ecore_IMF_Input_Panel_Lang * @ingroup Ecore_IMF_Context_IMControl_Group * THIS API IS NOT SUPPORTED NOW */ - EINA_DEPRECATED EAPI void ecore_imf_context_ise_set_language (Ecore_IMF_Context *ctx, ISE_LANG lang); - EAPI void ecore_imf_context_input_panel_language_set (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Lang lang); + EAPI void ecore_imf_context_keyboard_language_set (Ecore_IMF_Context *ctx, Ecore_IMF_Keyboard_Lang lang); /** - * Get ISE Language of current active ISE. + * Get keyboard language. * @param ctx context used to map real loaded APIs - * @param lang see ISE_LANG + * @return Ecore_IMF_Input_Panel_Lang * @ingroup Ecore_IMF_Context_IMControl_Group * THIS API IS NOT SUPPORTED NOW - */ - EINA_DEPRECATED EAPI void ecore_imf_context_ise_get_language (Ecore_IMF_Context *ctx, ISE_LANG *lang); - EAPI Ecore_IMF_Input_Panel_Lang ecore_imf_context_input_panel_language_get (Ecore_IMF_Context *ctx); - - EAPI void ecore_imf_context_keyboard_language_set (Ecore_IMF_Context *ctx, Ecore_IMF_Keyboard_Lang lang); + */ EAPI Ecore_IMF_Keyboard_Lang ecore_imf_context_keyboard_language_get (Ecore_IMF_Context *ctx); /** @@ -812,7 +675,6 @@ extern "C" { /** * Set ISE Specific data before show ISE. * To use this API applicaiton should include Ecore_IMF.h header file. - * Before calling this API, every application should call ecore_imf_init() to initialize the ecore_imf shared library. * The first parameter i.e Ecore_IMF_Context *ctx is used to map the ecore_imf API into real implemented API which is inside ISF. * @param ctx context used to map real loaded APIs * @param data data pointer @@ -827,7 +689,6 @@ extern "C" { * * static void create_entry(struct appdata *ad) * { - * ecore_imf_init(); * char *im_data="application sample imdata"; * Evas_Object *en; * @@ -839,24 +700,15 @@ extern "C" { * if (imf_context) * { * ecore_imf_context_input_panel_imdata_set (imf_context, im_data, strlen(im_data)+1); - * ecore_imf_context_input_panel_show (imf_context); * } - * - * //do imf related things - * - * ecore_imf_shutdown(); - * - * //do imf irrelated things * } * @endcode */ - EINA_DEPRECATED EAPI void ecore_imf_context_ise_set_imdata (Ecore_IMF_Context *ctx, const char * data, int len); EAPI void ecore_imf_context_input_panel_imdata_set (Ecore_IMF_Context *ctx, const char * data, int len); /** * Get ISE Specific data of current active ISE. * To use this API applicaiton should include Ecore_IMF.h header file. - * Before calling this API, every application should call ecore_imf_init() to initialize the ecore_imf shared library. * The first parameter i.e Ecore_IMF_Context *ctx is used to map the ecore_imf API into real implemented API which is inside ISF. * @param ctx context used to map real loaded APIs * @param data data pointer @@ -867,7 +719,6 @@ extern "C" { * * static void create_entry(struct appdata *ad) * { - * ecore_imf_init(); * int len = 256; * char *im_data = (char*) malloc (len); * @@ -879,31 +730,14 @@ extern "C" { * } * * free(im_data); - * - * //do imf related things - * - * ecore_imf_shutdown(); - * - * //do imf irrelated things * } * @endcode */ - EINA_DEPRECATED EAPI void ecore_imf_context_ise_get_imdata (Ecore_IMF_Context *ctx, char *data, int *len); EAPI void ecore_imf_context_input_panel_imdata_get (Ecore_IMF_Context *ctx, char *data, int *len); /** - * Set ISE Style before show ISE. -- Not supported for now -- - * @param ctx context used to map real loaded APIs - * @param style see Ecore_IMF_Input_Panel_Style - * @ingroup Ecore_IMF_Context_IMControl_Group - * THIS API IS NOT SUPPORTED NOW - */ - EINA_DEPRECATED EAPI void ecore_imf_context_ise_set_style (Ecore_IMF_Context *ctx, ISE_STYLE style); - - /** * Set ISE whether animation effect is shown or not. * To use this API applicaiton should include Ecore_IMF.h header file. - * Before calling this API, every application should call ecore_imf_init() to initialize the ecore_imf shared library. * The first parameter i.e Ecore_IMF_Context *ctx is used to map the ecore_imf API into real implemented API which is inside ISF. * @param ctx context used to map real loaded APIs * @param use_effect whether animation effect is shown or not @@ -937,25 +771,14 @@ extern "C" { EAPI Eina_Bool ecore_imf_context_input_panel_use_effect_get (Ecore_IMF_Context *ctx); /** - * Get ISE Style of current active ISE. -- Not supported for now -- - * @param ctx context used to map real loaded APIs - * @param style see Ecore_IMF_Input_Panel_Style - * @ingroup Ecore_IMF_Context_IMControl_Group - * THIS API IS NOT SUPPORTED NOW - */ - EINA_DEPRECATED EAPI void ecore_imf_context_ise_get_style (Ecore_IMF_Context *ctx, ISE_STYLE *style); - - /** * Get ISE position of current active ISE. * To use this API applicaiton should include Ecore_IMF.h header file. - * Before calling this API, every application should call ecore_imf_init() to initialize the ecore_imf shared library. * The first parameter i.e Ecore_IMF_Context *ctx is used to map the ecore_imf API into real implemented API which is inside ISF. * @param ctx context used to map real loaded APIs - * @param rect - * int rect.x, top-left x co-ordinate of rectangle; - * int rect.y, top-left y co-ordinate of rectangle; - * int rect.width, width of rectangle ; - * int rect.height, height of rectangle; + * @param x top-left x co-ordinate of rectangle; + * @param y top-left y co-ordinate of rectangle; + * @param w width of rectangle ; + * @param h height of rectangle; * @ingroup Ecore_IMF_Context_IMControl_Group * @code * #include @@ -976,13 +799,11 @@ extern "C" { * } * @endcode */ - EINA_DEPRECATED EAPI void ecore_imf_context_ise_get_window_rect (Ecore_IMF_Context *ctx, ISE_RECT *rect); EAPI void ecore_imf_context_input_panel_geometry_get (Ecore_IMF_Context *ctx, int *x, int *y, int *w, int *h); /** * Set ISE private key before show ISE. * To use this API applicaiton should include Ecore_IMF.h header file. - * Before calling this API, every application should call ecore_imf_init() to initialize the ecore_imf shared library. * The first parameter i.e Ecore_IMF_Context *ctx is used to map the ecore_imf API into real implemented API which is inside ISF. * 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(see sample code). @@ -998,104 +819,53 @@ extern "C" { * * static void create_entry(struct appdata *ad) * { - * ecore_imf_init(); - * - * Ecore_IMF_Context *imf_context = elm_entry_imf_context_get(obj); - * - * if (imf_context) - * { - * ecore_imf_context_input_panel_layout_set (imf_context, ECORE_IMF_INPUT_PANEL_LAYOUT_URL); - * ecore_imf_context_input_panel_private_key_set (imf_context, layout, 0, NULL, "www", -1, "www"); - * ecore_imf_context_input_panel_show (imf_context); - * } - * - * //do imf related things - * - * ecore_imf_shutdown(); - * - * //do imf irrelated things - * } - * @endcode - */ - EINA_DEPRECATED EAPI void ecore_imf_context_ise_set_private_key (Ecore_IMF_Context *ctx, int layout_index, int key_index, const char* label, const char* value); - 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); - EAPI Eina_List *ecore_imf_context_input_panel_private_key_list_get (Ecore_IMF_Context *ctx); - - /** - * Set ISE private key by image before show ISE. - * To use this API applicaiton should include Ecore_IMF.h header file. - * Before calling this API, every application should call ecore_imf_init() to initialize the ecore_imf shared library. - * The first parameter i.e Ecore_IMF_Context *ctx is used to map the ecore_imf API into real implemented API which is inside ISF. - * 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(see sample code). - * @param ctx context used to map real loaded APIs - * @param layout_index index of layout page to be set - * @param key_index index of key to be set - * @param label image file path 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 - * @code - * #include - * - * static void create_entry(struct appdata *ad) - * { * Evas_Object *en; - * ecore_imf_init(); * * en = elm_entry_add(ad->layout_main); - * elm_entry_input_panel_layout_set(en, ELM_ INPUT_PANEL_LAYOUT_NUMBER); + * * Ecore_IMF_Context *imf_context = elm_entry_imf_context_get(en); * * if (imf_context) * { - * ecore_imf_context_input_panel_private_key_set (imf_context, layout, ECORE_IMF_INPUT_PANEL_KEY_ENTER, NULL, "Go", ECORE_IMF_INPUT_PANEL_KEY_ENTER, NULL); + * ecore_imf_context_input_panel_private_key_set (imf_context, layout, 0, NULL, "www", -1, "www"); * } - * - * //do imf related things - * - * ecore_imf_shutdown(); - * - * //do imf irrelated things * } * @endcode */ - EINA_DEPRECATED EAPI void ecore_imf_context_ise_set_private_key_by_image (Ecore_IMF_Context *ctx, int layout_index, int key_index, const char* img_path, const char* value); + 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); + + EAPI Eina_List *ecore_imf_context_input_panel_private_key_list_get (Ecore_IMF_Context *ctx); /** * Set ISE Layout before show ISE. * To use this API applicaiton should include Ecore_IMF.h header file. - * Before calling this API, every application should call ecore_imf_init() to initialize the ecore_imf shared library. * The first parameter i.e Ecore_IMF_Context *ctx is used to map the ecore_imf API into real implemented API which is inside ISF. * @param ctx context used to map real loaded APIs - * @param layout see ISE_LAYOUT + * @param layout see ECORE_IMF_INPUT_PANEL_LAYOUT * @ingroup Ecore_IMF_Context_IMControl_Group * @code * #include * * static void create_entry(struct appdata *ad) * { - * Ecore_IMF_Input_Panel_Layout layout = ECORE_IMF_INPUT_PANEL_LAYOUT_EMAIL; - * * en = elm_entry_add(ad->layout_main); * Ecore_IMF_Context *imf_context = elm_entry_imf_context_get(en); * * if (imf_context) * { - * ecore_imf_context_input_panel_layout_set (imf_context, layout); + * ecore_imf_context_input_panel_layout_set (imf_context, ECORE_IMF_INPUT_PANEL_LAYOUT_EMAIL); * } * } * @endcode */ - EINA_DEPRECATED EAPI void ecore_imf_context_ise_set_layout (Ecore_IMF_Context *ctx, ISE_LAYOUT layout); EAPI void ecore_imf_context_input_panel_layout_set (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Layout layout); /** * Get ISE Layout of current active ISE. * To use this API applicaiton should include Ecore_IMF.h header file. - * Before calling this API, every application should call ecore_imf_init() to initialize the ecore_imf shared library. * The first parameter i.e Ecore_IMF_Context *ctx is used to map the ecore_imf API into real implemented API which is inside ISF. * @param ctx context used to map real loaded APIs - * @param layout see ISE_LAYOUT + * @return layout see ECORE_IMF_INPUT_PANEL_LAYOUT * @ingroup Ecore_IMF_Context_IMControl_Group * @code * #include @@ -1111,26 +881,22 @@ extern "C" { * } * @endcode */ - EINA_DEPRECATED EAPI void ecore_imf_context_ise_get_layout (Ecore_IMF_Context *ctx, ISE_LAYOUT *layout); EAPI Ecore_IMF_Input_Panel_Layout ecore_imf_context_input_panel_layout_get (Ecore_IMF_Context *ctx); /** * Reset ISE Context including its Style. * To use this API applicaiton should include Ecore_IMF.h header file. - * Before calling this API, every application should call ecore_imf_init() to initialize the ecore_imf shared library. * The first parameter i.e Ecore_IMF_Context *ctx is used to map the ecore_imf API into real implemented API which is inside ISF. * This is special function that should be called before calling any ecore_imf_context_set*** APIs to restore all default properties of ISE. * @ingroup Ecore_IMF_Context_IMControl_Group * * NOTE: This API MUST be called before calling ecore_imf_context_input_panel_show(). */ - EINA_DEPRECATED EAPI void ecore_imf_context_ise_reset (Ecore_IMF_Context *ctx); /* Same as reset to default property*/ EAPI void ecore_imf_context_input_panel_reset (Ecore_IMF_Context *ctx); /* Same as reset to default property*/ /** * Set ISE screen orientation. * To use this API applicaiton should include Ecore_IMF.h header file. - * Before calling this API, every application should call ecore_imf_init() to initialize the ecore_imf shared library. * The first parameter i.e Ecore_IMF_Context *ctx is used to map the ecore_imf API into real implemented API which is inside ISF. * To show the keypad in landscape mode applicaiton should first call this API with 2nd parameter as 90 or 270. * After then only application should call ecore_imf_context_input_panel_show() function. @@ -1144,25 +910,24 @@ extern "C" { * elm_layout_content_set(ad->layout_main, "entry", en); * * Ecore_IMF_Context *imf_context = elm_entry_imf_context_get(en); - * int degree = 90; // the degree value can be either 90/270 for landscape mode and normal portrait mode 0/360. + * int degree = 90; // the degree value can be either 90/270 for landscape mode and normal portrait mode 0/360. * * if (imf_context) * { * // the orient value can be - * // ECORE_IMF_INPUT_PANEL_ORIENT_NONE, ECORE_IMF_INPUT_PANEL_ORIENT_90_CW // Clockwise - * // ECORE_IMF_INPUT_PANEL_ORIENT_180, ECORE_IMF_INPUT_PANEL_ORIENT_90_CCW // CounterClockwise + * // ECORE_IMF_INPUT_PANEL_ORIENT_NONE, + * // ECORE_IMF_INPUT_PANEL_ORIENT_90_CW // Clockwise + * // ECORE_IMF_INPUT_PANEL_ORIENT_180, + * // ECORE_IMF_INPUT_PANEL_ORIENT_90_CCW // CounterClockwise * ecore_imf_context_input_panel_orient_set(imf_context, ECORE_IMF_INPUT_PANEL_ORIENT_90_CW); - * ecore_imf_context_input_panel_show(imf_context); * } * } */ - EINA_DEPRECATED EAPI void ecore_imf_context_ise_set_screen_orientation (Ecore_IMF_Context *ctx, int orientation); EAPI void ecore_imf_context_input_panel_orient_set (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Orient orientation); /** * Get Input panel orientation. * To use this API applicaiton should include Ecore_IMF.h header file. - * Before calling this API, every application should call ecore_imf_init() to initialize the ecore_imf shared library. * The first parameter i.e Ecore_IMF_Context *ctx is used to map the ecore_imf API into real implemented API which is inside ISF. * To show the keypad in landscape mode applicaiton should first call this API with 2nd parameter as 90 or 270. * After then only application should call ecore_imf_context_input_panel_show() function. @@ -1204,7 +969,6 @@ extern "C" { /** * Get name of current active ISE. * To use this API applicaiton should include Ecore_IMF.h header file. - * Before calling this API, every application should call ecore_imf_init() to initialize the ecore_imf shared library. * The first parameter i.e Ecore_IMF_Context *ctx is used to map the ecore_imf API into real implemented API which is inside ISF. * @param ctx context used to map real loaded APIs * @param name ISE name to be got @@ -1214,7 +978,6 @@ extern "C" { * * static void create_entry(struct appdata *ad) * { - * ecore_imf_init(); * int len = 256; * char *isename = (char*) malloc (len); * memset(isename, '\0', sizeof(isename)); @@ -1227,12 +990,6 @@ extern "C" { * ecore_imf_context_ise_get_active_isename (imf_context, isename); * printf("get isename=[%s]\n", isename); * } - * - * //do imf related things - * - * ecore_imf_shutdown(); - * - * //do imf irrelated things * } * @endcode */ @@ -1258,7 +1015,6 @@ extern "C" { * if (imf_context) * { * ecore_imf_context_ise_set_active_ise_by_name (imf_context, "Input Pad"); - * ecore_imf_context_input_panel_show (imf_context); * } * * //do imf related things @@ -1284,8 +1040,6 @@ extern "C" { * * static void create_entry(struct appdata *ad) * { - * ecore_imf_init(); - * * Ecore_IMF_Context *imf_context = elm_entry_imf_context_get(obj); * * if (imf_context) @@ -1293,12 +1047,6 @@ extern "C" { * ecore_imf_context_ise_set_active_ise_by_uuid (imf_context, "ff110940-b8f0-4062-9ff6-a84f4f3575c0"); * ecore_imf_context_input_panel_show (imf_context); * } - * - * //do imf related things - * - * ecore_imf_shutdown(); - * - * //do imf irrelated things * } * @endcode */ @@ -1319,7 +1067,6 @@ extern "C" { * static void create_entry(struct appdata *ad) * { * ecore_imf_init(); - * Ecore_IMF_Input_Panel_Layout layout = ECORE_IMF_INPUT_PANEL_LAYOUT_EMAIL, * * Ecore_IMF_Context *imf_context = elm_entry_imf_context_get(obj); * @@ -1369,91 +1116,11 @@ extern "C" { * } * @endcode */ - EINA_DEPRECATED EAPI void ecore_imf_context_ise_get_ise_state (Ecore_IMF_Context *ctx, ISE_STATE *state); EAPI Ecore_IMF_Input_Panel_State ecore_imf_context_input_panel_state_get (Ecore_IMF_Context *ctx); - - /** - * This API is depricated. - * Application can register a callback function which will be called if there is change in ise state,language,mode etc. - * @param ctx context used to map real loaded APIs. - * @param pListenerCallback the callback function to be called - * @param data application-ISE specific data. - * @return an integer unique to callabck registered. - * @ingroup Ecore_IMF_Context_IMControl_Group - */ - EINA_DEPRECATED EAPI int ecore_imf_context_ise_state_add_listener (Ecore_IMF_Context *ctx, void (*plistenerCallBackFunc) (ISE_EVENT,int), void *data); - - /** - * This API is depricated. - * To deregister(remove) the callback initially registered by application. - * param listener_id the unique number returned while registering the concerned callback. - * @ingroup Ecore_IMF_Context_IMControl_Group - */ - EINA_DEPRECATED EAPI void ecore_imf_context_ise_state_remove_listener (Ecore_IMF_Context *ctx, int listener_id); - - /** - * same as ecore_imf_context_ise_state_add_listener() wihout any application-ISE specific data. -- Not supported for now -- - * @ingroup Ecore_IMF_Context_IMControl_Group - */ - EINA_DEPRECATED EAPI int ecore_imf_context_ise_state_change_listener (Ecore_IMF_Context *ctx, void (*plistenerCallBackFunc) (ISE_EVENT, int)); - - /** - * Application can register a callback function which will be called if there is change in ise state,language,mode etc. - * To use this API applicaiton should include Ecore_IMF.h header file. - * Before calling this API, every application should call ecore_imf_init() to initialize the ecore_imf shared library. - * The first parameter i.e Ecore_IMF_Context *ctx is used to map the ecore_imf API into real implemented API which is inside ISF. - * @param ctx context used to map real loaded APIs. - * @param pEventCallback the callback function to be called - * @param data application-ISE specific data. - * @return an integer unique to callabck registered. - * @ingroup Ecore_IMF_Context_IMControl_Group - * @code - * #include - * - * void _ise_event_callback(void *data, ISE_EVENT type, int value) - * { - * Ecore_IMF_Context *ic = (Ecore_IMF_Context *)data; - * - * switch(type){ - * case ISE_STATE_EVENT: - * if(value == ISE_STATE_SHOW) { - * // ISE state has changed to ISE_STATE_SHOW status - * }else if(value == ISE_STATE_HIDE) { - * // ISE state has changed to ISE_STATE_HIDE status - * } - * break; - * } - * printf("type: %d, value: %d\n", type, value); - * } - * - * static void create_entry(struct appdata *ad) - * { - * ecore_imf_init(); - * - * Ecore_IMF_Context *imf_context = elm_entry_imf_context_get(obj); - * - * if (imf_context) - * { - * //just one listener callback can be added for now - * ecore_imf_context_ise_event_callback_set (imf_context, _ise_event_callback, imf_context); - * } - * - * //do imf related things - * - * ecore_imf_shutdown(); - * - * //do imf irrelated things - * } - * @endcode - * In order to deregister the callback function registered application should follow the below step. - * ecore_imf_context_ise_event_callback_set (imf_context, NULL, NULL); - */ - EINA_DEPRECATED EAPI void ecore_imf_context_ise_event_callback_set (Ecore_IMF_Context *ctx, void (*pEventCallBackFunc) (void *data, ISE_EVENT type, int value), void *data); - + /** * Application can register a callback function which will be called if there is change in ise state,language,mode etc. * To use this API applicaiton should include Ecore_IMF.h header file. - * Before calling this API, every application should call ecore_imf_init() to initialize the ecore_imf shared library. * The first parameter i.e Ecore_IMF_Context *ctx is used to map the ecore_imf API into real implemented API which is inside ISF. * @param ctx context used to map real loaded APIs. * @param pEventCallback the callback function to be called @@ -1495,22 +1162,8 @@ extern "C" { EAPI void ecore_imf_context_input_panel_event_callback_del (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Event type, void (*pEventCallbackFunc) (void *data, Ecore_IMF_Context *ctx, int value)); /** - * cowork with Mainwindow of elementary. -- Not supported for now -- - * @ingroup Ecore_IMF_Context_IMControl_Group - */ - EINA_DEPRECATED EAPI void ecore_imf_context_ise_initialize (Ecore_IMF_Context *ctx, Evas_Object * mainwindow); - - /** - * Get the preedit string of the focused context. - * @param ctx context used to map real loaded APIs - * @return const char * the preedit string of the focused context - **/ - EINA_DEPRECATED EAPI const char * ecore_imf_context_get_focused_preedit_string (Ecore_IMF_Context *ctx); - - /** * Set the key to be disabled. * To use this API applicaiton should include Ecore_IMF.h header file. - * Before calling this API, every application should call ecore_imf_init() to initialize the ecore_imf shared library. * The first parameter i.e Ecore_IMF_Context *ctx is used to map the ecore_imf API into real implemented API which is inside ISF. * 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(see sample code). @@ -1524,34 +1177,24 @@ extern "C" { * * static void create_entry(struct appdata *ad) * { - * ecore_imf_init(); - * Ecore_IMF_Input_Panel_Layout layout = ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBER; - * - * Ecore_IMF_Context *imf_context = elm_entry_imf_context_get(obj); + * Evas_Object *en; + * en = elm_entry_add(ad->layout_main); + * Ecore_IMF_Context *imf_context = elm_entry_imf_context_get(en); * * if (imf_context) * { - * ecore_imf_context_input_panel_layout_set (imf_context, layout); * ecore_imf_context_input_panel_key_disabled_set (imf_context, layout, ECORE_IMF_INPUT_PANEL_KEY_SPACE, EINA_TRUE); - * ecore_imf_context_input_panel_show (imf_context); * } - * - * //do imf related things - * - * ecore_imf_shutdown(); - * - * //do imf irrelated things * } * @endcode */ - EINA_DEPRECATED EAPI void ecore_imf_context_ise_set_disable_key (Ecore_IMF_Context *ctx, int layout_index, int key_index, Eina_Bool disabled); EAPI void ecore_imf_context_input_panel_key_disabled_set (Ecore_IMF_Context *ctx, int layout_index, int key_index, Eina_Bool disabled); EAPI Eina_List *ecore_imf_context_input_panel_key_disabled_list_get (Ecore_IMF_Context *ctx); + /** - * Move the virtual keypad to the new position. + * Move the soft keyboard to the new position. * To use this API applicaiton should include Ecore_IMF.h header file. - * Before calling this API, every application should call ecore_imf_init() to initialize the ecore_imf shared library. * The first parameter i.e Ecore_IMF_Context *ctx is used to map the ecore_imf API into real implemented API which is inside ISF. * 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(see sample code). @@ -1564,23 +1207,12 @@ extern "C" { * * static void create_entry(struct appdata *ad) * { - * ecore_imf_init(); - * Ecore_IMF_Input_Panel_Layout layout = ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBER; - * * Ecore_IMF_Context *imf_context = elm_entry_imf_context_get(obj); * * if (imf_context) * { - * ecore_imf_context_input_panel_layout_set (imf_context, layout); * ecore_imf_context_input_panel_move (imf_context, 0, 400); - * ecore_imf_context_input_panel_show (imf_context); * } - * - * //do imf related things - * - * ecore_imf_shutdown(); - * - * //do imf irrelated things * } * @endcode */ diff --git a/src/lib/ecore_imf/Makefile.am b/src/lib/ecore_imf/Makefile.am index e4a0452..79bcd83 100644 --- a/src/lib/ecore_imf/Makefile.am +++ b/src/lib/ecore_imf/Makefile.am @@ -13,8 +13,7 @@ AM_CFLAGS = @WIN32_CFLAGS@ lib_LTLIBRARIES = libecore_imf.la include_HEADERS = \ Ecore_IMF.h \ -Ecore_IMF_Input_Panel_Key.h \ -keydefs.h +Ecore_IMF_Input_Panel_Key.h libecore_imf_la_SOURCES = \ ecore_imf.c \ diff --git a/src/lib/ecore_imf/ecore_imf_context.c b/src/lib/ecore_imf/ecore_imf_context.c index 28b31bf..ffa3d1f 100644 --- a/src/lib/ecore_imf/ecore_imf_context.c +++ b/src/lib/ecore_imf/ecore_imf_context.c @@ -224,7 +224,17 @@ ecore_imf_context_del(Ecore_IMF_Context *ctx) } if (ctx->klass->del) ctx->klass->del(ctx); ECORE_MAGIC_SET(ctx, ECORE_MAGIC_NONE); - free(ctx); + +/* + void *data; + + EINA_LIST_FREE(ctx->private_key_list, data) + free(data); + + EINA_LIST_FREE(ctx->disabled_key_list, data) + free(data); +*/ + free(ctx); } /** @@ -294,7 +304,7 @@ ecore_imf_context_client_canvas_set(Ecore_IMF_Context *ctx, void *canvas) * @param ctx An #Ecore_IMF_Context. * @ingroup Ecore_IMF_Context_Group */ -EAPI void +EINA_DEPRECATED EAPI void ecore_imf_context_show(Ecore_IMF_Context *ctx) { if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT)) @@ -312,7 +322,7 @@ ecore_imf_context_show(Ecore_IMF_Context *ctx) * @param ctx An #Ecore_IMF_Context. * @ingroup Ecore_IMF_Context_Group */ -EAPI void +EINA_DEPRECATED EAPI void ecore_imf_context_hide(Ecore_IMF_Context *ctx) { if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT)) @@ -489,7 +499,7 @@ ecore_imf_context_retrieve_surrounding_callback_set(Ecore_IMF_Context *ctx, int * @param input_mode The input mode to be used by @p ctx. * @ingroup Ecore_IMF_Context_Group */ -EAPI void +EINA_DEPRECATED EAPI void ecore_imf_context_input_mode_set(Ecore_IMF_Context *ctx, Ecore_IMF_Input_Mode input_mode) { if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT)) @@ -511,7 +521,7 @@ ecore_imf_context_input_mode_set(Ecore_IMF_Context *ctx, Ecore_IMF_Input_Mode in * @return The input mode being used by @p ctx. * @ingroup Ecore_IMF_Context_Group */ -EAPI Ecore_IMF_Input_Mode +EINA_DEPRECATED EAPI Ecore_IMF_Input_Mode ecore_imf_context_input_mode_get(Ecore_IMF_Context *ctx) { if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT)) @@ -829,34 +839,6 @@ ecore_imf_context_delete_surrounding_event_add(Ecore_IMF_Context *ctx, int offse } /*** ImControl Related APIs */ - -EAPI Ecore_IMF_Context* ecore_get_imf_context() -{ - const char *ctx_id = NULL; - Ecore_IMF_Context *imf_context = NULL; - - ctx_id = ecore_imf_context_default_id_get(); - //printf ("ctx_id = %s\n", ctx_id); - if (ctx_id) - imf_context = ecore_imf_context_add(ctx_id); - - return imf_context; -} - -EINA_DEPRECATED EAPI void -ecore_imf_context_ise_show(Ecore_IMF_Context *ctx, Evas_Object *obj, ISE_STATE state) -{ - if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT)) - { - ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_ise_show"); - return; - } - - printf("[Warning] '%s' API will be deprecated. Use ecore_imf_context_input_panel_show instead.\n", __func__); - - if (ctx->klass->ise_show) ctx->klass->ise_show(ctx, obj, state); -} - EAPI void ecore_imf_context_input_panel_show(Ecore_IMF_Context *ctx) { @@ -869,15 +851,6 @@ ecore_imf_context_input_panel_show(Ecore_IMF_Context *ctx) if (ctx->klass->input_panel_show) ctx->klass->input_panel_show(ctx); } -EINA_DEPRECATED EAPI void -ecore_imf_context_ise_hide(Ecore_IMF_Context *ctx) -{ - printf("[Warning] '%s' API will be deprecated. Use ecore_imf_context_input_panel_hide instead.\n", __func__); - - ecore_imf_context_input_panel_hide(ctx); - -} - EAPI void ecore_imf_context_input_panel_hide(Ecore_IMF_Context *ctx) { @@ -890,14 +863,6 @@ ecore_imf_context_input_panel_hide(Ecore_IMF_Context *ctx) if (ctx->klass->input_panel_hide) ctx->klass->input_panel_hide(ctx); } -EINA_DEPRECATED EAPI void -ecore_imf_context_ise_control_panel_show (Ecore_IMF_Context *ctx) -{ - printf("[Warning] '%s' API will be deprecated. Use ecore_imf_context_control_panel_show instead.\n", __func__); - - ecore_imf_context_control_panel_show (ctx); -} - EAPI void ecore_imf_context_control_panel_show (Ecore_IMF_Context *ctx) { @@ -910,14 +875,6 @@ ecore_imf_context_control_panel_show (Ecore_IMF_Context *ctx) if (ctx->klass->control_panel_show) ctx->klass->control_panel_show(ctx); } -EINA_DEPRECATED EAPI void -ecore_imf_context_ise_control_panel_hide (Ecore_IMF_Context *ctx) -{ - printf("[Warning] '%s' API will be deprecated. Use ecore_imf_context_control_panel_hide instead.\n", __func__); - - ecore_imf_context_control_panel_hide (ctx); -} - EAPI void ecore_imf_context_control_panel_hide (Ecore_IMF_Context *ctx) { @@ -930,54 +887,6 @@ ecore_imf_context_control_panel_hide (Ecore_IMF_Context *ctx) if (ctx->klass->control_panel_hide) ctx->klass->control_panel_hide(ctx); } -EINA_DEPRECATED EAPI void -ecore_imf_context_ise_set_mode (Ecore_IMF_Context *ctx, ISE_MODE mode) -{ - Ecore_IMF_Input_Mode input_mode; - - switch(mode) - { - /* - case ISE_MODE_NATIVE: - input_mode = ECORE_IMF_INPUT_MODE_NATIVE; - break; - */ - case ISE_MODE_NUMBER: - input_mode = ECORE_IMF_INPUT_MODE_NUMERIC; - break; - default: - input_mode = ECORE_IMF_INPUT_MODE_ALPHA; - break; - } - - if (ctx->klass->input_mode_set) ctx->klass->input_mode_set(ctx, input_mode); -} - -EINA_DEPRECATED EAPI void -ecore_imf_context_ise_get_mode (Ecore_IMF_Context *ctx, ISE_MODE *mode) -{ - if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT)) - { - ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_ise_get_mode"); - return; - } - - switch(ctx->input_mode) - { - /* - case ECORE_IMF_INPUT_MODE_NATIVE: - *mode = ISE_MODE_NATIVE; - break; - */ - case ECORE_IMF_INPUT_MODE_NUMERIC: - *mode = ISE_MODE_NUMBER; - break; - default: - *mode = ISE_MODE_ENGLISH; - break; - } -} - #if 0 EAPI Ecore_IMF_Input_Mode ecore_imf_context_input_panel_mode_get (Ecore_IMF_Context *ctx) @@ -995,17 +904,6 @@ ecore_imf_context_input_panel_mode_get (Ecore_IMF_Context *ctx) } #endif -EINA_DEPRECATED EAPI void -ecore_imf_context_ise_set_language (Ecore_IMF_Context *ctx, ISE_LANG lang) -{ - if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT)) - { - ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_ise_set_language"); - return; - } - //if (ctx->klass->ise_set_language) ctx->klass->ise_set_language(ctx, lang); -} - EAPI void ecore_imf_context_input_panel_language_set (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Lang lang) { @@ -1017,17 +915,6 @@ ecore_imf_context_input_panel_language_set (Ecore_IMF_Context *ctx, Ecore_IMF_In // if (ctx->klass->ise_set_language) ctx->klass->ise_set_language(ctx, lang); } -EINA_DEPRECATED EAPI void -ecore_imf_context_ise_get_language (Ecore_IMF_Context *ctx, ISE_LANG *lang) -{ - if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT)) - { - ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_ise_get_language"); - return; - } - //if (ctx->klass->ise_get_language) ctx->klass->ise_get_language(ctx, lang); -} - EAPI Ecore_IMF_Input_Panel_Lang ecore_imf_context_input_panel_language_get (Ecore_IMF_Context *ctx) { @@ -1110,13 +997,6 @@ ecore_imf_context_ise_set_isf_language (Ecore_IMF_Context *ctx, const char* lang if (ctx->klass->ise_set_isf_language) ctx->klass->ise_set_isf_language(ctx, lang); } -EINA_DEPRECATED EAPI void -ecore_imf_context_ise_set_imdata (Ecore_IMF_Context *ctx, const char * data, int len) -{ - printf("[Warning] '%s' API will be deprecated. Use ecore_imf_context_input_panel_imdata_set instead.\n", __func__); - ecore_imf_context_input_panel_imdata_set (ctx, data, len); -} - EAPI void ecore_imf_context_input_panel_imdata_set (Ecore_IMF_Context *ctx, const char * data, int len) { @@ -1135,14 +1015,6 @@ ecore_imf_context_input_panel_imdata_set (Ecore_IMF_Context *ctx, const char * d if (ctx->klass->input_panel_imdata_set) ctx->klass->input_panel_imdata_set(ctx, data, len); } -EINA_DEPRECATED EAPI void -ecore_imf_context_ise_get_imdata (Ecore_IMF_Context *ctx, char * data, int *len) -{ - printf("[Warning] '%s' API will be deprecated. Use ecore_imf_context_input_panel_imdata_get instead.\n", __func__); - - ecore_imf_context_input_panel_imdata_get (ctx, data, len); -} - EAPI void ecore_imf_context_input_panel_imdata_get (Ecore_IMF_Context *ctx, char * data, int *len) { @@ -1161,14 +1033,6 @@ ecore_imf_context_input_panel_imdata_get (Ecore_IMF_Context *ctx, char * data, i if (ctx->klass->input_panel_imdata_get) ctx->klass->input_panel_imdata_get(ctx, data, len); } -EINA_DEPRECATED EAPI void -ecore_imf_context_ise_set_style (Ecore_IMF_Context *ctx, ISE_STYLE style) -{ - printf("[Warning] '%s' API will be deprecated. Use ecore_imf_context_input_panel_use_effect_set instead.\n", __func__); - - ecore_imf_context_input_panel_use_effect_set(ctx, style.fUseImEffect); -} - EAPI void ecore_imf_context_input_panel_use_effect_set (Ecore_IMF_Context *ctx, Eina_Bool use_effect) { @@ -1194,22 +1058,6 @@ ecore_imf_context_input_panel_use_effect_get (Ecore_IMF_Context *ctx) return ctx->use_effect; } -EINA_DEPRECATED EAPI void -ecore_imf_context_ise_get_style (Ecore_IMF_Context *ctx, ISE_STYLE *style) -{ - printf("[Warning] '%s' API will be deprecated. Use ecore_imf_context_input_panel_use_effect_get instead.\n", __func__); - - style->fUseImEffect = ctx->use_effect; -} - -EINA_DEPRECATED EAPI void -ecore_imf_context_ise_get_window_rect (Ecore_IMF_Context *ctx, ISE_RECT *rect) -{ - printf("[Warning] '%s' API will be deprecated. Use ecore_imf_context_input_panel_geometry_get instead.\n", __func__); - - ecore_imf_context_input_panel_geometry_get (ctx, &rect->x, &rect->y, &rect->width, &rect->height); -} - EAPI void ecore_imf_context_input_panel_geometry_get (Ecore_IMF_Context *ctx, int *x, int *y, int *w, int *h) { @@ -1222,13 +1070,6 @@ ecore_imf_context_input_panel_geometry_get (Ecore_IMF_Context *ctx, int *x, int if (ctx->klass->input_panel_geometry_get) ctx->klass->input_panel_geometry_get(ctx, x, y, w, h); } -EINA_DEPRECATED EAPI void -ecore_imf_context_ise_set_private_key (Ecore_IMF_Context *ctx, int layout_index, int key_index, const char* label, const char* value) -{ - printf("[Warning] '%s' API will be deprecated. Use ecore_imf_context_input_panel_private_key_set instead.\n", __func__); -// ecore_imf_context_input_panel_private_key_set (ctx, layout_index, key_index, NULL, label, value); -} - 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) { @@ -1305,38 +1146,6 @@ ecore_imf_context_input_panel_private_key_list_get (Ecore_IMF_Context *ctx) return ctx->private_key_list; } - -EINA_DEPRECATED EAPI void -ecore_imf_context_ise_set_private_key_by_image (Ecore_IMF_Context *ctx, int layout_index, int key_index, const char* img_path, const char* value) -{ - if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT)) - { - ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_ise_set_private_key_by_image"); - return; - } - - if (!img_path || !value) - { - printf ("input parameters error!!! \n"); - return; - } - - if (ctx->klass->input_panel_private_key_set) ctx->klass->input_panel_private_key_set(ctx, layout_index, key_index, img_path, NULL, value); -} - -EINA_DEPRECATED EAPI void -ecore_imf_context_ise_set_disable_key (Ecore_IMF_Context *ctx, int layout_index, int key_index, Eina_Bool disabled) -{ - if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT)) - { - ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_ise_set_disable_key"); - return; - } - - printf("[Warning] '%s' API will be deprecated. Use ecore_imf_context_input_panel_key_disabled_set instead.\n", __func__); - if (ctx->klass->input_panel_key_disabled_set) ctx->klass->input_panel_key_disabled_set(ctx, layout_index, key_index, disabled); -} - EAPI void ecore_imf_context_input_panel_key_disabled_set (Ecore_IMF_Context *ctx, int layout_index, int key_index, Eina_Bool disabled) { @@ -1380,13 +1189,6 @@ ecore_imf_context_input_panel_key_disabled_list_get (Ecore_IMF_Context *ctx) return ctx->disabled_key_list; } -EINA_DEPRECATED EAPI void -ecore_imf_context_ise_set_layout (Ecore_IMF_Context *ctx, ISE_LAYOUT layout) -{ - printf("[Warning] '%s' API will be deprecated. Use ecore_imf_context_input_panel_layout_set instead.\n", __func__); - ecore_imf_context_input_panel_layout_set (ctx, (Ecore_IMF_Input_Panel_Layout)layout); -} - EAPI void ecore_imf_context_input_panel_layout_set (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Layout layout) { @@ -1400,18 +1202,9 @@ ecore_imf_context_input_panel_layout_set (Ecore_IMF_Context *ctx, Ecore_IMF_Inpu ctx->input_panel_layout = layout; } -EINA_DEPRECATED EAPI void -ecore_imf_context_ise_get_layout (Ecore_IMF_Context *ctx, ISE_LAYOUT *layout) -{ - printf("[Warning] '%s' API will be deprecated. Use ecore_imf_context_input_panel_layout_get instead.\n", __func__); - *layout = ecore_imf_context_input_panel_layout_get(ctx); -} - EAPI Ecore_IMF_Input_Panel_Layout ecore_imf_context_input_panel_layout_get (Ecore_IMF_Context *ctx) { -// Ecore_IMF_Input_Panel_Layout layout; - if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT)) { ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_input_panel_layout_get"); @@ -1427,13 +1220,6 @@ ecore_imf_context_input_panel_layout_get (Ecore_IMF_Context *ctx) return ECORE_IMF_INPUT_PANEL_LAYOUT_INVALID; } -EINA_DEPRECATED EAPI void -ecore_imf_context_ise_reset (Ecore_IMF_Context *ctx) -{ - printf("[Warning] '%s' API will be deprecated. Use ecore_imf_context_input_panel_reset instead.\n", __func__); - ecore_imf_context_input_panel_reset(ctx); -} - EAPI void ecore_imf_context_input_panel_reset (Ecore_IMF_Context *ctx) { @@ -1446,13 +1232,6 @@ ecore_imf_context_input_panel_reset (Ecore_IMF_Context *ctx) if (ctx->klass->input_panel_reset) ctx->klass->input_panel_reset(ctx); } -EINA_DEPRECATED EAPI void -ecore_imf_context_ise_set_screen_orientation (Ecore_IMF_Context *ctx, int orientation) -{ - printf("[Warning] '%s' API will be deprecated. Use ecore_imf_context_input_panel_orient_set instead.\n", __func__); - ecore_imf_context_input_panel_orient_set (ctx, (Ecore_IMF_Input_Panel_Orient)((orientation%360)/90)); -} - EAPI void ecore_imf_context_input_panel_orient_set (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Orient orientation) { @@ -1464,8 +1243,6 @@ ecore_imf_context_input_panel_orient_set (Ecore_IMF_Context *ctx, Ecore_IMF_Inpu if (ctx->klass->input_panel_orient_set) ctx->klass->input_panel_orient_set(ctx, orientation*90); ctx->input_panel_orient = orientation; - - //printf("[%s] orient : %d\n", __func__, ctx->input_panel_orient); } EAPI Ecore_IMF_Input_Panel_Orient @@ -1477,8 +1254,6 @@ ecore_imf_context_input_panel_orient_get (Ecore_IMF_Context *ctx) return ECORE_IMF_INPUT_PANEL_ORIENT_NONE; } - //printf("[%s] orient : %d\n", __func__, ctx->input_panel_orient); - return ctx->input_panel_orient; } @@ -1551,13 +1326,6 @@ ecore_imf_context_ise_get_iselist (Ecore_IMF_Context *ctx, char*** iselist) return -1; } -EINA_DEPRECATED EAPI void -ecore_imf_context_ise_get_ise_state (Ecore_IMF_Context *ctx, ISE_STATE *state) -{ - printf("[Warning] '%s' API will be deprecated. Use ecore_imf_context_input_panel_state_get instead.\n", __func__); - *state = ecore_imf_context_input_panel_state_get (ctx); -} - EAPI Ecore_IMF_Input_Panel_State ecore_imf_context_input_panel_state_get (Ecore_IMF_Context *ctx) { @@ -1575,78 +1343,6 @@ ecore_imf_context_input_panel_state_get (Ecore_IMF_Context *ctx) return state; } -EINA_DEPRECATED EAPI int -ecore_imf_context_ise_state_add_listener (Ecore_IMF_Context *ctx, void (*plistenerCallBackFunc) (ISE_EVENT,int), void *data) -{ - if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT)) - { - ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_ise_state_add_listener"); - return -1; - } - - printf("[Warning] '%s' API will be deprecated. Use ecore_imf_context_input_panel_event_callback_add instead.\n", __func__); - - if (ctx->klass->ise_state_add_listener) { - ctx->klass->ise_state_add_listener(ctx, plistenerCallBackFunc, data); - return 1; - } - else - return -1; - - return -1; -} - -EINA_DEPRECATED EAPI void -ecore_imf_context_ise_state_remove_listener (Ecore_IMF_Context *ctx, int listener_id) -{ - if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT)) - { - ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_ise_state_remove_listener"); - return; - } - - printf("[Warning] '%s' API will be deprecated. Use ecore_imf_context_input_panel_event_callback_del instead.\n", __func__); - - if (ctx->klass->ise_state_remove_listener) ctx->klass->ise_state_remove_listener(ctx, listener_id); -} - -EAPI int -ecore_imf_context_ise_state_change_listener (Ecore_IMF_Context *ctx, void (*plistenerCallBackFunc) (ISE_EVENT, int)) -{ - if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT)) - { - ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_ise_state_change_listener"); - return -1; - } - - printf("[Warning] '%s' API will be deprecated. Use ecore_imf_context_input_panel_event_callback_add instead.\n", __func__); - - if (ctx->klass->ise_state_change_listener) - { - ctx->klass->ise_state_change_listener(ctx, plistenerCallBackFunc); - return 1; - } - else - return -1; -} - -EINA_DEPRECATED EAPI void -ecore_imf_context_ise_event_callback_set (Ecore_IMF_Context *ctx, void (*pEventCallBackFunc) (void *, ISE_EVENT,int), void *data) -{ - if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT)) - { - ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_ise_event_callback_set"); - return; - } - - printf("[Warning] '%s API will be deprecated. Use ecore_imf_context_input_panel_event_callback_add instead.\n", __func__); - - if (ctx->klass->input_panel_event_callback_set) - { - ctx->klass->input_panel_event_callback_set(ctx, pEventCallBackFunc, data); - } -} - EAPI void ecore_imf_context_input_panel_event_callback_add (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Event type, void (*pEventCallBackFunc) (void *data, Ecore_IMF_Context *ctx, int value), const void *data) { @@ -1677,29 +1373,6 @@ ecore_imf_context_input_panel_event_callback_del (Ecore_IMF_Context *ctx, Ecore_ } } -EINA_DEPRECATED EAPI void -ecore_imf_context_ise_initialize (Ecore_IMF_Context *ctx, Evas_Object * mainwindow) -{ - //ecore_imf_context_input_panel_initialize (ctx, mainwindow); -} - -EINA_DEPRECATED EAPI const char* -ecore_imf_context_get_focused_preedit_string (Ecore_IMF_Context *ctx) -{ - const char str[128]; - int cursor_pos; - - if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT)) - { - ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_get_focused_preedit_string"); - return NULL; - } - - ecore_imf_context_preedit_string_get(ctx, &str, &cursor_pos); - - return str; -} - EAPI void ecore_imf_context_input_panel_move (Ecore_IMF_Context *ctx, int x, int y) { diff --git a/src/lib/ecore_imf/keydefs.h b/src/lib/ecore_imf/keydefs.h deleted file mode 100644 index a8144ce..0000000 --- a/src/lib/ecore_imf/keydefs.h +++ /dev/null @@ -1,150 +0,0 @@ -#ifndef _KEYDEFS_H_ -#define _KETDEFS_H_ - -#define ISE_KEY_RESERVED 0 -#define ISE_KEY_ESC 1 -#define ISE_KEY_1 2 -#define ISE_KEY_2 3 -#define ISE_KEY_3 4 -#define ISE_KEY_4 5 -#define ISE_KEY_5 6 -#define ISE_KEY_6 7 -#define ISE_KEY_7 8 -#define ISE_KEY_8 9 -#define ISE_KEY_9 10 -#define ISE_KEY_0 11 -#define ISE_KEY_MINUS 12 -#define ISE_KEY_EQUAL 13 -#define ISE_KEY_BACKSPACE 14 -#define ISE_KEY_TAB 15 -#define ISE_KEY_Q 16 -#define ISE_KEY_W 17 -#define ISE_KEY_E 18 -#define ISE_KEY_R 19 -#define ISE_KEY_T 20 -#define ISE_KEY_Y 21 -#define ISE_KEY_U 22 -#define ISE_KEY_I 23 -#define ISE_KEY_O 24 -#define ISE_KEY_P 25 -#define ISE_KEY_LEFTBRACE 26 -#define ISE_KEY_RIGHTBRACE 27 -#define ISE_KEY_ENTER 28 -#define ISE_KEY_LEFTCTRL 29 -#define ISE_KEY_A 30 -#define ISE_KEY_S 31 -#define ISE_KEY_D 32 -#define ISE_KEY_F 33 -#define ISE_KEY_G 34 -#define ISE_KEY_H 35 -#define ISE_KEY_J 36 -#define ISE_KEY_K 37 -#define ISE_KEY_L 38 -#define ISE_KEY_SEMICOLON 39 -#define ISE_KEY_APOSTROPHE 40 -#define ISE_KEY_GRAVE 41 -#define ISE_KEY_LEFTSHIFT 42 -#define ISE_KEY_BACKSLASH 43 -#define ISE_KEY_Z 44 -#define ISE_KEY_X 45 -#define ISE_KEY_C 46 -#define ISE_KEY_V 47 -#define ISE_KEY_B 48 -#define ISE_KEY_N 49 -#define ISE_KEY_M 50 -#define ISE_KEY_COMMA 51 -#define ISE_KEY_DOT 52 -#define ISE_KEY_SLASH 53 -#define ISE_KEY_RIGHTSHIFT 54 -#define ISE_KEY_KPASTERISK 55 -#define ISE_KEY_LEFTALT 56 -#define ISE_KEY_SPACE 57 -#define ISE_KEY_CAPSLOCK 58 -#define ISE_KEY_F1 59 -#define ISE_KEY_F2 60 -#define ISE_KEY_F3 61 -#define ISE_KEY_F4 62 -#define ISE_KEY_F5 63 -#define ISE_KEY_F6 64 -#define ISE_KEY_F7 65 -#define ISE_KEY_F8 66 -#define ISE_KEY_F9 67 -#define ISE_KEY_F10 68 -#define ISE_KEY_NUMLOCK 69 -#define ISE_KEY_SCROLLLOCK 70 -#define ISE_KEY_KP7 71 -#define ISE_KEY_KP8 72 -#define ISE_KEY_KP9 73 -#define ISE_KEY_KPMINUS 74 -#define ISE_KEY_KP4 75 -#define ISE_KEY_KP5 76 -#define ISE_KEY_KP6 77 -#define ISE_KEY_KPPLUS 78 -#define ISE_KEY_KP1 79 -#define ISE_KEY_KP2 80 -#define ISE_KEY_KP3 81 -#define ISE_KEY_KP0 82 -#define ISE_KEY_KPDOT 83 - -#define ISE_KEY_ZENKAKUHANKAKU 85 -#define ISE_KEY_102ND 86 -#define ISE_KEY_F11 87 -#define ISE_KEY_F12 88 -#define ISE_KEY_RO 89 -#define ISE_KEY_KATAKANA 90 -#define ISE_KEY_HIRAGANA 91 -#define ISE_KEY_HENKAN 92 -#define ISE_KEY_KATAKANAHIRAGANA 93 -#define ISE_KEY_MUHENKAN 94 -#define ISE_KEY_KPJPCOMMA 95 -#define ISE_KEY_KPENTER 96 -#define ISE_KEY_RIGHTCTRL 97 -#define ISE_KEY_KPSLASH 98 -#define ISE_KEY_SYSRQ 99 -#define ISE_KEY_RIGHTALT 100 -#define ISE_KEY_LINEFEED 101 -#define ISE_KEY_HOME 102 -#define ISE_KEY_UP 103 -#define ISE_KEY_PAGEUP 104 -#define ISE_KEY_LEFT 105 -#define ISE_KEY_RIGHT 106 -#define ISE_KEY_END 107 -#define ISE_KEY_DOWN 108 -#define ISE_KEY_PAGEDOWN 109 -#define ISE_KEY_INSERT 110 -#define ISE_KEY_DELETE 111 -#define ISE_KEY_MACRO 112 -#define ISE_KEY_MUTE 113 -#define ISE_KEY_VOLUMEDOWN 114 -#define ISE_KEY_VOLUMEUP 115 -#define ISE_KEY_POWER 116 /* SC System Power Down */ -#define ISE_KEY_KPEQUAL 117 -#define ISE_KEY_KPPLUSMINUS 118 -#define ISE_KEY_PAUSE 119 - -#define ISE_KEY_KPCOMMA 121 -#define ISE_KEY_HANGEUL 122 -#define ISE_KEY_HANGUEL KEY_HANGEUL -#define ISE_KEY_HANJA 123 -#define ISE_KEY_YEN 124 -#define ISE_KEY_LEFTMETA 125 -#define ISE_KEY_RIGHTMETA 126 -#define ISE_KEY_COMPOSE 127 - -#define ISE_KEY_EXCLAM 129 -#define ISE_KEY_AT 130 -#define ISE_KEY_SHARP 131 -#define ISE_KEY_DOLLAR 132 -#define ISE_KEY_PERCENT 133 -#define ISE_KEY_CARET 134 -#define ISE_KEY_AMPERSAND 135 -#define ISE_KEY_ASTERISK 136 -#define ISE_KEY_LPAREN 137 -#define ISE_KEY_RPAREN 138 - -#define ISE_KEY_MODECHANGE 247 -#define ISE_KEY_SETTING 248 - -#define ISE_KEY_MAX 255 - -#endif -- 2.7.4