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)
downloadefl-0c1e941bf7c766d9151640bfa58a05f3b7ea8af5.tar.gz
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)
}
}()};
+ as_generator("using System;\nusing System.Runtime.InteropServices;\n")
+ .generate(iterator, efl::eolian::grammar::attributes::unused, efl::eolian::grammar::context_null());
+
if (klass)
{
efl::eolian::grammar::attributes::klass_def klass_def(klass);
std::vector<efl::eolian::grammar::attributes::klass_def> klasses{klass_def};
- eolian_mono::klass.generate(iterator, klass_def, efl::eolian::grammar::context_cons<eolian_mono::library_context>({opts.dllimport}));
+ eolian_mono::klass
+ .generate(iterator, klass_def, efl::eolian::grammar::context_cons<eolian_mono::library_context>({opts.dllimport}));
}
//else
{
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 {
template <>
struct is_eager_generator< ::eolian_mono::enum_definition_generator> : std::true_type {};
+template <>
+struct is_generator< ::eolian_mono::enum_definition_generator> : std::true_type {};
namespace type_traits {
template <>
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 @@
+#ifndef EOLIAN_MONO_FUNCTION_BLACKLIST_HH
+#define EOLIAN_MONO_FUNCTION_BLACKLIST_HH
+
+namespace eolian_mono {
+
+inline bool is_function_blacklisted(std::string const& c_name)
+{
+ return c_name == "efl_constructor"
+ || c_name == "efl_parent_set"
+ || c_name == "efl_parent_get"
+ || c_name == "efl_canvas_object_type_set"
+ || c_name == "efl_provider_find"
+ || c_name == "efl_canvas_group_add"
+ || c_name == "efl_canvas_group_member_add"
+ || c_name == "efl_event_callback_array_priority_add"
+ || c_name == "efl_event_callback_call"
+ || c_name == "efl_finalized_get"
+ || c_name == "efl_finalize"
+ || c_name == "efl_gfx_position_get"
+ || c_name == "efl_gfx_geometry_get"
+ || c_name == "efl_gfx_size_get"
+ || c_name == "efl_event_callback_legacy_call"
+ || c_name == "efl_gfx_visible_get"
+ || c_name == "efl_canvas_group_change"
+ || c_name == "efl_canvas_group_need_recalculate_set"
+ || c_name == "efl_gfx_size_hint_restricted_min_set"
+ || c_name == "efl_gfx_size_hint_max_get"
+ || c_name == "efl_gfx_size_hint_request_get"
+ || c_name == "efl_gfx_size_hint_combined_min_get"
+ || c_name == "efl_event_callback_priority_add"
+ // || c_name == "efl_canvas_group_calculate"
+
+ /*
+ // descs[50].api_func = efl.eo.Globals.dlsym(IntPtr.Zero, "efl_event_callback_priority_add");
+ // descs[50].func = Marshal.GetFunctionPointerForDelegate(BoxNativeInherit.event_callback_priority_add_static_delegate);
+ // descs[51].api_func = efl.eo.Globals.dlsym(IntPtr.Zero, "efl_event_callback_del");
+ // descs[51].func = Marshal.GetFunctionPointerForDelegate(BoxNativeInherit.event_callback_del_static_delegate);
+ // descs[52].api_func = efl.eo.Globals.dlsym(IntPtr.Zero, "efl_event_callback_array_del");
+ // descs[52].func = Marshal.GetFunctionPointerForDelegate(BoxNativeInherit.event_callback_array_del_static_delegate);
+ // descs[53].api_func = efl.eo.Globals.dlsym(IntPtr.Zero, "efl_event_callback_stop");
+ // descs[53].func = Marshal.GetFunctionPointerForDelegate(BoxNativeInherit.event_callback_stop_static_delegate);
+ // descs[54].api_func = efl.eo.Globals.dlsym(IntPtr.Zero, "efl_event_callback_forwarder_add");
+ // descs[54].func = Marshal.GetFunctionPointerForDelegate(BoxNativeInherit.event_callback_forwarder_add_static_delegate);
+ // descs[55].api_func = efl.eo.Globals.dlsym(IntPtr.Zero, "efl_event_callback_forwarder_del");
+ // descs[55].func = Marshal.GetFunctionPointerForDelegate(BoxNativeInherit.event_callback_forwarder_del_static_delegate);
+ */
+ ;
+}
+
+}
+
+#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
template <typename OutputIterator, typename Context>
bool generate(OutputIterator sink, attributes::function_def const& f, Context const& context) const
{
- return as_generator
- (eolian_mono::type(true) << " " << string << "(" << (parameter % ", ") << ");\n")
- .generate(sink, std::make_tuple(f.return_type, escape_keyword(f.name), f.parameters), context);
+ if(is_function_blacklisted(f.c_name))
+ return true;
+ else
+ return as_generator
+ (eolian_mono::type(true) << " " << string << "(" << (parameter % ", ") << ");\n")
+ .generate(sink, std::make_tuple(f.return_type, escape_keyword(f.name), f.parameters), context);
}
};
@@ -33,6 +36,8 @@ namespace efl { namespace eolian { namespace grammar {
template <>
struct is_eager_generator< ::eolian_mono::function_declaration_generator> : std::true_type {};
+template <>
+struct is_generator< ::eolian_mono::function_declaration_generator> : std::true_type {};
namespace type_traits {
template <>
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 @@
namespace eolian_mono {
+struct native_function_definition_generator
+{
+ attributes::klass_def const* klass;
+
+ template <typename OutputIterator, typename Context>
+ bool generate(OutputIterator sink, attributes::function_def const& f, Context const& context) const
+ {
+ if(is_function_blacklisted(f.c_name))
+ return true;
+ else
+ {
+ if(!as_generator
+ (scope_tab << "public delegate "
+ << eolian_mono::marshall_annotation(true) << " " << eolian_mono::marshall_type(true) << " "
+ << string
+ << "_delegate(System.IntPtr obj, System.IntPtr pd"
+ << *grammar::attribute_reorder<1, -1>
+ (
+ (", " << marshall_annotation << " " << marshall_parameter)
+ )
+ << ");\n")
+ .generate(sink, std::make_tuple(f.return_type, f.return_type, escape_keyword(f.name), f.parameters), context))
+ return false;
+
+ std::string return_type;
+ if(!as_generator(eolian_mono::type(true)).generate(std::back_inserter(return_type), f.return_type, context))
+ return false;
+
+ if(!as_generator
+ (scope_tab << "public static "
+ << eolian_mono::marshall_annotation(true) << " " << eolian_mono::marshall_type(true) << " "
+ << string
+ << "(System.IntPtr obj, System.IntPtr pd"
+ << *grammar::attribute_reorder<1, -1>
+ (
+ (", " << marshall_annotation << " " << marshall_parameter)
+ )
+ << ")\n"
+ << scope_tab << "{\n"
+ /****/
+ << scope_tab << scope_tab << "System.Console.WriteLine(\"function " << string << " was called\");\n"
+ /****/
+ << scope_tab << scope_tab << "efl.eo.IWrapper wrapper = efl.eo.Globals.data_get(pd);\n"
+ << scope_tab << scope_tab << "if(wrapper != null)\n"
+ << scope_tab << scope_tab << scope_tab << (return_type != "void" ? "return " : "") << "((" << string << "Inherit)wrapper)." << string
+ << "(" << (argument % ", ") << ");\n"
+ << scope_tab << scope_tab << "else\n"
+ << scope_tab << scope_tab << scope_tab << (return_type != "void" ? "return " : "") << string << "Inherit." << string
+ << "(efl.eo.Globals.efl_super(obj, " << string << "Inherit.klass)" << *(", " << argument) << ");\n"
+ << scope_tab << "}\n"
+ )
+ .generate(sink, std::make_tuple(f.return_type, f.return_type, escape_keyword(f.name), f.parameters
+ , /***/f.c_name/***/
+ , klass->cxx_name, escape_keyword(f.name)
+ , f.parameters
+ , klass->cxx_name, f.c_name, klass->cxx_name, f.parameters), context))
+ return false;
+
+ if(!as_generator
+ (scope_tab << "public static "
+ << string
+ << "_delegate "
+ << string << "_static_delegate = new " << string << "_delegate(" << string << "NativeInherit." << string << ");\n"
+ )
+ .generate(sink, std::make_tuple(escape_keyword(f.name), escape_keyword(f.name), escape_keyword(f.name), escape_keyword(klass->cxx_name)
+ , escape_keyword(f.name)), context))
+ return false;
+ return true;
+ }
+ }
+};
+
struct function_definition_generator
{
- function_definition_generator(efl::eina::optional<attributes::klass_def> klass = nullptr)
- : klass(klass)
+ function_definition_generator(bool do_super = false)
+ : do_super(do_super)
{}
template <typename OutputIterator, typename Context>
bool generate(OutputIterator sink, attributes::function_def const& f, Context const& context) const
{
+ if(is_function_blacklisted(f.c_name))
+ return true;
+ else
+ {
if(!as_generator
- (scope_tab << "[System.Runtime.InteropServices.DllImport(\"" << context_find_tag<library_context>(context).library_name << "\")] static extern "
+ (scope_tab << "[System.Runtime.InteropServices.DllImport(\"" << context_find_tag<library_context>(context).library_name << "\")] public static extern "
<< eolian_mono::marshall_annotation(true) << " " << eolian_mono::marshall_type(true) << " "
<< string
<< "(System.IntPtr obj"
@@ -46,34 +122,42 @@ struct function_definition_generator
return false;
if(!as_generator
- (scope_tab << "public " << return_type << " " << string << "(" << (parameter % ", ")
+ (scope_tab << (do_super ? "virtual " : "") << "public " << return_type << " " << string << "(" << (parameter % ", ")
<< ") { "
<< (return_type == "void" ? "":"return ") << string << "("
- ""
- "handle"
- ""
+ << (do_super ? "efl.eo.Globals.efl_super(" : "")
+ << "this.raw_handle"
+ << (do_super ? ", this.raw_klass)" : "")
<< *(", " << argument) << ");"
<< " }\n")
.generate(sink, std::make_tuple(escape_keyword(f.name), f.parameters, f.c_name, f.parameters), context))
return false;
return true;
+ }
}
- efl::eina::optional<attributes::klass_def> klass;
+ bool do_super;
};
struct function_definition_parameterized
{
- function_definition_generator operator()(attributes::klass_def const& klass) const
+ function_definition_generator operator()(bool do_super) const
{
- return {klass};
+ return {do_super};
}
} const function_definition;
function_definition_generator as_generator(function_definition_parameterized)
{
- return {nullptr};
+ return {};
}
+struct native_function_definition_parameterized
+{
+ native_function_definition_generator operator()(attributes::klass_def const& klass) const
+ {
+ return {&klass};
+ }
+} const native_function_definition;
}
@@ -82,11 +166,23 @@ namespace efl { namespace eolian { namespace grammar {
template <>
struct is_eager_generator< ::eolian_mono::function_definition_generator> : std::true_type {};
template <>
+struct is_eager_generator< ::eolian_mono::native_function_definition_generator> : std::true_type {};
+template <>
+struct is_generator< ::eolian_mono::function_definition_generator> : std::true_type {};
+template <>
+struct is_generator< ::eolian_mono::native_function_definition_generator> : std::true_type {};
+template <>
struct is_generator< ::eolian_mono::function_definition_parameterized> : std::true_type {};
namespace type_traits {
template <>
struct attributes_needed< ::eolian_mono::function_definition_generator> : std::integral_constant<int, 1> {};
+
+template <>
+struct attributes_needed< ::eolian_mono::function_definition_parameterized> : std::integral_constant<int, 1> {};
+
+template <>
+struct attributes_needed< ::eolian_mono::native_function_definition_generator> : std::integral_constant<int, 1> {};
}
} } }
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 @@
+#ifndef EOLIAN_MONO_FUNCTION_REGISTRATION_HH
+#define EOLIAN_MONO_FUNCTION_REGISTRATION_HH
+
+#include <Eina.hh>
+
+#include "grammar/generator.hpp"
+#include "grammar/klass_def.hpp"
+
+#include "grammar/indentation.hpp"
+#include "grammar/list.hpp"
+#include "grammar/alternative.hpp"
+#include "grammar/attribute_reorder.hpp"
+#include "type.hh"
+#include "marshall_type.hh"
+#include "parameter.hh"
+#include "keyword.hh"
+#include "using_decl.hh"
+#include "library_context.hh"
+
+namespace eolian_mono {
+
+template <typename I>
+struct function_registration_generator
+{
+ I index_generator;
+ attributes::klass_def const* klass;
+
+ template <typename OutputIterator, typename Context>
+ bool generate(OutputIterator sink, attributes::function_def const& f, Context const& context) const
+ {
+ if(is_function_blacklisted(f.c_name))
+ return true;
+ else
+ {
+ auto index = index_generator();
+
+ if(!as_generator
+ (scope_tab << scope_tab << "descs[" << index << "].api_func = efl.eo.Globals.dlsym(IntPtr.Zero, \"" << string << "\");\n"
+ << scope_tab << scope_tab << "descs[" << index << "].func = Marshal.GetFunctionPointerForDelegate(" << string << "NativeInherit." << string << "_static_delegate);\n"
+ )
+ .generate(sink, std::make_tuple(f.c_name, klass->cxx_name, escape_keyword(f.name)), context))
+ return false;
+ return true;
+ }
+ }
+};
+
+struct function_registration_parameterized
+{
+ template <typename I>
+ function_registration_generator<I> operator()(I i, attributes::klass_def const& klass) const
+ {
+ return {i, &klass};
+ }
+} const function_registration;
+
+}
+
+namespace efl { namespace eolian { namespace grammar {
+
+template <typename I>
+struct is_eager_generator< ::eolian_mono::function_registration_generator<I>> : std::true_type {};
+template <typename I>
+struct is_generator< ::eolian_mono::function_registration_generator<I>> : std::true_type {};
+
+namespace type_traits {
+
+template <typename I>
+struct attributes_needed< ::eolian_mono::function_registration_generator<I>> : std::integral_constant<int, 1> {};
+}
+
+} } }
+
+#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 @@
#ifndef EOLIAN_MONO_CLASS_DEFINITION_HPP
#define EOLIAN_MONO_CLASS_DEFINITION_HPP
+#include "grammar/integral.hpp"
#include "grammar/generator.hpp"
#include "grammar/klass_def.hpp"
+#include "function_blacklist.hh"
#include "grammar/indentation.hpp"
#include "grammar/list.hpp"
@@ -10,13 +12,11 @@
#include "type.hh"
#include "namespace.hh"
#include "function_definition.hh"
+#include "function_registration.hh"
#include "function_declaration.hh"
#include "grammar/string.hpp"
+#include "grammar/integral.hpp"
#include "grammar/case.hpp"
-// #include "grammar/address_of.hpp"
-// #include "grammar/attribute_reorder.hpp"
-// #include "grammar/attribute_conditional.hpp"
-// #include "grammar/attribute_replace.hpp"
#include "using_decl.hh"
namespace eolian_mono {
@@ -84,6 +84,9 @@ struct klass
<< scope_tab << "public System.IntPtr raw_handle {\n"
<< scope_tab << scope_tab << "get { return handle; }\n"
<< scope_tab << "}\n"
+ << scope_tab << "public System.IntPtr raw_klass {\n"
+ << scope_tab << scope_tab << "get { return efl.eo.Globals.efl_class_get(handle); }\n"
+ << scope_tab << "}\n"
<< scope_tab << "[System.Runtime.InteropServices.DllImport(\"" << context_find_tag<library_context>(context).library_name
<< "\")] static extern System.IntPtr\n"
<< scope_tab << scope_tab << class_get_name << "();\n"
@@ -120,33 +123,35 @@ struct klass
if(!as_generator("}\n").generate(sink, attributes::unused, context)) return false;
}
- // Concrete class
+ // Inherit class
if(class_type == "class")
{
if(!as_generator
(
"public " << class_type << " " << string << "Inherit : " << string << "\n{\n"
<< scope_tab << "System.IntPtr handle;\n"
+ << scope_tab << "public static System.IntPtr klass;\n"
<< scope_tab << "public System.IntPtr raw_handle {\n"
<< scope_tab << scope_tab << "get { return handle; }\n"
<< scope_tab << "}\n"
+ << scope_tab << "public System.IntPtr raw_klass {\n"
+ << scope_tab << scope_tab << "get { return klass; }\n"
+ << scope_tab << "}\n"
<< scope_tab << "[System.Runtime.InteropServices.DllImport(\"" << context_find_tag<library_context>(context).library_name
<< "\")] static extern System.IntPtr\n"
<< scope_tab << scope_tab << class_get_name << "();\n"
- << scope_tab << "public " << string << "Inherit(System.Type type, efl.Object parent = null)\n"
+ << scope_tab << "public " << string << "Inherit(efl.Object parent = null, System.Type interface1 = null)\n"
<< scope_tab << "{\n"
- << scope_tab << scope_tab << "System.IntPtr klass = " << class_get_name << "();\n"
- << scope_tab << scope_tab << "System.IntPtr parent_ptr = System.IntPtr.Zero;\n"
- << scope_tab << scope_tab << "if(parent != null)\n"
- << scope_tab << scope_tab << scope_tab << "parent_ptr = parent.raw_handle;\n"
- // << scope_tab << scope_tab << "System.IntPtr eo = _efl_add_internal_start(\"file\", 0, klass, parent_ptr, 0, 0);\n"
- // << scope_tab << scope_tab << "handle = _efl_add_end(eo, 0, 0);\n"
+ << scope_tab << scope_tab << "klass = efl.eo.Globals.register_class(new efl.eo.Globals.class_initializer(" << string << "NativeInherit.class_initializer), " << class_get_name << "());\n"
+ //<< 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"
+ << scope_tab << scope_tab << "handle = efl.eo.Globals.instantiate(klass, parent);\n"
+ << scope_tab << scope_tab << "efl.eo.Globals.data_set(this);\n"
<< scope_tab << "}\n"
)
- .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))
+ .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))
return false;
- if(!as_generator(*(function_definition))
+ if(!as_generator(*(function_definition(true)))
.generate(sink, cls.functions, context)) return false;
for(auto first = std::begin(cls.inherits)
@@ -154,13 +159,85 @@ struct klass
{
attributes::klass_def klass(get_klass(*first));
- if(!as_generator(*(function_definition))
+ if(!as_generator(*(function_definition(true)))
.generate(sink, klass.functions, context)) return false;
}
if(!as_generator("}\n").generate(sink, attributes::unused, context)) return false;
}
+
+ std::size_t function_count = cls.functions.size();
+ for(auto first = std::begin(cls.inherits)
+ , last = std::end(cls.inherits); first != last; ++first)
+ {
+ attributes::klass_def klass(get_klass(*first));
+ function_count += klass.functions.size();
+ }
+ // function_count--;
+
+ int function_registration_index = 0;
+ auto index_generator = [&function_registration_index]
+ {
+ return function_registration_index++;
+ };
+
+ // Native Inherit class
+ if(class_type == "class")
+ {
+ if(!as_generator
+ (
+ "public " << class_type << " " << string << "NativeInherit {\n"
+ << scope_tab << "public static byte class_initializer(IntPtr klass)\n"
+ << scope_tab << "{\n"
+ << scope_tab << scope_tab << "Efl_Op_Description[] descs = new Efl_Op_Description[" << grammar::int_ << "];\n"
+ << *(function_registration(index_generator, cls))
+ )
+ .generate(sink, std::make_tuple(cls.cxx_name, function_count, cls.functions), context))
+ return false;
+ for(auto first = std::begin(cls.inherits)
+ , last = std::end(cls.inherits); first != last; ++first)
+ {
+ attributes::klass_def klass(get_klass(*first));
+ if(!as_generator(*(function_registration(index_generator, cls)))
+ .generate(sink, klass.functions, context)) return false;
+ }
+
+ if(!as_generator
+ ( scope_tab << scope_tab << "IntPtr descs_ptr = Marshal.AllocHGlobal(Marshal.SizeOf(descs[0])*" << function_count << ");\n"
+ << scope_tab << scope_tab << "IntPtr ptr = descs_ptr;\n"
+ << scope_tab << scope_tab << "for(int i = 0; i != " << function_count << "; ++i)\n"
+ << scope_tab << scope_tab << "{\n"
+ << scope_tab << scope_tab << scope_tab << "Marshal.StructureToPtr(descs[i], ptr, false);\n"
+ << scope_tab << scope_tab << scope_tab << "ptr = new IntPtr((long)ptr + Marshal.SizeOf(descs[0]));\n"
+ << scope_tab << scope_tab << "}\n"
+ << scope_tab << scope_tab << "Efl_Object_Ops ops;\n"
+ << scope_tab << scope_tab << "ops.descs = descs_ptr;\n"
+ << scope_tab << scope_tab << "ops.count = (UIntPtr)" << function_count << ";\n"
+ << scope_tab << scope_tab << "IntPtr ops_ptr = Marshal.AllocHGlobal(Marshal.SizeOf(ops));\n"
+ << scope_tab << scope_tab << "Marshal.StructureToPtr(ops, ops_ptr, false);\n"
+ << scope_tab << scope_tab << "efl.eo.Globals.efl_class_functions_set(klass, ops_ptr, IntPtr.Zero);\n"
+ ).generate(sink, attributes::unused, context)) return false;
+
+
+ if(!as_generator(scope_tab << scope_tab << "return 1;\n"
+ << scope_tab << "}\n")
+ .generate(sink, attributes::unused, context)) return false;
+
+ if(!as_generator(*(native_function_definition(cls)))
+ .generate(sink, cls.functions, context)) return false;
+
+ for(auto first = std::begin(cls.inherits)
+ , last = std::end(cls.inherits); first != last; ++first)
+ {
+ attributes::klass_def klass(get_klass(*first));
+
+ if(!as_generator(*(native_function_definition(cls)))
+ .generate(sink, klass.functions, context)) return false;
+ }
+
+ if(!as_generator("}\n").generate(sink, attributes::unused, context)) return false;
+ }
auto close_namespace = *(lit("} ")) << "\n";
if(!as_generator(close_namespace).generate(sink, namespaces, context)) return false;
@@ -177,6 +254,8 @@ namespace efl { namespace eolian { namespace grammar {
template <>
struct is_eager_generator<struct ::eolian_mono::klass> : std::true_type {};
+template <>
+struct is_generator<struct ::eolian_mono::klass> : std::true_type {};
namespace type_traits {
template <>
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 {
template <>
struct is_eager_generator< ::eolian_mono::marshall_type_generator> : std::true_type {};
template <>
+struct is_generator< ::eolian_mono::marshall_type_generator> : std::true_type {};
+template <>
struct is_generator< ::eolian_mono::marshall_type_terminal> : std::true_type {};
namespace type_traits {
@@ -99,6 +101,8 @@ struct attributes_needed< ::eolian_mono::marshall_type_terminal> : std::integral
template <>
struct is_eager_generator< ::eolian_mono::marshall_annotation_generator> : std::true_type {};
template <>
+struct is_generator< ::eolian_mono::marshall_annotation_generator> : std::true_type {};
+template <>
struct is_generator< ::eolian_mono::marshall_annotation_terminal> : std::true_type {};
namespace 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 {
template <>
struct is_eager_generator< ::eolian_mono::parameter_generator> : std::true_type {};
+template <>
+struct is_generator< ::eolian_mono::parameter_generator> : std::true_type {};
namespace type_traits {
template <>
@@ -54,6 +56,8 @@ struct attributes_needed< ::eolian_mono::parameter_generator> : std::integral_co
template <>
struct is_eager_generator< ::eolian_mono::marshall_parameter_generator> : std::true_type {};
+template <>
+struct is_generator< ::eolian_mono::marshall_parameter_generator> : std::true_type {};
namespace type_traits {
template <>
@@ -62,6 +66,8 @@ struct attributes_needed< ::eolian_mono::marshall_parameter_generator> : std::in
template <>
struct is_eager_generator< ::eolian_mono::argument_generator> : std::true_type {};
+template <>
+struct is_generator< ::eolian_mono::argument_generator> : std::true_type {};
namespace type_traits {
template <>
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 {
template <>
struct is_eager_generator< ::eolian_mono::type_generator> : std::true_type {};
template <>
+struct is_generator< ::eolian_mono::type_generator> : std::true_type {};
+template <>
struct is_generator< ::eolian_mono::type_terminal> : std::true_type {};
namespace 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 {
[DllImport("eo")] public static extern byte efl_class_functions_set(IntPtr klass_id, IntPtr object_ops, IntPtr class_ops);
[DllImport("eo")] public static extern IntPtr efl_data_scope_get(IntPtr obj, IntPtr klass);
[DllImport("eo")] public static extern IntPtr efl_super(IntPtr obj, IntPtr klass);
+ [DllImport("eo")] public static extern IntPtr efl_class_get(IntPtr obj);
+ [DllImport("dl")] public static extern IntPtr dlsym
+ (IntPtr handle, [MarshalAs(UnmanagedType.LPStr)] String name);
+
+ public delegate byte class_initializer(IntPtr klass);
+
+ public static IntPtr register_class(class_initializer initializer, IntPtr base_klass)
+ {
+ ClassDescription description;
+ description.version = 2; // EO_VERSION
+ description.name = "BoxInherit";
+ description.class_type = 0; // REGULAR
+ description.data_size = (UIntPtr)8;
+ description.class_initializer = IntPtr.Zero;
+ description.class_constructor = IntPtr.Zero;
+ description.class_destructor = IntPtr.Zero;
+
+ if(initializer != null)
+ description.class_initializer = Marshal.GetFunctionPointerForDelegate(initializer);
+
+ IntPtr description_ptr = Marshal.AllocHGlobal(Marshal.SizeOf(description));
+ Marshal.StructureToPtr(description, description_ptr, false);
+
+ Console.WriteLine("Going to register!");
+ IntPtr klass = efl.eo.Globals.efl_class_new(description_ptr, base_klass, IntPtr.Zero);
+ if(klass == IntPtr.Zero)
+ Console.WriteLine("klass was not registed");
+ Console.WriteLine("Registered?");
+ return klass;
+ }
+ public static IntPtr instantiate(IntPtr klass, efl.Object parent)
+ {
+ Console.WriteLine("Instantiating");
+ System.IntPtr parent_ptr = System.IntPtr.Zero;
+ if(parent != null)
+ parent_ptr = parent.raw_handle;
+
+ System.IntPtr eo = efl.eo.Globals._efl_add_internal_start("file", 0, klass, parent_ptr, 0, 0);
+ Console.WriteLine("efl_add_internal_start returned");
+ eo = efl.eo.Globals._efl_add_end(eo, 0, 0);
+ Console.WriteLine("efl_add_end returned");
+ return eo;
+ }
+ public static void data_set(efl.eo.IWrapper obj)
+ {
+ IntPtr pd = efl.eo.Globals.efl_data_scope_get(obj.raw_handle, obj.raw_klass);
+ {
+ GCHandle gch = GCHandle.Alloc(obj);
+ EolianPD epd;
+ epd.pointer = GCHandle.ToIntPtr(gch);
+ Marshal.StructureToPtr(epd, pd, false);
+ }
+ }
+ public static efl.eo.IWrapper data_get(IntPtr pd)
+ {
+ EolianPD epd = (EolianPD)Marshal.PtrToStructure(pd, typeof(EolianPD));
+ if(epd.pointer != IntPtr.Zero)
+ {
+ GCHandle gch = GCHandle.FromIntPtr(epd.pointer);
+ return (efl.eo.IWrapper)gch.Target;
+ }
+ else
+ return null;
+ }
}
public interface IWrapper
@@ -37,6 +101,10 @@ public interface IWrapper
{
get;
}
+ IntPtr raw_klass
+ {
+ get;
+ }
}
public 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
{
ERR("Class '%s': NULL API not allowed (NULL->%p '%s').",
klass->desc->name, op_desc->func, _eo_op_desc_name_get(op_desc));
- return EINA_FALSE;
+ //return EINA_FALSE;
+ continue;
}
/* 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
template <>
struct is_eager_generator<address_of_generator> : std::true_type {};
+template <>
+struct is_generator<address_of_generator> : std::true_type {};
namespace type_traits {
template <>
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
template <typename L, typename R>
struct is_eager_generator<alternative_generator<L, R> > : std::true_type {};
+template <typename L, typename R>
+struct is_generator<alternative_generator<L, R> > : std::true_type {};
namespace type_traits {
template <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
G g;
};
-template <typename F, typename G>
-struct is_eager_generator<functional_attribute_conditional_generator<F, G>> : std::true_type {};
-
template <typename F>
struct functional_attribute_conditional_directive
{
@@ -42,9 +39,6 @@ struct functional_attribute_conditional_directive
F f;
};
-template <typename F>
-struct is_eager_generator<functional_attribute_conditional_directive<F>> : std::true_type {};
-
struct attribute_conditional_terminal
{
template <typename F>
@@ -54,6 +48,15 @@ struct attribute_conditional_terminal
}
} const attribute_conditional = {};
+template <typename F, typename G>
+struct is_eager_generator<functional_attribute_conditional_generator<F, G>> : std::true_type {};
+template <typename F>
+struct is_eager_generator<functional_attribute_conditional_directive<F>> : std::true_type {};
+template <typename F, typename G>
+struct is_generator<functional_attribute_conditional_generator<F, G>> : std::true_type {};
+template <typename F>
+struct is_generator<functional_attribute_conditional_directive<F>> : std::true_type {};
+
namespace type_traits {
template <typename F, typename G>
struct 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
template <typename G, int...S>
struct is_eager_generator<attribute_reorder_generator<G, S...>> : std::true_type {};
+template <typename G, int...S>
+struct is_generator<attribute_reorder_generator<G, S...>> : std::true_type {};
template <int...S, typename G>
attribute_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
G g;
};
-template <typename F, typename G>
-struct is_eager_generator<functional_attribute_replace_generator<F, G>> : std::true_type {};
-
template <typename F>
struct functional_attribute_replace_directive
{
@@ -39,8 +36,14 @@ struct functional_attribute_replace_directive
F f;
};
+template <typename F, typename G>
+struct is_eager_generator<functional_attribute_replace_generator<F, G>> : std::true_type {};
template <typename F>
struct is_eager_generator<functional_attribute_replace_directive<F>> : std::true_type {};
+template <typename F, typename G>
+struct is_generator<functional_attribute_replace_generator<F, G>> : std::true_type {};
+template <typename F>
+struct is_generator<functional_attribute_replace_directive<F>> : std::true_type {};
struct attribute_replace_terminal
{
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
template <>
struct is_eager_generator<base_class_definition_generator> : std::true_type {};
+template <>
+struct is_generator<base_class_definition_generator> : std::true_type {};
namespace type_traits {
template <>
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
template <>
struct is_eager_generator<c_type_generator> : std::true_type {};
+template <>
+struct is_generator<c_type_generator> : std::true_type {};
namespace type_traits {
template <>
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>
struct is_eager_generator<lower_case_generator<G>> : std::true_type {};
template <typename G>
struct is_eager_generator<upper_case_generator<G>> : std::true_type {};
+template <typename G>
+struct is_generator<lower_case_generator<G>> : std::true_type {};
+template <typename G>
+struct is_generator<upper_case_generator<G>> : std::true_type {};
namespace type_traits {
template <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
template <>
struct is_eager_generator<class_declaration_generator> : std::true_type {};
+template <>
+struct is_generator<class_declaration_generator> : std::true_type {};
namespace type_traits {
template <>
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
template <>
struct is_eager_generator<class_definition_generator> : std::true_type {};
+template <>
+struct is_generator<class_definition_generator> : std::true_type {};
namespace type_traits {
template <>
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
template <>
struct is_eager_generator<class_implementation_generator> : std::true_type {};
+template <>
+struct is_generator<class_implementation_generator> : std::true_type {};
namespace type_traits {
template <>
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
template <>
struct is_eager_generator<converting_argument_generator> : std::true_type {};
+template <>
+struct is_generator<converting_argument_generator> : std::true_type {};
namespace type_traits {
template <>
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
template <>
struct is_eager_generator<eps_generator> : std::true_type {};
+template <>
+struct is_generator<eps_generator> : std::true_type {};
eps_generator const eps = {};
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
template <>
struct is_eager_generator<function_declaration_generator> : std::true_type {};
+template <>
+struct is_generator<function_declaration_generator> : std::true_type {};
namespace type_traits {
template <>
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
template <>
struct is_eager_generator<function_definition_generator> : std::true_type {};
+template <>
+struct is_generator<function_definition_generator> : std::true_type {};
namespace type_traits {
template <>
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>
struct is_generator<T volatile const&> : is_generator<T> {};
template <typename T>
struct is_eager_generator<T volatile const&> : is_eager_generator<T> {};
-template <typename T>
-struct is_generator<T> : is_eager_generator<T> {};
+// template <typename T>
+// struct is_generator<T> : is_eager_generator<T> {};
template <typename G, typename Enable = typename std::enable_if<is_eager_generator<G>::value>::type>
G 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
template <typename G>
struct is_eager_generator<header_guards_generator<G> > : std::true_type {};
+template <typename G>
+struct is_generator<header_guards_generator<G> > : std::true_type {};
namespace type_traits {
template <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
template <>
struct is_eager_generator<header_include_directive_generator> : std::true_type {};
+template <>
+struct is_generator<header_include_directive_generator> : std::true_type {};
namespace type_traits {
template <>
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
template <>
struct is_eager_generator<implementation_include_directive_generator> : std::true_type {};
+template <>
+struct is_generator<implementation_include_directive_generator> : std::true_type {};
namespace type_traits {
template <>
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
template <>
struct is_eager_generator<scope_tab_generator> : std::true_type {};
+template <>
+struct is_generator<scope_tab_generator> : std::true_type {};
struct scope_tab_terminal
{
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 @@
+#ifndef EOLIAN_CXX_INTEGRAL_HH
+#define EOLIAN_CXX_INTEGRAL_HH
+
+#include <cstdlib>
+#include <cstring>
+
+#include "grammar/generator.hpp"
+#include "grammar/attributes.hpp"
+#include "grammar/case.hpp"
+
+namespace efl { namespace eolian { namespace grammar {
+
+namespace detail {
+
+template <typename OutputIterator, typename T>
+void generate_integral(OutputIterator sink, T integer)
+{
+ std::stringstream stm;
+ stm << integer;
+ std::string string = stm.str();
+ std::copy(string.begin(), string.end(), sink);
+}
+
+}
+
+// literal
+template <typename T>
+struct literal_integral_generator
+{
+ T integral;
+
+ template <typename OutputIterator, typename Attribute, typename Context>
+ bool generate(OutputIterator sink, Attribute const&, Context const&) const
+ {
+ detail::generate_integral(sink, integral);
+ return true;
+ }
+};
+
+template <typename T, typename Enable = typename std::enable_if<std::is_integral<T>::value>::type>
+literal_integral_generator<T> as_generator(T&& literal) { return {std::forward<T>(literal)}; }
+literal_integral_generator<std::size_t> as_generator(std::size_t literal) { return {literal}; }
+
+struct integral_terminal {
+ template <typename T>
+ literal_integral_generator<T> operator()(T literal) const
+ {
+ return {literal};
+ }
+} const int_ = {};
+
+struct integral_generator
+{
+ template <typename OutputIterator, typename Attribute, typename Context>
+ bool generate(OutputIterator sink, Attribute const& attribute, Context const&) const
+ {
+ detail::generate_integral(sink, attribute);
+ return true;
+ }
+};
+
+integral_generator as_generator(integral_terminal) { return {}; }
+
+template <typename T>
+struct is_eager_generator<literal_integral_generator<T>> : std::true_type {};
+template <>
+struct is_eager_generator<integral_generator> : std::true_type {};
+template <typename T>
+struct is_generator<literal_integral_generator<T>> : std::true_type {};
+template <>
+struct is_generator<integral_generator> : std::true_type {};
+template <typename T>
+struct is_generator<T, typename std::enable_if<std::is_integral<T>::value>::type> : std::true_type {};
+template <>
+struct is_generator<integral_terminal> : std::true_type {};
+
+namespace type_traits {
+template <typename T>
+struct attributes_needed<literal_integral_generator<T>> : std::integral_constant<int, 0> {};
+template <>
+struct attributes_needed<integral_generator> : std::integral_constant<int, 1> {};
+template <>
+struct attributes_needed<integral_terminal> : std::integral_constant<int, 1> {};
+}
+
+} } }
+
+#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
c_name = eolian_function_full_c_name_get(function, type, EINA_FALSE);
is_beta = eolian_function_is_beta(function);
is_protected = eolian_function_scope_get(function, type) == EOLIAN_SCOPE_PROTECTED;
+ is_protected = eolian_function_scope_get(function, type) == EOLIAN_SCOPE_PROTECTED;
}
};
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
template <typename Generator>
struct is_eager_generator<kleene_generator<Generator> > : std::true_type {};
+template <typename Generator>
+struct is_generator<kleene_generator<Generator> > : std::true_type {};
namespace type_traits {
template <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
template <typename G, typename S>
struct is_eager_generator<list_generator<G, S> > : std::true_type {};
+template <typename G, typename S>
+struct is_generator<list_generator<G, S> > : std::true_type {};
namespace type_traits {
template <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
template <typename G>
struct is_eager_generator<namespaces_generator<G>> : std::true_type {};
+template <typename G>
+struct is_generator<namespaces_generator<G>> : std::true_type {};
namespace type_traits {
template <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
template <>
struct is_eager_generator<parameter_type_generator> : std::true_type {};
+template <>
+struct is_generator<parameter_type_generator> : std::true_type {};
namespace type_traits {
template <>
struct attributes_needed<parameter_type_generator> : std::integral_constant<int, 1> {};
@@ -53,6 +55,8 @@ struct parameter_generator
template <>
struct is_eager_generator<parameter_generator> : std::true_type {};
+template <>
+struct is_generator<parameter_generator> : std::true_type {};
namespace type_traits {
template <>
struct 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
template <typename L, typename R>
struct is_eager_generator<sequence_generator<L, R> > : std::true_type {};
+template <typename L, typename R>
+struct is_generator<sequence_generator<L, R> > : std::true_type {};
namespace type_traits {
template <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
const char* string;
};
-template <>
-struct is_eager_generator<literal_generator> : std::true_type {};
-
-template <>
-struct is_generator<const char*> : std::true_type {};
-
-template <int N>
-struct is_generator<const char[N]> : std::true_type {};
-
literal_generator as_generator(char const* literal) { return literal; }
struct {
@@ -130,13 +121,6 @@ struct string_replace_generator
char from, to;
};
-template <>
-struct is_eager_generator<string_generator> : std::true_type {};
-template <>
-struct is_eager_generator<specific_string_generator> : std::true_type {};
-template <>
-struct is_eager_generator<string_replace_generator> : std::true_type {};
-
struct string_generator_terminal
{
specific_string_generator operator[](std::string string) const
@@ -154,6 +138,28 @@ struct string_replace_terminal
} const string_replace = {};
template <>
+struct is_eager_generator<literal_generator> : std::true_type {};
+template <>
+struct is_generator<literal_generator> : std::true_type {};
+template <>
+struct is_generator<const char*> : std::true_type {};
+
+template <int N>
+struct is_generator<const char[N]> : std::true_type {};
+template <>
+struct is_eager_generator<string_generator> : std::true_type {};
+template <>
+struct is_eager_generator<specific_string_generator> : std::true_type {};
+template <>
+struct is_eager_generator<string_replace_generator> : std::true_type {};
+template <>
+struct is_generator<string_generator> : std::true_type {};
+template <>
+struct is_generator<specific_string_generator> : std::true_type {};
+template <>
+struct is_generator<string_replace_generator> : std::true_type {};
+
+template <>
struct is_generator<string_generator_terminal> : std::true_type {};
template <>
struct 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)
template <>
struct is_eager_generator<type_generator> : std::true_type {};
template <>
+struct is_generator<type_generator> : std::true_type {};
+template <>
struct is_generator<type_terminal> : std::true_type {};
namespace 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 @@
using System;
using System.Runtime.InteropServices;
-public class BoxInherit : evas.Box
+public class MyBox : evas.BoxInherit
{
- System.IntPtr handle;
- System.IntPtr klass;
- public System.IntPtr raw_handle {
- get { return handle; }
- }
- [System.Runtime.InteropServices.DllImport("evas")] static extern System.IntPtr
- evas_box_class_get();
- public delegate byte class_initializer_delegate(IntPtr klass);
+ public MyBox(efl.Object parent) : base(parent) {}
- [DllImport("dl")] static extern System.IntPtr dlsym
- (IntPtr handle, [MarshalAs(UnmanagedType.LPStr)] String name);
+ [DllImport("evas")] static extern void evas_obj_box_layout_vertical(IntPtr obj, IntPtr data, IntPtr privdata);
+ [DllImport("evas")] static extern void evas_obj_box_layout_horizontal(IntPtr obj, IntPtr data, IntPtr privdata);
+ [DllImport("evas")] static extern void evas_object_box_layout_horizontal(IntPtr obj, IntPtr data, IntPtr privdata);
+ [DllImport("evas")] static extern IntPtr evas_object_evas_get(IntPtr obj);
+ [DllImport("evas")] static extern void evas_event_freeze(IntPtr obj);
+ [DllImport("evas")] static extern void evas_event_thaw(IntPtr obj);
- 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);
- 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)
- {
- EolianPD epd = (EolianPD)Marshal.PtrToStructure(pd, typeof(EolianPD));
- GCHandle gch = GCHandle.FromIntPtr(epd.pointer);
- BoxInherit self = (BoxInherit)gch.Target;
- return self.append(child);
- }
- static append_delegate append_override_delegate = new append_delegate(BoxInherit.append_override);
-
- public static byte class_initializer(IntPtr klass)
- {
- System.Console.WriteLine("class_initializer");
-
- Efl_Op_Description descs_struct;
-
- //descs_struct[0].api_func = (IntPtr)evas_obj_box_append;
- descs_struct.api_func = dlsym(IntPtr.Zero, "evas_obj_box_append");
- descs_struct.func = Marshal.GetFunctionPointerForDelegate(append_override_delegate);
-
- IntPtr descs = Marshal.AllocHGlobal(Marshal.SizeOf(descs_struct)*1);
- Marshal.StructureToPtr(descs_struct, descs, false);
-
- Efl_Object_Ops ops_struct;
- ops_struct.descs = descs;
- ops_struct.count = (UIntPtr)1;
-
- IntPtr ops = Marshal.AllocHGlobal(Marshal.SizeOf(ops_struct));
- Marshal.StructureToPtr(ops_struct, ops, false);
-
- efl.eo.Globals.efl_class_functions_set(klass, ops, IntPtr.Zero);
- return 1;
- }
- static class_initializer_delegate class_initializer_delegate_inst = new class_initializer_delegate(BoxInherit.class_initializer);
- public BoxInherit(efl.Object parent = null)
- {
- ClassDescription description;
- description.version = 2; // EO_VERSION
- description.name = "BoxInherit";
- description.class_type = 0; // REGULAR
- description.data_size = (UIntPtr)8;
- description.class_initializer = Marshal.GetFunctionPointerForDelegate(class_initializer_delegate_inst);
- description.class_constructor = IntPtr.Zero;
- description.class_destructor = IntPtr.Zero;
-
- IntPtr pnt = Marshal.AllocHGlobal(Marshal.SizeOf(description));
- Marshal.StructureToPtr(description, pnt, false);
-
- IntPtr base_klass = evas_box_class_get();
- Console.WriteLine("Going to register!");
- klass = efl.eo.Globals.efl_class_new(pnt, base_klass, IntPtr.Zero);
- if(klass == IntPtr.Zero)
- Console.WriteLine("klass was not registed");
- Console.WriteLine("Registered?");
-
- System.IntPtr parent_ptr = System.IntPtr.Zero;
- if(parent != null)
- parent_ptr = parent.raw_handle;
-
- Console.WriteLine("Instantiating?");
- System.IntPtr eo = efl.eo.Globals._efl_add_internal_start("file", 0, klass, parent_ptr, 0, 0);
- handle = efl.eo.Globals._efl_add_end(eo, 0, 0);
- IntPtr pd = efl.eo.Globals.efl_data_scope_get(handle, klass);
- {
- GCHandle gch = GCHandle.Alloc(this);
- EolianPD epd;
- epd.pointer = GCHandle.ToIntPtr(gch);
- Marshal.StructureToPtr(epd, pd, false);
- }
- Console.WriteLine("Instantiated?");
- }
- public BoxInherit(System.IntPtr raw)
- {
- handle = raw;
- }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void evas_obj_box_align_get(System.IntPtr obj, double horizontal, double vertical);
- public void align_get(double horizontal, double vertical) { evas_obj_box_align_get(handle, horizontal, vertical); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void evas_obj_box_align_set(System.IntPtr obj, double horizontal, double vertical);
- public void align_set(double horizontal, double vertical) { evas_obj_box_align_set(handle, horizontal, vertical); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void evas_obj_box_padding_get(System.IntPtr obj, evas.Coord horizontal, evas.Coord vertical);
- public void padding_get(evas.Coord horizontal, evas.Coord vertical) { evas_obj_box_padding_get(handle, horizontal, vertical); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void evas_obj_box_padding_set(System.IntPtr obj, evas.Coord horizontal, evas.Coord vertical);
- public void padding_set(evas.Coord horizontal, evas.Coord vertical) { evas_obj_box_padding_set(handle, horizontal, vertical); }
- [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);
- 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); }
- [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);
- public efl.canvas.Object internal_remove( efl.canvas.Object child) { return evas_obj_box_internal_remove(handle, child); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern bool evas_obj_box_remove_all(System.IntPtr obj, bool clear);
- public bool remove_all(bool clear) { return evas_obj_box_remove_all(handle, clear); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern int evas_obj_box_iterator_new(System.IntPtr obj);
- public int iterator_new() { return evas_obj_box_iterator_new(handle); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern efl.canvas.Object evas_obj_box_add_to(System.IntPtr obj);
- public efl.canvas.Object add_to() { return evas_obj_box_add_to(handle); }
- [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);
- public Evas_Object_Box_Option append( efl.canvas.Object child) { return evas_obj_box_append(efl.eo.Globals.efl_super(handle, klass), child); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern int evas_obj_box_option_property_id_get(System.IntPtr obj, System.String name);
- public int option_property_id_get( System.String name) { return evas_obj_box_option_property_id_get(handle, name); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern int evas_obj_box_accessor_new(System.IntPtr obj);
- public int accessor_new() { return evas_obj_box_accessor_new(handle); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern efl.canvas.Object evas_obj_box_internal_remove_at(System.IntPtr obj, uint pos);
- public efl.canvas.Object internal_remove_at( uint pos) { return evas_obj_box_internal_remove_at(handle, pos); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern bool evas_obj_box_remove_at(System.IntPtr obj, uint pos);
- public bool remove_at( uint pos) { return evas_obj_box_remove_at(handle, pos); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern System.String evas_obj_box_option_property_name_get(System.IntPtr obj, int property);
- public System.String option_property_name_get(int property) { return evas_obj_box_option_property_name_get(handle, property); }
- [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);
- public bool remove( efl.canvas.Object child) { return evas_obj_box_remove(handle, child); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern int evas_obj_box_count(System.IntPtr obj);
- public int count() { return evas_obj_box_count(handle); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_position_get(System.IntPtr obj, int x, int y);
- public void position_get(int x, int y) { efl_gfx_position_get(handle, x, y); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_position_set(System.IntPtr obj, int x, int y);
- public void position_set(int x, int y) { efl_gfx_position_set(handle, x, y); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_size_get(System.IntPtr obj, int w, int h);
- public void size_get(int w, int h) { efl_gfx_size_get(handle, w, h); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_size_set(System.IntPtr obj, int w, int h);
- public void size_set(int w, int h) { efl_gfx_size_set(handle, w, h); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_geometry_get(System.IntPtr obj, int x, int y, int w, int h);
- public void geometry_get(int x, int y, int w, int h) { efl_gfx_geometry_get(handle, x, y, w, h); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_geometry_set(System.IntPtr obj, int x, int y, int w, int h);
- public void geometry_set(int x, int y, int w, int h) { efl_gfx_geometry_set(handle, x, y, w, h); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_color_get(System.IntPtr obj, int r, int g, int b, int a);
- public void color_get(int r, int g, int b, int a) { efl_gfx_color_get(handle, r, g, b, a); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_color_set(System.IntPtr obj, int r, int g, int b, int a);
- public void color_set(int r, int g, int b, int a) { efl_gfx_color_set(handle, r, g, b, a); }
- [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);
- 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); }
- [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);
- 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); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_gfx_visible_get(System.IntPtr obj);
- public bool visible_get() { return efl_gfx_visible_get(handle); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_visible_set(System.IntPtr obj, bool v);
- public void visible_set(bool v) { efl_gfx_visible_set(handle, v); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern efl.Object efl_parent_get(System.IntPtr obj);
- public efl.Object parent_get() { return efl_parent_get(handle); }
- [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);
- public void parent_set( efl.Object parent) { efl_parent_set(handle, parent); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern System.String efl_name_get(System.IntPtr obj);
- public System.String name_get() { return efl_name_get(handle); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_name_set(System.IntPtr obj, System.String name);
- public void name_set( System.String name) { efl_name_set(handle, name); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern System.String efl_comment_get(System.IntPtr obj);
- public System.String comment_get() { return efl_comment_get(handle); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_comment_set(System.IntPtr obj, System.String comment);
- public void comment_set( System.String comment) { efl_comment_set(handle, comment); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern int efl_event_global_freeze_count_get(System.IntPtr obj);
- public int event_global_freeze_count_get() { return efl_event_global_freeze_count_get(handle); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern int efl_event_freeze_count_get(System.IntPtr obj);
- public int event_freeze_count_get() { return efl_event_freeze_count_get(handle); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_finalized_get(System.IntPtr obj);
- public bool finalized_get() { return efl_finalized_get(handle); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern System.IntPtr efl_key_data_get(System.IntPtr obj, System.String key);
- public System.IntPtr key_data_get( System.String key) { return efl_key_data_get(handle, key); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_key_data_set(System.IntPtr obj, System.String key, System.IntPtr data);
- public void key_data_set( System.String key, System.IntPtr data) { efl_key_data_set(handle, key, data); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern efl.Object efl_key_ref_get(System.IntPtr obj, System.String key);
- public efl.Object key_ref_get( System.String key) { return efl_key_ref_get(handle, key); }
- [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);
- public void key_ref_set( System.String key, efl.Object objdata) { efl_key_ref_set(handle, key, objdata); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern efl.Object efl_key_wref_get(System.IntPtr obj, System.String key);
- public efl.Object key_wref_get( System.String key) { return efl_key_wref_get(handle, key); }
- [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);
- public void key_wref_set( System.String key, efl.Object objdata) { efl_key_wref_set(handle, key, objdata); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern int efl_key_value_get(System.IntPtr obj, System.String key);
- public int key_value_get( System.String key) { return efl_key_value_get(handle, key); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_key_value_set(System.IntPtr obj, System.String key, int value);
- public void key_value_set( System.String key, int value) { efl_key_value_set(handle, key, value); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_del(System.IntPtr obj);
- public void del() { efl_del(handle); }
- [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);
- public efl.Object provider_find( efl.Object klass) { return efl_provider_find(handle, klass); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern efl.Object efl_constructor(System.IntPtr obj);
- public efl.Object constructor() { return efl_constructor(handle); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_destructor(System.IntPtr obj);
- public void destructor() { efl_destructor(handle); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern efl.Object efl_finalize(System.IntPtr obj);
- public efl.Object finalize() { return efl_finalize(handle); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern efl.Object efl_name_find(System.IntPtr obj, System.String search);
- public efl.Object name_find( System.String search) { return efl_name_find(handle, search); }
- [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);
- public void wref_add( efl.Object wref) { efl_wref_add(handle, wref); }
- [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);
- public void wref_del( efl.Object wref) { efl_wref_del(handle, wref); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_event_thaw(System.IntPtr obj);
- public void event_thaw() { efl_event_thaw(handle); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_event_freeze(System.IntPtr obj);
- public void event_freeze() { efl_event_freeze(handle); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_event_global_thaw(System.IntPtr obj);
- public void event_global_thaw() { efl_event_global_thaw(handle); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_event_global_freeze(System.IntPtr obj);
- public void event_global_freeze() { efl_event_global_freeze(handle); }
- [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);
- 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); }
- [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);
- 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); }
- [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);
- 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); }
- [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);
- 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); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_event_callback_call(System.IntPtr obj, efl.kw_event.Description desc, System.IntPtr event_info);
- public bool event_callback_call(efl.kw_event.Description desc, System.IntPtr event_info) { return efl_event_callback_call(handle, desc, event_info); }
- [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);
- 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); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_event_callback_stop(System.IntPtr obj);
- public void event_callback_stop() { efl_event_callback_stop(handle); }
- [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);
- public void event_callback_forwarder_add(efl.kw_event.Description desc, efl.Object new_obj) { efl_event_callback_forwarder_add(handle, desc, new_obj); }
- [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);
- public void event_callback_forwarder_del(efl.kw_event.Description desc, efl.Object new_obj) { efl_event_callback_forwarder_del(handle, desc, new_obj); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_dbg_info_get(System.IntPtr obj, efl.Dbg_Info root_node);
- public void dbg_info_get(efl.Dbg_Info root_node) { efl_dbg_info_get(handle, root_node); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern int efl_children_iterator_new(System.IntPtr obj);
- public int children_iterator_new() { return efl_children_iterator_new(handle); }
- [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);
- public bool composite_attach( efl.Object comp_obj) { return efl_composite_attach(handle, comp_obj); }
- [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);
- public bool composite_detach( efl.Object comp_obj) { return efl_composite_detach(handle, comp_obj); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_composite_part_is(System.IntPtr obj);
- public bool composite_part_is() { return efl_composite_part_is(handle); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_future_link(System.IntPtr obj, int link);
- public bool future_link( int link) { return efl_future_link(handle, link); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_canvas_group_need_recalculate_get(System.IntPtr obj);
- public bool group_need_recalculate_get() { return efl_canvas_group_need_recalculate_get(handle); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_canvas_group_need_recalculate_set(System.IntPtr obj, bool value);
- public void group_need_recalculate_set(bool value) { efl_canvas_group_need_recalculate_set(handle, value); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_canvas_group_change(System.IntPtr obj);
- public void group_change() { efl_canvas_group_change(handle); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_canvas_group_calculate(System.IntPtr obj);
- public void group_calculate() { efl_canvas_group_calculate(handle); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern int efl_canvas_group_children_iterate(System.IntPtr obj);
- public int group_children_iterate() { return efl_canvas_group_children_iterate(handle); }
- [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);
- public void group_member_add( efl.canvas.Object sub_obj) { efl_canvas_group_member_add(handle, sub_obj); }
- [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);
- public void group_member_del( efl.canvas.Object sub_obj) { efl_canvas_group_member_del(handle, sub_obj); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_canvas_group_add(System.IntPtr obj);
- public void group_add() { efl_canvas_group_add(handle); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_canvas_group_del(System.IntPtr obj);
- public void group_del() { efl_canvas_group_del(handle); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_canvas_object_type_set(System.IntPtr obj, System.String type);
- public void type_set( System.String type) { efl_canvas_object_type_set(handle, type); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern efl.input.Object_Pointer_Mode efl_canvas_object_pointer_mode_get(System.IntPtr obj);
- public efl.input.Object_Pointer_Mode pointer_mode_get() { return efl_canvas_object_pointer_mode_get(handle); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_canvas_object_pointer_mode_set(System.IntPtr obj, efl.input.Object_Pointer_Mode pointer_mode);
- public void pointer_mode_set(efl.input.Object_Pointer_Mode pointer_mode) { efl_canvas_object_pointer_mode_set(handle, pointer_mode); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern efl.gfx.Render_Op efl_canvas_object_render_op_get(System.IntPtr obj);
- public efl.gfx.Render_Op render_op_get() { return efl_canvas_object_render_op_get(handle); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_canvas_object_render_op_set(System.IntPtr obj, efl.gfx.Render_Op render_op);
- public void render_op_set(efl.gfx.Render_Op render_op) { efl_canvas_object_render_op_set(handle, render_op); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_canvas_object_freeze_events_get(System.IntPtr obj);
- public bool freeze_events_get() { return efl_canvas_object_freeze_events_get(handle); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_canvas_object_freeze_events_set(System.IntPtr obj, bool freeze);
- public void freeze_events_set(bool freeze) { efl_canvas_object_freeze_events_set(handle, freeze); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern efl.canvas.Object efl_canvas_object_clip_get(System.IntPtr obj);
- public efl.canvas.Object clip_get() { return efl_canvas_object_clip_get(handle); }
- [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);
- public void clip_set( efl.canvas.Object clip) { efl_canvas_object_clip_set(handle, clip); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_canvas_object_repeat_events_get(System.IntPtr obj);
- public bool repeat_events_get() { return efl_canvas_object_repeat_events_get(handle); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_canvas_object_repeat_events_set(System.IntPtr obj, bool repeat);
- public void repeat_events_set(bool repeat) { efl_canvas_object_repeat_events_set(handle, repeat); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern double efl_canvas_object_scale_get(System.IntPtr obj);
- public double scale_get() { return efl_canvas_object_scale_get(handle); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_canvas_object_scale_set(System.IntPtr obj, double scale);
- public void scale_set(double scale) { efl_canvas_object_scale_set(handle, scale); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_canvas_object_key_focus_get(System.IntPtr obj);
- public bool key_focus_get() { return efl_canvas_object_key_focus_get(handle); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_canvas_object_key_focus_set(System.IntPtr obj, bool focus);
- public void key_focus_set(bool focus) { efl_canvas_object_key_focus_set(handle, focus); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_canvas_object_is_frame_object_get(System.IntPtr obj);
- public bool is_frame_object_get() { return efl_canvas_object_is_frame_object_get(handle); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_canvas_object_is_frame_object_set(System.IntPtr obj, bool is_frame);
- public void is_frame_object_set(bool is_frame) { efl_canvas_object_is_frame_object_set(handle, is_frame); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_canvas_object_precise_is_inside_get(System.IntPtr obj);
- public bool precise_is_inside_get() { return efl_canvas_object_precise_is_inside_get(handle); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_canvas_object_precise_is_inside_set(System.IntPtr obj, bool precise);
- public void precise_is_inside_set(bool precise) { efl_canvas_object_precise_is_inside_set(handle, precise); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_canvas_object_propagate_events_get(System.IntPtr obj);
- public bool propagate_events_get() { return efl_canvas_object_propagate_events_get(handle); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_canvas_object_propagate_events_set(System.IntPtr obj, bool propagate);
- public void propagate_events_set(bool propagate) { efl_canvas_object_propagate_events_set(handle, propagate); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_canvas_object_pass_events_get(System.IntPtr obj);
- public bool pass_events_get() { return efl_canvas_object_pass_events_get(handle); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_canvas_object_pass_events_set(System.IntPtr obj, bool pass);
- public void pass_events_set(bool pass) { efl_canvas_object_pass_events_set(handle, pass); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_canvas_object_anti_alias_get(System.IntPtr obj);
- public bool anti_alias_get() { return efl_canvas_object_anti_alias_get(handle); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_canvas_object_anti_alias_set(System.IntPtr obj, bool anti_alias);
- public void anti_alias_set(bool anti_alias) { efl_canvas_object_anti_alias_set(handle, anti_alias); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern int efl_canvas_object_clipees_get(System.IntPtr obj);
- public int clipees_get() { return efl_canvas_object_clipees_get(handle); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern efl.canvas.Object efl_canvas_object_render_parent_get(System.IntPtr obj);
- public efl.canvas.Object render_parent_get() { return efl_canvas_object_render_parent_get(handle); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern efl.text.Bidirectional_Type efl_canvas_object_paragraph_direction_get(System.IntPtr obj);
- public efl.text.Bidirectional_Type paragraph_direction_get() { return efl_canvas_object_paragraph_direction_get(handle); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_canvas_object_paragraph_direction_set(System.IntPtr obj, efl.text.Bidirectional_Type dir);
- public void paragraph_direction_set(efl.text.Bidirectional_Type dir) { efl_canvas_object_paragraph_direction_set(handle, dir); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_canvas_object_no_render_get(System.IntPtr obj);
- public bool no_render_get() { return efl_canvas_object_no_render_get(handle); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_canvas_object_no_render_set(System.IntPtr obj, bool enable);
- public void no_render_set(bool enable) { efl_canvas_object_no_render_set(handle, enable); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_canvas_object_legacy_ctor(System.IntPtr obj);
- public void legacy_ctor() { efl_canvas_object_legacy_ctor(handle); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_canvas_object_clipees_has(System.IntPtr obj);
- public bool clipees_has() { return efl_canvas_object_clipees_has(handle); }
- [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);
- 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); }
- [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);
- 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); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_gfx_map_enable_get(System.IntPtr obj);
- public bool map_enable_get() { return efl_gfx_map_enable_get(handle); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_map_enable_set(System.IntPtr obj, bool enabled);
- public void map_enable_set(bool enabled) { efl_gfx_map_enable_set(handle, enabled); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_gfx_map_clockwise_get(System.IntPtr obj);
- public bool map_clockwise_get() { return efl_gfx_map_clockwise_get(handle); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_gfx_map_smooth_get(System.IntPtr obj);
- public bool map_smooth_get() { return efl_gfx_map_smooth_get(handle); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_map_smooth_set(System.IntPtr obj, bool smooth);
- public void map_smooth_set(bool smooth) { efl_gfx_map_smooth_set(handle, smooth); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_gfx_map_alpha_get(System.IntPtr obj);
- public bool map_alpha_get() { return efl_gfx_map_alpha_get(handle); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_map_alpha_set(System.IntPtr obj, bool alpha);
- public void map_alpha_set(bool alpha) { efl_gfx_map_alpha_set(handle, alpha); }
- [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);
- 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); }
- [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);
- 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); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_map_point_image_uv_get(System.IntPtr obj, int idx, double u, double v);
- public void map_point_image_uv_get(int idx, double u, double v) { efl_gfx_map_point_image_uv_get(handle, idx, u, v); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_map_point_image_uv_set(System.IntPtr obj, int idx, double u, double v);
- public void map_point_image_uv_set(int idx, double u, double v) { efl_gfx_map_point_image_uv_set(handle, idx, u, v); }
- [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);
- 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); }
- [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);
- 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); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_gfx_map_move_sync_get(System.IntPtr obj);
- public bool map_move_sync_get() { return efl_gfx_map_move_sync_get(handle); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_map_move_sync_set(System.IntPtr obj, bool enable);
- public void map_move_sync_set(bool enable) { efl_gfx_map_move_sync_set(handle, enable); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern double efl_gfx_map_point_z_get(System.IntPtr obj, int idx);
- public double map_point_z_get(int idx) { return efl_gfx_map_point_z_get(handle, idx); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_gfx_map_populate(System.IntPtr obj, double z);
- public bool map_populate(double z) { return efl_gfx_map_populate(handle, z); }
- [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);
- 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); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_gfx_map_rotate(System.IntPtr obj, double degrees, double cx, double cy);
- public bool map_rotate(double degrees, double cx, double cy) { return efl_gfx_map_rotate(handle, degrees, cx, cy); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_gfx_map_zoom(System.IntPtr obj, double zoomx, double zoomy, double cx, double cy);
- public bool map_zoom(double zoomx, double zoomy, double cx, double cy) { return efl_gfx_map_zoom(handle, zoomx, zoomy, cx, cy); }
- [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);
- 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); }
- [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);
- 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); }
- [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);
- 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); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_gfx_map_perspective_3d(System.IntPtr obj, double px, double py, double z0, double foc);
- public bool map_perspective_3d(double px, double py, double z0, double foc) { return efl_gfx_map_perspective_3d(handle, px, py, z0, foc); }
- [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);
- public bool map_dup( efl.gfx.Map other) { return efl_gfx_map_dup(handle, other); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern short efl_gfx_stack_layer_get(System.IntPtr obj);
- public short layer_get() { return efl_gfx_stack_layer_get(handle); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_stack_layer_set(System.IntPtr obj, short l);
- public void layer_set(short l) { efl_gfx_stack_layer_set(handle, l); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern efl.gfx.Stack efl_gfx_stack_below_get(System.IntPtr obj);
- public efl.gfx.Stack below_get() { return efl_gfx_stack_below_get(handle); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern efl.gfx.Stack efl_gfx_stack_above_get(System.IntPtr obj);
- public efl.gfx.Stack above_get() { return efl_gfx_stack_above_get(handle); }
- [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);
- public void stack_below( efl.gfx.Stack below) { efl_gfx_stack_below(handle, below); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_stack_raise(System.IntPtr obj);
- public void raise() { efl_gfx_stack_raise(handle); }
- [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);
- public void stack_above( efl.gfx.Stack above) { efl_gfx_stack_above(handle, above); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_stack_lower(System.IntPtr obj);
- public void lower() { efl_gfx_stack_lower(handle); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_size_hint_base_get(System.IntPtr obj, int w, int h);
- public void hint_base_get(int w, int h) { efl_gfx_size_hint_base_get(handle, w, h); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_size_hint_base_set(System.IntPtr obj, int w, int h);
- public void hint_base_set(int w, int h) { efl_gfx_size_hint_base_set(handle, w, h); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_size_hint_step_get(System.IntPtr obj, int w, int h);
- public void hint_step_get(int w, int h) { efl_gfx_size_hint_step_get(handle, w, h); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_size_hint_step_set(System.IntPtr obj, int w, int h);
- public void hint_step_set(int w, int h) { efl_gfx_size_hint_step_set(handle, w, h); }
- [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);
- 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); }
- [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);
- 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); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_size_hint_max_get(System.IntPtr obj, int w, int h);
- public void hint_max_get(int w, int h) { efl_gfx_size_hint_max_get(handle, w, h); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_size_hint_max_set(System.IntPtr obj, int w, int h);
- public void hint_max_set(int w, int h) { efl_gfx_size_hint_max_set(handle, w, h); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_size_hint_min_get(System.IntPtr obj, int w, int h);
- public void hint_min_get(int w, int h) { efl_gfx_size_hint_min_get(handle, w, h); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_size_hint_min_set(System.IntPtr obj, int w, int h);
- public void hint_min_set(int w, int h) { efl_gfx_size_hint_min_set(handle, w, h); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_size_hint_request_get(System.IntPtr obj, int w, int h);
- public void hint_request_get(int w, int h) { efl_gfx_size_hint_request_get(handle, w, h); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_size_hint_request_set(System.IntPtr obj, int w, int h);
- public void hint_request_set(int w, int h) { efl_gfx_size_hint_request_set(handle, w, h); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_size_hint_restricted_min_get(System.IntPtr obj, int w, int h);
- public void hint_restricted_min_get(int w, int h) { efl_gfx_size_hint_restricted_min_get(handle, w, h); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_size_hint_restricted_min_set(System.IntPtr obj, int w, int h);
- public void hint_restricted_min_set(int w, int h) { efl_gfx_size_hint_restricted_min_set(handle, w, h); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_size_hint_combined_min_get(System.IntPtr obj, int w, int h);
- public void hint_combined_min_get(int w, int h) { efl_gfx_size_hint_combined_min_get(handle, w, h); }
- [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);
- public void hint_margin_get(int l, int r, int t, int b) { efl_gfx_size_hint_margin_get(handle, l, r, t, b); }
- [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);
- public void hint_margin_set(int l, int r, int t, int b) { efl_gfx_size_hint_margin_set(handle, l, r, t, b); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_size_hint_weight_get(System.IntPtr obj, double x, double y);
- public void hint_weight_get(double x, double y) { efl_gfx_size_hint_weight_get(handle, x, y); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_size_hint_weight_set(System.IntPtr obj, double x, double y);
- public void hint_weight_set(double x, double y) { efl_gfx_size_hint_weight_set(handle, x, y); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_size_hint_align_get(System.IntPtr obj, double x, double y);
- public void hint_align_get(double x, double y) { efl_gfx_size_hint_align_get(handle, x, y); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_size_hint_align_set(System.IntPtr obj, double x, double y);
- public void hint_align_set(double x, double y) { efl_gfx_size_hint_align_set(handle, x, y); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern efl.gfx.size.hint.Mode efl_gfx_size_hint_display_mode_get(System.IntPtr obj);
- public efl.gfx.size.hint.Mode hint_display_mode_get() { return efl_gfx_size_hint_display_mode_get(handle); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_gfx_size_hint_display_mode_set(System.IntPtr obj, efl.gfx.size.hint.Mode dispmode);
- public void hint_display_mode_set(efl.gfx.size.hint.Mode dispmode) { efl_gfx_size_hint_display_mode_set(handle, dispmode); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern void efl_input_pointer_xy_get(System.IntPtr obj, int x, int y);
- public void pointer_xy_get(int x, int y) { efl_input_pointer_xy_get(handle, x, y); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern bool efl_input_pointer_inside_get(System.IntPtr obj);
- public bool pointer_inside_get() { return efl_input_pointer_inside_get(handle); }
- [System.Runtime.InteropServices.DllImport("evas")] static extern int efl_input_pointer_iterate(System.IntPtr obj, bool hover);
- public int pointer_iterate(bool hover) { return efl_input_pointer_iterate(handle, hover); }
-}
-
-public class MyBox : BoxInherit
-{
- public MyBox(efl.Object parent) : base(parent) {}
+ override public void group_calculate()
+ {
+ IntPtr evas = evas_object_evas_get(raw_handle);
+ evas_event_freeze(evas);
+ Console.WriteLine("called group_calculate");
+ layouting_set(true);
+ evas_obj_box_layout_vertical(raw_handle, IntPtr.Zero, IntPtr.Zero);
+ layouting_set(false);
+ children_changed_set(false);
+ evas_event_thaw(evas);
+ }
}
class TestMain
@@ -475,15 +51,13 @@ class TestMain
rect.size_set(640, 480);
rect.visible_set(true);
- //evas.Box box = new evas.BoxConcrete(canvas);
evas.Box box = new MyBox(canvas);
- // rect.position_set(160, 120);
rect.size_set(320, 240);
box.visible_set(true);
efl.canvas.Image image1 = new efl.canvas.ImageConcrete(canvas);
image1.file_set("/home/felipe/dev/samsung/upstream/efl/src/examples/elementary/sphere_hunter/score.jpg", "");
- image1.hint_min_set(160, 120);
+ image1.hint_min_set(160, 240);
image1.visible_set(true);
efl.canvas.Image image2 = new efl.canvas.ImageConcrete(canvas);
@@ -491,12 +65,8 @@ class TestMain
image2.hint_min_set(160, 120);
image2.visible_set(true);
- System.Console.WriteLine("Calling append");
box.append(image1);
- System.Console.WriteLine("Called append");
- System.Console.WriteLine("Calling append");
box.append(image2);
- System.Console.WriteLine("Called append");
loop.begin();
}