forked from enlightenment/efl
eolian_mono: change property name from args to Args
Summary: PascalCasing is always used for property names. Test Plan: meson build -Dbindings=mono,cxx -Dmono-beta=true Reviewers: woohyun, felipealmeida, segfaultxavi Reviewed By: woohyun Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11149
This commit is contained in:
parent
46c65ff0db
commit
5ddd384aee
|
@ -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<bool> 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) << "/// </summary>\n"
|
||||
<< scope_tab(2) << "/// <value>" << documentation_string << "</value>\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<decltype(arg_initializer_sink), decltype(sub_context)>{arg_initializer_sink, &sub_context, *etype}))
|
||||
return false;
|
||||
|
|
|
@ -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) =>
|
||||
{
|
||||
|
|
|
@ -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<string>;
|
||||
received = e.Arg as List<string>;
|
||||
};
|
||||
|
||||
obj.EmitEventWithArray(sent);
|
||||
|
@ -337,7 +337,7 @@ class TestEventWithDeadWrappers
|
|||
// attach to evt with int
|
||||
EventHandler<Dummy.TestObjectEvtWithIntEventArgs> cb = (object sender, Dummy.TestObjectEvtWithIntEventArgs args) => {
|
||||
callbackCalled = true;
|
||||
received = args.arg;
|
||||
received = args.Arg;
|
||||
Test.Assert(Object.ReferenceEquals(sender, wref.Target));
|
||||
};
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ public static class TestModel {
|
|||
parent.Visible = false;
|
||||
var factory = new Efl.Ui.ItemFactory<Efl.Ui.Button>(parent);
|
||||
factory.PropertyBoundEvent += (object sender, Efl.Ui.PropertyBindPropertyBoundEventArgs args) => {
|
||||
propertyBound = args.arg;
|
||||
propertyBound = args.Arg;
|
||||
callbackCalled = true;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue