Enlightenment CVS committal
Author : rbdpngn
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/src
Modified Files:
ewl_container.c ewl_container.h
Log Message:
More progress on the iterator callback for containers. This is so that
containers can expose child widgets in a safe way w/o exposing internally used
widgets.
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_container.c,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -3 -r1.64 -r1.65
--- ewl_container.c 24 Mar 2004 04:11:09 -0000 1.64
+++ ewl_container.c 5 Apr 2004 06:34:54 -0000 1.65
@@ -1,12 +1,8 @@
-
#include <Ewl.h>
/**
* @param c: the container to initialize
* @param appearance: the appearance key for this container
- * @param add: the function to call when children added to container
- * @param remove: the function to call when children removed from container
- * @param rs: the function to call when children of container are resized
* @return Returns TRUE on success, otherwise FALSE.
* @brief Initialize a containers default fields and callbacks
*
@@ -533,12 +529,40 @@
DENTER_FUNCTION(DLEVEL_STABLE);
DCHECK_PARAM_PTR("c", c);
+ while (c->redirect)
+ c = c->redirect;
+
ecore_list_goto_first(c->children);
DLEAVE_FUNCTION(DLEVEL_STABLE);
}
/**
+ * @param c: the container to retrieve the next usable child
+ * @brief Retrieve the next elligible child in a container.
+ * @return Returns the next valid child on success, NULL on failure.
+ */
+Ewl_Widget *ewl_container_next_child(Ewl_Container *c)
+{
+ Ewl_Widget *w;
+
+ DENTER_FUNCTION(DLEVEL_STABLE);
+ DCHECK_PARAM_PTR_RET("c", c, NULL);
+
+ while (c->redirect)
+ c = c->redirect;
+
+ if (c->iterator) {
+ w = c->iterator(c);
+ }
+ else {
+ w = ecore_list_next(c->children);
+ }
+
+ DRETURN_PTR(w, DLEVEL_STABLE);
+}
+
+/**
* @param c: the container to change child iterator functions
* @param i: the iterator function for the container
* @return Returns no value.
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_container.h,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -3 -r1.34 -r1.35
--- ewl_container.h 24 Mar 2004 04:11:09 -0000 1.34
+++ ewl_container.h 5 Apr 2004 06:34:56 -0000 1.35
@@ -63,7 +63,7 @@
* function. This is used to pick the next child in the list of children for
* the container.
*/
-typedef Ewl_Widget *(*Ewl_Container_Iterator) (Ewl_Widget * w);
+typedef Ewl_Widget *(*Ewl_Container_Iterator) (Ewl_Container *c);
/**
* @struct Ewl_Container
@@ -112,6 +112,10 @@
Ewl_Widget * child);
void ewl_container_resize_child(Ewl_Widget * w, int size,
Ewl_Orientation o);
+void ewl_container_child_iterate_begin(Ewl_Container *c);
+Ewl_Widget *ewl_container_next_child(Ewl_Container *c);
+void ewl_container_set_child_iterator(Ewl_Container *c,
+ Ewl_Container_Iterator i);
void ewl_container_destroy(Ewl_Container * c);
void ewl_container_reset(Ewl_Container * c);
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs