update at the new vertion of ewol
This commit is contained in:
parent
602b5cb789
commit
f789560299
67
.gitignore
vendored
Normal file
67
.gitignore
vendored
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
|
||||||
|
###################################
|
||||||
|
# folders
|
||||||
|
###################################
|
||||||
|
CVS
|
||||||
|
.svn
|
||||||
|
.gitk-tmp.*
|
||||||
|
Object/
|
||||||
|
doxygen/API/
|
||||||
|
doxygen/ALL/
|
||||||
|
bin/
|
||||||
|
gen/
|
||||||
|
linux/
|
||||||
|
obj/
|
||||||
|
|
||||||
|
###################################
|
||||||
|
# backup files
|
||||||
|
###################################
|
||||||
|
*~
|
||||||
|
*.swp
|
||||||
|
*.old
|
||||||
|
*.bck
|
||||||
|
|
||||||
|
###################################
|
||||||
|
# Compiled source #
|
||||||
|
###################################
|
||||||
|
*.com
|
||||||
|
*.class
|
||||||
|
*.dll
|
||||||
|
*.exe
|
||||||
|
*.o
|
||||||
|
*.so
|
||||||
|
*.pyc
|
||||||
|
tags
|
||||||
|
edn
|
||||||
|
out
|
||||||
|
edn_debug
|
||||||
|
edn_release
|
||||||
|
|
||||||
|
###################################
|
||||||
|
# Packages #
|
||||||
|
###################################
|
||||||
|
# it's better to unpack these files and commit the raw source
|
||||||
|
# git has its own built in compression methods
|
||||||
|
*.7z
|
||||||
|
*.dmg
|
||||||
|
*.gz
|
||||||
|
*.iso
|
||||||
|
*.jar
|
||||||
|
*.rar
|
||||||
|
*.tar
|
||||||
|
*.zip
|
||||||
|
|
||||||
|
###################################
|
||||||
|
# Logs and databases #
|
||||||
|
###################################
|
||||||
|
*.log
|
||||||
|
*.sql
|
||||||
|
*.sqlite
|
||||||
|
|
||||||
|
###################################
|
||||||
|
# OS generated files #
|
||||||
|
###################################
|
||||||
|
.DS_Store?
|
||||||
|
ehthumbs.db
|
||||||
|
Icon?
|
||||||
|
Thumbs.db
|
Binary file not shown.
Before Width: | Height: | Size: 1.0 MiB |
@ -1,129 +0,0 @@
|
|||||||
name:Monospace
|
|
||||||
source:Monospace.bmp
|
|
||||||
#comment line ...
|
|
||||||
# size 54 largeur 33 space between letter 12
|
|
||||||
# unknow UTF8 code of the letter and start coordonate and size ==> 0x54 (33,45) (33,54)
|
|
||||||
0x00 (99,453) (33,54) # Error : Unknow the UTF8 element ...
|
|
||||||
# hexa UTF8 code of the letter and start coordonate and size ==> 0x54 (33,45) (33,54)
|
|
||||||
# ABCDEFGHIJKLMN
|
|
||||||
0x20 (0,7) (33,54) # space ...
|
|
||||||
0x41 (33,7) (33,54) # A
|
|
||||||
0x42 (66,7) (33,54) # B
|
|
||||||
0x43 (99,7) (33,54) # C
|
|
||||||
0x44 (132,7) (33,54) # D
|
|
||||||
0x45 (165,7) (33,54) # E
|
|
||||||
0x46 (198,7) (33,54) # F
|
|
||||||
0x47 (231,7) (33,54) # G
|
|
||||||
0x48 (264,7) (33,54) # H
|
|
||||||
0x49 (297,7) (33,54) # I
|
|
||||||
0x4A (330,7) (33,54) # J
|
|
||||||
0x4B (363,7) (33,54) # K
|
|
||||||
0x4C (396,7) (33,54) # L
|
|
||||||
0x4D (429,7) (33,54) # M
|
|
||||||
0x4E (462,7) (33,54) # N
|
|
||||||
#OPQRSTUVWXYZabc
|
|
||||||
0x4F (0,71) (33,54) # O
|
|
||||||
0x50 (33,71) (33,54) # P
|
|
||||||
0x51 (66,71) (33,54) # Q
|
|
||||||
0x52 (99,71) (33,54) # R
|
|
||||||
0x53 (132,71) (33,54) # S
|
|
||||||
0x54 (165,71) (33,54) # T
|
|
||||||
0x55 (198,71) (33,54) # U
|
|
||||||
0x56 (231,71) (33,54) # V
|
|
||||||
0x57 (264,71) (33,54) # W
|
|
||||||
0x58 (297,71) (33,54) # X
|
|
||||||
0x59 (330,71) (33,54) # Y
|
|
||||||
0x5A (363,71) (33,54) # Z
|
|
||||||
0x61 (396,71) (33,54) # a
|
|
||||||
0x62 (429,71) (33,54) # b
|
|
||||||
0x63 (462,71) (33,54) # c
|
|
||||||
#defghijklmnopqr
|
|
||||||
0x64 (0,135) (33,54) # d
|
|
||||||
0x65 (33,135) (33,54) # e
|
|
||||||
0x66 (66,135) (33,54) # f
|
|
||||||
0x67 (99,135) (33,54) # g
|
|
||||||
0x68 (132,135) (33,54) # h
|
|
||||||
0x69 (165,135) (33,54) # i
|
|
||||||
0x6A (198,135) (33,54) # j
|
|
||||||
0x6B (231,135) (33,54) # k
|
|
||||||
0x6C (264,135) (33,54) # l
|
|
||||||
0x6D (297,135) (33,54) # m
|
|
||||||
0x6E (330,135) (33,54) # n
|
|
||||||
0x6F (363,135) (33,54) # o
|
|
||||||
0x70 (396,135) (33,54) # p
|
|
||||||
0x71 (429,135) (33,54) # q
|
|
||||||
0x72 (462,135) (33,54) # r
|
|
||||||
#stuvwxyz1234567
|
|
||||||
0x73 (0,199) (33,54) # s
|
|
||||||
0x74 (33,199) (33,54) # t
|
|
||||||
0x75 (66,199) (33,54) # u
|
|
||||||
0x76 (99,199) (33,54) # v
|
|
||||||
0x77 (132,199) (33,54) # w
|
|
||||||
0x78 (165,199) (33,54) # x
|
|
||||||
0x79 (198,199) (33,54) # y
|
|
||||||
0x7A (231,199) (33,54) # z
|
|
||||||
0x31 (264,199) (33,54) # 1
|
|
||||||
0x32 (297,199) (33,54) # 2
|
|
||||||
0x33 (330,199) (33,54) # 3
|
|
||||||
0x34 (363,199) (33,54) # 4
|
|
||||||
0x35 (396,199) (33,54) # 5
|
|
||||||
0x36 (429,199) (33,54) # 6
|
|
||||||
0x37 (462,199) (33,54) # 7
|
|
||||||
#890&é~"#'{([-|è
|
|
||||||
0x38 (0,263) (33,54) # 8
|
|
||||||
0x39 (33,263) (33,54) # 9
|
|
||||||
0x30 (66,263) (33,54) # 0
|
|
||||||
0x26 (99,263) (33,54) # &
|
|
||||||
#0x (132,263) (33,54) # é
|
|
||||||
0x7E (165,263) (33,54) # ~
|
|
||||||
0x22 (198,263) (33,54) # "
|
|
||||||
0x23 (231,263) (33,54) # #
|
|
||||||
0x27 (264,263) (33,54) # '
|
|
||||||
0x7B (297,263) (33,54) # {
|
|
||||||
0x28 (330,263) (33,54) # (
|
|
||||||
0x5B (363,263) (33,54) # [
|
|
||||||
0x2D (396,263) (33,54) # -
|
|
||||||
0x7C (429,263) (33,54) # |
|
|
||||||
#0x (462,263) (33,54) # è
|
|
||||||
#`_\ç^à@)]=}
|
|
||||||
0x60 (0,335) (33,54) # `
|
|
||||||
0x5F (33,335) (33,54) # _
|
|
||||||
0x5C (66,335) (33,54) # \
|
|
||||||
#0x (99,335) (33,54) # ç
|
|
||||||
0x5E (132,335) (33,54) # ^
|
|
||||||
#0x (165,335) (33,54) # à
|
|
||||||
0x40 (198,335) (33,54) # @
|
|
||||||
0x29 (231,335) (33,54) # )
|
|
||||||
0x5D (264,335) (33,54) # ]
|
|
||||||
0x3D (297,335) (33,54) # =
|
|
||||||
0x7D (330,335) (33,54) # }
|
|
||||||
#0x (363,335) (33,54) # o chap
|
|
||||||
#0x (396,335) (33,54) # u chap
|
|
||||||
#0x (429,335) (33,54) # e chap
|
|
||||||
#0x (462,335) (33,54) # a chap
|
|
||||||
#$£*µ%!§:/
|
|
||||||
#0x (0,391) (33,54) # i chap
|
|
||||||
#0x (33,391) (33,54) # o trema
|
|
||||||
#0x (66,391) (33,54) # u trema
|
|
||||||
#0x (99,391) (33,54) # e trema
|
|
||||||
#0x (132,391) (33,54) # a trema
|
|
||||||
0x24 (165,391) (33,54) # $
|
|
||||||
#0x (198,391) (33,54) # £
|
|
||||||
0x2A (231,391) (33,54) # *
|
|
||||||
#0x (264,391) (33,54) # µ
|
|
||||||
#0x (297,391) (33,54) # ù
|
|
||||||
0x25 (330,391) (33,54) # %
|
|
||||||
0x21 (363,391) (33,54) # !
|
|
||||||
#0x (396,391) (33,54) # §
|
|
||||||
0x3A (429,391) (33,54) # :
|
|
||||||
0x2F (462,391) (33,54) # /
|
|
||||||
#;.,?<>²!+
|
|
||||||
0x3B (0,453) (33,54) # ;
|
|
||||||
0x2E (33,453) (33,54) # .
|
|
||||||
0x2C (66,453) (33,54) # ,
|
|
||||||
0x3F (99,453) (33,54) # ?
|
|
||||||
0x3C (132,453) (33,54) # <
|
|
||||||
0x3E (165,453) (33,54) # >
|
|
||||||
#0x (198,453) (33,54) # ²
|
|
||||||
#0x21 (231,453) (33,54) # ! ==> doublon ...
|
|
||||||
0x2B (264,453) (33,54) # +
|
|
BIN
assets/Font/freefont/FreeSerif.ttf
Normal file
BIN
assets/Font/freefont/FreeSerif.ttf
Normal file
Binary file not shown.
BIN
assets/Font/freefont/FreeSerifBold.ttf
Normal file
BIN
assets/Font/freefont/FreeSerifBold.ttf
Normal file
Binary file not shown.
BIN
assets/Font/freefont/FreeSerifBoldItalic.ttf
Normal file
BIN
assets/Font/freefont/FreeSerifBoldItalic.ttf
Normal file
Binary file not shown.
BIN
assets/Font/freefont/FreeSerifItalic.ttf
Normal file
BIN
assets/Font/freefont/FreeSerifItalic.ttf
Normal file
Binary file not shown.
@ -3,7 +3,7 @@ LOCAL_PATH := $(call my-dir)
|
|||||||
include $(CLEAR_VARS)
|
include $(CLEAR_VARS)
|
||||||
|
|
||||||
LOCAL_MODULE := ewolDrawer
|
LOCAL_MODULE := ewolDrawer
|
||||||
LOCAL_STATIC_LIBRARIES := ewol etk tinyxml libzip libpng
|
LOCAL_STATIC_LIBRARIES := ewol etk tinyxml libzip libpng libfreetype
|
||||||
|
|
||||||
|
|
||||||
# load the common sources file of the platform
|
# load the common sources file of the platform
|
||||||
@ -12,8 +12,9 @@ include $(LOCAL_PATH)/file.mk
|
|||||||
LOCAL_SRC_FILES := $(FILE_LIST)
|
LOCAL_SRC_FILES := $(FILE_LIST)
|
||||||
LOCAL_LDLIBS :=
|
LOCAL_LDLIBS :=
|
||||||
|
|
||||||
LOCAL_CFLAGS := -DEWOL_USE_FREE_TYPE \
|
LOCAL_CFLAGS := -D__PLATFORM__Linux \
|
||||||
-DDRAW_DEBUG_LEVEL=3 \
|
-DEWOL_USE_FREE_TYPE \
|
||||||
|
-DDRAW_DEBUG_LEVEL=3
|
||||||
|
|
||||||
include $(BUILD_EXECUTABLE)
|
include $(BUILD_EXECUTABLE)
|
||||||
|
|
||||||
|
103
jni/Main.cpp
103
jni/Main.cpp
@ -30,7 +30,6 @@
|
|||||||
#include <ewol/widget/CheckBox.h>
|
#include <ewol/widget/CheckBox.h>
|
||||||
#include <ewol/widget/SizerHori.h>
|
#include <ewol/widget/SizerHori.h>
|
||||||
#include <ewol/widget/SizerVert.h>
|
#include <ewol/widget/SizerVert.h>
|
||||||
#include <ewol/widget/Test.h>
|
|
||||||
#include <ewol/widget/Label.h>
|
#include <ewol/widget/Label.h>
|
||||||
#include <ewol/widget/Entry.h>
|
#include <ewol/widget/Entry.h>
|
||||||
#include <ewol/widget/List.h>
|
#include <ewol/widget/List.h>
|
||||||
@ -66,14 +65,14 @@ class MaListExemple : public ewol::List
|
|||||||
uint32_t GetNuberOfColomn(void) {
|
uint32_t GetNuberOfColomn(void) {
|
||||||
return 1;
|
return 1;
|
||||||
};
|
};
|
||||||
bool GetTitle(int32_t colomn, etk::String &myTitle, color_ts &fg, color_ts &bg) {
|
bool GetTitle(int32_t colomn, etk::UString &myTitle, color_ts &fg, color_ts &bg) {
|
||||||
myTitle = "title";
|
myTitle = "title";
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
uint32_t GetNuberOfRaw(void) {
|
uint32_t GetNuberOfRaw(void) {
|
||||||
return 3;
|
return 3;
|
||||||
};
|
};
|
||||||
bool GetElement(int32_t colomn, int32_t raw, etk::String &myTextToWrite, color_ts &fg, color_ts &bg) {
|
bool GetElement(int32_t colomn, int32_t raw, etk::UString &myTextToWrite, color_ts &fg, color_ts &bg) {
|
||||||
switch (raw) {
|
switch (raw) {
|
||||||
case 0:
|
case 0:
|
||||||
myTextToWrite = "Ligne 1";
|
myTextToWrite = "Ligne 1";
|
||||||
@ -172,14 +171,9 @@ class Plop : public ewol::Windows
|
|||||||
myButton->SetExpendX(true);
|
myButton->SetExpendX(true);
|
||||||
//myButton->SetExpendY(true);
|
//myButton->SetExpendY(true);
|
||||||
myButton->SetFillX(true);
|
myButton->SetFillX(true);
|
||||||
if (false == myButton->ExternLinkOnEvent("ewol Button Pressed", GetWidgetId(), drawerEventRequestOpenFile) ) {
|
myButton->RegisterOnEvent(this, ewolEventButtonPressed, drawerEventRequestOpenFile);
|
||||||
DRAW_CRITICAL("link with an entry event");
|
|
||||||
}
|
|
||||||
mySizerVert->SubWidgetAdd(myButton);
|
mySizerVert->SubWidgetAdd(myButton);
|
||||||
|
|
||||||
ewol::Test * myTest = new ewol::Test();
|
|
||||||
mySizerVert->SubWidgetAdd(myTest);
|
|
||||||
|
|
||||||
ewol::CheckBox * myCheckBox = new ewol::CheckBox("mon label d'eK");
|
ewol::CheckBox * myCheckBox = new ewol::CheckBox("mon label d'eK");
|
||||||
mySizerVert->SubWidgetAdd(myCheckBox);
|
mySizerVert->SubWidgetAdd(myCheckBox);
|
||||||
myCheckBox = new ewol::CheckBox("Exemple 2");
|
myCheckBox = new ewol::CheckBox("Exemple 2");
|
||||||
@ -201,37 +195,35 @@ class Plop : public ewol::Windows
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
bool OnEventAreaExternal(int32_t widgetID, const char * generateEventId, const char * eventExternId, etkFloat_t x, etkFloat_t y)
|
/**
|
||||||
|
* @brief Receive a message from an other EObject with a specific eventId and data
|
||||||
|
* @param[in] CallerObject Pointer on the EObject that information came from
|
||||||
|
* @param[in] eventId Message registered by this class
|
||||||
|
* @param[in] data Data registered by this class
|
||||||
|
* @return ---
|
||||||
|
*/
|
||||||
|
virtual void OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, etk::UString data)
|
||||||
{
|
{
|
||||||
DRAW_INFO("Receive Event from the main windows ... : widgetid=" << widgetID << "\"" << generateEventId << "\" ==> internalEvent=\"" << eventExternId << "\"" );
|
DRAW_INFO("Receive Event from the main windows ... : widgetid=" << CallerObject << " ==> " << eventId << " ==> data=\"" << data << "\"" );
|
||||||
if (eventExternId == drawerEventRequestOpenFile) {
|
if (eventId == drawerEventRequestOpenFile) {
|
||||||
ewol::FileChooser* tmpWidget = new ewol::FileChooser();
|
ewol::FileChooser* tmpWidget = new ewol::FileChooser();
|
||||||
tmpWidget->SetTitle("Open Files ...");
|
tmpWidget->SetTitle("Open Files ...");
|
||||||
tmpWidget->SetValidateLabel("Open");
|
tmpWidget->SetValidateLabel("Open");
|
||||||
tmpWidget->SetFolder("/");
|
tmpWidget->SetFolder("/");
|
||||||
PopUpWidgetPush(tmpWidget);
|
PopUpWidgetPush(tmpWidget);
|
||||||
if (false == tmpWidget->ExternLinkOnEvent("ewol event file chooser cancel", GetWidgetId(), drawerEventRequestOpenFileClosed) ) {
|
tmpWidget->RegisterOnEvent(this, ewolEventFileChooserValidate, drawerEventRequestOpenFileSelected);
|
||||||
DRAW_CRITICAL("link with an entry event");
|
} else if (eventId == drawerEventRequestOpenFileSelected) {
|
||||||
}
|
|
||||||
if (false == tmpWidget->ExternLinkOnEvent("ewol event file chooser validate", GetWidgetId(), drawerEventRequestOpenFileSelected) ) {
|
|
||||||
DRAW_CRITICAL("link with an entry event");
|
|
||||||
}
|
|
||||||
} else if (eventExternId == drawerEventRequestOpenFileClosed) {
|
|
||||||
PopUpWidgetPop();
|
|
||||||
} else if (eventExternId == drawerEventRequestOpenFileSelected) {
|
|
||||||
// get widget:
|
// get widget:
|
||||||
ewol::FileChooser * tmpWidget = (ewol::FileChooser*)ewol::widgetManager::Get(widgetID);
|
ewol::FileChooser * tmpWidget = static_cast<ewol::FileChooser*>(CallerObject);
|
||||||
if (NULL == tmpWidget) {
|
if (NULL == tmpWidget) {
|
||||||
DRAW_ERROR("impossible to get pop_upWidget " << widgetID);
|
DRAW_ERROR("impossible to get pop_upWidget " << CallerObject);
|
||||||
PopUpWidgetPop();
|
return;
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
// get the filename :
|
// get the filename :
|
||||||
etk::String tmpData = tmpWidget->GetCompleateFileName();
|
etk::UString tmpData = tmpWidget->GetCompleateFileName();
|
||||||
DRAW_DEBUG("Request opening the file : " << tmpData);
|
DRAW_DEBUG("Request opening the file : " << tmpData);
|
||||||
PopUpWidgetPop();
|
|
||||||
}
|
}
|
||||||
return true;
|
return;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -240,7 +232,7 @@ static Plop * myWindowsExample = NULL;
|
|||||||
/**
|
/**
|
||||||
* @brief main application function Initialisation
|
* @brief main application function Initialisation
|
||||||
*/
|
*/
|
||||||
void APP_Init(int argc, char *argv[])
|
void APP_Init(void)
|
||||||
{
|
{
|
||||||
ewol::ChangeSize(800, 600);
|
ewol::ChangeSize(800, 600);
|
||||||
/*
|
/*
|
||||||
@ -269,53 +261,14 @@ void APP_Init(int argc, char *argv[])
|
|||||||
SetBaseFolderCache("/tmp/"PROJECT_NAME"/");
|
SetBaseFolderCache("/tmp/"PROJECT_NAME"/");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ewol::SetFontFolder("Font");
|
|
||||||
#ifdef EWOL_USE_FREE_TYPE
|
|
||||||
ewol::SetDefaultFont("freefont/FreeMono", 14);
|
|
||||||
#else
|
|
||||||
//ewol::SetDefaultFont("ebtfont/Monospace", 14);
|
|
||||||
ewol::SetDefaultFont("ebtfont/Monospace", 22);
|
|
||||||
#endif
|
|
||||||
//ewol::theme::LoadDefault("dataTest/exemple.eol");
|
|
||||||
/*
|
|
||||||
etk::File fileTmp("exemple.eol", etk::FILE_TYPE_DATA);
|
|
||||||
ewol::theme::LoadDefault(fileTmp);
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
etk::File tmpFile("/data/data/com.example.EwolActivity.app/assets/theme/exemple.eol");
|
|
||||||
if (tmpFile.Exist() ) {
|
|
||||||
EWOL_WARNING("file existed : " << tmpFile);
|
|
||||||
}
|
|
||||||
tmpFile = ("/data/data/com.example.EwolActivity/assets/theme/exemple.eol");
|
|
||||||
if (tmpFile.Exist() ) {
|
|
||||||
EWOL_WARNING("file existed : " << tmpFile);
|
|
||||||
}
|
|
||||||
tmpFile=("/data/com.example.EwolActivity.app/assets/theme/exemple.eol");
|
|
||||||
if (tmpFile.Exist() ) {
|
|
||||||
EWOL_WARNING("file existed : " << tmpFile);
|
|
||||||
}
|
|
||||||
tmpFile=("/data/com.example.EwolActivity/assets/theme/exemple.eol");
|
|
||||||
if (tmpFile.Exist() ) {
|
|
||||||
EWOL_WARNING("file existed : " << tmpFile);
|
|
||||||
}
|
|
||||||
tmpFile=("/data/data/com.example.ewolactivity.app/assets/theme/exemple.eol");
|
|
||||||
if (tmpFile.Exist() ) {
|
|
||||||
EWOL_WARNING("file existed : " << tmpFile);
|
|
||||||
}
|
|
||||||
tmpFile=("/data/data/com.example.ewolactivity/assets/theme/exemple.eol");
|
|
||||||
if (tmpFile.Exist() ) {
|
|
||||||
EWOL_WARNING("file existed : " << tmpFile);
|
|
||||||
}
|
|
||||||
tmpFile=("/data/com.example.ewolactivity.app/assets/theme/exemple.eol");
|
|
||||||
if (tmpFile.Exist() ) {
|
|
||||||
EWOL_WARNING("file existed : " << tmpFile);
|
|
||||||
}
|
|
||||||
tmpFile=("/data/com.example.ewolactivity/assets/theme/exemple.eol");
|
|
||||||
if (tmpFile.Exist() ) {
|
|
||||||
EWOL_WARNING("file existed : " << tmpFile);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
ewol::SetFontFolder("Font");
|
||||||
|
|
||||||
|
#ifdef __PLATFORM__Android
|
||||||
|
ewol::SetDefaultFont("freefont/FreeSerif.ttf", 16);
|
||||||
|
#else
|
||||||
|
ewol::SetDefaultFont("freefont/FreeSerif.ttf", 12);
|
||||||
|
#endif
|
||||||
|
|
||||||
myWindowsExample = new Plop();
|
myWindowsExample = new Plop();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user