elc_ctxpopup: Add item_style_get API 24/166424/1
authorShilpa Singh <shilpa.singh@samsung.com>
Wed, 15 Nov 2017 12:48:33 +0000 (18:18 +0530)
committerJin Yong Park <j4939.park@samsung.com>
Wed, 10 Jan 2018 06:49:09 +0000 (06:49 +0000)
Change-Id: I1911c4fb41a21e71ffeb9cfde193755872f6909b
Signed-off-by: Shilpa Singh <shilpa.singh@samsung.com>
(cherry picked from commit 62bfee336397cc980f003e27213f2ffefae4c545)

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 198a401..e5ba191 100644 (file)
@@ -1019,6 +1019,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
      {