more API changes

now all examples should compile again


SVN revision: 44074
master
Andreas Volz 13 years ago
parent c97f9972df
commit 66d39ffc17
  1. 4
      ecorexx/include/ecorexx/Application.h
  2. 2
      ecorexx/src/Application.cpp
  3. 20
      ecorexx/src/EvasWindow.cpp
  4. 4
      eetxx/include/eetxx/Chunk.h
  5. 4
      eetxx/include/eetxx/ChunkIterator.h
  6. 4
      eetxx/include/eetxx/DataInformation.h
  7. 4
      eetxx/include/eetxx/Document.h
  8. 4
      eetxx/include/eetxx/List.h
  9. 4
      eetxx/src/Chunk.cpp
  10. 4
      eetxx/src/ChunkIterator.cpp
  11. 4
      eetxx/src/Document.cpp
  12. 4
      eetxx/src/List.cpp
  13. 5
      eflxx_examples/configure.ac
  14. 1
      eflxx_examples/src/Makefile.am
  15. 8
      eflxx_examples/src/debug/simple/main.cpp
  16. 24
      eflxx_examples/src/ecorexx/3dstars/main.cpp
  17. 44
      eflxx_examples/src/ecorexx/calibrate/calibrate.cpp
  18. 29
      eflxx_examples/src/ecorexx/calibrate/calibrate.h
  19. 12
      eflxx_examples/src/ecorexx/calibrate/main.cpp
  20. 24
      eflxx_examples/src/ecorexx/callbacks/main.cpp
  21. 9
      eflxx_examples/src/ecorexx/config/main.cpp
  22. 10
      eflxx_examples/src/ecorexx/list/main.cpp
  23. 50
      eflxx_examples/src/ecorexx/paint/main.cpp
  24. 18
      eflxx_examples/src/ecorexx/simple/main.cpp
  25. 23
      eflxx_examples/src/ecorexx/stars/main.cpp
  26. 24
      eflxx_examples/src/ecorexx/timers/main.cpp
  27. 23
      eflxx_examples/src/ecorexx/x/main.cpp
  28. 12
      eflxx_examples/src/edjexx/simple/main.cpp
  29. 11
      eflxx_examples/src/eetxx/simple_write_read/read_eet.cpp
  30. 15
      eflxx_examples/src/eetxx/simple_write_read/write_eet.cpp
  31. 18
      eflxx_examples/src/elementaryxx/full/main.cpp
  32. 3
      eflxx_examples/src/elementaryxx/full/test.h
  33. 10
      eflxx_examples/src/elementaryxx/full/test_bg.cpp
  34. 28
      eflxx_examples/src/elementaryxx/full/test_box.cpp
  35. 28
      eflxx_examples/src/elementaryxx/full/test_button.cpp
  36. 28
      eflxx_examples/src/elementaryxx/full/test_check.cpp
  37. 18
      eflxx_examples/src/elementaryxx/full/test_clock.cpp
  38. 66
      eflxx_examples/src/elementaryxx/full/test_entry.cpp
  39. 68
      eflxx_examples/src/elementaryxx/full/test_hover.cpp
  40. 6
      eflxx_examples/src/elementaryxx/full/test_icon.cpp
  41. 14
      eflxx_examples/src/elementaryxx/full/test_layout.cpp
  42. 36
      eflxx_examples/src/elementaryxx/full/test_notepad.cpp
  43. 6
      eflxx_examples/src/elementaryxx/full/test_panel.cpp
  44. 76
      eflxx_examples/src/elementaryxx/full/test_progressbar.cpp
  45. 32
      eflxx_examples/src/elementaryxx/full/test_radio.cpp
  46. 24
      eflxx_examples/src/elementaryxx/full/test_slider.cpp
  47. 14
      eflxx_examples/src/elementaryxx/full/test_spinner.cpp
  48. 20
      eflxx_examples/src/elementaryxx/full/test_table.cpp
  49. 22
      eflxx_examples/src/elementaryxx/full/test_toggle.cpp
  50. 27
      eflxx_examples/src/elementaryxx/simple/main.cpp
  51. 16
      eflxx_examples/src/emotionxx/simple/main.cpp
  52. 24
      eflxx_examples/src/esmartxx/container/main.cpp
  53. 20
      eflxx_examples/src/esmartxx/group/main.cpp
  54. 18
      eflxx_examples/src/esmartxx/textentry/main.cpp
  55. 24
      evasxx/include/evasxx/Event.h
  56. 16
      evasxx/include/evasxx/Object.h
  57. 16
      evasxx/src/Object.cpp

@ -19,7 +19,7 @@
#include <string>
#include <list>
#define eApp Application::application()
//#define eApp Application::application()
/**
* C++ Wrapper for the Enlightenment Core Library (Ecore)
@ -55,7 +55,7 @@ public:
Application( int argc, const char** argv, const std::string& name );
virtual ~Application();
static Application* application();
static Application* getInstance();
std::string getName() const;

@ -61,7 +61,7 @@ Application::~Application()
ecore_shutdown();
}
Application* Application::application()
Application* Application::getInstance()
{
if ( !Application::_instance )
{

@ -24,7 +24,7 @@ namespace Ecorexx {
#define ECORE_EVAS_CALLBACK( name, func ) \
static void name( Ecore_Evas* ee ) \
{ \
eApp->getMainWindow()->func(); \
Application::getInstance()->getMainWindow()->func(); \
}
ECORE_EVAS_CALLBACK( callback_resize_dispatcher, resizeEvent )
@ -141,7 +141,7 @@ void EvasWindow::hideEvent()
void EvasWindow::deleteRequestEvent()
{
Dout( dc::notice, "EvasWindow::deleteRequestEvent()" );
if ( canClose() ) eApp->quit();
if ( canClose() ) Application::quit();
}
void EvasWindow::destroyEvent()
@ -436,7 +436,7 @@ EvasWindowSoftwareX11::EvasWindowSoftwareX11( const Eflxx::Size &size, const cha
:EvasWindow()
{
Dout( dc::notice, "EvasWindow::EvasWindowSoftwareX11" );
Application::application()->setMainWindow( this );
Application::getInstance()->setMainWindow( this );
/*if ( ::getenv( "EFL_DISPLAY" ) ) display = ::getenv( "EFL_DISPLAY" );
if ( ::getenv( "EFL_WIDTH" ) ) size.width (atoi( ::getenv( "EFL_WIDTH" ) ));
@ -446,7 +446,7 @@ EvasWindowSoftwareX11::EvasWindowSoftwareX11( const Eflxx::Size &size, const cha
//FIXME: Should we care about positioning? 0, 0 for now
_ee = ecore_evas_software_x11_new( const_cast<char*>( display ), 0, 0, 0, size.width (), size.height () );
ecore_evas_title_set( _ee, eApp->getName().c_str() );
ecore_evas_title_set( _ee, Application::getInstance()->getName().c_str() );
ecore_evas_borderless_set( _ee, 0 );
_canvas = new Evasxx::Canvas( ecore_evas_get( _ee ) );
@ -475,7 +475,7 @@ EvasWindowGLX11::EvasWindowGLX11( const Eflxx::Size &size, const char* display )
:EvasWindow()
{
Dout( dc::notice, "EvasWindow::EvasWindowGL" );
Application::application()->setMainWindow( this );
Application::getInstance()->setMainWindow( this );
/*if ( ::getenv( "EFL_DISPLAY" ) ) display = ::getenv( "EFL_DISPLAY" );
if ( ::getenv( "EFL_WIDTH" ) ) size.width (atoi( ::getenv( "EFL_WIDTH" ) ));
@ -485,7 +485,7 @@ EvasWindowGLX11::EvasWindowGLX11( const Eflxx::Size &size, const char* display )
//FIXME: Should we care about positioning? 0, 0 for now
_ee = ecore_evas_gl_x11_new( const_cast<char*>( display ), 0, 0, 0, size.width (), size.height () );
ecore_evas_title_set( _ee, eApp->getName().c_str() );
ecore_evas_title_set( _ee, Application::getInstance()->getName().c_str() );
ecore_evas_borderless_set( _ee, 0 );
_canvas = new Evasxx::Canvas( ecore_evas_get( _ee ) );
@ -515,7 +515,7 @@ EvasWindowXRenderX11::EvasWindowXRenderX11( const Eflxx::Size &size, const char*
:EvasWindow()
{
Dout( dc::notice, "EvasWindow::EvasWindowGL" );
Application::application()->setMainWindow( this );
Application::getInstance()->setMainWindow( this );
/*if ( ::getenv( "EFL_DISPLAY" ) ) display = ::getenv( "EFL_DISPLAY" );
if ( ::getenv( "EFL_WIDTH" ) ) size.width (atoi( ::getenv( "EFL_WIDTH" ) ));
@ -525,7 +525,7 @@ EvasWindowXRenderX11::EvasWindowXRenderX11( const Eflxx::Size &size, const char*
//FIXME: Should we care about positioning? 0, 0 for now
_ee = ecore_evas_xrender_x11_new( const_cast<char*>( display ), 0, 0, 0, size.width (), size.height () );
ecore_evas_title_set( _ee, eApp->getName().c_str() );
ecore_evas_title_set( _ee, Application::getInstance()->getName().c_str() );
ecore_evas_borderless_set( _ee, 0 );
_canvas = new Evasxx::Canvas( ecore_evas_get( _ee ) );
@ -555,7 +555,7 @@ EvasWindowFB::EvasWindowFB( const Eflxx::Size &size, const char* display, int ro
:EvasWindow()
{
Dout( dc::notice, "EvasWindow::EvasWindowFB" );
Application::application()->setMainWindow( this );
Application::getInstance()->setMainWindow( this );
/*if ( ::getenv( "EFL_DISPLAY" ) ) display = ::getenv( "EFL_DISPLAY" );
if ( ::getenv( "EFL_WIDTH" ) ) size.width (atoi( ::getenv( "EFL_WIDTH" ) ));
@ -606,7 +606,7 @@ EvasWindowFB::EvasWindowFB( const Eflxx::Size &size, const char* display, int ro
#endif
}
ecore_evas_title_set( _ee, eApp->getName().c_str() );
ecore_evas_title_set( _ee, Application::getInstance()->getName().c_str() );
ecore_evas_borderless_set( _ee, 0 );
_canvas = new Evasxx::Canvas( ecore_evas_get( _ee ) );

@ -10,7 +10,7 @@
//! EFLxx includes
#include "DataInformation.h"
namespace eet {
namespace Eetxx {
/* forward declarations */
class Document;
@ -70,6 +70,6 @@ private:
ptr_type _data;
};
} // end namespace eet
} // end namespace Eetxx
#endif // EET_CHUNK_H

@ -4,7 +4,7 @@
/* EFLxx includes */
#include "Chunk.h"
namespace eet {
namespace Eetxx {
/* forward declarations */
class Document;
@ -31,6 +31,6 @@ private:
Document &_doc;
};
} // end namespace eet
} // end namespace Eetxx
#endif // EET_CHUNK_ITERATOR_H

@ -1,7 +1,7 @@
#ifndef EET_DATA_INFORMATION_H
#define EET_DATA_INFORMATION_H
namespace eet {
namespace Eetxx {
template <typename _Ty>
class DataInformation
@ -35,6 +35,6 @@ make_data (_Ty *data, bool compress = false, unsigned int size = sizeof (_Ty))
return DataInformation<_Ty *> (data, compress, size);
}
} // namespace eet
} // namespace Eetxx
#endif // EET_DATA_INFORMATION_H

@ -14,7 +14,7 @@
* @author Jonathan Muller <jonathan.muller@drylm.org>
*/
namespace eet {
namespace Eetxx {
class Document
{
@ -37,6 +37,6 @@ private:
Eet_File *_ef;
};
} // end namespace eet
} // end namespace Eetxx
#endif //EET_DOCUMENT_H

@ -5,7 +5,7 @@
#include "Chunk.h"
#include "ChunkIterator.h"
namespace eet {
namespace Eetxx {
/* forward declarations */
class Document;
@ -31,6 +31,6 @@ private:
int _nb_elems;
};
} // namespace eet
} // namespace Eetxx
#endif // EET_LIST_H

@ -4,7 +4,7 @@
#include "../include/eetxx/Chunk.h"
namespace eet {
namespace Eetxx {
Chunk::Chunk (Eet_File *ef, const std::string &key_name)
: _ef (ef),
@ -29,4 +29,4 @@ std::string Chunk::get_key () const
return _key_name;
}
} // end namespace eet
} // end namespace Eetxx

@ -5,7 +5,7 @@
#include "../include/eetxx/ChunkIterator.h"
#include "../include/eetxx/Document.h"
namespace eet {
namespace Eetxx {
ChunkIterator::ChunkIterator (char **chunk, Document &doc)
: the_chunk (chunk),
@ -40,4 +40,4 @@ ChunkIterator ChunkIterator::operator ++ (int) throw ()
return tem;
}
} // end namespace eet
} // end namespace Eetxx

@ -4,7 +4,7 @@
#include "../include/eetxx/Document.h"
namespace eet {
namespace Eetxx {
void Document::init ()
{
@ -26,4 +26,4 @@ Eet_File *Document::get ()
return _ef;
}
} // end namespace eet
} // end namespace Eetxx

@ -5,7 +5,7 @@
#include "../include/eetxx/List.h"
#include "../include/eetxx/Document.h"
namespace eet {
namespace Eetxx {
List::List (Document& doc, const std::string &filter)
: _doc (doc),
@ -40,4 +40,4 @@ Chunk List::operator [] (const std::string &key_name)
return Chunk (_doc.get (), key_name);
}
} // end namespace eet
} // end namespace Eetxx

@ -97,7 +97,6 @@ AC_DEFINE_UNQUOTED(SYSTEM_PIXMAPS_DIR, "${packageprefix}/${systempixmapsdir}",""
AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}","")
#PKG_CHECK_MODULES(ETKXX, etkxx)
PKG_CHECK_MODULES(ESMARTXX_CONTAINER, esmartxx_container)
PKG_CHECK_MODULES(ESMARTXX_GROUP, esmartxx_group)
PKG_CHECK_MODULES(ESMARTXX_TEXTENTRY, esmartxx_textentry)
@ -105,7 +104,6 @@ PKG_CHECK_MODULES(EDJEXX, edjexx)
PKG_CHECK_MODULES(EFL, eflxx)
PKG_CHECK_MODULES(ECOREXX, ecorexx)
PKG_CHECK_MODULES(EETXX, eetxx)
PKG_CHECK_MODULES(EWLXX, ewlxx)
PKG_CHECK_MODULES(EMOTIONXX, emotionxx)
PKG_CHECK_MODULES(ELEMENTARYXX, elementaryxx)
AC_OUTPUT([
@ -135,9 +133,6 @@ src/esmartxx/group/Makefile
src/esmartxx/textentry/Makefile
src/eetxx/Makefile
src/eetxx/simple_write_read/Makefile
src/ewlxx/Makefile
src/ewlxx/embed/Makefile
src/ewlxx/simple/Makefile
src/emotionxx/Makefile
src/emotionxx/simple/Makefile
src/elementaryxx/Makefile

@ -17,7 +17,6 @@ SUBDIRS = \
esmartxx \
ecorexx \
eetxx \
ewlxx \
emotionxx \
debug \
signals \

@ -1,10 +1,10 @@
#include <eflxx/eflpp_sys.h>
#include <eflxx/eflpp_common.h>
#include <eflxx/eflpp_debug.h>
#include <eflxx/System.h>
#include <eflxx/Common.h>
#include <eflxx/Debug.h>
#include <iostream>
using namespace efl;
using namespace Eflxx;
using namespace std;
class DebugGuard

@ -1,7 +1,5 @@
#include <eflxx/eflpp_sys.h>
#include <eflxx/eflpp_debug.h>
#include <ecorexx/EcoreApplication.h>
#include <ecorexx/EcoreTimer.h>
#include <eflxx/Eflxx.h>
#include <ecorexx/Ecorexx.h>
#include <evasxx/Evasxx.h>
#include <sigc++/sigc++.h>
@ -10,7 +8,7 @@
#include <memory>
using namespace std;
using namespace efl;
using namespace Eflxx;
const unsigned int WIDTH = 600;
const unsigned int HEIGHT = 600;
@ -21,11 +19,11 @@ const double rotation = 0.0005;
static int width = 0;
static int height = 0;
class Star : public EvasLine
class Star : public Evasxx::Line
{
static double angle;
public:
Star( EvasCanvas &evas ) : EvasLine( evas )
Star( Evasxx::Canvas &evas ) : Evasxx::Line( evas )
{
setLayer( 10 );
reset();
@ -80,7 +78,7 @@ typedef list<Star*> Starfield;
typedef list<Star*>::iterator StarfieldIterator;
Starfield starfield;
void advance( EcoreTimer* e )
void advance( Ecorexx::Timer* e )
{
for (StarfieldIterator it = starfield.begin(); it != starfield.end(); ++it )
{
@ -91,15 +89,15 @@ void advance( EcoreTimer* e )
int main( int argc, const char **argv )
{
auto_ptr <EcoreApplication> app (new EcoreApplication( argc, argv, "Ecore 3D Stars Test" ));
auto_ptr <EcoreEvasWindowSoftwareX11> mw (new EcoreEvasWindowSoftwareX11( Size (WIDTH, HEIGHT) ));
EvasCanvas &evas = mw->getCanvas();
auto_ptr <Ecorexx::Application> app (new Ecorexx::Application( argc, argv, "Ecore 3D Stars Test" ));
auto_ptr <Ecorexx::EvasWindowSoftwareX11> mw (new Ecorexx::EvasWindowSoftwareX11( Size (WIDTH, HEIGHT) ));
Evasxx::Canvas &evas = mw->getCanvas();
Rect bg = evas.getGeometry();
width = bg.width();
height = bg.height();
auto_ptr <EvasRectangle> r (new EvasRectangle( evas, evas.getGeometry() ));
auto_ptr <Evasxx::Rectangle> r (new Evasxx::Rectangle( evas, evas.getGeometry() ));
r->setColor( Color (0, 0, 0, 255) );
r->setLayer( 0 );
r->show();
@ -113,7 +111,7 @@ int main( int argc, const char **argv )
// FIXME: Memory leak, but ok for this example
// better use CountedPtr or delete it at the end
(new EcoreTimer( 0.05 ) )->timeout.connect( sigc::ptr_fun( ::advance ) );
(new Ecorexx::Timer( 0.05 ) )->timeout.connect( sigc::ptr_fun( ::advance ) );
mw->show();

@ -2,8 +2,8 @@
#include <config.h>
#endif
#include <eflxx/eflpp_sys.h>
#include <ecorexx/EcoreApplication.h>
#include <eflxx/System.h>
#include <ecorexx/Ecorexx.h>
#include <evasxx/Evasxx.h>
#include "../../common/searchFile.h"
@ -58,8 +58,8 @@ static void calibration_event_filter_end( void* data, void *loop_data )
{
}
CalibrationRectangle::CalibrationRectangle( EvasCanvas &evas, const Rect &rect )
:EvasRectangle( evas, rect), Trackable( "CalibrationRectangle" )
CalibrationRectangle::CalibrationRectangle( Evasxx::Canvas &evas, const Rect &rect )
:Evasxx::Rectangle( evas, rect), Trackable( "CalibrationRectangle" )
{
setLayer( 255 );
setColor( Color (255, 255, 255, 0) ); // white, fully transparent
@ -72,7 +72,7 @@ CalibrationRectangle::CalibrationRectangle( EvasCanvas &evas, const Rect &rect )
cd.canvasPoints[TopRight].set( s.width()-offset, offset );
cd.canvasPoints[Center].set( s.width()/2, s.height()/2 );
switch ( eApp->getMainWindow()->rotation() )
switch ( Ecorexx::Application::getInstance()->getMainWindow()->rotation() )
{
case 0:
cout << "ROT 0" << endl;
@ -109,13 +109,13 @@ CalibrationRectangle::CalibrationRectangle( EvasCanvas &evas, const Rect &rect )
}
// setup floor
EvasRectangle* floor = new EvasRectangle( evas, Rect (0, 0, s.width(), s.height()) );
Evasxx::Rectangle* floor = new Evasxx::Rectangle( evas, Rect (0, 0, s.width(), s.height()) );
floor->setLayer( 0 );
floor->setColor( Color (0, 0, 0, 255) );
floor->show();
// setup background
background = new EvasGradient( evas, Rect (0, 0, s.width(), s.height()) );
background = new Evasxx::Gradient( evas, Rect (0, 0, s.width(), s.height()) );
background->setLayer( 5 );
background->setAngle( angle = 13 );
background->addColorStop( Color (255, 255, 255, 255), 10 );
@ -125,26 +125,26 @@ CalibrationRectangle::CalibrationRectangle( EvasCanvas &evas, const Rect &rect )
//background->show();
//new CalibrationAnimator( CalibrationAnimator::alpha, background, 255, 0 );
EvasImage* t1 = new EvasImage( evas, searchPixmapFile ("panel.png") );
Evasxx::Image* t1 = new Evasxx::Image( evas, searchPixmapFile ("panel.png") );
t1->setGeometry( Rect (0, 0, s.width(), s.height()) );
t1->setColor( Color (255, 255, 255, 255) );
t1->setLayer( 10 );
t1->show();
EvasImage* t2 = new EvasImage( evas, searchPixmapFile ("shadow.png") );
Evasxx::Image* t2 = new Evasxx::Image( evas, searchPixmapFile ("shadow.png") );
t2->setGeometry( Rect (0, 0, s.width(), s.height()) );
t2->setLayer( 15 );
t2->show();
// setup text
text = new EvasText( evas, searchFontFile ("Vera.ttf"), 12, Point (5, s.height()/2.5), "foo" );
text = new Evasxx::Text( evas, searchFontFile ("Vera.ttf"), 12, Point (5, s.height()/2.5), "foo" );
text->setColor( Color (0, 0, 0, 255) );
text->setLayer( 22 );
text->setText( "Click on crosshair to calibrate screen" );
text->show();
#if 0
EvasImage* image = new EvasImage( evas, searchPixmapFile ("angstrom.png") );
Evasxx::Image* image = new Evasxx::Image( evas, searchPixmapFile ("angstrom.png") );
image->rresize( 0.6 );
Rect geom = image->getGeometry();
cout << "Image size = " << image->getSize() << ", imageSize = " << image->getImageSize() << ", geometry = " << image->getGeometry() << endl;
@ -153,17 +153,17 @@ CalibrationRectangle::CalibrationRectangle( EvasCanvas &evas, const Rect &rect )
image->setLayer( 15 );
image->show();
#endif
EcoreAnimator::setFrameTime( 0.004 );
Ecorexx::Animator::setFrameTime( 0.004 );
// setup crosshair
crosshair = new EvasImage( evas, searchPixmapFile ("crosshair.png") );
crosshair = new Evasxx::Image( evas, searchPixmapFile ("crosshair.png") );
crosshair->setLayer( 23 );
crosshairShadow = new EvasImage( evas, searchPixmapFile ("crosshair.png") );
crosshairShadow = new Evasxx::Image( evas, searchPixmapFile ("crosshair.png") );
crosshairShadow->setLayer( 22 );
crosshairShadow->setColor( Color (150, 150, 150, 50) );
crosshairhorz = new EvasLine( evas );
crosshairvert = new EvasLine( evas );
crosshairhorz = new Evasxx::Line( evas );
crosshairvert = new Evasxx::Line( evas );
crosshairhorz->setLayer( 23 );
crosshairvert->setLayer( 23 );
crosshairhorz->setColor( Color (0, 0, 0, 255) );
@ -194,7 +194,7 @@ bool CalibrationRectangle::handleShow()
return true;
}
bool CalibrationRectangle::handleMouseUp( const EvasMouseUpEvent& e )
bool CalibrationRectangle::handleMouseUp( const Evasxx::MouseUpEvent& e )
{
nextPoint( e.data->canvas.x, e.data->canvas.y );
@ -225,7 +225,7 @@ void CalibrationRectangle::nextPoint( int x, int y )
ecore_event_filter_del( filter );
calibrate();
done.emit();
eApp->quit();
Ecorexx::Application::quit();
}
}
@ -355,8 +355,8 @@ bool CalibrationRectangle::calibrate()
return true;
}
CalibrationAnimator::CalibrationAnimator( CAtype t, EvasObject* o, int x, int y )
:EcoreAnimator(), _t( t ), _o( o ), _x( x ), _y( y )
CalibrationAnimator::CalibrationAnimator( CAtype t, Evasxx::Object* o, int x, int y )
:Ecorexx::Animator(), _t( t ), _o( o ), _x( x ), _y( y )
{
}
@ -396,11 +396,11 @@ bool CalibrationAnimator::tick()
_o->move( Point (newx, newy) );
return true;
case angle:
newx = static_cast<EvasGradient*>( _o )->getAngle();
newx = static_cast<Evasxx::Gradient*>( _o )->getAngle();
if ( newx == _x ) return false;
if ( newx > _x ) newx--;
if ( newx < _x ) newx++;
static_cast<EvasGradient*>( _o )->setAngle( newx );
static_cast<Evasxx::Gradient*>( _o )->setAngle( newx );
return true;
case alpha:
c = _o->getColor();

@ -1,11 +1,10 @@
#ifndef CALIBRATE_H
#define CALIBRATE_H
#include <ecorexx/EcoreApplication.h>
#include <ecorexx/EcoreAnimator.h>
#include <ecorexx/Ecorexx.h>
#include <evasxx/Evasxx.h>
using namespace efl;
using namespace Eflxx;
enum
{
@ -25,10 +24,10 @@ public:
Point canvasPoints[5]; // rotated, scaled
};
class CalibrationRectangle : public EvasRectangle, public Trackable
class CalibrationRectangle : public Evasxx::Rectangle, public Trackable
{
public:
CalibrationRectangle( EvasCanvas &evas, const Rect &rect );
CalibrationRectangle( Evasxx::Canvas &evas, const Rect &rect );
virtual ~CalibrationRectangle();
Signal done;
@ -38,34 +37,34 @@ public:
void timerEvent();
protected:
virtual bool handleMouseUp( const EvasMouseUpEvent& );
virtual bool handleMouseUp( const Evasxx::MouseUpEvent& );
virtual bool handleShow();
void moveCrossHair();
private:
CalibrationData cd;
unsigned int position;
EvasGradient* background;
EvasImage* crosshair;
EvasImage* crosshairShadow;
EvasLine* crosshairhorz;
EvasLine* crosshairvert;
EvasText* text;
Evasxx::Gradient* background;
Evasxx::Image* crosshair;
Evasxx::Image* crosshairShadow;
Evasxx::Line* crosshairhorz;
Evasxx::Line* crosshairvert;
Evasxx::Text* text;
int angle;
};
class CalibrationAnimator : public EcoreAnimator
class CalibrationAnimator : public Ecorexx::Animator
{
public:
enum CAtype { position, size, angle, alpha };
CalibrationAnimator( CAtype, EvasObject* o, int x, int y );
CalibrationAnimator( CAtype, Evasxx::Object* o, int x, int y );
~CalibrationAnimator();
virtual bool tick();
private:
CAtype _t;
EvasObject* _o;
Evasxx::Object* _o;
int _x;
int _y;
};

@ -1,18 +1,18 @@
#include <eflxx/eflpp_sys.h>
#include <eflxx/System.h>
#include <evasxx/Evasxx.h>
#include <ecorexx/EcoreApplication.h>
#include <ecorexx/Ecorexx.h>
#include "calibrate.h"
using namespace efl;
using namespace Eflxx;
#define WIDTH 240
#define HEIGHT 320
int main( int argc, const char **argv )
{
EcoreApplication app( argc, argv, "Ecore Calibration Example" );
EcoreEvasWindowSoftwareX11* mw = new EcoreEvasWindowSoftwareX11( Size (WIDTH, HEIGHT) );
EvasCanvas &evas = mw->getCanvas();
Ecorexx::Application app( argc, argv, "Ecore Calibration Example" );
Ecorexx::EvasWindowSoftwareX11* mw = new Ecorexx::EvasWindowSoftwareX11( Size (WIDTH, HEIGHT) );
Evasxx::Canvas &evas = mw->getCanvas();
Size s = evas.getSize();
CalibrationRectangle* r = new CalibrationRectangle( evas, Rect (0, 0, s.width(), s.height()) );

@ -1,12 +1,12 @@
#include <evasxx/Evasxx.h>
#include <ecorexx/EcoreApplication.h>
#include <ecorexx/Ecorexx.h>
#include "../../common/searchFile.h"
#include <cmath>
#include <iostream>
using namespace std;
using namespace efl;
using namespace Eflxx;
const int WIDTH = 320;
const int HEIGHT = 320;
@ -16,40 +16,40 @@ const unsigned int BALLSIZE = 50;
const unsigned int BALLWIDTH = WIDTH-BALLSIZE;
const unsigned int BALLHEIGHT = HEIGHT-BALLSIZE;
class TimerApp : public EcoreApplication
class TimerApp : public Ecorexx::Application
{
public:
TimerApp( int argc, const char** argv ) : EcoreApplication( argc, argv, "Ecore Timer Test" ),
TimerApp( int argc, const char** argv ) : Ecorexx::Application( argc, argv, "Ecore Timer Test" ),
xoffset( 0 ), yoffset( PI/3 ),
xstep( 2*PI/360 ), ystep( 2*PI/360 ),
size( BALLSIZE ), direction( -1 ),
alpha( 0 ), alphadirection( 1 ),
xaddfactor( 1 ), yaddfactor( 1 )
{
EcoreEvasWindowSoftwareX11* mw = new EcoreEvasWindowSoftwareX11( size );
EvasCanvas &evas = mw->getCanvas();
Ecorexx::EvasWindowSoftwareX11* mw = new Ecorexx::EvasWindowSoftwareX11( size );
Evasxx::Canvas &evas = mw->getCanvas();
const Size size (WIDTH, HEIGHT);
image = new EvasImage( evas, searchPixmapFile ("panel.png") );
image = new Evasxx::Image( evas, searchPixmapFile ("panel.png") );
image->resize( size );
image->setFill( Rect (0, 0, WIDTH, HEIGHT) );
image->show();
shadow = new EvasImage( evas, searchPixmapFile ("panel_shadow.png" ));
shadow = new Evasxx::Image( evas, searchPixmapFile ("panel_shadow.png" ));
shadow->resize( size );
shadow->setFill( Rect (0, 0, WIDTH, HEIGHT) );
shadow->show();
shadow->setFocus( true );
logo = new EvasImage( evas, searchPixmapFile ("e_logo.png") );
logo = new Evasxx::Image( evas, searchPixmapFile ("e_logo.png") );
logo->setColor( Color (255, 255, 255, 0) );
logo->show();
for ( unsigned int i = 0; i < NUMBALLS; ++i )
{
balls[i] = new EvasImage( evas, Point (20*i, 20*i), searchPixmapFile ("boing-shadow.png") );
balls[i] = new Evasxx::Image( evas, Point (20*i, 20*i), searchPixmapFile ("boing-shadow.png") );
balls[i]->resize( Size (BALLSIZE, BALLSIZE), true );
balls[i]->setColor( Color (255, 255, 255, 240) );
balls[i]->show();
@ -60,8 +60,8 @@ public:
mw->show();
}
EvasImage* image, *shadow, *logo;
EvasImage* balls[NUMBALLS];
Evasxx::Image* image, *shadow, *logo;
Evasxx::Image* balls[NUMBALLS];
double xoffset;
double yoffset;
double xstep;

@ -1,7 +1,6 @@
#include <ecorexx/EcoreApplication.h>
#include <ecorexx/EcoreConfig.h>
#include <ecorexx/Ecorexx.h>
using namespace efl;
using namespace Eflxx;
#include <iostream>
using namespace std;
@ -9,7 +8,7 @@ using namespace std;
int main( int argc, const char **argv )
{
// using the EcoreConfigClass directly
EcoreConfig c( "test" );
Ecorexx::Config c( "test" );
c.setValue( "aString", string( "foo" ) );
c.setValue( "anInt", 42 );
c.setValue( "aBool", true );
@ -21,7 +20,7 @@ int main( int argc, const char **argv )
cout << "something not there is = " << c.getString( "not here", "not here" ) << endl;
// using the application ecore config class
EcoreApplication app( argc, argv, "This is my Application" );
Ecorexx::Application app( argc, argv, "This is my Application" );
int runcount = app.getConfig()->getInt( "runcount", 0 );
cout << "this application runs for the " << ++runcount << "th time" << endl;
app.getConfig()->setValue( "runcount", runcount );

@ -1,15 +1,13 @@
#include <ecorexx/EcoreApplication.h>
#include <ecorexx/EcoreConfig.h>
#include <ecorexx/EcoreList.h>
#include <ecorexx/Ecorexx.h>
#include <iostream>
using namespace std;
using namespace efl;
using namespace Eflxx;
int main( int argc, const char **argv )
{
// int* test
EcoreList <int> numberList;
Ecorexx::List <int> numberList;
int n[6] = {10,11,12,13,14,15};
@ -29,7 +27,7 @@ int main( int argc, const char **argv )
}
// char* test
EcoreList <char> strList;
Ecorexx::List <char> strList;
char first[] = "First";
char second[] = "Second";

@ -1,9 +1,9 @@
#include <eflxx/eflpp_sys.h>
#include <eflxx/eflpp_debug.h>
#include <eflxx/System.h>
#include <eflxx/Debug.h>
#include <evasxx/Evasxx.h>
#include <ecorexx/EcoreApplication.h>
#include <ecorexx/Ecorexx.h>
using namespace efl;
using namespace Eflxx;
#include <iostream>
#include <cstring>
@ -14,11 +14,11 @@ using namespace std;
#define DOTSIZE 2
class PaintArea : public EvasRectangle
class PaintArea : public Evasxx::Rectangle
{
public:
PaintArea( EvasCanvas &evas ) :
EvasRectangle( evas ),
PaintArea( Evasxx::Canvas &evas ) :
Evasxx::Rectangle( evas ),
mouseDown( false ),
mEvas (evas)
{
@ -33,21 +33,21 @@ public:
}
virtual ~PaintArea() { };
virtual void handleMouseUp( const EvasMouseUpEvent& e )
virtual void handleMouseUp( const Evasxx::MouseUpEvent& e )
{
cout << "PA::mouseUp" << endl;
mouseDown = false;
}
virtual void handleMouseDown( const EvasMouseDownEvent& e )
virtual void handleMouseDown( const Evasxx::MouseDownEvent& e )
{
cout << "PA::mouseDown" << endl;
mouseDown = true;
EvasObject* l = new EvasRectangle( mEvas, Rect (e.data->canvas.x, e.data->canvas.y, 2, 2) );
Evasxx::Object* l = new Evasxx::Rectangle( mEvas, Rect (e.data->canvas.x, e.data->canvas.y, 2, 2) );
int b=200+(int) (55.0*rand()/(RAND_MAX+1.0));
l->setColor( Color (b, b, b, 255) );
l->show();
}
virtual void handleMouseMove( const EvasMouseMoveEvent& e )
virtual void handleMouseMove( const Evasxx::MouseMoveEvent& e )
{
cout << "PA::mouseMove" << endl;
if ( mouseDown )
@ -55,61 +55,61 @@ public:
int width = 2 + abs( e.data->cur.canvas.x - e.data->prev.canvas.x );
int height = 2 + abs( e.data->cur.canvas.y - e.data->prev.canvas.y );
cout << "width = " << width << ", height = " << height << endl;
EvasObject* l = new EvasRectangle( mEvas, Rect (e.data->cur.canvas.x - width/2, e.data->cur.canvas.y - height/2, width, height) );
Evasxx::Object* l = new Evasxx::Rectangle( mEvas, Rect (e.data->cur.canvas.x - width/2, e.data->cur.canvas.y - height/2, width, height) );
int b=200+(int) (55.0*rand()/(RAND_MAX+1.0));
l->setColor( Color (b, b, b, 255) );
l->show();
}
}
virtual void handleKeyUp( const EvasKeyUpEvent& e )
virtual void handleKeyUp( const Evasxx::KeyUpEvent& e )
{
cout << "PA:::keyUp - released '" << e.data->keyname << "'" << endl;
if ( strcmp( e.data->keyname, "Escape" ) == 0 )
{
eApp->quit();
Ecorexx::Application::quit();
}
if ( strcmp( e.data->keyname, "0x5b" ) == 0 )
{
int rot = eApp->getMainWindow()->rotation();
int rot = Ecorexx::Application::getInstance()->getMainWindow()->rotation();
rot = rot ? 0: 270;
eApp->getMainWindow()->setRotation( rot );
Ecorexx::Application::getInstance()->getMainWindow()->setRotation( rot );
//eApp->mainWindow()->resize(
}
if ( strcmp( e.data->keyname, "j" ) == 0 )
{
Rect vp = eApp->getMainWindow()->getCanvas().getViewport();
eApp->getMainWindow()->getCanvas().setViewport( Rect (vp.x()+10, vp.y()+10, vp.width()-10, vp.height()-10) );
Rect vp = Ecorexx::Application::getInstance()->getMainWindow()->getCanvas().getViewport();
Ecorexx::Application::getInstance()->getMainWindow()->getCanvas().setViewport( Rect (vp.x()+10, vp.y()+10, vp.width()-10, vp.height()-10) );
}
if ( strcmp( e.data->keyname, "k" ) == 0 )
{
Rect vp = eApp->getMainWindow()->getCanvas().getViewport();
eApp->getMainWindow()->getCanvas().setViewport( Rect (vp.x()-10, vp.y()-10, vp.width()+10, vp.height()+10) );
Rect vp = Ecorexx::Application::getInstance()->getMainWindow()->getCanvas().getViewport();
Ecorexx::Application::getInstance()->getMainWindow()->getCanvas().setViewport( Rect (vp.x()-10, vp.y()-10, vp.width()+10, vp.height()+10) );
}
}
private:
bool mouseDown;
EvasCanvas &mEvas;
Evasxx::Canvas &mEvas;
};
int main( int argc, const char **argv )
{
/* Create the application object */
EcoreApplication* app = new EcoreApplication( argc, argv, "Ecore Paint Example" );
Ecorexx::Application* app = new Ecorexx::Application( argc, argv, "Ecore Paint Example" );
/* Create the main window, a window with an embedded canvas */
EcoreEvasWindowSoftwareX11* mw = new EcoreEvasWindowSoftwareX11( Size (WIDTH, HEIGHT) );
Ecorexx::EvasWindowSoftwareX11* mw = new Ecorexx::EvasWindowSoftwareX11( Size (WIDTH, HEIGHT) );
mw->setAlpha (true);
mw->show ();
/* Create some objects on the canvas */
EvasCanvas &evas = mw->getCanvas();
Evasxx::Canvas &evas = mw->getCanvas();
Size s = evas.getSize();
cout << "PA: Size = " << s << endl;
EvasRectangle* bg = new EvasRectangle( evas, s );
Evasxx::Rectangle* bg = new Evasxx::Rectangle( evas, s );
bg->setColor( Color (50, 50, 50, 128) );
bg->setLayer( 0 );
bg->show();

@ -1,4 +1,4 @@
#include <ecorexx/EcoreApplication.h>
#include <ecorexx/Ecorexx.h>
#include <evasxx/Evasxx.h>
#include "../../common/searchFile.h"
@ -8,20 +8,20 @@
#include <iostream>
using namespace std;
using namespace efl;
using namespace Eflxx;
int main( int argc, const char **argv )
{
/* Create the application object */
EcoreApplication* app = new EcoreApplication( argc, argv, "Simple Ecore Test" );
Ecorexx::Application* app = new Ecorexx::Application( argc, argv, "Simple Ecore Test" );
/* Create the main window, a window with an embedded canvas */
EcoreEvasWindowSoftwareX11* mw = new EcoreEvasWindowSoftwareX11( Size (WIDTH, HEIGHT) );
Ecorexx::EvasWindowSoftwareX11* mw = new Ecorexx::EvasWindowSoftwareX11( Size (WIDTH, HEIGHT) );
/* Create some objects on the canvas */
EvasCanvas &evas = mw->getCanvas();
Evasxx::Canvas &evas = mw->getCanvas();
EvasImage* image = new EvasImage( evas, searchPixmapFile ("panel.png") );
Evasxx::Image* image = new Evasxx::Image( evas, searchPixmapFile ("panel.png") );
//image->setFilled (true);
image->resize( evas.getSize() );
image->setFill( image->getImageSize() ); // FIXME
@ -32,19 +32,19 @@ int main( int argc, const char **argv )
cout << "Image size: " << image->getImageSize() << endl;
cout << "Object size: " << image->getSize() << endl;
EvasImage* shadow = new EvasImage( evas, searchPixmapFile ("panel_shadow.png") );
Evasxx::Image* shadow = new Evasxx::Image( evas, searchPixmapFile ("panel_shadow.png") );
//image->setFilled (true);
shadow->resize( evas.getSize() );
shadow->setFill( image->getImageSize() ); // FIXME
shadow->show();
EvasImage* logo = new EvasImage( evas, Point (50, 50), searchPixmapFile ("boing-shadow.png") );
Evasxx::Image* logo = new Evasxx::Image( evas, Point (50, 50), searchPixmapFile ("boing-shadow.png") );
//image->setFilled (true);
logo->resize( logo->getImageSize() );
logo->setFill( logo->getImageSize() ); // FIXME
logo->show();
EvasText* text = new EvasText( evas, searchFontFile ("Gentium.ttf"), 20, Point (10, 10), "" );
Evasxx::Text* text = new Evasxx::Text( evas, searchFontFile ("Gentium.ttf"), 20, Point (10, 10), "" );
text->setText( "Commodore AMIGA rulez ..." );
text->setLayer( 5 );
text->show();

@ -1,18 +1,17 @@
#include <ecorexx/EcoreApplication.h>
#include <ecorexx/EcoreTimer.h>
#include <ecorexx/Ecorexx.h>
#include <evasxx/Evasxx.h>
#include <sigc++/sigc++.h>
#include <iostream>
#include <list>
using namespace efl;
using namespace Eflxx;
using namespace std;
#define WIDTH 320
#define HEIGHT 240
typedef pair<EvasLine*, int> Star;
typedef pair<Evasxx::Line*, int> Star;
typedef list<Star*> Starfield;
typedef list<Star*>::iterator StarfieldIterator;
@ -20,12 +19,12 @@ Starfield starfield;
int width = 0;
void advance( EcoreTimer* e )
void advance( Ecorexx::Timer* e )
{
for (StarfieldIterator it = starfield.begin(); it != starfield.end(); ++it )
{
Star* star = *it;
EvasLine* line = star->first;
Evasxx::Line* line = star->first;
int speed = star->second;
Rect g = line->getGeometry();
line->setGeometry( Rect ((g.x()+speed ) % width, g.y(), 1, 0) );
@ -34,14 +33,14 @@ void advance( EcoreTimer* e )
int main( int argc, const char **argv )
{
EcoreApplication* app = new EcoreApplication( argc, argv, "Ecore Stars Test" );
EcoreEvasWindowSoftwareX11* mw = new EcoreEvasWindowSoftwareX11( Size (WIDTH, HEIGHT) );
EvasCanvas &evas = mw->getCanvas();
Ecorexx::Application* app = new Ecorexx::Application( argc, argv, "Ecore Stars Test" );
Ecorexx::EvasWindowSoftwareX11* mw = new Ecorexx::EvasWindowSoftwareX11( Size (WIDTH, HEIGHT) );
Evasxx::Canvas &evas = mw->getCanvas();
Rect bg = evas.getGeometry();
width = bg.width();
EvasRectangle* r = new EvasRectangle( evas, bg );
Evasxx::Rectangle* r = new Evasxx::Rectangle( evas, bg );
r->setColor( Color (0, 0, 0, 255) );
r->setLayer( 0 );
r->show();
@ -50,7 +49,7 @@ int main( int argc, const char **argv )
{
int xpos = (int) ((double)bg.width()*rand()/(RAND_MAX));
int speed = 1+(int) (10.0*rand()/(RAND_MAX+1.0));
EvasLine* line = new EvasLine( evas, Point (xpos, scanline), Point (xpos+1, scanline) );
Evasxx::Line* line = new Evasxx::Line( evas, Point (xpos, scanline), Point (xpos+1, scanline) );
line->setColor( Color (50+speed*16, 50+speed*18, 50+speed*17, 255) );
line->setLayer( 10 );
line->show();
@ -58,7 +57,7 @@ int main( int argc, const char **argv )
starfield.push_back( new Star( line, speed ) );
}
( new EcoreTimer( 0.08 ) )->timeout.connect( sigc::ptr_fun( ::advance ) );
( new Ecorexx::Timer( 0.08 ) )->timeout.connect( sigc::ptr_fun( ::advance ) );
mw->show ();

@ -1,4 +1,4 @@
#include <ecorexx/EcoreApplication.h>
#include <ecorexx/Ecorexx.h>
#include <evasxx/Evasxx.h>
#include "../../common/searchFile.h"
@ -6,7 +6,7 @@
#include <iostream>
using namespace std;
using namespace efl;
using namespace Eflxx;
const int WIDTH = 320;
const int HEIGHT = 320;
@ -16,39 +16,39 @@ const unsigned int BALLSIZE = 50;
const unsigned int BALLWIDTH = WIDTH-BALLSIZE;
const unsigned int BALLHEIGHT = HEIGHT-BALLSIZE;
class TimerApp : public EcoreApplication
class TimerApp : public Ecorexx::Application
{
public:
TimerApp( int argc, const char** argv )
: EcoreApplication( argc, argv, "Ecore Timer Test" ),
: Ecorexx::Application( argc, argv, "Ecore Timer Test" ),
xoffset( 0 ), yoffset( PI/3 ),
xstep( 2*PI/360 ), ystep( 2*PI/360 ),
size( BALLSIZE ), direction( -1 ),
alpha( 0 ), alphadirection( 1 ),
xaddfactor( 1 ), yaddfactor( 1 )
{
EcoreEvasWindowSoftwareX11* mw = new EcoreEvasWindowSoftwareX11( Size (WIDTH, HEIGHT) );
EvasCanvas &evas = mw->getCanvas();
Ecorexx::EvasWindowSoftwareX11* mw = new Ecorexx::EvasWindowSoftwareX11( Size (WIDTH, HEIGHT) );
Evasxx::Canvas &evas = mw->getCanvas();
image = new EvasImage( evas, searchPixmapFile ("panel.png") );
image = new Evasxx::Image( evas, searchPixmapFile ("panel.png") );
image->resize( evas.getSize() );
//image->setFill( 0, 0, image->trueSize() ); //FIXME
image->show();
shadow = new EvasImage( evas, searchPixmapFile ("panel_shadow.png") );
shadow = new Evasxx::Image( evas, searchPixmapFile ("panel_shadow.png") );
shadow->resize( evas.getSize() );
//shadow->setFill( 0, 0, evas.size() ); //FIXME
shadow->show();
shadow->setFocus( true );
logo = new EvasImage( evas, Point (40, 20), searchPixmapFile ("e_logo.png") );
logo = new Evasxx::Image( evas, Point (40, 20), searchPixmapFile ("e_logo.png") );
logo->setColor( Color (255, 255, 255, 0) );