2011-10-17 18:05:15 +02:00
|
|
|
/**
|
|
|
|
*******************************************************************************
|
|
|
|
* @file ewol.cpp
|
|
|
|
* @brief Main code of ewol (sources)
|
|
|
|
* @author Edouard DUPIN
|
|
|
|
* @date 17/10/2011
|
|
|
|
* @par Project
|
|
|
|
* ewol
|
|
|
|
*
|
|
|
|
* @par Copyright
|
|
|
|
* Copyright 2011 Edouard DUPIN, all right reserved
|
|
|
|
*
|
|
|
|
* This software is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
* ANY WARRANTY.
|
|
|
|
*
|
|
|
|
* Licence summary :
|
|
|
|
* You can modify and redistribute the sources code and binaries.
|
|
|
|
* You can send me the bug-fix
|
|
|
|
*
|
|
|
|
* Term of the licence in in the file licence.txt.
|
|
|
|
*
|
|
|
|
*******************************************************************************
|
|
|
|
*/
|
|
|
|
|
2011-10-20 18:24:43 +02:00
|
|
|
|
2011-10-17 18:05:15 +02:00
|
|
|
#include "ewol.h"
|
2011-10-31 11:01:47 +01:00
|
|
|
#include "ewolFont.h"
|
2011-10-17 18:05:15 +02:00
|
|
|
|
2011-10-20 10:17:00 +02:00
|
|
|
#if __PLATFORM__ == X11
|
|
|
|
#include "guiX11.h"
|
|
|
|
#elif __PLATFORM__ == DoubleBuffer
|
|
|
|
#include "guiDoubleBuffer.h"
|
|
|
|
#elif __PLATFORM__ == Android
|
|
|
|
#include "guiAndroid.h"
|
2011-10-21 15:07:56 +02:00
|
|
|
#elif __PLATFORM__ == AndroidTablet
|
|
|
|
#include "guiAndroidTablet.h"
|
2011-10-20 10:17:00 +02:00
|
|
|
#elif __PLATFORM__ == IPhone
|
|
|
|
#include "guiIPhone.h"
|
2011-10-21 15:07:56 +02:00
|
|
|
#elif __PLATFORM__ == IPad
|
|
|
|
#include "guiIPad.h"
|
2011-10-20 10:17:00 +02:00
|
|
|
#else
|
|
|
|
#error you need to specify a platform ...
|
|
|
|
#endif
|
|
|
|
|
2011-10-30 14:52:55 +01:00
|
|
|
#undef __class__
|
|
|
|
#define __class__ "ewol"
|
2011-10-17 18:05:15 +02:00
|
|
|
|
|
|
|
void ewol::Init(int argc, char *argv[])
|
|
|
|
{
|
2011-10-26 10:22:33 +02:00
|
|
|
EWOL_INFO("v" EWOL_VERSION_TAG_NAME);
|
|
|
|
EWOL_INFO("Build Date: " VERSION_BUILD_TIME);
|
2011-10-20 10:17:00 +02:00
|
|
|
guiAbstraction::Init(argc, argv);
|
2011-11-06 20:24:44 +01:00
|
|
|
ewol::InitFont();
|
2011-10-17 18:05:15 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void ewol::Run(void)
|
|
|
|
{
|
2011-10-20 10:17:00 +02:00
|
|
|
guiAbstraction::Run();
|
2011-10-17 18:05:15 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void ewol::UnInit(void)
|
|
|
|
{
|
2011-10-20 10:17:00 +02:00
|
|
|
guiAbstraction::UnInit();
|
2011-10-31 11:01:47 +01:00
|
|
|
ewol::UnInitFont();
|
2011-10-17 18:05:15 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2011-10-21 15:07:56 +02:00
|
|
|
void ewol::DisplayWindows(ewol::Windows * windows)
|
|
|
|
{
|
|
|
|
guiAbstraction::SetDisplayOnWindows(windows);
|
|
|
|
}
|
2011-10-17 18:05:15 +02:00
|
|
|
|
|
|
|
|
2011-10-31 13:49:31 +01:00
|
|
|
void ewol::Stop(void)
|
|
|
|
{
|
|
|
|
guiAbstraction::Stop();
|
|
|
|
}
|
|
|
|
|
2011-10-17 18:05:15 +02:00
|
|
|
|
2011-11-01 15:47:17 +01:00
|
|
|
void ewol::ChangeSize(int32_t w, int32_t h)
|
|
|
|
{
|
|
|
|
guiAbstraction::ChangeSize(w, h);
|
|
|
|
}
|
|
|
|
|
|
|
|
void ewol::ChangePos(int32_t x, int32_t y)
|
|
|
|
{
|
|
|
|
guiAbstraction::ChangePos(x, y);
|
|
|
|
}
|
|
|
|
|
|
|
|
void ewol::GetAbsPos(int32_t & x, int32_t & y)
|
|
|
|
{
|
|
|
|
guiAbstraction::GetAbsPos(x, y);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void ewol::StartResizeSystem(void)
|
|
|
|
{
|
|
|
|
#if __PLATFORM__ == X11
|
|
|
|
guiAbstraction::StartResizeSystem();
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
void ewol::StartMoveSystem(void)
|
|
|
|
{
|
|
|
|
#if __PLATFORM__ == X11
|
|
|
|
guiAbstraction::StartMoveSystem();
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool ewol::IsPressedInput(int32_t inputID)
|
|
|
|
{
|
|
|
|
return guiAbstraction::IsPressedInput(inputID);
|
|
|
|
}
|
|
|
|
|