elc_ctxpopup: Add item_style_get API 50/160350/3
authorShilpa Singh <shilpa.singh@samsung.com>
Wed, 15 Nov 2017 12:48:33 +0000 (18:18 +0530)
committerJin Yong Park <j4939.park@samsung.com>
Tue, 21 Nov 2017 01:02:46 +0000 (01:02 +0000)
Change-Id: I1911c4fb41a21e71ffeb9cfde193755872f6909b
Signed-off-by: Shilpa Singh <shilpa.singh@samsung.com>
src/lib/elc_ctxpopup.c
src/lib/elm_ctxpopup_item.eo
src/mobile_lib/elc_ctxpopup.c
src/mobile_lib/elm_widget_ctxpopup.h

index 9b0acb3..7ffb03f 100644 (file)
@@ -982,6 +982,15 @@ _elm_ctxpopup_item_elm_widget_item_style_set(Eo *eo_item EINA_UNUSED,
    // mobile & wearable only feature
 }
 
+/* TIZEN_ONLY(20171116): merge eo & header files for different profiles */
+EOLIAN static const char *
+_elm_ctxpopup_item_elm_widget_item_style_get(Eo *eo_item EINA_UNUSED, Elm_Ctxpopup_Item_Data *item EINA_UNUSED)
+{
+   // mobile & wearable only feature
+   return NULL;
+}
+/* END */
+
 EOLIAN static Elm_Atspi_State_Set
 _elm_ctxpopup_item_elm_interface_atspi_accessible_state_set_get(Eo *obj EINA_UNUSED, Elm_Ctxpopup_Item_Data *it EINA_UNUSED)
 {
index 87286d1..4367beb 100644 (file)
@@ -44,6 +44,7 @@ class Elm.Ctxpopup_Item(Elm.Widget_Item, Elm_Interface_Atspi_Widget_Action)
         Elm.Widget_Item.signal_emit;
         Elm.Widget_Item.del_pre;
         Elm.Widget_Item.style.set; // TIZEN_ONLY(20170116): merge eo & header files for different profiles
+        Elm.Widget_Item.style.get; //TIZEN_ONLY(20171115): merge eo & header files for different profiles
         Elm.Widget_Item.part_text.get;
         Elm.Widget_Item.part_text.set;
         Elm.Widget_Item.part_content.get;
index eac6aad..84b0bad 100644 (file)
@@ -443,6 +443,7 @@ _elm_ctxpopup_item_elm_widget_item_del_pre(Eo *eo_item EINA_UNUSED, Elm_Ctxpopup
      evas_object_del(VIEW(item));
 
    eina_stringshare_del(item->label);
+   if (item->style) eina_stringshare_del(item->style);
    sd->items = eina_list_remove(sd->items, item);
 
    if (eina_list_count(sd->items) < 1)
@@ -1732,6 +1733,7 @@ _elm_ctxpopup_item_elm_widget_item_style_set(Eo *eo_item EINA_UNUSED,
 {
    ELM_CTXPOPUP_DATA_GET(WIDGET(item), sd);
 
+   eina_stringshare_replace(&item->style, style);
    if (item->icon && item->label)
      {
         if (sd->horizontal)
@@ -1757,6 +1759,13 @@ _elm_ctxpopup_item_elm_widget_item_style_set(Eo *eo_item EINA_UNUSED,
    if (sd->visible) elm_layout_sizing_eval(WIDGET(item));
 }
 
+EOLIAN static const char *
+_elm_ctxpopup_item_elm_widget_item_style_get(Eo *eo_it EINA_UNUSED,
+                                             Elm_Ctxpopup_Item_Data *item)
+{
+   return item->style;
+}
+
 static void
 _bg_clicked_cb(void *data,
                Evas_Object *obj EINA_UNUSED,
index 42fe6cc..d70af2b 100644 (file)
@@ -36,6 +36,7 @@ struct _Elm_Ctxpopup_Item_Data
    const char   *label;
    Evas_Object  *icon;
    Evas_Object  *btn;
+   Eina_Stringshare *style;
 
    struct
      {