Merge "[elm_slider.c] fix for Nabi/ S1 - 1271, regarding indicator drag sensitivity."
authorMyoungwoon Roy Kim <myoungwoon.kim@samsung.com>
Tue, 21 Feb 2012 11:21:28 +0000 (20:21 +0900)
committerGerrit Code Review <gerrit2@localhost>
Tue, 21 Feb 2012 11:21:28 +0000 (20:21 +0900)
debian/changelog
src/lib/elm_config.c
src/lib/elm_entry.c
src/lib/elm_entry.h
src/lib/elm_genlist.c
src/lib/elm_main.c
src/lib/elm_priv.h
src/lib/elm_tickernoti.c

index 8d23f76..8ecc01a 100644 (file)
@@ -1,3 +1,27 @@
+elementary (1.0.0+svn.67547slp2+build06) unstable; urgency=low
+
+  * Upload Package
+  * Git: slp/pkgs/e/elementary
+  * Tag: elementary_1.0.0+svn.67547slp2+build06
+
+ -- Jaehwan Kim <jae.hwan.kim@samsung.com>  Tue, 21 Feb 2012 19:28:59 +0900
+
+elementary (1.0.0+svn.67547slp2+build05) unstable; urgency=low
+
+  * add some input panel APIs
+  * Git: slp/pkgs/e/elementary
+  * Tag: elementary_1.0.0+svn.67547slp2+build05
+
+ -- Jihoon Kim <jihoon48.kim@samsung.com>  Tue, 21 Feb 2012 15:56:46 +0900
+
+elementary (1.0.0+svn.67547slp2+build04) unstable; urgency=low
+
+  * add input panel control APIs in entry widget
+  * Git: slp/pkgs/e/elementary
+  * Tag: elementary_1.0.0+svn.67547slp2+build04
+
+ -- Jihoon Kim <jihoon48.kim@samsung.com>  Tue, 21 Feb 2012 13:40:47 +0900
+
 elementary (1.0.0+svn.67547slp2+build03) unstable; urgency=low
 
   * Package Upload
index 974749b..fefd22b 100644 (file)
@@ -1464,6 +1464,11 @@ _elm_config_sub_shutdown(void)
 void
 _elm_config_sub_init(void)
 {
+   // NOTE: Do not merge upstream code. Just leave it.
+   _env_get();
+   _config_apply();
+   _elm_config_font_overlay_apply();
+   _elm_recache();
 #define ENGINE_COMPARE(name) (!strcmp(_elm_config->engine, name))
    if (ENGINE_COMPARE(ELM_SOFTWARE_X11) ||
        ENGINE_COMPARE(ELM_SOFTWARE_16_X11) ||
index c134db6..88f2b0b 100644 (file)
@@ -48,6 +48,10 @@ struct _Widget_Data
    Elm_Wrap_Type linewrap;
    Elm_Input_Panel_Layout input_panel_layout;
    Elm_Autocapital_Type autocapital_type;
+   Elm_Input_Panel_Lang input_panel_lang;
+   Elm_Input_Panel_Return_Key_Type input_panel_return_key_type;
+   void *input_panel_imdata;
+   int input_panel_imdata_len;
    Eina_Bool changed : 1;
    Eina_Bool single_line : 1;
    Eina_Bool password : 1;
@@ -68,6 +72,8 @@ struct _Widget_Data
    Eina_Bool h_bounce : 1;
    Eina_Bool v_bounce : 1;
    Eina_Bool input_panel_enable : 1;
+   Eina_Bool prediction_allow : 1;
+   Eina_Bool input_panel_return_key_disabled : 1;
 //// TIZEN ONLY
    Evas_Object *hoversel;
    Evas_Object *hover;
@@ -561,6 +567,7 @@ _del_hook(Evas_Object *obj)
         _filter_free(tf);
      }
    if (wd->delay_write) ecore_timer_del(wd->delay_write);
+   if (wd->input_panel_imdata) free(wd->input_panel_imdata);
    free(wd);
 
    evas_event_thaw(evas_object_evas_get(obj));
@@ -595,6 +602,10 @@ _theme_hook(Evas_Object *obj)
    edje_object_part_text_input_panel_layout_set(wd->ent, "elm.text", wd->input_panel_layout);
    edje_object_part_text_autocapital_type_set(wd->ent, "elm.text", wd->autocapital_type);
    edje_object_part_text_input_panel_enabled_set(wd->ent, "elm.text", wd->input_panel_enable);
+   edje_object_part_text_input_panel_imdata_set(wd->ent, "elm.text", wd->input_panel_imdata, wd->input_panel_imdata_len);
+   edje_object_part_text_input_panel_return_key_type_set(wd->ent, "elm.text", wd->input_panel_return_key_type);
+   edje_object_part_text_input_panel_return_key_disabled_set(wd->ent, "elm.text", wd->input_panel_return_key_disabled);
+
    if (wd->cursor_pos != 0)
      elm_entry_cursor_pos_set(obj, wd->cursor_pos);
    if (elm_widget_focus_get(obj))
@@ -1360,25 +1371,6 @@ _cancel(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
    edje_object_part_text_select_none(wd->ent, "elm.text");
 }
 
-static void
-_clipboard_menu(void *data, Evas_Object *obj, void *event_info __UNUSED__)
-{
-   Widget_Data *wd = elm_widget_data_get(data);
-   if (!wd) return;
-
-   // start for cbhm
-#ifdef HAVE_ELEMENTARY_X
-   ecore_x_selection_secondary_set(elm_win_xwindow_get(obj), "",1);
-#endif
-   cnpwidgetdata = data;
-   elm_cbhm_helper_init(obj);
-   if (elm_entry_cnp_mode_get(obj) != ELM_CNP_MODE_MARKUP)
-     elm_cbhm_send_raw_data("show0");
-   else
-     elm_cbhm_send_raw_data("show1");
-   // end for cbhm
-}
-
 // start for cbhm
 static void
 _cnpinit(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
@@ -3083,6 +3075,7 @@ elm_entry_add(Evas_Object *parent)
    wd->autosave     = EINA_TRUE;
    wd->textonly     = EINA_FALSE;
    wd->scroll       = EINA_FALSE;
+   wd->input_panel_imdata = NULL;
 //TIZEN ONLY
    wd->cnp_mode     = ELM_CNP_MODE_MARKUP;
    wd->magnifier_enabled = EINA_TRUE;
@@ -4353,7 +4346,7 @@ elm_entry_input_panel_layout_set(Evas_Object *obj, Elm_Input_Panel_Layout layout
 }
 
 EAPI Elm_Input_Panel_Layout
-elm_entry_input_panel_layout_get(Evas_Object *obj)
+elm_entry_input_panel_layout_get(const Evas_Object *obj)
 {
    ELM_CHECK_WIDTYPE(obj, widtype) ELM_INPUT_PANEL_LAYOUT_INVALID;
    Widget_Data *wd = elm_widget_data_get(obj);
@@ -4374,7 +4367,7 @@ elm_entry_autocapital_type_set(Evas_Object *obj, Elm_Autocapital_Type autocapita
 }
 
 EAPI Elm_Autocapital_Type
-elm_entry_autocapital_type_get(Evas_Object *obj)
+elm_entry_autocapital_type_get(const Evas_Object *obj)
 {
    ELM_CHECK_WIDTYPE(obj, widtype) ELM_AUTOCAPITAL_TYPE_NONE;
    Widget_Data *wd = elm_widget_data_get(obj);
@@ -4384,6 +4377,37 @@ elm_entry_autocapital_type_get(Evas_Object *obj)
 }
 
 EAPI void
+elm_entry_prediction_allow_set(Evas_Object *obj, Eina_Bool prediction)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype);
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return;
+
+   wd->prediction_allow = prediction;
+   edje_object_part_text_prediction_allow_set(wd->ent, "elm.text", prediction);
+}
+
+EAPI Eina_Bool
+elm_entry_prediction_allow_get(const Evas_Object *obj)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype) EINA_TRUE;
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return EINA_TRUE;
+
+   return wd->prediction_allow;
+}
+
+EAPI void
+elm_entry_imf_context_reset(Evas_Object *obj)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype);
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return;
+
+   edje_object_part_text_imf_context_reset(wd->ent, "elm.text");
+}
+
+EAPI void
 elm_entry_input_panel_enabled_set(Evas_Object *obj, Eina_Bool enabled)
 {
    ELM_CHECK_WIDTYPE(obj, widtype);
@@ -4395,7 +4419,7 @@ elm_entry_input_panel_enabled_set(Evas_Object *obj, Eina_Bool enabled)
 }
 
 EAPI Eina_Bool
-elm_entry_input_panel_enabled_get(Evas_Object *obj)
+elm_entry_input_panel_enabled_get(const Evas_Object *obj)
 {
    ELM_CHECK_WIDTYPE(obj, widtype) EINA_TRUE;
    Widget_Data *wd = elm_widget_data_get(obj);
@@ -4449,6 +4473,98 @@ elm_entry_input_panel_hide(Evas_Object *obj)
    edje_object_part_text_input_panel_hide(wd->ent, "elm.text");
 }
 
+EAPI void
+elm_entry_input_panel_language_set(Evas_Object *obj, Elm_Input_Panel_Lang lang)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype);
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return;
+
+   wd->input_panel_lang = lang;
+   edje_object_part_text_input_panel_language_set(wd->ent, "elm.text", lang);
+}
+
+EAPI Elm_Input_Panel_Lang
+elm_entry_input_panel_language_get(const Evas_Object *obj)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype) ELM_INPUT_PANEL_LANG_AUTOMATIC;
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return ELM_INPUT_PANEL_LANG_AUTOMATIC;
+
+   return wd->input_panel_lang;
+}
+
+EAPI void
+elm_entry_input_panel_imdata_set(Evas_Object *obj, const void *data, int len)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype);
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return;
+
+   if (wd->input_panel_imdata)
+     free(wd->input_panel_imdata);
+
+   wd->input_panel_imdata = calloc(1, len);
+   wd->input_panel_imdata_len = len;
+   memcpy(wd->input_panel_imdata, data, len);
+
+   edje_object_part_text_input_panel_imdata_set(wd->ent, "elm.text", wd->input_panel_imdata, wd->input_panel_imdata_len);
+}
+
+EAPI void
+elm_entry_input_panel_imdata_get(const Evas_Object *obj, void *data, int *len)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype);
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return;
+
+   edje_object_part_text_input_panel_imdata_get(wd->ent, "elm.text", data, len);
+}
+
+EAPI void
+elm_entry_input_panel_return_key_type_set(Evas_Object *obj, Elm_Input_Panel_Return_Key_Type return_key_type)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype);
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return;
+
+   wd->input_panel_return_key_type = return_key_type;
+
+   edje_object_part_text_input_panel_return_key_type_set(wd->ent, "elm.text", return_key_type);
+}
+
+EAPI Elm_Input_Panel_Return_Key_Type
+elm_entry_input_panel_return_key_type_get(const Evas_Object *obj)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype) ELM_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT;
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return ELM_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT;
+
+   return wd->input_panel_return_key_type;
+}
+
+EAPI void
+elm_entry_input_panel_return_key_disabled_set(Evas_Object *obj, Eina_Bool disabled)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype);
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return;
+
+   wd->input_panel_return_key_disabled = disabled;
+
+   edje_object_part_text_input_panel_return_key_disabled_set(wd->ent, "elm.text", disabled);
+}
+
+EAPI Eina_Bool
+elm_entry_input_panel_return_key_disabled_get(const Evas_Object *obj)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return EINA_FALSE;
+
+   return wd->input_panel_return_key_disabled;
+}
+
 EINA_DEPRECATED EAPI void
 elm_entry_autoperiod_set(Evas_Object *obj __UNUSED__, Eina_Bool autoperiod __UNUSED__)
 {
@@ -4529,3 +4645,4 @@ elm_entry_magnifier_type_set(Evas_Object *obj, int type)
    wd->mgf_type = type;
    _magnifier_create(obj);
 }
+
index c3966b5..fc4fa36 100644 (file)
@@ -34,12 +34,30 @@ typedef enum
 
 typedef enum
 {
+   ELM_INPUT_PANEL_LANG_AUTOMATIC,    /**< Automatic */
+   ELM_INPUT_PANEL_LANG_ALPHABET      /**< Alphabet */
+} Elm_Input_Panel_Lang;
+
+typedef enum
+{
    ELM_AUTOCAPITAL_TYPE_NONE, /**< No auto-capitalization when typing */
    ELM_AUTOCAPITAL_TYPE_WORD, /**< Autocapitalize each word typed */
    ELM_AUTOCAPITAL_TYPE_SENTENCE, /**< Autocapitalize the start of each sentence */
    ELM_AUTOCAPITAL_TYPE_ALLCHARACTER, /**< Autocapitalize all letters */
 } Elm_Autocapital_Type; /**< Choose method of auto-capitalization */
 
+typedef enum
+{
+   ELM_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT,
+   ELM_INPUT_PANEL_RETURN_KEY_TYPE_DONE,
+   ELM_INPUT_PANEL_RETURN_KEY_TYPE_GO,
+   ELM_INPUT_PANEL_RETURN_KEY_TYPE_JOIN,
+   ELM_INPUT_PANEL_RETURN_KEY_TYPE_LOGIN,
+   ELM_INPUT_PANEL_RETURN_KEY_TYPE_NEXT,
+   ELM_INPUT_PANEL_RETURN_KEY_TYPE_SEARCH,
+   ELM_INPUT_PANEL_RETURN_KEY_TYPE_SEND
+} Elm_Input_Panel_Return_Key_Type;
+
 /**
     * @enum _Elm_CNP_Mode
     * @typedef Elm_CNP_Mode
@@ -1147,7 +1165,7 @@ EAPI void                   elm_entry_input_panel_layout_set(Evas_Object *obj, E
  *
  * @see elm_entry_input_panel_layout_set
  */
-EAPI Elm_Input_Panel_Layout elm_entry_input_panel_layout_get(Evas_Object *obj);
+EAPI Elm_Input_Panel_Layout elm_entry_input_panel_layout_get(const Evas_Object *obj);
 
 /**
  * Set the autocapitalization type on the immodule.
@@ -1163,7 +1181,7 @@ EAPI void                   elm_entry_autocapital_type_set(Evas_Object *obj, Elm
  * @param obj The entry object
  * @return autocapitalization type
  */
-EAPI Elm_Autocapital_Type   elm_entry_autocapital_type_get(Evas_Object *obj);
+EAPI Elm_Autocapital_Type   elm_entry_autocapital_type_get(const Evas_Object *obj);
 
 /**
  * Sets the attribute to show the input panel automatically.
@@ -1179,7 +1197,7 @@ EAPI void                   elm_entry_input_panel_enabled_set(Evas_Object *obj,
  * @param obj The entry object
  * @return EINA_TRUE if input panel will be appeared when the entry is clicked or has a focus, EINA_FALSE otherwise
  */
-EAPI Eina_Bool              elm_entry_input_panel_enabled_get(Evas_Object *obj);
+EAPI Eina_Bool              elm_entry_input_panel_enabled_get(const Evas_Object *obj);
 
 /**
  * Show the input panel (virtual keyboard) based on the input panel property of entry such as layout, autocapital types, and so on.
@@ -1201,6 +1219,111 @@ EAPI void                   elm_entry_input_panel_show(Evas_Object *obj);
  */
 EAPI void                   elm_entry_input_panel_hide(Evas_Object *obj);
 
+/**
+ * Set the language mode of the input panel.
+ *
+ * This API can be used if you want to show the alphabet keyboard mode. 
+ *
+ * @param obj The entry object
+ * @param lang language to be set to the input panel.
+ */
+EAPI void                   elm_entry_input_panel_language_set(Evas_Object *obj, Elm_Input_Panel_Lang lang);
+
+/**
+ * Get the language mode of the input panel.
+ *
+ * See @ref elm_entry_input_panel_language_set for more details.
+ *
+ * @param obj The entry object
+ * @return input panel language type
+ */
+EAPI Elm_Input_Panel_Lang   elm_entry_input_panel_language_get(const Evas_Object *obj);
+
+/**
+ * Set the input panel-specific data to deliver to the input panel.
+ *
+ * This API is used by applications to deliver specific data to the input panel.
+ * The data format MUST be negotiated by both application and the input panel.
+ * The size and format of data are defined by the input panel.
+ *
+ * @param obj The entry object
+ * @param data The specific data to be set to the input panel.
+ * @param len the length of data, in bytes, to send to the input panel
+ */
+EAPI void                   elm_entry_input_panel_imdata_set(Evas_Object *obj, const void *data, int len);
+
+/**
+ * Get the specific data of the current input panel.
+ *
+ * See @ref elm_entry_input_panel_imdata_set for more details. 
+ *
+ * @param obj The entry object
+ * @param data The specific data to be got from the input panel
+ * @param len The length of data
+ */
+EAPI void                   elm_entry_input_panel_imdata_get(const Evas_Object *obj, void *data, int *len);
+
+/**
+ * Set the "return" key type. This type is used to set string or icon on the "return" key of the input panel.
+ *
+ * An input panel displays the string or icon associated with this type
+ *
+ * @param obj The entry object
+ * @param return_key_type The type of "return" key on the input panel
+ */
+EAPI void                   elm_entry_input_panel_return_key_type_set(Evas_Object *obj, Elm_Input_Panel_Return_Key_Type return_key_type);
+
+/**
+ * Get the "return" key type.
+ *
+ * @see elm_entry_input_panel_return_key_type_set() for more details
+ *
+ * @param obj The entry object
+ * @return The type of "return" key on the input panel
+ */
+EAPI Elm_Input_Panel_Return_Key_Type elm_entry_input_panel_return_key_type_get(const Evas_Object *obj);
+
+/**
+ * Set the return key on the input panel to be disabled.
+ *
+ * @param obj The entry object
+ * @param disabled The state to put in in: @c EINA_TRUE for
+ *        disabled, @c EINA_FALSE for enabled 
+ */
+EAPI void                   elm_entry_input_panel_return_key_disabled_set(Evas_Object *obj, Eina_Bool disabled);
+
+/**
+ * Get whether the return key on the input panel should be disabled or not.
+ *
+ * @param obj The entry object
+ * @return EINA_TRUE if it should be disabled
+ */
+EAPI Eina_Bool              elm_entry_input_panel_return_key_disabled_get(const Evas_Object *obj);
+
+/**
+ * Reset the input method context of the entry if needed. 
+ *
+ * This can be necessary in the case where modifying the buffer would confuse on-going input method behavior
+ * @param obj The entry object
+ */
+EAPI void                   elm_entry_imf_context_reset(Evas_Object *obj);
+
+/**
+ * Set whether the entry should allow to use the text prediction.
+ *
+ * @param obj The entry object
+ * @param prediction Whether the entry should allow to use the text prediction.
+ */
+EAPI void                   elm_entry_prediction_allow_set(Evas_Object *obj, Eina_Bool prediction);
+
+/**
+ * Get whether the entry should allow to use the text prediction.
+ *
+ * @param obj The entry object
+ * @return EINA_TRUE if it allows to use the text prediction, otherwise EINA_FALSE.
+ */
+EAPI Eina_Bool              elm_entry_prediction_allow_get(const Evas_Object *obj);
+
 /* pre-made filters for entries */
 
 /**
index 9b78003..55bb75f 100644 (file)
@@ -2741,7 +2741,9 @@ _item_block_position(Item_Block *itb,
                }
              else
                {
-                  if ((!it->dragging && (!it->wd->item_moving_effect_timer)) || (it->wd->expanded_item->block != itb)) _item_unrealize(it, EINA_FALSE);
+                  if ((!it->dragging && (!it->wd->item_moving_effect_timer)) ||
+                      (it->wd->expanded_item && (it->wd->expanded_item->block != itb)))
+                    _item_unrealize(it, EINA_FALSE);
                }
           }
         in++;
index ea0603b..77bb3bf 100644 (file)
@@ -424,17 +424,6 @@ elm_quicklaunch_sub_init(int    argc,
         edje_init();
         _elm_module_init();
         _elm_config_sub_init();
-#define ENGINE_COMPARE(name) (!strcmp(_elm_config->engine, name))
-        if (ENGINE_COMPARE(ELM_SOFTWARE_X11) ||
-            ENGINE_COMPARE(ELM_SOFTWARE_16_X11) ||
-            ENGINE_COMPARE(ELM_XRENDER_X11) ||
-            ENGINE_COMPARE(ELM_OPENGL_X11))
-#undef ENGINE_COMPARE
-          {
-#ifdef HAVE_ELEMENTARY_X
-             ecore_x_init(NULL);
-#endif
-          }
         ecore_evas_init(); // FIXME: check errors
 #ifdef HAVE_ELEMENTARY_ECORE_IMF
         ecore_imf_init();
index fbadbe5..2c649df 100644 (file)
@@ -264,9 +264,6 @@ Evas_Object         *_elm_scroller_edje_object_get(Evas_Object *obj);
 
 char                *_elm_util_mkup_to_text(const char *mkup);
 char                *_elm_util_text_to_mkup(const char *text);
-/* do not use except clipboard history module */
-EAPI Eina_Bool    elm_cbhm_helper_init(Evas_Object *self);
-EAPI void         elm_cbhm_send_raw_data(char *cmd);
 
 Eina_Bool            _elm_video_check(Evas_Object *video);
 
index 296c000..bfd4d2e 100644 (file)
@@ -234,6 +234,7 @@ _create_tickernoti(Evas_Object *obj)
 
 #ifdef HAVE_ELEMENTARY_X
    ecore_x_window_size_get(ecore_x_window_root_first_get(), &w, NULL);
+   evas_object_size_hint_min_set(wd->edje_obj, w, wd->noti_height);
    evas_object_resize(wd->win, w, wd->noti_height);
    wd->rotation_event_handler = ecore_event_handler_add(
             ECORE_X_EVENT_WINDOW_PROPERTY, _prop_change, obj);