summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2019-01-31 16:13:50 +0900
committerLauro Moura <lauromoura@expertisesolutions.com.br>2019-02-20 11:54:21 -0300
commit9583f2a7678252233a5e5f3b0f4982a6365bf433 (patch)
tree1b705988549436c3111660a626aba549cdf919e5
parentcf7948014a4eaf6c870ec663fe5ca7fa0fbf4574 (diff)
efl-mono: Add support for dotnet core
This commits adds dotnet as a supported C# platform for EFL# bindings. Due to differences between Mono and Dotnet regarding DllImport, the bindings now are using an imperative approach to load the function pointers through the FunctionWrapper and NativeModule classes. Also, the previous caching of non-owned strings returned to native code was removed until further memory checks. We also had to create workaround for bool and chars in Structs for C# marshaling. Going through System.Byte instead and Marshaling manually to their respective types. Fixes T7394
-rw-r--r--src/bin/eolian_mono/eolian/mono/events.hh5
-rw-r--r--src/bin/eolian_mono/eolian/mono/function_definition.hh75
-rw-r--r--src/bin/eolian_mono/eolian/mono/function_pointer.hh8
-rw-r--r--src/bin/eolian_mono/eolian/mono/function_registration.hh7
-rw-r--r--src/bin/eolian_mono/eolian/mono/klass.hh18
-rw-r--r--src/bin/eolian_mono/eolian/mono/marshall_annotation.hh122
-rw-r--r--src/bin/eolian_mono/eolian/mono/marshall_type.hh46
-rw-r--r--src/bin/eolian_mono/eolian/mono/marshall_type_impl.hh26
-rw-r--r--src/bin/eolian_mono/eolian/mono/name_helpers.hh18
-rw-r--r--src/bin/eolian_mono/eolian/mono/parameter.hh8
-rw-r--r--src/bin/eolian_mono/eolian/mono/part_definition.hh2
-rw-r--r--src/bin/eolian_mono/eolian/mono/struct_definition.hh44
-rw-r--r--src/bindings/cxx/eina_cxx/eina_variant.hh16
-rw-r--r--src/bindings/mono/efl_mono/efl_libs.cs.in17
-rw-r--r--src/bindings/mono/eina_mono/eina_common.cs10
-rw-r--r--src/bindings/mono/eina_mono/eina_container_common.cs346
-rw-r--r--src/bindings/mono/eina_mono/eina_hash.cs151
-rw-r--r--src/bindings/mono/eina_mono/eina_inarray.cs29
-rw-r--r--src/bindings/mono/eo_mono/FunctionWrapper.cs87
-rw-r--r--src/bindings/mono/eo_mono/FunctionWrapper_Unix.cs21
-rw-r--r--src/bindings/mono/eo_mono/FunctionWrapper_Windows.cs15
-rw-r--r--src/bindings/mono/eo_mono/NativeModule.cs33
-rw-r--r--src/bindings/mono/eo_mono/NativeModule_Unix.cs43
-rw-r--r--src/bindings/mono/eo_mono/NativeModule_Windows.cs15
-rw-r--r--src/bindings/mono/eo_mono/iwrapper.cs196
-rw-r--r--src/bindings/mono/eo_mono/workaround.cs8
-rw-r--r--src/lib/eolian_cxx/grammar/klass_def.hpp67
27 files changed, 936 insertions, 497 deletions
diff --git a/src/bin/eolian_mono/eolian/mono/events.hh b/src/bin/eolian_mono/eolian/mono/events.hh
index c9cb686803..b49b20ff13 100644
--- a/src/bin/eolian_mono/eolian/mono/events.hh
+++ b/src/bin/eolian_mono/eolian/mono/events.hh
@@ -301,12 +301,15 @@ struct event_definition_generator
301 bool generate_event_add_remove(OutputIterator sink, attributes::event_def const &evt, const std::string& event_name, Context context) const 301 bool generate_event_add_remove(OutputIterator sink, attributes::event_def const &evt, const std::string& event_name, Context context) const
302 { 302 {
303 std::string upper_c_name = utils::to_uppercase(evt.c_name); 303 std::string upper_c_name = utils::to_uppercase(evt.c_name);
304 auto unit = (const Eolian_Unit*) context_find_tag<eolian_state_context>(context).state;
305 attributes::klass_def klass(get_klass(evt.klass, unit), unit);
306 auto library_name = context_find_tag<library_context>(context).actual_library_name(klass.filename);
304 return as_generator( 307 return as_generator(
305 scope_tab << "{\n" 308 scope_tab << "{\n"
306 << scope_tab << scope_tab << "add {\n" 309 << scope_tab << scope_tab << "add {\n"
307 << scope_tab << scope_tab << scope_tab << "lock (eventLock) {\n" 310 << scope_tab << scope_tab << scope_tab << "lock (eventLock) {\n"
308 << scope_tab << scope_tab << scope_tab << scope_tab << "string key = \"_" << upper_c_name << "\";\n" 311 << scope_tab << scope_tab << scope_tab << scope_tab << "string key = \"_" << upper_c_name << "\";\n"
309 << scope_tab << scope_tab << scope_tab << scope_tab << "if (add_cpp_event_handler(key, this.evt_" << event_name << "_delegate)) {\n" 312 << scope_tab << scope_tab << scope_tab << scope_tab << "if (add_cpp_event_handler(" << library_name << ", key, this.evt_" << event_name << "_delegate)) {\n"
310 << scope_tab << scope_tab << scope_tab << scope_tab << scope_tab << "eventHandlers.AddHandler(" << event_name << "Key , value);\n" 313 << scope_tab << scope_tab << scope_tab << scope_tab << scope_tab << "eventHandlers.AddHandler(" << event_name << "Key , value);\n"
311 << scope_tab << scope_tab << scope_tab << scope_tab << "} else\n" 314 << scope_tab << scope_tab << scope_tab << scope_tab << "} else\n"
312 << scope_tab << scope_tab << scope_tab << scope_tab << scope_tab << "Eina.Log.Error($\"Error adding proxy for event {key}\");\n" 315 << scope_tab << scope_tab << scope_tab << scope_tab << scope_tab << "Eina.Log.Error($\"Error adding proxy for event {key}\");\n"
diff --git a/src/bin/eolian_mono/eolian/mono/function_definition.hh b/src/bin/eolian_mono/eolian/mono/function_definition.hh
index 9fef462002..67dfcc0ce4 100644
--- a/src/bin/eolian_mono/eolian/mono/function_definition.hh
+++ b/src/bin/eolian_mono/eolian/mono/function_definition.hh
@@ -32,41 +32,50 @@ struct native_function_definition_generator
32 bool generate(OutputIterator sink, attributes::function_def const& f, Context const& context) const 32 bool generate(OutputIterator sink, attributes::function_def const& f, Context const& context) const
33 { 33 {
34 EINA_CXX_DOM_LOG_DBG(eolian_mono::domain) << "native_function_definition_generator: " << f.c_name << std::endl; 34 EINA_CXX_DOM_LOG_DBG(eolian_mono::domain) << "native_function_definition_generator: " << f.c_name << std::endl;
35 if(blacklist::is_function_blacklisted(f, context) || f.is_static) // Only Concrete classes implement static methods. 35 if(blacklist::is_function_blacklisted(f, context))
36 return true; 36 return true;
37 else 37 else
38 { 38 {
39 if(!as_generator 39 if(!as_generator
40 ("\n\n" << scope_tab 40 ("\n\n" << scope_tab
41 << eolian_mono::marshall_native_annotation(true) 41 << eolian_mono::marshall_annotation(true)
42 << " private delegate " 42 << " private delegate "
43 << eolian_mono::marshall_type(true) 43 << eolian_mono::marshall_type(true)
44 << " " 44 << " "
45 << string 45 << string
46 << "_delegate(System.IntPtr obj, System.IntPtr pd" 46 << "_delegate(" << (f.is_static ? "" : "System.IntPtr obj, System.IntPtr pd")
47 << *grammar::attribute_reorder<-1, -1> 47 << ((!f.is_static && f.parameters.size() > 0) ? ", " : "")
48 << (grammar::attribute_reorder<-1, -1>
48 ( 49 (
49 (", " << marshall_native_annotation << " " << marshall_parameter) 50 (marshall_annotation << " " << marshall_parameter)
50 ) 51 ) % ", ")
51 << ");\n") 52 << ");\n")
52 .generate(sink, std::make_tuple(f.return_type, f.return_type, f.c_name, f.parameters), context)) 53 .generate(sink, std::make_tuple(f.return_type, f.return_type, f.c_name, f.parameters), context))
53 return false; 54 return false;
54 55
55 if(!as_generator 56 if(!as_generator
56 (scope_tab << "[System.Runtime.InteropServices.DllImport(" << context_find_tag<library_context>(context).actual_library_name(f.filename) << ")] " 57 ("\n\n" << scope_tab
57 << eolian_mono::marshall_native_annotation(true) 58 << eolian_mono::marshall_annotation(true)
58 << " private static extern " 59 << " public delegate "
59 << eolian_mono::marshall_type(true) 60 << eolian_mono::marshall_type(true)
60 << " " << string 61 << " "
61 << "(System.IntPtr obj" 62 << string << "_api_delegate(" << (f.is_static ? "" : "System.IntPtr obj")
62 << *grammar::attribute_reorder<-1, -1> 63 << ((!f.is_static && f.parameters.size() > 0) ? ", " : "")
64 << (grammar::attribute_reorder<-1, -1>
63 ( 65 (
64 (", " << marshall_native_annotation << " " << marshall_parameter) 66 (marshall_annotation << " " << marshall_parameter)
65 ) 67 ) % ", ")
66 << ");\n") 68 << ");\n")
67 .generate(sink, std::make_tuple(f.return_type, f.return_type, f.c_name, f.parameters), context)) 69 .generate(sink, std::make_tuple(f.return_type, f.return_type, f.c_name, f.parameters), context))
68 return false; 70 return false;
69 71
72 if(!as_generator
73 (scope_tab
74 << " public static Efl.Eo.FunctionWrapper<" << string << "_api_delegate> " << string << "_ptr = new Efl.Eo.FunctionWrapper<"
75 << string << "_api_delegate>(_Module, \"" << string << "\");\n")
76 .generate(sink, std::make_tuple(f.c_name, f.c_name, f.c_name, f.c_name), context))
77 return false;
78
70 std::string return_type; 79 std::string return_type;
71 if(!as_generator(eolian_mono::type(true)).generate(std::back_inserter(return_type), f.return_type, context)) 80 if(!as_generator(eolian_mono::type(true)).generate(std::back_inserter(return_type), f.return_type, context))
72 return false; 81 return false;
@@ -77,6 +86,11 @@ struct native_function_definition_generator
77 else 86 else
78 klass_cast_name = name_helpers::klass_interface_name(*klass); 87 klass_cast_name = name_helpers::klass_interface_name(*klass);
79 88
89 std::string self = "Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj))";
90
91 if (f.is_static)
92 self = "";
93
80 if(!as_generator 94 if(!as_generator
81 (scope_tab 95 (scope_tab
82 << " private static " 96 << " private static "
@@ -93,7 +107,8 @@ struct native_function_definition_generator
93 << scope_tab << scope_tab << "if(wrapper != null) {\n" 107 << scope_tab << scope_tab << "if(wrapper != null) {\n"
94 << scope_tab << scope_tab << scope_tab << eolian_mono::native_function_definition_preamble() 108 << scope_tab << scope_tab << scope_tab << eolian_mono::native_function_definition_preamble()
95 << scope_tab << scope_tab << scope_tab << "try {\n" 109 << scope_tab << scope_tab << scope_tab << "try {\n"
96 << scope_tab << scope_tab << scope_tab << scope_tab << (return_type != " void" ? "_ret_var = " : "") << "((" << klass_cast_name << ")wrapper)." << string 110 << scope_tab << scope_tab << scope_tab << scope_tab << (return_type != " void" ? "_ret_var = " : "")
111 << (f.is_static ? "" : "((") << klass_cast_name << (f.is_static ? "." : ")wrapper).") << string
97 << "(" << (native_argument_invocation % ", ") << ");\n" 112 << "(" << (native_argument_invocation % ", ") << ");\n"
98 << scope_tab << scope_tab << scope_tab << "} catch (Exception e) {\n" 113 << scope_tab << scope_tab << scope_tab << "} catch (Exception e) {\n"
99 << scope_tab << scope_tab << scope_tab << scope_tab << "Eina.Log.Warning($\"Callback error: {e.ToString()}\");\n" 114 << scope_tab << scope_tab << scope_tab << scope_tab << "Eina.Log.Warning($\"Callback error: {e.ToString()}\");\n"
@@ -102,7 +117,7 @@ struct native_function_definition_generator
102 << eolian_mono::native_function_definition_epilogue(*klass) 117 << eolian_mono::native_function_definition_epilogue(*klass)
103 << scope_tab << scope_tab << "} else {\n" 118 << scope_tab << scope_tab << "} else {\n"
104 << scope_tab << scope_tab << scope_tab << (return_type != " void" ? "return " : "") << string 119 << scope_tab << scope_tab << scope_tab << (return_type != " void" ? "return " : "") << string
105 << "(Efl.Eo.Globals.efl_super(obj, " << "Efl.Eo.Globals.efl_class_get(obj))" << *(", " << argument) << ");\n" 120 << "_ptr.Value.Delegate(" << self << ((!f.is_static && f.parameters.size() > 0) ? ", " : "") << (argument % ", ") << ");\n"
106 << scope_tab << scope_tab << "}\n" 121 << scope_tab << scope_tab << "}\n"
107 << scope_tab << "}\n" 122 << scope_tab << "}\n"
108 ) 123 )
@@ -118,9 +133,13 @@ struct native_function_definition_generator
118 , context)) 133 , context))
119 return false; 134 return false;
120 135
136 // Static functions do not need to be called from C
137 if (f.is_static)
138 return true;
139
121 // This is the delegate that will be passed to Eo to be called from C. 140 // This is the delegate that will be passed to Eo to be called from C.
122 if(!as_generator( 141 if(!as_generator(
123 scope_tab << "private " << f.c_name << "_delegate " << f.c_name << "_static_delegate;\n" 142 scope_tab << "private static " << f.c_name << "_delegate " << f.c_name << "_static_delegate;\n"
124 ).generate(sink, attributes::unused, context)) 143 ).generate(sink, attributes::unused, context))
125 return false; 144 return false;
126 return true; 145 return true;
@@ -141,22 +160,6 @@ struct function_definition_generator
141 if(blacklist::is_function_blacklisted(f, context)) 160 if(blacklist::is_function_blacklisted(f, context))
142 return true; 161 return true;
143 162
144 if(!as_generator
145 ("\n\n" << scope_tab << "[System.Runtime.InteropServices.DllImport(" << context_find_tag<library_context>(context).actual_library_name(f.filename) << ")]\n"
146 << scope_tab << eolian_mono::marshall_annotation(true)
147 << (do_super ? " protected " : " private ") << "static extern "
148 << eolian_mono::marshall_type(true)
149 << " " << string
150 << "(" << (f.is_static ? "" : "System.IntPtr obj")
151 << ((!f.is_static && (f.parameters.size() > 0)) ? ", " : "")
152 << (grammar::attribute_reorder<-1, -1>
153 (
154 (marshall_annotation << " " << marshall_parameter)
155 ) % ",")
156 << ");\n")
157 .generate(sink, std::make_tuple(f.return_type, f.return_type, f.c_name, f.parameters), context))
158 return false;
159
160 std::string return_type; 163 std::string return_type;
161 if(!as_generator(eolian_mono::type(true)).generate(std::back_inserter(return_type), f.return_type, context)) 164 if(!as_generator(eolian_mono::type(true)).generate(std::back_inserter(return_type), f.return_type, context))
162 return false; 165 return false;
@@ -176,8 +179,10 @@ struct function_definition_generator
176 if(!as_generator 179 if(!as_generator
177 (scope_tab << ((do_super && !f.is_static) ? "virtual " : "") << "public " << (f.is_static ? "static " : "") << return_type << " " << string << "(" << (parameter % ", ") 180 (scope_tab << ((do_super && !f.is_static) ? "virtual " : "") << "public " << (f.is_static ? "static " : "") << return_type << " " << string << "(" << (parameter % ", ")
178 << ") {\n " 181 << ") {\n "
179 << eolian_mono::function_definition_preamble() << string << "(" 182 << eolian_mono::function_definition_preamble()
180 << self << ((!f.is_static && (f.parameters.size() > 0)) ? "," : "") 183 << klass_full_native_inherit_name(f.klass) << "." << string << "_ptr.Value.Delegate("
184 << self
185 << ((!f.is_static && (f.parameters.size() > 0)) ? "," : "")
181 << (argument_invocation % ", ") << ");\n" 186 << (argument_invocation % ", ") << ");\n"
182 << eolian_mono::function_definition_epilogue() 187 << eolian_mono::function_definition_epilogue()
183 << " }\n") 188 << " }\n")
diff --git a/src/bin/eolian_mono/eolian/mono/function_pointer.hh b/src/bin/eolian_mono/eolian/mono/function_pointer.hh
index 2c62abeb12..a7e692bbad 100644
--- a/src/bin/eolian_mono/eolian/mono/function_pointer.hh
+++ b/src/bin/eolian_mono/eolian/mono/function_pointer.hh
@@ -47,9 +47,9 @@ struct function_pointer {
47 .generate(sink, std::make_tuple(f, f.return_type, f_name, f.parameters), funcptr_ctx)) 47 .generate(sink, std::make_tuple(f, f.return_type, f_name, f.parameters), funcptr_ctx))
48 return false; 48 return false;
49 // "Internal" delegate, 1-to-1 with the Unamaged function type 49 // "Internal" delegate, 1-to-1 with the Unamaged function type
50 if (!as_generator(marshall_native_annotation(true) 50 if (!as_generator(marshall_annotation(true)
51 << "public delegate " << marshall_type(true) << " " << string // public? 51 << "public delegate " << marshall_type(true) << " " << string // public?
52 << "Internal(IntPtr data" << *grammar::attribute_reorder<-1, -1>((", " << marshall_native_annotation << " " << marshall_parameter)) << ");\n") 52 << "Internal(IntPtr data" << *grammar::attribute_reorder<-1, -1>((", " << marshall_annotation << " " << marshall_parameter)) << ");\n")
53 .generate(sink, std::make_tuple(f.return_type, f.return_type, f_name, f.parameters), funcptr_ctx)) 53 .generate(sink, std::make_tuple(f.return_type, f.return_type, f_name, f.parameters), funcptr_ctx))
54 return false; 54 return false;
55 55
@@ -80,8 +80,8 @@ struct function_pointer {
80 << scope_tab << "}\n\n" 80 << scope_tab << "}\n\n"
81 81
82 82
83 << scope_tab << marshall_native_annotation(true) 83 << scope_tab << marshall_annotation(true)
84 << scope_tab << "internal static " << marshall_type(true) << " Cb(IntPtr cb_data" << *grammar::attribute_reorder<-1, -1>((", " << marshall_native_annotation << " " << marshall_parameter)) << ")\n" 84 << scope_tab << "internal static " << marshall_type(true) << " Cb(IntPtr cb_data" << *grammar::attribute_reorder<-1, -1>((", " << marshall_annotation << " " << marshall_parameter)) << ")\n"
85 << scope_tab << "{\n" 85 << scope_tab << "{\n"
86 << scope_tab << scope_tab << "GCHandle handle = GCHandle.FromIntPtr(cb_data);\n" 86 << scope_tab << scope_tab << "GCHandle handle = GCHandle.FromIntPtr(cb_data);\n"
87 << scope_tab << scope_tab << string << " cb = (" << string << ")handle.Target;\n" 87 << scope_tab << scope_tab << string << " cb = (" << string << ")handle.Target;\n"
diff --git a/src/bin/eolian_mono/eolian/mono/function_registration.hh b/src/bin/eolian_mono/eolian/mono/function_registration.hh
index 90cbbc485d..cc7534b29a 100644
--- a/src/bin/eolian_mono/eolian/mono/function_registration.hh
+++ b/src/bin/eolian_mono/eolian/mono/function_registration.hh
@@ -37,7 +37,8 @@ struct function_registration_generator
37 // auto index = index_generator(); 37 // auto index = index_generator();
38 38
39 if(!as_generator( 39 if(!as_generator(
40 scope_tab << scope_tab << f.c_name << "_static_delegate = new " << f.c_name << "_delegate(" << 40 scope_tab << scope_tab << "if (" << f.c_name << "_static_delegate == null)\n"
41 << scope_tab << scope_tab << f.c_name << "_static_delegate = new " << f.c_name << "_delegate(" <<
41 escape_keyword(f.name) << ");\n" 42 escape_keyword(f.name) << ");\n"
42 ).generate(sink, attributes::unused, context)) 43 ).generate(sink, attributes::unused, context))
43 return false; 44 return false;
@@ -47,9 +48,9 @@ struct function_registration_generator
47#ifdef _WIN32 48#ifdef _WIN32
48 << "api_func = Marshal.StringToHGlobalAnsi(\"" << string << "\")" 49 << "api_func = Marshal.StringToHGlobalAnsi(\"" << string << "\")"
49#else 50#else
50 << "api_func = Efl.Eo.Globals.dlsym(Efl.Eo.Globals.RTLD_DEFAULT, \"" << string << "\")" 51 << "api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, \"" << string << "\")"
51#endif 52#endif
52 ", func = Marshal.GetFunctionPointerForDelegate(" << string << "_static_delegate)});\n" 53 << ", func = Marshal.GetFunctionPointerForDelegate(" << string << "_static_delegate)});\n"
53 ) 54 )
54 .generate(sink, std::make_tuple(f.c_name, f.c_name), context)) 55 .generate(sink, std::make_tuple(f.c_name, f.c_name), context))
55 return false; 56 return false;
diff --git a/src/bin/eolian_mono/eolian/mono/klass.hh b/src/bin/eolian_mono/eolian/mono/klass.hh
index 6c02de67ed..fc1bdd57aa 100644
--- a/src/bin/eolian_mono/eolian/mono/klass.hh
+++ b/src/bin/eolian_mono/eolian/mono/klass.hh
@@ -365,9 +365,10 @@ struct klass
365 365
366 if(!as_generator 366 if(!as_generator
367 ( 367 (
368 "public class " << native_inherit_name << " " << (root ? ": Efl.Eo.NativeClass" : (": " + base_name)) <<"{\n" 368 "public class " << native_inherit_name << " " << (root ? " : Efl.Eo.NativeClass" : (": " + base_name)) <<"{\n"
369 // << scope_tab << (root ? "protected IntPtr EoKlass { get; set; }\n" : "\n") 369 << scope_tab << "public " << (root ? "" : "new ") << " static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule("
370 << scope_tab << "public " << /*(root ? "" : "new ")*/ "override " << "System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)\n" 370 << context_find_tag<library_context>(context).actual_library_name(cls.filename) << ");\n"
371 << scope_tab << "public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)\n"
371 << scope_tab << "{\n" 372 << scope_tab << "{\n"
372 << scope_tab << scope_tab << "var descs = new System.Collections.Generic.List<Efl_Op_Description>();\n" 373 << scope_tab << scope_tab << "var descs = new System.Collections.Generic.List<Efl_Op_Description>();\n"
373 ) 374 )
@@ -479,8 +480,6 @@ struct klass
479 480
480 return as_generator( 481 return as_generator(
481 scope_tab << visibility << " System.IntPtr handle;\n" 482 scope_tab << visibility << " System.IntPtr handle;\n"
482 << scope_tab << "public Dictionary<String, IntPtr> cached_strings = new Dictionary<String, IntPtr>();" << "\n"
483 << scope_tab << "public Dictionary<String, IntPtr> cached_stringshares = new Dictionary<String, IntPtr>();" << "\n"
484 << scope_tab << "///<summary>Pointer to the native instance.</summary>\n" 483 << scope_tab << "///<summary>Pointer to the native instance.</summary>\n"
485 << scope_tab << "public System.IntPtr NativeHandle {\n" 484 << scope_tab << "public System.IntPtr NativeHandle {\n"
486 << scope_tab << scope_tab << "get { return handle; }\n" 485 << scope_tab << scope_tab << "get { return handle; }\n"
@@ -604,8 +603,6 @@ struct klass
604 << scope_tab << "///<summary>Releases the underlying native instance.</summary>\n" 603 << scope_tab << "///<summary>Releases the underlying native instance.</summary>\n"
605 << scope_tab << "public void Dispose()\n" 604 << scope_tab << "public void Dispose()\n"
606 << scope_tab << "{\n" 605 << scope_tab << "{\n"
607 << scope_tab << "Efl.Eo.Globals.free_dict_values(cached_strings);" << "\n"
608 << scope_tab << "Efl.Eo.Globals.free_stringshare_values(cached_stringshares);" << "\n"
609 << scope_tab << scope_tab << "Dispose(true);\n" 606 << scope_tab << scope_tab << "Dispose(true);\n"
610 << scope_tab << scope_tab << "GC.SuppressFinalize(this);\n" 607 << scope_tab << scope_tab << "GC.SuppressFinalize(this);\n"
611 << scope_tab << "}\n" 608 << scope_tab << "}\n"
@@ -682,13 +679,13 @@ struct klass
682 679
683 // Callback registration functions 680 // Callback registration functions
684 if (!as_generator( 681 if (!as_generator(
685 scope_tab << visibility << "bool add_cpp_event_handler(string key, Efl.EventCb evt_delegate) {\n" 682 scope_tab << visibility << "bool add_cpp_event_handler(string lib, string key, Efl.EventCb evt_delegate) {\n"
686 << scope_tab << scope_tab << "int event_count = 0;\n" 683 << scope_tab << scope_tab << "int event_count = 0;\n"
687 << scope_tab << scope_tab << "if (!event_cb_count.TryGetValue(key, out event_count))\n" 684 << scope_tab << scope_tab << "if (!event_cb_count.TryGetValue(key, out event_count))\n"
688 << scope_tab << scope_tab << scope_tab << "event_cb_count[key] = event_count;\n" 685 << scope_tab << scope_tab << scope_tab << "event_cb_count[key] = event_count;\n"
689 << scope_tab << scope_tab << "if (event_count == 0) {\n" 686 << scope_tab << scope_tab << "if (event_count == 0) {\n"
690 687
691 << scope_tab << scope_tab << scope_tab << "IntPtr desc = Efl.EventDescription.GetNative(key);\n" 688 << scope_tab << scope_tab << scope_tab << "IntPtr desc = Efl.EventDescription.GetNative(lib, key);\n"
692 << scope_tab << scope_tab << scope_tab << "if (desc == IntPtr.Zero) {\n" 689 << scope_tab << scope_tab << scope_tab << "if (desc == IntPtr.Zero) {\n"
693 << scope_tab << scope_tab << scope_tab << scope_tab << "Eina.Log.Error($\"Failed to get native event {key}\");\n" 690 << scope_tab << scope_tab << scope_tab << scope_tab << "Eina.Log.Error($\"Failed to get native event {key}\");\n"
694 << scope_tab << scope_tab << scope_tab << scope_tab << "return false;\n" 691 << scope_tab << scope_tab << scope_tab << scope_tab << "return false;\n"
@@ -710,7 +707,8 @@ struct klass
710 << scope_tab << scope_tab << scope_tab << "event_cb_count[key] = event_count;\n" 707 << scope_tab << scope_tab << scope_tab << "event_cb_count[key] = event_count;\n"
711 << scope_tab << scope_tab << "if (event_count == 1) {\n" 708 << scope_tab << scope_tab << "if (event_count == 1) {\n"
712 709
713 << scope_tab << scope_tab << scope_tab << "IntPtr desc = Efl.EventDescription.GetNative(key);\n" 710 << scope_tab << scope_tab << scope_tab << "IntPtr desc = Efl.EventDescription.GetNative("
711 << context_find_tag<library_context>(context).actual_library_name(cls.filename) << ", key);\n"
714 << scope_tab << scope_tab << scope_tab << "if (desc == IntPtr.Zero) {\n" 712 << scope_tab << scope_tab << scope_tab << "if (desc == IntPtr.Zero) {\n"
715 << scope_tab << scope_tab << scope_tab << scope_tab << "Eina.Log.Error($\"Failed to get native event {key}\");\n" 713 << scope_tab << scope_tab << scope_tab << scope_tab << "Eina.Log.Error($\"Failed to get native event {key}\");\n"
716 << scope_tab << scope_tab << scope_tab << scope_tab << "return false;\n" 714 << scope_tab << scope_tab << scope_tab << scope_tab << "return false;\n"
diff --git a/src/bin/eolian_mono/eolian/mono/marshall_annotation.hh b/src/bin/eolian_mono/eolian/mono/marshall_annotation.hh
index 6ddb990da8..451c56525c 100644
--- a/src/bin/eolian_mono/eolian/mono/marshall_annotation.hh
+++ b/src/bin/eolian_mono/eolian/mono/marshall_annotation.hh
@@ -1,6 +1,8 @@
1#ifndef EOLIAN_MONO_MARSHALL_ANNOTATION_IMPL_HH 1#ifndef EOLIAN_MONO_MARSHALL_ANNOTATION_IMPL_HH
2#define EOLIAN_MONO_MARSHALL_ANNOTATION_IMPL_HH 2#define EOLIAN_MONO_MARSHALL_ANNOTATION_IMPL_HH
3 3
4#include "Eina.hh"
5
4#include "grammar/generator.hpp" 6#include "grammar/generator.hpp"
5#include "grammar/klass_def.hpp" 7#include "grammar/klass_def.hpp"
6#include "grammar/case.hpp" 8#include "grammar/case.hpp"
@@ -90,7 +92,7 @@ struct marshall_annotation_visitor_generate
90 {"string", true, [&] { 92 {"string", true, [&] {
91 return " [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringPassOwnershipMarshaler))]"; 93 return " [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringPassOwnershipMarshaler))]";
92 }}, 94 }},
93 {"string", false, [&] { 95 {"string", nullptr, [&] {
94 return " [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]"; 96 return " [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]";
95 }}, 97 }},
96 {"mstring", true, [&] { 98 {"mstring", true, [&] {
@@ -112,120 +114,10 @@ struct marshall_annotation_visitor_generate
112 return " [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.ValueMarshaler))]"; 114 return " [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.ValueMarshaler))]";
113 }}, 115 }},
114 {"strbuf", true, [&] { 116 {"strbuf", true, [&] {
115 return " [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StrbufPassOwnershipMarshaler))]"; 117 return " [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StrbufPassOwnershipMarshaler))]";
116 }},
117 {"strbuf", false, [&] {
118 return " [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StrbufKeepOwnershipMarshaler))]";
119 }},
120 };
121
122 if(eina::optional<bool> b = call_annotation_match
123 ((is_return ? return_match_table : parameter_match_table)
124 , [&] (match const& m)
125 {
126 return (!m.name || *m.name == regular.base_type)
127 && (!m.has_own || *m.has_own == (bool)(regular.base_qualifier & qualifier_info::is_own))
128 ;
129 }
130 , [&] (std::string const& string)
131 {
132 std::copy(string.begin(), string.end(), sink);
133 return true;
134 }))
135 {
136 return *b;
137 }
138 else
139 {
140 return true;
141 }
142 }
143 bool operator()(attributes::klass_name const& klass_name) const
144 {
145 const char no_return_prefix[] = "[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Efl.Eo.MarshalTest<";
146 const char return_prefix[] = "[return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Efl.Eo.MarshalTest<";
147 return as_generator
148 ((is_return ? return_prefix : no_return_prefix)
149 << string << ", Efl.Eo." << (klass_name.base_qualifier & qualifier_info::is_own ? "OwnTag" : "NonOwnTag") << ">))]"
150 ).generate(sink, name_helpers::klass_full_concrete_name(klass_name), *context);
151 }
152 bool operator()(attributes::complex_type_def const& c) const
153 {
154 if (c.outer.base_type == "future")
155 {
156 std::string prefix = is_return ? "return: " : "";
157 return as_generator("[" << prefix << "MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Eina.FutureMarshaler))]").generate(sink, nullptr, *context);
158 }
159 return true;
160 }
161};
162
163template <typename OutputIterator, typename Context>
164struct marshall_native_annotation_visitor_generate
165{
166 mutable OutputIterator sink;
167 Context const* context;
168 std::string c_type;
169 bool is_out;
170 bool is_return;
171 bool is_ptr;
172
173 typedef marshall_type_visitor_generate<OutputIterator, Context> visitor_type;
174 typedef bool result_type;
175
176 bool operator()(attributes::regular_type_def const& regular) const
177 {
178 using attributes::regular_type_def;
179 struct match
180 {
181 eina::optional<std::string> name;
182 eina::optional<bool> has_own;
183 std::function<std::string()> function;
184 };
185 match const parameter_match_table[] =
186 {
187 // signed primitives
188 {"bool", nullptr, [&] { return " [MarshalAs(UnmanagedType.U1)]"; }},
189 {"string", true, [&] {
190 return " [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringPassOwnershipMarshaler))]";
191 }},
192 {"string", false, [&] {
193 if (is_out)
194 return "";
195 return " [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]";
196 }},
197 {"stringshare", true, [&] {
198 return " [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringsharePassOwnershipMarshaler))]";
199 }},
200 {"stringshare", false, [&] {
201 if (is_out)
202 return "";
203 return " [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringshareKeepOwnershipMarshaler))]";
204 }},
205 {"strbuf", true, [&] {
206 return " [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StrbufPassOwnershipMarshaler))]";
207 }}, 118 }},
208 {"strbuf", false, [&] { 119 {"strbuf", false, [&] {
209 return " [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StrbufKeepOwnershipMarshaler))]"; 120 return " [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StrbufKeepOwnershipMarshaler))]";
210 }},
211 };
212 match const return_match_table[] =
213 {
214 // signed primitives
215 {"bool", nullptr, [&] { return " [return: MarshalAs(UnmanagedType.U1)]"; }},
216 {"string", true, [&] {
217 return " [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringPassOwnershipMarshaler))]";
218 }},
219 {"string", false, [&] { return ""; }},
220 {"stringshare", true, [&] {
221 return " [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringsharePassOwnershipMarshaler))]";
222 }},
223 {"stringshare", false, [&] { return ""; }},
224 {"strbuf", true, [&] {
225 return " [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StrbufPassOwnershipMarshaler))]";
226 }},
227 {"strbuf", false, [&] {
228 return " [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StrbufKeepOwnershipMarshaler))]";
229 }}, 121 }},
230 }; 122 };
231 123
@@ -233,6 +125,8 @@ struct marshall_native_annotation_visitor_generate
233 ((is_return ? return_match_table : parameter_match_table) 125 ((is_return ? return_match_table : parameter_match_table)
234 , [&] (match const& m) 126 , [&] (match const& m)
235 { 127 {
128 if (is_return)
129 EINA_CXX_DOM_LOG_DBG(eolian_mono::domain) << "comparing return type " << (m.name ? *m.name : "unknown") << " with " << regular.base_type << std::endl;
236 return (!m.name || *m.name == regular.base_type) 130 return (!m.name || *m.name == regular.base_type)
237 && (!m.has_own || *m.has_own == (bool)(regular.base_qualifier & qualifier_info::is_own)) 131 && (!m.has_own || *m.has_own == (bool)(regular.base_qualifier & qualifier_info::is_own))
238 ; 132 ;
@@ -269,8 +163,6 @@ struct marshall_native_annotation_visitor_generate
269 return true; 163 return true;
270 } 164 }
271}; 165};
272
273
274} } 166} }
275 167
276#endif 168#endif
diff --git a/src/bin/eolian_mono/eolian/mono/marshall_type.hh b/src/bin/eolian_mono/eolian/mono/marshall_type.hh
index add954ade2..5c350adebe 100644
--- a/src/bin/eolian_mono/eolian/mono/marshall_type.hh
+++ b/src/bin/eolian_mono/eolian/mono/marshall_type.hh
@@ -13,8 +13,6 @@ template <typename OutputIterator, typename Context>
13struct marshall_type_visitor_generate; 13struct marshall_type_visitor_generate;
14template <typename OutputIterator, typename Context> 14template <typename OutputIterator, typename Context>
15struct marshall_annotation_visitor_generate; 15struct marshall_annotation_visitor_generate;
16template <typename OutputIterator, typename Context>
17struct marshall_native_annotation_visitor_generate;
18} 16}
19 17
20/* 18/*
@@ -73,26 +71,6 @@ struct marshall_annotation_generator
73 bool is_return; 71 bool is_return;
74}; 72};
75 73
76struct marshall_native_annotation_generator
77{
78 marshall_native_annotation_generator(bool is_return = false)
79 : is_return(is_return) {}
80
81 template <typename OutputIterator, typename Context>
82 bool generate(OutputIterator sink, attributes::type_def const& type, Context const& context) const
83 {
84 return type.original_type.visit(detail::marshall_native_annotation_visitor_generate<OutputIterator, Context>{sink, &context, type.c_type, false, is_return, type.is_ptr});
85 }
86 template <typename OutputIterator, typename Context>
87 bool generate(OutputIterator sink, attributes::parameter_def const& param, Context const& context) const
88 {
89 return param.type.original_type.visit(detail::marshall_native_annotation_visitor_generate<OutputIterator, Context>{sink, &context, param.type.c_type
90 , param.direction != attributes::parameter_direction::in, false, param.type.is_ptr});
91 }
92
93 bool is_return;
94};
95
96struct marshall_type_terminal 74struct marshall_type_terminal
97{ 75{
98 marshall_type_generator const operator()(bool is_return) const 76 marshall_type_generator const operator()(bool is_return) const
@@ -120,19 +98,6 @@ marshall_annotation_generator const as_generator(marshall_annotation_terminal)
120} 98}
121 99
122 100
123struct marshall_native_annotation_terminal
124{
125 marshall_native_annotation_generator const operator()(bool is_return) const
126 {
127 return marshall_native_annotation_generator(is_return);
128 }
129} const marshall_native_annotation = {};
130
131marshall_native_annotation_generator const as_generator(marshall_native_annotation_terminal)
132{
133 return marshall_native_annotation_generator{};
134}
135
136} 101}
137 102
138namespace efl { namespace eolian { namespace grammar { 103namespace efl { namespace eolian { namespace grammar {
@@ -158,23 +123,12 @@ struct is_generator< ::eolian_mono::marshall_annotation_generator> : std::true_t
158template <> 123template <>
159struct is_generator< ::eolian_mono::marshall_annotation_terminal> : std::true_type {}; 124struct is_generator< ::eolian_mono::marshall_annotation_terminal> : std::true_type {};
160 125
161template <>
162struct is_eager_generator< ::eolian_mono::marshall_native_annotation_generator> : std::true_type {};
163template <>
164struct is_generator< ::eolian_mono::marshall_native_annotation_generator> : std::true_type {};
165template <>
166struct is_generator< ::eolian_mono::marshall_native_annotation_terminal> : std::true_type {};
167
168namespace type_traits { 126namespace type_traits {
169template <> 127template <>
170struct attributes_needed< ::eolian_mono::marshall_annotation_generator> : std::integral_constant<int, 1> {}; 128struct attributes_needed< ::eolian_mono::marshall_annotation_generator> : std::integral_constant<int, 1> {};
171template <> 129template <>
172struct attributes_needed< ::eolian_mono::marshall_annotation_terminal> : std::integral_constant<int, 1> {}; 130struct attributes_needed< ::eolian_mono::marshall_annotation_terminal> : std::integral_constant<int, 1> {};
173 131
174template <>
175struct attributes_needed< ::eolian_mono::marshall_native_annotation_generator> : std::integral_constant<int, 1> {};
176template <>
177struct attributes_needed< ::eolian_mono::marshall_native_annotation_terminal> : std::integral_constant<int, 1> {};
178} 132}
179 133
180} } } 134} } }
diff --git a/src/bin/eolian_mono/eolian/mono/marshall_type_impl.hh b/src/bin/eolian_mono/eolian/mono/marshall_type_impl.hh
index e14369ad7b..8924e09c3b 100644
--- a/src/bin/eolian_mono/eolian/mono/marshall_type_impl.hh
+++ b/src/bin/eolian_mono/eolian/mono/marshall_type_impl.hh
@@ -32,7 +32,6 @@ struct marshall_type_visitor_generate
32 bool operator()(attributes::regular_type_def const& regular) const 32 bool operator()(attributes::regular_type_def const& regular) const
33 { 33 {
34 using attributes::regular_type_def; 34 using attributes::regular_type_def;
35 bool is_inherit_native = context_find_tag<class_context>(*context).current_wrapper_kind == class_context::inherit_native;
36 35
37 struct match 36 struct match
38 { 37 {
@@ -47,32 +46,24 @@ struct marshall_type_visitor_generate
47 { 46 {
48 regular_type_def r = regular; 47 regular_type_def r = regular;
49 r.base_qualifier.qualifier ^= qualifier_info::is_ref; 48 r.base_qualifier.qualifier ^= qualifier_info::is_ref;
50 // if(is_out || is_return)
51 return replace_base_type(r, " System.String"); 49 return replace_base_type(r, " System.String");
52 // else return replace_base_type(r, " ::efl::eina::string_view");
53 }} 50 }}
54 , {"string", false, [&] 51 , {"string", false, [&]
55 { 52 {
56 regular_type_def r = regular; 53 regular_type_def r = regular;
57 r.base_qualifier.qualifier ^= qualifier_info::is_ref; 54 r.base_qualifier.qualifier ^= qualifier_info::is_ref;
58 if (is_inherit_native && (is_return || is_out))
59 return replace_base_type(r, " System.IntPtr");
60 return replace_base_type(r, " System.String"); 55 return replace_base_type(r, " System.String");
61 }} 56 }}
62 , {"mstring", true, [&] 57 , {"mstring", true, [&]
63 { 58 {
64 regular_type_def r = regular; 59 regular_type_def r = regular;
65 r.base_qualifier.qualifier ^= qualifier_info::is_ref; 60 r.base_qualifier.qualifier ^= qualifier_info::is_ref;
66 // if(is_out || is_return)
67 return replace_base_type(r, " System.String"); 61 return replace_base_type(r, " System.String");
68 // else return replace_base_type(r, " ::efl::eina::string_view");
69 }} 62 }}
70 , {"mstring", false, [&] 63 , {"mstring", false, [&]
71 { 64 {
72 regular_type_def r = regular; 65 regular_type_def r = regular;
73 r.base_qualifier.qualifier ^= qualifier_info::is_ref; 66 r.base_qualifier.qualifier ^= qualifier_info::is_ref;
74 if (is_inherit_native && (is_return || is_out))
75 return replace_base_type(r, " System.IntPtr");
76 return replace_base_type(r, " System.String"); 67 return replace_base_type(r, " System.String");
77 }} 68 }}
78 , {"stringshare", true, [&] 69 , {"stringshare", true, [&]
@@ -85,10 +76,7 @@ struct marshall_type_visitor_generate
85 { 76 {
86 regular_type_def r = regular; 77 regular_type_def r = regular;
87 r.base_qualifier.qualifier ^= qualifier_info::is_ref; 78 r.base_qualifier.qualifier ^= qualifier_info::is_ref;
88 if (is_inherit_native && (is_return || is_out)) 79 return replace_base_type(r, " System.String");
89 return replace_base_type(r, " System.IntPtr");
90 else
91 return replace_base_type(r, " System.String");
92 }} 80 }}
93 , {"strbuf", nullptr, [&] 81 , {"strbuf", nullptr, [&]
94 { 82 {
@@ -193,7 +181,6 @@ struct marshall_type_visitor_generate
193 bool operator()(attributes::klass_name klass_name) const 181 bool operator()(attributes::klass_name klass_name) const
194 { 182 {
195 return visitor_generate<OutputIterator, Context>{sink, context, c_type, is_out, is_return, is_ptr}(klass_name); 183 return visitor_generate<OutputIterator, Context>{sink, context, c_type, is_out, is_return, is_ptr}(klass_name);
196 // return as_generator(" System.IntPtr").generate(sink, attributes::unused, *context);
197 } 184 }
198 bool operator()(attributes::complex_type_def const& complex) const 185 bool operator()(attributes::complex_type_def const& complex) const
199 { 186 {
@@ -247,14 +234,8 @@ struct marshall_type_visitor_generate
247 auto default_match = [&] (attributes::complex_type_def const& complex) 234 auto default_match = [&] (attributes::complex_type_def const& complex)
248 { 235 {
249 regular_type_def no_pointer_regular = complex.outer; 236 regular_type_def no_pointer_regular = complex.outer;
250 // std::vector<attributes::pointer_indirection> pointers;
251 // pointers.swap(no_pointer_regular.pointers);
252 // if(is_out)
253 // pointers.push_back({{attributes::qualifier_info::is_none, {}}, true});
254 return visitor_type{sink, context, c_type, false}(no_pointer_regular) 237 return visitor_type{sink, context, c_type, false}(no_pointer_regular)
255 && as_generator("<" << (type % ", ") << ">").generate(sink, complex.subtypes, *context) 238 && as_generator("<" << (type % ", ") << ">").generate(sink, complex.subtypes, *context);
256 ;
257 // && detail::generate_pointers(sink, pointers, *context, false);
258 }; 239 };
259 240
260 if(eina::optional<bool> b = call_match 241 if(eina::optional<bool> b = call_match
@@ -279,12 +260,9 @@ struct marshall_type_visitor_generate
279 return *b; 260 return *b;
280 } 261 }
281 262
282 //return default_match(complex);
283 return visitor_generate<OutputIterator, Context>{sink, context, c_type, is_out, is_return, is_ptr}(complex); 263 return visitor_generate<OutputIterator, Context>{sink, context, c_type, is_out, is_return, is_ptr}(complex);
284 // return as_generator(" System.IntPtr").generate(sink, attributes::unused, *context);
285 } 264 }
286}; 265};
287
288} } 266} }
289 267
290#endif 268#endif
diff --git a/src/bin/eolian_mono/eolian/mono/name_helpers.hh b/src/bin/eolian_mono/eolian/mono/name_helpers.hh
index ccbbfce3b4..5fc1f18d22 100644
--- a/src/bin/eolian_mono/eolian/mono/name_helpers.hh
+++ b/src/bin/eolian_mono/eolian/mono/name_helpers.hh
@@ -364,13 +364,27 @@ inline std::string klass_inherit_name(T const& klass)
364template<typename T> 364template<typename T>
365inline std::string klass_native_inherit_name(T const& klass) 365inline std::string klass_native_inherit_name(T const& klass)
366{ 366{
367 return klass_concrete_name(klass) + "NativeInherit"; 367 switch(klass.type)
368 {
369 case attributes::class_type::abstract_:
370 case attributes::class_type::regular:
371 return klass_concrete_name(klass) + "NativeInherit";
372 default:
373 return klass_interface_name(klass) + "NativeInherit";
374 }
368} 375}
369 376
370template<typename T> 377template<typename T>
371inline std::string klass_full_native_inherit_name(T const& klass) 378inline std::string klass_full_native_inherit_name(T const& klass)
372{ 379{
373 return klass_full_concrete_name(klass) + "NativeInherit"; 380 switch(klass.type)
381 {
382 case attributes::class_type::abstract_:
383 case attributes::class_type::regular:
384 return klass_full_concrete_name(klass) + "NativeInherit";
385 default:
386 return klass_full_interface_name(klass) + "NativeInherit";
387 }
374} 388}
375 389
376template<typename T> 390template<typename T>
diff --git a/src/bin/eolian_mono/eolian/mono/parameter.hh b/src/bin/eolian_mono/eolian/mono/parameter.hh
index efb907f7f5..f344daedd0 100644
--- a/src/bin/eolian_mono/eolian/mono/parameter.hh
+++ b/src/bin/eolian_mono/eolian/mono/parameter.hh
@@ -1158,7 +1158,7 @@ struct native_convert_out_assign_generator
1158 return false; 1158 return false;
1159 } 1159 }
1160 return as_generator( 1160 return as_generator(
1161 string << "= Efl.Eo.Globals.cached_stringshare_to_intptr(((" << name_helpers::klass_inherit_name(*klass) << ")wrapper).cached_stringshares, " << string << ");\n" 1161 string << "= " << string << ";\n"
1162 ).generate(sink, std::make_tuple(escape_keyword(param.param_name), out_variable_name(param.param_name)), context); 1162 ).generate(sink, std::make_tuple(escape_keyword(param.param_name), out_variable_name(param.param_name)), context);
1163 } 1163 }
1164 else if (param_is_acceptable(param, "const char *", !WANT_OWN, WANT_OUT)) 1164 else if (param_is_acceptable(param, "const char *", !WANT_OWN, WANT_OUT))
@@ -1169,7 +1169,7 @@ struct native_convert_out_assign_generator
1169 return false; 1169 return false;
1170 } 1170 }
1171 return as_generator( 1171 return as_generator(
1172 string << "= Efl.Eo.Globals.cached_string_to_intptr(((" << name_helpers::klass_inherit_name(*klass) << ")wrapper).cached_strings, " << string << ");\n" 1172 string << " = " << string << ";\n"
1173 ).generate(sink, std::make_tuple(escape_keyword(param.param_name), out_variable_name(param.param_name)), context); 1173 ).generate(sink, std::make_tuple(escape_keyword(param.param_name), out_variable_name(param.param_name)), context);
1174 } 1174 }
1175 else if (param_is_acceptable(param, "Eina_Binbuf *", WANT_OWN, WANT_OUT) 1175 else if (param_is_acceptable(param, "Eina_Binbuf *", WANT_OWN, WANT_OUT)
@@ -1307,7 +1307,7 @@ struct native_convert_return_generator
1307 return false; 1307 return false;
1308 } 1308 }
1309 return as_generator( 1309 return as_generator(
1310 "return Efl.Eo.Globals.cached_string_to_intptr(((" << name_helpers::klass_inherit_name(*klass) << ")wrapper).cached_strings, _ret_var);\n" 1310 "return _ret_var;\n"
1311 ).generate(sink, attributes::unused, context); 1311 ).generate(sink, attributes::unused, context);
1312 } 1312 }
1313 else 1313 else
@@ -1325,7 +1325,7 @@ struct native_convert_return_generator
1325 return false; 1325 return false;
1326 } 1326 }
1327 return as_generator( 1327 return as_generator(
1328 "return Efl.Eo.Globals.cached_stringshare_to_intptr(((" << name_helpers::klass_inherit_name(*klass) << ")wrapper).cached_stringshares, _ret_var);\n" 1328 "return _ret_var;\n"
1329 ).generate(sink, attributes::unused, context); 1329 ).generate(sink, attributes::unused, context);
1330 } 1330 }
1331 else 1331 else
diff --git a/src/bin/eolian_mono/eolian/mono/part_definition.hh b/src/bin/eolian_mono/eolian/mono/part_definition.hh
index bd12ee2a40..47951f4bf1 100644
--- a/src/bin/eolian_mono/eolian/mono/part_definition.hh
+++ b/src/bin/eolian_mono/eolian/mono/part_definition.hh
@@ -24,7 +24,7 @@ struct part_definition_generator
24 << scope_tab << "{\n" 24 << scope_tab << "{\n"
25 << scope_tab << scope_tab << "get\n" 25 << scope_tab << scope_tab << "get\n"
26 << scope_tab << scope_tab << "{\n" 26 << scope_tab << scope_tab << "{\n"
27 << scope_tab << scope_tab << scope_tab << "Efl.Object obj = efl_part_get(NativeHandle, \"" << part.name << "\");\n" 27 << scope_tab << scope_tab << scope_tab << "Efl.Object obj = Efl.PartNativeInherit.efl_part_get_ptr.Value.Delegate(NativeHandle, \"" << part.name << "\");\n"
28 << scope_tab << scope_tab << scope_tab << "return " << part_klass_name << ".static_cast(obj);\n" 28 << scope_tab << scope_tab << scope_tab << "return " << part_klass_name << ".static_cast(obj);\n"
29 << scope_tab << scope_tab << "}\n" 29 << scope_tab << scope_tab << "}\n"
30 << scope_tab << "}\n" 30 << scope_tab << "}\n"
diff --git a/src/bin/eolian_mono/eolian/mono/struct_definition.hh b/src/bin/eolian_mono/eolian/mono/struct_definition.hh
index 0eda387668..70a6537bf1 100644
--- a/src/bin/eolian_mono/eolian/mono/struct_definition.hh
+++ b/src/bin/eolian_mono/eolian/mono/struct_definition.hh
@@ -131,6 +131,22 @@ struct struct_internal_definition_generator
131 .generate(sink, nullptr, context)) 131 .generate(sink, nullptr, context))
132 return false; 132 return false;
133 } 133 }
134 else if (regular && !(regular->base_qualifier & efl::eolian::grammar::attributes::qualifier_info::is_ref)
135 && regular->base_type == "bool")
136 {
137 if (!as_generator("///<summary>Internal wrapper for field " << field_name << "</summary>\n"
138 "public System.Byte " << field_name << ";\n")
139 .generate(sink, nullptr, context))
140 return false;
141 }
142 else if (regular && !(regular->base_qualifier & efl::eolian::grammar::attributes::qualifier_info::is_ref)
143 && regular->base_type == "char")
144 {
145 if (!as_generator("///<summary>Internal wrapper for field " << field_name << "</summary>\n"
146 "public System.Byte " << field_name << ";\n")
147 .generate(sink, nullptr, context))
148 return false;
149 }
134 else if (!as_generator(scope_tab << eolian_mono::marshall_annotation(false) << "\n" 150 else if (!as_generator(scope_tab << eolian_mono::marshall_annotation(false) << "\n"
135 << scope_tab << "public " << eolian_mono::marshall_type(false) << " " << string << ";\n") 151 << scope_tab << "public " << eolian_mono::marshall_type(false) << " " << string << ";\n")
136 .generate(sink, std::make_tuple(field.type, field.type, field_name), context)) 152 .generate(sink, std::make_tuple(field.type, field.type, field_name), context))
@@ -257,6 +273,20 @@ struct to_internal_field_convert_generator
257 ).generate(sink, std::make_tuple(field_name, field_name), context)) 273 ).generate(sink, std::make_tuple(field_name, field_name), context))
258 return false; 274 return false;
259 } 275 }
276 else if (!field.type.is_ptr && regular && regular->base_type == "bool")
277 {
278 if (!as_generator(
279 scope_tab << scope_tab << "_internal_struct." << string << " = _external_struct." << string << " ? (byte)1 : (byte)0;\n")
280 .generate(sink, std::make_tuple(field_name, field_name), context))
281 return false;
282 }
283 else if (!field.type.is_ptr && regular && regular->base_type == "char")
284 {
285 if (!as_generator(
286 scope_tab << scope_tab << "_internal_struct." << string << " = (byte)_external_struct." << string << ";\n")
287 .generate(sink, std::make_tuple(field_name, field_name), context))
288 return false;
289 }
260 else // primitives and enums 290 else // primitives and enums
261 { 291 {
262 if (!as_generator( 292 if (!as_generator(
@@ -362,6 +392,20 @@ struct to_external_field_convert_generator
362 ).generate(sink, std::make_tuple(field_name, field_name), context)) 392 ).generate(sink, std::make_tuple(field_name, field_name), context))
363 return false; 393 return false;
364 } 394 }
395 else if (!field.type.is_ptr && regular && regular->base_type == "bool")
396 {
397 if (!as_generator(
398 scope_tab << scope_tab << "_external_struct." << string << " = _internal_struct." << string << " != 0;\n"
399 ).generate(sink, std::make_tuple(field_name, field_name), context))
400 return false;
401 }
402 else if (!field.type.is_ptr && regular && regular->base_type == "char")
403 {
404 if (!as_generator(
405 scope_tab << scope_tab << "_external_struct." << string << " = (char)_internal_struct." << string << ";\n"
406 ).generate(sink, std::make_tuple(field_name, field_name), context))
407 return false;
408 }
365 else // primitives and enums 409 else // primitives and enums
366 { 410 {
367 if (!as_generator( 411 if (!as_generator(
diff --git a/src/bindings/cxx/eina_cxx/eina_variant.hh b/src/bindings/cxx/eina_cxx/eina_variant.hh
index 358688a0bb..4885c80236 100644
--- a/src/bindings/cxx/eina_cxx/eina_variant.hh
+++ b/src/bindings/cxx/eina_cxx/eina_variant.hh
@@ -6,6 +6,7 @@
6#include <utility> 6#include <utility>
7#include <type_traits> 7#include <type_traits>
8#include <tuple> 8#include <tuple>
9#include <iosfwd>
9 10
10#include <eina_aligned_union.hh> 11#include <eina_aligned_union.hh>
11 12
@@ -149,6 +150,17 @@ struct destroy_visitor
149 } 150 }
150}; 151};
151 152
153struct ostream_visitor
154{
155 std::ostream* s;
156 typedef std::ostream& result_type;
157 template <typename T>
158 std::ostream& operator()(T const& other) const
159 {
160 return *s << other;
161 }
162};
163
152template <typename T> 164template <typename T>
153struct get_visitor 165struct get_visitor
154{ 166{
@@ -295,6 +307,10 @@ private:
295 && (rhs.type == -1 307 && (rhs.type == -1
296 || rhs.visit(compare_equal_visitor{&lhs.buffer})); 308 || rhs.visit(compare_equal_visitor{&lhs.buffer}));
297 } 309 }
310 friend std::ostream& operator<<(std::ostream& s, variant<Args...> const& rhs)
311 {
312 return rhs.visit(ostream_visitor{&s});
313 }
298 314
299 int type; 315 int type;
300 /** 316 /**
diff --git a/src/bindings/mono/efl_mono/efl_libs.cs.in b/src/bindings/mono/efl_mono/efl_libs.cs.in
index 86742641fe..9fb3313b69 100644
--- a/src/bindings/mono/efl_mono/efl_libs.cs.in
+++ b/src/bindings/mono/efl_mono/efl_libs.cs.in
@@ -18,6 +18,23 @@ public class Libs {
18 public const string Eldbus = "@ELDBUS_DL_MONO@"; 18 public const string Eldbus = "@ELDBUS_DL_MONO@";
19 19
20 public const string CustomExports = "@CUSTOM_EXPORTS_MONO_DL_MONO@"; 20 public const string CustomExports = "@CUSTOM_EXPORTS_MONO_DL_MONO@";
21
22 public const string Libdl = "libdl.so";
23 public const string Kernel32 = "kernel32.dll";
24
25 public static Efl.Eo.NativeModule EflModule = new Efl.Eo.NativeModule(Efl);
26 public static Efl.Eo.NativeModule CoreModule = new Efl.Eo.NativeModule(Ecore);
27 public static Efl.Eo.NativeModule EinaModule = new Efl.Eo.NativeModule(Eina);
28 public static Efl.Eo.NativeModule EoModule = new Efl.Eo.NativeModule(Eo);
29 public static Efl.Eo.NativeModule EvasModule = new Efl.Eo.NativeModule(Evas);
30 public static Efl.Eo.NativeModule EvilModule = new Efl.Eo.NativeModule(Evil);
31 public static Efl.Eo.NativeModule EcoreEvasModule = new Efl.Eo.NativeModule(EcoreEvas);
32 public static Efl.Eo.NativeModule EdjeModule = new Efl.Eo.NativeModule(Edje);
33 public static Efl.Eo.NativeModule ElementaryModule = new Efl.Eo.NativeModule(Elementary);
34 public static Efl.Eo.NativeModule EldbusModule = new Efl.Eo.NativeModule(Eldbus);
35 public static Efl.Eo.NativeModule CustomExportsModule = new Efl.Eo.NativeModule(CustomExports);
36 public static Efl.Eo.NativeModule LibdlModule = new Efl.Eo.NativeModule(Libdl);
37 public static Efl.Eo.NativeModule Kernel32Module = new Efl.Eo.NativeModule(Kernel32);
21} 38}
22 39
23} 40}
diff --git a/src/bindings/mono/eina_mono/eina_common.cs b/src/bindings/mono/eina_mono/eina_common.cs
index e2ddc70978..c9c10de160 100644
--- a/src/bindings/mono/eina_mono/eina_common.cs
+++ b/src/bindings/mono/eina_mono/eina_common.cs
@@ -95,12 +95,6 @@ public static class MemoryNative {
95 } 95 }
96} 96}
97 97
98[StructLayout(LayoutKind.Sequential)]
99public struct ConvertWrapper<T>
100{
101 public T val;
102}
103
104public static class PrimitiveConversion 98public static class PrimitiveConversion
105{ 99{
106 public static T PointerToManaged<T>(IntPtr nat) 100 public static T PointerToManaged<T>(IntPtr nat)
@@ -111,8 +105,8 @@ public static class PrimitiveConversion
111 return default(T); 105 return default(T);
112 } 106 }
113 107
114 var w = Marshal.PtrToStructure<Eina.ConvertWrapper<T> >(nat); 108 var w = Marshal.PtrToStructure<T>(nat);
115 return w.val; 109 return w;
116 } 110 }
117 111
118 public static IntPtr ManagedToPointerAlloc<T>(T man) 112 public static IntPtr ManagedToPointerAlloc<T>(T man)
diff --git a/src/bindings/mono/eina_mono/eina_container_common.cs b/src/bindings/mono/eina_mono/eina_container_common.cs
index 838a7edb07..ade01dbb62 100644
--- a/src/bindings/mono/eina_mono/eina_container_common.cs
+++ b/src/bindings/mono/eina_mono/eina_container_common.cs
@@ -10,17 +10,11 @@ using static Eina.HashNativeFunctions;
10using static Eina.InarrayNativeFunctions; 10using static Eina.InarrayNativeFunctions;
11using static Eina.InlistNativeFunctions; 11using static Eina.InlistNativeFunctions;
12using static Eina.NativeCustomExportFunctions; 12using static Eina.NativeCustomExportFunctions;
13using static Eina.ContainerCommonData;
14 13
15namespace Eina { 14namespace Eina {
16 15
17public enum ElementType { NumericType, StringType, ObjectType }; 16public enum ElementType { NumericType, StringType, ObjectType };
18 17
19public static class ContainerCommonData
20{
21 public static IBaseElementTraits<IntPtr> intPtrTraits = null;
22}
23
24[StructLayout(LayoutKind.Sequential)] 18[StructLayout(LayoutKind.Sequential)]
25public struct InlistMem 19public struct InlistMem
26{ 20{
@@ -36,21 +30,17 @@ public struct InlistNode<T>
36 public T Val {get;set;} 30 public T Val {get;set;}
37} 31}
38 32
39
40public interface IBaseElementTraits<T> 33public interface IBaseElementTraits<T>
41{ 34{
42 IntPtr ManagedToNativeAlloc(T man); 35 IntPtr ManagedToNativeAlloc(T man);
43 IntPtr ManagedToNativeAllocRef(T man, bool refs);
44 IntPtr ManagedToNativeAllocInlistNode(T man); 36 IntPtr ManagedToNativeAllocInlistNode(T man);
45 IntPtr ManagedToNativeAllocInplace(T man); 37 void ManagedToNativeCopyTo(T man, IntPtr mem);
46 void NativeFree(IntPtr nat); 38 void NativeFree(IntPtr nat);
47 void NativeFreeRef(IntPtr nat, bool unrefs);
48 void NativeFreeInlistNodeElement(IntPtr nat); 39 void NativeFreeInlistNodeElement(IntPtr nat);
49 void NativeFreeInlistNode(IntPtr nat, bool freeElement); 40 void NativeFreeInlistNode(IntPtr nat, bool freeElement);
50 void NativeFreeInplace(IntPtr nat); 41 void NativeFreeInplace(IntPtr nat);
51 void ResidueFreeInplace(IntPtr nat); 42 void ResidueFreeInplace(IntPtr nat);
52 T NativeToManaged(IntPtr nat); 43 T NativeToManaged(IntPtr nat);
53 T NativeToManagedRef(IntPtr nat);
54 T NativeToManagedInlistNode(IntPtr nat); 44 T NativeToManagedInlistNode(IntPtr nat);
55 T NativeToManagedInplace(IntPtr nat); 45 T NativeToManagedInplace(IntPtr nat);
56 IntPtr EinaCompareCb(); 46 IntPtr EinaCompareCb();
@@ -60,40 +50,33 @@ public interface IBaseElementTraits<T>
60 IntPtr EinaHashIteratorKeyNew(IntPtr hash); 50 IntPtr EinaHashIteratorKeyNew(IntPtr hash);
61} 51}
62 52
63public class StringElementTraits<T> : IBaseElementTraits<T> 53public class StringElementTraits : IBaseElementTraits<string>
64{ 54{
65
66 public StringElementTraits() 55 public StringElementTraits()
67 { 56 {
68 if (intPtrTraits == null)
69 intPtrTraits = TraitFunctions.GetTypeTraits<IntPtr>();
70 } 57 }
71 58
72 public IntPtr ManagedToNativeAlloc(T man) 59 public IntPtr ManagedToNativeAlloc(string man)
73 { 60 {
74 return MemoryNative.StrDup((string)(object)man); 61 IntPtr newstring = MemoryNative.StrDup(man);
62 return newstring;
75 } 63 }
76 64
77 public IntPtr ManagedToNativeAllocRef(T man, bool refs) 65 public IntPtr ManagedToNativeAllocInlistNode(string man)
78 {
79 // Keep alloc on C# ?
80 return ManagedToNativeAlloc(man);
81 }
82
83 public IntPtr ManagedToNativeAllocInlistNode(T man)
84 { 66 {
85 var node = new InlistNode<IntPtr>(); 67 var node = new InlistNode<IntPtr>();
86 node.Val = ManagedToNativeAlloc(man); 68 node.Val = ManagedToNativeAlloc(man);
87 GCHandle pinnedData = GCHandle.Alloc(node, GCHandleType.Pinned); 69 GCHandle pinnedData = GCHandle.Alloc(node, GCHandleType.Pinned);
88 IntPtr ptr = pinnedData.AddrOfPinnedObject(); 70 IntPtr ptr = pinnedData.AddrOfPinnedObject();
89 IntPtr nat = MemoryNative.AllocCopy(ptr, Marshal.SizeOf<InlistNode<IntPtr> >()); 71 IntPtr nat = MemoryNative.AllocCopy(ptr, Marshal.SizeOf<InlistMem>() + Marshal.SizeOf<IntPtr>());
90 pinnedData.Free(); 72 pinnedData.Free();
91 return nat; 73 return nat;
92 } 74 }
93 75
94 public IntPtr ManagedToNativeAllocInplace(T man) 76 public void ManagedToNativeCopyTo(string man, IntPtr mem)
95 { 77 {
96 return intPtrTraits.ManagedToNativeAlloc(ManagedToNativeAlloc(man)); 78 IntPtr stringptr = ManagedToNativeAlloc(man);
79 Marshal.WriteIntPtr(mem, stringptr);
97 } 80 }
98 81
99 public void NativeFree(IntPtr nat) 82 public void NativeFree(IntPtr nat)
@@ -102,17 +85,13 @@ public class StringElementTraits<T> : IBaseElementTraits<T>
102 MemoryNative.Free(nat); 85 MemoryNative.Free(nat);
103 } 86 }
104 87
105 public void NativeFreeRef(IntPtr nat, bool unrefs)
106 {
107 NativeFree(nat);
108 }
109
110 public void NativeFreeInlistNodeElement(IntPtr nat) 88 public void NativeFreeInlistNodeElement(IntPtr nat)
111 { 89 {
112 if (nat == IntPtr.Zero) 90 if (nat == IntPtr.Zero)
113 return; 91 return;
114 var node = Marshal.PtrToStructure< InlistNode<IntPtr> >(nat); 92 var val = Marshal.PtrToStructure<IntPtr>
115 NativeFree(node.Val); 93 (nat + Marshal.SizeOf<InlistMem>());
94 NativeFree(val);
116 } 95 }
117 96
118 public void NativeFreeInlistNode(IntPtr nat, bool freeElement) 97 public void NativeFreeInlistNode(IntPtr nat, bool freeElement)
@@ -131,37 +110,35 @@ public class StringElementTraits<T> : IBaseElementTraits<T>
131 110
132 public void ResidueFreeInplace(IntPtr nat) 111 public void ResidueFreeInplace(IntPtr nat)
133 { 112 {
134 intPtrTraits.NativeFree(nat);
135 } 113 }
136 114
137 public T NativeToManaged(IntPtr nat) 115 public string NativeToManaged(IntPtr nat)
138 { 116 {
139 if (nat == IntPtr.Zero) 117 if (nat == IntPtr.Zero)
140 return default(T); 118 return default(string);
141 return (T)(object)StringConversion.NativeUtf8ToManagedString(nat); 119 return StringConversion.NativeUtf8ToManagedString(nat);
142 }
143
144 public T NativeToManagedRef(IntPtr nat)
145 {
146 return NativeToManaged(nat);
147 } 120 }
148 121
149 public T NativeToManagedInlistNode(IntPtr nat) 122 public string NativeToManagedInlistNode(IntPtr nat)
150 { 123 {
151 if (nat == IntPtr.Zero) 124 if (nat == IntPtr.Zero)
152 { 125 {
153 Eina.Log.Error("Null pointer for Inlist node."); 126 Eina.Log.Error("Null pointer for Inlist node.");
154 return default(T); 127 return default(string);
155 } 128 }
156 var w = Marshal.PtrToStructure< InlistNode<IntPtr> >(nat); 129 IntPtr ptr_location = nat + Marshal.SizeOf<InlistMem>();
157 return NativeToManaged(w.Val); 130 return NativeToManaged(Marshal.ReadIntPtr(ptr_location));
158 } 131 }
159 132
160 public T NativeToManagedInplace(IntPtr nat) 133 // Strings inplaced are always a pointer, because they are variable-sized
134 public string NativeToManagedInplace(IntPtr nat)
161 { 135 {
162 if (nat == IntPtr.Zero) 136 if (nat == IntPtr.Zero)
163 return default(T); 137 return default(string);
164 return NativeToManaged(intPtrTraits.NativeToManaged(nat)); 138 nat = Marshal.ReadIntPtr(nat);
139 if (nat == IntPtr.Zero)
140 return default(string);
141 return NativeToManaged(nat);
165 } 142 }
166 143
167 public IntPtr EinaCompareCb() 144 public IntPtr EinaCompareCb()
@@ -196,9 +173,6 @@ public class EflObjectElementTraits<T> : IBaseElementTraits<T>
196 173
197 public EflObjectElementTraits(System.Type concrete) 174 public EflObjectElementTraits(System.Type concrete)
198 { 175 {
199 if (intPtrTraits == null)
200 intPtrTraits = TraitFunctions.GetTypeTraits<IntPtr>();
201
202 concreteType = concrete; 176 concreteType = concrete;
203 } 177 }
204 178
@@ -210,26 +184,21 @@ public class EflObjectElementTraits<T> : IBaseElementTraits<T>
210 return Efl.Eo.Globals.efl_ref(h); 184 return Efl.Eo.Globals.efl_ref(h);
211 } 185 }
212 186
213 public IntPtr ManagedToNativeAllocRef(T man, bool refs)
214 {
215 IntPtr h = refs ? ManagedToNativeAlloc(man) : ((Efl.Eo.IWrapper)man).NativeHandle;
216 return intPtrTraits.ManagedToNativeAlloc(h);
217 }
218
219 public IntPtr ManagedToNativeAllocInlistNode(T man) 187 public IntPtr ManagedToNativeAllocInlistNode(T man)
220 { 188 {
221 var node = new InlistNode<IntPtr>(); 189 var node = new InlistNode<IntPtr>();
222 node.Val = ManagedToNativeAlloc(man); 190 node.Val = ManagedToNativeAlloc(man);
223 GCHandle pinnedData = GCHandle.Alloc(node, GCHandleType.Pinned); 191 GCHandle pinnedData = GCHandle.Alloc(node, GCHandleType.Pinned);
224 IntPtr ptr = pinnedData.AddrOfPinnedObject(); 192 IntPtr ptr = pinnedData.AddrOfPinnedObject();
225 IntPtr nat = MemoryNative.AllocCopy(ptr, Marshal.SizeOf<InlistNode<IntPtr> >()); 193 IntPtr nat = MemoryNative.AllocCopy(ptr, Marshal.SizeOf<InlistMem>() + Marshal.SizeOf<IntPtr>());
226 pinnedData.Free(); 194 pinnedData.Free();
227 return nat; 195 return nat;
228 } 196 }
229 197
230 public IntPtr ManagedToNativeAllocInplace(T man) 198 public void ManagedToNativeCopyTo(T man, IntPtr mem)
231 { 199 {
232 return intPtrTraits.ManagedToNativeAlloc(ManagedToNativeAlloc(man)); 200 IntPtr v = ManagedToNativeAlloc(man);
201 Marshal.WriteIntPtr(mem, v);
233 } 202 }
234 203
235 public void NativeFree(IntPtr nat) 204 public void NativeFree(IntPtr nat)
@@ -241,16 +210,16 @@ public class EflObjectElementTraits<T> : IBaseElementTraits<T>
241 public void NativeFreeRef(IntPtr nat, bool unrefs) 210 public void NativeFreeRef(IntPtr nat, bool unrefs)
242 { 211 {
243 if (unrefs) 212 if (unrefs)
244 NativeFree(intPtrTraits.NativeToManaged(nat)); 213 NativeFree(nat);
245 intPtrTraits.NativeFree(nat);
246 } 214 }
247 215
248 public void NativeFreeInlistNodeElement(IntPtr nat) 216 public void NativeFreeInlistNodeElement(IntPtr nat)
249 { 217 {
250 if (nat == IntPtr.Zero) 218 if (nat == IntPtr.Zero)
251 return; 219 return;
252 var node = Marshal.PtrToStructure< InlistNode<IntPtr> >(nat); 220 var val = Marshal.PtrToStructure<IntPtr>
253 NativeFree(node.Val); 221 (nat + Marshal.SizeOf<InlistMem>());
222 NativeFree(val);
254 } 223 }
255 224
256 public void NativeFreeInlistNode(IntPtr nat, bool freeElement) 225 public void NativeFreeInlistNode(IntPtr nat, bool freeElement)
@@ -264,12 +233,11 @@ public class EflObjectElementTraits<T> : IBaseElementTraits<T>
264 233
265 public void NativeFreeInplace(IntPtr nat) 234 public void NativeFreeInplace(IntPtr nat)
266 { 235 {
267 NativeFree(intPtrTraits.NativeToManaged(nat)); 236 NativeFree(nat);
268 } 237 }
269 238
270 public void ResidueFreeInplace(IntPtr nat) 239 public void ResidueFreeInplace(IntPtr nat)
271 { 240 {
272 intPtrTraits.NativeFree(nat);
273 } 241 }
274 242
275 public T NativeToManaged(IntPtr nat) 243 public T NativeToManaged(IntPtr nat)
@@ -283,7 +251,7 @@ public class EflObjectElementTraits<T> : IBaseElementTraits<T>
283 { 251 {
284 if (nat == IntPtr.Zero) 252 if (nat == IntPtr.Zero)
285 return default(T); 253 return default(T);
286 return NativeToManaged(intPtrTraits.NativeToManaged(nat)); 254 return NativeToManaged(nat);
287 } 255 }
288 256
289 public T NativeToManagedInlistNode(IntPtr nat) 257 public T NativeToManagedInlistNode(IntPtr nat)
@@ -293,15 +261,19 @@ public class EflObjectElementTraits<T> : IBaseElementTraits<T>
293 Eina.Log.Error("Null pointer for Inlist node."); 261 Eina.Log.Error("Null pointer for Inlist node.");
294 return default(T); 262 return default(T);
295 } 263 }
296 var w = Marshal.PtrToStructure< InlistNode<IntPtr> >(nat); 264 IntPtr ptr_location = nat + Marshal.SizeOf<InlistMem>();
297 return NativeToManaged(w.Val); 265 return NativeToManaged(Marshal.ReadIntPtr(ptr_location));
298 } 266 }
299 267
268 // EFL objects inplaced are always a pointer, because they are variable-sized
300 public T NativeToManagedInplace(IntPtr nat) 269 public T NativeToManagedInplace(IntPtr nat)
301 { 270 {
302 if (nat == IntPtr.Zero) 271 if (nat == IntPtr.Zero)
303 return default(T); 272 return default(T);
304 return NativeToManaged(intPtrTraits.NativeToManaged(nat)); 273 nat = Marshal.ReadIntPtr(nat);
274 if (nat == IntPtr.Zero)
275 return default(T);
276 return NativeToManaged(nat);
305 } 277 }
306 278
307 public IntPtr EinaCompareCb() 279 public IntPtr EinaCompareCb()
@@ -345,16 +317,12 @@ public abstract class PrimitiveElementTraits<T>
345 node.Val = man; 317 node.Val = man;
346 GCHandle pinnedData = GCHandle.Alloc(node, GCHandleType.Pinned); 318 GCHandle pinnedData = GCHandle.Alloc(node, GCHandleType.Pinned);
347 IntPtr ptr = pinnedData.AddrOfPinnedObject(); 319 IntPtr ptr = pinnedData.AddrOfPinnedObject();
348 IntPtr nat = MemoryNative.AllocCopy(ptr, Marshal.SizeOf< InlistNode<T> >()); 320 int Tsize = Marshal.SizeOf<T>() < Marshal.SizeOf<IntPtr>() ? Marshal.SizeOf<IntPtr>() : Marshal.SizeOf<T>();
321 IntPtr nat = MemoryNative.AllocCopy(ptr, Marshal.SizeOf<InlistMem>() + Tsize);
349 pinnedData.Free(); 322 pinnedData.Free();
350 return nat; 323 return nat;
351 } 324 }
352 325
353 public IntPtr ManagedToNativeAllocInplace(T man)
354 {
355 return ManagedToNativeAlloc(man);
356 }
357
358 public void NativeFree(IntPtr nat) 326 public void NativeFree(IntPtr nat)
359 { 327 {
360 MemoryNative.Free(nat); 328 MemoryNative.Free(nat);
@@ -395,16 +363,6 @@ public abstract class PrimitiveElementTraits<T>
395 return NativeToManaged(nat); 363 return NativeToManaged(nat);
396 } 364 }
397 365
398 public T NativeToManagedInlistNode(IntPtr nat)
399 {
400 if (nat == IntPtr.Zero)
401 {
402 Eina.Log.Error("Null pointer for Inlist node.");
403 return default(T);
404 }
405 var w = Marshal.PtrToStructure< InlistNode<T> >(nat);
406 return w.Val;
407 }
408 366
409 public T NativeToManagedInplace(IntPtr nat) 367 public T NativeToManagedInplace(IntPtr nat)
410 { 368 {
@@ -441,7 +399,7 @@ public abstract class PrimitiveElementTraits<T>
441 } 399 }
442} 400}
443 401
444public class Primitive32ElementTraits<T> : PrimitiveElementTraits<T>, IBaseElementTraits<T> 402abstract public class Primitive32ElementTraits<T> : PrimitiveElementTraits<T>, IBaseElementTraits<T>
445{ 403{
446 private static IBaseElementTraits<Int32> int32Traits = null; 404 private static IBaseElementTraits<Int32> int32Traits = null;
447 405
@@ -454,6 +412,9 @@ public class Primitive32ElementTraits<T> : PrimitiveElementTraits<T>, IBaseEleme
454 int32Traits = TraitFunctions.GetTypeTraits<Int32>(); 412 int32Traits = TraitFunctions.GetTypeTraits<Int32>();
455 } 413 }
456 414
415 public abstract void ManagedToNativeCopyTo(T man, IntPtr mem);
416 public abstract T NativeToManagedInlistNode(IntPtr nat);
417
457 public IntPtr ManagedToNativeAllocRef(T man, bool refs) 418 public IntPtr ManagedToNativeAllocRef(T man, bool refs)
458 { 419 {
459 return int32Traits.ManagedToNativeAlloc(Convert.ToInt32((object)man)); 420 return int32Traits.ManagedToNativeAlloc(Convert.ToInt32((object)man));
@@ -470,7 +431,7 @@ public class Primitive32ElementTraits<T> : PrimitiveElementTraits<T>, IBaseEleme
470 } 431 }
471} 432}
472 433
473public class Primitive64ElementTraits<T> : PrimitiveElementTraits<T>, IBaseElementTraits<T> 434abstract public class Primitive64ElementTraits<T> : PrimitiveElementTraits<T>, IBaseElementTraits<T>
474{ 435{
475 private static IBaseElementTraits<Int64> int64Traits = null; 436 private static IBaseElementTraits<Int64> int64Traits = null;
476 437
@@ -483,6 +444,9 @@ public class Primitive64ElementTraits<T> : PrimitiveElementTraits<T>, IBaseEleme
483 int64Traits = TraitFunctions.GetTypeTraits<Int64>(); 444 int64Traits = TraitFunctions.GetTypeTraits<Int64>();
484 } 445 }
485 446
447 public abstract void ManagedToNativeCopyTo(T man, IntPtr mem);
448 public abstract T NativeToManagedInlistNode(IntPtr nat);
449
486 public IntPtr ManagedToNativeAllocRef(T man, bool refs) 450 public IntPtr ManagedToNativeAllocRef(T man, bool refs)
487 { 451 {
488 return int64Traits.ManagedToNativeAlloc(Convert.ToInt64((object)man)); 452 return int64Traits.ManagedToNativeAlloc(Convert.ToInt64((object)man));
@@ -499,6 +463,159 @@ public class Primitive64ElementTraits<T> : PrimitiveElementTraits<T>, IBaseEleme
499 } 463 }
500} 464}
501 465
466public class IntElementTraits : Primitive32ElementTraits<int>, IBaseElementTraits<int>
467{
468 override public void ManagedToNativeCopyTo(int man, IntPtr mem)
469 {
470 var arr = new int[1];
471 arr[0] = man;
472 Marshal.Copy(arr, 0, mem, 1);
473 }
474 override public int NativeToManagedInlistNode(IntPtr nat)
475 {
476 if (nat == IntPtr.Zero)
477 {
478 Eina.Log.Error("Null pointer for Inlist node.");
479 return default(int);
480 }
481 IntPtr loc = nat + Marshal.SizeOf<InlistMem>();
482 var v = new int[1];
483 Marshal.Copy(loc, v, 0, 1);
484 return v[0];
485 }
486}
487
488public class CharElementTraits : Primitive32ElementTraits<char>, IBaseElementTraits<char>
489{
490 override public void ManagedToNativeCopyTo(char man, IntPtr mem)
491 {
492 var arr = new char[1];
493 arr[0] = man;
494 Marshal.Copy(arr, 0, mem, 1);
495 }
496 override public char NativeToManagedInlistNode(IntPtr nat)
497 {
498 if (nat == IntPtr.Zero)
499 {
500 Eina.Log.Error("Null pointer for Inlist node.");
501 return default(char);
502 }
503 IntPtr loc = nat + Marshal.SizeOf<InlistMem>();
504 var v = new char[1];
505 Marshal.Copy(loc, v, 0, 1);
506 return v[0];
507 }
508}
509public class LongElementTraits : Primitive64ElementTraits<long>, IBaseElementTraits<long>
510{
511 override public void ManagedToNativeCopyTo(long man, IntPtr mem)
512 {
513 var arr = new long[1];
514 arr[0] = man;
515 Marshal.Copy(arr, 0, mem, 1);
516 }
517 override public long NativeToManagedInlistNode(IntPtr nat)
518 {
519 if (nat == IntPtr.Zero)
520 {
521 Eina.Log.Error("Null pointer for Inlist node.");
522 return default(long);
523 }
524 IntPtr loc = nat + Marshal.SizeOf<InlistMem>();
525 var v = new long[1];
526 Marshal.Copy(loc, v, 0, 1);
527 return v[0];
528 }
529}
530
531public class ShortElementTraits : Primitive32ElementTraits<short>, IBaseElementTraits<short>
532{
533 override public void ManagedToNativeCopyTo(short man, IntPtr mem)
534 {
535 var arr = new short[1];
536 arr[0] = man;
537 Marshal.Copy(arr, 0, mem, 1);
538 }
539 override public short NativeToManagedInlistNode(IntPtr nat)
540 {
541 if (nat == IntPtr.Zero)
542 {
543 Eina.Log.Error("Null pointer for Inlist node.");
544 return default(short);
545 }
546 IntPtr loc = nat + Marshal.SizeOf<InlistMem>();
547 var v = new short[1];
548 Marshal.Copy(loc, v, 0, 1);
549 return v[0];
550 }
551}
552
553public class FloatElementTraits : Primitive32ElementTraits<float>, IBaseElementTraits<float>
554{
555 override public void ManagedToNativeCopyTo(float man, IntPtr mem)
556 {
557 var arr = new float[1];
558 arr[0] = man;
559 Marshal.Copy(arr, 0, mem, 1);
560 }
561 override public float NativeToManagedInlistNode(IntPtr nat)
562 {
563 if (nat == IntPtr.Zero)
564 {
565 Eina.Log.Error("Null pointer for Inlist node.");
566 return default(float);
567 }
568 IntPtr loc = nat + Marshal.SizeOf<InlistMem>();
569 var v = new float[1];
570 Marshal.Copy(loc, v, 0, 1);
571 return v[0];
572 }
573}
574
575public class DoubleElementTraits : Primitive64ElementTraits<double>, IBaseElementTraits<double>
576{
577 override public void ManagedToNativeCopyTo(double man, IntPtr mem)
578 {
579 var arr = new double[1];
580 arr[0] = man;
581 Marshal.Copy(arr, 0, mem, 1);
582 }
583 override public double NativeToManagedInlistNode(IntPtr nat)
584 {
585 if (nat == IntPtr.Zero)
586 {
587 Eina.Log.Error("Null pointer for Inlist node.");
588 return default(double);
589 }
590 IntPtr loc = nat + Marshal.SizeOf<InlistMem>();
591 var v = new double[1];
592 Marshal.Copy(loc, v, 0, 1);
593 return v[0];
594 }
595}
596
597public class ByteElementTraits : Primitive32ElementTraits<byte>, IBaseElementTraits<byte>
598{
599 override public void ManagedToNativeCopyTo(byte man, IntPtr mem)
600 {
601 var arr = new byte[1];
602 arr[0] = man;
603 Marshal.Copy(arr, 0, mem, 1);
604 }
605 override public byte NativeToManagedInlistNode(IntPtr nat)
606 {
607 if (nat == IntPtr.Zero)
608 {
609 Eina.Log.Error("Null pointer for Inlist node.");
610 return default(byte);
611 }
612 IntPtr loc = nat + Marshal.SizeOf<InlistMem>();
613 var v = new byte[1];
614 Marshal.Copy(loc, v, 0, 1);
615 return v[0];
616 }
617}
618
502public static class TraitFunctions 619public static class TraitFunctions
503{ 620{
504 public static bool IsEflObject(System.Type type) 621 public static bool IsEflObject(System.Type type)
@@ -551,6 +668,7 @@ public static class TraitFunctions
551 668
552 public static object RegisterTypeTraits<T>() 669 public static object RegisterTypeTraits<T>()
553 { 670 {
671 Eina.Log.Debug($"Finding TypeTraits for {typeof(T).Name}");
554 object traits; 672 object traits;
555 var type = typeof(T); 673 var type = typeof(T);
556 if (IsEflObject(type)) 674 if (IsEflObject(type))
@@ -561,13 +679,25 @@ public static class TraitFunctions
561 traits = new EflObjectElementTraits<T>(concrete); 679 traits = new EflObjectElementTraits<T>(concrete);
562 } 680 }
563 else if (IsString(type)) 681 else if (IsString(type))
564 traits = new StringElementTraits<T>(); 682 traits = new StringElementTraits();
565 else if (type.IsValueType) 683 else if (type.IsValueType)
566 { 684 {
567 if (Marshal.SizeOf<T>() <= 4) 685 if (type == typeof(int))
568 traits = new Primitive32ElementTraits<T>(); 686 traits = new IntElementTraits();
687 else if (type == typeof(char))
688 traits = new CharElementTraits();
689 else if (type == typeof(long))
690 traits = new LongElementTraits();
691 else if (type == typeof(short))
692 traits = new ShortElementTraits();
693 else if (type == typeof(float))
694 traits = new FloatElementTraits();
695 else if (type == typeof(double))
696 traits = new DoubleElementTraits();
697 else if (type == typeof(byte))
698 traits = new ByteElementTraits();
569 else 699 else
570 traits = new Primitive64ElementTraits<T>(); 700 throw new Exception("No traits registered for this type");
571 } 701 }
572 else 702 else
573 throw new Exception("No traits registered for this type"); 703 throw new Exception("No traits registered for this type");
@@ -601,14 +731,14 @@ public static class TraitFunctions
601 return GetTypeTraits<T>().ManagedToNativeAlloc(man); 731 return GetTypeTraits<T>().ManagedToNativeAlloc(man);
602 } 732 }
603 733
604 public static IntPtr ManagedToNativeAllocRef<T>(T man, bool refs = false) 734 // public static IntPtr ManagedToNativeAllocRef<T>(T man, bool refs = false)
605 { 735 // {
606 return GetTypeTraits<T>().ManagedToNativeAllocRef(man, refs); 736 // return GetTypeTraits<T>().ManagedToNativeAllocRef(man, refs);
607 } 737 // }
608 738
609 public static IntPtr ManagedToNativeAllocInplace<T>(T man) 739 public static void ManagedToNativeCopyTo<T>(T man, IntPtr mem)
610 { 740 {
611 return GetTypeTraits<T>().ManagedToNativeAllocInplace(man); 741 GetTypeTraits<T>().ManagedToNativeCopyTo(man, mem);
612 } 742 }
613 743
614 public static IntPtr ManagedToNativeAllocInlistNode<T>(T man) 744 public static IntPtr ManagedToNativeAllocInlistNode<T>(T man)
@@ -621,10 +751,10 @@ public static class TraitFunctions
621 GetTypeTraits<T>().NativeFree(nat); 751 GetTypeTraits<T>().NativeFree(nat);
622 } 752 }
623 753
624 public static void NativeFreeRef<T>(IntPtr nat, bool unrefs = false) 754 // public static void NativeFreeRef<T>(IntPtr nat, bool unrefs = false)
625 { 755 // {
626 GetTypeTraits<T>().NativeFreeRef(nat, unrefs); 756 // GetTypeTraits<T>().NativeFreeRef(nat, unrefs);
627 } 757 // }
628 758
629 public static void NativeFreeInlistNodeElement<T>(IntPtr nat) 759 public static void NativeFreeInlistNodeElement<T>(IntPtr nat)
630 { 760 {
@@ -651,10 +781,10 @@ public static class TraitFunctions
651 return GetTypeTraits<T>().NativeToManaged(nat); 781 return GetTypeTraits<T>().NativeToManaged(nat);
652 } 782 }
653 783
654 public static T NativeToManagedRef<T>(IntPtr nat) 784 // public static T NativeToManagedRef<T>(IntPtr nat)
655 { 785 // {
656 return GetTypeTraits<T>().NativeToManagedRef(nat); 786 // return GetTypeTraits<T>().NativeToManagedRef(nat);
657 } 787 // }
658 788
659 public static T NativeToManagedInlistNode<T>(IntPtr nat) 789 public static T NativeToManagedInlistNode<T>(IntPtr nat)
660 { 790 {
diff --git a/src/bindings/mono/eina_mono/eina_hash.cs b/src/bindings/mono/eina_mono/eina_hash.cs
index 590033e7ab..4770870c69 100644
--- a/src/bindings/mono/eina_mono/eina_hash.cs
+++ b/src/bindings/mono/eina_mono/eina_hash.cs
@@ -242,10 +242,13 @@ public class Hash<TKey, TValue> : IEnumerable<KeyValuePair<TKey, TValue>>, IDi
242 242
243 public bool AddNew(TKey key, TValue val) 243 public bool AddNew(TKey key, TValue val)
244 { 244 {
245 var nk = ManagedToNativeAllocRef(key, true); 245 IntPtr gchnk = CopyNativeObject(key, ForceRefKey<TKey>());
246 var nv = ManagedToNativeAlloc(val); 246 IntPtr nk = GetNativePtr<TKey>(gchnk, ForceRefKey<TKey>());
247 IntPtr gchnv = CopyNativeObject(val, false);
248 IntPtr nv = GetNativePtr<TValue>(gchnv, false);
247 var r = eina_hash_add(Handle, nk, nv); 249 var r = eina_hash_add(Handle, nk, nv);
248 NativeFreeRef<TKey>(nk); 250 FreeNativeIndirection<TKey>(gchnk, ForceRefKey<TKey>());
251 FreeNativeIndirection<TValue>(gchnv, false);
249 return r; 252 return r;
250 } 253 }
251 254
@@ -256,17 +259,20 @@ public class Hash<TKey, TValue> : IEnumerable<KeyValuePair<TKey, TValue>>, IDi
256 259
257 public bool DelByKey(TKey key) 260 public bool DelByKey(TKey key)
258 { 261 {
259 var nk = ManagedToNativeAllocRef(key); 262 IntPtr gchnk = CopyNativeObject(key, ForceRefKey<TKey>());
263 IntPtr nk = GetNativePtr<TKey>(gchnk, ForceRefKey<TKey>());
260 var r = eina_hash_del_by_key(Handle, nk); 264 var r = eina_hash_del_by_key(Handle, nk);
261 NativeFreeRef<TKey>(nk, OwnKey && r); 265 FreeNativeIndirection<TKey>(gchnk, ForceRefKey<TKey>());
266 // NativeFreeRef<TKey>(nk, OwnKey && r);
262 return r; 267 return r;
263 } 268 }
264 269
265 public bool DelByValue(TValue val) 270 public bool DelByValue(TValue val)
266 { 271 {
267 var nv = ManagedToNativeAlloc(val); 272 IntPtr gchnv = CopyNativeObject(val, false);
273 IntPtr nv = GetNativePtr<TValue>(gchnv, false);
268 var r = eina_hash_del_by_data(Handle, nv); 274 var r = eina_hash_del_by_data(Handle, nv);
269 NativeFree<TValue>(nv); 275 FreeNativeIndirection<TValue>(gchnv, false);
270 return r; 276 return r;
271 } 277 }
272 278
@@ -277,42 +283,52 @@ public class Hash<TKey, TValue> : IEnumerable<KeyValuePair<TKey, TValue>>, IDi
277 283
278 public TValue Find(TKey key) 284 public TValue Find(TKey key)
279 { 285 {
280 var nk = ManagedToNativeAllocRef(key); 286 var gchnk = CopyNativeObject<TKey>(key, ForceRefKey<TKey>());
287 var nk = GetNativePtr<TKey>(gchnk, ForceRefKey<TKey>());
281 var found = eina_hash_find(Handle, nk); 288 var found = eina_hash_find(Handle, nk);
282 NativeFreeRef<TKey>(nk); 289 //NativeFreeRef<TKey>(nk);
290 FreeNativeIndirection<TKey>(gchnk, ForceRefKey<TKey>());
283 if (found == IntPtr.Zero) 291 if (found == IntPtr.Zero)
284 throw new KeyNotFoundException(); 292 throw new KeyNotFoundException();
285 return NativeToManaged<TValue>(found); 293
294 return NativeToManaged<TValue>(IndirectNative<TValue>(found, false));
286 } 295 }
287 296
288 public bool TryGetValue(TKey key, out TValue val) 297 public bool TryGetValue(TKey key, out TValue val)
289 { 298 {
290 var nk = ManagedToNativeAllocRef(key); 299 var gchnk = CopyNativeObject<TKey>(key, ForceRefKey<TKey>());
300 var nk = GetNativePtr<TKey>(gchnk, ForceRefKey<TKey>());
291 var found = eina_hash_find(Handle, nk); 301 var found = eina_hash_find(Handle, nk);
292 NativeFreeRef<TKey>(nk); 302 FreeNativeIndirection<TKey>(gchnk, ForceRefKey<TKey>());
293 if (found == IntPtr.Zero) 303 if (found == IntPtr.Zero)
294 { 304 {
295 val = default(TValue); 305 val = default(TValue);
296 return false; 306 return false;
297 } 307 }
298 val = NativeToManaged<TValue>(found); 308 val = NativeToManaged<TValue>(IndirectNative<TValue>(found, false));
299 return true; 309 return true;
300 } 310 }
301 311
302 public bool ContainsKey(TKey key) 312 public bool ContainsKey(TKey key)
303 { 313 {
304 var nk = ManagedToNativeAllocRef(key); 314 var gchnk = CopyNativeObject<TKey>(key, ForceRefKey<TKey>());
315 var nk = GetNativePtr<TKey>(gchnk, ForceRefKey<TKey>());
316 // var nk = ManagedToNativeAllocRef(key);
305 var found = eina_hash_find(Handle, nk); 317 var found = eina_hash_find(Handle, nk);
306 NativeFreeRef<TKey>(nk); 318 // NativeFreeRef<TKey>(nk);
319 FreeNativeIndirection<TKey>(gchnk, ForceRefKey<TKey>());
307 return found != IntPtr.Zero; 320 return found != IntPtr.Zero;
308 } 321 }
309 322
310 public bool Modify(TKey key, TValue val) 323 public bool Modify(TKey key, TValue val)
311 { 324 {
312 var nk = ManagedToNativeAllocRef(key); 325 var gchnk = CopyNativeObject<TKey>(key, ForceRefKey<TKey>());
313 var nv = ManagedToNativeAlloc(val); 326 var nk = GetNativePtr<TKey>(gchnk, ForceRefKey<TKey>());
327 var gchnv = CopyNativeObject<TValue>(val, false);
328 var nv = GetNativePtr<TValue>(gchnv, false);
314 var old = eina_hash_modify(Handle, nk, nv); 329 var old = eina_hash_modify(Handle, nk, nv);
315 NativeFreeRef<TKey>(nk); 330 FreeNativeIndirection<TKey>(gchnk, ForceRefKey<TKey>());
331 // NativeFreeRef<TKey>(nk);
316 if (old == IntPtr.Zero) 332 if (old == IntPtr.Zero)
317 { 333 {
318 NativeFree<TValue>(nv); 334 NativeFree<TValue>(nv);
@@ -323,14 +339,82 @@ public class Hash<TKey, TValue> : IEnumerable<KeyValuePair<TKey, TValue>>, IDi
323 return true; 339 return true;
324 } 340 }
325 341
342 private static bool ForceRefKey<T>()
343 {
344 return (!typeof(T).IsValueType) && (typeof(T) != typeof(string));
345 }
346
347 private static IntPtr CopyNativeObject<T>(T value, bool forceRef)
348 {
349 if (!IsEflObject(typeof(T)) && forceRef)
350 {
351 GCHandle gch = GCHandle.Alloc(new byte[Marshal.SizeOf<T>()], GCHandleType.Pinned);
352 IntPtr pin = gch.AddrOfPinnedObject();
353
354 ManagedToNativeCopyTo(value, pin);
355
356 return GCHandle.ToIntPtr(gch);
357 }
358 else if(IsEflObject(typeof(T)) && forceRef)
359 {
360 GCHandle gch = GCHandle.Alloc(new byte[Marshal.SizeOf<IntPtr>()], GCHandleType.Pinned);
361 IntPtr pin = gch.AddrOfPinnedObject();
362
363 ManagedToNativeCopyTo(value, pin);
364
365 return GCHandle.ToIntPtr(gch);
366 }
367 else
368 {
369 return ManagedToNativeAlloc(value);
370 }
371 }
372 private static IntPtr GetNativePtr<T>(IntPtr gchptr, bool forceRef)
373 {
374 if (forceRef)
375 {
376 GCHandle gch = GCHandle.FromIntPtr(gchptr);
377 IntPtr pin = gch.AddrOfPinnedObject();
378
379 return pin;
380 }
381 else
382 {
383 return gchptr;
384 }
385 }
386 private static void FreeNativeIndirection<T>(IntPtr gchptr, bool forceRef)
387 {
388 if (forceRef)
389 {
390 GCHandle gch = GCHandle.FromIntPtr(gchptr);
391 gch.Free();
392 }
393 }
394
395 private static IntPtr IndirectNative<T>(IntPtr ptr, bool forceRef)
396 {
397 if (forceRef)
398 {
399 IntPtr val = Marshal.ReadIntPtr(ptr);
400 return val;
401 }
402 else
403 {
404 return ptr;
405 }
406 }
407
326 public void Set(TKey key, TValue val) 408 public void Set(TKey key, TValue val)
327 { 409 {
328 var nk = ManagedToNativeAllocRef(key, true); 410 IntPtr gchnk = CopyNativeObject(key, ForceRefKey<TKey>());
329 var nv = ManagedToNativeAlloc(val); 411 IntPtr nk = GetNativePtr<TKey>(gchnk, ForceRefKey<TKey>());
330 var old = eina_hash_set(Handle, nk, nv); 412
331 NativeFreeRef<TKey>(nk, old != IntPtr.Zero); 413 IntPtr gchnv = CopyNativeObject(val, false);
332 if (old != IntPtr.Zero && OwnValue) 414 IntPtr nv = GetNativePtr<TValue>(gchnv, false);
333 NativeFree<TValue>(old); 415 IntPtr old = eina_hash_set(Handle, nk, nv);
416 FreeNativeIndirection<TKey>(gchnk, ForceRefKey<TKey>());
417 FreeNativeIndirection<TValue>(gchnv, false);
334 } 418 }
335 419
336 public TValue this[TKey key] 420 public TValue this[TKey key]
@@ -347,11 +431,17 @@ public class Hash<TKey, TValue> : IEnumerable<KeyValuePair<TKey, TValue>>, IDi
347 431
348 public bool Move(TKey key_old, TKey key_new) 432 public bool Move(TKey key_old, TKey key_new)
349 { 433 {
350 var nk_old = ManagedToNativeAllocRef(key_old); 434 IntPtr gchnko = CopyNativeObject(key_old, ForceRefKey<TKey>());
351 var nk_new = ManagedToNativeAllocRef(key_new, true); 435 IntPtr nko = GetNativePtr<TKey>(gchnko, ForceRefKey<TKey>());
352 var r = eina_hash_move(Handle, nk_old, nk_new); 436 IntPtr gchnk = CopyNativeObject(key_new, ForceRefKey<TKey>());
353 NativeFreeRef<TKey>(nk_old, OwnKey && r); 437 IntPtr nk = GetNativePtr<TKey>(gchnk, ForceRefKey<TKey>());
354 NativeFreeRef<TKey>(nk_new, !r); 438 // var nk_old = ManagedToNativeAllocRef(key_old);
439 // var nk_new = ManagedToNativeAllocRef(key_new, true);
440 var r = eina_hash_move(Handle, nko, nk);
441 FreeNativeIndirection<TKey>(gchnko, ForceRefKey<TKey>());
442 FreeNativeIndirection<TKey>(gchnk, ForceRefKey<TKey>());
443 // NativeFreeRef<TKey>(nk_old, OwnKey && r);
444 // NativeFreeRef<TKey>(nk_new, !r);
355 return r; 445 return r;
356 } 446 }
357 447
@@ -383,7 +473,8 @@ public class Hash<TKey, TValue> : IEnumerable<KeyValuePair<TKey, TValue>>, IDi
383 for (IntPtr tuplePtr; eina_iterator_next(itr, out tuplePtr);) 473 for (IntPtr tuplePtr; eina_iterator_next(itr, out tuplePtr);)
384 { 474 {
385 var tuple = Marshal.PtrToStructure<Eina.HashTupleNative>(tuplePtr); 475 var tuple = Marshal.PtrToStructure<Eina.HashTupleNative>(tuplePtr);
386 var key = NativeToManagedRef<TKey>(tuple.key); 476 IntPtr ikey = IndirectNative<TKey>(tuple.key, ForceRefKey<TKey>());
477 var key = NativeToManaged<TKey>(ikey);
387 var val = NativeToManaged<TValue>(tuple.data); 478 var val = NativeToManaged<TValue>(tuple.data);
388 yield return new KeyValuePair<TKey, TValue>(key, val); 479 yield return new KeyValuePair<TKey, TValue>(key, val);
389 } 480 }
diff --git a/src/bindings/mono/eina_mono/eina_inarray.cs b/src/bindings/mono/eina_mono/eina_inarray.cs
index d81f2ad239..47a1336b98 100644
--- a/src/bindings/mono/eina_mono/eina_inarray.cs
+++ b/src/bindings/mono/eina_mono/eina_inarray.cs
@@ -193,11 +193,17 @@ public class Inarray<T> : IEnumerable<T>, IDisposable
193 193
194 public int Push(T val) 194 public int Push(T val)
195 { 195 {
196 IntPtr ele = ManagedToNativeAllocInplace(val); 196 IntPtr ele = IntPtr.Zero;
197 var r = eina_inarray_push(Handle, ele); 197 GCHandle gch = GCHandle.Alloc(ele, GCHandleType.Pinned);
198 IntPtr ind = gch.AddrOfPinnedObject();
199
200 ManagedToNativeCopyTo(val, ind);
201
202 var r = eina_inarray_push(Handle, ind);
198 if (r == -1) 203 if (r == -1)
199 NativeFreeInplace<T>(ele); 204 NativeFreeInplace<T>(ele);
200 ResidueFreeInplace<T>(ele); 205 ResidueFreeInplace<T>(ele);
206 gch.Free();
201 return r; 207 return r;
202 } 208 }
203 209
@@ -220,6 +226,7 @@ public class Inarray<T> : IEnumerable<T>, IDisposable
220 public T Nth(uint idx) 226 public T Nth(uint idx)
221 { 227 {
222 IntPtr ele = eina_inarray_nth(Handle, idx); 228 IntPtr ele = eina_inarray_nth(Handle, idx);
229 IntPtr v = Marshal.ReadIntPtr(ele);
223 return NativeToManagedInplace<T>(ele); 230 return NativeToManagedInplace<T>(ele);
224 } 231 }
225 232
@@ -230,8 +237,13 @@ public class Inarray<T> : IEnumerable<T>, IDisposable
230 237
231 public bool InsertAt(uint idx, T val) 238 public bool InsertAt(uint idx, T val)
232 { 239 {
233 IntPtr ele = ManagedToNativeAllocInplace(val); 240 IntPtr ele = IntPtr.Zero;
234 var r = eina_inarray_insert_at(Handle, idx, ele); 241 GCHandle gch = GCHandle.Alloc(ele, GCHandleType.Pinned);
242 IntPtr ind = gch.AddrOfPinnedObject();
243
244 ManagedToNativeCopyTo(val, ind);
245
246 var r = eina_inarray_insert_at(Handle, idx, ind);
235 if (!r) 247 if (!r)
236 NativeFreeInplace<T>(ele); 248 NativeFreeInplace<T>(ele);
237 ResidueFreeInplace<T>(ele); 249 ResidueFreeInplace<T>(ele);
@@ -245,8 +257,13 @@ public class Inarray<T> : IEnumerable<T>, IDisposable
245 return false; 257 return false;
246 if (OwnContent) 258 if (OwnContent)
247 NativeFreeInplace<T>(old); 259 NativeFreeInplace<T>(old);
248 var ele = ManagedToNativeAllocInplace(val); 260 var ele = IntPtr.Zero;
249 var r = eina_inarray_replace_at(Handle, idx, ele); 261 GCHandle gch = GCHandle.Alloc(ele, GCHandleType.Pinned);
262 IntPtr ind = gch.AddrOfPinnedObject();
263
264 ManagedToNativeCopyTo(val, ind);
265
266 var r = eina_inarray_replace_at(Handle, idx, ind);
250 ResidueFreeInplace<T>(ele); 267 ResidueFreeInplace<T>(ele);
251 return r; 268 return r;
252 } 269 }
diff --git a/src/bindings/mono/eo_mono/FunctionWrapper.cs b/src/bindings/mono/eo_mono/FunctionWrapper.cs
new file mode 100644
index 0000000000..15e63d0e84
--- /dev/null
+++ b/src/bindings/mono/eo_mono/FunctionWrapper.cs
@@ -0,0 +1,87 @@
1using System;
2using System.Runtime.InteropServices;
3
4namespace Efl { namespace Eo {
5
6public partial class FunctionInterop
7{
8 public static IntPtr LoadFunctionPointer(string moduleName, string functionName)
9 {
10 NativeModule module = new NativeModule(moduleName);
11 Eina.Log.Debug($"searching {module.Module} for {functionName}");
12 var s = FunctionInterop.dlsym(module.Module, functionName);
13 Eina.Log.Debug($"searching {module.Module} for{functionName}, result {s}");
14 return s;
15 }
16 public static IntPtr LoadFunctionPointer(string functionName)
17 {
18 Eina.Log.Debug($"searching {null} for {functionName}");
19 var s = FunctionInterop.dlsym(IntPtr.Zero, functionName);
20 Eina.Log.Debug($"searching {null} for {functionName}, result {s}");
21 return s;
22 }
23}
24
25public class FunctionWrapper<T>
26{
27 private Lazy<FunctionLoadResult<T>> loadResult;
28 private NativeModule module; // so it doesn't get unloaded
29
30 private static FunctionLoadResult<T> LazyInitialization(NativeModule module, string functionName)
31 {
32 if (module.Module == IntPtr.Zero)
33 return new FunctionLoadResult<T>(FunctionLoadResultKind.LibraryNotFound);
34 else
35 {
36 IntPtr funcptr = FunctionInterop.LoadFunctionPointer(module.Module, functionName);
37 if (funcptr == IntPtr.Zero)
38 return new FunctionLoadResult<T>(FunctionLoadResultKind.FunctionNotFound);
39 else
40 return new FunctionLoadResult<T>(Marshal.GetDelegateForFunctionPointer<T>(funcptr));
41 }
42 }
43
44 public FunctionWrapper(string moduleName, string functionName)
45 : this (new NativeModule(moduleName), functionName)
46 {
47 }
48
49 public FunctionWrapper(NativeModule module, string functionName)
50 {
51 this.module = module;
52 loadResult = new Lazy<FunctionLoadResult<T>>
53 (() =>
54 {
55 return LazyInitialization(module, functionName);
56 });
57 }
58
59 public FunctionLoadResult<T> Value
60 {
61 get
62 {
63 return loadResult.Value;
64 }
65 }
66}
67
68public enum FunctionLoadResultKind { Success, LibraryNotFound, FunctionNotFound }
69
70public class FunctionLoadResult<T>
71{
72 public FunctionLoadResultKind Kind;
73 public T Delegate;
74
75 public FunctionLoadResult(FunctionLoadResultKind kind)
76 {
77 this.Kind = kind;
78 }
79 public FunctionLoadResult(T Delegate)
80 {
81 this.Delegate = Delegate;
82 this.Kind = FunctionLoadResultKind.Success;
83 }
84}
85
86
87} }
diff --git a/src/bindings/mono/eo_mono/FunctionWrapper_Unix.cs b/src/bindings/mono/eo_mono/FunctionWrapper_Unix.cs
new file mode 100644
index 0000000000..76ee4892ef
--- /dev/null
+++ b/src/bindings/mono/eo_mono/FunctionWrapper_Unix.cs
@@ -0,0 +1,21 @@
1using System;
2using System.Runtime.InteropServices;
3
4namespace Efl { namespace Eo {
5
6public partial class FunctionInterop
7{
8 [DllImport(efl.Libs.Libdl)]
9 public static extern IntPtr dlsym(IntPtr handle, string symbol);
10
11 public static IntPtr LoadFunctionPointer(IntPtr nativeLibraryHandle, string functionName)
12 {
13 Eina.Log.Debug("searching {nativeLibraryHandle} for {functionName}");
14 var s = FunctionInterop.dlsym(nativeLibraryHandle, functionName);
15 Eina.Log.Debug("searching {nativeLibraryHandle} for {functionName}, result {s}");
16 return s;
17 }
18}
19
20
21} }
diff --git a/src/bindings/mono/eo_mono/FunctionWrapper_Windows.cs b/src/bindings/mono/eo_mono/FunctionWrapper_Windows.cs
new file mode 100644
index 0000000000..3cdd80cf2f
--- /dev/null
+++ b/src/bindings/mono/eo_mono/FunctionWrapper_Windows.cs
@@ -0,0 +1,15 @@
1using System;
2using System.Runtime.InteropServices;
3
4namespace Efl { namespace Eo {
5
6public partial class FunctionInterop
7{
8 [DllImport(efl.Libs.Libdl)]
9 public static extern IntPtr GetProcAddress(IntPtr handle, string symbol);
10
11 private static IntPtr LoadFunctionPointer(IntPtr nativeLibraryHandle, string functionName)
12 => FunctionInterop.GetProcAddress(nativeLibraryHandle, functionName);
13}
14
15} }
diff --git a/src/bindings/mono/eo_mono/NativeModule.cs b/src/bindings/mono/eo_mono/NativeModule.cs
new file mode 100644
index 0000000000..324a933b65
--- /dev/null
+++ b/src/bindings/mono/eo_mono/NativeModule.cs
@@ -0,0 +1,33 @@
1using System;
2
3namespace Efl { namespace Eo {
4
5public partial class NativeModule : IDisposable
6{
7 private Lazy<IntPtr> module;
8
9 public NativeModule(string libName)
10 {
11 module = new Lazy<IntPtr>
12 (() =>
13 {
14 return LoadLibrary(libName);
15 });
16 }
17
18 public IntPtr Module
19 {
20 get
21 {
22 return module.Value;
23 }
24 }
25
26 public void Dispose()
27 {
28 UnloadLibrary(module.Value);
29 module = null;
30 }
31}
32
33} }
diff --git a/src/bindings/mono/eo_mono/NativeModule_Unix.cs b/src/bindings/mono/eo_mono/NativeModule_Unix.cs
new file mode 100644
index 0000000000..12a597aea3
--- /dev/null
+++ b/src/bindings/mono/eo_mono/NativeModule_Unix.cs
@@ -0,0 +1,43 @@
1using System;
2using System.Runtime.InteropServices;
3
4namespace Efl { namespace Eo {
5
6public partial class NativeModule
7{
8 public const int RTLD_NOW = 0x002;
9
10 [DllImport(efl.Libs.Libdl)]
11 public static extern IntPtr dlopen(string fileName, int flag);
12 [DllImport(efl.Libs.Libdl)]
13 public static extern int dlclose(IntPtr handle);
14
15 public static void UnloadLibrary(IntPtr handle)
16 {
17 dlclose(handle);
18 }
19
20 public static IntPtr LoadLibrary(string filename)
21 {
22 Eina.Log.Debug($"Loading library {filename}");
23 var r = dlopen(filename, RTLD_NOW);
24 if (r == IntPtr.Zero)
25 {
26 r = dlopen("lib" + filename, RTLD_NOW);
27 if (r == IntPtr.Zero)
28 {
29 r = dlopen(filename + ".so", RTLD_NOW);
30 if (r == IntPtr.Zero)
31 {
32 r = dlopen("lib" + filename + ".so", RTLD_NOW);
33 }
34 }
35 }
36 return r;
37 }
38}
39
40
41
42
43} }
diff --git a/src/bindings/mono/eo_mono/NativeModule_Windows.cs b/src/bindings/mono/eo_mono/NativeModule_Windows.cs
new file mode 100644
index 0000000000..889adc0949
--- /dev/null
+++ b/src/bindings/mono/eo_mono/NativeModule_Windows.cs
@@ -0,0 +1,15 @@
1using System;
2using System.Runtime.InteropServices;
3
4namespace Efl { namespace Eo {
5
6public class partial NativeModule
7{
8 [DllImport(efl.Libs.Kernel32, CharSet = CharSet.Unicode, SetLastError = true)]
9 public static extern IntPtr LoadLibrary(string libFilename);
10}
11
12
13
14
15} }
diff --git a/src/bindings/mono/eo_mono/iwrapper.cs b/src/bindings/mono/eo_mono/iwrapper.cs
index 16acf6a0e6..2dfc3d4523 100644
--- a/src/bindings/mono/eo_mono/iwrapper.cs
+++ b/src/bindings/mono/eo_mono/iwrapper.cs
@@ -12,141 +12,177 @@ using EoG = Efl.Eo.Globals;
12namespace Efl { namespace Eo { 12namespace Efl { namespace Eo {
13 13
14public class Globals { 14public class Globals {
15 [DllImport(efl.Libs.Eo)] public static extern void efl_object_init(); 15 [return: MarshalAs(UnmanagedType.U1)]
16 [DllImport(efl.Libs.Eo)] public static extern void efl_object_shutdown(); 16 public delegate bool efl_object_init_delegate();
17 public static FunctionWrapper<efl_object_init_delegate> efl_object_init_ptr =
18 new FunctionWrapper<efl_object_init_delegate>(efl.Libs.EoModule, "efl_object_init");
19 public static bool efl_object_init() => efl_object_init_ptr.Value.Delegate();
20
21 public delegate void efl_object_shutdown_delegate();
22 public static FunctionWrapper<efl_object_shutdown_delegate> efl_object_shutdown_ptr = new FunctionWrapper<efl_object_shutdown_delegate>(efl.Libs.EoModule, "efl_object_shutdown");
23 public static void efl_object_shutdown() => efl_object_shutdown_ptr.Value.Delegate();
24 // [DllImport(efl.Libs.Eo)] public static extern void efl_object_shutdown();
25 public static FunctionWrapper<_efl_add_internal_start_delegate> _efl_add_internal_start_ptr = new FunctionWrapper<_efl_add_internal_start_delegate>(efl.Libs.EoModule, "_efl_add_internal_start");
26 public delegate IntPtr
27 _efl_add_internal_start_delegate([MarshalAs(UnmanagedType.LPStr)] String file, int line,
28 IntPtr klass, IntPtr parent, byte is_ref, byte is_fallback);
17 [DllImport(efl.Libs.Eo)] public static extern IntPtr 29 [DllImport(efl.Libs.Eo)] public static extern IntPtr
18 _efl_add_internal_start([MarshalAs(UnmanagedType.LPStr)] String file, int line, 30 _efl_add_internal_start([MarshalAs(UnmanagedType.LPStr)] String file, int line,
19 IntPtr klass, IntPtr parent, byte is_ref, byte is_fallback); 31 IntPtr klass, IntPtr parent, byte is_ref, byte is_fallback);
32 public delegate IntPtr
33 _efl_add_end_delegate(IntPtr eo, byte is_ref, byte is_fallback);
20 [DllImport(efl.Libs.Eo)] public static extern IntPtr 34 [DllImport(efl.Libs.Eo)] public static extern IntPtr
21 _efl_add_end(IntPtr eo, byte is_ref, byte is_fallback); 35 _efl_add_end(IntPtr eo, byte is_ref, byte is_fallback);
36 public delegate IntPtr
37 efl_ref_delegate(IntPtr eo);
22 [DllImport(efl.Libs.Eo)] public static extern IntPtr 38 [DllImport(efl.Libs.Eo)] public static extern IntPtr
23 efl_ref(IntPtr eo); 39 efl_ref(IntPtr eo);
40 public delegate void
41 efl_unref_delegate(IntPtr eo);
24 [DllImport(efl.Libs.CustomExports)] public static extern void 42 [DllImport(efl.Libs.CustomExports)] public static extern void
25 efl_unref(IntPtr eo); 43 efl_unref(IntPtr eo);
44 public delegate int
45 efl_ref_count_delegate(IntPtr eo);
26 [DllImport(efl.Libs.Eo)] public static extern int 46 [DllImport(efl.Libs.Eo)] public static extern int
27 efl_ref_count(IntPtr eo); 47 efl_ref_count(IntPtr eo);
48
28 [DllImport(efl.Libs.Eo)] public static extern IntPtr 49 [DllImport(efl.Libs.Eo)] public static extern IntPtr
29 efl_class_new(IntPtr class_description, IntPtr parent, IntPtr term); 50 efl_class_new(IntPtr class_description, IntPtr base0);
30 [DllImport(efl.Libs.Eo)] public static extern IntPtr 51 [DllImport(efl.Libs.Eo)] public static extern IntPtr
31 efl_class_new(IntPtr class_description, IntPtr parent, IntPtr extn1, IntPtr term); 52 efl_class_new(IntPtr class_description, IntPtr base0, IntPtr base1);
32 [DllImport(efl.Libs.Eo)] public static extern IntPtr 53 [DllImport(efl.Libs.Eo)] public static extern IntPtr
33 efl_class_new(IntPtr class_description, IntPtr parent, IntPtr extn1, IntPtr extn2, IntPtr term); 54 efl_class_new(IntPtr class_description, IntPtr base0, IntPtr base1, IntPtr base2);
34 [DllImport(efl.Libs.Eo)] public static extern IntPtr 55 [DllImport(efl.Libs.Eo)] public static extern IntPtr
35 efl_class_new(IntPtr class_description, IntPtr parent, IntPtr extn1, IntPtr extn2, IntPtr extn3, IntPtr term); 56 efl_class_new(IntPtr class_description, IntPtr base0, IntPtr base1, IntPtr base2, IntPtr base3);
36 [DllImport(efl.Libs.Eo)] public static extern IntPtr 57 [DllImport(efl.Libs.Eo)] public static extern IntPtr
37 efl_class_new(IntPtr class_description, IntPtr parent, IntPtr extn1, IntPtr extn2, IntPtr extn3, IntPtr extn4, IntPtr term); 58 efl_class_new(IntPtr class_description, IntPtr base0, IntPtr base1, IntPtr base2, IntPtr base3, IntPtr base4);
38 [DllImport(efl.Libs.Eo)] public static extern IntPtr 59 [DllImport(efl.Libs.Eo)] public static extern IntPtr
39 efl_class_new(IntPtr class_description, IntPtr parent, IntPtr extn1, IntPtr extn2, IntPtr extn3, IntPtr extn4, IntPtr extn5, IntPtr term); 60 efl_class_new(IntPtr class_description, IntPtr base0, IntPtr base1, IntPtr base2, IntPtr base3, IntPtr base4, IntPtr base5);
40 [DllImport(efl.Libs.Eo)] public static extern IntPtr 61 [DllImport(efl.Libs.Eo)] public static extern IntPtr
41 efl_class_new(IntPtr class_description, IntPtr parent, IntPtr extn1, IntPtr extn2, IntPtr extn3, IntPtr extn4, IntPtr extn5, IntPtr extn6, IntPtr term); 62 efl_class_new(IntPtr class_description, IntPtr base0, IntPtr base1, IntPtr base2, IntPtr base3, IntPtr base4, IntPtr base5, IntPtr base6);
42 [DllImport(efl.Libs.Eo)] public static extern IntPtr 63 [DllImport(efl.Libs.Eo)] public static extern IntPtr
43 efl_class_new(IntPtr class_description, IntPtr parent, IntPtr extn1, IntPtr extn2, IntPtr extn3, IntPtr extn4, IntPtr extn5, IntPtr extn6, IntPtr extn7, IntPtr term); 64 efl_class_new(IntPtr class_description, IntPtr base0, IntPtr base1, IntPtr base2, IntPtr base3, IntPtr base4, IntPtr base5, IntPtr base6, IntPtr base7);
44 [DllImport(efl.Libs.Eo)] public static extern IntPtr 65 [DllImport(efl.Libs.Eo)] public static extern IntPtr
45 efl_class_new(IntPtr class_description, IntPtr parent, IntPtr extn1, IntPtr extn2, IntPtr extn3, IntPtr extn4, IntPtr extn5, IntPtr extn6, IntPtr extn7, IntPtr extn8, IntPtr term); 66 efl_class_new(IntPtr class_description, IntPtr base0, IntPtr base1, IntPtr base2, IntPtr base3, IntPtr base4, IntPtr base5, IntPtr base6, IntPtr base7, IntPtr base8);
46 [DllImport(efl.Libs.Eo)] public static extern IntPtr 67 [DllImport(efl.Libs.Eo)] public static extern IntPtr
47 efl_class_new(IntPtr class_description, IntPtr parent, IntPtr extn1, IntPtr extn2, IntPtr extn3, IntPtr extn4, IntPtr extn5, IntPtr extn6, IntPtr extn7, IntPtr extn8, IntPtr extn9, IntPtr term); 68 efl_class_new(IntPtr class_description, IntPtr base0, IntPtr base1, IntPtr base2, IntPtr base3, IntPtr base4, IntPtr base5, IntPtr base6, IntPtr base7, IntPtr base8, IntPtr base9);
48 [DllImport(efl.Libs.Eo)] public static extern IntPtr 69 [DllImport(efl.Libs.Eo)] public static extern IntPtr
49 efl_class_new(IntPtr class_description, IntPtr parent, IntPtr extn1, IntPtr extn2, IntPtr extn3, IntPtr extn4, IntPtr extn5, IntPtr extn6, IntPtr extn7, IntPtr extn8, IntPtr extn9, IntPtr extn10, IntPtr term); 70 efl_class_new(IntPtr class_description, IntPtr base0, IntPtr base1, IntPtr base2, IntPtr base3, IntPtr base4, IntPtr base5, IntPtr base6, IntPtr base7, IntPtr base8, IntPtr base9, IntPtr base10);
50 [DllImport(efl.Libs.Eo)] public static extern IntPtr 71 [DllImport(efl.Libs.Eo)] public static extern IntPtr
51 efl_class_new(IntPtr class_description, IntPtr parent, IntPtr extn1, IntPtr extn2, IntPtr extn3, IntPtr extn4, IntPtr extn5, IntPtr extn6, IntPtr extn7, IntPtr extn8, IntPtr extn9, IntPtr extn10, IntPtr extn11, IntPtr term); 72 efl_class_new(IntPtr class_description, IntPtr base0, IntPtr base1, IntPtr base2, IntPtr base3, IntPtr base4, IntPtr base5, IntPtr base6, IntPtr base7, IntPtr base8, IntPtr base9, IntPtr base10, IntPtr base11);
52 [DllImport(efl.Libs.Eo)] public static extern IntPtr 73 [DllImport(efl.Libs.Eo)] public static extern IntPtr
53 efl_class_new(IntPtr class_description, IntPtr parent, IntPtr extn1, IntPtr extn2, IntPtr extn3, IntPtr extn4, IntPtr extn5, IntPtr extn6, IntPtr extn7, IntPtr extn8, IntPtr extn9, IntPtr extn10, IntPtr extn11, IntPtr extn12, IntPtr term); 74 efl_class_new(IntPtr class_description, IntPtr base0, IntPtr base1, IntPtr base2, IntPtr base3, IntPtr base4, IntPtr base5, IntPtr base6, IntPtr base7, IntPtr base8, IntPtr base9, IntPtr base10, IntPtr base11, IntPtr base12);
54 [DllImport(efl.Libs.Eo)] public static extern IntPtr 75 [DllImport(efl.Libs.Eo)] public static extern IntPtr
55 efl_class_new(IntPtr class_description, IntPtr parent, IntPtr extn1, IntPtr extn2, IntPtr extn3, IntPtr extn4, IntPtr extn5, IntPtr extn6, IntPtr extn7, IntPtr extn8, IntPtr extn9, IntPtr extn10, IntPtr extn11, IntPtr extn12, IntPtr extn13, IntPtr term); 76 efl_class_new(IntPtr class_description, IntPtr base0, IntPtr base1, IntPtr base2, IntPtr base3, IntPtr base4, IntPtr base5, IntPtr base6, IntPtr base7, IntPtr base8, IntPtr base9, IntPtr base10, IntPtr base11, IntPtr base12, IntPtr base13);
56 [DllImport(efl.Libs.Eo)] public static extern IntPtr 77 [DllImport(efl.Libs.Eo)] public static extern IntPtr
57 efl_class_new(IntPtr class_description, IntPtr parent, IntPtr extn1, IntPtr extn2, IntPtr extn3, IntPtr extn4, IntPtr extn5, IntPtr extn6, IntPtr extn7, IntPtr extn8, IntPtr extn9, IntPtr extn10, IntPtr extn11, IntPtr extn12, IntPtr extn13, IntPtr extn14, IntPtr term); 78 efl_class_new(IntPtr class_description, IntPtr base0, IntPtr base1, IntPtr base2, IntPtr base3, IntPtr base4, IntPtr base5, IntPtr base6, IntPtr base7, IntPtr base8, IntPtr base9, IntPtr base10, IntPtr base11, IntPtr base12, IntPtr base13, IntPtr base14);
58 [DllImport(efl.Libs.Eo)] public static extern IntPtr 79 [DllImport(efl.Libs.Eo)] public static extern IntPtr
59 efl_class_new(IntPtr class_description, IntPtr parent, IntPtr extn1, IntPtr extn2, IntPtr extn3, IntPtr extn4, IntPtr extn5, IntPtr extn6, IntPtr extn7, IntPtr extn8, IntPtr extn9, IntPtr extn10, IntPtr extn11, IntPtr extn12, IntPtr extn13, IntPtr extn14, IntPtr extn15, IntPtr term); 80 efl_class_new(IntPtr class_description, IntPtr base0, IntPtr base1, IntPtr base2, IntPtr base3, IntPtr base4, IntPtr base5, IntPtr base6, IntPtr base7, IntPtr base8, IntPtr base9, IntPtr base10, IntPtr base11, IntPtr base12, IntPtr base13, IntPtr base14, IntPtr base15);
60 [DllImport(efl.Libs.Eo)] public static extern IntPtr 81 [DllImport(efl.Libs.Eo)] public static extern IntPtr
61 efl_class_new(IntPtr class_description, IntPtr parent, IntPtr extn1, IntPtr extn2, IntPtr extn3, IntPtr extn4, IntPtr extn5, IntPtr extn6, IntPtr extn7, IntPtr extn8, IntPtr extn9, IntPtr extn10, IntPtr extn11, IntPtr extn12, IntPtr extn13, IntPtr extn14, IntPtr extn15, IntPtr extn16, IntPtr term); 82 efl_class_new(IntPtr class_description, IntPtr base0, IntPtr base1, IntPtr base2, IntPtr base3, IntPtr base4, IntPtr base5, IntPtr base6, IntPtr base7, IntPtr base8, IntPtr base9, IntPtr base10, IntPtr base11, IntPtr base12, IntPtr base13, IntPtr base14, IntPtr base15, IntPtr base16);
62 [DllImport(efl.Libs.Eo)] public static extern IntPtr 83 [DllImport(efl.Libs.Eo)] public static extern IntPtr
63 efl_class_new(IntPtr class_description, IntPtr parent, IntPtr extn1, IntPtr extn2, IntPtr extn3, IntPtr extn4, IntPtr extn5, IntPtr extn6, IntPtr extn7, IntPtr extn8, IntPtr extn9, IntPtr extn10, IntPtr extn11, IntPtr extn12, IntPtr extn13, IntPtr extn14, IntPtr extn15, IntPtr extn16, IntPtr extn17, IntPtr term); 84 efl_class_new(IntPtr class_description, IntPtr base0, IntPtr base1, IntPtr base2, IntPtr base3, IntPtr base4, IntPtr base5, IntPtr base6, IntPtr base7, IntPtr base8, IntPtr base9, IntPtr base10, IntPtr base11, IntPtr base12, IntPtr base13, IntPtr base14, IntPtr base15, IntPtr base16, IntPtr base17);
64 [DllImport(efl.Libs.Eo)] public static extern IntPtr 85 [DllImport(efl.Libs.Eo)] public static extern IntPtr
65 efl_class_new(IntPtr class_description, IntPtr parent, IntPtr extn1, IntPtr extn2, IntPtr extn3, IntPtr extn4, IntPtr extn5, IntPtr extn6, IntPtr extn7, IntPtr extn8, IntPtr extn9, IntPtr extn10, IntPtr extn11, IntPtr extn12, IntPtr extn13, IntPtr extn14, IntPtr extn15, IntPtr extn16, IntPtr extn17, IntPtr extn18, IntPtr term); 86 efl_class_new(IntPtr class_description, IntPtr base0, IntPtr base1, IntPtr base2, IntPtr base3, IntPtr base4, IntPtr base5, IntPtr base6, IntPtr base7, IntPtr base8, IntPtr base9, IntPtr base10, IntPtr base11, IntPtr base12, IntPtr base13, IntPtr base14, IntPtr base15, IntPtr base16, IntPtr base17, IntPtr base18);
66 [DllImport(efl.Libs.Eo)] public static extern IntPtr 87 [DllImport(efl.Libs.Eo)] public static extern IntPtr
67 efl_class_new(IntPtr class_description, IntPtr parent, IntPtr extn1, IntPtr extn2, IntPtr extn3, IntPtr extn4, IntPtr extn5, IntPtr extn6, IntPtr extn7, IntPtr extn8, IntPtr extn9, IntPtr extn10, IntPtr extn11, IntPtr extn12, IntPtr extn13, IntPtr extn14, IntPtr extn15, IntPtr extn16, IntPtr extn17, IntPtr extn18, IntPtr extn19, IntPtr term); 88 efl_class_new(IntPtr class_description, IntPtr base0, IntPtr base1, IntPtr base2, IntPtr base3, IntPtr base4, IntPtr base5, IntPtr base6, IntPtr base7, IntPtr base8, IntPtr base9, IntPtr base10, IntPtr base11, IntPtr base12, IntPtr base13, IntPtr base14, IntPtr base15, IntPtr base16, IntPtr base17, IntPtr base18, IntPtr base19);
68 [DllImport(efl.Libs.Eo)] public static extern IntPtr 89 [DllImport(efl.Libs.Eo)] public static extern IntPtr
69 efl_class_new(IntPtr class_description, IntPtr parent, IntPtr extn1, IntPtr extn2, IntPtr extn3, IntPtr extn4, IntPtr extn5, IntPtr extn6, IntPtr extn7, IntPtr extn8, IntPtr extn9, IntPtr extn10, IntPtr extn11, IntPtr extn12, IntPtr extn13, IntPtr extn14, IntPtr extn15, IntPtr extn16, IntPtr extn17, IntPtr extn18, IntPtr extn19, IntPtr extn20, IntPtr term); 90 efl_class_new(IntPtr class_description, IntPtr base0, IntPtr base1, IntPtr base2, IntPtr base3, IntPtr base4, IntPtr base5, IntPtr base6, IntPtr base7, IntPtr base8, IntPtr base9, IntPtr base10, IntPtr base11, IntPtr base12, IntPtr base13, IntPtr base14, IntPtr base15, IntPtr base16, IntPtr base17, IntPtr base18, IntPtr base19, IntPtr base20);
70 [DllImport(efl.Libs.Eo)] public static extern IntPtr 91 [DllImport(efl.Libs.Eo)] public static extern IntPtr
71 efl_class_new(IntPtr class_description, IntPtr parent, IntPtr extn1, IntPtr extn2, IntPtr extn3, IntPtr extn4, IntPtr extn5, IntPtr extn6, IntPtr extn7, IntPtr extn8, IntPtr extn9, IntPtr extn10, IntPtr extn11, IntPtr extn12, IntPtr extn13, IntPtr extn14, IntPtr extn15, IntPtr extn16, IntPtr extn17, IntPtr extn18, IntPtr extn19, IntPtr extn20, IntPtr extn21, IntPtr term); 92 efl_class_new(IntPtr class_description, IntPtr base0, IntPtr base1, IntPtr base2, IntPtr base3, IntPtr base4, IntPtr base5, IntPtr base6, IntPtr base7, IntPtr base8, IntPtr base9, IntPtr base10, IntPtr base11, IntPtr base12, IntPtr base13, IntPtr base14, IntPtr base15, IntPtr base16, IntPtr base17, IntPtr base18, IntPtr base19, IntPtr base20, IntPtr base21);
72 [DllImport(efl.Libs.Eo)] public static extern IntPtr 93 [DllImport(efl.Libs.Eo)] public static extern IntPtr
73 efl_class_new(IntPtr class_description, IntPtr parent, IntPtr extn1, IntPtr extn2, IntPtr extn3, IntPtr extn4, IntPtr extn5, IntPtr extn6, IntPtr extn7, IntPtr extn8, IntPtr extn9, IntPtr extn10, IntPtr extn11, IntPtr extn12, IntPtr extn13, IntPtr extn14, IntPtr extn15, IntPtr extn16, IntPtr extn17, IntPtr extn18, IntPtr extn19, IntPtr extn20, IntPtr extn21, IntPtr extn22, IntPtr term); 94 efl_class_new(IntPtr class_description, IntPtr base0, IntPtr base1, IntPtr base2, IntPtr base3, IntPtr base4, IntPtr base5, IntPtr base6, IntPtr base7, IntPtr base8, IntPtr base9, IntPtr base10, IntPtr base11, IntPtr base12, IntPtr base13, IntPtr base14, IntPtr base15, IntPtr base16, IntPtr base17, IntPtr base18, IntPtr base19, IntPtr base20, IntPtr base21, IntPtr base22);
74 [DllImport(efl.Libs.Eo)] public static extern IntPtr 95 [DllImport(efl.Libs.Eo)] public static extern IntPtr
75 efl_class_new(IntPtr class_description, IntPtr parent, IntPtr extn1, IntPtr extn2, IntPtr extn3, IntPtr extn4, IntPtr extn5, IntPtr extn6, IntPtr extn7, IntPtr extn8, IntPtr extn9, IntPtr extn10, IntPtr extn11, IntPtr extn12, IntPtr extn13, IntPtr extn14, IntPtr extn15, IntPtr extn16, IntPtr extn17, IntPtr extn18, IntPtr extn19, IntPtr extn20, IntPtr extn21, IntPtr extn22, IntPtr extn23, IntPtr term); 96 efl_class_new(IntPtr class_description, IntPtr base0, IntPtr base1, IntPtr base2, IntPtr base3, IntPtr base4, IntPtr base5, IntPtr base6, IntPtr base7, IntPtr base8, IntPtr base9, IntPtr base10, IntPtr base11, IntPtr base12, IntPtr base13, IntPtr base14, IntPtr base15, IntPtr base16, IntPtr base17, IntPtr base18, IntPtr base19, IntPtr base20, IntPtr base21, IntPtr base22, IntPtr base23);
76 [DllImport(efl.Libs.Eo)] public static extern IntPtr 97 [DllImport(efl.Libs.Eo)] public static extern IntPtr
77 efl_class_new(IntPtr class_description, IntPtr parent, IntPtr extn1, IntPtr extn2, IntPtr extn3, IntPtr extn4, IntPtr extn5, IntPtr extn6, IntPtr extn7, IntPtr extn8, IntPtr extn9, IntPtr extn10, IntPtr extn11, IntPtr extn12, IntPtr extn13, IntPtr extn14, IntPtr extn15, IntPtr extn16, IntPtr extn17, IntPtr extn18, IntPtr extn19, IntPtr extn20, IntPtr extn21, IntPtr extn22, IntPtr extn23, IntPtr extn24, IntPtr term); 98 efl_class_new(IntPtr class_description, IntPtr base0, IntPtr base1, IntPtr base2, IntPtr base3, IntPtr base4, IntPtr base5, IntPtr base6, IntPtr base7, IntPtr base8, IntPtr base9, IntPtr base10, IntPtr base11, IntPtr base12, IntPtr base13, IntPtr base14, IntPtr base15, IntPtr base16, IntPtr base17, IntPtr base18, IntPtr base19, IntPtr base20, IntPtr base21, IntPtr base22, IntPtr base23, IntPtr base24);
78 [DllImport(efl.Libs.Eo)] public static extern IntPtr 99 [DllImport(efl.Libs.Eo)] public static extern IntPtr
79 efl_class_new(IntPtr class_description, IntPtr parent, IntPtr extn1, IntPtr extn2, IntPtr extn3, IntPtr extn4, IntPtr extn5, IntPtr extn6, IntPtr extn7, IntPtr extn8, IntPtr extn9, IntPtr extn10, IntPtr extn11, IntPtr extn12, IntPtr extn13, IntPtr extn14, IntPtr extn15, IntPtr extn16, IntPtr extn17, IntPtr extn18, IntPtr extn19, IntPtr extn20, IntPtr extn21, IntPtr extn22, IntPtr extn23, IntPtr extn24, IntPtr extn25, IntPtr term); 100 efl_class_new(IntPtr class_description, IntPtr base0, IntPtr base1, IntPtr base2, IntPtr base3, IntPtr base4, IntPtr base5, IntPtr base6, IntPtr base7, IntPtr base8, IntPtr base9, IntPtr base10, IntPtr base11, IntPtr base12, IntPtr base13, IntPtr base14, IntPtr base15, IntPtr base16, IntPtr base17, IntPtr base18, IntPtr base19, IntPtr base20, IntPtr base21, IntPtr base22, IntPtr base23, IntPtr base24, IntPtr base25);
80 [DllImport(efl.Libs.Eo)] public static extern IntPtr 101 [DllImport(efl.Libs.Eo)] public static extern IntPtr
81 efl_class_new(IntPtr class_description, IntPtr parent, IntPtr extn1, IntPtr extn2, IntPtr extn3, IntPtr extn4, IntPtr extn5, IntPtr extn6, IntPtr extn7, IntPtr extn8, IntPtr extn9, IntPtr extn10, IntPtr extn11, IntPtr extn12, IntPtr extn13, IntPtr extn14, IntPtr extn15, IntPtr extn16, IntPtr extn17, IntPtr extn18, IntPtr extn19, IntPtr extn20, IntPtr extn21, IntPtr extn22, IntPtr extn23, IntPtr extn24, IntPtr extn25, IntPtr extn26, IntPtr term); 102 efl_class_new(IntPtr class_description, IntPtr base0, IntPtr base1, IntPtr base2, IntPtr base3, IntPtr base4, IntPtr base5, IntPtr base6, IntPtr base7, IntPtr base8, IntPtr base9, IntPtr base10, IntPtr base11, IntPtr base12, IntPtr base13, IntPtr base14, IntPtr base15, IntPtr base16, IntPtr base17, IntPtr base18, IntPtr base19, IntPtr base20, IntPtr base21, IntPtr base22, IntPtr base23, IntPtr base24, IntPtr base25, IntPtr base26);
82 [DllImport(efl.Libs.Eo)] public static extern IntPtr 103 [DllImport(efl.Libs.Eo)] public static extern IntPtr
83 efl_class_new(IntPtr class_description, IntPtr parent, IntPtr extn1, IntPtr extn2, IntPtr extn3, IntPtr extn4, IntPtr extn5, IntPtr extn6, IntPtr extn7, IntPtr extn8, IntPtr extn9, IntPtr extn10, IntPtr extn11, IntPtr extn12, IntPtr extn13, IntPtr extn14, IntPtr extn15, IntPtr extn16, IntPtr extn17, IntPtr extn18, IntPtr extn19, IntPtr extn20, IntPtr extn21, IntPtr extn22, IntPtr extn23, IntPtr extn24, IntPtr extn25, IntPtr extn26, IntPtr extn27, IntPtr term); 104 efl_class_new(IntPtr class_description, IntPtr base0, IntPtr base1, IntPtr base2, IntPtr base3, IntPtr base4, IntPtr base5, IntPtr base6, IntPtr base7, IntPtr base8, IntPtr base9, IntPtr base10, IntPtr base11, IntPtr base12, IntPtr base13, IntPtr base14, IntPtr base15, IntPtr base16, IntPtr base17, IntPtr base18, IntPtr base19, IntPtr base20, IntPtr base21, IntPtr base22, IntPtr base23, IntPtr base24, IntPtr base25, IntPtr base26, IntPtr base27);
84 [DllImport(efl.Libs.Eo)] public static extern IntPtr 105 [DllImport(efl.Libs.Eo)] public static extern IntPtr
85 efl_class_new(IntPtr class_description, IntPtr parent, IntPtr extn1, IntPtr extn2, IntPtr extn3, IntPtr extn4, IntPtr extn5, IntPtr extn6, IntPtr extn7, IntPtr extn8, IntPtr extn9, IntPtr extn10, IntPtr extn11, IntPtr extn12, IntPtr extn13, IntPtr extn14, IntPtr extn15, IntPtr extn16, IntPtr extn17, IntPtr extn18, IntPtr extn19, IntPtr extn20, IntPtr extn21, IntPtr extn22, IntPtr extn23, IntPtr extn24, IntPtr extn25, IntPtr extn26, IntPtr extn27, IntPtr extn28, IntPtr term); 106 efl_class_new(IntPtr class_description, IntPtr base0, IntPtr base1, IntPtr base2, IntPtr base3, IntPtr base4, IntPtr base5, IntPtr base6, IntPtr base7, IntPtr base8, IntPtr base9, IntPtr base10, IntPtr base11, IntPtr base12, IntPtr base13, IntPtr base14, IntPtr base15, IntPtr base16, IntPtr base17, IntPtr base18, IntPtr base19, IntPtr base20, IntPtr base21, IntPtr base22, IntPtr base23, IntPtr base24, IntPtr base25, IntPtr base26, IntPtr base27, IntPtr base28);
86 [DllImport(efl.Libs.Eo)] public static extern IntPtr 107 [DllImport(efl.Libs.Eo)] public static extern IntPtr
87 efl_class_new(IntPtr class_description, IntPtr parent, IntPtr extn1, IntPtr extn2, IntPtr extn3, IntPtr extn4, IntPtr extn5, IntPtr extn6, IntPtr extn7, IntPtr extn8, IntPtr extn9, IntPtr extn10, IntPtr extn11, IntPtr extn12, IntPtr extn13, IntPtr extn14, IntPtr extn15, IntPtr extn16, IntPtr extn17, IntPtr extn18, IntPtr extn19, IntPtr extn20, IntPtr extn21, IntPtr extn22, IntPtr extn23, IntPtr extn24, IntPtr extn25, IntPtr extn26, IntPtr extn27, IntPtr extn28, IntPtr extn29, IntPtr term); 108 efl_class_new(IntPtr class_description, IntPtr base0, IntPtr base1, IntPtr base2, IntPtr base3, IntPtr base4, IntPtr base5, IntPtr base6, IntPtr base7, IntPtr base8, IntPtr base9, IntPtr base10, IntPtr base11, IntPtr base12, IntPtr base13, IntPtr base14, IntPtr base15, IntPtr base16, IntPtr base17, IntPtr base18, IntPtr base19, IntPtr base20, IntPtr base21, IntPtr base22, IntPtr base23, IntPtr base24, IntPtr base25, IntPtr base26, IntPtr base27, IntPtr base28, IntPtr base29);
88 [DllImport(efl.Libs.Eo)] public static extern IntPtr 109 [DllImport(efl.Libs.Eo)] public static extern IntPtr
89 efl_class_new(IntPtr class_description, IntPtr parent, IntPtr extn1, IntPtr extn2, IntPtr extn3, IntPtr extn4, IntPtr extn5, IntPtr extn6, IntPtr extn7, IntPtr extn8, IntPtr extn9, IntPtr extn10, IntPtr extn11, IntPtr extn12, IntPtr extn13, IntPtr extn14, IntPtr extn15, IntPtr extn16, IntPtr extn17, IntPtr extn18, IntPtr extn19, IntPtr extn20, IntPtr extn21, IntPtr extn22, IntPtr extn23, IntPtr extn24, IntPtr extn25, IntPtr extn26, IntPtr extn27, IntPtr extn28, IntPtr extn29, IntPtr extn30, IntPtr term); 110 efl_class_new(IntPtr class_description, IntPtr base0, IntPtr base1, IntPtr base2, IntPtr base3, IntPtr base4, IntPtr base5, IntPtr base6, IntPtr base7, IntPtr base8, IntPtr base9, IntPtr base10, IntPtr base11, IntPtr base12, IntPtr base13, IntPtr base14, IntPtr base15, IntPtr base16, IntPtr base17, IntPtr base18, IntPtr base19, IntPtr base20, IntPtr base21, IntPtr base22, IntPtr base23, IntPtr base24, IntPtr base25, IntPtr base26, IntPtr base27, IntPtr base28, IntPtr base29, IntPtr base30);
90 [DllImport(efl.Libs.Eo)] public static extern IntPtr 111 [DllImport(efl.Libs.Eo)] public static extern IntPtr
91 efl_class_new(IntPtr class_description, IntPtr parent, IntPtr extn1, IntPtr extn2, IntPtr extn3, IntPtr extn4, IntPtr extn5, IntPtr extn6, IntPtr extn7, IntPtr extn8, IntPtr extn9, IntPtr extn10, IntPtr extn11, IntPtr extn12, IntPtr extn13, IntPtr extn14, IntPtr extn15, IntPtr extn16, IntPtr extn17, IntPtr extn18, IntPtr extn19, IntPtr extn20, IntPtr extn21, IntPtr extn22, IntPtr extn23, IntPtr extn24, IntPtr extn25, IntPtr extn26, IntPtr extn27, IntPtr extn28, IntPtr extn29, IntPtr extn30, IntPtr extn31, IntPtr term); 112 efl_class_new(IntPtr class_description, IntPtr base0, IntPtr base1, IntPtr base2, IntPtr base3, IntPtr base4, IntPtr base5, IntPtr base6, IntPtr base7, IntPtr base8, IntPtr base9, IntPtr base10, IntPtr base11, IntPtr base12, IntPtr base13, IntPtr base14, IntPtr base15, IntPtr base16, IntPtr base17, IntPtr base18, IntPtr base19, IntPtr base20, IntPtr base21, IntPtr base22, IntPtr base23, IntPtr base24, IntPtr base25, IntPtr base26, IntPtr base27, IntPtr base28, IntPtr base29, IntPtr base30, IntPtr base31);
92 [DllImport(efl.Libs.Eo)] public static extern IntPtr 113 [DllImport(efl.Libs.Eo)] public static extern IntPtr
93 efl_class_new(IntPtr class_description, IntPtr parent, IntPtr extn1, IntPtr extn2, IntPtr extn3, IntPtr extn4, IntPtr extn5, IntPtr extn6, IntPtr extn7, IntPtr extn8, IntPtr extn9, IntPtr extn10, IntPtr extn11, IntPtr extn12, IntPtr extn13, IntPtr extn14, IntPtr extn15, IntPtr extn16, IntPtr extn17, IntPtr extn18, IntPtr extn19, IntPtr extn20, IntPtr extn21, IntPtr extn22, IntPtr extn23, IntPtr extn24, IntPtr extn25, IntPtr extn26, IntPtr extn27, IntPtr extn28, IntPtr extn29, IntPtr extn30, IntPtr extn31, IntPtr extn32, IntPtr term); 114 efl_class_new(IntPtr class_description, IntPtr base0, IntPtr base1, IntPtr base2, IntPtr base3, IntPtr base4, IntPtr base5, IntPtr base6, IntPtr base7, IntPtr base8, IntPtr base9, IntPtr base10, IntPtr base11, IntPtr base12, IntPtr base13, IntPtr base14, IntPtr base15, IntPtr base16, IntPtr base17, IntPtr base18, IntPtr base19, IntPtr base20, IntPtr base21, IntPtr base22, IntPtr base23, IntPtr base24, IntPtr base25, IntPtr base26, IntPtr base27, IntPtr base28, IntPtr base29, IntPtr base30, IntPtr base31, IntPtr base32);
94 [DllImport(efl.Libs.Eo)] public static extern IntPtr 115 [DllImport(efl.Libs.Eo)] public static extern IntPtr
95 efl_class_new(IntPtr class_description, IntPtr parent, IntPtr extn1, IntPtr extn2, IntPtr extn3, IntPtr extn4, IntPtr extn5, IntPtr extn6, IntPtr extn7, IntPtr extn8, IntPtr extn9, IntPtr extn10, IntPtr extn11, IntPtr extn12, IntPtr extn13, IntPtr extn14, IntPtr extn15, IntPtr extn16, IntPtr extn17, IntPtr extn18, IntPtr extn19, IntPtr extn20, IntPtr extn21, IntPtr extn22, IntPtr extn23, IntPtr extn24, IntPtr extn25, IntPtr extn26, IntPtr extn27, IntPtr extn28, IntPtr extn29, IntPtr extn30, IntPtr extn31, IntPtr extn32, IntPtr extn33, IntPtr term); 116 efl_class_new(IntPtr class_description, IntPtr base0, IntPtr base1, IntPtr base2, IntPtr base3, IntPtr base4, IntPtr base5, IntPtr base6, IntPtr base7, IntPtr base8, IntPtr base9, IntPtr base10, IntPtr base11, IntPtr base12, IntPtr base13, IntPtr base14, IntPtr base15, IntPtr base16, IntPtr base17, IntPtr base18, IntPtr base19, IntPtr base20, IntPtr base21, IntPtr base22, IntPtr base23, IntPtr base24, IntPtr base25, IntPtr base26, IntPtr base27, IntPtr base28, IntPtr base29, IntPtr base30, IntPtr base31, IntPtr base32, IntPtr base33);
96 [DllImport(efl.Libs.Eo)] public static extern IntPtr 117 [DllImport(efl.Libs.Eo)] public static extern IntPtr
97 efl_class_new(IntPtr class_description, IntPtr parent, IntPtr extn1, IntPtr extn2, IntPtr extn3, IntPtr extn4, IntPtr extn5, IntPtr extn6, IntPtr extn7, IntPtr extn8, IntPtr extn9, IntPtr extn10, IntPtr extn11, IntPtr extn12, IntPtr extn13, IntPtr extn14, IntPtr extn15, IntPtr extn16, IntPtr extn17, IntPtr extn18, IntPtr extn19, IntPtr extn20, IntPtr extn21, IntPtr extn22, IntPtr extn23, IntPtr extn24, IntPtr extn25, IntPtr extn26, IntPtr extn27, IntPtr extn28, IntPtr extn29, IntPtr extn30, IntPtr extn31, IntPtr extn32, IntPtr extn33, IntPtr extn34, IntPtr term); 118 efl_class_new(IntPtr class_description, IntPtr base0, IntPtr base1, IntPtr base2, IntPtr base3, IntPtr base4, IntPtr base5, IntPtr base6, IntPtr base7, IntPtr base8, IntPtr base9, IntPtr base10, IntPtr base11, IntPtr base12, IntPtr base13, IntPtr base14, IntPtr base15, IntPtr base16, IntPtr base17, IntPtr base18, IntPtr base19, IntPtr base20, IntPtr base21, IntPtr base22, IntPtr base23, IntPtr base24, IntPtr base25, IntPtr base26, IntPtr base27, IntPtr base28, IntPtr base29, IntPtr base30, IntPtr base31, IntPtr base32, IntPtr base33, IntPtr base34);
98 [DllImport(efl.Libs.Eo)] public static extern IntPtr 119 [DllImport(efl.Libs.Eo)] public static extern IntPtr
99 efl_class_new(IntPtr class_description, IntPtr parent, IntPtr extn1, IntPtr extn2, IntPtr extn3, IntPtr extn4, IntPtr extn5, IntPtr extn6, IntPtr extn7, IntPtr extn8, IntPtr extn9, IntPtr extn10, IntPtr extn11, IntPtr extn12, IntPtr extn13, IntPtr extn14, IntPtr extn15, IntPtr extn16, IntPtr extn17, IntPtr extn18, IntPtr extn19, IntPtr extn20, IntPtr extn21, IntPtr extn22, IntPtr extn23, IntPtr extn24, IntPtr extn25, IntPtr extn26, IntPtr extn27, IntPtr extn28, IntPtr extn29, IntPtr extn30, IntPtr extn31, IntPtr extn32, IntPtr extn33, IntPtr extn34, IntPtr extn35, IntPtr term); 120 efl_class_new(IntPtr class_description, IntPtr base0, IntPtr base1, IntPtr base2, IntPtr base3, IntPtr base4, IntPtr base5, IntPtr base6, IntPtr base7, IntPtr base8, IntPtr base9, IntPtr base10, IntPtr base11, IntPtr base12, IntPtr base13, IntPtr base14, IntPtr base15, IntPtr base16, IntPtr base17, IntPtr base18, IntPtr base19, IntPtr base20, IntPtr base21, IntPtr base22, IntPtr base23, IntPtr base24, IntPtr base25, IntPtr base26, IntPtr base27, IntPtr base28, IntPtr base29, IntPtr base30, IntPtr base31, IntPtr base32, IntPtr base33, IntPtr base34, IntPtr base35);
100 [DllImport(efl.Libs.Eo)] public static extern IntPtr 121 [DllImport(efl.Libs.Eo)] public static extern IntPtr
101 efl_class_new(IntPtr class_description, IntPtr parent, IntPtr extn1, IntPtr extn2, IntPtr extn3, IntPtr extn4, IntPtr extn5, IntPtr extn6, IntPtr extn7, IntPtr extn8, IntPtr extn9, IntPtr extn10, IntPtr extn11, IntPtr extn12, IntPtr extn13, IntPtr extn14, IntPtr extn15, IntPtr extn16, IntPtr extn17, IntPtr extn18, IntPtr extn19, IntPtr extn20, IntPtr extn21, IntPtr extn22, IntPtr extn23, IntPtr extn24, IntPtr extn25, IntPtr extn26, IntPtr extn27, IntPtr extn28, IntPtr extn29, IntPtr extn30, IntPtr extn31, IntPtr extn32, IntPtr extn33, IntPtr extn34, IntPtr extn35, IntPtr extn36, IntPtr term); 122 efl_class_new(IntPtr class_description, IntPtr base0, IntPtr base1, IntPtr base2, IntPtr base3, IntPtr base4, IntPtr base5, IntPtr base6, IntPtr base7, IntPtr base8, IntPtr base9, IntPtr base10, IntPtr base11, IntPtr base12, IntPtr base13, IntPtr base14, IntPtr base15, IntPtr base16, IntPtr base17, IntPtr base18, IntPtr base19, IntPtr base20, IntPtr base21, IntPtr base22, IntPtr base23, IntPtr base24, IntPtr base25, IntPtr base26, IntPtr base27, IntPtr base28, IntPtr base29, IntPtr base30, IntPtr base31, IntPtr base32, IntPtr base33, IntPtr base34, IntPtr base35, IntPtr base36);
102 [DllImport(efl.Libs.Eo)] public static extern IntPtr 123 [DllImport(efl.Libs.Eo)] public static extern IntPtr
103 efl_class_new(IntPtr class_description, IntPtr parent, IntPtr extn1, IntPtr extn2, IntPtr extn3, IntPtr extn4, IntPtr extn5, IntPtr extn6, IntPtr extn7, IntPtr extn8, IntPtr extn9, IntPtr extn10, IntPtr extn11, IntPtr extn12, IntPtr extn13, IntPtr extn14, IntPtr extn15, IntPtr extn16, IntPtr extn17, IntPtr extn18, IntPtr extn19, IntPtr extn20, IntPtr extn21, IntPtr extn22, IntPtr extn23, IntPtr extn24, IntPtr extn25, IntPtr extn26, IntPtr extn27, IntPtr extn28, IntPtr extn29, IntPtr extn30, IntPtr extn31, IntPtr extn32, IntPtr extn33, IntPtr extn34, IntPtr extn35, IntPtr extn36, IntPtr extn37, IntPtr term); 124 efl_class_new(IntPtr class_description, IntPtr base0, IntPtr base1, IntPtr base2, IntPtr base3, IntPtr base4, IntPtr base5, IntPtr base6, IntPtr base7, IntPtr base8, IntPtr base9, IntPtr base10, IntPtr base11, IntPtr base12, IntPtr base13, IntPtr base14, IntPtr base15, IntPtr base16, IntPtr base17, IntPtr base18, IntPtr base19, IntPtr base20, IntPtr base21, IntPtr base22, IntPtr base23, IntPtr base24, IntPtr base25, IntPtr base26, IntPtr base27, IntPtr base28, IntPtr base29, IntPtr base30, IntPtr base31, IntPtr base32, IntPtr base33, IntPtr base34, IntPtr base35, IntPtr base36, IntPtr base37);
104 [DllImport(efl.Libs.Eo)] public static extern IntPtr 125 [DllImport(efl.Libs.Eo)] public static extern IntPtr
105 efl_class_new(IntPtr class_description, IntPtr parent, IntPtr extn1, IntPtr extn2, IntPtr extn3, IntPtr extn4, IntPtr extn5, IntPtr extn6, IntPtr extn7, IntPtr extn8, IntPtr extn9, IntPtr extn10, IntPtr extn11, IntPtr extn12, IntPtr extn13, IntPtr extn14, IntPtr extn15, IntPtr extn16, IntPtr extn17, IntPtr extn18, IntPtr extn19, IntPtr extn20, IntPtr extn21, IntPtr extn22, IntPtr extn23, IntPtr extn24, IntPtr extn25, IntPtr extn26, IntPtr extn27, IntPtr extn28, IntPtr extn29, IntPtr extn30, IntPtr extn31, IntPtr extn32, IntPtr extn33, IntPtr extn34, IntPtr extn35, IntPtr extn36, IntPtr extn37, IntPtr extn38, IntPtr term); 126 efl_class_new(IntPtr class_description, IntPtr base0, IntPtr base1, IntPtr base2, IntPtr base3, IntPtr base4, IntPtr base5, IntPtr base6, IntPtr base7, IntPtr base8, IntPtr base9, IntPtr base10, IntPtr base11, IntPtr base12, IntPtr base13, IntPtr base14, IntPtr base15, IntPtr base16, IntPtr base17, IntPtr base18, IntPtr base19, IntPtr base20, IntPtr base21, IntPtr base22, IntPtr base23, IntPtr base24, IntPtr base25, IntPtr base26, IntPtr base27, IntPtr base28, IntPtr base29, IntPtr base30, IntPtr base31, IntPtr base32, IntPtr base33, IntPtr base34, IntPtr base35, IntPtr base36, IntPtr base37, IntPtr base38);
106 [DllImport(efl.Libs.Eo)] public static extern IntPtr 127 [DllImport(efl.Libs.Eo)] public static extern IntPtr
107 efl_class_new(IntPtr class_description, IntPtr parent, IntPtr extn1, IntPtr extn2, IntPtr extn3, IntPtr extn4, IntPtr extn5, IntPtr extn6, IntPtr extn7, IntPtr extn8, IntPtr extn9, IntPtr extn10, IntPtr extn11, IntPtr extn12, IntPtr extn13, IntPtr extn14, IntPtr extn15, IntPtr extn16, IntPtr extn17, IntPtr extn18, IntPtr extn19, IntPtr extn20, IntPtr extn21, IntPtr extn22, IntPtr extn23, IntPtr extn24, IntPtr extn25, IntPtr extn26, IntPtr extn27, IntPtr extn28, IntPtr extn29, IntPtr extn30, IntPtr extn31, IntPtr extn32, IntPtr extn33, IntPtr extn34, IntPtr extn35, IntPtr extn36, IntPtr extn37, IntPtr extn38, IntPtr extn39, IntPtr term); 128 efl_class_new(IntPtr class_description, IntPtr base0, IntPtr base1, IntPtr base2, IntPtr base3, IntPtr base4, IntPtr base5, IntPtr base6, IntPtr base7, IntPtr base8, IntPtr base9, IntPtr base10, IntPtr base11, IntPtr base12, IntPtr base13, IntPtr base14, IntPtr base15, IntPtr base16, IntPtr base17, IntPtr base18, IntPtr base19, IntPtr base20, IntPtr base21, IntPtr base22, IntPtr base23, IntPtr base24, IntPtr base25, IntPtr base26, IntPtr base27, IntPtr base28, IntPtr base29, IntPtr base30, IntPtr base31, IntPtr base32, IntPtr base33, IntPtr base34, IntPtr base35, IntPtr base36, IntPtr base37, IntPtr base38, IntPtr base39);
108 [DllImport(efl.Libs.Eo)] public static extern IntPtr 129 [DllImport(efl.Libs.Eo)] public static extern IntPtr
109 efl_class_new(IntPtr class_description, IntPtr parent, IntPtr extn1, IntPtr extn2, IntPtr extn3, IntPtr extn4, IntPtr extn5, IntPtr extn6, IntPtr extn7, IntPtr extn8, IntPtr extn9, IntPtr extn10, IntPtr extn11, IntPtr extn12, IntPtr extn13, IntPtr extn14, IntPtr extn15, IntPtr extn16, IntPtr extn17, IntPtr extn18, IntPtr extn19, IntPtr extn20, IntPtr extn21, IntPtr extn22, IntPtr extn23, IntPtr extn24, IntPtr extn25, IntPtr extn26, IntPtr extn27, IntPtr extn28, IntPtr extn29, IntPtr extn30, IntPtr extn31, IntPtr extn32, IntPtr extn33, IntPtr extn34, IntPtr extn35, IntPtr extn36, IntPtr extn37, IntPtr extn38, IntPtr extn39, IntPtr extn40, IntPtr term); 130 efl_class_new(IntPtr class_description, IntPtr base0, IntPtr base1, IntPtr base2, IntPtr base3, IntPtr base4, IntPtr base5, IntPtr base6, IntPtr base7, IntPtr base8, IntPtr base9, IntPtr base10, IntPtr base11, IntPtr base12, IntPtr base13, IntPtr base14, IntPtr base15, IntPtr base16, IntPtr base17, IntPtr base18, IntPtr base19, IntPtr base20, IntPtr base21, IntPtr base22, IntPtr base23, IntPtr base24, IntPtr base25, IntPtr base26, IntPtr base27, IntPtr base28, IntPtr base29, IntPtr base30, IntPtr base31, IntPtr base32, IntPtr base33, IntPtr base34, IntPtr base35, IntPtr base36, IntPtr base37, IntPtr base38, IntPtr base39, IntPtr base40);
110 [DllImport(efl.Libs.Eo)] public static extern IntPtr 131 [DllImport(efl.Libs.Eo)] public static extern IntPtr
111 efl_class_new(IntPtr class_description, IntPtr parent, IntPtr extn1, IntPtr extn2, IntPtr extn3, IntPtr extn4, IntPtr extn5, IntPtr extn6, IntPtr extn7, IntPtr extn8, IntPtr extn9, IntPtr extn10, IntPtr extn11, IntPtr extn12, IntPtr extn13, IntPtr extn14, IntPtr extn15, IntPtr extn16, IntPtr extn17, IntPtr extn18, IntPtr extn19, IntPtr extn20, IntPtr extn21, IntPtr extn22, IntPtr extn23, IntPtr extn24, IntPtr extn25, IntPtr extn26, IntPtr extn27, IntPtr extn28, IntPtr extn29, IntPtr extn30, IntPtr extn31, IntPtr extn32, IntPtr extn33, IntPtr extn34, IntPtr extn35, IntPtr extn36, IntPtr extn37, IntPtr extn38, IntPtr extn39, IntPtr extn40, IntPtr extn41, IntPtr term); 132 efl_class_new(IntPtr class_description, IntPtr base0, IntPtr base1, IntPtr base2, IntPtr base3, IntPtr base4, IntPtr base5, IntPtr base6, IntPtr base7, IntPtr base8, IntPtr base9, IntPtr base10, IntPtr base11, IntPtr base12, IntPtr base13, IntPtr base14, IntPtr base15, IntPtr base16, IntPtr base17, IntPtr base18, IntPtr base19, IntPtr base20, IntPtr base21, IntPtr base22, IntPtr base23, IntPtr base24, IntPtr base25, IntPtr base26, IntPtr base27, IntPtr base28, IntPtr base29, IntPtr base30, IntPtr base31, IntPtr base32, IntPtr base33, IntPtr base34, IntPtr base35, IntPtr base36, IntPtr base37, IntPtr base38, IntPtr base39, IntPtr base40, IntPtr base41);
112 [DllImport(efl.Libs.Eo)] public static extern IntPtr 133 [DllImport(efl.Libs.Eo)] public static extern IntPtr
113 efl_class_new(IntPtr class_description, IntPtr parent, IntPtr extn1, IntPtr extn2, IntPtr extn3, IntPtr extn4, IntPtr extn5, IntPtr extn6, IntPtr extn7, IntPtr extn8, IntPtr extn9, IntPtr extn10, IntPtr extn11, IntPtr extn12, IntPtr extn13, IntPtr extn14, IntPtr extn15, IntPtr extn16, IntPtr extn17, IntPtr extn18, IntPtr extn19, IntPtr extn20, IntPtr extn21, IntPtr extn22, IntPtr extn23, IntPtr extn24, IntPtr extn25, IntPtr extn26, IntPtr extn27, IntPtr extn28, IntPtr extn29, IntPtr extn30, IntPtr extn31, IntPtr extn32, IntPtr extn33, IntPtr extn34, IntPtr extn35, IntPtr extn36, IntPtr extn37, IntPtr extn38, IntPtr extn39, IntPtr extn40, IntPtr extn41, IntPtr extn42, IntPtr term); 134 efl_class_new(IntPtr class_description, IntPtr base0, IntPtr base1, IntPtr base2, IntPtr base3, IntPtr base4, IntPtr base5, IntPtr base6, IntPtr base7, IntPtr base8, IntPtr base9, IntPtr base10, IntPtr base11, IntPtr base12, IntPtr base13, IntPtr base14, IntPtr base15, IntPtr base16, IntPtr base17, IntPtr base18, IntPtr base19, IntPtr base20, IntPtr base21, IntPtr base22, IntPtr base23, IntPtr base24, IntPtr base25, IntPtr base26, IntPtr base27, IntPtr base28, IntPtr base29, IntPtr base30, IntPtr base31, IntPtr base32, IntPtr base33, IntPtr base34, IntPtr base35, IntPtr base36, IntPtr base37, IntPtr base38, IntPtr base39, IntPtr base40, IntPtr base41, IntPtr base42);
114 [DllImport(efl.Libs.Eo)] public static extern IntPtr 135 [DllImport(efl.Libs.Eo)] public static extern IntPtr
115 efl_class_new(IntPtr class_description, IntPtr parent, IntPtr extn1, IntPtr extn2, IntPtr extn3, IntPtr extn4, IntPtr extn5, IntPtr extn6, IntPtr extn7, IntPtr extn8, IntPtr extn9, IntPtr extn10, IntPtr extn11, IntPtr extn12, IntPtr extn13, IntPtr extn14, IntPtr extn15, IntPtr extn16, IntPtr extn17, IntPtr extn18, IntPtr extn19, IntPtr extn20, IntPtr extn21, IntPtr extn22, IntPtr extn23, IntPtr extn24, IntPtr extn25, IntPtr extn26, IntPtr extn27, IntPtr extn28, IntPtr extn29, IntPtr extn30, IntPtr extn31, IntPtr extn32, IntPtr extn33, IntPtr extn34, IntPtr extn35, IntPtr extn36, IntPtr extn37, IntPtr extn38, IntPtr extn39, IntPtr extn40, IntPtr extn41, IntPtr extn42, IntPtr extn43, IntPtr term); 136 efl_class_new(IntPtr class_description, IntPtr base0, IntPtr base1, IntPtr base2, IntPtr base3, IntPtr base4, IntPtr base5, IntPtr base6, IntPtr base7, IntPtr base8, IntPtr base9, IntPtr base10, IntPtr base11, IntPtr base12, IntPtr base13, IntPtr base14, IntPtr base15, IntPtr base16, IntPtr base17, IntPtr base18, IntPtr base19, IntPtr base20, IntPtr base21, IntPtr base22, IntPtr base23, IntPtr base24, IntPtr base25, IntPtr base26, IntPtr base27, IntPtr base28, IntPtr base29, IntPtr base30, IntPtr base31, IntPtr base32, IntPtr base33, IntPtr base34, IntPtr base35, IntPtr base36, IntPtr base37, IntPtr base38, IntPtr base39, IntPtr base40, IntPtr base41, IntPtr base42, IntPtr base43);
116 [DllImport(efl.Libs.Eo)] public static extern IntPtr 137 [DllImport(efl.Libs.Eo)] public static extern IntPtr
117 efl_class_new(IntPtr class_description, IntPtr parent, IntPtr extn1, IntPtr extn2, IntPtr extn3, IntPtr extn4, IntPtr extn5, IntPtr extn6, IntPtr extn7, IntPtr extn8, IntPtr extn9, IntPtr extn10, IntPtr extn11, IntPtr extn12, IntPtr extn13, IntPtr extn14, IntPtr extn15, IntPtr extn16, IntPtr extn17, IntPtr extn18, IntPtr extn19, IntPtr extn20, IntPtr extn21, IntPtr extn22, IntPtr extn23, IntPtr extn24, IntPtr extn25, IntPtr extn26, IntPtr extn27, IntPtr extn28, IntPtr extn29, IntPtr extn30, IntPtr extn31, IntPtr extn32, IntPtr extn33, IntPtr extn34, IntPtr extn35, IntPtr extn36, IntPtr extn37, IntPtr extn38, IntPtr extn39, IntPtr extn40, IntPtr extn41, IntPtr extn42, IntPtr extn43, IntPtr extn44, IntPtr term); 138 efl_class_new(IntPtr class_description, IntPtr base0, IntPtr base1, IntPtr base2, IntPtr base3, IntPtr base4, IntPtr base5, IntPtr base6, IntPtr base7, IntPtr base8, IntPtr base9, IntPtr base10, IntPtr base11, IntPtr base12, IntPtr base13, IntPtr base14, IntPtr base15, IntPtr base16, IntPtr base17, IntPtr base18, IntPtr base19, IntPtr base20, IntPtr base21, IntPtr base22, IntPtr base23, IntPtr base24, IntPtr base25, IntPtr base26, IntPtr base27, IntPtr base28, IntPtr base29, IntPtr base30, IntPtr base31, IntPtr base32, IntPtr base33, IntPtr base34, IntPtr base35, IntPtr base36, IntPtr base37, IntPtr base38, IntPtr base39, IntPtr base40, IntPtr base41, IntPtr base42, IntPtr base43, IntPtr base44);
118 [DllImport(efl.Libs.Eo)] public static extern IntPtr 139 [DllImport(efl.Libs.Eo)] public static extern IntPtr
119 efl_class_new(IntPtr class_description, IntPtr parent, IntPtr extn1, IntPtr extn2, IntPtr extn3, IntPtr extn4, IntPtr extn5, IntPtr extn6, IntPtr extn7, IntPtr extn8, IntPtr extn9, IntPtr extn10, IntPtr extn11, IntPtr extn12, IntPtr extn13, IntPtr extn14, IntPtr extn15, IntPtr extn16, IntPtr extn17, IntPtr extn18, IntPtr extn19, IntPtr extn20, IntPtr extn21, IntPtr extn22, IntPtr extn23, IntPtr extn24, IntPtr extn25, IntPtr extn26, IntPtr extn27, IntPtr extn28, IntPtr extn29, IntPtr extn30, IntPtr extn31, IntPtr extn32, IntPtr extn33, IntPtr extn34, IntPtr extn35, IntPtr extn36, IntPtr extn37, IntPtr extn38, IntPtr extn39, IntPtr extn40, IntPtr extn41, IntPtr extn42, IntPtr extn43, IntPtr extn44, IntPtr extn45, IntPtr term); 140 efl_class_new(IntPtr class_description, IntPtr base0, IntPtr base1, IntPtr base2, IntPtr base3, IntPtr base4, IntPtr base5, IntPtr base6, IntPtr base7, IntPtr base8, IntPtr base9, IntPtr base10, IntPtr base11, IntPtr base12, IntPtr base13, IntPtr base14, IntPtr base15, IntPtr base16, IntPtr base17, IntPtr base18, IntPtr base19, IntPtr base20, IntPtr base21, IntPtr base22, IntPtr base23, IntPtr base24, IntPtr base25, IntPtr base26, IntPtr base27, IntPtr base28, IntPtr base29, IntPtr base30, IntPtr base31, IntPtr base32, IntPtr base33, IntPtr base34, IntPtr base35, IntPtr base36, IntPtr base37, IntPtr base38, IntPtr base39, IntPtr base40, IntPtr base41, IntPtr base42, IntPtr base43, IntPtr base44, IntPtr base45);
120 [DllImport(efl.Libs.Eo)] public static extern IntPtr 141 [DllImport(efl.Libs.Eo)] public static extern IntPtr
121 efl_class_new(IntPtr class_description, IntPtr parent, IntPtr extn1, IntPtr extn2, IntPtr extn3, IntPtr extn4, IntPtr extn5, IntPtr extn6, IntPtr extn7, IntPtr extn8, IntPtr extn9, IntPtr extn10, IntPtr extn11, IntPtr extn12, IntPtr extn13, IntPtr extn14, IntPtr extn15, IntPtr extn16, IntPtr extn17, IntPtr extn18, IntPtr extn19, IntPtr extn20, IntPtr extn21, IntPtr extn22, IntPtr extn23, IntPtr extn24, IntPtr extn25, IntPtr extn26, IntPtr extn27, IntPtr extn28, IntPtr extn29, IntPtr extn30, IntPtr extn31, IntPtr extn32, IntPtr extn33, IntPtr extn34, IntPtr extn35, IntPtr extn36, IntPtr extn37, IntPtr extn38, IntPtr extn39, IntPtr extn40, IntPtr extn41, IntPtr extn42, IntPtr extn43, IntPtr extn44, IntPtr extn45, IntPtr extn46, IntPtr term); 142 efl_class_new(IntPtr class_description, IntPtr base0, IntPtr base1, IntPtr base2, IntPtr base3, IntPtr base4, IntPtr base5, IntPtr base6, IntPtr base7, IntPtr base8, IntPtr base9, IntPtr base10, IntPtr base11, IntPtr base12, IntPtr base13, IntPtr base14, IntPtr base15, IntPtr base16, IntPtr base17, IntPtr base18, IntPtr base19, IntPtr base20, IntPtr base21, IntPtr base22, IntPtr base23, IntPtr base24, IntPtr base25, IntPtr base26, IntPtr base27, IntPtr base28, IntPtr base29, IntPtr base30, IntPtr base31, IntPtr base32, IntPtr base33, IntPtr base34, IntPtr base35, IntPtr base36, IntPtr base37, IntPtr base38, IntPtr base39, IntPtr base40, IntPtr base41, IntPtr base42, IntPtr base43, IntPtr base44, IntPtr base45, IntPtr base46);
122 [DllImport(efl.Libs.Eo)] public static extern IntPtr 143 [DllImport(efl.Libs.Eo)] public static extern IntPtr
123 efl_class_new(IntPtr class_description, IntPtr parent, IntPtr extn1, IntPtr extn2, IntPtr extn3, IntPtr extn4, IntPtr extn5, IntPtr extn6, IntPtr extn7, IntPtr extn8, IntPtr extn9, IntPtr extn10, IntPtr extn11, IntPtr extn12, IntPtr extn13, IntPtr extn14, IntPtr extn15, IntPtr extn16, IntPtr extn17, IntPtr extn18, IntPtr extn19, IntPtr extn20, IntPtr extn21, IntPtr extn22, IntPtr extn23, IntPtr extn24, IntPtr extn25, IntPtr extn26, IntPtr extn27, IntPtr extn28, IntPtr extn29, IntPtr extn30, IntPtr extn31, IntPtr extn32, IntPtr extn33, IntPtr extn34, IntPtr extn35, IntPtr extn36, IntPtr extn37, IntPtr extn38, IntPtr extn39, IntPtr extn40, IntPtr extn41, IntPtr extn42, IntPtr extn43, IntPtr extn44, IntPtr extn45, IntPtr extn46, IntPtr extn47, IntPtr term); 144 efl_class_new(IntPtr class_description, IntPtr base0, IntPtr base1, IntPtr base2, IntPtr base3, IntPtr base4, IntPtr base5, IntPtr base6, IntPtr base7, IntPtr base8, IntPtr base9, IntPtr base10, IntPtr base11, IntPtr base12, IntPtr base13, IntPtr base14, IntPtr base15, IntPtr base16, IntPtr base17, IntPtr base18, IntPtr base19, IntPtr base20, IntPtr base21, IntPtr base22, IntPtr base23, IntPtr base24, IntPtr base25, IntPtr base26, IntPtr base27, IntPtr base28, IntPtr base29, IntPtr base30, IntPtr base31, IntPtr base32, IntPtr base33, IntPtr base34, IntPtr base35, IntPtr base36, IntPtr base37, IntPtr base38, IntPtr base39, IntPtr base40, IntPtr base41, IntPtr base42, IntPtr base43, IntPtr base44, IntPtr base45, IntPtr base46, IntPtr base47);
124 [DllImport(efl.Libs.Eo)] public static extern IntPtr 145 [DllImport(efl.Libs.Eo)] public static extern IntPtr
125 efl_class_new(IntPtr class_description, IntPtr parent, IntPtr extn1, IntPtr extn2, IntPtr extn3, IntPtr extn4, IntPtr extn5, IntPtr extn6, IntPtr extn7, IntPtr extn8, IntPtr extn9, IntPtr extn10, IntPtr extn11, IntPtr extn12, IntPtr extn13, IntPtr extn14, IntPtr extn15, IntPtr extn16, IntPtr extn17, IntPtr extn18, IntPtr extn19, IntPtr extn20, IntPtr extn21, IntPtr extn22, IntPtr extn23, IntPtr extn24, IntPtr extn25, IntPtr extn26, IntPtr extn27, IntPtr extn28, IntPtr extn29, IntPtr extn30, IntPtr extn31, IntPtr extn32, IntPtr extn33, IntPtr extn34, IntPtr extn35, IntPtr extn36, IntPtr extn37, IntPtr extn38, IntPtr extn39, IntPtr extn40, IntPtr extn41, IntPtr extn42, IntPtr extn43, IntPtr extn44, IntPtr extn45, IntPtr extn46, IntPtr extn47, IntPtr extn48, IntPtr term); 146 efl_class_new(IntPtr class_description, IntPtr base0, IntPtr base1, IntPtr base2, IntPtr base3, IntPtr base4, IntPtr base5, IntPtr base6, IntPtr base7, IntPtr base8, IntPtr base9, IntPtr base10, IntPtr base11, IntPtr base12, IntPtr base13, IntPtr base14, IntPtr base15, IntPtr base16, IntPtr base17, IntPtr base18, IntPtr base19, IntPtr base20, IntPtr base21, IntPtr base22, IntPtr base23, IntPtr base24, IntPtr base25, IntPtr base26, IntPtr base27, IntPtr base28, IntPtr base29, IntPtr base30, IntPtr base31, IntPtr base32, IntPtr base33, IntPtr base34, IntPtr base35, IntPtr base36, IntPtr base37, IntPtr base38, IntPtr base39, IntPtr base40, IntPtr base41, IntPtr base42, IntPtr base43, IntPtr base44, IntPtr base45, IntPtr base46, IntPtr base47, IntPtr base48);
126 [DllImport(efl.Libs.Eo)] public static extern byte efl_class_functions_set(IntPtr klass_id, IntPtr object_ops, IntPtr class_ops, IntPtr reflection_ops); 147 [DllImport(efl.Libs.Eo)] public static extern IntPtr
148 efl_class_new(IntPtr class_description, IntPtr base0, IntPtr base1, IntPtr base2, IntPtr base3, IntPtr base4, IntPtr base5, IntPtr base6, IntPtr base7, IntPtr base8, IntPtr base9, IntPtr base10, IntPtr base11, IntPtr base12, IntPtr base13, IntPtr base14, IntPtr base15, IntPtr base16, IntPtr base17, IntPtr base18, IntPtr base19, IntPtr base20, IntPtr base21, IntPtr base22, IntPtr base23, IntPtr base24, IntPtr base25, IntPtr base26, IntPtr base27, IntPtr base28, IntPtr base29, IntPtr base30, IntPtr base31, IntPtr base32, IntPtr base33, IntPtr base34, IntPtr base35, IntPtr base36, IntPtr base37, IntPtr base38, IntPtr base39, IntPtr base40, IntPtr base41, IntPtr base42, IntPtr base43, IntPtr base44, IntPtr base45, IntPtr base46, IntPtr base47, IntPtr base48, IntPtr base49);
149
150
151 public delegate byte efl_class_functions_set_delegate(IntPtr klass_id, IntPtr object_ops, IntPtr class_ops);
152 [DllImport(efl.Libs.Eo)] public static extern byte efl_class_functions_set(IntPtr klass_id, IntPtr object_ops, IntPtr class_ops);
153 public delegate IntPtr efl_data_scope_get_delegate(IntPtr obj, IntPtr klass);
127 [DllImport(efl.Libs.Eo)] public static extern IntPtr efl_data_scope_get(IntPtr obj, IntPtr klass); 154 [DllImport(efl.Libs.Eo)] public static extern IntPtr efl_data_scope_get(IntPtr obj, IntPtr klass);
155 public delegate IntPtr efl_super_delegate(IntPtr obj, IntPtr klass);
128 [DllImport(efl.Libs.Eo)] public static extern IntPtr efl_super(IntPtr obj, IntPtr klass); 156 [DllImport(efl.Libs.Eo)] public static extern IntPtr efl_super(IntPtr obj, IntPtr klass);
157 public delegate IntPtr efl_class_get_delegate(IntPtr obj);
129 [DllImport(efl.Libs.Eo)] public static extern IntPtr efl_class_get(IntPtr obj); 158 [DllImport(efl.Libs.Eo)] public static extern IntPtr efl_class_get(IntPtr obj);
130#if WIN32 159 public delegate IntPtr dlerror_delegate();
131 public static IntPtr RTLD_DEFAULT = new IntPtr(1);
132#else
133 public static IntPtr RTLD_DEFAULT = new IntPtr(0);
134#endif
135 [DllImport(efl.Libs.Evil)] public static extern IntPtr dlerror(); 160 [DllImport(efl.Libs.Evil)] public static extern IntPtr dlerror();
136 [DllImport(efl.Libs.Evil)] public static extern IntPtr dlsym
137 (IntPtr handle, [MarshalAs(UnmanagedType.LPStr)] String name);
138 161
139 [DllImport(efl.Libs.Eo)] public static extern bool efl_event_callback_priority_add( 162 public delegate bool efl_event_callback_priority_add_delegate(
140 System.IntPtr obj, 163 System.IntPtr obj,
141 IntPtr desc, 164 IntPtr desc,
142 short priority, 165 short priority,
143 Efl.EventCb cb, 166 Efl.EventCb cb,
144 System.IntPtr data); 167 System.IntPtr data);
145 [DllImport(efl.Libs.Eo)] public static extern bool efl_event_callback_del( 168 [DllImport(efl.Libs.Eo)] public static extern bool efl_event_callback_priority_add(
146 System.IntPtr obj, 169 System.IntPtr obj,
147 IntPtr desc, 170 IntPtr desc,
171 short priority,
148 Efl.EventCb cb, 172 Efl.EventCb cb,
149 System.IntPtr data); 173 System.IntPtr data);
174 public delegate bool efl_event_callback_del_delegate(
175 System.IntPtr obj,
176 IntPtr desc,
177 Efl.EventCb cb,
178 System.IntPtr data);
179 [DllImport(efl.Libs.Eo)] public static extern bool efl_event_callback_del(
180 System.IntPtr obj,
181 IntPtr desc,
182 Efl.EventCb cb,
183 System.IntPtr data);
184 public delegate IntPtr
185 efl_object_legacy_only_event_description_get_delegate([MarshalAs(UnmanagedType.LPStr)] String name);
150 [DllImport(efl.Libs.Eo)] public static extern IntPtr 186 [DllImport(efl.Libs.Eo)] public static extern IntPtr
151 efl_object_legacy_only_event_description_get([MarshalAs(UnmanagedType.LPStr)] String name); 187 efl_object_legacy_only_event_description_get([MarshalAs(UnmanagedType.LPStr)] String name);
152 188
@@ -241,7 +277,7 @@ public class Globals {
241 } 277 }
242 public static byte class_initializer_call(IntPtr klass, System.Type type) 278 public static byte class_initializer_call(IntPtr klass, System.Type type)
243 { 279 {
244 Eina.Log.Debug($"called with 0x{klass.ToInt64()} {type}"); 280 Eina.Log.Debug($"called with 0x{klass.ToInt64():x} {type}");
245 Efl.Eo.NativeClass nativeClass = get_native_class(type.BaseType); 281 Efl.Eo.NativeClass nativeClass = get_native_class(type.BaseType);
246 282
247 if (nativeClass != null) 283 if (nativeClass != null)
@@ -260,7 +296,7 @@ public class Globals {
260 if(nc != null) 296 if(nc != null)
261 { 297 {
262 var moredescs = nc.GetEoOps(type); 298 var moredescs = nc.GetEoOps(type);
263 Eina.Log.Debug("adding {moredescs.Count} more descs to registration"); 299 Eina.Log.Debug($"adding {moredescs.Count} more descs to registration");
264 descs.AddRange(moredescs); 300 descs.AddRange(moredescs);
265 count = descs.Count; 301 count = descs.Count;
266 } 302 }
@@ -279,7 +315,7 @@ public class Globals {
279 ops.count = (UIntPtr)count; 315 ops.count = (UIntPtr)count;
280 IntPtr ops_ptr = Marshal.AllocHGlobal(Marshal.SizeOf(ops)); 316 IntPtr ops_ptr = Marshal.AllocHGlobal(Marshal.SizeOf(ops));
281 Marshal.StructureToPtr(ops, ops_ptr, false); 317 Marshal.StructureToPtr(ops, ops_ptr, false);
282 Efl.Eo.Globals.efl_class_functions_set(klass, ops_ptr, IntPtr.Zero, IntPtr.Zero); 318 Efl.Eo.Globals.efl_class_functions_set(klass, ops_ptr, IntPtr.Zero);
283 //EoKlass = klass; 319 //EoKlass = klass;
284 } 320 }
285 else 321 else
@@ -392,38 +428,6 @@ public class Globals {
392 return null; 428 return null;
393 } 429 }
394 430
395 public static IntPtr cached_string_to_intptr(Dictionary<String, IntPtr> dict, String str)
396 {
397 IntPtr ptr = IntPtr.Zero;
398
399 if (str == null)
400 return ptr;
401
402 if (!dict.TryGetValue(str, out ptr))
403 {
404 ptr = Eina.StringConversion.ManagedStringToNativeUtf8Alloc(str);
405 dict[str] = ptr;
406 }
407
408 return ptr;
409 }
410
411 public static IntPtr cached_stringshare_to_intptr(Dictionary<String, IntPtr> dict, String str)
412 {
413 IntPtr ptr = IntPtr.Zero;
414
415 if (str == null)
416 return ptr;
417
418 if (!dict.TryGetValue(str, out ptr))
419 {
420 ptr = Eina.Stringshare.eina_stringshare_add(str);
421 dict[str] = ptr;
422 }
423
424 return ptr;
425 }
426
427 public static void free_dict_values(Dictionary<String, IntPtr> dict) 431 public static void free_dict_values(Dictionary<String, IntPtr> dict)
428 { 432 {
429 foreach(IntPtr ptr in dict.Values) 433 foreach(IntPtr ptr in dict.Values)
diff --git a/src/bindings/mono/eo_mono/workaround.cs b/src/bindings/mono/eo_mono/workaround.cs
index 99fb53b7e4..4d576771f8 100644
--- a/src/bindings/mono/eo_mono/workaround.cs
+++ b/src/bindings/mono/eo_mono/workaround.cs
@@ -80,19 +80,19 @@ public struct EventDescription {
80 80
81 private static Dictionary<string, IntPtr> descriptions = new Dictionary<string, IntPtr>(); 81 private static Dictionary<string, IntPtr> descriptions = new Dictionary<string, IntPtr>();
82 82
83 public EventDescription(string name) 83 public EventDescription(string module, string name)
84 { 84 {
85 this.Name = GetNative(name); 85 this.Name = GetNative(module, name);
86 this.Unfreezable = false; 86 this.Unfreezable = false;
87 this.Legacy_is = false; 87 this.Legacy_is = false;
88 this.Restart = false; 88 this.Restart = false;
89 } 89 }
90 90
91 public static IntPtr GetNative(string name) 91 public static IntPtr GetNative(string module, string name)
92 { 92 {
93 if (!descriptions.ContainsKey(name)) 93 if (!descriptions.ContainsKey(name))
94 { 94 {
95 IntPtr data = Efl.Eo.Globals.dlsym(Efl.Eo.Globals.RTLD_DEFAULT, name); 95 IntPtr data = Efl.Eo.FunctionInterop.LoadFunctionPointer(module, name);
96 96
97 if (data == IntPtr.Zero) { 97 if (data == IntPtr.Zero) {
98 string error = Eina.StringConversion.NativeUtf8ToManagedString(Efl.Eo.Globals.dlerror()); 98 string error = Eina.StringConversion.NativeUtf8ToManagedString(Efl.Eo.Globals.dlerror());
diff --git a/src/lib/eolian_cxx/grammar/klass_def.hpp b/src/lib/eolian_cxx/grammar/klass_def.hpp
index 5fb0dbb8f3..4bb4b92563 100644
--- a/src/lib/eolian_cxx/grammar/klass_def.hpp
+++ b/src/lib/eolian_cxx/grammar/klass_def.hpp
@@ -16,6 +16,8 @@
16#include <vector> 16#include <vector>
17#include <memory> 17#include <memory>
18#include <set> 18#include <set>
19#include <iosfwd>
20#include <string>
19 21
20namespace efl { namespace eolian { namespace grammar { 22namespace efl { namespace eolian { namespace grammar {
21 23
@@ -73,6 +75,26 @@ enum class typedecl_type
73 function_ptr, 75 function_ptr,
74}; 76};
75 77
78inline std::ostream& operator<<(std::ostream& s, typedecl_type dec)
79{
80 switch(dec)
81 {
82 case typedecl_type::unknown:
83 return s << "unknown";
84 case typedecl_type::struct_:
85 return s << "struct_";
86 case typedecl_type::struct_opaque:
87 return s << "struct_opaque";
88 case typedecl_type::enum_:
89 return s << "enum_";
90 case typedecl_type::alias:
91 return s << "alias";
92 case typedecl_type::function_ptr:
93 return s << "function_ptr";
94 };
95 return s;
96}
97
76inline typedecl_type typedecl_type_get(Eolian_Typedecl const* decl) 98inline typedecl_type typedecl_type_get(Eolian_Typedecl const* decl)
77{ 99{
78 if (!decl) 100 if (!decl)
@@ -100,6 +122,22 @@ enum class class_type
100 regular, abstract_, mixin, interface_ 122 regular, abstract_, mixin, interface_
101}; 123};
102 124
125inline std::ostream& operator<<(std::ostream& s, class_type t)
126{
127 switch(t)
128 {
129 case class_type::regular:
130 return s << "regular";
131 case class_type::abstract_:
132 return s << "abstract_";
133 case class_type::mixin:
134 return s << "mixin";
135 case class_type::interface_:
136 return s << "interface_";
137 };
138 return s;
139}
140
103struct klass_name 141struct klass_name
104{ 142{
105 std::vector<std::string> namespaces; 143 std::vector<std::string> namespaces;
@@ -108,6 +146,14 @@ struct klass_name
108 class_type type; 146 class_type type;
109 std::string klass_get_name; 147 std::string klass_get_name;
110 148
149 friend inline std::ostream& operator<<(std::ostream& s, klass_name const& name)
150 {
151 s << "[ namespaces: {";
152 std::copy(name.namespaces.begin(), name.namespaces.end(), std::ostream_iterator<std::string>(s, ","));
153 return s << "}, eolian_name: " << name.eolian_name << " base_qualifier: " << name.base_qualifier
154 << " type: " << name.type << " klass_get_name: " << name.klass_get_name << "]";
155 }
156
111 klass_name() { 157 klass_name() {
112 } 158 }
113 159
@@ -264,6 +310,14 @@ struct regular_type_def
264 bool is_alias() const { return is_type(typedecl_type::alias); } 310 bool is_alias() const { return is_type(typedecl_type::alias); }
265 bool is_function_ptr() const { return is_type(typedecl_type::function_ptr); } 311 bool is_function_ptr() const { return is_type(typedecl_type::function_ptr); }
266 312
313 friend inline std::ostream& operator<<(std::ostream& s, regular_type_def const& def)
314 {
315 s << "[ base_type: " << def.base_type << " base_qualifier: " << def.base_qualifier
316 << " namespaces: ";
317 std::copy(def.namespaces.begin(), def.namespaces.end(), std::ostream_iterator<std::string>(s, ", "));
318 return s << " type_type: " << def.type_type << " is_undefined " << def.is_undefined << "]";
319 }
320
267 std::string base_type; 321 std::string base_type;
268 qualifier_def base_qualifier; 322 qualifier_def base_qualifier;
269 std::vector<std::string> namespaces; 323 std::vector<std::string> namespaces;
@@ -284,6 +338,13 @@ struct complex_type_def
284{ 338{
285 regular_type_def outer; 339 regular_type_def outer;
286 std::vector<type_def> subtypes; 340 std::vector<type_def> subtypes;
341
342 friend inline std::ostream& operator<<(std::ostream& s, complex_type_def const& def)
343 {
344 s << "[ outer " << def.outer << " subtypes: {";
345 std::copy(def.subtypes.begin(), def.subtypes.end(), std::ostream_iterator<type_def>(s, ", "));
346 return s << "}]";
347 }
287}; 348};
288 349
289inline bool operator==(complex_type_def const& lhs, complex_type_def const& rhs) 350inline bool operator==(complex_type_def const& lhs, complex_type_def const& rhs)
@@ -318,6 +379,12 @@ struct type_def
318 { 379 {
319 return lhs.c_type < rhs.c_type; 380 return lhs.c_type < rhs.c_type;
320 } 381 }
382 friend inline std::ostream& operator<<(std::ostream& s, type_def const& rhs)
383 {
384 return s << "[ original: " << rhs.original_type << " c_type "
385 << rhs.c_type << " has_own " << rhs.has_own << " is_ptr "
386 << rhs.is_ptr << "]";
387 }
321}; 388};
322 389
323struct get_qualifier_visitor 390struct get_qualifier_visitor