From ac166774055b22a671284b572706b3fde2109b3c Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Thu, 21 Feb 2013 08:38:52 +0000 Subject: [PATCH] Edje tests: Added missing file. --- src/Makefile_Edje.am | 3 ++- src/tests/edje/edje_tests_helpers.h | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 src/tests/edje/edje_tests_helpers.h diff --git a/src/Makefile_Edje.am b/src/Makefile_Edje.am index 9ae0270..ddd8304 100644 --- a/src/Makefile_Edje.am +++ b/src/Makefile_Edje.am @@ -190,7 +190,8 @@ bin/edje/edje_convert.h \ bin/edje/edje_convert.c \ bin/edje/edje_data_convert.c \ bin/edje/edje_convert_main.c \ -lib/edje/edje_convert.c +lib/edje/edje_convert.c \ +rc/tests/edje/edje_tests_helpers.h bin_SCRIPTS += bin/edje/edje_recc diff --git a/src/tests/edje/edje_tests_helpers.h b/src/tests/edje/edje_tests_helpers.h new file mode 100644 index 0000000..fa87e81 --- /dev/null +++ b/src/tests/edje/edje_tests_helpers.h @@ -0,0 +1,37 @@ +#ifndef EDJE_TEST_HELPERS_H +#define EDJE_TEST_HELPERS_H + +/* FIXME: Currently depends on the buffer engine, should we do anything + * fancier? */ + +#define EDJE_TEST_INIT_EVAS() _setup_evas() + +#define EDJE_TEST_FREE_EVAS() \ +do \ +{ \ + evas_free(evas); \ + evas_shutdown(); \ +} \ +while (0) + +static Evas * +_setup_evas() +{ + Evas *evas; + Evas_Engine_Info *einfo; + + evas_init(); + evas = evas_new(); + + evas_output_method_set(evas, evas_render_method_lookup("buffer")); + einfo = evas_engine_info_get(evas); + evas_engine_info_set(evas, einfo); + + evas_output_size_set(evas, 500, 500); + evas_output_viewport_set(evas, 0, 0, 500, 500); + + return evas; +} + +#endif + -- 2.7.4