[STYLE] remove (void) in () to be c++ coherent
This commit is contained in:
parent
7567856323
commit
2e98c66894
2
external/agg
vendored
2
external/agg
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 31442b4615e43ebda829622b4da4961c32e01f26
|
Subproject commit 04556d63d1bac4b9e6d3a569a56a2f6b6113736a
|
2
external/airtaudio
vendored
2
external/airtaudio
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 490e993c6fa05036f06abe1e39f9e04b5c5e03cb
|
Subproject commit bb547a72d99802ac5d9a99c843549f175c856826
|
12
external/date/date/date.cpp
vendored
12
external/date/date/date.cpp
vendored
@ -26,27 +26,27 @@
|
|||||||
#define BUILD_SECOND 0
|
#define BUILD_SECOND 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int32_t date::getYear(void) {
|
int32_t date::getYear() {
|
||||||
return BUILD_YEAR;
|
return BUILD_YEAR;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t date::getMonth(void) {
|
int32_t date::getMonth() {
|
||||||
return BUILD_MONTH;
|
return BUILD_MONTH;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t date::getDay(void) {
|
int32_t date::getDay() {
|
||||||
return BUILD_DAY;
|
return BUILD_DAY;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t date::getHour(void) {
|
int32_t date::getHour() {
|
||||||
return BUILD_HOUR;
|
return BUILD_HOUR;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t date::getMinute(void) {
|
int32_t date::getMinute() {
|
||||||
return BUILD_MINUTE;
|
return BUILD_MINUTE;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t date::getSecond(void) {
|
int32_t date::getSecond() {
|
||||||
return BUILD_SECOND;
|
return BUILD_SECOND;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
12
external/date/date/date.h
vendored
12
external/date/date/date.h
vendored
@ -12,12 +12,12 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
namespace date {
|
namespace date {
|
||||||
int32_t getYear(void);
|
int32_t getYear();
|
||||||
int32_t getMonth(void);
|
int32_t getMonth();
|
||||||
int32_t getDay(void);
|
int32_t getDay();
|
||||||
int32_t getHour(void);
|
int32_t getHour();
|
||||||
int32_t getMinute(void);
|
int32_t getMinute();
|
||||||
int32_t getSecond(void);
|
int32_t getSecond();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
2
external/eaudiofx
vendored
2
external/eaudiofx
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 28982a1bbddc3d7362b6caac9df01ccb2c9f8c71
|
Subproject commit 18c2370065e3bc24681b009ca835a746496e1553
|
2
external/egami
vendored
2
external/egami
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 889807e0b9b88890a9c6734e054da5edf23e59d9
|
Subproject commit bb58a8c06e30cf141a59f8a09a544919c1f695ed
|
2
external/ege
vendored
2
external/ege
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 000bde321dedc1ab709589a5f4cf057fe7825a63
|
Subproject commit ba20ab59f74866367fb8efa260fc6eb26889422b
|
2
external/ejson
vendored
2
external/ejson
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 86116be4dbcd8809b82a3bf607845c9bb4d5424b
|
Subproject commit 77ff2747bb6b82555947e59ee6171e44eeb85db6
|
2
external/enet
vendored
2
external/enet
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 488658aecf730231e265d7d6b6887d00b74f9dec
|
Subproject commit 22baa22bc23e1202285de3e640911047ea7b395d
|
2
external/esvg
vendored
2
external/esvg
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 467a412ccdfeee3e64ec57c82ba36fda275483b9
|
Subproject commit a6c50c8f94cce5e14c9448a809fc9d1acc268c81
|
2
external/etk
vendored
2
external/etk
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 2059e5f06a95cb4aa02ef084b6f134f7d3ad000b
|
Subproject commit d2997292a5c1204d8f38a2d751c5fb416058dc10
|
2
external/ewolsa
vendored
2
external/ewolsa
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 7bad0ec956e8bfd8eb06d8a55572bfe6012c2e44
|
Subproject commit 9569402acee2fdbe6baf591a5db0fec940380f48
|
2
external/exml
vendored
2
external/exml
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 92ea8abb9e66eee0be8fa1b70dc23ed4374615d6
|
Subproject commit 970c050bc2816f3f7f31a4a2cbde6b1eee88b0aa
|
@ -31,7 +31,7 @@ static const float millimeterToCentimeter = 10.0f;
|
|||||||
static const float millimeterToKilometer = 1000000.0f;
|
static const float millimeterToKilometer = 1000000.0f;
|
||||||
|
|
||||||
|
|
||||||
void ewol::Dimension::init(void) {
|
void ewol::Dimension::init() {
|
||||||
if (true == isInit) {
|
if (true == isInit) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -42,7 +42,7 @@ void ewol::Dimension::init(void) {
|
|||||||
isInit = true;
|
isInit = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::Dimension::unInit(void) {
|
void ewol::Dimension::unInit() {
|
||||||
isInit = false;
|
isInit = false;
|
||||||
ratio.setValue(9999999,888888);
|
ratio.setValue(9999999,888888);
|
||||||
invRatio.setValue(1.0f/ratio.x(),1.0f/ratio.y());
|
invRatio.setValue(1.0f/ratio.x(),1.0f/ratio.y());
|
||||||
@ -73,7 +73,7 @@ float ewol::Dimension::getWindowsDiag(enum ewol::Dimension::distance _type) {
|
|||||||
return size.length();
|
return size.length();
|
||||||
}
|
}
|
||||||
|
|
||||||
ewol::Dimension::Dimension(void) :
|
ewol::Dimension::Dimension() :
|
||||||
m_data(0,0),
|
m_data(0,0),
|
||||||
m_type(ewol::Dimension::Pixel) {
|
m_type(ewol::Dimension::Pixel) {
|
||||||
// notinh to do ...
|
// notinh to do ...
|
||||||
@ -122,11 +122,11 @@ void ewol::Dimension::set(std::string _config) {
|
|||||||
EWOL_VERBOSE(" config dimention : \"" << _config << "\" == > " << *this );
|
EWOL_VERBOSE(" config dimention : \"" << _config << "\" == > " << *this );
|
||||||
}
|
}
|
||||||
|
|
||||||
ewol::Dimension::~Dimension(void) {
|
ewol::Dimension::~Dimension() {
|
||||||
// nothing to do ...
|
// nothing to do ...
|
||||||
}
|
}
|
||||||
|
|
||||||
ewol::Dimension::operator std::string(void) const {
|
ewol::Dimension::operator std::string() const {
|
||||||
std::string str;
|
std::string str;
|
||||||
str = get(getType());
|
str = get(getType());
|
||||||
|
|
||||||
@ -218,7 +218,7 @@ void ewol::Dimension::set(const vec2& _size, enum ewol::Dimension::distance _typ
|
|||||||
m_type = _type;
|
m_type = _type;
|
||||||
}
|
}
|
||||||
|
|
||||||
vec2 ewol::Dimension::getPixel(void) const {
|
vec2 ewol::Dimension::getPixel() const {
|
||||||
if (m_type!=ewol::Dimension::Pourcent) {
|
if (m_type!=ewol::Dimension::Pourcent) {
|
||||||
return m_data;
|
return m_data;
|
||||||
} else {
|
} else {
|
||||||
@ -229,7 +229,7 @@ vec2 ewol::Dimension::getPixel(void) const {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
vec2 ewol::Dimension::getPourcent(void) const {
|
vec2 ewol::Dimension::getPourcent() const {
|
||||||
if (m_type!=ewol::Dimension::Pourcent) {
|
if (m_type!=ewol::Dimension::Pourcent) {
|
||||||
vec2 windDim = windowsSize.getPixel();
|
vec2 windDim = windowsSize.getPixel();
|
||||||
//EWOL_DEBUG(" windows dimention : " /*<< windowsSize*/ << " == > " << windDim << "px"); // ==> infinite loop ...
|
//EWOL_DEBUG(" windows dimention : " /*<< windowsSize*/ << " == > " << windDim << "px"); // ==> infinite loop ...
|
||||||
@ -240,27 +240,27 @@ vec2 ewol::Dimension::getPourcent(void) const {
|
|||||||
return vec2(m_data.x()*100.0f, m_data.y()*100.0f);;
|
return vec2(m_data.x()*100.0f, m_data.y()*100.0f);;
|
||||||
}
|
}
|
||||||
|
|
||||||
vec2 ewol::Dimension::getMeter(void) const {
|
vec2 ewol::Dimension::getMeter() const {
|
||||||
return ewol::Dimension::getMillimeter()*millimeterToMeter;
|
return ewol::Dimension::getMillimeter()*millimeterToMeter;
|
||||||
}
|
}
|
||||||
|
|
||||||
vec2 ewol::Dimension::getCentimeter(void) const {
|
vec2 ewol::Dimension::getCentimeter() const {
|
||||||
return ewol::Dimension::getMillimeter()*millimeterToCentimeter;
|
return ewol::Dimension::getMillimeter()*millimeterToCentimeter;
|
||||||
}
|
}
|
||||||
|
|
||||||
vec2 ewol::Dimension::getMillimeter(void) const {
|
vec2 ewol::Dimension::getMillimeter() const {
|
||||||
return ewol::Dimension::getPixel()*invRatio;
|
return ewol::Dimension::getPixel()*invRatio;
|
||||||
}
|
}
|
||||||
|
|
||||||
vec2 ewol::Dimension::getKilometer(void) const {
|
vec2 ewol::Dimension::getKilometer() const {
|
||||||
return ewol::Dimension::getMillimeter()*millimeterToKilometer;
|
return ewol::Dimension::getMillimeter()*millimeterToKilometer;
|
||||||
}
|
}
|
||||||
|
|
||||||
vec2 ewol::Dimension::getInch(void) const {
|
vec2 ewol::Dimension::getInch() const {
|
||||||
return ewol::Dimension::getMillimeter()*millimeterToInch;
|
return ewol::Dimension::getMillimeter()*millimeterToInch;
|
||||||
}
|
}
|
||||||
|
|
||||||
vec2 ewol::Dimension::getFoot(void) const {
|
vec2 ewol::Dimension::getFoot() const {
|
||||||
return ewol::Dimension::getMillimeter()*millimeterToFoot;
|
return ewol::Dimension::getMillimeter()*millimeterToFoot;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ namespace ewol {
|
|||||||
/**
|
/**
|
||||||
* @brief Constructor (default :0,0 mode pixel)
|
* @brief Constructor (default :0,0 mode pixel)
|
||||||
*/
|
*/
|
||||||
Dimension(void);
|
Dimension();
|
||||||
/**
|
/**
|
||||||
* @brief Constructor
|
* @brief Constructor
|
||||||
* @param[in] _size Requested dimention
|
* @param[in] _size Requested dimention
|
||||||
@ -65,12 +65,12 @@ namespace ewol {
|
|||||||
/**
|
/**
|
||||||
* @brief Destructor
|
* @brief Destructor
|
||||||
*/
|
*/
|
||||||
~Dimension(void);
|
~Dimension();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief string cast :
|
* @brief string cast :
|
||||||
*/
|
*/
|
||||||
operator std::string(void) const;
|
operator std::string() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief get the current dimention in requested type
|
* @brief get the current dimention in requested type
|
||||||
@ -96,42 +96,42 @@ namespace ewol {
|
|||||||
* @brief get the current dimention in pixel
|
* @brief get the current dimention in pixel
|
||||||
* @return dimention in Pixel
|
* @return dimention in Pixel
|
||||||
*/
|
*/
|
||||||
vec2 getPixel(void) const;
|
vec2 getPixel() const;
|
||||||
/**
|
/**
|
||||||
* @brief get the current dimention in Pourcent
|
* @brief get the current dimention in Pourcent
|
||||||
* @return dimention in Pourcent
|
* @return dimention in Pourcent
|
||||||
*/
|
*/
|
||||||
vec2 getPourcent(void) const;
|
vec2 getPourcent() const;
|
||||||
/**
|
/**
|
||||||
* @brief get the current dimention in Meter
|
* @brief get the current dimention in Meter
|
||||||
* @return dimention in Meter
|
* @return dimention in Meter
|
||||||
*/
|
*/
|
||||||
vec2 getMeter(void) const;
|
vec2 getMeter() const;
|
||||||
/**
|
/**
|
||||||
* @brief get the current dimention in Centimeter
|
* @brief get the current dimention in Centimeter
|
||||||
* @return dimention in Centimeter
|
* @return dimention in Centimeter
|
||||||
*/
|
*/
|
||||||
vec2 getCentimeter(void) const;
|
vec2 getCentimeter() const;
|
||||||
/**
|
/**
|
||||||
* @brief get the current dimention in Millimeter
|
* @brief get the current dimention in Millimeter
|
||||||
* @return dimention in Millimeter
|
* @return dimention in Millimeter
|
||||||
*/
|
*/
|
||||||
vec2 getMillimeter(void) const;
|
vec2 getMillimeter() const;
|
||||||
/**
|
/**
|
||||||
* @brief get the current dimention in Kilometer
|
* @brief get the current dimention in Kilometer
|
||||||
* @return dimention in Kilometer
|
* @return dimention in Kilometer
|
||||||
*/
|
*/
|
||||||
vec2 getKilometer(void) const;
|
vec2 getKilometer() const;
|
||||||
/**
|
/**
|
||||||
* @brief get the current dimention in Inch
|
* @brief get the current dimention in Inch
|
||||||
* @return dimention in Inch
|
* @return dimention in Inch
|
||||||
*/
|
*/
|
||||||
vec2 getInch(void) const;
|
vec2 getInch() const;
|
||||||
/**
|
/**
|
||||||
* @brief get the current dimention in Foot
|
* @brief get the current dimention in Foot
|
||||||
* @return dimention in Foot
|
* @return dimention in Foot
|
||||||
*/
|
*/
|
||||||
vec2 getFoot(void) const;
|
vec2 getFoot() const;
|
||||||
/*****************************************************
|
/*****************************************************
|
||||||
* = assigment
|
* = assigment
|
||||||
*****************************************************/
|
*****************************************************/
|
||||||
@ -166,18 +166,18 @@ namespace ewol {
|
|||||||
* @breif get the dimension type
|
* @breif get the dimension type
|
||||||
* @return the type
|
* @return the type
|
||||||
*/
|
*/
|
||||||
enum distance getType(void) const {
|
enum distance getType() const {
|
||||||
return m_type;
|
return m_type;
|
||||||
};
|
};
|
||||||
public : // Global static access :
|
public : // Global static access :
|
||||||
/**
|
/**
|
||||||
* @brief basic init
|
* @brief basic init
|
||||||
*/
|
*/
|
||||||
static void init(void);
|
static void init();
|
||||||
/**
|
/**
|
||||||
* @brief basic un-init
|
* @brief basic un-init
|
||||||
*/
|
*/
|
||||||
static void unInit(void);
|
static void unInit();
|
||||||
/**
|
/**
|
||||||
* @brief set the Milimeter ratio for calculation
|
* @brief set the Milimeter ratio for calculation
|
||||||
* @param[in] Ratio Milimeter ration for the screen calculation interpolation
|
* @param[in] Ratio Milimeter ration for the screen calculation interpolation
|
||||||
|
@ -19,7 +19,7 @@ namespace ewol {
|
|||||||
private:
|
private:
|
||||||
float m_value[4]; //!< this represent the 4 padding value Left top right buttom (like css)
|
float m_value[4]; //!< this represent the 4 padding value Left top right buttom (like css)
|
||||||
public:
|
public:
|
||||||
Padding(void) { }
|
Padding() { }
|
||||||
Padding(float _xl, float _yt=0, float _xr=0, float _yb=0) {
|
Padding(float _xl, float _yt=0, float _xr=0, float _yb=0) {
|
||||||
setValue(_xl, _yt, _xr, _yb);
|
setValue(_xl, _yt, _xr, _yb);
|
||||||
}
|
}
|
||||||
@ -30,31 +30,31 @@ namespace ewol {
|
|||||||
m_value[3] = _yb;
|
m_value[3] = _yb;
|
||||||
}
|
}
|
||||||
|
|
||||||
float x(void) const {
|
float x() const {
|
||||||
return m_value[0] + m_value[2];
|
return m_value[0] + m_value[2];
|
||||||
}
|
}
|
||||||
float y(void) const {
|
float y() const {
|
||||||
return m_value[1] + m_value[3];
|
return m_value[1] + m_value[3];
|
||||||
}
|
}
|
||||||
float xLeft(void) const {
|
float xLeft() const {
|
||||||
return m_value[0];
|
return m_value[0];
|
||||||
}
|
}
|
||||||
void setXLeft(float _val) {
|
void setXLeft(float _val) {
|
||||||
m_value[0] = _val;
|
m_value[0] = _val;
|
||||||
}
|
}
|
||||||
float xRight(void) const {
|
float xRight() const {
|
||||||
return m_value[2];
|
return m_value[2];
|
||||||
}
|
}
|
||||||
void setXRight(float _val) {
|
void setXRight(float _val) {
|
||||||
m_value[2] = _val;
|
m_value[2] = _val;
|
||||||
}
|
}
|
||||||
float yTop(void) const {
|
float yTop() const {
|
||||||
return m_value[1];
|
return m_value[1];
|
||||||
}
|
}
|
||||||
void setYTop(float _val) {
|
void setYTop(float _val) {
|
||||||
m_value[1] = _val;
|
m_value[1] = _val;
|
||||||
}
|
}
|
||||||
float yButtom(void) const {
|
float yButtom() const {
|
||||||
return m_value[3];
|
return m_value[3];
|
||||||
}
|
}
|
||||||
void setYButtom(float _val) {
|
void setYButtom(float _val) {
|
||||||
|
@ -28,12 +28,12 @@ ewol::compositing::Area::Area(const ivec2& _size) :
|
|||||||
loadProgram();
|
loadProgram();
|
||||||
}
|
}
|
||||||
|
|
||||||
ewol::compositing::Area::~Area(void) {
|
ewol::compositing::Area::~Area() {
|
||||||
ewol::resource::Texture::release(m_resource);
|
ewol::resource::Texture::release(m_resource);
|
||||||
ewol::resource::Program::release(m_GLprogram);
|
ewol::resource::Program::release(m_GLprogram);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::compositing::Area::loadProgram(void) {
|
void ewol::compositing::Area::loadProgram() {
|
||||||
// get the shader resource :
|
// get the shader resource :
|
||||||
m_GLPosition = 0;
|
m_GLPosition = 0;
|
||||||
m_GLprogram = ewol::resource::Program::keep("DATA:textured3D.prog");
|
m_GLprogram = ewol::resource::Program::keep("DATA:textured3D.prog");
|
||||||
@ -76,7 +76,7 @@ void ewol::compositing::Area::draw(bool _disableDepthTest) {
|
|||||||
m_GLprogram->unUse();
|
m_GLprogram->unUse();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::compositing::Area::clear(void) {
|
void ewol::compositing::Area::clear() {
|
||||||
// call upper class
|
// call upper class
|
||||||
ewol::Compositing::clear();
|
ewol::Compositing::clear();
|
||||||
// reset Buffer :
|
// reset Buffer :
|
||||||
|
@ -37,7 +37,7 @@ namespace ewol {
|
|||||||
/**
|
/**
|
||||||
* @brief load the openGL program and get all the ID needed
|
* @brief load the openGL program and get all the ID needed
|
||||||
*/
|
*/
|
||||||
void loadProgram(void);
|
void loadProgram();
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* @brief generic constructor
|
* @brief generic constructor
|
||||||
@ -47,7 +47,7 @@ namespace ewol {
|
|||||||
/**
|
/**
|
||||||
* @brief generic destructor
|
* @brief generic destructor
|
||||||
*/
|
*/
|
||||||
~Area(void);
|
~Area();
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* @brief draw All the refistered text in the current element on openGL
|
* @brief draw All the refistered text in the current element on openGL
|
||||||
@ -56,12 +56,12 @@ namespace ewol {
|
|||||||
/**
|
/**
|
||||||
* @brief clear alll the registered element in the current element
|
* @brief clear alll the registered element in the current element
|
||||||
*/
|
*/
|
||||||
void clear(void);
|
void clear();
|
||||||
/**
|
/**
|
||||||
* @brief get the current display position (sometime needed in the gui control)
|
* @brief get the current display position (sometime needed in the gui control)
|
||||||
* @return the current position.
|
* @return the current position.
|
||||||
*/
|
*/
|
||||||
const vec3& getPos(void) {
|
const vec3& getPos() {
|
||||||
return m_position;
|
return m_position;
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
@ -90,10 +90,10 @@ namespace ewol {
|
|||||||
*/
|
*/
|
||||||
void print(const ivec2& _size);
|
void print(const ivec2& _size);
|
||||||
|
|
||||||
egami::Image& get(void) {
|
egami::Image& get() {
|
||||||
return m_resource->get();
|
return m_resource->get();
|
||||||
};
|
};
|
||||||
void flush(void) {
|
void flush() {
|
||||||
m_resource->flush();
|
m_resource->flush();
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -13,17 +13,17 @@
|
|||||||
#include <ewol/compositing/Compositing.h>
|
#include <ewol/compositing/Compositing.h>
|
||||||
|
|
||||||
|
|
||||||
ewol::Compositing::Compositing(void) {
|
ewol::Compositing::Compositing() {
|
||||||
// nothing to do
|
// nothing to do
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ewol::Compositing::~Compositing(void) {
|
ewol::Compositing::~Compositing() {
|
||||||
// nothing to do
|
// nothing to do
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ewol::Compositing::resetMatrix(void) {
|
void ewol::Compositing::resetMatrix() {
|
||||||
m_matrixApply.identity();
|
m_matrixApply.identity();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ void ewol::Compositing::scale(const vec3& _vect) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ewol::Compositing::clear(void) {
|
void ewol::Compositing::clear() {
|
||||||
m_matrixApply.identity();
|
m_matrixApply.identity();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,11 +21,11 @@ namespace ewol {
|
|||||||
/**
|
/**
|
||||||
* @brief generic constructor
|
* @brief generic constructor
|
||||||
*/
|
*/
|
||||||
Compositing(void);
|
Compositing();
|
||||||
/**
|
/**
|
||||||
* @brief Generic destructor
|
* @brief Generic destructor
|
||||||
*/
|
*/
|
||||||
virtual ~Compositing(void);
|
virtual ~Compositing();
|
||||||
/**
|
/**
|
||||||
* @brief Virtal pure function that request the draw of all openGl elements
|
* @brief Virtal pure function that request the draw of all openGl elements
|
||||||
*/
|
*/
|
||||||
@ -33,11 +33,11 @@ namespace ewol {
|
|||||||
/**
|
/**
|
||||||
* @brief clear alll tre registered element in the current element
|
* @brief clear alll tre registered element in the current element
|
||||||
*/
|
*/
|
||||||
virtual void clear(void);
|
virtual void clear();
|
||||||
/**
|
/**
|
||||||
* @brief reset to the eye matrix the openGL mouving system
|
* @brief reset to the eye matrix the openGL mouving system
|
||||||
*/
|
*/
|
||||||
virtual void resetMatrix(void);
|
virtual void resetMatrix();
|
||||||
/**
|
/**
|
||||||
* @brief translate the current display of this element
|
* @brief translate the current display of this element
|
||||||
* @param[in] _vect The translation vector to apply at the transformation matrix
|
* @param[in] _vect The translation vector to apply at the transformation matrix
|
||||||
|
@ -217,7 +217,7 @@ static void SutherlandHodgman(std::vector<vec2 > & input, std::vector<vec2 > & o
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ewol::compositing::Drawing::Drawing(void) :
|
ewol::compositing::Drawing::Drawing() :
|
||||||
m_position(0.0, 0.0, 0.0),
|
m_position(0.0, 0.0, 0.0),
|
||||||
m_clippingPosStart(0.0, 0.0, 0.0),
|
m_clippingPosStart(0.0, 0.0, 0.0),
|
||||||
m_clippingPosStop(0.0, 0.0, 0.0),
|
m_clippingPosStop(0.0, 0.0, 0.0),
|
||||||
@ -237,11 +237,11 @@ ewol::compositing::Drawing::Drawing(void) :
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ewol::compositing::Drawing::~Drawing(void) {
|
ewol::compositing::Drawing::~Drawing() {
|
||||||
unLoadProgram();
|
unLoadProgram();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::compositing::Drawing::generateTriangle(void) {
|
void ewol::compositing::Drawing::generateTriangle() {
|
||||||
m_triElement = 0;
|
m_triElement = 0;
|
||||||
|
|
||||||
m_coord.push_back(m_triangle[0]);
|
m_coord.push_back(m_triangle[0]);
|
||||||
@ -272,15 +272,15 @@ void ewol::compositing::Drawing::setPoint(const vec3& _point) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::compositing::Drawing::resetCount(void) {
|
void ewol::compositing::Drawing::resetCount() {
|
||||||
m_triElement = 0;
|
m_triElement = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::compositing::Drawing::unLoadProgram(void) {
|
void ewol::compositing::Drawing::unLoadProgram() {
|
||||||
ewol::resource::Program::release(m_GLprogram);
|
ewol::resource::Program::release(m_GLprogram);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::compositing::Drawing::loadProgram(void) {
|
void ewol::compositing::Drawing::loadProgram() {
|
||||||
// remove previous loading ... in case
|
// remove previous loading ... in case
|
||||||
unLoadProgram();
|
unLoadProgram();
|
||||||
// oad the new ...
|
// oad the new ...
|
||||||
@ -316,7 +316,7 @@ void ewol::compositing::Drawing::draw(bool _disableDepthTest) {
|
|||||||
m_GLprogram->unUse();
|
m_GLprogram->unUse();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::compositing::Drawing::clear(void) {
|
void ewol::compositing::Drawing::clear() {
|
||||||
// call upper class
|
// call upper class
|
||||||
ewol::Compositing::clear();
|
ewol::Compositing::clear();
|
||||||
// reset Buffer :
|
// reset Buffer :
|
||||||
@ -372,7 +372,7 @@ void ewol::compositing::Drawing::setThickness(float _thickness) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::compositing::Drawing::addVertex(void) {
|
void ewol::compositing::Drawing::addVertex() {
|
||||||
internalSetColor(m_color);
|
internalSetColor(m_color);
|
||||||
setPoint(m_position);
|
setPoint(m_position);
|
||||||
}
|
}
|
||||||
|
@ -39,20 +39,20 @@ namespace ewol {
|
|||||||
/**
|
/**
|
||||||
* @brief Basic constructor
|
* @brief Basic constructor
|
||||||
*/
|
*/
|
||||||
Drawing(void);
|
Drawing();
|
||||||
/**
|
/**
|
||||||
* @brief Basic destructor
|
* @brief Basic destructor
|
||||||
*/
|
*/
|
||||||
~Drawing(void);
|
~Drawing();
|
||||||
private:
|
private:
|
||||||
/**
|
/**
|
||||||
* @brief load the openGL program and get all the ID needed
|
* @brief load the openGL program and get all the ID needed
|
||||||
*/
|
*/
|
||||||
void loadProgram(void);
|
void loadProgram();
|
||||||
/**
|
/**
|
||||||
* @brief Un-Load the openGL program and get all the ID needed
|
* @brief Un-Load the openGL program and get all the ID needed
|
||||||
*/
|
*/
|
||||||
void unLoadProgram(void);
|
void unLoadProgram();
|
||||||
float m_thickness; //!< when drawing line and other things
|
float m_thickness; //!< when drawing line and other things
|
||||||
int32_t m_triElement; //!< special counter of the single dot generated
|
int32_t m_triElement; //!< special counter of the single dot generated
|
||||||
vec3 m_triangle[3]; //!< Register every system with a combinaison of tiangle
|
vec3 m_triangle[3]; //!< Register every system with a combinaison of tiangle
|
||||||
@ -61,11 +61,11 @@ namespace ewol {
|
|||||||
/**
|
/**
|
||||||
* @brief Lunch the generation of triangle
|
* @brief Lunch the generation of triangle
|
||||||
*/
|
*/
|
||||||
void generateTriangle(void);
|
void generateTriangle();
|
||||||
/**
|
/**
|
||||||
* @brief in case of some error the count can be reset
|
* @brief in case of some error the count can be reset
|
||||||
*/
|
*/
|
||||||
void resetCount(void);
|
void resetCount();
|
||||||
/**
|
/**
|
||||||
* @brief set the Color of the current triangle drawing
|
* @brief set the Color of the current triangle drawing
|
||||||
* @param[in] _color Color to current dots generated
|
* @param[in] _color Color to current dots generated
|
||||||
@ -85,12 +85,12 @@ namespace ewol {
|
|||||||
/**
|
/**
|
||||||
* @brief clear alll tre registered element in the current element
|
* @brief clear alll tre registered element in the current element
|
||||||
*/
|
*/
|
||||||
void clear(void);
|
void clear();
|
||||||
/**
|
/**
|
||||||
* @brief get the current display position (sometime needed in the gui control)
|
* @brief get the current display position (sometime needed in the gui control)
|
||||||
* @return the current position.
|
* @return the current position.
|
||||||
*/
|
*/
|
||||||
const vec3& getPos(void) {
|
const vec3& getPos() {
|
||||||
return m_position;
|
return m_position;
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
@ -124,7 +124,7 @@ namespace ewol {
|
|||||||
* @brief Get the foreground color of the font.
|
* @brief Get the foreground color of the font.
|
||||||
* @return Foreground color.
|
* @return Foreground color.
|
||||||
*/
|
*/
|
||||||
const etk::Color<>& getColor(void) {
|
const etk::Color<>& getColor() {
|
||||||
return m_color;
|
return m_color;
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
@ -138,7 +138,7 @@ namespace ewol {
|
|||||||
* @brief Get the background color of the font.
|
* @brief Get the background color of the font.
|
||||||
* @return Background color.
|
* @return Background color.
|
||||||
*/
|
*/
|
||||||
const etk::Color<>& getColorBg(void) {
|
const etk::Color<>& getColorBg() {
|
||||||
return m_colorBg;
|
return m_colorBg;
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
@ -176,7 +176,7 @@ namespace ewol {
|
|||||||
/**
|
/**
|
||||||
* @brief add a point reference at the current position (this is a vertex reference at the current position
|
* @brief add a point reference at the current position (this is a vertex reference at the current position
|
||||||
*/
|
*/
|
||||||
void addVertex(void);
|
void addVertex();
|
||||||
/**
|
/**
|
||||||
* @brief draw a line to a specific position
|
* @brief draw a line to a specific position
|
||||||
* @param[in] _dest Position of the end of the line.
|
* @param[in] _dest Position of the end of the line.
|
||||||
|
@ -34,13 +34,13 @@ ewol::compositing::Image::Image(const std::string& _imageName, bool _df) :
|
|||||||
loadProgram();
|
loadProgram();
|
||||||
}
|
}
|
||||||
|
|
||||||
ewol::compositing::Image::~Image(void) {
|
ewol::compositing::Image::~Image() {
|
||||||
ewol::resource::TextureFile::release(m_resource);
|
ewol::resource::TextureFile::release(m_resource);
|
||||||
ewol::resource::ImageDF::release(m_resourceDF);
|
ewol::resource::ImageDF::release(m_resourceDF);
|
||||||
ewol::resource::Program::release(m_GLprogram);
|
ewol::resource::Program::release(m_GLprogram);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::compositing::Image::loadProgram(void) {
|
void ewol::compositing::Image::loadProgram() {
|
||||||
// get the shader resource :
|
// get the shader resource :
|
||||||
m_GLPosition = 0;
|
m_GLPosition = 0;
|
||||||
ewol::resource::Program::release(m_GLprogram);
|
ewol::resource::Program::release(m_GLprogram);
|
||||||
@ -104,7 +104,7 @@ void ewol::compositing::Image::draw(bool _disableDepthTest) {
|
|||||||
m_GLprogram->unUse();
|
m_GLprogram->unUse();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::compositing::Image::clear(void) {
|
void ewol::compositing::Image::clear() {
|
||||||
// call upper class
|
// call upper class
|
||||||
ewol::Compositing::clear();
|
ewol::Compositing::clear();
|
||||||
// reset Buffer :
|
// reset Buffer :
|
||||||
@ -287,12 +287,12 @@ void ewol::compositing::Image::setSource(const std::string& _newFile, const vec2
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ewol::compositing::Image::hasSources(void) {
|
bool ewol::compositing::Image::hasSources() {
|
||||||
return (m_resource != NULL || m_resourceDF != NULL);
|
return (m_resource != NULL || m_resourceDF != NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
vec2 ewol::compositing::Image::getRealSize(void) {
|
vec2 ewol::compositing::Image::getRealSize() {
|
||||||
if ( m_resource == NULL
|
if ( m_resource == NULL
|
||||||
&& m_resourceDF == NULL) {
|
&& m_resourceDF == NULL) {
|
||||||
return vec2(0,0);
|
return vec2(0,0);
|
||||||
|
@ -46,7 +46,7 @@ namespace ewol {
|
|||||||
/**
|
/**
|
||||||
* @brief load the openGL program and get all the ID needed
|
* @brief load the openGL program and get all the ID needed
|
||||||
*/
|
*/
|
||||||
void loadProgram(void);
|
void loadProgram();
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* @brief generic constructor
|
* @brief generic constructor
|
||||||
@ -57,7 +57,7 @@ namespace ewol {
|
|||||||
/**
|
/**
|
||||||
* @brief generic destructor
|
* @brief generic destructor
|
||||||
*/
|
*/
|
||||||
virtual ~Image(void);
|
virtual ~Image();
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* @brief draw All the refistered text in the current element on openGL
|
* @brief draw All the refistered text in the current element on openGL
|
||||||
@ -67,12 +67,12 @@ namespace ewol {
|
|||||||
/**
|
/**
|
||||||
* @brief clear alll tre registered element in the current element
|
* @brief clear alll tre registered element in the current element
|
||||||
*/
|
*/
|
||||||
void clear(void);
|
void clear();
|
||||||
/**
|
/**
|
||||||
* @brief get the current display position (sometime needed in the gui control)
|
* @brief get the current display position (sometime needed in the gui control)
|
||||||
* @return the current position.
|
* @return the current position.
|
||||||
*/
|
*/
|
||||||
const vec3& getPos(void) {
|
const vec3& getPos() {
|
||||||
return m_position;
|
return m_position;
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
@ -164,12 +164,12 @@ namespace ewol {
|
|||||||
* @brief Sometimes the user declare an image but not allocate the ressources all the time, this is to know it ..
|
* @brief Sometimes the user declare an image but not allocate the ressources all the time, this is to know it ..
|
||||||
* @return the validity od the resources.
|
* @return the validity od the resources.
|
||||||
*/
|
*/
|
||||||
bool hasSources(void);
|
bool hasSources();
|
||||||
/**
|
/**
|
||||||
* @brief get the source image registered size in the file (<0 when multiple size image)
|
* @brief get the source image registered size in the file (<0 when multiple size image)
|
||||||
* @return tre image registered size
|
* @return tre image registered size
|
||||||
*/
|
*/
|
||||||
vec2 getRealSize(void);
|
vec2 getRealSize();
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* @brief Set render mode of the image
|
* @brief Set render mode of the image
|
||||||
@ -180,7 +180,7 @@ namespace ewol {
|
|||||||
* @brief Get the render methode.
|
* @brief Get the render methode.
|
||||||
* @return The render mode of the image.
|
* @return The render mode of the image.
|
||||||
*/
|
*/
|
||||||
bool getDistanceFieldMode(void) const {
|
bool getDistanceFieldMode() const {
|
||||||
return m_distanceFieldMode;
|
return m_distanceFieldMode;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -52,11 +52,11 @@ ewol::compositing::Shaper::Shaper(const std::string& _shaperName) :
|
|||||||
loadProgram();
|
loadProgram();
|
||||||
}
|
}
|
||||||
|
|
||||||
ewol::compositing::Shaper::~Shaper(void) {
|
ewol::compositing::Shaper::~Shaper() {
|
||||||
unLoadProgram();
|
unLoadProgram();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::compositing::Shaper::unLoadProgram(void) {
|
void ewol::compositing::Shaper::unLoadProgram() {
|
||||||
ewol::resource::Program::release(m_GLprogram);
|
ewol::resource::Program::release(m_GLprogram);
|
||||||
ewol::resource::TextureFile::release(m_resourceTexture);
|
ewol::resource::TextureFile::release(m_resourceTexture);
|
||||||
ewol::resource::ConfigFile::release(m_config);
|
ewol::resource::ConfigFile::release(m_config);
|
||||||
@ -79,7 +79,7 @@ void ewol::compositing::Shaper::unLoadProgram(void) {
|
|||||||
m_listAssiciatedId.clear();
|
m_listAssiciatedId.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::compositing::Shaper::loadProgram(void) {
|
void ewol::compositing::Shaper::loadProgram() {
|
||||||
if (m_name == "") {
|
if (m_name == "") {
|
||||||
EWOL_DEBUG("no Shaper set for loading resources ...");
|
EWOL_DEBUG("no Shaper set for loading resources ...");
|
||||||
return;
|
return;
|
||||||
@ -207,7 +207,7 @@ void ewol::compositing::Shaper::draw(bool _disableDepthTest) {
|
|||||||
m_GLprogram->unUse();
|
m_GLprogram->unUse();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::compositing::Shaper::clear(void) {
|
void ewol::compositing::Shaper::clear() {
|
||||||
// nothing to do ...
|
// nothing to do ...
|
||||||
m_propertySize = vec2(0,0);
|
m_propertySize = vec2(0,0);
|
||||||
m_propertyOrigin = vec2(0,0);
|
m_propertyOrigin = vec2(0,0);
|
||||||
@ -566,11 +566,11 @@ void ewol::compositing::Shaper::setShape(const vec2& _origin, const vec2& _size,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ewol::Padding ewol::compositing::Shaper::getPadding(void) {
|
ewol::Padding ewol::compositing::Shaper::getPadding() {
|
||||||
return getPaddingOut() + getBorder() + getPaddingIn();
|
return getPaddingOut() + getBorder() + getPaddingIn();
|
||||||
}
|
}
|
||||||
|
|
||||||
ewol::Padding ewol::compositing::Shaper::getPaddingIn(void) {
|
ewol::Padding ewol::compositing::Shaper::getPaddingIn() {
|
||||||
ewol::Padding padding(0,0,0,0);
|
ewol::Padding padding(0,0,0,0);
|
||||||
if (m_config != NULL) {
|
if (m_config != NULL) {
|
||||||
padding.setValue(m_config->getNumber(m_confIdPaddingIn[shaperPosLeft]),
|
padding.setValue(m_config->getNumber(m_confIdPaddingIn[shaperPosLeft]),
|
||||||
@ -581,7 +581,7 @@ ewol::Padding ewol::compositing::Shaper::getPaddingIn(void) {
|
|||||||
return padding;
|
return padding;
|
||||||
}
|
}
|
||||||
|
|
||||||
ewol::Padding ewol::compositing::Shaper::getPaddingOut(void) {
|
ewol::Padding ewol::compositing::Shaper::getPaddingOut() {
|
||||||
ewol::Padding padding(0,0,0,0);
|
ewol::Padding padding(0,0,0,0);
|
||||||
if (m_config != NULL) {
|
if (m_config != NULL) {
|
||||||
padding.setValue(m_config->getNumber(m_confIdPaddingOut[shaperPosLeft]),
|
padding.setValue(m_config->getNumber(m_confIdPaddingOut[shaperPosLeft]),
|
||||||
@ -592,7 +592,7 @@ ewol::Padding ewol::compositing::Shaper::getPaddingOut(void) {
|
|||||||
return padding;
|
return padding;
|
||||||
}
|
}
|
||||||
|
|
||||||
ewol::Padding ewol::compositing::Shaper::getBorder(void) {
|
ewol::Padding ewol::compositing::Shaper::getBorder() {
|
||||||
ewol::Padding padding(0,0,0,0);
|
ewol::Padding padding(0,0,0,0);
|
||||||
if (m_config != NULL) {
|
if (m_config != NULL) {
|
||||||
padding.setValue(m_config->getNumber(m_confIdBorder[shaperPosLeft]),
|
padding.setValue(m_config->getNumber(m_confIdBorder[shaperPosLeft]),
|
||||||
@ -610,7 +610,7 @@ void ewol::compositing::Shaper::setSource(const std::string& _newFile) {
|
|||||||
loadProgram();
|
loadProgram();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ewol::compositing::Shaper::hasSources(void) {
|
bool ewol::compositing::Shaper::hasSources() {
|
||||||
return m_GLprogram!=NULL;
|
return m_GLprogram!=NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -87,11 +87,11 @@ namespace ewol {
|
|||||||
/**
|
/**
|
||||||
* @brief load the openGL program and get all the ID needed
|
* @brief load the openGL program and get all the ID needed
|
||||||
*/
|
*/
|
||||||
void loadProgram(void);
|
void loadProgram();
|
||||||
/**
|
/**
|
||||||
* @brief Un-Load the openGL program and get all the ID needed
|
* @brief Un-Load the openGL program and get all the ID needed
|
||||||
*/
|
*/
|
||||||
void unLoadProgram(void);
|
void unLoadProgram();
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* @brief generic constructor
|
* @brief generic constructor
|
||||||
@ -101,7 +101,7 @@ namespace ewol {
|
|||||||
/**
|
/**
|
||||||
* @brief generic destructor
|
* @brief generic destructor
|
||||||
*/
|
*/
|
||||||
~Shaper(void);
|
~Shaper();
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* @brief draw All the refistered text in the current element on openGL
|
* @brief draw All the refistered text in the current element on openGL
|
||||||
@ -110,7 +110,7 @@ namespace ewol {
|
|||||||
/**
|
/**
|
||||||
* @brief clear alll tre registered element in the current element
|
* @brief clear alll tre registered element in the current element
|
||||||
*/
|
*/
|
||||||
void clear(void);
|
void clear();
|
||||||
/**
|
/**
|
||||||
* @brief change the current status in an other
|
* @brief change the current status in an other
|
||||||
* @param[in] _newStatusId the next new status requested
|
* @param[in] _newStatusId the next new status requested
|
||||||
@ -122,21 +122,21 @@ namespace ewol {
|
|||||||
* @brief get the current displayed status of the shaper
|
* @brief get the current displayed status of the shaper
|
||||||
* @return The Status Id
|
* @return The Status Id
|
||||||
*/
|
*/
|
||||||
int32_t getCurrentDisplayedStatus(void) {
|
int32_t getCurrentDisplayedStatus() {
|
||||||
return m_stateNew;
|
return m_stateNew;
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* @brief get the next displayed status of the shaper
|
* @brief get the next displayed status of the shaper
|
||||||
* @return The next status Id (-1 if no status in next)
|
* @return The next status Id (-1 if no status in next)
|
||||||
*/
|
*/
|
||||||
int32_t getNextDisplayedStatus(void) {
|
int32_t getNextDisplayedStatus() {
|
||||||
return m_nextStatusRequested;
|
return m_nextStatusRequested;
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* @brief get the current trasion status
|
* @brief get the current trasion status
|
||||||
* @return value of the transition status (0.0f when no activity)
|
* @return value of the transition status (0.0f when no activity)
|
||||||
*/
|
*/
|
||||||
float getTransitionStatus(void) {
|
float getTransitionStatus() {
|
||||||
return m_stateTransition;
|
return m_stateTransition;
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
@ -150,14 +150,14 @@ namespace ewol {
|
|||||||
* @brief get the padding declared by the user in the config file
|
* @brief get the padding declared by the user in the config file
|
||||||
* @return the padding property
|
* @return the padding property
|
||||||
*/
|
*/
|
||||||
ewol::Padding getPadding(void);
|
ewol::Padding getPadding();
|
||||||
ewol::Padding getPaddingIn(void);
|
ewol::Padding getPaddingIn();
|
||||||
ewol::Padding getPaddingOut(void);
|
ewol::Padding getPaddingOut();
|
||||||
/**
|
/**
|
||||||
* @brief get the padding declared by the user in the config file
|
* @brief get the padding declared by the user in the config file
|
||||||
* @return the padding property
|
* @return the padding property
|
||||||
*/
|
*/
|
||||||
ewol::Padding getBorder(void);
|
ewol::Padding getBorder();
|
||||||
/**
|
/**
|
||||||
* @brief change the shaper Source
|
* @brief change the shaper Source
|
||||||
* @param[in] _newFile New file of the shaper
|
* @param[in] _newFile New file of the shaper
|
||||||
@ -167,14 +167,14 @@ namespace ewol {
|
|||||||
* @brief get the shaper file Source
|
* @brief get the shaper file Source
|
||||||
* @return the shapper file name
|
* @return the shapper file name
|
||||||
*/
|
*/
|
||||||
const std::string& getSource(void) const {
|
const std::string& getSource() const {
|
||||||
return m_name;
|
return m_name;
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* @brief Sometimes the user declare an image but not allocate the ressources all the time, this is to know it ..
|
* @brief Sometimes the user declare an image but not allocate the ressources all the time, this is to know it ..
|
||||||
* @return the validity od the resources.
|
* @return the validity od the resources.
|
||||||
*/
|
*/
|
||||||
bool hasSources(void);
|
bool hasSources();
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* @brief set the shape property:
|
* @brief set the shape property:
|
||||||
|
@ -21,7 +21,7 @@ ewol::compositing::Text::Text(const std::string& _fontName, int32_t _fontSize) :
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ewol::compositing::Text::~Text(void) {
|
ewol::compositing::Text::~Text() {
|
||||||
ewol::resource::TexturedFont::release(m_font);
|
ewol::resource::TexturedFont::release(m_font);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -106,14 +106,14 @@ void ewol::compositing::Text::drawD(bool _disableDepthTest) {
|
|||||||
m_GLprogram->unUse();
|
m_GLprogram->unUse();
|
||||||
}
|
}
|
||||||
|
|
||||||
float ewol::compositing::Text::getSize(void) {
|
float ewol::compositing::Text::getSize() {
|
||||||
if (m_font == NULL) {
|
if (m_font == NULL) {
|
||||||
EWOL_WARNING("no font...");
|
EWOL_WARNING("no font...");
|
||||||
return 1.0f;
|
return 1.0f;
|
||||||
}
|
}
|
||||||
return m_font->getFontSize();
|
return m_font->getFontSize();
|
||||||
}
|
}
|
||||||
float ewol::compositing::Text::getHeight(void) {
|
float ewol::compositing::Text::getHeight() {
|
||||||
if (m_font == NULL) {
|
if (m_font == NULL) {
|
||||||
EWOL_WARNING("no font...");
|
EWOL_WARNING("no font...");
|
||||||
return 10.0f;
|
return 10.0f;
|
||||||
|
@ -36,15 +36,15 @@ namespace ewol {
|
|||||||
/**
|
/**
|
||||||
* @brief generic destructor
|
* @brief generic destructor
|
||||||
*/
|
*/
|
||||||
virtual ~Text(void);
|
virtual ~Text();
|
||||||
public:
|
public:
|
||||||
virtual void drawD(bool _disableDepthTest);
|
virtual void drawD(bool _disableDepthTest);
|
||||||
virtual void drawMT(const mat4& _transformationMatrix, bool _enableDepthTest);
|
virtual void drawMT(const mat4& _transformationMatrix, bool _enableDepthTest);
|
||||||
protected:
|
protected:
|
||||||
float m_size;
|
float m_size;
|
||||||
public:
|
public:
|
||||||
virtual float getHeight(void);
|
virtual float getHeight();
|
||||||
virtual float getSize(void);
|
virtual float getSize();
|
||||||
virtual ewol::GlyphProperty * getGlyphPointer(char32_t _charcode);
|
virtual ewol::GlyphProperty * getGlyphPointer(char32_t _charcode);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -46,7 +46,7 @@ ewol::compositing::TextBase::TextBase(const std::string& _shaderName, bool _load
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ewol::compositing::TextBase::~TextBase(void) {
|
ewol::compositing::TextBase::~TextBase() {
|
||||||
ewol::resource::Program::release(m_GLprogram);
|
ewol::resource::Program::release(m_GLprogram);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -87,7 +87,7 @@ void ewol::compositing::TextBase::scale(const vec3& _vect) {
|
|||||||
m_vectorialDraw.scale(_vect);
|
m_vectorialDraw.scale(_vect);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::compositing::TextBase::clear(void) {
|
void ewol::compositing::TextBase::clear() {
|
||||||
// call upper class
|
// call upper class
|
||||||
ewol::Compositing::clear();
|
ewol::Compositing::clear();
|
||||||
// remove sub draw system
|
// remove sub draw system
|
||||||
@ -100,7 +100,7 @@ void ewol::compositing::TextBase::clear(void) {
|
|||||||
reset();
|
reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::compositing::TextBase::reset(void) {
|
void ewol::compositing::TextBase::reset() {
|
||||||
m_position = vec3(0,0,0);
|
m_position = vec3(0,0,0);
|
||||||
m_clippingPosStart = vec3(0,0,0);
|
m_clippingPosStart = vec3(0,0,0);
|
||||||
m_clippingPosStop = vec3(0,0,0);
|
m_clippingPosStop = vec3(0,0,0);
|
||||||
@ -382,7 +382,7 @@ void ewol::compositing::TextBase::printHTML(const std::string& _text) {
|
|||||||
EWOL_ERROR( "can not load XML: main node not find: \"body\"");
|
EWOL_ERROR( "can not load XML: main node not find: \"body\"");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
(void)parseHtmlNode(bodyNode);
|
parseHtmlNode(bodyNode);
|
||||||
htmlFlush();
|
htmlFlush();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -410,7 +410,7 @@ void ewol::compositing::TextBase::printHTML(const std::u32string& _text) {
|
|||||||
EWOL_ERROR( "can not load XML: main node not find: \"body\"");
|
EWOL_ERROR( "can not load XML: main node not find: \"body\"");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
(void)parseHtmlNode(bodyNode);
|
parseHtmlNode(bodyNode);
|
||||||
htmlFlush();
|
htmlFlush();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -787,7 +787,7 @@ void ewol::compositing::TextBase::print(const std::u32string& _text, const std::
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void ewol::compositing::TextBase::forceLineReturn(void) {
|
void ewol::compositing::TextBase::forceLineReturn() {
|
||||||
// reset position :
|
// reset position :
|
||||||
setPos(vec3(m_startTextpos, m_position.y() - getHeight(), 0) );
|
setPos(vec3(m_startTextpos, m_position.y() - getHeight(), 0) );
|
||||||
}
|
}
|
||||||
@ -801,11 +801,11 @@ void ewol::compositing::TextBase::setTextAlignement(float _startTextpos, float _
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
enum ewol::compositing::aligneMode ewol::compositing::TextBase::getAlignement(void) {
|
enum ewol::compositing::aligneMode ewol::compositing::TextBase::getAlignement() {
|
||||||
return m_alignement;
|
return m_alignement;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::compositing::TextBase::disableAlignement(void) {
|
void ewol::compositing::TextBase::disableAlignement() {
|
||||||
m_alignement = alignDisable;
|
m_alignement = alignDisable;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1071,7 +1071,7 @@ void ewol::compositing::TextBase::htmlAddData(const std::u32string& _data) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::compositing::TextBase::htmlFlush(void) {
|
void ewol::compositing::TextBase::htmlFlush() {
|
||||||
if (m_htmlCurrrentLine.size()>0) {
|
if (m_htmlCurrrentLine.size()>0) {
|
||||||
print(m_htmlCurrrentLine, m_htmlDecoration);
|
print(m_htmlCurrrentLine, m_htmlDecoration);
|
||||||
}
|
}
|
||||||
@ -1079,7 +1079,7 @@ void ewol::compositing::TextBase::htmlFlush(void) {
|
|||||||
m_htmlDecoration.clear();
|
m_htmlDecoration.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::compositing::TextBase::disableCursor(void) {
|
void ewol::compositing::TextBase::disableCursor() {
|
||||||
m_selectionStartPos = -100;
|
m_selectionStartPos = -100;
|
||||||
m_cursorPos = -100;
|
m_cursorPos = -100;
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ namespace ewol {
|
|||||||
etk::Color<> m_colorBg; //!< display background color
|
etk::Color<> m_colorBg; //!< display background color
|
||||||
etk::Color<> m_colorFg; //!< display foreground color
|
etk::Color<> m_colorFg; //!< display foreground color
|
||||||
enum ewol::font::mode m_mode; //!< display mode Regular/Bold/Italic/BoldItalic
|
enum ewol::font::mode m_mode; //!< display mode Regular/Bold/Italic/BoldItalic
|
||||||
TextDecoration(void) {
|
TextDecoration() {
|
||||||
m_colorBg = etk::color::blue;
|
m_colorBg = etk::color::blue;
|
||||||
m_colorBg = etk::color::green;
|
m_colorBg = etk::color::green;
|
||||||
m_mode = ewol::font::Regular;
|
m_mode = ewol::font::Regular;
|
||||||
@ -48,7 +48,7 @@ namespace ewol {
|
|||||||
protected:
|
protected:
|
||||||
ewol::compositing::Drawing m_vectorialDraw; //!< This is used to draw background selection and other things ...
|
ewol::compositing::Drawing m_vectorialDraw; //!< This is used to draw background selection and other things ...
|
||||||
public:
|
public:
|
||||||
virtual ewol::compositing::Drawing& getDrawing(void) {
|
virtual ewol::compositing::Drawing& getDrawing() {
|
||||||
return m_vectorialDraw;
|
return m_vectorialDraw;
|
||||||
};
|
};
|
||||||
protected:
|
protected:
|
||||||
@ -105,7 +105,7 @@ namespace ewol {
|
|||||||
/**
|
/**
|
||||||
* @brief generic destructor
|
* @brief generic destructor
|
||||||
*/
|
*/
|
||||||
virtual ~TextBase(void);
|
virtual ~TextBase();
|
||||||
public: // Derived function
|
public: // Derived function
|
||||||
void translate(const vec3& _vect);
|
void translate(const vec3& _vect);
|
||||||
void rotate(const vec3& _vect, float _angle);
|
void rotate(const vec3& _vect, float _angle);
|
||||||
@ -130,16 +130,16 @@ namespace ewol {
|
|||||||
/**
|
/**
|
||||||
* @brief clear all the registered element in the current element
|
* @brief clear all the registered element in the current element
|
||||||
*/
|
*/
|
||||||
virtual void clear(void);
|
virtual void clear();
|
||||||
/**
|
/**
|
||||||
* @brief clear all the intermediate result detween 2 prints
|
* @brief clear all the intermediate result detween 2 prints
|
||||||
*/
|
*/
|
||||||
virtual void reset(void);
|
virtual void reset();
|
||||||
/**
|
/**
|
||||||
* @brief get the current display position (sometime needed in the gui control)
|
* @brief get the current display position (sometime needed in the gui control)
|
||||||
* @return the current position.
|
* @return the current position.
|
||||||
*/
|
*/
|
||||||
const vec3& getPos(void) {
|
const vec3& getPos() {
|
||||||
return m_position;
|
return m_position;
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
@ -239,11 +239,11 @@ namespace ewol {
|
|||||||
* @brief get the current font mode
|
* @brief get the current font mode
|
||||||
* @return The font mode applied
|
* @return The font mode applied
|
||||||
*/
|
*/
|
||||||
enum ewol::font::mode getFontMode(void) {
|
enum ewol::font::mode getFontMode() {
|
||||||
return m_mode;
|
return m_mode;
|
||||||
};
|
};
|
||||||
virtual float getHeight(void) = 0;
|
virtual float getHeight() = 0;
|
||||||
virtual float getSize(void) = 0;
|
virtual float getSize() = 0;
|
||||||
virtual ewol::GlyphProperty * getGlyphPointer(char32_t _charcode) = 0;
|
virtual ewol::GlyphProperty * getGlyphPointer(char32_t _charcode) = 0;
|
||||||
/**
|
/**
|
||||||
* @brief enable or disable the bold mode
|
* @brief enable or disable the bold mode
|
||||||
@ -351,7 +351,7 @@ namespace ewol {
|
|||||||
/**
|
/**
|
||||||
* @brief This generate the line return == > it return to the alignement position start and at the correct line position ==> it might be use to not know the line height
|
* @brief This generate the line return == > it return to the alignement position start and at the correct line position ==> it might be use to not know the line height
|
||||||
*/
|
*/
|
||||||
void forceLineReturn(void);
|
void forceLineReturn();
|
||||||
protected:
|
protected:
|
||||||
/**
|
/**
|
||||||
* @brief This parse a tinyXML node (void pointer to permit to hide tiny XML in include).
|
* @brief This parse a tinyXML node (void pointer to permit to hide tiny XML in include).
|
||||||
@ -370,12 +370,12 @@ namespace ewol {
|
|||||||
/**
|
/**
|
||||||
* @brief disable the alignement system
|
* @brief disable the alignement system
|
||||||
*/
|
*/
|
||||||
void disableAlignement(void);
|
void disableAlignement();
|
||||||
/**
|
/**
|
||||||
* @brief get the current alignement property
|
* @brief get the current alignement property
|
||||||
* @return the curent alignement type
|
* @return the curent alignement type
|
||||||
*/
|
*/
|
||||||
enum ewol::compositing::aligneMode getAlignement(void);
|
enum ewol::compositing::aligneMode getAlignement();
|
||||||
/**
|
/**
|
||||||
* @brief calculate a theoric text size
|
* @brief calculate a theoric text size
|
||||||
* @param[in] _text The string to calculate dimention.
|
* @param[in] _text The string to calculate dimention.
|
||||||
@ -446,12 +446,12 @@ namespace ewol {
|
|||||||
/**
|
/**
|
||||||
* @brief draw the current line
|
* @brief draw the current line
|
||||||
*/
|
*/
|
||||||
void htmlFlush(void);
|
void htmlFlush();
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* @brief remove the cursor display
|
* @brief remove the cursor display
|
||||||
*/
|
*/
|
||||||
void disableCursor(void);
|
void disableCursor();
|
||||||
/**
|
/**
|
||||||
* @brief set a cursor at a specific position:
|
* @brief set a cursor at a specific position:
|
||||||
* @param[in] _cursorPos id of the cursor position
|
* @param[in] _cursorPos id of the cursor position
|
||||||
|
@ -25,7 +25,7 @@ ewol::compositing::TextDF::TextDF(const std::string& _fontName, int32_t _fontSiz
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ewol::compositing::TextDF::~TextDF(void) {
|
ewol::compositing::TextDF::~TextDF() {
|
||||||
ewol::resource::DistanceFieldFont::release(m_fontDF);
|
ewol::resource::DistanceFieldFont::release(m_fontDF);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -114,7 +114,7 @@ void ewol::compositing::TextDF::drawD(bool _disableDepthTest) {
|
|||||||
m_GLprogram->unUse();
|
m_GLprogram->unUse();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::compositing::TextDF::clear(void) {
|
void ewol::compositing::TextDF::clear() {
|
||||||
ewol::compositing::TextBase::clear();
|
ewol::compositing::TextBase::clear();
|
||||||
m_glyphLevel.clear();
|
m_glyphLevel.clear();
|
||||||
}
|
}
|
||||||
@ -126,7 +126,7 @@ void ewol::compositing::TextDF::loadProgram(const std::string& _shaderName) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
float ewol::compositing::TextDF::getHeight(void) {
|
float ewol::compositing::TextDF::getHeight() {
|
||||||
if (m_fontDF == NULL) {
|
if (m_fontDF == NULL) {
|
||||||
EWOL_WARNING("no font...");
|
EWOL_WARNING("no font...");
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -37,7 +37,7 @@ namespace ewol {
|
|||||||
/**
|
/**
|
||||||
* @brief generic destructor
|
* @brief generic destructor
|
||||||
*/
|
*/
|
||||||
virtual ~TextDF(void);
|
virtual ~TextDF();
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* @brief Calculate size to be at the best size for a render in this special size.
|
* @brief Calculate size to be at the best size for a render in this special size.
|
||||||
@ -46,14 +46,14 @@ namespace ewol {
|
|||||||
*/
|
*/
|
||||||
void updateSizeToRender(const vec2& _size);
|
void updateSizeToRender(const vec2& _size);
|
||||||
public:
|
public:
|
||||||
virtual void clear(void);
|
virtual void clear();
|
||||||
virtual void drawD(bool _disableDepthTest);
|
virtual void drawD(bool _disableDepthTest);
|
||||||
virtual void drawMT(const mat4& _transformationMatrix, bool _enableDepthTest);
|
virtual void drawMT(const mat4& _transformationMatrix, bool _enableDepthTest);
|
||||||
protected:
|
protected:
|
||||||
float m_size;
|
float m_size;
|
||||||
public:
|
public:
|
||||||
virtual float getHeight(void);
|
virtual float getHeight();
|
||||||
virtual float getSize(void) {
|
virtual float getSize() {
|
||||||
return m_size;
|
return m_size;
|
||||||
}
|
}
|
||||||
virtual void setSize(float _size) {
|
virtual void setSize(float _size) {
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
int64_t ewol::getTime(void) {
|
int64_t ewol::getTime() {
|
||||||
struct timeval now;
|
struct timeval now;
|
||||||
gettimeofday(&now, NULL);
|
gettimeofday(&now, NULL);
|
||||||
//EWOL_VERBOSE("current time : " << now.tv_sec << "s " << now.tv_usec << "us");
|
//EWOL_VERBOSE("current time : " << now.tv_sec << "s " << now.tv_usec << "us");
|
||||||
@ -275,7 +275,7 @@ class AndroidContext : public ewol::Context {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
~AndroidContext(void) {
|
~AndroidContext() {
|
||||||
// TODO ...
|
// TODO ...
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -284,12 +284,12 @@ class AndroidContext : public ewol::Context {
|
|||||||
m_javaObjectEwolCallback = NULL;
|
m_javaObjectEwolCallback = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t run(void) {
|
int32_t run() {
|
||||||
// might never be called !!!
|
// might never be called !!!
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void stop(void) {
|
void stop() {
|
||||||
EWOL_DEBUG("C->java : send message to the java : STOP REQUESTED");
|
EWOL_DEBUG("C->java : send message to the java : STOP REQUESTED");
|
||||||
int status;
|
int status;
|
||||||
if(!java_attach_current_thread(&status)) {
|
if(!java_attach_current_thread(&status)) {
|
||||||
@ -357,7 +357,7 @@ class AndroidContext : public ewol::Context {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int32_t audioGetDeviceCount(void) {
|
int32_t audioGetDeviceCount() {
|
||||||
// Request the clipBoard :
|
// Request the clipBoard :
|
||||||
EWOL_DEBUG("C->java : audio get device count");
|
EWOL_DEBUG("C->java : audio get device count");
|
||||||
if (m_javaApplicationType == appl_application) {
|
if (m_javaApplicationType == appl_application) {
|
||||||
@ -504,10 +504,10 @@ class AndroidContext : public ewol::Context {
|
|||||||
java_check_exception(m_JavaVirtualMachinePointer);
|
java_check_exception(m_JavaVirtualMachinePointer);
|
||||||
java_detach_current_thread(status);
|
java_detach_current_thread(status);
|
||||||
}
|
}
|
||||||
void keyboardShow(void) {
|
void keyboardShow() {
|
||||||
sendJavaKeyboardUpdate(JNI_TRUE);
|
sendJavaKeyboardUpdate(JNI_TRUE);
|
||||||
};
|
};
|
||||||
void keyboardHide(void) {
|
void keyboardHide() {
|
||||||
sendJavaKeyboardUpdate(JNI_FALSE);
|
sendJavaKeyboardUpdate(JNI_FALSE);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#undef __class__
|
#undef __class__
|
||||||
#define __class__ "context::ConfigFont"
|
#define __class__ "context::ConfigFont"
|
||||||
|
|
||||||
ewol::context::ConfigFont::ConfigFont(void) :
|
ewol::context::ConfigFont::ConfigFont() :
|
||||||
m_folder("DATA:fonts"),
|
m_folder("DATA:fonts"),
|
||||||
m_name("Arial;Helvetica"),
|
m_name("Arial;Helvetica"),
|
||||||
m_size(10),
|
m_size(10),
|
||||||
@ -20,7 +20,7 @@ ewol::context::ConfigFont::ConfigFont(void) :
|
|||||||
ewol::resource::freeTypeInit();
|
ewol::resource::freeTypeInit();
|
||||||
}
|
}
|
||||||
|
|
||||||
ewol::context::ConfigFont::~ConfigFont(void) {
|
ewol::context::ConfigFont::~ConfigFont() {
|
||||||
// UnInit FreeTypes
|
// UnInit FreeTypes
|
||||||
ewol::resource::freeTypeUnInit();
|
ewol::resource::freeTypeUnInit();
|
||||||
}
|
}
|
||||||
|
@ -18,8 +18,8 @@ namespace ewol {
|
|||||||
/**
|
/**
|
||||||
* Constructor / destructor
|
* Constructor / destructor
|
||||||
*/
|
*/
|
||||||
ConfigFont(void);
|
ConfigFont();
|
||||||
~ConfigFont(void);
|
~ConfigFont();
|
||||||
private:
|
private:
|
||||||
std::string m_folder;
|
std::string m_folder;
|
||||||
public:
|
public:
|
||||||
@ -34,7 +34,7 @@ namespace ewol {
|
|||||||
* @brief get the default font folder.
|
* @brief get the default font folder.
|
||||||
* @return The default font folder.
|
* @return The default font folder.
|
||||||
*/
|
*/
|
||||||
const std::string& getFolder(void) {
|
const std::string& getFolder() {
|
||||||
return m_folder;
|
return m_folder;
|
||||||
};
|
};
|
||||||
private:
|
private:
|
||||||
@ -51,14 +51,14 @@ namespace ewol {
|
|||||||
* @brief get the current default font name
|
* @brief get the current default font name
|
||||||
* @raturn a reference on the font name string
|
* @raturn a reference on the font name string
|
||||||
*/
|
*/
|
||||||
const std::string& getName(void) {
|
const std::string& getName() {
|
||||||
return m_name;
|
return m_name;
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* @brief get the default font size.
|
* @brief get the default font size.
|
||||||
* @return the font size.
|
* @return the font size.
|
||||||
*/
|
*/
|
||||||
int32_t getSize(void) {
|
int32_t getSize() {
|
||||||
return m_size;
|
return m_size;
|
||||||
};
|
};
|
||||||
private:
|
private:
|
||||||
@ -75,7 +75,7 @@ namespace ewol {
|
|||||||
* @brief get the use of internal/external Font
|
* @brief get the use of internal/external Font
|
||||||
* @return true to enable search of internal data.
|
* @return true to enable search of internal data.
|
||||||
*/
|
*/
|
||||||
bool getUseExternal(void) {
|
bool getUseExternal() {
|
||||||
return m_useExternal;
|
return m_useExternal;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -37,14 +37,14 @@
|
|||||||
* @note due ti the fact that the system can be called for multiple instance, for naw we just limit the acces to one process at a time.
|
* @note due ti the fact that the system can be called for multiple instance, for naw we just limit the acces to one process at a time.
|
||||||
* @return the main inteface Mutex
|
* @return the main inteface Mutex
|
||||||
*/
|
*/
|
||||||
static etk::Mutex& mutexInterface(void) {
|
static etk::Mutex& mutexInterface() {
|
||||||
static etk::Mutex s_interfaceMutex;
|
static etk::Mutex s_interfaceMutex;
|
||||||
return s_interfaceMutex;
|
return s_interfaceMutex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static ewol::Context* l_curentInterface=NULL;
|
static ewol::Context* l_curentInterface=NULL;
|
||||||
ewol::Context& ewol::getContext(void) {
|
ewol::Context& ewol::getContext() {
|
||||||
#if DEBUG_LEVEL > 2
|
#if DEBUG_LEVEL > 2
|
||||||
if(NULL == l_curentInterface){
|
if(NULL == l_curentInterface){
|
||||||
EWOL_CRITICAL("[CRITICAL] try acces at an empty interface");
|
EWOL_CRITICAL("[CRITICAL] try acces at an empty interface");
|
||||||
@ -65,7 +65,7 @@ void ewol::Context::setInitImage(const std::string& _fileName) {
|
|||||||
* @brief set the curent interface.
|
* @brief set the curent interface.
|
||||||
* @note this lock the main mutex
|
* @note this lock the main mutex
|
||||||
*/
|
*/
|
||||||
void ewol::Context::lockContext(void) {
|
void ewol::Context::lockContext() {
|
||||||
mutexInterface().lock();
|
mutexInterface().lock();
|
||||||
l_curentInterface = this;
|
l_curentInterface = this;
|
||||||
}
|
}
|
||||||
@ -74,7 +74,7 @@ void ewol::Context::lockContext(void) {
|
|||||||
* @brief set the curent interface at NULL.
|
* @brief set the curent interface at NULL.
|
||||||
* @note this un-lock the main mutex
|
* @note this un-lock the main mutex
|
||||||
*/
|
*/
|
||||||
void ewol::Context::unLockContext(void) {
|
void ewol::Context::unLockContext() {
|
||||||
l_curentInterface = NULL;
|
l_curentInterface = NULL;
|
||||||
mutexInterface().unLock();
|
mutexInterface().unLock();
|
||||||
}
|
}
|
||||||
@ -116,7 +116,7 @@ namespace ewol {
|
|||||||
enum ewol::key::keyboard keyboardMove;
|
enum ewol::key::keyboard keyboardMove;
|
||||||
ewol::key::Special keyboardSpecial;
|
ewol::key::Special keyboardSpecial;
|
||||||
|
|
||||||
eSystemMessage(void) :
|
eSystemMessage() :
|
||||||
TypeMessage(msgNone),
|
TypeMessage(msgNone),
|
||||||
clipboardID(ewol::context::clipBoard::clipboardStd),
|
clipboardID(ewol::context::clipBoard::clipboardStd),
|
||||||
inputType(ewol::key::typeUnknow),
|
inputType(ewol::key::typeUnknow),
|
||||||
@ -143,11 +143,11 @@ void ewol::Context::inputEventGrabPointer(ewol::Widget* _widget) {
|
|||||||
m_input.grabPointer(_widget);
|
m_input.grabPointer(_widget);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::Context::inputEventUnGrabPointer(void) {
|
void ewol::Context::inputEventUnGrabPointer() {
|
||||||
m_input.unGrabPointer();
|
m_input.unGrabPointer();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::Context::processEvents(void) {
|
void ewol::Context::processEvents() {
|
||||||
int32_t nbEvent = 0;
|
int32_t nbEvent = 0;
|
||||||
//EWOL_DEBUG(" ******** Event");
|
//EWOL_DEBUG(" ******** Event");
|
||||||
ewol::eSystemMessage* data = NULL;
|
ewol::eSystemMessage* data = NULL;
|
||||||
@ -373,7 +373,7 @@ ewol::Context::Context(int32_t _argc, const char* _argv[]) :
|
|||||||
EWOL_INFO(" == > Ewol system init (END)");
|
EWOL_INFO(" == > Ewol system init (END)");
|
||||||
}
|
}
|
||||||
|
|
||||||
ewol::Context::~Context(void) {
|
ewol::Context::~Context() {
|
||||||
EWOL_INFO(" == > Ewol system Un-Init (BEGIN)");
|
EWOL_INFO(" == > Ewol system Un-Init (BEGIN)");
|
||||||
// TODO : Clean the message list ...
|
// TODO : Clean the message list ...
|
||||||
// set the curent interface :
|
// set the curent interface :
|
||||||
@ -395,7 +395,7 @@ ewol::Context::~Context(void) {
|
|||||||
EWOL_INFO(" == > Ewol system Un-Init (END)");
|
EWOL_INFO(" == > Ewol system Un-Init (END)");
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::Context::requestUpdateSize(void) {
|
void ewol::Context::requestUpdateSize() {
|
||||||
ewol::eSystemMessage *data = new ewol::eSystemMessage();
|
ewol::eSystemMessage *data = new ewol::eSystemMessage();
|
||||||
if (data == NULL) {
|
if (data == NULL) {
|
||||||
EWOL_ERROR("allocationerror of message");
|
EWOL_ERROR("allocationerror of message");
|
||||||
@ -515,7 +515,7 @@ void ewol::Context::OS_SetKeyboardMove(ewol::key::Special& _special,
|
|||||||
m_msgSystem.post(data);
|
m_msgSystem.post(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::Context::OS_Hide(void) {
|
void ewol::Context::OS_Hide() {
|
||||||
ewol::eSystemMessage *data = new ewol::eSystemMessage();
|
ewol::eSystemMessage *data = new ewol::eSystemMessage();
|
||||||
if (data == NULL) {
|
if (data == NULL) {
|
||||||
EWOL_ERROR("allocationerror of message");
|
EWOL_ERROR("allocationerror of message");
|
||||||
@ -525,7 +525,7 @@ void ewol::Context::OS_Hide(void) {
|
|||||||
m_msgSystem.post(data);
|
m_msgSystem.post(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::Context::OS_Show(void) {
|
void ewol::Context::OS_Show() {
|
||||||
ewol::eSystemMessage *data = new ewol::eSystemMessage();
|
ewol::eSystemMessage *data = new ewol::eSystemMessage();
|
||||||
if (data == NULL) {
|
if (data == NULL) {
|
||||||
EWOL_ERROR("allocationerror of message");
|
EWOL_ERROR("allocationerror of message");
|
||||||
@ -653,11 +653,11 @@ void ewol::Context::onObjectRemove(ewol::Object * _removeObject) {
|
|||||||
m_input.onObjectRemove(_removeObject);
|
m_input.onObjectRemove(_removeObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::Context::resetIOEvent(void) {
|
void ewol::Context::resetIOEvent() {
|
||||||
m_input.newLayerSet();
|
m_input.newLayerSet();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::Context::OS_OpenGlContextDestroy(void) {
|
void ewol::Context::OS_OpenGlContextDestroy() {
|
||||||
m_resourceManager.contextHasBeenDestroyed();
|
m_resourceManager.contextHasBeenDestroyed();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -673,14 +673,14 @@ void ewol::Context::setWindows(ewol::widget::Windows* _windows) {
|
|||||||
forceRedrawAll();
|
forceRedrawAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::Context::forceRedrawAll(void) {
|
void ewol::Context::forceRedrawAll() {
|
||||||
if (m_windowsCurrent == NULL) {
|
if (m_windowsCurrent == NULL) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_windowsCurrent->calculateSize(vec2(m_windowsSize.x(), m_windowsSize.y()));
|
m_windowsCurrent->calculateSize(vec2(m_windowsSize.x(), m_windowsSize.y()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::Context::OS_Stop(void) {
|
void ewol::Context::OS_Stop() {
|
||||||
// set the curent interface :
|
// set the curent interface :
|
||||||
lockContext();
|
lockContext();
|
||||||
EWOL_INFO("OS_Stop...");
|
EWOL_INFO("OS_Stop...");
|
||||||
@ -691,7 +691,7 @@ void ewol::Context::OS_Stop(void) {
|
|||||||
unLockContext();
|
unLockContext();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::Context::OS_Suspend(void) {
|
void ewol::Context::OS_Suspend() {
|
||||||
// set the curent interface :
|
// set the curent interface :
|
||||||
lockContext();
|
lockContext();
|
||||||
EWOL_INFO("OS_Suspend...");
|
EWOL_INFO("OS_Suspend...");
|
||||||
@ -703,7 +703,7 @@ void ewol::Context::OS_Suspend(void) {
|
|||||||
unLockContext();
|
unLockContext();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::Context::OS_Resume(void) {
|
void ewol::Context::OS_Resume() {
|
||||||
// set the curent interface :
|
// set the curent interface :
|
||||||
lockContext();
|
lockContext();
|
||||||
EWOL_INFO("OS_Resume...");
|
EWOL_INFO("OS_Resume...");
|
||||||
@ -715,7 +715,7 @@ void ewol::Context::OS_Resume(void) {
|
|||||||
// release the curent interface :
|
// release the curent interface :
|
||||||
unLockContext();
|
unLockContext();
|
||||||
}
|
}
|
||||||
void ewol::Context::OS_Foreground(void) {
|
void ewol::Context::OS_Foreground() {
|
||||||
// set the curent interface :
|
// set the curent interface :
|
||||||
lockContext();
|
lockContext();
|
||||||
EWOL_INFO("OS_Foreground...");
|
EWOL_INFO("OS_Foreground...");
|
||||||
@ -726,7 +726,7 @@ void ewol::Context::OS_Foreground(void) {
|
|||||||
unLockContext();
|
unLockContext();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::Context::OS_Background(void) {
|
void ewol::Context::OS_Background() {
|
||||||
// set the curent interface :
|
// set the curent interface :
|
||||||
lockContext();
|
lockContext();
|
||||||
EWOL_INFO("OS_Background...");
|
EWOL_INFO("OS_Background...");
|
||||||
@ -738,7 +738,7 @@ void ewol::Context::OS_Background(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ewol::Context::stop(void) {
|
void ewol::Context::stop() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -750,11 +750,11 @@ void ewol::Context::setPos(const vec2& _pos) {
|
|||||||
EWOL_INFO("setPos: NOT implemented ...");
|
EWOL_INFO("setPos: NOT implemented ...");
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::Context::hide(void) {
|
void ewol::Context::hide() {
|
||||||
EWOL_INFO("hide: NOT implemented ...");
|
EWOL_INFO("hide: NOT implemented ...");
|
||||||
};
|
};
|
||||||
|
|
||||||
void ewol::Context::show(void) {
|
void ewol::Context::show() {
|
||||||
EWOL_INFO("show: NOT implemented ...");
|
EWOL_INFO("show: NOT implemented ...");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -762,12 +762,12 @@ void ewol::Context::setTitle(const std::string& _title) {
|
|||||||
EWOL_INFO("setTitle: NOT implemented ...");
|
EWOL_INFO("setTitle: NOT implemented ...");
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::Context::keyboardShow(void) {
|
void ewol::Context::keyboardShow() {
|
||||||
EWOL_INFO("keyboardShow: NOT implemented ...");
|
EWOL_INFO("keyboardShow: NOT implemented ...");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ewol::Context::keyboardHide(void) {
|
void ewol::Context::keyboardHide() {
|
||||||
EWOL_INFO("keyboardHide: NOT implemented ...");
|
EWOL_INFO("keyboardHide: NOT implemented ...");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,47 +41,47 @@ namespace ewol {
|
|||||||
private:
|
private:
|
||||||
ewol::context::CommandLine m_commandLine; //!< Start command line information
|
ewol::context::CommandLine m_commandLine; //!< Start command line information
|
||||||
public:
|
public:
|
||||||
ewol::context::CommandLine& getCmd(void) {
|
ewol::context::CommandLine& getCmd() {
|
||||||
return m_commandLine;
|
return m_commandLine;
|
||||||
};
|
};
|
||||||
private:
|
private:
|
||||||
ewol::context::ConfigFont m_configFont; //!< global font configuration
|
ewol::context::ConfigFont m_configFont; //!< global font configuration
|
||||||
public:
|
public:
|
||||||
ewol::context::ConfigFont& getFontDefault(void) {
|
ewol::context::ConfigFont& getFontDefault() {
|
||||||
return m_configFont;
|
return m_configFont;
|
||||||
};
|
};
|
||||||
private:
|
private:
|
||||||
ewol::widget::Manager m_widgetManager; //!< global widget manager
|
ewol::widget::Manager m_widgetManager; //!< global widget manager
|
||||||
public:
|
public:
|
||||||
ewol::widget::Manager& getWidgetManager(void) {
|
ewol::widget::Manager& getWidgetManager() {
|
||||||
return m_widgetManager;
|
return m_widgetManager;
|
||||||
};
|
};
|
||||||
private:
|
private:
|
||||||
ewol::object::Manager m_objectManager; //!< Object Manager main instance
|
ewol::object::Manager m_objectManager; //!< Object Manager main instance
|
||||||
public:
|
public:
|
||||||
ewol::object::Manager& getEObjectManager(void) {
|
ewol::object::Manager& getEObjectManager() {
|
||||||
return m_objectManager;
|
return m_objectManager;
|
||||||
};
|
};
|
||||||
private:
|
private:
|
||||||
ewol::resource::Manager m_resourceManager; //!< global resources Manager
|
ewol::resource::Manager m_resourceManager; //!< global resources Manager
|
||||||
public:
|
public:
|
||||||
ewol::resource::Manager& getResourcesManager(void) {
|
ewol::resource::Manager& getResourcesManager() {
|
||||||
return m_resourceManager;
|
return m_resourceManager;
|
||||||
};
|
};
|
||||||
public:
|
public:
|
||||||
Context(int32_t _argc=0, const char* _argv[]=NULL);
|
Context(int32_t _argc=0, const char* _argv[]=NULL);
|
||||||
virtual ~Context(void);
|
virtual ~Context();
|
||||||
protected:
|
protected:
|
||||||
/**
|
/**
|
||||||
* @brief set the curent interface.
|
* @brief set the curent interface.
|
||||||
* @note this lock the main mutex
|
* @note this lock the main mutex
|
||||||
*/
|
*/
|
||||||
void lockContext(void);
|
void lockContext();
|
||||||
/**
|
/**
|
||||||
* @brief set the curent interface at NULL.
|
* @brief set the curent interface at NULL.
|
||||||
* @note this un-lock the main mutex
|
* @note this un-lock the main mutex
|
||||||
*/
|
*/
|
||||||
void unLockContext(void);
|
void unLockContext();
|
||||||
private:
|
private:
|
||||||
int64_t m_previousDisplayTime; // this is to limit framerate ... in case...
|
int64_t m_previousDisplayTime; // this is to limit framerate ... in case...
|
||||||
ewol::context::InputManager m_input;
|
ewol::context::InputManager m_input;
|
||||||
@ -94,7 +94,7 @@ namespace ewol {
|
|||||||
/**
|
/**
|
||||||
* @brief Processing all the event arrived ... (commoly called in draw function)
|
* @brief Processing all the event arrived ... (commoly called in draw function)
|
||||||
*/
|
*/
|
||||||
void processEvents(void);
|
void processEvents();
|
||||||
public:
|
public:
|
||||||
|
|
||||||
virtual void setArchiveDir(int _mode, const char* _str);
|
virtual void setArchiveDir(int _mode, const char* _str);
|
||||||
@ -116,22 +116,22 @@ namespace ewol {
|
|||||||
/**
|
/**
|
||||||
* @brief The current context is suspended
|
* @brief The current context is suspended
|
||||||
*/
|
*/
|
||||||
virtual void OS_Suspend(void);
|
virtual void OS_Suspend();
|
||||||
/**
|
/**
|
||||||
* @brief The current context is resumed
|
* @brief The current context is resumed
|
||||||
*/
|
*/
|
||||||
virtual void OS_Resume(void);
|
virtual void OS_Resume();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief The current context is set in foreground (framerate is maximum speed)
|
* @brief The current context is set in foreground (framerate is maximum speed)
|
||||||
*/
|
*/
|
||||||
virtual void OS_Foreground(void);
|
virtual void OS_Foreground();
|
||||||
/**
|
/**
|
||||||
* @brief The current context is set in background (framerate is slowing down (max fps)/5 # 4fps)
|
* @brief The current context is set in background (framerate is slowing down (max fps)/5 # 4fps)
|
||||||
*/
|
*/
|
||||||
virtual void OS_Background(void);
|
virtual void OS_Background();
|
||||||
|
|
||||||
void requestUpdateSize(void);
|
void requestUpdateSize();
|
||||||
|
|
||||||
// return true if a flush is needed
|
// return true if a flush is needed
|
||||||
bool OS_Draw(bool _displayEveryTime);
|
bool OS_Draw(bool _displayEveryTime);
|
||||||
@ -144,19 +144,19 @@ namespace ewol {
|
|||||||
/**
|
/**
|
||||||
* @brief reset event management for the IO like Input ou Mouse or keyborad
|
* @brief reset event management for the IO like Input ou Mouse or keyborad
|
||||||
*/
|
*/
|
||||||
void resetIOEvent(void);
|
void resetIOEvent();
|
||||||
/**
|
/**
|
||||||
* @brief The OS inform that the openGL constext has been destroy == > use to automaticly reload the texture and other thinks ...
|
* @brief The OS inform that the openGL constext has been destroy == > use to automaticly reload the texture and other thinks ...
|
||||||
*/
|
*/
|
||||||
void OS_OpenGlContextDestroy(void);
|
void OS_OpenGlContextDestroy();
|
||||||
/**
|
/**
|
||||||
* @brief The OS Inform that the Window has been killed
|
* @brief The OS Inform that the Window has been killed
|
||||||
*/
|
*/
|
||||||
void OS_Stop(void);
|
void OS_Stop();
|
||||||
/**
|
/**
|
||||||
* @brief The application request that the Window will be killed
|
* @brief The application request that the Window will be killed
|
||||||
*/
|
*/
|
||||||
virtual void stop(void);
|
virtual void stop();
|
||||||
private:
|
private:
|
||||||
ewol::widget::Windows* m_windowsCurrent; //!< curent displayed windows
|
ewol::widget::Windows* m_windowsCurrent; //!< curent displayed windows
|
||||||
public:
|
public:
|
||||||
@ -169,7 +169,7 @@ namespace ewol {
|
|||||||
* @brief get the current windows that is displayed
|
* @brief get the current windows that is displayed
|
||||||
* @return the current handle on the windows (can be null)
|
* @return the current handle on the windows (can be null)
|
||||||
*/
|
*/
|
||||||
ewol::widget::Windows* getWindows(void) {
|
ewol::widget::Windows* getWindows() {
|
||||||
return m_windowsCurrent;
|
return m_windowsCurrent;
|
||||||
};
|
};
|
||||||
private:
|
private:
|
||||||
@ -179,7 +179,7 @@ namespace ewol {
|
|||||||
* @brief get the current windows size
|
* @brief get the current windows size
|
||||||
* @return the current size ...
|
* @return the current size ...
|
||||||
*/
|
*/
|
||||||
const vec2& getSize(void) {
|
const vec2& getSize() {
|
||||||
return m_windowsSize;
|
return m_windowsSize;
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
@ -205,23 +205,23 @@ namespace ewol {
|
|||||||
/**
|
/**
|
||||||
* @brief The OS inform that the Windows is now Hidden.
|
* @brief The OS inform that the Windows is now Hidden.
|
||||||
*/
|
*/
|
||||||
void OS_Hide(void);
|
void OS_Hide();
|
||||||
/**
|
/**
|
||||||
* @brief The Application request that the Windows will be Hidden.
|
* @brief The Application request that the Windows will be Hidden.
|
||||||
*/
|
*/
|
||||||
virtual void hide(void);
|
virtual void hide();
|
||||||
/**
|
/**
|
||||||
* @brief The OS inform that the Windows is now visible.
|
* @brief The OS inform that the Windows is now visible.
|
||||||
*/
|
*/
|
||||||
void OS_Show(void);
|
void OS_Show();
|
||||||
/**
|
/**
|
||||||
* @brief The Application request that the Windows will be visible.
|
* @brief The Application request that the Windows will be visible.
|
||||||
*/
|
*/
|
||||||
virtual void show(void);
|
virtual void show();
|
||||||
/**
|
/**
|
||||||
* @brief Redraw all the windows
|
* @brief Redraw all the windows
|
||||||
*/
|
*/
|
||||||
void forceRedrawAll(void);
|
void forceRedrawAll();
|
||||||
|
|
||||||
// TODO : Later ...
|
// TODO : Later ...
|
||||||
/**
|
/**
|
||||||
@ -238,16 +238,16 @@ namespace ewol {
|
|||||||
/**
|
/**
|
||||||
* @brief This fonction un-lock the pointer properties to move in relative instead of absolute
|
* @brief This fonction un-lock the pointer properties to move in relative instead of absolute
|
||||||
*/
|
*/
|
||||||
void inputEventUnGrabPointer(void);
|
void inputEventUnGrabPointer();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief display the virtal keyboard (for touch system only)
|
* @brief display the virtal keyboard (for touch system only)
|
||||||
*/
|
*/
|
||||||
virtual void keyboardShow(void);
|
virtual void keyboardShow();
|
||||||
/**
|
/**
|
||||||
* @brief Hide the virtal keyboard (for touch system only)
|
* @brief Hide the virtal keyboard (for touch system only)
|
||||||
*/
|
*/
|
||||||
virtual void keyboardHide(void);
|
virtual void keyboardHide();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Inform the Gui that we want to have a copy of the clipboard
|
* @brief Inform the Gui that we want to have a copy of the clipboard
|
||||||
@ -300,14 +300,14 @@ namespace ewol {
|
|||||||
* @note : must be implemented in all system OS implementation
|
* @note : must be implemented in all system OS implementation
|
||||||
* @return The curent time of the process
|
* @return The curent time of the process
|
||||||
*/
|
*/
|
||||||
static int64_t getTime(void);
|
static int64_t getTime();
|
||||||
#if defined(__TARGET_OS__Android)
|
#if defined(__TARGET_OS__Android)
|
||||||
public:
|
public:
|
||||||
typedef void (*AndroidAudioCallback)(void* _data,
|
typedef void (*AndroidAudioCallback)(void* _data,
|
||||||
int32_t _size,
|
int32_t _size,
|
||||||
void* _userData);
|
void* _userData);
|
||||||
// Android specific audio interface :
|
// Android specific audio interface :
|
||||||
virtual int32_t audioGetDeviceCount(void) {
|
virtual int32_t audioGetDeviceCount() {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
virtual std::string audioGetDeviceProperty(int32_t _idDevice) {
|
virtual std::string audioGetDeviceProperty(int32_t _idDevice) {
|
||||||
@ -364,7 +364,7 @@ namespace ewol {
|
|||||||
* @brief From everyware in the program, we can get the context inteface.
|
* @brief From everyware in the program, we can get the context inteface.
|
||||||
* @return current reference on the instance.
|
* @return current reference on the instance.
|
||||||
*/
|
*/
|
||||||
Context& getContext(void);
|
Context& getContext();
|
||||||
};
|
};
|
||||||
|
|
||||||
//!< must be define in CPP by the application ... this are the main init and unInit of the Application
|
//!< must be define in CPP by the application ... this are the main init and unInit of the Application
|
||||||
|
@ -56,13 +56,13 @@ namespace ewol {
|
|||||||
/**
|
/**
|
||||||
* @brief Destructor
|
* @brief Destructor
|
||||||
*/
|
*/
|
||||||
~Fps(void) {
|
~Fps() {
|
||||||
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @brief this might be call every time a diplay start
|
* @brief this might be call every time a diplay start
|
||||||
*/
|
*/
|
||||||
void tic(void) {
|
void tic() {
|
||||||
int64_t currentTime = ewol::getTime();
|
int64_t currentTime = ewol::getTime();
|
||||||
ticTime = currentTime;
|
ticTime = currentTime;
|
||||||
nbCallTime++;
|
nbCallTime++;
|
||||||
@ -98,14 +98,14 @@ namespace ewol {
|
|||||||
/**
|
/**
|
||||||
* @brief this might be call when a display is really done
|
* @brief this might be call when a display is really done
|
||||||
*/
|
*/
|
||||||
void incrementCounter(void) {
|
void incrementCounter() {
|
||||||
nbDisplayTime++;
|
nbDisplayTime++;
|
||||||
drwingDone = true;
|
drwingDone = true;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @brief draw debug display ...
|
* @brief draw debug display ...
|
||||||
*/
|
*/
|
||||||
void draw(void) {
|
void draw() {
|
||||||
if (true == display) {
|
if (true == display) {
|
||||||
if (nbDisplayTime>0) {
|
if (nbDisplayTime>0) {
|
||||||
EWOL_INFO(m_displayName << " : Active : "
|
EWOL_INFO(m_displayName << " : Active : "
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
#include <mach/mach.h>
|
#include <mach/mach.h>
|
||||||
|
|
||||||
|
|
||||||
int64_t ewol::getTime(void) {
|
int64_t ewol::getTime() {
|
||||||
struct timespec now;
|
struct timespec now;
|
||||||
clock_serv_t cclock;
|
clock_serv_t cclock;
|
||||||
mach_timespec_t mts;
|
mach_timespec_t mts;
|
||||||
@ -58,11 +58,11 @@ public:
|
|||||||
// nothing to do ...
|
// nothing to do ...
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t Run(void) {
|
int32_t Run() {
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
virtual void stop(void) {
|
virtual void stop() {
|
||||||
mm_exit();
|
mm_exit();
|
||||||
}
|
}
|
||||||
public:
|
public:
|
||||||
@ -189,40 +189,40 @@ void IOs::setKeyboardMove(ewol::key::Special& _keyboardMode, enum ewol::key::key
|
|||||||
interface->MAC_SetKeyboardMove(_keyboardMode, _move, _isDown);
|
interface->MAC_SetKeyboardMove(_keyboardMode, _move, _isDown);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IOs::start(void) {
|
void IOs::start() {
|
||||||
if (interface == NULL) {
|
if (interface == NULL) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//interface->OS_Start();
|
//interface->OS_Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
void IOs::resume(void) {
|
void IOs::resume() {
|
||||||
if (interface == NULL) {
|
if (interface == NULL) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
interface->OS_Resume();
|
interface->OS_Resume();
|
||||||
}
|
}
|
||||||
|
|
||||||
void IOs::suspend(void) {
|
void IOs::suspend() {
|
||||||
if (interface == NULL) {
|
if (interface == NULL) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
interface->OS_Suspend();
|
interface->OS_Suspend();
|
||||||
}
|
}
|
||||||
|
|
||||||
void IOs::stop(void) {
|
void IOs::stop() {
|
||||||
if (interface == NULL) {
|
if (interface == NULL) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
interface->OS_Stop();
|
interface->OS_Stop();
|
||||||
}
|
}
|
||||||
void IOs::background(void) {
|
void IOs::background() {
|
||||||
if (interface == NULL) {
|
if (interface == NULL) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
interface->OS_Background();
|
interface->OS_Background();
|
||||||
}
|
}
|
||||||
void IOs::foreground(void) {
|
void IOs::foreground() {
|
||||||
if (interface == NULL) {
|
if (interface == NULL) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -244,7 +244,7 @@ int ewol::run(int _argc, const char *_argv[]) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Creat and relaese ewol::Context interface:
|
// Creat and relaese ewol::Context interface:
|
||||||
void IOs::createInterface(void) {
|
void IOs::createInterface() {
|
||||||
etk::setArgZero(l_argv[0]);
|
etk::setArgZero(l_argv[0]);
|
||||||
EWOL_INFO("Create new interface");
|
EWOL_INFO("Create new interface");
|
||||||
interface = new MacOSInterface(l_argc, l_argv);
|
interface = new MacOSInterface(l_argc, l_argv);
|
||||||
@ -254,7 +254,7 @@ void IOs::createInterface(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void IOs::releaseInterface(void) {
|
void IOs::releaseInterface() {
|
||||||
if (interface == NULL) {
|
if (interface == NULL) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
|
|
||||||
namespace IOs {
|
namespace IOs {
|
||||||
// Create and relaese ewol::Context interface:
|
// Create and relaese ewol::Context interface:
|
||||||
void createInterface(void);
|
void createInterface();
|
||||||
void releaseInterface(void);
|
void releaseInterface();
|
||||||
// return true if a flush is needed
|
// return true if a flush is needed
|
||||||
bool draw(bool _displayEveryTime);
|
bool draw(bool _displayEveryTime);
|
||||||
/**
|
/**
|
||||||
@ -28,12 +28,12 @@ namespace IOs {
|
|||||||
void setInputMotion(int32_t _id, float _x, float _y);
|
void setInputMotion(int32_t _id, float _x, float _y);
|
||||||
void setKeyboard(ewol::key::Special _keyboardMode, int32_t _unichar, bool _isDown, bool _isAReapeateKey);
|
void setKeyboard(ewol::key::Special _keyboardMode, int32_t _unichar, bool _isDown, bool _isAReapeateKey);
|
||||||
void setKeyboardMove(ewol::key::Special& _keyboardMode, enum ewol::key::keyboard _move, bool _isDown);
|
void setKeyboardMove(ewol::key::Special& _keyboardMode, enum ewol::key::keyboard _move, bool _isDown);
|
||||||
void start(void);
|
void start();
|
||||||
void stop(void);
|
void stop();
|
||||||
void foreground(void);
|
void foreground();
|
||||||
void background(void);
|
void background();
|
||||||
void resume(void);
|
void resume();
|
||||||
void suspend(void);
|
void suspend();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
int mm_main(int argc, const char *argv[]);
|
int mm_main(int argc, const char *argv[]);
|
||||||
void mm_exit(void);
|
void mm_exit();
|
||||||
void mm_openURL(const char *_url);
|
void mm_openURL(const char *_url);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -35,8 +35,8 @@
|
|||||||
int deltaDisplay;
|
int deltaDisplay;
|
||||||
int displayCounter;
|
int displayCounter;
|
||||||
}
|
}
|
||||||
- (void)stopDisplayLink;
|
- ()stopDisplayLink;
|
||||||
- (void)startDisplayLink;
|
- ()startDisplayLink;
|
||||||
- (void)speedSlow;
|
- ()speedSlow;
|
||||||
- (void)speedNormal;
|
- ()speedNormal;
|
||||||
@end
|
@end
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
#define EVENT_DEBUG EWOL_VERBOSE
|
#define EVENT_DEBUG EWOL_VERBOSE
|
||||||
//#define EVENT_DEBUG EWOL_DEBUG
|
//#define EVENT_DEBUG EWOL_DEBUG
|
||||||
|
|
||||||
void ewol::context::InputManager::calculateLimit(void) {
|
void ewol::context::InputManager::calculateLimit() {
|
||||||
m_eventInputLimit.sepatateTime = 300000; // µs
|
m_eventInputLimit.sepatateTime = 300000; // µs
|
||||||
m_eventInputLimit.DpiOffset = m_dpi*100;
|
m_eventInputLimit.DpiOffset = m_dpi*100;
|
||||||
m_eventMouseLimit.sepatateTime = 300000; // µs
|
m_eventMouseLimit.sepatateTime = 300000; // µs
|
||||||
@ -133,7 +133,7 @@ void ewol::context::InputManager::grabPointer(ewol::Widget* _widget) {
|
|||||||
_widget->getSize().y()/2.0f) );
|
_widget->getSize().y()/2.0f) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::context::InputManager::unGrabPointer(void) {
|
void ewol::context::InputManager::unGrabPointer() {
|
||||||
m_grabWidget = NULL;
|
m_grabWidget = NULL;
|
||||||
m_context.grabPointerEvents(false, vec2(0,0));
|
m_context.grabPointerEvents(false, vec2(0,0));
|
||||||
}
|
}
|
||||||
@ -151,7 +151,7 @@ void ewol::context::InputManager::onObjectRemove(ewol::Object * removeObject) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::context::InputManager::newLayerSet(void) {
|
void ewol::context::InputManager::newLayerSet() {
|
||||||
for(int32_t iii=0; iii<MAX_MANAGE_INPUT; iii++) {
|
for(int32_t iii=0; iii<MAX_MANAGE_INPUT; iii++) {
|
||||||
// remove the property of this input ...
|
// remove the property of this input ...
|
||||||
abortElement(m_eventInputSaved, iii, ewol::key::typeFinger);
|
abortElement(m_eventInputSaved, iii, ewol::key::typeFinger);
|
||||||
@ -174,7 +174,7 @@ ewol::context::InputManager::InputManager(ewol::Context& _context) :
|
|||||||
EWOL_INFO("Init (end)");
|
EWOL_INFO("Init (end)");
|
||||||
}
|
}
|
||||||
|
|
||||||
ewol::context::InputManager::~InputManager(void) {
|
ewol::context::InputManager::~InputManager() {
|
||||||
EWOL_INFO("Un-Init (start)");
|
EWOL_INFO("Un-Init (start)");
|
||||||
EWOL_INFO("Un-Init (end)");
|
EWOL_INFO("Un-Init (end)");
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@ namespace ewol {
|
|||||||
int32_t m_dpi;
|
int32_t m_dpi;
|
||||||
InputLimit m_eventInputLimit;
|
InputLimit m_eventInputLimit;
|
||||||
InputLimit m_eventMouseLimit;
|
InputLimit m_eventMouseLimit;
|
||||||
void calculateLimit(void);
|
void calculateLimit();
|
||||||
InputPoperty m_eventInputSaved[MAX_MANAGE_INPUT];
|
InputPoperty m_eventInputSaved[MAX_MANAGE_INPUT];
|
||||||
InputPoperty m_eventMouseSaved[MAX_MANAGE_INPUT];
|
InputPoperty m_eventMouseSaved[MAX_MANAGE_INPUT];
|
||||||
void abortElement(InputPoperty* _eventTable, int32_t _idInput, enum ewol::key::type _type);
|
void abortElement(InputPoperty* _eventTable, int32_t _idInput, enum ewol::key::type _type);
|
||||||
@ -87,7 +87,7 @@ namespace ewol {
|
|||||||
ewol::Context& m_context;
|
ewol::Context& m_context;
|
||||||
public:
|
public:
|
||||||
InputManager(ewol::Context& _context);
|
InputManager(ewol::Context& _context);
|
||||||
~InputManager(void);
|
~InputManager();
|
||||||
void setDpi(int32_t _newDPI);
|
void setDpi(int32_t _newDPI);
|
||||||
|
|
||||||
// note if id<0 == > the it was finger event ...
|
// note if id<0 == > the it was finger event ...
|
||||||
@ -103,7 +103,7 @@ namespace ewol {
|
|||||||
/**
|
/**
|
||||||
* @brief a new layer on the windows is set == > might remove all the property of the current element ...
|
* @brief a new layer on the windows is set == > might remove all the property of the current element ...
|
||||||
*/
|
*/
|
||||||
void newLayerSet(void);
|
void newLayerSet();
|
||||||
/**
|
/**
|
||||||
* @brief This is to transfert the event from one widget to another one
|
* @brief This is to transfert the event from one widget to another one
|
||||||
* @param _source the widget where the event came from
|
* @param _source the widget where the event came from
|
||||||
@ -118,7 +118,7 @@ namespace ewol {
|
|||||||
/**
|
/**
|
||||||
* @brief This fonction un-lock the pointer properties to move in relative instead of absolute
|
* @brief This fonction un-lock the pointer properties to move in relative instead of absolute
|
||||||
*/
|
*/
|
||||||
void unGrabPointer(void);
|
void unGrabPointer();
|
||||||
private:
|
private:
|
||||||
ewol::key::Special m_specialKey;
|
ewol::key::Special m_specialKey;
|
||||||
public:
|
public:
|
||||||
|
@ -11,6 +11,6 @@
|
|||||||
@interface MacOsAppDelegate : NSObject <NSApplicationDelegate>
|
@interface MacOsAppDelegate : NSObject <NSApplicationDelegate>
|
||||||
|
|
||||||
@property (assign) IBOutlet NSWindow *window;
|
@property (assign) IBOutlet NSWindow *window;
|
||||||
- (void)sendEvent:(NSEvent *)event;
|
- ()sendEvent:(NSEvent *)event;
|
||||||
- (void)applicationWillResignActive:(MacOsAppDelegate *)application;
|
- ()applicationWillResignActive:(MacOsAppDelegate *)application;
|
||||||
@end
|
@end
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
#include <mach/mach.h>
|
#include <mach/mach.h>
|
||||||
|
|
||||||
|
|
||||||
int64_t ewol::getTime(void) {
|
int64_t ewol::getTime() {
|
||||||
struct timespec now;
|
struct timespec now;
|
||||||
clock_serv_t cclock;
|
clock_serv_t cclock;
|
||||||
mach_timespec_t mts;
|
mach_timespec_t mts;
|
||||||
@ -58,7 +58,7 @@ class MacOSInterface : public ewol::Context {
|
|||||||
mm_main(_argc, _argv);
|
mm_main(_argc, _argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t Run(void) {
|
int32_t Run() {
|
||||||
return mm_run();
|
return mm_run();
|
||||||
}
|
}
|
||||||
public:
|
public:
|
||||||
|
@ -14,7 +14,7 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
int mm_main(int argc, const char *argv[]);
|
int mm_main(int argc, const char *argv[]);
|
||||||
int mm_run(void);
|
int mm_run();
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@ -14,21 +14,21 @@
|
|||||||
@interface OpenGLView : NSOpenGLView<NSWindowDelegate> {
|
@interface OpenGLView : NSOpenGLView<NSWindowDelegate> {
|
||||||
NSTimer* _refreshTimer;
|
NSTimer* _refreshTimer;
|
||||||
}
|
}
|
||||||
- (void)prepareOpenGL;
|
- ()prepareOpenGL;
|
||||||
- (void)drawRect:(NSRect) bounds;
|
- ()drawRect:(NSRect) bounds;
|
||||||
- (void)mouseDown:(NSEvent *) event;
|
- ()mouseDown:(NSEvent *) event;
|
||||||
- (void)mouseDragged:(NSEvent *) event;
|
- ()mouseDragged:(NSEvent *) event;
|
||||||
- (void)mouseUp:(NSEvent *)event;
|
- ()mouseUp:(NSEvent *)event;
|
||||||
- (void)mouseMoved:(NSEvent *)event;
|
- ()mouseMoved:(NSEvent *)event;
|
||||||
- (void)mouseEntered:(NSEvent *)event;
|
- ()mouseEntered:(NSEvent *)event;
|
||||||
- (void)mouseExited:(NSEvent *)event;
|
- ()mouseExited:(NSEvent *)event;
|
||||||
- (void)rightMouseDown:(NSEvent *)event;
|
- ()rightMouseDown:(NSEvent *)event;
|
||||||
- (void)rightMouseDragged:(NSEvent *)event;
|
- ()rightMouseDragged:(NSEvent *)event;
|
||||||
- (void)rightMouseUp:(NSEvent *)event;
|
- ()rightMouseUp:(NSEvent *)event;
|
||||||
- (void)otherMouseDown:(NSEvent *)event;
|
- ()otherMouseDown:(NSEvent *)event;
|
||||||
- (void)otherMouseDragged:(NSEvent *)event;
|
- ()otherMouseDragged:(NSEvent *)event;
|
||||||
- (void)otherMouseUp:(NSEvent *)event;
|
- ()otherMouseUp:(NSEvent *)event;
|
||||||
//- (void)sendEvent:(NSEvent *)event
|
//- ()sendEvent:(NSEvent *)event
|
||||||
- (void)keyDown:(NSEvent *)theEvent;
|
- ()keyDown:(NSEvent *)theEvent;
|
||||||
- (void)flagsChanged:(NSEvent *)theEvent;
|
- ()flagsChanged:(NSEvent *)theEvent;
|
||||||
@end
|
@end
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
}
|
}
|
||||||
+ (id)alloc;
|
+ (id)alloc;
|
||||||
- (id)init;
|
- (id)init;
|
||||||
+ (void)dealloc;
|
+ ()dealloc;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
int64_t ewol::getTime(void) {
|
int64_t ewol::getTime() {
|
||||||
struct timeval now;
|
struct timeval now;
|
||||||
gettimeofday(&now, NULL);
|
gettimeofday(&now, NULL);
|
||||||
//EWOL_VERBOSE("current time : " << now.tv_sec << "s " << now.tv_usec << "us");
|
//EWOL_VERBOSE("current time : " << now.tv_sec << "s " << now.tv_usec << "us");
|
||||||
@ -54,11 +54,11 @@ class WindowsContext : public ewol::eContext {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
~WindowsContext(void) {
|
~WindowsContext() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t Run(void) {
|
int32_t Run() {
|
||||||
HINSTANCE hInstance = 0;
|
HINSTANCE hInstance = 0;
|
||||||
WNDCLASS wc;
|
WNDCLASS wc;
|
||||||
HWND hWnd;
|
HWND hWnd;
|
||||||
@ -104,7 +104,7 @@ class WindowsContext : public ewol::eContext {
|
|||||||
DispatchMessage( &msg );
|
DispatchMessage( &msg );
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
(void)Draw(true);
|
()Draw(true);
|
||||||
SwapBuffers( hDC );
|
SwapBuffers( hDC );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -115,7 +115,7 @@ class WindowsContext : public ewol::eContext {
|
|||||||
return msg.wParam;
|
return msg.wParam;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Stop(void) {
|
void Stop() {
|
||||||
m_run = false;
|
m_run = false;
|
||||||
// To exit program ...
|
// To exit program ...
|
||||||
PostQuitMessage(0);
|
PostQuitMessage(0);
|
||||||
|
@ -53,7 +53,7 @@ bool hasDisplay = false;
|
|||||||
#define X11_CRITICAL EWOL_VERBOSE
|
#define X11_CRITICAL EWOL_VERBOSE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int64_t ewol::getTime(void) {
|
int64_t ewol::getTime() {
|
||||||
struct timespec now;
|
struct timespec now;
|
||||||
int ret = clock_gettime(CLOCK_REALTIME, &now);
|
int ret = clock_gettime(CLOCK_REALTIME, &now);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
@ -191,11 +191,11 @@ class X11Interface : public ewol::Context {
|
|||||||
m_run = true;
|
m_run = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
~X11Interface(void) {
|
~X11Interface() {
|
||||||
// TODO : ...
|
// TODO : ...
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t run(void) {
|
int32_t run() {
|
||||||
bool specialEventThatNeedARedraw = false;
|
bool specialEventThatNeedARedraw = false;
|
||||||
// main cycle
|
// main cycle
|
||||||
while(true == m_run) {
|
while(true == m_run) {
|
||||||
@ -740,7 +740,7 @@ class X11Interface : public ewol::Context {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
/****************************************************************************************/
|
/****************************************************************************************/
|
||||||
virtual void stop(void) {
|
virtual void stop() {
|
||||||
X11_INFO("X11-API: Stop");
|
X11_INFO("X11-API: Stop");
|
||||||
m_run = false;
|
m_run = false;
|
||||||
}
|
}
|
||||||
@ -909,7 +909,7 @@ class X11Interface : public ewol::Context {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/****************************************************************************************/
|
/****************************************************************************************/
|
||||||
bool createX11Context(void) {
|
bool createX11Context() {
|
||||||
X11_INFO("X11: CreateX11Context");
|
X11_INFO("X11: CreateX11Context");
|
||||||
int x,y, attr_mask;
|
int x,y, attr_mask;
|
||||||
XSizeHints hints;
|
XSizeHints hints;
|
||||||
@ -1215,7 +1215,7 @@ class X11Interface : public ewol::Context {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/****************************************************************************************/
|
/****************************************************************************************/
|
||||||
bool createOGlContext(void) {
|
bool createOGlContext() {
|
||||||
X11_INFO("X11:CreateOGlContext");
|
X11_INFO("X11:CreateOGlContext");
|
||||||
/* create a GLX context */
|
/* create a GLX context */
|
||||||
GLXContext RenderContext = glXCreateContext(m_display, m_visual, 0, GL_TRUE);
|
GLXContext RenderContext = glXCreateContext(m_display, m_visual, 0, GL_TRUE);
|
||||||
|
@ -51,7 +51,7 @@ std::ostream& ewol::operator <<(std::ostream& _os, const enum ewol::context::cli
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ewol::context::clipBoard::init(void) {
|
void ewol::context::clipBoard::init() {
|
||||||
EWOL_INFO("Initialyse ClipBoards");
|
EWOL_INFO("Initialyse ClipBoards");
|
||||||
for(int32_t i=0; i<ewol::context::clipBoard::clipboardCount; i++) {
|
for(int32_t i=0; i<ewol::context::clipBoard::clipboardCount; i++) {
|
||||||
mesCopy[i].clear();
|
mesCopy[i].clear();
|
||||||
@ -59,7 +59,7 @@ void ewol::context::clipBoard::init(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ewol::context::clipBoard::unInit(void) {
|
void ewol::context::clipBoard::unInit() {
|
||||||
EWOL_INFO("Initialyse ClipBoards");
|
EWOL_INFO("Initialyse ClipBoards");
|
||||||
for(int32_t i=0; i<ewol::context::clipBoard::clipboardCount; i++) {
|
for(int32_t i=0; i<ewol::context::clipBoard::clipboardCount; i++) {
|
||||||
mesCopy[i].clear();
|
mesCopy[i].clear();
|
||||||
|
@ -66,11 +66,11 @@ namespace ewol {
|
|||||||
/**
|
/**
|
||||||
* @brief initialize the clipboard system (done by ewol)
|
* @brief initialize the clipboard system (done by ewol)
|
||||||
*/
|
*/
|
||||||
void init(void);
|
void init();
|
||||||
/**
|
/**
|
||||||
* @brief Un-Initialize the clipboard system (done by ewol)
|
* @brief Un-Initialize the clipboard system (done by ewol)
|
||||||
*/
|
*/
|
||||||
void unInit(void);
|
void unInit();
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
|
@ -17,7 +17,7 @@ void ewol::context::CommandLine::parse(int32_t _argc, const char* _argv[]) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t ewol::context::CommandLine::size(void) {
|
int32_t ewol::context::CommandLine::size() {
|
||||||
return m_listArgs.size();
|
return m_listArgs.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ namespace ewol {
|
|||||||
* @brief get the number of element in the Command line
|
* @brief get the number of element in the Command line
|
||||||
* @return the number of element
|
* @return the number of element
|
||||||
*/
|
*/
|
||||||
int32_t size(void);
|
int32_t size();
|
||||||
/**
|
/**
|
||||||
* @brief get an element with a specific ID
|
* @brief get an element with a specific ID
|
||||||
* @return _id The cmdLine Id element
|
* @return _id The cmdLine Id element
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
#include <directfbgl.h>
|
#include <directfbgl.h>
|
||||||
|
|
||||||
|
|
||||||
int64_t guiInterface::getTime(void) {
|
int64_t guiInterface::getTime() {
|
||||||
struct timespec now;
|
struct timespec now;
|
||||||
int ret = clock_gettime(CLOCK_REALTIME, &now);
|
int ret = clock_gettime(CLOCK_REALTIME, &now);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
@ -190,7 +190,7 @@ void DirectFB_Init(int argc, const char *argv[]) {
|
|||||||
EWOL_INFO("DirectFB init (STOP)");
|
EWOL_INFO("DirectFB init (STOP)");
|
||||||
}
|
}
|
||||||
|
|
||||||
void DirectFB_UnInit(void) {
|
void DirectFB_UnInit() {
|
||||||
// release our interfaces to shutdown DirectFB
|
// release our interfaces to shutdown DirectFB
|
||||||
primary_gl->release(primary_gl);
|
primary_gl->release(primary_gl);
|
||||||
primary->release(primary);
|
primary->release(primary);
|
||||||
@ -198,7 +198,7 @@ void DirectFB_UnInit(void) {
|
|||||||
dfb->release(dfb);
|
dfb->release(dfb);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DirectFB_Run(void) {
|
void DirectFB_Run() {
|
||||||
EWOL_INFO("X11 configure windows size : (" << screen_height << "," << screen_width << ")");
|
EWOL_INFO("X11 configure windows size : (" << screen_height << "," << screen_width << ")");
|
||||||
eSystem::Resize(screen_width, screen_height);
|
eSystem::Resize(screen_width, screen_height);
|
||||||
|
|
||||||
@ -384,17 +384,17 @@ void guiInterface::ClipBoardSet(enum ewol::context::clipBoard::clipboardListe _c
|
|||||||
#define __class__ "guiInterface"
|
#define __class__ "guiInterface"
|
||||||
|
|
||||||
|
|
||||||
void guiInterface::Stop(void) {
|
void guiInterface::Stop() {
|
||||||
EWOL_INFO("X11-API: Stop");
|
EWOL_INFO("X11-API: Stop");
|
||||||
m_run = false;
|
m_run = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void guiInterface::KeyboardShow(void) {
|
void guiInterface::KeyboardShow() {
|
||||||
// nothing to do : No keyboard on computer ...
|
// nothing to do : No keyboard on computer ...
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void guiInterface::KeyboardHide(void) {
|
void guiInterface::KeyboardHide() {
|
||||||
// nothing to do : No keyboard on computer ...
|
// nothing to do : No keyboard on computer ...
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
#include <ewol/debug.h>
|
#include <ewol/debug.h>
|
||||||
|
|
||||||
int32_t ewol::getLogId(void) {
|
int32_t ewol::getLogId() {
|
||||||
static int32_t g_val = etk::log::registerInstance("ewol");
|
static int32_t g_val = etk::log::registerInstance("ewol");
|
||||||
return g_val;
|
return g_val;
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#include <etk/log.h>
|
#include <etk/log.h>
|
||||||
|
|
||||||
namespace ewol {
|
namespace ewol {
|
||||||
int32_t getLogId(void);
|
int32_t getLogId();
|
||||||
};
|
};
|
||||||
// TODO : Review this problem of multiple intanciation of "std::stringbuf sb"
|
// TODO : Review this problem of multiple intanciation of "std::stringbuf sb"
|
||||||
#define EWOL_BASE(info,data) \
|
#define EWOL_BASE(info,data) \
|
||||||
|
@ -34,25 +34,25 @@ namespace ewol {
|
|||||||
void setType(enum ewol::key::keyboard _type) {
|
void setType(enum ewol::key::keyboard _type) {
|
||||||
m_type = _type;
|
m_type = _type;
|
||||||
};
|
};
|
||||||
inline const enum ewol::key::keyboard& getType(void) const {
|
inline const enum ewol::key::keyboard& getType() const {
|
||||||
return m_type;
|
return m_type;
|
||||||
};
|
};
|
||||||
void setStatus(enum ewol::key::status _status) {
|
void setStatus(enum ewol::key::status _status) {
|
||||||
m_status = _status;
|
m_status = _status;
|
||||||
};
|
};
|
||||||
inline const enum ewol::key::status& getStatus(void) const {
|
inline const enum ewol::key::status& getStatus() const {
|
||||||
return m_status;
|
return m_status;
|
||||||
};
|
};
|
||||||
void setSpecialKey(const ewol::key::Special& _specialKey) {
|
void setSpecialKey(const ewol::key::Special& _specialKey) {
|
||||||
m_specialKey = _specialKey;
|
m_specialKey = _specialKey;
|
||||||
};
|
};
|
||||||
inline const ewol::key::Special& getSpecialKey(void) const {
|
inline const ewol::key::Special& getSpecialKey() const {
|
||||||
return m_specialKey;
|
return m_specialKey;
|
||||||
};
|
};
|
||||||
void setChar(char32_t _char) {
|
void setChar(char32_t _char) {
|
||||||
m_unicodeData = _char;
|
m_unicodeData = _char;
|
||||||
};
|
};
|
||||||
inline const char32_t& getChar(void) const {
|
inline const char32_t& getChar() const {
|
||||||
return m_unicodeData;
|
return m_unicodeData;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -36,37 +36,37 @@ namespace ewol {
|
|||||||
void setType(enum ewol::key::type _type) {
|
void setType(enum ewol::key::type _type) {
|
||||||
m_type = _type;
|
m_type = _type;
|
||||||
};
|
};
|
||||||
inline const enum ewol::key::type& getType(void) const {
|
inline const enum ewol::key::type& getType() const {
|
||||||
return m_type;
|
return m_type;
|
||||||
};
|
};
|
||||||
void setStatus(enum ewol::key::status _status) {
|
void setStatus(enum ewol::key::status _status) {
|
||||||
m_status = _status;
|
m_status = _status;
|
||||||
};
|
};
|
||||||
inline const enum ewol::key::status& getStatus(void) const {
|
inline const enum ewol::key::status& getStatus() const {
|
||||||
return m_status;
|
return m_status;
|
||||||
};
|
};
|
||||||
void setId(uint8_t _id) {
|
void setId(uint8_t _id) {
|
||||||
m_inputId = _id;
|
m_inputId = _id;
|
||||||
};
|
};
|
||||||
inline const uint8_t& getId(void) const {
|
inline const uint8_t& getId() const {
|
||||||
return m_inputId;
|
return m_inputId;
|
||||||
};
|
};
|
||||||
void setPos(const vec2& _pos) {
|
void setPos(const vec2& _pos) {
|
||||||
m_pos = _pos;
|
m_pos = _pos;
|
||||||
};
|
};
|
||||||
inline const vec2& getPos(void) const {
|
inline const vec2& getPos() const {
|
||||||
return m_pos;
|
return m_pos;
|
||||||
};
|
};
|
||||||
void setSpecialKey(const ewol::key::Special& _specialKey) {
|
void setSpecialKey(const ewol::key::Special& _specialKey) {
|
||||||
m_specialKey = _specialKey;
|
m_specialKey = _specialKey;
|
||||||
};
|
};
|
||||||
inline const ewol::key::Special& getSpecialKey(void) const {
|
inline const ewol::key::Special& getSpecialKey() const {
|
||||||
return m_specialKey;
|
return m_specialKey;
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* @brief Reset the input property of the curent event.
|
* @brief Reset the input property of the curent event.
|
||||||
*/
|
*/
|
||||||
void reset(void) const {
|
void reset() const {
|
||||||
// TODO : Call the entry element ant rest it ...
|
// TODO : Call the entry element ant rest it ...
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -92,13 +92,13 @@ namespace ewol {
|
|||||||
void setDestWidget(ewol::Widget* _dest) {
|
void setDestWidget(ewol::Widget* _dest) {
|
||||||
m_dest = _dest;
|
m_dest = _dest;
|
||||||
};
|
};
|
||||||
inline ewol::Widget* getDestWidget(void) const {
|
inline ewol::Widget* getDestWidget() const {
|
||||||
return m_dest;
|
return m_dest;
|
||||||
};
|
};
|
||||||
void setRealId(int32_t _realIdEvent) {
|
void setRealId(int32_t _realIdEvent) {
|
||||||
m_realIdEvent = _realIdEvent;
|
m_realIdEvent = _realIdEvent;
|
||||||
};
|
};
|
||||||
inline int32_t getRealId(void) const {
|
inline int32_t getRealId() const {
|
||||||
return m_realIdEvent;
|
return m_realIdEvent;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -34,28 +34,28 @@ namespace ewol {
|
|||||||
void setTime(int64_t _timeSystem) {
|
void setTime(int64_t _timeSystem) {
|
||||||
m_timeSystem=_timeSystem;
|
m_timeSystem=_timeSystem;
|
||||||
};
|
};
|
||||||
inline int64_t getTime(void) const {
|
inline int64_t getTime() const {
|
||||||
return m_timeSystem;
|
return m_timeSystem;
|
||||||
};
|
};
|
||||||
void setApplWakeUpTime(int64_t _timeUpAppl) {
|
void setApplWakeUpTime(int64_t _timeUpAppl) {
|
||||||
m_timeUpAppl=_timeUpAppl;
|
m_timeUpAppl=_timeUpAppl;
|
||||||
};
|
};
|
||||||
inline int64_t getApplWakeUpTime(void) const {
|
inline int64_t getApplWakeUpTime() const {
|
||||||
return m_timeUpAppl;
|
return m_timeUpAppl;
|
||||||
};
|
};
|
||||||
inline int64_t getApplUpTime(void) const {
|
inline int64_t getApplUpTime() const {
|
||||||
return m_timeSystem-m_timeUpAppl;
|
return m_timeSystem-m_timeUpAppl;
|
||||||
};
|
};
|
||||||
void setDelta(float _timeDelta) {
|
void setDelta(float _timeDelta) {
|
||||||
m_timeDelta=_timeDelta;
|
m_timeDelta=_timeDelta;
|
||||||
};
|
};
|
||||||
inline float getDelta(void) const {
|
inline float getDelta() const {
|
||||||
return m_timeDelta;
|
return m_timeDelta;
|
||||||
};
|
};
|
||||||
void setDeltaCall(float _timeDeltaCall) {
|
void setDeltaCall(float _timeDeltaCall) {
|
||||||
m_timeDeltaCall=_timeDeltaCall;
|
m_timeDeltaCall=_timeDeltaCall;
|
||||||
};
|
};
|
||||||
inline float getDeltaCall(void) const {
|
inline float getDeltaCall() const {
|
||||||
return m_timeDeltaCall;
|
return m_timeDeltaCall;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
#define EWOL_VERSION "0.0.0"
|
#define EWOL_VERSION "0.0.0"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::string ewol::getCompilationMode(void) {
|
std::string ewol::getCompilationMode() {
|
||||||
#ifdef MODE_RELEASE
|
#ifdef MODE_RELEASE
|
||||||
return "Release";
|
return "Release";
|
||||||
#else
|
#else
|
||||||
@ -29,7 +29,7 @@ std::string ewol::getCompilationMode(void) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string ewol::getBoardType(void) {
|
std::string ewol::getBoardType() {
|
||||||
#ifdef __TARGET_OS__Linux
|
#ifdef __TARGET_OS__Linux
|
||||||
return "Linux";
|
return "Linux";
|
||||||
#elif defined(__TARGET_OS__Android)
|
#elif defined(__TARGET_OS__Android)
|
||||||
@ -45,7 +45,7 @@ std::string ewol::getBoardType(void) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string ewol::getVersion(void) {
|
std::string ewol::getVersion() {
|
||||||
return EWOL_VERSION;
|
return EWOL_VERSION;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,23 +29,23 @@ namespace ewol {
|
|||||||
* @brief get EWOL version
|
* @brief get EWOL version
|
||||||
* @return The string that describe ewol version
|
* @return The string that describe ewol version
|
||||||
*/
|
*/
|
||||||
std::string getVersion(void);
|
std::string getVersion();
|
||||||
/**
|
/**
|
||||||
* @brief get current time in us...
|
* @brief get current time in us...
|
||||||
* @return The current time
|
* @return The current time
|
||||||
* @note is implemented by the OS implementation cf renderer/X11/...
|
* @note is implemented by the OS implementation cf renderer/X11/...
|
||||||
*/
|
*/
|
||||||
int64_t getTime(void);
|
int64_t getTime();
|
||||||
/**
|
/**
|
||||||
* @brief get compilation mode (release/debug)
|
* @brief get compilation mode (release/debug)
|
||||||
* @return the string of the mode of commpilation
|
* @return the string of the mode of commpilation
|
||||||
*/
|
*/
|
||||||
std::string getCompilationMode(void);
|
std::string getCompilationMode();
|
||||||
/**
|
/**
|
||||||
* @brief get the board type (Android/Linux/MacOs/...)
|
* @brief get the board type (Android/Linux/MacOs/...)
|
||||||
* @return the string of the mode of commpilation
|
* @return the string of the mode of commpilation
|
||||||
*/
|
*/
|
||||||
std::string getBoardType(void);
|
std::string getBoardType();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
// TODO : Update to support the Left and right of some key ...
|
// TODO : Update to support the Left and right of some key ...
|
||||||
|
|
||||||
ewol::key::Special::Special(void) :
|
ewol::key::Special::Special() :
|
||||||
m_value(0) {
|
m_value(0) {
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -57,7 +57,7 @@ void ewol::key::Special::update(enum ewol::key::keyboard _move, bool _isDown) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ewol::key::Special::getCapsLock(void) const {
|
bool ewol::key::Special::getCapsLock() const {
|
||||||
if ((m_value & EWOL_FLAG_KEY_CAPS_LOCK) != 0) {
|
if ((m_value & EWOL_FLAG_KEY_CAPS_LOCK) != 0) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -75,7 +75,7 @@ void ewol::key::Special::setCapsLock(bool _value) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ewol::key::Special::getShift(void) const {
|
bool ewol::key::Special::getShift() const {
|
||||||
if ((m_value & EWOL_FLAG_KEY_SHIFT) != 0) {
|
if ((m_value & EWOL_FLAG_KEY_SHIFT) != 0) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -93,7 +93,7 @@ void ewol::key::Special::setShift(bool _value) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ewol::key::Special::getCtrl(void) const {
|
bool ewol::key::Special::getCtrl() const {
|
||||||
if ((m_value & EWOL_FLAG_KEY_CTRL) != 0) {
|
if ((m_value & EWOL_FLAG_KEY_CTRL) != 0) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -111,7 +111,7 @@ void ewol::key::Special::setCtrl(bool _value) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ewol::key::Special::getMeta(void) const {
|
bool ewol::key::Special::getMeta() const {
|
||||||
if ((m_value & EWOL_FLAG_KEY_META) != 0) {
|
if ((m_value & EWOL_FLAG_KEY_META) != 0) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -129,7 +129,7 @@ void ewol::key::Special::setMeta(bool _value) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ewol::key::Special::getAlt(void) const {
|
bool ewol::key::Special::getAlt() const {
|
||||||
if ((m_value & EWOL_FLAG_KEY_ALT) != 0) {
|
if ((m_value & EWOL_FLAG_KEY_ALT) != 0) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -147,7 +147,7 @@ void ewol::key::Special::setAlt(bool _value) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ewol::key::Special::getAltGr(void) const {
|
bool ewol::key::Special::getAltGr() const {
|
||||||
if ((m_value & EWOL_FLAG_KEY_ALTGR) != 0) {
|
if ((m_value & EWOL_FLAG_KEY_ALTGR) != 0) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -165,7 +165,7 @@ void ewol::key::Special::setAltGr(bool _value) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ewol::key::Special::getNumLock(void) const {
|
bool ewol::key::Special::getNumLock() const {
|
||||||
if ((m_value & EWOL_FLAG_KEY_NUM_LOCK) != 0) {
|
if ((m_value & EWOL_FLAG_KEY_NUM_LOCK) != 0) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -183,7 +183,7 @@ void ewol::key::Special::setNumLock(bool _value) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ewol::key::Special::getInsert(void) const {
|
bool ewol::key::Special::getInsert() const {
|
||||||
if ((m_value & EWOL_FLAG_KEY_INSERT) != 0) {
|
if ((m_value & EWOL_FLAG_KEY_INSERT) != 0) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -24,12 +24,12 @@ namespace ewol {
|
|||||||
/**
|
/**
|
||||||
* @brief Main constructor
|
* @brief Main constructor
|
||||||
*/
|
*/
|
||||||
Special(void);
|
Special();
|
||||||
/**
|
/**
|
||||||
* @brief get the current CapLock Status
|
* @brief get the current CapLock Status
|
||||||
* @return The CapLock value
|
* @return The CapLock value
|
||||||
*/
|
*/
|
||||||
bool getCapsLock(void) const;
|
bool getCapsLock() const;
|
||||||
/**
|
/**
|
||||||
* @brief set the current CapLock Status
|
* @brief set the current CapLock Status
|
||||||
* @param[in] _value The new CapLock value
|
* @param[in] _value The new CapLock value
|
||||||
@ -39,7 +39,7 @@ namespace ewol {
|
|||||||
* @brief Get the current Shift key status
|
* @brief Get the current Shift key status
|
||||||
* @return The Shift value
|
* @return The Shift value
|
||||||
*/
|
*/
|
||||||
bool getShift(void) const;
|
bool getShift() const;
|
||||||
/**
|
/**
|
||||||
* @brief Set the current Shift key status
|
* @brief Set the current Shift key status
|
||||||
* @param[in] _value The new Shift value
|
* @param[in] _value The new Shift value
|
||||||
@ -49,7 +49,7 @@ namespace ewol {
|
|||||||
* @brief Get the Current Control key status
|
* @brief Get the Current Control key status
|
||||||
* @return The Control value
|
* @return The Control value
|
||||||
*/
|
*/
|
||||||
bool getCtrl(void) const;
|
bool getCtrl() const;
|
||||||
/**
|
/**
|
||||||
* @brief Set the Current Control key status
|
* @brief Set the Current Control key status
|
||||||
* @param[in] _value The new Control value
|
* @param[in] _value The new Control value
|
||||||
@ -59,7 +59,7 @@ namespace ewol {
|
|||||||
* @brief Get the current Meta key status (also named windows or apple key)
|
* @brief Get the current Meta key status (also named windows or apple key)
|
||||||
* @return The Meta value (name Windows key, apple key, command key ...)
|
* @return The Meta value (name Windows key, apple key, command key ...)
|
||||||
*/
|
*/
|
||||||
bool getMeta(void) const;
|
bool getMeta() const;
|
||||||
/**
|
/**
|
||||||
* @brief Set the current Meta key status (also named windows or apple key)
|
* @brief Set the current Meta key status (also named windows or apple key)
|
||||||
* @param[in] _value The new Meta value (name Windows key, apple key, command key ...)
|
* @param[in] _value The new Meta value (name Windows key, apple key, command key ...)
|
||||||
@ -69,7 +69,7 @@ namespace ewol {
|
|||||||
* @brief Get the current Alt key status
|
* @brief Get the current Alt key status
|
||||||
* @return The Alt value
|
* @return The Alt value
|
||||||
*/
|
*/
|
||||||
bool getAlt(void) const;
|
bool getAlt() const;
|
||||||
/**
|
/**
|
||||||
* @brief Set the current Alt key status
|
* @brief Set the current Alt key status
|
||||||
* @param[in] _value The new Alt value
|
* @param[in] _value The new Alt value
|
||||||
@ -79,7 +79,7 @@ namespace ewol {
|
|||||||
* @brief Get the current Alt-Gr key status
|
* @brief Get the current Alt-Gr key status
|
||||||
* @return The Alt-gr value (does not exist on MacOs)
|
* @return The Alt-gr value (does not exist on MacOs)
|
||||||
*/
|
*/
|
||||||
bool getAltGr(void) const;
|
bool getAltGr() const;
|
||||||
/**
|
/**
|
||||||
* @brief Set the current Alt-Gr key status
|
* @brief Set the current Alt-Gr key status
|
||||||
* @param[in] _value The new Alt-gr value (does not exist on MacOs)
|
* @param[in] _value The new Alt-gr value (does not exist on MacOs)
|
||||||
@ -89,7 +89,7 @@ namespace ewol {
|
|||||||
* @brief Get the current Ver-num key status
|
* @brief Get the current Ver-num key status
|
||||||
* @return The Numerical Lock value
|
* @return The Numerical Lock value
|
||||||
*/
|
*/
|
||||||
bool getNumLock(void) const;
|
bool getNumLock() const;
|
||||||
/**
|
/**
|
||||||
* @brief Set the current Ver-num key status
|
* @brief Set the current Ver-num key status
|
||||||
* @param[in] _value The new Numerical Lock value
|
* @param[in] _value The new Numerical Lock value
|
||||||
@ -99,7 +99,7 @@ namespace ewol {
|
|||||||
* @brief Get the current Intert key status
|
* @brief Get the current Intert key status
|
||||||
* @return The Insert value
|
* @return The Insert value
|
||||||
*/
|
*/
|
||||||
bool getInsert(void) const;
|
bool getInsert() const;
|
||||||
/**
|
/**
|
||||||
* @brief Set the current Intert key status
|
* @brief Set the current Intert key status
|
||||||
* @param[in] _value The new Insert value
|
* @param[in] _value The new Insert value
|
||||||
|
@ -27,13 +27,13 @@ namespace ewol {
|
|||||||
void setConfig(const char* _config) {
|
void setConfig(const char* _config) {
|
||||||
m_config = _config;
|
m_config = _config;
|
||||||
};
|
};
|
||||||
inline const char* getConfig(void) const {
|
inline const char* getConfig() const {
|
||||||
return m_config;
|
return m_config;
|
||||||
};
|
};
|
||||||
void setData(const std::string& _data) {
|
void setData(const std::string& _data) {
|
||||||
m_data = _data;
|
m_data = _data;
|
||||||
};
|
};
|
||||||
inline const std::string& getData(void) const {
|
inline const std::string& getData() const {
|
||||||
return m_data;
|
return m_data;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -34,19 +34,19 @@ namespace ewol {
|
|||||||
m_default(_default) {
|
m_default(_default) {
|
||||||
|
|
||||||
};
|
};
|
||||||
inline const char* getConfig(void) const {
|
inline const char* getConfig() const {
|
||||||
return m_config;
|
return m_config;
|
||||||
};
|
};
|
||||||
inline const char* getType(void) const {
|
inline const char* getType() const {
|
||||||
return m_type;
|
return m_type;
|
||||||
};
|
};
|
||||||
inline const char* getControl(void) const {
|
inline const char* getControl() const {
|
||||||
return m_control;
|
return m_control;
|
||||||
};
|
};
|
||||||
inline const char* getDescription(void) const {
|
inline const char* getDescription() const {
|
||||||
return m_description;
|
return m_description;
|
||||||
};
|
};
|
||||||
inline const char* getDefault(void) const {
|
inline const char* getDefault() const {
|
||||||
return m_default;
|
return m_default;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -14,14 +14,14 @@
|
|||||||
#undef __class__
|
#undef __class__
|
||||||
#define __class__ "ewol::object::Manager"
|
#define __class__ "ewol::object::Manager"
|
||||||
|
|
||||||
ewol::object::Manager::Manager(void) {
|
ewol::object::Manager::Manager() {
|
||||||
EWOL_DEBUG(" == > init Object-Manager");
|
EWOL_DEBUG(" == > init Object-Manager");
|
||||||
// Can create mlemory leak ... == > but not predictable comportement otherwise ...
|
// Can create mlemory leak ... == > but not predictable comportement otherwise ...
|
||||||
m_eObjectAutoRemoveList.clear();
|
m_eObjectAutoRemoveList.clear();
|
||||||
m_eObjectList.clear();
|
m_eObjectList.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
ewol::object::Manager::~Manager(void) {
|
ewol::object::Manager::~Manager() {
|
||||||
bool hasError = false;
|
bool hasError = false;
|
||||||
if (m_eObjectAutoRemoveList.size()!=0) {
|
if (m_eObjectAutoRemoveList.size()!=0) {
|
||||||
EWOL_ERROR("Must not have anymore eObject to auto-remove !!!");
|
EWOL_ERROR("Must not have anymore eObject to auto-remove !!!");
|
||||||
@ -36,7 +36,7 @@ ewol::object::Manager::~Manager(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::object::Manager::unInit(void) {
|
void ewol::object::Manager::unInit() {
|
||||||
EWOL_DEBUG(" == > Un-Init Object-Manager");
|
EWOL_DEBUG(" == > Un-Init Object-Manager");
|
||||||
removeAllAutoRemove();
|
removeAllAutoRemove();
|
||||||
EWOL_INFO(" remove missing user widget");
|
EWOL_INFO(" remove missing user widget");
|
||||||
@ -91,7 +91,7 @@ void ewol::object::Manager::add(ewol::Object* _object) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t ewol::object::Manager::getNumberObject(void) {
|
int32_t ewol::object::Manager::getNumberObject() {
|
||||||
return m_eObjectList.size() + m_eObjectAutoRemoveList.size();
|
return m_eObjectList.size() + m_eObjectAutoRemoveList.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -176,7 +176,7 @@ void ewol::object::Manager::autoRemove(ewol::Object* _object) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// clean all Object that request an autoRemove ...
|
// clean all Object that request an autoRemove ...
|
||||||
void ewol::object::Manager::removeAllAutoRemove(void) {
|
void ewol::object::Manager::removeAllAutoRemove() {
|
||||||
//EWOL_DEBUG("Auto-Remove Object section : " << m_eObjectAutoRemoveList.size() << " elemeents");
|
//EWOL_DEBUG("Auto-Remove Object section : " << m_eObjectAutoRemoveList.size() << " elemeents");
|
||||||
while(0<m_eObjectAutoRemoveList.size()) {
|
while(0<m_eObjectAutoRemoveList.size()) {
|
||||||
if (m_eObjectAutoRemoveList[0] != NULL) {
|
if (m_eObjectAutoRemoveList[0] != NULL) {
|
||||||
|
@ -20,19 +20,19 @@ namespace ewol {
|
|||||||
std::vector<ewol::Object*> m_eObjectList; // all widget allocated == > all time increment ... never removed ...
|
std::vector<ewol::Object*> m_eObjectList; // all widget allocated == > all time increment ... never removed ...
|
||||||
std::vector<ewol::Object*> m_eObjectAutoRemoveList; // all widget allocated
|
std::vector<ewol::Object*> m_eObjectAutoRemoveList; // all widget allocated
|
||||||
public:
|
public:
|
||||||
Manager(void);
|
Manager();
|
||||||
~Manager(void);
|
~Manager();
|
||||||
/**
|
/**
|
||||||
* @brief remove all resources (un-init) out of the destructor (due to the system implementation)
|
* @brief remove all resources (un-init) out of the destructor (due to the system implementation)
|
||||||
*/
|
*/
|
||||||
void unInit(void);
|
void unInit();
|
||||||
|
|
||||||
void add(ewol::Object* _object);
|
void add(ewol::Object* _object);
|
||||||
void rm(ewol::Object* _object);
|
void rm(ewol::Object* _object);
|
||||||
int32_t getNumberObject(void);
|
int32_t getNumberObject();
|
||||||
|
|
||||||
void autoRemove(ewol::Object* _object);
|
void autoRemove(ewol::Object* _object);
|
||||||
void removeAllAutoRemove(void);
|
void removeAllAutoRemove();
|
||||||
|
|
||||||
ewol::Object* get(const std::string& _name);
|
ewol::Object* get(const std::string& _name);
|
||||||
private:
|
private:
|
||||||
@ -40,7 +40,7 @@ namespace ewol {
|
|||||||
private:
|
private:
|
||||||
ewol::object::MultiCast m_multiCast; //!< muticast manager
|
ewol::object::MultiCast m_multiCast; //!< muticast manager
|
||||||
public:
|
public:
|
||||||
ewol::object::MultiCast& multiCast(void) {
|
ewol::object::MultiCast& multiCast() {
|
||||||
return m_multiCast;
|
return m_multiCast;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -30,19 +30,19 @@ namespace ewol {
|
|||||||
void setCaller(ewol::Object* _caller) {
|
void setCaller(ewol::Object* _caller) {
|
||||||
m_callerObject = _caller;
|
m_callerObject = _caller;
|
||||||
};
|
};
|
||||||
inline ewol::Object* getCaller(void) const {
|
inline ewol::Object* getCaller() const {
|
||||||
return m_callerObject;
|
return m_callerObject;
|
||||||
};
|
};
|
||||||
void setMessage(const char* _message) {
|
void setMessage(const char* _message) {
|
||||||
m_event = _message;
|
m_event = _message;
|
||||||
};
|
};
|
||||||
inline const char* getMessage(void) const {
|
inline const char* getMessage() const {
|
||||||
return m_event;
|
return m_event;
|
||||||
};
|
};
|
||||||
void setData(const std::string& _data) {
|
void setData(const std::string& _data) {
|
||||||
m_data = _data;
|
m_data = _data;
|
||||||
};
|
};
|
||||||
inline const std::string& getData(void) const {
|
inline const std::string& getData() const {
|
||||||
return m_data;
|
return m_data;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -13,12 +13,12 @@
|
|||||||
#undef __class__
|
#undef __class__
|
||||||
#define __class__ "object::MultiCast"
|
#define __class__ "object::MultiCast"
|
||||||
|
|
||||||
ewol::object::MultiCast::MultiCast(void) {
|
ewol::object::MultiCast::MultiCast() {
|
||||||
EWOL_INFO("EObject message Multi-Cast");
|
EWOL_INFO("EObject message Multi-Cast");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ewol::object::MultiCast::~MultiCast(void) {
|
ewol::object::MultiCast::~MultiCast() {
|
||||||
EWOL_INFO("EObject message Multi-Cast");
|
EWOL_INFO("EObject message Multi-Cast");
|
||||||
m_messageList.clear();
|
m_messageList.clear();
|
||||||
}
|
}
|
||||||
|
@ -31,8 +31,8 @@ namespace ewol {
|
|||||||
};
|
};
|
||||||
std::vector<MessageList> m_messageList; //!< List of all message ...
|
std::vector<MessageList> m_messageList; //!< List of all message ...
|
||||||
public:
|
public:
|
||||||
MultiCast(void);
|
MultiCast();
|
||||||
~MultiCast(void);
|
~MultiCast();
|
||||||
void anonymousSend(const char* const _messageId, const std::string& _data) {
|
void anonymousSend(const char* const _messageId, const std::string& _data) {
|
||||||
send(NULL, _messageId, _data);
|
send(NULL, _messageId, _data);
|
||||||
};
|
};
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
const char* const ewol::Object::configName = "name";
|
const char* const ewol::Object::configName = "name";
|
||||||
size_t ewol::Object::m_valUID = 0;
|
size_t ewol::Object::m_valUID = 0;
|
||||||
|
|
||||||
ewol::Object::Object(void) :
|
ewol::Object::Object() :
|
||||||
m_static(false),
|
m_static(false),
|
||||||
m_isResource(false) {
|
m_isResource(false) {
|
||||||
// note this is nearly atomic ... (but it is enough)
|
// note this is nearly atomic ... (but it is enough)
|
||||||
@ -39,7 +39,7 @@ ewol::Object::Object(const std::string& _name) :
|
|||||||
registerConfig(configName, "string", NULL, "Object name, might be a unique reference in all the program");
|
registerConfig(configName, "string", NULL, "Object name, might be a unique reference in all the program");
|
||||||
}
|
}
|
||||||
|
|
||||||
ewol::Object::~Object(void) {
|
ewol::Object::~Object() {
|
||||||
EWOL_DEBUG("delete Object : [" << m_uniqueId << "] : " << getTypeDescription());
|
EWOL_DEBUG("delete Object : [" << m_uniqueId << "] : " << getTypeDescription());
|
||||||
getObjectManager().rm(this);
|
getObjectManager().rm(this);
|
||||||
getMultiCast().rm(this);
|
getMultiCast().rm(this);
|
||||||
@ -54,7 +54,7 @@ ewol::Object::~Object(void) {
|
|||||||
m_uniqueId = -1;
|
m_uniqueId = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char * const ewol::Object::getObjectType(void) {
|
const char * const ewol::Object::getObjectType() {
|
||||||
if (m_listType.size() == 0) {
|
if (m_listType.size() == 0) {
|
||||||
return "ewol::Object";
|
return "ewol::Object";
|
||||||
}
|
}
|
||||||
@ -68,7 +68,7 @@ void ewol::Object::addObjectType(const char* _type) {
|
|||||||
}
|
}
|
||||||
m_listType.push_back(_type);
|
m_listType.push_back(_type);
|
||||||
}
|
}
|
||||||
std::string ewol::Object::getTypeDescription(void) {
|
std::string ewol::Object::getTypeDescription() {
|
||||||
std::string ret("ewol::Object");
|
std::string ret("ewol::Object");
|
||||||
for(auto element : m_listType) {
|
for(auto element : m_listType) {
|
||||||
ret += "|";
|
ret += "|";
|
||||||
@ -89,11 +89,11 @@ bool ewol::Object::isTypeCompatible(const std::string& _type) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::Object::autoDestroy(void) {
|
void ewol::Object::autoDestroy() {
|
||||||
getObjectManager().autoRemove(this);
|
getObjectManager().autoRemove(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::Object::removeObject(void) {
|
void ewol::Object::removeObject() {
|
||||||
getObjectManager().autoRemove(this);
|
getObjectManager().autoRemove(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -351,7 +351,7 @@ bool ewol::Object::setConfig(const std::string& _config, const std::string& _val
|
|||||||
std::string ewol::Object::getConfig(const char* _config) const {
|
std::string ewol::Object::getConfig(const char* _config) const {
|
||||||
std::string res="";
|
std::string res="";
|
||||||
if (NULL != _config) {
|
if (NULL != _config) {
|
||||||
(void)onGetConfig(_config, res);
|
onGetConfig(_config, res);
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
@ -385,14 +385,14 @@ bool ewol::Object::setConfigNamed(const std::string& _objectName, const std::str
|
|||||||
return object->setConfig(_config, _value);
|
return object->setConfig(_config, _value);
|
||||||
}
|
}
|
||||||
|
|
||||||
ewol::object::Manager& ewol::Object::getObjectManager(void) {
|
ewol::object::Manager& ewol::Object::getObjectManager() {
|
||||||
return ewol::getContext().getEObjectManager();
|
return ewol::getContext().getEObjectManager();
|
||||||
}
|
}
|
||||||
|
|
||||||
ewol::object::MultiCast& ewol::Object::getMultiCast(void) {
|
ewol::object::MultiCast& ewol::Object::getMultiCast() {
|
||||||
return ewol::getContext().getEObjectManager().multiCast();
|
return ewol::getContext().getEObjectManager().multiCast();
|
||||||
}
|
}
|
||||||
|
|
||||||
ewol::Context& ewol::Object::getContext(void) {
|
ewol::Context& ewol::Object::getContext() {
|
||||||
return ewol::getContext();
|
return ewol::getContext();
|
||||||
}
|
}
|
||||||
|
@ -56,7 +56,7 @@ namespace ewol {
|
|||||||
/**
|
/**
|
||||||
* @brief Constructor.
|
* @brief Constructor.
|
||||||
*/
|
*/
|
||||||
Object(void);
|
Object();
|
||||||
/**
|
/**
|
||||||
* @brief Constructor.
|
* @brief Constructor.
|
||||||
* @param[in] _name Name of the Object.
|
* @param[in] _name Name of the Object.
|
||||||
@ -65,17 +65,17 @@ namespace ewol {
|
|||||||
/**
|
/**
|
||||||
* @brief Destructor
|
* @brief Destructor
|
||||||
*/
|
*/
|
||||||
virtual ~Object(void);
|
virtual ~Object();
|
||||||
protected:
|
protected:
|
||||||
/**
|
/**
|
||||||
* @brief Auto-destroy the object
|
* @brief Auto-destroy the object
|
||||||
*/
|
*/
|
||||||
void autoDestroy(void);
|
void autoDestroy();
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* @brief Asynchronous removing the object
|
* @brief Asynchronous removing the object
|
||||||
*/
|
*/
|
||||||
void removeObject(void);
|
void removeObject();
|
||||||
private:
|
private:
|
||||||
std::vector<const char*> m_listType;
|
std::vector<const char*> m_listType;
|
||||||
public:
|
public:
|
||||||
@ -83,12 +83,12 @@ namespace ewol {
|
|||||||
* @brief get the current Object type of the Object
|
* @brief get the current Object type of the Object
|
||||||
* @return the last type name of the element
|
* @return the last type name of the element
|
||||||
*/
|
*/
|
||||||
const char * const getObjectType(void);
|
const char * const getObjectType();
|
||||||
/**
|
/**
|
||||||
* @brief Get the herarchie of the Object type.
|
* @brief Get the herarchie of the Object type.
|
||||||
* @return descriptive string.
|
* @return descriptive string.
|
||||||
*/
|
*/
|
||||||
std::string getTypeDescription(void);
|
std::string getTypeDescription();
|
||||||
/**
|
/**
|
||||||
* @brief check if the element herited from a specific type
|
* @brief check if the element herited from a specific type
|
||||||
* @param[in] _type Type to check.
|
* @param[in] _type Type to check.
|
||||||
@ -108,7 +108,7 @@ namespace ewol {
|
|||||||
* @brief get the static status of the Object == > mark at true if the user set the object mark as static allocated element ==> not auto remove element
|
* @brief get the static status of the Object == > mark at true if the user set the object mark as static allocated element ==> not auto remove element
|
||||||
* @return true if it might not be removed == > usefull for conficuration class
|
* @return true if it might not be removed == > usefull for conficuration class
|
||||||
*/
|
*/
|
||||||
bool getStatic(void){
|
bool getStatic(){
|
||||||
return m_static;
|
return m_static;
|
||||||
};
|
};
|
||||||
private:
|
private:
|
||||||
@ -118,7 +118,7 @@ namespace ewol {
|
|||||||
* @brief get the UniqueId of the Object
|
* @brief get the UniqueId of the Object
|
||||||
* @return the requested ID
|
* @return the requested ID
|
||||||
*/
|
*/
|
||||||
int32_t getId(void){
|
int32_t getId(){
|
||||||
return m_uniqueId;
|
return m_uniqueId;
|
||||||
};
|
};
|
||||||
private:
|
private:
|
||||||
@ -213,7 +213,7 @@ namespace ewol {
|
|||||||
* @brief get all the configuration list
|
* @brief get all the configuration list
|
||||||
* @return The list of all parameter availlable in the widget
|
* @return The list of all parameter availlable in the widget
|
||||||
*/
|
*/
|
||||||
virtual const std::vector<ewol::object::ConfigElement>& getConfigList(void) {
|
virtual const std::vector<ewol::object::ConfigElement>& getConfigList() {
|
||||||
return m_listConfig;
|
return m_listConfig;
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
@ -242,7 +242,7 @@ namespace ewol {
|
|||||||
* @brief get the Object name
|
* @brief get the Object name
|
||||||
* @return The requested name
|
* @return The requested name
|
||||||
*/
|
*/
|
||||||
const std::string& getName(void) const {
|
const std::string& getName() const {
|
||||||
return m_name;
|
return m_name;
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
@ -272,17 +272,17 @@ namespace ewol {
|
|||||||
* @breif get the current Object manager.
|
* @breif get the current Object manager.
|
||||||
* @return the requested object manager.
|
* @return the requested object manager.
|
||||||
*/
|
*/
|
||||||
ewol::object::Manager& getObjectManager(void);
|
ewol::object::Manager& getObjectManager();
|
||||||
/**
|
/**
|
||||||
* @breif get the current Object Message Multicast manager.
|
* @breif get the current Object Message Multicast manager.
|
||||||
* @return the requested object manager.
|
* @return the requested object manager.
|
||||||
*/
|
*/
|
||||||
ewol::object::MultiCast& getMultiCast(void);
|
ewol::object::MultiCast& getMultiCast();
|
||||||
/**
|
/**
|
||||||
* @brief get the curent the system inteface.
|
* @brief get the curent the system inteface.
|
||||||
* @return current reference on the instance.
|
* @return current reference on the instance.
|
||||||
*/
|
*/
|
||||||
ewol::Context& getContext(void);
|
ewol::Context& getContext();
|
||||||
private:
|
private:
|
||||||
bool m_isResource; //!< enable this when you want to declare this element is auto-remove
|
bool m_isResource; //!< enable this when you want to declare this element is auto-remove
|
||||||
public:
|
public:
|
||||||
@ -298,7 +298,7 @@ namespace ewol {
|
|||||||
* @brief Get the resource status of the element.
|
* @brief Get the resource status of the element.
|
||||||
* @return the resource status.
|
* @return the resource status.
|
||||||
*/
|
*/
|
||||||
bool getStatusResource(void) {
|
bool getStatusResource() {
|
||||||
return m_isResource;
|
return m_isResource;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
* @note due ti the fact that the system can be called for multiple instance, for naw we just limit the acces to one process at a time.
|
* @note due ti the fact that the system can be called for multiple instance, for naw we just limit the acces to one process at a time.
|
||||||
* @return the main inteface Mutex
|
* @return the main inteface Mutex
|
||||||
*/
|
*/
|
||||||
static etk::Mutex& mutexOpenGl(void) {
|
static etk::Mutex& mutexOpenGl() {
|
||||||
static etk::Mutex s_drawMutex;
|
static etk::Mutex s_drawMutex;
|
||||||
return s_drawMutex;
|
return s_drawMutex;
|
||||||
}
|
}
|
||||||
@ -29,7 +29,7 @@ static uint32_t l_textureflags = 0;
|
|||||||
static int32_t l_programId = 0;
|
static int32_t l_programId = 0;
|
||||||
|
|
||||||
|
|
||||||
void ewol::openGL::lock(void) {
|
void ewol::openGL::lock() {
|
||||||
mutexOpenGl().lock();
|
mutexOpenGl().lock();
|
||||||
l_matrixList.clear();
|
l_matrixList.clear();
|
||||||
mat4 tmpMat;
|
mat4 tmpMat;
|
||||||
@ -41,7 +41,7 @@ void ewol::openGL::lock(void) {
|
|||||||
l_programId = -1;
|
l_programId = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::openGL::unLock(void) {
|
void ewol::openGL::unLock() {
|
||||||
mutexOpenGl().unLock();
|
mutexOpenGl().unLock();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -62,7 +62,7 @@ void ewol::openGL::setMatrix(const mat4& _newOne) {
|
|||||||
l_matrixList[l_matrixList.size()-1] = _newOne;
|
l_matrixList[l_matrixList.size()-1] = _newOne;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::openGL::push(void) {
|
void ewol::openGL::push() {
|
||||||
if (l_matrixList.size() == 0) {
|
if (l_matrixList.size() == 0) {
|
||||||
EWOL_ERROR("set matrix list is not corect size in the stack : " << l_matrixList.size());
|
EWOL_ERROR("set matrix list is not corect size in the stack : " << l_matrixList.size());
|
||||||
mat4 tmp;
|
mat4 tmp;
|
||||||
@ -73,7 +73,7 @@ void ewol::openGL::push(void) {
|
|||||||
l_matrixList.push_back(tmp);
|
l_matrixList.push_back(tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::openGL::pop(void) {
|
void ewol::openGL::pop() {
|
||||||
if (l_matrixList.size() <= 1) {
|
if (l_matrixList.size() <= 1) {
|
||||||
EWOL_ERROR("set matrix list is not corect size in the stack : " << l_matrixList.size());
|
EWOL_ERROR("set matrix list is not corect size in the stack : " << l_matrixList.size());
|
||||||
l_matrixList.clear();
|
l_matrixList.clear();
|
||||||
@ -86,7 +86,7 @@ void ewol::openGL::pop(void) {
|
|||||||
l_matrixCamera.identity();
|
l_matrixCamera.identity();
|
||||||
}
|
}
|
||||||
|
|
||||||
const mat4& ewol::openGL::getMatrix(void) {
|
const mat4& ewol::openGL::getMatrix() {
|
||||||
if (l_matrixList.size() == 0) {
|
if (l_matrixList.size() == 0) {
|
||||||
EWOL_ERROR("set matrix list is not corect size in the stack : " << l_matrixList.size());
|
EWOL_ERROR("set matrix list is not corect size in the stack : " << l_matrixList.size());
|
||||||
mat4 tmp;
|
mat4 tmp;
|
||||||
@ -95,7 +95,7 @@ const mat4& ewol::openGL::getMatrix(void) {
|
|||||||
return l_matrixList[l_matrixList.size()-1];
|
return l_matrixList[l_matrixList.size()-1];
|
||||||
}
|
}
|
||||||
|
|
||||||
const mat4& ewol::openGL::getCameraMatrix(void) {
|
const mat4& ewol::openGL::getCameraMatrix() {
|
||||||
return l_matrixCamera;
|
return l_matrixCamera;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -103,17 +103,17 @@ void ewol::openGL::setCameraMatrix(const mat4& _newOne) {
|
|||||||
l_matrixCamera = _newOne;
|
l_matrixCamera = _newOne;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::openGL::finish(void) {
|
void ewol::openGL::finish() {
|
||||||
l_programId = -1;
|
l_programId = -1;
|
||||||
l_textureflags = 0;
|
l_textureflags = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::openGL::flush(void) {
|
void ewol::openGL::flush() {
|
||||||
l_programId = -1;
|
l_programId = -1;
|
||||||
l_textureflags = 0;
|
l_textureflags = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::openGL::swap(void) {
|
void ewol::openGL::swap() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -211,7 +211,7 @@ void ewol::openGL::disable(enum ewol::openGL::openGlFlags _flagID) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::openGL::updateAllFlags(void) {
|
void ewol::openGL::updateAllFlags() {
|
||||||
#ifdef DIRECT_MODE
|
#ifdef DIRECT_MODE
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
@ -58,11 +58,11 @@ namespace ewol {
|
|||||||
/**
|
/**
|
||||||
* @brief Lock the openGL context for one user only == > better to keep flags and other things ...
|
* @brief Lock the openGL context for one user only == > better to keep flags and other things ...
|
||||||
*/
|
*/
|
||||||
void lock(void);
|
void lock();
|
||||||
/**
|
/**
|
||||||
* @brief Un-lock the openGL context for an other user...
|
* @brief Un-lock the openGL context for an other user...
|
||||||
*/
|
*/
|
||||||
void unLock(void);
|
void unLock();
|
||||||
/**
|
/**
|
||||||
* @brief When you will done an opengl rendering, you might call this reset matrix first. It remove all the stach of the matrix pushed.
|
* @brief When you will done an opengl rendering, you might call this reset matrix first. It remove all the stach of the matrix pushed.
|
||||||
* @param[in] _newOne the default matrix that might be set for the graphic card for renderer. if too more pop will be done, this is the last that mmight survived
|
* @param[in] _newOne the default matrix that might be set for the graphic card for renderer. if too more pop will be done, this is the last that mmight survived
|
||||||
@ -77,21 +77,21 @@ namespace ewol {
|
|||||||
/**
|
/**
|
||||||
* @brief store current matrix in the matrix stack.
|
* @brief store current matrix in the matrix stack.
|
||||||
*/
|
*/
|
||||||
void push(void);
|
void push();
|
||||||
/**
|
/**
|
||||||
* @brief remove the current matrix and get the last one from the matrix stack.
|
* @brief remove the current matrix and get the last one from the matrix stack.
|
||||||
*/
|
*/
|
||||||
void pop(void);
|
void pop();
|
||||||
/**
|
/**
|
||||||
* @brief get a reference on the current matrix destinate to opengl renderer.
|
* @brief get a reference on the current matrix destinate to opengl renderer.
|
||||||
* @return The requested matrix.
|
* @return The requested matrix.
|
||||||
*/
|
*/
|
||||||
const mat4& getMatrix(void);
|
const mat4& getMatrix();
|
||||||
/**
|
/**
|
||||||
* @brief get a reference on the current matrix camera destinate to opengl renderer.
|
* @brief get a reference on the current matrix camera destinate to opengl renderer.
|
||||||
* @return The requested matrix.
|
* @return The requested matrix.
|
||||||
*/
|
*/
|
||||||
const mat4& getCameraMatrix(void);
|
const mat4& getCameraMatrix();
|
||||||
/**
|
/**
|
||||||
* @brief set a reference on the current camera to opengl renderer.
|
* @brief set a reference on the current camera to opengl renderer.
|
||||||
* @param[in] _newOne The requested matrix.
|
* @param[in] _newOne The requested matrix.
|
||||||
@ -100,15 +100,15 @@ namespace ewol {
|
|||||||
/**
|
/**
|
||||||
* @brief
|
* @brief
|
||||||
*/
|
*/
|
||||||
void finish(void);
|
void finish();
|
||||||
/**
|
/**
|
||||||
* @brief
|
* @brief
|
||||||
*/
|
*/
|
||||||
void flush(void);
|
void flush();
|
||||||
/**
|
/**
|
||||||
* @brief
|
* @brief
|
||||||
*/
|
*/
|
||||||
void swap(void);
|
void swap();
|
||||||
|
|
||||||
enum openGlFlags {
|
enum openGlFlags {
|
||||||
FLAG_BLEND = 1<<0, //!< If enabled, blend the computed fragment color values with the values in the color buffers. See glBlendFunc.
|
FLAG_BLEND = 1<<0, //!< If enabled, blend the computed fragment color values with the values in the color buffers. See glBlendFunc.
|
||||||
@ -155,7 +155,7 @@ namespace ewol {
|
|||||||
/**
|
/**
|
||||||
* @brieg update all the internal flag needed to be set from tre previous element set ...
|
* @brieg update all the internal flag needed to be set from tre previous element set ...
|
||||||
*/
|
*/
|
||||||
void updateAllFlags(void);
|
void updateAllFlags();
|
||||||
/**
|
/**
|
||||||
* @brief enable Texture on the system
|
* @brief enable Texture on the system
|
||||||
* @param[in] flagID The flag requested
|
* @param[in] flagID The flag requested
|
||||||
|
@ -27,12 +27,12 @@ ewol::resource::ColorFile::ColorFile(const std::string& _filename) :
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ewol::resource::ColorFile::~ColorFile(void) {
|
ewol::resource::ColorFile::~ColorFile() {
|
||||||
// remove all element
|
// remove all element
|
||||||
m_list.clear();
|
m_list.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::resource::ColorFile::reload(void) {
|
void ewol::resource::ColorFile::reload() {
|
||||||
// remove all previous set of value :
|
// remove all previous set of value :
|
||||||
for (int32_t iii = 0; iii < m_list.size() ; ++iii) {
|
for (int32_t iii = 0; iii < m_list.size() ; ++iii) {
|
||||||
m_list[iii] = m_errorColor;
|
m_list[iii] = m_errorColor;
|
||||||
|
@ -33,7 +33,7 @@ namespace ewol {
|
|||||||
/**
|
/**
|
||||||
* @brief Simple Destructor of this class (nothing specific ...)
|
* @brief Simple Destructor of this class (nothing specific ...)
|
||||||
*/
|
*/
|
||||||
virtual ~ColorFile(void);
|
virtual ~ColorFile();
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* @brief Set the error color.
|
* @brief Set the error color.
|
||||||
@ -63,11 +63,11 @@ namespace ewol {
|
|||||||
* @brief Get All color name
|
* @brief Get All color name
|
||||||
* @return list of all color existing
|
* @return list of all color existing
|
||||||
*/
|
*/
|
||||||
std::vector<std::string> getColors(void) const {
|
std::vector<std::string> getColors() const {
|
||||||
return m_list.getKeys();
|
return m_list.getKeys();
|
||||||
}
|
}
|
||||||
public: // herited function:
|
public: // herited function:
|
||||||
void reload(void);
|
void reload();
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* @brief keep the resource pointer.
|
* @brief keep the resource pointer.
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
#define __class__ "resource::Colored3DObject"
|
#define __class__ "resource::Colored3DObject"
|
||||||
|
|
||||||
|
|
||||||
ewol::resource::Colored3DObject::Colored3DObject(void) :
|
ewol::resource::Colored3DObject::Colored3DObject() :
|
||||||
m_GLprogram(NULL) {
|
m_GLprogram(NULL) {
|
||||||
addObjectType("ewol::Colored3DObject");
|
addObjectType("ewol::Colored3DObject");
|
||||||
// get the shader resource :
|
// get the shader resource :
|
||||||
@ -27,7 +27,7 @@ ewol::resource::Colored3DObject::Colored3DObject(void) :
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ewol::resource::Colored3DObject::~Colored3DObject(void) {
|
ewol::resource::Colored3DObject::~Colored3DObject() {
|
||||||
// remove dynamics dependencies :
|
// remove dynamics dependencies :
|
||||||
ewol::resource::Program::release(m_GLprogram);
|
ewol::resource::Program::release(m_GLprogram);
|
||||||
}
|
}
|
||||||
@ -155,7 +155,7 @@ void ewol::resource::Colored3DObject::drawLine(std::vector<vec3>& _vertices,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ewol::resource::Colored3DObject* ewol::resource::Colored3DObject::keep(void) {
|
ewol::resource::Colored3DObject* ewol::resource::Colored3DObject::keep() {
|
||||||
EWOL_VERBOSE("KEEP : direct Colored3DObject");
|
EWOL_VERBOSE("KEEP : direct Colored3DObject");
|
||||||
// need to crate a new one ...
|
// need to crate a new one ...
|
||||||
ewol::resource::Colored3DObject* object = new ewol::resource::Colored3DObject();
|
ewol::resource::Colored3DObject* object = new ewol::resource::Colored3DObject();
|
||||||
|
@ -24,8 +24,8 @@ namespace ewol {
|
|||||||
int32_t m_GLMatrix;
|
int32_t m_GLMatrix;
|
||||||
int32_t m_GLColor;
|
int32_t m_GLColor;
|
||||||
protected:
|
protected:
|
||||||
Colored3DObject(void);
|
Colored3DObject();
|
||||||
virtual ~Colored3DObject(void);
|
virtual ~Colored3DObject();
|
||||||
public:
|
public:
|
||||||
virtual void draw(std::vector<vec3>& _vertices,
|
virtual void draw(std::vector<vec3>& _vertices,
|
||||||
const etk::Color<float>& _color,
|
const etk::Color<float>& _color,
|
||||||
@ -47,7 +47,7 @@ namespace ewol {
|
|||||||
* @note Never free this pointer by your own...
|
* @note Never free this pointer by your own...
|
||||||
* @return pointer on the resource or NULL if an error occured.
|
* @return pointer on the resource or NULL if an error occured.
|
||||||
*/
|
*/
|
||||||
static ewol::resource::Colored3DObject* keep(void);
|
static ewol::resource::Colored3DObject* keep();
|
||||||
/**
|
/**
|
||||||
* @brief release the keeped resources
|
* @brief release the keeped resources
|
||||||
* @param[in,out] reference on the object pointer
|
* @param[in,out] reference on the object pointer
|
||||||
|
@ -27,7 +27,7 @@ ewol::resource::ConfigFile::ConfigFile(const std::string& _filename) :
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ewol::resource::ConfigFile::~ConfigFile(void) {
|
ewol::resource::ConfigFile::~ConfigFile() {
|
||||||
// remove all element
|
// remove all element
|
||||||
for (size_t iii=0; iii<m_list.size(); iii++){
|
for (size_t iii=0; iii<m_list.size(); iii++){
|
||||||
if (NULL != m_list[iii]) {
|
if (NULL != m_list[iii]) {
|
||||||
@ -38,7 +38,7 @@ ewol::resource::ConfigFile::~ConfigFile(void) {
|
|||||||
m_list.clear();
|
m_list.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::resource::ConfigFile::reload(void) {
|
void ewol::resource::ConfigFile::reload() {
|
||||||
// reset all parameters
|
// reset all parameters
|
||||||
for (size_t iii=0; iii<m_list.size(); iii++){
|
for (size_t iii=0; iii<m_list.size(); iii++){
|
||||||
if (NULL != m_list[iii]) {
|
if (NULL != m_list[iii]) {
|
||||||
|
@ -23,9 +23,9 @@ namespace ewol {
|
|||||||
etk::Hash<ejson::Value*> m_list;
|
etk::Hash<ejson::Value*> m_list;
|
||||||
protected:
|
protected:
|
||||||
ConfigFile(const std::string& _filename);
|
ConfigFile(const std::string& _filename);
|
||||||
virtual ~ConfigFile(void);
|
virtual ~ConfigFile();
|
||||||
public:
|
public:
|
||||||
void reload(void);
|
void reload();
|
||||||
|
|
||||||
int32_t request(const std::string& _paramName);
|
int32_t request(const std::string& _paramName);
|
||||||
|
|
||||||
|
@ -120,7 +120,7 @@ ewol::resource::DistanceFieldFont::DistanceFieldFont(const std::string& _fontNam
|
|||||||
//exportOnFile();
|
//exportOnFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
ewol::resource::DistanceFieldFont::~DistanceFieldFont(void) {
|
ewol::resource::DistanceFieldFont::~DistanceFieldFont() {
|
||||||
ewol::resource::FontFreeType::release(m_font);
|
ewol::resource::FontFreeType::release(m_font);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -374,7 +374,7 @@ void ewol::resource::DistanceFieldFont::release(ewol::resource::DistanceFieldFon
|
|||||||
_object = NULL;
|
_object = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::resource::DistanceFieldFont::exportOnFile(void) {
|
void ewol::resource::DistanceFieldFont::exportOnFile() {
|
||||||
EWOL_DEBUG("EXPORT: DistanceFieldFont : file : '" << m_fileName << ".json'");
|
EWOL_DEBUG("EXPORT: DistanceFieldFont : file : '" << m_fileName << ".json'");
|
||||||
ejson::Document doc;
|
ejson::Document doc;
|
||||||
ejson::Array* tmpList = new ejson::Array();
|
ejson::Array* tmpList = new ejson::Array();
|
||||||
@ -408,7 +408,7 @@ void ewol::resource::DistanceFieldFont::exportOnFile(void) {
|
|||||||
egami::store(m_data, m_fileName + ".png");
|
egami::store(m_data, m_fileName + ".png");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ewol::resource::DistanceFieldFont::importFromFile(void) {
|
bool ewol::resource::DistanceFieldFont::importFromFile() {
|
||||||
EWOL_DEBUG("IMPORT: DistanceFieldFont : file : '" << m_fileName << ".json'");
|
EWOL_DEBUG("IMPORT: DistanceFieldFont : file : '" << m_fileName << ".json'");
|
||||||
// test file existance:
|
// test file existance:
|
||||||
etk::FSNode fileJSON(m_fileName + ".json");
|
etk::FSNode fileJSON(m_fileName + ".json");
|
||||||
|
@ -32,7 +32,7 @@ namespace ewol {
|
|||||||
int32_t m_lastRawHeigh;
|
int32_t m_lastRawHeigh;
|
||||||
protected:
|
protected:
|
||||||
DistanceFieldFont(const std::string& _fontName);
|
DistanceFieldFont(const std::string& _fontName);
|
||||||
~DistanceFieldFont(void);
|
~DistanceFieldFont();
|
||||||
public:
|
public:
|
||||||
float getDisplayRatio(float _size);
|
float getDisplayRatio(float _size);
|
||||||
/**
|
/**
|
||||||
@ -89,15 +89,15 @@ namespace ewol {
|
|||||||
float m_borderSize; //!< number of pixel added on the border of a glyph
|
float m_borderSize; //!< number of pixel added on the border of a glyph
|
||||||
vec2 m_textureBorderSize; //!< Transformed the border size in the texture dimention
|
vec2 m_textureBorderSize; //!< Transformed the border size in the texture dimention
|
||||||
public:
|
public:
|
||||||
float getPixelBorderSize(void) {
|
float getPixelBorderSize() {
|
||||||
return m_borderSize;
|
return m_borderSize;
|
||||||
}
|
}
|
||||||
const vec2& getTextureBorderSize(void) {
|
const vec2& getTextureBorderSize() {
|
||||||
return m_textureBorderSize;
|
return m_textureBorderSize;
|
||||||
}
|
}
|
||||||
public:
|
public:
|
||||||
void exportOnFile(void);
|
void exportOnFile();
|
||||||
bool importFromFile(void);
|
bool importFromFile();
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
static int32_t l_countLoaded=0;
|
static int32_t l_countLoaded=0;
|
||||||
static FT_Library library;
|
static FT_Library library;
|
||||||
|
|
||||||
void ewol::resource::freeTypeInit(void) {
|
void ewol::resource::freeTypeInit() {
|
||||||
EWOL_DEBUG(" == > init Font-Manager");
|
EWOL_DEBUG(" == > init Font-Manager");
|
||||||
l_countLoaded++;
|
l_countLoaded++;
|
||||||
if (l_countLoaded>1) {
|
if (l_countLoaded>1) {
|
||||||
@ -38,7 +38,7 @@ void ewol::resource::freeTypeInit(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::resource::freeTypeUnInit(void) {
|
void ewol::resource::freeTypeUnInit() {
|
||||||
EWOL_DEBUG(" == > Un-Init Font-Manager");
|
EWOL_DEBUG(" == > Un-Init Font-Manager");
|
||||||
l_countLoaded--;
|
l_countLoaded--;
|
||||||
if (l_countLoaded>0) {
|
if (l_countLoaded>0) {
|
||||||
@ -97,7 +97,7 @@ ewol::resource::FontFreeType::FontFreeType(const std::string& _fontName) :
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ewol::resource::FontFreeType::~FontFreeType(void) {
|
ewol::resource::FontFreeType::~FontFreeType() {
|
||||||
// clean the tmp memory
|
// clean the tmp memory
|
||||||
if (NULL != m_FileBuffer) {
|
if (NULL != m_FileBuffer) {
|
||||||
delete[] m_FileBuffer;
|
delete[] m_FileBuffer;
|
||||||
@ -304,7 +304,7 @@ void ewol::resource::FontFreeType::generateKerning(int32_t fontSize, std::vector
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ewol::resource::FontFreeType::display(void) {
|
void ewol::resource::FontFreeType::display() {
|
||||||
if(false == m_init) {
|
if(false == m_init) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -27,10 +27,10 @@ namespace ewol {
|
|||||||
int32_t m_FileSize;
|
int32_t m_FileSize;
|
||||||
FT_Face m_fftFace;
|
FT_Face m_fftFace;
|
||||||
bool m_init;
|
bool m_init;
|
||||||
void display(void);
|
void display();
|
||||||
protected:
|
protected:
|
||||||
FontFreeType(const std::string& _fontName);
|
FontFreeType(const std::string& _fontName);
|
||||||
~FontFreeType(void);
|
~FontFreeType();
|
||||||
public:
|
public:
|
||||||
|
|
||||||
bool getGlyphProperty(int32_t _fontSize,
|
bool getGlyphProperty(int32_t _fontSize,
|
||||||
@ -67,8 +67,8 @@ namespace ewol {
|
|||||||
*/
|
*/
|
||||||
static void release(ewol::resource::FontBase*& _object);
|
static void release(ewol::resource::FontBase*& _object);
|
||||||
};
|
};
|
||||||
void freeTypeInit(void);
|
void freeTypeInit();
|
||||||
void freeTypeUnInit(void);
|
void freeTypeUnInit();
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -23,9 +23,9 @@ namespace ewol {
|
|||||||
private:
|
private:
|
||||||
TextureFile(const std::string& _genName);
|
TextureFile(const std::string& _genName);
|
||||||
TextureFile(std::string _genName, const std::string& _fileName, const ivec2& _size);
|
TextureFile(std::string _genName, const std::string& _fileName, const ivec2& _size);
|
||||||
virtual ~TextureFile(void) { };
|
virtual ~TextureFile() { };
|
||||||
public:
|
public:
|
||||||
const vec2& getRealSize(void) {
|
const vec2& getRealSize() {
|
||||||
return m_realImageSize;
|
return m_realImageSize;
|
||||||
};
|
};
|
||||||
public:
|
public:
|
||||||
|
@ -24,7 +24,7 @@ namespace ewol {
|
|||||||
protected:
|
protected:
|
||||||
ImageDF(const std::string& _genName);
|
ImageDF(const std::string& _genName);
|
||||||
ImageDF(std::string _genName, const std::string& _fileName, const ivec2& _size);
|
ImageDF(std::string _genName, const std::string& _fileName, const ivec2& _size);
|
||||||
virtual ~ImageDF(void) { };
|
virtual ~ImageDF() { };
|
||||||
/**
|
/**
|
||||||
* @brief Generate distance field of this Image input.
|
* @brief Generate distance field of this Image input.
|
||||||
* @param[in] _input Input image to change in distance field mode.
|
* @param[in] _input Input image to change in distance field mode.
|
||||||
@ -32,7 +32,7 @@ namespace ewol {
|
|||||||
*/
|
*/
|
||||||
void generateDistanceField(const egami::ImageMono& _input, egami::Image& _output);
|
void generateDistanceField(const egami::ImageMono& _input, egami::Image& _output);
|
||||||
public:
|
public:
|
||||||
const vec2& getRealSize(void) {
|
const vec2& getRealSize() {
|
||||||
return m_realImageSize;
|
return m_realImageSize;
|
||||||
};
|
};
|
||||||
public:
|
public:
|
||||||
|
@ -16,12 +16,12 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
ewol::resource::Manager::Manager(void) :
|
ewol::resource::Manager::Manager() :
|
||||||
m_contextHasBeenRemoved(true) {
|
m_contextHasBeenRemoved(true) {
|
||||||
// nothing to do ...
|
// nothing to do ...
|
||||||
}
|
}
|
||||||
|
|
||||||
ewol::resource::Manager::~Manager(void) {
|
ewol::resource::Manager::~Manager() {
|
||||||
bool hasError = false;
|
bool hasError = false;
|
||||||
if (m_resourceListToUpdate.size()!=0) {
|
if (m_resourceListToUpdate.size()!=0) {
|
||||||
EWOL_ERROR("Must not have anymore resources to update !!!");
|
EWOL_ERROR("Must not have anymore resources to update !!!");
|
||||||
@ -36,7 +36,7 @@ ewol::resource::Manager::~Manager(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::resource::Manager::unInit(void) {
|
void ewol::resource::Manager::unInit() {
|
||||||
display();
|
display();
|
||||||
m_resourceListToUpdate.clear();
|
m_resourceListToUpdate.clear();
|
||||||
// remove all resources ...
|
// remove all resources ...
|
||||||
@ -52,7 +52,7 @@ void ewol::resource::Manager::unInit(void) {
|
|||||||
m_resourceList.clear();
|
m_resourceList.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::resource::Manager::display(void) {
|
void ewol::resource::Manager::display() {
|
||||||
EWOL_INFO("Resources loaded : ");
|
EWOL_INFO("Resources loaded : ");
|
||||||
// remove all resources ...
|
// remove all resources ...
|
||||||
for (int64_t iii=m_resourceList.size()-1; iii >= 0; iii--) {
|
for (int64_t iii=m_resourceList.size()-1; iii >= 0; iii--) {
|
||||||
@ -66,7 +66,7 @@ void ewol::resource::Manager::display(void) {
|
|||||||
EWOL_INFO("Resources ---");
|
EWOL_INFO("Resources ---");
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::resource::Manager::reLoadResources(void) {
|
void ewol::resource::Manager::reLoadResources() {
|
||||||
EWOL_INFO("------------- Resources re-loaded -------------");
|
EWOL_INFO("------------- Resources re-loaded -------------");
|
||||||
// remove all resources ...
|
// remove all resources ...
|
||||||
if (m_resourceList.size() != 0) {
|
if (m_resourceList.size() != 0) {
|
||||||
@ -102,7 +102,7 @@ void ewol::resource::Manager::update(ewol::Resource* _object) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Specific to load or update the data in the openGl context == > system use only
|
// Specific to load or update the data in the openGl context == > system use only
|
||||||
void ewol::resource::Manager::updateContext(void) {
|
void ewol::resource::Manager::updateContext() {
|
||||||
if (true == m_contextHasBeenRemoved) {
|
if (true == m_contextHasBeenRemoved) {
|
||||||
// need to update all ...
|
// need to update all ...
|
||||||
m_contextHasBeenRemoved = false;
|
m_contextHasBeenRemoved = false;
|
||||||
@ -138,7 +138,7 @@ void ewol::resource::Manager::updateContext(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// in this case, it is really too late ...
|
// in this case, it is really too late ...
|
||||||
void ewol::resource::Manager::contextHasBeenDestroyed(void) {
|
void ewol::resource::Manager::contextHasBeenDestroyed() {
|
||||||
for (size_t iii=0; iii<m_resourceList.size(); iii++) {
|
for (size_t iii=0; iii<m_resourceList.size(); iii++) {
|
||||||
if (m_resourceList[iii] != NULL) {
|
if (m_resourceList[iii] != NULL) {
|
||||||
m_resourceList[iii]->removeContextToLate();
|
m_resourceList[iii]->removeContextToLate();
|
||||||
|
@ -24,25 +24,25 @@ namespace ewol {
|
|||||||
/**
|
/**
|
||||||
* @brief initialize the internal variable
|
* @brief initialize the internal variable
|
||||||
*/
|
*/
|
||||||
Manager(void);
|
Manager();
|
||||||
/**
|
/**
|
||||||
* @brief Uninitiamize the resource manager, free all resources previously requested
|
* @brief Uninitiamize the resource manager, free all resources previously requested
|
||||||
* @note when not free == > generate warning, because the segfault can appear after...
|
* @note when not free == > generate warning, because the segfault can appear after...
|
||||||
*/
|
*/
|
||||||
~Manager(void);
|
~Manager();
|
||||||
/**
|
/**
|
||||||
* @brief remove all resources (un-init) out of the destructor (due to the system implementation)
|
* @brief remove all resources (un-init) out of the destructor (due to the system implementation)
|
||||||
*/
|
*/
|
||||||
void unInit(void);
|
void unInit();
|
||||||
/**
|
/**
|
||||||
* @brief display in the log all the resources loaded ...
|
* @brief display in the log all the resources loaded ...
|
||||||
*/
|
*/
|
||||||
void display(void);
|
void display();
|
||||||
/**
|
/**
|
||||||
* @brief Reload all resources from files, and send there in openGL card if needed.
|
* @brief Reload all resources from files, and send there in openGL card if needed.
|
||||||
* @note If file is reference at THEME:XXX:filename if the Theme change the file will reload the newOne
|
* @note If file is reference at THEME:XXX:filename if the Theme change the file will reload the newOne
|
||||||
*/
|
*/
|
||||||
void reLoadResources(void);
|
void reLoadResources();
|
||||||
/**
|
/**
|
||||||
* @brief Call by the system to send all the needed data on the graphic card chen they change ...
|
* @brief Call by the system to send all the needed data on the graphic card chen they change ...
|
||||||
* @param[in] _object The resources that might be updated
|
* @param[in] _object The resources that might be updated
|
||||||
@ -51,11 +51,11 @@ namespace ewol {
|
|||||||
/**
|
/**
|
||||||
* @brief Call by the system chen the openGL Context has been unexpectially removed == > This reload all the texture, VBO and other ....
|
* @brief Call by the system chen the openGL Context has been unexpectially removed == > This reload all the texture, VBO and other ....
|
||||||
*/
|
*/
|
||||||
void updateContext(void);
|
void updateContext();
|
||||||
/**
|
/**
|
||||||
* @brief This is to inform the resources manager that we have no more openGl context ...
|
* @brief This is to inform the resources manager that we have no more openGl context ...
|
||||||
*/
|
*/
|
||||||
void contextHasBeenDestroyed(void);
|
void contextHasBeenDestroyed();
|
||||||
public:
|
public:
|
||||||
// internal API to extent eResources in extern Soft
|
// internal API to extent eResources in extern Soft
|
||||||
ewol::Resource* localKeep(const std::string& _filename);
|
ewol::Resource* localKeep(const std::string& _filename);
|
||||||
|
@ -95,7 +95,7 @@ ewol::resource::Program::Program(const std::string& _filename) :
|
|||||||
updateContext();
|
updateContext();
|
||||||
}
|
}
|
||||||
|
|
||||||
ewol::resource::Program::~Program(void) {
|
ewol::resource::Program::~Program() {
|
||||||
for (size_t iii=0; iii<m_shaderList.size(); iii++) {
|
for (size_t iii=0; iii<m_shaderList.size(); iii++) {
|
||||||
ewol::resource::Shader::release(m_shaderList[iii]);
|
ewol::resource::Shader::release(m_shaderList[iii]);
|
||||||
m_shaderList[iii] = 0;
|
m_shaderList[iii] = 0;
|
||||||
@ -158,7 +158,7 @@ int32_t ewol::resource::Program::getUniform(std::string _elementName) {
|
|||||||
return m_elementList.size()-1;
|
return m_elementList.size()-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::resource::Program::updateContext(void) {
|
void ewol::resource::Program::updateContext() {
|
||||||
if (true == m_exist) {
|
if (true == m_exist) {
|
||||||
// Do nothing == > too dangerous ...
|
// Do nothing == > too dangerous ...
|
||||||
} else {
|
} else {
|
||||||
@ -246,7 +246,7 @@ void ewol::resource::Program::updateContext(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::resource::Program::removeContext(void) {
|
void ewol::resource::Program::removeContext() {
|
||||||
if (true == m_exist) {
|
if (true == m_exist) {
|
||||||
glDeleteProgram(m_program);
|
glDeleteProgram(m_program);
|
||||||
m_program = 0;
|
m_program = 0;
|
||||||
@ -257,12 +257,12 @@ void ewol::resource::Program::removeContext(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::resource::Program::removeContextToLate(void) {
|
void ewol::resource::Program::removeContextToLate() {
|
||||||
m_exist = false;
|
m_exist = false;
|
||||||
m_program = 0;
|
m_program = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::resource::Program::reload(void) {
|
void ewol::resource::Program::reload() {
|
||||||
/* TODO : ...
|
/* TODO : ...
|
||||||
etk::file file(m_name, etk::FILE_TYPE_DATA);
|
etk::file file(m_name, etk::FILE_TYPE_DATA);
|
||||||
if (false == file.Exist()) {
|
if (false == file.Exist()) {
|
||||||
@ -687,7 +687,7 @@ void ewol::resource::Program::uniform4iv(int32_t _idElem, int32_t _nbElement, co
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
void ewol::resource::Program::use(void) {
|
void ewol::resource::Program::use() {
|
||||||
#ifdef PROGRAM_DISPLAY_SPEED
|
#ifdef PROGRAM_DISPLAY_SPEED
|
||||||
g_startTime = ewol::getTime();
|
g_startTime = ewol::getTime();
|
||||||
#endif
|
#endif
|
||||||
@ -748,7 +748,7 @@ void ewol::resource::Program::setTexture1(int32_t _idElem, GLint _textureOpenGlI
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ewol::resource::Program::unUse(void) {
|
void ewol::resource::Program::unUse() {
|
||||||
//EWOL_WARNING("Will use program : " << m_program);
|
//EWOL_WARNING("Will use program : " << m_program);
|
||||||
if (0 == m_program) {
|
if (0 == m_program) {
|
||||||
return;
|
return;
|
||||||
|
@ -63,7 +63,7 @@ namespace ewol {
|
|||||||
/**
|
/**
|
||||||
* @brief Destructor, remove the current Program.
|
* @brief Destructor, remove the current Program.
|
||||||
*/
|
*/
|
||||||
virtual ~Program(void);
|
virtual ~Program();
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* @brief User request an attribute on this program.
|
* @brief User request an attribute on this program.
|
||||||
@ -263,7 +263,7 @@ namespace ewol {
|
|||||||
/**
|
/**
|
||||||
* @brief Request the processing of this program
|
* @brief Request the processing of this program
|
||||||
*/
|
*/
|
||||||
void use(void);
|
void use();
|
||||||
/**
|
/**
|
||||||
* @brief set the testure Id on the specify uniform element.
|
* @brief set the testure Id on the specify uniform element.
|
||||||
* @param[in] _idElem Id of the uniform that might be sended.
|
* @param[in] _idElem Id of the uniform that might be sended.
|
||||||
@ -274,24 +274,24 @@ namespace ewol {
|
|||||||
/**
|
/**
|
||||||
* @brief Stop the processing of this program
|
* @brief Stop the processing of this program
|
||||||
*/
|
*/
|
||||||
void unUse(void);
|
void unUse();
|
||||||
/**
|
/**
|
||||||
* @brief This load/reload the data in the opengl context, needed when removed previously.
|
* @brief This load/reload the data in the opengl context, needed when removed previously.
|
||||||
*/
|
*/
|
||||||
void updateContext(void);
|
void updateContext();
|
||||||
/**
|
/**
|
||||||
* @brief remove the data from the opengl context.
|
* @brief remove the data from the opengl context.
|
||||||
*/
|
*/
|
||||||
void removeContext(void);
|
void removeContext();
|
||||||
/**
|
/**
|
||||||
* @brief Special android spec! It inform us that all context is removed and after notify us...
|
* @brief Special android spec! It inform us that all context is removed and after notify us...
|
||||||
*/
|
*/
|
||||||
void removeContextToLate(void);
|
void removeContextToLate();
|
||||||
/**
|
/**
|
||||||
* @brief Relode the shader from the file. used when a request of resouces reload is done.
|
* @brief Relode the shader from the file. used when a request of resouces reload is done.
|
||||||
* @note this is really usefull when we tested the new themes or shader developpements.
|
* @note this is really usefull when we tested the new themes or shader developpements.
|
||||||
*/
|
*/
|
||||||
void reload(void);
|
void reload();
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* @brief keep the resource pointer.
|
* @brief keep the resource pointer.
|
||||||
|
@ -14,22 +14,22 @@
|
|||||||
#include <ewol/context/Context.h>
|
#include <ewol/context/Context.h>
|
||||||
|
|
||||||
|
|
||||||
void ewol::Resource::updateContext(void) {
|
void ewol::Resource::updateContext() {
|
||||||
EWOL_DEBUG("Not set for : [" << getId() << "]" << getName() << " loaded " << m_counter << " time(s)");
|
EWOL_DEBUG("Not set for : [" << getId() << "]" << getName() << " loaded " << m_counter << " time(s)");
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::Resource::removeContext(void) {
|
void ewol::Resource::removeContext() {
|
||||||
EWOL_DEBUG("Not set for : [" << getId() << "]" << getName() << " loaded " << m_counter << " time(s)");
|
EWOL_DEBUG("Not set for : [" << getId() << "]" << getName() << " loaded " << m_counter << " time(s)");
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::Resource::removeContextToLate(void) {
|
void ewol::Resource::removeContextToLate() {
|
||||||
EWOL_DEBUG("Not set for : [" << getId() << "]" << getName() << " loaded " << m_counter << " time(s)");
|
EWOL_DEBUG("Not set for : [" << getId() << "]" << getName() << " loaded " << m_counter << " time(s)");
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::Resource::reload(void) {
|
void ewol::Resource::reload() {
|
||||||
EWOL_DEBUG("Not set for : [" << getId() << "]" << getName() << " loaded " << m_counter << " time(s)");
|
EWOL_DEBUG("Not set for : [" << getId() << "]" << getName() << " loaded " << m_counter << " time(s)");
|
||||||
}
|
}
|
||||||
|
|
||||||
ewol::resource::Manager& ewol::Resource::getManager(void) {
|
ewol::resource::Manager& ewol::Resource::getManager() {
|
||||||
return ewol::getContext().getResourcesManager();
|
return ewol::getContext().getResourcesManager();
|
||||||
}
|
}
|
@ -24,7 +24,7 @@ namespace ewol {
|
|||||||
// class resources is pure virtual
|
// class resources is pure virtual
|
||||||
class Resource : public ewol::Object {
|
class Resource : public ewol::Object {
|
||||||
public:
|
public:
|
||||||
Resource(void) :
|
Resource() :
|
||||||
m_counter(1),
|
m_counter(1),
|
||||||
m_resourceLevel(MAX_RESOURCE_LEVEL-1) {
|
m_resourceLevel(MAX_RESOURCE_LEVEL-1) {
|
||||||
addObjectType("ewol::Resource");
|
addObjectType("ewol::Resource");
|
||||||
@ -37,33 +37,33 @@ namespace ewol {
|
|||||||
addObjectType("ewol::Resource");
|
addObjectType("ewol::Resource");
|
||||||
setStatusResource(true);
|
setStatusResource(true);
|
||||||
};
|
};
|
||||||
virtual ~Resource(void) {
|
virtual ~Resource() {
|
||||||
|
|
||||||
};
|
};
|
||||||
private:
|
private:
|
||||||
uint32_t m_counter; //!< number of time the element was loaded.
|
uint32_t m_counter; //!< number of time the element was loaded.
|
||||||
public:
|
public:
|
||||||
void increment(void) {
|
void increment() {
|
||||||
m_counter++;
|
m_counter++;
|
||||||
};
|
};
|
||||||
bool decrement(void) {
|
bool decrement() {
|
||||||
m_counter--;
|
m_counter--;
|
||||||
return (m_counter == 0)?true:false;
|
return (m_counter == 0)?true:false;
|
||||||
};
|
};
|
||||||
int32_t getCounter(void) {
|
int32_t getCounter() {
|
||||||
return m_counter;
|
return m_counter;
|
||||||
};
|
};
|
||||||
protected:
|
protected:
|
||||||
uint8_t m_resourceLevel; //!< Level of the resource ==> for updata priority [0..5] 0 must be update first.
|
uint8_t m_resourceLevel; //!< Level of the resource ==> for updata priority [0..5] 0 must be update first.
|
||||||
public:
|
public:
|
||||||
uint8_t getResourceLevel(void) {
|
uint8_t getResourceLevel() {
|
||||||
return m_resourceLevel;
|
return m_resourceLevel;
|
||||||
};
|
};
|
||||||
virtual void updateContext(void);
|
virtual void updateContext();
|
||||||
virtual void removeContext(void);
|
virtual void removeContext();
|
||||||
virtual void removeContextToLate(void);
|
virtual void removeContextToLate();
|
||||||
virtual void reload(void);
|
virtual void reload();
|
||||||
static ewol::resource::Manager& getManager(void);
|
static ewol::resource::Manager& getManager();
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ ewol::resource::Shader::Shader(const std::string& _filename) :
|
|||||||
reload();
|
reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
ewol::resource::Shader::~Shader(void) {
|
ewol::resource::Shader::~Shader() {
|
||||||
if (NULL != m_fileData) {
|
if (NULL != m_fileData) {
|
||||||
delete [] m_fileData;
|
delete [] m_fileData;
|
||||||
m_fileData = NULL;
|
m_fileData = NULL;
|
||||||
@ -57,7 +57,7 @@ static void checkGlError(const char* _op) {
|
|||||||
#define LOG_OGL_INTERNAL_BUFFER_LEN (8192)
|
#define LOG_OGL_INTERNAL_BUFFER_LEN (8192)
|
||||||
static char l_bufferDisplayError[LOG_OGL_INTERNAL_BUFFER_LEN] = "";
|
static char l_bufferDisplayError[LOG_OGL_INTERNAL_BUFFER_LEN] = "";
|
||||||
|
|
||||||
void ewol::resource::Shader::updateContext(void) {
|
void ewol::resource::Shader::updateContext() {
|
||||||
if (true == m_exist) {
|
if (true == m_exist) {
|
||||||
// Do nothing == > too dangerous ...
|
// Do nothing == > too dangerous ...
|
||||||
} else {
|
} else {
|
||||||
@ -98,7 +98,7 @@ void ewol::resource::Shader::updateContext(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::resource::Shader::removeContext(void) {
|
void ewol::resource::Shader::removeContext() {
|
||||||
if (true == m_exist) {
|
if (true == m_exist) {
|
||||||
glDeleteShader(m_shader);
|
glDeleteShader(m_shader);
|
||||||
m_exist = false;
|
m_exist = false;
|
||||||
@ -106,12 +106,12 @@ void ewol::resource::Shader::removeContext(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::resource::Shader::removeContextToLate(void) {
|
void ewol::resource::Shader::removeContextToLate() {
|
||||||
m_exist = false;
|
m_exist = false;
|
||||||
m_shader = 0;
|
m_shader = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::resource::Shader::reload(void) {
|
void ewol::resource::Shader::reload() {
|
||||||
etk::FSNode file(m_name);
|
etk::FSNode file(m_name);
|
||||||
if (false == file.exist()) {
|
if (false == file.exist()) {
|
||||||
EWOL_ERROR("File does not Exist : '" << file << "' : '" << file.getFileSystemName() << "'");
|
EWOL_ERROR("File does not Exist : '" << file << "' : '" << file.getFileSystemName() << "'");
|
||||||
|
@ -34,39 +34,39 @@ namespace ewol {
|
|||||||
/**
|
/**
|
||||||
* @brief Destructor, remove the current Shader
|
* @brief Destructor, remove the current Shader
|
||||||
*/
|
*/
|
||||||
virtual ~Shader(void);
|
virtual ~Shader();
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* @brief get the opengl reference id of this shader.
|
* @brief get the opengl reference id of this shader.
|
||||||
* @return The opengl id.
|
* @return The opengl id.
|
||||||
*/
|
*/
|
||||||
GLuint getGL_ID(void) {
|
GLuint getGL_ID() {
|
||||||
return m_shader;
|
return m_shader;
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* @brief get the opengl type of this shader.
|
* @brief get the opengl type of this shader.
|
||||||
* @return The type of this loaded shader.
|
* @return The type of this loaded shader.
|
||||||
*/
|
*/
|
||||||
GLenum getShaderType(void) {
|
GLenum getShaderType() {
|
||||||
return m_type;
|
return m_type;
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* @brief This load/reload the data in the opengl context, needed when removed previously.
|
* @brief This load/reload the data in the opengl context, needed when removed previously.
|
||||||
*/
|
*/
|
||||||
void updateContext(void);
|
void updateContext();
|
||||||
/**
|
/**
|
||||||
* @brief remove the data from the opengl context.
|
* @brief remove the data from the opengl context.
|
||||||
*/
|
*/
|
||||||
void removeContext(void);
|
void removeContext();
|
||||||
/**
|
/**
|
||||||
* @brief Special android spec! It inform us that all context is removed and after notify us...
|
* @brief Special android spec! It inform us that all context is removed and after notify us...
|
||||||
*/
|
*/
|
||||||
void removeContextToLate(void);
|
void removeContextToLate();
|
||||||
/**
|
/**
|
||||||
* @brief Relode the shader from the file. used when a request of resouces reload is done.
|
* @brief Relode the shader from the file. used when a request of resouces reload is done.
|
||||||
* @note this is really usefull when we tested the new themes or shader developpements.
|
* @note this is really usefull when we tested the new themes or shader developpements.
|
||||||
*/
|
*/
|
||||||
void reload(void);
|
void reload();
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* @brief keep the resource pointer.
|
* @brief keep the resource pointer.
|
||||||
|
@ -41,18 +41,18 @@ ewol::resource::Texture::Texture(const std::string& _filename) :
|
|||||||
m_endPointSize.setValue(1.0,1.0);
|
m_endPointSize.setValue(1.0,1.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
ewol::resource::Texture::Texture(void) {
|
ewol::resource::Texture::Texture() {
|
||||||
addObjectType("ewol::compositing::Texture");
|
addObjectType("ewol::compositing::Texture");
|
||||||
m_loaded = false;
|
m_loaded = false;
|
||||||
m_texId = 0;
|
m_texId = 0;
|
||||||
m_endPointSize.setValue(1.0,1.0);
|
m_endPointSize.setValue(1.0,1.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
ewol::resource::Texture::~Texture(void) {
|
ewol::resource::Texture::~Texture() {
|
||||||
removeContext();
|
removeContext();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::resource::Texture::updateContext(void) {
|
void ewol::resource::Texture::updateContext() {
|
||||||
if (false == m_loaded) {
|
if (false == m_loaded) {
|
||||||
// Request a new texture at openGl :
|
// Request a new texture at openGl :
|
||||||
glGenTextures(1, &m_texId);
|
glGenTextures(1, &m_texId);
|
||||||
@ -83,7 +83,7 @@ void ewol::resource::Texture::updateContext(void) {
|
|||||||
m_loaded = true;
|
m_loaded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::resource::Texture::removeContext(void) {
|
void ewol::resource::Texture::removeContext() {
|
||||||
if (true == m_loaded) {
|
if (true == m_loaded) {
|
||||||
// Request remove texture ...
|
// Request remove texture ...
|
||||||
EWOL_INFO("TEXTURE: Rm [" << getId() << "] texId=" << m_texId);
|
EWOL_INFO("TEXTURE: Rm [" << getId() << "] texId=" << m_texId);
|
||||||
@ -92,12 +92,12 @@ void ewol::resource::Texture::removeContext(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::resource::Texture::removeContextToLate(void) {
|
void ewol::resource::Texture::removeContextToLate() {
|
||||||
m_loaded = false;
|
m_loaded = false;
|
||||||
m_texId=0;
|
m_texId=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::resource::Texture::flush(void) {
|
void ewol::resource::Texture::flush() {
|
||||||
// request to the manager to be call at the next update ...
|
// request to the manager to be call at the next update ...
|
||||||
getManager().update(this);
|
getManager().update(this);
|
||||||
}
|
}
|
||||||
@ -107,7 +107,7 @@ void ewol::resource::Texture::setImageSize(ivec2 _newSize) {
|
|||||||
m_data.resize(_newSize);
|
m_data.resize(_newSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
ewol::resource::Texture* ewol::resource::Texture::keep(void) {
|
ewol::resource::Texture* ewol::resource::Texture::keep() {
|
||||||
// this element create a new one every time ....
|
// this element create a new one every time ....
|
||||||
ewol::resource::Texture* object = new ewol::resource::Texture();
|
ewol::resource::Texture* object = new ewol::resource::Texture();
|
||||||
if (NULL == object) {
|
if (NULL == object) {
|
||||||
|
@ -29,41 +29,41 @@ namespace ewol {
|
|||||||
bool m_loaded;
|
bool m_loaded;
|
||||||
// Ewol internal API:
|
// Ewol internal API:
|
||||||
public:
|
public:
|
||||||
void updateContext(void);
|
void updateContext();
|
||||||
void removeContext(void);
|
void removeContext();
|
||||||
void removeContextToLate(void);
|
void removeContextToLate();
|
||||||
// middleware interface:
|
// middleware interface:
|
||||||
public:
|
public:
|
||||||
GLuint getId(void) const {
|
GLuint getId() const {
|
||||||
return m_texId;
|
return m_texId;
|
||||||
};
|
};
|
||||||
const vec2& getUsableSize(void) const {
|
const vec2& getUsableSize() const {
|
||||||
return m_endPointSize;
|
return m_endPointSize;
|
||||||
};
|
};
|
||||||
const ivec2& getOpenGlSize(void) const {
|
const ivec2& getOpenGlSize() const {
|
||||||
return m_data.getSize();
|
return m_data.getSize();
|
||||||
};
|
};
|
||||||
// Public API:
|
// Public API:
|
||||||
protected:
|
protected:
|
||||||
Texture(const std::string& _filename);
|
Texture(const std::string& _filename);
|
||||||
Texture(void);
|
Texture();
|
||||||
~Texture(void);
|
~Texture();
|
||||||
public:
|
public:
|
||||||
// you must set the size here, because it will be set in multiple of pow(2)
|
// you must set the size here, because it will be set in multiple of pow(2)
|
||||||
void setImageSize(ivec2 newSize);
|
void setImageSize(ivec2 newSize);
|
||||||
// get the reference on this image to draw nomething on it ...
|
// get the reference on this image to draw nomething on it ...
|
||||||
inline egami::Image& get(void) {
|
inline egami::Image& get() {
|
||||||
return m_data;
|
return m_data;
|
||||||
};
|
};
|
||||||
// flush the data to send it at the openGl system
|
// flush the data to send it at the openGl system
|
||||||
void flush(void);
|
void flush();
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* @brief keep the resource pointer.
|
* @brief keep the resource pointer.
|
||||||
* @note Never free this pointer by your own...
|
* @note Never free this pointer by your own...
|
||||||
* @return pointer on the resource or NULL if an error occured.
|
* @return pointer on the resource or NULL if an error occured.
|
||||||
*/
|
*/
|
||||||
static ewol::resource::Texture* keep(void);
|
static ewol::resource::Texture* keep();
|
||||||
/**
|
/**
|
||||||
* @brief release the keeped resources
|
* @brief release the keeped resources
|
||||||
* @param[in,out] reference on the object pointer
|
* @param[in,out] reference on the object pointer
|
||||||
|
@ -224,7 +224,7 @@ ewol::resource::TexturedFont::TexturedFont(const std::string& _fontName) :
|
|||||||
EWOL_DEBUG(" " << ewol::font::BoldItalic << " == >" << getWrappingMode(ewol::font::BoldItalic));
|
EWOL_DEBUG(" " << ewol::font::BoldItalic << " == >" << getWrappingMode(ewol::font::BoldItalic));
|
||||||
}
|
}
|
||||||
|
|
||||||
ewol::resource::TexturedFont::~TexturedFont(void) {
|
ewol::resource::TexturedFont::~TexturedFont() {
|
||||||
for (int32_t iiiFontId=0; iiiFontId<4 ; iiiFontId++) {
|
for (int32_t iiiFontId=0; iiiFontId<4 ; iiiFontId++) {
|
||||||
ewol::resource::FontFreeType::release(m_font[iiiFontId]);
|
ewol::resource::FontFreeType::release(m_font[iiiFontId]);
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@ namespace ewol {
|
|||||||
int32_t m_lastRawHeigh[4];
|
int32_t m_lastRawHeigh[4];
|
||||||
protected:
|
protected:
|
||||||
TexturedFont(const std::string& _fontName);
|
TexturedFont(const std::string& _fontName);
|
||||||
~TexturedFont(void);
|
~TexturedFont();
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* @brief get the display height of this font
|
* @brief get the display height of this font
|
||||||
@ -60,7 +60,7 @@ namespace ewol {
|
|||||||
* @brief get the font height (user friendly)
|
* @brief get the font height (user friendly)
|
||||||
* @return Dimention of the font the user requested
|
* @return Dimention of the font the user requested
|
||||||
*/
|
*/
|
||||||
int32_t getFontSize(void) {
|
int32_t getFontSize() {
|
||||||
return m_size;
|
return m_size;
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user