[C#: circle_object]: add surface connection features 99/203699/4
authorTaehyub Kim <taehyub.kim@samsung.com>
Tue, 12 Feb 2019 04:25:48 +0000 (13:25 +0900)
committerTaehyub Kim <taehyub.kim@samsung.com>
Thu, 18 Apr 2019 02:15:37 +0000 (11:15 +0900)
Change-Id: I15a77014a92898f0a0d761f21f8dabbe0e8e97b1

inc/wearable/circle/efl_extension_circle_object.h
inc/wearable/circle/efl_extension_circle_private.h
src/wearable/circle/efl_extension_circle_object.c

index 394dd664a2676ca06f512747d8027f5abd900714..b728c87fcd27670b02ccf0db495466f8efa93297 100644 (file)
@@ -630,6 +630,9 @@ EAPI void eext_circle_object_mirrored_set(const Evas_Object *obj, Eext_Circle_Mi
  * @endif
  */
 EAPI Eext_Circle_Mirrored_State eext_circle_object_mirrored_get(const Evas_Object *obj);
+//#C# FIXME: Apply internal tags for these internal APIs
+//EAPI void eext_circle_object_connect(Eext_Circle_Surface *surface, Evas_Object *widget_obj);
+//EAPI void eext_circle_object_disconnect(Eext_Circle_Surface *surface, Evas_Object *widget_obj);
 
 /**
  * @}
index 4db958daf30da336fc195620ba28d5bda85459dd..1d63a028aa3755ff98915c9fd09bdd72da2ff274 100644 (file)
@@ -74,6 +74,7 @@ struct _Eext_Circle_Object {
    Eext_Circle_Mirrored_State mirrored_state;
 
    Eext_Circle_Surface  *surface;
+   Eext_Circle_Surface  *private_surface;
    Eina_List            *items;
    Eina_List            *text_items;
    Efl_VG               *vg_container;
index d9f1c66acd5a289e8af95c0acee4657b6a115ff6..6edf5529e5c9eea413291299d2bce91c376b46c6 100644 (file)
@@ -157,6 +157,10 @@ _eext_circle_object_widget_object_enabled_cb(void *data, Evas_Object *obj, void
 static void
 _eext_circle_object_resize_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
 {
+   //C# FIXME: make resizable when using single usability
+   return;
+
+   /*
    Evas_Coord w, h;
 
    evas_object_geometry_get(obj, NULL, NULL, &w, &h);
@@ -165,6 +169,7 @@ _eext_circle_object_resize_cb(void *data, Evas *e, Evas_Object *obj, void *event
    radius /= 2;
 
    eext_circle_object_radius_set(obj, radius);
+   */
 }
 
 //////////////////////////////
@@ -178,10 +183,15 @@ _eext_circle_object_add(Evas_Object *parent, Evas_Object *widget_obj, Eext_Circl
 
    obj = elm_table_add(parent);
 
+   circle_obj = (Eext_Circle_Object *)calloc(1, sizeof(Eext_Circle_Object));
+   if (!circle_obj) return NULL;
+
    if (!surface)
-     surface = _eext_circle_surface_init(obj, NULL, EEXT_CIRCLE_SURFACE_TYPE_PRIVATE);
+     {
+        surface = _eext_circle_surface_init(obj, NULL, EEXT_CIRCLE_SURFACE_TYPE_PRIVATE);
+        circle_obj->private_surface = surface;
+     }
 
-   circle_obj = (Eext_Circle_Object *)calloc(1, sizeof(Eext_Circle_Object));
    // Obj is expected to be elm_image object.
    circle_obj->main_obj = obj;
    circle_obj->widget_object = widget_obj;
@@ -213,10 +223,26 @@ _eext_circle_object_add(Evas_Object *parent, Evas_Object *widget_obj, Eext_Circl
      }
 
    _eext_circle_surface_object_append(surface, circle_obj);
+   evas_object_show(circle_obj->main_obj);
 
    return obj;
 }
 
+EAPI void
+eext_circle_object_connect(Eext_Circle_Surface *surface, Evas_Object *widget_obj)
+{
+   EEXT_CIRCLE_OBJECT_GET(widget_obj, circle_obj) return;
+   _eext_circle_surface_object_append(surface, circle_obj);
+}
+
+EAPI void
+eext_circle_object_disconnect(Eext_Circle_Surface *surface, Evas_Object *widget_obj)
+{
+   EEXT_CIRCLE_OBJECT_GET(widget_obj, circle_obj) return;
+   _eext_circle_surface_object_remove(surface, circle_obj);
+   _eext_circle_surface_object_append(circle_obj->private_surface, circle_obj);
+}
+
 void
 _eext_circle_object_changed(Eext_Circle_Object *obj)
 {