From 6e6a9575bfe3f7daf6dd03625879aa4d233a7f7b Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Thu, 4 Dec 2014 23:30:36 +0100 Subject: [PATCH] [SAMPLE] add basic sample in the repo --- external/ege | 2 +- sample/001_HelloWord/appl/Main.cpp | 57 +++++++++ sample/001_HelloWord/appl/Main.h | 14 +++ sample/001_HelloWord/appl/Windows.cpp | 32 +++++ sample/001_HelloWord/appl/Windows.h | 25 ++++ sample/001_HelloWord/appl/debug.cpp | 15 +++ sample/001_HelloWord/appl/debug.h | 52 ++++++++ sample/001_HelloWord/lutin_001_HelloWord.py | 32 +++++ sample/0XX_CustomWidgets/appl/Main.cpp | 57 +++++++++ sample/0XX_CustomWidgets/appl/Main.h | 14 +++ sample/0XX_CustomWidgets/appl/Windows.cpp | 74 +++++++++++ sample/0XX_CustomWidgets/appl/Windows.h | 31 +++++ sample/0XX_CustomWidgets/appl/debug.cpp | 15 +++ sample/0XX_CustomWidgets/appl/debug.h | 52 ++++++++ .../appl/widget/VectorDisplay.cpp | 92 ++++++++++++++ .../appl/widget/VectorDisplay.h | 48 ++++++++ .../lutin_0XX_customwidget.py | 34 +++++ sample/README.md | 52 ++++++++ sample/data/icon.png | Bin 0 -> 5084 bytes sample/examplewallpaper/appl/Main.cpp | 57 +++++++++ sample/examplewallpaper/appl/Main.h | 14 +++ .../examplewallpaper/appl/WidgetDisplay.cpp | 116 ++++++++++++++++++ sample/examplewallpaper/appl/WidgetDisplay.h | 49 ++++++++ sample/examplewallpaper/appl/Windows.cpp | 39 ++++++ sample/examplewallpaper/appl/Windows.h | 27 ++++ sample/examplewallpaper/appl/debug.cpp | 15 +++ sample/examplewallpaper/appl/debug.h | 52 ++++++++ sample/examplewallpaper/data/SnowFlake.svg | 5 + .../lutin_examplewallpaper.py | 61 +++++++++ sample/license.txt | 13 ++ 30 files changed, 1145 insertions(+), 1 deletion(-) create mode 100644 sample/001_HelloWord/appl/Main.cpp create mode 100644 sample/001_HelloWord/appl/Main.h create mode 100644 sample/001_HelloWord/appl/Windows.cpp create mode 100644 sample/001_HelloWord/appl/Windows.h create mode 100644 sample/001_HelloWord/appl/debug.cpp create mode 100644 sample/001_HelloWord/appl/debug.h create mode 100755 sample/001_HelloWord/lutin_001_HelloWord.py create mode 100644 sample/0XX_CustomWidgets/appl/Main.cpp create mode 100644 sample/0XX_CustomWidgets/appl/Main.h create mode 100644 sample/0XX_CustomWidgets/appl/Windows.cpp create mode 100644 sample/0XX_CustomWidgets/appl/Windows.h create mode 100644 sample/0XX_CustomWidgets/appl/debug.cpp create mode 100644 sample/0XX_CustomWidgets/appl/debug.h create mode 100644 sample/0XX_CustomWidgets/appl/widget/VectorDisplay.cpp create mode 100644 sample/0XX_CustomWidgets/appl/widget/VectorDisplay.h create mode 100755 sample/0XX_CustomWidgets/lutin_0XX_customwidget.py create mode 100644 sample/README.md create mode 100644 sample/data/icon.png create mode 100644 sample/examplewallpaper/appl/Main.cpp create mode 100644 sample/examplewallpaper/appl/Main.h create mode 100644 sample/examplewallpaper/appl/WidgetDisplay.cpp create mode 100644 sample/examplewallpaper/appl/WidgetDisplay.h create mode 100644 sample/examplewallpaper/appl/Windows.cpp create mode 100644 sample/examplewallpaper/appl/Windows.h create mode 100644 sample/examplewallpaper/appl/debug.cpp create mode 100644 sample/examplewallpaper/appl/debug.h create mode 100644 sample/examplewallpaper/data/SnowFlake.svg create mode 100755 sample/examplewallpaper/lutin_examplewallpaper.py create mode 100644 sample/license.txt diff --git a/external/ege b/external/ege index fd45ef5f..bc200958 160000 --- a/external/ege +++ b/external/ege @@ -1 +1 @@ -Subproject commit fd45ef5f7766191491cb4f70f6b38a8c898548d7 +Subproject commit bc20095852db600eabef6ee13fae38f09c161d87 diff --git a/sample/001_HelloWord/appl/Main.cpp b/sample/001_HelloWord/appl/Main.cpp new file mode 100644 index 00000000..49b711c8 --- /dev/null +++ b/sample/001_HelloWord/appl/Main.cpp @@ -0,0 +1,57 @@ +/** + * @author Edouard DUPIN + * + * @copyright 2010, Edouard DUPIN, all right reserved + * + * @license GPL v3 (see license file) + */ + + +#include +#include +#include + +#include +#include +#include +#include +#include + + +class MainApplication : public ewol::context::Application { + public: + bool init(ewol::Context& _context, size_t _initId) { + APPL_INFO("==> Init APPL (START) [" << ewol::getBoardType() << "] (" << ewol::getCompilationMode() << ")"); + + // TODO : Remove this : Move if in the windows properties + _context.setSize(vec2(800, 600)); + + // select internal data for font ... + _context.getFontDefault().setUseExternal(true); + _context.getFontDefault().set("FreeSerif;DejaVuSansMono", 19); + + std::shared_ptr basicWindows = appl::Windows::create(); + // create the specific windows + _context.setWindows(basicWindows); + APPL_INFO("==> Init APPL (END)"); + return true; + } + + void unInit(ewol::Context& _context) { + APPL_INFO("==> Un-Init APPL (START)"); + // nothing to do ... + APPL_INFO("==> Un-Init APPL (END)"); + } +}; + +/** + * @brief Main of the program (This can be set in every case, but it is not used in Andoid...). + * @param std IO + * @return std IO + */ +int main(int _argc, const char *_argv[]) { + // second possibility + return ewol::run(new MainApplication(), _argc, _argv); +} + + diff --git a/sample/001_HelloWord/appl/Main.h b/sample/001_HelloWord/appl/Main.h new file mode 100644 index 00000000..8a45fb5e --- /dev/null +++ b/sample/001_HelloWord/appl/Main.h @@ -0,0 +1,14 @@ +/** + * @author Edouard DUPIN + * + * @copyright 2010, Edouard DUPIN, all right reserved + * + * @license GPL v3 (see license file) + */ + +#ifndef __APPL_MAIN_H__ +#define __APPL_MAIN_H__ + + +#endif + diff --git a/sample/001_HelloWord/appl/Windows.cpp b/sample/001_HelloWord/appl/Windows.cpp new file mode 100644 index 00000000..5d35ce31 --- /dev/null +++ b/sample/001_HelloWord/appl/Windows.cpp @@ -0,0 +1,32 @@ +/** + * @author Edouard DUPIN + * + * @copyright 2010, Edouard DUPIN, all right reserved + * + * @license GPL v3 (see license file) + */ + +#include +#include +#include +#include + +#undef __class__ +#define __class__ "Windows" + +appl::Windows::Windows() { + addObjectType("appl::Windows"); +} +void appl::Windows::init() { + setTitle("example 001_HelloWord"); + std::shared_ptr tmpWidget = ewol::widget::Label::create(); + if (tmpWidget == nullptr) { + APPL_ERROR("Can not allocate widget ==> display might be in error"); + } else { + tmpWidget->setLabel("Hello Word"); + tmpWidget->setExpand(bvec2(true,true)); + setSubWidget(tmpWidget); + } +} + + diff --git a/sample/001_HelloWord/appl/Windows.h b/sample/001_HelloWord/appl/Windows.h new file mode 100644 index 00000000..92614217 --- /dev/null +++ b/sample/001_HelloWord/appl/Windows.h @@ -0,0 +1,25 @@ +/** + * @author Edouard DUPIN + * + * @copyright 2010, Edouard DUPIN, all right reserved + * + * @license GPL v3 (see license file) + */ + +#ifndef __APPL_WINDOWS_H__ +#define __APPL_WINDOWS_H__ + +#include + +namespace appl { + class Windows : public ewol::widget::Windows { + protected: + Windows(); + void init(); + public: + DECLARE_FACTORY(Windows); + }; +}; + + +#endif \ No newline at end of file diff --git a/sample/001_HelloWord/appl/debug.cpp b/sample/001_HelloWord/appl/debug.cpp new file mode 100644 index 00000000..d63981aa --- /dev/null +++ b/sample/001_HelloWord/appl/debug.cpp @@ -0,0 +1,15 @@ +/** + * @author Edouard DUPIN + * + * @copyright 2010, Edouard DUPIN, all right reserved + * + * @license GPL v3 (see license file) + */ + + +#include + +int32_t appl::getLogId() { + static int32_t g_val = etk::log::registerInstance("example"); + return g_val; +} diff --git a/sample/001_HelloWord/appl/debug.h b/sample/001_HelloWord/appl/debug.h new file mode 100644 index 00000000..cad939e5 --- /dev/null +++ b/sample/001_HelloWord/appl/debug.h @@ -0,0 +1,52 @@ +/** + * @author Edouard DUPIN + * + * @copyright 2010, Edouard DUPIN, all right reserved + * + * @license GPL v3 (see license file) + */ + + +#ifndef __APPL_DEBUG_H__ +#define __APPL_DEBUG_H__ + +#include + +namespace appl { + int32_t getLogId(); +}; +// TODO : Review this problem of multiple intanciation of "std::stringbuf sb" +#define APPL_BASE(info,data) \ + do { \ + if (info <= etk::log::getLevel(appl::getLogId())) { \ + std::stringbuf sb; \ + std::ostream tmpStream(&sb); \ + tmpStream << data; \ + etk::log::logStream(appl::getLogId(), info, __LINE__, __class__, __func__, tmpStream); \ + } \ + } while(0) + +#define APPL_CRITICAL(data) APPL_BASE(1, data) +#define APPL_ERROR(data) APPL_BASE(2, data) +#define APPL_WARNING(data) APPL_BASE(3, data) +#ifdef DEBUG + #define APPL_INFO(data) APPL_BASE(4, data) + #define APPL_DEBUG(data) APPL_BASE(5, data) + #define APPL_VERBOSE(data) APPL_BASE(6, data) + #define APPL_TODO(data) APPL_BASE(4, "TODO : " << data) +#else + #define APPL_INFO(data) do { } while(false) + #define APPL_DEBUG(data) do { } while(false) + #define APPL_VERBOSE(data) do { } while(false) + #define APPL_TODO(data) do { } while(false) +#endif + +#define APPL_ASSERT(cond,data) \ + do { \ + if (!(cond)) { \ + APPL_CRITICAL(data); \ + assert(!#cond); \ + } \ + } while (0) + +#endif diff --git a/sample/001_HelloWord/lutin_001_HelloWord.py b/sample/001_HelloWord/lutin_001_HelloWord.py new file mode 100755 index 00000000..04064803 --- /dev/null +++ b/sample/001_HelloWord/lutin_001_HelloWord.py @@ -0,0 +1,32 @@ +#!/usr/bin/python +import lutinModule as module +import lutinTools as tools + + +# optionnal : Describe in the "lutin.py --help" +def get_desc(): + return "Tutorial 001 : Hello Word" + +# Module creation instance (not optionnal) +def create(target): + # module name is '001_HelloWord' and type binary. + myModule = module.Module(__file__, '001_HelloWord', 'BINARY') + # add the file to compile: + myModule.add_src_file([ + 'appl/Main.cpp', + 'appl/debug.cpp', + 'appl/Windows.cpp', + ]) + # add Library dependency name + myModule.add_module_depend(['ewol']) + # add application C flags + myModule.compile_flags_CC([ + "-DPROJECT_NAME=\"\\\""+myModule.name+"\\\"\""]) + # Add current include Path + myModule.add_path(tools.get_current_path(__file__)) + # return the created module + return myModule + + + + diff --git a/sample/0XX_CustomWidgets/appl/Main.cpp b/sample/0XX_CustomWidgets/appl/Main.cpp new file mode 100644 index 00000000..975e6c2a --- /dev/null +++ b/sample/0XX_CustomWidgets/appl/Main.cpp @@ -0,0 +1,57 @@ +/** + * @author Edouard DUPIN + * + * @copyright 2010, Edouard DUPIN, all right reserved + * + * @license BSD 3 clauses (see license file) + */ + + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + + +class MainApplication : public ewol::context::Application { + public: + bool init(ewol::Context& _context, size_t _initId) { + APPL_INFO("==> Init APPL (START) [" << ewol::getBoardType() << "] (" << ewol::getCompilationMode() << ")"); + + // TODO : Remove this : Move if in the windows properties + _context.setSize(vec2(800, 600)); + + // select internal data for font ... + _context.getFontDefault().setUseExternal(true); + _context.getFontDefault().set("FreeSerif;DejaVuSansMono", 19); + + appl::widget::VectorDisplay::createManagerWidget(_context.getWidgetManager()); + + std::shared_ptr basicWindows = appl::Windows::create(); + // create the specific windows + _context.setWindows(basicWindows); + APPL_INFO("==> Init APPL (END)"); + return true; + } + void unInit(ewol::Context& _context) { + APPL_INFO("==> Un-Init APPL (START)"); + // nothing to do... + APPL_INFO("==> Un-Init APPL (END)"); + } +}; + +/** + * @brief Main of the program (This can be set in every case, but it is not used in Andoid...). + * @param std IO + * @return std IO + */ +int main(int _argc, const char *_argv[]) { + // second possibility + return ewol::run(new MainApplication(), _argc, _argv); +} \ No newline at end of file diff --git a/sample/0XX_CustomWidgets/appl/Main.h b/sample/0XX_CustomWidgets/appl/Main.h new file mode 100644 index 00000000..992aac15 --- /dev/null +++ b/sample/0XX_CustomWidgets/appl/Main.h @@ -0,0 +1,14 @@ +/** + * @author Edouard DUPIN + * + * @copyright 2010, Edouard DUPIN, all right reserved + * + * @license BSD 3 clauses (see license file) + */ + +#ifndef __APPL_MAIN_H__ +#define __APPL_MAIN_H__ + + +#endif + diff --git a/sample/0XX_CustomWidgets/appl/Windows.cpp b/sample/0XX_CustomWidgets/appl/Windows.cpp new file mode 100644 index 00000000..f17d1c44 --- /dev/null +++ b/sample/0XX_CustomWidgets/appl/Windows.cpp @@ -0,0 +1,74 @@ +/** + * @author Edouard DUPIN + * + * @copyright 2010, Edouard DUPIN, all right reserved + * + * @license BSD 3 clauses (see license file) + */ + +#include +#include +#include +#include +#include +#include +#include + +#undef __class__ +#define __class__ "Windows" + +static const char* const g_eventChangeValues = "appl-change-value"; +static const char* const g_eventAutoMode = "appl-change-auto"; + +appl::Windows::Windows() : + m_composer(NULL) { + addObjectType("appl::Windows"); +} + +void appl::Windows::init() { + setTitle("example 001_HelloWord"); + std::string composition = std::string(""); + composition += "\n"; + composition += " \n"; + composition += " \n"; + composition += " \n"; + composition += " \n"; + composition += " \n"; + composition += "\n"; + + m_composer = ewol::widget::Composer::create(ewol::widget::Composer::String, composition); + if (m_composer == NULL) { + APPL_CRITICAL(" An error occured ... in the windows creatrion ..."); + return; + } + setSubWidget(m_composer); + subBind(ewol::widget::Button, "bt-change", signalPressed, shared_from_this(), &appl::Windows::onCallbackChangeValues); + subBind(ewol::widget::Button, "bt-auto", signalPressed, shared_from_this(), &appl::Windows::onCallbackAutoMode); +} + +void appl::Windows::onCallbackChangeValues() { + std::vector tmp; + for (int32_t iii=0; iii<2048; ++iii) { + tmp.push_back(etk::tool::frand(-1.0, 1.0)); + } + std::shared_ptr tmpDisp = std::dynamic_pointer_cast(getSubObjectNamed("displayer")); + if (tmpDisp != NULL) { + tmpDisp->setValue(tmp); + } +} + +void appl::Windows::onCallbackAutoMode() { + std::shared_ptr tmpDisp = std::dynamic_pointer_cast(getSubObjectNamed("displayer")); + if (tmpDisp != NULL) { + tmpDisp->ToggleAuto(); + } +} + diff --git a/sample/0XX_CustomWidgets/appl/Windows.h b/sample/0XX_CustomWidgets/appl/Windows.h new file mode 100644 index 00000000..f25ac1cc --- /dev/null +++ b/sample/0XX_CustomWidgets/appl/Windows.h @@ -0,0 +1,31 @@ +/** + * @author Edouard DUPIN + * + * @copyright 2010, Edouard DUPIN, all right reserved + * + * @license BSD 3 clauses (see license file) + */ + +#ifndef __APPL_WINDOWS_H__ +#define __APPL_WINDOWS_H__ + +#include +#include + +namespace appl { + class Windows : public ewol::widget::Windows { + private: + std::shared_ptr m_composer; + protected: + Windows(); + void init(); + public: + DECLARE_FACTORY(Windows); + public: // callback functions + void onCallbackChangeValues(); + void onCallbackAutoMode(); + }; +}; + + +#endif \ No newline at end of file diff --git a/sample/0XX_CustomWidgets/appl/debug.cpp b/sample/0XX_CustomWidgets/appl/debug.cpp new file mode 100644 index 00000000..455bfe50 --- /dev/null +++ b/sample/0XX_CustomWidgets/appl/debug.cpp @@ -0,0 +1,15 @@ +/** + * @author Edouard DUPIN + * + * @copyright 2010, Edouard DUPIN, all right reserved + * + * @license BSD 3 clauses (see license file) + */ + + +#include + +int32_t appl::getLogId() { + static int32_t g_val = etk::log::registerInstance("example"); + return g_val; +} diff --git a/sample/0XX_CustomWidgets/appl/debug.h b/sample/0XX_CustomWidgets/appl/debug.h new file mode 100644 index 00000000..969e3a0e --- /dev/null +++ b/sample/0XX_CustomWidgets/appl/debug.h @@ -0,0 +1,52 @@ +/** + * @author Edouard DUPIN + * + * @copyright 2010, Edouard DUPIN, all right reserved + * + * @license BSD 3 clauses (see license file) + */ + +#ifndef __APPL_DEBUG_H__ +#define __APPL_DEBUG_H__ + +#include + +namespace appl { + int32_t getLogId(); +}; +// TODO : Review this problem of multiple intanciation of "std::stringbuf sb" +#define APPL_BASE(info,data) \ + do { \ + if (info <= etk::log::getLevel(appl::getLogId())) { \ + std::stringbuf sb; \ + std::ostream tmpStream(&sb); \ + tmpStream << data; \ + etk::log::logStream(appl::getLogId(), info, __LINE__, __class__, __func__, tmpStream); \ + } \ + } while(0) + +#define APPL_CRITICAL(data) APPL_BASE(1, data) +#define APPL_ERROR(data) APPL_BASE(2, data) +#define APPL_WARNING(data) APPL_BASE(3, data) +#ifdef DEBUG + #define APPL_INFO(data) APPL_BASE(4, data) + #define APPL_DEBUG(data) APPL_BASE(5, data) + #define APPL_VERBOSE(data) APPL_BASE(6, data) + #define APPL_TODO(data) APPL_BASE(4, "TODO : " << data) +#else + #define APPL_INFO(data) do { } while(false) + #define APPL_DEBUG(data) do { } while(false) + #define APPL_VERBOSE(data) do { } while(false) + #define APPL_TODO(data) do { } while(false) +#endif + +#define APPL_ASSERT(cond,data) \ + do { \ + if (!(cond)) { \ + APPL_CRITICAL(data); \ + assert(!#cond); \ + } \ + } while (0) + +#endif + diff --git a/sample/0XX_CustomWidgets/appl/widget/VectorDisplay.cpp b/sample/0XX_CustomWidgets/appl/widget/VectorDisplay.cpp new file mode 100644 index 00000000..f1d2f224 --- /dev/null +++ b/sample/0XX_CustomWidgets/appl/widget/VectorDisplay.cpp @@ -0,0 +1,92 @@ +/** + * @author Edouard DUPIN + * + * @copyright 2010, Edouard DUPIN, all right reserved + * + * @license BSD 3 clauses (see license file) + */ + +#include +#include +#include + +#undef __class__ +#define __class__ "VectorDisplay" + + +appl::widget::VectorDisplay::VectorDisplay() : + m_autoDisplay(false), + m_minVal(-1.0f), + m_maxVal(1.0f) { + addObjectType("appl::widget::VectorDisplay"); +} + +void appl::widget::VectorDisplay::init() { + ewol::Widget::init(); + markToRedraw(); +} + + +appl::widget::VectorDisplay::~VectorDisplay() { + +} + + +void appl::widget::VectorDisplay::setValue(const std::vector& _data) { + m_data = _data; + markToRedraw(); +} + +void appl::widget::VectorDisplay::ToggleAuto() { + if (m_autoDisplay == false) { + periodicCallEnable(); + m_autoDisplay = true; + } else { + periodicCallDisable(); + m_autoDisplay = false; + } +} + +void appl::widget::VectorDisplay::onDraw() { + m_draw.draw(); +} + + +void appl::widget::VectorDisplay::onRegenerateDisplay() { + //!< Check if we really need to redraw the display, if not needed, we redraw the previous data ... + if (needRedraw() == false) { + return; + } + // remove previous data + m_draw.clear(); + // set background + m_draw.setColor(etk::color::black); + m_draw.setPos(vec2(0,0)); + m_draw.rectangleWidth(m_size); + + if (m_data.size() == 0) { + return; + } + // set all the line: + m_draw.setColor(etk::color::white); + m_draw.setThickness(1); + float origin = m_size.y()*0.5f; + + float ratioY = m_size.y() / (m_maxVal - m_minVal); + float stepX = m_size.x() / (float)m_data.size(); + m_draw.setPos(vec2(0, origin + ratioY*m_data[0])); + float baseX = 0; + for (size_t iii=1; iii 50) { + m_data.erase(m_data.begin()); + } + m_data.push_back(etk::tool::frand(m_minVal, m_maxVal)); + } + markToRedraw(); +} diff --git a/sample/0XX_CustomWidgets/appl/widget/VectorDisplay.h b/sample/0XX_CustomWidgets/appl/widget/VectorDisplay.h new file mode 100644 index 00000000..3b67b534 --- /dev/null +++ b/sample/0XX_CustomWidgets/appl/widget/VectorDisplay.h @@ -0,0 +1,48 @@ +/** + * @author Edouard DUPIN + * + * @copyright 2010, Edouard DUPIN, all right reserved + * + * @license BSD 3 clauses (see license file) + */ + +#ifndef __APPL_WIDGET_VECTOR_DISPLAY_H__ +#define __APPL_WIDGET_VECTOR_DISPLAY_H__ + +#include +#include +#include + +namespace appl { + namespace widget { + class VectorDisplay : public ewol::Widget { + private: + ewol::compositing::Drawing m_draw; //!< drawing instance + protected: + //! @brief constructor + VectorDisplay(); + void init(); + public: + DECLARE_WIDGET_FACTORY(VectorDisplay, "VectorDisplay"); + //! @brief destructor + virtual ~VectorDisplay(); + private: + std::vector m_data; //!< data that might be displayed + public: + void setValue(const std::vector& _data); + private: + bool m_autoDisplay; + public: + void ToggleAuto(); + private: + float m_minVal; //!< display minimum value + float m_maxVal; //!< display maximum value + public: // herited function + virtual void onDraw(); + virtual void onRegenerateDisplay(); + virtual void periodicCall(const ewol::event::Time& _event); + }; + }; +}; + +#endif diff --git a/sample/0XX_CustomWidgets/lutin_0XX_customwidget.py b/sample/0XX_CustomWidgets/lutin_0XX_customwidget.py new file mode 100755 index 00000000..9824d353 --- /dev/null +++ b/sample/0XX_CustomWidgets/lutin_0XX_customwidget.py @@ -0,0 +1,34 @@ +#!/usr/bin/python +import lutinModule as module +import lutinTools as tools + + +# optionnal : Describe in the "lutin.py --help" +def get_desc(): + return "Tutorial 0XX : Create custom Widget" + +# Module creation instance (not optionnal) +def create(target): + # module name is '001_HelloWord' and type binary. + myModule = module.Module(__file__, '0XX_customwidget', 'BINARY') + # add the file to compile: + myModule.add_src_file([ + 'appl/Main.cpp', + 'appl/debug.cpp', + 'appl/Windows.cpp', + 'appl/widget/VectorDisplay.cpp', + ]) + + # add Library dependency name + myModule.add_module_depend(['ewol']) + # add application C flags + myModule.compile_flags_CC([ + "-DPROJECT_NAME=\"\\\""+myModule.name+"\\\"\""]) + # Add current include Path + myModule.add_path(tools.get_current_path(__file__)) + # return the created module + return myModule + + + + diff --git a/sample/README.md b/sample/README.md new file mode 100644 index 00000000..86e17274 --- /dev/null +++ b/sample/README.md @@ -0,0 +1,52 @@ +Ewol Samples +============ + +Ewol sample are a FREE software for learn use of ewol. + +Instructions +============ + +download the software : + + git clone git://github.com/HeeroYui/ewol.git + cd ewol + git submodule init + git submodule update + +Compile software and install : (build all binary and libs) + + ewol/build/lutin.py -j4 + +Dependency packages +=================== + + sudo apt-get install g++ libgl1-mesa-dev zlib1g-dev libasound2-dev + # if you want to compile with clang : + sudo apt-get install clang + # For andoid compilation (jdk 7 does not work...) + sudo apt-get install javacc openjdk-6-jdk + # if you want to compile for windows : + sudo add-apt-repository ppa:ubuntu-toolchain-r/test + sudo apt-get update + sudo apt-get install gcc-mingw-w64 + # on 64 bits processor for compatibility + sudo apt-get install ia32-libs + sudo apt-get install g++-multilib libc6-dev-i386 + +License (APACHE v2.0) +===================== + +Copyright ewol Edouard DUPIN + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + diff --git a/sample/data/icon.png b/sample/data/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..16d3d9e1e81626bd74d938133c81a93549adec0d GIT binary patch literal 5084 zcmV<26C>=2P)e zSad^gZEa<4bO1wgWnpw>WFU8GbZ8()Nlj2!fese{024$>L_t(|+U=ctj9k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?38M6%F=n_50_5v{dOP{MF*CLhh8Rc7n->c?7 zmp?D_Qds!T)3@XP*7~+k$_-}u#)JnuF~T=(sQI=Klzql5sqJogj@~1CP+i~w2z$~@D<^!m;`8we@GjVmh!cd#UtT0!k zt5X3;DCd|meTV;!HK(7Kvm&OF^hcmiorD)3@P@6%(9iBC`%{G<_5-nfw^6=nx|A7e z6wP-MwVId}_5)6x6#zy#IF)(Uzwrc4d5)UJaCaA znct|TuPE6iX1PL=Z3KQ5Z+Oo_-~sc28WOBg;WmT`)x7Ze;cJ~`P)3E?q=NoeG|o#a zenJ$HI-7c~1*q~LWTgmxHQwxpNJ>_9mWEiIVmk1K^AxDhI*!8N^r_&ZBdoaEd^yYT744IWlR}>t0{*eg5OYbB zO{G~tIbdogB?@zi&bw486h@X@P?ljCMy!7gUWd^VUW)s9ybS9|0@2n9FABb;O_~?< z5ov=alFm_0oVOgxa0H6G@p|w4j-<0fu{6~X3zB4$qJ&HFeXkGW;`@o5K(eiGO;kWd zoXfj---ww^umlt1GmOQtc5PqIGIYQpU&NyG$OeMSBJ`8MVKFI}+Q&TI6wLjgzTvW* z%J7Bnf6(ncyir2_yr;7%(4DG)IjQ}x%DJ<6c{=N;Whgiiq+HzKyreG`nH0P=F;4Vy zmEp^1iP|)q$MNQuI7RK7YL(_GjiGAV$a=h)P`1kNwRoe+yAopTAdwerRq6Vs}}q~1_9&hHSR2jM5&;xrL#YSecf)5h<{U9;TEs05&BvDyH$B;>NQ yszb3uN3YZmwb_=@(g)qHE?1YU%hlyFEdLLJ^78t!t}qe+0000 +#include +#include + +#include +#include +#include +#include +#include + + +class MainApplication : public ewol::context::Application { + public: + bool init(ewol::Context& _context, size_t _initId) { + APPL_INFO("==> Init APPL (START) [" << ewol::getBoardType() << "] (" << ewol::getCompilationMode() << ")"); + + // TODO : Remove this : Move if in the windows properties + _context.setSize(vec2(800, 600)); + + // select internal data for font ... + _context.getFontDefault().setUseExternal(true); + _context.getFontDefault().set("FreeSerif;DejaVuSansMono", 19); + + std::shared_ptr basicWindows = appl::Windows::create(); + // create the specific windows + _context.setWindows(basicWindows); + APPL_INFO("==> Init APPL (END)"); + return true; + } + + void unInit(ewol::Context& _context) { + APPL_INFO(" == > Un-Init " PROJECT_NAME " (START)"); + // nothing to do ... + APPL_INFO(" == > Un-Init " PROJECT_NAME " (END)"); + } +}; + + + +/** + * @brief Main of the program (This can be set in every case, but it is not used in Andoid...). + * @param std IO + * @return std IO + */ +int main(int _argc, const char *_argv[]) { + // second possibility + return ewol::run(new MainApplication(), _argc, _argv); +} \ No newline at end of file diff --git a/sample/examplewallpaper/appl/Main.h b/sample/examplewallpaper/appl/Main.h new file mode 100644 index 00000000..8a45fb5e --- /dev/null +++ b/sample/examplewallpaper/appl/Main.h @@ -0,0 +1,14 @@ +/** + * @author Edouard DUPIN + * + * @copyright 2010, Edouard DUPIN, all right reserved + * + * @license GPL v3 (see license file) + */ + +#ifndef __APPL_MAIN_H__ +#define __APPL_MAIN_H__ + + +#endif + diff --git a/sample/examplewallpaper/appl/WidgetDisplay.cpp b/sample/examplewallpaper/appl/WidgetDisplay.cpp new file mode 100644 index 00000000..a8918c8a --- /dev/null +++ b/sample/examplewallpaper/appl/WidgetDisplay.cpp @@ -0,0 +1,116 @@ +/** + * @author Edouard DUPIN + * + * @copyright 2010, Edouard DUPIN, all right reserved + * + * @license GPL v3 (see license file) + */ + +#include + +#include +#include + +#undef __class__ +#define __class__ "WidgetDisplay" + + + +appl::WidgetDisplay::WidgetDisplay() { + addObjectType("appl::WidgetDisplay"); +} + +void appl::WidgetDisplay::init() { + ewol::Widget::init(); + m_compositing.setSource("DATA:SnowFlake.svg", ivec2(128,128)); + setCanHaveFocus(true); + periodicCallEnable(); + for (int32_t iii=0; iii<250 ; ++iii) { + m_elements.push_back(appl::WidgetDisplay::Element()); + } +} + + +appl::WidgetDisplay::~WidgetDisplay() { + +} + +void appl::WidgetDisplay::onDraw() { + m_compositing.draw(); +} + +appl::WidgetDisplay::Element::Element() { + regenerate(vec2(1024,2048)); + m_lifeTime = etk::tool::frand(-4,4); + m_life = m_lifeTime; +} + +void appl::WidgetDisplay::Element::regenerate(const vec2& _size) { + float sizeDisplay=etk::tool::frand(10,64); + m_position = vec2(etk::tool::frand(0,_size.x()), + etk::tool::frand(_size.y(),_size.y()+64)); + m_size = vec2(sizeDisplay,sizeDisplay); + m_angle = etk::tool::frand(-3.1415952f,3.1415952f); + m_lifeTime = etk::tool::frand(1,10); + m_life = m_lifeTime; + m_lifeTime += 4; + m_angleAdd = etk::tool::frand(-0.05f,0.05f); + m_downSpeed = etk::tool::frand(0.5f,3.f); +} + +void appl::WidgetDisplay::Element::move(float _deltaTime) { + m_lifeTime -= _deltaTime; + m_position -= vec2(0, m_downSpeed); + m_angle += m_angleAdd; +} + +void appl::WidgetDisplay::onRegenerateDisplay() { + if (needRedraw() == false) { + return; + } + // remove data of the previous composition : + m_compositing.clear(); + for (int32_t iii=0; iii(0xFF, 0xFF, 0xFF, color)); + } else if (m_elements[iii].m_lifeTime > m_elements[iii].m_life) { + int32_t color = 0xFF*(1.0f-0.25*(m_elements[iii].m_lifeTime - m_elements[iii].m_life)); + m_compositing.setColor(etk::Color<>(0xFF, 0xFF, 0xFF, color)); + } else { + m_compositing.setColor(etk::Color<>(0xFF, 0xFF, 0xFF, 0xFF)); + } + //3d7dab + m_compositing.setPos(m_elements[iii].m_position); + m_compositing.setAngle(m_elements[iii].m_angle); + m_compositing.print(m_elements[iii].m_size); + } +} + +void appl::WidgetDisplay::periodicCall(const ewol::event::Time& _event) { + float curentDelta=_event.getDeltaCall(); + // set the somposition properties : + for (int32_t iii=0; iii +#include +#include + +namespace appl { + class WidgetDisplay : public ewol::Widget { + private: + class Element { + public: + Element(); + vec2 m_position; + vec2 m_size; + float m_angle; + float m_lifeTime; + float m_life; + float m_angleAdd; + float m_downSpeed; + void regenerate(const vec2& _size); + void move(float _deltaTime); + }; + protected: + WidgetDisplay(); + void init(); + public: + DECLARE_FACTORY(WidgetDisplay); + virtual ~WidgetDisplay(); + ewol::compositing::Image m_compositing; + std::vector m_elements; + public: // Derived function + void onRegenerateDisplay(); + virtual void periodicCall(const ewol::event::Time& _event); + virtual bool onEventInput(const ewol::event::Input& _event); + virtual void onDraw(); + }; +}; + +#endif + diff --git a/sample/examplewallpaper/appl/Windows.cpp b/sample/examplewallpaper/appl/Windows.cpp new file mode 100644 index 00000000..55a381fd --- /dev/null +++ b/sample/examplewallpaper/appl/Windows.cpp @@ -0,0 +1,39 @@ +/** + * @author Edouard DUPIN + * + * @copyright 2010, Edouard DUPIN, all right reserved + * + * @license GPL v3 (see license file) + */ + +#include +#include +#include +#include + +#undef __class__ +#define __class__ "Windows" + + +appl::Windows::Windows() { + addObjectType("appl::Windows"); +} + +void appl::Windows::init() { + ewol::widget::Windows::init(); + setTitle("example Wallpaper"); + std::shared_ptr tmpWidget = appl::WidgetDisplay::create(); + if (tmpWidget == nullptr) { + APPL_ERROR("Can not allocate widget ==> display might be in error"); + } else { + setSubWidget(tmpWidget); + tmpWidget->setExpand(bvec2(true,true)); + tmpWidget->setFill(bvec2(true,true)); + } + setBackgroundColor(etk::Color(0,0,0,0)); +} + +appl::Windows::~Windows() { + +} + diff --git a/sample/examplewallpaper/appl/Windows.h b/sample/examplewallpaper/appl/Windows.h new file mode 100644 index 00000000..e7e31fc4 --- /dev/null +++ b/sample/examplewallpaper/appl/Windows.h @@ -0,0 +1,27 @@ +/** + * @author Edouard DUPIN + * + * @copyright 2010, Edouard DUPIN, all right reserved + * + * @license GPL v3 (see license file) + */ + +#ifndef __APPL_WINDOWS_H__ +#define __APPL_WINDOWS_H__ + +#include +#include + +namespace appl { + class Windows : public ewol::widget::Windows { + protected: + Windows(); + void init(); + public: + DECLARE_FACTORY(Windows); + virtual ~Windows(); + }; +}; + + +#endif \ No newline at end of file diff --git a/sample/examplewallpaper/appl/debug.cpp b/sample/examplewallpaper/appl/debug.cpp new file mode 100644 index 00000000..d63981aa --- /dev/null +++ b/sample/examplewallpaper/appl/debug.cpp @@ -0,0 +1,15 @@ +/** + * @author Edouard DUPIN + * + * @copyright 2010, Edouard DUPIN, all right reserved + * + * @license GPL v3 (see license file) + */ + + +#include + +int32_t appl::getLogId() { + static int32_t g_val = etk::log::registerInstance("example"); + return g_val; +} diff --git a/sample/examplewallpaper/appl/debug.h b/sample/examplewallpaper/appl/debug.h new file mode 100644 index 00000000..fcafd52a --- /dev/null +++ b/sample/examplewallpaper/appl/debug.h @@ -0,0 +1,52 @@ +/** + * @author Edouard DUPIN + * + * @copyright 2010, Edouard DUPIN, all right reserved + * + * @license GPL v3 (see license file) + */ + +#ifndef __APPL_DEBUG_H__ +#define __APPL_DEBUG_H__ + +#include + +namespace appl { + int32_t getLogId(); +}; +// TODO : Review this problem of multiple intanciation of "std::stringbuf sb" +#define APPL_BASE(info,data) \ + do { \ + if (info <= etk::log::getLevel(appl::getLogId())) { \ + std::stringbuf sb; \ + std::ostream tmpStream(&sb); \ + tmpStream << data; \ + etk::log::logStream(appl::getLogId(), info, __LINE__, __class__, __func__, tmpStream); \ + } \ + } while(0) + +#define APPL_CRITICAL(data) APPL_BASE(1, data) +#define APPL_ERROR(data) APPL_BASE(2, data) +#define APPL_WARNING(data) APPL_BASE(3, data) +#ifdef DEBUG + #define APPL_INFO(data) APPL_BASE(4, data) + #define APPL_DEBUG(data) APPL_BASE(5, data) + #define APPL_VERBOSE(data) APPL_BASE(6, data) + #define APPL_TODO(data) APPL_BASE(4, "TODO : " << data) +#else + #define APPL_INFO(data) do { } while(false) + #define APPL_DEBUG(data) do { } while(false) + #define APPL_VERBOSE(data) do { } while(false) + #define APPL_TODO(data) do { } while(false) +#endif + +#define APPL_ASSERT(cond,data) \ + do { \ + if (!(cond)) { \ + APPL_CRITICAL(data); \ + assert(!#cond); \ + } \ + } while (0) + +#endif + diff --git a/sample/examplewallpaper/data/SnowFlake.svg b/sample/examplewallpaper/data/SnowFlake.svg new file mode 100644 index 00000000..193ada30 --- /dev/null +++ b/sample/examplewallpaper/data/SnowFlake.svg @@ -0,0 +1,5 @@ + + + + diff --git a/sample/examplewallpaper/lutin_examplewallpaper.py b/sample/examplewallpaper/lutin_examplewallpaper.py new file mode 100755 index 00000000..757608e3 --- /dev/null +++ b/sample/examplewallpaper/lutin_examplewallpaper.py @@ -0,0 +1,61 @@ +#!/usr/bin/python +import lutinModule as module +import lutinTools as tools +import datetime + +def get_desc(): + return "Tutorial xxx example wallpaper" + + +def create(target): + # module name is 'edn' and type binary. + myModule = module.Module(__file__, 'examplewallpaper', 'PACKAGE') + # add the file to compile: + myModule.add_src_file([ + 'appl/Main.cpp', + 'appl/debug.cpp', + 'appl/WidgetDisplay.cpp', + 'appl/Windows.cpp', + ]) + + myModule.add_module_depend(['ewol']) + + myModule.compile_flags_CC([ + "-DPROJECT_NAME=\"\\\""+myModule.name+"\\\"\""]) + + myModule.copy_folder('data/SnowFlake.svg','') + + myModule.add_path(tools.get_current_path(__file__)) + + + now = datetime.datetime.now() + versionID=str(now.year-2013)+"."+str(now.month)+"."+str(now.day) + + # set the package properties : + myModule.pkg_set("VERSION", versionID) + myModule.pkg_set("COMPAGNY_TYPE", "org") + myModule.pkg_set("COMPAGNY_NAME", "EWOL") + myModule.pkg_set("MAINTAINER", ["Mr DUPIN Edouard "]) + myModule.pkg_set("ICON", tools.get_current_path(__file__) + "/../data/icon.png") + myModule.pkg_set("SECTION", "example") + myModule.pkg_set("PRIORITY", "extra") + myModule.pkg_set("DESCRIPTION", "EWOL example for Wallpaper on Android") + myModule.pkg_set("NAME", "ewol Wallpaper ewample") + + myModule.pkg_set("ANDROID_APPL_TYPE", "WALLPAPER") + + #for the exemple : + myModule.pkg_add("ANDROID_WALLPAPER_PROPERTIES", ["list", "testpattern", "Select test pattern", "Choose which test pattern to display", \ + [ ["key","value display"],\ + ["key2","value display 2"]\ + ] \ + ]) + myModule.pkg_add("ANDROID_WALLPAPER_PROPERTIES", ["bool", "movement", "Motion", "Apply movement to test pattern", ["Moving test pattern", "Still test pattern"]]) + + + # add the currrent module at the + return myModule + + + + diff --git a/sample/license.txt b/sample/license.txt new file mode 100644 index 00000000..4a60c3c7 --- /dev/null +++ b/sample/license.txt @@ -0,0 +1,13 @@ +Copyright ewol samples Edouard DUPIN + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. \ No newline at end of file