Enlightenment CVS committal
Author : dj2
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/src/lib
Modified Files:
ewl_model.c ewl_model.h
Log Message:
- some work on expandable rows for tree2
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_model.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- ewl_model.c 26 May 2006 15:35:02 -0000 1.9
+++ ewl_model.c 7 Dec 2006 20:06:21 -0000 1.10
@@ -123,6 +123,37 @@
}
/**
+ * @param m: The model to set the callback on
+ * @param exp: The expandable callback
+ * @return Returns no value
+ * @brief Sets the expandable callback on the given model
+ */
+void
+ewl_model_expandable_set(Ewl_Model *m, Ewl_Model_Expandable exp)
+{
+ DENTER_FUNCTION(DLEVEL_STABLE);
+ DCHECK_PARAM_PTR("m", m);
+
+ m->expandable = exp;
+
+ DLEAVE_FUNCTION(DLEVEL_STABLE);
+}
+
+/**
+ * @param m: The model to get the expandable callback from
+ * @return Returns the expandable callback set on the model
+ * @brief Retrieves the expandable callback set on the model
+ */
+Ewl_Model_Expandable
+ewl_model_expandable_get(Ewl_Model *m)
+{
+ DENTER_FUNCTION(DLEVEL_STABLE);
+ DCHECK_PARAM_PTR_RET("m", m, NULL);
+
+ DRETURN_PTR(m->expandable, DLEVEL_STABLE);
+}
+
+/**
* @param m: The Ewl_Model to set the sort callback on
* @param sort: The sort callback to set
* @return Returns no value.
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_model.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- ewl_model.h 6 Dec 2006 20:14:52 -0000 1.12
+++ ewl_model.h 7 Dec 2006 20:06:21 -0000 1.13
@@ -35,6 +35,19 @@
typedef void *(*Ewl_Model_Subfetch)(void *data, unsigned int parent,
unsigned int row, unsigned int column);
+
+/**
+ * @def EWL_MODEL_DATA_EXPANDABLE(f)
+ * Model callback to handle fetching the expandable flag for a given row of
+ * the tree
+ */
+#define EWL_MODEL_DATA_EXPANDABLE(f) ((Ewl_Model_Expandable)f)
+
+/**
+ * A typedef to shorten the definition of the model_expandable callback
+ */
+typedef int (*Ewl_Model_Expandable)(void *data, unsigned int row);
+
/**
* @def EWL_MODEL_DATA_SORT(f)
* Model callback to inform the program to sort it's data in the given
@@ -76,6 +89,7 @@
struct Ewl_Model
{
Ewl_Model_Fetch fetch; /**< Retrieve data for a cell */
+ Ewl_Model_Expandable expandable; /**< Is the row expandable */
Ewl_Model_Subfetch subfetch; /**< Check for subdata */
Ewl_Model_Sort sort; /**< Trigger sort on column */
Ewl_Model_Count count; /**< Count of data items */
@@ -88,6 +102,9 @@
void ewl_model_fetch_set(Ewl_Model *m, Ewl_Model_Fetch get);
Ewl_Model_Fetch ewl_model_fetch_get(Ewl_Model *m);
+
+void ewl_model_expandable_set(Ewl_Model *m, Ewl_Model_Expandable
exp);
+Ewl_Model_Expandable ewl_model_expandable_get(Ewl_Model *m);
void ewl_model_subfetch_set(Ewl_Model *m,
Ewl_Model_Subfetch get);
-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs