new event and try to find the tablette error
This commit is contained in:
parent
d0f57d33a7
commit
4b3456b28c
@ -11,6 +11,7 @@ import android.content.Context;
|
|||||||
import android.opengl.GLSurfaceView;
|
import android.opengl.GLSurfaceView;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
|
import android.view.KeyEvent;
|
||||||
// For No Title :
|
// For No Title :
|
||||||
import android.view.Window;
|
import android.view.Window;
|
||||||
|
|
||||||
@ -154,6 +155,11 @@ class EwolGLSurfaceView extends GLSurfaceView {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean onKeyDown (int keyCode, KeyEvent event){
|
||||||
|
nativeEventUnknow(156);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
EwolRenderer mRenderer;
|
EwolRenderer mRenderer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,13 +62,13 @@ void TOOLS_DisplayTime(void)
|
|||||||
#ifdef __PLATFORM__Android
|
#ifdef __PLATFORM__Android
|
||||||
struct timeval now;
|
struct timeval now;
|
||||||
gettimeofday(&now, NULL);
|
gettimeofday(&now, NULL);
|
||||||
sprintf(tmpdata, " %2dh %2dmin %2ds | ", (int32_t)(now.tv_sec/3600), (int32_t)(now.tv_sec/60)%60, (int32_t)(now.tv_sec%60));
|
sprintf(tmpdata, " %2dh %2dmin %2ds | ", (int32_t)(now.tv_sec/3600)%24, (int32_t)(now.tv_sec/60)%60, (int32_t)(now.tv_sec%60));
|
||||||
#else
|
#else
|
||||||
time_t rawtime;
|
time_t rawtime;
|
||||||
struct tm * timeinfo;
|
struct tm * timeinfo;
|
||||||
time(&rawtime);
|
time(&rawtime);
|
||||||
timeinfo = localtime(&rawtime);
|
timeinfo = localtime(&rawtime);
|
||||||
sprintf(tmpdata, " %2dh %2dmin %2ds | ", timeinfo->tm_hour, timeinfo->tm_min, timeinfo->tm_sec);
|
sprintf(tmpdata, " %2dh %2dmin %2ds | ", (timeinfo->tm_hour)%24, timeinfo->tm_min, timeinfo->tm_sec);
|
||||||
#endif
|
#endif
|
||||||
etk::cout << tmpdata ;
|
etk::cout << tmpdata ;
|
||||||
}
|
}
|
||||||
|
@ -28,9 +28,9 @@
|
|||||||
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <typeinfo>
|
#include <typeinfo>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
#if defined(__PLATFORM__Android)
|
#if defined(__PLATFORM__Android)
|
||||||
# include <string.h>
|
|
||||||
# include <android/log.h>
|
# include <android/log.h>
|
||||||
# define LOGI(...) ((void)__android_log_print(ANDROID_LOG_INFO, "====> EWOL", __VA_ARGS__))
|
# define LOGI(...) ((void)__android_log_print(ANDROID_LOG_INFO, "====> EWOL", __VA_ARGS__))
|
||||||
# define LOGW(...) ((void)__android_log_print(ANDROID_LOG_WARN, "====> EWOL", __VA_ARGS__))
|
# define LOGW(...) ((void)__android_log_print(ANDROID_LOG_WARN, "====> EWOL", __VA_ARGS__))
|
||||||
@ -38,7 +38,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define MAX_LOG_SIZE (16000)
|
#define MAX_LOG_SIZE (16000)
|
||||||
#define MAX_LOG_SIZE_TMP (16000)
|
#define MAX_LOG_SIZE_TMP (512)
|
||||||
|
|
||||||
namespace etk{
|
namespace etk{
|
||||||
class CEndl{};
|
class CEndl{};
|
||||||
@ -71,6 +71,11 @@ namespace etk{
|
|||||||
strncat(m_tmpChar, tmp, MAX_LOG_SIZE);
|
strncat(m_tmpChar, tmp, MAX_LOG_SIZE);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
CCout& operator << (long long t) {
|
||||||
|
snprintf(tmp, MAX_LOG_SIZE_TMP, "%lld", t);
|
||||||
|
strncat(m_tmpChar, tmp, MAX_LOG_SIZE);
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
CCout& operator << (double t) {
|
CCout& operator << (double t) {
|
||||||
snprintf(tmp, MAX_LOG_SIZE_TMP, "%f", t);
|
snprintf(tmp, MAX_LOG_SIZE_TMP, "%f", t);
|
||||||
strncat(m_tmpChar, tmp, MAX_LOG_SIZE);
|
strncat(m_tmpChar, tmp, MAX_LOG_SIZE);
|
||||||
|
@ -334,10 +334,10 @@ class FTFontInternal
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
EWOL_DEBUG("elem=" << listElement[iii].unicodeCharVal
|
EWOL_VERBOSE("elem=" << listElement[iii].unicodeCharVal
|
||||||
<<" size=(" << tmpWidth << "," << tmpHeight << ")"
|
<<" size=(" << tmpWidth << "," << tmpHeight << ")"
|
||||||
<< " for bitmap (left=" << slot->bitmap_left << ",top=" << slot->bitmap_top << ")");
|
<< " for bitmap (left=" << slot->bitmap_left << ",top=" << slot->bitmap_top << ")");
|
||||||
EWOL_DEBUG(" BEARING=(" << (slot->metrics.horiBearingX>>6) << "," << (slot->metrics.vertBearingY>>6) << ")" );
|
EWOL_VERBOSE(" BEARING=(" << (slot->metrics.horiBearingX>>6) << "," << (slot->metrics.vertBearingY>>6) << ")" );
|
||||||
|
|
||||||
for(int32_t j=0; j < tmpHeight;j++) {
|
for(int32_t j=0; j < tmpHeight;j++) {
|
||||||
for(int32_t i=0; i < tmpWidth; i++){
|
for(int32_t i=0; i < tmpWidth; i++){
|
||||||
@ -363,11 +363,15 @@ class FTFontInternal
|
|||||||
// update the Bitmap position drawing :
|
// update the Bitmap position drawing :
|
||||||
tmpRowStartPos += tmpWidth;
|
tmpRowStartPos += tmpWidth;
|
||||||
}
|
}
|
||||||
|
EWOL_DEBUG("End generation of the Fond bitmap, start adding texture");
|
||||||
// use the texture manager to have the texture availlable every restart of the screen
|
// use the texture manager to have the texture availlable every restart of the screen
|
||||||
//textureId = LoadTexture(GL_TEXTURE_2D, 0, GL_ALPHA8, textureWidth, textureHeight, 0, GL_ALPHA, GL_UNSIGNED_BYTE, expanded_data, byfferDataSize * sizeof(GLubyte), "---FreeFont---" );
|
//textureId = LoadTexture(GL_TEXTURE_2D, 0, GL_ALPHA8, textureWidth, textureHeight, 0, GL_ALPHA, GL_UNSIGNED_BYTE, expanded_data, byfferDataSize * sizeof(GLubyte), "---FreeFont---" );
|
||||||
textureId = ewol::LoadTexture(GL_TEXTURE_2D, 0, GL_ALPHA, textureWidth, textureHeight, 0, GL_ALPHA, GL_UNSIGNED_BYTE, expanded_data, byfferDataSize * sizeof(GLubyte), "---FreeFont---" );
|
textureId = ewol::LoadTexture(GL_TEXTURE_2D, 0, GL_ALPHA, textureWidth, textureHeight, 0, GL_ALPHA, GL_UNSIGNED_BYTE, expanded_data, byfferDataSize * sizeof(GLubyte), "---FreeFont---" );
|
||||||
|
|
||||||
|
EWOL_DEBUG("end load texture font");
|
||||||
// With The Texture Created, We Don't Need The Expanded Data Anymore.
|
// With The Texture Created, We Don't Need The Expanded Data Anymore.
|
||||||
delete [] expanded_data;
|
delete [] expanded_data;
|
||||||
|
EWOL_DEBUG("end load remode tmp data");
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -414,6 +418,7 @@ class FTFont{
|
|||||||
}
|
}
|
||||||
m_size = size;
|
m_size = size;
|
||||||
m_listLoadedTTFont[m_trueTypeFontId]->GenerateBitmapFont(m_size, m_lineHeight, m_textureId, m_elements);
|
m_listLoadedTTFont[m_trueTypeFontId]->GenerateBitmapFont(m_size, m_lineHeight, m_textureId, m_elements);
|
||||||
|
EWOL_DEBUG("plop");
|
||||||
}
|
}
|
||||||
~FTFont(void)
|
~FTFont(void)
|
||||||
{
|
{
|
||||||
@ -500,6 +505,7 @@ void ewol::SetDefaultFont(etk::String fontName, int32_t size)
|
|||||||
// save the default font parameters ...
|
// save the default font parameters ...
|
||||||
s_currentDefaultFontName = fontName;
|
s_currentDefaultFontName = fontName;
|
||||||
s_currentDefaultFontId = tmpId;
|
s_currentDefaultFontId = tmpId;
|
||||||
|
EWOL_DEBUG("MEGAPLOP 2");
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t ewol::GetDefaultFontId(void)
|
int32_t ewol::GetDefaultFontId(void)
|
||||||
|
@ -49,6 +49,8 @@ namespace guiAbstraction
|
|||||||
void SendKeyboardEventMove(bool isDown, ewol::eventKbMoveType_te &keyInput);
|
void SendKeyboardEventMove(bool isDown, ewol::eventKbMoveType_te &keyInput);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
int64_t GetCurrentTime(void);
|
||||||
|
|
||||||
//!< must be define in CPP by the application ...
|
//!< must be define in CPP by the application ...
|
||||||
void APP_Init(int argc, char *argv[]);
|
void APP_Init(int argc, char *argv[]);
|
||||||
void APP_UnInit(void);
|
void APP_UnInit(void);
|
||||||
|
@ -54,7 +54,7 @@ static etkFloat_t m_width = 320;
|
|||||||
static etkFloat_t m_height = 480;
|
static etkFloat_t m_height = 480;
|
||||||
|
|
||||||
ewol::Windows* m_uniqueWindows = NULL;
|
ewol::Windows* m_uniqueWindows = NULL;
|
||||||
static int64_t GetCurrentTime(void)
|
int64_t GetCurrentTime(void)
|
||||||
{
|
{
|
||||||
struct timeval now;
|
struct timeval now;
|
||||||
gettimeofday(&now, NULL);
|
gettimeofday(&now, NULL);
|
||||||
@ -283,13 +283,16 @@ static bool isAlreadyInit = false;
|
|||||||
|
|
||||||
void EWOL_NativeApplicationInit(void)
|
void EWOL_NativeApplicationInit(void)
|
||||||
{
|
{
|
||||||
EWOL_WARNING("Event : Init Application");
|
int64_t time = GetCurrentTime();
|
||||||
|
EWOL_WARNING("Event : Init Application (start)" << time);
|
||||||
if (false == isAlreadyInit) {
|
if (false == isAlreadyInit) {
|
||||||
guiAbstraction::Init(0, NULL);
|
guiAbstraction::Init(0, NULL);
|
||||||
ewol::Init(0, NULL);
|
ewol::Init(0, NULL);
|
||||||
APP_Init(0, NULL);
|
APP_Init(0, NULL);
|
||||||
isAlreadyInit = true;
|
isAlreadyInit = true;
|
||||||
}
|
}
|
||||||
|
time = GetCurrentTime();
|
||||||
|
EWOL_WARNING("Event : Init Application (end)" << time);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EWOL_NativeApplicationUnInit(void)
|
void EWOL_NativeApplicationUnInit(void)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user