diff --git a/src/bin/eolian_mono/eolian/mono/events.hh b/src/bin/eolian_mono/eolian/mono/events.hh index b6cb4aa511..2040a2ef04 100644 --- a/src/bin/eolian_mono/eolian/mono/events.hh +++ b/src/bin/eolian_mono/eolian/mono/events.hh @@ -170,7 +170,7 @@ struct pack_event_info_and_call_visitor { return as_generator( indent.inc() << "Contract.Requires(e != null, nameof(e));\n" - << indent.inc() << "IntPtr info = Marshal.AllocHGlobal(Marshal.SizeOf(e.arg));\n" + << indent.inc() << "IntPtr info = Marshal.AllocHGlobal(Marshal.SizeOf(e.Arg));\n" << indent.inc() << "CallNativeEventCallback(" + library_name + ", \"_" + evt_c_name + "\", info, " << "(p) => Marshal.FreeHGlobal(p));\n" ).generate(sink, attributes::unused, *context); } @@ -190,8 +190,8 @@ struct pack_event_info_and_call_visitor match const str_table[] = { - {"string", [] { return "e.arg"; }} - , {"stringshare", [] { return "e.arg"; }} + {"string", [] { return "e.Arg"; }} + , {"stringshare", [] { return "e.Arg"; }} }; auto str_accept_func = [&](std::string const& conversion) @@ -208,9 +208,9 @@ struct pack_event_info_and_call_visitor match const value_table [] = { - {"bool", [] { return "e.arg ? (byte) 1 : (byte) 0"; }} - , {"Eina.Error", [] { return "(int)e.arg"; }} - , {nullptr, [] { return "e.arg"; }} + {"bool", [] { return "e.Arg ? (byte) 1 : (byte) 0"; }} + , {"Eina.Error", [] { return "(int)e.Arg"; }} + , {nullptr, [] { return "e.Arg"; }} }; auto value_accept_func = [&](std::string const& conversion) @@ -225,14 +225,14 @@ struct pack_event_info_and_call_visitor if (eina::optional b = type_match::get_match(value_table, filter_func, value_accept_func)) return *b; - return value_accept_func("e.args"); + return value_accept_func("e.Args"); } bool operator()(grammar::attributes::klass_name const&) const { auto const& indent = current_indentation(*context); return as_generator( indent.inc() << "Contract.Requires(e != null, nameof(e));\n" - << indent.inc() << "IntPtr info = e.arg.NativeHandle;\n" + << indent.inc() << "IntPtr info = e.Arg.NativeHandle;\n" << indent.inc() << "CallNativeEventCallback(" << library_name << ", \"_" << evt_c_name << "\", info, null);\n" ).generate(sink, attributes::unused, *context); } @@ -243,15 +243,15 @@ struct pack_event_info_and_call_visitor std::string info_variable; if (type.outer.base_type == "iterator") - info_variable = std::string("IntPtr info = Efl.Eo.Globals.IEnumerableToIterator(e.arg, ") + (is_own ? "true" : "false") + ");\n"; + info_variable = std::string("IntPtr info = Efl.Eo.Globals.IEnumerableToIterator(e.Arg, ") + (is_own ? "true" : "false") + ");\n"; else if (type.outer.base_type == "accessor") - info_variable = std::string("IntPtr info = Efl.Eo.Globals.IEnumerableToAccessor(e.arg, ") + (is_own ? "true" : "false") + ");\n"; + info_variable = std::string("IntPtr info = Efl.Eo.Globals.IEnumerableToAccessor(e.Arg, ") + (is_own ? "true" : "false") + ");\n"; else if (type.outer.base_type == "array") - info_variable = std::string("IntPtr info = Efl.Eo.Globals.IListToNativeArray(e.arg, ") + (is_own ? "true" : "false") + ");\n"; + info_variable = std::string("IntPtr info = Efl.Eo.Globals.IListToNativeArray(e.Arg, ") + (is_own ? "true" : "false") + ");\n"; else if (type.outer.base_type == "list") - info_variable = std::string("IntPtr info = Efl.Eo.Globals.IListToNativeList(e.arg, ") + (is_own ? "true" : "false") + ");\n"; + info_variable = std::string("IntPtr info = Efl.Eo.Globals.IListToNativeList(e.Arg, ") + (is_own ? "true" : "false") + ");\n"; else - info_variable = "IntPtr info = e.arg.Handle;\n"; + info_variable = "IntPtr info = e.Arg.Handle;\n"; return as_generator(indent.inc() << "Contract.Requires(e != null, nameof(e));\n" << indent.inc() << info_variable << indent.inc() << "CallNativeEventCallback(" << library_name << ", \"_" << evt_c_name << "\", info, null);\n" @@ -326,7 +326,7 @@ struct event_argument_wrapper_generator if (!as_generator(scope_tab(2) << "/// \n" << scope_tab(2) << "/// " << documentation_string << "\n" - << scope_tab(2) << "public " << type << " arg { get; set; }\n" + << scope_tab(2) << "public " << type << " Arg { get; set; }\n" << scope_tab << "}\n\n" ).generate(sink, std::make_tuple(evt.documentation.summary, *etype), context)) return false; @@ -427,7 +427,7 @@ struct event_definition_generator auto sub_context = change_indentation(indent.inc().inc(), context); if (!as_generator(", info => new " << wrapper_args_type << "{ " - << "arg = ").generate(arg_initializer_sink, attributes::unused, context)) + << "Arg = ").generate(arg_initializer_sink, attributes::unused, context)) return false; if (!(*etype).original_type.visit(unpack_event_args_visitor{arg_initializer_sink, &sub_context, *etype})) return false; diff --git a/src/bindings/mono/efl_mono/efl_csharp_application.cs b/src/bindings/mono/efl_mono/efl_csharp_application.cs index c4abdfe76c..1cf5d0d07b 100644 --- a/src/bindings/mono/efl_mono/efl_csharp_application.cs +++ b/src/bindings/mono/efl_mono/efl_csharp_application.cs @@ -206,9 +206,9 @@ public abstract class Application #endif app.ArgumentsEvent += (object sender, LoopArgumentsEventArgs evt) => { - if (evt.arg.Initialization) + if (evt.Arg.Initialization) { - var evtArgv = evt.arg.Argv; + var evtArgv = evt.Arg.Argv; int n = evtArgv.Count; var argv = new string[n]; for (int i = 0; i < n; ++i) @@ -219,7 +219,7 @@ public abstract class Application OnInitialize(argv); } - OnArguments(evt.arg); + OnArguments(evt.Arg); }; app.PauseEvent += (object sender, EventArgs e) => { diff --git a/src/tests/efl_mono/Events.cs b/src/tests/efl_mono/Events.cs index 2abcc98b63..20c4b4491d 100644 --- a/src/tests/efl_mono/Events.cs +++ b/src/tests/efl_mono/Events.cs @@ -66,7 +66,7 @@ class TestEoEvents string received_string = null; obj.EvtWithStringEvent += (object sender, Dummy.TestObjectEvtWithStringEventArgs e) => { - received_string = e.arg; + received_string = e.Arg; }; obj.EmitEventWithString("Some args"); @@ -81,7 +81,7 @@ class TestEoEvents int received_int= 0; obj.EvtWithIntEvent += (object sender, Dummy.TestObjectEvtWithIntEventArgs e) => { - received_int = e.arg; + received_int = e.Arg; }; obj.EmitEventWithInt(-1984); @@ -96,7 +96,7 @@ class TestEoEvents bool received_bool = false; obj.EvtWithBoolEvent += (object sender, Dummy.TestObjectEvtWithBoolEventArgs e) => { - received_bool = e.arg; + received_bool = e.Arg; }; obj.EmitEventWithBool(true); @@ -114,7 +114,7 @@ class TestEoEvents var obj = new Dummy.TestObject(); uint received_uint = 0; obj.EvtWithUintEvent += (object sender, Dummy.TestObjectEvtWithUintEventArgs e) => { - received_uint = e.arg; + received_uint = e.Arg; }; obj.EmitEventWithUint(0xbeef); @@ -128,7 +128,7 @@ class TestEoEvents var obj = new Dummy.TestObject(); float received_float = 0; obj.EvtWithFloatEvent += (object sender, Dummy.TestObjectEvtWithFloatEventArgs e) => { - received_float = e.arg; + received_float = e.Arg; }; obj.EmitEventWithFloat(3.14f); @@ -143,7 +143,7 @@ class TestEoEvents double received_double = 0; double reference = float.MaxValue + 42; obj.EvtWithDoubleEvent += (object sender, Dummy.TestObjectEvtWithDoubleEventArgs e) => { - received_double = e.arg; + received_double = e.Arg; }; obj.EmitEventWithDouble(reference); @@ -158,7 +158,7 @@ class TestEoEvents Dummy.TestObject received_obj = null; obj.EvtWithObjEvent += (object sender, Dummy.TestObjectEvtWithObjEventArgs e) => { - received_obj = e.arg; + received_obj = e.Arg; }; var sent_obj = new Dummy.TestObject(); @@ -176,7 +176,7 @@ class TestEoEvents Eina.Error received_error = 0; obj.EvtWithErrorEvent += (object sender, Dummy.TestObjectEvtWithErrorEventArgs e) => { - received_error = e.arg; + received_error = e.Arg; }; Eina.Error sent_error = -2001; @@ -193,7 +193,7 @@ class TestEoEvents Dummy.StructSimple received_struct = default(Dummy.StructSimple); obj.EvtWithStructEvent += (object sender, Dummy.TestObjectEvtWithStructEventArgs e) => { - received_struct = e.arg; + received_struct = e.Arg; }; Dummy.StructSimple sent_struct = new Dummy.StructSimple(fstring: "Struct Event"); @@ -211,7 +211,7 @@ class TestEoEvents Dummy.StructComplex received_struct = default(Dummy.StructComplex); obj.EvtWithStructComplexEvent += (object sender, Dummy.TestObjectEvtWithStructComplexEventArgs e) => { - received_struct = e.arg; + received_struct = e.Arg; }; Dummy.StructComplex sent_struct = StructHelpers.structComplexWithValues(); @@ -234,7 +234,7 @@ class TestEoEvents sent.Append("Ghi"); obj.EvtWithArrayEvent += (object sender, Dummy.TestObjectEvtWithArrayEventArgs e) => { - received = e.arg as List; + received = e.Arg as List; }; obj.EmitEventWithArray(sent); @@ -337,7 +337,7 @@ class TestEventWithDeadWrappers // attach to evt with int EventHandler cb = (object sender, Dummy.TestObjectEvtWithIntEventArgs args) => { callbackCalled = true; - received = args.arg; + received = args.Arg; Test.Assert(Object.ReferenceEquals(sender, wref.Target)); }; diff --git a/src/tests/efl_mono/Model.cs b/src/tests/efl_mono/Model.cs index 69596af25d..008f79291b 100644 --- a/src/tests/efl_mono/Model.cs +++ b/src/tests/efl_mono/Model.cs @@ -73,7 +73,7 @@ public static class TestModel { parent.Visible = false; var factory = new Efl.Ui.ItemFactory(parent); factory.PropertyBoundEvent += (object sender, Efl.Ui.PropertyBindPropertyBoundEventArgs args) => { - propertyBound = args.arg; + propertyBound = args.Arg; callbackCalled = true; };