summaryrefslogtreecommitdiff
path: root/src/examples/eolian_cxx
diff options
context:
space:
mode:
authorSavio Sena <savio.sena@acm.org>2014-07-17 04:14:01 -0300
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2014-07-18 18:57:13 -0300
commitf60394c1af82daf8f38918a678081168940df340 (patch)
tree11de0d73232b9030d93ef92926d9c657914acca7 /src/examples/eolian_cxx
parent04d90ae131bd037ccd59eff15531f2459c799897 (diff)
eolian-cxx: Updated the examples according to the new syntax.
Diffstat (limited to 'src/examples/eolian_cxx')
-rw-r--r--src/examples/eolian_cxx/eolian_cxx_callbacks_01.cc4
-rw-r--r--src/examples/eolian_cxx/eolian_cxx_complex_types_01.cc28
-rw-r--r--src/examples/eolian_cxx/eolian_cxx_eo_events_01.cc24
3 files changed, 28 insertions, 28 deletions
diff --git a/src/examples/eolian_cxx/eolian_cxx_callbacks_01.cc b/src/examples/eolian_cxx/eolian_cxx_callbacks_01.cc
index 4efff00..58377fe 100644
--- a/src/examples/eolian_cxx/eolian_cxx_callbacks_01.cc
+++ b/src/examples/eolian_cxx/eolian_cxx_callbacks_01.cc
@@ -20,14 +20,14 @@
20#include <ecore_poll.eo.hh> 20#include <ecore_poll.eo.hh>
21 21
22namespace efl { namespace ecore { 22namespace efl { namespace ecore {
23using ::ecore_poller; 23using ::ecore::poller;
24} } 24} }
25 25
26void 26void
27example_callbacks() 27example_callbacks()
28{ 28{
29 int count = 0; 29 int count = 0;
30 efl::ecore::ecore_poller poller 30 efl::ecore::poller poller
31 (ECORE_POLLER_CORE, 1, 31 (ECORE_POLLER_CORE, 1,
32 [&count, &poller] 32 [&count, &poller]
33 { 33 {
diff --git a/src/examples/eolian_cxx/eolian_cxx_complex_types_01.cc b/src/examples/eolian_cxx/eolian_cxx_complex_types_01.cc
index cc2c760..d2eaac2 100644
--- a/src/examples/eolian_cxx/eolian_cxx_complex_types_01.cc
+++ b/src/examples/eolian_cxx/eolian_cxx_complex_types_01.cc
@@ -17,19 +17,19 @@
17#include <Ecore.hh> 17#include <Ecore.hh>
18#include <Evas.hh> 18#include <Evas.hh>
19 19
20#include <canvas/evas.eo.hh> 20#include <canvas/evas_canvas.eo.hh>
21#include <canvas/evas_text.eo.hh> 21#include <canvas/evas_text.eo.hh>
22#include <canvas/evas_rectangle.eo.hh> 22#include <canvas/evas_rectangle.eo.hh>
23#include <canvas/evas_zoomable_interface.eo.hh> 23#include <canvas/evas_zoomable_interface.eo.hh>
24 24
25namespace efl { namespace evas { // XXX only while we don't have namespaces in EFL 25namespace efl { namespace evas { // XXX only while we don't have namespaces in EFL
26using evas_base = ::evas; 26using ::evas::canvas;
27using ::evas_object; 27using ::evas::object;
28using ::evas_text; 28using ::evas::text;
29using ::evas_grid; 29using ::evas::grid;
30using ::evas_rectangle; 30using ::evas::rectangle;
31using ::evas_common_interface; 31using ::evas::common_interface;
32using ::evas_zoomable_interface; 32using ::evas::zoomable_interface;
33} } 33} }
34 34
35namespace { 35namespace {
@@ -64,21 +64,21 @@ void
64example_complex_types() 64example_complex_types()
65{ 65{
66 _ecore_evas_init(); 66 _ecore_evas_init();
67 efl::evas::evas_base canvas(::eo_ref(::ecore_evas_get(ee))); 67 efl::evas::canvas canvas(::eo_ref(::ecore_evas_get(ee)));
68 68
69 ::evas_rectangle bg(efl::eo::parent = canvas); 69 efl::evas::rectangle bg(efl::eo::parent = canvas);
70 bg.color_set(255, 255, 255, 255); 70 bg.color_set(255, 255, 255, 255);
71 bg.position_set(0, 0); 71 bg.position_set(0, 0);
72 bg.size_set(500, 250); 72 bg.size_set(500, 250);
73 bg.visibility_set(true); 73 bg.visibility_set(true);
74 74
75 efl::evas::evas_grid grid(efl::eo::parent = canvas); 75 efl::evas::grid grid(efl::eo::parent = canvas);
76 grid.position_set(0, 0); 76 grid.position_set(0, 0);
77 grid.color_set(0, 0, 0, 255); 77 grid.color_set(0, 0, 0, 255);
78 grid.size_set(5, 5); 78 grid.size_set(5, 5);
79 grid.visibility_set(true); 79 grid.visibility_set(true);
80 80
81 efl::evas::evas_text text1(efl::eo::parent = canvas); 81 efl::evas::text text1(efl::eo::parent = canvas);
82 text1.style_set(EVAS_TEXT_STYLE_OUTLINE); 82 text1.style_set(EVAS_TEXT_STYLE_OUTLINE);
83 text1.color_set(255, 0, 0, 255); 83 text1.color_set(255, 0, 0, 255);
84 text1.font_set("DejaVu", 32); 84 text1.font_set("DejaVu", 32);
@@ -86,9 +86,9 @@ example_complex_types()
86 text1.visibility_set(true); 86 text1.visibility_set(true);
87 int t1w, t1h; 87 int t1w, t1h;
88 text1.size_get(&t1w, &t1h); 88 text1.size_get(&t1w, &t1h);
89 grid.pack(text1, 1, 1, t1w, t1h); 89 grid.pack(text1._eo_ptr(), 1, 1, t1w, t1h);
90 90
91 efl::evas::evas_text text2(efl::eo::parent = canvas); 91 efl::evas::text text2(efl::eo::parent = canvas);
92 text2.style_set(EVAS_TEXT_STYLE_PLAIN); 92 text2.style_set(EVAS_TEXT_STYLE_PLAIN);
93 text2.color_set(0, 120, 0, 255); 93 text2.color_set(0, 120, 0, 255);
94 text2.position_set(t1w+50, t1h+50); 94 text2.position_set(t1w+50, t1h+50);
diff --git a/src/examples/eolian_cxx/eolian_cxx_eo_events_01.cc b/src/examples/eolian_cxx/eolian_cxx_eo_events_01.cc
index e3563ce..abb23c2 100644
--- a/src/examples/eolian_cxx/eolian_cxx_eo_events_01.cc
+++ b/src/examples/eolian_cxx/eolian_cxx_eo_events_01.cc
@@ -17,20 +17,20 @@
17#include <Ecore.hh> 17#include <Ecore.hh>
18#include <Evas.hh> 18#include <Evas.hh>
19 19
20#include <canvas/evas.eo.hh> 20#include <canvas/evas_canvas.eo.hh>
21#include <canvas/evas_text.eo.hh> 21#include <canvas/evas_text.eo.hh>
22#include <canvas/evas_image.eo.hh> 22#include <canvas/evas_image.eo.hh>
23#include <canvas/evas_box.eo.hh> 23#include <canvas/evas_box.eo.hh>
24 24
25 25
26namespace efl { namespace evas { 26namespace efl { namespace evas {
27using evas_base = ::evas; 27using ::evas::canvas;
28using ::evas_object; 28using ::evas::object;
29using ::evas_text; 29using ::evas::text;
30using ::evas_grid; 30using ::evas::grid;
31using ::evas_rectangle; 31using ::evas::rectangle;
32using ::evas_common_interface; 32using ::evas::common_interface;
33using ::evas_zoomable_interface; 33using ::evas::zoomable_interface;
34} } 34} }
35 35
36namespace { 36namespace {
@@ -67,9 +67,9 @@ example_complex_types()
67 _ecore_evas_init(); 67 _ecore_evas_init();
68 68
69 { 69 {
70 efl::evas::evas_base canvas(::eo_ref(::ecore_evas_get(ee))); 70 efl::evas::canvas canvas(::eo_ref(::ecore_evas_get(ee)));
71 71
72 ::evas_rectangle bg(efl::eo::parent = canvas); 72 efl::evas::rectangle bg(efl::eo::parent = canvas);
73 bg.color_set(255, 255, 255, 255); 73 bg.color_set(255, 255, 255, 255);
74 bg.position_set(0, 0); 74 bg.position_set(0, 0);
75 bg.size_set(500, 250); 75 bg.size_set(500, 250);
@@ -77,9 +77,9 @@ example_complex_types()
77 77
78 efl::eo::signal_connection conn = 78 efl::eo::signal_connection conn =
79 bg.event_mouse_down_callback_add 79 bg.event_mouse_down_callback_add
80 ([] (::evas_object obj, Eo_Event_Description const& desc, void* info) 80 ([] (efl::evas::object obj, Eo_Event_Description const& desc, void* info)
81 { 81 {
82 std::cout << "evas_box::mouse_down" << std::endl; 82 std::cout << "evas::box::mouse_down" << std::endl;
83 return EO_CALLBACK_CONTINUE; 83 return EO_CALLBACK_CONTINUE;
84 }); 84 });
85 85