From: Joe Konno Date: Tue, 19 Jun 2012 18:23:47 +0000 (-0700) Subject: Add background widget object X-Git-Tag: upstream/0.2.1~326 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bc339e6b36dc59a0cb3be4af83edb8cd36df6484;p=test%2Fgeneric%2Fwayland-fits.git Add background widget object Signed-off-by: Joe Konno --- diff --git a/src/efl/Makefile.am b/src/efl/Makefile.am index 610d5d5..4efc149 100644 --- a/src/efl/Makefile.am +++ b/src/efl/Makefile.am @@ -21,6 +21,7 @@ bin_PROGRAMS = $(TESTS) wayland_efl_test_SOURCES = \ evasobject.cpp \ actionslider.cpp \ + background.cpp \ window.cpp \ application.cpp \ elmtestharness.cpp \ diff --git a/src/efl/background.cpp b/src/efl/background.cpp new file mode 100644 index 0000000..34abf79 --- /dev/null +++ b/src/efl/background.cpp @@ -0,0 +1,25 @@ +#include "background.h" + +Background::Background(Evas_Object *parent) + : EvasObject::EvasObject( + elm_bg_add(parent) + ) + , parent(parent) +{ + return; +} + +void Background::setColor(int red, int green, int blue) +{ + elm_bg_color_set(*this, red, green, blue); +} + +void Background::getColor(int* red, int* green, int* blue) +{ + elm_bg_color_get(*this, red, green, blue); +} + +Background::operator Evas_Object*() +{ + return EvasObject::obj_; +} diff --git a/src/efl/background.h b/src/efl/background.h new file mode 100644 index 0000000..aa6682c --- /dev/null +++ b/src/efl/background.h @@ -0,0 +1,24 @@ +#ifndef __WAYLAND_EFL_BACKGROUND_H__ +#define __WAYLAND_EFL_BACKGROUND_H__ + +#include +#include + +#include "evasobject.h" + +class Background : public EvasObject +{ +public: + Background(Evas_Object *parent); + + void setColor(int, int, int); + + void getColor(int*, int*, int*); + + operator Evas_Object*(); + +private: + Evas_Object *parent; +}; + +#endif