From 3a89eaab7946b7135b722886c601880ea9e2c545 Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Thu, 16 Jul 2015 21:34:35 +0200 Subject: [PATCH] [DEV] continue integration --- gale/Application.cpp | 39 ++-- gale/Application.h | 15 +- gale/Windows.cpp | 299 ---------------------------- gale/Windows.h | 138 ------------- gale/context/Context.cpp | 40 +--- gale/context/Context.h | 2 + gale/context/InputManager.h | 1 - gale/context/X11/Context.cpp | 68 +++---- gale/event/Entry.cpp | 27 --- gale/event/Entry.h | 77 ------- gale/event/Input.cpp | 26 --- gale/event/Input.h | 110 ---------- gale/event/Time.cpp | 34 ---- gale/event/Time.h | 67 ------- gale/gale.cpp | 1 - gale/key/Special.cpp | 22 +- gale/orientation.cpp | 1 + gale/renderer/openGL/openGL.cpp | 2 +- gale/renderer/openGL/openGL.h | 1 + gale/resource/Manager.cpp | 3 +- gale/resource/Program.h | 2 +- gale/resource/Resource.cpp | 39 +++- gale/resource/Resource.h | 39 +++- gale/resource/Shader.h | 2 +- gale/resource/Texture.cpp | 33 +-- gale/resource/Texture.h | 46 +++-- gale/resource/VirtualBufferObject.h | 2 +- lutin_gale.py | 7 - sample/basic.cpp | 40 ++++ sample/lutin_gale-sample-basic.py | 20 ++ sample/lutin_gale-sample-basic.pyc | Bin 0 -> 785 bytes 31 files changed, 286 insertions(+), 917 deletions(-) delete mode 100644 gale/Windows.cpp delete mode 100644 gale/Windows.h delete mode 100644 gale/event/Entry.cpp delete mode 100644 gale/event/Entry.h delete mode 100644 gale/event/Input.cpp delete mode 100644 gale/event/Input.h delete mode 100644 gale/event/Time.cpp delete mode 100644 gale/event/Time.h create mode 100644 sample/basic.cpp create mode 100644 sample/lutin_gale-sample-basic.py create mode 100644 sample/lutin_gale-sample-basic.pyc diff --git a/gale/Application.cpp b/gale/Application.cpp index 3a3cc4f..cdfdbda 100644 --- a/gale/Application.cpp +++ b/gale/Application.cpp @@ -11,44 +11,59 @@ #include -gale::Application::Application() { - GALE_INFO("Constructor Gale Application"); +gale::Application::Application() : + m_needRedraw(true) { + GALE_VERBOSE("Constructor Gale Application"); } gale::Application::~Application() { - GALE_INFO("destructor of Gale Application"); + GALE_VERBOSE("destructor of Gale Application"); } void gale::Application::onCreate(gale::Context& _context) { - GALE_INFO("Create Gale Application"); + GALE_VERBOSE("Create Gale Application"); } void gale::Application::onStart(gale::Context& _context) { - GALE_INFO("Start Gale Application"); + GALE_VERBOSE("Start Gale Application"); } void gale::Application::onResume(gale::Context& _context) { - GALE_INFO("Resume Gale Application"); + GALE_VERBOSE("Resume Gale Application"); } -void gale::Application::onRun(gale::Context& _context) { - GALE_INFO("Run Gale Application"); +void gale::Application::onRegenerateDisplay(gale::Context& _context) { + GALE_VERBOSE("Regenerate Gale Application"); + markDrawingIsNeeded(); +} + +void gale::Application::markDrawingIsNeeded() { + m_needRedraw = true; +} + +bool gale::Application::isDrawingNeeded() { + bool tmp = m_needRedraw; + m_needRedraw = false; + return tmp; +} +void gale::Application::onDraw(gale::Context& _context) { + GALE_VERBOSE("draw Gale Application"); } void gale::Application::onPause(gale::Context& _context) { - GALE_INFO("Pause Gale Application"); + GALE_VERBOSE("Pause Gale Application"); } void gale::Application::onStop(gale::Context& _context) { - GALE_INFO("Stop Gale Application"); + GALE_VERBOSE("Stop Gale Application"); } void gale::Application::onDestroy(gale::Context& _context) { - GALE_INFO("Destroy Gale Application"); + GALE_VERBOSE("Destroy Gale Application"); } void gale::Application::exit(int32_t _value) { - GALE_INFO("Exit Requested"); + GALE_VERBOSE("Exit Requested"); } void gale::Application::onPointer(enum gale::key::type _type, int32_t _pointerID, const vec2& _pos, gale::key::status _state) { diff --git a/gale/Application.h b/gale/Application.h index c266aad..8702119 100644 --- a/gale/Application.h +++ b/gale/Application.h @@ -41,10 +41,15 @@ namespace gale { */ virtual void onResume(gale::Context& _context); /** - * @brief Call periodicly the application to draw all it is needed to draw ... (access on the openGL Context). + * @brief call application to precalculate drawing. * @param[in] _context Current gale context. */ - virtual void onRun(gale::Context& _context); + virtual void onRegenerateDisplay(gale::Context& _context); + /** + * @brief Real draw of the application + * @param[in] _context Current gale context. + */ + virtual void onDraw(gale::Context& _context); /** * @brief The application is Hide / not visible. * @param[in] _context Current gale context. @@ -65,6 +70,12 @@ namespace gale { * @param[in] _value value to return on the program */ virtual void exit(int32_t _value); + + private: + bool m_needRedraw; + public: + virtual void markDrawingIsNeeded(); + virtual bool isDrawingNeeded(); public: /** * @brief Get touch/mouse/... event. diff --git a/gale/Windows.cpp b/gale/Windows.cpp deleted file mode 100644 index db62954..0000000 --- a/gale/Windows.cpp +++ /dev/null @@ -1,299 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license APACHE v2.0 (see license file) - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#undef __class__ -#define __class__ "Windows" - -//list of local events : -extern const char * const galeEventWindowsHideKeyboard = "gale Windows hideKeyboard"; - - -gale::widget::Windows::Windows() : - m_colorProperty(nullptr), - m_colorBg(-1) { - addResourceType("gale::widget::Windows"); - setCanHaveFocus(true); - m_colorProperty = gale::resource::ColorFile::create("THEME:COLOR:Windows.json"); - if (m_colorProperty != nullptr) { - m_colorBg = m_colorProperty->request("background"); - } - //KeyboardShow(KEYBOARD_MODE_CODE); -} - -gale::widget::Windows::~Windows() { - m_subWidget.reset(); - m_popUpWidgetList.clear(); -} - -void gale::widget::Windows::calculateSize(const vec2& _availlable) { - GALE_DEBUG(" _availlable : " << _availlable); - m_size = _availlable; - if (m_subWidget != nullptr) { - m_subWidget->calculateMinMaxSize(); - // TODO : Check if min size is possible ... - // TODO : Herited from MinSize .. and expand ??? - m_subWidget->calculateSize(m_size); - } - for (auto &it : m_popUpWidgetList) { - if(it != nullptr) { - it->calculateMinMaxSize(); - it->calculateSize(m_size); - } - } -} - -std::shared_ptr gale::widget::Windows::getWidgetAtPos(const vec2& _pos) { - // calculate relative position - vec2 relativePos = relativePosition(_pos); - // event go directly on the pop-up - if (0 < m_popUpWidgetList.size()) { - return m_popUpWidgetList.back()->getWidgetAtPos(_pos); - // otherwise in the normal windows - } else if (nullptr != m_subWidget) { - return m_subWidget->getWidgetAtPos(_pos); - } - // otherwise the event go to this widget ... - return std::dynamic_pointer_cast(shared_from_this()); -} - -void gale::widget::Windows::sysDraw() { - //GALE_DEBUG("Drow on (" << m_size.x << "," << m_size.y << ")"); - // set the size of the open GL system - glViewport(0,0,m_size.x(),m_size.y()); - - gale::openGL::disable(gale::openGL::FLAG_DITHER); - //gale::openGL::disable(gale::openGL::FLAG_BLEND); - gale::openGL::disable(gale::openGL::FLAG_STENCIL_TEST); - gale::openGL::disable(gale::openGL::FLAG_ALPHA_TEST); - gale::openGL::disable(gale::openGL::FLAG_FOG); - #if (!defined(__TARGET_OS__Android) && !defined(__TARGET_OS__IOs)) - glPixelZoom(1.0,1.0); - #endif - gale::openGL::disable(gale::openGL::FLAG_TEXTURE_2D); - gale::openGL::disable(gale::openGL::FLAG_DEPTH_TEST); - - gale::openGL::enable(gale::openGL::FLAG_BLEND); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - - // clear the matrix system : - mat4 newOne; - gale::openGL::setBasicMatrix(newOne); - - gale::DrawProperty displayProp; - displayProp.m_windowsSize = m_size; - displayProp.m_origin.setValue(0,0); - displayProp.m_size = m_size; - systemDraw(displayProp); - gale::openGL::disable(gale::openGL::FLAG_BLEND); - return; -} - -void gale::widget::Windows::onRegenerateDisplay() { - if (nullptr != m_subWidget) { - m_subWidget->onRegenerateDisplay(); - } - for (auto &it : m_popUpWidgetList) { - if (it != nullptr) { - it->onRegenerateDisplay(); - } - } -} - -//#define TEST_PERFO_WINDOWS - -void gale::widget::Windows::systemDraw(const gale::DrawProperty& _displayProp) { - gale::Widget::systemDraw(_displayProp); - #ifdef TEST_PERFO_WINDOWS - int64_t ___startTime0 = gale::getTime(); - #endif - - // clear the screen with transparency ... - etk::Color colorBg(0.5, 0.5, 0.5, 0.5); - if (m_colorProperty != nullptr) { - colorBg = m_colorProperty->get(m_colorBg); - } - glClearColor(colorBg.r(), colorBg.g(), colorBg.b(), colorBg.a()); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - #ifdef TEST_PERFO_WINDOWS - float ___localTime0 = (float)(gale::getTime() - ___startTime0) / 1000.0f; - GALE_ERROR(" Windows000 : " << ___localTime0 << "ms "); - - int64_t ___startTime1 = gale::getTime(); - #endif - //GALE_WARNING(" WINDOWS draw on " << m_currentDrawId); - // first display the windows on the display - if (nullptr != m_subWidget) { - m_subWidget->systemDraw(_displayProp); - //GALE_DEBUG("Draw Windows"); - } - #ifdef TEST_PERFO_WINDOWS - float ___localTime1 = (float)(gale::getTime() - ___startTime1) / 1000.0f; - GALE_ERROR(" Windows111 : " << ___localTime1 << "ms "); - - int64_t ___startTime2 = gale::getTime(); - #endif - // second display the pop-up - for (auto &it : m_popUpWidgetList) { - if (it != nullptr) { - it->systemDraw(_displayProp); - //GALE_DEBUG("Draw Pop-up"); - } - } - #ifdef TEST_PERFO_WINDOWS - float ___localTime2 = (float)(gale::getTime() - ___startTime2) / 1000.0f; - GALE_ERROR(" Windows222 : " << ___localTime2 << "ms "); - #endif -} - -void gale::widget::Windows::setSubWidget(std::shared_ptr _widget) { - if (m_subWidget != nullptr) { - GALE_INFO("Remove current main windows Widget..."); - m_subWidget->removeParent(); - m_subWidget.reset(); - } - if (_widget != nullptr) { - m_subWidget = _widget; - m_subWidget->setParent(shared_from_this()); - } - - // Regenerate the size calculation : - calculateSize(m_size); -} - -void gale::widget::Windows::popUpWidgetPush(std::shared_ptr _widget) { - if (_widget == nullptr) { - // nothing to do an error appear : - GALE_ERROR("can not set widget pop-up (null pointer)"); - return; - } - m_popUpWidgetList.push_back(_widget); - _widget->setParent(shared_from_this()); - // force the focus on the basic widget ==> this remove many time the virual keyboard area - _widget->keepFocus(); - // Regenerate the size calculation : - calculateSize(m_size); - // TODO : it is dangerous to access directly to the system ... - getContext().resetIOEvent(); -} - -void gale::widget::Windows::popUpWidgetPop() { - if (m_popUpWidgetList.size() == 0) { - return; - } - m_popUpWidgetList.pop_back(); -} - -void gale::widget::Windows::setBackgroundColor(const etk::Color& _color) { - if (m_backgroundColor != _color) { - m_backgroundColor = _color; - markToRedraw(); - } -} - -void gale::widget::Windows::setTitle(const std::string& _title) { - // TODO : remove this ... - std::string title = _title; - getContext().setTitle(title); -} - - -void gale::widget::Windows::createPopUpMessage(enum popUpMessageType _type, const std::string& _message) { - std::shared_ptr tmpPopUp = widget::StdPopUp::create(); - if (tmpPopUp == nullptr) { - GALE_ERROR("Can not create a simple pop-up"); - return; - } - switch(_type) { - case messageTypeInfo: - tmpPopUp->setTitle("Info"); - break; - case messageTypeWarning: - tmpPopUp->setTitle("Warning"); - break; - case messageTypeError: - tmpPopUp->setTitle("Error"); - break; - case messageTypeCritical: - tmpPopUp->setTitle("Critical"); - break; - } - tmpPopUp->setComment(_message); - tmpPopUp->addButton("close", true); - tmpPopUp->setRemoveOnExternClick(true); - popUpWidgetPush(tmpPopUp); -} - -void gale::widget::Windows::requestDestroyFromChild(const std::shared_ptr& _child) { - auto it = m_popUpWidgetList.begin(); - while (it != m_popUpWidgetList.end()) { - if (*it == _child) { - if (*it == nullptr) { - m_popUpWidgetList.erase(it); - it = m_popUpWidgetList.begin(); - continue; - } - (*it)->removeParent(); - (*it).reset(); - m_popUpWidgetList.erase(it); - it = m_popUpWidgetList.begin(); - markToRedraw(); - continue; - } - ++it; - } - if (m_subWidget == _child) { - if (m_subWidget == nullptr) { - return; - } - m_subWidget->removeParent(); - m_subWidget.reset(); - markToRedraw(); - } -} - -std::shared_ptr gale::widget::Windows::getSubObjectNamed(const std::string& _objectName) { - std::shared_ptr tmpObject = gale::Widget::getSubObjectNamed(_objectName); - if (tmpObject != nullptr) { - return tmpObject; - } - // check direct subwidget - if (m_subWidget != nullptr) { - tmpObject = m_subWidget->getSubObjectNamed(_objectName); - if (tmpObject != nullptr) { - return tmpObject; - } - } - // get all subwidget "pop-up" - for (auto &it : m_popUpWidgetList) { - if (it != nullptr) { - tmpObject = it->getSubObjectNamed(_objectName); - if (tmpObject != nullptr) { - return tmpObject; - } - } - } - // not find ... - return nullptr; -} - -void gale::widget::Windows::sysOnKill() { - if (onKill() == true) { - getContext().stop(); - } -} - diff --git a/gale/Windows.h b/gale/Windows.h deleted file mode 100644 index 49b0e61..0000000 --- a/gale/Windows.h +++ /dev/null @@ -1,138 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license APACHE v2.0 (see license file) - */ - -#ifndef __GALE_WINDOWS_H__ -#define __GALE_WINDOWS_H__ - -#include -#include -#include -#include -#include -#include - -namespace gale { - namespace widget { - /** - * @brief Windows basic interface - */ - class Windows : public gale::Widget { - protected: - std::shared_ptr m_colorProperty; //!< theme color property - int32_t m_colorBg; //!< Default background color of the windows - protected: - Windows(); - void init() { - gale::Widget::init(); - }; - public: - virtual ~Windows(); - // internal event at gale system : - public: - void sysDraw(); - void sysOnShow() {}; - void sysOnHide() {}; - void sysOnKill(); - public: - virtual void onShow() { }; - virtual void onHide() { }; - virtual bool onKill() { - // TODO : Check this in speck for android ... - return false; - }; - virtual void onReduce() { }; - virtual void onStateBackground() {}; - virtual void onStateForeground() {}; - virtual void onStateSuspend() {}; - virtual void onStateResume() {}; - private: - std::shared_ptr m_subWidget; - std::list> m_popUpWidgetList; - public: - void setSubWidget(std::shared_ptr _widget); - void popUpWidgetPush(std::shared_ptr _widget); - void popUpWidgetPop(); - size_t popUpCount() { - return m_popUpWidgetList.size(); - } - private: - etk::Color m_backgroundColor; //!< reset color of the Main windows - public: - /** - * @brief get the background color. - * @return A reference on the color - */ - const etk::Color& getBackgroundColor() { - return m_backgroundColor; - }; - /** - * @brief set the background color. - * @param[IN] the new requested color. - */ - void setBackgroundColor(const etk::Color& _color); - protected: // Derived function - virtual void systemDraw(const gale::DrawProperty& _displayProp); - public: // Derived function - virtual void onRegenerateDisplay(); - virtual void calculateSize(const vec2& _availlable); - virtual std::shared_ptr getWidgetAtPos(const vec2& _pos); - virtual void requestDestroyFromChild(const std::shared_ptr& _child); - virtual std::shared_ptr getSubObjectNamed(const std::string& _objectName); - void setTitle(const std::string& _title); - public: - enum popUpMessageType { - messageTypeInfo, //!< information message pop-up - messageTypeWarning, //!< warning message pop-up - messageTypeError, //!< Error message pop-up - messageTypeCritical //!< Critical message pop-up - }; - /** - * @brief Create a simple pop-up message on the screen for application error. - * @param[in] _type Type of the error. - * @param[in] _message message to display (decorated text) - */ - virtual void createPopUpMessage(enum popUpMessageType _type, const std::string& _message); - /** - * @brief Create a simple information message - * @param[in] _message message to display (decorated text) - */ - void displayInfoMessage(const std::string& _message) { - createPopUpMessage(messageTypeInfo, _message); - } - /** - * @brief Create a simple warning message - * @param[in] _message message to display (decorated text) - */ - void displayWarningMessage(const std::string& _message) { - createPopUpMessage(messageTypeWarning, _message); - } - /** - * @brief Create a simple error message - * @param[in] _message message to display (decorated text) - */ - void displayErrorMessage(const std::string& _message) { - createPopUpMessage(messageTypeError, _message); - } - /** - * @brief Create a simple critical message - * @param[in] _message message to display (decorated text) - */ - void displayCriticalMessage(const std::string& _message) { - createPopUpMessage(messageTypeCritical, _message); - } - - - virtual bool onEventHardwareInput(const gale::key::keyboardSystem& _event, bool _down) { - return false; - }; - }; - }; -}; - -#endif - diff --git a/gale/context/Context.cpp b/gale/context/Context.cpp index b4ab303..6e46f3e 100644 --- a/gale/context/Context.cpp +++ b/gale/context/Context.cpp @@ -580,66 +580,48 @@ bool gale::Context::OS_Draw(bool _displayEveryTime) { // set the curent interface : lockContext(); processEvents(); - { - gale::eSystemMessage *data = new gale::eSystemMessage(); - if (data == nullptr) { - GALE_ERROR("allocation error of message"); - } else { - data->TypeMessage = eSystemMessage::msgInit; - m_msgSystem.post(data); - } - } // call all the widget that neded to do something periodicly // TODO : m_objectManager.timeCall(currentTime); // check if the user selected a windows - #if 0 - if (nullptr != m_windowsCurrent) { + if (m_application != nullptr) { // Redraw all needed elements - m_windowsCurrent->onRegenerateDisplay(); + m_application->onRegenerateDisplay(*this); + needRedraw = m_application->isDrawingNeeded(); } - #endif if (m_displayFps == true) { m_FpsSystemEvent.incrementCounter(); m_FpsSystemEvent.toc(); } - //! bool needRedraw = gale::widgetManager::isDrawingNeeded(); - // TODO : needRedraw = m_widgetManager.isDrawingNeeded(); // release the curent interface : unLockContext(); } bool hasDisplayDone = false; - //! drawing section : + //! drawing section: { // Lock openGl context: gale::openGL::lock(); if (m_displayFps == true) { m_FpsSystemContext.tic(); } - #if 0 - if (nullptr != m_windowsCurrent) { - if( true == needRedraw - || true == _displayEveryTime) { - m_resourceManager.updateContext(); - if (m_displayFps == true) { - m_FpsSystemContext.incrementCounter(); - } + if( needRedraw == true + || _displayEveryTime == true) { + m_resourceManager.updateContext(); + if (m_displayFps == true) { + m_FpsSystemContext.incrementCounter(); } } - #endif if (m_displayFps == true) { m_FpsSystemContext.toc(); m_FpsSystem.tic(); } - #if 0 - if (nullptr != m_windowsCurrent) { + if (m_application != nullptr) { if( true == needRedraw || true == _displayEveryTime) { m_FpsSystem.incrementCounter(); - m_windowsCurrent->sysDraw(); + m_application->onDraw(*this); hasDisplayDone = true; } } - #endif if (m_displayFps == true) { m_FpsSystem.toc(); m_FpsFlush.tic(); diff --git a/gale/context/Context.h b/gale/context/Context.h index 8c01991..f8b513b 100644 --- a/gale/context/Context.h +++ b/gale/context/Context.h @@ -22,6 +22,8 @@ #include #include +#define MAX_MANAGE_INPUT (15) + namespace gale { /** * @not-in-doc diff --git a/gale/context/InputManager.h b/gale/context/InputManager.h index 3169e19..59cc24b 100644 --- a/gale/context/InputManager.h +++ b/gale/context/InputManager.h @@ -11,7 +11,6 @@ #include -#define MAX_MANAGE_INPUT (15) namespace gale { namespace context { diff --git a/gale/context/X11/Context.cpp b/gale/context/X11/Context.cpp index b2b6301..d9fdf4e 100644 --- a/gale/context/X11/Context.cpp +++ b/gale/context/X11/Context.cpp @@ -587,26 +587,26 @@ class X11Interface : public gale::Context { enum gale::key::keyboard keyInput; switch (event.xkey.keycode) { //case 80: // keypad - case 111: keyInput = gale::key::keyboardUp; break; + case 111: keyInput = gale::key::keyboard_up; break; //case 83: // keypad - case 113: keyInput = gale::key::keyboardLeft; break; + case 113: keyInput = gale::key::keyboard_left; break; //case 85: // keypad - case 114: keyInput = gale::key::keyboardRight; break; + case 114: keyInput = gale::key::keyboard_right; break; //case 88: // keypad - case 116: keyInput = gale::key::keyboardDown; break; + case 116: keyInput = gale::key::keyboard_down; break; //case 81: // keypad - case 112: keyInput = gale::key::keyboardPageUp; break; + case 112: keyInput = gale::key::keyboard_pageUp; break; //case 89: // keypad - case 117: keyInput = gale::key::keyboardPageDown; break; + case 117: keyInput = gale::key::keyboard_pageDown; break; //case 79: // keypad - case 110: keyInput = gale::key::keyboardStart; break; + case 110: keyInput = gale::key::keyboard_start; break; //case 87: // keypad - case 115: keyInput = gale::key::keyboardEnd; break; - case 78: keyInput = gale::key::keyboardStopDefil; break; - case 127: keyInput = gale::key::keyboardWait; break; + case 115: keyInput = gale::key::keyboard_end; break; + case 78: keyInput = gale::key::keyboard_stopDefil; break; + case 127: keyInput = gale::key::keyboard_wait; break; //case 90: // keypad case 118: - keyInput = gale::key::keyboardInsert; + keyInput = gale::key::keyboard_insert; if(event.type == KeyRelease) { if (true == m_guiKeyBoardMode.getInsert()) { m_guiKeyBoardMode.setInsert(false); @@ -616,29 +616,29 @@ class X11Interface : public gale::Context { } break; //case 84: keyInput = gale::key::keyboardCenter; break; // Keypad - case 67: keyInput = gale::key::keyboardF1; break; - case 68: keyInput = gale::key::keyboardF2; break; - case 69: keyInput = gale::key::keyboardF3; break; - case 70: keyInput = gale::key::keyboardF4; break; - case 71: keyInput = gale::key::keyboardF5; break; - case 72: keyInput = gale::key::keyboardF6; break; - case 73: keyInput = gale::key::keyboardF7; break; - case 74: keyInput = gale::key::keyboardF8; break; - case 75: keyInput = gale::key::keyboardF9; break; - case 76: keyInput = gale::key::keyboardF10; break; - case 95: keyInput = gale::key::keyboardF11; break; - case 96: keyInput = gale::key::keyboardF12; break; - case 66: keyInput = gale::key::keyboardCapLock; m_guiKeyBoardMode.setCapsLock( (event.type == KeyPress) ? true : false); break; - case 50: keyInput = gale::key::keyboardShiftLeft; m_guiKeyBoardMode.setShift ( (event.type == KeyPress) ? true : false); break; - case 62: keyInput = gale::key::keyboardShiftRight; m_guiKeyBoardMode.setShift ( (event.type == KeyPress) ? true : false); break; - case 37: keyInput = gale::key::keyboardCtrlLeft; m_guiKeyBoardMode.setCtrl ( (event.type == KeyPress) ? true : false); break; - case 105: keyInput = gale::key::keyboardCtrlRight; m_guiKeyBoardMode.setCtrl ( (event.type == KeyPress) ? true : false); break; - case 133: keyInput = gale::key::keyboardMetaLeft; m_guiKeyBoardMode.setMeta ( (event.type == KeyPress) ? true : false); break; - case 134: keyInput = gale::key::keyboardMetaRight; m_guiKeyBoardMode.setMeta ( (event.type == KeyPress) ? true : false); break; - case 64: keyInput = gale::key::keyboardAlt; m_guiKeyBoardMode.setAlt ( (event.type == KeyPress) ? true : false); break; - case 108: keyInput = gale::key::keyboardAltGr; m_guiKeyBoardMode.setAltGr ( (event.type == KeyPress) ? true : false); break; - case 135: keyInput = gale::key::keyboardContextMenu; break; - case 77: keyInput = gale::key::keyboardNumLock; m_guiKeyBoardMode.setNumLock ( (event.type == KeyPress) ? true : false); break; + case 67: keyInput = gale::key::keyboard_f1; break; + case 68: keyInput = gale::key::keyboard_f2; break; + case 69: keyInput = gale::key::keyboard_f3; break; + case 70: keyInput = gale::key::keyboard_f4; break; + case 71: keyInput = gale::key::keyboard_f5; break; + case 72: keyInput = gale::key::keyboard_f6; break; + case 73: keyInput = gale::key::keyboard_f7; break; + case 74: keyInput = gale::key::keyboard_f8; break; + case 75: keyInput = gale::key::keyboard_f9; break; + case 76: keyInput = gale::key::keyboard_f10; break; + case 95: keyInput = gale::key::keyboard_f11; break; + case 96: keyInput = gale::key::keyboard_f12; break; + case 66: keyInput = gale::key::keyboard_capLock; m_guiKeyBoardMode.setCapsLock( (event.type == KeyPress) ? true : false); break; + case 50: keyInput = gale::key::keyboard_shiftLeft; m_guiKeyBoardMode.setShift ( (event.type == KeyPress) ? true : false); break; + case 62: keyInput = gale::key::keyboard_shiftRight; m_guiKeyBoardMode.setShift ( (event.type == KeyPress) ? true : false); break; + case 37: keyInput = gale::key::keyboard_ctrlLeft; m_guiKeyBoardMode.setCtrl ( (event.type == KeyPress) ? true : false); break; + case 105: keyInput = gale::key::keyboard_ctrlRight; m_guiKeyBoardMode.setCtrl ( (event.type == KeyPress) ? true : false); break; + case 133: keyInput = gale::key::keyboard_metaLeft; m_guiKeyBoardMode.setMeta ( (event.type == KeyPress) ? true : false); break; + case 134: keyInput = gale::key::keyboard_metaRight; m_guiKeyBoardMode.setMeta ( (event.type == KeyPress) ? true : false); break; + case 64: keyInput = gale::key::keyboard_alt; m_guiKeyBoardMode.setAlt ( (event.type == KeyPress) ? true : false); break; + case 108: keyInput = gale::key::keyboard_altGr; m_guiKeyBoardMode.setAltGr ( (event.type == KeyPress) ? true : false); break; + case 135: keyInput = gale::key::keyboard_contextMenu; break; + case 77: keyInput = gale::key::keyboard_numLock; m_guiKeyBoardMode.setNumLock ( (event.type == KeyPress) ? true : false); break; case 91: // Suppr on keypad find = false; if(m_guiKeyBoardMode.getNumLock() == true){ diff --git a/gale/event/Entry.cpp b/gale/event/Entry.cpp deleted file mode 100644 index 246160a..0000000 --- a/gale/event/Entry.cpp +++ /dev/null @@ -1,27 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license APACHE v2.0 (see license file) - */ - -#include - -#undef __class__ -#define __class__ "event::Entry" - -std::ostream& gale::event::operator <<(std::ostream& _os, const gale::event::Entry& _obj) { - _os << "{type=" << _obj.getType(); - _os << " status=" << _obj.getStatus(); - if (_obj.getType() == gale::key::keyboardChar) { - _os << " char=" << _obj.getChar(); - } - _os << "}"; - return _os; -} - -std::ostream& gale::event::operator <<(std::ostream& _os, const gale::event::EntrySystem& _obj) { - _os << _obj.m_event; - return _os; -} diff --git a/gale/event/Entry.h b/gale/event/Entry.h deleted file mode 100644 index 8201eec..0000000 --- a/gale/event/Entry.h +++ /dev/null @@ -1,77 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license APACHE v2.0 (see license file) - */ - -#ifndef __GALE_EVENT_ENTRY_H__ -#define __GALE_EVENT_ENTRY_H__ - -#include -#include - -namespace gale { - namespace event { - class Entry { - private: - enum gale::key::keyboard m_type; //!< type of hardware event - enum gale::key::status m_status; //!< status of hardware event - gale::key::Special m_specialKey; //!< input key status (prevent change in time..) - char32_t m_unicodeData; //!< Unicode data (in some case) - public: - Entry(enum gale::key::keyboard _type, - enum gale::key::status _status, - gale::key::Special _specialKey, - char32_t _char) : - m_type(_type), - m_status(_status), - m_specialKey(_specialKey), - m_unicodeData(_char) { - - }; - void setType(enum gale::key::keyboard _type) { - m_type = _type; - }; - inline const enum gale::key::keyboard& getType() const { - return m_type; - }; - void setStatus(enum gale::key::status _status) { - m_status = _status; - }; - inline const enum gale::key::status& getStatus() const { - return m_status; - }; - void setSpecialKey(const gale::key::Special& _specialKey) { - m_specialKey = _specialKey; - }; - inline const gale::key::Special& getSpecialKey() const { - return m_specialKey; - }; - void setChar(char32_t _char) { - m_unicodeData = _char; - }; - inline const char32_t& getChar() const { - return m_unicodeData; - }; - }; - std::ostream& operator <<(std::ostream& _os, const gale::event::Entry& _obj); - - class EntrySystem { - public: - EntrySystem(enum gale::key::keyboard _type, - enum gale::key::status _status, - gale::key::Special _specialKey, - char32_t _char) : - m_event(_type, _status, _specialKey, _char) { - - }; - gale::event::Entry m_event; - }; - std::ostream& operator <<(std::ostream& _os, const gale::event::EntrySystem& _obj); - }; -}; - -#endif - diff --git a/gale/event/Input.cpp b/gale/event/Input.cpp deleted file mode 100644 index 40eb194..0000000 --- a/gale/event/Input.cpp +++ /dev/null @@ -1,26 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license APACHE v2.0 (see license file) - */ - -#include - -#undef __class__ -#define __class__ "event::Input" - -std::ostream& gale::event::operator <<(std::ostream& _os, const gale::event::Input& _obj) { - _os << "{type=" << _obj.getType(); - _os << " status=" << _obj.getStatus(); - _os << " id=" << etk::to_string(_obj.getId()); - _os << " pos=" << _obj.getPos(); - _os << "}"; - return _os; -} - -std::ostream& gale::event::operator <<(std::ostream& _os, const gale::event::InputSystem& _obj) { - _os << _obj.m_event; - return _os; -} diff --git a/gale/event/Input.h b/gale/event/Input.h deleted file mode 100644 index b7d2127..0000000 --- a/gale/event/Input.h +++ /dev/null @@ -1,110 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license APACHE v2.0 (see license file) - */ - -#ifndef __GALE_EVENT_INPUT_H__ -#define __GALE_EVENT_INPUT_H__ - -#include - -namespace gale { - namespace event { - class Input { - private: - enum gale::key::type m_type; - enum gale::key::status m_status; - uint8_t m_inputId; - vec2 m_pos; - gale::key::Special m_specialKey; //!< input key status (prevent change in time..) - public: - Input(enum gale::key::type _type, - enum gale::key::status _status, - uint8_t _id, - const vec2& _pos, - gale::key::Special _specialKey): - m_type(_type), - m_status(_status), - m_inputId(_id), - m_pos(_pos), - m_specialKey(_specialKey) { - - }; - void setType(enum gale::key::type _type) { - m_type = _type; - }; - inline const enum gale::key::type& getType() const { - return m_type; - }; - void setStatus(enum gale::key::status _status) { - m_status = _status; - }; - inline const enum gale::key::status& getStatus() const { - return m_status; - }; - void setId(uint8_t _id) { - m_inputId = _id; - }; - inline const uint8_t& getId() const { - return m_inputId; - }; - void setPos(const vec2& _pos) { - m_pos = _pos; - }; - inline const vec2& getPos() const { - return m_pos; - }; - void setSpecialKey(const gale::key::Special& _specialKey) { - m_specialKey = _specialKey; - }; - inline const gale::key::Special& getSpecialKey() const { - return m_specialKey; - }; - /** - * @brief Reset the input property of the curent event. - */ - void reset() const { - // TODO : Call the entry element ant rest it ... - } - }; - std::ostream& operator <<(std::ostream& _os, const gale::event::Input& _obj); - - class InputSystem { - public: - InputSystem(enum gale::key::type _type, - enum gale::key::status _status, - uint8_t _id, - const vec2& _pos, - std::shared_ptr _dest, - int32_t _realIdEvent, - gale::key::Special _specialKey) : - m_event(_type, _status, _id, _pos, _specialKey), - m_dest(_dest), - m_realIdEvent(_realIdEvent) { }; - gale::event::Input m_event; - private: - std::shared_ptr m_dest; - int32_t m_realIdEvent; - public: - void setDestWidget(std::shared_ptr _dest) { - m_dest = _dest; - }; - inline std::shared_ptr getDestWidget() const { - return m_dest; - }; - void setRealId(int32_t _realIdEvent) { - m_realIdEvent = _realIdEvent; - }; - inline int32_t getRealId() const { - return m_realIdEvent; - }; - }; - std::ostream& operator <<(std::ostream& _os, const gale::event::InputSystem& _obj); - }; -}; - -#endif - diff --git a/gale/event/Time.cpp b/gale/event/Time.cpp deleted file mode 100644 index d9a4b90..0000000 --- a/gale/event/Time.cpp +++ /dev/null @@ -1,34 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license APACHE v2.0 (see license file) - */ - -#include - -#undef __class__ -#define __class__ "event::Time" - -std::ostream& gale::event::operator <<(std::ostream& _os, const gale::event::Time& _obj) { - _os << "{time=" << _obj.getTime(); - _os << " uptime=" << _obj.getApplUpTime(); - _os << " delta=" << _obj.getDelta(); - _os << " deltaCall=" << _obj.getDeltaCall(); - _os << "}"; - return _os; -} - -namespace etk { - template<> std::string to_string(gale::event::Time const& _obj) { - std::string out; - out = "{[gale::event::Time]time=" + etk::to_string(_obj.getTime()); - out += ";uptime=" + etk::to_string(_obj.getApplUpTime()); - out += ";delta=" + etk::to_string(_obj.getDelta()); - out += ";deltaCall=" + etk::to_string(_obj.getDeltaCall()); - out += "}"; - return out; - } -} - diff --git a/gale/event/Time.h b/gale/event/Time.h deleted file mode 100644 index 361453f..0000000 --- a/gale/event/Time.h +++ /dev/null @@ -1,67 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license APACHE v2.0 (see license file) - */ - -#ifndef __GALE_EVENT_CALL_TIME_H__ -#define __GALE_EVENT_CALL_TIME_H__ - -#include - -namespace gale { - namespace event { - class Time { - private: - int64_t m_timeSystem; //!< Current system time (micro-second) - int64_t m_timeUpAppl; //!< Current application wake up-time (micro-second) - float m_timeDelta; //!< Time from the last cycle call of the system (main appl tick) (second) - float m_timeDeltaCall; //!< Time from the last call (when we can manage periodic call with specifying periode) (second) - public: - Time(int64_t _timeSystem, - int64_t _timeUpAppl, - float _timeDelta, - float _timeDeltaCall) : - m_timeSystem(_timeSystem), - m_timeUpAppl(_timeUpAppl), - m_timeDelta(_timeDelta), - m_timeDeltaCall(_timeDeltaCall){ - - }; - public: - void setTime(int64_t _timeSystem) { - m_timeSystem=_timeSystem; - }; - inline int64_t getTime() const { - return m_timeSystem; - }; - void setApplWakeUpTime(int64_t _timeUpAppl) { - m_timeUpAppl=_timeUpAppl; - }; - inline int64_t getApplWakeUpTime() const { - return m_timeUpAppl; - }; - inline int64_t getApplUpTime() const { - return m_timeSystem-m_timeUpAppl; - }; - void setDelta(float _timeDelta) { - m_timeDelta=_timeDelta; - }; - inline float getDelta() const { - return m_timeDelta; - }; - void setDeltaCall(float _timeDeltaCall) { - m_timeDeltaCall=_timeDeltaCall; - }; - inline float getDeltaCall() const { - return m_timeDeltaCall; - }; - }; - std::ostream& operator <<(std::ostream& _os, const gale::event::Time& _obj); - }; -}; - -#endif - diff --git a/gale/gale.cpp b/gale/gale.cpp index 1657366..d4dd6d4 100644 --- a/gale/gale.cpp +++ b/gale/gale.cpp @@ -7,7 +7,6 @@ */ #include -#include #include #include diff --git a/gale/key/Special.cpp b/gale/key/Special.cpp index cbab39d..00f5b61 100644 --- a/gale/key/Special.cpp +++ b/gale/key/Special.cpp @@ -25,31 +25,31 @@ gale::key::Special::Special() : } void gale::key::Special::update(enum gale::key::keyboard _move, bool _isDown) { switch (_move) { - case keyboardInsert: + case keyboard_insert: setInsert(_isDown); break; - case keyboardCapLock: + case keyboard_capLock: setCapsLock(_isDown); break; - case keyboardShiftLeft: - case keyboardShiftRight: + case keyboard_shiftLeft: + case keyboard_shiftRight: setShift(_isDown); break; - case keyboardCtrlLeft: - case keyboardCtrlRight: + case keyboard_ctrlLeft: + case keyboard_ctrlRight: setCtrl(_isDown); break; - case keyboardMetaLeft: - case keyboardMetaRight: + case keyboard_metaLeft: + case keyboard_metaRight: setMeta(_isDown); break; - case keyboardAlt: + case keyboard_alt: setAlt(_isDown); break; - case keyboardAltGr: + case keyboard_altGr: setAltGr(_isDown); break; - case keyboardNumLock: + case keyboard_numLock: setNumLock(_isDown); break; default: diff --git a/gale/orientation.cpp b/gale/orientation.cpp index 25a5952..f350eef 100644 --- a/gale/orientation.cpp +++ b/gale/orientation.cpp @@ -6,6 +6,7 @@ * @license APACHE v2.0 (see license file) */ +#include #include static const char* listValues[] = { diff --git a/gale/renderer/openGL/openGL.cpp b/gale/renderer/openGL/openGL.cpp index bdc6688..2223da2 100644 --- a/gale/renderer/openGL/openGL.cpp +++ b/gale/renderer/openGL/openGL.cpp @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include //#define DIRECT_MODE diff --git a/gale/renderer/openGL/openGL.h b/gale/renderer/openGL/openGL.h index 184486b..e2c9923 100644 --- a/gale/renderer/openGL/openGL.h +++ b/gale/renderer/openGL/openGL.h @@ -183,6 +183,7 @@ namespace gale { * @brief disable Texture on the system * @param[in] flagID The flag requested */ + // TODO : rename Disable void desActiveTexture(uint32_t _flagID); /** * @brief draw a specific array == > this enable mode difference ... diff --git a/gale/resource/Manager.cpp b/gale/resource/Manager.cpp index d576773..6455bcf 100644 --- a/gale/resource/Manager.cpp +++ b/gale/resource/Manager.cpp @@ -9,9 +9,8 @@ #include #include #include -#include #include -#include +#include #include diff --git a/gale/resource/Program.h b/gale/resource/Program.h index 48b3903..00dc5aa 100644 --- a/gale/resource/Program.h +++ b/gale/resource/Program.h @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/gale/resource/Resource.cpp b/gale/resource/Resource.cpp index d1c799e..ace6609 100644 --- a/gale/resource/Resource.cpp +++ b/gale/resource/Resource.cpp @@ -14,14 +14,13 @@ #include -Resource() : +gale::Resource::Resource() : m_id(0), m_resourceHasBeenInit(false), m_resourceLevel(MAX_RESOURCE_LEVEL-1) { static size_t id = 0; m_id = id++; addResourceType("gale::Resource"); - setStatusResource(true); }; void gale::Resource::init() { @@ -33,6 +32,42 @@ void gale::Resource::init(const std::string& _name) { m_name = _name; } +const char * const gale::Resource::getObjectType() { + if (m_listType.size() == 0) { + return "gale::Resource"; + } + return m_listType.back(); +} + +void gale::Resource::addResourceType(const char* _type) { + if (_type == nullptr) { + GALE_ERROR(" try to add a type with no value..."); + return; + } + m_listType.push_back(_type); +} +std::string gale::Resource::getTypeDescription() { + std::string ret("gale::Resource"); + for(auto element : m_listType) { + ret += "|"; + ret += element; + } + return ret; +} + +bool gale::Resource::isTypeCompatible(const std::string& _type) { + if (_type == "gale::Resource") { + return true; + } + for(auto element : m_listType) { + if (_type == element) { + return true; + } + } + return false; +} + + void gale::Resource::updateContext() { GALE_DEBUG("Not set for : [" << getId() << "]" << getName() << " loaded " << shared_from_this().use_count() << " time(s)"); } diff --git a/gale/resource/Resource.h b/gale/resource/Resource.h index 036a6dc..d7dbc1a 100644 --- a/gale/resource/Resource.h +++ b/gale/resource/Resource.h @@ -19,7 +19,7 @@ #define DECLARE_RESOURCE_FACTORY(className) \ template static std::shared_ptr create( T&& ... all ) { \ - std::shared_ptr object(new className()); \ + std::shared_ptr resource(new className()); \ if (resource == nullptr) { \ GALE_ERROR("Factory resource error"); \ return nullptr; \ @@ -103,9 +103,6 @@ namespace gale { * :** ... */ class Resource : public std::enable_shared_from_this { - private: - size_t m_id; //!< unique ID definition - bool m_resourceHasBeenInit; //!< Know if the init function has bben called protected: /** * @brief generic protected contructor (use factory to create this class) @@ -123,9 +120,43 @@ namespace gale { virtual ~Resource() { }; + private: + size_t m_id; //!< unique ID definition + public: + size_t getId() { + return m_id; + } + private: + bool m_resourceHasBeenInit; //!< Know if the init function has bben called + public: bool resourceHasBeenCorectlyInit() { return m_resourceHasBeenInit; } + private: + std::vector m_listType; + public: + /** + * @brief get the current type of the Resource + * @return the last type name of the element + */ + const char* const getObjectType(); + /** + * @brief Get the herarchic of the Resource type. + * @return descriptive string. + */ + std::string getTypeDescription(); + /** + * @brief check if the element herited from a specific type + * @param[in] _type Type to check. + * @return true if the element is compatible. + */ + bool isTypeCompatible(const std::string& _type); + protected: + /** + * @brief Add a type of the list of Object. + * @param[in] _type new type to add. + */ + void addResourceType(const char* _type); protected: std::string m_name; //!< name of the resource ... public: diff --git a/gale/resource/Shader.h b/gale/resource/Shader.h index 6a3cde8..9f077e1 100644 --- a/gale/resource/Shader.h +++ b/gale/resource/Shader.h @@ -11,7 +11,7 @@ #include #include -#include +#include #include namespace gale { diff --git a/gale/resource/Texture.cpp b/gale/resource/Texture.cpp index 091ad61..9422730 100644 --- a/gale/resource/Texture.cpp +++ b/gale/resource/Texture.cpp @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include @@ -40,11 +40,14 @@ void gale::resource::Texture::init() { gale::Resource::init(); } -gale::resource::Texture::Texture() { +gale::resource::Texture::Texture() : + m_texId(0), + m_endPointSize(1,1), + m_loaded(false), + m_size(0,0), + m_dataType(gale::resource::Texture::dataType_int16), + m_dataColorSpace(gale::resource::Texture::color_mono) { addResourceType("gale::compositing::Texture"); - m_loaded = false; - m_texId = 0; - m_endPointSize.setValue(1.0,1.0); } gale::resource::Texture::~Texture() { @@ -68,16 +71,16 @@ void gale::resource::Texture::updateContext() { //--- Mode linear glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - GALE_INFO("TEXTURE: add [" << getId() << "]=" << m_data.getSize() << " OGl_Id=" < +#include +#include + +#include +#include + + +class MainApplication : public gale::Application { + public: + void onCreate(gale::Context& _context) { + setSize(vec2(800, 600)); + std::cout << "==> Init APPL (END)" << std::endl; + } + void onDraw(gale::Context& _context) { + std::cout << "Draw (start)" << std::endl; + + std::cout << "Draw (end)" << std::endl; + } +}; + +/** + * @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[]) { + return gale::run(new MainApplication(), _argc, _argv); +} + + diff --git a/sample/lutin_gale-sample-basic.py b/sample/lutin_gale-sample-basic.py new file mode 100644 index 0000000..e0924b1 --- /dev/null +++ b/sample/lutin_gale-sample-basic.py @@ -0,0 +1,20 @@ +#!/usr/bin/python +import lutin.module as module +import lutin.tools as tools + +def get_desc(): + return "Simple windows with gale" + +def create(target): + myModule = module.Module(__file__, 'gale-sample-basic', 'BINARY') + # add the file to compile: + myModule.add_src_file([ + 'basic.cpp' + ]) + # add dependency of gale + myModule.add_module_depend(['gale']) + return myModule + + + + diff --git a/sample/lutin_gale-sample-basic.pyc b/sample/lutin_gale-sample-basic.pyc new file mode 100644 index 0000000000000000000000000000000000000000..47154249c08e8100e714b2bcb67822117170b278 GIT binary patch literal 785 zcmbtRJx{|h5Ix5&q6JhKkQf*`W@)pqAQ0kXVjx2*1}db;#BNDRnkc@issvN{FZ@7$ z0Ngo15sZzJ^Yc63`MryL-)SG-zuhMA^?0&d+-V{ zY=D*yH2LtrZ%|?SK~MP8R1kH=O*!Wd@in16pg2hLGBe$II@QJ8(u$AWvC523IrtOo z32~!JvKYn383?h9xEoVO9?Lmo&~!n$72CY0fP55fyS@>z~|PX-J|$V1#S>~c^zIv zceX{amX?$y^4-ojSG!|*p=X(K@TP{WKaNLfX5tvPX`{4`ZIw6*`9db@Ix<w&5w?`{V9qHegF@7kkfUrA*Y8Ww5W6hQ2I8=@_Dh0j?h*!`S-tuT_zZc(UNEQ-vc gv(G4^1Vr3uCDWm`wX(v~TEiKS$FjVR=y)yp3G=