diff --git a/Sources/libagg b/Sources/libagg index 375af92e..7d902650 160000 --- a/Sources/libagg +++ b/Sources/libagg @@ -1 +1 @@ -Subproject commit 375af92e27d48c9d6678be26f11182477a36e77d +Subproject commit 7d902650c3195ccd5e6d71daf0d7aa1908fa0fab diff --git a/Sources/libewol/ewol/base/eSystemInput.cpp b/Sources/libewol/ewol/base/eSystemInput.cpp index 66a69c36..b752db04 100644 --- a/Sources/libewol/ewol/base/eSystemInput.cpp +++ b/Sources/libewol/ewol/base/eSystemInput.cpp @@ -45,13 +45,20 @@ #define EVENT_DEBUG EWOL_VERBOSE //#define EVENT_DEBUG EWOL_DEBUG -// defined by the platform specific file : -extern int32_t separateClickTime; -extern int32_t offsetMoveClicked; -extern int32_t offsetMoveClickedDouble; - - +void ewol::eSystemInput::CalculateLimit(void) +{ + m_eventInputLimit.sepatateTime = 300000; // µs + m_eventInputLimit.DpiOffset = m_dpi*100; + m_eventMouseLimit.sepatateTime = 30000; // µs + m_eventMouseLimit.DpiOffset = (float)m_dpi*(float)0.1; +} +void ewol::eSystemInput::SetDpi(int32_t newDPI) +{ + m_dpi = newDPI; + // recalculate the DPI system ... + CalculateLimit(); +} void ewol::eSystemInput::CleanElement(InputPoperty_ts *eventTable, int32_t idInput) { @@ -80,13 +87,13 @@ void ewol::eSystemInput::CleanElement(InputPoperty_ts *eventTable, int32_t idInp void ewol::eSystemInput::OnObjectRemove(ewol::EObject * removeObject) { for(int32_t iii=0; iii" << eventTable[pointerID].destinationInputId << " [DOWN] " << pos); if(true == eventTable[pointerID].isUsed) { // we have an event previously ... check delay between click and offset position - if (currentTime - eventTable[pointerID].lastTimeEvent > separateClickTime) { + if (currentTime - eventTable[pointerID].lastTimeEvent > localLimit.sepatateTime) { CleanElement(eventTable, pointerID); - } else if( abs(eventTable[pointerID].downStart.x - pos.x) >= offsetMoveClicked - || abs(eventTable[pointerID].downStart.y - pos.y) >= offsetMoveClicked ){ + } else if( abs(eventTable[pointerID].downStart.x - pos.x) >= localLimit.DpiOffset + || abs(eventTable[pointerID].downStart.y - pos.y) >= localLimit.DpiOffset ){ CleanElement(eventTable, pointerID); } } @@ -338,8 +349,8 @@ void ewol::eSystemInput::State(ewol::inputType_te type, int pointerID, bool isDo EVENT_DEBUG("GUI : Input ID=" << pointerID << "==>" << eventTable[pointerID].destinationInputId << " [UP] " << pos); localEventInput(type, eventTable[pointerID].curentWidgetEvent, pointerID, ewol::EVENT_INPUT_TYPE_UP, pos); // generate event (single) - if( abs(eventTable[pointerID].downStart.x - pos.x) < offsetMoveClicked - && abs(eventTable[pointerID].downStart.y - pos.y) < offsetMoveClicked ){ + if( abs(eventTable[pointerID].downStart.x - pos.x) < localLimit.DpiOffset + && abs(eventTable[pointerID].downStart.y - pos.y) < localLimit.DpiOffset ){ // Save current position : eventTable[pointerID].downStart = pos; // save start time diff --git a/Sources/libewol/ewol/base/eSystemInput.h b/Sources/libewol/ewol/base/eSystemInput.h index fcb4fd3e..42dc1fbe 100644 --- a/Sources/libewol/ewol/base/eSystemInput.h +++ b/Sources/libewol/ewol/base/eSystemInput.h @@ -46,13 +46,21 @@ namespace ewol int32_t nbClickEvent; // 0 .. 1 .. 2 .. 3 } InputPoperty_ts; + typedef struct { + int32_t sepatateTime; + int32_t DpiOffset; + } inputLimit_ts; class eSystemInput { private: + int32_t m_dpi; + inputLimit_ts m_eventInputLimit; + inputLimit_ts m_eventMouseLimit; + void CalculateLimit(void); #define MAX_MANAGE_INPUT (10) - InputPoperty_ts eventInputSaved[MAX_MANAGE_INPUT]; - InputPoperty_ts eventMouseSaved[MAX_MANAGE_INPUT]; + InputPoperty_ts m_eventInputSaved[MAX_MANAGE_INPUT]; + InputPoperty_ts m_eventMouseSaved[MAX_MANAGE_INPUT]; void CleanElement(InputPoperty_ts *eventTable, int32_t idInput); bool localEventInput(ewol::inputType_te type, ewol::Widget* destWidget, int32_t IdInput, ewol::eventInputType_te typeEvent, Vector2D pos); int32_t localGetDestinationId(ewol::inputType_te type, ewol::Widget* destWidget, int32_t realInputId); @@ -60,6 +68,7 @@ namespace ewol eSystemInput(void); ~eSystemInput(void); void Reset(void); + void SetDpi(int32_t newDPI); // note if id<0 ==> the it was finger event ... void Motion(ewol::inputType_te type, int pointerID, Vector2D pos ); diff --git a/Sources/libewol/ewol/base/gui.Android.cpp b/Sources/libewol/ewol/base/gui.Android.cpp index 82824351..9b40e330 100644 --- a/Sources/libewol/ewol/base/gui.Android.cpp +++ b/Sources/libewol/ewol/base/gui.Android.cpp @@ -42,9 +42,6 @@ #undef __class__ #define __class__ "AndroidJNI" -int32_t separateClickTime = 800000; -int32_t offsetMoveClicked = 40000; -int32_t offsetMoveClickedDouble = 300000; int64_t guiInterface::GetTime(void) { @@ -55,22 +52,6 @@ int64_t guiInterface::GetTime(void) } -void Draw(void); -#define OFFSET_MOVE_CLICKED (20) -#define OFFSET_MOVE_CLICKED_DOUBLE (40) -#undef SEPARATED_CLICK_TIME -#define SEPARATED_CLICK_TIME (300) - -//bool inputIsPressed[NB_MAX_INPUT];// = {false, false, false}; -int32_t m_previousBouttonId = -1; -int32_t m_previousDown_x = -1; -int32_t m_previousDown_y = -1; -int32_t m_previous_x = -1; -int32_t m_previous_y = -1; -int64_t m_previousTime = 0; -bool m_previousDouble = false; - - /** * @brief Set the new title of the windows * @param title New desired title @@ -150,7 +131,7 @@ void guiInterface::ClipBoardSet(ewol::clipBoard::clipboardListe_te clipboardID) void guiInterface::Stop(void) { - // TODo : send a message to the android system to stop ... + // TODO : send a message to the android system to stop ... } // java system to send message : diff --git a/Sources/libewol/ewol/base/gui.IOs.cpp b/Sources/libewol/ewol/base/gui.IOs.cpp index 145f9bd2..da56f32f 100644 --- a/Sources/libewol/ewol/base/gui.IOs.cpp +++ b/Sources/libewol/ewol/base/gui.IOs.cpp @@ -1,7 +1,7 @@ /** ******************************************************************************* - * @file guiIPhone.cpp - * @brief Gui abstraction layer (Sources) + * @file guiIOs.cpp + * @brief Gui abstraction layer for i-OS platform (Sources) * @author Edouard DUPIN * @date 20/10/2011 * @par Project @@ -22,25 +22,3 @@ ******************************************************************************* */ - -#include -#include - -#undef __class__ -#define __class__ "guiAbstraction" - -void guiAbstraction::Init(int32_t argc, char *argv[]) -{ - EWOL_INFO("INIT for IPhone environement"); -} - -void guiAbstraction::Run(void) -{ - EWOL_INFO("Start Running"); - EWOL_INFO("Stop Running"); -} - -void guiAbstraction::UnInit(void) -{ - EWOL_INFO("UN-INIT for IPhone environement"); -} diff --git a/Sources/libewol/ewol/base/gui.Windows.cpp b/Sources/libewol/ewol/base/gui.Windows.cpp index bdc268ad..f854baa9 100644 --- a/Sources/libewol/ewol/base/gui.Windows.cpp +++ b/Sources/libewol/ewol/base/gui.Windows.cpp @@ -46,11 +46,6 @@ int64_t guiInterface::GetTime(void) return (int64_t)((int64_t)now.tv_sec*(int64_t)1000000 + (int64_t)now.tv_usec); } - -int32_t separateClickTime = 300000; -int32_t offsetMoveClicked = 10000; -int32_t offsetMoveClickedDouble = 20000; - bool inputIsPressed[20]; static eSystem::specialKey_ts guiKeyBoardMode; @@ -134,6 +129,8 @@ void guiInterface::ChangePos(Vector2D pos) void guiInterface::GetAbsPos(Vector2D& pos) { // TODO : Later + size.x = 0; + size.y = 0; } @@ -249,8 +246,6 @@ int main(int argc, char *argv[]) guiKeyBoardMode.verNum = false; guiKeyBoardMode.insert = false; - // start X11 thread ... - // TODO : ... //start the basic thread : eSystem::Init(); // get the icon file : @@ -259,7 +254,7 @@ int main(int argc, char *argv[]) // Run ... Windows_Run(); - // close X11 : + // close windows system : guiInterface::Stop(); // uninit ALL : eSystem::UnInit(); diff --git a/Sources/libewol/ewol/base/gui.X11.cpp b/Sources/libewol/ewol/base/gui.X11.cpp index 9304bdcb..3d69bf63 100644 --- a/Sources/libewol/ewol/base/gui.X11.cpp +++ b/Sources/libewol/ewol/base/gui.X11.cpp @@ -120,10 +120,6 @@ XVisualInfo * m_visual = NULL; bool m_doubleBuffered = 0; bool m_run = 0; -int32_t separateClickTime = 300000; -int32_t offsetMoveClicked = 10000; -int32_t offsetMoveClickedDouble = 20000; - bool inputIsPressed[20]; // internal copy of the clipBoard ... diff --git a/Sources/libfreetype b/Sources/libfreetype index 01864817..a20f0bac 160000 --- a/Sources/libfreetype +++ b/Sources/libfreetype @@ -1 +1 @@ -Subproject commit 01864817805c5a43c937753e569ebb15be4f71a5 +Subproject commit a20f0bacb64194ead87f219acccbd0a1165a94f2 diff --git a/Sources/liblua b/Sources/liblua index fa4bf392..ff5881a5 160000 --- a/Sources/liblua +++ b/Sources/liblua @@ -1 +1 @@ -Subproject commit fa4bf3927867e835c7d14d56602f007b39517ad9 +Subproject commit ff5881a51a76141535a0e2e45c5d47bc1730b1df diff --git a/Sources/libogg b/Sources/libogg index 8fadc04e..ceb0a9a5 160000 --- a/Sources/libogg +++ b/Sources/libogg @@ -1 +1 @@ -Subproject commit 8fadc04e607fccf3550a200545ffc008cfe2f811 +Subproject commit ceb0a9a5b73231278bb59923b5477cb128c1d432 diff --git a/Sources/libparsersvg b/Sources/libparsersvg index 70c27fed..fc100697 160000 --- a/Sources/libparsersvg +++ b/Sources/libparsersvg @@ -1 +1 @@ -Subproject commit 70c27fedadc92931598f52d34903d76078fd5ae3 +Subproject commit fc100697e315ac17c7fc6e3e4afa9e24e945ef7b diff --git a/Sources/libpng b/Sources/libpng index c45bed13..29ed7179 160000 --- a/Sources/libpng +++ b/Sources/libpng @@ -1 +1 @@ -Subproject commit c45bed1333b3524fe62dfc2f093eeede80bd4477 +Subproject commit 29ed717922c583f058908cfabf9afa142c542b92 diff --git a/Sources/libportaudio b/Sources/libportaudio index e1b5eb98..f00eaf59 160000 --- a/Sources/libportaudio +++ b/Sources/libportaudio @@ -1 +1 @@ -Subproject commit e1b5eb9833c6e0e40e7cf9d022d14e0bc7645192 +Subproject commit f00eaf59fd2b77170831ac0cfa66ec6aabd8abfc diff --git a/Sources/libzip b/Sources/libzip index 2e64a66b..bc39bbab 160000 --- a/Sources/libzip +++ b/Sources/libzip @@ -1 +1 @@ -Subproject commit 2e64a66b5f269c15cc2381d921419da68e1f5f3f +Subproject commit bc39bbab0164b41379e7c1104bcda5a894b45db1