From 8e85f28fc8f502eff903f2c6ddd16a0fa92b22f0 Mon Sep 17 00:00:00 2001 From: Edouard Dupin Date: Mon, 20 Feb 2012 20:32:06 +0100 Subject: [PATCH] remove deprecated classes : singleton --- Sources/libetk/etk/Singleton.h | 72 --------------------------------- Sources/libewol/ewol/Widget.cpp | 9 ++--- Sources/libewol/ewol/Windows.h | 1 - 3 files changed, 4 insertions(+), 78 deletions(-) delete mode 100644 Sources/libetk/etk/Singleton.h diff --git a/Sources/libetk/etk/Singleton.h b/Sources/libetk/etk/Singleton.h deleted file mode 100644 index bdba196c..00000000 --- a/Sources/libetk/etk/Singleton.h +++ /dev/null @@ -1,72 +0,0 @@ -/** - ******************************************************************************* - * @file etk/Singleton.h - * @brief ewol : singleton system class - * @author Edouard DUPIN - * @date 04/12/2010 - * @par Project - * ewol TK - * - * @par Copyright - * Copyright 2011 Edouard DUPIN, all right reserved - * - * This software is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY. - * - * Licence summary : - * You can modify and redistribute the sources code and binaries. - * You can send me the bug-fix - * - * Term of the licence in in the file licence.txt. - * - ******************************************************************************* - */ - -#ifndef __ETK_SINGLETON_H__ -#define __ETK_SINGLETON_H__ - - -namespace etk { - template class Singleton - { - protected: - // Constructeur/destructeur - Singleton(void) { } - ~Singleton(void) { /*std::cout << "destroying singleton." << std::endl;*/ } - public: - // Interface publique - static T *Get(void) - { - if (NULL == _singleton) - { - _singleton = new T; - } - return (static_cast (_singleton)); - } - static T *getInstance(void) - { - if (NULL == _singleton) - { - _singleton = new T; - } - return (static_cast (_singleton)); - } - static void Kill(void) - { - if (NULL != _singleton) - { - delete _singleton; - _singleton = NULL; - } - } - private: - // Unique instance - static T *_singleton; - }; - - template T *Singleton::_singleton = NULL; -} - -#endif - - diff --git a/Sources/libewol/ewol/Widget.cpp b/Sources/libewol/ewol/Widget.cpp index d6f1c934..c9713d2e 100644 --- a/Sources/libewol/ewol/Widget.cpp +++ b/Sources/libewol/ewol/Widget.cpp @@ -236,12 +236,11 @@ void ewol::Widget::SetCanHaveFocus(bool canFocusState) } } -#define TEST_CLIPPING_SIZE (10) +//#define TEST_CLIPPING_SIZE (10) //#define TEST_CLIPPING_SIZE (3) -//#define TEST_CLIPPING_SIZE (0) +#define TEST_CLIPPING_SIZE (0) -#if 1 -//def __PLATFORM__Android +#ifdef __PLATFORM__Android # define clipping_type GLfloat # define clipping_function glClipPlanef #else @@ -255,7 +254,7 @@ bool ewol::Widget::GenDraw(void) glTranslatef(m_origin.x,m_origin.y, 0); //GLfloat clipping_type eqn1[4] = { 0.0, 1.0, 0.0, -TEST_CLIPPING_SIZE}; // less the Y pos ... - clipping_type eqn2[4] = { 0.0, -1.0, 0.0, m_size.y-TEST_CLIPPING_SIZE-50}; // upper the y pos ... + clipping_type eqn2[4] = { 0.0, -1.0, 0.0, m_size.y-TEST_CLIPPING_SIZE}; // upper the y pos ... clipping_type eqn3[4] = { 1.0, 0.0, 0.0, -TEST_CLIPPING_SIZE}; // less the x pos ... clipping_type eqn4[4] = {-1.0, 0.0, 0.0, m_size.x-TEST_CLIPPING_SIZE}; // upper the x pos ... //EWOL_DEBUG("widget size (" << m_size.x << "," << m_size.y << ")" ); diff --git a/Sources/libewol/ewol/Windows.h b/Sources/libewol/ewol/Windows.h index e756be21..3bd02502 100644 --- a/Sources/libewol/ewol/Windows.h +++ b/Sources/libewol/ewol/Windows.h @@ -28,7 +28,6 @@ #include #include #include -#include #include #include