[DEV] merge dev
This commit is contained in:
commit
1a1dceb43a
45
README.md
45
README.md
@ -31,41 +31,20 @@ Dependency packages
|
||||
# on 64 bits processor for compatibility
|
||||
sudo apt-get install ia32-libs
|
||||
|
||||
Copyright (c)
|
||||
=============
|
||||
License (APACHE v2.0)
|
||||
=====================
|
||||
|
||||
2011, Edouard DUPIN
|
||||
Copyright ewol Edouard DUPIN
|
||||
|
||||
License (DSB)
|
||||
=============
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
Note : only for etk and EWOL
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
|
||||
3. The name of the author may not be used to endorse or promote
|
||||
products derived from this software without specific prior
|
||||
written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
|
||||
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
||||
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
|
2
build
2
build
@ -1 +1 @@
|
||||
Subproject commit 0ae540881a3ddaf8fe2fd3cfbb5131f3d22fe0fc
|
||||
Subproject commit 885a60f22ce3dfde99819d3471a86fdbd3836237
|
2
external/agg
vendored
2
external/agg
vendored
@ -1 +1 @@
|
||||
Subproject commit 04556d63d1bac4b9e6d3a569a56a2f6b6113736a
|
||||
Subproject commit f2a9ffcdb201285f6d449f573a8c58e130d09b0b
|
2
external/airtaudio
vendored
2
external/airtaudio
vendored
@ -1 +1 @@
|
||||
Subproject commit b0eb151df0802a1d63a5cb6b6812a4460ddd09a1
|
||||
Subproject commit e15bfbe18e883fe3170a49a03732ad5dfe389fa8
|
2
external/eaudiofx
vendored
2
external/eaudiofx
vendored
@ -1 +1 @@
|
||||
Subproject commit 361840c7f732f2446631c6619e9388bbd0852297
|
||||
Subproject commit 69e1259b273a429e871e5c2e994dea5bb45aa5cf
|
2
external/egami
vendored
2
external/egami
vendored
@ -1 +1 @@
|
||||
Subproject commit 34eac48f5114151bab137e9cb177513c7cf42d96
|
||||
Subproject commit 3698cdc92500d9e29d810fa2d7094999f4a3dfe3
|
2
external/ege
vendored
2
external/ege
vendored
@ -1 +1 @@
|
||||
Subproject commit 73455cc61be78fd2a76466fb8c6a1aaabe68bf61
|
||||
Subproject commit d22d7ade7310428a294cc8b057d9ab2563afc9b6
|
2
external/ejson
vendored
2
external/ejson
vendored
@ -1 +1 @@
|
||||
Subproject commit b10040303a4c1dc28ae0cd5d565965fffa90bd28
|
||||
Subproject commit f93e3bd9bcf1232c5b9120e6d07ddf8da3bbb890
|
2
external/enet
vendored
2
external/enet
vendored
@ -1 +1 @@
|
||||
Subproject commit dd76dbf0fd4ad1b16fb7c7ca360cf5c1ad1f41be
|
||||
Subproject commit 5a108ecdac60de39af102d9c158a87ab1c9ee6b2
|
2
external/esvg
vendored
2
external/esvg
vendored
@ -1 +1 @@
|
||||
Subproject commit a6c50c8f94cce5e14c9448a809fc9d1acc268c81
|
||||
Subproject commit 738ee25fb8016e9fd7a3d62ac28a85eb99b4f197
|
2
external/etk
vendored
2
external/etk
vendored
@ -1 +1 @@
|
||||
Subproject commit cfc4d435b433fba9414330815b29e26cfe82927d
|
||||
Subproject commit 2c6a1b8fc877f4f496bd6f6fdaae333d7d808a94
|
2
external/ewolsa
vendored
2
external/ewolsa
vendored
@ -1 +1 @@
|
||||
Subproject commit 9569402acee2fdbe6baf591a5db0fec940380f48
|
||||
Subproject commit 8d9aef8384ced7fc4a9b2761bf1966b4bdf5e231
|
2
external/exml
vendored
2
external/exml
vendored
@ -1 +1 @@
|
||||
Subproject commit 5b41f40739e920276b382254d7d768beaf8237e4
|
||||
Subproject commit d97fe2efa78ad3cca682c156a3ca2f036ce1e7bf
|
2
external/ogg
vendored
2
external/ogg
vendored
@ -1 +1 @@
|
||||
Subproject commit e05a06288ad9f91541a2c06729c00e764e89a568
|
||||
Subproject commit fd44b865a3f42dbcae7c08888f2228c0644e980f
|
41
license.txt
41
license.txt
@ -1,34 +1,13 @@
|
||||
Copyright (c) 2011, Edouard DUPIN
|
||||
All rights reserved.
|
||||
Copyright ewol Edouard DUPIN
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following
|
||||
disclaimer in the documentation and/or other materials provided
|
||||
with the distribution.
|
||||
|
||||
* Neither the name of the EWOL nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this
|
||||
software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
see : http://opensource.org/licenses/BSD-3-Clause
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
2
monk
2
monk
@ -1 +1 @@
|
||||
Subproject commit aff1fdf89a04b8a4594c2742f875614e56cf8a31
|
||||
Subproject commit eba3e4f97f618b607e0fc52794b2a72c7f6902e8
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
package org.ewol;
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
package org.ewol;
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
package org.ewol;
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
package org.ewol;
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
package org.ewol;
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
package org.ewol;
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
package org.ewol;
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#include <ewol/Dimension.h>
|
||||
@ -89,28 +89,28 @@ void ewol::Dimension::set(std::string _config) {
|
||||
m_data.setValue(0,0);
|
||||
m_type = ewol::Dimension::Pixel;
|
||||
enum distance type = ewol::Dimension::Pixel;
|
||||
if (end_with(_config, "%", false) == true) {
|
||||
if (etk::end_with(_config, "%", false) == true) {
|
||||
type = ewol::Dimension::Pourcent;
|
||||
_config.erase(_config.size()-1, 1);
|
||||
} else if (end_with(_config, "px",false) == true) {
|
||||
} else if (etk::end_with(_config, "px",false) == true) {
|
||||
type = ewol::Dimension::Pixel;
|
||||
_config.erase(_config.size()-2, 2);
|
||||
} else if (end_with(_config, "ft",false) == true) {
|
||||
} else if (etk::end_with(_config, "ft",false) == true) {
|
||||
type = ewol::Dimension::foot;
|
||||
_config.erase(_config.size()-2, 2);
|
||||
} else if (end_with(_config, "in",false) == true) {
|
||||
} else if (etk::end_with(_config, "in",false) == true) {
|
||||
type = ewol::Dimension::Inch;
|
||||
_config.erase(_config.size()-2, 2);
|
||||
} else if (end_with(_config, "km",false) == true) {
|
||||
} else if (etk::end_with(_config, "km",false) == true) {
|
||||
type = ewol::Dimension::Kilometer;
|
||||
_config.erase(_config.size()-2, 2);
|
||||
} else if (end_with(_config, "mm",false) == true) {
|
||||
} else if (etk::end_with(_config, "mm",false) == true) {
|
||||
type = ewol::Dimension::Millimeter;
|
||||
_config.erase(_config.size()-2, 2);
|
||||
} else if (end_with(_config, "cm",false) == true) {
|
||||
} else if (etk::end_with(_config, "cm",false) == true) {
|
||||
type = ewol::Dimension::Centimeter;
|
||||
_config.erase(_config.size()-2, 2);
|
||||
} else if (end_with(_config, "m",false) == true) {
|
||||
} else if (etk::end_with(_config, "m",false) == true) {
|
||||
type = ewol::Dimension::Meter;
|
||||
_config.erase(_config.size()-1, 1);
|
||||
} else {
|
||||
@ -183,12 +183,12 @@ vec2 ewol::Dimension::get(enum ewol::Dimension::distance _type) const {
|
||||
|
||||
void ewol::Dimension::set(const vec2& _size, enum ewol::Dimension::distance _type) {
|
||||
// set min max on input to limit error :
|
||||
vec2 size(etk_avg(0.0f,_size.x(),9999999.0f),
|
||||
etk_avg(0.0f,_size.y(),9999999.0f));
|
||||
vec2 size(std::avg(0.0f,_size.x(),9999999.0f),
|
||||
std::avg(0.0f,_size.y(),9999999.0f));
|
||||
switch(_type) {
|
||||
case ewol::Dimension::Pourcent: {
|
||||
vec2 size2(etk_avg(0.0f,_size.x(),100.0f),
|
||||
etk_avg(0.0f,_size.y(),100.0f));
|
||||
vec2 size2(std::avg(0.0f,_size.x(),100.0f),
|
||||
std::avg(0.0f,_size.y(),100.0f));
|
||||
m_data = vec2(size2.x()*0.01f, size2.y()*0.01f);
|
||||
//EWOL_VERBOSE("Set % : " << size2 << " == > " << m_data);
|
||||
break;
|
||||
@ -298,3 +298,20 @@ std::ostream& ewol::operator <<(std::ostream& _os, const ewol::Dimension& _obj)
|
||||
_os << _obj.get(_obj.getType()) << _obj.getType();
|
||||
return _os;
|
||||
}
|
||||
|
||||
|
||||
template<> std::string etk::to_string<ewol::Dimension>(const ewol::Dimension& _obj) {
|
||||
return _obj;
|
||||
}
|
||||
template<> std::u32string etk::to_u32string<ewol::Dimension>(const ewol::Dimension& _obj) {
|
||||
return etk::to_u32string(etk::to_string(_obj));
|
||||
}
|
||||
|
||||
|
||||
template<> bool etk::from_string<ewol::Dimension>(ewol::Dimension& _variableRet, const std::string& _value) {
|
||||
_variableRet = ewol::Dimension(_value);
|
||||
return true;
|
||||
}
|
||||
template<> bool etk::from_string<ewol::Dimension>(ewol::Dimension& _variableRet, const std::u32string& _value) {
|
||||
return from_string(_variableRet, etk::to_string(_value));
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#ifndef __EWOL_DIMENSION_H__
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD 3 clauses (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#include <ewol/Padding.h>
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD 3 clauses (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#ifndef __EWOL_PADDING_H__
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#include <ewol/debug.h>
|
||||
@ -22,7 +22,7 @@ ewol::compositing::Area::Area(const ivec2& _size) :
|
||||
m_GLtexture(-1),
|
||||
m_GLtexID(-1),
|
||||
m_resource(nullptr) {
|
||||
m_resource = ewol::resource::Texture::keep();
|
||||
m_resource = ewol::resource::Texture::create();
|
||||
m_resource->setImageSize(_size);
|
||||
m_resource->flush();
|
||||
loadProgram();
|
||||
@ -35,7 +35,7 @@ ewol::compositing::Area::~Area() {
|
||||
void ewol::compositing::Area::loadProgram() {
|
||||
// get the shader resource :
|
||||
m_GLPosition = 0;
|
||||
m_GLprogram = ewol::resource::Program::keep("DATA:textured3D.prog");
|
||||
m_GLprogram = ewol::resource::Program::create(std::string("DATA:textured3D.prog"));
|
||||
if (nullptr != m_GLprogram) {
|
||||
m_GLPosition = m_GLprogram->getAttribute("EW_coord3d");
|
||||
m_GLColor = m_GLprogram->getAttribute("EW_color");
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#ifndef __EWOL_COMPOSITING_AREA_H__
|
||||
@ -22,14 +22,14 @@ namespace ewol {
|
||||
vec3 m_position; //!< The current position to draw
|
||||
etk::Color<> m_color; //!< The text foreground color
|
||||
private:
|
||||
ewol::object::Shared<ewol::resource::Program> m_GLprogram; //!< pointer on the opengl display program
|
||||
std::shared_ptr<ewol::resource::Program> m_GLprogram; //!< pointer on the opengl display program
|
||||
int32_t m_GLPosition; //!< openGL id on the element (vertex buffer)
|
||||
int32_t m_GLMatrix; //!< openGL id on the element (transformation matrix)
|
||||
int32_t m_GLColor; //!< openGL id on the element (color buffer)
|
||||
int32_t m_GLtexture; //!< openGL id on the element (Texture position)
|
||||
int32_t m_GLtexID; //!< openGL id on the element (texture ID)
|
||||
private:
|
||||
ewol::object::Shared<ewol::resource::Texture> m_resource; //!< texture resources
|
||||
std::shared_ptr<ewol::resource::Texture> m_resource; //!< texture resources
|
||||
std::vector<vec3 > m_coord; //!< internal coord of the object
|
||||
std::vector<vec2 > m_coordTex; //!< internal texture coordinate for every point
|
||||
std::vector<etk::Color<float> > m_coordColor; //!< internal color of the different point
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#include <etk/types.h>
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#ifndef __EWOL_COMPOSITING_H__
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#include <ewol/debug.h>
|
||||
@ -284,7 +284,7 @@ void ewol::compositing::Drawing::loadProgram() {
|
||||
// remove previous loading ... in case
|
||||
unLoadProgram();
|
||||
// oad the new ...
|
||||
m_GLprogram = ewol::resource::Program::keep("DATA:color3.prog");
|
||||
m_GLprogram = ewol::resource::Program::create("DATA:color3.prog");
|
||||
// get the shader resource :
|
||||
if (nullptr != m_GLprogram ) {
|
||||
m_GLPosition = m_GLprogram->getAttribute("EW_coord3d");
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#ifndef __EWOL_COMPOSITING_DRAWING_H__
|
||||
@ -28,7 +28,7 @@ namespace ewol {
|
||||
etk::Color<> m_color; //!< The text foreground color
|
||||
etk::Color<> m_colorBg; //!< The text background color
|
||||
private:
|
||||
ewol::object::Shared<ewol::resource::Program> m_GLprogram; //!< pointer on the opengl display program
|
||||
std::shared_ptr<ewol::resource::Program> m_GLprogram; //!< pointer on the opengl display program
|
||||
int32_t m_GLPosition; //!< openGL id on the element (vertex buffer)
|
||||
int32_t m_GLMatrix; //!< openGL id on the element (transformation matrix)
|
||||
int32_t m_GLColor; //!< openGL id on the element (color buffer)
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#include <ewol/debug.h>
|
||||
@ -43,9 +43,9 @@ void ewol::compositing::Image::loadProgram() {
|
||||
m_GLPosition = 0;
|
||||
m_GLprogram.reset();
|
||||
if (m_distanceFieldMode == true) {
|
||||
m_GLprogram = ewol::resource::Program::keep("DATA:texturedDF.prog");
|
||||
m_GLprogram = ewol::resource::Program::create("DATA:texturedDF.prog");
|
||||
} else {
|
||||
m_GLprogram = ewol::resource::Program::keep("DATA:textured3D.prog");
|
||||
m_GLprogram = ewol::resource::Program::create("DATA:textured3D.prog");
|
||||
}
|
||||
if (m_GLprogram != nullptr) {
|
||||
m_GLPosition = m_GLprogram->getAttribute("EW_coord3d");
|
||||
@ -247,8 +247,8 @@ void ewol::compositing::Image::printPart(const vec2& _size,
|
||||
|
||||
void ewol::compositing::Image::setSource(const std::string& _newFile, const vec2& _size) {
|
||||
clear();
|
||||
ewol::object::Shared<ewol::resource::TextureFile> resource(m_resource);
|
||||
ewol::object::Shared<ewol::resource::ImageDF> resourceDF(m_resourceDF);
|
||||
std::shared_ptr<ewol::resource::TextureFile> resource(m_resource);
|
||||
std::shared_ptr<ewol::resource::ImageDF> resourceDF(m_resourceDF);
|
||||
m_filename = _newFile;
|
||||
m_requestSize = _size;
|
||||
m_resource.reset();
|
||||
@ -258,12 +258,12 @@ void ewol::compositing::Image::setSource(const std::string& _newFile, const vec2
|
||||
if (_newFile != "") {
|
||||
// link to new one
|
||||
if (m_distanceFieldMode == false) {
|
||||
m_resource = ewol::resource::TextureFile::keep(m_filename, tmpSize);
|
||||
m_resource = ewol::resource::TextureFile::create(m_filename, tmpSize);
|
||||
if (m_resource == nullptr) {
|
||||
EWOL_ERROR("Can not get Image resource");
|
||||
}
|
||||
} else {
|
||||
m_resourceDF = ewol::resource::ImageDF::keep(m_filename, tmpSize);
|
||||
m_resourceDF = ewol::resource::ImageDF::create(m_filename, tmpSize);
|
||||
if (m_resourceDF == nullptr) {
|
||||
EWOL_ERROR("Can not get Image resource DF");
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#ifndef __EWOL_COMPOSITING_IMAGE_H__
|
||||
@ -29,7 +29,7 @@ namespace ewol {
|
||||
etk::Color<> m_color; //!< The text foreground color
|
||||
float m_angle; //!< Angle to set at the axes
|
||||
private:
|
||||
ewol::object::Shared<ewol::resource::Program> m_GLprogram; //!< pointer on the opengl display program
|
||||
std::shared_ptr<ewol::resource::Program> m_GLprogram; //!< pointer on the opengl display program
|
||||
int32_t m_GLPosition; //!< openGL id on the element (vertex buffer)
|
||||
int32_t m_GLMatrix; //!< openGL id on the element (transformation matrix)
|
||||
int32_t m_GLColor; //!< openGL id on the element (color buffer)
|
||||
@ -37,8 +37,8 @@ namespace ewol {
|
||||
int32_t m_GLtexID; //!< openGL id on the element (texture ID)
|
||||
private:
|
||||
bool m_distanceFieldMode; //!< select distance field mode
|
||||
ewol::object::Shared<ewol::resource::TextureFile> m_resource; //!< texture resources
|
||||
ewol::object::Shared<ewol::resource::ImageDF> m_resourceDF; //!< texture resources
|
||||
std::shared_ptr<ewol::resource::TextureFile> m_resource; //!< texture resources
|
||||
std::shared_ptr<ewol::resource::ImageDF> m_resourceDF; //!< texture resources
|
||||
std::vector<vec3 > m_coord; //!< internal coord of the object
|
||||
std::vector<vec2 > m_coordTex; //!< internal texture coordinate for every point
|
||||
std::vector<etk::Color<float> > m_coordColor; //!< internal color of the different point
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#include <etk/os/FSNode.h>
|
||||
@ -84,7 +84,7 @@ void ewol::compositing::Shaper::loadProgram() {
|
||||
EWOL_DEBUG("no Shaper set for loading resources ...");
|
||||
return;
|
||||
}
|
||||
m_config = ewol::resource::ConfigFile::keep(m_name);
|
||||
m_config = ewol::resource::ConfigFile::create(m_name);
|
||||
if (nullptr != m_config) {
|
||||
m_confIdMode = m_config->request("mode");
|
||||
m_confIdDisplayOutside = m_config->request("display-outside");
|
||||
@ -118,7 +118,7 @@ void ewol::compositing::Shaper::loadProgram() {
|
||||
}
|
||||
// get the shader resource :
|
||||
m_GLPosition = 0;
|
||||
m_GLprogram = ewol::resource::Program::keep(tmpFilename);
|
||||
m_GLprogram = ewol::resource::Program::create(tmpFilename);
|
||||
if (m_GLprogram != nullptr) {
|
||||
m_GLPosition = m_GLprogram->getAttribute("EW_coord2d");
|
||||
m_GLMatrix = m_GLprogram->getUniform("EW_MatrixTransformation");
|
||||
@ -144,7 +144,7 @@ void ewol::compositing::Shaper::loadProgram() {
|
||||
EWOL_DEBUG("Shaper try load shaper image : '" << tmpFilename << "'");
|
||||
}
|
||||
ivec2 size(64,64);
|
||||
m_resourceTexture = ewol::resource::TextureFile::keep(tmpFilename, size);
|
||||
m_resourceTexture = ewol::resource::TextureFile::create(tmpFilename, size);
|
||||
}
|
||||
}
|
||||
std::string basicColorFile = m_config->getString(m_confColorFile);
|
||||
@ -158,7 +158,7 @@ void ewol::compositing::Shaper::loadProgram() {
|
||||
} else {
|
||||
EWOL_DEBUG("Shaper try load colorFile : '" << tmpFilename << "'");
|
||||
}
|
||||
m_colorProperty = ewol::resource::ColorFile::keep(tmpFilename);
|
||||
m_colorProperty = ewol::resource::ColorFile::create(tmpFilename);
|
||||
if ( m_GLprogram != nullptr
|
||||
&& m_colorProperty != nullptr) {
|
||||
std::vector<std::string> listColor = m_colorProperty->getColors();
|
||||
@ -260,7 +260,7 @@ bool ewol::compositing::Shaper::periodicCall(const ewol::event::Time& _event) {
|
||||
float timeRelativity = m_config->getNumber(m_confIdChangeTime) / 1000.0;
|
||||
m_stateTransition += _event.getDeltaCall() / timeRelativity;
|
||||
//m_stateTransition += _event.getDeltaCall();
|
||||
m_stateTransition = etk_avg(0.0f, m_stateTransition, 1.0f);
|
||||
m_stateTransition = std::avg(0.0f, m_stateTransition, 1.0f);
|
||||
//EWOL_DEBUG("relative=" << timeRelativity << " Transition : " << m_stateTransition);
|
||||
}
|
||||
return true;
|
||||
@ -459,10 +459,10 @@ void ewol::compositing::Shaper::setShape(const vec2& _origin, const vec2& _size,
|
||||
border.yTop() - borderTmp.yTop(),
|
||||
border.xRight() - borderTmp.xRight(),
|
||||
border.yButtom() + borderTmp.yButtom());
|
||||
ewol::Padding inside(insideBorder.xLeft() + etk_max(0.0f, paddingIn.xLeft()),
|
||||
insideBorder.yTop() - etk_max(0.0f, paddingIn.yTop()),
|
||||
insideBorder.xRight() - etk_max(0.0f, paddingIn.xRight()),
|
||||
insideBorder.yButtom() + etk_max(0.0f, paddingIn.yButtom()));
|
||||
ewol::Padding inside(insideBorder.xLeft() + std::max(0.0f, paddingIn.xLeft()),
|
||||
insideBorder.yTop() - std::max(0.0f, paddingIn.yTop()),
|
||||
insideBorder.xRight() - std::max(0.0f, paddingIn.xRight()),
|
||||
insideBorder.yButtom() + std::max(0.0f, paddingIn.yButtom()));
|
||||
|
||||
#endif
|
||||
/*
|
||||
@ -622,3 +622,21 @@ const etk::Color<float>& ewol::compositing::Shaper::getColor(int32_t _id) {
|
||||
}
|
||||
return m_colorProperty->get(_id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
template<> std::string etk::to_string<ewol::compositing::Shaper>(const ewol::compositing::Shaper& _obj) {
|
||||
return _obj.getSource();
|
||||
}
|
||||
|
||||
template<> std::u32string etk::to_u32string<ewol::compositing::Shaper>(const ewol::compositing::Shaper& _obj) {
|
||||
return etk::to_u32string(etk::to_string(_obj));
|
||||
}
|
||||
|
||||
template<> bool etk::from_string<ewol::compositing::Shaper>(ewol::compositing::Shaper& _variableRet, const std::string& _value) {
|
||||
_variableRet.setSource(_value);
|
||||
return true;
|
||||
}
|
||||
template<> bool etk::from_string<ewol::compositing::Shaper>(ewol::compositing::Shaper& _variableRet, const std::u32string& _value) {
|
||||
return from_string(_variableRet, etk::to_string(_value));
|
||||
}
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#ifndef __EWOL_COMPOSITING_SHAPER_H__
|
||||
@ -44,7 +44,7 @@ namespace ewol {
|
||||
private:
|
||||
std::string m_name; //!< Name of the configuration of the shaper.
|
||||
// External theme config:
|
||||
ewol::object::Shared<ewol::resource::ConfigFile> m_config; //!< pointer on the config file resources
|
||||
std::shared_ptr<ewol::resource::ConfigFile> m_config; //!< pointer on the config file resources
|
||||
int32_t m_confIdDisplayExternal; //!< Display external border
|
||||
int32_t m_confIdPaddingOut[shaperPosCount]; //!< Padding out property : X-left X-right Y-top Y-buttom
|
||||
int32_t m_confIdBorder[shaperPosCount]; //!< border property : X-left X-right Y-top Y-buttom
|
||||
@ -56,7 +56,7 @@ namespace ewol {
|
||||
int32_t m_confColorFile; //!< ConfigFile opengGl color file Name
|
||||
int32_t m_confImageFile; //!< ConfigFile opengGl program Name
|
||||
// openGL shaders programs:
|
||||
ewol::object::Shared<ewol::resource::Program> m_GLprogram; //!< pointer on the opengl display program
|
||||
std::shared_ptr<ewol::resource::Program> m_GLprogram; //!< pointer on the opengl display program
|
||||
int32_t m_GLPosition; //!< openGL id on the element (vertex buffer)
|
||||
int32_t m_GLMatrix; //!< openGL id on the element (transformation matrix)
|
||||
int32_t m_GLPropertyPos; //!< openGL id on the element (simple ratio position in the widget : ____/-----\_____ on vec2(X,Y))
|
||||
@ -66,7 +66,7 @@ namespace ewol {
|
||||
int32_t m_GLStateTransition; //!< openGL id on the element (transition ofset [0.0..1.0] )
|
||||
int32_t m_GLtexID; //!< openGL id on the element (texture image)
|
||||
// For the Image :
|
||||
ewol::object::Shared<ewol::resource::TextureFile> m_resourceTexture; //!< texture resources (for the image)
|
||||
std::shared_ptr<ewol::resource::TextureFile> m_resourceTexture; //!< texture resources (for the image)
|
||||
// internal needed data :
|
||||
int32_t m_nextStatusRequested; //!< when status is changing, this represent the next step of it
|
||||
vec2 m_propertyOrigin; //!< widget origin
|
||||
@ -81,7 +81,7 @@ namespace ewol {
|
||||
vec2 m_pos[SHAPER_NB_MAX_VERTEX]; //!< podition to display property
|
||||
int32_t m_nbVertexToDisplay;
|
||||
// color management theme:
|
||||
ewol::object::Shared<ewol::resource::ColorFile> m_colorProperty; //!< input resource for color management
|
||||
std::shared_ptr<ewol::resource::ColorFile> m_colorProperty; //!< input resource for color management
|
||||
std::vector<ivec2> m_listAssiciatedId; //!< Corellation ID between ColorProperty (Y) and OpenGL Program (X)
|
||||
private:
|
||||
/**
|
||||
@ -291,6 +291,16 @@ namespace ewol {
|
||||
float _yValButtom,
|
||||
const float* _table,
|
||||
bool _displayOutside);
|
||||
public:
|
||||
/* ****************************************************
|
||||
* == operator
|
||||
*****************************************************/
|
||||
bool operator== (const Shaper& _obj) const {
|
||||
return _obj.m_name == m_name;
|
||||
}
|
||||
bool operator!= (const Shaper& _obj) const {
|
||||
return _obj.m_name != m_name;
|
||||
}
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#include <ewol/debug.h>
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#ifndef __EWOL_COMPOSITING_SPRITE_H__
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#include <ewol/debug.h>
|
||||
@ -152,7 +152,7 @@ void ewol::compositing::Text::setFontName(const std::string& _fontName) {
|
||||
void ewol::compositing::Text::setFont(std::string _fontName, int32_t _fontSize) {
|
||||
clear();
|
||||
// remove old one
|
||||
ewol::object::Shared<ewol::resource::TexturedFont> previousFont = m_font;
|
||||
std::shared_ptr<ewol::resource::TexturedFont> previousFont = m_font;
|
||||
if (_fontSize <= 0) {
|
||||
_fontSize = ewol::getContext().getFontDefault().getSize();
|
||||
}
|
||||
@ -160,10 +160,10 @@ void ewol::compositing::Text::setFont(std::string _fontName, int32_t _fontSize)
|
||||
_fontName = ewol::getContext().getFontDefault().getName();
|
||||
}
|
||||
_fontName += ":";
|
||||
_fontName += std::to_string(_fontSize);
|
||||
_fontName += etk::to_string(_fontSize);
|
||||
EWOL_VERBOSE("plop : " << _fontName << " size=" << _fontSize << " result :" << _fontName);
|
||||
// link to new one
|
||||
m_font = ewol::resource::TexturedFont::keep(_fontName);
|
||||
m_font = ewol::resource::TexturedFont::create(_fontName);
|
||||
if (m_font == nullptr) {
|
||||
EWOL_ERROR("Can not get font resource");
|
||||
m_font = previousFont;
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#ifndef __EWOL_COMPOSITING_TEXT_H__
|
||||
@ -25,7 +25,7 @@ namespace ewol {
|
||||
namespace compositing {
|
||||
class Text : public ewol::compositing::TextBase {
|
||||
protected:
|
||||
ewol::object::Shared<ewol::resource::TexturedFont> m_font; //!< Font resources
|
||||
std::shared_ptr<ewol::resource::TexturedFont> m_font; //!< Font resources
|
||||
public:
|
||||
/**
|
||||
* @brief generic constructor
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#include <ewol/debug.h>
|
||||
@ -53,8 +53,8 @@ ewol::compositing::TextBase::~TextBase() {
|
||||
void ewol::compositing::TextBase::loadProgram(const std::string& _shaderName) {
|
||||
// get the shader resource :
|
||||
m_GLPosition = 0;
|
||||
ewol::object::Shared<ewol::resource::Program> old = m_GLprogram;
|
||||
m_GLprogram = ewol::resource::Program::keep(_shaderName);
|
||||
std::shared_ptr<ewol::resource::Program> old = m_GLprogram;
|
||||
m_GLprogram = ewol::resource::Program::create(_shaderName);
|
||||
if (m_GLprogram != nullptr) {
|
||||
m_GLPosition = m_GLprogram->getAttribute("EW_coord3d");
|
||||
m_GLColor = m_GLprogram->getAttribute("EW_color");
|
||||
@ -64,7 +64,7 @@ void ewol::compositing::TextBase::loadProgram(const std::string& _shaderName) {
|
||||
m_GLtextWidth = m_GLprogram->getUniform("EW_texWidth");
|
||||
m_GLtextHeight = m_GLprogram->getUniform("EW_texHeight");
|
||||
} else {
|
||||
EWOL_ERROR("Can not load the program => keep previous one...");
|
||||
EWOL_ERROR("Can not load the program => create previous one...");
|
||||
m_GLprogram = old;
|
||||
old = nullptr;
|
||||
}
|
||||
@ -125,10 +125,10 @@ void ewol::compositing::TextBase::setPos(const vec3& _pos) {
|
||||
// check min max for display area
|
||||
if (m_nbCharDisplayed != 0) {
|
||||
EWOL_VERBOSE("update size 1 " << m_sizeDisplayStart << " " << m_sizeDisplayStop);
|
||||
m_sizeDisplayStop.setX(etk_max(m_position.x(), m_sizeDisplayStop.x()));
|
||||
m_sizeDisplayStop.setY(etk_max(m_position.y(), m_sizeDisplayStop.y()));
|
||||
m_sizeDisplayStart.setX(etk_min(m_position.x(), m_sizeDisplayStart.x()));
|
||||
m_sizeDisplayStart.setY(etk_min(m_position.y(), m_sizeDisplayStart.y()));
|
||||
m_sizeDisplayStop.setX(std::max(m_position.x(), m_sizeDisplayStop.x()));
|
||||
m_sizeDisplayStop.setY(std::max(m_position.y(), m_sizeDisplayStop.y()));
|
||||
m_sizeDisplayStart.setX(std::min(m_position.x(), m_sizeDisplayStart.x()));
|
||||
m_sizeDisplayStart.setY(std::min(m_position.y(), m_sizeDisplayStart.y()));
|
||||
EWOL_VERBOSE("update size 2 " << m_sizeDisplayStart << " " << m_sizeDisplayStop);
|
||||
}
|
||||
// update position
|
||||
@ -143,10 +143,10 @@ void ewol::compositing::TextBase::setPos(const vec3& _pos) {
|
||||
EWOL_VERBOSE("update size 0 " << m_sizeDisplayStart << " " << m_sizeDisplayStop);
|
||||
} else {
|
||||
EWOL_VERBOSE("update size 3 " << m_sizeDisplayStart << " " << m_sizeDisplayStop);
|
||||
m_sizeDisplayStop.setX(etk_max(m_position.x(), m_sizeDisplayStop.x()));
|
||||
m_sizeDisplayStop.setY(etk_max(m_position.y(), m_sizeDisplayStop.y()));
|
||||
m_sizeDisplayStart.setX(etk_min(m_position.x(), m_sizeDisplayStart.x()));
|
||||
m_sizeDisplayStart.setY(etk_min(m_position.y(), m_sizeDisplayStart.y()));
|
||||
m_sizeDisplayStop.setX(std::max(m_position.x(), m_sizeDisplayStop.x()));
|
||||
m_sizeDisplayStop.setY(std::max(m_position.y(), m_sizeDisplayStop.y()));
|
||||
m_sizeDisplayStart.setX(std::min(m_position.x(), m_sizeDisplayStart.x()));
|
||||
m_sizeDisplayStart.setY(std::min(m_position.y(), m_sizeDisplayStart.y()));
|
||||
EWOL_VERBOSE("update size 4 " << m_sizeDisplayStart << " " << m_sizeDisplayStop);
|
||||
}
|
||||
}
|
||||
@ -255,7 +255,7 @@ void ewol::compositing::TextBase::parseHtmlNode(exml::Element* _element) {
|
||||
// nothing to do ...
|
||||
} else if (_element->getType(iii) == exml::typeText) {
|
||||
exml::Node* child = _element->getNode(iii);
|
||||
htmlAddData(std::to_u32string(child->getValue()));
|
||||
htmlAddData(etk::to_u32string(child->getValue()));
|
||||
EWOL_VERBOSE("XML add : " << child->getValue());
|
||||
continue;
|
||||
} else if (_element->getType(iii)!=exml::typeElement) {
|
||||
@ -267,21 +267,25 @@ void ewol::compositing::TextBase::parseHtmlNode(exml::Element* _element) {
|
||||
EWOL_ERROR("Cast error ...");
|
||||
continue;
|
||||
}
|
||||
if(compare_no_case(elem->getValue(), "br") == true) {
|
||||
if(etk::compare_no_case(elem->getValue(), "br") == true) {
|
||||
htmlFlush();
|
||||
EWOL_VERBOSE("XML flush & newLine");
|
||||
forceLineReturn();
|
||||
} else if (compare_no_case(elem->getValue(), "font") == true) {
|
||||
} else if (etk::compare_no_case(elem->getValue(), "font") == true) {
|
||||
EWOL_VERBOSE("XML Font ...");
|
||||
TextDecoration tmpDeco = m_htmlDecoTmp;
|
||||
std::string colorValue = elem->getAttribute("color");
|
||||
m_htmlDecoTmp.m_colorFg = colorValue;
|
||||
if (colorValue.size() != 0) {
|
||||
m_htmlDecoTmp.m_colorFg = colorValue;
|
||||
}
|
||||
colorValue = elem->getAttribute("colorBg");
|
||||
m_htmlDecoTmp.m_colorBg = colorValue;
|
||||
if (colorValue.size() != 0) {
|
||||
m_htmlDecoTmp.m_colorBg = colorValue;
|
||||
}
|
||||
parseHtmlNode(elem);
|
||||
m_htmlDecoTmp = tmpDeco;
|
||||
} else if( compare_no_case(elem->getValue(), "b") == true
|
||||
|| compare_no_case(elem->getValue(), "bold") == true) {
|
||||
} else if( etk::compare_no_case(elem->getValue(), "b") == true
|
||||
|| etk::compare_no_case(elem->getValue(), "bold") == true) {
|
||||
EWOL_VERBOSE("XML bold ...");
|
||||
TextDecoration tmpDeco = m_htmlDecoTmp;
|
||||
if (m_htmlDecoTmp.m_mode == ewol::font::Regular) {
|
||||
@ -291,8 +295,8 @@ void ewol::compositing::TextBase::parseHtmlNode(exml::Element* _element) {
|
||||
}
|
||||
parseHtmlNode(elem);
|
||||
m_htmlDecoTmp = tmpDeco;
|
||||
} else if( compare_no_case(elem->getValue(), "i") == true
|
||||
|| compare_no_case(elem->getValue(), "italic") == true) {
|
||||
} else if( etk::compare_no_case(elem->getValue(), "i") == true
|
||||
|| etk::compare_no_case(elem->getValue(), "italic") == true) {
|
||||
EWOL_VERBOSE("XML italic ...");
|
||||
TextDecoration tmpDeco = m_htmlDecoTmp;
|
||||
if (m_htmlDecoTmp.m_mode == ewol::font::Regular) {
|
||||
@ -302,34 +306,34 @@ void ewol::compositing::TextBase::parseHtmlNode(exml::Element* _element) {
|
||||
}
|
||||
parseHtmlNode(elem);
|
||||
m_htmlDecoTmp = tmpDeco;
|
||||
} else if( compare_no_case(elem->getValue(), "u") == true
|
||||
|| compare_no_case(elem->getValue(), "underline") == true) {
|
||||
} else if( etk::compare_no_case(elem->getValue(), "u") == true
|
||||
|| etk::compare_no_case(elem->getValue(), "underline") == true) {
|
||||
EWOL_VERBOSE("XML underline ...");
|
||||
parseHtmlNode(elem);
|
||||
} else if( compare_no_case(elem->getValue(), "p") == true
|
||||
|| compare_no_case(elem->getValue(), "paragraph") == true) {
|
||||
} else if( etk::compare_no_case(elem->getValue(), "p") == true
|
||||
|| etk::compare_no_case(elem->getValue(), "paragraph") == true) {
|
||||
EWOL_VERBOSE("XML paragraph ...");
|
||||
htmlFlush();
|
||||
m_alignement = alignLeft;
|
||||
forceLineReturn();
|
||||
parseHtmlNode(elem);
|
||||
forceLineReturn();
|
||||
} else if (compare_no_case(elem->getValue(), "center") == true) {
|
||||
} else if (etk::compare_no_case(elem->getValue(), "center") == true) {
|
||||
EWOL_VERBOSE("XML center ...");
|
||||
htmlFlush();
|
||||
m_alignement = alignCenter;
|
||||
parseHtmlNode(elem);
|
||||
} else if (compare_no_case(elem->getValue(), "left") == true) {
|
||||
} else if (etk::compare_no_case(elem->getValue(), "left") == true) {
|
||||
EWOL_VERBOSE("XML left ...");
|
||||
htmlFlush();
|
||||
m_alignement = alignLeft;
|
||||
parseHtmlNode(elem);
|
||||
} else if (compare_no_case(elem->getValue(), "right") == true) {
|
||||
} else if (etk::compare_no_case(elem->getValue(), "right") == true) {
|
||||
EWOL_VERBOSE("XML right ...");
|
||||
htmlFlush();
|
||||
m_alignement = alignRight;
|
||||
parseHtmlNode(elem);
|
||||
} else if (compare_no_case(elem->getValue(), "justify") == true) {
|
||||
} else if (etk::compare_no_case(elem->getValue(), "justify") == true) {
|
||||
EWOL_VERBOSE("XML justify ...");
|
||||
htmlFlush();
|
||||
m_alignement = alignJustify;
|
||||
@ -392,7 +396,7 @@ void ewol::compositing::TextBase::printHTML(const std::u32string& _text) {
|
||||
m_htmlDecoTmp.m_colorFg = m_defaultColorFg;
|
||||
m_htmlDecoTmp.m_mode = ewol::font::Regular;
|
||||
// TODO : Create an instance of xml parser to manage std::u32string...
|
||||
if (doc.parse(std::to_string(_text)) == false) {
|
||||
if (doc.parse(etk::to_string(_text)) == false) {
|
||||
EWOL_ERROR( "can not load XML: PARSING error: Decorated text ");
|
||||
return;
|
||||
}
|
||||
@ -821,11 +825,11 @@ vec3 ewol::compositing::TextBase::calculateSizeHTML(const std::string& _text) {
|
||||
//EWOL_DEBUG(" 1 Stop pos=" << m_sizeDisplayStop);
|
||||
|
||||
// get the last elements
|
||||
m_sizeDisplayStop.setValue(etk_max(m_position.x(), m_sizeDisplayStop.x()) ,
|
||||
etk_max(m_position.y(), m_sizeDisplayStop.y()) ,
|
||||
m_sizeDisplayStop.setValue(std::max(m_position.x(), m_sizeDisplayStop.x()) ,
|
||||
std::max(m_position.y(), m_sizeDisplayStop.y()) ,
|
||||
0);
|
||||
m_sizeDisplayStart.setValue(etk_min(m_position.x(), m_sizeDisplayStart.x()) ,
|
||||
etk_min(m_position.y(), m_sizeDisplayStart.y()) ,
|
||||
m_sizeDisplayStart.setValue(std::min(m_position.x(), m_sizeDisplayStart.x()) ,
|
||||
std::min(m_position.y(), m_sizeDisplayStart.y()) ,
|
||||
0);
|
||||
|
||||
//EWOL_DEBUG(" 2 Start pos=" << m_sizeDisplayStart);
|
||||
@ -852,11 +856,11 @@ vec3 ewol::compositing::TextBase::calculateSizeHTML(const std::u32string& _text)
|
||||
//EWOL_DEBUG(" 1 Stop pos=" << m_sizeDisplayStop);
|
||||
|
||||
// get the last elements
|
||||
m_sizeDisplayStop.setValue(etk_max(m_position.x(), m_sizeDisplayStop.x()) ,
|
||||
etk_max(m_position.y(), m_sizeDisplayStop.y()) ,
|
||||
m_sizeDisplayStop.setValue(std::max(m_position.x(), m_sizeDisplayStop.x()) ,
|
||||
std::max(m_position.y(), m_sizeDisplayStop.y()) ,
|
||||
0);
|
||||
m_sizeDisplayStart.setValue(etk_min(m_position.x(), m_sizeDisplayStart.x()) ,
|
||||
etk_min(m_position.y(), m_sizeDisplayStart.y()) ,
|
||||
m_sizeDisplayStart.setValue(std::min(m_position.x(), m_sizeDisplayStart.x()) ,
|
||||
std::min(m_position.y(), m_sizeDisplayStart.y()) ,
|
||||
0);
|
||||
|
||||
//EWOL_DEBUG(" 2 Start pos=" << m_sizeDisplayStart);
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#ifndef __EWOL_COMPOSITING_TEXT_BASE_H__
|
||||
@ -77,7 +77,7 @@ namespace ewol {
|
||||
float m_stopTextPos; //!< end of the alignement (when a string is too hight it cut at the word previously this virtual line and the center is perform with this one)
|
||||
enum aligneMode m_alignement; //!< Current Alignement mode (justify/left/right ...)
|
||||
protected:
|
||||
ewol::object::Shared<ewol::resource::Program> m_GLprogram; //!< pointer on the opengl display program
|
||||
std::shared_ptr<ewol::resource::Program> m_GLprogram; //!< pointer on the opengl display program
|
||||
int32_t m_GLPosition; //!< openGL id on the element (vertex buffer)
|
||||
int32_t m_GLMatrix; //!< openGL id on the element (transformation matrix)
|
||||
int32_t m_GLColor; //!< openGL id on the element (color buffer)
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#include <ewol/debug.h>
|
||||
@ -30,7 +30,7 @@ ewol::compositing::TextDF::~TextDF() {
|
||||
}
|
||||
|
||||
void ewol::compositing::TextDF::updateSizeToRender(const vec2& _size) {
|
||||
float minSize = etk_min(_size.x(), _size.y());
|
||||
float minSize = std::min(_size.x(), _size.y());
|
||||
if (m_fontDF != nullptr) {
|
||||
setFontSize(m_fontDF->getSize(minSize));
|
||||
}
|
||||
@ -155,7 +155,7 @@ void ewol::compositing::TextDF::setFontSize(int32_t _fontSize) {
|
||||
void ewol::compositing::TextDF::setFontName(const std::string& _fontName) {
|
||||
clear();
|
||||
// remove old one
|
||||
ewol::object::Shared<ewol::resource::DistanceFieldFont> previousFont = m_fontDF;
|
||||
std::shared_ptr<ewol::resource::DistanceFieldFont> previousFont = m_fontDF;
|
||||
std::string fontName;
|
||||
if (_fontName == "") {
|
||||
fontName = ewol::getContext().getFontDefault().getName();
|
||||
@ -164,7 +164,7 @@ void ewol::compositing::TextDF::setFontName(const std::string& _fontName) {
|
||||
}
|
||||
EWOL_VERBOSE("Set font name: '" << fontName << "'");
|
||||
// link to new one
|
||||
m_fontDF = ewol::resource::DistanceFieldFont::keep(fontName);
|
||||
m_fontDF = ewol::resource::DistanceFieldFont::create(fontName);
|
||||
if (m_fontDF == nullptr) {
|
||||
EWOL_ERROR("Can not get find resource");
|
||||
m_fontDF = previousFont;
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#ifndef __EWOL_COMPOSITING_TEXT_DF_H__
|
||||
@ -23,7 +23,7 @@ namespace ewol {
|
||||
namespace compositing {
|
||||
class TextDF : public ewol::compositing::TextBase {
|
||||
protected:
|
||||
ewol::object::Shared<ewol::resource::DistanceFieldFont> m_fontDF; //!< Font resources
|
||||
std::shared_ptr<ewol::resource::DistanceFieldFont> m_fontDF; //!< Font resources
|
||||
std::vector<float> m_glyphLevel; //!< Level of display of the glyph (notmal : 0.50, bold : 0.40, super bold : 0.30 ...)
|
||||
protected:
|
||||
int32_t m_GLglyphLevel; //!< openGL Id on the glyph level display
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#include <jni.h>
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#ifndef __EWOL_CONTEXT_APPLICATION_H__
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#include <ewol/context/ConfigFont.h>
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#ifndef __EWOL_CONFIG_FONT_H__
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#include <unistd.h>
|
||||
@ -135,13 +135,13 @@ namespace ewol {
|
||||
};
|
||||
|
||||
|
||||
void ewol::Context::inputEventTransfertWidget(ewol::object::Shared<ewol::Widget> _source,
|
||||
ewol::object::Shared<ewol::Widget> _destination) {
|
||||
void ewol::Context::inputEventTransfertWidget(std::shared_ptr<ewol::Widget> _source,
|
||||
std::shared_ptr<ewol::Widget> _destination) {
|
||||
m_input.transfertEvent(_source, _destination);
|
||||
}
|
||||
|
||||
|
||||
void ewol::Context::inputEventGrabPointer(ewol::object::Shared<ewol::Widget> _widget) {
|
||||
void ewol::Context::inputEventGrabPointer(std::shared_ptr<ewol::Widget> _widget) {
|
||||
m_input.grabPointer(_widget);
|
||||
}
|
||||
|
||||
@ -196,7 +196,7 @@ void ewol::Context::processEvents() {
|
||||
data->keyboardMove,
|
||||
data->stateIsDown) ) {
|
||||
// get the current focused Widget :
|
||||
ewol::object::Shared<ewol::Widget> tmpWidget = m_widgetManager.focusGet();
|
||||
std::shared_ptr<ewol::Widget> tmpWidget = m_widgetManager.focusGet();
|
||||
if (nullptr != tmpWidget) {
|
||||
// check if the widget allow repeating key events.
|
||||
//EWOL_DEBUG("repeating test :" << data->repeateKey << " widget=" << tmpWidget->getKeyboardRepeate() << " state=" << data->stateIsDown);
|
||||
@ -239,7 +239,7 @@ void ewol::Context::processEvents() {
|
||||
break;
|
||||
case eSystemMessage::msgClipboardArrive:
|
||||
{
|
||||
ewol::object::Shared<ewol::Widget> tmpWidget = m_widgetManager.focusGet();
|
||||
std::shared_ptr<ewol::Widget> tmpWidget = m_widgetManager.focusGet();
|
||||
if (tmpWidget != nullptr) {
|
||||
tmpWidget->onEventClipboard(data->clipboardID);
|
||||
}
|
||||
@ -388,18 +388,15 @@ ewol::Context::~Context() {
|
||||
// Remove current windows
|
||||
m_windowsCurrent.reset();
|
||||
// clean all widget and sub widget with their resources:
|
||||
do {
|
||||
m_objectManager.removeAllRemovedObject();
|
||||
} while (m_resourceManager.checkResourceToRemove() == true);
|
||||
m_objectManager.cleanInternalRemoved();
|
||||
// call application to uninit
|
||||
m_application->unInit(*this);
|
||||
m_application.reset();
|
||||
// clean all messages
|
||||
m_msgSystem.clean();
|
||||
// an other cycle of removing ...
|
||||
do {
|
||||
m_objectManager.removeAllRemovedObject();
|
||||
} while (m_resourceManager.checkResourceToRemove() == true);
|
||||
// internal clean elements
|
||||
m_objectManager.cleanInternalRemoved();
|
||||
m_resourceManager.cleanInternalRemoved();
|
||||
|
||||
EWOL_INFO("List of all widget of this context must be equal at 0 ==> otherwise some remove is missing");
|
||||
m_objectManager.displayListObject();
|
||||
@ -667,26 +664,14 @@ bool ewol::Context::OS_Draw(bool _displayEveryTime) {
|
||||
m_resourceManager.updateContext();
|
||||
// release open GL Context
|
||||
ewol::openGL::unLock();
|
||||
do {
|
||||
m_objectManager.removeAllRemovedObject();
|
||||
} while (m_resourceManager.checkResourceToRemove() == true);
|
||||
m_objectManager.cleanInternalRemoved();
|
||||
m_resourceManager.cleanInternalRemoved();
|
||||
// release the curent interface :
|
||||
unLockContext();
|
||||
}
|
||||
return hasDisplayDone;
|
||||
}
|
||||
|
||||
void ewol::Context::onObjectRemove(const ewol::object::Shared<ewol::Object>& _object) {
|
||||
//EWOL_CRITICAL("element removed");
|
||||
if (m_windowsCurrent == _object) {
|
||||
m_windowsCurrent.reset(); // This might never arrived, the owner is the current element (expected when the widget auto remove itself)
|
||||
}
|
||||
// inform all manager that can not be directly linked with the object manager
|
||||
m_input.onObjectRemove(_object);
|
||||
m_widgetManager.onObjectRemove(_object);
|
||||
m_resourceManager.checkResourceToRemove();
|
||||
}
|
||||
|
||||
void ewol::Context::resetIOEvent() {
|
||||
m_input.newLayerSet();
|
||||
}
|
||||
@ -695,7 +680,7 @@ void ewol::Context::OS_OpenGlContextDestroy() {
|
||||
m_resourceManager.contextHasBeenDestroyed();
|
||||
}
|
||||
|
||||
void ewol::Context::setWindows(const ewol::object::Shared<ewol::widget::Windows>& _windows) {
|
||||
void ewol::Context::setWindows(const std::shared_ptr<ewol::widget::Windows>& _windows) {
|
||||
// remove current focus :
|
||||
m_widgetManager.focusSetDefault(nullptr);
|
||||
m_widgetManager.focusRelease();
|
||||
@ -707,7 +692,7 @@ void ewol::Context::setWindows(const ewol::object::Shared<ewol::widget::Windows>
|
||||
forceRedrawAll();
|
||||
}
|
||||
|
||||
ewol::object::Shared<ewol::widget::Windows> ewol::Context::getWindows() {
|
||||
std::shared_ptr<ewol::widget::Windows> ewol::Context::getWindows() {
|
||||
return m_windowsCurrent;
|
||||
};
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#ifndef __EWOL_CONTEXT_H__
|
||||
@ -144,8 +144,6 @@ namespace ewol {
|
||||
|
||||
// return true if a flush is needed
|
||||
bool OS_Draw(bool _displayEveryTime);
|
||||
|
||||
virtual void onObjectRemove(const ewol::object::Shared<ewol::Object>& _removeObject);
|
||||
public:
|
||||
/**
|
||||
* @brief reset event management for the IO like Input ou Mouse or keyborad
|
||||
@ -164,18 +162,18 @@ namespace ewol {
|
||||
*/
|
||||
virtual void stop();
|
||||
private:
|
||||
ewol::object::Owner<ewol::widget::Windows> m_windowsCurrent; //!< curent displayed windows
|
||||
std::shared_ptr<ewol::widget::Windows> m_windowsCurrent; //!< curent displayed windows
|
||||
public:
|
||||
/**
|
||||
* @brief set the current windows to display :
|
||||
* @param _windows Windows that might be displayed
|
||||
*/
|
||||
void setWindows(const ewol::object::Shared<ewol::widget::Windows>& _windows);
|
||||
void setWindows(const std::shared_ptr<ewol::widget::Windows>& _windows);
|
||||
/**
|
||||
* @brief get the current windows that is displayed
|
||||
* @return the current handle on the windows (can be null)
|
||||
*/
|
||||
ewol::object::Shared<ewol::widget::Windows> getWindows();
|
||||
std::shared_ptr<ewol::widget::Windows> getWindows();
|
||||
private:
|
||||
vec2 m_windowsSize; //!< current size of the system
|
||||
public:
|
||||
@ -233,12 +231,12 @@ namespace ewol {
|
||||
* @param source the widget where the event came from
|
||||
* @param destination the widget where the event mitgh be generated now
|
||||
*/
|
||||
void inputEventTransfertWidget(ewol::object::Shared<ewol::Widget> _source, ewol::object::Shared<ewol::Widget> _destination);
|
||||
void inputEventTransfertWidget(std::shared_ptr<ewol::Widget> _source, std::shared_ptr<ewol::Widget> _destination);
|
||||
/**
|
||||
* @brief This fonction lock the pointer properties to move in relative instead of absolute
|
||||
* @param[in] widget The widget that lock the pointer events
|
||||
*/
|
||||
void inputEventGrabPointer(ewol::object::Shared<ewol::Widget> _widget);
|
||||
void inputEventGrabPointer(std::shared_ptr<ewol::Widget> _widget);
|
||||
/**
|
||||
* @brief This fonction un-lock the pointer properties to move in relative instead of absolute
|
||||
*/
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#ifndef __EWOL_FPS_H__
|
||||
@ -85,13 +85,13 @@ namespace ewol {
|
||||
EWOL_INFO(m_displayName << " : processTime : " << (float)((float)processTimeLocal / 1000.0) << "ms ");
|
||||
}
|
||||
if (drwingDone) {
|
||||
min = etk_min(min, processTimeLocal);
|
||||
max = etk_max(max, processTimeLocal);
|
||||
min = std::min(min, processTimeLocal);
|
||||
max = std::max(max, processTimeLocal);
|
||||
avg += processTimeLocal;
|
||||
drwingDone = false;
|
||||
} else {
|
||||
min_idle = etk_min(min_idle, processTimeLocal);
|
||||
max_idle = etk_max(max_idle, processTimeLocal);
|
||||
min_idle = std::min(min_idle, processTimeLocal);
|
||||
max_idle = std::max(max_idle, processTimeLocal);
|
||||
avg_idle += processTimeLocal;
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#ifndef __MAC_OS_CONTEXT_H__
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#ifndef __EWOL_MM_INTERFACE_H__
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#include <etk/types.h>
|
||||
@ -42,7 +42,7 @@ void ewol::context::InputManager::setDpi(int32_t newDPI) {
|
||||
}
|
||||
|
||||
bool ewol::context::InputManager::localEventInput(enum ewol::key::type _type,
|
||||
ewol::object::Shared<ewol::Widget> _destWidget,
|
||||
std::shared_ptr<ewol::Widget> _destWidget,
|
||||
int32_t _IdInput,
|
||||
enum ewol::key::status _status,
|
||||
vec2 _pos) {
|
||||
@ -67,7 +67,7 @@ void ewol::context::InputManager::abortElement(InputPoperty *_eventTable,
|
||||
}
|
||||
if (_eventTable[_idInput].isUsed == true) {
|
||||
localEventInput(_type,
|
||||
_eventTable[_idInput].curentWidgetEvent,
|
||||
_eventTable[_idInput].curentWidgetEvent.lock(),
|
||||
_eventTable[_idInput].destinationInputId,
|
||||
ewol::key::statusAbort,
|
||||
_eventTable[_idInput].posEvent);
|
||||
@ -93,38 +93,40 @@ void ewol::context::InputManager::cleanElement(InputPoperty *_eventTable,
|
||||
_eventTable[_idInput].posEvent.setValue(0,0);
|
||||
}
|
||||
|
||||
void ewol::context::InputManager::transfertEvent(ewol::object::Shared<ewol::Widget> _source, ewol::object::Shared<ewol::Widget> _destination) {
|
||||
void ewol::context::InputManager::transfertEvent(std::shared_ptr<ewol::Widget> _source, std::shared_ptr<ewol::Widget> _destination) {
|
||||
if( _source == nullptr
|
||||
|| _destination == nullptr) {
|
||||
// prevent errors ...
|
||||
return;
|
||||
}
|
||||
for(int32_t iii=0; iii<MAX_MANAGE_INPUT; iii++) {
|
||||
if (m_eventInputSaved[iii].curentWidgetEvent == _source) {
|
||||
std::shared_ptr<ewol::Widget> tmpWidget = m_eventInputSaved[iii].curentWidgetEvent.lock();
|
||||
if (tmpWidget == _source) {
|
||||
// inform the widget that it does not receive the event now
|
||||
EVENT_DEBUG("GUI : Input ID=" << iii << " == >" << m_eventInputSaved[iii].destinationInputId << " [EVENT_INPUT_TYPE_ABORT] " << m_eventInputSaved[iii].posEvent);
|
||||
localEventInput(ewol::key::typeFinger, m_eventInputSaved[iii].curentWidgetEvent, m_eventInputSaved[iii].destinationInputId, ewol::key::statusAbort, m_eventInputSaved[iii].posEvent);
|
||||
localEventInput(ewol::key::typeFinger, tmpWidget, m_eventInputSaved[iii].destinationInputId, ewol::key::statusAbort, m_eventInputSaved[iii].posEvent);
|
||||
// set the new widget ...
|
||||
m_eventInputSaved[iii].curentWidgetEvent = _destination;
|
||||
// inform the widget that he receive the event property now...
|
||||
EVENT_DEBUG("GUI : Input ID=" << iii << " == >" << m_eventInputSaved[iii].destinationInputId << " [EVENT_INPUT_TYPE_TRANSFERT] " << m_eventInputSaved[iii].posEvent);
|
||||
localEventInput(ewol::key::typeFinger, m_eventInputSaved[iii].curentWidgetEvent, m_eventInputSaved[iii].destinationInputId, ewol::key::statusTransfert, m_eventInputSaved[iii].posEvent);
|
||||
localEventInput(ewol::key::typeFinger, _destination, m_eventInputSaved[iii].destinationInputId, ewol::key::statusTransfert, m_eventInputSaved[iii].posEvent);
|
||||
}
|
||||
if (m_eventMouseSaved[iii].curentWidgetEvent == _source) {
|
||||
tmpWidget = m_eventMouseSaved[iii].curentWidgetEvent.lock();
|
||||
if (tmpWidget == _source) {
|
||||
// inform the widget that it does not receive the event now
|
||||
EVENT_DEBUG("GUI : Input ID=" << iii << " == >" << m_eventMouseSaved[iii].destinationInputId << " [EVENT_INPUT_TYPE_ABORT] " << m_eventMouseSaved[iii].posEvent);
|
||||
localEventInput(ewol::key::typeMouse, m_eventMouseSaved[iii].curentWidgetEvent, m_eventMouseSaved[iii].destinationInputId, ewol::key::statusAbort, m_eventMouseSaved[iii].posEvent);
|
||||
localEventInput(ewol::key::typeMouse, tmpWidget, m_eventMouseSaved[iii].destinationInputId, ewol::key::statusAbort, m_eventMouseSaved[iii].posEvent);
|
||||
// set the new widget ...
|
||||
m_eventMouseSaved[iii].curentWidgetEvent = _destination;
|
||||
// inform the widget that he receive the event property now...
|
||||
EVENT_DEBUG("GUI : Input ID=" << iii << " == >" << m_eventMouseSaved[iii].destinationInputId << " [EVENT_INPUT_TYPE_TRANSFERT] " << m_eventMouseSaved[iii].posEvent);
|
||||
localEventInput(ewol::key::typeMouse, m_eventMouseSaved[iii].curentWidgetEvent, m_eventMouseSaved[iii].destinationInputId, ewol::key::statusTransfert, m_eventMouseSaved[iii].posEvent);
|
||||
localEventInput(ewol::key::typeMouse, _destination, m_eventMouseSaved[iii].destinationInputId, ewol::key::statusTransfert, m_eventMouseSaved[iii].posEvent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ewol::context::InputManager::grabPointer(ewol::object::Shared<ewol::Widget> _widget) {
|
||||
if(nullptr == _widget) {
|
||||
void ewol::context::InputManager::grabPointer(std::shared_ptr<ewol::Widget> _widget) {
|
||||
if(_widget == nullptr) {
|
||||
return;
|
||||
}
|
||||
m_grabWidget = _widget;
|
||||
@ -134,29 +136,10 @@ void ewol::context::InputManager::grabPointer(ewol::object::Shared<ewol::Widget>
|
||||
}
|
||||
|
||||
void ewol::context::InputManager::unGrabPointer() {
|
||||
m_grabWidget = nullptr;
|
||||
m_grabWidget.reset();
|
||||
m_context.grabPointerEvents(false, vec2(0,0));
|
||||
}
|
||||
|
||||
void ewol::context::InputManager::onObjectRemove(const ewol::object::Shared<ewol::Object>& _object) {
|
||||
for(int32_t iii=0; iii<MAX_MANAGE_INPUT; iii++) {
|
||||
if (m_eventInputSaved[iii].curentWidgetEvent == _object) {
|
||||
// remove the property of this input ...
|
||||
EWOL_VERBOSE("Remove object ==> rm Input Event !!!");
|
||||
cleanElement(m_eventInputSaved, iii);
|
||||
}
|
||||
if (m_eventMouseSaved[iii].curentWidgetEvent == _object) {
|
||||
// remove the property of this input ...
|
||||
EWOL_VERBOSE("Remove object ==> rm Mouse Event !!!");
|
||||
cleanElement(m_eventMouseSaved, iii);
|
||||
}
|
||||
}
|
||||
if (m_grabWidget == _object) {
|
||||
EWOL_VERBOSE("Remove object ==> rm Grab widget !!!");
|
||||
m_grabWidget.reset();
|
||||
}
|
||||
}
|
||||
|
||||
void ewol::context::InputManager::newLayerSet() {
|
||||
for(int32_t iii=0; iii<MAX_MANAGE_INPUT; iii++) {
|
||||
// remove the property of this input ...
|
||||
@ -168,7 +151,7 @@ void ewol::context::InputManager::newLayerSet() {
|
||||
}
|
||||
|
||||
ewol::context::InputManager::InputManager(ewol::Context& _context) :
|
||||
m_grabWidget(nullptr),
|
||||
m_grabWidget(),
|
||||
m_context(_context) {
|
||||
setDpi(200);
|
||||
EWOL_INFO("Init (start)");
|
||||
@ -186,15 +169,16 @@ ewol::context::InputManager::~InputManager() {
|
||||
}
|
||||
|
||||
int32_t ewol::context::InputManager::localGetDestinationId(enum ewol::key::type _type,
|
||||
ewol::object::Shared<ewol::Widget> _destWidget,
|
||||
std::shared_ptr<ewol::Widget> _destWidget,
|
||||
int32_t _realInputId) {
|
||||
if (_type == ewol::key::typeFinger) {
|
||||
int32_t lastMinimum = 0;
|
||||
for(int32_t iii=0; iii<MAX_MANAGE_INPUT; iii++) {
|
||||
if (true == m_eventInputSaved[iii].isUsed) {
|
||||
if (m_eventInputSaved[iii].curentWidgetEvent == _destWidget) {
|
||||
std::shared_ptr<ewol::Widget> tmpWidget = m_eventInputSaved[iii].curentWidgetEvent.lock();
|
||||
if (tmpWidget == _destWidget) {
|
||||
if (iii != _realInputId) {
|
||||
lastMinimum = etk_max(lastMinimum, m_eventInputSaved[iii].destinationInputId);
|
||||
lastMinimum = std::max(lastMinimum, m_eventInputSaved[iii].destinationInputId);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -227,21 +211,21 @@ void ewol::context::InputManager::motion(enum ewol::key::type _type,
|
||||
// not manage input
|
||||
return;
|
||||
}
|
||||
ewol::object::Shared<ewol::widget::Windows> tmpWindows = m_context.getWindows();
|
||||
std::shared_ptr<ewol::widget::Windows> tmpWindows = m_context.getWindows();
|
||||
// special case for the mouse event 0 that represent the hover event of the system :
|
||||
if (_type == ewol::key::typeMouse && _pointerID == 0) {
|
||||
// this event is all time on the good widget ... and manage the enter and leave ...
|
||||
// NOTE : the "layer widget" force us to get the widget at the specific position all the time :
|
||||
ewol::object::Shared<ewol::Widget> tmpWidget = nullptr;
|
||||
if (m_grabWidget != nullptr) {
|
||||
std::shared_ptr<ewol::Widget> tmpWidget;
|
||||
if (m_grabWidget.lock() != nullptr) {
|
||||
// grab all events ...
|
||||
tmpWidget = m_grabWidget;
|
||||
tmpWidget = m_grabWidget.lock();
|
||||
} else {
|
||||
if (nullptr != tmpWindows) {
|
||||
tmpWidget = tmpWindows->getWidgetAtPos(_pos);
|
||||
}
|
||||
}
|
||||
if( tmpWidget != eventTable[_pointerID].curentWidgetEvent
|
||||
if( tmpWidget != eventTable[_pointerID].curentWidgetEvent.lock()
|
||||
|| ( true == eventTable[_pointerID].isInside
|
||||
&& ( eventTable[_pointerID].origin.x() > _pos.x()
|
||||
|| eventTable[_pointerID].origin.y() > _pos.y()
|
||||
@ -251,22 +235,21 @@ void ewol::context::InputManager::motion(enum ewol::key::type _type,
|
||||
EVENT_DEBUG("GUI : Input ID=" << _pointerID << " == >" << eventTable[_pointerID].destinationInputId << " [LEAVE] " << _pos);
|
||||
eventTable[_pointerID].posEvent = _pos;
|
||||
localEventInput(_type,
|
||||
eventTable[_pointerID].curentWidgetEvent,
|
||||
eventTable[_pointerID].curentWidgetEvent.lock(),
|
||||
eventTable[_pointerID].destinationInputId,
|
||||
ewol::key::statusLeave,
|
||||
_pos);
|
||||
}
|
||||
if (false == eventTable[_pointerID].isInside) {
|
||||
if (eventTable[_pointerID].isInside == false) {
|
||||
// set the element inside ...
|
||||
eventTable[_pointerID].isInside = true;
|
||||
// get destination widget :
|
||||
eventTable[_pointerID].curentWidgetEvent = tmpWidget;
|
||||
if (nullptr == eventTable[_pointerID].curentWidgetEvent) {
|
||||
if (tmpWidget == nullptr) {
|
||||
eventTable[_pointerID].isInside = false;
|
||||
}
|
||||
if (nullptr != eventTable[_pointerID].curentWidgetEvent) {
|
||||
eventTable[_pointerID].origin = eventTable[_pointerID].curentWidgetEvent->getOrigin();
|
||||
eventTable[_pointerID].size = eventTable[_pointerID].curentWidgetEvent->getSize();
|
||||
} else {
|
||||
eventTable[_pointerID].origin = tmpWidget->getOrigin();
|
||||
eventTable[_pointerID].size = tmpWidget->getSize();
|
||||
}
|
||||
eventTable[_pointerID].destinationInputId = 0;
|
||||
EVENT_DEBUG("GUI : Input ID=" << _pointerID
|
||||
@ -274,7 +257,7 @@ void ewol::context::InputManager::motion(enum ewol::key::type _type,
|
||||
<< " [ENTER] " << _pos);
|
||||
eventTable[_pointerID].posEvent = _pos;
|
||||
localEventInput(_type,
|
||||
eventTable[_pointerID].curentWidgetEvent,
|
||||
tmpWidget,
|
||||
eventTable[_pointerID].destinationInputId,
|
||||
ewol::key::statusEnter,
|
||||
_pos);
|
||||
@ -284,7 +267,7 @@ void ewol::context::InputManager::motion(enum ewol::key::type _type,
|
||||
<< " [MOVE] " << _pos);
|
||||
eventTable[_pointerID].posEvent = _pos;
|
||||
localEventInput(_type,
|
||||
eventTable[_pointerID].curentWidgetEvent,
|
||||
tmpWidget,
|
||||
eventTable[_pointerID].destinationInputId,
|
||||
ewol::key::statusMove,
|
||||
_pos);
|
||||
@ -300,7 +283,7 @@ void ewol::context::InputManager::motion(enum ewol::key::type _type,
|
||||
<< " [LEAVE] " << _pos);
|
||||
eventTable[_pointerID].posEvent = _pos;
|
||||
localEventInput(_type,
|
||||
eventTable[_pointerID].curentWidgetEvent,
|
||||
eventTable[_pointerID].curentWidgetEvent.lock(),
|
||||
eventTable[_pointerID].destinationInputId,
|
||||
ewol::key::statusLeave,
|
||||
_pos);
|
||||
@ -316,7 +299,7 @@ void ewol::context::InputManager::motion(enum ewol::key::type _type,
|
||||
<< " [ENTER] " << _pos);
|
||||
eventTable[_pointerID].posEvent = _pos;
|
||||
localEventInput(_type,
|
||||
eventTable[_pointerID].curentWidgetEvent,
|
||||
eventTable[_pointerID].curentWidgetEvent.lock(),
|
||||
eventTable[_pointerID].destinationInputId,
|
||||
ewol::key::statusEnter,
|
||||
_pos);
|
||||
@ -327,7 +310,7 @@ void ewol::context::InputManager::motion(enum ewol::key::type _type,
|
||||
<< " [MOVE] " << _pos);
|
||||
eventTable[_pointerID].posEvent = _pos;
|
||||
localEventInput(_type,
|
||||
eventTable[_pointerID].curentWidgetEvent,
|
||||
eventTable[_pointerID].curentWidgetEvent.lock(),
|
||||
eventTable[_pointerID].destinationInputId,
|
||||
ewol::key::statusMove,
|
||||
_pos);
|
||||
@ -364,7 +347,7 @@ void ewol::context::InputManager::state(enum ewol::key::type _type,
|
||||
}
|
||||
// get the curent time ...
|
||||
int64_t currentTime = ewol::getTime();
|
||||
ewol::object::Shared<ewol::widget::Windows> tmpWindows = m_context.getWindows();
|
||||
std::shared_ptr<ewol::widget::Windows> tmpWindows = m_context.getWindows();
|
||||
|
||||
if (true == _isDown) {
|
||||
EVENT_DEBUG("GUI : Input ID=" << _pointerID
|
||||
@ -388,7 +371,7 @@ void ewol::context::InputManager::state(enum ewol::key::type _type,
|
||||
<< " [DOWN] " << _pos);
|
||||
eventTable[_pointerID].posEvent = _pos;
|
||||
localEventInput(_type,
|
||||
eventTable[_pointerID].curentWidgetEvent,
|
||||
eventTable[_pointerID].curentWidgetEvent.lock(),
|
||||
eventTable[_pointerID].destinationInputId,
|
||||
ewol::key::statusDown,
|
||||
_pos);
|
||||
@ -401,20 +384,23 @@ void ewol::context::InputManager::state(enum ewol::key::type _type,
|
||||
eventTable[_pointerID].lastTimeEvent = currentTime;
|
||||
// set the element inside ...
|
||||
eventTable[_pointerID].isInside = true;
|
||||
std::shared_ptr<ewol::Widget> tmpWidget = m_grabWidget.lock();
|
||||
// get destination widget :
|
||||
if(nullptr != tmpWindows) {
|
||||
if (m_grabWidget != nullptr && _type == ewol::key::typeMouse) {
|
||||
eventTable[_pointerID].curentWidgetEvent = m_grabWidget;
|
||||
if ( tmpWidget != nullptr
|
||||
&& _type == ewol::key::typeMouse) {
|
||||
eventTable[_pointerID].curentWidgetEvent = tmpWidget;
|
||||
} else {
|
||||
eventTable[_pointerID].curentWidgetEvent = tmpWindows->getWidgetAtPos(_pos);
|
||||
}
|
||||
} else {
|
||||
eventTable[_pointerID].curentWidgetEvent = nullptr;
|
||||
eventTable[_pointerID].curentWidgetEvent.reset();
|
||||
}
|
||||
if (nullptr != eventTable[_pointerID].curentWidgetEvent) {
|
||||
eventTable[_pointerID].origin = eventTable[_pointerID].curentWidgetEvent->getOrigin();
|
||||
eventTable[_pointerID].size = eventTable[_pointerID].curentWidgetEvent->getSize();
|
||||
eventTable[_pointerID].destinationInputId = localGetDestinationId(_type, eventTable[_pointerID].curentWidgetEvent, _pointerID);
|
||||
tmpWidget = eventTable[_pointerID].curentWidgetEvent.lock();
|
||||
if (tmpWidget != nullptr) {
|
||||
eventTable[_pointerID].origin = tmpWidget->getOrigin();
|
||||
eventTable[_pointerID].size = tmpWidget->getSize();
|
||||
eventTable[_pointerID].destinationInputId = localGetDestinationId(_type, tmpWidget, _pointerID);
|
||||
} else {
|
||||
eventTable[_pointerID].destinationInputId = -1;
|
||||
}
|
||||
@ -424,7 +410,7 @@ void ewol::context::InputManager::state(enum ewol::key::type _type,
|
||||
<< " [DOWN] " << _pos);
|
||||
eventTable[_pointerID].posEvent = _pos;
|
||||
localEventInput(_type,
|
||||
eventTable[_pointerID].curentWidgetEvent,
|
||||
tmpWidget,
|
||||
eventTable[_pointerID].destinationInputId,
|
||||
ewol::key::statusDown,
|
||||
_pos);
|
||||
@ -439,8 +425,9 @@ void ewol::context::InputManager::state(enum ewol::key::type _type,
|
||||
// Mark it un-used :
|
||||
eventTable[_pointerID].isUsed = false;
|
||||
// revove the widget ...
|
||||
eventTable[_pointerID].curentWidgetEvent = nullptr;
|
||||
eventTable[_pointerID].curentWidgetEvent.reset();
|
||||
} else {
|
||||
std::shared_ptr<ewol::Widget> tmpWidget = eventTable[_pointerID].curentWidgetEvent.lock();
|
||||
// generate UP Event
|
||||
EVENT_DEBUG("GUI : Input ID=" << _pointerID
|
||||
<< " == >" << eventTable[_pointerID].destinationInputId
|
||||
@ -448,7 +435,7 @@ void ewol::context::InputManager::state(enum ewol::key::type _type,
|
||||
eventTable[_pointerID].posEvent = _pos;
|
||||
// send up event after the single event to prevent multiple widget getting elements
|
||||
localEventInput(_type,
|
||||
eventTable[_pointerID].curentWidgetEvent,
|
||||
tmpWidget,
|
||||
_pointerID,
|
||||
ewol::key::statusUp,
|
||||
_pos);
|
||||
@ -460,14 +447,14 @@ void ewol::context::InputManager::state(enum ewol::key::type _type,
|
||||
// save start time
|
||||
eventTable[_pointerID].lastTimeEvent = currentTime;
|
||||
int32_t nbClickMax = 0;
|
||||
if(eventTable[_pointerID].curentWidgetEvent != nullptr) {
|
||||
nbClickMax = eventTable[_pointerID].curentWidgetEvent->getMouseLimit();
|
||||
if(tmpWidget != nullptr) {
|
||||
nbClickMax = tmpWidget->getMouseLimit();
|
||||
if (nbClickMax>5) {
|
||||
nbClickMax = 5;
|
||||
}
|
||||
}
|
||||
// in grab mode the single to quinte event are not generated ....
|
||||
if( ( m_grabWidget == nullptr
|
||||
if( ( m_grabWidget.lock() == nullptr
|
||||
|| _type != ewol::key::typeMouse )
|
||||
&& eventTable[_pointerID].nbClickEvent < nbClickMax) {
|
||||
// generate event SINGLE :
|
||||
@ -477,7 +464,7 @@ void ewol::context::InputManager::state(enum ewol::key::type _type,
|
||||
<< " [" << eventTable[_pointerID].nbClickEvent << "] " << _pos);
|
||||
eventTable[_pointerID].posEvent = _pos;
|
||||
localEventInput(_type,
|
||||
eventTable[_pointerID].curentWidgetEvent,
|
||||
tmpWidget,
|
||||
eventTable[_pointerID].destinationInputId,
|
||||
(enum ewol::key::status)(ewol::key::statusSingle + eventTable[_pointerID].nbClickEvent-1),
|
||||
_pos);
|
||||
@ -490,7 +477,7 @@ void ewol::context::InputManager::state(enum ewol::key::type _type,
|
||||
}
|
||||
// send up event after the single event to prevent multiple widget getting elements
|
||||
localEventInput(_type,
|
||||
eventTable[_pointerID].curentWidgetEvent,
|
||||
tmpWidget,
|
||||
_pointerID,
|
||||
ewol::key::statusUpAfter,
|
||||
_pos);
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#ifndef __EWOL_SYSTEM_INPUT_H__
|
||||
@ -22,17 +22,17 @@ namespace ewol {
|
||||
*/
|
||||
class InputPoperty {
|
||||
public:
|
||||
bool isUsed;
|
||||
int32_t destinationInputId;
|
||||
int64_t lastTimeEvent;
|
||||
ewol::object::Shared<ewol::Widget> curentWidgetEvent;
|
||||
vec2 origin;
|
||||
vec2 size;
|
||||
vec2 downStart;
|
||||
vec2 posEvent;
|
||||
bool isDown;
|
||||
bool isInside;
|
||||
int32_t nbClickEvent; // 0 .. 1 .. 2 .. 3
|
||||
bool isUsed;
|
||||
int32_t destinationInputId;
|
||||
int64_t lastTimeEvent;
|
||||
std::weak_ptr<ewol::Widget> curentWidgetEvent;
|
||||
vec2 origin;
|
||||
vec2 size;
|
||||
vec2 downStart;
|
||||
vec2 posEvent;
|
||||
bool isDown;
|
||||
bool isInside;
|
||||
int32_t nbClickEvent; // 0 .. 1 .. 2 .. 3
|
||||
};
|
||||
|
||||
/**
|
||||
@ -48,7 +48,7 @@ namespace ewol {
|
||||
class InputManager{
|
||||
// special grab pointer mode :
|
||||
private:
|
||||
ewol::object::Shared<ewol::Widget> m_grabWidget; //!< widget that grab the curent pointer.
|
||||
std::weak_ptr<ewol::Widget> m_grabWidget; //!< widget that grab the curent pointer.
|
||||
private:
|
||||
int32_t m_dpi;
|
||||
InputLimit m_eventInputLimit;
|
||||
@ -68,7 +68,7 @@ namespace ewol {
|
||||
* @return true if event has been greped
|
||||
*/
|
||||
bool localEventInput(enum ewol::key::type _type,
|
||||
ewol::object::Shared<ewol::Widget> _destWidget,
|
||||
std::shared_ptr<ewol::Widget> _destWidget,
|
||||
int32_t _IdInput,
|
||||
enum ewol::key::status _typeEvent,
|
||||
vec2 _pos);
|
||||
@ -82,7 +82,7 @@ namespace ewol {
|
||||
* @return the ewol input id
|
||||
*/
|
||||
int32_t localGetDestinationId(enum ewol::key::type _type,
|
||||
ewol::object::Shared<ewol::Widget> _destWidget,
|
||||
std::shared_ptr<ewol::Widget> _destWidget,
|
||||
int32_t _realInputId);
|
||||
private:
|
||||
ewol::Context& m_context;
|
||||
@ -94,8 +94,6 @@ namespace ewol {
|
||||
// note if id<0 == > the it was finger event ...
|
||||
void motion(enum ewol::key::type _type, int _pointerID, vec2 _pos );
|
||||
void state(enum ewol::key::type _type, int _pointerID, bool _isDown, vec2 _pos);
|
||||
|
||||
void onObjectRemove(const ewol::object::Shared<ewol::Object>& _object);
|
||||
public:
|
||||
/**
|
||||
* @brief a new layer on the windows is set == > might remove all the property of the current element ...
|
||||
@ -106,12 +104,12 @@ namespace ewol {
|
||||
* @param _source the widget where the event came from
|
||||
* @param _destination the widget where the event mitgh be generated now
|
||||
*/
|
||||
void transfertEvent(ewol::object::Shared<ewol::Widget> _source, ewol::object::Shared<ewol::Widget> _destination);
|
||||
void transfertEvent(std::shared_ptr<ewol::Widget> _source, std::shared_ptr<ewol::Widget> _destination);
|
||||
/**
|
||||
* @brief This fonction lock the pointer properties to move in relative instead of absolute
|
||||
* @param[in] _widget The widget that lock the pointer events
|
||||
*/
|
||||
void grabPointer(ewol::object::Shared<ewol::Widget> _widget);
|
||||
void grabPointer(std::shared_ptr<ewol::Widget> _widget);
|
||||
/**
|
||||
* @brief This fonction un-lock the pointer properties to move in relative instead of absolute
|
||||
*/
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#ifndef __MAC_OS_CONTEXT_H__
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#ifndef __EWOL_MM_INTERFACE_H__
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#include <etk/types.h>
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#ifndef __EWOL_CLIPBOARD_H__
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#include <ewol/debug.h>
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#ifndef __EWOL_COMMAND_LINE_H__
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#include <ewol/context/cursor.h>
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#ifndef __EWOL_CURSOR_H__
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#include <ewol/debug.h>
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#ifndef __EWOL_DEBUG_H__
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#include <ewol/widget/Widget.h>
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#ifndef __EWOL_EVENT_ENTRY_H__
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#include <ewol/widget/Widget.h>
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#ifndef __EWOL_EVENT_INPUT_H__
|
||||
@ -78,7 +78,7 @@ namespace ewol {
|
||||
enum ewol::key::status _status,
|
||||
uint8_t _id,
|
||||
const vec2& _pos,
|
||||
ewol::object::Shared<ewol::Widget> _dest,
|
||||
std::shared_ptr<ewol::Widget> _dest,
|
||||
int32_t _realIdEvent,
|
||||
ewol::key::Special _specialKey) :
|
||||
m_event(_type, _status, _id, _pos, _specialKey),
|
||||
@ -86,13 +86,13 @@ namespace ewol {
|
||||
m_realIdEvent(_realIdEvent) { };
|
||||
ewol::event::Input m_event;
|
||||
private:
|
||||
ewol::object::Shared<ewol::Widget> m_dest;
|
||||
std::shared_ptr<ewol::Widget> m_dest;
|
||||
int32_t m_realIdEvent;
|
||||
public:
|
||||
void setDestWidget(ewol::object::Shared<ewol::Widget> _dest) {
|
||||
void setDestWidget(std::shared_ptr<ewol::Widget> _dest) {
|
||||
m_dest = _dest;
|
||||
};
|
||||
inline ewol::object::Shared<ewol::Widget> getDestWidget() const {
|
||||
inline std::shared_ptr<ewol::Widget> getDestWidget() const {
|
||||
return m_dest;
|
||||
};
|
||||
void setRealId(int32_t _realIdEvent) {
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#include <ewol/widget/Widget.h>
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#ifndef __EWOL_EVENT_CALL_TIME_H__
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#include <ewol/ewol.h>
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#ifndef __EWOL_H__
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#include <ewol/key/Special.h>
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#ifndef __EWOL_KEY_SPECIAL_H__
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#ifndef __EWOL_KEY_H__
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#include <ewol/key/keyboard.h>
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#ifndef __EWOL_KEY_KEYBOARD_H__
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#include <ewol/key/status.h>
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#ifndef __EWOL_KEY_STATUS_H__
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#include <ewol/key/type.h>
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#ifndef __EWOL_KEY_TYPE_H__
|
||||
|
@ -1,21 +0,0 @@
|
||||
/**
|
||||
* @author Edouard DUPIN
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
*/
|
||||
|
||||
#include <ewol/object/Config.h>
|
||||
#include <etk/types.h>
|
||||
|
||||
|
||||
#undef __class__
|
||||
#define __class__ "object::Config"
|
||||
|
||||
std::ostream& ewol::operator <<(std::ostream& _os, const ewol::object::Config& _obj) {
|
||||
_os << "{";
|
||||
_os << "config=\"" << _obj.getConfig() << "\"";
|
||||
_os << " data=\"" << _obj.getData() << "\"}";
|
||||
return _os;
|
||||
}
|
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