[edje_entry] remove releated funcs related to selection
authorJihoon Kim <jihoon48.kim@samsung.com>
Tue, 7 Sep 2010 05:23:29 +0000 (14:23 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Tue, 7 Sep 2010 05:23:29 +0000 (14:23 +0900)
src/lib/Edje.h
src/lib/edje_entry.c
src/lib/edje_util.c

index b9f96f6..693f463 100644 (file)
@@ -434,6 +434,8 @@ typedef void (*Edje_Message_Handler_Cb) (void *data, Evas_Object *obj, Edje_Mess
    EAPI Eina_Bool    edje_object_scale_set           (Evas_Object *obj, double scale);
    EAPI double       edje_object_scale_get           (const Evas_Object *obj);
    EAPI void         edje_input_panel_enabled_set    (Eina_Bool enabled);
+   EAPI void         edje_autocapitalization_set     (Eina_Bool on);
+   EAPI void         edje_autoperiod_set             (Eina_Bool on);
 
    /* edje_load.c */
    EAPI Eina_List   *edje_file_collection_list       (const char *file);
@@ -540,6 +542,8 @@ typedef void (*Edje_Message_Handler_Cb) (void *data, Evas_Object *obj, Edje_Mess
    EAPI void             edje_object_part_text_autocapitalization_set(const Evas_Object *obj, const char *part, Eina_Bool on);
 #ifdef HAVE_ECORE_IMF
    EAPI Ecore_IMF_Context *edje_object_part_text_imf_context_get(const Evas_Object *obj, const char *part);
+#else
+   EAPI void            *edje_object_part_text_imf_context_get(const Evas_Object *obj, const char *part);
 #endif
    EAPI void             edje_object_part_text_input_panel_enabled_set(const Evas_Object *obj, const char *part, Eina_Bool disabled);
    EAPI Eina_Bool        edje_object_part_text_input_panel_enabled_get(const Evas_Object *obj, const char *part);
index f981b41..071f239 100644 (file)
@@ -28,7 +28,7 @@ void *alloca (size_t);
 
 #include "edje_private.h"
 
-#define USE_PREEDIT_BLOCK 1
+//#define USE_PREEDIT_BLOCK 1
 
 #ifdef HAVE_ECORE_IMF
 #include <Ecore_IMF_Evas.h>
@@ -1841,7 +1841,7 @@ _edje_key_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, v
                       ecore_timer_del(en->pw_timer);
                       en->pw_timer = NULL;
                    }
-                 en->pw_timer = ecore_timer_add(2.0, _replace_pw, en);                                                 
+                 en->pw_timer = ecore_timer_add(2.0, _replace_pw, en);
               }        
             else
               {        
@@ -2838,6 +2838,12 @@ _edje_entry_imf_context_get(Edje_Real_Part *rp)
 
    return en->imf_context;
 }
+#else
+void *
+_edje_entry_imf_context_get(Edje_Real_Part *rp)
+{
+   return NULL;
+}
 #endif
 
 void
@@ -2846,7 +2852,9 @@ _edje_entry_input_panel_enabled_set(Edje_Real_Part *rp, Eina_Bool enabled)
    Entry *en = rp->entry_data;
    if (!en) return;
 
+#ifdef HAVE_ECORE_IMF
    en->input_panel_enable = enabled;
+#endif
 }
 
 Eina_Bool
@@ -2855,7 +2863,11 @@ _edje_entry_input_panel_enabled_get(Edje_Real_Part *rp)
    Entry *en = rp->entry_data;
    if (!en) return EINA_FALSE;
 
+#ifdef HAVE_ECORE_IMF
    return en->input_panel_enable;
+#else
+   return EINA_FALSE;
+#endif
 }
 
 static Evas_Textblock_Cursor *
@@ -3297,8 +3309,6 @@ _edje_entry_imf_event_changed_cb(void *data, int type __UNUSED__, void *event)
    Ecore_IMF_Event_Commit *ev = event;
    int i;
    char *preedit_string;
-   int preedit_start_pos = 0;
-   Eina_List *range = NULL;
 
    if (!rp) return 1;
 
@@ -3343,13 +3353,17 @@ _edje_entry_imf_event_changed_cb(void *data, int type __UNUSED__, void *event)
 
    en->comp_len = length;
 
+#if 0
    _sel_clear(en->cursor, rp->object, en);
    _sel_enable(en->cursor, rp->object, en);
    _sel_start(en->cursor, rp->object, en);
+#endif
 
    en->have_composition = EINA_TRUE;
 
 #ifdef USE_PREEDIT_BLOCK
+   int preedit_start_pos = 0;
+
    if (length)
        preedit_start_pos = evas_textblock_cursor_pos_get(en->cursor);
 #endif /* USE_PREEDIT_BLOCK */
@@ -3396,7 +3410,7 @@ _edje_entry_imf_event_changed_cb(void *data, int type __UNUSED__, void *event)
           }
 #endif
 
-        range = evas_textblock_cursor_range_geometry_get(pre_start, pre_end);
+        Eina_List *range = evas_textblock_cursor_range_geometry_get(pre_start, pre_end);
 
         if (range)
           {
@@ -3440,7 +3454,9 @@ _edje_entry_imf_event_changed_cb(void *data, int type __UNUSED__, void *event)
    if (en->func)
      en->func(en->data, NULL);
 
+#if 0
    _sel_extend(en->cursor, rp->object, en);
+#endif
 
    _curs_update_from_curs(en->cursor, rp->object, en);
    _anchors_get(en->cursor, rp->object, en);
index 6733f49..977a76d 100644 (file)
@@ -32,6 +32,8 @@ int _edje_freeze_val = 0;
 int _edje_freeze_calc_count = 0;
 Eina_List *_edje_freeze_calc_list = NULL;
 Eina_Bool _edje_input_panel_enable = EINA_FALSE;
+Eina_Bool _edje_autocapital = EINA_FALSE;
+Eina_Bool _edje_autoperiod = EINA_FALSE;
 
 typedef struct _Edje_List_Foreach_Data Edje_List_Foreach_Data;
 struct _Edje_List_Foreach_Data
@@ -274,6 +276,20 @@ edje_input_panel_enabled_set(Eina_Bool enabled)
    _edje_input_panel_enable = enabled;
 }
 
+EAPI void
+edje_autocapitalization_set(Eina_Bool on)
+{
+   if (_edje_autocapital == on) return;
+   _edje_autocapital = on;
+}
+
+EAPI void
+edje_autoperiod_set(Eina_Bool on)
+{
+   if (_edje_autoperiod == on) return;
+   _edje_autoperiod = on;
+}
+
 /**
  * @brief Get Edje object data.
  *