summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2016-11-02 23:02:10 -0200
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2016-11-02 23:02:10 -0200
commit0c1e941bf7c766d9151640bfa58a05f3b7ea8af5 (patch)
tree7378f535795aa8c7576724295bffa30efa079e88
parent7b4a0b56ba59f4d9b6b154691d3fbecefb958fa6 (diff)
mono: Add inheritance
-rw-r--r--src/bin/eolian_mono/eolian_mono.cc6
-rw-r--r--src/bin/eolian_mono/eolian_mono/enum_definition.hh2
-rw-r--r--src/bin/eolian_mono/eolian_mono/function_blacklist.hh52
-rw-r--r--src/bin/eolian_mono/eolian_mono/function_declaration.hh11
-rw-r--r--src/bin/eolian_mono/eolian_mono/function_definition.hh118
-rw-r--r--src/bin/eolian_mono/eolian_mono/function_registration.hh74
-rw-r--r--src/bin/eolian_mono/eolian_mono/klass.hh109
-rw-r--r--src/bin/eolian_mono/eolian_mono/marshall_type.hh4
-rw-r--r--src/bin/eolian_mono/eolian_mono/parameter.hh6
-rw-r--r--src/bin/eolian_mono/eolian_mono/type.hh2
-rw-r--r--src/bindings/mono/eo_mono/iwrapper.cs68
-rw-r--r--src/lib/eo/eo.c3
-rw-r--r--src/lib/eolian_cxx/grammar/address_of.hpp2
-rw-r--r--src/lib/eolian_cxx/grammar/alternative.hpp2
-rw-r--r--src/lib/eolian_cxx/grammar/attribute_conditional.hpp15
-rw-r--r--src/lib/eolian_cxx/grammar/attribute_reorder.hpp2
-rw-r--r--src/lib/eolian_cxx/grammar/attribute_replace.hpp9
-rw-r--r--src/lib/eolian_cxx/grammar/base_class_definition.hpp2
-rw-r--r--src/lib/eolian_cxx/grammar/c_type.hpp2
-rw-r--r--src/lib/eolian_cxx/grammar/case.hpp4
-rw-r--r--src/lib/eolian_cxx/grammar/class_declaration.hpp2
-rw-r--r--src/lib/eolian_cxx/grammar/class_definition.hpp2
-rw-r--r--src/lib/eolian_cxx/grammar/class_implementation.hpp2
-rw-r--r--src/lib/eolian_cxx/grammar/converting_argument.hpp2
-rw-r--r--src/lib/eolian_cxx/grammar/eps.hpp2
-rw-r--r--src/lib/eolian_cxx/grammar/function_declaration.hpp2
-rw-r--r--src/lib/eolian_cxx/grammar/function_definition.hpp2
-rw-r--r--src/lib/eolian_cxx/grammar/generator.hpp4
-rw-r--r--src/lib/eolian_cxx/grammar/header_guards.hpp2
-rw-r--r--src/lib/eolian_cxx/grammar/header_include_directive.hpp2
-rw-r--r--src/lib/eolian_cxx/grammar/implementation_include_directive.hpp2
-rw-r--r--src/lib/eolian_cxx/grammar/indentation.hpp2
-rw-r--r--src/lib/eolian_cxx/grammar/integral.hpp88
-rw-r--r--src/lib/eolian_cxx/grammar/klass_def.hpp1
-rw-r--r--src/lib/eolian_cxx/grammar/kleene.hpp2
-rw-r--r--src/lib/eolian_cxx/grammar/list.hpp2
-rw-r--r--src/lib/eolian_cxx/grammar/namespace.hpp2
-rw-r--r--src/lib/eolian_cxx/grammar/parameter.hpp4
-rw-r--r--src/lib/eolian_cxx/grammar/sequence.hpp2
-rw-r--r--src/lib/eolian_cxx/grammar/string.hpp38
-rw-r--r--src/lib/eolian_cxx/grammar/type.hpp2
-rw-r--r--src/tests/eo_mono/Main.cs470
42 files changed, 622 insertions, 508 deletions
diff --git a/src/bin/eolian_mono/eolian_mono.cc b/src/bin/eolian_mono/eolian_mono.cc
index f63b2249a7..9cccf31132 100644
--- a/src/bin/eolian_mono/eolian_mono.cc
+++ b/src/bin/eolian_mono/eolian_mono.cc
@@ -89,12 +89,16 @@ run(options_type const& opts)
89 } 89 }
90 }()}; 90 }()};
91 91
92 as_generator("using System;\nusing System.Runtime.InteropServices;\n")
93 .generate(iterator, efl::eolian::grammar::attributes::unused, efl::eolian::grammar::context_null());
94
92 if (klass) 95 if (klass)
93 { 96 {
94 efl::eolian::grammar::attributes::klass_def klass_def(klass); 97 efl::eolian::grammar::attributes::klass_def klass_def(klass);
95 std::vector<efl::eolian::grammar::attributes::klass_def> klasses{klass_def}; 98 std::vector<efl::eolian::grammar::attributes::klass_def> klasses{klass_def};
96 99
97 eolian_mono::klass.generate(iterator, klass_def, efl::eolian::grammar::context_cons<eolian_mono::library_context>({opts.dllimport})); 100 eolian_mono::klass
101 .generate(iterator, klass_def, efl::eolian::grammar::context_cons<eolian_mono::library_context>({opts.dllimport}));
98 } 102 }
99 //else 103 //else
100 { 104 {
diff --git a/src/bin/eolian_mono/eolian_mono/enum_definition.hh b/src/bin/eolian_mono/eolian_mono/enum_definition.hh
index efc8a0ff05..3f3f7fed25 100644
--- a/src/bin/eolian_mono/eolian_mono/enum_definition.hh
+++ b/src/bin/eolian_mono/eolian_mono/enum_definition.hh
@@ -60,6 +60,8 @@ namespace efl { namespace eolian { namespace grammar {
60 60
61template <> 61template <>
62struct is_eager_generator< ::eolian_mono::enum_definition_generator> : std::true_type {}; 62struct is_eager_generator< ::eolian_mono::enum_definition_generator> : std::true_type {};
63template <>
64struct is_generator< ::eolian_mono::enum_definition_generator> : std::true_type {};
63 65
64namespace type_traits { 66namespace type_traits {
65template <> 67template <>
diff --git a/src/bin/eolian_mono/eolian_mono/function_blacklist.hh b/src/bin/eolian_mono/eolian_mono/function_blacklist.hh
new file mode 100644
index 0000000000..01ff16ea19
--- /dev/null
+++ b/src/bin/eolian_mono/eolian_mono/function_blacklist.hh
@@ -0,0 +1,52 @@
1#ifndef EOLIAN_MONO_FUNCTION_BLACKLIST_HH
2#define EOLIAN_MONO_FUNCTION_BLACKLIST_HH
3
4namespace eolian_mono {
5
6inline bool is_function_blacklisted(std::string const& c_name)
7{
8 return c_name == "efl_constructor"
9 || c_name == "efl_parent_set"
10 || c_name == "efl_parent_get"
11 || c_name == "efl_canvas_object_type_set"
12 || c_name == "efl_provider_find"
13 || c_name == "efl_canvas_group_add"
14 || c_name == "efl_canvas_group_member_add"
15 || c_name == "efl_event_callback_array_priority_add"
16 || c_name == "efl_event_callback_call"
17 || c_name == "efl_finalized_get"
18 || c_name == "efl_finalize"
19 || c_name == "efl_gfx_position_get"
20 || c_name == "efl_gfx_geometry_get"
21 || c_name == "efl_gfx_size_get"
22 || c_name == "efl_event_callback_legacy_call"
23 || c_name == "efl_gfx_visible_get"
24 || c_name == "efl_canvas_group_change"
25 || c_name == "efl_canvas_group_need_recalculate_set"
26 || c_name == "efl_gfx_size_hint_restricted_min_set"
27 || c_name == "efl_gfx_size_hint_max_get"
28 || c_name == "efl_gfx_size_hint_request_get"
29 || c_name == "efl_gfx_size_hint_combined_min_get"
30 || c_name == "efl_event_callback_priority_add"
31 // || c_name == "efl_canvas_group_calculate"
32
33 /*
34 // descs[50].api_func = efl.eo.Globals.dlsym(IntPtr.Zero, "efl_event_callback_priority_add");
35 // descs[50].func = Marshal.GetFunctionPointerForDelegate(BoxNativeInherit.event_callback_priority_add_static_delegate);
36 // descs[51].api_func = efl.eo.Globals.dlsym(IntPtr.Zero, "efl_event_callback_del");
37 // descs[51].func = Marshal.GetFunctionPointerForDelegate(BoxNativeInherit.event_callback_del_static_delegate);
38 // descs[52].api_func = efl.eo.Globals.dlsym(IntPtr.Zero, "efl_event_callback_array_del");
39 // descs[52].func = Marshal.GetFunctionPointerForDelegate(BoxNativeInherit.event_callback_array_del_static_delegate);
40 // descs[53].api_func = efl.eo.Globals.dlsym(IntPtr.Zero, "efl_event_callback_stop");
41 // descs[53].func = Marshal.GetFunctionPointerForDelegate(BoxNativeInherit.event_callback_stop_static_delegate);
42 // descs[54].api_func = efl.eo.Globals.dlsym(IntPtr.Zero, "efl_event_callback_forwarder_add");
43 // descs[54].func = Marshal.GetFunctionPointerForDelegate(BoxNativeInherit.event_callback_forwarder_add_static_delegate);
44 // descs[55].api_func = efl.eo.Globals.dlsym(IntPtr.Zero, "efl_event_callback_forwarder_del");
45 // descs[55].func = Marshal.GetFunctionPointerForDelegate(BoxNativeInherit.event_callback_forwarder_del_static_delegate);
46 */
47 ;
48}
49
50}
51
52#endif
diff --git a/src/bin/eolian_mono/eolian_mono/function_declaration.hh b/src/bin/eolian_mono/eolian_mono/function_declaration.hh
index 848e648569..85d72bdf0a 100644
--- a/src/bin/eolian_mono/eolian_mono/function_declaration.hh
+++ b/src/bin/eolian_mono/eolian_mono/function_declaration.hh
@@ -19,9 +19,12 @@ struct function_declaration_generator
19 template <typename OutputIterator, typename Context> 19 template <typename OutputIterator, typename Context>
20 bool generate(OutputIterator sink, attributes::function_def const& f, Context const& context) const 20 bool generate(OutputIterator sink, attributes::function_def const& f, Context const& context) const
21 { 21 {
22 return as_generator 22 if(is_function_blacklisted(f.c_name))
23 (eolian_mono::type(true) << " " << string << "(" << (parameter % ", ") << ");\n") 23 return true;
24 .generate(sink, std::make_tuple(f.return_type, escape_keyword(f.name), f.parameters), context); 24 else
25 return as_generator
26 (eolian_mono::type(true) << " " << string << "(" << (parameter % ", ") << ");\n")
27 .generate(sink, std::make_tuple(f.return_type, escape_keyword(f.name), f.parameters), context);
25 } 28 }
26}; 29};
27 30
@@ -33,6 +36,8 @@ namespace efl { namespace eolian { namespace grammar {
33 36
34template <> 37template <>
35struct is_eager_generator< ::eolian_mono::function_declaration_generator> : std::true_type {}; 38struct is_eager_generator< ::eolian_mono::function_declaration_generator> : std::true_type {};
39template <>
40struct is_generator< ::eolian_mono::function_declaration_generator> : std::true_type {};
36 41
37namespace type_traits { 42namespace type_traits {
38template <> 43template <>
diff --git a/src/bin/eolian_mono/eolian_mono/function_definition.hh b/src/bin/eolian_mono/eolian_mono/function_definition.hh
index 761a3b2242..d0776ecfb6 100644
--- a/src/bin/eolian_mono/eolian_mono/function_definition.hh
+++ b/src/bin/eolian_mono/eolian_mono/function_definition.hh
@@ -19,17 +19,93 @@
19 19
20namespace eolian_mono { 20namespace eolian_mono {
21 21
22struct native_function_definition_generator
23{
24 attributes::klass_def const* klass;
25
26 template <typename OutputIterator, typename Context>
27 bool generate(OutputIterator sink, attributes::function_def const& f, Context const& context) const
28 {
29 if(is_function_blacklisted(f.c_name))
30 return true;
31 else
32 {
33 if(!as_generator
34 (scope_tab << "public delegate "
35 << eolian_mono::marshall_annotation(true) << " " << eolian_mono::marshall_type(true) << " "
36 << string
37 << "_delegate(System.IntPtr obj, System.IntPtr pd"
38 << *grammar::attribute_reorder<1, -1>
39 (
40 (", " << marshall_annotation << " " << marshall_parameter)
41 )
42 << ");\n")
43 .generate(sink, std::make_tuple(f.return_type, f.return_type, escape_keyword(f.name), f.parameters), context))
44 return false;
45
46 std::string return_type;
47 if(!as_generator(eolian_mono::type(true)).generate(std::back_inserter(return_type), f.return_type, context))
48 return false;
49
50 if(!as_generator
51 (scope_tab << "public static "
52 << eolian_mono::marshall_annotation(true) << " " << eolian_mono::marshall_type(true) << " "
53 << string
54 << "(System.IntPtr obj, System.IntPtr pd"
55 << *grammar::attribute_reorder<1, -1>
56 (
57 (", " << marshall_annotation << " " << marshall_parameter)
58 )
59 << ")\n"
60 << scope_tab << "{\n"
61 /****/
62 << scope_tab << scope_tab << "System.Console.WriteLine(\"function " << string << " was called\");\n"
63 /****/
64 << scope_tab << scope_tab << "efl.eo.IWrapper wrapper = efl.eo.Globals.data_get(pd);\n"
65 << scope_tab << scope_tab << "if(wrapper != null)\n"
66 << scope_tab << scope_tab << scope_tab << (return_type != "void" ? "return " : "") << "((" << string << "Inherit)wrapper)." << string
67 << "(" << (argument % ", ") << ");\n"
68 << scope_tab << scope_tab << "else\n"
69 << scope_tab << scope_tab << scope_tab << (return_type != "void" ? "return " : "") << string << "Inherit." << string
70 << "(efl.eo.Globals.efl_super(obj, " << string << "Inherit.klass)" << *(", " << argument) << ");\n"
71 << scope_tab << "}\n"
72 )
73 .generate(sink, std::make_tuple(f.return_type, f.return_type, escape_keyword(f.name), f.parameters
74 , /***/f.c_name/***/
75 , klass->cxx_name, escape_keyword(f.name)
76 , f.parameters
77 , klass->cxx_name, f.c_name, klass->cxx_name, f.parameters), context))
78 return false;
79
80 if(!as_generator
81 (scope_tab << "public static "
82 << string
83 << "_delegate "
84 << string << "_static_delegate = new " << string << "_delegate(" << string << "NativeInherit." << string << ");\n"
85 )
86 .generate(sink, std::make_tuple(escape_keyword(f.name), escape_keyword(f.name), escape_keyword(f.name), escape_keyword(klass->cxx_name)
87 , escape_keyword(f.name)), context))
88 return false;
89 return true;
90 }
91 }
92};
93
22struct function_definition_generator 94struct function_definition_generator
23{ 95{
24 function_definition_generator(efl::eina::optional<attributes::klass_def> klass = nullptr) 96 function_definition_generator(bool do_super = false)
25 : klass(klass) 97 : do_super(do_super)
26 {} 98 {}
27 99
28 template <typename OutputIterator, typename Context> 100 template <typename OutputIterator, typename Context>
29 bool generate(OutputIterator sink, attributes::function_def const& f, Context const& context) const 101 bool generate(OutputIterator sink, attributes::function_def const& f, Context const& context) const
30 { 102 {
103 if(is_function_blacklisted(f.c_name))
104 return true;
105 else
106 {
31 if(!as_generator 107 if(!as_generator
32 (scope_tab << "[System.Runtime.InteropServices.DllImport(\"" << context_find_tag<library_context>(context).library_name << "\")] static extern " 108 (scope_tab << "[System.Runtime.InteropServices.DllImport(\"" << context_find_tag<library_context>(context).library_name << "\")] public static extern "
33 << eolian_mono::marshall_annotation(true) << " " << eolian_mono::marshall_type(true) << " " 109 << eolian_mono::marshall_annotation(true) << " " << eolian_mono::marshall_type(true) << " "
34 << string 110 << string
35 << "(System.IntPtr obj" 111 << "(System.IntPtr obj"
@@ -46,34 +122,42 @@ struct function_definition_generator
46 return false; 122 return false;
47 123
48 if(!as_generator 124 if(!as_generator
49 (scope_tab << "public " << return_type << " " << string << "(" << (parameter % ", ") 125 (scope_tab << (do_super ? "virtual " : "") << "public " << return_type << " " << string << "(" << (parameter % ", ")
50 << ") { " 126 << ") { "
51 << (return_type == "void" ? "":"return ") << string << "(" 127 << (return_type == "void" ? "":"return ") << string << "("
52 "" 128 << (do_super ? "efl.eo.Globals.efl_super(" : "")
53 "handle" 129 << "this.raw_handle"
54 "" 130 << (do_super ? ", this.raw_klass)" : "")
55 << *(", " << argument) << ");" 131 << *(", " << argument) << ");"
56 << " }\n") 132 << " }\n")
57 .generate(sink, std::make_tuple(escape_keyword(f.name), f.parameters, f.c_name, f.parameters), context)) 133 .generate(sink, std::make_tuple(escape_keyword(f.name), f.parameters, f.c_name, f.parameters), context))
58 return false; 134 return false;
59 135
60 return true; 136 return true;
137 }
61 } 138 }
62 139
63 efl::eina::optional<attributes::klass_def> klass; 140 bool do_super;
64}; 141};
65 142
66struct function_definition_parameterized 143struct function_definition_parameterized
67{ 144{
68 function_definition_generator operator()(attributes::klass_def const& klass) const 145 function_definition_generator operator()(bool do_super) const
69 { 146 {
70 return {klass}; 147 return {do_super};
71 } 148 }
72} const function_definition; 149} const function_definition;
73function_definition_generator as_generator(function_definition_parameterized) 150function_definition_generator as_generator(function_definition_parameterized)
74{ 151{
75 return {nullptr}; 152 return {};
76} 153}
154struct native_function_definition_parameterized
155{
156 native_function_definition_generator operator()(attributes::klass_def const& klass) const
157 {
158 return {&klass};
159 }
160} const native_function_definition;
77 161
78} 162}
79 163
@@ -82,11 +166,23 @@ namespace efl { namespace eolian { namespace grammar {
82template <> 166template <>
83struct is_eager_generator< ::eolian_mono::function_definition_generator> : std::true_type {}; 167struct is_eager_generator< ::eolian_mono::function_definition_generator> : std::true_type {};
84template <> 168template <>
169struct is_eager_generator< ::eolian_mono::native_function_definition_generator> : std::true_type {};
170template <>
171struct is_generator< ::eolian_mono::function_definition_generator> : std::true_type {};
172template <>
173struct is_generator< ::eolian_mono::native_function_definition_generator> : std::true_type {};
174template <>
85struct is_generator< ::eolian_mono::function_definition_parameterized> : std::true_type {}; 175struct is_generator< ::eolian_mono::function_definition_parameterized> : std::true_type {};
86 176
87namespace type_traits { 177namespace type_traits {
88template <> 178template <>
89struct attributes_needed< ::eolian_mono::function_definition_generator> : std::integral_constant<int, 1> {}; 179struct attributes_needed< ::eolian_mono::function_definition_generator> : std::integral_constant<int, 1> {};
180
181template <>
182struct attributes_needed< ::eolian_mono::function_definition_parameterized> : std::integral_constant<int, 1> {};
183
184template <>
185struct attributes_needed< ::eolian_mono::native_function_definition_generator> : std::integral_constant<int, 1> {};
90} 186}
91 187
92} } } 188} } }
diff --git a/src/bin/eolian_mono/eolian_mono/function_registration.hh b/src/bin/eolian_mono/eolian_mono/function_registration.hh
new file mode 100644
index 0000000000..6c03fe6263
--- /dev/null
+++ b/src/bin/eolian_mono/eolian_mono/function_registration.hh
@@ -0,0 +1,74 @@
1#ifndef EOLIAN_MONO_FUNCTION_REGISTRATION_HH
2#define EOLIAN_MONO_FUNCTION_REGISTRATION_HH
3
4#include <Eina.hh>
5
6#include "grammar/generator.hpp"
7#include "grammar/klass_def.hpp"
8
9#include "grammar/indentation.hpp"
10#include "grammar/list.hpp"
11#include "grammar/alternative.hpp"
12#include "grammar/attribute_reorder.hpp"
13#include "type.hh"
14#include "marshall_type.hh"
15#include "parameter.hh"
16#include "keyword.hh"
17#include "using_decl.hh"
18#include "library_context.hh"
19
20namespace eolian_mono {
21
22template <typename I>
23struct function_registration_generator
24{
25 I index_generator;
26 attributes::klass_def const* klass;
27
28 template <typename OutputIterator, typename Context>
29 bool generate(OutputIterator sink, attributes::function_def const& f, Context const& context) const
30 {
31 if(is_function_blacklisted(f.c_name))
32 return true;
33 else
34 {
35 auto index = index_generator();
36
37 if(!as_generator
38 (scope_tab << scope_tab << "descs[" << index << "].api_func = efl.eo.Globals.dlsym(IntPtr.Zero, \"" << string << "\");\n"
39 << scope_tab << scope_tab << "descs[" << index << "].func = Marshal.GetFunctionPointerForDelegate(" << string << "NativeInherit." << string << "_static_delegate);\n"
40 )
41 .generate(sink, std::make_tuple(f.c_name, klass->cxx_name, escape_keyword(f.name)), context))
42 return false;
43 return true;
44 }
45 }
46};
47
48struct function_registration_parameterized
49{
50 template <typename I>
51 function_registration_generator<I> operator()(I i, attributes::klass_def const& klass) const
52 {
53 return {i, &klass};
54 }
55} const function_registration;
56
57}
58
59namespace efl { namespace eolian { namespace grammar {
60
61template <typename I>
62struct is_eager_generator< ::eolian_mono::function_registration_generator<I>> : std::true_type {};
63template <typename I>
64struct is_generator< ::eolian_mono::function_registration_generator<I>> : std::true_type {};
65
66namespace type_traits {
67
68template <typename I>
69struct attributes_needed< ::eolian_mono::function_registration_generator<I>> : std::integral_constant<int, 1> {};
70}
71
72} } }
73
74#endif
diff --git a/src/bin/eolian_mono/eolian_mono/klass.hh b/src/bin/eolian_mono/eolian_mono/klass.hh
index ed6f48da4d..7d308ec022 100644
--- a/src/bin/eolian_mono/eolian_mono/klass.hh
+++ b/src/bin/eolian_mono/eolian_mono/klass.hh
@@ -1,8 +1,10 @@
1#ifndef EOLIAN_MONO_CLASS_DEFINITION_HPP 1#ifndef EOLIAN_MONO_CLASS_DEFINITION_HPP
2#define EOLIAN_MONO_CLASS_DEFINITION_HPP 2#define EOLIAN_MONO_CLASS_DEFINITION_HPP
3 3
4#include "grammar/integral.hpp"
4#include "grammar/generator.hpp" 5#include "grammar/generator.hpp"
5#include "grammar/klass_def.hpp" 6#include "grammar/klass_def.hpp"
7#include "function_blacklist.hh"
6 8
7#include "grammar/indentation.hpp" 9#include "grammar/indentation.hpp"
8#include "grammar/list.hpp" 10#include "grammar/list.hpp"
@@ -10,13 +12,11 @@
10#include "type.hh" 12#include "type.hh"
11#include "namespace.hh" 13#include "namespace.hh"
12#include "function_definition.hh" 14#include "function_definition.hh"
15#include "function_registration.hh"
13#include "function_declaration.hh" 16#include "function_declaration.hh"
14#include "grammar/string.hpp" 17#include "grammar/string.hpp"
18#include "grammar/integral.hpp"
15#include "grammar/case.hpp" 19#include "grammar/case.hpp"
16// #include "grammar/address_of.hpp"
17// #include "grammar/attribute_reorder.hpp"
18// #include "grammar/attribute_conditional.hpp"
19// #include "grammar/attribute_replace.hpp"
20#include "using_decl.hh" 20#include "using_decl.hh"
21 21
22namespace eolian_mono { 22namespace eolian_mono {
@@ -84,6 +84,9 @@ struct klass
84 << scope_tab << "public System.IntPtr raw_handle {\n" 84 << scope_tab << "public System.IntPtr raw_handle {\n"
85 << scope_tab << scope_tab << "get { return handle; }\n" 85 << scope_tab << scope_tab << "get { return handle; }\n"
86 << scope_tab << "}\n" 86 << scope_tab << "}\n"
87 << scope_tab << "public System.IntPtr raw_klass {\n"
88 << scope_tab << scope_tab << "get { return efl.eo.Globals.efl_class_get(handle); }\n"
89 << scope_tab << "}\n"
87 << scope_tab << "[System.Runtime.InteropServices.DllImport(\"" << context_find_tag<library_context>(context).library_name 90 << scope_tab << "[System.Runtime.InteropServices.DllImport(\"" << context_find_tag<library_context>(context).library_name
88 << "\")] static extern System.IntPtr\n" 91 << "\")] static extern System.IntPtr\n"
89 << scope_tab << scope_tab << class_get_name << "();\n" 92 << scope_tab << scope_tab << class_get_name << "();\n"
@@ -120,33 +123,35 @@ struct klass
120 if(!as_generator("}\n").generate(sink, attributes::unused, context)) return false; 123 if(!as_generator("}\n").generate(sink, attributes::unused, context)) return false;
121 } 124 }
122 125
123 // Concrete class 126 // Inherit class
124 if(class_type == "class") 127 if(class_type == "class")
125 { 128 {
126 if(!as_generator 129 if(!as_generator
127 ( 130 (
128 "public " << class_type << " " << string << "Inherit : " << string << "\n{\n" 131 "public " << class_type << " " << string << "Inherit : " << string << "\n{\n"
129 << scope_tab << "System.IntPtr handle;\n" 132 << scope_tab << "System.IntPtr handle;\n"
133 << scope_tab << "public static System.IntPtr klass;\n"
130 << scope_tab << "public System.IntPtr raw_handle {\n" 134 << scope_tab << "public System.IntPtr raw_handle {\n"
131 << scope_tab << scope_tab << "get { return handle; }\n" 135 << scope_tab << scope_tab << "get { return handle; }\n"
132 << scope_tab << "}\n" 136 << scope_tab << "}\n"
137 << scope_tab << "public System.IntPtr raw_klass {\n"
138 << scope_tab << scope_tab << "get { return klass; }\n"
139 << scope_tab << "}\n"
133 << scope_tab << "[System.Runtime.InteropServices.DllImport(\"" << context_find_tag<library_context>(context).library_name 140 << scope_tab << "[System.Runtime.InteropServices.DllImport(\"" << context_find_tag<library_context>(context).library_name
134 << "\")] static extern System.IntPtr\n" 141 << "\")] static extern System.IntPtr\n"
135 << scope_tab << scope_tab << class_get_name << "();\n" 142 << scope_tab << scope_tab << class_get_name << "();\n"
136 << scope_tab << "public " << string << "Inherit(System.Type type, efl.Object parent = null)\n" 143 << scope_tab << "public " << string << "Inherit(efl.Object parent = null, System.Type interface1 = null)\n"
137 << scope_tab << "{\n" 144 << scope_tab << "{\n"
138 << scope_tab << scope_tab << "System.IntPtr klass = " << class_get_name << "();\n" 145 << scope_tab << scope_tab << "klass = efl.eo.Globals.register_class(new efl.eo.Globals.class_initializer(" << string << "NativeInherit.class_initializer), " << class_get_name << "());\n"
139 << scope_tab << scope_tab << "System.IntPtr parent_ptr = System.IntPtr.Zero;\n" 146 //<< scope_tab << scope_tab << "klass = efl.eo.Globals.register_class(null/*new efl.eo.Globals.class_initializer(" << string << "NativeInherit.class_initializer)*/, " << class_get_name << "());\n"
140 << scope_tab << scope_tab << "if(parent != null)\n" 147 << scope_tab << scope_tab << "handle = efl.eo.Globals.instantiate(klass, parent);\n"
141 << scope_tab << scope_tab << scope_tab << "parent_ptr = parent.raw_handle;\n" 148 << scope_tab << scope_tab << "efl.eo.Globals.data_set(this);\n"
142 // << scope_tab << scope_tab << "System.IntPtr eo = _efl_add_internal_start(\"file\", 0, klass, parent_ptr, 0, 0);\n"
143 // << scope_tab << scope_tab << "handle = _efl_add_end(eo, 0, 0);\n"
144 << scope_tab << "}\n" 149 << scope_tab << "}\n"
145 ) 150 )
146 .generate(sink, std::make_tuple(cls.cxx_name, cls.cxx_name, cls.namespaces, cls.eolian_name, cls.cxx_name, cls.namespaces, cls.eolian_name, cls.cxx_name), context)) 151 .generate(sink, std::make_tuple(cls.cxx_name, cls.cxx_name, cls.namespaces, cls.eolian_name, cls.cxx_name, cls.cxx_name, cls.namespaces, cls.eolian_name, cls.cxx_name), context))
147 return false; 152 return false;
148 153
149 if(!as_generator(*(function_definition)) 154 if(!as_generator(*(function_definition(true)))
150 .generate(sink, cls.functions, context)) return false; 155 .generate(sink, cls.functions, context)) return false;
151 156
152 for(auto first = std::begin(cls.inherits) 157 for(auto first = std::begin(cls.inherits)
@@ -154,13 +159,85 @@ struct klass
154 { 159 {
155 attributes::klass_def klass(get_klass(*first)); 160 attributes::klass_def klass(get_klass(*first));
156 161
157 if(!as_generator(*(function_definition)) 162 if(!as_generator(*(function_definition(true)))
158 .generate(sink, klass.functions, context)) return false; 163 .generate(sink, klass.functions, context)) return false;
159 } 164 }
160 165
161 166
162 if(!as_generator("}\n").generate(sink, attributes::unused, context)) return false; 167 if(!as_generator("}\n").generate(sink, attributes::unused, context)) return false;
163 } 168 }
169
170 std::size_t function_count = cls.functions.size();
171 for(auto first = std::begin(cls.inherits)
172 , last = std::end(cls.inherits); first != last; ++first)
173 {
174 attributes::klass_def klass(get_klass(*first));
175 function_count += klass.functions.size();
176 }
177 // function_count--;
178
179 int function_registration_index = 0;
180 auto index_generator = [&function_registration_index]
181 {
182 return function_registration_index++;
183 };
184
185 // Native Inherit class
186 if(class_type == "class")
187 {
188 if(!as_generator
189 (
190 "public " << class_type << " " << string << "NativeInherit {\n"
191 << scope_tab << "public static byte class_initializer(IntPtr klass)\n"
192 << scope_tab << "{\n"
193 << scope_tab << scope_tab << "Efl_Op_Description[] descs = new Efl_Op_Description[" << grammar::int_ << "];\n"
194 << *(function_registration(index_generator, cls))
195 )
196 .generate(sink, std::make_tuple(cls.cxx_name, function_count, cls.functions), context))
197 return false;
198 for(auto first = std::begin(cls.inherits)
199 , last = std::end(cls.inherits); first != last; ++first)
200 {
201 attributes::klass_def klass(get_klass(*first));
202 if(!as_generator(*(function_registration(index_generator, cls)))
203 .generate(sink, klass.functions, context)) return false;
204 }
205
206 if(!as_generator
207 ( scope_tab << scope_tab << "IntPtr descs_ptr = Marshal.AllocHGlobal(Marshal.SizeOf(descs[0])*" << function_count << ");\n"
208 << scope_tab << scope_tab << "IntPtr ptr = descs_ptr;\n"
209 << scope_tab << scope_tab << "for(int i = 0; i != " << function_count << "; ++i)\n"
210 << scope_tab << scope_tab << "{\n"
211 << scope_tab << scope_tab << scope_tab << "Marshal.StructureToPtr(descs[i], ptr, false);\n"
212 << scope_tab << scope_tab << scope_tab << "ptr = new IntPtr((long)ptr + Marshal.SizeOf(descs[0]));\n"
213 << scope_tab << scope_tab << "}\n"
214 << scope_tab << scope_tab << "Efl_Object_Ops ops;\n"
215 << scope_tab << scope_tab << "ops.descs = descs_ptr;\n"
216 << scope_tab << scope_tab << "ops.count = (UIntPtr)" << function_count << ";\n"
217 << scope_tab << scope_tab << "IntPtr ops_ptr = Marshal.AllocHGlobal(Marshal.SizeOf(ops));\n"
218 << scope_tab << scope_tab << "Marshal.StructureToPtr(ops, ops_ptr, false);\n"
219 << scope_tab << scope_tab << "efl.eo.Globals.efl_class_functions_set(klass, ops_ptr, IntPtr.Zero);\n"
220 ).generate(sink, attributes::unused, context)) return false;
221
222
223 if(!as_generator(scope_tab << scope_tab << "return 1;\n"
224 << scope_tab << "}\n")
225 .generate(sink, attributes::unused, context)) return false;
226
227 if(!as_generator(*(native_function_definition(cls)))
228 .generate(sink, cls.functions, context)) return false;
229
230 for(auto first = std::begin(cls.inherits)
231 , last = std::end(cls.inherits); first != last; ++first)
232 {
233 attributes::klass_def klass(get_klass(*first));
234
235 if(!as_generator(*(native_function_definition(cls)))
236 .generate(sink, klass.functions, context)) return false;
237 }
238
239 if(!as_generator("}\n").generate(sink, attributes::unused, context)) return false;
240 }
164 241
165 auto close_namespace = *(lit("} ")) << "\n"; 242 auto close_namespace = *(lit("} ")) << "\n";
166 if(!as_generator(close_namespace).generate(sink, namespaces, context)) return false; 243 if(!as_generator(close_namespace).generate(sink, namespaces, context)) return false;
@@ -177,6 +254,8 @@ namespace efl { namespace eolian { namespace grammar {
177 254
178template <> 255template <>
179struct is_eager_generator<struct ::eolian_mono::klass> : std::true_type {}; 256struct is_eager_generator<struct ::eolian_mono::klass> : std::true_type {};
257template <>
258struct is_generator<struct ::eolian_mono::klass> : std::true_type {};
180 259
181namespace type_traits { 260namespace type_traits {
182template <> 261template <>
diff --git a/src/bin/eolian_mono/eolian_mono/marshall_type.hh b/src/bin/eolian_mono/eolian_mono/marshall_type.hh
index c7253855c9..de6025b834 100644
--- a/src/bin/eolian_mono/eolian_mono/marshall_type.hh
+++ b/src/bin/eolian_mono/eolian_mono/marshall_type.hh
@@ -87,6 +87,8 @@ namespace efl { namespace eolian { namespace grammar {
87template <> 87template <>
88struct is_eager_generator< ::eolian_mono::marshall_type_generator> : std::true_type {}; 88struct is_eager_generator< ::eolian_mono::marshall_type_generator> : std::true_type {};
89template <> 89template <>
90struct is_generator< ::eolian_mono::marshall_type_generator> : std::true_type {};
91template <>
90struct is_generator< ::eolian_mono::marshall_type_terminal> : std::true_type {}; 92struct is_generator< ::eolian_mono::marshall_type_terminal> : std::true_type {};
91 93
92namespace type_traits { 94namespace type_traits {
@@ -99,6 +101,8 @@ struct attributes_needed< ::eolian_mono::marshall_type_terminal> : std::integral
99template <> 101template <>
100struct is_eager_generator< ::eolian_mono::marshall_annotation_generator> : std::true_type {}; 102struct is_eager_generator< ::eolian_mono::marshall_annotation_generator> : std::true_type {};
101template <> 103template <>
104struct is_generator< ::eolian_mono::marshall_annotation_generator> : std::true_type {};
105template <>
102struct is_generator< ::eolian_mono::marshall_annotation_terminal> : std::true_type {}; 106struct is_generator< ::eolian_mono::marshall_annotation_terminal> : std::true_type {};
103 107
104namespace type_traits { 108namespace type_traits {
diff --git a/src/bin/eolian_mono/eolian_mono/parameter.hh b/src/bin/eolian_mono/eolian_mono/parameter.hh
index d8215229ab..97a1987b19 100644
--- a/src/bin/eolian_mono/eolian_mono/parameter.hh
+++ b/src/bin/eolian_mono/eolian_mono/parameter.hh
@@ -46,6 +46,8 @@ namespace efl { namespace eolian { namespace grammar {
46 46
47template <> 47template <>
48struct is_eager_generator< ::eolian_mono::parameter_generator> : std::true_type {}; 48struct is_eager_generator< ::eolian_mono::parameter_generator> : std::true_type {};
49template <>
50struct is_generator< ::eolian_mono::parameter_generator> : std::true_type {};
49 51
50namespace type_traits { 52namespace type_traits {
51template <> 53template <>
@@ -54,6 +56,8 @@ struct attributes_needed< ::eolian_mono::parameter_generator> : std::integral_co
54 56
55template <> 57template <>
56struct is_eager_generator< ::eolian_mono::marshall_parameter_generator> : std::true_type {}; 58struct is_eager_generator< ::eolian_mono::marshall_parameter_generator> : std::true_type {};
59template <>
60struct is_generator< ::eolian_mono::marshall_parameter_generator> : std::true_type {};
57 61
58namespace type_traits { 62namespace type_traits {
59template <> 63template <>
@@ -62,6 +66,8 @@ struct attributes_needed< ::eolian_mono::marshall_parameter_generator> : std::in
62 66
63template <> 67template <>
64struct is_eager_generator< ::eolian_mono::argument_generator> : std::true_type {}; 68struct is_eager_generator< ::eolian_mono::argument_generator> : std::true_type {};
69template <>
70struct is_generator< ::eolian_mono::argument_generator> : std::true_type {};
65 71
66namespace type_traits { 72namespace type_traits {
67template <> 73template <>
diff --git a/src/bin/eolian_mono/eolian_mono/type.hh b/src/bin/eolian_mono/eolian_mono/type.hh
index e395d586b5..f2503ff56a 100644
--- a/src/bin/eolian_mono/eolian_mono/type.hh
+++ b/src/bin/eolian_mono/eolian_mono/type.hh
@@ -52,6 +52,8 @@ namespace efl { namespace eolian { namespace grammar {
52template <> 52template <>
53struct is_eager_generator< ::eolian_mono::type_generator> : std::true_type {}; 53struct is_eager_generator< ::eolian_mono::type_generator> : std::true_type {};
54template <> 54template <>
55struct is_generator< ::eolian_mono::type_generator> : std::true_type {};
56template <>
55struct is_generator< ::eolian_mono::type_terminal> : std::true_type {}; 57struct is_generator< ::eolian_mono::type_terminal> : std::true_type {};
56 58
57namespace type_traits { 59namespace type_traits {
diff --git a/src/bindings/mono/eo_mono/iwrapper.cs b/src/bindings/mono/eo_mono/iwrapper.cs
index bc25c61b7a..2b259755ef 100644
--- a/src/bindings/mono/eo_mono/iwrapper.cs
+++ b/src/bindings/mono/eo_mono/iwrapper.cs
@@ -29,6 +29,70 @@ public class Globals {
29 [DllImport("eo")] public static extern byte efl_class_functions_set(IntPtr klass_id, IntPtr object_ops, IntPtr class_ops); 29 [DllImport("eo")] public static extern byte efl_class_functions_set(IntPtr klass_id, IntPtr object_ops, IntPtr class_ops);
30 [DllImport("eo")] public static extern IntPtr efl_data_scope_get(IntPtr obj, IntPtr klass); 30 [DllImport("eo")] public static extern IntPtr efl_data_scope_get(IntPtr obj, IntPtr klass);
31 [DllImport("eo")] public static extern IntPtr efl_super(IntPtr obj, IntPtr klass); 31 [DllImport("eo")] public static extern IntPtr efl_super(IntPtr obj, IntPtr klass);
32 [DllImport("eo")] public static extern IntPtr efl_class_get(IntPtr obj);
33 [DllImport("dl")] public static extern IntPtr dlsym
34 (IntPtr handle, [MarshalAs(UnmanagedType.LPStr)] String name);
35
36 public delegate byte class_initializer(IntPtr klass);
37
38 public static IntPtr register_class(class_initializer initializer, IntPtr base_klass)
39 {
40 ClassDescription description;
41 description.version = 2; // EO_VERSION
42 description.name = "BoxInherit";
43 description.class_type = 0; // REGULAR
44 description.data_size = (UIntPtr)8;
45 description.class_initializer = IntPtr.Zero;
46 description.class_constructor = IntPtr.Zero;
47 description.class_destructor = IntPtr.Zero;
48
49 if(initializer != null)
50 description.class_initializer = Marshal.GetFunctionPointerForDelegate(initializer);
51
52 IntPtr description_ptr = Marshal.AllocHGlobal(Marshal.SizeOf(description));
53 Marshal.StructureToPtr(description, description_ptr, false);
54
55 Console.WriteLine("Going to register!");
56 IntPtr klass = efl.eo.Globals.efl_class_new(description_ptr, base_klass, IntPtr.Zero);
57 if(klass == IntPtr.Zero)
58 Console.WriteLine("klass was not registed");
59 Console.WriteLine("Registered?");
60 return klass;
61 }
62 public static IntPtr instantiate(IntPtr klass, efl.Object parent)
63 {
64 Console.WriteLine("Instantiating");
65 System.IntPtr parent_ptr = System.IntPtr.Zero;
66 if(parent != null)
67 parent_ptr = parent.raw_handle;
68
69 System.IntPtr eo = efl.eo.Globals._efl_add_internal_start("file", 0, klass, parent_ptr, 0, 0);
70 Console.WriteLine("efl_add_internal_start returned");
71 eo = efl.eo.Globals._efl_add_end(eo, 0, 0);
72 Console.WriteLine("efl_add_end returned");
73 return eo;
74 }
75 public static void data_set(efl.eo.IWrapper obj)
76 {
77 IntPtr pd = efl.eo.Globals.efl_data_scope_get(obj.raw_handle, obj.raw_klass);
78 {
79 GCHandle gch = GCHandle.Alloc(obj);
80 EolianPD epd;
81 epd.pointer = GCHandle.ToIntPtr(gch);
82 Marshal.StructureToPtr(epd, pd, false);
83 }
84 }
85 public static efl.eo.IWrapper data_get(IntPtr pd)
86 {
87 EolianPD epd = (EolianPD)Marshal.PtrToStructure(pd, typeof(EolianPD));
88 if(epd.pointer != IntPtr.Zero)
89 {
90 GCHandle gch = GCHandle.FromIntPtr(epd.pointer);
91 return (efl.eo.IWrapper)gch.Target;
92 }
93 else
94 return null;
95 }
32} 96}
33 97
34public interface IWrapper 98public interface IWrapper
@@ -37,6 +101,10 @@ public interface IWrapper
37 { 101 {
38 get; 102 get;
39 } 103 }
104 IntPtr raw_klass
105 {
106 get;
107 }
40} 108}
41 109
42public class MarshalTest : ICustomMarshaler 110public class MarshalTest : ICustomMarshaler
diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index 8324b21d6c..b532bc8f5e 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -620,7 +620,8 @@ _eo_class_funcs_set(Eo_Vtable *vtable, const Efl_Object_Ops *ops, const _Efl_Cla
620 { 620 {
621 ERR("Class '%s': NULL API not allowed (NULL->%p '%s').", 621 ERR("Class '%s': NULL API not allowed (NULL->%p '%s').",
622 klass->desc->name, op_desc->func, _eo_op_desc_name_get(op_desc)); 622 klass->desc->name, op_desc->func, _eo_op_desc_name_get(op_desc));
623 return EINA_FALSE; 623 //return EINA_FALSE;
624 continue;
624 } 625 }
625 626
626 /* Get the opid for the function. */ 627 /* Get the opid for the function. */
diff --git a/src/lib/eolian_cxx/grammar/address_of.hpp b/src/lib/eolian_cxx/grammar/address_of.hpp
index 3fa48b0d5d..6c6b977ca3 100644
--- a/src/lib/eolian_cxx/grammar/address_of.hpp
+++ b/src/lib/eolian_cxx/grammar/address_of.hpp
@@ -61,6 +61,8 @@ struct address_of_generator
61 61
62template <> 62template <>
63struct is_eager_generator<address_of_generator> : std::true_type {}; 63struct is_eager_generator<address_of_generator> : std::true_type {};
64template <>
65struct is_generator<address_of_generator> : std::true_type {};
64 66
65namespace type_traits { 67namespace type_traits {
66template <> 68template <>
diff --git a/src/lib/eolian_cxx/grammar/alternative.hpp b/src/lib/eolian_cxx/grammar/alternative.hpp
index 3ad3e6af67..844f3d208d 100644
--- a/src/lib/eolian_cxx/grammar/alternative.hpp
+++ b/src/lib/eolian_cxx/grammar/alternative.hpp
@@ -30,6 +30,8 @@ struct alternative_generator
30 30
31template <typename L, typename R> 31template <typename L, typename R>
32struct is_eager_generator<alternative_generator<L, R> > : std::true_type {}; 32struct is_eager_generator<alternative_generator<L, R> > : std::true_type {};
33template <typename L, typename R>
34struct is_generator<alternative_generator<L, R> > : std::true_type {};
33 35
34namespace type_traits { 36namespace type_traits {
35template <typename L, typename R> 37template <typename L, typename R>
diff --git a/src/lib/eolian_cxx/grammar/attribute_conditional.hpp b/src/lib/eolian_cxx/grammar/attribute_conditional.hpp
index 2803f9fc48..5934564014 100644
--- a/src/lib/eolian_cxx/grammar/attribute_conditional.hpp
+++ b/src/lib/eolian_cxx/grammar/attribute_conditional.hpp
@@ -21,9 +21,6 @@ struct functional_attribute_conditional_generator
21 G g; 21 G g;
22}; 22};
23 23
24template <typename F, typename G>
25struct is_eager_generator<functional_attribute_conditional_generator<F, G>> : std::true_type {};
26
27template <typename F> 24template <typename F>
28struct functional_attribute_conditional_directive 25struct functional_attribute_conditional_directive
29{ 26{
@@ -42,9 +39,6 @@ struct functional_attribute_conditional_directive
42 F f; 39 F f;
43}; 40};
44 41
45template <typename F>
46struct is_eager_generator<functional_attribute_conditional_directive<F>> : std::true_type {};
47
48struct attribute_conditional_terminal 42struct attribute_conditional_terminal
49{ 43{
50 template <typename F> 44 template <typename F>
@@ -54,6 +48,15 @@ struct attribute_conditional_terminal
54 } 48 }
55} const attribute_conditional = {}; 49} const attribute_conditional = {};
56 50
51template <typename F, typename G>
52struct is_eager_generator<functional_attribute_conditional_generator<F, G>> : std::true_type {};
53template <typename F>
54struct is_eager_generator<functional_attribute_conditional_directive<F>> : std::true_type {};
55template <typename F, typename G>
56struct is_generator<functional_attribute_conditional_generator<F, G>> : std::true_type {};
57template <typename F>
58struct is_generator<functional_attribute_conditional_directive<F>> : std::true_type {};
59
57namespace type_traits { 60namespace type_traits {
58template <typename F, typename G> 61template <typename F, typename G>
59struct attributes_needed<functional_attribute_conditional_generator<F, G>> 62struct attributes_needed<functional_attribute_conditional_generator<F, G>>
diff --git a/src/lib/eolian_cxx/grammar/attribute_reorder.hpp b/src/lib/eolian_cxx/grammar/attribute_reorder.hpp
index b3f8b3196b..a14e3a9203 100644
--- a/src/lib/eolian_cxx/grammar/attribute_reorder.hpp
+++ b/src/lib/eolian_cxx/grammar/attribute_reorder.hpp
@@ -66,6 +66,8 @@ struct attribute_reorder_generator
66 66
67template <typename G, int...S> 67template <typename G, int...S>
68struct is_eager_generator<attribute_reorder_generator<G, S...>> : std::true_type {}; 68struct is_eager_generator<attribute_reorder_generator<G, S...>> : std::true_type {};
69template <typename G, int...S>
70struct is_generator<attribute_reorder_generator<G, S...>> : std::true_type {};
69 71
70template <int...S, typename G> 72template <int...S, typename G>
71attribute_reorder_generator<G, S...> attribute_reorder(G g) 73attribute_reorder_generator<G, S...> attribute_reorder(G g)
diff --git a/src/lib/eolian_cxx/grammar/attribute_replace.hpp b/src/lib/eolian_cxx/grammar/attribute_replace.hpp
index e45fb9f710..fee7328488 100644
--- a/src/lib/eolian_cxx/grammar/attribute_replace.hpp
+++ b/src/lib/eolian_cxx/grammar/attribute_replace.hpp
@@ -18,9 +18,6 @@ struct functional_attribute_replace_generator
18 G g; 18 G g;
19}; 19};
20 20
21template <typename F, typename G>
22struct is_eager_generator<functional_attribute_replace_generator<F, G>> : std::true_type {};
23
24template <typename F> 21template <typename F>
25struct functional_attribute_replace_directive 22struct functional_attribute_replace_directive
26{ 23{
@@ -39,8 +36,14 @@ struct functional_attribute_replace_directive
39 F f; 36 F f;
40}; 37};
41 38
39template <typename F, typename G>
40struct is_eager_generator<functional_attribute_replace_generator<F, G>> : std::true_type {};
42template <typename F> 41template <typename F>
43struct is_eager_generator<functional_attribute_replace_directive<F>> : std::true_type {}; 42struct is_eager_generator<functional_attribute_replace_directive<F>> : std::true_type {};
43template <typename F, typename G>
44struct is_generator<functional_attribute_replace_generator<F, G>> : std::true_type {};
45template <typename F>
46struct is_generator<functional_attribute_replace_directive<F>> : std::true_type {};
44 47
45struct attribute_replace_terminal 48struct attribute_replace_terminal
46{ 49{
diff --git a/src/lib/eolian_cxx/grammar/base_class_definition.hpp b/src/lib/eolian_cxx/grammar/base_class_definition.hpp
index bb5adde1cc..d4aa3744fa 100644
--- a/src/lib/eolian_cxx/grammar/base_class_definition.hpp
+++ b/src/lib/eolian_cxx/grammar/base_class_definition.hpp
@@ -101,6 +101,8 @@ struct base_class_definition_generator
101 101
102template <> 102template <>
103struct is_eager_generator<base_class_definition_generator> : std::true_type {}; 103struct is_eager_generator<base_class_definition_generator> : std::true_type {};
104template <>
105struct is_generator<base_class_definition_generator> : std::true_type {};
104 106
105namespace type_traits { 107namespace type_traits {
106template <> 108template <>
diff --git a/src/lib/eolian_cxx/grammar/c_type.hpp b/src/lib/eolian_cxx/grammar/c_type.hpp
index 6d814f80a4..1a163538d7 100644
--- a/src/lib/eolian_cxx/grammar/c_type.hpp
+++ b/src/lib/eolian_cxx/grammar/c_type.hpp
@@ -63,6 +63,8 @@ struct c_type_generator
63 63
64template <> 64template <>
65struct is_eager_generator<c_type_generator> : std::true_type {}; 65struct is_eager_generator<c_type_generator> : std::true_type {};
66template <>
67struct is_generator<c_type_generator> : std::true_type {};
66 68
67namespace type_traits { 69namespace type_traits {
68template <> 70template <>
diff --git a/src/lib/eolian_cxx/grammar/case.hpp b/src/lib/eolian_cxx/grammar/case.hpp
index 86421363ac..c18d4ab565 100644
--- a/src/lib/eolian_cxx/grammar/case.hpp
+++ b/src/lib/eolian_cxx/grammar/case.hpp
@@ -55,6 +55,10 @@ template <typename G>
55struct is_eager_generator<lower_case_generator<G>> : std::true_type {}; 55struct is_eager_generator<lower_case_generator<G>> : std::true_type {};
56template <typename G> 56template <typename G>
57struct is_eager_generator<upper_case_generator<G>> : std::true_type {}; 57struct is_eager_generator<upper_case_generator<G>> : std::true_type {};
58template <typename G>
59struct is_generator<lower_case_generator<G>> : std::true_type {};
60template <typename G>
61struct is_generator<upper_case_generator<G>> : std::true_type {};
58 62
59namespace type_traits { 63namespace type_traits {
60template <typename G> 64template <typename G>
diff --git a/src/lib/eolian_cxx/grammar/class_declaration.hpp b/src/lib/eolian_cxx/grammar/class_declaration.hpp
index 6f23641e4d..8888223a6b 100644
--- a/src/lib/eolian_cxx/grammar/class_declaration.hpp
+++ b/src/lib/eolian_cxx/grammar/class_declaration.hpp
@@ -43,6 +43,8 @@ struct class_declaration_generator
43 43
44template <> 44template <>
45struct is_eager_generator<class_declaration_generator> : std::true_type {}; 45struct is_eager_generator<class_declaration_generator> : std::true_type {};
46template <>
47struct is_generator<class_declaration_generator> : std::true_type {};
46 48
47namespace type_traits { 49namespace type_traits {
48template <> 50template <>
diff --git a/src/lib/eolian_cxx/grammar/class_definition.hpp b/src/lib/eolian_cxx/grammar/class_definition.hpp
index 9442e06813..eb510811f8 100644
--- a/src/lib/eolian_cxx/grammar/class_definition.hpp
+++ b/src/lib/eolian_cxx/grammar/class_definition.hpp
@@ -174,6 +174,8 @@ struct class_definition_generator
174 174
175template <> 175template <>
176struct is_eager_generator<class_definition_generator> : std::true_type {}; 176struct is_eager_generator<class_definition_generator> : std::true_type {};
177template <>
178struct is_generator<class_definition_generator> : std::true_type {};
177 179
178namespace type_traits { 180namespace type_traits {
179template <> 181template <>
diff --git a/src/lib/eolian_cxx/grammar/class_implementation.hpp b/src/lib/eolian_cxx/grammar/class_implementation.hpp
index 3e9174f936..0731e3d591 100644
--- a/src/lib/eolian_cxx/grammar/class_implementation.hpp
+++ b/src/lib/eolian_cxx/grammar/class_implementation.hpp
@@ -53,6 +53,8 @@ struct class_implementation_generator
53 53
54template <> 54template <>
55struct is_eager_generator<class_implementation_generator> : std::true_type {}; 55struct is_eager_generator<class_implementation_generator> : std::true_type {};
56template <>
57struct is_generator<class_implementation_generator> : std::true_type {};
56 58
57namespace type_traits { 59namespace type_traits {
58template <> 60template <>
diff --git a/src/lib/eolian_cxx/grammar/converting_argument.hpp b/src/lib/eolian_cxx/grammar/converting_argument.hpp
index cb3f750544..2d5f862777 100644
--- a/src/lib/eolian_cxx/grammar/converting_argument.hpp
+++ b/src/lib/eolian_cxx/grammar/converting_argument.hpp
@@ -39,6 +39,8 @@ struct converting_argument_generator
39 39
40template <> 40template <>
41struct is_eager_generator<converting_argument_generator> : std::true_type {}; 41struct is_eager_generator<converting_argument_generator> : std::true_type {};
42template <>
43struct is_generator<converting_argument_generator> : std::true_type {};
42 44
43namespace type_traits { 45namespace type_traits {
44template <> 46template <>
diff --git a/src/lib/eolian_cxx/grammar/eps.hpp b/src/lib/eolian_cxx/grammar/eps.hpp
index 900df90e1a..d396cbf0b3 100644
--- a/src/lib/eolian_cxx/grammar/eps.hpp
+++ b/src/lib/eolian_cxx/grammar/eps.hpp
@@ -16,6 +16,8 @@ struct eps_generator
16 16
17template <> 17template <>
18struct is_eager_generator<eps_generator> : std::true_type {}; 18struct is_eager_generator<eps_generator> : std::true_type {};
19template <>
20struct is_generator<eps_generator> : std::true_type {};
19 21
20eps_generator const eps = {}; 22eps_generator const eps = {};
21 23
diff --git a/src/lib/eolian_cxx/grammar/function_declaration.hpp b/src/lib/eolian_cxx/grammar/function_declaration.hpp
index 6e124dfd38..5e07dd9c26 100644
--- a/src/lib/eolian_cxx/grammar/function_declaration.hpp
+++ b/src/lib/eolian_cxx/grammar/function_declaration.hpp
@@ -26,6 +26,8 @@ struct function_declaration_generator
26 26
27template <> 27template <>
28struct is_eager_generator<function_declaration_generator> : std::true_type {}; 28struct is_eager_generator<function_declaration_generator> : std::true_type {};
29template <>
30struct is_generator<function_declaration_generator> : std::true_type {};
29 31
30namespace type_traits { 32namespace type_traits {
31template <> 33template <>
diff --git a/src/lib/eolian_cxx/grammar/function_definition.hpp b/src/lib/eolian_cxx/grammar/function_definition.hpp
index 714cb1fbda..d85c6f02a1 100644
--- a/src/lib/eolian_cxx/grammar/function_definition.hpp
+++ b/src/lib/eolian_cxx/grammar/function_definition.hpp
@@ -154,6 +154,8 @@ struct function_definition_generator
154 154
155template <> 155template <>
156struct is_eager_generator<function_definition_generator> : std::true_type {}; 156struct is_eager_generator<function_definition_generator> : std::true_type {};
157template <>
158struct is_generator<function_definition_generator> : std::true_type {};
157 159
158namespace type_traits { 160namespace type_traits {
159template <> 161template <>
diff --git a/src/lib/eolian_cxx/grammar/generator.hpp b/src/lib/eolian_cxx/grammar/generator.hpp
index 1100befddf..130ee6859c 100644
--- a/src/lib/eolian_cxx/grammar/generator.hpp
+++ b/src/lib/eolian_cxx/grammar/generator.hpp
@@ -38,8 +38,8 @@ template <typename T>
38struct is_generator<T volatile const&> : is_generator<T> {}; 38struct is_generator<T volatile const&> : is_generator<T> {};
39template <typename T> 39template <typename T>
40struct is_eager_generator<T volatile const&> : is_eager_generator<T> {}; 40struct is_eager_generator<T volatile const&> : is_eager_generator<T> {};
41template <typename T> 41// template <typename T>
42struct is_generator<T> : is_eager_generator<T> {}; 42// struct is_generator<T> : is_eager_generator<T> {};
43 43
44template <typename G, typename Enable = typename std::enable_if<is_eager_generator<G>::value>::type> 44template <typename G, typename Enable = typename std::enable_if<is_eager_generator<G>::value>::type>
45G as_generator(G&& g) { return g; } 45G as_generator(G&& g) { return g; }
diff --git a/src/lib/eolian_cxx/grammar/header_guards.hpp b/src/lib/eolian_cxx/grammar/header_guards.hpp
index eab596d91e..a5a353bb4b 100644
--- a/src/lib/eolian_cxx/grammar/header_guards.hpp
+++ b/src/lib/eolian_cxx/grammar/header_guards.hpp
@@ -56,6 +56,8 @@ struct header_guards_generator
56 56
57template <typename G> 57template <typename G>
58struct is_eager_generator<header_guards_generator<G> > : std::true_type {}; 58struct is_eager_generator<header_guards_generator<G> > : std::true_type {};
59template <typename G>
60struct is_generator<header_guards_generator<G> > : std::true_type {};
59 61
60namespace type_traits { 62namespace type_traits {
61template <typename G> 63template <typename G>
diff --git a/src/lib/eolian_cxx/grammar/header_include_directive.hpp b/src/lib/eolian_cxx/grammar/header_include_directive.hpp
index 8fbc0eb4fa..6b717b685a 100644
--- a/src/lib/eolian_cxx/grammar/header_include_directive.hpp
+++ b/src/lib/eolian_cxx/grammar/header_include_directive.hpp
@@ -21,6 +21,8 @@ struct header_include_directive_generator
21 21
22template <> 22template <>
23struct is_eager_generator<header_include_directive_generator> : std::true_type {}; 23struct is_eager_generator<header_include_directive_generator> : std::true_type {};
24template <>
25struct is_generator<header_include_directive_generator> : std::true_type {};
24 26
25namespace type_traits { 27namespace type_traits {
26template <> 28template <>
diff --git a/src/lib/eolian_cxx/grammar/implementation_include_directive.hpp b/src/lib/eolian_cxx/grammar/implementation_include_directive.hpp
index dab1e0a7e9..c2da047233 100644
--- a/src/lib/eolian_cxx/grammar/implementation_include_directive.hpp
+++ b/src/lib/eolian_cxx/grammar/implementation_include_directive.hpp
@@ -26,6 +26,8 @@ struct implementation_include_directive_generator
26 26
27template <> 27template <>
28struct is_eager_generator<implementation_include_directive_generator> : std::true_type {}; 28struct is_eager_generator<implementation_include_directive_generator> : std::true_type {};
29template <>
30struct is_generator<implementation_include_directive_generator> : std::true_type {};
29 31
30namespace type_traits { 32namespace type_traits {
31template <> 33template <>
diff --git a/src/lib/eolian_cxx/grammar/indentation.hpp b/src/lib/eolian_cxx/grammar/indentation.hpp
index 615842e87b..897be03c3b 100644
--- a/src/lib/eolian_cxx/grammar/indentation.hpp
+++ b/src/lib/eolian_cxx/grammar/indentation.hpp
@@ -28,6 +28,8 @@ struct scope_tab_generator
28 28
29template <> 29template <>
30struct is_eager_generator<scope_tab_generator> : std::true_type {}; 30struct is_eager_generator<scope_tab_generator> : std::true_type {};
31template <>
32struct is_generator<scope_tab_generator> : std::true_type {};
31 33
32struct scope_tab_terminal 34struct scope_tab_terminal
33{ 35{
diff --git a/src/lib/eolian_cxx/grammar/integral.hpp b/src/lib/eolian_cxx/grammar/integral.hpp
new file mode 100644
index 0000000000..95cb2f0740
--- /dev/null
+++ b/src/lib/eolian_cxx/grammar/integral.hpp
@@ -0,0 +1,88 @@
1#ifndef EOLIAN_CXX_INTEGRAL_HH
2#define EOLIAN_CXX_INTEGRAL_HH
3
4#include <cstdlib>
5#include <cstring>
6
7#include "grammar/generator.hpp"
8#include "grammar/attributes.hpp"
9#include "grammar/case.hpp"
10
11namespace efl { namespace eolian { namespace grammar {
12
13namespace detail {
14
15template <typename OutputIterator, typename T>
16void generate_integral(OutputIterator sink, T integer)
17{
18 std::stringstream stm;
19 stm << integer;
20 std::string string = stm.str();
21 std::copy(string.begin(), string.end(), sink);
22}
23
24}
25
26// literal
27template <typename T>
28struct literal_integral_generator
29{
30 T integral;
31
32 template <typename OutputIterator, typename Attribute, typename Context>
33 bool generate(OutputIterator sink, Attribute const&, Context const&) const
34 {
35 detail::generate_integral(sink, integral);
36 return true;
37 }
38};
39
40template <typename T, typename Enable = typename std::enable_if<std::is_integral<T>::value>::type>
41literal_integral_generator<T> as_generator(T&& literal) { return {std::forward<T>(literal)}; }
42literal_integral_generator<std::size_t> as_generator(std::size_t literal) { return {literal}; }
43
44struct integral_terminal {
45 template <typename T>
46 literal_integral_generator<T> operator()(T literal) const
47 {
48 return {literal};
49 }
50} const int_ = {};
51
52struct integral_generator
53{
54 template <typename OutputIterator, typename Attribute, typename Context>
55 bool generate(OutputIterator sink, Attribute const& attribute, Context const&) const
56 {
57 detail::generate_integral(sink, attribute);
58 return true;
59 }
60};
61
62integral_generator as_generator(integral_terminal) { return {}; }
63
64template <typename T>
65struct is_eager_generator<literal_integral_generator<T>> : std::true_type {};
66template <>
67struct is_eager_generator<integral_generator> : std::true_type {};
68template <typename T>
69struct is_generator<literal_integral_generator<T>> : std::true_type {};
70template <>
71struct is_generator<integral_generator> : std::true_type {};
72template <typename T>
73struct is_generator<T, typename std::enable_if<std::is_integral<T>::value>::type> : std::true_type {};
74template <>
75struct is_generator<integral_terminal> : std::true_type {};
76
77namespace type_traits {
78template <typename T>
79struct attributes_needed<literal_integral_generator<T>> : std::integral_constant<int, 0> {};
80template <>
81struct attributes_needed<integral_generator> : std::integral_constant<int, 1> {};
82template <>
83struct attributes_needed<integral_terminal> : std::integral_constant<int, 1> {};
84}
85
86} } }
87
88#endif
diff --git a/src/lib/eolian_cxx/grammar/klass_def.hpp b/src/lib/eolian_cxx/grammar/klass_def.hpp
index 339061bbdc..d645ffe0fc 100644
--- a/src/lib/eolian_cxx/grammar/klass_def.hpp
+++ b/src/lib/eolian_cxx/grammar/klass_def.hpp
@@ -458,6 +458,7 @@ struct function_def
458 c_name = eolian_function_full_c_name_get(function, type, EINA_FALSE); 458 c_name = eolian_function_full_c_name_get(function, type, EINA_FALSE);
459 is_beta = eolian_function_is_beta(function); 459 is_beta = eolian_function_is_beta(function);
460 is_protected = eolian_function_scope_get(function, type) == EOLIAN_SCOPE_PROTECTED; 460 is_protected = eolian_function_scope_get(function, type) == EOLIAN_SCOPE_PROTECTED;
461 is_protected = eolian_function_scope_get(function, type) == EOLIAN_SCOPE_PROTECTED;
461 } 462 }
462}; 463};
463 464
diff --git a/src/lib/eolian_cxx/grammar/kleene.hpp b/src/lib/eolian_cxx/grammar/kleene.hpp
index 8c3088fb03..0aff2bae20 100644
--- a/src/lib/eolian_cxx/grammar/kleene.hpp
+++ b/src/lib/eolian_cxx/grammar/kleene.hpp
@@ -29,6 +29,8 @@ struct kleene_generator
29 29
30template <typename Generator> 30template <typename Generator>
31struct is_eager_generator<kleene_generator<Generator> > : std::true_type {}; 31struct is_eager_generator<kleene_generator<Generator> > : std::true_type {};
32template <typename Generator>
33struct is_generator<kleene_generator<Generator> > : std::true_type {};
32 34
33namespace type_traits { 35namespace type_traits {
34template <typename G> 36template <typename G>
diff --git a/src/lib/eolian_cxx/grammar/list.hpp b/src/lib/eolian_cxx/grammar/list.hpp
index c8d96240d8..f87a771b66 100644
--- a/src/lib/eolian_cxx/grammar/list.hpp
+++ b/src/lib/eolian_cxx/grammar/list.hpp
@@ -34,6 +34,8 @@ struct list_generator
34 34
35template <typename G, typename S> 35template <typename G, typename S>
36struct is_eager_generator<list_generator<G, S> > : std::true_type {}; 36struct is_eager_generator<list_generator<G, S> > : std::true_type {};
37template <typename G, typename S>
38struct is_generator<list_generator<G, S> > : std::true_type {};
37 39
38namespace type_traits { 40namespace type_traits {
39template <typename G, typename S> 41template <typename G, typename S>
diff --git a/src/lib/eolian_cxx/grammar/namespace.hpp b/src/lib/eolian_cxx/grammar/namespace.hpp
index 5cef9ecfe8..e16edca8f1 100644
--- a/src/lib/eolian_cxx/grammar/namespace.hpp
+++ b/src/lib/eolian_cxx/grammar/namespace.hpp
@@ -54,6 +54,8 @@ struct namespaces_directive
54 54
55template <typename G> 55template <typename G>
56struct is_eager_generator<namespaces_generator<G>> : std::true_type {}; 56struct is_eager_generator<namespaces_generator<G>> : std::true_type {};
57template <typename G>
58struct is_generator<namespaces_generator<G>> : std::true_type {};
57 59
58namespace type_traits { 60namespace type_traits {
59template <typename G> 61template <typename G>
diff --git a/src/lib/eolian_cxx/grammar/parameter.hpp b/src/lib/eolian_cxx/grammar/parameter.hpp
index b29805e24a..f9e625a514 100644
--- a/src/lib/eolian_cxx/grammar/parameter.hpp
+++ b/src/lib/eolian_cxx/grammar/parameter.hpp
@@ -35,6 +35,8 @@ struct parameter_type_generator
35 35
36template <> 36template <>
37struct is_eager_generator<parameter_type_generator> : std::true_type {}; 37struct is_eager_generator<parameter_type_generator> : std::true_type {};
38template <>
39struct is_generator<parameter_type_generator> : std::true_type {};
38namespace type_traits { 40namespace type_traits {
39template <> 41template <>
40struct attributes_needed<parameter_type_generator> : std::integral_constant<int, 1> {}; 42struct attributes_needed<parameter_type_generator> : std::integral_constant<int, 1> {};
@@ -53,6 +55,8 @@ struct parameter_generator
53 55
54template <> 56template <>
55struct is_eager_generator<parameter_generator> : std::true_type {}; 57struct is_eager_generator<parameter_generator> : std::true_type {};
58template <>
59struct is_generator<parameter_generator> : std::true_type {};
56namespace type_traits { 60namespace type_traits {
57template <> 61template <>
58struct attributes_needed<parameter_generator> : std::integral_constant<int, 1> {}; 62struct attributes_needed<parameter_generator> : std::integral_constant<int, 1> {};
diff --git a/src/lib/eolian_cxx/grammar/sequence.hpp b/src/lib/eolian_cxx/grammar/sequence.hpp
index 96fb467af2..dfffbf3394 100644
--- a/src/lib/eolian_cxx/grammar/sequence.hpp
+++ b/src/lib/eolian_cxx/grammar/sequence.hpp
@@ -115,6 +115,8 @@ struct sequence_generator
115 115
116template <typename L, typename R> 116template <typename L, typename R>
117struct is_eager_generator<sequence_generator<L, R> > : std::true_type {}; 117struct is_eager_generator<sequence_generator<L, R> > : std::true_type {};
118template <typename L, typename R>
119struct is_generator<sequence_generator<L, R> > : std::true_type {};
118 120
119namespace type_traits { 121namespace type_traits {
120template <typename L, typename R> 122template <typename L, typename R>
diff --git a/src/lib/eolian_cxx/grammar/string.hpp b/src/lib/eolian_cxx/grammar/string.hpp
index 77507ce2a0..df4ae8f2cb 100644
--- a/src/lib/eolian_cxx/grammar/string.hpp
+++ b/src/lib/eolian_cxx/grammar/string.hpp
@@ -26,15 +26,6 @@ struct literal_generator
26 const char* string; 26 const char* string;
27}; 27};
28 28
29template <>
30struct is_eager_generator<literal_generator> : std::true_type {};
31
32template <>
33struct is_generator<const char*> : std::true_type {};
34
35template <int N>
36struct is_generator<const char[N]> : std::true_type {};
37
38literal_generator as_generator(char const* literal) { return literal; } 29literal_generator as_generator(char const* literal) { return literal; }
39 30
40struct { 31struct {
@@ -130,13 +121,6 @@ struct string_replace_generator
130 char from, to; 121 char from, to;
131}; 122};
132 123
133template <>
134struct is_eager_generator<string_generator> : std::true_type {};
135template <>
136struct is_eager_generator<specific_string_generator> : std::true_type {};
137template <>
138struct is_eager_generator<string_replace_generator> : std::true_type {};
139
140struct string_generator_terminal 124struct string_generator_terminal
141{ 125{
142 specific_string_generator operator[](std::string string) const 126 specific_string_generator operator[](std::string string) const
@@ -154,6 +138,28 @@ struct string_replace_terminal
154} const string_replace = {}; 138} const string_replace = {};
155 139
156template <> 140template <>
141struct is_eager_generator<literal_generator> : std::true_type {};
142template <>
143struct is_generator<literal_generator> : std::true_type {};
144template <>
145struct is_generator<const char*> : std::true_type {};
146
147template <int N>
148struct is_generator<const char[N]> : std::true_type {};
149template <>
150struct is_eager_generator<string_generator> : std::true_type {};
151template <>
152struct is_eager_generator<specific_string_generator> : std::true_type {};
153template <>
154struct is_eager_generator<string_replace_generator> : std::true_type {};
155template <>
156struct is_generator<string_generator> : std::true_type {};
157template <>
158struct is_generator<specific_string_generator> : std::true_type {};
159template <>
160struct is_generator<string_replace_generator> : std::true_type {};
161
162template <>
157struct is_generator<string_generator_terminal> : std::true_type {}; 163struct is_generator<string_generator_terminal> : std::true_type {};
158template <> 164template <>
159struct is_generator<std::string> : std::true_type {}; 165struct is_generator<std::string> : std::true_type {};
diff --git a/src/lib/eolian_cxx/grammar/type.hpp b/src/lib/eolian_cxx/grammar/type.hpp
index 8a09b6e199..4eb08ac55e 100644
--- a/src/lib/eolian_cxx/grammar/type.hpp
+++ b/src/lib/eolian_cxx/grammar/type.hpp
@@ -46,6 +46,8 @@ type_generator const as_generator(type_terminal)
46template <> 46template <>
47struct is_eager_generator<type_generator> : std::true_type {}; 47struct is_eager_generator<type_generator> : std::true_type {};
48template <> 48template <>
49struct is_generator<type_generator> : std::true_type {};
50template <>
49struct is_generator<type_terminal> : std::true_type {}; 51struct is_generator<type_terminal> : std::true_type {};
50 52
51namespace type_traits { 53namespace type_traits {
diff --git a/src/tests/eo_mono/Main.cs b/src/tests/eo_mono/Main.cs
index 00b9054a7c..4c2b73db6c 100644
--- a/src/tests/eo_mono/Main.cs
+++ b/src/tests/eo_mono/Main.cs
@@ -1,452 +1,28 @@
1using System; 1using System;
2using System.Runtime.InteropServices; 2using System.Runtime.InteropServices;
3 3
4public class BoxInherit : evas.Box 4public class MyBox : evas.BoxInherit
5{ 5{
6 System.IntPtr handle; 6 public MyBox(efl.Object parent) : base(parent) {}
7 System.IntPtr klass;
8 public System.IntPtr raw_handle {
9 get { return handle; }
10 }
11 [System.Runtime.InteropServices.DllImport("evas")] static extern System.IntPtr
12 evas_box_class_get();
13 public delegate byte class_initializer_delegate(IntPtr klass);
14 7
15 [DllImport("dl")] static extern System.IntPtr dlsym 8 [DllImport("evas")] static extern void evas_obj_box_layout_vertical(IntPtr obj, IntPtr data, IntPtr privdata);
16 (IntPtr handle, [MarshalAs(UnmanagedType.LPStr)] String name); 9 [DllImport("evas")] static extern void evas_obj_box_layout_horizontal(IntPtr obj, IntPtr data, IntPtr privdata);
10 [DllImport("evas")] static extern void evas_object_box_layout_horizontal(IntPtr obj, IntPtr data, IntPtr privdata);
11 [DllImport("evas")] static extern IntPtr evas_object_evas_get(IntPtr obj);
12 [DllImport("evas")] static extern void evas_event_freeze(IntPtr obj);
13 [DllImport("evas")] static extern void evas_event_thaw(IntPtr obj);
17 14
18 delegate Evas_Object_Box_Option append_delegate(IntPtr handle, IntPtr pd, [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.CustomMarshaler, /*System.Runtime.InteropServices.*/MarshalTypeRef = typeof(efl.eo.MarshalTest))] efl.canvas.Object child); 15 override public void group_calculate()
19 static Evas_Object_Box_Option append_override(IntPtr handle, IntPtr pd, [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.CustomMarshaler, /*System.Runtime.InteropServices.*/MarshalTypeRef = typeof(efl.eo.MarshalTest))] efl.canvas.Object child) 16 {
20 { 17 IntPtr evas = evas_object_evas_get(raw_handle);
21 EolianPD epd = (EolianPD)Marshal.PtrToStructure(pd, typeof(EolianPD)); 18 evas_event_freeze(evas);
22 GCHandle gch = GCHandle.FromIntPtr(epd.pointer); 19 Console.WriteLine("called group_calculate");
23 BoxInherit self = (BoxInherit)gch.Target; 20 layouting_set(true);
24 return self.append(child); 21 evas_obj_box_layout_vertical(raw_handle, IntPtr.Zero, IntPtr.Zero);
25 } 22 layouting_set(false);
26 static append_delegate append_override_delegate = new append_delegate(BoxInherit.append_override); 23 children_changed_set(false);
27 24 evas_event_thaw(evas);
28 public static byte class_initializer(IntPtr klass) 25 }
29 {
30 System.Console.WriteLine("class_initializer");
31
32 Efl_Op_Description descs_struct;
33
34 //descs_struct[0].api_func = (IntPtr)evas_obj_box_append;
35 descs_struct.api_func = dlsym(IntPtr.Zero, "evas_obj_box_append");
36 descs_struct.func = Marshal.GetFunctionPointerForDelegate(append_override_delegate);
37
38 IntPtr descs = Marshal.AllocHGlobal(Marshal.SizeOf(descs_struct)*1);
39 Marshal.StructureToPtr(descs_struct, descs, false);
40
41 Efl_Object_Ops ops_struct;
42 ops_struct.descs = descs;
43 ops_struct.count = (UIntPtr)1;
44
45 IntPtr ops = Marshal.AllocHGlobal(Marshal.SizeOf(ops_struct));
46 Marshal.StructureToPtr(ops_struct, ops, false);
47
48 efl.eo.Globals.efl_class_functions_set(klass, ops, IntPtr.Zero);
49 return 1;
50 }
51 static class_initializer_delegate class_initializer_delegate_inst = new class_initializer_delegate(BoxInherit.class_initializer);
52 public BoxInherit(efl.Object parent = null)
53 {
54 ClassDescription description;
55 description.version = 2; // EO_VERSION
56 description.name = "BoxInherit";
57 description.class_type = 0; // REGULAR
58 description.data_size = (UIntPtr)8;
59 description.class_initializer = Marshal.GetFunctionPointerForDelegate(class_initializer_delegate_inst);
60 description.class_constructor = IntPtr.Zero;
61 description.class_destructor = IntPtr.Zero;
62
63 IntPtr pnt = Marshal.AllocHGlobal(Marshal.SizeOf(description));
64 Marshal.StructureToPtr(description, pnt, false);
65
66 IntPtr base_klass = evas_box_class_get();
67 Console.WriteLine("Going to register!");
68 klass = efl.eo.Globals.efl_class_new(pnt, base_klass, IntPtr.Zero);
69 if(klass == IntPtr.Zero)
70 Console.WriteLine("klass was not registed");
71 Console.WriteLine("Registered?");
72
73 System.IntPtr parent_ptr = System.IntPtr.Zero;
74 if(parent != null)
75 parent_ptr = parent.raw_handle;
76
77 Console.WriteLine("Instantiating?");
78 System.IntPtr eo = efl.eo.Globals._efl_add_internal_start("file", 0, klass, parent_ptr, 0, 0);
79 handle = efl.eo.Globals._efl_add_end(eo, 0, 0);
80 IntPtr pd = efl.eo.Globals.efl_data_scope_get(handle, klass);
81 {
82 GCHandle gch = GCHandle.Alloc(this);
83 EolianPD epd;
84 epd.pointer = GCHandle.ToIntPtr(gch);
85 Marshal.StructureToPtr(epd, pd, false);
86 }
87 Console.WriteLine("Instantiated?");
88 }
89 public BoxInherit(System.IntPtr raw)
90 {
91 handle = raw;
92 }
93 [System.Runtime.InteropServices.DllImport("evas")] static extern void evas_obj_box_align_get(System.IntPtr obj, double horizontal, double vertical);
94 public void align_get(double horizontal, double vertical) { evas_obj_box_align_get(handle, horizontal, vertical); }
95 [System.Runtime.InteropServices.DllImport("evas")] static extern void evas_obj_box_align_set(System.IntPtr obj, double horizontal, double vertical);
96 public void align_set(double horizontal, double vertical) { evas_obj_box_align_set(handle, horizontal, vertical); }
97 [System.Runtime.InteropServices.DllImport("evas")] static extern void evas_obj_box_padding_get(System.IntPtr obj, evas.Coord horizontal, evas.Coord vertical);
98 public void padding_get(evas.Coord horizontal, evas.Coord vertical) { evas_obj_box_padding_get(handle, horizontal, vertical); }
99 [System.Runtime.InteropServices.DllImport("evas")] static extern void evas_obj_box_padding_set(System.IntPtr obj, evas.Coord horizontal, evas.Coord vertical);
100 public void padding_set(evas.Coord horizontal, evas.Coord vertical) { evas_obj_box_padding_set(handle, horizontal, vertical); }
101 [System.Runtime.InteropServices.DllImport("evas")] static extern void evas_obj_box_layout_set(System.IntPtr obj, Evas_Object_Box_Layout cb, System.IntPtr data, Eina_Free_Cb free_data);
102 public void layout_set(Evas_Object_Box_Layout cb, System.IntPtr data, Eina_Free_Cb free_data) { evas_obj_box_layout_set(handle, cb, data, free_data); }
103 [System.Runtime.InteropServices.DllImport("evas")] static extern efl.canvas.Object evas_obj_box_internal_remove(System.IntPtr obj, [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.CustomMarshaler, /*System.Runtime.InteropServices.*/MarshalTypeRef = typeof(efl.eo.MarshalTest))] efl.canvas.Object child);
104 public efl.canvas.Object internal_remove( efl.canvas.Object child) { return evas_obj_box_internal_remove(handle, child); }
105 [System.Runtime.InteropServices.DllImport("evas")] static extern bool evas_obj_box_remove_all(System.IntPtr obj, bool clear);
106 public bool remove_all(bool clear) { return evas_obj_box_remove_all(handle, clear); }
107 [System.Runtime.InteropServices.DllImport("evas")] static extern int evas_obj_box_iterator_new(System.IntPtr obj);
108 public int iterator_new() { return evas_obj_box_iterator_new(handle); }
109 [System.Runtime.InteropServices.DllImport("evas")] static extern efl.canvas.Object evas_obj_box_add_to(System.IntPtr obj);
110 public efl.canvas.Object add_to() { return evas_obj_box_add_to(handle); }
111 [System.Runtime.InteropServices.DllImport("evas")] static extern Evas_Object_Box_Option evas_obj_box_append(System.IntPtr obj, [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.CustomMarshaler, /*System.Runtime.InteropServices.*/MarshalTypeRef = typeof(efl.eo.MarshalTest))] efl.canvas.Object child);
112 public Evas_Object_Box_Option append( efl.canvas.Object child) { return evas_obj_box_append(efl.eo.Globals.efl_super(handle, klass), child); }
113 [System.Runtime.InteropServices.DllImport("evas")] static extern int evas_obj_box_option_property_id_get(System.IntPtr obj, System.String name);
114 public int option_property_id_get( System.String name) { return evas_obj_box_option_property_id_get(handle, name); }
115 [System.Runtime.InteropServices.DllImport("evas")] static extern int evas_obj_box_accessor_new(System.IntPtr obj);
116 public int accessor_new() { return evas_obj_box_accessor_new(handle); }
117 [System.Runtime.InteropServices.DllImport("evas")] static extern efl.canvas.Object evas_obj_box_internal_remove_at(System.IntPtr obj, uint pos);
118 public efl.canvas.Object internal_remove_at( uint pos) { return evas_obj_box_internal_remove_at(handle, pos); }
119 [System.Runtime.InteropServices.DllImport("evas")] static extern bool evas_obj_box_remove_at(System.IntPtr obj, uint pos);
120 public bool remove_at( uint pos) { return evas_obj_box_remove_at(handle, pos); }
121 [System.Runtime.InteropServices.DllImport("evas")] static extern System.String evas_obj_box_option_property_name_get(System.IntPtr obj, int property);
122 public System.String option_property_name_get(int property) { return evas_obj_box_option_property_name_get(handle, property); }
123 [System.Runtime.InteropServices.DllImport("evas")] static extern bool evas_obj_box_remove(System.IntPtr obj, [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.CustomMarshaler, /*System.Runtime.InteropServices.*/MarshalTypeRef = typeof(efl.eo.MarshalTest))] efl.canvas.Object child);
124 public bool remove( efl.canvas.Object child) { return evas_obj_box_remove(handle, child); }
125 [System.Runtime.InteropServices.DllImport("evas")] static extern int evas_obj_box_count(System.IntPtr obj);
126 public int count() { return evas_obj_box_count(handle); }
127 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_position_get(System.IntPtr obj, int x, int y);
128 public void position_get(int x, int y) { efl_gfx_position_get(handle, x, y); }
129 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_position_set(System.IntPtr obj, int x, int y);
130 public void position_set(int x, int y) { efl_gfx_position_set(handle, x, y); }
131 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_size_get(System.IntPtr obj, int w, int h);
132 public void size_get(int w, int h) { efl_gfx_size_get(handle, w, h); }
133 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_size_set(System.IntPtr obj, int w, int h);
134 public void size_set(int w, int h) { efl_gfx_size_set(handle, w, h); }
135 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_geometry_get(System.IntPtr obj, int x, int y, int w, int h);
136 public void geometry_get(int x, int y, int w, int h) { efl_gfx_geometry_get(handle, x, y, w, h); }
137 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_geometry_set(System.IntPtr obj, int x, int y, int w, int h);
138 public void geometry_set(int x, int y, int w, int h) { efl_gfx_geometry_set(handle, x, y, w, h); }
139 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_color_get(System.IntPtr obj, int r, int g, int b, int a);
140 public void color_get(int r, int g, int b, int a) { efl_gfx_color_get(handle, r, g, b, a); }
141 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_color_set(System.IntPtr obj, int r, int g, int b, int a);
142 public void color_set(int r, int g, int b, int a) { efl_gfx_color_set(handle, r, g, b, a); }
143 [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_gfx_color_part_get(System.IntPtr obj, System.String part, int r, int g, int b, int a);
144 public bool color_part_get( System.String part, int r, int g, int b, int a) { return efl_gfx_color_part_get(handle, part, r, g, b, a); }
145 [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_gfx_color_part_set(System.IntPtr obj, System.String part, int r, int g, int b, int a);
146 public bool color_part_set( System.String part, int r, int g, int b, int a) { return efl_gfx_color_part_set(handle, part, r, g, b, a); }
147 [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_gfx_visible_get(System.IntPtr obj);
148 public bool visible_get() { return efl_gfx_visible_get(handle); }
149 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_visible_set(System.IntPtr obj, bool v);
150 public void visible_set(bool v) { efl_gfx_visible_set(handle, v); }
151 [System.Runtime.InteropServices.DllImport("evas")] static extern efl.Object efl_parent_get(System.IntPtr obj);
152 public efl.Object parent_get() { return efl_parent_get(handle); }
153 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_parent_set(System.IntPtr obj, [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.CustomMarshaler, /*System.Runtime.InteropServices.*/MarshalTypeRef = typeof(efl.eo.MarshalTest))] efl.Object parent);
154 public void parent_set( efl.Object parent) { efl_parent_set(handle, parent); }
155 [System.Runtime.InteropServices.DllImport("evas")] static extern System.String efl_name_get(System.IntPtr obj);
156 public System.String name_get() { return efl_name_get(handle); }
157 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_name_set(System.IntPtr obj, System.String name);
158 public void name_set( System.String name) { efl_name_set(handle, name); }
159 [System.Runtime.InteropServices.DllImport("evas")] static extern System.String efl_comment_get(System.IntPtr obj);
160 public System.String comment_get() { return efl_comment_get(handle); }
161 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_comment_set(System.IntPtr obj, System.String comment);
162 public void comment_set( System.String comment) { efl_comment_set(handle, comment); }
163 [System.Runtime.InteropServices.DllImport("evas")] static extern int efl_event_global_freeze_count_get(System.IntPtr obj);
164 public int event_global_freeze_count_get() { return efl_event_global_freeze_count_get(handle); }
165 [System.Runtime.InteropServices.DllImport("evas")] static extern int efl_event_freeze_count_get(System.IntPtr obj);
166 public int event_freeze_count_get() { return efl_event_freeze_count_get(handle); }
167 [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_finalized_get(System.IntPtr obj);
168 public bool finalized_get() { return efl_finalized_get(handle); }
169 [System.Runtime.InteropServices.DllImport("evas")] static extern System.IntPtr efl_key_data_get(System.IntPtr obj, System.String key);
170 public System.IntPtr key_data_get( System.String key) { return efl_key_data_get(handle, key); }
171 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_key_data_set(System.IntPtr obj, System.String key, System.IntPtr data);
172 public void key_data_set( System.String key, System.IntPtr data) { efl_key_data_set(handle, key, data); }
173 [System.Runtime.InteropServices.DllImport("evas")] static extern efl.Object efl_key_ref_get(System.IntPtr obj, System.String key);
174 public efl.Object key_ref_get( System.String key) { return efl_key_ref_get(handle, key); }
175 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_key_ref_set(System.IntPtr obj, System.String key, [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.CustomMarshaler, /*System.Runtime.InteropServices.*/MarshalTypeRef = typeof(efl.eo.MarshalTest))] efl.Object objdata);
176 public void key_ref_set( System.String key, efl.Object objdata) { efl_key_ref_set(handle, key, objdata); }
177 [System.Runtime.InteropServices.DllImport("evas")] static extern efl.Object efl_key_wref_get(System.IntPtr obj, System.String key);
178 public efl.Object key_wref_get( System.String key) { return efl_key_wref_get(handle, key); }
179 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_key_wref_set(System.IntPtr obj, System.String key, [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.CustomMarshaler, /*System.Runtime.InteropServices.*/MarshalTypeRef = typeof(efl.eo.MarshalTest))] efl.Object objdata);
180 public void key_wref_set( System.String key, efl.Object objdata) { efl_key_wref_set(handle, key, objdata); }
181 [System.Runtime.InteropServices.DllImport("evas")] static extern int efl_key_value_get(System.IntPtr obj, System.String key);
182 public int key_value_get( System.String key) { return efl_key_value_get(handle, key); }
183 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_key_value_set(System.IntPtr obj, System.String key, int value);
184 public void key_value_set( System.String key, int value) { efl_key_value_set(handle, key, value); }
185 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_del(System.IntPtr obj);
186 public void del() { efl_del(handle); }
187 [System.Runtime.InteropServices.DllImport("evas")] static extern efl.Object efl_provider_find(System.IntPtr obj, [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.CustomMarshaler, /*System.Runtime.InteropServices.*/MarshalTypeRef = typeof(efl.eo.MarshalTest))] efl.Object klass);
188 public efl.Object provider_find( efl.Object klass) { return efl_provider_find(handle, klass); }
189 [System.Runtime.InteropServices.DllImport("evas")] static extern efl.Object efl_constructor(System.IntPtr obj);
190 public efl.Object constructor() { return efl_constructor(handle); }
191 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_destructor(System.IntPtr obj);
192 public void destructor() { efl_destructor(handle); }
193 [System.Runtime.InteropServices.DllImport("evas")] static extern efl.Object efl_finalize(System.IntPtr obj);
194 public efl.Object finalize() { return efl_finalize(handle); }
195 [System.Runtime.InteropServices.DllImport("evas")] static extern efl.Object efl_name_find(System.IntPtr obj, System.String search);
196 public efl.Object name_find( System.String search) { return efl_name_find(handle, search); }
197 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_wref_add(System.IntPtr obj, [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.CustomMarshaler, /*System.Runtime.InteropServices.*/MarshalTypeRef = typeof(efl.eo.MarshalTest))] efl.Object wref);
198 public void wref_add( efl.Object wref) { efl_wref_add(handle, wref); }
199 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_wref_del(System.IntPtr obj, [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.CustomMarshaler, /*System.Runtime.InteropServices.*/MarshalTypeRef = typeof(efl.eo.MarshalTest))] efl.Object wref);
200 public void wref_del( efl.Object wref) { efl_wref_del(handle, wref); }
201 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_event_thaw(System.IntPtr obj);
202 public void event_thaw() { efl_event_thaw(handle); }
203 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_event_freeze(System.IntPtr obj);
204 public void event_freeze() { efl_event_freeze(handle); }
205 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_event_global_thaw(System.IntPtr obj);
206 public void event_global_thaw() { efl_event_global_thaw(handle); }
207 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_event_global_freeze(System.IntPtr obj);
208 public void event_global_freeze() { efl_event_global_freeze(handle); }
209 [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_event_callback_priority_add(System.IntPtr obj, efl.kw_event.Description desc, efl.Callback_Priority priority, efl.Event_Cb cb, System.IntPtr data);
210 public bool event_callback_priority_add(efl.kw_event.Description desc, efl.Callback_Priority priority, efl.Event_Cb cb, System.IntPtr data) { return efl_event_callback_priority_add(handle, desc, priority, cb, data); }
211 [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_event_callback_del(System.IntPtr obj, efl.kw_event.Description desc, efl.Event_Cb func, System.IntPtr user_data);
212 public bool event_callback_del(efl.kw_event.Description desc, efl.Event_Cb func, System.IntPtr user_data) { return efl_event_callback_del(handle, desc, func, user_data); }
213 [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_event_callback_array_priority_add(System.IntPtr obj, efl.Callback_Array_Item array, efl.Callback_Priority priority, System.IntPtr data);
214 public bool event_callback_array_priority_add(efl.Callback_Array_Item array, efl.Callback_Priority priority, System.IntPtr data) { return efl_event_callback_array_priority_add(handle, array, priority, data); }
215 [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_event_callback_array_del(System.IntPtr obj, efl.Callback_Array_Item array, System.IntPtr user_data);
216 public bool event_callback_array_del(efl.Callback_Array_Item array, System.IntPtr user_data) { return efl_event_callback_array_del(handle, array, user_data); }
217 [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_event_callback_call(System.IntPtr obj, efl.kw_event.Description desc, System.IntPtr event_info);
218 public bool event_callback_call(efl.kw_event.Description desc, System.IntPtr event_info) { return efl_event_callback_call(handle, desc, event_info); }
219 [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_event_callback_legacy_call(System.IntPtr obj, efl.kw_event.Description desc, System.IntPtr event_info);
220 public bool event_callback_legacy_call(efl.kw_event.Description desc, System.IntPtr event_info) { return efl_event_callback_legacy_call(handle, desc, event_info); }
221 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_event_callback_stop(System.IntPtr obj);
222 public void event_callback_stop() { efl_event_callback_stop(handle); }
223 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_event_callback_forwarder_add(System.IntPtr obj, efl.kw_event.Description desc, [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.CustomMarshaler, /*System.Runtime.InteropServices.*/MarshalTypeRef = typeof(efl.eo.MarshalTest))] efl.Object new_obj);
224 public void event_callback_forwarder_add(efl.kw_event.Description desc, efl.Object new_obj) { efl_event_callback_forwarder_add(handle, desc, new_obj); }
225 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_event_callback_forwarder_del(System.IntPtr obj, efl.kw_event.Description desc, [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.CustomMarshaler, /*System.Runtime.InteropServices.*/MarshalTypeRef = typeof(efl.eo.MarshalTest))] efl.Object new_obj);
226 public void event_callback_forwarder_del(efl.kw_event.Description desc, efl.Object new_obj) { efl_event_callback_forwarder_del(handle, desc, new_obj); }
227 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_dbg_info_get(System.IntPtr obj, efl.Dbg_Info root_node);
228 public void dbg_info_get(efl.Dbg_Info root_node) { efl_dbg_info_get(handle, root_node); }
229 [System.Runtime.InteropServices.DllImport("evas")] static extern int efl_children_iterator_new(System.IntPtr obj);
230 public int children_iterator_new() { return efl_children_iterator_new(handle); }
231 [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_composite_attach(System.IntPtr obj, [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.CustomMarshaler, /*System.Runtime.InteropServices.*/MarshalTypeRef = typeof(efl.eo.MarshalTest))] efl.Object comp_obj);
232 public bool composite_attach( efl.Object comp_obj) { return efl_composite_attach(handle, comp_obj); }
233 [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_composite_detach(System.IntPtr obj, [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.CustomMarshaler, /*System.Runtime.InteropServices.*/MarshalTypeRef = typeof(efl.eo.MarshalTest))] efl.Object comp_obj);
234 public bool composite_detach( efl.Object comp_obj) { return efl_composite_detach(handle, comp_obj); }
235 [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_composite_part_is(System.IntPtr obj);
236 public bool composite_part_is() { return efl_composite_part_is(handle); }
237 [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_future_link(System.IntPtr obj, int link);
238 public bool future_link( int link) { return efl_future_link(handle, link); }
239 [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_canvas_group_need_recalculate_get(System.IntPtr obj);
240 public bool group_need_recalculate_get() { return efl_canvas_group_need_recalculate_get(handle); }
241 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_canvas_group_need_recalculate_set(System.IntPtr obj, bool value);
242 public void group_need_recalculate_set(bool value) { efl_canvas_group_need_recalculate_set(handle, value); }
243 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_canvas_group_change(System.IntPtr obj);
244 public void group_change() { efl_canvas_group_change(handle); }
245 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_canvas_group_calculate(System.IntPtr obj);
246 public void group_calculate() { efl_canvas_group_calculate(handle); }
247 [System.Runtime.InteropServices.DllImport("evas")] static extern int efl_canvas_group_children_iterate(System.IntPtr obj);
248 public int group_children_iterate() { return efl_canvas_group_children_iterate(handle); }
249 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_canvas_group_member_add(System.IntPtr obj, [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.CustomMarshaler, /*System.Runtime.InteropServices.*/MarshalTypeRef = typeof(efl.eo.MarshalTest))] efl.canvas.Object sub_obj);
250 public void group_member_add( efl.canvas.Object sub_obj) { efl_canvas_group_member_add(handle, sub_obj); }
251 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_canvas_group_member_del(System.IntPtr obj, [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.CustomMarshaler, /*System.Runtime.InteropServices.*/MarshalTypeRef = typeof(efl.eo.MarshalTest))] efl.canvas.Object sub_obj);
252 public void group_member_del( efl.canvas.Object sub_obj) { efl_canvas_group_member_del(handle, sub_obj); }
253 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_canvas_group_add(System.IntPtr obj);
254 public void group_add() { efl_canvas_group_add(handle); }
255 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_canvas_group_del(System.IntPtr obj);
256 public void group_del() { efl_canvas_group_del(handle); }
257 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_canvas_object_type_set(System.IntPtr obj, System.String type);
258 public void type_set( System.String type) { efl_canvas_object_type_set(handle, type); }
259 [System.Runtime.InteropServices.DllImport("evas")] static extern efl.input.Object_Pointer_Mode efl_canvas_object_pointer_mode_get(System.IntPtr obj);
260 public efl.input.Object_Pointer_Mode pointer_mode_get() { return efl_canvas_object_pointer_mode_get(handle); }
261 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_canvas_object_pointer_mode_set(System.IntPtr obj, efl.input.Object_Pointer_Mode pointer_mode);
262 public void pointer_mode_set(efl.input.Object_Pointer_Mode pointer_mode) { efl_canvas_object_pointer_mode_set(handle, pointer_mode); }
263 [System.Runtime.InteropServices.DllImport("evas")] static extern efl.gfx.Render_Op efl_canvas_object_render_op_get(System.IntPtr obj);
264 public efl.gfx.Render_Op render_op_get() { return efl_canvas_object_render_op_get(handle); }
265 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_canvas_object_render_op_set(System.IntPtr obj, efl.gfx.Render_Op render_op);
266 public void render_op_set(efl.gfx.Render_Op render_op) { efl_canvas_object_render_op_set(handle, render_op); }
267 [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_canvas_object_freeze_events_get(System.IntPtr obj);
268 public bool freeze_events_get() { return efl_canvas_object_freeze_events_get(handle); }
269 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_canvas_object_freeze_events_set(System.IntPtr obj, bool freeze);
270 public void freeze_events_set(bool freeze) { efl_canvas_object_freeze_events_set(handle, freeze); }
271 [System.Runtime.InteropServices.DllImport("evas")] static extern efl.canvas.Object efl_canvas_object_clip_get(System.IntPtr obj);
272 public efl.canvas.Object clip_get() { return efl_canvas_object_clip_get(handle); }
273 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_canvas_object_clip_set(System.IntPtr obj, [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.CustomMarshaler, /*System.Runtime.InteropServices.*/MarshalTypeRef = typeof(efl.eo.MarshalTest))] efl.canvas.Object clip);
274 public void clip_set( efl.canvas.Object clip) { efl_canvas_object_clip_set(handle, clip); }
275 [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_canvas_object_repeat_events_get(System.IntPtr obj);
276 public bool repeat_events_get() { return efl_canvas_object_repeat_events_get(handle); }
277 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_canvas_object_repeat_events_set(System.IntPtr obj, bool repeat);
278 public void repeat_events_set(bool repeat) { efl_canvas_object_repeat_events_set(handle, repeat); }
279 [System.Runtime.InteropServices.DllImport("evas")] static extern double efl_canvas_object_scale_get(System.IntPtr obj);
280 public double scale_get() { return efl_canvas_object_scale_get(handle); }
281 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_canvas_object_scale_set(System.IntPtr obj, double scale);
282 public void scale_set(double scale) { efl_canvas_object_scale_set(handle, scale); }
283 [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_canvas_object_key_focus_get(System.IntPtr obj);
284 public bool key_focus_get() { return efl_canvas_object_key_focus_get(handle); }
285 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_canvas_object_key_focus_set(System.IntPtr obj, bool focus);
286 public void key_focus_set(bool focus) { efl_canvas_object_key_focus_set(handle, focus); }
287 [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_canvas_object_is_frame_object_get(System.IntPtr obj);
288 public bool is_frame_object_get() { return efl_canvas_object_is_frame_object_get(handle); }
289 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_canvas_object_is_frame_object_set(System.IntPtr obj, bool is_frame);
290 public void is_frame_object_set(bool is_frame) { efl_canvas_object_is_frame_object_set(handle, is_frame); }
291 [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_canvas_object_precise_is_inside_get(System.IntPtr obj);
292 public bool precise_is_inside_get() { return efl_canvas_object_precise_is_inside_get(handle); }
293 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_canvas_object_precise_is_inside_set(System.IntPtr obj, bool precise);
294 public void precise_is_inside_set(bool precise) { efl_canvas_object_precise_is_inside_set(handle, precise); }
295 [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_canvas_object_propagate_events_get(System.IntPtr obj);
296 public bool propagate_events_get() { return efl_canvas_object_propagate_events_get(handle); }
297 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_canvas_object_propagate_events_set(System.IntPtr obj, bool propagate);
298 public void propagate_events_set(bool propagate) { efl_canvas_object_propagate_events_set(handle, propagate); }
299 [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_canvas_object_pass_events_get(System.IntPtr obj);
300 public bool pass_events_get() { return efl_canvas_object_pass_events_get(handle); }
301 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_canvas_object_pass_events_set(System.IntPtr obj, bool pass);
302 public void pass_events_set(bool pass) { efl_canvas_object_pass_events_set(handle, pass); }
303 [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_canvas_object_anti_alias_get(System.IntPtr obj);
304 public bool anti_alias_get() { return efl_canvas_object_anti_alias_get(handle); }
305 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_canvas_object_anti_alias_set(System.IntPtr obj, bool anti_alias);
306 public void anti_alias_set(bool anti_alias) { efl_canvas_object_anti_alias_set(handle, anti_alias); }
307 [System.Runtime.InteropServices.DllImport("evas")] static extern int efl_canvas_object_clipees_get(System.IntPtr obj);
308 public int clipees_get() { return efl_canvas_object_clipees_get(handle); }
309 [System.Runtime.InteropServices.DllImport("evas")] static extern efl.canvas.Object efl_canvas_object_render_parent_get(System.IntPtr obj);
310 public efl.canvas.Object render_parent_get() { return efl_canvas_object_render_parent_get(handle); }
311 [System.Runtime.InteropServices.DllImport("evas")] static extern efl.text.Bidirectional_Type efl_canvas_object_paragraph_direction_get(System.IntPtr obj);
312 public efl.text.Bidirectional_Type paragraph_direction_get() { return efl_canvas_object_paragraph_direction_get(handle); }
313 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_canvas_object_paragraph_direction_set(System.IntPtr obj, efl.text.Bidirectional_Type dir);
314 public void paragraph_direction_set(efl.text.Bidirectional_Type dir) { efl_canvas_object_paragraph_direction_set(handle, dir); }
315 [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_canvas_object_no_render_get(System.IntPtr obj);
316 public bool no_render_get() { return efl_canvas_object_no_render_get(handle); }
317 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_canvas_object_no_render_set(System.IntPtr obj, bool enable);
318 public void no_render_set(bool enable) { efl_canvas_object_no_render_set(handle, enable); }
319 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_canvas_object_legacy_ctor(System.IntPtr obj);
320 public void legacy_ctor() { efl_canvas_object_legacy_ctor(handle); }
321 [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_canvas_object_clipees_has(System.IntPtr obj);
322 public bool clipees_has() { return efl_canvas_object_clipees_has(handle); }
323 [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_canvas_object_key_grab(System.IntPtr obj, System.String keyname, evas.Modifier_Mask modifiers, evas.Modifier_Mask not_modifiers, bool exclusive);
324 public bool key_grab( System.String keyname, evas.Modifier_Mask modifiers, evas.Modifier_Mask not_modifiers, bool exclusive) { return efl_canvas_object_key_grab(handle, keyname, modifiers, not_modifiers, exclusive); }
325 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_canvas_object_key_ungrab(System.IntPtr obj, System.String keyname, evas.Modifier_Mask modifiers, evas.Modifier_Mask not_modifiers);
326 public void key_ungrab( System.String keyname, evas.Modifier_Mask modifiers, evas.Modifier_Mask not_modifiers) { efl_canvas_object_key_ungrab(handle, keyname, modifiers, not_modifiers); }
327 [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_gfx_map_enable_get(System.IntPtr obj);
328 public bool map_enable_get() { return efl_gfx_map_enable_get(handle); }
329 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_map_enable_set(System.IntPtr obj, bool enabled);
330 public void map_enable_set(bool enabled) { efl_gfx_map_enable_set(handle, enabled); }
331 [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_gfx_map_clockwise_get(System.IntPtr obj);
332 public bool map_clockwise_get() { return efl_gfx_map_clockwise_get(handle); }
333 [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_gfx_map_smooth_get(System.IntPtr obj);
334 public bool map_smooth_get() { return efl_gfx_map_smooth_get(handle); }
335 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_map_smooth_set(System.IntPtr obj, bool smooth);
336 public void map_smooth_set(bool smooth) { efl_gfx_map_smooth_set(handle, smooth); }
337 [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_gfx_map_alpha_get(System.IntPtr obj);
338 public bool map_alpha_get() { return efl_gfx_map_alpha_get(handle); }
339 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_map_alpha_set(System.IntPtr obj, bool alpha);
340 public void map_alpha_set(bool alpha) { efl_gfx_map_alpha_set(handle, alpha); }
341 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_map_point_coord_get(System.IntPtr obj, int idx, double x, double y, double z);
342 public void map_point_coord_get(int idx, double x, double y, double z) { efl_gfx_map_point_coord_get(handle, idx, x, y, z); }
343 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_map_point_coord_set(System.IntPtr obj, int idx, double x, double y, double z);
344 public void map_point_coord_set(int idx, double x, double y, double z) { efl_gfx_map_point_coord_set(handle, idx, x, y, z); }
345 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_map_point_image_uv_get(System.IntPtr obj, int idx, double u, double v);
346 public void map_point_image_uv_get(int idx, double u, double v) { efl_gfx_map_point_image_uv_get(handle, idx, u, v); }
347 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_map_point_image_uv_set(System.IntPtr obj, int idx, double u, double v);
348 public void map_point_image_uv_set(int idx, double u, double v) { efl_gfx_map_point_image_uv_set(handle, idx, u, v); }
349 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_map_color_get(System.IntPtr obj, int idx, int r, int g, int b, int a);
350 public void map_color_get(int idx, int r, int g, int b, int a) { efl_gfx_map_color_get(handle, idx, r, g, b, a); }
351 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_map_color_set(System.IntPtr obj, int idx, int r, int g, int b, int a);
352 public void map_color_set(int idx, int r, int g, int b, int a) { efl_gfx_map_color_set(handle, idx, r, g, b, a); }
353 [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_gfx_map_move_sync_get(System.IntPtr obj);
354 public bool map_move_sync_get() { return efl_gfx_map_move_sync_get(handle); }
355 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_map_move_sync_set(System.IntPtr obj, bool enable);
356 public void map_move_sync_set(bool enable) { efl_gfx_map_move_sync_set(handle, enable); }
357 [System.Runtime.InteropServices.DllImport("evas")] static extern double efl_gfx_map_point_z_get(System.IntPtr obj, int idx);
358 public double map_point_z_get(int idx) { return efl_gfx_map_point_z_get(handle, idx); }
359 [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_gfx_map_populate(System.IntPtr obj, double z);
360 public bool map_populate(double z) { return efl_gfx_map_populate(handle, z); }
361 [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_gfx_map_populate_manual(System.IntPtr obj, double x, double y, double w, double h, double z);
362 public bool map_populate_manual(double x, double y, double w, double h, double z) { return efl_gfx_map_populate_manual(handle, x, y, w, h, z); }
363 [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_gfx_map_rotate(System.IntPtr obj, double degrees, double cx, double cy);
364 public bool map_rotate(double degrees, double cx, double cy) { return efl_gfx_map_rotate(handle, degrees, cx, cy); }
365 [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_gfx_map_zoom(System.IntPtr obj, double zoomx, double zoomy, double cx, double cy);
366 public bool map_zoom(double zoomx, double zoomy, double cx, double cy) { return efl_gfx_map_zoom(handle, zoomx, zoomy, cx, cy); }
367 [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_gfx_map_rotate_3d(System.IntPtr obj, double dx, double dy, double dz, double cx, double cy, double cz);
368 public bool map_rotate_3d(double dx, double dy, double dz, double cx, double cy, double cz) { return efl_gfx_map_rotate_3d(handle, dx, dy, dz, cx, cy, cz); }
369 [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_gfx_map_quat_rotate(System.IntPtr obj, double qx, double qy, double qz, double qw, double cx, double cy, double cz);
370 public bool map_quat_rotate(double qx, double qy, double qz, double qw, double cx, double cy, double cz) { return efl_gfx_map_quat_rotate(handle, qx, qy, qz, qw, cx, cy, cz); }
371 [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_gfx_map_lightning_3d(System.IntPtr obj, double lx, double ly, double lz, int lr, int lg, int lb, int ar, int ag, int ab);
372 public bool map_lightning_3d(double lx, double ly, double lz, int lr, int lg, int lb, int ar, int ag, int ab) { return efl_gfx_map_lightning_3d(handle, lx, ly, lz, lr, lg, lb, ar, ag, ab); }
373 [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_gfx_map_perspective_3d(System.IntPtr obj, double px, double py, double z0, double foc);
374 public bool map_perspective_3d(double px, double py, double z0, double foc) { return efl_gfx_map_perspective_3d(handle, px, py, z0, foc); }
375 [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_gfx_map_dup(System.IntPtr obj, [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.CustomMarshaler, /*System.Runtime.InteropServices.*/MarshalTypeRef = typeof(efl.eo.MarshalTest))] efl.gfx.Map other);
376 public bool map_dup( efl.gfx.Map other) { return efl_gfx_map_dup(handle, other); }
377 [System.Runtime.InteropServices.DllImport("evas")] static extern short efl_gfx_stack_layer_get(System.IntPtr obj);
378 public short layer_get() { return efl_gfx_stack_layer_get(handle); }
379 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_stack_layer_set(System.IntPtr obj, short l);
380 public void layer_set(short l) { efl_gfx_stack_layer_set(handle, l); }
381 [System.Runtime.InteropServices.DllImport("evas")] static extern efl.gfx.Stack efl_gfx_stack_below_get(System.IntPtr obj);
382 public efl.gfx.Stack below_get() { return efl_gfx_stack_below_get(handle); }
383 [System.Runtime.InteropServices.DllImport("evas")] static extern efl.gfx.Stack efl_gfx_stack_above_get(System.IntPtr obj);
384 public efl.gfx.Stack above_get() { return efl_gfx_stack_above_get(handle); }
385 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_stack_below(System.IntPtr obj, [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.CustomMarshaler, /*System.Runtime.InteropServices.*/MarshalTypeRef = typeof(efl.eo.MarshalTest))] efl.gfx.Stack below);
386 public void stack_below( efl.gfx.Stack below) { efl_gfx_stack_below(handle, below); }
387 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_stack_raise(System.IntPtr obj);
388 public void raise() { efl_gfx_stack_raise(handle); }
389 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_stack_above(System.IntPtr obj, [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.CustomMarshaler, /*System.Runtime.InteropServices.*/MarshalTypeRef = typeof(efl.eo.MarshalTest))] efl.gfx.Stack above);
390 public void stack_above( efl.gfx.Stack above) { efl_gfx_stack_above(handle, above); }
391 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_stack_lower(System.IntPtr obj);
392 public void lower() { efl_gfx_stack_lower(handle); }
393 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_size_hint_base_get(System.IntPtr obj, int w, int h);
394 public void hint_base_get(int w, int h) { efl_gfx_size_hint_base_get(handle, w, h); }
395 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_size_hint_base_set(System.IntPtr obj, int w, int h);
396 public void hint_base_set(int w, int h) { efl_gfx_size_hint_base_set(handle, w, h); }
397 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_size_hint_step_get(System.IntPtr obj, int w, int h);
398 public void hint_step_get(int w, int h) { efl_gfx_size_hint_step_get(handle, w, h); }
399 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_size_hint_step_set(System.IntPtr obj, int w, int h);
400 public void hint_step_set(int w, int h) { efl_gfx_size_hint_step_set(handle, w, h); }
401 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_size_hint_aspect_get(System.IntPtr obj, efl.gfx.size.hint.Aspect mode, int w, int h);
402 public void hint_aspect_get(efl.gfx.size.hint.Aspect mode, int w, int h) { efl_gfx_size_hint_aspect_get(handle, mode, w, h); }
403 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_size_hint_aspect_set(System.IntPtr obj, efl.gfx.size.hint.Aspect mode, int w, int h);
404 public void hint_aspect_set(efl.gfx.size.hint.Aspect mode, int w, int h) { efl_gfx_size_hint_aspect_set(handle, mode, w, h); }
405 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_size_hint_max_get(System.IntPtr obj, int w, int h);
406 public void hint_max_get(int w, int h) { efl_gfx_size_hint_max_get(handle, w, h); }
407 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_size_hint_max_set(System.IntPtr obj, int w, int h);
408 public void hint_max_set(int w, int h) { efl_gfx_size_hint_max_set(handle, w, h); }
409 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_size_hint_min_get(System.IntPtr obj, int w, int h);
410 public void hint_min_get(int w, int h) { efl_gfx_size_hint_min_get(handle, w, h); }
411 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_size_hint_min_set(System.IntPtr obj, int w, int h);
412 public void hint_min_set(int w, int h) { efl_gfx_size_hint_min_set(handle, w, h); }
413 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_size_hint_request_get(System.IntPtr obj, int w, int h);
414 public void hint_request_get(int w, int h) { efl_gfx_size_hint_request_get(handle, w, h); }
415 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_size_hint_request_set(System.IntPtr obj, int w, int h);
416 public void hint_request_set(int w, int h) { efl_gfx_size_hint_request_set(handle, w, h); }
417 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_size_hint_restricted_min_get(System.IntPtr obj, int w, int h);
418 public void hint_restricted_min_get(int w, int h) { efl_gfx_size_hint_restricted_min_get(handle, w, h); }
419 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_size_hint_restricted_min_set(System.IntPtr obj, int w, int h);
420 public void hint_restricted_min_set(int w, int h) { efl_gfx_size_hint_restricted_min_set(handle, w, h); }
421 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_size_hint_combined_min_get(System.IntPtr obj, int w, int h);
422 public void hint_combined_min_get(int w, int h) { efl_gfx_size_hint_combined_min_get(handle, w, h); }
423 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_size_hint_margin_get(System.IntPtr obj, int l, int r, int t, int b);
424 public void hint_margin_get(int l, int r, int t, int b) { efl_gfx_size_hint_margin_get(handle, l, r, t, b); }
425 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_size_hint_margin_set(System.IntPtr obj, int l, int r, int t, int b);
426 public void hint_margin_set(int l, int r, int t, int b) { efl_gfx_size_hint_margin_set(handle, l, r, t, b); }
427 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_size_hint_weight_get(System.IntPtr obj, double x, double y);
428 public void hint_weight_get(double x, double y) { efl_gfx_size_hint_weight_get(handle, x, y); }
429 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_size_hint_weight_set(System.IntPtr obj, double x, double y);
430 public void hint_weight_set(double x, double y) { efl_gfx_size_hint_weight_set(handle, x, y); }
431 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_size_hint_align_get(System.IntPtr obj, double x, double y);
432 public void hint_align_get(double x, double y) { efl_gfx_size_hint_align_get(handle, x, y); }
433 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_size_hint_align_set(System.IntPtr obj, double x, double y);
434 public void hint_align_set(double x, double y) { efl_gfx_size_hint_align_set(handle, x, y); }
435 [System.Runtime.InteropServices.DllImport("evas")] static extern efl.gfx.size.hint.Mode efl_gfx_size_hint_display_mode_get(System.IntPtr obj);
436 public efl.gfx.size.hint.Mode hint_display_mode_get() { return efl_gfx_size_hint_display_mode_get(handle); }
437 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_size_hint_display_mode_set(System.IntPtr obj, efl.gfx.size.hint.Mode dispmode);
438 public void hint_display_mode_set(efl.gfx.size.hint.Mode dispmode) { efl_gfx_size_hint_display_mode_set(handle, dispmode); }
439 [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_input_pointer_xy_get(System.IntPtr obj, int x, int y);
440 public void pointer_xy_get(int x, int y) { efl_input_pointer_xy_get(handle, x, y); }
441 [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_input_pointer_inside_get(System.IntPtr obj);
442 public bool pointer_inside_get() { return efl_input_pointer_inside_get(handle); }
443 [System.Runtime.InteropServices.DllImport("evas")] static extern int efl_input_pointer_iterate(System.IntPtr obj, bool hover);
444 public int pointer_iterate(bool hover) { return efl_input_pointer_iterate(handle, hover); }
445}
446
447public class MyBox : BoxInherit
448{
449 public MyBox(efl.Object parent) : base(parent) {}
450} 26}
451 27
452class TestMain 28class TestMain
@@ -475,15 +51,13 @@ class TestMain
475 rect.size_set(640, 480); 51 rect.size_set(640, 480);
476 rect.visible_set(true); 52 rect.visible_set(true);
477 53
478 //evas.Box box = new evas.BoxConcrete(canvas);
479 evas.Box box = new MyBox(canvas); 54 evas.Box box = new MyBox(canvas);
480 // rect.position_set(160, 120);
481 rect.size_set(320, 240); 55 rect.size_set(320, 240);
482 box.visible_set(true); 56 box.visible_set(true);
483 57
484 efl.canvas.Image image1 = new efl.canvas.ImageConcrete(canvas); 58 efl.canvas.Image image1 = new efl.canvas.ImageConcrete(canvas);
485 image1.file_set("/home/felipe/dev/samsung/upstream/efl/src/examples/elementary/sphere_hunter/score.jpg", ""); 59 image1.file_set("/home/felipe/dev/samsung/upstream/efl/src/examples/elementary/sphere_hunter/score.jpg", "");
486 image1.hint_min_set(160, 120); 60 image1.hint_min_set(160, 240);
487 image1.visible_set(true); 61 image1.visible_set(true);
488 62
489 efl.canvas.Image image2 = new efl.canvas.ImageConcrete(canvas); 63 efl.canvas.Image image2 = new efl.canvas.ImageConcrete(canvas);
@@ -491,12 +65,8 @@ class TestMain
491 image2.hint_min_set(160, 120); 65 image2.hint_min_set(160, 120);
492 image2.visible_set(true); 66 image2.visible_set(true);
493 67
494 System.Console.WriteLine("Calling append");
495 box.append(image1); 68 box.append(image1);
496 System.Console.WriteLine("Called append");
497 System.Console.WriteLine("Calling append");
498 box.append(image2); 69 box.append(image2);
499 System.Console.WriteLine("Called append");
500 70
501 loop.begin(); 71 loop.begin();
502 } 72 }