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