From 03936c05131985a683967abc9cc1aa5ad88ff53a Mon Sep 17 00:00:00 2001 From: Jaehyun Cho Date: Thu, 27 Jun 2019 14:29:13 -0300 Subject: [PATCH] eolian_mono: fix to support event info which is a type defined in eo Summary: Previously, if event info was not structure and it was a type defined in eo, then the type value was not passed to the event info correctly. e.g. if event info was Efl.Ui.AlertPopupButton enum type, then default(Efl.Ui.AlertPopupButton) was always passed to event info. Now, the given type value is passed to the event info correctly. Reviewers: felipealmeida, lauromoura, vitor.sousa, bu5hm4n Reviewed By: vitor.sousa Subscribers: cedric, #reviewers, herb, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9159 --- src/bin/eolian_mono/eolian/mono/events.hh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/bin/eolian_mono/eolian/mono/events.hh b/src/bin/eolian_mono/eolian/mono/events.hh index 0522a9be7a..9b4b8c362f 100644 --- a/src/bin/eolian_mono/eolian/mono/events.hh +++ b/src/bin/eolian_mono/eolian/mono/events.hh @@ -102,7 +102,13 @@ struct unpack_event_args_visitor if (eina::optional b = call_match(match_table, filter_func, accept_func)) return *b; else - return as_generator("default(" + arg_type + ")").generate(sink, attributes::unused, *context); + { + // Type defined in Eo is passed here. (e.g. enum type defined in Eo) + // Uses conversion from IntPtr with type casting to the given type. + return as_generator( + " (" << arg_type << ")evt.Info" + ).generate(sink, attributes::unused, *context); + } } bool operator()(grammar::attributes::klass_name const& cls) const {