TESTS = wayland-efl-test
TESTS_ENVIRONMENT = $(SHELL) ../test-harness
+MEDIA = \"$(PWD)/../../media\"
+
CXXFLAGS += \
-std=gnu++0x \
$(CAIRO_CFLAGS) \
$(WAYLAND_CFLAGS) \
+ -DMEDIA_PATH=$(MEDIA) \
@EFL_CFLAGS@
LDFLAGS += \
$(CAIRO_LIBS) \
$(WAYLAND_LIBS) \
@EFL_LIBS@ \
+ -lboost_system \
+ -lboost_filesystem \
-lboost_unit_test_framework
bin_PROGRAMS = $(TESTS)
test_window.cpp \
test_engine_set.cpp \
test_actionslider.cpp \
- test_background.cpp \
../testmain.cpp
endif
elm_bg_color_set(*this, red, green, blue);
}
+void Background::setImage(const path& p)
+{
+ (void) elm_bg_file_set(*this, p.c_str(), NULL);
+}
+
void Background::getColor(int* red, int* green, int* blue)
{
elm_bg_color_get(*this, red, green, blue);
}
+void Background::getImage(path& p)
+{
+ char* ret = NULL;
+
+ elm_bg_file_get(*this, const_cast<const char**>(&ret), NULL);
+
+ p = ret;
+}
+
Background::operator Evas_Object*()
{
return EvasObject::obj_;
#ifndef __WAYLAND_EFL_BACKGROUND_H__
#define __WAYLAND_EFL_BACKGROUND_H__
-#include <string>
-#include <Elementary.h>
+#ifndef MEDIA_PATH
+#error "The MEDIA_PATH macro must be defined-- pass definition in CXXFLAGS."
+#endif
+#define BOOST_FILESYSTEM_VERSION 3
+#include <boost/filesystem.hpp>
+#include <Elementary.h>
#include "evasobject.h"
+using boost::filesystem::path;
+
class Background : public EvasObject
{
public:
Background(Evas_Object *parent);
void setColor(int, int, int);
+ void setImage(const path&);
void getColor(int*, int*, int*);
+ void getImage(path&);
operator Evas_Object*();