summaryrefslogtreecommitdiff
path: root/src/bindings/cxx/eo_cxx
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-11-22 16:54:57 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-12-05 10:14:03 +0900
commit5425baa9061753356d450a3c736669341e1b1570 (patch)
treea008cad3e6be4c7d5a2f5e79425ddf27cc6a6a68 /src/bindings/cxx/eo_cxx
parenta597084db7b3a8a4bc7320b68aee7cbb34c6da43 (diff)
cxx: Add support for function pointers
This was tested on the function pointer Efl.Ui.Format_Func_Cb
Diffstat (limited to 'src/bindings/cxx/eo_cxx')
-rw-r--r--src/bindings/cxx/eo_cxx/eo_cxx_interop.hh20
1 files changed, 3 insertions, 17 deletions
diff --git a/src/bindings/cxx/eo_cxx/eo_cxx_interop.hh b/src/bindings/cxx/eo_cxx/eo_cxx_interop.hh
index 662e5a7d55..9181c11875 100644
--- a/src/bindings/cxx/eo_cxx/eo_cxx_interop.hh
+++ b/src/bindings/cxx/eo_cxx/eo_cxx_interop.hh
@@ -61,6 +61,8 @@ template <>
61struct out_traits<void*> { typedef void*& type; }; 61struct out_traits<void*> { typedef void*& type; };
62template <typename T> 62template <typename T>
63struct out_traits<efl::shared_future<T>> { typedef efl::shared_future<T>& type; }; 63struct out_traits<efl::shared_future<T>> { typedef efl::shared_future<T>& type; };
64template <>
65struct out_traits<efl::eina::strbuf> { typedef efl::eina::strbuf_wrapper& type; };
64 66
65template <typename T> 67template <typename T>
66struct inout_traits { typedef T& type; }; 68struct inout_traits { typedef T& type; };
@@ -291,23 +293,7 @@ auto convert_inout(V& object) -> decltype(impl::convert_inout_impl(object, impl:
291template <typename T, typename U, bool Own = false, typename V> 293template <typename T, typename U, bool Own = false, typename V>
292T convert_to_c(V&& object); 294T convert_to_c(V&& object);
293 295
294template <typename F, typename T> 296template <typename U, typename F, typename V=void> struct function_wrapper;
295void* data_function_ptr_to_c(T)
296{
297 return nullptr;
298}
299
300template <typename F, typename T>
301F function_ptr_to_c()
302{
303 return nullptr;
304}
305
306template <typename F, typename T>
307Eina_Free_Cb free_function_ptr_to_c()
308{
309 return nullptr;
310}
311 297
312namespace impl { 298namespace impl {
313 299