Enlightenment CVS committal

Author  : sebastid
Project : e17
Module  : libs/ecore

Dir     : e17/libs/ecore/src/lib/ecore


Modified Files:
        Ecore_Data.h ecore_list.c 


Log Message:
Big ecore_dbus overhaul

===================================================================
RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore/Ecore_Data.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -3 -r1.20 -r1.21
--- Ecore_Data.h        12 Jan 2006 03:01:58 -0000      1.20
+++ Ecore_Data.h        25 Jul 2006 12:44:19 -0000      1.21
@@ -98,6 +98,8 @@
    
    /* Retrieve the current position in the list */
    EAPI void *ecore_list_current(Ecore_List * list);
+   EAPI void *ecore_list_first(Ecore_List * list);
+   EAPI void *ecore_list_last(Ecore_List * list);
    EAPI int ecore_list_index(Ecore_List * list);
    EAPI int ecore_list_nodes(Ecore_List * list);
    
===================================================================
RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore/ecore_list.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -3 -r1.23 -r1.24
--- ecore_list.c        23 Jun 2006 06:40:26 -0000      1.23
+++ ecore_list.c        25 Jul 2006 12:44:19 -0000      1.24
@@ -879,6 +879,40 @@
    return ret;
 }
 
+/**
+ * Retrieve the data pointed to by the first item in @p list.
+ * @param  list The list.
+ * @return Returns the data at current position, can be @c NULL.
+ */
+EAPI inline void *
+ecore_list_first(Ecore_List *list)
+{
+   void *ret;
+
+   if (!list->first)
+     return NULL;
+   ret = list->first->data;
+
+   return ret;
+}
+
+/**
+ * Retrieve the data pointed to by the last item in @p list.
+ * @param  list The list.
+ * @return Returns the data at current position, can be @c NULL.
+ */
+EAPI inline void *
+ecore_list_last(Ecore_List *list)
+{
+   void *ret;
+
+   if (!list->last)
+     return NULL;
+   ret = list->last->data;
+
+   return ret;
+}
+
 /* Return the data of the current node without incrementing */
 static void *
 _ecore_list_current(Ecore_List *list)



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to