From: Enlightenment C. <no...@cv...> - 2007-03-29 23:16:38
|
Enlightenment CVS committal Author : pfritz Project : e17 Module : libs/ewl Dir : e17/libs/ewl/src/bin/tests/combo Modified Files: ewl_combo.c Log Message: use consequently "unsigned int" in all MVC related stuff Note: that changes the API of the view callbacks and the data_fetch cb =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/bin/tests/combo/ewl_combo.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -3 -r1.11 -r1.12 --- ewl_combo.c 26 Mar 2007 18:51:23 -0000 1.11 +++ ewl_combo.c 29 Mar 2007 23:16:00 -0000 1.12 @@ -44,10 +44,11 @@ * populating the widget. * * @code - * static Ewl_Widget *combo_test_data_header_fetch(void *data, int col); + * static Ewl_Widget *combo_test_data_header_fetch(void *data, + * unsigned int col); * static void *combo_test_data_fetch(void *data, unsigned int row, * unsigned int col); - * static int combo_test_data_count_get(void *data); + * static unsigned int combo_test_data_count_get(void *data); * @endcode * * The three model functions are responsible for getting the information @@ -78,15 +79,18 @@ static void *combo_test_data_setup(void); static int create_test(Ewl_Container *win); static void combo_value_changed(Ewl_Widget *w, void *ev, void *data); -static Ewl_Widget *combo_test_data_header_fetch(void *data, int col); +static Ewl_Widget *combo_test_data_header_fetch(void *data, unsigned int col); static void *combo_test_data_fetch(void *data, unsigned int row, unsigned int col); -static int combo_test_data_count_get(void *data); +static unsigned int combo_test_data_count_get(void *data); static void combo_cb_add(Ewl_Widget *w, void *ev, void *data); static void combo_cb_entry_changed(Ewl_Widget *w, void *ev, void *data); -static Ewl_Widget *combo_test_editable_cb_header_fetch(void *data, int col); -static Ewl_Widget *combo_test_editable_cb_widget_fetch(void *data, int row, int col); +static Ewl_Widget *combo_test_editable_cb_header_fetch(void *data, + unsigned int col); +static Ewl_Widget *combo_test_editable_cb_widget_fetch(void *data, + unsigned int row, + unsigned int col); void test_info(Ewl_Test *test) @@ -152,7 +156,7 @@ ewl_mvc_model_set(EWL_MVC(combo), model); ewl_mvc_view_set(EWL_MVC(combo), view); ewl_mvc_data_set(EWL_MVC(combo), data); - ewl_mvc_selected_set(EWL_MVC(combo), model, data, 0, -1); + ewl_mvc_selected_set(EWL_MVC(combo), model, data, 0, 0); ewl_widget_show(combo); /* create the editable model/view */ @@ -195,7 +199,7 @@ combo_test_data_setup(void) { Combo_Test_Data *data; - int i; + unsigned int i; const char *icons[] = { EWL_ICON_EDIT_COPY, @@ -228,7 +232,7 @@ } static Ewl_Widget * -combo_test_data_header_fetch(void *data __UNUSED__, int col __UNUSED__) +combo_test_data_header_fetch(void *data __UNUSED__, unsigned int col __UNUSED__) { Ewl_Widget *header; @@ -252,7 +256,7 @@ return NULL; } -static int +static unsigned int combo_test_data_count_get(void *data) { Combo_Test_Data *d; @@ -283,7 +287,7 @@ { Ewl_Widget *c; Combo_Test_Data *d; - int s; + unsigned int s; c = ewl_widget_name_find("combo_label"); d = ewl_mvc_data_get(EWL_MVC(c)); @@ -302,7 +306,7 @@ } static Ewl_Widget * -combo_test_editable_cb_header_fetch(void *data, int col) +combo_test_editable_cb_header_fetch(void *data, unsigned int col) { Combo_Test_Data *d; Ewl_Widget *w, *o; @@ -333,7 +337,8 @@ } static Ewl_Widget * -combo_test_editable_cb_widget_fetch(void *data, int row, int col) +combo_test_editable_cb_widget_fetch(void *data, + unsigned int row, unsigned int col) { Ewl_Widget *w; Ewl_Widget *o; |