Enlightenment CVS committal Author : ningerso Project : e17 Module : libs/ewl
Dir : e17/libs/ewl/src/lib Modified Files: ewl_filelist_tree.c ewl_filepicker.c ewl_model.c ewl_model.h Log Message: API breakage for MVC based widgets. Improved namespace for ewl_model. =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_filelist_tree.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -3 -r1.6 -r1.7 --- ewl_filelist_tree.c 4 Mar 2007 00:52:01 -0000 1.6 +++ ewl_filelist_tree.c 21 Mar 2007 03:22:55 -0000 1.7 @@ -121,10 +121,10 @@ /* Setup the tree model */ model = ewl_model_new(); - ewl_model_count_set(model, ewl_filelist_tree_data_count); - ewl_model_fetch_set(model, ewl_filelist_tree_data_fetch); - ewl_model_sort_set(model, ewl_filelist_tree_data_sort); - ewl_model_expandable_set(model, ewl_filelist_tree_data_expandable_get); + ewl_model_data_count_set(model, ewl_filelist_tree_data_count); + ewl_model_data_fetch_set(model, ewl_filelist_tree_data_fetch); + ewl_model_data_sort_set(model, ewl_filelist_tree_data_sort); + ewl_model_data_expandable_set(model, ewl_filelist_tree_data_expandable_get); ewl_model_expansion_data_fetch_set(model, ewl_filelist_tree_data_expansion_data_fetch); =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_filepicker.c,v retrieving revision 1.28 retrieving revision 1.29 diff -u -3 -r1.28 -r1.29 --- ewl_filepicker.c 16 Mar 2007 23:22:09 -0000 1.28 +++ ewl_filepicker.c 21 Mar 2007 03:22:55 -0000 1.29 @@ -154,8 +154,8 @@ ewl_filepicker_filter_add(fp, "All files", NULL); model = ewl_model_new(); - ewl_model_fetch_set(model, ewl_filepicker_cb_type_fetch); - ewl_model_count_set(model, ewl_filepicker_cb_type_count); + ewl_model_data_fetch_set(model, ewl_filepicker_cb_type_fetch); + ewl_model_data_count_set(model, ewl_filepicker_cb_type_count); view = ewl_view_new(); ewl_view_constructor_set(view, ewl_label_new); =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_model.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -3 -r1.15 -r1.16 --- ewl_model.c 6 Feb 2007 13:42:17 -0000 1.15 +++ ewl_model.c 21 Mar 2007 03:22:55 -0000 1.16 @@ -41,8 +41,8 @@ model = ewl_model_new(); if (model) { - ewl_model_fetch_set(model, ewl_model_cb_ecore_list_fetch); - ewl_model_count_set(model, ewl_model_cb_ecore_list_count); + ewl_model_data_fetch_set(model, ewl_model_cb_ecore_list_fetch); + ewl_model_data_count_set(model, ewl_model_cb_ecore_list_count); } DRETURN_PTR(model, DLEVEL_STABLE); @@ -69,7 +69,7 @@ * @brief Sets the fetch callback in the model */ void -ewl_model_fetch_set(Ewl_Model *m, Ewl_Model_Fetch get) +ewl_model_data_fetch_set(Ewl_Model *m, Ewl_Model_Data_Fetch get) { DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR("m", m); @@ -84,8 +84,8 @@ * @return Returns the Ewl_Model_Fetch callback or NULL if none set * @brief Gets the fetch callback from the model */ -Ewl_Model_Fetch -ewl_model_fetch_get(Ewl_Model *m) +Ewl_Model_Data_Fetch +ewl_model_data_fetch_get(Ewl_Model *m) { DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR_RET("m", m, NULL); @@ -100,7 +100,7 @@ * @brief Sets the sort callback into the model */ void -ewl_model_sort_set(Ewl_Model *m, Ewl_Model_Sort sort) +ewl_model_data_sort_set(Ewl_Model *m, Ewl_Model_Data_Sort sort) { DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR("m", m); @@ -115,8 +115,8 @@ * @return Returns the Ewl_Model_Sort set on the model or NULL if none set * @brief Gets the sort callback from the model */ -Ewl_Model_Sort -ewl_model_sort_get(Ewl_Model *m) +Ewl_Model_Data_Sort +ewl_model_data_sort_get(Ewl_Model *m) { DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR_RET("m", m, NULL); @@ -131,7 +131,7 @@ * @brief Sets the count callback into the model */ void -ewl_model_count_set(Ewl_Model *m, Ewl_Model_Count count) +ewl_model_data_count_set(Ewl_Model *m, Ewl_Model_Data_Count count) { DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR("m", m); @@ -147,8 +147,8 @@ * none set. * @brief Gets the count callback from the model */ -Ewl_Model_Count -ewl_model_count_get(Ewl_Model *m) +Ewl_Model_Data_Count +ewl_model_data_count_get(Ewl_Model *m) { DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR_RET("m", m, NULL); @@ -163,7 +163,7 @@ * @brief Sets the expandable callback on the given model */ void -ewl_model_expandable_set(Ewl_Model *m, Ewl_Model_Expandable exp) +ewl_model_data_expandable_set(Ewl_Model *m, Ewl_Model_Data_Expandable exp) { DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR("m", m); @@ -178,8 +178,8 @@ * @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) +Ewl_Model_Data_Expandable +ewl_model_data_expandable_get(Ewl_Model *m) { DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR_RET("m", m, NULL); =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_model.h,v retrieving revision 1.19 retrieving revision 1.20 diff -u -3 -r1.19 -r1.20 --- ewl_model.h 4 Mar 2007 00:52:01 -0000 1.19 +++ ewl_model.h 21 Mar 2007 03:22:55 -0000 1.20 @@ -20,12 +20,12 @@ * @def EWL_MODEL_DATA_FETCH(f) * Model callback to handle fetching the data at the given row/column */ -#define EWL_MODEL_DATA_FETCH(f) ((Ewl_Model_Fetch)f) +#define EWL_MODEL_DATA_FETCH(f) ((Ewl_Model_Data_Fetch)f) /** * A typedef to shorten the definition of the model_fetch callbacks. */ -typedef void *(*Ewl_Model_Fetch)(void *data, unsigned int row, +typedef void *(*Ewl_Model_Data_Fetch)(void *data, unsigned int row, unsigned int column); /** @@ -44,12 +44,12 @@ * 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) +#define EWL_MODEL_DATA_EXPANDABLE(f) ((Ewl_Model_Data_Expandable)f) /** * A typedef to shorten the definition of the model_expandable callback */ -typedef int (*Ewl_Model_Expandable)(void *data, unsigned int row); +typedef int (*Ewl_Model_Data_Expandable)(void *data, unsigned int row); /** * @def EWL_MODEL_EXPANSION_DATA_FETCH(f) @@ -80,24 +80,24 @@ * Model callback to inform the program to sort it's data in the given * column */ -#define EWL_MODEL_DATA_SORT(f) ((Ewl_Model_Sort)f) +#define EWL_MODEL_DATA_SORT(f) ((Ewl_Model_Data_Sort)f) /** * A typedef to shorten the definition of the model_sort callbacks. */ -typedef void (*Ewl_Model_Sort)(void *data, unsigned int column, +typedef void (*Ewl_Model_Data_Sort)(void *data, unsigned int column, Ewl_Sort_Direction sort); /** * @def EWL_MODEL_DATA_COUNT(f) * Model callback to have the program return the number of rows in its data */ -#define EWL_MODEL_DATA_COUNT(f) ((Ewl_Model_Count)f) +#define EWL_MODEL_DATA_COUNT(f) ((Ewl_Model_Data_Count)f) /** * A typedef to shorten the definition of the model_count callbacks. */ -typedef int (*Ewl_Model_Count)(void *data); +typedef int (*Ewl_Model_Data_Count)(void *data); /** * @def EWL_MODEL(model) @@ -112,15 +112,15 @@ { struct { - Ewl_Model_Expandable is; /**< Is the row expandable */ + Ewl_Model_Data_Expandable is; /**< Is the row expandable */ Ewl_Model_Expansion_Data_Fetch data; /**< Get expansion data */ Ewl_Model_Expansion_Model_Fetch model; /**< Get expansion model */ } expansion; - Ewl_Model_Fetch fetch; /**< Retrieve data for a cell */ + Ewl_Model_Data_Fetch fetch; /**< Retrieve data for a cell */ Ewl_Model_Data_Free data_free; /**< Free data passed to view */ - Ewl_Model_Count count; /**< Count of data items */ - Ewl_Model_Sort sort; /**< Trigger sort on column */ + Ewl_Model_Data_Count count; /**< Count of data items */ + Ewl_Model_Data_Sort sort; /**< Trigger sort on column */ }; Ewl_Model *ewl_model_new(void); @@ -128,21 +128,21 @@ Ewl_Model *ewl_model_ecore_list_get(void); -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_data_fetch_set(Ewl_Model *m, Ewl_Model_Data_Fetch get); +Ewl_Model_Data_Fetch ewl_model_data_fetch_get(Ewl_Model *m); void ewl_model_data_free_set(Ewl_Model *m, Ewl_Model_Data_Free assign); Ewl_Model_Data_Free ewl_model_data_free_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); +void ewl_model_data_sort_set(Ewl_Model *m, Ewl_Model_Data_Sort sort); +Ewl_Model_Data_Sort ewl_model_data_sort_get(Ewl_Model *m); -void ewl_model_count_set(Ewl_Model *m, Ewl_Model_Count count); -Ewl_Model_Count ewl_model_count_get(Ewl_Model *m); +void ewl_model_data_count_set(Ewl_Model *m, Ewl_Model_Data_Count count); +Ewl_Model_Data_Count ewl_model_data_count_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_data_expandable_set(Ewl_Model *m, + Ewl_Model_Data_Expandable exp); +Ewl_Model_Data_Expandable ewl_model_data_expandable_get(Ewl_Model *m); void ewl_model_expansion_data_fetch_set(Ewl_Model *m, Ewl_Model_Expansion_Data_Fetch 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 enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs