Enlightenment CVS committal
Author : dj2
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/src/lib
Modified Files:
ewl_container.c ewl_container.h ewl_tree.c ewl_tree.h
Log Message:
- fill in ewl_tree_row_find
- add ewl_container_child_get
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_container.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- ewl_container.c 30 Jun 2005 19:20:28 -0000 1.9
+++ ewl_container.c 19 Aug 2005 17:50:49 -0000 1.10
@@ -344,6 +344,36 @@
}
/**
+ * @param parent: The container to get the child from
+ * @param index: The child index to return
+ * @return Returns the widget at the given index, or NULL if not found
+ */
+Ewl_Widget *
+ewl_container_child_get(Ewl_Container * parent, int index)
+{
+ Ewl_Container *container = NULL;
+ Ewl_Widget *child;
+ int count = 0;
+
+ DENTER_FUNCTION(DLEVEL_STABLE);
+ DCHECK_PARAM_PTR_RET("parent", parent, NULL);
+
+ container = parent;
+ while (container->redirect) container = container->redirect;
+
+ ecore_list_goto_first(container->children);
+ while (child = ecore_list_next(container->children))
+ {
+ if (ewl_widget_internal_is(child)) continue;
+ if (count == index) break;
+ count ++;
+ }
+
+ DRETURN_PTR(((count == index) ? child : NULL), DLEVEL_STABLE);
+}
+
+
+/**
* @param w: the child widget that has had it's preferred size changed
* @param size: the amount of change in size
* @param o: the orientation of the size change
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_container.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- ewl_container.h 23 Jun 2005 04:37:16 -0000 1.4
+++ ewl_container.h 19 Aug 2005 17:50:51 -0000 1.5
@@ -113,6 +113,7 @@
Ewl_Widget * child);
void ewl_container_child_resize(Ewl_Widget * w, int size,
Ewl_Orientation o);
+Ewl_Widget *ewl_container_child_get(Ewl_Container * parent, int index);
void ewl_container_child_iterate_begin(Ewl_Container *c);
Ewl_Widget *ewl_container_child_next(Ewl_Container *c);
void ewl_container_child_iterator_set(Ewl_Container *c,
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_tree.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- ewl_tree.c 21 Jul 2005 20:51:00 -0000 1.11
+++ ewl_tree.c 19 Aug 2005 17:50:51 -0000 1.12
@@ -543,6 +543,27 @@
}
/**
+ * @param tree: The tree to find the row in
+ * @param row: The row number to find
+ * @return Returns the given row, or NULL if not found
+ */
+Ewl_Widget *ewl_tree_row_find(Ewl_Tree *tree, int row)
+{
+ Ewl_Widget *child;
+
+ DENTER_FUNCTION(DLEVEL_STABLE);
+ DCHECK_PARAM_PTR_RET("tree", tree, NULL);
+
+ child = ewl_container_child_get(EWL_CONTAINER(tree), row);
+
+ if (child) {
+ DRETURN_PTR(EWL_TREE_NODE(child)->row, DLEVEL_STABLE);
+ } else {
+ DRETURN_PTR(NULL, DLEVEL_STABLE);
+ }
+}
+
+/**
* @param row: the row to retrieve a column from
* @param i: the column to retreive from the row
* @brief Retreives the actual widget added via row_add instead of the cell
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_tree.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- ewl_tree.h 21 Jul 2005 20:51:00 -0000 1.9
+++ ewl_tree.h 19 Aug 2005 17:50:51 -0000 1.10
@@ -109,7 +109,7 @@
void ewl_tree_row_destroy(Ewl_Tree *tree, Ewl_Row *row);
void ewl_tree_row_expand_set(Ewl_Row *row, Ewl_Tree_Node_Flags
expanded);
-Ewl_Row *ewl_tree_row_find(Ewl_Tree *tree, int row);
+Ewl_Widget *ewl_tree_row_find(Ewl_Tree *tree, int row);
/*
* Internally used callbacks, override at your own risk.
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs