diff --git a/src/bindings/eo_cxx/eo_event.hh b/src/bindings/eo_cxx/eo_event.hh index 4d990ce39c..f3d2e516d7 100644 --- a/src/bindings/eo_cxx/eo_event.hh +++ b/src/bindings/eo_cxx/eo_event.hh @@ -114,13 +114,28 @@ signal_connection make_signal_connection(std::unique_ptr& data, Eo* eo, ::Eo_ namespace _detail { +template +Eina_Bool really_call_event(T& wrapper, F& f, Eo_Event_Description const& desc, void *info + , std::true_type) +{ + f(wrapper, desc, info); + return true; +} +template +Eina_Bool really_call_event(T& wrapper, F& f, Eo_Event_Description const& desc, void *info + , std::false_type) +{ + return f(wrapper, desc, info); +} + template Eina_Bool event_callback(void *data, Eo *obj, Eo_Event_Description const* desc, void *info) { T wrapper(::eo_ref(obj)); F *f = static_cast(data); - return (*f)(wrapper, *desc, info); + return _detail::really_call_event(wrapper, *f, *desc, info + , std::is_void()); } }