new API is added to elm_segment_control
authorsumanth.m <sumanth.m@samsung.com>
Tue, 7 Sep 2010 15:22:11 +0000 (20:52 +0530)
committersumanth.m <sumanth.m@samsung.com>
Tue, 7 Sep 2010 15:22:11 +0000 (20:52 +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 bba14a9..9d3edd4
@@ -1303,6 +1303,7 @@ extern "C" {
    EAPI Elm_Segment_Item *elm_segment_control_item_selected_get(const Evas_Object *obj);
    EAPI int          elm_segment_control_get_segment_count(Evas_Object *obj);
    EAPI int          elm_segment_control_item_count_get(Evas_Object *obj);
+   EAPI int          elm_segment_control_item_index_get(Elm_Segment_Item *item);
    EAPI Evas_Object *elm_segment_control_item_object_get(Elm_Segment_Item *it);
 
    EAPI Evas_Object *elm_page_control_add(Evas_Object *parent);
index 56471fc..16ab912 100644 (file)
@@ -1082,4 +1082,21 @@ elm_segment_control_item_get_at(Evas_Object *obj, unsigned int index)
 
    return it;
 }
+\r
+/**
+ * Select the index of a Segment item of Segmentcontrol
+ * @param item The Segment item.
+ * @return The corresponding index of the Segment item.
+ *
+ * @ingroup SegmentControl SegmentControl
+ */
+
+EAPI int
+elm_segment_control_item_index_get(Elm_Segment_Item *item)
+{
+   Widget_Data *wd = elm_widget_data_get(item->obj);
+   if(!wd) return NULL;
+
+   return item->segment_id;
+}