BOOST_AUTO_TEST_CASE(elm_engine_set_wayland_shm)
{
+ const std::string engine("wayland_shm");
+
+ BOOST_MESSAGE("engine=" << engine);
+
elm_init(
boost::unit_test::framework::master_test_suite().argc,
boost::unit_test::framework::master_test_suite().argv
);
- elm_config_engine_set("wayland_shm");
- BOOST_CHECK_EQUAL("wayland_shm", elm_config_engine_get());
+
+ elm_config_preferred_engine_set(engine.c_str()); // override's ELM_ENGINE user environment setting
+ elm_config_engine_set(engine.c_str());
+ BOOST_CHECK_EQUAL(engine, std::string(elm_config_preferred_engine_get()));
+ BOOST_CHECK_EQUAL(engine, std::string(elm_config_engine_get()));
}
BOOST_AUTO_TEST_CASE(elm_engine_set_wayland_egl)
{
+ const std::string engine("wayland_egl");
+
+ BOOST_MESSAGE("engine=" << engine);
+
elm_init(
boost::unit_test::framework::master_test_suite().argc,
boost::unit_test::framework::master_test_suite().argv
);
- elm_config_engine_set("wayland_egl");
- BOOST_CHECK_EQUAL("wayland_egl", elm_config_engine_get());
+
+ elm_config_preferred_engine_set(engine.c_str()); // override's ELM_ENGINE user environment setting
+ elm_config_engine_set(engine.c_str());
+ BOOST_CHECK_EQUAL(engine, std::string(elm_config_preferred_engine_get()));
+ BOOST_CHECK_EQUAL(engine, std::string(elm_config_engine_get()));
}
#include <Elementary.h>
+#include "../test.h"
#include "window.h"
Window::Window(const std::string& name, const std::string& title)
win_ = NULL;
}
+Window::operator Evas*()
+{
+ return evas_object_evas_get(*this);
+}
+
+Window::operator Ecore_Evas*()
+{
+ return ecore_evas_object_ecore_evas_get(*this);
+}
+
+Window::operator Evas_Object*()
+{
+ return win_;
+}
+
void Window::setSize(int w, int h)
{
- evas_object_resize(win_, w, h);
+ evas_object_resize(*this, w, h);
}
void Window::setPosition(int x, int y)
{
- evas_object_move(win_, x, y);
+ evas_object_move(*this, x, y);
}
void Window::show()
{
- evas_object_show(win_);
+ evas_object_show(*this);
+}
+
+int Window::getX()
+{
+ int x;
+ evas_object_geometry_get(*this, &x, NULL, NULL, NULL);
+ return x;
+}
+
+int Window::getY()
+{
+ int y;
+ evas_object_geometry_get(*this, NULL, &y, NULL, NULL);
+ return y;
}
int Window::getWidth()
{
- int x, y, w, h;
- evas_object_geometry_get(win_, &x, &y, &w, &h);
+ int w;
+// evas_object_geometry_get(*this, NULL, NULL, &w, NULL);
+ evas_output_size_get(*this, &w, NULL);
return w;
}
int Window::getHeight()
{
- int x, y, w, h;
- evas_object_geometry_get(win_, &x, &y, &w, &h);
+ int h;
+// evas_object_geometry_get(*this, NULL, NULL, NULL, &h);
+ evas_output_size_get(*this, NULL, &h);
return h;
}