Enlightenment CVS committal Author : pfritz Project : e17 Module : libs/ewl
Dir : e17/libs/ewl/src/lib Modified Files: ewl_combo.c ewl_combo.h ewl_list.c ewl_model.c ewl_model.h ewl_mvc.c ewl_mvc.h ewl_tree.c ewl_tree.h ewl_view.c ewl_view.h Log Message: the mvc does not change the content of the view and the model, hence use the const modifier =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_combo.c,v retrieving revision 1.66 retrieving revision 1.67 diff -u -3 -r1.66 -r1.67 --- ewl_combo.c 20 Jan 2008 16:15:31 -0000 1.66 +++ ewl_combo.c 20 Apr 2008 15:06:32 -0000 1.67 @@ -11,10 +11,11 @@ #include "ewl_debug.h" static void ewl_combo_cb_selected_change(Ewl_MVC *mvc); -Ewl_Widget *ewl_combo_submenu_new(Ewl_Combo *c, Ewl_Model *model, - Ewl_View *view, void *mvc_data); +Ewl_Widget *ewl_combo_submenu_new(Ewl_Combo *c, const Ewl_Model *model, + const Ewl_View *view, void *mvc_data); static void ewl_combo_popup_fill(Ewl_Combo *combo, Ewl_Container *c, - Ewl_Model *model, Ewl_View *view, void *mvc_data); + const Ewl_Model *model, const Ewl_View *view, + void *mvc_data); /** * @return Returns a pointer to a new combo on success, NULL on failure. @@ -232,8 +233,8 @@ void *data) { Ewl_Combo *combo; - Ewl_Model *model; - Ewl_View *view; + const Ewl_Model *model; + const Ewl_View *view; void *mvc_data; DENTER_FUNCTION(DLEVEL_STABLE); @@ -301,7 +302,7 @@ static void ewl_combo_cb_selected_change(Ewl_MVC *mvc) { - Ewl_View *view; + const Ewl_View *view; Ewl_Combo *combo; Ewl_Widget *item = NULL; @@ -333,7 +334,7 @@ if (ewl_mvc_selected_count_get(mvc)) { Ewl_Selection_Idx *idx; - Ewl_Model *model; + const Ewl_Model *model; void *mvc_data; idx = ewl_mvc_selected_get(mvc); @@ -382,8 +383,8 @@ * @brief Callback for when the button to expand the combo is pressed */ Ewl_Widget * -ewl_combo_submenu_new(Ewl_Combo *combo, Ewl_Model *model, Ewl_View *view, - void *mvc_data) +ewl_combo_submenu_new(Ewl_Combo *combo, const Ewl_Model *model, + const Ewl_View *view, void *mvc_data) { Ewl_Widget *menu; @@ -422,8 +423,8 @@ * @brief fill the given container with the items */ static void -ewl_combo_popup_fill(Ewl_Combo *combo, Ewl_Container *c, Ewl_Model *model, - Ewl_View *view, void *mvc_data) +ewl_combo_popup_fill(Ewl_Combo *combo, Ewl_Container *c, const Ewl_Model *model, + const Ewl_View *view, void *mvc_data) { unsigned int count, i; @@ -443,8 +444,8 @@ if (model->expansion.is && model->expansion.is(mvc_data, i)) { - Ewl_Model *em; - Ewl_View *ev; + const Ewl_Model *em; + const Ewl_View *ev; void *ed; /* if there shouldn't be a model for the expansion @@ -573,7 +574,7 @@ * @return Returns no value */ void -ewl_combo_cell_model_set(Ewl_Combo_Cell *cell, Ewl_Model *model) +ewl_combo_cell_model_set(Ewl_Combo_Cell *cell, const Ewl_Model *model) { DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR(cell); @@ -589,7 +590,7 @@ * @param cell: The Ewl_Combo to use * @return Returns the model of the cell */ -Ewl_Model * +const Ewl_Model * ewl_combo_cell_model_get(Ewl_Combo_Cell *cell) { DENTER_FUNCTION(DLEVEL_STABLE); @@ -642,7 +643,7 @@ void *data __UNUSED__) { Ewl_Combo *combo; - Ewl_Model *model; + const Ewl_Model *model; void *mvc_data; int i; =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_combo.h,v retrieving revision 1.30 retrieving revision 1.31 diff -u -3 -r1.30 -r1.31 --- ewl_combo.h 11 Nov 2007 06:07:46 -0000 1.30 +++ ewl_combo.h 20 Apr 2008 15:06:32 -0000 1.31 @@ -115,7 +115,7 @@ { Ewl_Cell cell; /**< Inherit from the cell */ Ewl_Combo *combo; /**< The parent combo */ - Ewl_Model *model; /**< The model that was used to build the + const Ewl_Model *model; /**< The model that was used to build the content of the cell */ void *mvc_data; /**< The mvc data that was used to build the content of the cell */ @@ -126,8 +126,9 @@ void ewl_combo_cell_combo_set(Ewl_Combo_Cell *c, Ewl_Combo *combo); Ewl_Combo *ewl_combo_cell_combo_get(Ewl_Combo_Cell *c); -void ewl_combo_cell_model_set(Ewl_Combo_Cell *c, Ewl_Model *model); -Ewl_Model *ewl_combo_cell_model_get(Ewl_Combo_Cell *c); +void ewl_combo_cell_model_set(Ewl_Combo_Cell *c, + const Ewl_Model *model); +const Ewl_Model *ewl_combo_cell_model_get(Ewl_Combo_Cell *c); void ewl_combo_cell_data_set(Ewl_Combo_Cell *c, void *mvc_data); void *ewl_combo_cell_data_get(Ewl_Combo_Cell *c); =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_list.c,v retrieving revision 1.29 retrieving revision 1.30 diff -u -3 -r1.29 -r1.30 --- ewl_list.c 12 Nov 2007 22:42:22 -0000 1.29 +++ ewl_list.c 20 Apr 2008 15:06:32 -0000 1.30 @@ -74,8 +74,8 @@ void *data __UNUSED__) { Ewl_List *list; - Ewl_Model *model; - Ewl_View *view; + const Ewl_Model *model; + const Ewl_View *view; void *mvc_data; int i; @@ -150,7 +150,7 @@ void ewl_list_cb_item_clicked(Ewl_Widget *w, void *ev __UNUSED__, void *data) { - Ewl_Model *model; + const Ewl_Model *model; void *mvc_data; int row; =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_model.c,v retrieving revision 1.27 retrieving revision 1.28 diff -u -3 -r1.27 -r1.28 --- ewl_model.c 17 Apr 2008 05:06:54 -0000 1.27 +++ ewl_model.c 20 Apr 2008 15:06:32 -0000 1.28 @@ -85,7 +85,7 @@ * @brief Retrieves the header fetch function */ Ewl_Model_Data_Header_Fetch -ewl_model_data_header_fetch_get(Ewl_Model *m) +ewl_model_data_header_fetch_get(const Ewl_Model *m) { DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR_RET(m, NULL); @@ -116,7 +116,7 @@ * @brief Gets the fetch callback from the model */ Ewl_Model_Data_Fetch -ewl_model_data_fetch_get(Ewl_Model *m) +ewl_model_data_fetch_get(const Ewl_Model *m) { DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR_RET(m, NULL); @@ -147,7 +147,7 @@ * @brief Retrieves the sortable callback on the model */ Ewl_Model_Column_Sortable -ewl_model_column_sortable_get(Ewl_Model *m) +ewl_model_column_sortable_get(const Ewl_Model *m) { DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR_RET(m, NULL); @@ -178,7 +178,7 @@ * @brief Gets the sort callback from the model */ Ewl_Model_Data_Sort -ewl_model_data_sort_get(Ewl_Model *m) +ewl_model_data_sort_get(const Ewl_Model *m) { DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR_RET(m, NULL); @@ -209,7 +209,7 @@ * @brief Retrieves the highlight model set in @a m */ Ewl_Model_Data_Highlight -ewl_model_data_highlight_get(Ewl_Model *m) +ewl_model_data_highlight_get(const Ewl_Model *m) { DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR_RET(m, NULL); @@ -241,7 +241,7 @@ * @brief Gets the count callback from the model */ Ewl_Model_Data_Count -ewl_model_data_count_get(Ewl_Model *m) +ewl_model_data_count_get(const Ewl_Model *m) { DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR_RET(m, NULL); @@ -273,7 +273,7 @@ * @brief Gets the unref callback from the model */ Ewl_Model_Data_Unref -ewl_model_data_unref_get(Ewl_Model *m) +ewl_model_data_unref_get(const Ewl_Model *m) { DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR_RET(m, NULL); @@ -304,7 +304,7 @@ * @brief Retrieves the expandable callback set on the model */ Ewl_Model_Data_Expandable -ewl_model_data_expandable_get(Ewl_Model *m) +ewl_model_data_expandable_get(const Ewl_Model *m) { DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR_RET(m, NULL); @@ -336,7 +336,7 @@ * @brief Gets the expansion_data callback from the model */ Ewl_Model_Expansion_Data_Fetch -ewl_model_expansion_data_fetch_get(Ewl_Model *m) +ewl_model_expansion_data_fetch_get(const Ewl_Model *m) { DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR_RET(m, NULL); @@ -372,7 +372,7 @@ * @brief Get the data free pointer set on this model */ Ewl_Model_Data_Free -ewl_model_data_free_get(Ewl_Model *m) +ewl_model_data_free_get(const Ewl_Model *m) { DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR_RET(m, NULL); @@ -404,7 +404,7 @@ * @brief Retrieves the model expansion model fetch function */ Ewl_Model_Expansion_Model_Fetch -ewl_model_expansion_model_fetch_get(Ewl_Model *m) +ewl_model_expansion_model_fetch_get(const Ewl_Model *m) { DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR_RET(m, NULL); =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_model.h,v retrieving revision 1.28 retrieving revision 1.29 diff -u -3 -r1.28 -r1.29 --- ewl_model.h 17 Apr 2008 05:06:54 -0000 1.28 +++ ewl_model.h 20 Apr 2008 15:06:32 -0000 1.29 @@ -181,47 +181,47 @@ 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); +Ewl_Model_Data_Fetch ewl_model_data_fetch_get(const Ewl_Model *m); void ewl_model_data_header_fetch_set(Ewl_Model *m, Ewl_Model_Data_Header_Fetch get); -Ewl_Model_Data_Header_Fetch ewl_model_data_header_fetch_get(Ewl_Model *m); +Ewl_Model_Data_Header_Fetch ewl_model_data_header_fetch_get(const 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); +Ewl_Model_Data_Free ewl_model_data_free_get(const Ewl_Model *m); void ewl_model_column_sortable_set(Ewl_Model *m, Ewl_Model_Column_Sortable sortable); -Ewl_Model_Column_Sortable ewl_model_column_sortable_get(Ewl_Model *m); +Ewl_Model_Column_Sortable ewl_model_column_sortable_get(const 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); +Ewl_Model_Data_Sort ewl_model_data_sort_get(const Ewl_Model *m); void ewl_model_data_highlight_set(Ewl_Model *m, Ewl_Model_Data_Highlight highlight); -Ewl_Model_Data_Highlight ewl_model_data_highlight_get(Ewl_Model *m); +Ewl_Model_Data_Highlight ewl_model_data_highlight_get(const 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); +Ewl_Model_Data_Count ewl_model_data_count_get(const Ewl_Model *m); void ewl_model_data_unref_set(Ewl_Model *m, Ewl_Model_Data_Unref unref); -Ewl_Model_Data_Unref ewl_model_data_unref_get(Ewl_Model *m); +Ewl_Model_Data_Unref ewl_model_data_unref_get(const 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); +Ewl_Model_Data_Expandable ewl_model_data_expandable_get(const Ewl_Model *m); void ewl_model_expansion_data_fetch_set(Ewl_Model *m, Ewl_Model_Expansion_Data_Fetch get); -Ewl_Model_Expansion_Data_Fetch ewl_model_expansion_data_fetch_get(Ewl_Model *m); +Ewl_Model_Expansion_Data_Fetch ewl_model_expansion_data_fetch_get(const Ewl_Model *m); void ewl_model_expansion_model_fetch_set(Ewl_Model *m, Ewl_Model_Expansion_Model_Fetch f); -Ewl_Model_Expansion_Model_Fetch ewl_model_expansion_model_fetch_get(Ewl_Model *m); +Ewl_Model_Expansion_Model_Fetch ewl_model_expansion_model_fetch_get(const Ewl_Model *m); /* * Internal stuff. =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_mvc.c,v retrieving revision 1.39 retrieving revision 1.40 diff -u -3 -r1.39 -r1.40 --- ewl_mvc.c 20 Apr 2008 03:45:17 -0000 1.39 +++ ewl_mvc.c 20 Apr 2008 15:06:32 -0000 1.40 @@ -9,7 +9,7 @@ static void ewl_mvc_selected_clear_private(Ewl_MVC *mvc); static unsigned int ewl_mvc_selected_goto(Ewl_MVC *mvc, unsigned int row, unsigned int column); -static void ewl_mvc_selected_insert(Ewl_MVC *mvc, Ewl_Model *model, +static void ewl_mvc_selected_insert(Ewl_MVC *mvc, const Ewl_Model *model, void *data, Ewl_Selection *sel, unsigned int row, unsigned int column); static void ewl_mvc_selected_range_split(Ewl_MVC *mvc, @@ -20,9 +20,9 @@ static int ewl_mvc_selection_contained(Ewl_Selection_Range *a, Ewl_Selection_Range *b); static int ewl_mvc_line_intersects(int astart, int aend, int bstart, int bend); -static void ewl_mvc_range_merge(Ecore_List *list, Ewl_Model *model, void *data, +static void ewl_mvc_range_merge(Ecore_List *list, const Ewl_Model *model, void *data, Ewl_Selection_Range *range, Ewl_Selection_Range *cur); -static Ewl_Selection *ewl_mvc_selection_make(Ewl_Model *model, void *data, +static Ewl_Selection *ewl_mvc_selection_make(const Ewl_Model *model, void *data, unsigned int top, unsigned int left, unsigned int bottom, unsigned int right); @@ -67,7 +67,7 @@ * @brief Sets the given view onto the MVC */ void -ewl_mvc_view_set(Ewl_MVC *mvc, Ewl_View *view) +ewl_mvc_view_set(Ewl_MVC *mvc, const Ewl_View *view) { DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR(mvc); @@ -91,7 +91,7 @@ * @return Returns the current view set on the MVC * @brief Retrives the current view set on the MVC */ -Ewl_View * +const Ewl_View * ewl_mvc_view_get(Ewl_MVC *mvc) { DENTER_FUNCTION(DLEVEL_STABLE); @@ -127,7 +127,7 @@ * @brief Sets the given model into the tree */ void -ewl_mvc_model_set(Ewl_MVC *mvc, Ewl_Model *model) +ewl_mvc_model_set(Ewl_MVC *mvc, const Ewl_Model *model) { DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR(mvc); @@ -148,7 +148,7 @@ * @return Returns the current model set into the MVC widget * @brief Retrieves the model set into the MVC widget */ -Ewl_Model * +const Ewl_Model * ewl_mvc_model_get(Ewl_MVC *mvc) { DENTER_FUNCTION(DLEVEL_STABLE); @@ -391,12 +391,12 @@ * @brief Sets the given range, inclusive, as selected in the mvc */ void -ewl_mvc_selected_range_add(Ewl_MVC *mvc, Ewl_Model *model, void *data, +ewl_mvc_selected_range_add(Ewl_MVC *mvc, const Ewl_Model *model, void *data, unsigned int srow, unsigned int scolumn, unsigned int erow, unsigned int ecolumn) { Ewl_Selection *sel; - Ewl_Model *mod; + const Ewl_Model *mod; unsigned int tmp; DENTER_FUNCTION(DLEVEL_STABLE); @@ -449,7 +449,7 @@ * @brief Sets the given index as selected */ void -ewl_mvc_selected_set(Ewl_MVC *mvc, Ewl_Model *model, void *data, +ewl_mvc_selected_set(Ewl_MVC *mvc, const Ewl_Model *model, void *data, unsigned int row, unsigned int column) { DENTER_FUNCTION(DLEVEL_STABLE); @@ -476,10 +476,10 @@ * @brief Adds the given index to the selected list */ void -ewl_mvc_selected_add(Ewl_MVC *mvc, Ewl_Model *model, void *data, +ewl_mvc_selected_add(Ewl_MVC *mvc, const Ewl_Model *model, void *data, unsigned int row, unsigned int column) { - Ewl_Model *mod; + const Ewl_Model *mod; DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR(mvc); @@ -697,7 +697,7 @@ } static void -ewl_mvc_selected_insert(Ewl_MVC *mvc, Ewl_Model *model, void *data, +ewl_mvc_selected_insert(Ewl_MVC *mvc, const Ewl_Model *model, void *data, Ewl_Selection *sel, unsigned int row, unsigned int column) { Ewl_Selection_Range *range; @@ -800,7 +800,7 @@ * will append into the list as needed. @a cur maybe freed by this operation * if it is no longer needed */ static void -ewl_mvc_range_merge(Ecore_List *list, Ewl_Model *model, void *data, +ewl_mvc_range_merge(Ecore_List *list, const Ewl_Model *model, void *data, Ewl_Selection_Range *range, Ewl_Selection_Range *cur) { Ewl_Selection *sel; @@ -896,7 +896,7 @@ } static Ewl_Selection * -ewl_mvc_selection_make(Ewl_Model *model, void *data, unsigned int top, +ewl_mvc_selection_make(const Ewl_Model *model, void *data, unsigned int top, unsigned int left, unsigned int bottom, unsigned int right) { @@ -1033,7 +1033,7 @@ unsigned int row, unsigned int column) { Ewl_Selection *sel; - Ewl_Model *model; + const Ewl_Model *model; void *data; DENTER_FUNCTION(DLEVEL_STABLE); @@ -1098,12 +1098,12 @@ * @brief Handles the click of the given cell */ void -ewl_mvc_handle_click(Ewl_MVC *mvc, Ewl_Model *model, void *data, +ewl_mvc_handle_click(Ewl_MVC *mvc, const Ewl_Model *model, void *data, unsigned int row, unsigned int column) { unsigned int modifiers; int multi_select = FALSE; - Ewl_Model *mod; + const Ewl_Model *mod; DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR(mvc); @@ -1132,7 +1132,7 @@ Ewl_Selection *sel; void *sdata; unsigned int srow, scolumn; - Ewl_Model *smod; + const Ewl_Model *smod; /* A shift will add the current position into a * range with the last selected item. If the @@ -1445,7 +1445,7 @@ * @brief Creates a new index selection based on given values */ Ewl_Selection * -ewl_mvc_selection_index_new(Ewl_Model *model, void *data, unsigned int row, +ewl_mvc_selection_index_new(const Ewl_Model *model, void *data, unsigned int row, unsigned int column) { Ewl_Selection_Idx *sel; @@ -1473,7 +1473,7 @@ * @brief Creates a new range selection based on given values */ Ewl_Selection * -ewl_mvc_selection_range_new(Ewl_Model *model, void *data, unsigned int srow, +ewl_mvc_selection_range_new(const Ewl_Model *model, void *data, unsigned int srow, unsigned int scolumn, unsigned int erow, unsigned int ecolumn) { =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_mvc.h,v retrieving revision 1.22 retrieving revision 1.23 diff -u -3 -r1.22 -r1.23 --- ewl_mvc.h 11 Nov 2007 06:07:46 -0000 1.22 +++ ewl_mvc.h 20 Apr 2008 15:06:32 -0000 1.23 @@ -47,7 +47,7 @@ struct Ewl_Selection { Ewl_Selection_Type type; /**< The type of selection */ - Ewl_Model *model; /**< The model to work with this + const Ewl_Model *model; /**< The model to work with this selection */ void *highlight; /**< highlight widgets for the MVC */ void *data; /**< Data containing the selection */ @@ -120,8 +120,8 @@ Ewl_Box box; /**< Inherit from Ewl_Box */ void *data; /**< The mvc data */ - Ewl_View *view; /**< The view for the mvc */ - Ewl_Model *model; /**< The model for the mvc */ + const Ewl_View *view; /**< The view for the mvc */ + const Ewl_Model *model; /**< The model for the mvc */ struct { void (*view_change)(Ewl_MVC *mvc); /**< View change callback */ @@ -136,11 +136,11 @@ int ewl_mvc_init(Ewl_MVC *mvc); -void ewl_mvc_view_set(Ewl_MVC *mvc, Ewl_View *view); -Ewl_View *ewl_mvc_view_get(Ewl_MVC *mvc); +void ewl_mvc_view_set(Ewl_MVC *mvc, const Ewl_View *view); +const Ewl_View *ewl_mvc_view_get(Ewl_MVC *mvc); -void ewl_mvc_model_set(Ewl_MVC *mvc, Ewl_Model *model); -Ewl_Model *ewl_mvc_model_get(Ewl_MVC *mvc); +void ewl_mvc_model_set(Ewl_MVC *mvc, const Ewl_Model *model); +const Ewl_Model *ewl_mvc_model_get(Ewl_MVC *mvc); void ewl_mvc_data_set(Ewl_MVC *mvc, void *data); void *ewl_mvc_data_get(Ewl_MVC *mvc); @@ -157,17 +157,18 @@ void ewl_mvc_selected_list_set(Ewl_MVC *mvc, Ecore_List *list); Ecore_List *ewl_mvc_selected_list_get(Ewl_MVC *mvc); -void ewl_mvc_selected_range_add(Ewl_MVC *mvc, Ewl_Model * model, +void ewl_mvc_selected_range_add(Ewl_MVC *mvc, + const Ewl_Model * model, void *data, unsigned int srow, unsigned int scolumn, unsigned int erow, unsigned int ecolumn); -void ewl_mvc_selected_set(Ewl_MVC *mvc, Ewl_Model *model, +void ewl_mvc_selected_set(Ewl_MVC *mvc, const Ewl_Model *model, void *data, unsigned int row, unsigned int column); -void ewl_mvc_selected_add(Ewl_MVC *mvc, Ewl_Model *model, +void ewl_mvc_selected_add(Ewl_MVC *mvc, const Ewl_Model *model, void *data, unsigned int row, unsigned int column); Ewl_Selection_Idx *ewl_mvc_selected_get(Ewl_MVC *mvc); @@ -178,10 +179,10 @@ unsigned int ewl_mvc_selected_is(Ewl_MVC *mvc, void *data, unsigned int row, unsigned int column); -Ewl_Selection *ewl_mvc_selection_index_new(Ewl_Model *model, void *data, +Ewl_Selection *ewl_mvc_selection_index_new(const Ewl_Model *model, void *data, unsigned int row, unsigned int column); -Ewl_Selection *ewl_mvc_selection_range_new(Ewl_Model *model, void *data, +Ewl_Selection *ewl_mvc_selection_range_new(const Ewl_Model *model, void *data, unsigned int srow, unsigned int scolumn, unsigned int erow, @@ -201,7 +202,7 @@ void ewl_mvc_cb_destroy(Ewl_Widget *w, void *ev, void *data); void ewl_mvc_cb_data_unref(Ewl_Widget *w, void *ev, void *data); -void ewl_mvc_handle_click(Ewl_MVC *mvc, Ewl_Model *model, +void ewl_mvc_handle_click(Ewl_MVC *mvc, const Ewl_Model *model, void *data, unsigned int row, unsigned int column); =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_tree.c,v retrieving revision 1.65 retrieving revision 1.66 diff -u -3 -r1.65 -r1.66 --- ewl_tree.c 15 Apr 2008 22:30:11 -0000 1.65 +++ ewl_tree.c 20 Apr 2008 15:06:32 -0000 1.66 @@ -29,10 +29,10 @@ static void ewl_tree_build_tree(Ewl_Tree *tree); static void ewl_tree_build_tree_rows(Ewl_Tree *tree, - Ewl_Model *model, Ewl_View *view, void *data, - int colour, Ewl_Container *parent, + const Ewl_Model *model, const Ewl_View *view, + void *data, int colour, Ewl_Container *parent, int hidden); -static void ewl_tree_headers_build(Ewl_Tree *tree, Ewl_Model *model, +static void ewl_tree_headers_build(Ewl_Tree *tree, const Ewl_Model *model, void *mvc_data); static void ewl_tree_cb_header_changed(Ewl_Widget *w, void *ev, void *data); @@ -253,7 +253,7 @@ * @brief Sets the view to use to generate the content area */ void -ewl_tree_content_view_set(Ewl_Tree *tree, Ewl_View *view) +ewl_tree_content_view_set(Ewl_Tree *tree, const Ewl_View *view) { DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR(tree); @@ -576,7 +576,7 @@ ewl_tree_cb_column_sort(Ewl_Widget *w, void *ev __UNUSED__, void *data) { Ewl_Tree *tree; - Ewl_Model *model; + const Ewl_Model *model; DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR(w); @@ -607,8 +607,9 @@ } static void -ewl_tree_header_build(Ewl_Tree *tree, Ewl_Container *box, Ewl_Model *model, - Ewl_View *view, void *mvc_data, unsigned int column) +ewl_tree_header_build(Ewl_Tree *tree, Ewl_Container *box, + const Ewl_Model *model, const Ewl_View *view, + void *mvc_data, unsigned int column) { Ewl_Widget *c; @@ -671,7 +672,8 @@ } static void -ewl_tree_column_build(Ewl_Row *row, Ewl_Model *model, Ewl_View *view, +ewl_tree_column_build(Ewl_Row *row, const Ewl_Model *model, + const Ewl_View *view, void *mvc_data, unsigned int r, unsigned int c, Ewl_Widget *node) { @@ -711,7 +713,7 @@ ewl_tree_build_tree(Ewl_Tree *tree) { void *mvc_data; - Ewl_Model *model; + const Ewl_Model *model; DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR(tree); @@ -734,7 +736,7 @@ } static void -ewl_tree_headers_build(Ewl_Tree *tree, Ewl_Model *model, void *mvc_data) +ewl_tree_headers_build(Ewl_Tree *tree, const Ewl_Model *model, void *mvc_data) { Ewl_Container *header; unsigned int i; @@ -787,9 +789,9 @@ } static void -ewl_tree_build_tree_rows(Ewl_Tree *tree, Ewl_Model *model, Ewl_View *view, - void *data, int colour, Ewl_Container *parent, - int hidden) +ewl_tree_build_tree_rows(Ewl_Tree *tree, const Ewl_Model *model, + const Ewl_View *view, void *data, int colour, + Ewl_Container *parent, int hidden) { unsigned int i = 0, row_count = 0; unsigned int column; @@ -1154,7 +1156,7 @@ void ewl_tree_node_expandable_set(Ewl_Tree_Node *node, unsigned int expandable) { - Ewl_Model *model; + const Ewl_Model *model; DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR(node); @@ -1211,7 +1213,7 @@ { Ewl_Widget *child; Ecore_List *tmp; - Ewl_Model *model; + const Ewl_Model *model; void *data; DENTER_FUNCTION(DLEVEL_STABLE); @@ -1249,8 +1251,8 @@ data = ewl_mvc_data_get(EWL_MVC(node)); if (model->expansion.data && !node->built_children) { - Ewl_View *view, *tmp_view = NULL; - Ewl_Model *tmp_model; + const Ewl_View *view, *tmp_view = NULL; + const Ewl_Model *tmp_model; if (!node->expansion.data) { @@ -1412,7 +1414,7 @@ void *user_data __UNUSED__) { Ewl_Tree_Node *node; - Ewl_Model *model; + const Ewl_Model *model; DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR(w); =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_tree.h,v retrieving revision 1.34 retrieving revision 1.35 diff -u -3 -r1.34 -r1.35 --- ewl_tree.h 15 Apr 2008 22:23:29 -0000 1.34 +++ ewl_tree.h 20 Apr 2008 15:06:32 -0000 1.35 @@ -98,7 +98,7 @@ { Ewl_MVC mvc; /**< Inherit from ewl_mvc. */ - Ewl_View *content_view; /**< View for the content widget */ + const Ewl_View *content_view; /**< View for the content widget */ Ewl_Widget *header; /**< The tree header */ Ewl_Widget *rows; /**< The rows of the tree */ @@ -136,7 +136,7 @@ unsigned char visible); unsigned int ewl_tree_headers_visible_get(Ewl_Tree *tree); -void ewl_tree_content_view_set(Ewl_Tree *tree, Ewl_View *view); +void ewl_tree_content_view_set(Ewl_Tree *tree, const Ewl_View *view); Ewl_View *ewl_tree_content_view_get(Ewl_Tree *tree); Ewl_Tree_Selection_Type ewl_tree_selection_type_get(Ewl_Tree *tree); @@ -211,7 +211,7 @@ struct { - Ewl_Model *model; /**< The model of the expansion */ + const Ewl_Model *model; /**< The model of the expansion */ void *data; /**< The data of the expansion */ } expansion; =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_view.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -3 -r1.14 -r1.15 --- ewl_view.c 12 Nov 2007 22:42:22 -0000 1.14 +++ ewl_view.c 20 Apr 2008 15:06:32 -0000 1.15 @@ -32,7 +32,7 @@ * @brief Creates a new Ewl_View object */ Ewl_View * -ewl_view_clone(Ewl_View *src) +ewl_view_clone(const Ewl_View *src) { Ewl_View *view; @@ -89,7 +89,7 @@ * @brief Get the constructor set on this view */ Ewl_View_Widget_Fetch -ewl_view_widget_fetch_get(Ewl_View *v) +ewl_view_widget_fetch_get(const Ewl_View *v) { DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR_RET(v, NULL); @@ -121,7 +121,7 @@ * @brief Gets the header fetch callback from the view */ Ewl_View_Header_Fetch -ewl_view_header_fetch_get(Ewl_View *v) +ewl_view_header_fetch_get(const Ewl_View *v) { DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR_RET(v, NULL); @@ -153,7 +153,7 @@ * @brief Gets the expansion view fetch callback from the view */ Ewl_View_Expansion_View_Fetch -ewl_view_expansion_view_fetch_get(Ewl_View *v) +ewl_view_expansion_view_fetch_get(const Ewl_View *v) { DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR_RET(v, NULL); =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_view.h,v retrieving revision 1.17 retrieving revision 1.18 diff -u -3 -r1.17 -r1.18 --- ewl_view.h 23 Aug 2007 05:26:52 -0000 1.17 +++ ewl_view.h 20 Apr 2008 15:06:32 -0000 1.18 @@ -70,19 +70,19 @@ Ewl_View *ewl_view_new(void); int ewl_view_init(Ewl_View *view); -Ewl_View *ewl_view_clone(Ewl_View *src); +Ewl_View *ewl_view_clone(const Ewl_View *src); void ewl_view_widget_fetch_set(Ewl_View *view, Ewl_View_Widget_Fetch construct); -Ewl_View_Widget_Fetch ewl_view_widget_fetch_get(Ewl_View *view); +Ewl_View_Widget_Fetch ewl_view_widget_fetch_get(const Ewl_View *view); void ewl_view_header_fetch_set(Ewl_View *v, Ewl_View_Header_Fetch f); -Ewl_View_Header_Fetch ewl_view_header_fetch_get(Ewl_View *v); +Ewl_View_Header_Fetch ewl_view_header_fetch_get(const Ewl_View *v); void ewl_view_expansion_view_fetch_set(Ewl_View *v, Ewl_View_Expansion_View_Fetch f); -Ewl_View_Expansion_View_Fetch ewl_view_expansion_view_fetch_get(Ewl_View *v); +Ewl_View_Expansion_View_Fetch ewl_view_expansion_view_fetch_get(const Ewl_View *v); /** * @} ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs