summaryrefslogtreecommitdiff
path: root/src/bindings
diff options
context:
space:
mode:
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2016-10-25 12:21:34 -0200
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2016-10-25 12:23:34 -0200
commit297415cc53ebf7746642eb2e1c6c011b441bea01 (patch)
treef1b28a12aaf6ea33f49805c2a5f221cbaa113985 /src/bindings
parent6dc0a07a8582d5436ed1783d28033f48f3f8c8cc (diff)
js: Fix compilation of new data types in JS binding
Diffstat (limited to 'src/bindings')
-rw-r--r--src/bindings/js/eina_js/eina_js_compatibility.hh6
-rw-r--r--src/bindings/js/eina_js/eina_js_get_value.hh13
-rw-r--r--src/bindings/js/eina_js/eina_js_get_value_from_c.hh7
-rw-r--r--src/bindings/js/eo_js/eo_js_constructor.hh2
4 files changed, 27 insertions, 1 deletions
diff --git a/src/bindings/js/eina_js/eina_js_compatibility.hh b/src/bindings/js/eina_js/eina_js_compatibility.hh
index 7b5c920..37a9457 100644
--- a/src/bindings/js/eina_js/eina_js_compatibility.hh
+++ b/src/bindings/js/eina_js/eina_js_compatibility.hh
@@ -308,6 +308,12 @@ R wrap_value(T v, value_tag<eina::js::complex_tag<T, U...>>)
308 return R {v}; 308 return R {v};
309} 309}
310 310
311template <typename R, typename T, typename... U>
312R wrap_value(T const& v, value_tag<eina::js::complex_tag<T*, U...>>)
313{
314 return R {const_cast<T*>(&v)};
315}
316
311template <typename T = v8::External> 317template <typename T = v8::External>
312struct _libv8_isolate_test 318struct _libv8_isolate_test
313{ 319{
diff --git a/src/bindings/js/eina_js/eina_js_get_value.hh b/src/bindings/js/eina_js/eina_js_get_value.hh
index 856e21f..3a96970 100644
--- a/src/bindings/js/eina_js/eina_js_get_value.hh
+++ b/src/bindings/js/eina_js/eina_js_get_value.hh
@@ -111,6 +111,19 @@ inline Eo* get_value_from_javascript
111 return get_value_from_javascript(v, isolate, class_name, value_tag<Eo*>(), throw_js_exception); 111 return get_value_from_javascript(v, isolate, class_name, value_tag<Eo*>(), throw_js_exception);
112} 112}
113 113
114// Futures
115template <typename ClassGetter>
116Eo* get_value_from_javascript
117 (v8::Local<v8::Value>
118 , v8::Isolate*
119 , const char*
120 , value_tag<complex_tag<Eo**, void*, ClassGetter>>
121 , bool = true)
122{
123 throw std::logic_error("");
124 return nullptr;
125}
126
114template <typename T> 127template <typename T>
115inline T get_value_from_javascript 128inline T get_value_from_javascript
116 (v8::Local<v8::Value> v 129 (v8::Local<v8::Value> v
diff --git a/src/bindings/js/eina_js/eina_js_get_value_from_c.hh b/src/bindings/js/eina_js/eina_js_get_value_from_c.hh
index 4d71229..f949ae6 100644
--- a/src/bindings/js/eina_js/eina_js_get_value_from_c.hh
+++ b/src/bindings/js/eina_js/eina_js_get_value_from_c.hh
@@ -200,6 +200,13 @@ get_value_from_c(efl::eina::js::complex_tag<Eina_Accessor *, T, K> v, v8::Isolat
200 200
201template <typename T, typename K> 201template <typename T, typename K>
202inline v8::Local<v8::Value> 202inline v8::Local<v8::Value>
203get_value_from_c(efl::eina::js::complex_tag<Eo**, T, K>, v8::Isolate*, const char*)
204{
205 throw std::logic_error("");
206}
207
208template <typename T, typename K>
209inline v8::Local<v8::Value>
203get_value_from_c(efl::eina::js::complex_tag<const Eina_Accessor *, T, K> v, v8::Isolate* isolate, const char* class_name) 210get_value_from_c(efl::eina::js::complex_tag<const Eina_Accessor *, T, K> v, v8::Isolate* isolate, const char* class_name)
204{ 211{
205 // TODO implement const accessor? 212 // TODO implement const accessor?
diff --git a/src/bindings/js/eo_js/eo_js_constructor.hh b/src/bindings/js/eo_js/eo_js_constructor.hh
index 191eb9d..e0c0f2f 100644
--- a/src/bindings/js/eo_js/eo_js_constructor.hh
+++ b/src/bindings/js/eo_js/eo_js_constructor.hh
@@ -109,7 +109,7 @@ struct constructor_caller
109 Eo* eo = efl_add 109 Eo* eo = efl_add
110 (klass 110 (klass
111 , parent 111 , parent
112 , eina::_mpl::for_each(constructors, call{efl_self, &current_index, &args}) 112 , eina::_mpl::for_each(constructors, call{efl_added, &current_index, &args})
113 ); 113 );
114 if (!eo) 114 if (!eo)
115 throw std::logic_error("Failed to create object."); 115 throw std::logic_error("Failed to create object.");