comments
authorsumanth.m <sumanth.m@samsung.com>
Thu, 26 Aug 2010 13:39:06 +0000 (19:09 +0530)
committersumanth.m <sumanth.m@samsung.com>
Thu, 26 Aug 2010 13:39:06 +0000 (19:09 +0530)
src/lib/Elementary.h.in [changed mode: 0755->0644]
src/lib/elm_segment_control.c

old mode 100755 (executable)
new mode 100644 (file)
index f474eca..4eec027
@@ -1280,6 +1280,10 @@ extern "C" {
    EAPI Evas_Object *elm_segment_control_get_segment_icon_at(Evas_Object *obj, unsigned int index);
    EAPI Elm_Segment_Item *elm_segment_control_selected_segment_get(const Evas_Object *obj, int *value);
    EAPI int          elm_segment_control_get_segment_count(Evas_Object *obj);
    EAPI Evas_Object *elm_segment_control_get_segment_icon_at(Evas_Object *obj, unsigned int index);
    EAPI Elm_Segment_Item *elm_segment_control_selected_segment_get(const Evas_Object *obj, int *value);
    EAPI int          elm_segment_control_get_segment_count(Evas_Object *obj);
+   EAPI Evas_Object *elm_segment_control_item_object_get(Elm_Segment_Item *it);
+   EAPI void         elm_segment_control_item_add(Evas_Object *obj, Evas_Object *icon, const char *label, Eina_Bool animate);
+   EAPI void         elm_segment_control_item_insert_at(Evas_Object *obj, Evas_Object *icon, const char *label, unsigned int index, Eina_Bool animate);
+   EAPI void         elm_segment_control_item_delete(Evas_Object *obj, Elm_Segment_Item *item, Eina_Bool animate);
 
    EAPI Evas_Object *elm_page_control_add(Evas_Object *parent);
    EAPI void         elm_page_control_page_count_set(Evas_Object *obj, unsigned int page_count);
 
    EAPI Evas_Object *elm_page_control_add(Evas_Object *parent);
    EAPI void         elm_page_control_page_count_set(Evas_Object *obj, unsigned int page_count);
index 0034189..9c4531d 100644 (file)
@@ -570,8 +570,8 @@ _animator_animate_del_cb(Evas_Object *obj)
  * @ingroup SegmentControl SegmentControl
  */
 
  * @ingroup SegmentControl SegmentControl
  */
 
-EAPI Elm_Segment_Item *
-elm_segment_control_add_segment(Evas_Object *obj, Evas_Object *icon, const char *label, Eina_Bool animate)
+EAPI void
+elm_segment_control_item_add(Evas_Object *obj, Evas_Object *icon, const char *label, Eina_Bool animate)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
    if(!wd) return NULL;
 {
    Widget_Data *wd = elm_widget_data_get(obj);
    if(!wd) return NULL;
@@ -604,7 +604,20 @@ elm_segment_control_add_segment(Evas_Object *obj, Evas_Object *icon, const char
    evas_object_box_append(wd->box, it->base);
    evas_object_smart_calculate(wd->box);
 
    evas_object_box_append(wd->box, it->base);
    evas_object_smart_calculate(wd->box);
 
-   return it;
+   return;
+}
+
+EAPI Elm_Segment_Item *
+elm_segment_control_add_segment(Evas_Object *obj, Evas_Object *icon, const char *label, Eina_Bool animate)
+{ 
+   fprintf(stderr, "=================> Caution!!! <========================\n");
+   fprintf(stderr, "==> elm_segment_control_add_segment() is deprecated. <=======\n");
+   fprintf(stderr, "==> Please use elm_segment_control_item_add() instead. <==\n");
+   fprintf(stderr, "=======================================================\n");
+
+   elm_segment_control_item_add(obj, icon, label, animate);
+
+   return NULL;
 }
 
 
 }
 
 
@@ -658,7 +671,7 @@ _item_search(Evas_Object *obj, Elm_Segment_Item *item)
  * @ingroup SegmentControl SegmentControl
  */
 EAPI void
  * @ingroup SegmentControl SegmentControl
  */
 EAPI void
-elm_segment_control_insert_segment_at(Evas_Object *obj, Evas_Object *icon, const char *label, unsigned int index, Eina_Bool animate)
+elm_segment_control_item_insert_at(Evas_Object *obj, Evas_Object *icon, const char *label, unsigned int index, Eina_Bool animate)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
    if(!wd) return;
 {
    Widget_Data *wd = elm_widget_data_get(obj);
    if(!wd) return;
@@ -707,6 +720,19 @@ elm_segment_control_insert_segment_at(Evas_Object *obj, Evas_Object *icon, const
    return;
 }
 
    return;
 }
 
+EAPI void
+elm_segment_control_insert_segment_at(Evas_Object *obj, Evas_Object *icon, const char *label, unsigned int index, Eina_Bool animate)
+{
+   fprintf(stderr, "=================> Caution!!! <========================\n");
+   fprintf(stderr, "==> elm_segment_control_insert_segment_at() is deprecated. <=======\n");
+   fprintf(stderr, "==> Please use elm_segment_control_item_insert_at() instead. <==\n");
+   fprintf(stderr, "=======================================================\n");
+
+   elm_segment_control_item_insert_at(obj, icon, label, index, animate);
+
+   return;
+}
+
 /**
  * Delete a segment to segmentcontrol
  * @param obj The SegmentControl object
 /**
  * Delete a segment to segmentcontrol
  * @param obj The SegmentControl object
@@ -716,7 +742,7 @@ elm_segment_control_insert_segment_at(Evas_Object *obj, Evas_Object *icon, const
  * @ingroup SegmentControl SegmentControl
  */
 EAPI void
  * @ingroup SegmentControl SegmentControl
  */
 EAPI void
-elm_segment_control_delete_segment(Evas_Object *obj, Elm_Segment_Item *item, Eina_Bool animate)
+elm_segment_control_item_delete(Evas_Object *obj, Elm_Segment_Item *item, Eina_Bool animate)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
    if(!wd) return;
 {
    Widget_Data *wd = elm_widget_data_get(obj);
    if(!wd) return;
@@ -746,6 +772,18 @@ elm_segment_control_delete_segment(Evas_Object *obj, Elm_Segment_Item *item, Ein
    wd->id = eina_list_count(wd->seg_ctrl);
    return;
 }
    wd->id = eina_list_count(wd->seg_ctrl);
    return;
 }
+EAPI void
+elm_segment_control_delete_segment(Evas_Object *obj, Elm_Segment_Item *item, Eina_Bool animate)
+{
+   fprintf(stderr, "=================> Caution!!! <========================\n");
+   fprintf(stderr, "==> elm_segment_control_delete_segment() is deprecated. <=======\n");
+   fprintf(stderr, "==> Please use elm_segment_control_item_delete() instead. <==\n");
+   fprintf(stderr, "=======================================================\n");
+
+   elm_segment_control_item_delete(obj, item, animate);
+
+   return;
+}
 
 /**
  * Delete a segment to segmentcontrol
 
 /**
  * Delete a segment to segmentcontrol
@@ -882,3 +920,10 @@ elm_segment_control_get_segment_count(Evas_Object *obj)
    return wd->id;
 }
 
    return wd->id;
 }
 
+EAPI Evas_Object *
+elm_segment_control_item_object_get(Elm_Segment_Item *it)
+{
+   if (!it) return NULL;
+   return it->base;
+}
+