ecore_imf: Remove code related to private_key, disable_key
authorJihoon Kim <jihoon48.kim@samsung.com>
Thu, 16 Feb 2012 06:35:42 +0000 (15:35 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Thu, 16 Feb 2012 06:54:58 +0000 (15:54 +0900)
Change-Id: Icbd50156249ebec2fc3556ee4f1fa9af52d3cb35

src/lib/ecore_imf/Ecore_IMF.h
src/lib/ecore_imf/Ecore_IMF_Input_Panel_Key.h [deleted file]
src/lib/ecore_imf/Makefile.am
src/lib/ecore_imf/ecore_imf_context.c
src/lib/ecore_imf/ecore_imf_private.h

index c591b29..55788e7 100644 (file)
@@ -2,7 +2,6 @@
 #define _ECORE_IMF_H
 
 #include <Eina.h>
-#include <Ecore_IMF_Input_Panel_Key.h>
 
 #ifdef EAPI
 # undef EAPI
@@ -53,23 +52,6 @@ typedef enum
    ECORE_IMF_INPUT_PANEL_STATE_INVALID
 } Ecore_IMF_Input_Panel_State;
 
-typedef struct
-{
-   int layout_idx;
-   int key_idx;
-   Eina_Bool disabled;
-} Disable_Key_Item;
-
-typedef struct
-{
-   int layout_idx;
-   int key_idx;
-   int type;
-   char data[128]; // label or image path
-   int key_value;
-   char key_string[32];
-} Private_Key_Item;
-
 /* Events sent by the Input Method */
 typedef struct _Ecore_IMF_Event_Preedit_Start      Ecore_IMF_Event_Preedit_Start;
 typedef struct _Ecore_IMF_Event_Preedit_End        Ecore_IMF_Event_Preedit_End;
@@ -399,8 +381,6 @@ struct _Ecore_IMF_Context_Class
    void (*input_panel_return_key_type_set) (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Return_Key_Type return_key_type);
    void (*input_panel_return_key_disabled_set) (Ecore_IMF_Context *ctx, Eina_Bool disabled);
    void (*input_panel_geometry_get)(Ecore_IMF_Context *ctx, int *x, int *y, int *w, int *h);
-   void (*input_panel_private_key_set)(Ecore_IMF_Context *ctx, int layout_index, int key_index, const char *img_path, const char* label, const char* value);
-   void (*input_panel_key_disabled_set)(Ecore_IMF_Context *ctx, int layout_index, int key_index, Eina_Bool disabled);
    Ecore_IMF_Input_Panel_State (*input_panel_state_get) (Ecore_IMF_Context *ctx);
    void (*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), void *data);
    void (*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));
diff --git a/src/lib/ecore_imf/Ecore_IMF_Input_Panel_Key.h b/src/lib/ecore_imf/Ecore_IMF_Input_Panel_Key.h
deleted file mode 100644 (file)
index 24382a2..0000000
+++ /dev/null
@@ -1,151 +0,0 @@
-#ifndef _INPUT_PANEL_KEYDEFS_H_
-#define _INPUT_PANEL_KETDEFS_H_
-
-
-#define ECORE_IMF_INPUT_PANEL_KEY_RESERVED     0
-#define ECORE_IMF_INPUT_PANEL_KEY_ESC                  1
-#define ECORE_IMF_INPUT_PANEL_KEY_1                    2
-#define ECORE_IMF_INPUT_PANEL_KEY_2                    3
-#define ECORE_IMF_INPUT_PANEL_KEY_3                    4
-#define ECORE_IMF_INPUT_PANEL_KEY_4                    5
-#define ECORE_IMF_INPUT_PANEL_KEY_5                    6
-#define ECORE_IMF_INPUT_PANEL_KEY_6                    7
-#define ECORE_IMF_INPUT_PANEL_KEY_7                    8
-#define ECORE_IMF_INPUT_PANEL_KEY_8                    9
-#define ECORE_IMF_INPUT_PANEL_KEY_9                    10
-#define ECORE_IMF_INPUT_PANEL_KEY_0                    11
-#define ECORE_IMF_INPUT_PANEL_KEY_MINUS                        12
-#define ECORE_IMF_INPUT_PANEL_KEY_EQUAL                        13
-#define ECORE_IMF_INPUT_PANEL_KEY_BACKSPACE            14
-#define ECORE_IMF_INPUT_PANEL_KEY_TAB                  15
-#define ECORE_IMF_INPUT_PANEL_KEY_Q                    16
-#define ECORE_IMF_INPUT_PANEL_KEY_W                    17
-#define ECORE_IMF_INPUT_PANEL_KEY_E                    18
-#define ECORE_IMF_INPUT_PANEL_KEY_R                    19
-#define ECORE_IMF_INPUT_PANEL_KEY_T                    20
-#define ECORE_IMF_INPUT_PANEL_KEY_Y                    21
-#define ECORE_IMF_INPUT_PANEL_KEY_U                    22
-#define ECORE_IMF_INPUT_PANEL_KEY_I                    23
-#define ECORE_IMF_INPUT_PANEL_KEY_O                    24
-#define ECORE_IMF_INPUT_PANEL_KEY_P                    25
-#define ECORE_IMF_INPUT_PANEL_KEY_LEFTBRACE            26
-#define ECORE_IMF_INPUT_PANEL_KEY_RIGHTBRACE           27
-#define ECORE_IMF_INPUT_PANEL_KEY_ENTER                        28
-#define ECORE_IMF_INPUT_PANEL_KEY_LEFTCTRL             29
-#define ECORE_IMF_INPUT_PANEL_KEY_A                    30
-#define ECORE_IMF_INPUT_PANEL_KEY_S                    31
-#define ECORE_IMF_INPUT_PANEL_KEY_D                    32
-#define ECORE_IMF_INPUT_PANEL_KEY_F                    33
-#define ECORE_IMF_INPUT_PANEL_KEY_G                    34
-#define ECORE_IMF_INPUT_PANEL_KEY_H                    35
-#define ECORE_IMF_INPUT_PANEL_KEY_J                    36
-#define ECORE_IMF_INPUT_PANEL_KEY_K                    37
-#define ECORE_IMF_INPUT_PANEL_KEY_L                    38
-#define ECORE_IMF_INPUT_PANEL_KEY_SEMICOLON            39
-#define ECORE_IMF_INPUT_PANEL_KEY_APOSTROPHE           40
-#define ECORE_IMF_INPUT_PANEL_KEY_GRAVE                        41
-#define ECORE_IMF_INPUT_PANEL_KEY_LEFTSHIFT            42
-#define ECORE_IMF_INPUT_PANEL_KEY_BACKSLASH            43
-#define ECORE_IMF_INPUT_PANEL_KEY_Z                    44
-#define ECORE_IMF_INPUT_PANEL_KEY_X                    45
-#define ECORE_IMF_INPUT_PANEL_KEY_C                    46
-#define ECORE_IMF_INPUT_PANEL_KEY_V                    47
-#define ECORE_IMF_INPUT_PANEL_KEY_B                    48
-#define ECORE_IMF_INPUT_PANEL_KEY_N                    49
-#define ECORE_IMF_INPUT_PANEL_KEY_M                    50
-#define ECORE_IMF_INPUT_PANEL_KEY_COMMA                        51
-#define ECORE_IMF_INPUT_PANEL_KEY_DOT                  52
-#define ECORE_IMF_INPUT_PANEL_KEY_SLASH                        53
-#define ECORE_IMF_INPUT_PANEL_KEY_RIGHTSHIFT           54
-#define ECORE_IMF_INPUT_PANEL_KEY_KPASTERISK           55
-#define ECORE_IMF_INPUT_PANEL_KEY_LEFTALT                      56
-#define ECORE_IMF_INPUT_PANEL_KEY_SPACE                        57
-#define ECORE_IMF_INPUT_PANEL_KEY_CAPSLOCK             58
-#define ECORE_IMF_INPUT_PANEL_KEY_F1                   59
-#define ECORE_IMF_INPUT_PANEL_KEY_F2                   60
-#define ECORE_IMF_INPUT_PANEL_KEY_F3                   61
-#define ECORE_IMF_INPUT_PANEL_KEY_F4                   62
-#define ECORE_IMF_INPUT_PANEL_KEY_F5                   63
-#define ECORE_IMF_INPUT_PANEL_KEY_F6                   64
-#define ECORE_IMF_INPUT_PANEL_KEY_F7                   65
-#define ECORE_IMF_INPUT_PANEL_KEY_F8                   66
-#define ECORE_IMF_INPUT_PANEL_KEY_F9                   67
-#define ECORE_IMF_INPUT_PANEL_KEY_F10                  68
-#define ECORE_IMF_INPUT_PANEL_KEY_NUMLOCK                      69
-#define ECORE_IMF_INPUT_PANEL_KEY_SCROLLLOCK           70
-#define ECORE_IMF_INPUT_PANEL_KEY_KP7                  71
-#define ECORE_IMF_INPUT_PANEL_KEY_KP8                  72
-#define ECORE_IMF_INPUT_PANEL_KEY_KP9                  73
-#define ECORE_IMF_INPUT_PANEL_KEY_KPMINUS                      74
-#define ECORE_IMF_INPUT_PANEL_KEY_KP4                  75
-#define ECORE_IMF_INPUT_PANEL_KEY_KP5                  76
-#define ECORE_IMF_INPUT_PANEL_KEY_KP6                  77
-#define ECORE_IMF_INPUT_PANEL_KEY_KPPLUS                       78
-#define ECORE_IMF_INPUT_PANEL_KEY_KP1                  79
-#define ECORE_IMF_INPUT_PANEL_KEY_KP2                  80
-#define ECORE_IMF_INPUT_PANEL_KEY_KP3                  81
-#define ECORE_IMF_INPUT_PANEL_KEY_KP0                  82
-#define ECORE_IMF_INPUT_PANEL_KEY_KPDOT                        83
-
-#define ECORE_IMF_INPUT_PANEL_KEY_ZENKAKUHANKAKU               85
-#define ECORE_IMF_INPUT_PANEL_KEY_102ND                        86
-#define ECORE_IMF_INPUT_PANEL_KEY_F11                  87
-#define ECORE_IMF_INPUT_PANEL_KEY_F12                  88
-#define ECORE_IMF_INPUT_PANEL_KEY_RO                   89
-#define ECORE_IMF_INPUT_PANEL_KEY_KATAKANA             90
-#define ECORE_IMF_INPUT_PANEL_KEY_HIRAGANA             91
-#define ECORE_IMF_INPUT_PANEL_KEY_HENKAN                       92
-#define ECORE_IMF_INPUT_PANEL_KEY_KATAKANAHIRAGANA     93
-#define ECORE_IMF_INPUT_PANEL_KEY_MUHENKAN             94
-#define ECORE_IMF_INPUT_PANEL_KEY_KPJPCOMMA            95
-#define ECORE_IMF_INPUT_PANEL_KEY_KPENTER                      96
-#define ECORE_IMF_INPUT_PANEL_KEY_RIGHTCTRL            97
-#define ECORE_IMF_INPUT_PANEL_KEY_KPSLASH                      98
-#define ECORE_IMF_INPUT_PANEL_KEY_SYSRQ                        99
-#define ECORE_IMF_INPUT_PANEL_KEY_RIGHTALT             100
-#define ECORE_IMF_INPUT_PANEL_KEY_LINEFEED             101
-#define ECORE_IMF_INPUT_PANEL_KEY_HOME                 102
-#define ECORE_IMF_INPUT_PANEL_KEY_UP                   103
-#define ECORE_IMF_INPUT_PANEL_KEY_PAGEUP                       104
-#define ECORE_IMF_INPUT_PANEL_KEY_LEFT                 105
-#define ECORE_IMF_INPUT_PANEL_KEY_RIGHT                        106
-#define ECORE_IMF_INPUT_PANEL_KEY_END                  107
-#define ECORE_IMF_INPUT_PANEL_KEY_DOWN                 108
-#define ECORE_IMF_INPUT_PANEL_KEY_PAGEDOWN             109
-#define ECORE_IMF_INPUT_PANEL_KEY_INSERT                       110
-#define ECORE_IMF_INPUT_PANEL_KEY_DELETE                       111
-#define ECORE_IMF_INPUT_PANEL_KEY_MACRO                        112
-#define ECORE_IMF_INPUT_PANEL_KEY_MUTE                 113
-#define ECORE_IMF_INPUT_PANEL_KEY_VOLUMEDOWN           114
-#define ECORE_IMF_INPUT_PANEL_KEY_VOLUMEUP             115
-#define ECORE_IMF_INPUT_PANEL_KEY_POWER                        116     /* SC System Power Down */
-#define ECORE_IMF_INPUT_PANEL_KEY_KPEQUAL                      117
-#define ECORE_IMF_INPUT_PANEL_KEY_KPPLUSMINUS          118
-#define ECORE_IMF_INPUT_PANEL_KEY_PAUSE                        119
-
-#define ECORE_IMF_INPUT_PANEL_KEY_KPCOMMA                      121
-#define ECORE_IMF_INPUT_PANEL_KEY_HANGEUL                      122
-#define ECORE_IMF_INPUT_PANEL_KEY_HANGUEL                      ECORE_IMF_INPUT_PANEL_KEY_KEY_HANGEUL
-#define ECORE_IMF_INPUT_PANEL_KEY_HANJA                        123
-#define ECORE_IMF_INPUT_PANEL_KEY_YEN                  124
-#define ECORE_IMF_INPUT_PANEL_KEY_LEFTMETA             125
-#define ECORE_IMF_INPUT_PANEL_KEY_RIGHTMETA            126
-#define ECORE_IMF_INPUT_PANEL_KEY_COMPOSE                      127
-
-#define ECORE_IMF_INPUT_PANEL_KEY_EXCLAM                       129
-#define ECORE_IMF_INPUT_PANEL_KEY_AT                   130
-#define ECORE_IMF_INPUT_PANEL_KEY_SHARP                        131
-#define ECORE_IMF_INPUT_PANEL_KEY_DOLLAR                       132
-#define ECORE_IMF_INPUT_PANEL_KEY_PERCENT                      133
-#define ECORE_IMF_INPUT_PANEL_KEY_CARET                        134
-#define ECORE_IMF_INPUT_PANEL_KEY_AMPERSAND            135
-#define ECORE_IMF_INPUT_PANEL_KEY_ASTERISK             136
-#define ECORE_IMF_INPUT_PANEL_KEY_LPAREN                       137
-#define ECORE_IMF_INPUT_PANEL_KEY_RPAREN                       138
-
-#define ECORE_IMF_INPUT_PANEL_KEY_MODECHANGE   247
-#define ECORE_IMF_INPUT_PANEL_KEY_SETTING                      248
-
-#define ECORE_IMF_INPUT_PANEL_KEY_MAX                  255
-
-#endif
index 358b4e7..10f6c2f 100644 (file)
@@ -10,7 +10,7 @@ AM_CPPFLAGS = \
 AM_CFLAGS = @WIN32_CFLAGS@
 
 lib_LTLIBRARIES = libecore_imf.la
-includes_HEADERS = Ecore_IMF.h Ecore_IMF_Input_Panel_Key.h
+includes_HEADERS = Ecore_IMF.h
 includesdir = $(includedir)/ecore-@VMAJ@
 
 libecore_imf_la_SOURCES = \
index 7e7f32b..7de5c16 100644 (file)
@@ -223,7 +223,6 @@ ecore_imf_context_info_get(Ecore_IMF_Context *ctx)
 EAPI void
 ecore_imf_context_del(Ecore_IMF_Context *ctx)
 {
-   void *data;
    Ecore_IMF_Func_Node *fn;
 
    if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
@@ -241,16 +240,6 @@ ecore_imf_context_del(Ecore_IMF_Context *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);
 }
 
@@ -1568,67 +1557,7 @@ ecore_imf_context_input_panel_geometry_get(Ecore_IMF_Context *ctx, int *x, int *
 EINA_DEPRECATED 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);
+   // will be deleted
 }
 
 /**
@@ -1641,14 +1570,8 @@ ecore_imf_context_input_panel_private_key_set(Ecore_IMF_Context *ctx, int layout
 EINA_DEPRECATED 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;
+   // will be deleted
+   return NULL;
 }
 
 /**
@@ -1665,40 +1588,7 @@ ecore_imf_context_input_panel_private_key_list_get(Ecore_IMF_Context *ctx)
 EINA_DEPRECATED 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);
+   // will be deleted
 }
 
 /**
@@ -1712,7 +1602,8 @@ ecore_imf_context_input_panel_key_disabled_set(Ecore_IMF_Context *ctx, int layou
 EINA_DEPRECATED EAPI Eina_List *
 ecore_imf_context_input_panel_key_disabled_list_get(Ecore_IMF_Context *ctx)
 {
-   return ctx->disabled_key_list;
+   // will be deleted
+   return NULL;
 }
 
 /**
index 7271613..85f34a3 100644 (file)
@@ -53,8 +53,6 @@ struct _Ecore_IMF_Context
    Ecore_IMF_Input_Panel_Layout   input_panel_layout;
    Ecore_IMF_Input_Panel_Lang     input_panel_lang;
    Ecore_IMF_Input_Panel_Return_Key_Type input_panel_return_key_type;
-   Eina_List                     *disabled_key_list;
-   Eina_List                     *private_key_list;
    Eina_Bool                      allow_prediction : 1;
    Eina_Bool                      input_panel_enabled : 1;
    Eina_Bool                      input_panel_return_key_disabled : 1;