add ecore_imf_context_input_panel_event_callback_list_get
authorJihoon Kim <jihoon48.kim@samsung.com>
Mon, 6 Dec 2010 10:32:02 +0000 (19:32 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Mon, 6 Dec 2010 10:32:02 +0000 (19:32 +0900)
src/lib/ecore_imf/Ecore_IMF.h
src/lib/ecore_imf/Ecore_IMF_Input_Panel_Key.h
src/lib/ecore_imf/ecore_imf.c
src/lib/ecore_imf/ecore_imf_context.c
src/lib/ecore_imf/ecore_imf_private.h

index adc97b0..b704ce8 100644 (file)
@@ -55,7 +55,7 @@ extern "C" {
 #endif
 
    /* ecore_imf_context_input_panel_event_callback_add() flag */
-   typedef enum 
+   typedef enum
      {
         ECORE_IMF_INPUT_PANEL_STATE_EVENT,              /**< Input Panel STATE Event */
         ECORE_IMF_INPUT_PANEL_MODE_EVENT,               /**< Input Panel MODE Event */
@@ -78,14 +78,14 @@ extern "C" {
         ECORE_IMF_INPUT_PANEL_EVENT_INVALID
      } Ecore_IMF_Input_Panel_Event;
 
-   typedef enum 
+   typedef enum
      {
         ECORE_IMF_INPUT_PANEL_STATE_SHOW,         /**< Show Input panel */
         ECORE_IMF_INPUT_PANEL_STATE_HIDE,         /**< Hide Input panel */
         ECORE_IMF_INPUT_PANEL_STATE_INVALID
      } Ecore_IMF_Input_Panel_State;
 
-   typedef enum 
+   typedef enum
      {
         ECORE_IMF_INPUT_PANEL_LAYOUT_NORMAL,          /**< Default 4x4 layout */
         ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBER,          /**< Number layout */
@@ -93,7 +93,7 @@ extern "C" {
         ECORE_IMF_INPUT_PANEL_LAYOUT_URL,             /**< URL layout */
         ECORE_IMF_INPUT_PANEL_LAYOUT_PHONENUMBER,     /**< Phone Number layout */
         ECORE_IMF_INPUT_PANEL_LAYOUT_IP,              /**< IP layout */
-        ECORE_IMF_INPUT_PANEL_LAYOUT_MONTH,           /**< Month layout */     
+        ECORE_IMF_INPUT_PANEL_LAYOUT_MONTH,           /**< Month layout */
         ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBERONLY,      /**< Number Only layout */
         ECORE_IMF_INPUT_PANEL_LAYOUT_CUSTOM_1 = 100,  /* Reserved for future use */
         ECORE_IMF_INPUT_PANEL_LAYOUT_CUSTOM_2,
@@ -104,7 +104,7 @@ extern "C" {
         ECORE_IMF_INPUT_PANEL_LAYOUT_CUSTOM_7,
         ECORE_IMF_INPUT_PANEL_LAYOUT_CUSTOM_8,
         ECORE_IMF_INPUT_PANEL_LAYOUT_CUSTOM_9,
-        ECORE_IMF_INPUT_PANEL_LAYOUT_CUSTOM_10,        
+        ECORE_IMF_INPUT_PANEL_LAYOUT_CUSTOM_10,
         ECORE_IMF_INPUT_PANEL_LAYOUT_INVALID
      } Ecore_IMF_Input_Panel_Layout;
 
@@ -120,7 +120,7 @@ extern "C" {
         ECORE_IMF_KEYBOARD_LANG_ALPHABET   /**< Alphabet */
      } Ecore_IMF_Keyboard_Lang;
 
-   typedef enum 
+   typedef enum
      {
         ECORE_IMF_AUTOCORRECTION_DEFAULT,
         ECORE_IMF_AUTOCORRECTION_NO,
@@ -130,12 +130,12 @@ extern "C" {
 
    typedef enum
      {
-        ECORE_IMF_INPUT_PANEL_CAPS_MODE_OFF,   /**< Off */
-        ECORE_IMF_INPUT_PANEL_CAPS_MODE_ON,    /**< On */ 
+        ECORE_IMF_INPUT_PANEL_CAPS_MODE_OFF,    /**< Off */
+        ECORE_IMF_INPUT_PANEL_CAPS_MODE_ON,        /**< On */
         ECORE_IMF_INPUT_PANEL_CAPS_MODE_LOCK,  /**< Lock */
      } Ecore_IMF_Input_Panel_Caps_Mode;
 
-   typedef enum 
+   typedef enum
      {
         ECORE_IMF_INPUT_PANEL_ORIENT_NONE,
         ECORE_IMF_INPUT_PANEL_ORIENT_90_CW, /* Clockwise */
@@ -405,7 +405,7 @@ extern "C" {
      {
         Ecore_IMF_Preedit_Type preedit_type;
         unsigned int start_index;
-        unsigned int end_index; 
+        unsigned int end_index;
      };
 
    typedef struct _Ecore_IMF_Input_Panel_Event_Callback Ecore_IMF_Input_Panel_Event_Callback;
@@ -442,7 +442,7 @@ extern "C" {
         Ecore_IMF_Input_Panel_Layout (*input_panel_layout_get)         (Ecore_IMF_Context *ctx);
 
         void (*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); 
+        Ecore_IMF_Input_Panel_Lang (*input_panel_language_get) (Ecore_IMF_Context *ctx);
 
         void (*input_panel_imdata_set)         (Ecore_IMF_Context *ctx, const char* data, int len);
         void (*input_panel_imdata_get)         (Ecore_IMF_Context *ctx, char* data, int *len);
@@ -605,7 +605,7 @@ extern "C" {
     * @param lang see Ecore_IMF_Input_Panel_Lang
     * @ingroup Ecore_IMF_Context_IMControl_Group
     * THIS API IS NOT SUPPORTED NOW
-    */    
+    */
    EAPI void ecore_imf_context_input_panel_language_set (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Lang lang);
 
    /**
@@ -623,7 +623,7 @@ extern "C" {
     * @param lang see Ecore_IMF_Input_Panel_Lang
     * @ingroup Ecore_IMF_Context_IMControl_Group
     * THIS API IS NOT SUPPORTED NOW
-    */    
+    */
    EAPI void ecore_imf_context_keyboard_language_set (Ecore_IMF_Context *ctx, Ecore_IMF_Keyboard_Lang lang);
 
    /**
@@ -632,9 +632,9 @@ extern "C" {
     * @return Ecore_IMF_Input_Panel_Lang
     * @ingroup Ecore_IMF_Context_IMControl_Group
     * THIS API IS NOT SUPPORTED NOW
-    */    
+    */
    EAPI Ecore_IMF_Keyboard_Lang ecore_imf_context_keyboard_language_get (Ecore_IMF_Context *ctx);
-   
+
    /**
     * Get ISE Language of given ISE. -- Not supported for now --
     * @ingroup Ecore_IMF_Context_IMControl_Group
@@ -678,7 +678,7 @@ extern "C" {
     *     }
     * }
     * @endcode
-    */    
+    */
    EAPI void ecore_imf_context_input_panel_imdata_set       (Ecore_IMF_Context *ctx, const char * data, int len);
 
    /**
@@ -739,7 +739,7 @@ extern "C" {
     *     }
     * }
     * @endcode
-    */    
+    */
    EAPI void ecore_imf_context_input_panel_use_effect_set           (Ecore_IMF_Context *ctx, Eina_Bool use_effect);
 
    /**
@@ -770,7 +770,7 @@ extern "C" {
     *     return use_effect;
     * }
     * @endcode
-    */    
+    */
    EAPI Eina_Bool ecore_imf_context_input_panel_use_effect_get      (Ecore_IMF_Context *ctx);
 
    /**
@@ -834,7 +834,7 @@ extern "C" {
     *     }
     * }
     * @endcode
-    */    
+    */
    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);
@@ -966,8 +966,8 @@ extern "C" {
     *     }
     * }
     */
-    
-   EAPI Ecore_IMF_Input_Panel_Orient ecore_imf_context_input_panel_orient_get (Ecore_IMF_Context *ctx);   
+
+   EAPI Ecore_IMF_Input_Panel_Orient ecore_imf_context_input_panel_orient_get (Ecore_IMF_Context *ctx);
 
    /**
     * Get name of current active ISE.
@@ -1090,7 +1090,7 @@ extern "C" {
     *     //do imf irrelated things
     * }
     * @endcode
-    */    
+    */
    EAPI int ecore_imf_context_ise_get_iselist (Ecore_IMF_Context *ctx, char*** iselist);
 
    /**
@@ -1120,7 +1120,7 @@ extern "C" {
     * @endcode
     */
    EAPI Ecore_IMF_Input_Panel_State ecore_imf_context_input_panel_state_get (Ecore_IMF_Context *ctx);
-   
+
    /**
     * Application can register a callback function which will be called if there is change in ise state,language,mode etc. 
     * To use this API application should include Ecore_IMF.h header file.
index 24382a2..8e505f5 100644 (file)
@@ -2,8 +2,8 @@
 #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_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
index 060b8f2..8e5e8e7 100644 (file)
@@ -34,17 +34,17 @@ EAPI int
 ecore_imf_init(void)
 {
    if (++_ecore_imf_init_count != 1) return _ecore_imf_init_count;
-   
+
    if (!ecore_init()) return --_ecore_imf_init_count;
    _ecore_imf_log_dom = eina_log_domain_register("EcoreIMF", ECORE_IMF_DEFAULT_LOG_COLOR);
-   if (_ecore_imf_log_dom < 0) 
+   if (_ecore_imf_log_dom < 0)
      {
         EINA_LOG_ERR("Impossible to create a log domain for the Ecore IMF module.");
         ecore_shutdown();
         return --_ecore_imf_init_count;
      }
    ecore_imf_module_init();
-   
+
    ECORE_IMF_EVENT_PREEDIT_START = ecore_event_type_new();
    ECORE_IMF_EVENT_PREEDIT_END = ecore_event_type_new();
    ECORE_IMF_EVENT_PREEDIT_CHANGED = ecore_event_type_new();
index cfe893a..ecedcfb 100644 (file)
@@ -638,7 +638,7 @@ ecore_imf_context_new(const Ecore_IMF_Context_Class *ctxc)
    ctx->disabled_key_list = NULL;
    ctx->private_key_list = NULL;
    ctx->callbacks = NULL;
-   
+
    return ctx;
 }
 
@@ -943,7 +943,7 @@ ecore_imf_context_input_panel_language_set (Ecore_IMF_Context *ctx, Ecore_IMF_In
      }
 
    if (ctx->klass->input_panel_language_set) ctx->klass->input_panel_language_set(ctx, lang);
-   ctx->input_panel_lang = lang;   
+   ctx->input_panel_lang = lang;
 }
 
 EAPI Ecore_IMF_Input_Panel_Lang
@@ -973,9 +973,9 @@ ecore_imf_context_ise_get_ise_language (Ecore_IMF_Context *ctx, const char* ise_
         return -1;
      }
 
-   if (ctx->klass->ise_get_ise_language) 
+   if (ctx->klass->ise_get_ise_language)
        return ctx->klass->ise_get_ise_language(ctx, ise_name, langlist);
-   else 
+   else
       return -1;
 }
 
@@ -1181,7 +1181,7 @@ ecore_imf_context_input_panel_private_key_list_get  (Ecore_IMF_Context *ctx)
    return ctx->private_key_list;
 }
 
-EAPI void  
+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;
@@ -1226,7 +1226,7 @@ ecore_imf_context_input_panel_key_disabled_list_get (Ecore_IMF_Context *ctx)
         ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_input_panel_key_disabled_list_get");
         return NULL;
      }
-   
+
    return ctx->disabled_key_list;
 }
 
@@ -1238,7 +1238,7 @@ ecore_imf_context_input_panel_event_callback_list_get (Ecore_IMF_Context *ctx)
         ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_input_panel_event_callback_list_get");
         return NULL;
      }
-   
+
    return ctx->callbacks;
 }
 
@@ -1264,7 +1264,7 @@ ecore_imf_context_input_panel_layout_get  (Ecore_IMF_Context *ctx)
         return ECORE_IMF_INPUT_PANEL_LAYOUT_INVALID;
      }
 
-   if (ctx->klass->input_panel_layout_get ) 
+   if (ctx->klass->input_panel_layout_get)
      {
         //     ctx->klass->input_panel_layout_get (ctx, &layout);
         return ctx->input_panel_layout;
@@ -1310,7 +1310,7 @@ ecore_imf_context_input_panel_orient_get (Ecore_IMF_Context *ctx)
    return ctx->input_panel_orient;
 }
 
-EAPI void      
+EAPI void
 ecore_imf_context_ise_get_active_isename (Ecore_IMF_Context *ctx, char* name)
 {
    if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
@@ -1327,8 +1327,8 @@ ecore_imf_context_ise_get_active_isename (Ecore_IMF_Context *ctx, char* name)
 
    if (ctx->klass->ise_get_active_isename) ctx->klass->ise_get_active_isename(ctx, name);
 }
-    
-EAPI void      
+
+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))
@@ -1336,7 +1336,7 @@ ecore_imf_context_ise_set_active_ise_by_name (Ecore_IMF_Context *ctx, const char
         ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_ise_set_active_ise_by_name");
         return;
      }
-   
+
    if (!name)
      {
         printf ("input parameters error!!! \n");
@@ -1345,8 +1345,8 @@ ecore_imf_context_ise_set_active_ise_by_name (Ecore_IMF_Context *ctx, const char
 
    if (ctx->klass->ise_set_active_ise_by_name) ctx->klass->ise_set_active_ise_by_name(ctx, name);
 }
-    
-EAPI void      
+
+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))
@@ -1373,9 +1373,9 @@ ecore_imf_context_ise_get_iselist (Ecore_IMF_Context *ctx,  char*** iselist)
         return -1;
      }
 
-   if (ctx->klass->ise_get_iselist) 
+   if (ctx->klass->ise_get_iselist)
       return ctx->klass->ise_get_iselist(ctx, iselist);
-   else 
+   else
       return -1;
 }
 
@@ -1389,10 +1389,10 @@ ecore_imf_context_input_panel_state_get (Ecore_IMF_Context *ctx)
         return ECORE_IMF_INPUT_PANEL_STATE_INVALID;
      }
 
-   if (ctx->klass->input_panel_state_get) 
+   if (ctx->klass->input_panel_state_get)
       state = ctx->klass->input_panel_state_get(ctx);
 
-   return state;   
+   return state;
 }
 
 EAPI void
@@ -1406,7 +1406,7 @@ ecore_imf_context_input_panel_event_callback_add (Ecore_IMF_Context *ctx, Ecore_
         return;
      }
 
-   if (ctx->klass->input_panel_event_callback_add) 
+   if (ctx->klass->input_panel_event_callback_add)
      {
         it = calloc(1, sizeof(Ecore_IMF_Input_Panel_Event_Callback));
         if (!it) return;
@@ -1433,13 +1433,13 @@ ecore_imf_context_input_panel_event_callback_del (Ecore_IMF_Context *ctx, Ecore_
         return;
      }
 
-   if (ctx->klass->input_panel_event_callback_del) 
+   if (ctx->klass->input_panel_event_callback_del)
      {
-        for (l = ctx->callbacks; l;) 
+        for (l = ctx->callbacks; l;)
           {
              it = (Ecore_IMF_Input_Panel_Event_Callback *)l->data;
 
-             if (it && it->func == func && it->type == type) 
+             if (it && it->func == func && it->type == type)
                {
                   ctx->callbacks = eina_list_remove(ctx->callbacks, it);
                   free(it);
index 8a40f5a..8e30aef 100644 (file)
@@ -55,7 +55,7 @@ struct _Ecore_IMF_Context
    void                          *retrieve_surrounding_data;
    Eina_List                     *callbacks;
    Eina_List                     *disabled_key_list;
-   Eina_List                     *private_key_list;    
+   Eina_List                     *private_key_list;
 };
 
 struct _Ecore_IMF_Module