summaryrefslogtreecommitdiff
path: root/src/examples/elementary
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-07-31 10:57:26 +0200
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-07-31 10:57:26 +0200
commit1e363538b34d41403a14350d90c780f7725927b4 (patch)
tree27914aa8f9e1020849a71693a9bb97a844696c6b /src/examples/elementary
parentf00e24de29a26163379fdfb44dcc9dcef84ef1dd (diff)
slider_cxx: fix casting
this object now needs to be casted, in order to have the event available.
Diffstat (limited to 'src/examples/elementary')
-rw-r--r--src/examples/elementary/slider_cxx_example.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/examples/elementary/slider_cxx_example.cc b/src/examples/elementary/slider_cxx_example.cc
index 2540516..d42f765 100644
--- a/src/examples/elementary/slider_cxx_example.cc
+++ b/src/examples/elementary/slider_cxx_example.cc
@@ -68,7 +68,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
68 sl7.hint_fill_set(true, false); 68 sl7.hint_fill_set(true, false);
69 bx.pack_end(sl7); 69 bx.pack_end(sl7);
70 70
71 auto changed = std::bind ( [] (efl::ui::Slider obj) 71 auto changed = std::bind ( [] (efl::ui::Range_Display obj)
72 { std::cout << "Changed to " << obj.range_value_get() << std::endl; } 72 { std::cout << "Changed to " << obj.range_value_get() << std::endl; }
73 , std::placeholders::_1); 73 , std::placeholders::_1);
74 74
@@ -76,7 +76,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
76 { std::cout << "Steady to " << obj.range_value_get() << std::endl; } 76 { std::cout << "Steady to " << obj.range_value_get() << std::endl; }
77 , std::placeholders::_1); 77 , std::placeholders::_1);
78 78
79 sl7.changed_event_cb_add(changed); 79 efl::eo::downcast<efl::ui::Range_Display>(sl7).changed_event_cb_add(changed);
80 sl7.steady_event_cb_add(steady); 80 sl7.steady_event_cb_add(steady);
81} 81}
82EFL_MAIN() 82EFL_MAIN()