EFL: EvasObject() convenience macros added
authorJoe Konno <joe.konno@intel.com>
Thu, 19 Jul 2012 23:15:55 +0000 (16:15 -0700)
committerJoe Konno <joe.konno@intel.com>
Thu, 19 Jul 2012 23:15:55 +0000 (16:15 -0700)
These wrap a test idler for each method with a setter-getter pair. Should make
setup/teardown for tests much, much easier to write and maintain.

Signed-off-by: Joe Konno <joe.konno@intel.com>
src/efl/evasobject.h

index 624b4cf..df9e003 100644 (file)
@@ -31,5 +31,28 @@ private:
 
 };
 
+#define SET_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 SET_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 SET_CHECK_SHOW(obj) \
+               queueCallback( \
+                       ModifyCheckCallback( \
+                               boost::bind(&EvasObject::show, boost::ref(obj)), \
+                               boost::bind(&EvasObject::checkVisible, boost::ref(obj), EINA_TRUE) \
+                       ) \
+               )
 
 #endif