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: - model subfetch needs to have it's own callback function so we can pass in the parent row as well as the row and column =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_model.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -3 -r1.7 -r1.8 --- ewl_model.c 20 Apr 2006 02:13:43 -0000 1.7 +++ ewl_model.c 20 Apr 2006 13:59:18 -0000 1.8 @@ -93,12 +93,12 @@ /** * @param m: The Ewl_Model to set the subfetch callback into - * @param get: The Ewl_Model_Fetch callback for subrows + * @param get: The Ewl_Model_Subfetch callback for subrows * @return Returns no value. * @brief Sets the subfetch callback into the model */ void -ewl_model_subfetch_set(Ewl_Model *m, Ewl_Model_Fetch get) +ewl_model_subfetch_set(Ewl_Model *m, Ewl_Model_Subfetch get) { DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR("m", m); @@ -110,10 +110,10 @@ /** * @param m: The Ewl_Model to get the subfetch callback from - * @return Returns the Ewl_Model_Fetch for the subfetch callback + * @return Returns the Ewl_Model_Subfetch for the subfetch callback * @brief Gets the subfetch callback from the model */ -Ewl_Model_Fetch +Ewl_Model_Subfetch ewl_model_subfetch_get(Ewl_Model *m) { DENTER_FUNCTION(DLEVEL_STABLE); =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_model.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -3 -r1.8 -r1.9 --- ewl_model.h 20 Apr 2006 02:13:43 -0000 1.8 +++ ewl_model.h 20 Apr 2006 13:59:18 -0000 1.9 @@ -19,6 +19,15 @@ unsigned int column); /** + * @def EWL_MODEL_DATA_SUBFETCH(f) + * Model callback to handle fetching the data for a given parent at a + * given row/column + */ +#define EWL_MODEL_DATA_SUBFETCH(f) ((Ewl_Model_Subfetch)f) +typedef void *(*Ewl_Model_Subfetch)(void *data, unsigned int parent, + unsigned int row, unsigned int column); + +/** * @def EWL_MODEL_DATA_SORT(f) * Model callback to inform the program to sort it's data in the given * column @@ -46,7 +55,7 @@ struct Ewl_Model { Ewl_Model_Fetch fetch; /**< Retrieve data for a cell */ - Ewl_Model_Fetch subfetch; /**< Check for subdata */ + Ewl_Model_Subfetch subfetch; /**< Check for subdata */ Ewl_Model_Sort sort; /**< Trigger sort on column */ Ewl_Model_Count count; /**< Count of data items */ }; @@ -59,8 +68,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_subfetch_set(Ewl_Model *m, Ewl_Model_Fetch get); -Ewl_Model_Fetch ewl_model_subfetch_get(Ewl_Model *m); +void ewl_model_subfetch_set(Ewl_Model *m, + Ewl_Model_Subfetch get); +Ewl_Model_Subfetch ewl_model_subfetch_get(Ewl_Model *m); void ewl_model_sort_set(Ewl_Model *m, Ewl_Model_Sort sort); Ewl_Model_Sort ewl_model_sort_get(Ewl_Model *m); @@ -68,12 +78,16 @@ void ewl_model_count_set(Ewl_Model *m, Ewl_Model_Count count); Ewl_Model_Count ewl_model_count_get(Ewl_Model *m); -/** - * @} +/* + * Internal stuff. */ void *ewl_model_cb_ecore_list_fetch(void *data, unsigned int row, unsigned int col); int ewl_model_cb_ecore_list_count(void *data); + +/** + * @} + */ #endif ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs