summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChunEon Park <hermet@hermet.pe.kr>2012-01-02 11:46:32 +0000
committerChunEon Park <hermet@hermet.pe.kr>2012-01-02 11:46:32 +0000
commit6db2dad09c58fe1a9bc853a9428ab2ae229cbb09 (patch)
tree96752edfde3d29e762bad0b61a9de6acdabd583e /src
parente84b8d1193735f312c664d0ae256a0d3a90d591a (diff)
elementary - Added 1 more API elm_object_item_del_cb_set()
also deprecated below APIs elm_hoversel_item_del_cb_set() elm_diskselector_item_del_cb_set() elm_toolbar_item_del_cb_set() elm_index_item_del_cb_set() elm_menu_item_del_cb_set() SVN revision: 66748
Diffstat (limited to 'src')
-rw-r--r--src/examples/diskselector_example_02.c2
-rw-r--r--src/examples/hoversel_example_01.c2
-rw-r--r--src/examples/index_example_01.c2
-rw-r--r--src/examples/web_example.c2
-rw-r--r--src/lib/elc_hoversel.c3
-rw-r--r--src/lib/elc_hoversel.h18
-rw-r--r--src/lib/elm_deprecated.h85
-rw-r--r--src/lib/elm_diskselector.c3
-rw-r--r--src/lib/elm_diskselector.h23
-rw-r--r--src/lib/elm_index.c3
-rw-r--r--src/lib/elm_index.h18
-rw-r--r--src/lib/elm_main.c4
-rw-r--r--src/lib/elm_menu.c3
-rw-r--r--src/lib/elm_menu.h11
-rw-r--r--src/lib/elm_object_item.h17
-rw-r--r--src/lib/elm_toolbar.c3
-rw-r--r--src/lib/elm_toolbar.h30
17 files changed, 121 insertions, 108 deletions
diff --git a/src/examples/diskselector_example_02.c b/src/examples/diskselector_example_02.c
index 8ac55befb..36f0fed61 100644
--- a/src/examples/diskselector_example_02.c
+++ b/src/examples/diskselector_example_02.c
@@ -102,7 +102,7 @@ _add_data_cb(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED_
102 printf("Error adding item\n"); 102 printf("Error adding item\n");
103 return; 103 return;
104 } 104 }
105 elm_diskselector_item_del_cb_set(ds_it, _free_data); 105 elm_object_item_del_cb_set(ds_it, _free_data);
106} 106}
107 107
108static void 108static void
diff --git a/src/examples/hoversel_example_01.c b/src/examples/hoversel_example_01.c
index 769f87801..eb3038efc 100644
--- a/src/examples/hoversel_example_01.c
+++ b/src/examples/hoversel_example_01.c
@@ -94,7 +94,7 @@ _add_item(void *data, Evas_Object *obj, void *event_info)
94 94
95 hoversel_it = elm_hoversel_item_add(obj, str, NULL, ELM_ICON_NONE, NULL, 95 hoversel_it = elm_hoversel_item_add(obj, str, NULL, ELM_ICON_NONE, NULL,
96 str); 96 str);
97 elm_hoversel_item_del_cb_set(hoversel_it, _free); 97 elm_object_item_del_cb_set(hoversel_it, _free);
98} 98}
99 99
100static void 100static void
diff --git a/src/examples/index_example_01.c b/src/examples/index_example_01.c
index 0dbc846f0..f6f5d0a2a 100644
--- a/src/examples/index_example_01.c
+++ b/src/examples/index_example_01.c
@@ -164,7 +164,7 @@ elm_main(int argc __UNUSED__,
164 elm_index_item_append(d.index, buf, it); 164 elm_index_item_append(d.index, buf, it);
165 index_it = elm_index_item_find(d.index, it); 165 index_it = elm_index_item_find(d.index, it);
166 166
167 elm_index_item_del_cb_set(index_it, _index_item_del); 167 elm_object_item_del_cb_set(index_it, _index_item_del);
168 } 168 }
169 } 169 }
170 170
diff --git a/src/examples/web_example.c b/src/examples/web_example.c
index 4fedfcebb..91814d8f2 100644
--- a/src/examples/web_example.c
+++ b/src/examples/web_example.c
@@ -156,7 +156,7 @@ tab_add(App_Data *ad)
156 td->app = ad; 156 td->app = ad;
157 td->tab = elm_toolbar_item_append(td->app->tabs, NULL, "New tab", 157 td->tab = elm_toolbar_item_append(td->app->tabs, NULL, "New tab",
158 _tab_clicked_cb, td); 158 _tab_clicked_cb, td);
159 elm_toolbar_item_del_cb_set(td->tab, _tb_item_del_cb); 159 elm_object_item_del_cb_set(td->tab, _tb_item_del_cb);
160 160
161 evas_object_data_set(td->web, "tab_data", td); 161 evas_object_data_set(td->web, "tab_data", td);
162 162
diff --git a/src/lib/elc_hoversel.c b/src/lib/elc_hoversel.c
index ea0d686c8..4c1c3d80c 100644
--- a/src/lib/elc_hoversel.c
+++ b/src/lib/elc_hoversel.c
@@ -515,8 +515,7 @@ elm_hoversel_item_del(Elm_Object_Item *it)
515EAPI void 515EAPI void
516elm_hoversel_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb func) 516elm_hoversel_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb func)
517{ 517{
518 ELM_OBJ_ITEM_CHECK_OR_RETURN(it); 518 elm_object_item_del_cb_set(it, func);
519 elm_widget_item_del_cb_set(it, func);
520} 519}
521 520
522EAPI void * 521EAPI void *
diff --git a/src/lib/elc_hoversel.h b/src/lib/elc_hoversel.h
index d0de65384..63dab9fe6 100644
--- a/src/lib/elc_hoversel.h
+++ b/src/lib/elc_hoversel.h
@@ -127,7 +127,6 @@ EAPI Eina_Bool elm_hoversel_expanded_get(const Evas_Object *o
127 * @warning Should @b not be called while the hoversel is active; use 127 * @warning Should @b not be called while the hoversel is active; use
128 * elm_hoversel_expanded_get() to check first. 128 * elm_hoversel_expanded_get() to check first.
129 * 129 *
130 * @see elm_hoversel_item_del_cb_set()
131 * @see elm_hoversel_item_del() 130 * @see elm_hoversel_item_del()
132 */ 131 */
133EAPI void elm_hoversel_clear(Evas_Object *obj); 132EAPI void elm_hoversel_clear(Evas_Object *obj);
@@ -173,27 +172,10 @@ EAPI Elm_Object_Item *elm_hoversel_item_add(Evas_Object *obj, const
173 * hoversel is active; use elm_hoversel_expanded_get() to check first). 172 * hoversel is active; use elm_hoversel_expanded_get() to check first).
174 * 173 *
175 * @see elm_hoversel_item_add() 174 * @see elm_hoversel_item_add()
176 * @see elm_hoversel_item_del_cb_set()
177 */ 175 */
178EAPI void elm_hoversel_item_del(Elm_Object_Item *it); 176EAPI void elm_hoversel_item_del(Elm_Object_Item *it);
179 177
180/** 178/**
181 * @brief Set the function to be called when an item from the hoversel is
182 * freed.
183 *
184 * @param it The item to set the callback on
185 * @param func The function called
186 *
187 * That function will receive these parameters:
188 * @li void * item data
189 * @li Evas_Object * hoversel object
190 * @li Elm_Object_Item * hoversel item
191 *
192 * @see elm_hoversel_item_add()
193 */
194EAPI void elm_hoversel_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb func);
195
196/**
197 * @brief This sets the icon for the given hoversel item. 179 * @brief This sets the icon for the given hoversel item.
198 * 180 *
199 * @param it The item to set the icon 181 * @param it The item to set the icon
diff --git a/src/lib/elm_deprecated.h b/src/lib/elm_deprecated.h
index 3ad2cf64e..3341b93ee 100644
--- a/src/lib/elm_deprecated.h
+++ b/src/lib/elm_deprecated.h
@@ -566,6 +566,23 @@ EINA_DEPRECATED EAPI void *elm_hoversel_item_data_get(const Elm_Object_It
566EINA_DEPRECATED EAPI const char *elm_hoversel_item_label_get(const Elm_Object_Item *it); 566EINA_DEPRECATED EAPI const char *elm_hoversel_item_label_get(const Elm_Object_Item *it);
567 567
568/** 568/**
569 * @brief Set the function to be called when an item from the hoversel is
570 * freed.
571 *
572 * @param it The item to set the callback on
573 * @param func The function called
574 *
575 * That function will receive these parameters:
576 * @li void * item data
577 * @li Evas_Object * hoversel object
578 * @li Elm_Object_Item * hoversel item
579 *
580 * @see elm_hoversel_item_add()
581 * @deprecated Use elm_object_item_del_cb_set() instead
582 */
583EINA_DEPRECATED EAPI void elm_hoversel_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb func);
584
585/**
569 * Set actionslider labels. 586 * Set actionslider labels.
570 * 587 *
571 * @param obj The actionslider object 588 * @param obj The actionslider object
@@ -1245,6 +1262,26 @@ EINA_DEPRECATED EAPI void elm_diskselector_item_label_set(Elm_
1245 */ 1262 */
1246EINA_DEPRECATED EAPI const char *elm_diskselector_item_label_get(const Elm_Object_Item *it); 1263EINA_DEPRECATED EAPI const char *elm_diskselector_item_label_get(const Elm_Object_Item *it);
1247 1264
1265/**
1266 * Set the function called when a diskselector item is freed.
1267 *
1268 * @param it The item to set the callback on
1269 * @param func The function called
1270 *
1271 * If there is a @p func, then it will be called prior item's memory release.
1272 * That will be called with the following arguments:
1273 * @li item's data;
1274 * @li item's Evas object;
1275 * @li item itself;
1276 *
1277 * This way, a data associated to a diskselector item could be properly
1278 * freed.
1279 * @deprecated Use elm_object_item_del_cb_set() instead
1280 *
1281 * @ingroup Diskselector
1282 */
1283EINA_DEPRECATED EAPI void elm_diskselector_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb func);
1284
1248EINA_DEPRECATED EAPI void elm_factory_content_set(Evas_Object *obj, Evas_Object *content); 1285EINA_DEPRECATED EAPI void elm_factory_content_set(Evas_Object *obj, Evas_Object *content);
1249EINA_DEPRECATED EAPI Evas_Object *elm_factory_content_get(const Evas_Object *obj); 1286EINA_DEPRECATED EAPI Evas_Object *elm_factory_content_get(const Evas_Object *obj);
1250 1287
@@ -1402,7 +1439,22 @@ EINA_DEPRECATED EAPI void *elm_index_item_data_get(const Elm_Object_Item *item);
1402EINA_DEPRECATED EAPI void elm_index_item_data_set(Elm_Object_Item *it, const void *data); 1439EINA_DEPRECATED EAPI void elm_index_item_data_set(Elm_Object_Item *it, const void *data);
1403 1440
1404/** 1441/**
1405 * @brief Set the label on the label object 1442 * Set the function to be called when a given index widget item is freed.
1443 *
1444 * @param it The item to set the callback on
1445 * @param func The function to call on the item's deletion
1446 *
1447 * When called, @p func will have both @c data and @c event_info
1448 * arguments with the @p it item's data value and, naturally, the
1449 * @c obj argument with a handle to the parent index widget.
1450 *
1451 * @deprecated Use elm_object_item_del_cb_set() instead
1452 * @ingroup Index
1453 */
1454EINA_DEPRECATED EAPI void elm_index_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb func);
1455
1456/**
1457* @brief Set the label on the label object
1406 * 1458 *
1407 * @param obj The label object 1459 * @param obj The label object
1408 * @param label The label will be used on the label object 1460 * @param label The label will be used on the label object
@@ -1659,6 +1711,18 @@ EINA_DEPRECATED EAPI Eina_Bool elm_menu_item_disabled_get(const Elm_Object_It
1659EINA_DEPRECATED EAPI void *elm_menu_item_data_get(const Elm_Object_Item *it); 1711EINA_DEPRECATED EAPI void *elm_menu_item_data_get(const Elm_Object_Item *it);
1660 1712
1661/** 1713/**
1714 * @brief Set the function called when a menu item is deleted.
1715 *
1716 * @param it The item to set the callback on
1717 * @param func The function called
1718 *
1719 * @see elm_menu_item_add()
1720 * @see elm_menu_item_del()
1721 * @deprecated Use elm_object_item_del_cb_set() instead
1722 */
1723EINA_DEPRECATED EAPI void elm_menu_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb func);
1724
1725/**
1662 * @brief Sets the data to be associated with menu item @p item. 1726 * @brief Sets the data to be associated with menu item @p item.
1663 * 1727 *
1664 * @param it The item 1728 * @param it The item
@@ -2458,6 +2522,25 @@ EINA_DEPRECATED EAPI void elm_toolbar_orientation_set(Evas_Object *obj,
2458EINA_DEPRECATED EAPI Eina_Bool elm_toolbar_orientation_get(const Evas_Object *obj); 2522EINA_DEPRECATED EAPI Eina_Bool elm_toolbar_orientation_get(const Evas_Object *obj);
2459 2523
2460/** 2524/**
2525 * Set the function called when a toolbar item is freed.
2526 *
2527 * @param it The item to set the callback on.
2528 * @param func The function called.
2529 *
2530 * If there is a @p func, then it will be called prior item's memory release.
2531 * That will be called with the following arguments:
2532 * @li item's data;
2533 * @li item's Evas object;
2534 * @li item itself;
2535 *
2536 * This way, a data associated to a toolbar item could be properly freed.
2537 *
2538 * @deprecated Use elm_object_item_del_cb_set() instead
2539 * @ingroup Toolbar
2540 */
2541EINA_DEPRECATED EAPI void elm_toolbar_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb func);
2542
2543/**
2461 * @brief Link a Elm_Payer with an Elm_Video object. 2544 * @brief Link a Elm_Payer with an Elm_Video object.
2462 * 2545 *
2463 * @param player the Elm_Player object. 2546 * @param player the Elm_Player object.
diff --git a/src/lib/elm_diskselector.c b/src/lib/elm_diskselector.c
index 842ca9d67..1f232a17f 100644
--- a/src/lib/elm_diskselector.c
+++ b/src/lib/elm_diskselector.c
@@ -1321,8 +1321,7 @@ elm_diskselector_item_selected_get(const Elm_Object_Item *it)
1321EAPI void 1321EAPI void
1322elm_diskselector_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb func) 1322elm_diskselector_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb func)
1323{ 1323{
1324 ELM_OBJ_ITEM_CHECK_OR_RETURN(it); 1324 elm_object_item_del_cb_set(it, func);
1325 elm_widget_item_del_cb_set(it, func);
1326} 1325}
1327 1326
1328EAPI void * 1327EAPI void *
diff --git a/src/lib/elm_diskselector.h b/src/lib/elm_diskselector.h
index d1f316bed..47e8688c5 100644
--- a/src/lib/elm_diskselector.h
+++ b/src/lib/elm_diskselector.h
@@ -268,7 +268,7 @@ EAPI const Eina_List *elm_diskselector_items_get(const Evas_Object *obj);
268 * elm_diskselector_item_del(). 268 * elm_diskselector_item_del().
269 * 269 *
270 * Associated @p data can be properly freed when item is deleted if a 270 * Associated @p data can be properly freed when item is deleted if a
271 * callback function is set with elm_diskselector_item_del_cb_set(). 271 * callback function is set with elm_object_item_del_cb_set().
272 * 272 *
273 * If a function is passed as argument, it will be called everytime this item 273 * If a function is passed as argument, it will be called everytime this item
274 * is selected, i.e., the user stops the diskselector with this 274 * is selected, i.e., the user stops the diskselector with this
@@ -285,7 +285,6 @@ EAPI const Eina_List *elm_diskselector_items_get(const Evas_Object *obj);
285 * @endcode 285 * @endcode
286 * 286 *
287 * @see elm_diskselector_item_del() 287 * @see elm_diskselector_item_del()
288 * @see elm_diskselector_item_del_cb_set()
289 * @see elm_diskselector_clear() 288 * @see elm_diskselector_clear()
290 * @see elm_icon_add() 289 * @see elm_icon_add()
291 * 290 *
@@ -304,32 +303,12 @@ EAPI Elm_Object_Item *elm_diskselector_item_append(Evas_Object *obj, const char
304 * 303 *
305 * @see elm_diskselector_clear() 304 * @see elm_diskselector_clear()
306 * @see elm_diskselector_item_append() 305 * @see elm_diskselector_item_append()
307 * @see elm_diskselector_item_del_cb_set()
308 * 306 *
309 * @ingroup Diskselector 307 * @ingroup Diskselector
310 */ 308 */
311EAPI void elm_diskselector_item_del(Elm_Object_Item *it); 309EAPI void elm_diskselector_item_del(Elm_Object_Item *it);
312 310
313/** 311/**
314 * Set the function called when a diskselector item is freed.
315 *
316 * @param it The item to set the callback on
317 * @param func The function called
318 *
319 * If there is a @p func, then it will be called prior item's memory release.
320 * That will be called with the following arguments:
321 * @li item's data;
322 * @li item's Evas object;
323 * @li item itself;
324 *
325 * This way, a data associated to a diskselector item could be properly
326 * freed.
327 *
328 * @ingroup Diskselector
329 */
330EAPI void elm_diskselector_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb func);
331
332/**
333 * Get the selected item. 312 * Get the selected item.
334 * 313 *
335 * @param obj The diskselector object. 314 * @param obj The diskselector object.
diff --git a/src/lib/elm_index.c b/src/lib/elm_index.c
index 893d4f94e..16927f743 100644
--- a/src/lib/elm_index.c
+++ b/src/lib/elm_index.c
@@ -811,8 +811,7 @@ elm_index_item_data_set(Elm_Object_Item *it, const void *data)
811EAPI void 811EAPI void
812elm_index_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb func) 812elm_index_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb func)
813{ 813{
814 ELM_OBJ_ITEM_CHECK_OR_RETURN(it); 814 elm_object_item_del_cb_set(it, func);
815 elm_widget_item_del_cb_set(it, func);
816} 815}
817 816
818EAPI const char * 817EAPI const char *
diff --git a/src/lib/elm_index.h b/src/lib/elm_index.h
index 6123f613c..e312027cc 100644
--- a/src/lib/elm_index.h
+++ b/src/lib/elm_index.h
@@ -246,7 +246,7 @@ EAPI void elm_index_item_sorted_insert(Evas_Object *obj, const
246 * @param obj The index object 246 * @param obj The index object
247 * @param item The item to be removed from @p obj 247 * @param item The item to be removed from @p obj
248 * 248 *
249 * If a deletion callback is set, via elm_index_item_del_cb_set(), 249 * If a deletion callback is set, via elm_object_item_del_cb_set(),
250 * that callback function will be called by this one. 250 * that callback function will be called by this one.
251 * 251 *
252 * @ingroup Index 252 * @ingroup Index
@@ -269,7 +269,7 @@ EAPI Elm_Object_Item *elm_index_item_find(Evas_Object *obj, const void *ite
269 * 269 *
270 * @param obj The index object. 270 * @param obj The index object.
271 * 271 *
272 * If deletion callbacks are set, via elm_index_item_del_cb_set(), 272 * If deletion callbacks are set, via elm_object_item_del_cb_set(),
273 * that callback function will be called for each item in @p obj. 273 * that callback function will be called for each item in @p obj.
274 * 274 *
275 * @ingroup Index 275 * @ingroup Index
@@ -287,20 +287,6 @@ EAPI void elm_index_item_clear(Evas_Object *obj);
287EAPI void elm_index_item_go(Evas_Object *obj, int level); 287EAPI void elm_index_item_go(Evas_Object *obj, int level);
288 288
289/** 289/**
290 * Set the function to be called when a given index widget item is freed.
291 *
292 * @param it The item to set the callback on
293 * @param func The function to call on the item's deletion
294 *
295 * When called, @p func will have both @c data and @c event_info
296 * arguments with the @p it item's data value and, naturally, the
297 * @c obj argument with a handle to the parent index widget.
298 *
299 * @ingroup Index
300 */
301EAPI void elm_index_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb func);
302
303/**
304 * Get the letter (string) set on a given index widget item. 290 * Get the letter (string) set on a given index widget item.
305 * 291 *
306 * @param it The index item handle 292 * @param it The index item handle
diff --git a/src/lib/elm_main.c b/src/lib/elm_main.c
index 1e2e7876d..e46e60816 100644
--- a/src/lib/elm_main.c
+++ b/src/lib/elm_main.c
@@ -2129,3 +2129,7 @@ EAPI Eina_Bool elm_object_item_disabled_get(const Elm_Object_Item *it)
2129 return _elm_widget_item_disabled_get((Elm_Widget_Item *) it); 2129 return _elm_widget_item_disabled_get((Elm_Widget_Item *) it);
2130} 2130}
2131 2131
2132EAPI void elm_object_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb del_cb)
2133{
2134 _elm_widget_item_del_cb_set((Elm_Widget_Item *) it, del_cb);
2135}
diff --git a/src/lib/elm_menu.c b/src/lib/elm_menu.c
index fc2e678aa..c09999065 100644
--- a/src/lib/elm_menu.c
+++ b/src/lib/elm_menu.c
@@ -920,8 +920,7 @@ elm_menu_item_del(Elm_Object_Item *it)
920EAPI void 920EAPI void
921elm_menu_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb func) 921elm_menu_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb func)
922{ 922{
923 ELM_OBJ_ITEM_CHECK_OR_RETURN(it); 923 elm_object_item_del_cb_set(it, func);
924 elm_widget_item_del_cb_set(it, func);
925} 924}
926 925
927EAPI void * 926EAPI void *
diff --git a/src/lib/elm_menu.h b/src/lib/elm_menu.h
index 398803b04..5f34bdcd3 100644
--- a/src/lib/elm_menu.h
+++ b/src/lib/elm_menu.h
@@ -187,17 +187,6 @@ EAPI Eina_Bool elm_menu_item_is_separator(Elm_Object_Item *it
187EAPI void elm_menu_item_del(Elm_Object_Item *it); 187EAPI void elm_menu_item_del(Elm_Object_Item *it);
188 188
189/** 189/**
190 * @brief Set the function called when a menu item is deleted.
191 *
192 * @param it The item to set the callback on
193 * @param func The function called
194 *
195 * @see elm_menu_item_add()
196 * @see elm_menu_item_del()
197 */
198EAPI void elm_menu_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb func);
199
200/**
201 * @brief Returns a list of @p item's subitems. 190 * @brief Returns a list of @p item's subitems.
202 * 191 *
203 * @param it The item 192 * @param it The item
diff --git a/src/lib/elm_object_item.h b/src/lib/elm_object_item.h
index 5d9e3b1cc..e004d3ef4 100644
--- a/src/lib/elm_object_item.h
+++ b/src/lib/elm_object_item.h
@@ -158,3 +158,20 @@ EAPI void elm_object_item_disabled_set(Elm_Object_Item *
158 * @ingroup Styles 158 * @ingroup Styles
159 */ 159 */
160EAPI Eina_Bool elm_object_item_disabled_get(const Elm_Object_Item *it); 160EAPI Eina_Bool elm_object_item_disabled_get(const Elm_Object_Item *it);
161
162/**
163 * @brief Set the function to be called when an item from the widget is
164 * freed.
165 *
166 * @param it The item to set the callback on
167 * @param func The function called
168 *
169 * That function will receive these parameters:
170 * @li void * item data
171 * @li Evas_Object * widget object
172 * @li Elm_Object_Item * widget item
173 *
174 * @see elm_object_item_del()
175 * @ingroup General
176 */
177EAPI void elm_object_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb del_cb);
diff --git a/src/lib/elm_toolbar.c b/src/lib/elm_toolbar.c
index 55969a278..030bc4b70 100644
--- a/src/lib/elm_toolbar.c
+++ b/src/lib/elm_toolbar.c
@@ -1472,8 +1472,7 @@ elm_toolbar_item_del(Elm_Object_Item *it)
1472EAPI void 1472EAPI void
1473elm_toolbar_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb func) 1473elm_toolbar_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb func)
1474{ 1474{
1475 ELM_OBJ_ITEM_CHECK_OR_RETURN(it); 1475 elm_object_item_del_cb_set(it, func);
1476 elm_widget_item_del_cb_set(it, func);
1477} 1476}
1478 1477
1479EAPI Eina_Bool 1478EAPI Eina_Bool
diff --git a/src/lib/elm_toolbar.h b/src/lib/elm_toolbar.h
index 24e8a2219..06a04d85c 100644
--- a/src/lib/elm_toolbar.h
+++ b/src/lib/elm_toolbar.h
@@ -220,7 +220,7 @@ EAPI Eina_Bool elm_toolbar_no_select_mode_get(const Evas_Obje
220 * elm_toolbar_item_del(). 220 * elm_toolbar_item_del().
221 * 221 *
222 * Associated @p data can be properly freed when item is deleted if a 222 * Associated @p data can be properly freed when item is deleted if a
223 * callback function is set with elm_toolbar_item_del_cb_set(). 223 * callback function is set with elm_object_item_del_cb_set().
224 * 224 *
225 * If a function is passed as argument, it will be called everytime this item 225 * If a function is passed as argument, it will be called everytime this item
226 * is selected, i.e., the user clicks over an unselected item. 226 * is selected, i.e., the user clicks over an unselected item.
@@ -233,7 +233,6 @@ EAPI Eina_Bool elm_toolbar_no_select_mode_get(const Evas_Obje
233 * 233 *
234 * @see elm_toolbar_item_icon_set() 234 * @see elm_toolbar_item_icon_set()
235 * @see elm_toolbar_item_del() 235 * @see elm_toolbar_item_del()
236 * @see elm_toolbar_item_del_cb_set()
237 * 236 *
238 * @ingroup Toolbar 237 * @ingroup Toolbar
239 */ 238 */
@@ -256,7 +255,7 @@ EAPI Elm_Object_Item *elm_toolbar_item_append(Evas_Object *obj, cons
256 * elm_toolbar_item_del(). 255 * elm_toolbar_item_del().
257 * 256 *
258 * Associated @p data can be properly freed when item is deleted if a 257 * Associated @p data can be properly freed when item is deleted if a
259 * callback function is set with elm_toolbar_item_del_cb_set(). 258 * callback function is set with elm_object_item_del_cb_set().
260 * 259 *
261 * If a function is passed as argument, it will be called everytime this item 260 * If a function is passed as argument, it will be called everytime this item
262 * is selected, i.e., the user clicks over an unselected item. 261 * is selected, i.e., the user clicks over an unselected item.
@@ -269,7 +268,6 @@ EAPI Elm_Object_Item *elm_toolbar_item_append(Evas_Object *obj, cons
269 * 268 *
270 * @see elm_toolbar_item_icon_set() 269 * @see elm_toolbar_item_icon_set()
271 * @see elm_toolbar_item_del() 270 * @see elm_toolbar_item_del()
272 * @see elm_toolbar_item_del_cb_set()
273 * 271 *
274 * @ingroup Toolbar 272 * @ingroup Toolbar
275 */ 273 */
@@ -293,7 +291,7 @@ EAPI Elm_Object_Item *elm_toolbar_item_prepend(Evas_Object *obj, con
293 * elm_toolbar_item_del(). 291 * elm_toolbar_item_del().
294 * 292 *
295 * Associated @p data can be properly freed when item is deleted if a 293 * Associated @p data can be properly freed when item is deleted if a
296 * callback function is set with elm_toolbar_item_del_cb_set(). 294 * callback function is set with elm_object_item_del_cb_set().
297 * 295 *
298 * If a function is passed as argument, it will be called everytime this item 296 * If a function is passed as argument, it will be called everytime this item
299 * is selected, i.e., the user clicks over an unselected item. 297 * is selected, i.e., the user clicks over an unselected item.
@@ -306,7 +304,6 @@ EAPI Elm_Object_Item *elm_toolbar_item_prepend(Evas_Object *obj, con
306 * 304 *
307 * @see elm_toolbar_item_icon_set() 305 * @see elm_toolbar_item_icon_set()
308 * @see elm_toolbar_item_del() 306 * @see elm_toolbar_item_del()
309 * @see elm_toolbar_item_del_cb_set()
310 * 307 *
311 * @ingroup Toolbar 308 * @ingroup Toolbar
312 */ 309 */
@@ -330,7 +327,7 @@ EAPI Elm_Object_Item *elm_toolbar_item_insert_before(Evas_Object *ob
330 * elm_toolbar_item_del(). 327 * elm_toolbar_item_del().
331 * 328 *
332 * Associated @p data can be properly freed when item is deleted if a 329 * Associated @p data can be properly freed when item is deleted if a
333 * callback function is set with elm_toolbar_item_del_cb_set(). 330 * callback function is set with elm_object_item_del_cb_set().
334 * 331 *
335 * If a function is passed as argument, it will be called everytime this item 332 * If a function is passed as argument, it will be called everytime this item
336 * is selected, i.e., the user clicks over an unselected item. 333 * is selected, i.e., the user clicks over an unselected item.
@@ -343,7 +340,6 @@ EAPI Elm_Object_Item *elm_toolbar_item_insert_before(Evas_Object *ob
343 * 340 *
344 * @see elm_toolbar_item_icon_set() 341 * @see elm_toolbar_item_icon_set()
345 * @see elm_toolbar_item_del() 342 * @see elm_toolbar_item_del()
346 * @see elm_toolbar_item_del_cb_set()
347 * 343 *
348 * @ingroup Toolbar 344 * @ingroup Toolbar
349 */ 345 */
@@ -597,29 +593,11 @@ EAPI Eina_Bool elm_toolbar_item_icon_file_set(Elm_Object_Item
597 * @param it The item of toolbar to be deleted. 593 * @param it The item of toolbar to be deleted.
598 * 594 *
599 * @see elm_toolbar_item_append() 595 * @see elm_toolbar_item_append()
600 * @see elm_toolbar_item_del_cb_set()
601 * 596 *
602 * @ingroup Toolbar 597 * @ingroup Toolbar
603 */ 598 */
604EAPI void elm_toolbar_item_del(Elm_Object_Item *it); 599EAPI void elm_toolbar_item_del(Elm_Object_Item *it);
605 600
606/**
607 * Set the function called when a toolbar item is freed.
608 *
609 * @param it The item to set the callback on.
610 * @param func The function called.
611 *
612 * If there is a @p func, then it will be called prior item's memory release.
613 * That will be called with the following arguments:
614 * @li item's data;
615 * @li item's Evas object;
616 * @li item itself;
617 *
618 * This way, a data associated to a toolbar item could be properly freed.
619 *
620 * @ingroup Toolbar
621 */
622EAPI void elm_toolbar_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb func);
623 601
624/** 602/**
625 * Set or unset item as a separator. 603 * Set or unset item as a separator.