[DEV] integarate std x11
This commit is contained in:
parent
4731dae6e4
commit
a5b44ae974
@ -226,7 +226,7 @@ bool BufferView::getElement(int32_t _colomn, int32_t _raw, etk::UString& _myText
|
||||
return true;
|
||||
}
|
||||
|
||||
bool BufferView::onItemEvent(int32_t _IdInput, ewol::keyEvent::status_te _typeEvent, int32_t _colomn, int32_t _raw, float _x, float _y)
|
||||
bool BufferView::onItemEvent(int32_t _IdInput, enum ewol::keyEvent::status _typeEvent, int32_t _colomn, int32_t _raw, float _x, float _y)
|
||||
{
|
||||
if (1 == _IdInput && _typeEvent == ewol::keyEvent::statusSingle) {
|
||||
APPL_INFO("Event on List : IdInput=" << _IdInput << " colomn=" << _colomn << " raw=" << _raw );
|
||||
|
@ -64,7 +64,7 @@ class BufferView : public widget::List
|
||||
virtual bool getTitle(int32_t _colomn, etk::UString& _myTitle, etk::Color<>& _fg, etk::Color<>& _bg);
|
||||
virtual uint32_t getNuberOfRaw(void);
|
||||
virtual bool getElement(int32_t _colomn, int32_t _raw, etk::UString& _myTextToWrite, etk::Color<>& _fg, etk::Color<>& _bg);
|
||||
virtual bool onItemEvent(int32_t _IdInput, ewol::keyEvent::status_te _typeEvent, int32_t _colomn, int32_t _raw, float _x, float _y);
|
||||
virtual bool onItemEvent(int32_t _IdInput, enum ewol::keyEvent::status _typeEvent, int32_t _colomn, int32_t _raw, float _x, float _y);
|
||||
};
|
||||
|
||||
|
||||
|
@ -308,7 +308,7 @@ void MainWindows::onReceiveMessage(const ewol::EMessage& _msg) {
|
||||
}
|
||||
// apply widget pop-up ...
|
||||
popUpWidgetPush(tmpWidget);
|
||||
tmpWidget->registerOnEvent(this, ewolEventFileChooserValidate, ednEventPopUpFileSelected);
|
||||
tmpWidget->registerOnEvent(this, widget::FileChooser::eventValidate, ednEventPopUpFileSelected);
|
||||
} else if (_msg.getMessage() == ednEventPopUpFileSelected) {
|
||||
APPL_DEBUG("Request opening the file : " << _msg.getData());
|
||||
if (m_bufferManager == NULL) {
|
||||
@ -326,7 +326,7 @@ void MainWindows::onReceiveMessage(const ewol::EMessage& _msg) {
|
||||
appl::Buffer* tmpBuffer = m_bufferManager->getBufferSelected();
|
||||
if (tmpBuffer == NULL) {
|
||||
APPL_WARNING("No buffer selected !!! ");
|
||||
createPopUpMessage(widget::Windows::messageTypeError, "No buffer selected !!!");
|
||||
createPopUpMessage(ewol::Windows::messageTypeError, "No buffer selected !!!");
|
||||
return;
|
||||
}
|
||||
// Note : for direct saving, we do not chack the saving status ==> all time saving ...
|
||||
|
@ -85,7 +85,7 @@ bool appl::TagFileList::getElement(int32_t _colomn, int32_t _raw, etk::UString&
|
||||
};
|
||||
|
||||
|
||||
bool appl::TagFileList::onItemEvent(int32_t _IdInput, ewol::keyEvent::status_te _typeEvent, int32_t _colomn, int32_t _raw, float _x, float _y) {
|
||||
bool appl::TagFileList::onItemEvent(int32_t _IdInput, enum ewol::keyEvent::status _typeEvent, int32_t _colomn, int32_t _raw, float _x, float _y) {
|
||||
if (_typeEvent == ewol::keyEvent::statusSingle) {
|
||||
EWOL_INFO("Event on List : IdInput=" << _IdInput << " colomn=" << _colomn << " raw=" << _raw );
|
||||
if (_IdInput == 1) {
|
||||
|
@ -44,7 +44,7 @@ namespace appl {
|
||||
bool getTitle(int32_t _colomn, etk::UString& _myTitle, etk::Color<>& _fg, etk::Color<>& _bg);
|
||||
uint32_t getNuberOfRaw(void);
|
||||
bool getElement(int32_t _colomn, int32_t _raw, etk::UString& _myTextToWrite, etk::Color<>& _fg, etk::Color<>& _bg);
|
||||
bool onItemEvent(int32_t _IdInput, ewol::keyEvent::status_te _typeEvent, int32_t _colomn, int32_t _raw, float _x, float _y);
|
||||
bool onItemEvent(int32_t _IdInput, enum ewol::keyEvent::status _typeEvent, int32_t _colomn, int32_t _raw, float _x, float _y);
|
||||
// derived function
|
||||
const char * const getObjectType(void) {
|
||||
return "appl::TagFileList";
|
||||
|
@ -530,7 +530,7 @@ appl::Buffer::Iterator appl::TextViewer::getMousePosition(const vec2& _relativeP
|
||||
return m_buffer->end();
|
||||
}
|
||||
|
||||
void appl::TextViewer::onEventClipboard(ewol::clipBoard::clipboardListe_te _clipboardID) {
|
||||
void appl::TextViewer::onEventClipboard(enum ewol::clipBoard::clipboardListe _clipboardID) {
|
||||
if (m_buffer != NULL) {
|
||||
etk::UString data = ewol::clipBoard::get(_clipboardID);
|
||||
write(data);
|
||||
|
@ -61,7 +61,7 @@ namespace appl {
|
||||
virtual void onObjectRemove(ewol::EObject* _removeObject);
|
||||
virtual bool onEventInput(const ewol::EventInput& _event);
|
||||
virtual bool onEventEntry(const ewol::EventEntry& _event);
|
||||
virtual void onEventClipboard(ewol::clipBoard::clipboardListe_te clipboardID);
|
||||
virtual void onEventClipboard(enum ewol::clipBoard::clipboardListe _clipboardID);
|
||||
virtual void onGetFocus(void);
|
||||
virtual void onLostFocus(void);
|
||||
private:
|
||||
|
@ -172,7 +172,7 @@ void appl::Highlight::parse(int32_t start,
|
||||
//APPL_DEBUG("Parse element in the buffer id=" << elementStart);
|
||||
//try to fond the HL in ALL of we have
|
||||
for (int32_t jjj=0; jjj<m_listHighlightPass1.size(); jjj++){
|
||||
resultFind_te ret = HLP_FIND_OK;
|
||||
enum resultFind ret = HLP_FIND_OK;
|
||||
//APPL_DEBUG("Parse HL id=" << jjj << " position search: (" << start << "," << buffer.size() << ")" );
|
||||
// Stop the search to the end (to get the end of the pattern)
|
||||
ret = m_listHighlightPass1[jjj]->find(elementStart, buffer.size(), resultat, buffer);
|
||||
@ -232,7 +232,7 @@ void appl::Highlight::parse2(int32_t start,
|
||||
//try to fond the HL in ALL of we have
|
||||
int32_t jjj;
|
||||
for (jjj=0; jjj<m_listHighlightPass2.size(); jjj++){
|
||||
resultFind_te ret = HLP_FIND_OK;
|
||||
enum resultFind ret = HLP_FIND_OK;
|
||||
//APPL_DEBUG("Parse HL id=" << jjj << " position search: (" << start << "," << buffer.size() << ")" );
|
||||
// Stop the search to the end (to get the end of the pattern)
|
||||
ret = m_listHighlightPass2[jjj]->find(elementStart, elementStop, resultat, buffer);
|
||||
|
@ -140,7 +140,7 @@ void appl::HighlightPattern::parseRules(exml::Element* _child, int32_t _level) {
|
||||
}
|
||||
|
||||
|
||||
resultFind_te appl::HighlightPattern::find(int32_t _start,
|
||||
enum resultFind appl::HighlightPattern::find(int32_t _start,
|
||||
int32_t _stop,
|
||||
appl::HighlightInfo& _resultat,
|
||||
etk::Buffer& _buffer) {
|
||||
|
@ -20,11 +20,11 @@ class HighlightPattern;
|
||||
#include <exml/exml.h>
|
||||
#include <etk/Buffer.h>
|
||||
|
||||
typedef enum {
|
||||
enum resultFind {
|
||||
HLP_FIND_ERROR,
|
||||
HLP_FIND_OK,
|
||||
HLP_FIND_OK_NO_END,
|
||||
}resultFind_te;
|
||||
};
|
||||
|
||||
namespace appl {
|
||||
class HighlightPattern {
|
||||
@ -92,10 +92,10 @@ namespace appl {
|
||||
* @return HLP_FIND_OK_NO_END Xe find a partial pattern (missing end)
|
||||
* @return HLP_FIND_ERROR Not find the pattern
|
||||
*/
|
||||
resultFind_te find(int32_t _start,
|
||||
int32_t _stop,
|
||||
appl::HighlightInfo& _resultat,
|
||||
etk::Buffer& _buffer);
|
||||
enum resultFind find(int32_t _start,
|
||||
int32_t _stop,
|
||||
appl::HighlightInfo& _resultat,
|
||||
etk::Buffer& _buffer);
|
||||
|
||||
void parseRules(exml::Element* _child, int32_t _level);
|
||||
};
|
||||
|
@ -111,7 +111,7 @@ void CTagsManager::onReceiveMessage(const ewol::EMessage& _msg) {
|
||||
tmpWidget->setTitle("Open Exuberant Ctags file");
|
||||
tmpWidget->setValidateLabel("Open");
|
||||
ewol::getContext().getWindows()->popUpWidgetPush(tmpWidget);
|
||||
tmpWidget->registerOnEvent(this, ewolEventFileChooserValidate, ednEventPopUpCtagsLoadFile);
|
||||
tmpWidget->registerOnEvent(this, widget::FileChooser::eventValidate, ednEventPopUpCtagsLoadFile);
|
||||
}
|
||||
} else if (_msg.getData() == "ReLoad") {
|
||||
APPL_INFO("Request re-load ctag file");
|
||||
|
@ -29,26 +29,56 @@
|
||||
#include <appl/ctags/readtags.h>
|
||||
#include <appl/ctags/CTagsManager.h>
|
||||
#include <appl/globalMsg.h>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <etk/unicode.h>
|
||||
|
||||
char32_t mychar32;
|
||||
|
||||
|
||||
/**
|
||||
* @brief Main of the program (This can be set in every case, but it is not used in Andoid...).
|
||||
* @param std IO
|
||||
* @return std IO
|
||||
*/
|
||||
int main(int _argc, const char *_argv[])
|
||||
{
|
||||
int main(int _argc, const char *_argv[]) {
|
||||
// only one things to do:
|
||||
return ewol::run(_argc, _argv);
|
||||
}
|
||||
appl::BufferManager* bufferManager = NULL;
|
||||
|
||||
etk::CCout& operator <<(etk::CCout& _os, const std::u32string& _obj) {
|
||||
etk::Vector<etk::UChar> tmpp;
|
||||
for (size_t iii=0; iii<_obj.size(); ++iii) {
|
||||
tmpp.pushBack(_obj[iii]);
|
||||
}
|
||||
etk::Vector<char> output_UTF8;
|
||||
unicode::convertUnicodeToUtf8(tmpp, output_UTF8);
|
||||
output_UTF8.pushBack('\0');
|
||||
_os << &output_UTF8[0];
|
||||
return _os;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief main application function initialisation
|
||||
*/
|
||||
bool APP_Init(ewol::eContext& _context)
|
||||
{
|
||||
bool APP_Init(ewol::eContext& _context) {
|
||||
APPL_INFO(" == > init APPL (START) [" << ewol::getBoardType() << "] (" << ewol::getCompilationMode() << ")");
|
||||
|
||||
std::vector<int32_t> valueExample;
|
||||
valueExample.push_back(23);
|
||||
valueExample.push_back(23);
|
||||
valueExample.push_back(23);
|
||||
valueExample.push_back(23);
|
||||
APPL_INFO("test de vector : " << valueExample[0]);
|
||||
std::cout << "test de debug direct ..." << std::endl;
|
||||
std::cerr << "test de debug direct .2." << std::endl;
|
||||
std::u32string ploppppp;
|
||||
ploppppp = U"exemple de texte sans accent : ";
|
||||
APPL_INFO( "retert : " << ploppppp);
|
||||
APPL_CRITICAL("kjkjhkjh");
|
||||
|
||||
|
||||
// TODO : remove this : Move if in the windows properties
|
||||
_context.setSize(vec2(800, 600));
|
||||
|
||||
@ -117,7 +147,7 @@ bool APP_Init(ewol::eContext& _context)
|
||||
}
|
||||
}
|
||||
|
||||
APPL_INFO(" == > init "PROJECT_NAME" (END)");
|
||||
APPL_INFO(" == > init " PROJECT_NAME " (END)");
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -125,9 +155,8 @@ bool APP_Init(ewol::eContext& _context)
|
||||
/**
|
||||
* @brief main application function Un-Initialisation
|
||||
*/
|
||||
void APP_UnInit(ewol::eContext& _context)
|
||||
{
|
||||
APPL_INFO(" == > Un-Init "PROJECT_NAME" (START)");
|
||||
void APP_UnInit(ewol::eContext& _context) {
|
||||
APPL_INFO(" == > Un-Init " PROJECT_NAME " (START)");
|
||||
ewol::Windows* tmpWindows = _context.getWindows();
|
||||
|
||||
_context.setWindows(NULL);
|
||||
@ -147,6 +176,6 @@ void APP_UnInit(ewol::eContext& _context)
|
||||
appl::BufferManager::release(bufferManager);
|
||||
bufferManager = NULL;
|
||||
}
|
||||
APPL_INFO(" == > Un-Init "PROJECT_NAME" (END)");
|
||||
APPL_INFO(" == > Un-Init " PROJECT_NAME " (END)");
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user