[DEV] a little step
This commit is contained in:
parent
15c71ebe1a
commit
6921fd4467
2
build
2
build
@ -1 +1 @@
|
|||||||
Subproject commit 1b6659890d1ce315d52398954f77966c72a7fc99
|
Subproject commit d207607bac4827ecc6dd02ccb08059ec9d191e4f
|
@ -33,9 +33,9 @@ LOCAL_EXPORT_CFLAGS :=
|
|||||||
include $(LOCAL_PATH)/file.mk
|
include $(LOCAL_PATH)/file.mk
|
||||||
|
|
||||||
LOCAL_SRC_FILES := \
|
LOCAL_SRC_FILES := \
|
||||||
|
$(FILE_LIST) \
|
||||||
ewol/os/gui.X11.cpp \
|
ewol/os/gui.X11.cpp \
|
||||||
ewol/audio/interfacePortAudio.cpp \
|
ewol/audio/interfacePortAudio.cpp
|
||||||
$(FILE_LIST)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,208 +0,0 @@
|
|||||||
/**
|
|
||||||
* @author Edouard DUPIN
|
|
||||||
*
|
|
||||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
|
||||||
*
|
|
||||||
* @license BSD v3 (see license file)
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <ewol/ShortCutManager.h>
|
|
||||||
#include <ewol/eObject/EObject.h>
|
|
||||||
#include <ewol/ewol.h>
|
|
||||||
|
|
||||||
/*
|
|
||||||
class EventShortCut {
|
|
||||||
public:
|
|
||||||
const char * generateEventId; // event generate ID (to be unique it was pointer on the string name)
|
|
||||||
etk::UString eventData;
|
|
||||||
bool shift;
|
|
||||||
bool control;
|
|
||||||
bool alt;
|
|
||||||
bool meta;
|
|
||||||
uniChar_t UnicodeValue; // 0 if not used
|
|
||||||
ewol::eventKbMoveType_te keyboardMoveValue; // 0 if not used
|
|
||||||
};
|
|
||||||
*/
|
|
||||||
|
|
||||||
static etk::Vector<ewol::EventShortCut *> l_inputShortCutEvent; //!< generic short-cut event
|
|
||||||
|
|
||||||
namespace ewol {
|
|
||||||
namespace shortCut {
|
|
||||||
void Add(bool shift, bool control, bool alt, bool meta,
|
|
||||||
uniChar_t unicodeValue,
|
|
||||||
ewol::eventKbMoveType_te kbMove,
|
|
||||||
const char * generateEventId,
|
|
||||||
etk::UString data);
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
void ewol::shortCut::Add(bool shift, bool control, bool alt, bool meta,
|
|
||||||
uniChar_t unicodeValue,
|
|
||||||
ewol::eventKbMoveType_te kbMove,
|
|
||||||
const char * generateEventId,
|
|
||||||
etk::UString data)
|
|
||||||
{
|
|
||||||
ewol::EventShortCut * newEvent = new ewol::EventShortCut();
|
|
||||||
if (NULL == newEvent) {
|
|
||||||
EWOL_ERROR("Allocation Error on the shortcut ...");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
newEvent->generateEventId = generateEventId;
|
|
||||||
newEvent->specialKey.shift = shift;
|
|
||||||
newEvent->specialKey.ctrl = control;
|
|
||||||
newEvent->specialKey.alt = alt;
|
|
||||||
newEvent->specialKey.meta = meta;
|
|
||||||
newEvent->unicodeValue = unicodeValue;
|
|
||||||
newEvent->keyboardMoveValue = kbMove;
|
|
||||||
newEvent->eventData = data;
|
|
||||||
l_inputShortCutEvent.PushBack(newEvent);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void ewol::shortCut::Add(const char * descriptiveString, const char * generateEventId, etk::UString data)
|
|
||||||
{
|
|
||||||
if( NULL==descriptiveString
|
|
||||||
|| 0==strlen(descriptiveString))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
bool shift = false;
|
|
||||||
bool control = false;
|
|
||||||
bool alt = false;
|
|
||||||
bool meta = false;
|
|
||||||
uint32_t UnicodeValue = 0;
|
|
||||||
|
|
||||||
// parsing of the string :
|
|
||||||
//"ctrl+shift+alt+meta+s"
|
|
||||||
const char * tmp = strstr(descriptiveString, "ctrl");
|
|
||||||
if(NULL != tmp) {
|
|
||||||
control = true;
|
|
||||||
}
|
|
||||||
tmp = strstr(descriptiveString, "shift");
|
|
||||||
if(NULL != tmp) {
|
|
||||||
shift = true;
|
|
||||||
}
|
|
||||||
tmp = strstr(descriptiveString, "alt");
|
|
||||||
if(NULL != tmp) {
|
|
||||||
alt = true;
|
|
||||||
}
|
|
||||||
tmp = strstr(descriptiveString, "meta");
|
|
||||||
if(NULL != tmp) {
|
|
||||||
meta = true;
|
|
||||||
}
|
|
||||||
// TOTDO : Generate a simple Table ...
|
|
||||||
if(NULL != strstr(descriptiveString, "F12") ) {
|
|
||||||
ewol::shortCut::Add(shift, control, alt, meta, 0, ewol::EVENT_KB_MOVE_TYPE_F12, generateEventId, data);
|
|
||||||
} else if(NULL != strstr(descriptiveString, "F11") ) {
|
|
||||||
ewol::shortCut::Add(shift, control, alt, meta, 0, ewol::EVENT_KB_MOVE_TYPE_F11, generateEventId, data);
|
|
||||||
} else if(NULL != strstr(descriptiveString, "F10") ) {
|
|
||||||
ewol::shortCut::Add(shift, control, alt, meta, 0, ewol::EVENT_KB_MOVE_TYPE_F10, generateEventId, data);
|
|
||||||
} else if(NULL != strstr(descriptiveString, "F9") ) {
|
|
||||||
ewol::shortCut::Add(shift, control, alt, meta, 0, ewol::EVENT_KB_MOVE_TYPE_F9, generateEventId, data);
|
|
||||||
} else if(NULL != strstr(descriptiveString, "F8") ) {
|
|
||||||
ewol::shortCut::Add(shift, control, alt, meta, 0, ewol::EVENT_KB_MOVE_TYPE_F8, generateEventId, data);
|
|
||||||
} else if(NULL != strstr(descriptiveString, "F7") ) {
|
|
||||||
ewol::shortCut::Add(shift, control, alt, meta, 0, ewol::EVENT_KB_MOVE_TYPE_F7, generateEventId, data);
|
|
||||||
} else if(NULL != strstr(descriptiveString, "F6") ) {
|
|
||||||
ewol::shortCut::Add(shift, control, alt, meta, 0, ewol::EVENT_KB_MOVE_TYPE_F6, generateEventId, data);
|
|
||||||
} else if(NULL != strstr(descriptiveString, "F5") ) {
|
|
||||||
ewol::shortCut::Add(shift, control, alt, meta, 0, ewol::EVENT_KB_MOVE_TYPE_F5, generateEventId, data);
|
|
||||||
} else if(NULL != strstr(descriptiveString, "F4") ) {
|
|
||||||
ewol::shortCut::Add(shift, control, alt, meta, 0, ewol::EVENT_KB_MOVE_TYPE_F4, generateEventId, data);
|
|
||||||
} else if(NULL != strstr(descriptiveString, "F3") ) {
|
|
||||||
ewol::shortCut::Add(shift, control, alt, meta, 0, ewol::EVENT_KB_MOVE_TYPE_F3, generateEventId, data);
|
|
||||||
} else if(NULL != strstr(descriptiveString, "F2") ) {
|
|
||||||
ewol::shortCut::Add(shift, control, alt, meta, 0, ewol::EVENT_KB_MOVE_TYPE_F2, generateEventId, data);
|
|
||||||
} else if(NULL != strstr(descriptiveString, "F1") ) {
|
|
||||||
ewol::shortCut::Add(shift, control, alt, meta, 0, ewol::EVENT_KB_MOVE_TYPE_F1, generateEventId, data);
|
|
||||||
} else if(NULL != strstr(descriptiveString, "LEFT") ) {
|
|
||||||
ewol::shortCut::Add(shift, control, alt, meta, 0, ewol::EVENT_KB_MOVE_TYPE_LEFT, generateEventId, data);
|
|
||||||
} else if(NULL != strstr(descriptiveString, "RIGHT") ) {
|
|
||||||
ewol::shortCut::Add(shift, control, alt, meta, 0, ewol::EVENT_KB_MOVE_TYPE_RIGHT, generateEventId, data);
|
|
||||||
} else if(NULL != strstr(descriptiveString, "UP") ) {
|
|
||||||
ewol::shortCut::Add(shift, control, alt, meta, 0, ewol::EVENT_KB_MOVE_TYPE_UP, generateEventId, data);
|
|
||||||
} else if(NULL != strstr(descriptiveString, "DOWN") ) {
|
|
||||||
ewol::shortCut::Add(shift, control, alt, meta, 0, ewol::EVENT_KB_MOVE_TYPE_DOWN, generateEventId, data);
|
|
||||||
} else if(NULL != strstr(descriptiveString, "PAGE_UP") ) {
|
|
||||||
ewol::shortCut::Add(shift, control, alt, meta, 0, ewol::EVENT_KB_MOVE_TYPE_PAGE_UP, generateEventId, data);
|
|
||||||
} else if(NULL != strstr(descriptiveString, "PAGE_DOWN") ) {
|
|
||||||
ewol::shortCut::Add(shift, control, alt, meta, 0, ewol::EVENT_KB_MOVE_TYPE_PAGE_DOWN, generateEventId, data);
|
|
||||||
} else if(NULL != strstr(descriptiveString, "START") ) {
|
|
||||||
ewol::shortCut::Add(shift, control, alt, meta, 0, ewol::EVENT_KB_MOVE_TYPE_START, generateEventId, data);
|
|
||||||
} else if(NULL != strstr(descriptiveString, "END") ) {
|
|
||||||
ewol::shortCut::Add(shift, control, alt, meta, 0, ewol::EVENT_KB_MOVE_TYPE_END, generateEventId, data);
|
|
||||||
} else if(NULL != strstr(descriptiveString, "CENTER") ) {
|
|
||||||
ewol::shortCut::Add(shift, control, alt, meta, 0, ewol::EVENT_KB_MOVE_TYPE_CENTER, generateEventId, data);
|
|
||||||
} else if(NULL != strstr(descriptiveString, "ARRET_DEFIL") ) {
|
|
||||||
ewol::shortCut::Add(shift, control, alt, meta, 0, ewol::EVENT_KB_MOVE_TYPE_ARRET_DEFIL, generateEventId, data);
|
|
||||||
} else if(NULL != strstr(descriptiveString, "WAIT") ) {
|
|
||||||
ewol::shortCut::Add(shift, control, alt, meta, 0, ewol::EVENT_KB_MOVE_TYPE_WAIT, generateEventId, data);
|
|
||||||
} else if(NULL != strstr(descriptiveString, "INSERT") ) {
|
|
||||||
ewol::shortCut::Add(shift, control, alt, meta, 0, ewol::EVENT_KB_MOVE_TYPE_INSERT, generateEventId, data);
|
|
||||||
} else if(NULL != strstr(descriptiveString, "CAPLOCK") ) {
|
|
||||||
ewol::shortCut::Add(shift, control, alt, meta, 0, ewol::EVENT_KB_MOVE_TYPE_CAPLOCK, generateEventId, data);
|
|
||||||
} else if(NULL != strstr(descriptiveString, "CONTEXT_MENU") ) {
|
|
||||||
ewol::shortCut::Add(shift, control, alt, meta, 0, ewol::EVENT_KB_MOVE_TYPE_CONTEXT_MENU, generateEventId, data);
|
|
||||||
} else if(NULL != strstr(descriptiveString, "VER_NUM") ) {
|
|
||||||
ewol::shortCut::Add(shift, control, alt, meta, 0, ewol::EVENT_KB_MOVE_TYPE_VER_NUM, generateEventId, data);
|
|
||||||
} else {
|
|
||||||
UnicodeValue = descriptiveString[strlen(descriptiveString) -1];
|
|
||||||
// add with generic Adding function ...
|
|
||||||
ewol::shortCut::Add(shift, control, alt, meta, UnicodeValue, ewol::EVENT_KB_MOVE_TYPE_NONE, generateEventId, data);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void ewol::shortCut::Init(void)
|
|
||||||
{
|
|
||||||
if (l_inputShortCutEvent.Size()>0) {
|
|
||||||
EWOL_WARNING("Old element error in the shortCut system");
|
|
||||||
for(int32_t iii=0; iii< l_inputShortCutEvent.Size(); iii++) {
|
|
||||||
delete(l_inputShortCutEvent[iii]);
|
|
||||||
l_inputShortCutEvent[iii] = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
l_inputShortCutEvent.Clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
void ewol::shortCut::UnInit(void)
|
|
||||||
{
|
|
||||||
if (l_inputShortCutEvent.Size()>0) {
|
|
||||||
for(int32_t iii=0; iii< l_inputShortCutEvent.Size(); iii++) {
|
|
||||||
delete(l_inputShortCutEvent[iii]);
|
|
||||||
l_inputShortCutEvent[iii] = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
l_inputShortCutEvent.Clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
bool ewol::shortCut::Process(ewol::specialKey_ts& special, uniChar_t unicodeValue, ewol::eventKbMoveType_te kbMove, bool isDown)
|
|
||||||
{
|
|
||||||
if (unicodeValue >= 'A' && unicodeValue <='Z') {
|
|
||||||
unicodeValue += 'a' - 'A';
|
|
||||||
}
|
|
||||||
//EWOL_INFO("Try to find generic shortcut ...");
|
|
||||||
for(int32_t iii=l_inputShortCutEvent.Size()-1; iii>=0; iii--) {
|
|
||||||
if( l_inputShortCutEvent[iii]->specialKey.shift == special.shift
|
|
||||||
&& l_inputShortCutEvent[iii]->specialKey.ctrl == special.ctrl
|
|
||||||
&& l_inputShortCutEvent[iii]->specialKey.alt == special.alt
|
|
||||||
&& l_inputShortCutEvent[iii]->specialKey.meta == special.meta
|
|
||||||
&& ( ( l_inputShortCutEvent[iii]->keyboardMoveValue == ewol::EVENT_KB_MOVE_TYPE_NONE
|
|
||||||
&& l_inputShortCutEvent[iii]->unicodeValue == unicodeValue)
|
|
||||||
|| ( l_inputShortCutEvent[iii]->keyboardMoveValue == kbMove
|
|
||||||
&& l_inputShortCutEvent[iii]->unicodeValue == 0)
|
|
||||||
) )
|
|
||||||
{
|
|
||||||
if (isDown) {
|
|
||||||
ewol::EObjectMessageMultiCast::AnonymousSend(l_inputShortCutEvent[iii]->generateEventId, l_inputShortCutEvent[iii]->eventData);
|
|
||||||
} // no else
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
|||||||
/**
|
|
||||||
* @author Edouard DUPIN
|
|
||||||
*
|
|
||||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
|
||||||
*
|
|
||||||
* @license BSD v3 (see license file)
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __EWOL_SHORT_CUT_MANAGER_H__
|
|
||||||
#define __EWOL_SHORT_CUT_MANAGER_H__
|
|
||||||
|
|
||||||
#include <etk/Types.h>
|
|
||||||
#include <etk/UString.h>
|
|
||||||
#include <ewol/widget/Widget.h>
|
|
||||||
|
|
||||||
namespace ewol {
|
|
||||||
namespace shortCut {
|
|
||||||
void Init(void);
|
|
||||||
void UnInit(void);
|
|
||||||
bool Process(ewol::specialKey_ts& special, uniChar_t unicodeValue, ewol::eventKbMoveType_te kbMove, bool isDown);
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -6,10 +6,12 @@
|
|||||||
* @license BSD v3 (see license file)
|
* @license BSD v3 (see license file)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <ewol/Debug.h>
|
#include <etk/types.h>
|
||||||
#include <ewol/ClipBoard.h>
|
|
||||||
#include <ewol/os/gui.h>
|
#include <ewol/debug.h>
|
||||||
#include <ewol/os/eSystem.h>
|
#include <ewol/clipBoard.h>
|
||||||
|
#include <ewol/renderer/os/gui.h>
|
||||||
|
#include <ewol/renderer/os/eSystem.h>
|
||||||
|
|
||||||
#undef __class__
|
#undef __class__
|
||||||
#define __class__ "ClipBoard"
|
#define __class__ "ClipBoard"
|
||||||
@ -22,13 +24,40 @@ note: la copy dans le :
|
|||||||
10 : bouton du milieux
|
10 : bouton du milieux
|
||||||
*/
|
*/
|
||||||
//!< Local copy of the clipboards
|
//!< Local copy of the clipboards
|
||||||
static etk::UString mesCopy[ewol::clipBoard::TOTAL_OF_CLICKBOARD];
|
static etk::UString mesCopy[ewol::clipBoard::clipboardCount];
|
||||||
|
|
||||||
|
|
||||||
|
static const char* clipboardDescriptionString[clipboardCount] = {
|
||||||
|
"clipboard0",
|
||||||
|
"clipboard1",
|
||||||
|
"clipboard2",
|
||||||
|
"clipboard3",
|
||||||
|
"clipboard4",
|
||||||
|
"clipboard5",
|
||||||
|
"clipboard6",
|
||||||
|
"clipboard7",
|
||||||
|
"clipboard8",
|
||||||
|
"clipboard9",
|
||||||
|
"clipboardStd",
|
||||||
|
"clipboardSelection",
|
||||||
|
"clipboardCount"
|
||||||
|
};
|
||||||
|
|
||||||
|
etk::CCout& ewol::clipBoard::operator <<(etk::CCout &os, const ewol::clipBoard::clipboardListe_te obj)
|
||||||
|
{
|
||||||
|
if (obj>=0 && obj <clipboardCount) {
|
||||||
|
os << clipboardDescriptionString[obj];
|
||||||
|
} else {
|
||||||
|
os << "[ERROR]";
|
||||||
|
}
|
||||||
|
return os;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void ewol::clipBoard::Init(void)
|
void ewol::clipBoard::Init(void)
|
||||||
{
|
{
|
||||||
EWOL_INFO("Initialyse ClipBoards");
|
EWOL_INFO("Initialyse ClipBoards");
|
||||||
for(int32_t i=0; i<ewol::clipBoard::TOTAL_OF_CLICKBOARD; i++) {
|
for(int32_t i=0; i<ewol::clipBoard::clipboardCount; i++) {
|
||||||
mesCopy[i].Clear();
|
mesCopy[i].Clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -37,7 +66,7 @@ void ewol::clipBoard::Init(void)
|
|||||||
void ewol::clipBoard::UnInit(void)
|
void ewol::clipBoard::UnInit(void)
|
||||||
{
|
{
|
||||||
EWOL_INFO("Initialyse ClipBoards");
|
EWOL_INFO("Initialyse ClipBoards");
|
||||||
for(int32_t i=0; i<ewol::clipBoard::TOTAL_OF_CLICKBOARD; i++) {
|
for(int32_t i=0; i<ewol::clipBoard::clipboardCount; i++) {
|
||||||
mesCopy[i].Clear();
|
mesCopy[i].Clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -51,15 +80,15 @@ void ewol::clipBoard::Set(ewol::clipBoard::clipboardListe_te clipboardID, etk::U
|
|||||||
return;
|
return;
|
||||||
} else
|
} else
|
||||||
|
|
||||||
if(clipboardID >= ewol::clipBoard::TOTAL_OF_CLICKBOARD) {
|
if(clipboardID >= ewol::clipBoard::clipboardCount) {
|
||||||
EWOL_WARNING("request ClickBoard id error");
|
EWOL_WARNING("request ClickBoard id error");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ewol::clipBoard::SetSystem(clipboardID, data);
|
ewol::clipBoard::SetSystem(clipboardID, data);
|
||||||
|
|
||||||
if( ewol::clipBoard::CLIPBOARD_STD == clipboardID
|
if( ewol::clipBoard::clipboardStd == clipboardID
|
||||||
|| ewol::clipBoard::CLIPBOARD_SELECTION == clipboardID) {
|
|| ewol::clipBoard::clipboardSelection == clipboardID) {
|
||||||
guiInterface::ClipBoardSet(clipboardID);
|
guiInterface::ClipBoardSet(clipboardID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -67,13 +96,13 @@ void ewol::clipBoard::Set(ewol::clipBoard::clipboardListe_te clipboardID, etk::U
|
|||||||
|
|
||||||
void ewol::clipBoard::Request(ewol::clipBoard::clipboardListe_te clipboardID)
|
void ewol::clipBoard::Request(ewol::clipBoard::clipboardListe_te clipboardID)
|
||||||
{
|
{
|
||||||
if(clipboardID >= ewol::clipBoard::TOTAL_OF_CLICKBOARD) {
|
if(clipboardID >= ewol::clipBoard::clipboardCount) {
|
||||||
EWOL_WARNING("request ClickBoard id error");
|
EWOL_WARNING("request ClickBoard id error");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( ewol::clipBoard::CLIPBOARD_STD == clipboardID
|
if( ewol::clipBoard::clipboardStd == clipboardID
|
||||||
|| ewol::clipBoard::CLIPBOARD_SELECTION == clipboardID) {
|
|| ewol::clipBoard::clipboardSelection == clipboardID) {
|
||||||
guiInterface::ClipBoardGet(clipboardID);
|
guiInterface::ClipBoardGet(clipboardID);
|
||||||
} else {
|
} else {
|
||||||
// generate an event on the main thread ...
|
// generate an event on the main thread ...
|
||||||
@ -84,7 +113,7 @@ void ewol::clipBoard::Request(ewol::clipBoard::clipboardListe_te clipboardID)
|
|||||||
|
|
||||||
void ewol::clipBoard::SetSystem(ewol::clipBoard::clipboardListe_te clipboardID, etk::UString &data)
|
void ewol::clipBoard::SetSystem(ewol::clipBoard::clipboardListe_te clipboardID, etk::UString &data)
|
||||||
{
|
{
|
||||||
if(clipboardID >= ewol::clipBoard::TOTAL_OF_CLICKBOARD) {
|
if(clipboardID >= ewol::clipBoard::clipboardCount) {
|
||||||
EWOL_WARNING("request ClickBoard id error");
|
EWOL_WARNING("request ClickBoard id error");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -95,7 +124,7 @@ void ewol::clipBoard::SetSystem(ewol::clipBoard::clipboardListe_te clipboardID,
|
|||||||
|
|
||||||
etk::UString ewol::clipBoard::Get(ewol::clipBoard::clipboardListe_te clipboardID)
|
etk::UString ewol::clipBoard::Get(ewol::clipBoard::clipboardListe_te clipboardID)
|
||||||
{
|
{
|
||||||
if(clipboardID >= ewol::clipBoard::TOTAL_OF_CLICKBOARD) {
|
if(clipboardID >= ewol::clipBoard::clipboardCount) {
|
||||||
EWOL_WARNING("request ClickBoard id error");
|
EWOL_WARNING("request ClickBoard id error");
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
@ -106,3 +135,4 @@ etk::UString ewol::clipBoard::Get(ewol::clipBoard::clipboardListe_te clipboardID
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
|||||||
#ifndef __EWOL_CLIPBOARD_H__
|
#ifndef __EWOL_CLIPBOARD_H__
|
||||||
#define __EWOL_CLIPBOARD_H__
|
#define __EWOL_CLIPBOARD_H__
|
||||||
|
|
||||||
#include <ewol/Debug.h>
|
#include <ewol/debug.h>
|
||||||
#include <etk/UString.h>
|
#include <etk/UString.h>
|
||||||
|
|
||||||
|
|
||||||
@ -17,57 +17,47 @@ namespace ewol {
|
|||||||
namespace clipBoard
|
namespace clipBoard
|
||||||
{
|
{
|
||||||
typedef enum {
|
typedef enum {
|
||||||
CLIPBOARD_0, //!< Internal clipboard 0
|
clipboard0, //!< Internal clipboard 0
|
||||||
CLIPBOARD_1, //!< Internal clipboard 1
|
clipboard1, //!< Internal clipboard 1
|
||||||
CLIPBOARD_2, //!< Internal clipboard 2
|
clipboard2, //!< Internal clipboard 2
|
||||||
CLIPBOARD_3, //!< Internal clipboard 3
|
clipboard3, //!< Internal clipboard 3
|
||||||
CLIPBOARD_4, //!< Internal clipboard 4
|
clipboard4, //!< Internal clipboard 4
|
||||||
CLIPBOARD_5, //!< Internal clipboard 5
|
clipboard5, //!< Internal clipboard 5
|
||||||
CLIPBOARD_6, //!< Internal clipboard 6
|
clipboard6, //!< Internal clipboard 6
|
||||||
CLIPBOARD_7, //!< Internal clipboard 7
|
clipboard7, //!< Internal clipboard 7
|
||||||
CLIPBOARD_8, //!< Internal clipboard 8
|
clipboard8, //!< Internal clipboard 8
|
||||||
CLIPBOARD_9, //!< Internal clipboard 9
|
clipboard9, //!< Internal clipboard 9
|
||||||
CLIPBOARD_STD, //!< External clipboard represent the Copy/Cut/Past buffer
|
clipboardStd, //!< External clipboard represent the Copy/Cut/Past buffer
|
||||||
CLIPBOARD_SELECTION, //!< External or internal clipboard depending on the OS, represent the middle button
|
clipboardSelection, //!< External or internal clipboard depending on the OS, represent the middle button
|
||||||
TOTAL_OF_CLICKBOARD, //!< Total number of clipboard
|
clipboardCount, //!< Total number of clipboard
|
||||||
} clipboardListe_te;
|
} clipboardListe_te;
|
||||||
/**
|
|
||||||
* @brief Initialize the clipboard system (done by ewol)
|
|
||||||
* @param ---
|
|
||||||
* @return ---
|
|
||||||
*/
|
|
||||||
void Init(void);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Un-Initialize the clipboard system (done by ewol)
|
* @brief Debug operator To display the curent element in a Human redeable information
|
||||||
* @param ---
|
|
||||||
* @return ---
|
|
||||||
*/
|
*/
|
||||||
void UnInit(void);
|
etk::CCout& operator <<(etk::CCout &os, const ewol::clipBoard::clipboardListe_te obj);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Set the string data on a specific clipboard. The Gui system is notify that the clipboard "SELECTION" and "COPY" are change
|
* @brief Set the string data on a specific clipboard. The Gui system is notify that the clipboard "SELECTION" and "COPY" are change
|
||||||
* @param[in] clipboardID Select the specific ID of the clipboard
|
* @param[in] clipboardID Select the specific ID of the clipboard
|
||||||
* @param[in] data The string that might be send to the clipboard
|
* @param[in] data The string that might be send to the clipboard
|
||||||
* @return ---
|
|
||||||
*/
|
*/
|
||||||
void Set(ewol::clipBoard::clipboardListe_te clipboardID, etk::UString &data);
|
void Set(ewol::clipBoard::clipboardListe_te clipboardID, etk::UString &data);
|
||||||
/**
|
/**
|
||||||
* @brief Call system to request the current clipboard.
|
* @brief Call system to request the current clipboard.
|
||||||
* @note Due to some system that manage the clipboard request asynchronous (like X11) and ewol managing the system with only one thread,
|
* @note Due to some system that manage the clipboard request asynchronous (like X11) and ewol managing the system with only one thread,
|
||||||
* we need the call the system to send us the buffer, this is really ambigous, but the widget (who has focus) receive the
|
* we need the call the system to send us the buffer, this is really ambigous, but the widget (who has focus) receive the
|
||||||
* notification of the arrival of this buffer id
|
* notification of the arrival of this buffer id
|
||||||
* @param[in] clipboardID the needed clipboard ID
|
* @param[in] clipboardID the needed clipboard ID
|
||||||
* @return ---
|
|
||||||
*/
|
*/
|
||||||
void Request(ewol::clipBoard::clipboardListe_te clipboardID);
|
void Request(ewol::clipBoard::clipboardListe_te clipboardID);
|
||||||
/**
|
/**
|
||||||
* @brief Set the ewol internal buffer (no notification at the GUI). This fuction might be use by the
|
* @brief Set the ewol internal buffer (no notification at the GUI). This fuction might be use by the
|
||||||
* Gui abstraction to set the buffer we receive. The end user must not use it.
|
* Gui abstraction to set the buffer we receive. The end user must not use it.
|
||||||
* @param[in] clipboardID selected clipboard ID
|
* @param[in] clipboardID selected clipboard ID
|
||||||
* @param[in] data new buffer data
|
* @param[in] data new buffer data
|
||||||
* @return ---
|
|
||||||
*/
|
*/
|
||||||
void SetSystem(ewol::clipBoard::clipboardListe_te clipboardID, etk::UString &data);
|
void SetSystem(ewol::clipBoard::clipboardListe_te clipboardID, etk::UString &data);
|
||||||
/**
|
/**
|
||||||
* @brief Get the ewol internal buffer of the curent clipboard. The end user can use it when he receive the event in
|
* @brief Get the ewol internal buffer of the curent clipboard. The end user can use it when he receive the event in
|
||||||
* the widget : @ref OnEventClipboard ==> we can nothe this function is the only one which permit it.
|
* the widget : @ref OnEventClipboard ==> we can nothe this function is the only one which permit it.
|
||||||
@ -76,6 +66,17 @@ namespace ewol {
|
|||||||
* @return the requested buffer
|
* @return the requested buffer
|
||||||
*/
|
*/
|
||||||
etk::UString Get(ewol::clipBoard::clipboardListe_te clipboardID);
|
etk::UString Get(ewol::clipBoard::clipboardListe_te clipboardID);
|
||||||
|
|
||||||
|
// internal section
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Initialize the clipboard system (done by ewol)
|
||||||
|
*/
|
||||||
|
void Init(void);
|
||||||
|
/**
|
||||||
|
* @brief Un-Initialize the clipboard system (done by ewol)
|
||||||
|
*/
|
||||||
|
void UnInit(void);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
@ -0,0 +1,42 @@
|
|||||||
|
/**
|
||||||
|
* @author Edouard DUPIN
|
||||||
|
*
|
||||||
|
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||||
|
*
|
||||||
|
* @license BSD v3 (see license file)
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <ewol/commandLine.h>
|
||||||
|
#include <etk/Vector.h>
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------------
|
||||||
|
// Command line arguments
|
||||||
|
// ------------------------------------------------------------------------
|
||||||
|
|
||||||
|
static etk::Vector<etk::UString> listArgs;
|
||||||
|
|
||||||
|
|
||||||
|
void ewol::commandLine::Clean(void)
|
||||||
|
{
|
||||||
|
listArgs.Clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t ewol::commandLine::Size(void)
|
||||||
|
{
|
||||||
|
return listArgs.Size();
|
||||||
|
}
|
||||||
|
|
||||||
|
etk::UString ewol::commandLine::Get(int32_t id)
|
||||||
|
{
|
||||||
|
if (id<0 && id>=listArgs.Size()) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
return listArgs[id];
|
||||||
|
}
|
||||||
|
|
||||||
|
void ewol::commandLine::Add(etk::UString& newElement)
|
||||||
|
{
|
||||||
|
listArgs.PushBack(newElement);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -9,6 +9,9 @@
|
|||||||
#ifndef __EWOL_COMMAND_LINE_H__
|
#ifndef __EWOL_COMMAND_LINE_H__
|
||||||
#define __EWOL_COMMAND_LINE_H__
|
#define __EWOL_COMMAND_LINE_H__
|
||||||
|
|
||||||
|
#include <etk/Types.h>
|
||||||
|
#include <etk/UString.h>
|
||||||
|
|
||||||
namespace ewol
|
namespace ewol
|
||||||
{
|
{
|
||||||
namespace commandLine {
|
namespace commandLine {
|
||||||
|
@ -1,24 +0,0 @@
|
|||||||
/**
|
|
||||||
* @author Edouard DUPIN
|
|
||||||
*
|
|
||||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
|
||||||
*
|
|
||||||
* @license BSD v3 (see license file)
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __EWOL_DRAW_BITMAP_H__
|
|
||||||
#define __EWOL_DRAW_BITMAP_H__
|
|
||||||
|
|
||||||
namespace ewol
|
|
||||||
{
|
|
||||||
class DrawBitmap : public ewol::Compositing
|
|
||||||
{
|
|
||||||
protected:
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -15,7 +15,7 @@ static etk::UString l_fontConfigFolder = "DATA::fonts";
|
|||||||
static etk::UString l_fontConfigName = "Arial";
|
static etk::UString l_fontConfigName = "Arial";
|
||||||
static int32_t l_fontConfigSize = 10;
|
static int32_t l_fontConfigSize = 10;
|
||||||
|
|
||||||
void ewol::config_PRIVATE::Init(void)
|
void ewol::config::Init(void)
|
||||||
{
|
{
|
||||||
// reset font properties
|
// reset font properties
|
||||||
l_fontConfigFolder = "DATA::fonts";
|
l_fontConfigFolder = "DATA::fonts";
|
||||||
@ -24,7 +24,7 @@ void ewol::config_PRIVATE::Init(void)
|
|||||||
ewol::FreeTypeInit();
|
ewol::FreeTypeInit();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::config_PRIVATE::UnInit(void)
|
void ewol::config::UnInit(void)
|
||||||
{
|
{
|
||||||
// UnInit FreeTypes
|
// UnInit FreeTypes
|
||||||
ewol::FreeTypeUnInit();
|
ewol::FreeTypeUnInit();
|
||||||
|
@ -34,9 +34,10 @@ namespace ewol
|
|||||||
* @return the font size.
|
* @return the font size.
|
||||||
*/
|
*/
|
||||||
int32_t FontGetDefaultSize(void);
|
int32_t FontGetDefaultSize(void);
|
||||||
};
|
|
||||||
namespace config_PRIVATE
|
|
||||||
{
|
// Internal section :
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Init the configuration
|
* Init the configuration
|
||||||
*/
|
*/
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
#ifndef __EWOL_DEBUG_H__
|
#ifndef __EWOL_DEBUG_H__
|
||||||
#define __EWOL_DEBUG_H__
|
#define __EWOL_DEBUG_H__
|
||||||
|
|
||||||
#include <etk/Types.h>
|
#include <etk/types.h>
|
||||||
#include <etk/Debug.h>
|
#include <etk/Debug.h>
|
||||||
|
|
||||||
extern const char * ewolLibName;
|
extern const char * ewolLibName;
|
@ -9,7 +9,7 @@
|
|||||||
#ifndef __EWOL_E_OBJECT_H__
|
#ifndef __EWOL_E_OBJECT_H__
|
||||||
#define __EWOL_E_OBJECT_H__
|
#define __EWOL_E_OBJECT_H__
|
||||||
|
|
||||||
#include <etk/Types.h>
|
#include <etk/types.h>
|
||||||
#include <etk/UString.h>
|
#include <etk/UString.h>
|
||||||
#include <etk/Vector.h>
|
#include <etk/Vector.h>
|
||||||
|
|
||||||
|
@ -9,8 +9,7 @@
|
|||||||
#ifndef __EWOL_E_OBJECT_MANAGER_H__
|
#ifndef __EWOL_E_OBJECT_MANAGER_H__
|
||||||
#define __EWOL_E_OBJECT_MANAGER_H__
|
#define __EWOL_E_OBJECT_MANAGER_H__
|
||||||
|
|
||||||
#include <etk/Types.h>
|
#include <etk/types.h>
|
||||||
#include <ewol/Debug.h>
|
|
||||||
#include <ewol/eObject/EObject.h>
|
#include <ewol/eObject/EObject.h>
|
||||||
|
|
||||||
namespace ewol {
|
namespace ewol {
|
||||||
|
@ -8,9 +8,9 @@
|
|||||||
|
|
||||||
#include <ewol/ewol.h>
|
#include <ewol/ewol.h>
|
||||||
#include <ewol/widget/WidgetManager.h>
|
#include <ewol/widget/WidgetManager.h>
|
||||||
#include <ewol/os/eSystem.h>
|
#include <ewol/renderer/os/eSystem.h>
|
||||||
|
|
||||||
#include <ewol/os/gui.h>
|
#include <ewol/renderer/os/gui.h>
|
||||||
|
|
||||||
#undef __class__
|
#undef __class__
|
||||||
#define __class__ "ewol"
|
#define __class__ "ewol"
|
||||||
@ -24,8 +24,13 @@ int32_t ewol::Run(int32_t argc, const char* argv[]);
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ewol::Stop(void)
|
||||||
|
{
|
||||||
|
guiInterface::Stop();
|
||||||
|
}
|
||||||
|
|
||||||
void ewol::DisplayWindows(ewol::Windows * windows)
|
|
||||||
|
void ewol::WindowsSet(ewol::Windows * windows)
|
||||||
{
|
{
|
||||||
// Remove current Focus :
|
// Remove current Focus :
|
||||||
ewol::widgetManager::FocusSetDefault(NULL);
|
ewol::widgetManager::FocusSetDefault(NULL);
|
||||||
@ -36,108 +41,7 @@ void ewol::DisplayWindows(ewol::Windows * windows)
|
|||||||
ewol::widgetManager::FocusSetDefault(windows);
|
ewol::widgetManager::FocusSetDefault(windows);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ewol::WindowsPopUpAdd(ewol::Widget * tmpWidget)
|
||||||
void ewol::Stop(void)
|
|
||||||
{
|
|
||||||
guiInterface::Stop();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void ewol::ChangeSize(etk::Vector2D<int32_t> size)
|
|
||||||
{
|
|
||||||
guiInterface::ChangeSize(size);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ewol::ChangePos(etk::Vector2D<int32_t> pos)
|
|
||||||
{
|
|
||||||
guiInterface::ChangePos(pos);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ewol::GetAbsPos(etk::Vector2D<int32_t>& pos)
|
|
||||||
{
|
|
||||||
guiInterface::GetAbsPos(pos);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void ewol::KeyboardShow(void)
|
|
||||||
{
|
|
||||||
guiInterface::KeyboardShow();
|
|
||||||
}
|
|
||||||
|
|
||||||
void ewol::KeyboardHide(void)
|
|
||||||
{
|
|
||||||
guiInterface::KeyboardHide();
|
|
||||||
}
|
|
||||||
|
|
||||||
void ewol::ForceRedrawAll(void)
|
|
||||||
{
|
|
||||||
eSystem::ForceRedrawAll();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
ewol::specialKey_ts specialCurrentKey;
|
|
||||||
|
|
||||||
bool ewol::IsSetCapsLock(void)
|
|
||||||
{
|
|
||||||
return specialCurrentKey.capLock;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ewol::IsSetShift(void)
|
|
||||||
{
|
|
||||||
return specialCurrentKey.shift;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ewol::IsSetCtrl(void)
|
|
||||||
{
|
|
||||||
return specialCurrentKey.ctrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ewol::IsSetMeta(void)
|
|
||||||
{
|
|
||||||
return specialCurrentKey.meta;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ewol::IsSetAlt(void)
|
|
||||||
{
|
|
||||||
return specialCurrentKey.alt;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ewol::IsSetAltGr(void)
|
|
||||||
{
|
|
||||||
return specialCurrentKey.altGr;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ewol::IsSetVerNum(void)
|
|
||||||
{
|
|
||||||
return specialCurrentKey.verNum;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ewol::IsSetInsert(void)
|
|
||||||
{
|
|
||||||
return specialCurrentKey.insert;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
etk::UString ewol::GetVersion(void)
|
|
||||||
{
|
|
||||||
return EWOL_VERSION_TAG_NAME;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int32_t ewol::GetCurrentWidth(void)
|
|
||||||
{
|
|
||||||
etk::Vector2D<int32_t> tmpSize = eSystem::GetSize();
|
|
||||||
return tmpSize.x;
|
|
||||||
}
|
|
||||||
|
|
||||||
int32_t ewol::GetCurrentHeight(void)
|
|
||||||
{
|
|
||||||
etk::Vector2D<int32_t> tmpSize = eSystem::GetSize();
|
|
||||||
return tmpSize.y;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void ewol::PopUpWidgetPush(ewol::Widget * tmpWidget)
|
|
||||||
{
|
{
|
||||||
ewol::Windows* tmpWindows = eSystem::GetCurrentWindows();
|
ewol::Windows* tmpWindows = eSystem::GetCurrentWindows();
|
||||||
if (NULL != tmpWindows && NULL != tmpWidget) {
|
if (NULL != tmpWindows && NULL != tmpWidget) {
|
||||||
@ -145,11 +49,48 @@ void ewol::PopUpWidgetPush(ewol::Widget * tmpWidget)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ewol::ChangeSize(etkVector2D<int32_t> size)
|
||||||
|
{
|
||||||
|
guiInterface::ChangeSize(size);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ewol::ChangePos(etkVector2D<int32_t> pos)
|
||||||
|
{
|
||||||
|
guiInterface::ChangePos(pos);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ewol::ForceRedrawAll(void)
|
||||||
|
{
|
||||||
|
eSystem::ForceRedrawAll();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ewol::RequestUpdateSize(void)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void ewol::Keyboard(bool hide)
|
||||||
|
{
|
||||||
|
if (true == hide) {
|
||||||
|
guiInterface::KeyboardHide();
|
||||||
|
} else {
|
||||||
|
guiInterface::KeyboardShow();
|
||||||
|
}
|
||||||
|
}
|
||||||
void ewol::SetTitle(etk::UString title)
|
void ewol::SetTitle(etk::UString title)
|
||||||
{
|
{
|
||||||
guiInterface::SetTitle(title);
|
guiInterface::SetTitle(title);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
etk::UString ewol::GetVersion(void)
|
||||||
|
{
|
||||||
|
return EWOL_VERSION_TAG_NAME;
|
||||||
|
}
|
||||||
|
|
||||||
|
int64_t ewol::GetTime(void)
|
||||||
|
{
|
||||||
|
return guiInterface::GetTime();
|
||||||
|
}
|
||||||
|
|
||||||
void ewol::InputEventTransfertWidget(ewol::Widget* source, ewol::Widget* destination)
|
void ewol::InputEventTransfertWidget(ewol::Widget* source, ewol::Widget* destination)
|
||||||
{
|
{
|
||||||
@ -162,53 +103,6 @@ void ewol::ForceOrientation(ewol::orientation_te orientation)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------
|
|
||||||
// Command line arguments
|
|
||||||
// ------------------------------------------------------------------------
|
|
||||||
|
|
||||||
static etk::Vector<etk::UString*> listArgs;
|
|
||||||
|
|
||||||
void ewol::CmdLine::Clean(void)
|
|
||||||
{
|
|
||||||
for (int32_t iii=0; iii<listArgs.Size(); iii++) {
|
|
||||||
if (NULL != listArgs[iii]) {
|
|
||||||
delete listArgs[iii];
|
|
||||||
listArgs[iii] = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
listArgs.Clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
int32_t ewol::CmdLine::Nb(void)
|
|
||||||
{
|
|
||||||
return listArgs.Size();
|
|
||||||
}
|
|
||||||
|
|
||||||
etk::UString ewol::CmdLine::Get(int32_t id)
|
|
||||||
{
|
|
||||||
if (id<0 && id>=listArgs.Size()) {
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
if (NULL == listArgs[id]) {
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
return *listArgs[id];
|
|
||||||
}
|
|
||||||
|
|
||||||
void ewol::CmdLine::Add(etk::UString& newElement)
|
|
||||||
{
|
|
||||||
etk::UString* tmpString = new etk::UString(newElement);
|
|
||||||
if (NULL != tmpString) {
|
|
||||||
listArgs.PushBack(tmpString);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int64_t ewol::GetTime(void)
|
|
||||||
{
|
|
||||||
return guiInterface::GetTime();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
#ifndef __EWOL_H__
|
#ifndef __EWOL_H__
|
||||||
#define __EWOL_H__
|
#define __EWOL_H__
|
||||||
|
|
||||||
#include <etk/Types.h>
|
#include <etk/types.h>
|
||||||
#include <etk/UString.h>
|
#include <etk/UString.h>
|
||||||
#include <ewol/widget/Widget.h>
|
#include <ewol/widget/Widget.h>
|
||||||
#include <ewol/widget/Windows.h>
|
#include <ewol/widget/Windows.h>
|
||||||
|
@ -6,176 +6,101 @@
|
|||||||
* @license BSD v3 (see license file)
|
* @license BSD v3 (see license file)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
etk::CCout& ewol::keyEvent::operator <<(etk::CCout &os, const ewol::keyEvent::event_te obj)
|
#include <ewol/key.h>
|
||||||
|
|
||||||
|
static const char* statusDescriptionString[statusCount] = {
|
||||||
|
"statusUnknow",
|
||||||
|
"statusDown",
|
||||||
|
"statusMove",
|
||||||
|
"statusSingle",
|
||||||
|
"statusDouble",
|
||||||
|
"statusTriple",
|
||||||
|
"statusQuad",
|
||||||
|
"statusQuinte",
|
||||||
|
"statusUp",
|
||||||
|
"statusEnter",
|
||||||
|
"statusLeave",
|
||||||
|
"statusAbort",
|
||||||
|
"statusTransfer",
|
||||||
|
"statusCount"
|
||||||
|
};
|
||||||
|
|
||||||
|
etk::CCout& ewol::keyEvent::operator <<(etk::CCout &os, const ewol::keyEvent::status_te obj)
|
||||||
{
|
{
|
||||||
switch(obj) {
|
if (obj>=0 && obj <statusCount) {
|
||||||
default:
|
os << statusDescriptionString[obj];
|
||||||
case ewol::keyEvent::None :
|
} else {
|
||||||
os << "None";
|
os << "[ERROR]";
|
||||||
break;
|
|
||||||
case ewol::keyEvent::MouseDown :
|
|
||||||
os << "MouseDown";
|
|
||||||
break;
|
|
||||||
case ewol::keyEvent::MouseMove :
|
|
||||||
os << "MouseMove";
|
|
||||||
break;
|
|
||||||
case ewol::keyEvent::MouseSingle :
|
|
||||||
os << "MouseSingle";
|
|
||||||
break;
|
|
||||||
case ewol::keyEvent::MouseDouble :
|
|
||||||
os << "MouseDouble";
|
|
||||||
break;
|
|
||||||
case ewol::keyEvent::MouseTriple :
|
|
||||||
os << "MouseTriple";
|
|
||||||
break;
|
|
||||||
case ewol::keyEvent::MouseQuad :
|
|
||||||
os << "MouseQuad";
|
|
||||||
break;
|
|
||||||
case ewol::keyEvent::MouseQuinte :
|
|
||||||
os << "MouseQuinte";
|
|
||||||
break;
|
|
||||||
case ewol::keyEvent::MouseUp :
|
|
||||||
os << "MouseUp";
|
|
||||||
break;
|
|
||||||
case ewol::keyEvent::MouseEnter :
|
|
||||||
os << "MouseEnter";
|
|
||||||
break;
|
|
||||||
case ewol::keyEvent::MouseLeave :
|
|
||||||
os << "MouseLeave";
|
|
||||||
break;
|
|
||||||
case ewol::keyEvent::MouseAbort :
|
|
||||||
os << "MouseAbort";
|
|
||||||
break;
|
|
||||||
case ewol::keyEvent::MouseTransfer :
|
|
||||||
os << "MouseTransfer";
|
|
||||||
break;
|
|
||||||
case ewol::keyEvent::KeyboardLeft :
|
|
||||||
os << "KeyboardLeft";
|
|
||||||
break;
|
|
||||||
case ewol::keyEvent::KeyboardRight :
|
|
||||||
os << "KeyboardRight";
|
|
||||||
break;
|
|
||||||
case ewol::keyEvent::KeyboardUp :
|
|
||||||
os << "KeyboardUp";
|
|
||||||
break;
|
|
||||||
case ewol::keyEvent::KeyboardDown :
|
|
||||||
os << "KeyboardDown";
|
|
||||||
break;
|
|
||||||
case ewol::keyEvent::KeyboardPageUp :
|
|
||||||
os << "KeyboardPageUp";
|
|
||||||
break;
|
|
||||||
case ewol::keyEvent::KeyboardPageDown :
|
|
||||||
os << "KeyboardPageDown";
|
|
||||||
break;
|
|
||||||
case ewol::keyEvent::KeyboardStart :
|
|
||||||
os << "KeyboardStart";
|
|
||||||
break;
|
|
||||||
case ewol::keyEvent::KeyboardEnd :
|
|
||||||
os << "KeyboardEnd";
|
|
||||||
break;
|
|
||||||
case ewol::keyEvent::KeyboardCenter :
|
|
||||||
os << "KeyboardCenter";
|
|
||||||
break;
|
|
||||||
case ewol::keyEvent::KeyboardStopDefil :
|
|
||||||
os << "KeyboardStopDefil";
|
|
||||||
break;
|
|
||||||
case ewol::keyEvent::KeyboardWait :
|
|
||||||
os << "KeyboardWait";
|
|
||||||
break;
|
|
||||||
case ewol::keyEvent::KeyboardInsert :
|
|
||||||
os << "KeyboardInsert";
|
|
||||||
break;
|
|
||||||
case ewol::keyEvent::KeyboardF1 :
|
|
||||||
os << "KeyboardF1";
|
|
||||||
break;
|
|
||||||
case ewol::keyEvent::KeyboardF2 :
|
|
||||||
os << "KeyboardF2";
|
|
||||||
break;
|
|
||||||
case ewol::keyEvent::KeyboardF3 :
|
|
||||||
os << "KeyboardF3";
|
|
||||||
break;
|
|
||||||
case ewol::keyEvent::KeyboardF4 :
|
|
||||||
os << "KeyboardF4";
|
|
||||||
break;
|
|
||||||
case ewol::keyEvent::KeyboardF5 :
|
|
||||||
os << "KeyboardF5";
|
|
||||||
break;
|
|
||||||
case ewol::keyEvent::KeyboardF6 :
|
|
||||||
os << "KeyboardF6";
|
|
||||||
break;
|
|
||||||
case ewol::keyEvent::KeyboardF7 :
|
|
||||||
os << "KeyboardF7";
|
|
||||||
break;
|
|
||||||
case ewol::keyEvent::KeyboardF8 :
|
|
||||||
os << "KeyboardF8";
|
|
||||||
break;
|
|
||||||
case ewol::keyEvent::KeyboardF9 :
|
|
||||||
os << "KeyboardF9";
|
|
||||||
break;
|
|
||||||
case ewol::keyEvent::KeyboardF10 :
|
|
||||||
os << "KeyboardF10";
|
|
||||||
break;
|
|
||||||
case ewol::keyEvent::KeyboardF11 :
|
|
||||||
os << "KeyboardF11";
|
|
||||||
break;
|
|
||||||
case ewol::keyEvent::KeyboardF12 :
|
|
||||||
os << "KeyboardF12";
|
|
||||||
break;
|
|
||||||
case ewol::keyEvent::KeyboardCapLock :
|
|
||||||
os << "KeyboardCapLock";
|
|
||||||
break;
|
|
||||||
case ewol::keyEvent::KeyboardShiftLeft :
|
|
||||||
os << "KeyboardShiftLeft";
|
|
||||||
break;
|
|
||||||
case ewol::keyEvent::KeyboardShiftRight :
|
|
||||||
os << "KeyboardShiftRight";
|
|
||||||
break;
|
|
||||||
case ewol::keyEvent::KeyboardCtrlLeft :
|
|
||||||
os << "KeyboardCtrlLeft";
|
|
||||||
break;
|
|
||||||
case ewol::keyEvent::KeyboardCtrlRight :
|
|
||||||
os << "KeyboardCtrlRight";
|
|
||||||
break;
|
|
||||||
case ewol::keyEvent::KeyboardMetaLeft :
|
|
||||||
os << "KeyboardMetaLeft";
|
|
||||||
break;
|
|
||||||
case ewol::keyEvent::KeyboardMetaRight :
|
|
||||||
os << "KeyboardMetaRight";
|
|
||||||
break;
|
|
||||||
case ewol::keyEvent::KeyboardAlt :
|
|
||||||
os << "KeyboardAlt";
|
|
||||||
break;
|
|
||||||
case ewol::keyEvent::KeyboardAltGr :
|
|
||||||
os << "KeyboardAltGr";
|
|
||||||
break;
|
|
||||||
case ewol::keyEvent::KeyboardContextMenu :
|
|
||||||
os << "KeyboardContextMenu";
|
|
||||||
break;
|
|
||||||
case ewol::keyEvent::KeyboardVerNum :
|
|
||||||
os << "KeyboardVerNum";
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
return os;
|
return os;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static const char* keyboardDescriptionString[keyboardCount] = {
|
||||||
|
"keyboardUnknow",
|
||||||
|
"keyboardLeft",
|
||||||
|
"keyboardRight",
|
||||||
|
"keyboardUp",
|
||||||
|
"keyboardDown",
|
||||||
|
"keyboardPageUp",
|
||||||
|
"keyboardPageDown",
|
||||||
|
"keyboardStart",
|
||||||
|
"keyboardEnd",
|
||||||
|
"keyboardCenter",
|
||||||
|
"keyboardStopDefil",
|
||||||
|
"keyboardWait",
|
||||||
|
"keyboardInsert",
|
||||||
|
"keyboardF1",
|
||||||
|
"keyboardF2",
|
||||||
|
"keyboardF3",
|
||||||
|
"keyboardF4",
|
||||||
|
"keyboardF5",
|
||||||
|
"keyboardF6",
|
||||||
|
"keyboardF7",
|
||||||
|
"keyboardF8",
|
||||||
|
"keyboardF9",
|
||||||
|
"keyboardF10",
|
||||||
|
"keyboardF11",
|
||||||
|
"keyboardF12",
|
||||||
|
"keyboardCapLock",
|
||||||
|
"keyboardShiftLeft",
|
||||||
|
"keyboardShiftRight",
|
||||||
|
"keyboardCtrlLeft",
|
||||||
|
"keyboardCtrlRight",
|
||||||
|
"keyboardMetaLeft",
|
||||||
|
"keyboardMetaRight",
|
||||||
|
"keyboardAlt",
|
||||||
|
"keyboardAltGr",
|
||||||
|
"keyboardContextMenu",
|
||||||
|
"keyboardVerNum",
|
||||||
|
"keyboardCount"
|
||||||
|
};
|
||||||
|
|
||||||
|
etk::CCout& ewol::keyEvent::operator <<(etk::CCout &os, const ewol::keyEvent::keyboard_te obj)
|
||||||
|
{
|
||||||
|
if (obj>=0 && obj <keyboardCount) {
|
||||||
|
os << keyboardDescriptionString[obj];
|
||||||
|
} else {
|
||||||
|
os << "[ERROR]";
|
||||||
|
}
|
||||||
|
return os;
|
||||||
}
|
}
|
||||||
|
|
||||||
etk::CCout& ewol::keyEvent::operator <<(etk::CCout &os, const ewol::keyEvent::input_te obj)
|
|
||||||
|
static const char* typeDescriptionString[typeCount] = {
|
||||||
|
"typeUnknow",
|
||||||
|
"typeMouse",
|
||||||
|
"typeFinger",
|
||||||
|
"typeStylet",
|
||||||
|
"typeCount"
|
||||||
|
};
|
||||||
|
|
||||||
|
etk::CCout& ewol::keyEvent::operator <<(etk::CCout &os, const ewol::keyEvent::type_te obj)
|
||||||
{
|
{
|
||||||
switch(obj) {
|
if (obj>=0 && obj < typeCount) {
|
||||||
default:
|
os << typeDescriptionString[obj];
|
||||||
case ewol::keyEvent::NoUnknowne :
|
} else {
|
||||||
os << "Unknow";
|
os << "[ERROR]";
|
||||||
break;
|
|
||||||
case ewol::keyEvent::Mouse :
|
|
||||||
os << "Mouse";
|
|
||||||
break;
|
|
||||||
case ewol::keyEvent::Finger :
|
|
||||||
os << "Finger";
|
|
||||||
break;
|
|
||||||
case ewol::keyEvent::Stylet :
|
|
||||||
os << "Stylet";
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
return os;
|
return os;
|
||||||
}
|
}
|
||||||
|
@ -9,80 +9,97 @@
|
|||||||
#ifndef __EWOL_KEY_H__
|
#ifndef __EWOL_KEY_H__
|
||||||
#define __EWOL_KEY_H__
|
#define __EWOL_KEY_H__
|
||||||
|
|
||||||
#include <etk/Types.h>
|
#include <etk/types.h>
|
||||||
#include <etk/Stream.h>
|
#include <etk/Stream.h>
|
||||||
|
|
||||||
namespace ewol
|
namespace ewol
|
||||||
{
|
{
|
||||||
namespace keyEvent
|
namespace keyEvent
|
||||||
{
|
{
|
||||||
// event from all the type of input :
|
/**
|
||||||
|
* @brief type of input : Note that the keyboard is not prevent due to the fact that data is too different
|
||||||
|
*/
|
||||||
typedef enum {
|
typedef enum {
|
||||||
None,
|
typeUnknow = 0,
|
||||||
MouseDown,
|
typeMouse,
|
||||||
MouseMove,
|
typeFinger,
|
||||||
MouseSingle,
|
typeStylet,
|
||||||
MouseDouble,
|
typeCount
|
||||||
MouseTriple,
|
} type_te;
|
||||||
MouseQuad,
|
|
||||||
MouseQuinte,
|
|
||||||
MouseUp,
|
|
||||||
MouseEnter,
|
|
||||||
MouseLeave,
|
|
||||||
MouseAbort, // Appeare when an event is tranfert betwwen widgets (the widget which receive this has lost the events)
|
|
||||||
MouseTransfer, // Appeare when an event is tranfert betwwen widgets (the widget which receive this has receive the transfert of the event)
|
|
||||||
KeyboardLeft,
|
|
||||||
KeyboardRight,
|
|
||||||
KeyboardUp,
|
|
||||||
KeyboardDown,
|
|
||||||
KeyboardPageUp,
|
|
||||||
KeyboardPageDown,
|
|
||||||
KeyboardStart,
|
|
||||||
KeyboardEnd,
|
|
||||||
KeyboardCenter,
|
|
||||||
KeyboardStopDefil,
|
|
||||||
KeyboardWait,
|
|
||||||
KeyboardInsert,
|
|
||||||
KeyboardF1,
|
|
||||||
KeyboardF2,
|
|
||||||
KeyboardF3,
|
|
||||||
KeyboardF4,
|
|
||||||
KeyboardF5,
|
|
||||||
KeyboardF6,
|
|
||||||
KeyboardF7,
|
|
||||||
KeyboardF8,
|
|
||||||
KeyboardF9,
|
|
||||||
KeyboardF10,
|
|
||||||
KeyboardF11,
|
|
||||||
KeyboardF12,
|
|
||||||
KeyboardCapLock,
|
|
||||||
KeyboardShiftLeft,
|
|
||||||
KeyboardShiftRight,
|
|
||||||
KeyboardCtrlLeft,
|
|
||||||
KeyboardCtrlRight,
|
|
||||||
KeyboardMetaLeft,
|
|
||||||
KeyboardMetaRight,
|
|
||||||
KeyboardAlt,
|
|
||||||
KeyboardAltGr,
|
|
||||||
KeyboardContextMenu,
|
|
||||||
KeyboardVerNum,
|
|
||||||
} event_te;
|
|
||||||
/**
|
/**
|
||||||
* @brief Debug operator To display the curent element in a Human redeable information
|
* @brief Debug operator To display the curent element in a Human redeable information
|
||||||
*/
|
*/
|
||||||
etk::CCout& operator <<(etk::CCout &os, const ewol::keyEvent::event_te obj);
|
etk::CCout& operator <<(etk::CCout &os, const ewol::keyEvent::type_te obj);
|
||||||
|
/**
|
||||||
|
* @brief Keybord event or joyestick event
|
||||||
|
*/
|
||||||
|
typedef enum {
|
||||||
|
statusUnknow = 0,
|
||||||
|
statusDown, // availlable on Keyboard too
|
||||||
|
statusMove,
|
||||||
|
statusSingle,
|
||||||
|
statusDouble,
|
||||||
|
statusTriple,
|
||||||
|
statusQuad,
|
||||||
|
statusQuinte,
|
||||||
|
statusUp, // availlable on Keyboard too
|
||||||
|
statusEnter,
|
||||||
|
statusLeave,
|
||||||
|
statusAbort, // Appeare when an event is tranfert betwwen widgets (the widget which receive this has lost the events)
|
||||||
|
statusTransfer, // Appeare when an event is tranfert betwwen widgets (the widget which receive this has receive the transfert of the event)
|
||||||
|
statusCount, // number max of imput possible
|
||||||
|
} status_te;
|
||||||
|
/**
|
||||||
|
* @brief Debug operator To display the curent element in a Human redeable information
|
||||||
|
*/
|
||||||
|
etk::CCout& operator <<(etk::CCout &os, const ewol::keyEvent::status_te obj);
|
||||||
|
/**
|
||||||
|
* @brief Keybord event or joyestick event
|
||||||
|
*/
|
||||||
|
typedef enum {
|
||||||
|
keyboardUnknow = 0,
|
||||||
|
keyboardLeft,
|
||||||
|
keyboardRight,
|
||||||
|
keyboardUp,
|
||||||
|
keyboardDown,
|
||||||
|
keyboardPageUp,
|
||||||
|
keyboardPageDown,
|
||||||
|
keyboardStart,
|
||||||
|
keyboardEnd,
|
||||||
|
keyboardCenter,
|
||||||
|
keyboardStopDefil,
|
||||||
|
keyboardWait,
|
||||||
|
keyboardInsert,
|
||||||
|
keyboardF1,
|
||||||
|
keyboardF2,
|
||||||
|
keyboardF3,
|
||||||
|
keyboardF4,
|
||||||
|
keyboardF5,
|
||||||
|
keyboardF6,
|
||||||
|
keyboardF7,
|
||||||
|
keyboardF8,
|
||||||
|
keyboardF9,
|
||||||
|
keyboardF10,
|
||||||
|
keyboardF11,
|
||||||
|
keyboardF12,
|
||||||
|
keyboardCapLock,
|
||||||
|
keyboardShiftLeft,
|
||||||
|
keyboardShiftRight,
|
||||||
|
keyboardCtrlLeft,
|
||||||
|
keyboardCtrlRight,
|
||||||
|
keyboardMetaLeft,
|
||||||
|
keyboardMetaRight,
|
||||||
|
keyboardAlt,
|
||||||
|
keyboardAltGr,
|
||||||
|
keyboardContextMenu,
|
||||||
|
keyboardVerNum,
|
||||||
|
keyboardCount
|
||||||
|
} keyboard_te;
|
||||||
|
/**
|
||||||
|
* @brief Debug operator To display the curent element in a Human redeable information
|
||||||
|
*/
|
||||||
|
etk::CCout& operator <<(etk::CCout &os, const ewol::keyEvent::keyboard_te obj);
|
||||||
|
|
||||||
// type of input : Notye that the keyboard is not prevent due to the fact that data is too different
|
|
||||||
typedef enum {
|
|
||||||
Unknow,
|
|
||||||
Mouse,
|
|
||||||
Finger,
|
|
||||||
Stylet,
|
|
||||||
} input_te;
|
|
||||||
/**
|
|
||||||
* @brief Debug operator To display the curent element in a Human redeable information
|
|
||||||
*/
|
|
||||||
etk::CCout& operator <<(etk::CCout &os, const ewol::keyEvent::input_te obj);
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -14,15 +14,14 @@
|
|||||||
namespace ewol {
|
namespace ewol {
|
||||||
class Widget;
|
class Widget;
|
||||||
};
|
};
|
||||||
#include <etk/Types.h>
|
#include <etk/types.h>
|
||||||
#include <etk/Vector.h>
|
#include <etk/Vector.h>
|
||||||
#include <ewol/Debug.h>
|
#include <etk/math/Vector2D.h>
|
||||||
#include <ewol/oObject/OObject.h>
|
#include <ewol/debug.h>
|
||||||
#include <ewol/ClipBoard.h>
|
#include <ewol/clipBoard.h>
|
||||||
|
#include <ewol/key.h>
|
||||||
|
|
||||||
namespace ewol {
|
namespace ewol {
|
||||||
char* GetCharTypeMoveEvent(eventKbMoveType_te type);
|
|
||||||
|
|
||||||
class DrawProperty{
|
class DrawProperty{
|
||||||
public :
|
public :
|
||||||
etk::Vector2D<int32_t> m_windowsSize;
|
etk::Vector2D<int32_t> m_windowsSize;
|
||||||
@ -43,12 +42,12 @@ namespace ewol {
|
|||||||
|
|
||||||
class EventShortCut {
|
class EventShortCut {
|
||||||
public:
|
public:
|
||||||
bool broadcastEvent; // if it is true, then the message is sent to all the system
|
bool broadcastEvent; // if it is true, then the message is sent to all the system
|
||||||
const char * generateEventId; // Local generated event
|
const char * generateEventId; // Local generated event
|
||||||
etk::UString eventData; // data link with the event
|
etk::UString eventData; // data link with the event
|
||||||
ewol::specialKey_ts specialKey; // special board key
|
ewol::specialKey_ts specialKey; // special board key
|
||||||
uniChar_t unicodeValue; // 0 if not used
|
uniChar_t unicodeValue; // 0 if not used
|
||||||
ewol::eventKbMoveType_te keyboardMoveValue; // ewol::EVENT_KB_MOVE_TYPE_NONE if not used
|
ewol::keyEvent::keyboard_te keyboardMoveValue; // ewol::EVENT_KB_MOVE_TYPE_NONE if not used
|
||||||
EventShortCut(void) {
|
EventShortCut(void) {
|
||||||
broadcastEvent = false;
|
broadcastEvent = false;
|
||||||
generateEventId = NULL;
|
generateEventId = NULL;
|
||||||
@ -62,7 +61,7 @@ namespace ewol {
|
|||||||
specialKey.verNum = false;
|
specialKey.verNum = false;
|
||||||
specialKey.insert = false;
|
specialKey.insert = false;
|
||||||
unicodeValue = 0;
|
unicodeValue = 0;
|
||||||
keyboardMoveValue = ewol::EVENT_KB_MOVE_TYPE_NONE;
|
keyboardMoveValue = ewol::keyEvent::keyboardUnknow;
|
||||||
};
|
};
|
||||||
~EventShortCut(void) { };
|
~EventShortCut(void) { };
|
||||||
};
|
};
|
||||||
@ -352,7 +351,7 @@ namespace ewol {
|
|||||||
* @return true the event is used
|
* @return true the event is used
|
||||||
* @return false the event is not used
|
* @return false the event is not used
|
||||||
*/
|
*/
|
||||||
virtual bool OnEventInput(ewol::inputType_te type, int32_t IdInput, eventInputType_te typeEvent, etk::Vector2D<float> pos) { return false; };
|
virtual bool OnEventInput(ewol::keyEvent::type_te type, int32_t IdInput, ewol::keyEvent::status_te typeEvent, etk::Vector2D<float> pos) { return false; };
|
||||||
/**
|
/**
|
||||||
* @brief Event on the keybord (if no shortcut has been detected before).
|
* @brief Event on the keybord (if no shortcut has been detected before).
|
||||||
* @param[in] type of the event (ewol::EVENT_KB_TYPE_DOWN or ewol::EVENT_KB_TYPE_UP)
|
* @param[in] type of the event (ewol::EVENT_KB_TYPE_DOWN or ewol::EVENT_KB_TYPE_UP)
|
||||||
@ -360,13 +359,13 @@ namespace ewol {
|
|||||||
* @return true if the event has been used
|
* @return true if the event has been used
|
||||||
* @return false if the event has not been used
|
* @return false if the event has not been used
|
||||||
*/
|
*/
|
||||||
virtual bool OnEventKb(eventKbType_te typeEvent, uniChar_t unicodeData) { return false; };
|
virtual bool OnEventKb(ewol::keyEvent::status_te typeEvent, uniChar_t unicodeData) { return false; };
|
||||||
/**
|
/**
|
||||||
* @brief Event on the keyboard that is not a printable key (if no shortcut has been detected before).
|
* @brief Event on the keyboard that is not a printable key (if no shortcut has been detected before).
|
||||||
* @return true if the event has been used
|
* @return true if the event has been used
|
||||||
* @return false if the event has not been used
|
* @return false if the event has not been used
|
||||||
*/
|
*/
|
||||||
virtual bool OnEventKbMove(eventKbType_te typeEvent, eventKbMoveType_te moveTypeEvent) { return false; };
|
virtual bool OnEventKbMove(ewol::keyEvent::status_te typeEvent, ewol::keyEvent::keyboard_te moveTypeEvent) { return false; };
|
||||||
/**
|
/**
|
||||||
* @brief Event on a past event ==> this event is asynchronous due to all system does not support direct getting datas
|
* @brief Event on a past event ==> this event is asynchronous due to all system does not support direct getting datas
|
||||||
* @note : need to have focus ...
|
* @note : need to have focus ...
|
||||||
@ -405,7 +404,7 @@ namespace ewol {
|
|||||||
* @return false if the event has not been used
|
* @return false if the event has not been used
|
||||||
* @note To prevent some error when you get an event get it if it is down and Up ... ==> like this it could not generate some ununderstanding error
|
* @note To prevent some error when you get an event get it if it is down and Up ... ==> like this it could not generate some ununderstanding error
|
||||||
*/
|
*/
|
||||||
virtual bool OnEventShortCut(ewol::specialKey_ts& special, uniChar_t unicodeValue, ewol::eventKbMoveType_te kbMove, bool isDown);
|
virtual bool OnEventShortCut(ewol::specialKey_ts& special, uniChar_t unicodeValue, ewol::keyEvent::keyboard_te kbMove, bool isDown);
|
||||||
// ----------------------------------------------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------------------------------------------
|
||||||
// -- Drawing : All drawing must be done in 2 separate buffer 1 for the current display and 1 for the working...
|
// -- Drawing : All drawing must be done in 2 separate buffer 1 for the current display and 1 for the working...
|
||||||
// ----------------------------------------------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -9,9 +9,8 @@
|
|||||||
#ifndef __EWOL_WIDGET_MANAGER_H__
|
#ifndef __EWOL_WIDGET_MANAGER_H__
|
||||||
#define __EWOL_WIDGET_MANAGER_H__
|
#define __EWOL_WIDGET_MANAGER_H__
|
||||||
|
|
||||||
#include <etk/Types.h>
|
#include <etk/types.h>
|
||||||
#include <ewol/Debug.h>
|
#include <ewol/debug.h>
|
||||||
#include <ewol/oObject/OObject.h>
|
|
||||||
#include <etk/Vector.h>
|
#include <etk/Vector.h>
|
||||||
#include <ewol/widget/Widget.h>
|
#include <ewol/widget/Widget.h>
|
||||||
|
|
||||||
|
@ -9,9 +9,8 @@
|
|||||||
#ifndef __EWOL_WINDOWS_H__
|
#ifndef __EWOL_WINDOWS_H__
|
||||||
#define __EWOL_WINDOWS_H__
|
#define __EWOL_WINDOWS_H__
|
||||||
|
|
||||||
#include <etk/Types.h>
|
#include <etk/types.h>
|
||||||
#include <ewol/Debug.h>
|
#include <ewol/debug.h>
|
||||||
#include <etk/Vector.h>
|
|
||||||
#include <ewol/widget/Widget.h>
|
#include <ewol/widget/Widget.h>
|
||||||
|
|
||||||
namespace ewol {
|
namespace ewol {
|
||||||
|
@ -1,38 +1,43 @@
|
|||||||
|
|
||||||
# Basic elements
|
# Basic elements
|
||||||
FILE_LIST = ewol/ewol.cpp \
|
FILE_LIST:= ewol/ewol.cpp \
|
||||||
ewol/ClipBoard.cpp \
|
ewol/clipBoard.cpp \
|
||||||
ewol/Debug.cpp \
|
ewol/debug.cpp \
|
||||||
ewol/ShortCutManager.cpp \
|
ewol/config.cpp \
|
||||||
ewol/ResourceManager.cpp \
|
ewol/commandLine.cpp \
|
||||||
ewol/SimpleConfigFile.cpp
|
ewol/key.cpp
|
||||||
|
|
||||||
FILE_LIST+= ewol/openGL/openGL.cpp \
|
|
||||||
|
#PLOPPPPP = \
|
||||||
|
ewol/renderer/ResourceManager.cpp \
|
||||||
|
ewol/renderer/resources/SimpleConfigFile.cpp
|
||||||
|
|
||||||
|
#FILE_LIST+= ewol/openGL/openGL.cpp \
|
||||||
ewol/openGL/Shader.cpp \
|
ewol/openGL/Shader.cpp \
|
||||||
ewol/openGL/Program.cpp \
|
ewol/openGL/Program.cpp \
|
||||||
ewol/openGL/VirtualBufferObject.cpp
|
ewol/openGL/VirtualBufferObject.cpp
|
||||||
|
|
||||||
|
|
||||||
# Gui interface
|
# Gui interface
|
||||||
FILE_LIST+= ewol/os/eSystem.cpp \
|
#FILE_LIST+= ewol/os/eSystem.cpp \
|
||||||
ewol/os/eSystemInput.cpp
|
ewol/os/eSystemInput.cpp
|
||||||
|
|
||||||
# Basic Eobject of EWOL
|
# Basic Eobject of EWOL
|
||||||
FILE_LIST+= ewol/eObject/EObject.cpp \
|
#FILE_LIST+= ewol/eObject/EObject.cpp \
|
||||||
ewol/eObject/EObjectManager.cpp
|
ewol/eObject/EObjectManager.cpp
|
||||||
|
|
||||||
# Game elements
|
# Game elements
|
||||||
FILE_LIST+= ewol/game/GameElement.cpp \
|
#FILE_LIST+= ewol/game/GameElement.cpp \
|
||||||
ewol/game/GameElementLua.cpp \
|
ewol/game/GameElementLua.cpp \
|
||||||
ewol/game/SceneElement.cpp
|
ewol/game/SceneElement.cpp
|
||||||
|
|
||||||
# Compositing
|
# Compositing
|
||||||
FILE_LIST+= ewol/compositing/Compositing.cpp \
|
#FILE_LIST+= ewol/compositing/Compositing.cpp \
|
||||||
ewol/compositing/Text.cpp \
|
ewol/compositing/Text.cpp \
|
||||||
ewol/compositing/Drawing.cpp
|
ewol/compositing/Drawing.cpp
|
||||||
|
|
||||||
# Object abstraction for OpenGl
|
# Object abstraction for OpenGl
|
||||||
FILE_LIST+= ewol/oObject/OObject.cpp \
|
#FILE_LIST+= ewol/oObject/OObject.cpp \
|
||||||
ewol/oObject/2DTextColored.cpp \
|
ewol/oObject/2DTextColored.cpp \
|
||||||
ewol/oObject/2DTextShader.cpp \
|
ewol/oObject/2DTextShader.cpp \
|
||||||
ewol/oObject/2DColored.cpp \
|
ewol/oObject/2DColored.cpp \
|
||||||
@ -41,25 +46,25 @@ FILE_LIST+= ewol/oObject/OObject.cpp \
|
|||||||
ewol/oObject/Sprite.cpp
|
ewol/oObject/Sprite.cpp
|
||||||
|
|
||||||
# texture management
|
# texture management
|
||||||
FILE_LIST+= ewol/texture/Texture.cpp \
|
#FILE_LIST+= ewol/texture/Texture.cpp \
|
||||||
ewol/texture/TextureFile.cpp \
|
ewol/texture/TextureFile.cpp \
|
||||||
ewol/texture/TextureBMP.cpp \
|
ewol/texture/TextureBMP.cpp \
|
||||||
ewol/texture/TexturePNG.cpp \
|
ewol/texture/TexturePNG.cpp \
|
||||||
ewol/texture/TextureSVG.cpp
|
ewol/texture/TextureSVG.cpp
|
||||||
|
|
||||||
# fonst system
|
# fonst system
|
||||||
FILE_LIST+= ewol/font/FontManager.cpp \
|
#FILE_LIST+= ewol/font/FontManager.cpp \
|
||||||
ewol/font/FontFreeType.cpp \
|
ewol/font/FontFreeType.cpp \
|
||||||
ewol/font/TexturedFont.cpp \
|
ewol/font/TexturedFont.cpp \
|
||||||
ewol/font/DistantFieldFont.cpp
|
ewol/font/DistantFieldFont.cpp
|
||||||
|
|
||||||
# Mesh management
|
# Mesh management
|
||||||
FILE_LIST+= ewol/Mesh/Mesh.cpp \
|
#FILE_LIST+= ewol/Mesh/Mesh.cpp \
|
||||||
ewol/Mesh/MeshObj.cpp
|
ewol/Mesh/MeshObj.cpp
|
||||||
|
|
||||||
|
|
||||||
# all widgets
|
# all widgets
|
||||||
FILE_LIST+= ewol/widget/Widget.cpp \
|
#FILE_LIST+= ewol/widget/Widget.cpp \
|
||||||
ewol/widget/WidgetManager.cpp \
|
ewol/widget/WidgetManager.cpp \
|
||||||
ewol/widget/Windows.cpp \
|
ewol/widget/Windows.cpp \
|
||||||
ewol/widget/Button.cpp \
|
ewol/widget/Button.cpp \
|
||||||
@ -92,7 +97,7 @@ FILE_LIST+= ewol/widget/Widget.cpp \
|
|||||||
ewol/widget/meta/ParameterList.cpp
|
ewol/widget/meta/ParameterList.cpp
|
||||||
|
|
||||||
# Audio system
|
# Audio system
|
||||||
FILE_LIST+= ewol/audio/audio.cpp \
|
#FILE_LIST+= ewol/audio/audio.cpp \
|
||||||
ewol/audio/decWav.cpp
|
ewol/audio/decWav.cpp
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user