Enlightenment CVS committal
Author : ningerso
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/src/bin/tests/object
Modified Files:
ewl_object.c
Log Message:
Use the convenience allocators for the base widget class in the object unit
tests.
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/bin/tests/object/ewl_object.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- ewl_object.c 18 Nov 2007 06:43:04 -0000 1.8
+++ ewl_object.c 20 Nov 2007 02:15:34 -0000 1.9
@@ -70,8 +70,7 @@
int x, y;
int ret = 0;
- w = calloc(1, sizeof(Ewl_Widget));
- ewl_widget_init(w);
+ w = ewl_widget_new();
ewl_object_position_request(EWL_OBJECT(w), 11, 23);
@@ -99,8 +98,7 @@
int width = 0, height = 0;
int ret = 0;
- w = calloc(1, sizeof(Ewl_Widget));
- ewl_widget_init(w);
+ w = ewl_widget_new();
ewl_object_preferred_inner_size_get(EWL_OBJECT(w), &width, &height);
if (width == 0 && height == 0) {
@@ -143,8 +141,7 @@
int width = 0, height = 0;
int ret = 0;
- w = calloc(1, sizeof(Ewl_Widget));
- ewl_widget_init(w);
+ 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) {
@@ -187,8 +184,7 @@
int width = 0, height = 0;
int ret = 0;
- w = calloc(1, sizeof(Ewl_Widget));
- ewl_widget_init(w);
+ w = ewl_widget_new();
ewl_object_minimum_size_get(EWL_OBJECT(w), &width, &height);
if (width == EWL_OBJECT_MIN_SIZE && height == EWL_OBJECT_MIN_SIZE) {
@@ -229,8 +225,7 @@
int width = 0, height = 0;
int ret = 0;
- w = calloc(1, sizeof(Ewl_Widget));
- ewl_widget_init(w);
+ w = ewl_widget_new();
ewl_object_maximum_size_get(EWL_OBJECT(w), &width, &height);
if (width == EWL_OBJECT_MAX_SIZE && height == EWL_OBJECT_MAX_SIZE) {
@@ -271,8 +266,7 @@
int width = 0, height = 0;
int ret = 0;
- w = calloc(1, sizeof(Ewl_Widget));
- ewl_widget_init(w);
+ w = ewl_widget_new();
/*
* Test the base case of the requested size equal to the minimum.
@@ -329,8 +323,7 @@
int width = 0, height = 0;
int ret = 0;
- w = calloc(1, sizeof(Ewl_Widget));
- ewl_widget_init(w);
+ w = ewl_widget_new();
/*
* Test the base case of the requested size equal to the maximum.
@@ -386,8 +379,7 @@
int l, r, t, b;
int ret = 0;
- w = calloc(1, sizeof(Ewl_Widget));
- ewl_widget_init(w);
+ w = ewl_widget_new();
ewl_object_padding_get(EWL_OBJECT(w), &l, &r, &t, &b);
if (l || r || t || b)
@@ -416,8 +408,7 @@
int l, r, t, b;
int ret = 0;
- w = calloc(1, sizeof(Ewl_Widget));
- ewl_widget_init(w);
+ w = ewl_widget_new();
ewl_object_insets_get(EWL_OBJECT(w), &l, &r, &t, &b);
if (l || r || t || b)
@@ -447,8 +438,7 @@
int width = 0, height = 0;
int ret = 0;
- w = calloc(1, sizeof(Ewl_Widget));
- ewl_widget_init(w);
+ w = ewl_widget_new();
ewl_object_padding_set(EWL_OBJECT(w), 1, 2, 3, 4);
@@ -476,8 +466,7 @@
int width = 0, height = 0;
int ret = 0;
- w = calloc(1, sizeof(Ewl_Widget));
- ewl_widget_init(w);
+ w = ewl_widget_new();
ewl_object_insets_set(EWL_OBJECT(w), 1, 2, 3, 4);
@@ -504,8 +493,7 @@
int width = 0, height = 0;
int ret = 0;
- w = calloc(1, sizeof(Ewl_Widget));
- ewl_widget_init(w);
+ 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);
@@ -534,8 +522,7 @@
unsigned int fill;
int ret = 0;
- w = calloc(1, sizeof(Ewl_Widget));
- ewl_widget_init(w);
+ w = ewl_widget_new();
/*
* Since fill all should simply be a mask of all other values, this
@@ -572,8 +559,7 @@
unsigned int align;
int ret = 0;
- w = calloc(1, sizeof(Ewl_Widget));
- ewl_widget_init(w);
+ w = ewl_widget_new();
ewl_object_alignment_set(EWL_OBJECT(w), EWL_FLAG_ALIGN_LEFT |
EWL_FLAG_ALIGN_RIGHT | EWL_FLAG_ALIGN_TOP |
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs