From: Enlightenment S. <no-...@en...> - 2009-07-17 16:52:29
|
Log: library change Author: andreas Date: 2009-07-17 09:52:19 -0700 (Fri, 17 Jul 2009) New Revision: 41406 Modified: trunk/BINDINGS/cxx/eflxx_examples/src/elementaryxx/full/main.cpp trunk/BINDINGS/cxx/eflxx_examples/src/elementaryxx/simple/Makefile.am trunk/BINDINGS/cxx/eflxx_examples/src/elementaryxx/simple/main.cpp Modified: trunk/BINDINGS/cxx/eflxx_examples/src/elementaryxx/full/main.cpp =================================================================== --- trunk/BINDINGS/cxx/eflxx_examples/src/elementaryxx/full/main.cpp 2009-07-17 16:51:42 UTC (rev 41405) +++ trunk/BINDINGS/cxx/eflxx_examples/src/elementaryxx/full/main.cpp 2009-07-17 16:52:19 UTC (rev 41406) @@ -9,8 +9,7 @@ using namespace efl; #ifndef ELM_LIB_QUICKLAUNCH -static void my_win_del(void *data, Evas_Object *obj, void *event_info); -static void my_bt_1(void *data, Evas_Object *obj, void *event_info); +static void my_win_del(Evas_Object *obj, void *event_info); static void my_win_main(void); ElmApplication *elmApp; @@ -19,7 +18,7 @@ static Size size640x640 (640, 640); static void -my_win_del(void *data, Evas_Object *obj, void *event_info) +my_win_del(Evas_Object *obj, void *event_info) { // TODO /* called when my_win_main is requested to be deleted */ Modified: trunk/BINDINGS/cxx/eflxx_examples/src/elementaryxx/simple/Makefile.am =================================================================== --- trunk/BINDINGS/cxx/eflxx_examples/src/elementaryxx/simple/Makefile.am 2009-07-17 16:51:42 UTC (rev 41405) +++ trunk/BINDINGS/cxx/eflxx_examples/src/elementaryxx/simple/Makefile.am 2009-07-17 16:52:19 UTC (rev 41406) @@ -6,10 +6,16 @@ main.cpp elementaryxx_example_simple_LDADD = \ - $(ELEMENTARYXX_LIBS) + $(ELEMENTARYXX_LIBS) \ + $(EVASXX_LIBS) \ + $(PACKAGE_SOURCE_DIR)/src/common/libeflxx_example_common.la +elementaryxx_example_simple_DEPENDENCIES = \ + $(PACKAGE_SOURCE_DIR)/src/common/libeflxx_example_common.la + AM_CPPFLAGS = \ - $(ELEMENTARYXX_CFLAGS) + $(ELEMENTARYXX_CFLAGS) \ + $(EVASXX_CFLAGS) ## File created by the gnome-build tools Modified: trunk/BINDINGS/cxx/eflxx_examples/src/elementaryxx/simple/main.cpp =================================================================== --- trunk/BINDINGS/cxx/eflxx_examples/src/elementaryxx/simple/main.cpp 2009-07-17 16:51:42 UTC (rev 41405) +++ trunk/BINDINGS/cxx/eflxx_examples/src/elementaryxx/simple/main.cpp 2009-07-17 16:52:19 UTC (rev 41406) @@ -2,31 +2,52 @@ #include <config.h> #endif +#include <evasxx/Evasxx.h> #include <elementaryxx/Elementaryxx.h> +#include "../../common/searchFile.h" using namespace std; using namespace efl; -static void testFunc (void *data, Evas_Object *obj, void *event_info) +static void +my_win_del(Evas_Object *obj, void *event_info) { - cout << "Button pressed" << endl; + // TODO + /* called when my_win_main is requested to be deleted */ + ElmApplication::exit(); /* exit the program's main loop that runs in elm_run() */ } +static void testFunc (Evas_Object *obj, void *event_info) +{ + cout << "sub-object-del" << endl; +} + int main (int argc, char **argv) { ElmApplication elmApp (argc, argv); ElmWindow *elmWin = ElmWindow::factory ("window1", ELM_WIN_BASIC); + elmWin->getEventSignal ("delete-request")->connect (sigc::ptr_fun (&my_win_del)); + ElmBackground *bg = ElmBackground::factory (*elmWin); + Evas *e = evas_object_evas_get(bg->obj ()); + + EvasCanvas ec (e); + + EvasImage ei (ec); + ei.setFile (searchPixmapFile ("elementaryxx/plant_01.jpg")); + ei.setGeometry (Rect (100,100, 100, 100)); + ei.show (); + ElmButton *elmButton = ElmButton::factory (*elmWin); ElmClock *elmClock = ElmClock::factory (*elmWin); + elmWin->addMember (ei); ElmToggle *elmToggle = ElmToggle::factory (*elmWin); ElmScroller *elmScroller = ElmScroller::factory (*elmWin); ElmEntry *elmEntry = ElmEntry::factory (*elmWin); ElmSlider *elmSlider = ElmSlider::factory (*elmWin); - bg->setWeightHintSize (1.0, 1.0); elmWin->addObjectResize (*bg); @@ -55,7 +76,7 @@ elmWin->setAutoDel (true); - elmToggle->getEventSignal ("sub-object-del")->connect (sigc::ptr_fun (&testFunc)); + //elmToggle->getEventSignal ("sub-object-del")->connect (sigc::ptr_fun (&testFunc)); elmWin->show (); bg->show (); @@ -65,7 +86,7 @@ elmScroller->show (); elmEntry->show (); elmSlider->show (); - + elmApp.run (); } |