1 #ifndef _ELM_FLIPSELECTOR_EO_H_ 2 #define _ELM_FLIPSELECTOR_EO_H_ 3 4 #ifndef _ELM_FLIPSELECTOR_EO_CLASS_TYPE 5 #define _ELM_FLIPSELECTOR_EO_CLASS_TYPE 6 7 typedef Eo Elm_Flipselector; 8 9 #endif 10 11 #ifndef _ELM_FLIPSELECTOR_EO_TYPES 12 #define _ELM_FLIPSELECTOR_EO_TYPES 13 14 15 #endif 16 /** Elementary flipselector class 17 * 18 * @ingroup Elm_Flipselector 19 */ 20 #define ELM_FLIPSELECTOR_CLASS elm_flipselector_class_get() 21 22 EWAPI const Efl_Class *elm_flipselector_class_get(void) EINA_CONST; 23 24 /** 25 * @brief Get the internal list of items in a given flip selector widget. 26 * 27 * This list is not to be modified in any way and must not be freed. Use the 28 * list members with functions like @ref elm_object_item_text_set, @ref 29 * elm_object_item_text_get, @ref elm_object_item_del, @ref 30 * elm_flipselector_item_selected_get, @ref elm_flipselector_item_selected_set. 31 * 32 * @warning This list is only valid until @c obj object's internal items list 33 * is changed. It should be fetched again with another call to this function 34 * when changes happen. 35 * 36 * @param[in] obj The object. 37 * 38 * @return List of items 39 * 40 * @ingroup Elm_Flipselector 41 */ 42 EOAPI const Eina_List *elm_obj_flipselector_items_get(const Eo *obj); 43 44 /** 45 * @brief Get the first item in the given flip selector widget's list of items. 46 * 47 * See also @ref elm_obj_flipselector_item_append, 48 * @ref elm_obj_flipselector_last_item_get. 49 * 50 * @param[in] obj The object. 51 * 52 * @return The first item or @c null, if it has no items (and on errors). 53 * 54 * @ingroup Elm_Flipselector 55 */ 56 EOAPI Elm_Widget_Item *elm_obj_flipselector_first_item_get(const Eo *obj); 57 58 /** 59 * @brief Get the last item in the given flip selector widget's list of items. 60 * 61 * See also @ref elm_obj_flipselector_item_prepend, 62 * @ref elm_obj_flipselector_first_item_get. 63 * 64 * @param[in] obj The object. 65 * 66 * @return The last item or @c null, if it has no items (and on errors). 67 * 68 * @ingroup Elm_Flipselector 69 */ 70 EOAPI Elm_Widget_Item *elm_obj_flipselector_last_item_get(const Eo *obj); 71 72 /** 73 * @brief Get the currently selected item in a flip selector widget. 74 * 75 * @param[in] obj The object. 76 * 77 * @return The selected item or @c null, if the widget has no items (and on 78 * errors). 79 * 80 * @ingroup Elm_Flipselector 81 */ 82 EOAPI Elm_Widget_Item *elm_obj_flipselector_selected_item_get(const Eo *obj); 83 84 /** 85 * @brief Set the interval on time updates for a user mouse button hold on a 86 * flip selector widget. 87 * 88 * This interval value is decreased while the user holds the mouse pointer 89 * either flipping up or flipping down a given flip selector. 90 * 91 * This helps the user to get to a given item distant from the current one 92 * easier/faster, as it will start to flip quicker and quicker on mouse button 93 * holds. 94 * 95 * The calculation for the next flip interval value, starting from the one set 96 * with this call, is the previous interval divided by 1.05, so it decreases a 97 * little bit. 98 * 99 * The default starting interval value for automatic flips is 0.85 seconds. 100 * 101 * See also @ref elm_obj_flipselector_first_interval_get. 102 * 103 * @param[in] obj The object. 104 * @param[in] interval The (first) interval value in seconds. 105 * 106 * @ingroup Elm_Flipselector 107 */ 108 EOAPI void elm_obj_flipselector_first_interval_set(Eo *obj, double interval); 109 110 /** 111 * @brief Get the interval on time updates for a user mouse button hold on a 112 * flip selector widget. 113 * 114 * See also @ref elm_obj_flipselector_first_interval_set for more details. 115 * 116 * @param[in] obj The object. 117 * 118 * @return The (first) interval value in seconds. 119 * 120 * @ingroup Elm_Flipselector 121 */ 122 EOAPI double elm_obj_flipselector_first_interval_get(const Eo *obj); 123 124 /** 125 * @brief Prepend a (text) item to a flip selector widget 126 * 127 * The widget's list of labels to show will be prepended with the given value. 128 * If the user wishes so, a callback function pointer can be passed, which will 129 * get called when this same item is selected. 130 * 131 * @note The current selection won't be modified by prepending an element to 132 * the list. 133 * 134 * @note The maximum length of the text label is going to be determined by the 135 * widget's theme. Strings larger than that value are going to be truncated. 136 * 137 * @param[in] obj The object. 138 * @param[in] label The (text) label of the new item. 139 * @param[in] func Convenience callback function to take place when item is 140 * selected. 141 * @param[in] data Data passed to @c func, above. 142 * 143 * @return New widget item 144 * 145 * @ingroup Elm_Flipselector 146 */ 147 EOAPI Elm_Widget_Item *elm_obj_flipselector_item_prepend(Eo *obj, const char *label, Evas_Smart_Cb func, void *data); 148 149 /** 150 * @brief Programmatically select the next item of a flip selector widget 151 * 152 * @note The selection will be animated. Also, if it reaches the end of its 153 * list of member items, it will continue with the first one onwards. 154 * @param[in] obj The object. 155 * 156 * @ingroup Elm_Flipselector 157 */ 158 EOAPI void elm_obj_flipselector_flip_next(Eo *obj); 159 160 /** 161 * @brief Append a (text) item to a flip selector widget 162 * 163 * The widget's list of labels to show will be appended with the given value. 164 * If the user wishes so, a callback function pointer can be passed, which will 165 * get called when this same item is selected. 166 * 167 * @note The current selection won't be modified by appending an element to the 168 * list. 169 * 170 * @note The maximum length of the text label is going to be determined by the 171 * widget's theme. Strings larger than that value are going to be truncated. 172 * 173 * @param[in] obj The object. 174 * @param[in] label The (text) label of the new item. 175 * @param[in] func Convenience callback function to take place when item is 176 * selected. 177 * @param[in] data Data passed to @c func, above. 178 * 179 * @return New widget item 180 * 181 * @ingroup Elm_Flipselector 182 */ 183 EOAPI Elm_Widget_Item *elm_obj_flipselector_item_append(Eo *obj, const char *label, Evas_Smart_Cb func, const void *data); 184 185 /** 186 * @brief Programmatically select the previous item of a flip selector widget 187 * 188 * @note The selection will be animated. Also, if it reaches the beginning of 189 * its list of member items, it will continue with the last one backwards. 190 * @param[in] obj The object. 191 * 192 * @ingroup Elm_Flipselector 193 */ 194 EOAPI void elm_obj_flipselector_flip_prev(Eo *obj); 195 196 EWAPI extern const Efl_Event_Description _ELM_FLIPSELECTOR_EVENT_UNDERFLOWED; 197 198 /** Called when flipselector is underflowed 199 * 200 * @ingroup Elm_Flipselector 201 */ 202 #define ELM_FLIPSELECTOR_EVENT_UNDERFLOWED (&(_ELM_FLIPSELECTOR_EVENT_UNDERFLOWED)) 203 204 EWAPI extern const Efl_Event_Description _ELM_FLIPSELECTOR_EVENT_OVERFLOWED; 205 206 /** Called when flipselector is overflowed 207 * 208 * @ingroup Elm_Flipselector 209 */ 210 #define ELM_FLIPSELECTOR_EVENT_OVERFLOWED (&(_ELM_FLIPSELECTOR_EVENT_OVERFLOWED)) 211 212 #endif 213