Enlightenment CVS committal Author : dj2 Project : e17 Module : libs/ewl
Dir : e17/libs/ewl/src/bin/tests/object Modified Files: ewl_object_test.c Log Message: - change tabs to spaces (Ewl uses 8 space indent now instead of a tab) =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/bin/tests/object/ewl_object_test.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -3 -r1.9 -r1.10 --- ewl_object_test.c 27 Dec 2007 05:47:19 -0000 1.9 +++ ewl_object_test.c 6 May 2008 20:18:55 -0000 1.10 @@ -1,4 +1,4 @@ -/* vim: set sw=8 ts=8 sts=8 noexpandtab: */ +/* vim: set sw=8 ts=8 sts=8 expandtab: */ #include <limits.h> #include "Ewl_Test.h" #include "ewl_test_private.h" @@ -40,38 +40,38 @@ static int alignment_test_set_get(char *buf, int len); static Ewl_Unit_Test object_unit_tests[] = { - {"default properties", default_property_test, NULL, -1, 0}, - {"place center/get", place_test_center_get, NULL, -1, 0}, - {"place top/get", place_test_top_get, NULL, -1, 0}, - {"place bottom/get", place_test_bottom_get, NULL, -1, 0}, - {"place left/get", place_test_left_get, NULL, -1, 0}, - {"place right/get", place_test_right_get, NULL, -1, 0}, - {"position set/get", position_test_set_get, NULL, -1, 0}, - {"position size set/get", position_size_test_set_get, NULL, -1, 0}, - {"preferred inner size set/get", preferred_inner_size_test_set_get, NULL, -1, 0}, - {"preferred size set/get", preferred_size_test_set_get, NULL, -1, 0}, - {"minimum size set/get", minimum_size_test_set_get, NULL, -1, 0}, - {"maximum size set/get", maximum_size_test_set_get, NULL, -1, 0}, - {"minimum size set/request", minimum_size_test_set_request, NULL, -1, 0}, - {"maximum size set/request", maximum_size_test_set_request, NULL, -1, 0}, - {"padding set/get", padding_test_set_get, NULL, -1, 0}, - {"insets set/get", insets_test_set_get, NULL, -1, 0}, - {"padding set/size get", padding_test_set_size_get, NULL, -1, 0}, - {"insets set/size get", insets_test_set_size_get, NULL, -1, 0}, - {"insets padding set/size get", insets_padding_test_set_size_get, NULL, -1, 0}, - {"fill policy set/get", fill_policy_test_set_get, NULL, -1, 0}, - {"alignment set/get", alignment_test_set_get, NULL, -1, 0}, - {NULL, NULL, NULL, -1, 0} - }; + {"default properties", default_property_test, NULL, -1, 0}, + {"place center/get", place_test_center_get, NULL, -1, 0}, + {"place top/get", place_test_top_get, NULL, -1, 0}, + {"place bottom/get", place_test_bottom_get, NULL, -1, 0}, + {"place left/get", place_test_left_get, NULL, -1, 0}, + {"place right/get", place_test_right_get, NULL, -1, 0}, + {"position set/get", position_test_set_get, NULL, -1, 0}, + {"position size set/get", position_size_test_set_get, NULL, -1, 0}, + {"preferred inner size set/get", preferred_inner_size_test_set_get, NULL, -1, 0}, + {"preferred size set/get", preferred_size_test_set_get, NULL, -1, 0}, + {"minimum size set/get", minimum_size_test_set_get, NULL, -1, 0}, + {"maximum size set/get", maximum_size_test_set_get, NULL, -1, 0}, + {"minimum size set/request", minimum_size_test_set_request, NULL, -1, 0}, + {"maximum size set/request", maximum_size_test_set_request, NULL, -1, 0}, + {"padding set/get", padding_test_set_get, NULL, -1, 0}, + {"insets set/get", insets_test_set_get, NULL, -1, 0}, + {"padding set/size get", padding_test_set_size_get, NULL, -1, 0}, + {"insets set/size get", insets_test_set_size_get, NULL, -1, 0}, + {"insets padding set/size get", insets_padding_test_set_size_get, NULL, -1, 0}, + {"fill policy set/get", fill_policy_test_set_get, NULL, -1, 0}, + {"alignment set/get", alignment_test_set_get, NULL, -1, 0}, + {NULL, NULL, NULL, -1, 0} + }; void test_info(Ewl_Test *test) { - test->name = "Object"; - test->tip = "The base object type."; - test->filename = __FILE__; - test->type = EWL_TEST_TYPE_MISC; - test->unit_tests = object_unit_tests; + test->name = "Object"; + test->tip = "The base object type."; + test->filename = __FILE__; + test->type = EWL_TEST_TYPE_MISC; + test->unit_tests = object_unit_tests; } /* @@ -80,98 +80,98 @@ static int default_property_test(char *buf, int len) { - Ewl_Widget *w; - int l, r, t, b; - int ret = 0; - - w = ewl_widget_new(); - - if (ewl_object_current_x_get(EWL_OBJECT(w))) { - LOG_FAILURE(buf, len, "x coordinate incorrect"); - goto DONE; - } - - if (ewl_object_current_y_get(EWL_OBJECT(w))) { - LOG_FAILURE(buf, len, "y coordinate incorrect"); - goto DONE; - } - - if (ewl_object_current_w_get(EWL_OBJECT(w)) != EWL_OBJECT_MIN_SIZE) { - LOG_FAILURE(buf, len, "current width incorrect"); - goto DONE; - } - - if (ewl_object_current_h_get(EWL_OBJECT(w)) != EWL_OBJECT_MIN_SIZE) { - LOG_FAILURE(buf, len, "current height incorrect"); - goto DONE; - } - - if (ewl_object_minimum_w_get(EWL_OBJECT(w)) != EWL_OBJECT_MIN_SIZE) { - LOG_FAILURE(buf, len, "minimum width incorrect"); - goto DONE; - } - - if (ewl_object_minimum_h_get(EWL_OBJECT(w)) != EWL_OBJECT_MIN_SIZE) { - LOG_FAILURE(buf, len, "minimum height incorrect"); - goto DONE; - } - - if (ewl_object_maximum_w_get(EWL_OBJECT(w)) != EWL_OBJECT_MAX_SIZE) { - LOG_FAILURE(buf, len, "maximum width incorrect"); - goto DONE; - } - - if (ewl_object_maximum_h_get(EWL_OBJECT(w)) != EWL_OBJECT_MAX_SIZE) { - LOG_FAILURE(buf, len, "maximum height incorrect"); - goto DONE; - } - - if (ewl_object_preferred_inner_w_get(EWL_OBJECT(w))) { - LOG_FAILURE(buf, len, "preferred inner width incorrect"); - goto DONE; - } - - if (ewl_object_preferred_inner_h_get(EWL_OBJECT(w))) { - LOG_FAILURE(buf, len, "preferred inner height incorrect"); - goto DONE; - } - - if (ewl_object_preferred_w_get(EWL_OBJECT(w)) != EWL_OBJECT_MIN_SIZE) { - LOG_FAILURE(buf, len, "preferred width incorrect"); - goto DONE; - } - - if (ewl_object_preferred_h_get(EWL_OBJECT(w)) != EWL_OBJECT_MIN_SIZE) { - LOG_FAILURE(buf, len, "preferred height incorrect"); - goto DONE; - } - - ewl_object_insets_get(EWL_OBJECT(w), &l, &r, &t, &b); - if (l || r || t || b) { - LOG_FAILURE(buf, len, "insets incorrect"); - goto DONE; - } - - ewl_object_padding_get(EWL_OBJECT(w), &l, &r, &t, &b); - if (l || r || t || b) { - LOG_FAILURE(buf, len, "padding incorrect"); - goto DONE; - } - - if (ewl_object_fill_policy_get(EWL_OBJECT(w)) != EWL_FLAG_FILL_NORMAL) { - LOG_FAILURE(buf, len, "fill policy incorrect"); - goto DONE; - } - - if (ewl_object_alignment_get(EWL_OBJECT(w)) != EWL_FLAG_ALIGN_CENTER) { - LOG_FAILURE(buf, len, "alignment incorrect"); - goto DONE; - } + Ewl_Widget *w; + int l, r, t, b; + int ret = 0; + + w = ewl_widget_new(); + + if (ewl_object_current_x_get(EWL_OBJECT(w))) { + LOG_FAILURE(buf, len, "x coordinate incorrect"); + goto DONE; + } + + if (ewl_object_current_y_get(EWL_OBJECT(w))) { + LOG_FAILURE(buf, len, "y coordinate incorrect"); + goto DONE; + } + + if (ewl_object_current_w_get(EWL_OBJECT(w)) != EWL_OBJECT_MIN_SIZE) { + LOG_FAILURE(buf, len, "current width incorrect"); + goto DONE; + } + + if (ewl_object_current_h_get(EWL_OBJECT(w)) != EWL_OBJECT_MIN_SIZE) { + LOG_FAILURE(buf, len, "current height incorrect"); + goto DONE; + } + + if (ewl_object_minimum_w_get(EWL_OBJECT(w)) != EWL_OBJECT_MIN_SIZE) { + LOG_FAILURE(buf, len, "minimum width incorrect"); + goto DONE; + } + + if (ewl_object_minimum_h_get(EWL_OBJECT(w)) != EWL_OBJECT_MIN_SIZE) { + LOG_FAILURE(buf, len, "minimum height incorrect"); + goto DONE; + } + + if (ewl_object_maximum_w_get(EWL_OBJECT(w)) != EWL_OBJECT_MAX_SIZE) { + LOG_FAILURE(buf, len, "maximum width incorrect"); + goto DONE; + } + + if (ewl_object_maximum_h_get(EWL_OBJECT(w)) != EWL_OBJECT_MAX_SIZE) { + LOG_FAILURE(buf, len, "maximum height incorrect"); + goto DONE; + } + + if (ewl_object_preferred_inner_w_get(EWL_OBJECT(w))) { + LOG_FAILURE(buf, len, "preferred inner width incorrect"); + goto DONE; + } + + if (ewl_object_preferred_inner_h_get(EWL_OBJECT(w))) { + LOG_FAILURE(buf, len, "preferred inner height incorrect"); + goto DONE; + } + + if (ewl_object_preferred_w_get(EWL_OBJECT(w)) != EWL_OBJECT_MIN_SIZE) { + LOG_FAILURE(buf, len, "preferred width incorrect"); + goto DONE; + } + + if (ewl_object_preferred_h_get(EWL_OBJECT(w)) != EWL_OBJECT_MIN_SIZE) { + LOG_FAILURE(buf, len, "preferred height incorrect"); + goto DONE; + } + + ewl_object_insets_get(EWL_OBJECT(w), &l, &r, &t, &b); + if (l || r || t || b) { + LOG_FAILURE(buf, len, "insets incorrect"); + goto DONE; + } + + ewl_object_padding_get(EWL_OBJECT(w), &l, &r, &t, &b); + if (l || r || t || b) { + LOG_FAILURE(buf, len, "padding incorrect"); + goto DONE; + } + + if (ewl_object_fill_policy_get(EWL_OBJECT(w)) != EWL_FLAG_FILL_NORMAL) { + LOG_FAILURE(buf, len, "fill policy incorrect"); + goto DONE; + } + + if (ewl_object_alignment_get(EWL_OBJECT(w)) != EWL_FLAG_ALIGN_CENTER) { + LOG_FAILURE(buf, len, "alignment incorrect"); + goto DONE; + } - ret = 1; + ret = 1; DONE: - ewl_widget_destroy(w); - return ret; + ewl_widget_destroy(w); + return ret; } /* @@ -180,28 +180,28 @@ static int place_test_center_get(char *buf, int len) { - Ewl_Widget *w; - int x, y, width, height; - int ret = 0; + Ewl_Widget *w; + int x, y, width, height; + int ret = 0; - w = ewl_widget_new(); + w = ewl_widget_new(); - ewl_object_preferred_inner_size_set(EWL_OBJECT(w), 10, 20); - ewl_object_fill_policy_set(EWL_OBJECT(w), EWL_FLAG_FILL_NONE); + ewl_object_preferred_inner_size_set(EWL_OBJECT(w), 10, 20); + ewl_object_fill_policy_set(EWL_OBJECT(w), EWL_FLAG_FILL_NONE); - ewl_object_alignment_set(EWL_OBJECT(w), EWL_FLAG_ALIGN_CENTER); - ewl_object_place(EWL_OBJECT(w), 0, 0, 20, 40); + ewl_object_alignment_set(EWL_OBJECT(w), EWL_FLAG_ALIGN_CENTER); + ewl_object_place(EWL_OBJECT(w), 0, 0, 20, 40); - ewl_object_current_geometry_get(EWL_OBJECT(w), &x, &y, &width, &height); + ewl_object_current_geometry_get(EWL_OBJECT(w), &x, &y, &width, &height); - if (x == 5 && y == 10 && width == 10 && height == 20) - ret = 1; - else - LOG_FAILURE(buf, len, "incorrect center align placement"); + if (x == 5 && y == 10 && width == 10 && height == 20) + ret = 1; + else + LOG_FAILURE(buf, len, "incorrect center align placement"); - ewl_widget_destroy(w); + ewl_widget_destroy(w); - return ret; + return ret; } /* @@ -210,28 +210,28 @@ static int place_test_top_get(char *buf, int len) { - Ewl_Widget *w; - int x, y, width, height; - int ret = 0; + Ewl_Widget *w; + int x, y, width, height; + int ret = 0; - w = ewl_widget_new(); + w = ewl_widget_new(); - ewl_object_preferred_inner_size_set(EWL_OBJECT(w), 10, 20); - ewl_object_fill_policy_set(EWL_OBJECT(w), EWL_FLAG_FILL_NONE); + ewl_object_preferred_inner_size_set(EWL_OBJECT(w), 10, 20); + ewl_object_fill_policy_set(EWL_OBJECT(w), EWL_FLAG_FILL_NONE); - ewl_object_alignment_set(EWL_OBJECT(w), EWL_FLAG_ALIGN_TOP); - ewl_object_place(EWL_OBJECT(w), 0, 0, 20, 40); + ewl_object_alignment_set(EWL_OBJECT(w), EWL_FLAG_ALIGN_TOP); + ewl_object_place(EWL_OBJECT(w), 0, 0, 20, 40); - ewl_object_current_geometry_get(EWL_OBJECT(w), &x, &y, &width, &height); + ewl_object_current_geometry_get(EWL_OBJECT(w), &x, &y, &width, &height); - if (x == 5 && y == 0 && width == 10 && height == 20) - ret = 1; - else - LOG_FAILURE(buf, len, "incorrect top align placement"); + if (x == 5 && y == 0 && width == 10 && height == 20) + ret = 1; + else + LOG_FAILURE(buf, len, "incorrect top align placement"); - ewl_widget_destroy(w); + ewl_widget_destroy(w); - return ret; + return ret; } /* @@ -240,28 +240,28 @@ static int place_test_bottom_get(char *buf, int len) { - Ewl_Widget *w; - int x, y, width, height; - int ret = 0; + Ewl_Widget *w; + int x, y, width, height; + int ret = 0; - w = ewl_widget_new(); + w = ewl_widget_new(); - ewl_object_preferred_inner_size_set(EWL_OBJECT(w), 10, 20); - ewl_object_fill_policy_set(EWL_OBJECT(w), EWL_FLAG_FILL_NONE); + ewl_object_preferred_inner_size_set(EWL_OBJECT(w), 10, 20); + ewl_object_fill_policy_set(EWL_OBJECT(w), EWL_FLAG_FILL_NONE); - ewl_object_alignment_set(EWL_OBJECT(w), EWL_FLAG_ALIGN_BOTTOM); - ewl_object_place(EWL_OBJECT(w), 0, 0, 20, 40); + ewl_object_alignment_set(EWL_OBJECT(w), EWL_FLAG_ALIGN_BOTTOM); + ewl_object_place(EWL_OBJECT(w), 0, 0, 20, 40); - ewl_object_current_geometry_get(EWL_OBJECT(w), &x, &y, &width, &height); + ewl_object_current_geometry_get(EWL_OBJECT(w), &x, &y, &width, &height); - if (x == 5 && y == 20 && width == 10 && height == 20) - ret = 1; - else - LOG_FAILURE(buf, len, "incorrect bottom align placement"); + if (x == 5 && y == 20 && width == 10 && height == 20) + ret = 1; + else + LOG_FAILURE(buf, len, "incorrect bottom align placement"); - ewl_widget_destroy(w); + ewl_widget_destroy(w); - return ret; + return ret; } /* @@ -270,28 +270,28 @@ static int place_test_left_get(char *buf, int len) { - Ewl_Widget *w; - int x, y, width, height; - int ret = 0; + Ewl_Widget *w; + int x, y, width, height; + int ret = 0; - w = ewl_widget_new(); + w = ewl_widget_new(); - ewl_object_preferred_inner_size_set(EWL_OBJECT(w), 10, 20); - ewl_object_fill_policy_set(EWL_OBJECT(w), EWL_FLAG_FILL_NONE); + ewl_object_preferred_inner_size_set(EWL_OBJECT(w), 10, 20); + ewl_object_fill_policy_set(EWL_OBJECT(w), EWL_FLAG_FILL_NONE); - ewl_object_alignment_set(EWL_OBJECT(w), EWL_FLAG_ALIGN_LEFT); - ewl_object_place(EWL_OBJECT(w), 0, 0, 20, 40); + ewl_object_alignment_set(EWL_OBJECT(w), EWL_FLAG_ALIGN_LEFT); + ewl_object_place(EWL_OBJECT(w), 0, 0, 20, 40); - ewl_object_current_geometry_get(EWL_OBJECT(w), &x, &y, &width, &height); + ewl_object_current_geometry_get(EWL_OBJECT(w), &x, &y, &width, &height); - if (x == 0 && y == 10 && width == 10 && height == 20) - ret = 1; - else - LOG_FAILURE(buf, len, "incorrect left align placement"); + if (x == 0 && y == 10 && width == 10 && height == 20) + ret = 1; + else + LOG_FAILURE(buf, len, "incorrect left align placement"); - ewl_widget_destroy(w); + ewl_widget_destroy(w); - return ret; + return ret; } /* @@ -300,28 +300,28 @@ static int place_test_right_get(char *buf, int len) { - Ewl_Widget *w; - int x, y, width, height; - int ret = 0; + Ewl_Widget *w; + int x, y, width, height; + int ret = 0; - w = ewl_widget_new(); + w = ewl_widget_new(); - ewl_object_preferred_inner_size_set(EWL_OBJECT(w), 10, 20); - ewl_object_fill_policy_set(EWL_OBJECT(w), EWL_FLAG_FILL_NONE); + ewl_object_preferred_inner_size_set(EWL_OBJECT(w), 10, 20); + ewl_object_fill_policy_set(EWL_OBJECT(w), EWL_FLAG_FILL_NONE); - ewl_object_alignment_set(EWL_OBJECT(w), EWL_FLAG_ALIGN_RIGHT); - ewl_object_place(EWL_OBJECT(w), 0, 0, 20, 40); + ewl_object_alignment_set(EWL_OBJECT(w), EWL_FLAG_ALIGN_RIGHT); + ewl_object_place(EWL_OBJECT(w), 0, 0, 20, 40); - ewl_object_current_geometry_get(EWL_OBJECT(w), &x, &y, &width, &height); + ewl_object_current_geometry_get(EWL_OBJECT(w), &x, &y, &width, &height); - if (x == 10 && y == 10 && width == 10 && height == 20) - ret = 1; - else - LOG_FAILURE(buf, len, "incorrect right align placement"); + if (x == 10 && y == 10 && width == 10 && height == 20) + ret = 1; + else + LOG_FAILURE(buf, len, "incorrect right align placement"); - ewl_widget_destroy(w); + ewl_widget_destroy(w); - return ret; + return ret; } /* @@ -330,25 +330,25 @@ static int position_test_set_get(char *buf, int len) { - Ewl_Widget *w; - int x, y; - int ret = 0; + Ewl_Widget *w; + int x, y; + int ret = 0; - w = ewl_widget_new(); + w = ewl_widget_new(); - ewl_object_position_request(EWL_OBJECT(w), 11, 23); + ewl_object_position_request(EWL_OBJECT(w), 11, 23); - x = ewl_object_current_x_get(EWL_OBJECT(w)); - y = ewl_object_current_y_get(EWL_OBJECT(w)); + x = ewl_object_current_x_get(EWL_OBJECT(w)); + y = ewl_object_current_y_get(EWL_OBJECT(w)); - if (x == 11 && y == 23) - ret = 1; - else - LOG_FAILURE(buf, len, "incorrect positions returned"); + if (x == 11 && y == 23) + ret = 1; + else + LOG_FAILURE(buf, len, "incorrect positions returned"); - ewl_widget_destroy(w); + ewl_widget_destroy(w); - return ret; + return ret; } /* @@ -357,24 +357,24 @@ static int position_size_test_set_get(char *buf, int len) { - Ewl_Widget *w; - int x, y, width, height; - int ret = 0; + Ewl_Widget *w; + int x, y, width, height; + int ret = 0; - w = ewl_widget_new(); + w = ewl_widget_new(); - ewl_object_geometry_request(EWL_OBJECT(w), 11, 23, 58, 13); + ewl_object_geometry_request(EWL_OBJECT(w), 11, 23, 58, 13); - ewl_object_current_geometry_get(EWL_OBJECT(w), &x, &y, &width, &height); + ewl_object_current_geometry_get(EWL_OBJECT(w), &x, &y, &width, &height); - if (x == 11 && y == 23 && width == 58 && height == 13) - ret = 1; - else - LOG_FAILURE(buf, len, "incorrect position or size returned"); + if (x == 11 && y == 23 && width == 58 && height == 13) + ret = 1; + else + LOG_FAILURE(buf, len, "incorrect position or size returned"); - ewl_widget_destroy(w); + ewl_widget_destroy(w); - return ret; + return ret; } /* @@ -384,40 +384,40 @@ static int preferred_inner_size_test_set_get(char *buf, int len) { - Ewl_Widget *w; - int width = 0, height = 0; - int ret = 0; - - w = ewl_widget_new(); - - ewl_object_preferred_inner_size_get(EWL_OBJECT(w), &width, &height); - if (width == 0 && height == 0) { - ewl_object_preferred_inner_size_set(EWL_OBJECT(w), MATCH_SIZE, - MATCH_SIZE); - ewl_object_preferred_inner_size_get(EWL_OBJECT(w), &width, - &height); - if (width == MATCH_SIZE && height == MATCH_SIZE) { - ewl_object_preferred_inner_size_set(EWL_OBJECT(w), - DIFFER_WIDTH, - DIFFER_HEIGHT); - ewl_object_preferred_inner_size_get(EWL_OBJECT(w), - &width, - &height); - if (width == DIFFER_WIDTH && height == DIFFER_HEIGHT) - ret = 1; - else - LOG_FAILURE(buf, len, "preferred inner sizes match"); - } - else - LOG_FAILURE(buf, len, "preferred inner sizes differ"); - } - else - LOG_FAILURE(buf, len, "default preferred inner size %dx%d", - width, height); + Ewl_Widget *w; + int width = 0, height = 0; + int ret = 0; + + w = ewl_widget_new(); + + ewl_object_preferred_inner_size_get(EWL_OBJECT(w), &width, &height); + if (width == 0 && height == 0) { + ewl_object_preferred_inner_size_set(EWL_OBJECT(w), MATCH_SIZE, + MATCH_SIZE); + ewl_object_preferred_inner_size_get(EWL_OBJECT(w), &width, + &height); + if (width == MATCH_SIZE && height == MATCH_SIZE) { + ewl_object_preferred_inner_size_set(EWL_OBJECT(w), + DIFFER_WIDTH, + DIFFER_HEIGHT); + ewl_object_preferred_inner_size_get(EWL_OBJECT(w), + &width, + &height); + if (width == DIFFER_WIDTH && height == DIFFER_HEIGHT) + ret = 1; + else + LOG_FAILURE(buf, len, "preferred inner sizes match"); + } + else + LOG_FAILURE(buf, len, "preferred inner sizes differ"); + } + else + LOG_FAILURE(buf, len, "default preferred inner size %dx%d", + width, height); - ewl_widget_destroy(w); + ewl_widget_destroy(w); - return ret; + return ret; } /* @@ -427,40 +427,40 @@ static int preferred_size_test_set_get(char *buf, int len) { - Ewl_Widget *w; - int width = 0, height = 0; - int ret = 0; - - w = ewl_widget_new(); - - ewl_object_preferred_size_get(EWL_OBJECT(w), &width, &height); - if (width == EWL_OBJECT_MIN_SIZE && height == EWL_OBJECT_MIN_SIZE) { - ewl_object_preferred_inner_size_set(EWL_OBJECT(w), MATCH_SIZE, - MATCH_SIZE); - ewl_object_preferred_inner_size_get(EWL_OBJECT(w), &width, - &height); - if (width == MATCH_SIZE && height == MATCH_SIZE) { - ewl_object_preferred_inner_size_set(EWL_OBJECT(w), - DIFFER_WIDTH, - DIFFER_HEIGHT); - ewl_object_preferred_inner_size_get(EWL_OBJECT(w), - &width, - &height); - if (width == DIFFER_WIDTH && height == DIFFER_HEIGHT) - ret = 1; - else - LOG_FAILURE(buf, len, "preferred sizes match"); - } - else - LOG_FAILURE(buf, len, "preferred sizes differ"); - } - else - LOG_FAILURE(buf, len, "default preferred size %dx%d", - width, height); + Ewl_Widget *w; + int width = 0, height = 0; + int ret = 0; + + w = ewl_widget_new(); + + ewl_object_preferred_size_get(EWL_OBJECT(w), &width, &height); + if (width == EWL_OBJECT_MIN_SIZE && height == EWL_OBJECT_MIN_SIZE) { + ewl_object_preferred_inner_size_set(EWL_OBJECT(w), MATCH_SIZE, + MATCH_SIZE); + ewl_object_preferred_inner_size_get(EWL_OBJECT(w), &width, + &height); + if (width == MATCH_SIZE && height == MATCH_SIZE) { + ewl_object_preferred_inner_size_set(EWL_OBJECT(w), + DIFFER_WIDTH, + DIFFER_HEIGHT); + ewl_object_preferred_inner_size_get(EWL_OBJECT(w), + &width, + &height); + if (width == DIFFER_WIDTH && height == DIFFER_HEIGHT) + ret = 1; + else + LOG_FAILURE(buf, len, "preferred sizes match"); + } + else + LOG_FAILURE(buf, len, "preferred sizes differ"); + } + else + LOG_FAILURE(buf, len, "default preferred size %dx%d", + width, height); - ewl_widget_destroy(w); + ewl_widget_destroy(w); - return ret; + return ret; } /* @@ -470,47 +470,47 @@ static int minimum_size_test_set_get(char *buf, int len) { - Ewl_Widget *w; - int width = 0, height = 0; - int ret = 0; - - w = ewl_widget_new(); - ewl_object_size_request(EWL_OBJECT(w), MATCH_SIZE - 1, - MATCH_SIZE - 1); - - ewl_object_minimum_size_get(EWL_OBJECT(w), &width, &height); - if (width == EWL_OBJECT_MIN_SIZE && height == EWL_OBJECT_MIN_SIZE) { - ewl_object_minimum_size_set(EWL_OBJECT(w), DIFFER_WIDTH, - DIFFER_HEIGHT); - ewl_object_minimum_size_get(EWL_OBJECT(w), &width, &height); - if (width == DIFFER_WIDTH && height == DIFFER_HEIGHT) { - ewl_object_minimum_size_set(EWL_OBJECT(w), - MATCH_SIZE, - MATCH_SIZE); - ewl_object_minimum_size_get(EWL_OBJECT(w), &width, - &height); - if (width == MATCH_SIZE && height == MATCH_SIZE) { - ewl_object_current_size_get(EWL_OBJECT(w), - &width, &height); - if (width == MATCH_SIZE && height == MATCH_SIZE) - ret = 1; - else - LOG_FAILURE(buf, len, - "current size wrong"); - } - else - LOG_FAILURE(buf, len, "minimum sizes match"); - } - else - LOG_FAILURE(buf, len, "minimum sizes differ"); - } - else - LOG_FAILURE(buf, len, "default minimum size %dx%d", - width, height); + Ewl_Widget *w; + int width = 0, height = 0; + int ret = 0; + + w = ewl_widget_new(); + ewl_object_size_request(EWL_OBJECT(w), MATCH_SIZE - 1, + MATCH_SIZE - 1); + + ewl_object_minimum_size_get(EWL_OBJECT(w), &width, &height); + if (width == EWL_OBJECT_MIN_SIZE && height == EWL_OBJECT_MIN_SIZE) { + ewl_object_minimum_size_set(EWL_OBJECT(w), DIFFER_WIDTH, + DIFFER_HEIGHT); + ewl_object_minimum_size_get(EWL_OBJECT(w), &width, &height); + if (width == DIFFER_WIDTH && height == DIFFER_HEIGHT) { + ewl_object_minimum_size_set(EWL_OBJECT(w), + MATCH_SIZE, + MATCH_SIZE); + ewl_object_minimum_size_get(EWL_OBJECT(w), &width, + &height); + if (width == MATCH_SIZE && height == MATCH_SIZE) { + ewl_object_current_size_get(EWL_OBJECT(w), + &width, &height); + if (width == MATCH_SIZE && height == MATCH_SIZE) + ret = 1; + else + LOG_FAILURE(buf, len, + "current size wrong"); + } + else + LOG_FAILURE(buf, len, "minimum sizes match"); + } + else + LOG_FAILURE(buf, len, "minimum sizes differ"); + } + else + LOG_FAILURE(buf, len, "default minimum size %dx%d", + width, height); - ewl_widget_destroy(w); + ewl_widget_destroy(w); - return ret; + return ret; } /* @@ -520,48 +520,48 @@ static int maximum_size_test_set_get(char *buf, int len) { - Ewl_Widget *w; - int width = 0, height = 0; - int ret = 0; - - w = ewl_widget_new(); - ewl_object_size_request(EWL_OBJECT(w), DIFFER_WIDTH + 1, - DIFFER_HEIGHT + 1); - - ewl_object_maximum_size_get(EWL_OBJECT(w), &width, &height); - if (width == EWL_OBJECT_MAX_SIZE && height == EWL_OBJECT_MAX_SIZE) { - ewl_object_maximum_size_set(EWL_OBJECT(w), MATCH_SIZE, - MATCH_SIZE); - ewl_object_maximum_size_get(EWL_OBJECT(w), &width, &height); - if (width == MATCH_SIZE && height == MATCH_SIZE) { - ewl_object_maximum_size_set(EWL_OBJECT(w), - DIFFER_WIDTH, - DIFFER_HEIGHT); - ewl_object_maximum_size_get(EWL_OBJECT(w), &width, - &height); - if (width == DIFFER_WIDTH && height == DIFFER_HEIGHT) { - ewl_object_current_size_get(EWL_OBJECT(w), - &width, &height); - if (width == DIFFER_WIDTH && - height == DIFFER_HEIGHT) - ret = 1; - else - LOG_FAILURE(buf, len, - "current size wrong"); - } - else - LOG_FAILURE(buf, len, "maximum sizes match"); - } - else - LOG_FAILURE(buf, len, "maximum sizes differ"); - } - else - LOG_FAILURE(buf, len, "default maximum size %dx%d", - width, height); + Ewl_Widget *w; + int width = 0, height = 0; + int ret = 0; + + w = ewl_widget_new(); + ewl_object_size_request(EWL_OBJECT(w), DIFFER_WIDTH + 1, + DIFFER_HEIGHT + 1); + + ewl_object_maximum_size_get(EWL_OBJECT(w), &width, &height); + if (width == EWL_OBJECT_MAX_SIZE && height == EWL_OBJECT_MAX_SIZE) { + ewl_object_maximum_size_set(EWL_OBJECT(w), MATCH_SIZE, + MATCH_SIZE); + ewl_object_maximum_size_get(EWL_OBJECT(w), &width, &height); + if (width == MATCH_SIZE && height == MATCH_SIZE) { + ewl_object_maximum_size_set(EWL_OBJECT(w), + DIFFER_WIDTH, + DIFFER_HEIGHT); + ewl_object_maximum_size_get(EWL_OBJECT(w), &width, + &height); + if (width == DIFFER_WIDTH && height == DIFFER_HEIGHT) { + ewl_object_current_size_get(EWL_OBJECT(w), + &width, &height); + if (width == DIFFER_WIDTH && + height == DIFFER_HEIGHT) + ret = 1; + else + LOG_FAILURE(buf, len, + "current size wrong"); + } + else + LOG_FAILURE(buf, len, "maximum sizes match"); + } + else + LOG_FAILURE(buf, len, "maximum sizes differ"); + } + else + LOG_FAILURE(buf, len, "default maximum size %dx%d", + width, height); - ewl_widget_destroy(w); + ewl_widget_destroy(w); - return ret; + return ret; } /* @@ -571,54 +571,54 @@ static int minimum_size_test_set_request(char *buf, int len) { - Ewl_Widget *w; - int width = 0, height = 0; - int ret = 0; - - w = ewl_widget_new(); - - /* - * Test the base case of the requested size equal to the minimum. - */ - ewl_object_minimum_size_set(EWL_OBJECT(w), DIFFER_WIDTH, DIFFER_HEIGHT); - ewl_object_size_request(EWL_OBJECT(w), DIFFER_WIDTH, DIFFER_HEIGHT); - ewl_object_current_size_get(EWL_OBJECT(w), &width, &height); - - if (width == DIFFER_WIDTH && height == DIFFER_HEIGHT) { - - /* - * Verify a valid size not equal to the boundary. - */ - ewl_object_size_request(EWL_OBJECT(w), DIFFER_WIDTH + 1, - DIFFER_HEIGHT + 1); - ewl_object_current_size_get(EWL_OBJECT(w), &width, &height); - - if (width == DIFFER_WIDTH + 1 && height == DIFFER_HEIGHT + 1) { - - /* - * Verify an invalid size is forced to the boundary. - */ - ewl_object_size_request(EWL_OBJECT(w), - DIFFER_WIDTH - 1, - DIFFER_HEIGHT - 1); - ewl_object_current_size_get(EWL_OBJECT(w), &width, - &height); - if (width == DIFFER_WIDTH && height == DIFFER_HEIGHT) - ret = 1; - else - LOG_FAILURE(buf, len, "min size ignored %dx%d", - width, height); - } - else - LOG_FAILURE(buf, len, "differing sizes wrong %dx%d", - width, height); - } - else - LOG_FAILURE(buf, len, "same sizes wrong %dx%d", width, height); + Ewl_Widget *w; + int width = 0, height = 0; + int ret = 0; + + w = ewl_widget_new(); + + /* + * Test the base case of the requested size equal to the minimum. + */ + ewl_object_minimum_size_set(EWL_OBJECT(w), DIFFER_WIDTH, DIFFER_HEIGHT); + ewl_object_size_request(EWL_OBJECT(w), DIFFER_WIDTH, DIFFER_HEIGHT); + ewl_object_current_size_get(EWL_OBJECT(w), &width, &height); + + if (width == DIFFER_WIDTH && height == DIFFER_HEIGHT) { + + /* + * Verify a valid size not equal to the boundary. + */ + ewl_object_size_request(EWL_OBJECT(w), DIFFER_WIDTH + 1, + DIFFER_HEIGHT + 1); + ewl_object_current_size_get(EWL_OBJECT(w), &width, &height); + + if (width == DIFFER_WIDTH + 1 && height == DIFFER_HEIGHT + 1) { + + /* + * Verify an invalid size is forced to the boundary. + */ + ewl_object_size_request(EWL_OBJECT(w), + DIFFER_WIDTH - 1, + DIFFER_HEIGHT - 1); + ewl_object_current_size_get(EWL_OBJECT(w), &width, + &height); + if (width == DIFFER_WIDTH && height == DIFFER_HEIGHT) + ret = 1; + else + LOG_FAILURE(buf, len, "min size ignored %dx%d", + width, height); + } + else + LOG_FAILURE(buf, len, "differing sizes wrong %dx%d", + width, height); + } + else + LOG_FAILURE(buf, len, "same sizes wrong %dx%d", width, height); - ewl_widget_destroy(w); + ewl_widget_destroy(w); - return ret; + return ret; } /* @@ -628,54 +628,54 @@ static int maximum_size_test_set_request(char *buf, int len) { - Ewl_Widget *w; - int width = 0, height = 0; - int ret = 0; - - w = ewl_widget_new(); - - /* - * Test the base case of the requested size equal to the maximum. - */ - ewl_object_maximum_size_set(EWL_OBJECT(w), DIFFER_WIDTH, DIFFER_HEIGHT); - ewl_object_size_request(EWL_OBJECT(w), DIFFER_WIDTH, DIFFER_HEIGHT); - ewl_object_current_size_get(EWL_OBJECT(w), &width, &height); - - if (width == DIFFER_WIDTH && height == DIFFER_HEIGHT) { - - /* - * Verify a valid size not equal to the boundary. - */ - ewl_object_size_request(EWL_OBJECT(w), DIFFER_WIDTH - 1, - DIFFER_HEIGHT - 1); - ewl_object_current_size_get(EWL_OBJECT(w), &width, &height); - - if (width == DIFFER_WIDTH - 1 && height == DIFFER_HEIGHT - 1) { - - /* - * Verify an invalid size is forced to the boundary. - */ - ewl_object_size_request(EWL_OBJECT(w), - DIFFER_WIDTH + 1, - DIFFER_HEIGHT + 1); - ewl_object_current_size_get(EWL_OBJECT(w), &width, - &height); - if (width == DIFFER_WIDTH && height == DIFFER_HEIGHT) - ret = 1; - else - LOG_FAILURE(buf, len, "max size ignored %dx%d", - width, height); - } - else - LOG_FAILURE(buf, len, "differing sizes wrong %dx%d", - width, height); - } - else - LOG_FAILURE(buf, len, "same sizes wrong %dx%d", width, height); + Ewl_Widget *w; + int width = 0, height = 0; + int ret = 0; + + w = ewl_widget_new(); + + /* + * Test the base case of the requested size equal to the maximum. + */ + ewl_object_maximum_size_set(EWL_OBJECT(w), DIFFER_WIDTH, DIFFER_HEIGHT); + ewl_object_size_request(EWL_OBJECT(w), DIFFER_WIDTH, DIFFER_HEIGHT); + ewl_object_current_size_get(EWL_OBJECT(w), &width, &height); + + if (width == DIFFER_WIDTH && height == DIFFER_HEIGHT) { + + /* + * Verify a valid size not equal to the boundary. + */ + ewl_object_size_request(EWL_OBJECT(w), DIFFER_WIDTH - 1, + DIFFER_HEIGHT - 1); + ewl_object_current_size_get(EWL_OBJECT(w), &width, &height); + + if (width == DIFFER_WIDTH - 1 && height == DIFFER_HEIGHT - 1) { + + /* + * Verify an invalid size is forced to the boundary. + */ + ewl_object_size_request(EWL_OBJECT(w), + DIFFER_WIDTH + 1, + DIFFER_HEIGHT + 1); + ewl_object_current_size_get(EWL_OBJECT(w), &width, + &height); + if (width == DIFFER_WIDTH && height == DIFFER_HEIGHT) + ret = 1; + else + LOG_FAILURE(buf, len, "max size ignored %dx%d", + width, height); + } + else + LOG_FAILURE(buf, len, "differing sizes wrong %dx%d", + width, height); + } + else + LOG_FAILURE(buf, len, "same sizes wrong %dx%d", width, height); - ewl_widget_destroy(w); + ewl_widget_destroy(w); - return ret; + return ret; } /* @@ -684,35 +684,35 @@ static int padding_test_set_get(char *buf, int len) { - Ewl_Widget *w; - int l, r, t, b; - int ret = 0; - - w = ewl_widget_new(); - - ewl_object_padding_get(EWL_OBJECT(w), &l, &r, &t, &b); - if (l || r || t || b) - LOG_FAILURE(buf, len, "initial padding not 0"); - else { - ewl_object_padding_set(EWL_OBJECT(w), 1, 2, 3, 4); - ewl_object_padding_get(EWL_OBJECT(w), &l, &r, &t, &b); - if (l == 1 && r == 2 && t == 3 && b == 4) { - l = ewl_object_padding_left_get(EWL_OBJECT(w)); - r = ewl_object_padding_right_get(EWL_OBJECT(w)); - t = ewl_object_padding_top_get(EWL_OBJECT(w)); - b = ewl_object_padding_bottom_get(EWL_OBJECT(w)); - if (l == 1 && r == 2 && t == 3 && b == 4) - ret = 1; - else - LOG_FAILURE(buf, len, "incorrect individual"); - } - else - LOG_FAILURE(buf, len, "incorrect returned padding"); - } + Ewl_Widget *w; + int l, r, t, b; + int ret = 0; + + w = ewl_widget_new(); + + ewl_object_padding_get(EWL_OBJECT(w), &l, &r, &t, &b); + if (l || r || t || b) + LOG_FAILURE(buf, len, "initial padding not 0"); + else { + ewl_object_padding_set(EWL_OBJECT(w), 1, 2, 3, 4); + ewl_object_padding_get(EWL_OBJECT(w), &l, &r, &t, &b); + if (l == 1 && r == 2 && t == 3 && b == 4) { + l = ewl_object_padding_left_get(EWL_OBJECT(w)); + r = ewl_object_padding_right_get(EWL_OBJECT(w)); + t = ewl_object_padding_top_get(EWL_OBJECT(w)); + b = ewl_object_padding_bottom_get(EWL_OBJECT(w)); + if (l == 1 && r == 2 && t == 3 && b == 4) + ret = 1; + else + LOG_FAILURE(buf, len, "incorrect individual"); + } + else + LOG_FAILURE(buf, len, "incorrect returned padding"); + } - ewl_widget_destroy(w); + ewl_widget_destroy(w); - return ret; + return ret; } /* @@ -721,35 +721,35 @@ static int insets_test_set_get(char *buf, int len) { - Ewl_Widget *w; - int l, r, t, b; - int ret = 0; - - w = ewl_widget_new(); - - ewl_object_insets_get(EWL_OBJECT(w), &l, &r, &t, &b); - if (l || r || t || b) - LOG_FAILURE(buf, len, "initial insets not 0"); - else { - ewl_object_insets_set(EWL_OBJECT(w), 1, 2, 3, 4); - ewl_object_insets_get(EWL_OBJECT(w), &l, &r, &t, &b); - if (l == 1 && r == 2 && t == 3 && b == 4) { - l = ewl_object_insets_left_get(EWL_OBJECT(w)); - r = ewl_object_insets_right_get(EWL_OBJECT(w)); - t = ewl_object_insets_top_get(EWL_OBJECT(w)); - b = ewl_object_insets_bottom_get(EWL_OBJECT(w)); - if (l == 1 && r == 2 && t == 3 && b == 4) - ret = 1; - else - LOG_FAILURE(buf, len, "incorrect individual"); - } - else - LOG_FAILURE(buf, len, "incorrect returned insets"); - } + Ewl_Widget *w; + int l, r, t, b; + int ret = 0; + + w = ewl_widget_new(); + + ewl_object_insets_get(EWL_OBJECT(w), &l, &r, &t, &b); + if (l || r || t || b) + LOG_FAILURE(buf, len, "initial insets not 0"); + else { + ewl_object_insets_set(EWL_OBJECT(w), 1, 2, 3, 4); + ewl_object_insets_get(EWL_OBJECT(w), &l, &r, &t, &b); + if (l == 1 && r == 2 && t == 3 && b == 4) { + l = ewl_object_insets_left_get(EWL_OBJECT(w)); + r = ewl_object_insets_right_get(EWL_OBJECT(w)); + t = ewl_object_insets_top_get(EWL_OBJECT(w)); + b = ewl_object_insets_bottom_get(EWL_OBJECT(w)); + if (l == 1 && r == 2 && t == 3 && b == 4) + ret = 1; + else + LOG_FAILURE(buf, len, "incorrect individual"); + } + else + LOG_FAILURE(buf, len, "incorrect returned insets"); + } - ewl_widget_destroy(w); + ewl_widget_destroy(w); - return ret; + return ret; } /* @@ -759,25 +759,25 @@ static int padding_test_set_size_get(char *buf, int len) { - Ewl_Widget *w; - int width = 0, height = 0; - int ret = 0; + Ewl_Widget *w; + int width = 0, height = 0; + int ret = 0; - w = ewl_widget_new(); + w = ewl_widget_new(); - ewl_object_padding_set(EWL_OBJECT(w), 1, 2, 3, 4); + ewl_object_padding_set(EWL_OBJECT(w), 1, 2, 3, 4); - ewl_object_current_size_get(EWL_OBJECT(w), &width, &height); - if (width == (3 + EWL_OBJECT_MIN_SIZE) && - height == (7 + EWL_OBJECT_MIN_SIZE)) - ret = 1; - else - LOG_FAILURE(buf, len, "incorrect returned size %dx%d", width, - height); + ewl_object_current_size_get(EWL_OBJECT(w), &width, &height); + if (width == (3 + EWL_OBJECT_MIN_SIZE) && + height == (7 + EWL_OBJECT_MIN_SIZE)) + ret = 1; + else + LOG_FAILURE(buf, len, "incorrect returned size %dx%d", width, + height); - ewl_widget_destroy(w); + ewl_widget_destroy(w); - return ret; + return ret; } /* @@ -787,24 +787,24 @@ static int insets_test_set_size_get(char *buf, int len) { - Ewl_Widget *w; - int width = 0, height = 0; - int ret = 0; + Ewl_Widget *w; + int width = 0, height = 0; + int ret = 0; - w = ewl_widget_new(); + w = ewl_widget_new(); - ewl_object_insets_set(EWL_OBJECT(w), 1, 2, 3, 4); + ewl_object_insets_set(EWL_OBJECT(w), 1, 2, 3, 4); - ewl_object_current_size_get(EWL_OBJECT(w), &width, &height); - if (width == 4 && height == 8) - ret = 1; - else - LOG_FAILURE(buf, len, "incorrect returned size %dx%d", width, - height); + ewl_object_current_size_get(EWL_OBJECT(w), &width, &height); + if (width == 4 && height == 8) + ret = 1; + else + LOG_FAILURE(buf, len, "incorrect returned size %dx%d", width, + height); - ewl_widget_destroy(w); + ewl_widget_destroy(w); - return ret; + return ret; } /* @@ -814,26 +814,26 @@ static int insets_padding_test_set_size_get(char *buf, int len) { - Ewl_Widget *w; - int width = 0, height = 0; - int ret = 0; - - w = ewl_widget_new(); - - ewl_object_padding_set(EWL_OBJECT(w), 1, 2, 3, 4); - ewl_object_insets_set(EWL_OBJECT(w), 4, 3, 2, 1); - - ewl_object_current_size_get(EWL_OBJECT(w), &width, &height); - if (width == (10 + EWL_OBJECT_MIN_SIZE) && - height == (10 + EWL_OBJECT_MIN_SIZE)) - ret = 1; - else - LOG_FAILURE(buf, len, "incorrect returned size %dx%d", width, - height); + Ewl_Widget *w; + int width = 0, height = 0; + int ret = 0; + + w = ewl_widget_new(); + + ewl_object_padding_set(EWL_OBJECT(w), 1, 2, 3, 4); + ewl_object_insets_set(EWL_OBJECT(w), 4, 3, 2, 1); + + ewl_object_current_size_get(EWL_OBJECT(w), &width, &height); + if (width == (10 + EWL_OBJECT_MIN_SIZE) && + height == (10 + EWL_OBJECT_MIN_SIZE)) + ret = 1; + else + LOG_FAILURE(buf, len, "incorrect returned size %dx%d", width, + height); - ewl_widget_destroy(w); + ewl_widget_destroy(w); - return ret; + return ret; } /* @@ -843,34 +843,34 @@ static int fill_policy_test_set_get(char *buf, int len) { - Ewl_Widget *w; - unsigned int fill; - int ret = 0; - - w = ewl_widget_new(); - - /* - * Since fill all should simply be a mask of all other values, this - * tests each bit being set. - */ - ewl_object_fill_policy_set(EWL_OBJECT(w), EWL_FLAG_FILL_ALL); - fill = ewl_object_fill_policy_get(EWL_OBJECT(w)); - - if ((fill & EWL_FLAG_FILL_HSHRINK) && (fill & EWL_FLAG_FILL_VSHRINK) && - (fill & EWL_FLAG_FILL_HFILL) && (fill & EWL_FLAG_FILL_VFILL)) { - ewl_object_fill_policy_set(EWL_OBJECT(w), EWL_FLAG_FILL_NONE); - fill = ewl_object_fill_policy_get(EWL_OBJECT(w)); - if (!fill) - ret = 1; - else - LOG_FAILURE(buf, len, "fill none incorrect"); - } - else - LOG_FAILURE(buf, len, "fill all missing flags"); + Ewl_Widget *w; + unsigned int fill; + int ret = 0; + + w = ewl_widget_new(); + + /* + * Since fill all should simply be a mask of all other values, this + * tests each bit being set. + */ + ewl_object_fill_policy_set(EWL_OBJECT(w), EWL_FLAG_FILL_ALL); + fill = ewl_object_fill_policy_get(EWL_OBJECT(w)); + + if ((fill & EWL_FLAG_FILL_HSHRINK) && (fill & EWL_FLAG_FILL_VSHRINK) && + (fill & EWL_FLAG_FILL_HFILL) && (fill & EWL_FLAG_FILL_VFILL)) { + ewl_object_fill_policy_set(EWL_OBJECT(w), EWL_FLAG_FILL_NONE); + fill = ewl_object_fill_policy_get(EWL_OBJECT(w)); + if (!fill) + ret = 1; + else + LOG_FAILURE(buf, len, "fill none incorrect"); + } + else + LOG_FAILURE(buf, len, "fill all missing flags"); - ewl_widget_destroy(w); + ewl_widget_destroy(w); - return ret; + return ret; } /* @@ -880,30 +880,30 @@ static int alignment_test_set_get(char *buf, int len) { - Ewl_Widget *w; - unsigned int align; - int ret = 0; - - w = ewl_widget_new(); - - ewl_object_alignment_set(EWL_OBJECT(w), EWL_FLAG_ALIGN_LEFT | - EWL_FLAG_ALIGN_RIGHT | EWL_FLAG_ALIGN_TOP | - EWL_FLAG_ALIGN_BOTTOM); - align = ewl_object_alignment_get(EWL_OBJECT(w)); - - if ((align & EWL_FLAG_ALIGN_LEFT) && (align & EWL_FLAG_ALIGN_RIGHT) && - (align & EWL_FLAG_ALIGN_TOP) && (align & EWL_FLAG_ALIGN_BOTTOM)) { - ewl_object_alignment_set(EWL_OBJECT(w), EWL_FLAG_ALIGN_CENTER); - align = ewl_object_alignment_get(EWL_OBJECT(w)); - if (!align) - ret = 1; - else - LOG_FAILURE(buf, len, "align none incorrect"); - } - else - LOG_FAILURE(buf, len, "alignment missing flags"); + Ewl_Widget *w; + unsigned int align; + int ret = 0; + + w = ewl_widget_new(); + + ewl_object_alignment_set(EWL_OBJECT(w), EWL_FLAG_ALIGN_LEFT | + EWL_FLAG_ALIGN_RIGHT | EWL_FLAG_ALIGN_TOP | + EWL_FLAG_ALIGN_BOTTOM); + align = ewl_object_alignment_get(EWL_OBJECT(w)); + + if ((align & EWL_FLAG_ALIGN_LEFT) && (align & EWL_FLAG_ALIGN_RIGHT) && + (align & EWL_FLAG_ALIGN_TOP) && (align & EWL_FLAG_ALIGN_BOTTOM)) { + ewl_object_alignment_set(EWL_OBJECT(w), EWL_FLAG_ALIGN_CENTER); + align = ewl_object_alignment_get(EWL_OBJECT(w)); + if (!align) + ret = 1; + else + LOG_FAILURE(buf, len, "align none incorrect"); + } + else + LOG_FAILURE(buf, len, "alignment missing flags"); - ewl_widget_destroy(w); + ewl_widget_destroy(w); - return ret; + return ret; } ------------------------------------------------------------------------- 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