From d52b405fe2eab96e731ed832e28ee9856fdd73ba Mon Sep 17 00:00:00 2001 From: Joe Konno Date: Mon, 23 Jul 2012 12:31:58 -0700 Subject: [PATCH] EFL: Refactor EFL_CHECK macros Move the definitions to elmtestharness.h. Signed-off-by: Joe Konno --- src/efl/elmtestharness.h | 32 ++++++++++++++++++++++++++++++++ src/efl/evasobject.h | 32 -------------------------------- src/efl/test_background.cpp | 2 +- src/efl/test_bubble.cpp | 2 +- src/efl/test_check.cpp | 2 +- src/efl/test_clock.cpp | 2 +- src/efl/test_colorselector.cpp | 2 +- src/efl/test_dayselector.cpp | 2 +- src/efl/test_entry.cpp | 2 +- src/efl/test_fileselector.cpp | 2 +- src/efl/test_fileselector_button.cpp | 2 +- src/efl/test_fileselector_entry.cpp | 2 +- 12 files changed, 42 insertions(+), 42 deletions(-) diff --git a/src/efl/elmtestharness.h b/src/efl/elmtestharness.h index 3d37888..087055a 100644 --- a/src/efl/elmtestharness.h +++ b/src/efl/elmtestharness.h @@ -76,5 +76,37 @@ BOOST_AUTO_TEST_CASE(Harness##_shm_engine) \ // Harness().run(); \ //} \ +#define EFL_CHECK_SIZE(obj, w, h)\ + queueCallback( \ + ModifyCheckCallback( \ + boost::bind(&EvasObject::setSize, boost::ref(obj), w, h), \ + boost::bind(&EvasObject::checkSize, boost::ref(obj), w, h) \ + ) \ + ) + +#define EFL_CHECK_POSITION(obj, x, y) \ + queueCallback( \ + ModifyCheckCallback( \ + boost::bind(&EvasObject::setPosition, boost::ref(obj), x, y), \ + boost::bind(&EvasObject::checkPosition, boost::ref(obj), x, y) \ + ) \ + ) + +#define EFL_CHECK_SHOW(obj) \ + queueCallback( \ + ModifyCheckCallback( \ + boost::bind(&EvasObject::show, boost::ref(obj)), \ + boost::bind(&EvasObject::checkVisible, boost::ref(obj), EINA_TRUE) \ + ) \ + ) + +#define EFL_CHECK_HIDE(obj) \ + queueCallback( \ + ModifyCheckCallback( \ + boost::bind(&EvasObject::hide, boost::ref(obj)), \ + boost::bind(&EvasObject::checkHidden, boost::ref(obj), EINA_TRUE) \ + ) \ + ) + #endif diff --git a/src/efl/evasobject.h b/src/efl/evasobject.h index b80a8e8..df5e662 100644 --- a/src/efl/evasobject.h +++ b/src/efl/evasobject.h @@ -33,36 +33,4 @@ private: }; -#define EFL_CHECK_SIZE(obj, w, h)\ - queueCallback( \ - ModifyCheckCallback( \ - boost::bind(&EvasObject::setSize, boost::ref(obj), w, h), \ - boost::bind(&EvasObject::checkSize, boost::ref(obj), w, h) \ - ) \ - ) - -#define EFL_CHECK_POSITION(obj, x, y) \ - queueCallback( \ - ModifyCheckCallback( \ - boost::bind(&EvasObject::setPosition, boost::ref(obj), x, y), \ - boost::bind(&EvasObject::checkPosition, boost::ref(obj), x, y) \ - ) \ - ) - -#define EFL_CHECK_SHOW(obj) \ - queueCallback( \ - ModifyCheckCallback( \ - boost::bind(&EvasObject::show, boost::ref(obj)), \ - boost::bind(&EvasObject::checkVisible, boost::ref(obj), EINA_TRUE) \ - ) \ - ) - -#define EFL_CHECK_HIDE(obj) \ - queueCallback( \ - ModifyCheckCallback( \ - boost::bind(&EvasObject::hide, boost::ref(obj)), \ - boost::bind(&EvasObject::checkHidden, boost::ref(obj), EINA_TRUE) \ - ) \ - ) - #endif diff --git a/src/efl/test_background.cpp b/src/efl/test_background.cpp index 26165af..9b47a9e 100644 --- a/src/efl/test_background.cpp +++ b/src/efl/test_background.cpp @@ -6,7 +6,7 @@ #include "application.h" #include "window.h" #include "background.h" -#include "evasobject.h" + #include "elmtestharness.h" using boost::filesystem::path; diff --git a/src/efl/test_bubble.cpp b/src/efl/test_bubble.cpp index 712164f..1b25d57 100644 --- a/src/efl/test_bubble.cpp +++ b/src/efl/test_bubble.cpp @@ -5,7 +5,7 @@ #include #include "window.h" -#include "evasobject.h" + #include "elmtestharness.h" #include "templates.h" diff --git a/src/efl/test_check.cpp b/src/efl/test_check.cpp index 05de009..911d2fb 100644 --- a/src/efl/test_check.cpp +++ b/src/efl/test_check.cpp @@ -2,7 +2,7 @@ #include #include "window.h" -#include "evasobject.h" + #include "elmtestharness.h" #include "templates.h" diff --git a/src/efl/test_clock.cpp b/src/efl/test_clock.cpp index 454c895..0e64149 100644 --- a/src/efl/test_clock.cpp +++ b/src/efl/test_clock.cpp @@ -2,7 +2,7 @@ #include #include "window.h" -#include "evasobject.h" + #include "elmtestharness.h" #include "templates.h" diff --git a/src/efl/test_colorselector.cpp b/src/efl/test_colorselector.cpp index 4e45828..49bb687 100644 --- a/src/efl/test_colorselector.cpp +++ b/src/efl/test_colorselector.cpp @@ -2,7 +2,7 @@ #include #include "window.h" -#include "evasobject.h" + #include "elmtestharness.h" class ColorselectorColorTest : public ElmTestHarness diff --git a/src/efl/test_dayselector.cpp b/src/efl/test_dayselector.cpp index 0b6560b..d584ed3 100644 --- a/src/efl/test_dayselector.cpp +++ b/src/efl/test_dayselector.cpp @@ -4,7 +4,7 @@ #include #include "window.h" -#include "evasobject.h" + #include "elmtestharness.h" #include "templates.h" diff --git a/src/efl/test_entry.cpp b/src/efl/test_entry.cpp index 4268f4d..e4f2866 100644 --- a/src/efl/test_entry.cpp +++ b/src/efl/test_entry.cpp @@ -5,7 +5,7 @@ #include #include "window.h" -#include "evasobject.h" + #include "elmtestharness.h" using std::string; diff --git a/src/efl/test_fileselector.cpp b/src/efl/test_fileselector.cpp index 929351c..9e9e269 100644 --- a/src/efl/test_fileselector.cpp +++ b/src/efl/test_fileselector.cpp @@ -4,7 +4,7 @@ #include #include "window.h" -#include "evasobject.h" + #include "elmtestharness.h" #include "templates.h" diff --git a/src/efl/test_fileselector_button.cpp b/src/efl/test_fileselector_button.cpp index bc28c7f..738eac7 100644 --- a/src/efl/test_fileselector_button.cpp +++ b/src/efl/test_fileselector_button.cpp @@ -4,7 +4,7 @@ #include #include "window.h" -#include "evasobject.h" + #include "elmtestharness.h" #include "templates.h" diff --git a/src/efl/test_fileselector_entry.cpp b/src/efl/test_fileselector_entry.cpp index eacc642..03f0115 100644 --- a/src/efl/test_fileselector_entry.cpp +++ b/src/efl/test_fileselector_entry.cpp @@ -4,7 +4,7 @@ #include #include "window.h" -#include "evasobject.h" + #include "elmtestharness.h" #include "templates.h" -- 2.7.4