Enlightenment CVS committal
Author : davemds
Project : e17
Module : libs/etk
Dir : e17/libs/etk/src/lib
Modified Files:
etk_iconbox.c etk_iconbox.h
Log Message:
* rename etk_iconbox_icon_get_selected() in
etk_iconbox_icon_get_first_selected()
* add etk_iconbox_icon_get_selected() that return a list of all the selected
icons
===================================================================
RCS file: /cvs/e/e17/libs/etk/src/lib/etk_iconbox.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -3 -r1.36 -r1.37
--- etk_iconbox.c 30 Jun 2008 17:45:52 -0000 1.36
+++ etk_iconbox.c 30 Jun 2008 22:58:24 -0000 1.37
@@ -642,12 +642,33 @@
}
/**
+ * @brief Get all the selected icons.
+ * @param iconbox an iconbox
+ * @return Return an Evas_List of Etk_Iconbox_Icon, or NULL if none is
selected.
+ * You must use evas_list_free() to free the list when you don't need anymore.
+ */
+Evas_List *etk_iconbox_icon_get_selected(Etk_Iconbox *iconbox)
+{
+ Etk_Iconbox_Icon *icon;
+ Evas_List *l = NULL;
+
+ if (!iconbox)
+ return NULL;
+
+ for (icon = iconbox->first_icon; icon; icon = icon->next)
+ if (icon->selected)
+ l = evas_list_append(l, icon);
+
+ return l;
+}
+
+/**
* @brief Get the first selected icon. If more than one icon is selected only
* the first one is returned.
* @param iconbox an iconbox
* @return Return the first selected icon, or NULL if none is selected.
*/
-Etk_Iconbox_Icon *etk_iconbox_icon_get_selected(Etk_Iconbox *iconbox)
+Etk_Iconbox_Icon *etk_iconbox_icon_get_first_selected(Etk_Iconbox *iconbox)
{
Etk_Iconbox_Icon *icon;
===================================================================
RCS file: /cvs/e/e17/libs/etk/src/lib/etk_iconbox.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- etk_iconbox.h 30 Jun 2008 17:45:52 -0000 1.16
+++ etk_iconbox.h 30 Jun 2008 22:58:24 -0000 1.17
@@ -148,7 +148,8 @@
Etk_Iconbox_Icon *etk_iconbox_icon_get_at_xy(Etk_Iconbox *iconbox, int x, int
y, Etk_Bool over_cell, Etk_Bool over_icon, Etk_Bool over_label);
Etk_Iconbox_Icon *etk_iconbox_icon_get_by_label(Etk_Iconbox *iconbox, const
char *label);
Etk_Iconbox_Icon *etk_iconbox_icon_get_by_data(Etk_Iconbox *iconbox, void
*data);
-Etk_Iconbox_Icon *etk_iconbox_icon_get_selected(Etk_Iconbox *iconbox);
+Evas_List *etk_iconbox_icon_get_selected(Etk_Iconbox *iconbox);
+Etk_Iconbox_Icon *etk_iconbox_icon_get_first_selected(Etk_Iconbox *iconbox);
void etk_iconbox_icon_file_set(Etk_Iconbox_Icon *icon, const
char *filename, const char *edje_group);
void etk_iconbox_icon_file_get(Etk_Iconbox_Icon *icon, const
char **filename, const char **edje_group);
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs