[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
|
||||
#endif
|
||||
|
||||
int32_t date::getYear(void) {
|
||||
int32_t date::getYear() {
|
||||
return BUILD_YEAR;
|
||||
}
|
||||
|
||||
int32_t date::getMonth(void) {
|
||||
int32_t date::getMonth() {
|
||||
return BUILD_MONTH;
|
||||
}
|
||||
|
||||
int32_t date::getDay(void) {
|
||||
int32_t date::getDay() {
|
||||
return BUILD_DAY;
|
||||
}
|
||||
|
||||
int32_t date::getHour(void) {
|
||||
int32_t date::getHour() {
|
||||
return BUILD_HOUR;
|
||||
}
|
||||
|
||||
int32_t date::getMinute(void) {
|
||||
int32_t date::getMinute() {
|
||||
return BUILD_MINUTE;
|
||||
}
|
||||
|
||||
int32_t date::getSecond(void) {
|
||||
int32_t date::getSecond() {
|
||||
return BUILD_SECOND;
|
||||
}
|
||||
|
||||
|
12
external/date/date/date.h
vendored
12
external/date/date/date.h
vendored
@ -12,12 +12,12 @@
|
||||
#include <stdint.h>
|
||||
|
||||
namespace date {
|
||||
int32_t getYear(void);
|
||||
int32_t getMonth(void);
|
||||
int32_t getDay(void);
|
||||
int32_t getHour(void);
|
||||
int32_t getMinute(void);
|
||||
int32_t getSecond(void);
|
||||
int32_t getYear();
|
||||
int32_t getMonth();
|
||||
int32_t getDay();
|
||||
int32_t getHour();
|
||||
int32_t getMinute();
|
||||
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;
|
||||
|
||||
|
||||
void ewol::Dimension::init(void) {
|
||||
void ewol::Dimension::init() {
|
||||
if (true == isInit) {
|
||||
return;
|
||||
}
|
||||
@ -42,7 +42,7 @@ void ewol::Dimension::init(void) {
|
||||
isInit = true;
|
||||
}
|
||||
|
||||
void ewol::Dimension::unInit(void) {
|
||||
void ewol::Dimension::unInit() {
|
||||
isInit = false;
|
||||
ratio.setValue(9999999,888888);
|
||||
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();
|
||||
}
|
||||
|
||||
ewol::Dimension::Dimension(void) :
|
||||
ewol::Dimension::Dimension() :
|
||||
m_data(0,0),
|
||||
m_type(ewol::Dimension::Pixel) {
|
||||
// notinh to do ...
|
||||
@ -122,11 +122,11 @@ void ewol::Dimension::set(std::string _config) {
|
||||
EWOL_VERBOSE(" config dimention : \"" << _config << "\" == > " << *this );
|
||||
}
|
||||
|
||||
ewol::Dimension::~Dimension(void) {
|
||||
ewol::Dimension::~Dimension() {
|
||||
// nothing to do ...
|
||||
}
|
||||
|
||||
ewol::Dimension::operator std::string(void) const {
|
||||
ewol::Dimension::operator std::string() const {
|
||||
std::string str;
|
||||
str = get(getType());
|
||||
|
||||
@ -218,7 +218,7 @@ void ewol::Dimension::set(const vec2& _size, enum ewol::Dimension::distance _typ
|
||||
m_type = _type;
|
||||
}
|
||||
|
||||
vec2 ewol::Dimension::getPixel(void) const {
|
||||
vec2 ewol::Dimension::getPixel() const {
|
||||
if (m_type!=ewol::Dimension::Pourcent) {
|
||||
return m_data;
|
||||
} 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) {
|
||||
vec2 windDim = windowsSize.getPixel();
|
||||
//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);;
|
||||
}
|
||||
|
||||
vec2 ewol::Dimension::getMeter(void) const {
|
||||
vec2 ewol::Dimension::getMeter() const {
|
||||
return ewol::Dimension::getMillimeter()*millimeterToMeter;
|
||||
}
|
||||
|
||||
vec2 ewol::Dimension::getCentimeter(void) const {
|
||||
vec2 ewol::Dimension::getCentimeter() const {
|
||||
return ewol::Dimension::getMillimeter()*millimeterToCentimeter;
|
||||
}
|
||||
|
||||
vec2 ewol::Dimension::getMillimeter(void) const {
|
||||
vec2 ewol::Dimension::getMillimeter() const {
|
||||
return ewol::Dimension::getPixel()*invRatio;
|
||||
}
|
||||
|
||||
vec2 ewol::Dimension::getKilometer(void) const {
|
||||
vec2 ewol::Dimension::getKilometer() const {
|
||||
return ewol::Dimension::getMillimeter()*millimeterToKilometer;
|
||||
}
|
||||
|
||||
vec2 ewol::Dimension::getInch(void) const {
|
||||
vec2 ewol::Dimension::getInch() const {
|
||||
return ewol::Dimension::getMillimeter()*millimeterToInch;
|
||||
}
|
||||
|
||||
vec2 ewol::Dimension::getFoot(void) const {
|
||||
vec2 ewol::Dimension::getFoot() const {
|
||||
return ewol::Dimension::getMillimeter()*millimeterToFoot;
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,7 @@ namespace ewol {
|
||||
/**
|
||||
* @brief Constructor (default :0,0 mode pixel)
|
||||
*/
|
||||
Dimension(void);
|
||||
Dimension();
|
||||
/**
|
||||
* @brief Constructor
|
||||
* @param[in] _size Requested dimention
|
||||
@ -65,12 +65,12 @@ namespace ewol {
|
||||
/**
|
||||
* @brief Destructor
|
||||
*/
|
||||
~Dimension(void);
|
||||
~Dimension();
|
||||
|
||||
/**
|
||||
* @brief string cast :
|
||||
*/
|
||||
operator std::string(void) const;
|
||||
operator std::string() const;
|
||||
|
||||
/**
|
||||
* @brief get the current dimention in requested type
|
||||
@ -96,42 +96,42 @@ namespace ewol {
|
||||
* @brief get the current dimention in pixel
|
||||
* @return dimention in Pixel
|
||||
*/
|
||||
vec2 getPixel(void) const;
|
||||
vec2 getPixel() const;
|
||||
/**
|
||||
* @brief get the current dimention in Pourcent
|
||||
* @return dimention in Pourcent
|
||||
*/
|
||||
vec2 getPourcent(void) const;
|
||||
vec2 getPourcent() const;
|
||||
/**
|
||||
* @brief get the current dimention in Meter
|
||||
* @return dimention in Meter
|
||||
*/
|
||||
vec2 getMeter(void) const;
|
||||
vec2 getMeter() const;
|
||||
/**
|
||||
* @brief get the current dimention in Centimeter
|
||||
* @return dimention in Centimeter
|
||||
*/
|
||||
vec2 getCentimeter(void) const;
|
||||
vec2 getCentimeter() const;
|
||||
/**
|
||||
* @brief get the current dimention in Millimeter
|
||||
* @return dimention in Millimeter
|
||||
*/
|
||||
vec2 getMillimeter(void) const;
|
||||
vec2 getMillimeter() const;
|
||||
/**
|
||||
* @brief get the current dimention in Kilometer
|
||||
* @return dimention in Kilometer
|
||||
*/
|
||||
vec2 getKilometer(void) const;
|
||||
vec2 getKilometer() const;
|
||||
/**
|
||||
* @brief get the current dimention in Inch
|
||||
* @return dimention in Inch
|
||||
*/
|
||||
vec2 getInch(void) const;
|
||||
vec2 getInch() const;
|
||||
/**
|
||||
* @brief get the current dimention in Foot
|
||||
* @return dimention in Foot
|
||||
*/
|
||||
vec2 getFoot(void) const;
|
||||
vec2 getFoot() const;
|
||||
/*****************************************************
|
||||
* = assigment
|
||||
*****************************************************/
|
||||
@ -166,18 +166,18 @@ namespace ewol {
|
||||
* @breif get the dimension type
|
||||
* @return the type
|
||||
*/
|
||||
enum distance getType(void) const {
|
||||
enum distance getType() const {
|
||||
return m_type;
|
||||
};
|
||||
public : // Global static access :
|
||||
/**
|
||||
* @brief basic init
|
||||
*/
|
||||
static void init(void);
|
||||
static void init();
|
||||
/**
|
||||
* @brief basic un-init
|
||||
*/
|
||||
static void unInit(void);
|
||||
static void unInit();
|
||||
/**
|
||||
* @brief set the Milimeter ratio for calculation
|
||||
* @param[in] Ratio Milimeter ration for the screen calculation interpolation
|
||||
|
@ -19,7 +19,7 @@ namespace ewol {
|
||||
private:
|
||||
float m_value[4]; //!< this represent the 4 padding value Left top right buttom (like css)
|
||||
public:
|
||||
Padding(void) { }
|
||||
Padding() { }
|
||||
Padding(float _xl, float _yt=0, float _xr=0, float _yb=0) {
|
||||
setValue(_xl, _yt, _xr, _yb);
|
||||
}
|
||||
@ -30,31 +30,31 @@ namespace ewol {
|
||||
m_value[3] = _yb;
|
||||
}
|
||||
|
||||
float x(void) const {
|
||||
float x() const {
|
||||
return m_value[0] + m_value[2];
|
||||
}
|
||||
float y(void) const {
|
||||
float y() const {
|
||||
return m_value[1] + m_value[3];
|
||||
}
|
||||
float xLeft(void) const {
|
||||
float xLeft() const {
|
||||
return m_value[0];
|
||||
}
|
||||
void setXLeft(float _val) {
|
||||
m_value[0] = _val;
|
||||
}
|
||||
float xRight(void) const {
|
||||
float xRight() const {
|
||||
return m_value[2];
|
||||
}
|
||||
void setXRight(float _val) {
|
||||
m_value[2] = _val;
|
||||
}
|
||||
float yTop(void) const {
|
||||
float yTop() const {
|
||||
return m_value[1];
|
||||
}
|
||||
void setYTop(float _val) {
|
||||
m_value[1] = _val;
|
||||
}
|
||||
float yButtom(void) const {
|
||||
float yButtom() const {
|
||||
return m_value[3];
|
||||
}
|
||||
void setYButtom(float _val) {
|
||||
|
@ -28,12 +28,12 @@ ewol::compositing::Area::Area(const ivec2& _size) :
|
||||
loadProgram();
|
||||
}
|
||||
|
||||
ewol::compositing::Area::~Area(void) {
|
||||
ewol::compositing::Area::~Area() {
|
||||
ewol::resource::Texture::release(m_resource);
|
||||
ewol::resource::Program::release(m_GLprogram);
|
||||
}
|
||||
|
||||
void ewol::compositing::Area::loadProgram(void) {
|
||||
void ewol::compositing::Area::loadProgram() {
|
||||
// get the shader resource :
|
||||
m_GLPosition = 0;
|
||||
m_GLprogram = ewol::resource::Program::keep("DATA:textured3D.prog");
|
||||
@ -76,7 +76,7 @@ void ewol::compositing::Area::draw(bool _disableDepthTest) {
|
||||
m_GLprogram->unUse();
|
||||
}
|
||||
|
||||
void ewol::compositing::Area::clear(void) {
|
||||
void ewol::compositing::Area::clear() {
|
||||
// call upper class
|
||||
ewol::Compositing::clear();
|
||||
// reset Buffer :
|
||||
|
@ -37,7 +37,7 @@ namespace ewol {
|
||||
/**
|
||||
* @brief load the openGL program and get all the ID needed
|
||||
*/
|
||||
void loadProgram(void);
|
||||
void loadProgram();
|
||||
public:
|
||||
/**
|
||||
* @brief generic constructor
|
||||
@ -47,7 +47,7 @@ namespace ewol {
|
||||
/**
|
||||
* @brief generic destructor
|
||||
*/
|
||||
~Area(void);
|
||||
~Area();
|
||||
public:
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
void clear(void);
|
||||
void clear();
|
||||
/**
|
||||
* @brief get the current display position (sometime needed in the gui control)
|
||||
* @return the current position.
|
||||
*/
|
||||
const vec3& getPos(void) {
|
||||
const vec3& getPos() {
|
||||
return m_position;
|
||||
};
|
||||
/**
|
||||
@ -90,10 +90,10 @@ namespace ewol {
|
||||
*/
|
||||
void print(const ivec2& _size);
|
||||
|
||||
egami::Image& get(void) {
|
||||
egami::Image& get() {
|
||||
return m_resource->get();
|
||||
};
|
||||
void flush(void) {
|
||||
void flush() {
|
||||
m_resource->flush();
|
||||
};
|
||||
};
|
||||
|
@ -13,17 +13,17 @@
|
||||
#include <ewol/compositing/Compositing.h>
|
||||
|
||||
|
||||
ewol::Compositing::Compositing(void) {
|
||||
ewol::Compositing::Compositing() {
|
||||
// nothing to do
|
||||
}
|
||||
|
||||
|
||||
ewol::Compositing::~Compositing(void) {
|
||||
ewol::Compositing::~Compositing() {
|
||||
// nothing to do
|
||||
}
|
||||
|
||||
|
||||
void ewol::Compositing::resetMatrix(void) {
|
||||
void ewol::Compositing::resetMatrix() {
|
||||
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();
|
||||
}
|
||||
|
||||
|
@ -21,11 +21,11 @@ namespace ewol {
|
||||
/**
|
||||
* @brief generic constructor
|
||||
*/
|
||||
Compositing(void);
|
||||
Compositing();
|
||||
/**
|
||||
* @brief Generic destructor
|
||||
*/
|
||||
virtual ~Compositing(void);
|
||||
virtual ~Compositing();
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
virtual void clear(void);
|
||||
virtual void clear();
|
||||
/**
|
||||
* @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
|
||||
* @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
|
||||
|
||||
ewol::compositing::Drawing::Drawing(void) :
|
||||
ewol::compositing::Drawing::Drawing() :
|
||||
m_position(0.0, 0.0, 0.0),
|
||||
m_clippingPosStart(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();
|
||||
}
|
||||
|
||||
void ewol::compositing::Drawing::generateTriangle(void) {
|
||||
void ewol::compositing::Drawing::generateTriangle() {
|
||||
m_triElement = 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;
|
||||
}
|
||||
|
||||
void ewol::compositing::Drawing::unLoadProgram(void) {
|
||||
void ewol::compositing::Drawing::unLoadProgram() {
|
||||
ewol::resource::Program::release(m_GLprogram);
|
||||
}
|
||||
|
||||
void ewol::compositing::Drawing::loadProgram(void) {
|
||||
void ewol::compositing::Drawing::loadProgram() {
|
||||
// remove previous loading ... in case
|
||||
unLoadProgram();
|
||||
// oad the new ...
|
||||
@ -316,7 +316,7 @@ void ewol::compositing::Drawing::draw(bool _disableDepthTest) {
|
||||
m_GLprogram->unUse();
|
||||
}
|
||||
|
||||
void ewol::compositing::Drawing::clear(void) {
|
||||
void ewol::compositing::Drawing::clear() {
|
||||
// call upper class
|
||||
ewol::Compositing::clear();
|
||||
// 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);
|
||||
setPoint(m_position);
|
||||
}
|
||||
|
@ -39,20 +39,20 @@ namespace ewol {
|
||||
/**
|
||||
* @brief Basic constructor
|
||||
*/
|
||||
Drawing(void);
|
||||
Drawing();
|
||||
/**
|
||||
* @brief Basic destructor
|
||||
*/
|
||||
~Drawing(void);
|
||||
~Drawing();
|
||||
private:
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
void unLoadProgram(void);
|
||||
void unLoadProgram();
|
||||
float m_thickness; //!< when drawing line and other things
|
||||
int32_t m_triElement; //!< special counter of the single dot generated
|
||||
vec3 m_triangle[3]; //!< Register every system with a combinaison of tiangle
|
||||
@ -61,11 +61,11 @@ namespace ewol {
|
||||
/**
|
||||
* @brief Lunch the generation of triangle
|
||||
*/
|
||||
void generateTriangle(void);
|
||||
void generateTriangle();
|
||||
/**
|
||||
* @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
|
||||
* @param[in] _color Color to current dots generated
|
||||
@ -85,12 +85,12 @@ namespace ewol {
|
||||
/**
|
||||
* @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)
|
||||
* @return the current position.
|
||||
*/
|
||||
const vec3& getPos(void) {
|
||||
const vec3& getPos() {
|
||||
return m_position;
|
||||
};
|
||||
/**
|
||||
@ -124,7 +124,7 @@ namespace ewol {
|
||||
* @brief Get the foreground color of the font.
|
||||
* @return Foreground color.
|
||||
*/
|
||||
const etk::Color<>& getColor(void) {
|
||||
const etk::Color<>& getColor() {
|
||||
return m_color;
|
||||
};
|
||||
/**
|
||||
@ -138,7 +138,7 @@ namespace ewol {
|
||||
* @brief Get the background color of the font.
|
||||
* @return Background color.
|
||||
*/
|
||||
const etk::Color<>& getColorBg(void) {
|
||||
const etk::Color<>& getColorBg() {
|
||||
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
|
||||
*/
|
||||
void addVertex(void);
|
||||
void addVertex();
|
||||
/**
|
||||
* @brief draw a line to a specific position
|
||||
* @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();
|
||||
}
|
||||
|
||||
ewol::compositing::Image::~Image(void) {
|
||||
ewol::compositing::Image::~Image() {
|
||||
ewol::resource::TextureFile::release(m_resource);
|
||||
ewol::resource::ImageDF::release(m_resourceDF);
|
||||
ewol::resource::Program::release(m_GLprogram);
|
||||
}
|
||||
|
||||
void ewol::compositing::Image::loadProgram(void) {
|
||||
void ewol::compositing::Image::loadProgram() {
|
||||
// get the shader resource :
|
||||
m_GLPosition = 0;
|
||||
ewol::resource::Program::release(m_GLprogram);
|
||||
@ -104,7 +104,7 @@ void ewol::compositing::Image::draw(bool _disableDepthTest) {
|
||||
m_GLprogram->unUse();
|
||||
}
|
||||
|
||||
void ewol::compositing::Image::clear(void) {
|
||||
void ewol::compositing::Image::clear() {
|
||||
// call upper class
|
||||
ewol::Compositing::clear();
|
||||
// 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);
|
||||
}
|
||||
|
||||
|
||||
vec2 ewol::compositing::Image::getRealSize(void) {
|
||||
vec2 ewol::compositing::Image::getRealSize() {
|
||||
if ( m_resource == NULL
|
||||
&& m_resourceDF == NULL) {
|
||||
return vec2(0,0);
|
||||
|
@ -46,7 +46,7 @@ namespace ewol {
|
||||
/**
|
||||
* @brief load the openGL program and get all the ID needed
|
||||
*/
|
||||
void loadProgram(void);
|
||||
void loadProgram();
|
||||
public:
|
||||
/**
|
||||
* @brief generic constructor
|
||||
@ -57,7 +57,7 @@ namespace ewol {
|
||||
/**
|
||||
* @brief generic destructor
|
||||
*/
|
||||
virtual ~Image(void);
|
||||
virtual ~Image();
|
||||
public:
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
void clear(void);
|
||||
void clear();
|
||||
/**
|
||||
* @brief get the current display position (sometime needed in the gui control)
|
||||
* @return the current position.
|
||||
*/
|
||||
const vec3& getPos(void) {
|
||||
const vec3& getPos() {
|
||||
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 ..
|
||||
* @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)
|
||||
* @return tre image registered size
|
||||
*/
|
||||
vec2 getRealSize(void);
|
||||
vec2 getRealSize();
|
||||
public:
|
||||
/**
|
||||
* @brief Set render mode of the image
|
||||
@ -180,7 +180,7 @@ namespace ewol {
|
||||
* @brief Get the render methode.
|
||||
* @return The render mode of the image.
|
||||
*/
|
||||
bool getDistanceFieldMode(void) const {
|
||||
bool getDistanceFieldMode() const {
|
||||
return m_distanceFieldMode;
|
||||
}
|
||||
};
|
||||
|
@ -52,11 +52,11 @@ ewol::compositing::Shaper::Shaper(const std::string& _shaperName) :
|
||||
loadProgram();
|
||||
}
|
||||
|
||||
ewol::compositing::Shaper::~Shaper(void) {
|
||||
ewol::compositing::Shaper::~Shaper() {
|
||||
unLoadProgram();
|
||||
}
|
||||
|
||||
void ewol::compositing::Shaper::unLoadProgram(void) {
|
||||
void ewol::compositing::Shaper::unLoadProgram() {
|
||||
ewol::resource::Program::release(m_GLprogram);
|
||||
ewol::resource::TextureFile::release(m_resourceTexture);
|
||||
ewol::resource::ConfigFile::release(m_config);
|
||||
@ -79,7 +79,7 @@ void ewol::compositing::Shaper::unLoadProgram(void) {
|
||||
m_listAssiciatedId.clear();
|
||||
}
|
||||
|
||||
void ewol::compositing::Shaper::loadProgram(void) {
|
||||
void ewol::compositing::Shaper::loadProgram() {
|
||||
if (m_name == "") {
|
||||
EWOL_DEBUG("no Shaper set for loading resources ...");
|
||||
return;
|
||||
@ -207,7 +207,7 @@ void ewol::compositing::Shaper::draw(bool _disableDepthTest) {
|
||||
m_GLprogram->unUse();
|
||||
}
|
||||
|
||||
void ewol::compositing::Shaper::clear(void) {
|
||||
void ewol::compositing::Shaper::clear() {
|
||||
// nothing to do ...
|
||||
m_propertySize = 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();
|
||||
}
|
||||
|
||||
ewol::Padding ewol::compositing::Shaper::getPaddingIn(void) {
|
||||
ewol::Padding ewol::compositing::Shaper::getPaddingIn() {
|
||||
ewol::Padding padding(0,0,0,0);
|
||||
if (m_config != NULL) {
|
||||
padding.setValue(m_config->getNumber(m_confIdPaddingIn[shaperPosLeft]),
|
||||
@ -581,7 +581,7 @@ ewol::Padding ewol::compositing::Shaper::getPaddingIn(void) {
|
||||
return padding;
|
||||
}
|
||||
|
||||
ewol::Padding ewol::compositing::Shaper::getPaddingOut(void) {
|
||||
ewol::Padding ewol::compositing::Shaper::getPaddingOut() {
|
||||
ewol::Padding padding(0,0,0,0);
|
||||
if (m_config != NULL) {
|
||||
padding.setValue(m_config->getNumber(m_confIdPaddingOut[shaperPosLeft]),
|
||||
@ -592,7 +592,7 @@ ewol::Padding ewol::compositing::Shaper::getPaddingOut(void) {
|
||||
return padding;
|
||||
}
|
||||
|
||||
ewol::Padding ewol::compositing::Shaper::getBorder(void) {
|
||||
ewol::Padding ewol::compositing::Shaper::getBorder() {
|
||||
ewol::Padding padding(0,0,0,0);
|
||||
if (m_config != NULL) {
|
||||
padding.setValue(m_config->getNumber(m_confIdBorder[shaperPosLeft]),
|
||||
@ -610,7 +610,7 @@ void ewol::compositing::Shaper::setSource(const std::string& _newFile) {
|
||||
loadProgram();
|
||||
}
|
||||
|
||||
bool ewol::compositing::Shaper::hasSources(void) {
|
||||
bool ewol::compositing::Shaper::hasSources() {
|
||||
return m_GLprogram!=NULL;
|
||||
}
|
||||
|
||||
|
@ -87,11 +87,11 @@ namespace ewol {
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
void unLoadProgram(void);
|
||||
void unLoadProgram();
|
||||
public:
|
||||
/**
|
||||
* @brief generic constructor
|
||||
@ -101,7 +101,7 @@ namespace ewol {
|
||||
/**
|
||||
* @brief generic destructor
|
||||
*/
|
||||
~Shaper(void);
|
||||
~Shaper();
|
||||
public:
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
void clear(void);
|
||||
void clear();
|
||||
/**
|
||||
* @brief change the current status in an other
|
||||
* @param[in] _newStatusId the next new status requested
|
||||
@ -122,21 +122,21 @@ namespace ewol {
|
||||
* @brief get the current displayed status of the shaper
|
||||
* @return The Status Id
|
||||
*/
|
||||
int32_t getCurrentDisplayedStatus(void) {
|
||||
int32_t getCurrentDisplayedStatus() {
|
||||
return m_stateNew;
|
||||
};
|
||||
/**
|
||||
* @brief get the next displayed status of the shaper
|
||||
* @return The next status Id (-1 if no status in next)
|
||||
*/
|
||||
int32_t getNextDisplayedStatus(void) {
|
||||
int32_t getNextDisplayedStatus() {
|
||||
return m_nextStatusRequested;
|
||||
};
|
||||
/**
|
||||
* @brief get the current trasion status
|
||||
* @return value of the transition status (0.0f when no activity)
|
||||
*/
|
||||
float getTransitionStatus(void) {
|
||||
float getTransitionStatus() {
|
||||
return m_stateTransition;
|
||||
};
|
||||
/**
|
||||
@ -150,14 +150,14 @@ namespace ewol {
|
||||
* @brief get the padding declared by the user in the config file
|
||||
* @return the padding property
|
||||
*/
|
||||
ewol::Padding getPadding(void);
|
||||
ewol::Padding getPaddingIn(void);
|
||||
ewol::Padding getPaddingOut(void);
|
||||
ewol::Padding getPadding();
|
||||
ewol::Padding getPaddingIn();
|
||||
ewol::Padding getPaddingOut();
|
||||
/**
|
||||
* @brief get the padding declared by the user in the config file
|
||||
* @return the padding property
|
||||
*/
|
||||
ewol::Padding getBorder(void);
|
||||
ewol::Padding getBorder();
|
||||
/**
|
||||
* @brief change the shaper Source
|
||||
* @param[in] _newFile New file of the shaper
|
||||
@ -167,14 +167,14 @@ namespace ewol {
|
||||
* @brief get the shaper file Source
|
||||
* @return the shapper file name
|
||||
*/
|
||||
const std::string& getSource(void) const {
|
||||
const std::string& getSource() const {
|
||||
return m_name;
|
||||
};
|
||||
/**
|
||||
* @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.
|
||||
*/
|
||||
bool hasSources(void);
|
||||
bool hasSources();
|
||||
public:
|
||||
/**
|
||||
* @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);
|
||||
}
|
||||
|
||||
@ -106,14 +106,14 @@ void ewol::compositing::Text::drawD(bool _disableDepthTest) {
|
||||
m_GLprogram->unUse();
|
||||
}
|
||||
|
||||
float ewol::compositing::Text::getSize(void) {
|
||||
float ewol::compositing::Text::getSize() {
|
||||
if (m_font == NULL) {
|
||||
EWOL_WARNING("no font...");
|
||||
return 1.0f;
|
||||
}
|
||||
return m_font->getFontSize();
|
||||
}
|
||||
float ewol::compositing::Text::getHeight(void) {
|
||||
float ewol::compositing::Text::getHeight() {
|
||||
if (m_font == NULL) {
|
||||
EWOL_WARNING("no font...");
|
||||
return 10.0f;
|
||||
|
@ -36,15 +36,15 @@ namespace ewol {
|
||||
/**
|
||||
* @brief generic destructor
|
||||
*/
|
||||
virtual ~Text(void);
|
||||
virtual ~Text();
|
||||
public:
|
||||
virtual void drawD(bool _disableDepthTest);
|
||||
virtual void drawMT(const mat4& _transformationMatrix, bool _enableDepthTest);
|
||||
protected:
|
||||
float m_size;
|
||||
public:
|
||||
virtual float getHeight(void);
|
||||
virtual float getSize(void);
|
||||
virtual float getHeight();
|
||||
virtual float getSize();
|
||||
virtual ewol::GlyphProperty * getGlyphPointer(char32_t _charcode);
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
@ -87,7 +87,7 @@ void ewol::compositing::TextBase::scale(const vec3& _vect) {
|
||||
m_vectorialDraw.scale(_vect);
|
||||
}
|
||||
|
||||
void ewol::compositing::TextBase::clear(void) {
|
||||
void ewol::compositing::TextBase::clear() {
|
||||
// call upper class
|
||||
ewol::Compositing::clear();
|
||||
// remove sub draw system
|
||||
@ -100,7 +100,7 @@ void ewol::compositing::TextBase::clear(void) {
|
||||
reset();
|
||||
}
|
||||
|
||||
void ewol::compositing::TextBase::reset(void) {
|
||||
void ewol::compositing::TextBase::reset() {
|
||||
m_position = vec3(0,0,0);
|
||||
m_clippingPosStart = 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\"");
|
||||
return;
|
||||
}
|
||||
(void)parseHtmlNode(bodyNode);
|
||||
parseHtmlNode(bodyNode);
|
||||
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\"");
|
||||
return;
|
||||
}
|
||||
(void)parseHtmlNode(bodyNode);
|
||||
parseHtmlNode(bodyNode);
|
||||
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 :
|
||||
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;
|
||||
}
|
||||
|
||||
void ewol::compositing::TextBase::disableAlignement(void) {
|
||||
void ewol::compositing::TextBase::disableAlignement() {
|
||||
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) {
|
||||
print(m_htmlCurrrentLine, m_htmlDecoration);
|
||||
}
|
||||
@ -1079,7 +1079,7 @@ void ewol::compositing::TextBase::htmlFlush(void) {
|
||||
m_htmlDecoration.clear();
|
||||
}
|
||||
|
||||
void ewol::compositing::TextBase::disableCursor(void) {
|
||||
void ewol::compositing::TextBase::disableCursor() {
|
||||
m_selectionStartPos = -100;
|
||||
m_cursorPos = -100;
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ namespace ewol {
|
||||
etk::Color<> m_colorBg; //!< display background color
|
||||
etk::Color<> m_colorFg; //!< display foreground color
|
||||
enum ewol::font::mode m_mode; //!< display mode Regular/Bold/Italic/BoldItalic
|
||||
TextDecoration(void) {
|
||||
TextDecoration() {
|
||||
m_colorBg = etk::color::blue;
|
||||
m_colorBg = etk::color::green;
|
||||
m_mode = ewol::font::Regular;
|
||||
@ -48,7 +48,7 @@ namespace ewol {
|
||||
protected:
|
||||
ewol::compositing::Drawing m_vectorialDraw; //!< This is used to draw background selection and other things ...
|
||||
public:
|
||||
virtual ewol::compositing::Drawing& getDrawing(void) {
|
||||
virtual ewol::compositing::Drawing& getDrawing() {
|
||||
return m_vectorialDraw;
|
||||
};
|
||||
protected:
|
||||
@ -105,7 +105,7 @@ namespace ewol {
|
||||
/**
|
||||
* @brief generic destructor
|
||||
*/
|
||||
virtual ~TextBase(void);
|
||||
virtual ~TextBase();
|
||||
public: // Derived function
|
||||
void translate(const vec3& _vect);
|
||||
void rotate(const vec3& _vect, float _angle);
|
||||
@ -130,16 +130,16 @@ namespace ewol {
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
virtual void reset(void);
|
||||
virtual void reset();
|
||||
/**
|
||||
* @brief get the current display position (sometime needed in the gui control)
|
||||
* @return the current position.
|
||||
*/
|
||||
const vec3& getPos(void) {
|
||||
const vec3& getPos() {
|
||||
return m_position;
|
||||
};
|
||||
/**
|
||||
@ -239,11 +239,11 @@ namespace ewol {
|
||||
* @brief get the current font mode
|
||||
* @return The font mode applied
|
||||
*/
|
||||
enum ewol::font::mode getFontMode(void) {
|
||||
enum ewol::font::mode getFontMode() {
|
||||
return m_mode;
|
||||
};
|
||||
virtual float getHeight(void) = 0;
|
||||
virtual float getSize(void) = 0;
|
||||
virtual float getHeight() = 0;
|
||||
virtual float getSize() = 0;
|
||||
virtual ewol::GlyphProperty * getGlyphPointer(char32_t _charcode) = 0;
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
void forceLineReturn(void);
|
||||
void forceLineReturn();
|
||||
protected:
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
void disableAlignement(void);
|
||||
void disableAlignement();
|
||||
/**
|
||||
* @brief get the current alignement property
|
||||
* @return the curent alignement type
|
||||
*/
|
||||
enum ewol::compositing::aligneMode getAlignement(void);
|
||||
enum ewol::compositing::aligneMode getAlignement();
|
||||
/**
|
||||
* @brief calculate a theoric text size
|
||||
* @param[in] _text The string to calculate dimention.
|
||||
@ -446,12 +446,12 @@ namespace ewol {
|
||||
/**
|
||||
* @brief draw the current line
|
||||
*/
|
||||
void htmlFlush(void);
|
||||
void htmlFlush();
|
||||
public:
|
||||
/**
|
||||
* @brief remove the cursor display
|
||||
*/
|
||||
void disableCursor(void);
|
||||
void disableCursor();
|
||||
/**
|
||||
* @brief set a cursor at a specific 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);
|
||||
}
|
||||
|
||||
@ -114,7 +114,7 @@ void ewol::compositing::TextDF::drawD(bool _disableDepthTest) {
|
||||
m_GLprogram->unUse();
|
||||
}
|
||||
|
||||
void ewol::compositing::TextDF::clear(void) {
|
||||
void ewol::compositing::TextDF::clear() {
|
||||
ewol::compositing::TextBase::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) {
|
||||
EWOL_WARNING("no font...");
|
||||
return 1;
|
||||
|
@ -37,7 +37,7 @@ namespace ewol {
|
||||
/**
|
||||
* @brief generic destructor
|
||||
*/
|
||||
virtual ~TextDF(void);
|
||||
virtual ~TextDF();
|
||||
public:
|
||||
/**
|
||||
* @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);
|
||||
public:
|
||||
virtual void clear(void);
|
||||
virtual void clear();
|
||||
virtual void drawD(bool _disableDepthTest);
|
||||
virtual void drawMT(const mat4& _transformationMatrix, bool _enableDepthTest);
|
||||
protected:
|
||||
float m_size;
|
||||
public:
|
||||
virtual float getHeight(void);
|
||||
virtual float getSize(void) {
|
||||
virtual float getHeight();
|
||||
virtual float getSize() {
|
||||
return m_size;
|
||||
}
|
||||
virtual void setSize(float _size) {
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
|
||||
|
||||
int64_t ewol::getTime(void) {
|
||||
int64_t ewol::getTime() {
|
||||
struct timeval now;
|
||||
gettimeofday(&now, NULL);
|
||||
//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 ...
|
||||
}
|
||||
|
||||
@ -284,12 +284,12 @@ class AndroidContext : public ewol::Context {
|
||||
m_javaObjectEwolCallback = NULL;
|
||||
}
|
||||
|
||||
int32_t run(void) {
|
||||
int32_t run() {
|
||||
// might never be called !!!
|
||||
return -1;
|
||||
}
|
||||
|
||||
void stop(void) {
|
||||
void stop() {
|
||||
EWOL_DEBUG("C->java : send message to the java : STOP REQUESTED");
|
||||
int status;
|
||||
if(!java_attach_current_thread(&status)) {
|
||||
@ -357,7 +357,7 @@ class AndroidContext : public ewol::Context {
|
||||
break;
|
||||
}
|
||||
}
|
||||
int32_t audioGetDeviceCount(void) {
|
||||
int32_t audioGetDeviceCount() {
|
||||
// Request the clipBoard :
|
||||
EWOL_DEBUG("C->java : audio get device count");
|
||||
if (m_javaApplicationType == appl_application) {
|
||||
@ -504,10 +504,10 @@ class AndroidContext : public ewol::Context {
|
||||
java_check_exception(m_JavaVirtualMachinePointer);
|
||||
java_detach_current_thread(status);
|
||||
}
|
||||
void keyboardShow(void) {
|
||||
void keyboardShow() {
|
||||
sendJavaKeyboardUpdate(JNI_TRUE);
|
||||
};
|
||||
void keyboardHide(void) {
|
||||
void keyboardHide() {
|
||||
sendJavaKeyboardUpdate(JNI_FALSE);
|
||||
};
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
#undef __class__
|
||||
#define __class__ "context::ConfigFont"
|
||||
|
||||
ewol::context::ConfigFont::ConfigFont(void) :
|
||||
ewol::context::ConfigFont::ConfigFont() :
|
||||
m_folder("DATA:fonts"),
|
||||
m_name("Arial;Helvetica"),
|
||||
m_size(10),
|
||||
@ -20,7 +20,7 @@ ewol::context::ConfigFont::ConfigFont(void) :
|
||||
ewol::resource::freeTypeInit();
|
||||
}
|
||||
|
||||
ewol::context::ConfigFont::~ConfigFont(void) {
|
||||
ewol::context::ConfigFont::~ConfigFont() {
|
||||
// UnInit FreeTypes
|
||||
ewol::resource::freeTypeUnInit();
|
||||
}
|
||||
|
@ -18,8 +18,8 @@ namespace ewol {
|
||||
/**
|
||||
* Constructor / destructor
|
||||
*/
|
||||
ConfigFont(void);
|
||||
~ConfigFont(void);
|
||||
ConfigFont();
|
||||
~ConfigFont();
|
||||
private:
|
||||
std::string m_folder;
|
||||
public:
|
||||
@ -34,7 +34,7 @@ namespace ewol {
|
||||
* @brief get the default font folder.
|
||||
* @return The default font folder.
|
||||
*/
|
||||
const std::string& getFolder(void) {
|
||||
const std::string& getFolder() {
|
||||
return m_folder;
|
||||
};
|
||||
private:
|
||||
@ -51,14 +51,14 @@ namespace ewol {
|
||||
* @brief get the current default font name
|
||||
* @raturn a reference on the font name string
|
||||
*/
|
||||
const std::string& getName(void) {
|
||||
const std::string& getName() {
|
||||
return m_name;
|
||||
};
|
||||
/**
|
||||
* @brief get the default font size.
|
||||
* @return the font size.
|
||||
*/
|
||||
int32_t getSize(void) {
|
||||
int32_t getSize() {
|
||||
return m_size;
|
||||
};
|
||||
private:
|
||||
@ -75,7 +75,7 @@ namespace ewol {
|
||||
* @brief get the use of internal/external Font
|
||||
* @return true to enable search of internal data.
|
||||
*/
|
||||
bool getUseExternal(void) {
|
||||
bool getUseExternal() {
|
||||
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.
|
||||
* @return the main inteface Mutex
|
||||
*/
|
||||
static etk::Mutex& mutexInterface(void) {
|
||||
static etk::Mutex& mutexInterface() {
|
||||
static etk::Mutex s_interfaceMutex;
|
||||
return s_interfaceMutex;
|
||||
}
|
||||
|
||||
|
||||
static ewol::Context* l_curentInterface=NULL;
|
||||
ewol::Context& ewol::getContext(void) {
|
||||
ewol::Context& ewol::getContext() {
|
||||
#if DEBUG_LEVEL > 2
|
||||
if(NULL == l_curentInterface){
|
||||
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.
|
||||
* @note this lock the main mutex
|
||||
*/
|
||||
void ewol::Context::lockContext(void) {
|
||||
void ewol::Context::lockContext() {
|
||||
mutexInterface().lock();
|
||||
l_curentInterface = this;
|
||||
}
|
||||
@ -74,7 +74,7 @@ void ewol::Context::lockContext(void) {
|
||||
* @brief set the curent interface at NULL.
|
||||
* @note this un-lock the main mutex
|
||||
*/
|
||||
void ewol::Context::unLockContext(void) {
|
||||
void ewol::Context::unLockContext() {
|
||||
l_curentInterface = NULL;
|
||||
mutexInterface().unLock();
|
||||
}
|
||||
@ -116,7 +116,7 @@ namespace ewol {
|
||||
enum ewol::key::keyboard keyboardMove;
|
||||
ewol::key::Special keyboardSpecial;
|
||||
|
||||
eSystemMessage(void) :
|
||||
eSystemMessage() :
|
||||
TypeMessage(msgNone),
|
||||
clipboardID(ewol::context::clipBoard::clipboardStd),
|
||||
inputType(ewol::key::typeUnknow),
|
||||
@ -143,11 +143,11 @@ void ewol::Context::inputEventGrabPointer(ewol::Widget* _widget) {
|
||||
m_input.grabPointer(_widget);
|
||||
}
|
||||
|
||||
void ewol::Context::inputEventUnGrabPointer(void) {
|
||||
void ewol::Context::inputEventUnGrabPointer() {
|
||||
m_input.unGrabPointer();
|
||||
}
|
||||
|
||||
void ewol::Context::processEvents(void) {
|
||||
void ewol::Context::processEvents() {
|
||||
int32_t nbEvent = 0;
|
||||
//EWOL_DEBUG(" ******** Event");
|
||||
ewol::eSystemMessage* data = NULL;
|
||||
@ -373,7 +373,7 @@ ewol::Context::Context(int32_t _argc, const char* _argv[]) :
|
||||
EWOL_INFO(" == > Ewol system init (END)");
|
||||
}
|
||||
|
||||
ewol::Context::~Context(void) {
|
||||
ewol::Context::~Context() {
|
||||
EWOL_INFO(" == > Ewol system Un-Init (BEGIN)");
|
||||
// TODO : Clean the message list ...
|
||||
// set the curent interface :
|
||||
@ -395,7 +395,7 @@ ewol::Context::~Context(void) {
|
||||
EWOL_INFO(" == > Ewol system Un-Init (END)");
|
||||
}
|
||||
|
||||
void ewol::Context::requestUpdateSize(void) {
|
||||
void ewol::Context::requestUpdateSize() {
|
||||
ewol::eSystemMessage *data = new ewol::eSystemMessage();
|
||||
if (data == NULL) {
|
||||
EWOL_ERROR("allocationerror of message");
|
||||
@ -515,7 +515,7 @@ void ewol::Context::OS_SetKeyboardMove(ewol::key::Special& _special,
|
||||
m_msgSystem.post(data);
|
||||
}
|
||||
|
||||
void ewol::Context::OS_Hide(void) {
|
||||
void ewol::Context::OS_Hide() {
|
||||
ewol::eSystemMessage *data = new ewol::eSystemMessage();
|
||||
if (data == NULL) {
|
||||
EWOL_ERROR("allocationerror of message");
|
||||
@ -525,7 +525,7 @@ void ewol::Context::OS_Hide(void) {
|
||||
m_msgSystem.post(data);
|
||||
}
|
||||
|
||||
void ewol::Context::OS_Show(void) {
|
||||
void ewol::Context::OS_Show() {
|
||||
ewol::eSystemMessage *data = new ewol::eSystemMessage();
|
||||
if (data == NULL) {
|
||||
EWOL_ERROR("allocationerror of message");
|
||||
@ -653,11 +653,11 @@ void ewol::Context::onObjectRemove(ewol::Object * _removeObject) {
|
||||
m_input.onObjectRemove(_removeObject);
|
||||
}
|
||||
|
||||
void ewol::Context::resetIOEvent(void) {
|
||||
void ewol::Context::resetIOEvent() {
|
||||
m_input.newLayerSet();
|
||||
}
|
||||
|
||||
void ewol::Context::OS_OpenGlContextDestroy(void) {
|
||||
void ewol::Context::OS_OpenGlContextDestroy() {
|
||||
m_resourceManager.contextHasBeenDestroyed();
|
||||
}
|
||||
|
||||
@ -673,14 +673,14 @@ void ewol::Context::setWindows(ewol::widget::Windows* _windows) {
|
||||
forceRedrawAll();
|
||||
}
|
||||
|
||||
void ewol::Context::forceRedrawAll(void) {
|
||||
void ewol::Context::forceRedrawAll() {
|
||||
if (m_windowsCurrent == NULL) {
|
||||
return;
|
||||
}
|
||||
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 :
|
||||
lockContext();
|
||||
EWOL_INFO("OS_Stop...");
|
||||
@ -691,7 +691,7 @@ void ewol::Context::OS_Stop(void) {
|
||||
unLockContext();
|
||||
}
|
||||
|
||||
void ewol::Context::OS_Suspend(void) {
|
||||
void ewol::Context::OS_Suspend() {
|
||||
// set the curent interface :
|
||||
lockContext();
|
||||
EWOL_INFO("OS_Suspend...");
|
||||
@ -703,7 +703,7 @@ void ewol::Context::OS_Suspend(void) {
|
||||
unLockContext();
|
||||
}
|
||||
|
||||
void ewol::Context::OS_Resume(void) {
|
||||
void ewol::Context::OS_Resume() {
|
||||
// set the curent interface :
|
||||
lockContext();
|
||||
EWOL_INFO("OS_Resume...");
|
||||
@ -715,7 +715,7 @@ void ewol::Context::OS_Resume(void) {
|
||||
// release the curent interface :
|
||||
unLockContext();
|
||||
}
|
||||
void ewol::Context::OS_Foreground(void) {
|
||||
void ewol::Context::OS_Foreground() {
|
||||
// set the curent interface :
|
||||
lockContext();
|
||||
EWOL_INFO("OS_Foreground...");
|
||||
@ -726,7 +726,7 @@ void ewol::Context::OS_Foreground(void) {
|
||||
unLockContext();
|
||||
}
|
||||
|
||||
void ewol::Context::OS_Background(void) {
|
||||
void ewol::Context::OS_Background() {
|
||||
// set the curent interface :
|
||||
lockContext();
|
||||
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 ...");
|
||||
}
|
||||
|
||||
void ewol::Context::hide(void) {
|
||||
void ewol::Context::hide() {
|
||||
EWOL_INFO("hide: NOT implemented ...");
|
||||
};
|
||||
|
||||
void ewol::Context::show(void) {
|
||||
void ewol::Context::show() {
|
||||
EWOL_INFO("show: NOT implemented ...");
|
||||
}
|
||||
|
||||
@ -762,12 +762,12 @@ void ewol::Context::setTitle(const std::string& _title) {
|
||||
EWOL_INFO("setTitle: NOT implemented ...");
|
||||
}
|
||||
|
||||
void ewol::Context::keyboardShow(void) {
|
||||
void ewol::Context::keyboardShow() {
|
||||
EWOL_INFO("keyboardShow: NOT implemented ...");
|
||||
}
|
||||
|
||||
|
||||
void ewol::Context::keyboardHide(void) {
|
||||
void ewol::Context::keyboardHide() {
|
||||
EWOL_INFO("keyboardHide: NOT implemented ...");
|
||||
}
|
||||
|
||||
|
@ -41,47 +41,47 @@ namespace ewol {
|
||||
private:
|
||||
ewol::context::CommandLine m_commandLine; //!< Start command line information
|
||||
public:
|
||||
ewol::context::CommandLine& getCmd(void) {
|
||||
ewol::context::CommandLine& getCmd() {
|
||||
return m_commandLine;
|
||||
};
|
||||
private:
|
||||
ewol::context::ConfigFont m_configFont; //!< global font configuration
|
||||
public:
|
||||
ewol::context::ConfigFont& getFontDefault(void) {
|
||||
ewol::context::ConfigFont& getFontDefault() {
|
||||
return m_configFont;
|
||||
};
|
||||
private:
|
||||
ewol::widget::Manager m_widgetManager; //!< global widget manager
|
||||
public:
|
||||
ewol::widget::Manager& getWidgetManager(void) {
|
||||
ewol::widget::Manager& getWidgetManager() {
|
||||
return m_widgetManager;
|
||||
};
|
||||
private:
|
||||
ewol::object::Manager m_objectManager; //!< Object Manager main instance
|
||||
public:
|
||||
ewol::object::Manager& getEObjectManager(void) {
|
||||
ewol::object::Manager& getEObjectManager() {
|
||||
return m_objectManager;
|
||||
};
|
||||
private:
|
||||
ewol::resource::Manager m_resourceManager; //!< global resources Manager
|
||||
public:
|
||||
ewol::resource::Manager& getResourcesManager(void) {
|
||||
ewol::resource::Manager& getResourcesManager() {
|
||||
return m_resourceManager;
|
||||
};
|
||||
public:
|
||||
Context(int32_t _argc=0, const char* _argv[]=NULL);
|
||||
virtual ~Context(void);
|
||||
virtual ~Context();
|
||||
protected:
|
||||
/**
|
||||
* @brief set the curent interface.
|
||||
* @note this lock the main mutex
|
||||
*/
|
||||
void lockContext(void);
|
||||
void lockContext();
|
||||
/**
|
||||
* @brief set the curent interface at NULL.
|
||||
* @note this un-lock the main mutex
|
||||
*/
|
||||
void unLockContext(void);
|
||||
void unLockContext();
|
||||
private:
|
||||
int64_t m_previousDisplayTime; // this is to limit framerate ... in case...
|
||||
ewol::context::InputManager m_input;
|
||||
@ -94,7 +94,7 @@ namespace ewol {
|
||||
/**
|
||||
* @brief Processing all the event arrived ... (commoly called in draw function)
|
||||
*/
|
||||
void processEvents(void);
|
||||
void processEvents();
|
||||
public:
|
||||
|
||||
virtual void setArchiveDir(int _mode, const char* _str);
|
||||
@ -116,22 +116,22 @@ namespace ewol {
|
||||
/**
|
||||
* @brief The current context is suspended
|
||||
*/
|
||||
virtual void OS_Suspend(void);
|
||||
virtual void OS_Suspend();
|
||||
/**
|
||||
* @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)
|
||||
*/
|
||||
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)
|
||||
*/
|
||||
virtual void OS_Background(void);
|
||||
virtual void OS_Background();
|
||||
|
||||
void requestUpdateSize(void);
|
||||
void requestUpdateSize();
|
||||
|
||||
// return true if a flush is needed
|
||||
bool OS_Draw(bool _displayEveryTime);
|
||||
@ -144,19 +144,19 @@ namespace ewol {
|
||||
/**
|
||||
* @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 ...
|
||||
*/
|
||||
void OS_OpenGlContextDestroy(void);
|
||||
void OS_OpenGlContextDestroy();
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
virtual void stop(void);
|
||||
virtual void stop();
|
||||
private:
|
||||
ewol::widget::Windows* m_windowsCurrent; //!< curent displayed windows
|
||||
public:
|
||||
@ -169,7 +169,7 @@ namespace ewol {
|
||||
* @brief get the current windows that is displayed
|
||||
* @return the current handle on the windows (can be null)
|
||||
*/
|
||||
ewol::widget::Windows* getWindows(void) {
|
||||
ewol::widget::Windows* getWindows() {
|
||||
return m_windowsCurrent;
|
||||
};
|
||||
private:
|
||||
@ -179,7 +179,7 @@ namespace ewol {
|
||||
* @brief get the current windows size
|
||||
* @return the current size ...
|
||||
*/
|
||||
const vec2& getSize(void) {
|
||||
const vec2& getSize() {
|
||||
return m_windowsSize;
|
||||
};
|
||||
/**
|
||||
@ -205,23 +205,23 @@ namespace ewol {
|
||||
/**
|
||||
* @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.
|
||||
*/
|
||||
virtual void hide(void);
|
||||
virtual void hide();
|
||||
/**
|
||||
* @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.
|
||||
*/
|
||||
virtual void show(void);
|
||||
virtual void show();
|
||||
/**
|
||||
* @brief Redraw all the windows
|
||||
*/
|
||||
void forceRedrawAll(void);
|
||||
void forceRedrawAll();
|
||||
|
||||
// TODO : Later ...
|
||||
/**
|
||||
@ -238,16 +238,16 @@ namespace ewol {
|
||||
/**
|
||||
* @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)
|
||||
*/
|
||||
virtual void keyboardShow(void);
|
||||
virtual void keyboardShow();
|
||||
/**
|
||||
* @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
|
||||
@ -300,14 +300,14 @@ namespace ewol {
|
||||
* @note : must be implemented in all system OS implementation
|
||||
* @return The curent time of the process
|
||||
*/
|
||||
static int64_t getTime(void);
|
||||
static int64_t getTime();
|
||||
#if defined(__TARGET_OS__Android)
|
||||
public:
|
||||
typedef void (*AndroidAudioCallback)(void* _data,
|
||||
int32_t _size,
|
||||
void* _userData);
|
||||
// Android specific audio interface :
|
||||
virtual int32_t audioGetDeviceCount(void) {
|
||||
virtual int32_t audioGetDeviceCount() {
|
||||
return 0;
|
||||
}
|
||||
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.
|
||||
* @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
|
||||
|
@ -56,13 +56,13 @@ namespace ewol {
|
||||
/**
|
||||
* @brief Destructor
|
||||
*/
|
||||
~Fps(void) {
|
||||
~Fps() {
|
||||
|
||||
}
|
||||
/**
|
||||
* @brief this might be call every time a diplay start
|
||||
*/
|
||||
void tic(void) {
|
||||
void tic() {
|
||||
int64_t currentTime = ewol::getTime();
|
||||
ticTime = currentTime;
|
||||
nbCallTime++;
|
||||
@ -98,14 +98,14 @@ namespace ewol {
|
||||
/**
|
||||
* @brief this might be call when a display is really done
|
||||
*/
|
||||
void incrementCounter(void) {
|
||||
void incrementCounter() {
|
||||
nbDisplayTime++;
|
||||
drwingDone = true;
|
||||
}
|
||||
/**
|
||||
* @brief draw debug display ...
|
||||
*/
|
||||
void draw(void) {
|
||||
void draw() {
|
||||
if (true == display) {
|
||||
if (nbDisplayTime>0) {
|
||||
EWOL_INFO(m_displayName << " : Active : "
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include <mach/mach.h>
|
||||
|
||||
|
||||
int64_t ewol::getTime(void) {
|
||||
int64_t ewol::getTime() {
|
||||
struct timespec now;
|
||||
clock_serv_t cclock;
|
||||
mach_timespec_t mts;
|
||||
@ -58,11 +58,11 @@ public:
|
||||
// nothing to do ...
|
||||
}
|
||||
|
||||
int32_t Run(void) {
|
||||
int32_t Run() {
|
||||
|
||||
return 0;
|
||||
}
|
||||
virtual void stop(void) {
|
||||
virtual void stop() {
|
||||
mm_exit();
|
||||
}
|
||||
public:
|
||||
@ -189,40 +189,40 @@ void IOs::setKeyboardMove(ewol::key::Special& _keyboardMode, enum ewol::key::key
|
||||
interface->MAC_SetKeyboardMove(_keyboardMode, _move, _isDown);
|
||||
}
|
||||
|
||||
void IOs::start(void) {
|
||||
void IOs::start() {
|
||||
if (interface == NULL) {
|
||||
return;
|
||||
}
|
||||
//interface->OS_Start();
|
||||
}
|
||||
|
||||
void IOs::resume(void) {
|
||||
void IOs::resume() {
|
||||
if (interface == NULL) {
|
||||
return;
|
||||
}
|
||||
interface->OS_Resume();
|
||||
}
|
||||
|
||||
void IOs::suspend(void) {
|
||||
void IOs::suspend() {
|
||||
if (interface == NULL) {
|
||||
return;
|
||||
}
|
||||
interface->OS_Suspend();
|
||||
}
|
||||
|
||||
void IOs::stop(void) {
|
||||
void IOs::stop() {
|
||||
if (interface == NULL) {
|
||||
return;
|
||||
}
|
||||
interface->OS_Stop();
|
||||
}
|
||||
void IOs::background(void) {
|
||||
void IOs::background() {
|
||||
if (interface == NULL) {
|
||||
return;
|
||||
}
|
||||
interface->OS_Background();
|
||||
}
|
||||
void IOs::foreground(void) {
|
||||
void IOs::foreground() {
|
||||
if (interface == NULL) {
|
||||
return;
|
||||
}
|
||||
@ -244,7 +244,7 @@ int ewol::run(int _argc, const char *_argv[]) {
|
||||
}
|
||||
|
||||
// Creat and relaese ewol::Context interface:
|
||||
void IOs::createInterface(void) {
|
||||
void IOs::createInterface() {
|
||||
etk::setArgZero(l_argv[0]);
|
||||
EWOL_INFO("Create new interface");
|
||||
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) {
|
||||
return;
|
||||
}
|
||||
|
@ -13,8 +13,8 @@
|
||||
|
||||
namespace IOs {
|
||||
// Create and relaese ewol::Context interface:
|
||||
void createInterface(void);
|
||||
void releaseInterface(void);
|
||||
void createInterface();
|
||||
void releaseInterface();
|
||||
// return true if a flush is needed
|
||||
bool draw(bool _displayEveryTime);
|
||||
/**
|
||||
@ -28,12 +28,12 @@ namespace IOs {
|
||||
void setInputMotion(int32_t _id, float _x, float _y);
|
||||
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 start(void);
|
||||
void stop(void);
|
||||
void foreground(void);
|
||||
void background(void);
|
||||
void resume(void);
|
||||
void suspend(void);
|
||||
void start();
|
||||
void stop();
|
||||
void foreground();
|
||||
void background();
|
||||
void resume();
|
||||
void suspend();
|
||||
};
|
||||
|
||||
|
||||
|
@ -14,7 +14,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
int mm_main(int argc, const char *argv[]);
|
||||
void mm_exit(void);
|
||||
void mm_exit();
|
||||
void mm_openURL(const char *_url);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -35,8 +35,8 @@
|
||||
int deltaDisplay;
|
||||
int displayCounter;
|
||||
}
|
||||
- (void)stopDisplayLink;
|
||||
- (void)startDisplayLink;
|
||||
- (void)speedSlow;
|
||||
- (void)speedNormal;
|
||||
- ()stopDisplayLink;
|
||||
- ()startDisplayLink;
|
||||
- ()speedSlow;
|
||||
- ()speedNormal;
|
||||
@end
|
||||
|
@ -28,7 +28,7 @@
|
||||
#define EVENT_DEBUG EWOL_VERBOSE
|
||||
//#define EVENT_DEBUG EWOL_DEBUG
|
||||
|
||||
void ewol::context::InputManager::calculateLimit(void) {
|
||||
void ewol::context::InputManager::calculateLimit() {
|
||||
m_eventInputLimit.sepatateTime = 300000; // µs
|
||||
m_eventInputLimit.DpiOffset = m_dpi*100;
|
||||
m_eventMouseLimit.sepatateTime = 300000; // µs
|
||||
@ -133,7 +133,7 @@ void ewol::context::InputManager::grabPointer(ewol::Widget* _widget) {
|
||||
_widget->getSize().y()/2.0f) );
|
||||
}
|
||||
|
||||
void ewol::context::InputManager::unGrabPointer(void) {
|
||||
void ewol::context::InputManager::unGrabPointer() {
|
||||
m_grabWidget = NULL;
|
||||
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++) {
|
||||
// remove the property of this input ...
|
||||
abortElement(m_eventInputSaved, iii, ewol::key::typeFinger);
|
||||
@ -174,7 +174,7 @@ ewol::context::InputManager::InputManager(ewol::Context& _context) :
|
||||
EWOL_INFO("Init (end)");
|
||||
}
|
||||
|
||||
ewol::context::InputManager::~InputManager(void) {
|
||||
ewol::context::InputManager::~InputManager() {
|
||||
EWOL_INFO("Un-Init (start)");
|
||||
EWOL_INFO("Un-Init (end)");
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ namespace ewol {
|
||||
int32_t m_dpi;
|
||||
InputLimit m_eventInputLimit;
|
||||
InputLimit m_eventMouseLimit;
|
||||
void calculateLimit(void);
|
||||
void calculateLimit();
|
||||
InputPoperty m_eventInputSaved[MAX_MANAGE_INPUT];
|
||||
InputPoperty m_eventMouseSaved[MAX_MANAGE_INPUT];
|
||||
void abortElement(InputPoperty* _eventTable, int32_t _idInput, enum ewol::key::type _type);
|
||||
@ -87,7 +87,7 @@ namespace ewol {
|
||||
ewol::Context& m_context;
|
||||
public:
|
||||
InputManager(ewol::Context& _context);
|
||||
~InputManager(void);
|
||||
~InputManager();
|
||||
void setDpi(int32_t _newDPI);
|
||||
|
||||
// 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 ...
|
||||
*/
|
||||
void newLayerSet(void);
|
||||
void newLayerSet();
|
||||
/**
|
||||
* @brief This is to transfert the event from one widget to another one
|
||||
* @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
|
||||
*/
|
||||
void unGrabPointer(void);
|
||||
void unGrabPointer();
|
||||
private:
|
||||
ewol::key::Special m_specialKey;
|
||||
public:
|
||||
|
@ -11,6 +11,6 @@
|
||||
@interface MacOsAppDelegate : NSObject <NSApplicationDelegate>
|
||||
|
||||
@property (assign) IBOutlet NSWindow *window;
|
||||
- (void)sendEvent:(NSEvent *)event;
|
||||
- (void)applicationWillResignActive:(MacOsAppDelegate *)application;
|
||||
- ()sendEvent:(NSEvent *)event;
|
||||
- ()applicationWillResignActive:(MacOsAppDelegate *)application;
|
||||
@end
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include <mach/mach.h>
|
||||
|
||||
|
||||
int64_t ewol::getTime(void) {
|
||||
int64_t ewol::getTime() {
|
||||
struct timespec now;
|
||||
clock_serv_t cclock;
|
||||
mach_timespec_t mts;
|
||||
@ -58,7 +58,7 @@ class MacOSInterface : public ewol::Context {
|
||||
mm_main(_argc, _argv);
|
||||
}
|
||||
|
||||
int32_t Run(void) {
|
||||
int32_t Run() {
|
||||
return mm_run();
|
||||
}
|
||||
public:
|
||||
|
@ -14,7 +14,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
int mm_main(int argc, const char *argv[]);
|
||||
int mm_run(void);
|
||||
int mm_run();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -14,21 +14,21 @@
|
||||
@interface OpenGLView : NSOpenGLView<NSWindowDelegate> {
|
||||
NSTimer* _refreshTimer;
|
||||
}
|
||||
- (void)prepareOpenGL;
|
||||
- (void)drawRect:(NSRect) bounds;
|
||||
- (void)mouseDown:(NSEvent *) event;
|
||||
- (void)mouseDragged:(NSEvent *) event;
|
||||
- (void)mouseUp:(NSEvent *)event;
|
||||
- (void)mouseMoved:(NSEvent *)event;
|
||||
- (void)mouseEntered:(NSEvent *)event;
|
||||
- (void)mouseExited:(NSEvent *)event;
|
||||
- (void)rightMouseDown:(NSEvent *)event;
|
||||
- (void)rightMouseDragged:(NSEvent *)event;
|
||||
- (void)rightMouseUp:(NSEvent *)event;
|
||||
- (void)otherMouseDown:(NSEvent *)event;
|
||||
- (void)otherMouseDragged:(NSEvent *)event;
|
||||
- (void)otherMouseUp:(NSEvent *)event;
|
||||
//- (void)sendEvent:(NSEvent *)event
|
||||
- (void)keyDown:(NSEvent *)theEvent;
|
||||
- (void)flagsChanged:(NSEvent *)theEvent;
|
||||
- ()prepareOpenGL;
|
||||
- ()drawRect:(NSRect) bounds;
|
||||
- ()mouseDown:(NSEvent *) event;
|
||||
- ()mouseDragged:(NSEvent *) event;
|
||||
- ()mouseUp:(NSEvent *)event;
|
||||
- ()mouseMoved:(NSEvent *)event;
|
||||
- ()mouseEntered:(NSEvent *)event;
|
||||
- ()mouseExited:(NSEvent *)event;
|
||||
- ()rightMouseDown:(NSEvent *)event;
|
||||
- ()rightMouseDragged:(NSEvent *)event;
|
||||
- ()rightMouseUp:(NSEvent *)event;
|
||||
- ()otherMouseDown:(NSEvent *)event;
|
||||
- ()otherMouseDragged:(NSEvent *)event;
|
||||
- ()otherMouseUp:(NSEvent *)event;
|
||||
//- ()sendEvent:(NSEvent *)event
|
||||
- ()keyDown:(NSEvent *)theEvent;
|
||||
- ()flagsChanged:(NSEvent *)theEvent;
|
||||
@end
|
||||
|
@ -13,7 +13,7 @@
|
||||
}
|
||||
+ (id)alloc;
|
||||
- (id)init;
|
||||
+ (void)dealloc;
|
||||
+ ()dealloc;
|
||||
@end
|
||||
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
|
||||
|
||||
int64_t ewol::getTime(void) {
|
||||
int64_t ewol::getTime() {
|
||||
struct timeval now;
|
||||
gettimeofday(&now, NULL);
|
||||
//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;
|
||||
WNDCLASS wc;
|
||||
HWND hWnd;
|
||||
@ -104,7 +104,7 @@ class WindowsContext : public ewol::eContext {
|
||||
DispatchMessage( &msg );
|
||||
}
|
||||
} else {
|
||||
(void)Draw(true);
|
||||
()Draw(true);
|
||||
SwapBuffers( hDC );
|
||||
}
|
||||
}
|
||||
@ -115,7 +115,7 @@ class WindowsContext : public ewol::eContext {
|
||||
return msg.wParam;
|
||||
}
|
||||
|
||||
void Stop(void) {
|
||||
void Stop() {
|
||||
m_run = false;
|
||||
// To exit program ...
|
||||
PostQuitMessage(0);
|
||||
|
@ -53,7 +53,7 @@ bool hasDisplay = false;
|
||||
#define X11_CRITICAL EWOL_VERBOSE
|
||||
#endif
|
||||
|
||||
int64_t ewol::getTime(void) {
|
||||
int64_t ewol::getTime() {
|
||||
struct timespec now;
|
||||
int ret = clock_gettime(CLOCK_REALTIME, &now);
|
||||
if (ret != 0) {
|
||||
@ -191,11 +191,11 @@ class X11Interface : public ewol::Context {
|
||||
m_run = true;
|
||||
}
|
||||
|
||||
~X11Interface(void) {
|
||||
~X11Interface() {
|
||||
// TODO : ...
|
||||
}
|
||||
|
||||
int32_t run(void) {
|
||||
int32_t run() {
|
||||
bool specialEventThatNeedARedraw = false;
|
||||
// main cycle
|
||||
while(true == m_run) {
|
||||
@ -740,7 +740,7 @@ class X11Interface : public ewol::Context {
|
||||
return 0;
|
||||
}
|
||||
/****************************************************************************************/
|
||||
virtual void stop(void) {
|
||||
virtual void stop() {
|
||||
X11_INFO("X11-API: Stop");
|
||||
m_run = false;
|
||||
}
|
||||
@ -909,7 +909,7 @@ class X11Interface : public ewol::Context {
|
||||
}
|
||||
}
|
||||
/****************************************************************************************/
|
||||
bool createX11Context(void) {
|
||||
bool createX11Context() {
|
||||
X11_INFO("X11: CreateX11Context");
|
||||
int x,y, attr_mask;
|
||||
XSizeHints hints;
|
||||
@ -1215,7 +1215,7 @@ class X11Interface : public ewol::Context {
|
||||
}
|
||||
}
|
||||
/****************************************************************************************/
|
||||
bool createOGlContext(void) {
|
||||
bool createOGlContext() {
|
||||
X11_INFO("X11:CreateOGlContext");
|
||||
/* create a GLX context */
|
||||
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");
|
||||
for(int32_t i=0; i<ewol::context::clipBoard::clipboardCount; i++) {
|
||||
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");
|
||||
for(int32_t i=0; i<ewol::context::clipBoard::clipboardCount; i++) {
|
||||
mesCopy[i].clear();
|
||||
|
@ -66,11 +66,11 @@ namespace ewol {
|
||||
/**
|
||||
* @brief initialize the clipboard system (done by ewol)
|
||||
*/
|
||||
void init(void);
|
||||
void init();
|
||||
/**
|
||||
* @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();
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@ namespace ewol {
|
||||
* @brief get the number of element in the Command line
|
||||
* @return the number of element
|
||||
*/
|
||||
int32_t size(void);
|
||||
int32_t size();
|
||||
/**
|
||||
* @brief get an element with a specific ID
|
||||
* @return _id The cmdLine Id element
|
||||
|
@ -47,7 +47,7 @@
|
||||
#include <directfbgl.h>
|
||||
|
||||
|
||||
int64_t guiInterface::getTime(void) {
|
||||
int64_t guiInterface::getTime() {
|
||||
struct timespec now;
|
||||
int ret = clock_gettime(CLOCK_REALTIME, &now);
|
||||
if (ret != 0) {
|
||||
@ -190,7 +190,7 @@ void DirectFB_Init(int argc, const char *argv[]) {
|
||||
EWOL_INFO("DirectFB init (STOP)");
|
||||
}
|
||||
|
||||
void DirectFB_UnInit(void) {
|
||||
void DirectFB_UnInit() {
|
||||
// release our interfaces to shutdown DirectFB
|
||||
primary_gl->release(primary_gl);
|
||||
primary->release(primary);
|
||||
@ -198,7 +198,7 @@ void DirectFB_UnInit(void) {
|
||||
dfb->release(dfb);
|
||||
}
|
||||
|
||||
void DirectFB_Run(void) {
|
||||
void DirectFB_Run() {
|
||||
EWOL_INFO("X11 configure windows size : (" << screen_height << "," << screen_width << ")");
|
||||
eSystem::Resize(screen_width, screen_height);
|
||||
|
||||
@ -384,17 +384,17 @@ void guiInterface::ClipBoardSet(enum ewol::context::clipBoard::clipboardListe _c
|
||||
#define __class__ "guiInterface"
|
||||
|
||||
|
||||
void guiInterface::Stop(void) {
|
||||
void guiInterface::Stop() {
|
||||
EWOL_INFO("X11-API: Stop");
|
||||
m_run = false;
|
||||
}
|
||||
|
||||
void guiInterface::KeyboardShow(void) {
|
||||
void guiInterface::KeyboardShow() {
|
||||
// nothing to do : No keyboard on computer ...
|
||||
}
|
||||
|
||||
|
||||
void guiInterface::KeyboardHide(void) {
|
||||
void guiInterface::KeyboardHide() {
|
||||
// nothing to do : No keyboard on computer ...
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
#include <ewol/debug.h>
|
||||
|
||||
int32_t ewol::getLogId(void) {
|
||||
int32_t ewol::getLogId() {
|
||||
static int32_t g_val = etk::log::registerInstance("ewol");
|
||||
return g_val;
|
||||
}
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include <etk/log.h>
|
||||
|
||||
namespace ewol {
|
||||
int32_t getLogId(void);
|
||||
int32_t getLogId();
|
||||
};
|
||||
// TODO : Review this problem of multiple intanciation of "std::stringbuf sb"
|
||||
#define EWOL_BASE(info,data) \
|
||||
|
@ -34,25 +34,25 @@ namespace ewol {
|
||||
void setType(enum ewol::key::keyboard _type) {
|
||||
m_type = _type;
|
||||
};
|
||||
inline const enum ewol::key::keyboard& getType(void) const {
|
||||
inline const enum ewol::key::keyboard& getType() const {
|
||||
return m_type;
|
||||
};
|
||||
void setStatus(enum ewol::key::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;
|
||||
};
|
||||
void setSpecialKey(const ewol::key::Special& _specialKey) {
|
||||
m_specialKey = _specialKey;
|
||||
};
|
||||
inline const ewol::key::Special& getSpecialKey(void) const {
|
||||
inline const ewol::key::Special& getSpecialKey() const {
|
||||
return m_specialKey;
|
||||
};
|
||||
void setChar(char32_t _char) {
|
||||
m_unicodeData = _char;
|
||||
};
|
||||
inline const char32_t& getChar(void) const {
|
||||
inline const char32_t& getChar() const {
|
||||
return m_unicodeData;
|
||||
};
|
||||
};
|
||||
|
@ -36,37 +36,37 @@ namespace ewol {
|
||||
void setType(enum ewol::key::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;
|
||||
};
|
||||
void setStatus(enum ewol::key::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;
|
||||
};
|
||||
void setId(uint8_t _id) {
|
||||
m_inputId = _id;
|
||||
};
|
||||
inline const uint8_t& getId(void) const {
|
||||
inline const uint8_t& getId() const {
|
||||
return m_inputId;
|
||||
};
|
||||
void setPos(const vec2& _pos) {
|
||||
m_pos = _pos;
|
||||
};
|
||||
inline const vec2& getPos(void) const {
|
||||
inline const vec2& getPos() const {
|
||||
return m_pos;
|
||||
};
|
||||
void setSpecialKey(const ewol::key::Special& _specialKey) {
|
||||
m_specialKey = _specialKey;
|
||||
};
|
||||
inline const ewol::key::Special& getSpecialKey(void) const {
|
||||
inline const ewol::key::Special& getSpecialKey() const {
|
||||
return m_specialKey;
|
||||
};
|
||||
/**
|
||||
* @brief Reset the input property of the curent event.
|
||||
*/
|
||||
void reset(void) const {
|
||||
void reset() const {
|
||||
// TODO : Call the entry element ant rest it ...
|
||||
}
|
||||
};
|
||||
@ -92,13 +92,13 @@ namespace ewol {
|
||||
void setDestWidget(ewol::Widget* _dest) {
|
||||
m_dest = _dest;
|
||||
};
|
||||
inline ewol::Widget* getDestWidget(void) const {
|
||||
inline ewol::Widget* getDestWidget() const {
|
||||
return m_dest;
|
||||
};
|
||||
void setRealId(int32_t _realIdEvent) {
|
||||
m_realIdEvent = _realIdEvent;
|
||||
};
|
||||
inline int32_t getRealId(void) const {
|
||||
inline int32_t getRealId() const {
|
||||
return m_realIdEvent;
|
||||
};
|
||||
};
|
||||
|
@ -34,28 +34,28 @@ namespace ewol {
|
||||
void setTime(int64_t _timeSystem) {
|
||||
m_timeSystem=_timeSystem;
|
||||
};
|
||||
inline int64_t getTime(void) const {
|
||||
inline int64_t getTime() const {
|
||||
return m_timeSystem;
|
||||
};
|
||||
void setApplWakeUpTime(int64_t _timeUpAppl) {
|
||||
m_timeUpAppl=_timeUpAppl;
|
||||
};
|
||||
inline int64_t getApplWakeUpTime(void) const {
|
||||
inline int64_t getApplWakeUpTime() const {
|
||||
return m_timeUpAppl;
|
||||
};
|
||||
inline int64_t getApplUpTime(void) const {
|
||||
inline int64_t getApplUpTime() const {
|
||||
return m_timeSystem-m_timeUpAppl;
|
||||
};
|
||||
void setDelta(float _timeDelta) {
|
||||
m_timeDelta=_timeDelta;
|
||||
};
|
||||
inline float getDelta(void) const {
|
||||
inline float getDelta() const {
|
||||
return m_timeDelta;
|
||||
};
|
||||
void setDeltaCall(float _timeDeltaCall) {
|
||||
m_timeDeltaCall=_timeDeltaCall;
|
||||
};
|
||||
inline float getDeltaCall(void) const {
|
||||
inline float getDeltaCall() const {
|
||||
return m_timeDeltaCall;
|
||||
};
|
||||
};
|
||||
|
@ -21,7 +21,7 @@
|
||||
#define EWOL_VERSION "0.0.0"
|
||||
#endif
|
||||
|
||||
std::string ewol::getCompilationMode(void) {
|
||||
std::string ewol::getCompilationMode() {
|
||||
#ifdef MODE_RELEASE
|
||||
return "Release";
|
||||
#else
|
||||
@ -29,7 +29,7 @@ std::string ewol::getCompilationMode(void) {
|
||||
#endif
|
||||
}
|
||||
|
||||
std::string ewol::getBoardType(void) {
|
||||
std::string ewol::getBoardType() {
|
||||
#ifdef __TARGET_OS__Linux
|
||||
return "Linux";
|
||||
#elif defined(__TARGET_OS__Android)
|
||||
@ -45,7 +45,7 @@ std::string ewol::getBoardType(void) {
|
||||
#endif
|
||||
}
|
||||
|
||||
std::string ewol::getVersion(void) {
|
||||
std::string ewol::getVersion() {
|
||||
return EWOL_VERSION;
|
||||
}
|
||||
|
||||
|
@ -29,23 +29,23 @@ namespace ewol {
|
||||
* @brief get EWOL version
|
||||
* @return The string that describe ewol version
|
||||
*/
|
||||
std::string getVersion(void);
|
||||
std::string getVersion();
|
||||
/**
|
||||
* @brief get current time in us...
|
||||
* @return The current time
|
||||
* @note is implemented by the OS implementation cf renderer/X11/...
|
||||
*/
|
||||
int64_t getTime(void);
|
||||
int64_t getTime();
|
||||
/**
|
||||
* @brief get compilation mode (release/debug)
|
||||
* @return the string of the mode of commpilation
|
||||
*/
|
||||
std::string getCompilationMode(void);
|
||||
std::string getCompilationMode();
|
||||
/**
|
||||
* @brief get the board type (Android/Linux/MacOs/...)
|
||||
* @return the string of the mode of commpilation
|
||||
*/
|
||||
std::string getBoardType(void);
|
||||
std::string getBoardType();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
// TODO : Update to support the Left and right of some key ...
|
||||
|
||||
ewol::key::Special::Special(void) :
|
||||
ewol::key::Special::Special() :
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
return true;
|
||||
}
|
||||
|
@ -24,12 +24,12 @@ namespace ewol {
|
||||
/**
|
||||
* @brief Main constructor
|
||||
*/
|
||||
Special(void);
|
||||
Special();
|
||||
/**
|
||||
* @brief get the current CapLock Status
|
||||
* @return The CapLock value
|
||||
*/
|
||||
bool getCapsLock(void) const;
|
||||
bool getCapsLock() const;
|
||||
/**
|
||||
* @brief set the current CapLock Status
|
||||
* @param[in] _value The new CapLock value
|
||||
@ -39,7 +39,7 @@ namespace ewol {
|
||||
* @brief Get the current Shift key status
|
||||
* @return The Shift value
|
||||
*/
|
||||
bool getShift(void) const;
|
||||
bool getShift() const;
|
||||
/**
|
||||
* @brief Set the current Shift key status
|
||||
* @param[in] _value The new Shift value
|
||||
@ -49,7 +49,7 @@ namespace ewol {
|
||||
* @brief Get the Current Control key status
|
||||
* @return The Control value
|
||||
*/
|
||||
bool getCtrl(void) const;
|
||||
bool getCtrl() const;
|
||||
/**
|
||||
* @brief Set the Current Control key status
|
||||
* @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)
|
||||
* @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)
|
||||
* @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
|
||||
* @return The Alt value
|
||||
*/
|
||||
bool getAlt(void) const;
|
||||
bool getAlt() const;
|
||||
/**
|
||||
* @brief Set the current Alt key status
|
||||
* @param[in] _value The new Alt value
|
||||
@ -79,7 +79,7 @@ namespace ewol {
|
||||
* @brief Get the current Alt-Gr key status
|
||||
* @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
|
||||
* @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
|
||||
* @return The Numerical Lock value
|
||||
*/
|
||||
bool getNumLock(void) const;
|
||||
bool getNumLock() const;
|
||||
/**
|
||||
* @brief Set the current Ver-num key status
|
||||
* @param[in] _value The new Numerical Lock value
|
||||
@ -99,7 +99,7 @@ namespace ewol {
|
||||
* @brief Get the current Intert key status
|
||||
* @return The Insert value
|
||||
*/
|
||||
bool getInsert(void) const;
|
||||
bool getInsert() const;
|
||||
/**
|
||||
* @brief Set the current Intert key status
|
||||
* @param[in] _value The new Insert value
|
||||
|
@ -27,13 +27,13 @@ namespace ewol {
|
||||
void setConfig(const char* _config) {
|
||||
m_config = _config;
|
||||
};
|
||||
inline const char* getConfig(void) const {
|
||||
inline const char* getConfig() const {
|
||||
return m_config;
|
||||
};
|
||||
void setData(const std::string& _data) {
|
||||
m_data = _data;
|
||||
};
|
||||
inline const std::string& getData(void) const {
|
||||
inline const std::string& getData() const {
|
||||
return m_data;
|
||||
};
|
||||
};
|
||||
|
@ -34,19 +34,19 @@ namespace ewol {
|
||||
m_default(_default) {
|
||||
|
||||
};
|
||||
inline const char* getConfig(void) const {
|
||||
inline const char* getConfig() const {
|
||||
return m_config;
|
||||
};
|
||||
inline const char* getType(void) const {
|
||||
inline const char* getType() const {
|
||||
return m_type;
|
||||
};
|
||||
inline const char* getControl(void) const {
|
||||
inline const char* getControl() const {
|
||||
return m_control;
|
||||
};
|
||||
inline const char* getDescription(void) const {
|
||||
inline const char* getDescription() const {
|
||||
return m_description;
|
||||
};
|
||||
inline const char* getDefault(void) const {
|
||||
inline const char* getDefault() const {
|
||||
return m_default;
|
||||
};
|
||||
};
|
||||
|
@ -14,14 +14,14 @@
|
||||
#undef __class__
|
||||
#define __class__ "ewol::object::Manager"
|
||||
|
||||
ewol::object::Manager::Manager(void) {
|
||||
ewol::object::Manager::Manager() {
|
||||
EWOL_DEBUG(" == > init Object-Manager");
|
||||
// Can create mlemory leak ... == > but not predictable comportement otherwise ...
|
||||
m_eObjectAutoRemoveList.clear();
|
||||
m_eObjectList.clear();
|
||||
}
|
||||
|
||||
ewol::object::Manager::~Manager(void) {
|
||||
ewol::object::Manager::~Manager() {
|
||||
bool hasError = false;
|
||||
if (m_eObjectAutoRemoveList.size()!=0) {
|
||||
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");
|
||||
removeAllAutoRemove();
|
||||
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();
|
||||
}
|
||||
|
||||
@ -176,7 +176,7 @@ void ewol::object::Manager::autoRemove(ewol::Object* _object) {
|
||||
}
|
||||
|
||||
// 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");
|
||||
while(0<m_eObjectAutoRemoveList.size()) {
|
||||
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_eObjectAutoRemoveList; // all widget allocated
|
||||
public:
|
||||
Manager(void);
|
||||
~Manager(void);
|
||||
Manager();
|
||||
~Manager();
|
||||
/**
|
||||
* @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 rm(ewol::Object* _object);
|
||||
int32_t getNumberObject(void);
|
||||
int32_t getNumberObject();
|
||||
|
||||
void autoRemove(ewol::Object* _object);
|
||||
void removeAllAutoRemove(void);
|
||||
void removeAllAutoRemove();
|
||||
|
||||
ewol::Object* get(const std::string& _name);
|
||||
private:
|
||||
@ -40,7 +40,7 @@ namespace ewol {
|
||||
private:
|
||||
ewol::object::MultiCast m_multiCast; //!< muticast manager
|
||||
public:
|
||||
ewol::object::MultiCast& multiCast(void) {
|
||||
ewol::object::MultiCast& multiCast() {
|
||||
return m_multiCast;
|
||||
};
|
||||
};
|
||||
|
@ -30,19 +30,19 @@ namespace ewol {
|
||||
void setCaller(ewol::Object* _caller) {
|
||||
m_callerObject = _caller;
|
||||
};
|
||||
inline ewol::Object* getCaller(void) const {
|
||||
inline ewol::Object* getCaller() const {
|
||||
return m_callerObject;
|
||||
};
|
||||
void setMessage(const char* _message) {
|
||||
m_event = _message;
|
||||
};
|
||||
inline const char* getMessage(void) const {
|
||||
inline const char* getMessage() const {
|
||||
return m_event;
|
||||
};
|
||||
void setData(const std::string& _data) {
|
||||
m_data = _data;
|
||||
};
|
||||
inline const std::string& getData(void) const {
|
||||
inline const std::string& getData() const {
|
||||
return m_data;
|
||||
};
|
||||
};
|
||||
|
@ -13,12 +13,12 @@
|
||||
#undef __class__
|
||||
#define __class__ "object::MultiCast"
|
||||
|
||||
ewol::object::MultiCast::MultiCast(void) {
|
||||
ewol::object::MultiCast::MultiCast() {
|
||||
EWOL_INFO("EObject message Multi-Cast");
|
||||
}
|
||||
|
||||
|
||||
ewol::object::MultiCast::~MultiCast(void) {
|
||||
ewol::object::MultiCast::~MultiCast() {
|
||||
EWOL_INFO("EObject message Multi-Cast");
|
||||
m_messageList.clear();
|
||||
}
|
||||
|
@ -31,8 +31,8 @@ namespace ewol {
|
||||
};
|
||||
std::vector<MessageList> m_messageList; //!< List of all message ...
|
||||
public:
|
||||
MultiCast(void);
|
||||
~MultiCast(void);
|
||||
MultiCast();
|
||||
~MultiCast();
|
||||
void anonymousSend(const char* const _messageId, const std::string& _data) {
|
||||
send(NULL, _messageId, _data);
|
||||
};
|
||||
|
@ -19,7 +19,7 @@
|
||||
const char* const ewol::Object::configName = "name";
|
||||
size_t ewol::Object::m_valUID = 0;
|
||||
|
||||
ewol::Object::Object(void) :
|
||||
ewol::Object::Object() :
|
||||
m_static(false),
|
||||
m_isResource(false) {
|
||||
// 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");
|
||||
}
|
||||
|
||||
ewol::Object::~Object(void) {
|
||||
ewol::Object::~Object() {
|
||||
EWOL_DEBUG("delete Object : [" << m_uniqueId << "] : " << getTypeDescription());
|
||||
getObjectManager().rm(this);
|
||||
getMultiCast().rm(this);
|
||||
@ -54,7 +54,7 @@ ewol::Object::~Object(void) {
|
||||
m_uniqueId = -1;
|
||||
}
|
||||
|
||||
const char * const ewol::Object::getObjectType(void) {
|
||||
const char * const ewol::Object::getObjectType() {
|
||||
if (m_listType.size() == 0) {
|
||||
return "ewol::Object";
|
||||
}
|
||||
@ -68,7 +68,7 @@ void ewol::Object::addObjectType(const char* _type) {
|
||||
}
|
||||
m_listType.push_back(_type);
|
||||
}
|
||||
std::string ewol::Object::getTypeDescription(void) {
|
||||
std::string ewol::Object::getTypeDescription() {
|
||||
std::string ret("ewol::Object");
|
||||
for(auto element : m_listType) {
|
||||
ret += "|";
|
||||
@ -89,11 +89,11 @@ bool ewol::Object::isTypeCompatible(const std::string& _type) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void ewol::Object::autoDestroy(void) {
|
||||
void ewol::Object::autoDestroy() {
|
||||
getObjectManager().autoRemove(this);
|
||||
}
|
||||
|
||||
void ewol::Object::removeObject(void) {
|
||||
void ewol::Object::removeObject() {
|
||||
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 res="";
|
||||
if (NULL != _config) {
|
||||
(void)onGetConfig(_config, res);
|
||||
onGetConfig(_config, res);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
@ -385,14 +385,14 @@ bool ewol::Object::setConfigNamed(const std::string& _objectName, const std::str
|
||||
return object->setConfig(_config, _value);
|
||||
}
|
||||
|
||||
ewol::object::Manager& ewol::Object::getObjectManager(void) {
|
||||
ewol::object::Manager& ewol::Object::getObjectManager() {
|
||||
return ewol::getContext().getEObjectManager();
|
||||
}
|
||||
|
||||
ewol::object::MultiCast& ewol::Object::getMultiCast(void) {
|
||||
ewol::object::MultiCast& ewol::Object::getMultiCast() {
|
||||
return ewol::getContext().getEObjectManager().multiCast();
|
||||
}
|
||||
|
||||
ewol::Context& ewol::Object::getContext(void) {
|
||||
ewol::Context& ewol::Object::getContext() {
|
||||
return ewol::getContext();
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ namespace ewol {
|
||||
/**
|
||||
* @brief Constructor.
|
||||
*/
|
||||
Object(void);
|
||||
Object();
|
||||
/**
|
||||
* @brief Constructor.
|
||||
* @param[in] _name Name of the Object.
|
||||
@ -65,17 +65,17 @@ namespace ewol {
|
||||
/**
|
||||
* @brief Destructor
|
||||
*/
|
||||
virtual ~Object(void);
|
||||
virtual ~Object();
|
||||
protected:
|
||||
/**
|
||||
* @brief Auto-destroy the object
|
||||
*/
|
||||
void autoDestroy(void);
|
||||
void autoDestroy();
|
||||
public:
|
||||
/**
|
||||
* @brief Asynchronous removing the object
|
||||
*/
|
||||
void removeObject(void);
|
||||
void removeObject();
|
||||
private:
|
||||
std::vector<const char*> m_listType;
|
||||
public:
|
||||
@ -83,12 +83,12 @@ namespace ewol {
|
||||
* @brief get the current Object type of the Object
|
||||
* @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.
|
||||
* @return descriptive string.
|
||||
*/
|
||||
std::string getTypeDescription(void);
|
||||
std::string getTypeDescription();
|
||||
/**
|
||||
* @brief check if the element herited from a specific type
|
||||
* @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
|
||||
* @return true if it might not be removed == > usefull for conficuration class
|
||||
*/
|
||||
bool getStatic(void){
|
||||
bool getStatic(){
|
||||
return m_static;
|
||||
};
|
||||
private:
|
||||
@ -118,7 +118,7 @@ namespace ewol {
|
||||
* @brief get the UniqueId of the Object
|
||||
* @return the requested ID
|
||||
*/
|
||||
int32_t getId(void){
|
||||
int32_t getId(){
|
||||
return m_uniqueId;
|
||||
};
|
||||
private:
|
||||
@ -213,7 +213,7 @@ namespace ewol {
|
||||
* @brief get all the configuration list
|
||||
* @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;
|
||||
};
|
||||
/**
|
||||
@ -242,7 +242,7 @@ namespace ewol {
|
||||
* @brief get the Object name
|
||||
* @return The requested name
|
||||
*/
|
||||
const std::string& getName(void) const {
|
||||
const std::string& getName() const {
|
||||
return m_name;
|
||||
};
|
||||
/**
|
||||
@ -272,17 +272,17 @@ namespace ewol {
|
||||
* @breif get the current Object manager.
|
||||
* @return the requested object manager.
|
||||
*/
|
||||
ewol::object::Manager& getObjectManager(void);
|
||||
ewol::object::Manager& getObjectManager();
|
||||
/**
|
||||
* @breif get the current Object Message Multicast manager.
|
||||
* @return the requested object manager.
|
||||
*/
|
||||
ewol::object::MultiCast& getMultiCast(void);
|
||||
ewol::object::MultiCast& getMultiCast();
|
||||
/**
|
||||
* @brief get the curent the system inteface.
|
||||
* @return current reference on the instance.
|
||||
*/
|
||||
ewol::Context& getContext(void);
|
||||
ewol::Context& getContext();
|
||||
private:
|
||||
bool m_isResource; //!< enable this when you want to declare this element is auto-remove
|
||||
public:
|
||||
@ -298,7 +298,7 @@ namespace ewol {
|
||||
* @brief Get the resource status of the element.
|
||||
* @return the resource status.
|
||||
*/
|
||||
bool getStatusResource(void) {
|
||||
bool getStatusResource() {
|
||||
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.
|
||||
* @return the main inteface Mutex
|
||||
*/
|
||||
static etk::Mutex& mutexOpenGl(void) {
|
||||
static etk::Mutex& mutexOpenGl() {
|
||||
static etk::Mutex s_drawMutex;
|
||||
return s_drawMutex;
|
||||
}
|
||||
@ -29,7 +29,7 @@ static uint32_t l_textureflags = 0;
|
||||
static int32_t l_programId = 0;
|
||||
|
||||
|
||||
void ewol::openGL::lock(void) {
|
||||
void ewol::openGL::lock() {
|
||||
mutexOpenGl().lock();
|
||||
l_matrixList.clear();
|
||||
mat4 tmpMat;
|
||||
@ -41,7 +41,7 @@ void ewol::openGL::lock(void) {
|
||||
l_programId = -1;
|
||||
}
|
||||
|
||||
void ewol::openGL::unLock(void) {
|
||||
void ewol::openGL::unLock() {
|
||||
mutexOpenGl().unLock();
|
||||
}
|
||||
|
||||
@ -62,7 +62,7 @@ void ewol::openGL::setMatrix(const mat4& _newOne) {
|
||||
l_matrixList[l_matrixList.size()-1] = _newOne;
|
||||
}
|
||||
|
||||
void ewol::openGL::push(void) {
|
||||
void ewol::openGL::push() {
|
||||
if (l_matrixList.size() == 0) {
|
||||
EWOL_ERROR("set matrix list is not corect size in the stack : " << l_matrixList.size());
|
||||
mat4 tmp;
|
||||
@ -73,7 +73,7 @@ void ewol::openGL::push(void) {
|
||||
l_matrixList.push_back(tmp);
|
||||
}
|
||||
|
||||
void ewol::openGL::pop(void) {
|
||||
void ewol::openGL::pop() {
|
||||
if (l_matrixList.size() <= 1) {
|
||||
EWOL_ERROR("set matrix list is not corect size in the stack : " << l_matrixList.size());
|
||||
l_matrixList.clear();
|
||||
@ -86,7 +86,7 @@ void ewol::openGL::pop(void) {
|
||||
l_matrixCamera.identity();
|
||||
}
|
||||
|
||||
const mat4& ewol::openGL::getMatrix(void) {
|
||||
const mat4& ewol::openGL::getMatrix() {
|
||||
if (l_matrixList.size() == 0) {
|
||||
EWOL_ERROR("set matrix list is not corect size in the stack : " << l_matrixList.size());
|
||||
mat4 tmp;
|
||||
@ -95,7 +95,7 @@ const mat4& ewol::openGL::getMatrix(void) {
|
||||
return l_matrixList[l_matrixList.size()-1];
|
||||
}
|
||||
|
||||
const mat4& ewol::openGL::getCameraMatrix(void) {
|
||||
const mat4& ewol::openGL::getCameraMatrix() {
|
||||
return l_matrixCamera;
|
||||
}
|
||||
|
||||
@ -103,17 +103,17 @@ void ewol::openGL::setCameraMatrix(const mat4& _newOne) {
|
||||
l_matrixCamera = _newOne;
|
||||
}
|
||||
|
||||
void ewol::openGL::finish(void) {
|
||||
void ewol::openGL::finish() {
|
||||
l_programId = -1;
|
||||
l_textureflags = 0;
|
||||
}
|
||||
|
||||
void ewol::openGL::flush(void) {
|
||||
void ewol::openGL::flush() {
|
||||
l_programId = -1;
|
||||
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
|
||||
}
|
||||
|
||||
void ewol::openGL::updateAllFlags(void) {
|
||||
void ewol::openGL::updateAllFlags() {
|
||||
#ifdef DIRECT_MODE
|
||||
return;
|
||||
#endif
|
||||
|
@ -58,11 +58,11 @@ namespace ewol {
|
||||
/**
|
||||
* @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...
|
||||
*/
|
||||
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.
|
||||
* @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.
|
||||
*/
|
||||
void push(void);
|
||||
void push();
|
||||
/**
|
||||
* @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.
|
||||
* @return The requested matrix.
|
||||
*/
|
||||
const mat4& getMatrix(void);
|
||||
const mat4& getMatrix();
|
||||
/**
|
||||
* @brief get a reference on the current matrix camera destinate to opengl renderer.
|
||||
* @return The requested matrix.
|
||||
*/
|
||||
const mat4& getCameraMatrix(void);
|
||||
const mat4& getCameraMatrix();
|
||||
/**
|
||||
* @brief set a reference on the current camera to opengl renderer.
|
||||
* @param[in] _newOne The requested matrix.
|
||||
@ -100,15 +100,15 @@ namespace ewol {
|
||||
/**
|
||||
* @brief
|
||||
*/
|
||||
void finish(void);
|
||||
void finish();
|
||||
/**
|
||||
* @brief
|
||||
*/
|
||||
void flush(void);
|
||||
void flush();
|
||||
/**
|
||||
* @brief
|
||||
*/
|
||||
void swap(void);
|
||||
void swap();
|
||||
|
||||
enum openGlFlags {
|
||||
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 ...
|
||||
*/
|
||||
void updateAllFlags(void);
|
||||
void updateAllFlags();
|
||||
/**
|
||||
* @brief enable Texture on the system
|
||||
* @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
|
||||
m_list.clear();
|
||||
}
|
||||
|
||||
void ewol::resource::ColorFile::reload(void) {
|
||||
void ewol::resource::ColorFile::reload() {
|
||||
// remove all previous set of value :
|
||||
for (int32_t iii = 0; iii < m_list.size() ; ++iii) {
|
||||
m_list[iii] = m_errorColor;
|
||||
|
@ -33,7 +33,7 @@ namespace ewol {
|
||||
/**
|
||||
* @brief Simple Destructor of this class (nothing specific ...)
|
||||
*/
|
||||
virtual ~ColorFile(void);
|
||||
virtual ~ColorFile();
|
||||
public:
|
||||
/**
|
||||
* @brief Set the error color.
|
||||
@ -63,11 +63,11 @@ namespace ewol {
|
||||
* @brief Get All color name
|
||||
* @return list of all color existing
|
||||
*/
|
||||
std::vector<std::string> getColors(void) const {
|
||||
std::vector<std::string> getColors() const {
|
||||
return m_list.getKeys();
|
||||
}
|
||||
public: // herited function:
|
||||
void reload(void);
|
||||
void reload();
|
||||
public:
|
||||
/**
|
||||
* @brief keep the resource pointer.
|
||||
|
@ -14,7 +14,7 @@
|
||||
#define __class__ "resource::Colored3DObject"
|
||||
|
||||
|
||||
ewol::resource::Colored3DObject::Colored3DObject(void) :
|
||||
ewol::resource::Colored3DObject::Colored3DObject() :
|
||||
m_GLprogram(NULL) {
|
||||
addObjectType("ewol::Colored3DObject");
|
||||
// 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 :
|
||||
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");
|
||||
// need to crate a new one ...
|
||||
ewol::resource::Colored3DObject* object = new ewol::resource::Colored3DObject();
|
||||
|
@ -24,8 +24,8 @@ namespace ewol {
|
||||
int32_t m_GLMatrix;
|
||||
int32_t m_GLColor;
|
||||
protected:
|
||||
Colored3DObject(void);
|
||||
virtual ~Colored3DObject(void);
|
||||
Colored3DObject();
|
||||
virtual ~Colored3DObject();
|
||||
public:
|
||||
virtual void draw(std::vector<vec3>& _vertices,
|
||||
const etk::Color<float>& _color,
|
||||
@ -47,7 +47,7 @@ namespace ewol {
|
||||
* @note Never free this pointer by your own...
|
||||
* @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
|
||||
* @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
|
||||
for (size_t iii=0; iii<m_list.size(); iii++){
|
||||
if (NULL != m_list[iii]) {
|
||||
@ -38,7 +38,7 @@ ewol::resource::ConfigFile::~ConfigFile(void) {
|
||||
m_list.clear();
|
||||
}
|
||||
|
||||
void ewol::resource::ConfigFile::reload(void) {
|
||||
void ewol::resource::ConfigFile::reload() {
|
||||
// reset all parameters
|
||||
for (size_t iii=0; iii<m_list.size(); iii++){
|
||||
if (NULL != m_list[iii]) {
|
||||
|
@ -23,9 +23,9 @@ namespace ewol {
|
||||
etk::Hash<ejson::Value*> m_list;
|
||||
protected:
|
||||
ConfigFile(const std::string& _filename);
|
||||
virtual ~ConfigFile(void);
|
||||
virtual ~ConfigFile();
|
||||
public:
|
||||
void reload(void);
|
||||
void reload();
|
||||
|
||||
int32_t request(const std::string& _paramName);
|
||||
|
||||
|
@ -120,7 +120,7 @@ ewol::resource::DistanceFieldFont::DistanceFieldFont(const std::string& _fontNam
|
||||
//exportOnFile();
|
||||
}
|
||||
|
||||
ewol::resource::DistanceFieldFont::~DistanceFieldFont(void) {
|
||||
ewol::resource::DistanceFieldFont::~DistanceFieldFont() {
|
||||
ewol::resource::FontFreeType::release(m_font);
|
||||
}
|
||||
|
||||
@ -374,7 +374,7 @@ void ewol::resource::DistanceFieldFont::release(ewol::resource::DistanceFieldFon
|
||||
_object = NULL;
|
||||
}
|
||||
|
||||
void ewol::resource::DistanceFieldFont::exportOnFile(void) {
|
||||
void ewol::resource::DistanceFieldFont::exportOnFile() {
|
||||
EWOL_DEBUG("EXPORT: DistanceFieldFont : file : '" << m_fileName << ".json'");
|
||||
ejson::Document doc;
|
||||
ejson::Array* tmpList = new ejson::Array();
|
||||
@ -408,7 +408,7 @@ void ewol::resource::DistanceFieldFont::exportOnFile(void) {
|
||||
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'");
|
||||
// test file existance:
|
||||
etk::FSNode fileJSON(m_fileName + ".json");
|
||||
|
@ -32,7 +32,7 @@ namespace ewol {
|
||||
int32_t m_lastRawHeigh;
|
||||
protected:
|
||||
DistanceFieldFont(const std::string& _fontName);
|
||||
~DistanceFieldFont(void);
|
||||
~DistanceFieldFont();
|
||||
public:
|
||||
float getDisplayRatio(float _size);
|
||||
/**
|
||||
@ -89,15 +89,15 @@ namespace ewol {
|
||||
float m_borderSize; //!< number of pixel added on the border of a glyph
|
||||
vec2 m_textureBorderSize; //!< Transformed the border size in the texture dimention
|
||||
public:
|
||||
float getPixelBorderSize(void) {
|
||||
float getPixelBorderSize() {
|
||||
return m_borderSize;
|
||||
}
|
||||
const vec2& getTextureBorderSize(void) {
|
||||
const vec2& getTextureBorderSize() {
|
||||
return m_textureBorderSize;
|
||||
}
|
||||
public:
|
||||
void exportOnFile(void);
|
||||
bool importFromFile(void);
|
||||
void exportOnFile();
|
||||
bool importFromFile();
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -25,7 +25,7 @@
|
||||
static int32_t l_countLoaded=0;
|
||||
static FT_Library library;
|
||||
|
||||
void ewol::resource::freeTypeInit(void) {
|
||||
void ewol::resource::freeTypeInit() {
|
||||
EWOL_DEBUG(" == > init Font-Manager");
|
||||
l_countLoaded++;
|
||||
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");
|
||||
l_countLoaded--;
|
||||
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
|
||||
if (NULL != 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) {
|
||||
return;
|
||||
}
|
||||
|
@ -27,10 +27,10 @@ namespace ewol {
|
||||
int32_t m_FileSize;
|
||||
FT_Face m_fftFace;
|
||||
bool m_init;
|
||||
void display(void);
|
||||
void display();
|
||||
protected:
|
||||
FontFreeType(const std::string& _fontName);
|
||||
~FontFreeType(void);
|
||||
~FontFreeType();
|
||||
public:
|
||||
|
||||
bool getGlyphProperty(int32_t _fontSize,
|
||||
@ -67,8 +67,8 @@ namespace ewol {
|
||||
*/
|
||||
static void release(ewol::resource::FontBase*& _object);
|
||||
};
|
||||
void freeTypeInit(void);
|
||||
void freeTypeUnInit(void);
|
||||
void freeTypeInit();
|
||||
void freeTypeUnInit();
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -23,9 +23,9 @@ namespace ewol {
|
||||
private:
|
||||
TextureFile(const std::string& _genName);
|
||||
TextureFile(std::string _genName, const std::string& _fileName, const ivec2& _size);
|
||||
virtual ~TextureFile(void) { };
|
||||
virtual ~TextureFile() { };
|
||||
public:
|
||||
const vec2& getRealSize(void) {
|
||||
const vec2& getRealSize() {
|
||||
return m_realImageSize;
|
||||
};
|
||||
public:
|
||||
|
@ -24,7 +24,7 @@ namespace ewol {
|
||||
protected:
|
||||
ImageDF(const std::string& _genName);
|
||||
ImageDF(std::string _genName, const std::string& _fileName, const ivec2& _size);
|
||||
virtual ~ImageDF(void) { };
|
||||
virtual ~ImageDF() { };
|
||||
/**
|
||||
* @brief Generate distance field of this Image input.
|
||||
* @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);
|
||||
public:
|
||||
const vec2& getRealSize(void) {
|
||||
const vec2& getRealSize() {
|
||||
return m_realImageSize;
|
||||
};
|
||||
public:
|
||||
|
@ -16,12 +16,12 @@
|
||||
|
||||
|
||||
|
||||
ewol::resource::Manager::Manager(void) :
|
||||
ewol::resource::Manager::Manager() :
|
||||
m_contextHasBeenRemoved(true) {
|
||||
// nothing to do ...
|
||||
}
|
||||
|
||||
ewol::resource::Manager::~Manager(void) {
|
||||
ewol::resource::Manager::~Manager() {
|
||||
bool hasError = false;
|
||||
if (m_resourceListToUpdate.size()!=0) {
|
||||
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();
|
||||
m_resourceListToUpdate.clear();
|
||||
// remove all resources ...
|
||||
@ -52,7 +52,7 @@ void ewol::resource::Manager::unInit(void) {
|
||||
m_resourceList.clear();
|
||||
}
|
||||
|
||||
void ewol::resource::Manager::display(void) {
|
||||
void ewol::resource::Manager::display() {
|
||||
EWOL_INFO("Resources loaded : ");
|
||||
// remove all resources ...
|
||||
for (int64_t iii=m_resourceList.size()-1; iii >= 0; iii--) {
|
||||
@ -66,7 +66,7 @@ void ewol::resource::Manager::display(void) {
|
||||
EWOL_INFO("Resources ---");
|
||||
}
|
||||
|
||||
void ewol::resource::Manager::reLoadResources(void) {
|
||||
void ewol::resource::Manager::reLoadResources() {
|
||||
EWOL_INFO("------------- Resources re-loaded -------------");
|
||||
// remove all resources ...
|
||||
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
|
||||
void ewol::resource::Manager::updateContext(void) {
|
||||
void ewol::resource::Manager::updateContext() {
|
||||
if (true == m_contextHasBeenRemoved) {
|
||||
// need to update all ...
|
||||
m_contextHasBeenRemoved = false;
|
||||
@ -138,7 +138,7 @@ void ewol::resource::Manager::updateContext(void) {
|
||||
}
|
||||
|
||||
// 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++) {
|
||||
if (m_resourceList[iii] != NULL) {
|
||||
m_resourceList[iii]->removeContextToLate();
|
||||
|
@ -24,25 +24,25 @@ namespace ewol {
|
||||
/**
|
||||
* @brief initialize the internal variable
|
||||
*/
|
||||
Manager(void);
|
||||
Manager();
|
||||
/**
|
||||
* @brief Uninitiamize the resource manager, free all resources previously requested
|
||||
* @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)
|
||||
*/
|
||||
void unInit(void);
|
||||
void unInit();
|
||||
/**
|
||||
* @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.
|
||||
* @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 ...
|
||||
* @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 ....
|
||||
*/
|
||||
void updateContext(void);
|
||||
void updateContext();
|
||||
/**
|
||||
* @brief This is to inform the resources manager that we have no more openGl context ...
|
||||
*/
|
||||
void contextHasBeenDestroyed(void);
|
||||
void contextHasBeenDestroyed();
|
||||
public:
|
||||
// internal API to extent eResources in extern Soft
|
||||
ewol::Resource* localKeep(const std::string& _filename);
|
||||
|
@ -95,7 +95,7 @@ ewol::resource::Program::Program(const std::string& _filename) :
|
||||
updateContext();
|
||||
}
|
||||
|
||||
ewol::resource::Program::~Program(void) {
|
||||
ewol::resource::Program::~Program() {
|
||||
for (size_t iii=0; iii<m_shaderList.size(); iii++) {
|
||||
ewol::resource::Shader::release(m_shaderList[iii]);
|
||||
m_shaderList[iii] = 0;
|
||||
@ -158,7 +158,7 @@ int32_t ewol::resource::Program::getUniform(std::string _elementName) {
|
||||
return m_elementList.size()-1;
|
||||
}
|
||||
|
||||
void ewol::resource::Program::updateContext(void) {
|
||||
void ewol::resource::Program::updateContext() {
|
||||
if (true == m_exist) {
|
||||
// Do nothing == > too dangerous ...
|
||||
} 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) {
|
||||
glDeleteProgram(m_program);
|
||||
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_program = 0;
|
||||
}
|
||||
|
||||
void ewol::resource::Program::reload(void) {
|
||||
void ewol::resource::Program::reload() {
|
||||
/* TODO : ...
|
||||
etk::file file(m_name, etk::FILE_TYPE_DATA);
|
||||
if (false == file.Exist()) {
|
||||
@ -687,7 +687,7 @@ void ewol::resource::Program::uniform4iv(int32_t _idElem, int32_t _nbElement, co
|
||||
#endif
|
||||
|
||||
|
||||
void ewol::resource::Program::use(void) {
|
||||
void ewol::resource::Program::use() {
|
||||
#ifdef PROGRAM_DISPLAY_SPEED
|
||||
g_startTime = ewol::getTime();
|
||||
#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);
|
||||
if (0 == m_program) {
|
||||
return;
|
||||
|
@ -63,7 +63,7 @@ namespace ewol {
|
||||
/**
|
||||
* @brief Destructor, remove the current Program.
|
||||
*/
|
||||
virtual ~Program(void);
|
||||
virtual ~Program();
|
||||
public:
|
||||
/**
|
||||
* @brief User request an attribute on this program.
|
||||
@ -263,7 +263,7 @@ namespace ewol {
|
||||
/**
|
||||
* @brief Request the processing of this program
|
||||
*/
|
||||
void use(void);
|
||||
void use();
|
||||
/**
|
||||
* @brief set the testure Id on the specify uniform element.
|
||||
* @param[in] _idElem Id of the uniform that might be sended.
|
||||
@ -274,24 +274,24 @@ namespace ewol {
|
||||
/**
|
||||
* @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.
|
||||
*/
|
||||
void updateContext(void);
|
||||
void updateContext();
|
||||
/**
|
||||
* @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...
|
||||
*/
|
||||
void removeContextToLate(void);
|
||||
void removeContextToLate();
|
||||
/**
|
||||
* @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.
|
||||
*/
|
||||
void reload(void);
|
||||
void reload();
|
||||
public:
|
||||
/**
|
||||
* @brief keep the resource pointer.
|
||||
|
@ -14,22 +14,22 @@
|
||||
#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)");
|
||||
}
|
||||
|
||||
void ewol::Resource::removeContext(void) {
|
||||
void ewol::Resource::removeContext() {
|
||||
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)");
|
||||
}
|
||||
|
||||
void ewol::Resource::reload(void) {
|
||||
void ewol::Resource::reload() {
|
||||
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();
|
||||
}
|
@ -24,7 +24,7 @@ namespace ewol {
|
||||
// class resources is pure virtual
|
||||
class Resource : public ewol::Object {
|
||||
public:
|
||||
Resource(void) :
|
||||
Resource() :
|
||||
m_counter(1),
|
||||
m_resourceLevel(MAX_RESOURCE_LEVEL-1) {
|
||||
addObjectType("ewol::Resource");
|
||||
@ -37,33 +37,33 @@ namespace ewol {
|
||||
addObjectType("ewol::Resource");
|
||||
setStatusResource(true);
|
||||
};
|
||||
virtual ~Resource(void) {
|
||||
virtual ~Resource() {
|
||||
|
||||
};
|
||||
private:
|
||||
uint32_t m_counter; //!< number of time the element was loaded.
|
||||
public:
|
||||
void increment(void) {
|
||||
void increment() {
|
||||
m_counter++;
|
||||
};
|
||||
bool decrement(void) {
|
||||
bool decrement() {
|
||||
m_counter--;
|
||||
return (m_counter == 0)?true:false;
|
||||
};
|
||||
int32_t getCounter(void) {
|
||||
int32_t getCounter() {
|
||||
return m_counter;
|
||||
};
|
||||
protected:
|
||||
uint8_t m_resourceLevel; //!< Level of the resource ==> for updata priority [0..5] 0 must be update first.
|
||||
public:
|
||||
uint8_t getResourceLevel(void) {
|
||||
uint8_t getResourceLevel() {
|
||||
return m_resourceLevel;
|
||||
};
|
||||
virtual void updateContext(void);
|
||||
virtual void removeContext(void);
|
||||
virtual void removeContextToLate(void);
|
||||
virtual void reload(void);
|
||||
static ewol::resource::Manager& getManager(void);
|
||||
virtual void updateContext();
|
||||
virtual void removeContext();
|
||||
virtual void removeContextToLate();
|
||||
virtual void reload();
|
||||
static ewol::resource::Manager& getManager();
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -37,7 +37,7 @@ ewol::resource::Shader::Shader(const std::string& _filename) :
|
||||
reload();
|
||||
}
|
||||
|
||||
ewol::resource::Shader::~Shader(void) {
|
||||
ewol::resource::Shader::~Shader() {
|
||||
if (NULL != m_fileData) {
|
||||
delete [] m_fileData;
|
||||
m_fileData = NULL;
|
||||
@ -57,7 +57,7 @@ static void checkGlError(const char* _op) {
|
||||
#define LOG_OGL_INTERNAL_BUFFER_LEN (8192)
|
||||
static char l_bufferDisplayError[LOG_OGL_INTERNAL_BUFFER_LEN] = "";
|
||||
|
||||
void ewol::resource::Shader::updateContext(void) {
|
||||
void ewol::resource::Shader::updateContext() {
|
||||
if (true == m_exist) {
|
||||
// Do nothing == > too dangerous ...
|
||||
} 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) {
|
||||
glDeleteShader(m_shader);
|
||||
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_shader = 0;
|
||||
}
|
||||
|
||||
void ewol::resource::Shader::reload(void) {
|
||||
void ewol::resource::Shader::reload() {
|
||||
etk::FSNode file(m_name);
|
||||
if (false == file.exist()) {
|
||||
EWOL_ERROR("File does not Exist : '" << file << "' : '" << file.getFileSystemName() << "'");
|
||||
|
@ -34,39 +34,39 @@ namespace ewol {
|
||||
/**
|
||||
* @brief Destructor, remove the current Shader
|
||||
*/
|
||||
virtual ~Shader(void);
|
||||
virtual ~Shader();
|
||||
public:
|
||||
/**
|
||||
* @brief get the opengl reference id of this shader.
|
||||
* @return The opengl id.
|
||||
*/
|
||||
GLuint getGL_ID(void) {
|
||||
GLuint getGL_ID() {
|
||||
return m_shader;
|
||||
};
|
||||
/**
|
||||
* @brief get the opengl type of this shader.
|
||||
* @return The type of this loaded shader.
|
||||
*/
|
||||
GLenum getShaderType(void) {
|
||||
GLenum getShaderType() {
|
||||
return m_type;
|
||||
};
|
||||
/**
|
||||
* @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.
|
||||
*/
|
||||
void removeContext(void);
|
||||
void removeContext();
|
||||
/**
|
||||
* @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.
|
||||
* @note this is really usefull when we tested the new themes or shader developpements.
|
||||
*/
|
||||
void reload(void);
|
||||
void reload();
|
||||
public:
|
||||
/**
|
||||
* @brief keep the resource pointer.
|
||||
|
@ -41,18 +41,18 @@ ewol::resource::Texture::Texture(const std::string& _filename) :
|
||||
m_endPointSize.setValue(1.0,1.0);
|
||||
}
|
||||
|
||||
ewol::resource::Texture::Texture(void) {
|
||||
ewol::resource::Texture::Texture() {
|
||||
addObjectType("ewol::compositing::Texture");
|
||||
m_loaded = false;
|
||||
m_texId = 0;
|
||||
m_endPointSize.setValue(1.0,1.0);
|
||||
}
|
||||
|
||||
ewol::resource::Texture::~Texture(void) {
|
||||
ewol::resource::Texture::~Texture() {
|
||||
removeContext();
|
||||
}
|
||||
|
||||
void ewol::resource::Texture::updateContext(void) {
|
||||
void ewol::resource::Texture::updateContext() {
|
||||
if (false == m_loaded) {
|
||||
// Request a new texture at openGl :
|
||||
glGenTextures(1, &m_texId);
|
||||
@ -83,7 +83,7 @@ void ewol::resource::Texture::updateContext(void) {
|
||||
m_loaded = true;
|
||||
}
|
||||
|
||||
void ewol::resource::Texture::removeContext(void) {
|
||||
void ewol::resource::Texture::removeContext() {
|
||||
if (true == m_loaded) {
|
||||
// Request remove texture ...
|
||||
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_texId=0;
|
||||
}
|
||||
|
||||
void ewol::resource::Texture::flush(void) {
|
||||
void ewol::resource::Texture::flush() {
|
||||
// request to the manager to be call at the next update ...
|
||||
getManager().update(this);
|
||||
}
|
||||
@ -107,7 +107,7 @@ void ewol::resource::Texture::setImageSize(ivec2 _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 ....
|
||||
ewol::resource::Texture* object = new ewol::resource::Texture();
|
||||
if (NULL == object) {
|
||||
|
@ -29,41 +29,41 @@ namespace ewol {
|
||||
bool m_loaded;
|
||||
// Ewol internal API:
|
||||
public:
|
||||
void updateContext(void);
|
||||
void removeContext(void);
|
||||
void removeContextToLate(void);
|
||||
void updateContext();
|
||||
void removeContext();
|
||||
void removeContextToLate();
|
||||
// middleware interface:
|
||||
public:
|
||||
GLuint getId(void) const {
|
||||
GLuint getId() const {
|
||||
return m_texId;
|
||||
};
|
||||
const vec2& getUsableSize(void) const {
|
||||
const vec2& getUsableSize() const {
|
||||
return m_endPointSize;
|
||||
};
|
||||
const ivec2& getOpenGlSize(void) const {
|
||||
const ivec2& getOpenGlSize() const {
|
||||
return m_data.getSize();
|
||||
};
|
||||
// Public API:
|
||||
protected:
|
||||
Texture(const std::string& _filename);
|
||||
Texture(void);
|
||||
~Texture(void);
|
||||
Texture();
|
||||
~Texture();
|
||||
public:
|
||||
// you must set the size here, because it will be set in multiple of pow(2)
|
||||
void setImageSize(ivec2 newSize);
|
||||
// get the reference on this image to draw nomething on it ...
|
||||
inline egami::Image& get(void) {
|
||||
inline egami::Image& get() {
|
||||
return m_data;
|
||||
};
|
||||
// flush the data to send it at the openGl system
|
||||
void flush(void);
|
||||
void flush();
|
||||
public:
|
||||
/**
|
||||
* @brief keep the resource pointer.
|
||||
* @note Never free this pointer by your own...
|
||||
* @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
|
||||
* @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::resource::TexturedFont::~TexturedFont(void) {
|
||||
ewol::resource::TexturedFont::~TexturedFont() {
|
||||
for (int32_t iiiFontId=0; iiiFontId<4 ; iiiFontId++) {
|
||||
ewol::resource::FontFreeType::release(m_font[iiiFontId]);
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ namespace ewol {
|
||||
int32_t m_lastRawHeigh[4];
|
||||
protected:
|
||||
TexturedFont(const std::string& _fontName);
|
||||
~TexturedFont(void);
|
||||
~TexturedFont();
|
||||
public:
|
||||
/**
|
||||
* @brief get the display height of this font
|
||||
@ -60,7 +60,7 @@ namespace ewol {
|
||||
* @brief get the font height (user friendly)
|
||||
* @return Dimention of the font the user requested
|
||||
*/
|
||||
int32_t getFontSize(void) {
|
||||
int32_t getFontSize() {
|
||||
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