summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elm_segment_control_eo.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/elementary/elm_segment_control_eo.h')
-rw-r--r--src/lib/elementary/elm_segment_control_eo.h186
1 files changed, 186 insertions, 0 deletions
diff --git a/src/lib/elementary/elm_segment_control_eo.h b/src/lib/elementary/elm_segment_control_eo.h
new file mode 100644
index 0000000..36c7805
--- /dev/null
+++ b/src/lib/elementary/elm_segment_control_eo.h
@@ -0,0 +1,186 @@
1#ifndef _ELM_SEGMENT_CONTROL_EO_H_
2#define _ELM_SEGMENT_CONTROL_EO_H_
3
4#ifndef _ELM_SEGMENT_CONTROL_EO_CLASS_TYPE
5#define _ELM_SEGMENT_CONTROL_EO_CLASS_TYPE
6
7typedef Eo Elm_Segment_Control;
8
9#endif
10
11#ifndef _ELM_SEGMENT_CONTROL_EO_TYPES
12#define _ELM_SEGMENT_CONTROL_EO_TYPES
13
14
15#endif
16/** Elementary segment control class
17 *
18 * @ingroup Elm_Segment_Control
19 */
20#define ELM_SEGMENT_CONTROL_CLASS elm_segment_control_class_get()
21
22EWAPI const Efl_Class *elm_segment_control_class_get(void);
23
24/**
25 * @brief Get the Segment items count from segment control.
26 *
27 * It will just return the number of items added to segment control @c obj.
28 *
29 * @param[in] obj The object.
30 *
31 * @return Segment items count.
32 *
33 * @ingroup Elm_Segment_Control
34 */
35EOAPI int elm_obj_segment_control_item_count_get(const Eo *obj);
36
37/**
38 * @brief Get the selected item.
39 *
40 * The selected item can be unselected with function
41 * elm_segment_control_item_selected_set().
42 *
43 * The selected item always will be highlighted on segment control.
44 *
45 * @param[in] obj The object.
46 *
47 * @return The selected item or @c NULL if none of segment items is selected.
48 *
49 * @ingroup Elm_Segment_Control
50 */
51EOAPI Elm_Widget_Item *elm_obj_segment_control_item_selected_get(const Eo *obj);
52
53/**
54 * @brief Get the label of item.
55 *
56 * The return value is a pointer to the label associated to the item when it
57 * was created, with function elm_segment_control_item_add(), or later with
58 * function elm_object_item_text_set. If no label was passed as argument, it
59 * will return @c NULL.
60 *
61 * @param[in] obj The object.
62 * @param[in] idx The index of the segment item.
63 *
64 * @return The label of the item at @c index.
65 *
66 * @ingroup Elm_Segment_Control
67 */
68EOAPI const char *elm_obj_segment_control_item_label_get(const Eo *obj, int idx);
69
70/**
71 * @brief Insert a new item to the segment control object at specified
72 * position.
73 *
74 * Index values must be between $0, when item will be prepended to segment
75 * control, and items count, that can be get with
76 * elm_segment_control_item_count_get(), case when item will be appended to
77 * segment control, just like elm_segment_control_item_add().
78 *
79 * Items created with this function can be deleted with function
80 * elm_object_item_del() or elm_segment_control_item_del_at().
81 *
82 * @note @c label set to @c NULL is different from empty string "". If an item
83 * only has icon, it will be displayed bigger and centered. If it has icon and
84 * label, even that an empty string, icon will be smaller and positioned at
85 * left.
86 *
87 * @param[in] obj The object.
88 * @param[in] icon The icon object to use for the left side of the item. An
89 * icon can be any Evas object, but usually it is an icon created with
90 * elm_icon_add().
91 * @param[in] label The label of the item.
92 * @param[in] idx Item position. Value should be between 0 and items count.
93 *
94 * @return The created item or @c NULL upon failure.
95 *
96 * @ingroup Elm_Segment_Control
97 */
98EOAPI Elm_Widget_Item *elm_obj_segment_control_item_insert_at(Eo *obj, Efl_Canvas_Object *icon, const char *label, int idx);
99
100/**
101 * @brief Get the item placed at specified index.
102 *
103 * Index is the position of an item in segment control widget. Its range is
104 * from $0 to <tt> count - 1 </tt>. Count is the number of items, that can be
105 * get with elm_segment_control_item_count_get().
106 *
107 * @param[in] obj The object.
108 * @param[in] idx The index of the segment item.
109 *
110 * @return The segment control item or @c NULL on failure.
111 *
112 * @ingroup Elm_Segment_Control
113 */
114EOAPI Elm_Widget_Item *elm_obj_segment_control_item_get(const Eo *obj, int idx);
115
116/**
117 * @brief Remove a segment control item at given index from its parent,
118 * deleting it.
119 *
120 * Items can be added with elm_segment_control_item_add() or
121 * elm_segment_control_item_insert_at().
122 *
123 * @param[in] obj The object.
124 * @param[in] idx The position of the segment control item to be deleted.
125 *
126 * @ingroup Elm_Segment_Control
127 */
128EOAPI void elm_obj_segment_control_item_del_at(Eo *obj, int idx);
129
130/**
131 * @brief Append a new item to the segment control object.
132 *
133 * A new item will be created and appended to the segment control, i.e., will
134 * be set as last item.
135 *
136 * If it should be inserted at another position,
137 * elm_segment_control_item_insert_at() should be used instead.
138 *
139 * Items created with this function can be deleted with function
140 * elm_object_item_del() or elm_object_item_del_at().
141 *
142 * @note @c label set to @c NULL is different from empty string "". If an item
143 * only has icon, it will be displayed bigger and centered. If it has icon and
144 * label, even that an empty string, icon will be smaller and positioned at
145 * left.
146 *
147 * @param[in] obj The object.
148 * @param[in] icon The icon object to use for the left side of the item. An
149 * icon can be any Evas object, but usually it is an icon created with
150 * elm_icon_add().
151 * @param[in] label The label of the item. Note that, NULL is different from
152 * empty string "".
153 *
154 * @return The created item or @c NULL upon failure.
155 *
156 * @ingroup Elm_Segment_Control
157 */
158EOAPI Elm_Widget_Item *elm_obj_segment_control_item_add(Eo *obj, Efl_Canvas_Object *icon, const char *label);
159
160/**
161 * @brief Get the icon associated to the item.
162 *
163 * The return value is a pointer to the icon associated to the item when it was
164 * created, with function elm_segment_control_item_add(), or later with
165 * function elm_object_item_part_content_set(). If no icon was passed as
166 * argument, it will return @c NULL.
167 *
168 * @param[in] obj The object.
169 * @param[in] idx The index of the segment item.
170 *
171 * @return The left side icon associated to the item at @c index.
172 *
173 * @ingroup Elm_Segment_Control
174 */
175EOAPI Efl_Canvas_Object *elm_obj_segment_control_item_icon_get(const Eo *obj, int idx);
176
177EWAPI extern const Efl_Event_Description _ELM_SEGMENT_CONTROL_EVENT_CHANGED;
178
179/** Called when segment control changed
180 * @return Efl_Object *
181 *
182 * @ingroup Elm_Segment_Control
183 */
184#define ELM_SEGMENT_CONTROL_EVENT_CHANGED (&(_ELM_SEGMENT_CONTROL_EVENT_CHANGED))
185
186#endif