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:
 Add a new function:
Etk_Iconbox_Icon *etk_iconbox_icon_get_selected(Etk_Iconbox *iconbox)
The function will return the first selected item in the iconbox

===================================================================
RCS file: /cvs/e/e17/libs/etk/src/lib/etk_iconbox.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -3 -r1.35 -r1.36
--- etk_iconbox.c       24 Jun 2008 18:03:54 -0000      1.35
+++ etk_iconbox.c       30 Jun 2008 17:45:52 -0000      1.36
@@ -642,6 +642,26 @@
 }
 
 /**
+ * @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 *icon;
+
+   if (!iconbox)
+      return NULL;
+
+   for (icon = iconbox->first_icon; icon; icon = icon->next)
+      if (icon->selected)
+         return icon;
+
+   return NULL;
+}
+
+/**
  * @brief Sets the file path of the icon's image
  * @param icon an icon
  * @param filename the filename of the icon's image
===================================================================
RCS file: /cvs/e/e17/libs/etk/src/lib/etk_iconbox.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -3 -r1.15 -r1.16
--- etk_iconbox.h       24 Jun 2008 18:03:55 -0000      1.15
+++ etk_iconbox.h       30 Jun 2008 17:45:52 -0000      1.16
@@ -148,6 +148,7 @@
 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);
 
 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
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to