Enlightenment CVS committal

Author  : andreas
Project : e17
Module  : proto/eflpp

Dir     : e17/proto/eflpp/src/esmart


Modified Files:
        eflpp_esmart.cpp eflpp_esmart_group.cpp 


Log Message:
- some temporary debug messages in Esmart
- README updated
- replaced Anjuta 1 with Anjuta 2 files (Hint: Anjuta isn't needed for 
building; only optional project support)

===================================================================
RCS file: /cvs/e/e17/proto/eflpp/src/esmart/eflpp_esmart.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- eflpp_esmart.cpp    10 Jul 2007 21:38:10 -0000      1.2
+++ eflpp_esmart.cpp    8 Aug 2007 19:32:03 -0000       1.3
@@ -6,15 +6,14 @@
 
 namespace efl {
 
-static EvasEsmart *selfEsmartPointer;
-
 
//===============================================================================================
 // EvasEsmart
 
//===============================================================================================
 EvasEsmart::EvasEsmart(EvasCanvas *canvas, const char *type, const char *name )
     :EvasObject( canvas, type, name )
 {
-  selfEsmartPointer = this;
+       printf ("EvasEsmart constructor\n");
+  //selfEsmartPointer = this;
 }
 
 EvasEsmart::~EvasEsmart()
@@ -27,6 +26,8 @@
 
   evasobj = evas_object_smart_add(canvas()->obj(), getEsmart(name));
 
+  evas_object_smart_data_set(evasobj, this);
+
   return evasobj;
 }
 
@@ -57,47 +58,56 @@
 
 void EvasEsmart::wrap_add( Evas_Object *o ) 
 {
-  selfEsmartPointer->addHandler();
+  //EvasEsmart *es = static_cast<EvasEsmart*> (evas_object_smart_data_get(o));
+  //es->addHandler();
 }
 
 void EvasEsmart::wrap_del(Evas_Object *o) 
 {
-  selfEsmartPointer->delHandler();
+  EvasEsmart *es = static_cast<EvasEsmart*> (evas_object_smart_data_get(o));
+  es->delHandler();
 }
 
 void EvasEsmart::wrap_move(Evas_Object *o, Evas_Coord x, Evas_Coord y) 
 {
-  selfEsmartPointer->moveHandler( x, y );
+  EvasEsmart *es = static_cast<EvasEsmart*> (evas_object_smart_data_get(o));
+  es->moveHandler( x, y );
 }
 
 void EvasEsmart::wrap_resize(Evas_Object *o, Evas_Coord w, Evas_Coord h) 
 {
-  selfEsmartPointer->resizeHandler( w, h );
+  EvasEsmart *es = static_cast<EvasEsmart*> (evas_object_smart_data_get(o));
+  es->resizeHandler( w, h );
 }
 
 void EvasEsmart::wrap_show(Evas_Object *o) 
 {
-  selfEsmartPointer->showHandler();
+  EvasEsmart *es = static_cast<EvasEsmart*> (evas_object_smart_data_get(o));
+  es->showHandler();
 }
 
 void EvasEsmart::wrap_hide(Evas_Object *o) 
 {
-  selfEsmartPointer->hideHandler();
+  EvasEsmart *es = static_cast<EvasEsmart*> (evas_object_smart_data_get(o));
+  es->hideHandler();
 }
 
 void EvasEsmart::wrap_color_set(Evas_Object *o, int r, int g, int b, int a) 
 {
-  selfEsmartPointer->colorSetHandler( r, g, b, a );
+  EvasEsmart *es = static_cast<EvasEsmart*> (evas_object_smart_data_get(o));
+  es->colorSetHandler( r, g, b, a );
 }
 
 void EvasEsmart::wrap_clip_set(Evas_Object *o, Evas_Object *clip) 
 {
-  selfEsmartPointer->clipSetHandler( clip );
+  EvasEsmart *es = static_cast<EvasEsmart*> (evas_object_smart_data_get(o));
+  es->clipSetHandler( clip );
 }
 
 void EvasEsmart::wrap_clip_unset(Evas_Object *o)
 {
-  selfEsmartPointer->clipUnsetHandler();
+  EvasEsmart *es = static_cast<EvasEsmart*> (evas_object_smart_data_get(o));
+  es->clipUnsetHandler();
 }
 
 } // end namespace efl
===================================================================
RCS file: /cvs/e/e17/proto/eflpp/src/esmart/eflpp_esmart_group.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- eflpp_esmart_group.cpp      7 Aug 2007 20:39:20 -0000       1.2
+++ eflpp_esmart_group.cpp      8 Aug 2007 19:32:03 -0000       1.3
@@ -14,20 +14,20 @@
 EvasEsmartGroup::EvasEsmartGroup( EvasCanvas* canvas, const char* name )
     :EvasEsmart( canvas, "<attach>", name )
 {
-  o = newEsmart( "EsmartGroup" );
+  o = newEsmart( name );
 }
 
 EvasEsmartGroup::EvasEsmartGroup( int x, int y, EvasCanvas* canvas, const 
char* name )
     :EvasEsmart( canvas, "<attach>", name )
 {
-  o = newEsmart( "EsmartGroup" );
+  o = newEsmart( name );
   move( x, y );
 }
 
 EvasEsmartGroup::EvasEsmartGroup( int x, int y, int width, int height, 
EvasCanvas* canvas, const char* name )
     :EvasEsmart( canvas, "<attach>", name )
 {
-  o = newEsmart( "EsmartGroup" );
+  o = newEsmart( name );
   move( x, y );
   resize( width, height );
 }
@@ -39,6 +39,7 @@
 void EvasEsmartGroup::add (EvasObject *object)
 {
   evasObjectList.push_back (object);
+  printf ("add (%p) -> size: %d\n", this, evasObjectList.size ());
 }
 
 void EvasEsmartGroup::remove (EvasObject* object)
@@ -70,26 +71,26 @@
 
 void EvasEsmartGroup::showHandler()
 {
-  cerr << "EvasEsmartGroup::showHandler" << endl;
+  printf ("EvasEsmartGroup::showHandler (%p) -> size: %d\n", this, 
evasObjectList.size());
   for (list<EvasObject*>::iterator eol_it = evasObjectList.begin ();
        eol_it != evasObjectList.end ();
        eol_it++)
   {
     EvasObject *eo = (*eol_it);
-  
+    cerr << "show" << endl; 
     eo->show();
   }
 }
 
 void EvasEsmartGroup::hideHandler()
 {
-  cerr << "EvasEsmartGroup::hideHandler" << endl;
+  printf ("EvasEsmartGroup::hideHandler (%p) -> size: %d\n", this, 
evasObjectList.size());
   for (list<EvasObject*>::iterator eol_it = evasObjectList.begin ();
        eol_it != evasObjectList.end ();
        eol_it++)
   {
     EvasObject *eo = (*eol_it);
-
+    cerr << "hide" << endl;
     eo->hide();
   } 
 }



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to