Add dummy implementation of Tizen specific elm_config magnification.
authorRafael Antognolli <rafael.antognolli@intel.com>
Thu, 30 Jan 2014 18:05:29 +0000 (16:05 -0200)
committerPhilippe Coval <philippe.coval@open.eurogiciel.org>
Tue, 22 Apr 2014 11:21:27 +0000 (13:21 +0200)
The Tizen elementary tree contains a magnification feature that for some
reason has not been pushed into upstream EFL.  Attempting to just cherry
pick the implementation into an up to date elementay tree will require
some additional porting effort since the codebase has evolved so much
since the Tizen tree was branched.  This change just adds dummy
implementations for each of the external methods so that the unmodified
tizen pre-installed applications run before the port is available.

src/lib/elm_entry.c
src/lib/elm_entry_eo.h
src/lib/elm_entry_legacy.h

index de1b20f3e4341624aca7877a9cf6456af9d6f55a..8ee8d23edc4f802a7a7a97124f4f2aa33afd1ff7 100644 (file)
@@ -5903,6 +5903,58 @@ _anchor_hover_end(Eo *obj EINA_UNUSED, void *_pd, va_list *list EINA_UNUSED)
 }
 /* END - ANCHOR HOVER */
 
+EAPI void
+elm_entry_magnifier_disabled_set(Evas_Object *obj, Eina_Bool disabled)
+{
+   ELM_ENTRY_CHECK(obj);
+   eo_do(obj, elm_obj_entry_magnifier_disabled_set(disabled));
+}
+
+static void
+_magnifier_disabled_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
+{
+   Eina_Bool ret = va_arg(*list, int);
+   Elm_Entry_Smart_Data *sd = _pd;
+
+   /* TODO: Forward port tizen specific magnification feature */
+}
+
+EAPI Eina_Bool
+elm_entry_magnifier_disabled_get(const Evas_Object *obj)
+{
+   ELM_ENTRY_CHECK(obj) EINA_FALSE;
+   Eina_Bool ret = EINA_FALSE;
+   eo_do((Eo *)obj, elm_obj_entry_magnifier_disabled_get(&ret));
+   return ret;
+}
+
+static void
+_magnifier_disabled_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
+{
+   Eina_Bool *ret = va_arg(*list, Eina_Bool *);
+   Elm_Entry_Smart_Data *sd = _pd;
+
+   /* TODO: Forward port tizen specific magnification feature */
+
+   if (ret) *ret = EINA_FALSE;
+}
+
+EAPI void
+elm_entry_magnifier_type_set(Evas_Object *obj, int type)
+{
+   ELM_ENTRY_CHECK(obj);
+   eo_do(obj, elm_obj_entry_magnifier_disabled_set(type));
+}
+
+static void
+_magnifier_type_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
+{
+   int ret = va_arg(*list, int);
+   Elm_Entry_Smart_Data *sd = _pd;
+
+   /* TODO: Forward port tizen specific magnification feature */
+}
+
 static void
 _elm_entry_smart_activate(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
 {
@@ -6062,6 +6114,9 @@ _class_constructor(Eo_Class *klass)
         EO_OP_FUNC(ELM_OBJ_ENTRY_ID(ELM_OBJ_ENTRY_SUB_ID_ANCHOR_HOVER_STYLE_SET), _anchor_hover_style_set),
         EO_OP_FUNC(ELM_OBJ_ENTRY_ID(ELM_OBJ_ENTRY_SUB_ID_ANCHOR_HOVER_STYLE_GET), _anchor_hover_style_get),
         EO_OP_FUNC(ELM_OBJ_ENTRY_ID(ELM_OBJ_ENTRY_SUB_ID_ANCHOR_HOVER_END), _anchor_hover_end),
+        EO_OP_FUNC(ELM_OBJ_ENTRY_ID(ELM_OBJ_ENTRY_SUB_ID_MAGNIFIER_DISABLED_SET), _magnifier_disabled_set),
+        EO_OP_FUNC(ELM_OBJ_ENTRY_ID(ELM_OBJ_ENTRY_SUB_ID_MAGNIFIER_DISABLED_GET), _magnifier_disabled_get),
+        EO_OP_FUNC(ELM_OBJ_ENTRY_ID(ELM_OBJ_ENTRY_SUB_ID_MAGNIFIER_TYPE_SET), _magnifier_type_set),
         EO_OP_FUNC(ELM_OBJ_ENTRY_ID(ELM_OBJ_ENTRY_SUB_ID_INPUT_PANEL_LAYOUT_VARIATION_SET), _input_panel_layout_variation_set),
         EO_OP_FUNC(ELM_OBJ_ENTRY_ID(ELM_OBJ_ENTRY_SUB_ID_INPUT_PANEL_LAYOUT_VARIATION_GET), _input_panel_layout_variation_get),
         EO_OP_FUNC(ELM_OBJ_ENTRY_ID(ELM_OBJ_ENTRY_SUB_ID_INPUT_PANEL_SHOW_ON_DEMAND_SET), _input_panel_show_on_demand_set),
index d9d78862a7886c5787397acbe1edde33b278cfa5..2b65b9ed0b41d3fd2ba6e74958668cb460813cca 100644 (file)
@@ -94,6 +94,9 @@ enum
    ELM_OBJ_ENTRY_SUB_ID_ANCHOR_HOVER_STYLE_SET,
    ELM_OBJ_ENTRY_SUB_ID_ANCHOR_HOVER_STYLE_GET,
    ELM_OBJ_ENTRY_SUB_ID_ANCHOR_HOVER_END,
+   ELM_OBJ_ENTRY_SUB_ID_MAGNIFIER_DISABLED_SET,
+   ELM_OBJ_ENTRY_SUB_ID_MAGNIFIER_DISABLED_GET,
+   ELM_OBJ_ENTRY_SUB_ID_MAGNIFIER_TYPE_SET,
    ELM_OBJ_ENTRY_SUB_ID_INPUT_PANEL_LAYOUT_VARIATION_SET,
    ELM_OBJ_ENTRY_SUB_ID_INPUT_PANEL_LAYOUT_VARIATION_GET,
    ELM_OBJ_ENTRY_SUB_ID_INPUT_PANEL_SHOW_ON_DEMAND_SET,
@@ -1396,3 +1399,39 @@ enum
  * @ingroup Entry
  */
 #define elm_obj_entry_anchor_hover_end() ELM_OBJ_ENTRY_ID(ELM_OBJ_ENTRY_SUB_ID_ANCHOR_HOVER_END)
+
+/**
+ * @def elm_obj_entry_magnifier_disabled_set
+ *
+ * This disables the entry's magnifier feature.
+ *
+ *
+ * @see elm_entry_magnifier_disabled_set
+ *
+ * @ingroup Entry
+ */
+#define elm_obj_entry_magnifier_disabled_set(disabled) ELM_OBJ_ENTRY_ID(ELM_OBJ_ENTRY_SUB_ID_MAGNIFIER_DISABLED_SET), EO_TYPECHECK(Eina_Bool, disabled)
+
+/**
+ * @def elm_obj_entry_magnifier_disabled_get
+ *
+ * This returns whether the entry's magnifier feature is disabled.
+ *
+ *
+ * @see elm_entry_magnifier_disabled_get
+ *
+ * @ingroup Entry
+ */
+#define elm_obj_entry_magnifier_disabled_get(ret) ELM_OBJ_ENTRY_ID(ELM_OBJ_ENTRY_SUB_ID_MAGNIFIER_DISABLED_GET), EO_TYPECHECK(Eina_Bool, *ret)
+
+/**
+ * @def elm_obj_entry_magnifier_type_set
+ *
+ * This sets the magnifier's type.
+ *
+ *
+ * @see elm_entry_magnifier_type_set
+ *
+ * @ingroup Entry
+ */
+#define elm_obj_entry_magnifier_type_set(type) ELM_OBJ_ENTRY_ID(ELM_OBJ_ENTRY_SUB_ID_MAGNIFIER_TYPE_SET), EO_TYPECHECK(int, type)
index a03ccc6312ef431b280ae29f48ac5cc8834caefe..d6429da37a22b80293024cbd56d2bb09961b631a 100644 (file)
@@ -1185,6 +1185,24 @@ EAPI const char                 *elm_entry_anchor_hover_style_get(const Evas_Obj
  */
 EAPI void                        elm_entry_anchor_hover_end(Evas_Object *obj);
 
+/**
+ * This disables the entry's magnifer feature.
+ *
+ * @param obj The entry object
+ * @param disabled If true, the magnifier is not displayed
+ */
+
+EAPI void                        elm_entry_magnifier_disabled_set(Evas_Object *obj, Eina_Bool disabled);
+/**
+ * This returns whether the entry's magnifier feature is disabled.
+ *
+ * @param obj The entry object
+ * @return If true, the feature is disabled
+ */
+EAPI Eina_Bool                   elm_entry_magnifier_disabled_get(const Evas_Object *obj);
+
+EAPI void                        elm_entry_magnifier_type_set(Evas_Object *obj, int type);
+
 /**
  * Set the input panel layout variation of the entry
  *