From db7b31dc6179d4bcbc275ed4d6917f7c2b64a272 Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Fri, 14 Sep 2012 17:22:39 +0200 Subject: [PATCH] Upgrade display distance fiead --- Build | 2 +- Sources/libagg | 2 +- Sources/libewol/Android.mk | 25 ++- Sources/libewol/Config.in | 2 +- Sources/libewol/ewol/ewol.cpp | 4 + Sources/libewol/ewol/ewol.h | 6 + .../libewol/ewol/font/DistantFieldFont.cpp | 3 +- Sources/libewol/ewol/os/eSystem.cpp | 7 + ...stractionBase.cpp => gui.Android.base.cpp} | 177 ++++++++++++++++-- Sources/libewol/ewol/os/gui.Android.cpp | 168 ----------------- Sources/libewol/ewol/os/gui.Windows.cpp | 9 + Sources/libewol/ewol/os/gui.X11.cpp | 9 + Sources/libewol/ewol/os/gui.h | 6 + Sources/libewol/ewol/widget/Widget.cpp | 2 +- Sources/libglew/glew | 2 +- 15 files changed, 222 insertions(+), 202 deletions(-) rename Sources/libewol/ewol/os/{AndroidAbstractionBase.cpp => gui.Android.base.cpp} (78%) delete mode 100644 Sources/libewol/ewol/os/gui.Android.cpp diff --git a/Build b/Build index f0785e65..a4271596 160000 --- a/Build +++ b/Build @@ -1 +1 @@ -Subproject commit f0785e65dcabf471d1a60282522738ff2ff00903 +Subproject commit a42715960bdb78614c78830517b112cb88cd3627 diff --git a/Sources/libagg b/Sources/libagg index b3f1a97a..4c16ddcb 160000 --- a/Sources/libagg +++ b/Sources/libagg @@ -1 +1 @@ -Subproject commit b3f1a97a28cce551e8685216a68e77a68904dde5 +Subproject commit 4c16ddcbd7f37fc84a663484a1a7388188ceaa79 diff --git a/Sources/libewol/Android.mk b/Sources/libewol/Android.mk index 9a0201ae..8194ee7f 100644 --- a/Sources/libewol/Android.mk +++ b/Sources/libewol/Android.mk @@ -32,18 +32,23 @@ endif LOCAL_EXPORT_LDLIBS += -ldl -llog -FILE_ABSTRACTION:=$(LOCAL_PATH)/ewol/os/AndroidAbstractionBase.cpp -FILE_ABSTRACTION_DEST:=ewol/os/AndroidAbstraction.cpp +FILE_ABSTRACTION:=$(LOCAL_PATH)/ewol/os/gui.Android.base.cpp +FILE_ABSTRACTION_DEST:=ewol/os/gui.Android.cpp EWOL_TMP_PATH:=$(LOCAL_PATH) -$(FILE_ABSTRACTION_DEST): $(FILE_ABSTRACTION) - @mkdir -p $(dir $(EWOL_TMP_PATH)/$@) - @cp -f $(FILE_ABSTRACTION) $(EWOL_TMP_PATH)/$@ - @sed -i "s|__PROJECT_ORG_TYPE__|$(call convert-special-char,$(CONFIG___EWOL_APPL_ORGANISATION_TYPE__))|" $(EWOL_TMP_PATH)/$@ - @sed -i "s|__PROJECT_VENDOR__|$(call convert-special-char,$(CONFIG___EWOL_APPL_COMPAGNY__))|" $(EWOL_TMP_PATH)/$@ - @sed -i "s|__PROJECT_NAME__|$(call convert-special-char,$(CONFIG___EWOL_APPL_NAME__))|" $(EWOL_TMP_PATH)/$@ - @sed -i "s|__PROJECT_PACKAGE__|$(call convert-special-char,$(CONFIG___EWOL_APPL_NAME__))|" $(EWOL_TMP_PATH)/$@ +$(shell rm $(FILE_ABSTRACTION_DEST) $(LOCAL_PATH)/$(FILE_ABSTRACTION_DEST)) + +$(LOCAL_PATH)/$(FILE_ABSTRACTION_DEST): $(FILE_ABSTRACTION) + $(Q)mkdir -p $(dir $@) + $(Q)cp -f $(FILE_ABSTRACTION) $@ + $(Q)sed -i "s|__PROJECT_ORG_TYPE__|$(subst _,$(empty),$(call convert-special-char,$(CONFIG___EWOL_APPL_ORGANISATION_TYPE__)))|" $@ + $(Q)sed -i "s|__PROJECT_VENDOR__|$(subst _,$(empty),$(call convert-special-char,$(CONFIG___EWOL_APPL_COMPAGNY__)))|" $@ + $(Q)sed -i "s|__PROJECT_NAME__|$(subst _,$(empty),$(call convert-special-char,$(CONFIG___EWOL_APPL_NAME__)))|" $@ + $(Q)sed -i "s|__PROJECT_PACKAGE__|$(subst _,$(empty),$(call convert-special-char,$(CONFIG___EWOL_APPL_NAME__)))|" $@ + +$(FILE_ABSTRACTION_DEST): $(LOCAL_PATH)/$(FILE_ABSTRACTION_DEST) + # this is the abstraction file for Android @@ -52,7 +57,7 @@ LOCAL_PREREQUISITES := $(FILE_ABSTRACTION_DEST) # load the common sources file of the platform include $(LOCAL_PATH)/file.mk -LOCAL_SRC_FILES := ewol/os/gui.Android.cpp $(FILE_ABSTRACTION_DEST) $(FILE_LIST) +LOCAL_SRC_FILES := ewol/os/gui.Android.cpp $(FILE_LIST) include $(BUILD_STATIC_LIBRARY) diff --git a/Sources/libewol/Config.in b/Sources/libewol/Config.in index 6c19413c..b089907f 100644 --- a/Sources/libewol/Config.in +++ b/Sources/libewol/Config.in @@ -15,7 +15,7 @@ menu "General" config __EWOL_APPL_NAME__ prompt "Application Name" string - default "Ewol" + default "Ewol__" help This is the application name diff --git a/Sources/libewol/ewol/ewol.cpp b/Sources/libewol/ewol/ewol.cpp index d5af9dd7..d51fe8bf 100644 --- a/Sources/libewol/ewol/ewol.cpp +++ b/Sources/libewol/ewol/ewol.cpp @@ -168,6 +168,10 @@ void ewol::InputEventTransfertWidget(ewol::Widget* source, ewol::Widget* destina eSystem::InputEventTransfertWidget(source, destination); } +void ewol::ForceOrientation(ewol::orientation_te orientation) +{ + guiInterface::ForceOrientation(orientation); +} // ------------------------------------------------------------------------ diff --git a/Sources/libewol/ewol/ewol.h b/Sources/libewol/ewol/ewol.h index b5accb1e..c809b2e4 100644 --- a/Sources/libewol/ewol/ewol.h +++ b/Sources/libewol/ewol/ewol.h @@ -83,6 +83,12 @@ namespace ewol { * @return --- */ void InputEventTransfertWidget(ewol::Widget* source, ewol::Widget* destination); + typedef enum { + SCREEN_ORIENTATION_AUTO = 0, + SCREEN_ORIENTATION_LANDSCAPE, + SCREEN_ORIENTATION_PORTRAIT, + } orientation_te; + void ForceOrientation(ewol::orientation_te orientation); }; #else diff --git a/Sources/libewol/ewol/font/DistantFieldFont.cpp b/Sources/libewol/ewol/font/DistantFieldFont.cpp index 08d15220..366e825a 100644 --- a/Sources/libewol/ewol/font/DistantFieldFont.cpp +++ b/Sources/libewol/ewol/font/DistantFieldFont.cpp @@ -179,7 +179,7 @@ ewol::DistantFieldFont::DistantFieldFont(etk::UString fontName) : EWOL_DEBUG(" m_advance =" << m_listElement[iii].property.m_advance ); */ // generate the distance field from this element ... - tmpUpScaledImage.DistanceField(Vector2D(0,0), m_listElement[iii].property.m_sizeTexture*Vector2D(SPECIAL_UPSCALER,SPECIAL_UPSCALER)+Vector2D(2*SPECIAL_BORDER*SPECIAL_UPSCALER,2*SPECIAL_BORDER*SPECIAL_UPSCALER)); + tmpUpScaledImage.DistanceField(Vector2D(0,0), m_listElement[iii].property.m_sizeTexture*Vector2D(SPECIAL_UPSCALER,SPECIAL_UPSCALER)+Vector2D(2*SPECIAL_BORDER*SPECIAL_UPSCALER,2*SPECIAL_BORDER*SPECIAL_UPSCALER), SPECIAL_UPSCALER, SPECIAL_UPSCALER/2); // copy data with downscaling : (subSampling) Vector2D tmpPos(0,0); for (tmpPos.y = 0; tmpPos.y Ewol System Init (END)"); } diff --git a/Sources/libewol/ewol/os/AndroidAbstractionBase.cpp b/Sources/libewol/ewol/os/gui.Android.base.cpp similarity index 78% rename from Sources/libewol/ewol/os/AndroidAbstractionBase.cpp rename to Sources/libewol/ewol/os/gui.Android.base.cpp index da083803..2fb946c2 100644 --- a/Sources/libewol/ewol/os/AndroidAbstractionBase.cpp +++ b/Sources/libewol/ewol/os/gui.Android.base.cpp @@ -30,6 +30,7 @@ #include #include #include +#include // get a resources from the java environement : static JNIEnv* JavaVirtualMachinePointer = NULL; // the JVM @@ -97,13 +98,14 @@ void SendJava_KeyboardShow(bool showIt) JavaVirtualMachinePointer->ExceptionDescribe(); JavaVirtualMachinePointer->ExceptionClear(); } - - // Finished with the JVM. - g_JavaVM->DetachCurrentThread(); + if (status == JNI_EDETACHED) { + // Finished with the JVM. + g_JavaVM->DetachCurrentThread(); + } } - -void SendJava_OrientationChange(bool showIt) +// mode 0 : auto; 1 landscape, 2 portrait +void SendJava_OrientationChange(int32_t mode) { EWOL_DEBUG("C->java : call java"); if (NULL == g_JavaVM) { @@ -139,8 +141,10 @@ void SendJava_OrientationChange(bool showIt) return; } + jint param = mode; + //Call java ... - JavaVirtualMachinePointer->CallVoidMethod(javaObjectActivity, javaClassActivityEntryPoint__CPP_OrientationChange); + JavaVirtualMachinePointer->CallVoidMethod(javaObjectActivity, javaClassActivityEntryPoint__CPP_OrientationChange, param); // manage execption : if (JavaVirtualMachinePointer->ExceptionOccurred()) { @@ -149,8 +153,10 @@ void SendJava_OrientationChange(bool showIt) JavaVirtualMachinePointer->ExceptionClear(); } - // Finished with the JVM. - g_JavaVM->DetachCurrentThread(); + if (status == JNI_EDETACHED) { + // Finished with the JVM. + g_JavaVM->DetachCurrentThread(); + } } @@ -208,9 +214,10 @@ void SendSystemMessage(const char * dataString) JavaVirtualMachinePointer->ExceptionDescribe(); JavaVirtualMachinePointer->ExceptionClear(); } - - // Finished with the JVM. - g_JavaVM->DetachCurrentThread(); + if (status == JNI_EDETACHED) { + // Finished with the JVM. + g_JavaVM->DetachCurrentThread(); + } } namespace guiAbstraction { @@ -257,9 +264,10 @@ extern "C" JavaVirtualMachinePointer = env; // get default needed all time elements : if (NULL != JavaVirtualMachinePointer) { + EWOL_DEBUG("C->java : try load __PROJECT_ORG_TYPE__/__PROJECT_VENDOR__/__PROJECT_PACKAGE__/__PROJECT_NAME__ class"); javaClassActivity = JavaVirtualMachinePointer->FindClass("__PROJECT_ORG_TYPE__/__PROJECT_VENDOR__/__PROJECT_PACKAGE__/__PROJECT_NAME__" ); if (javaClassActivity == 0) { - EWOL_DEBUG("C->java : Can't find __PROJECT_ORG_TYPE__/__PROJECT_VENDOR__/__PROJECT_PACKAGE__/__PROJECT_NAME__ class"); + EWOL_ERROR("C->java : Can't find __PROJECT_ORG_TYPE__/__PROJECT_VENDOR__/__PROJECT_PACKAGE__/__PROJECT_NAME__ class"); // remove access on the virtual machine : JavaVirtualMachinePointer = NULL; return; @@ -267,28 +275,28 @@ extern "C" // get the activity object : javaClassActivityEntryPoint = JavaVirtualMachinePointer->GetStaticMethodID(javaClassActivity, "eventFromCPP", "([Ljava/lang/String;)V" ); if (javaClassActivityEntryPoint == 0) { - EWOL_DEBUG("C->java : Can't find __PROJECT_ORG_TYPE__/__PROJECT_VENDOR__/__PROJECT_PACKAGE__/__PROJECT_NAME__.eventFromCPP" ); + EWOL_ERROR("C->java : Can't find __PROJECT_ORG_TYPE__/__PROJECT_VENDOR__/__PROJECT_PACKAGE__/__PROJECT_NAME__.eventFromCPP" ); // remove access on the virtual machine : JavaVirtualMachinePointer = NULL; return; } javaClassActivityEntryPoint__CPP_keyboardShow = JavaVirtualMachinePointer->GetMethodID(javaClassActivity, "CPP_keyboardShow", "()V" ); if (javaClassActivityEntryPoint__CPP_keyboardShow == 0) { - EWOL_DEBUG("C->java : Can't find __PROJECT_ORG_TYPE__/__PROJECT_VENDOR__/__PROJECT_PACKAGE__/__PROJECT_NAME__.CPP_keyboardShow" ); + EWOL_ERROR("C->java : Can't find __PROJECT_ORG_TYPE__/__PROJECT_VENDOR__/__PROJECT_PACKAGE__/__PROJECT_NAME__.CPP_keyboardShow" ); // remove access on the virtual machine : JavaVirtualMachinePointer = NULL; return; } javaClassActivityEntryPoint__CPP_keyboardHide = JavaVirtualMachinePointer->GetMethodID(javaClassActivity, "CPP_keyboardHide", "()V" ); if (javaClassActivityEntryPoint__CPP_keyboardHide == 0) { - EWOL_DEBUG("C->java : Can't find __PROJECT_ORG_TYPE__/__PROJECT_VENDOR__/__PROJECT_PACKAGE__/__PROJECT_NAME__.CPP_keyboardHide" ); + EWOL_ERROR("C->java : Can't find __PROJECT_ORG_TYPE__/__PROJECT_VENDOR__/__PROJECT_PACKAGE__/__PROJECT_NAME__.CPP_keyboardHide" ); // remove access on the virtual machine : JavaVirtualMachinePointer = NULL; return; } javaClassActivityEntryPoint__CPP_OrientationChange = JavaVirtualMachinePointer->GetMethodID(javaClassActivity, "CPP_OrientationChange", "(I)V" ); if (javaClassActivityEntryPoint__CPP_OrientationChange == 0) { - EWOL_DEBUG("C->java : Can't find __PROJECT_ORG_TYPE__/__PROJECT_VENDOR__/__PROJECT_PACKAGE__/__PROJECT_NAME__.CPP_OrientationChange" ); + EWOL_ERROR("C->java : Can't find __PROJECT_ORG_TYPE__/__PROJECT_VENDOR__/__PROJECT_PACKAGE__/__PROJECT_NAME__.CPP_OrientationChange" ); // remove access on the virtual machine : JavaVirtualMachinePointer = NULL; return; @@ -299,7 +307,7 @@ extern "C" javaDefaultClassString = JavaVirtualMachinePointer->FindClass("java/lang/String" ); if (javaDefaultClassString == 0) { - EWOL_DEBUG("C->java : Can't find java/lang/String" ); + EWOL_ERROR("C->java : Can't find java/lang/String" ); // remove access on the virtual machine : JavaVirtualMachinePointer = NULL; return; @@ -489,3 +497,138 @@ extern "C" }; + +#undef __class__ +#define __class__ "guiInterface" + + + +int64_t guiInterface::GetTime(void) +{ + struct timeval now; + gettimeofday(&now, NULL); + //EWOL_VERBOSE("current time : " << now.tv_sec << "s " << now.tv_usec << "us"); + return (int64_t)((int64_t)now.tv_sec*(int64_t)1000000 + (int64_t)now.tv_usec); +} + + +/** + * @brief Set the new title of the windows + * @param title New desired title + * @return --- + */ +void guiInterface::SetTitle(etk::UString& title) +{ + // can not set the title in Android ... +} + + +// ------------------------------------------------------------------------- +// ClipBoard AREA : +// ------------------------------------------------------------------------- + +bool l_clipBoardOwnerStd = false; +/** + * @brief Inform the Gui that we want to have a copy of the clipboard + * @param ID of the clipboard (STD/SELECTION) only apear here + * @return --- + */ +void guiInterface::ClipBoardGet(ewol::clipBoard::clipboardListe_te clipboardID) +{ + // this is to force the local system to think we have the buffer + // TODO : Remove this 2 Line when code will be writen + l_clipBoardOwnerStd = true; + switch (clipboardID) + { + case ewol::clipBoard::CLIPBOARD_SELECTION: + // NOTE : Windows does not support the middle button the we do it internaly + // just transmit an event , we have the data in the system + eSystem::ClipBoardArrive(clipboardID); + break; + case ewol::clipBoard::CLIPBOARD_STD: + if (false == l_clipBoardOwnerStd) { + // Generate a request TO the OS + // TODO : Send the message to the OS "We disire to receive the copy buffer ... + } else { + // just transmit an event , we have the data in the system + eSystem::ClipBoardArrive(clipboardID); + } + break; + default: + EWOL_ERROR("Request an unknow ClipBoard ..."); + break; + } +} + +/** + * @brief Inform the Gui that we are the new owner of the clipboard + * @param ID of the clipboard (STD/SELECTION) only apear here + * @return --- + */ +void guiInterface::ClipBoardSet(ewol::clipBoard::clipboardListe_te clipboardID) +{ + switch (clipboardID) + { + case ewol::clipBoard::CLIPBOARD_SELECTION: + // NOTE : nothing to do : Windows deas ot supported Middle button + break; + case ewol::clipBoard::CLIPBOARD_STD: + // Request the clipBoard : + if (false == l_clipBoardOwnerStd) { + // TODO : Inform the OS that we have the current buffer of copy ... + l_clipBoardOwnerStd = true; + } + break; + default: + EWOL_ERROR("Request an unknow ClipBoard ..."); + break; + } +} + + +void guiInterface::Stop(void) +{ + // TODO : send a message to the android system to stop ... +} + +// java system to send message : +void SendSystemMessage(const char * dataString); +void SendJava_KeyboardShow(bool showIt); + +void guiInterface::KeyboardShow(void) +{ + // send a message at the java : + SendJava_KeyboardShow(true); +} + +void guiInterface::KeyboardHide(void) +{ + // send a message at the java : + SendJava_KeyboardShow(false); +} + +void guiInterface::ChangeSize(Vector2D size) +{ + // The size can not be change on android platform +} + +void guiInterface::ChangePos(Vector2D size) +{ + // The position can not be change on Android platform +} + +void guiInterface::GetAbsPos(Vector2D& size) +{ + size.x = 0; + size.y = 0; +} + +/** + * @brief Force the screen orientation (availlable on portable elements ... + * @param orientation Selected orientation. + * @return --- + */ +void guiInterface::ForceOrientation(ewol::orientation_te orientation) +{ + SendJava_OrientationChange((int32_t)orientation); +} diff --git a/Sources/libewol/ewol/os/gui.Android.cpp b/Sources/libewol/ewol/os/gui.Android.cpp deleted file mode 100644 index 21c425c1..00000000 --- a/Sources/libewol/ewol/os/gui.Android.cpp +++ /dev/null @@ -1,168 +0,0 @@ -/** - ******************************************************************************* - * @file guiAndroid.cpp - * @brief Gui abstraction layer (Sources) - * @author Edouard DUPIN - * @date 20/10/2011 - * @par Project - * ewol - * - * @par Copyright - * Copyright 2011 Edouard DUPIN, all right reserved - * - * This software is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY. - * - * Licence summary : - * You can modify and redistribute the sources code and binaries. - * You can send me the bug-fix - * - * Term of the licence in in the file licence.txt. - * - ******************************************************************************* - */ - - - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include - -#undef __class__ -#define __class__ "AndroidJNI" - -int64_t guiInterface::GetTime(void) -{ - struct timeval now; - gettimeofday(&now, NULL); - //EWOL_VERBOSE("current time : " << now.tv_sec << "s " << now.tv_usec << "us"); - return (int64_t)((int64_t)now.tv_sec*(int64_t)1000000 + (int64_t)now.tv_usec); -} - - -/** - * @brief Set the new title of the windows - * @param title New desired title - * @return --- - */ -void guiInterface::SetTitle(etk::UString& title) -{ - // can not set the title in Android ... -} - - -// ------------------------------------------------------------------------- -// ClipBoard AREA : -// ------------------------------------------------------------------------- - -bool l_clipBoardOwnerStd = false; -/** - * @brief Inform the Gui that we want to have a copy of the clipboard - * @param ID of the clipboard (STD/SELECTION) only apear here - * @return --- - */ -void guiInterface::ClipBoardGet(ewol::clipBoard::clipboardListe_te clipboardID) -{ - // this is to force the local system to think we have the buffer - // TODO : Remove this 2 Line when code will be writen - l_clipBoardOwnerStd = true; - switch (clipboardID) - { - case ewol::clipBoard::CLIPBOARD_SELECTION: - // NOTE : Windows does not support the middle button the we do it internaly - // just transmit an event , we have the data in the system - eSystem::ClipBoardArrive(clipboardID); - break; - case ewol::clipBoard::CLIPBOARD_STD: - if (false == l_clipBoardOwnerStd) { - // Generate a request TO the OS - // TODO : Send the message to the OS "We disire to receive the copy buffer ... - } else { - // just transmit an event , we have the data in the system - eSystem::ClipBoardArrive(clipboardID); - } - break; - default: - EWOL_ERROR("Request an unknow ClipBoard ..."); - break; - } -} - -/** - * @brief Inform the Gui that we are the new owner of the clipboard - * @param ID of the clipboard (STD/SELECTION) only apear here - * @return --- - */ -void guiInterface::ClipBoardSet(ewol::clipBoard::clipboardListe_te clipboardID) -{ - switch (clipboardID) - { - case ewol::clipBoard::CLIPBOARD_SELECTION: - // NOTE : nothing to do : Windows deas ot supported Middle button - break; - case ewol::clipBoard::CLIPBOARD_STD: - // Request the clipBoard : - if (false == l_clipBoardOwnerStd) { - // TODO : Inform the OS that we have the current buffer of copy ... - l_clipBoardOwnerStd = true; - } - break; - default: - EWOL_ERROR("Request an unknow ClipBoard ..."); - break; - } -} - - -#undef __class__ -#define __class__ "guiInterface" - -void guiInterface::Stop(void) -{ - // TODO : send a message to the android system to stop ... -} - -// java system to send message : -void SendSystemMessage(const char * dataString); -void SendJava_KeyboardShow(bool showIt); - -void guiInterface::KeyboardShow(void) -{ - // send a message at the java : - SendJava_KeyboardShow(true); -} - -void guiInterface::KeyboardHide(void) -{ - // send a message at the java : - SendJava_KeyboardShow(false); -} - -void guiInterface::ChangeSize(Vector2D size) -{ - // The size can not be change on android platform -} - -void guiInterface::ChangePos(Vector2D size) -{ - // The position can not be change on Android platform -} - -void guiInterface::GetAbsPos(Vector2D& size) -{ - size.x = 0; - size.y = 0; -} - diff --git a/Sources/libewol/ewol/os/gui.Windows.cpp b/Sources/libewol/ewol/os/gui.Windows.cpp index b8ebe811..661824c8 100644 --- a/Sources/libewol/ewol/os/gui.Windows.cpp +++ b/Sources/libewol/ewol/os/gui.Windows.cpp @@ -620,3 +620,12 @@ void DisableOpenGL(HWND hWnd, HDC hDC, HGLRC hRC) ReleaseDC( hWnd, hDC ); } +/** + * @brief Force the screen orientation (availlable on portable elements ... + * @param orientation Selected orientation. + * @return --- + */ +void guiInterface::ForceOrientation(ewol::orientation_te orientation) +{ + // nothing to do ... +} diff --git a/Sources/libewol/ewol/os/gui.X11.cpp b/Sources/libewol/ewol/os/gui.X11.cpp index d8756e84..d3ad221d 100644 --- a/Sources/libewol/ewol/os/gui.X11.cpp +++ b/Sources/libewol/ewol/os/gui.X11.cpp @@ -1188,3 +1188,12 @@ int main(int argc, char *argv[]) return 0; } +/** + * @brief Force the screen orientation (availlable on portable elements ... + * @param orientation Selected orientation. + * @return --- + */ +void guiInterface::ForceOrientation(ewol::orientation_te orientation) +{ + // nothing to do ... +} diff --git a/Sources/libewol/ewol/os/gui.h b/Sources/libewol/ewol/os/gui.h index 88748150..3853cab9 100644 --- a/Sources/libewol/ewol/os/gui.h +++ b/Sources/libewol/ewol/os/gui.h @@ -95,6 +95,12 @@ namespace guiInterface * @return --- */ void SetTitle(etk::UString& title); + /** + * @brief Force the screen orientation (availlable on portable elements ... + * @param orientation Selected orientation. + * @return --- + */ + void ForceOrientation(ewol::orientation_te orientation); }; diff --git a/Sources/libewol/ewol/widget/Widget.cpp b/Sources/libewol/ewol/widget/Widget.cpp index 2e7e8e90..3317dc97 100644 --- a/Sources/libewol/ewol/widget/Widget.cpp +++ b/Sources/libewol/ewol/widget/Widget.cpp @@ -250,7 +250,7 @@ void ewol::Widget::GenDraw(DrawProperty displayProp) m_size.y); #ifdef __VIDEO__OPENGL_ES_2 etk::Matrix tmpTranslate = etk::matrix::Translate(-tmpclipX/2 - (tmpOriginX-m_origin.x), -m_size.y/2, -1.0); - etk::Matrix tmpScale = etk::matrix::Scale(m_zoom, m_zoom, 1.0); + etk::Matrix tmpScale = etk::matrix::Scale(m_zoom, m_zoom, 1.0); etk::Matrix tmpProjection = etk::matrix::Perspective(-tmpclipX/2, tmpclipX/2, -m_size.y/2, m_size.y/2, -1, 1); etk::Matrix tmpMat = tmpProjection * tmpScale * tmpTranslate; // set internal matrix system : diff --git a/Sources/libglew/glew b/Sources/libglew/glew index 76748293..471ea3cb 160000 --- a/Sources/libglew/glew +++ b/Sources/libglew/glew @@ -1 +1 @@ -Subproject commit 76748293c2611769297c2c97ed96dde8368bbbf0 +Subproject commit 471ea3cba3bf82e9b9351ea18b6744b06558082d