summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYeongjong Lee <yj34.lee@samsung.com>2019-11-13 03:58:39 -0300
committerLauro Moura <lauromoura@expertisesolutions.com.br>2019-11-13 04:10:37 -0300
commit790fa0e04b9760ee99ce33839191936159430df5 (patch)
tree6c7c2c16ef277cc074d337f0a72a0d91f4b7c67a
parentf4fa719eaecb09b479b2807dcf661820d3b7fe3d (diff)
eolian_mono: change OnXXXEvent access modifier from public to protected virtual
Summary: OnXXXEvent is event invocation wrapper method to allow derived classes to override the event invocation behavior. Test Plan: meson with `-Dbindings=mono,cxx` Reviewers: lauromoura Reviewed By: lauromoura Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10655
-rw-r--r--src/bin/eolian_mono/eolian/mono/events.hh3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bin/eolian_mono/eolian/mono/events.hh b/src/bin/eolian_mono/eolian/mono/events.hh
index e6a7857..abd5368 100644
--- a/src/bin/eolian_mono/eolian/mono/events.hh
+++ b/src/bin/eolian_mono/eolian/mono/events.hh
@@ -474,6 +474,7 @@ struct event_definition_generator
474 { 474 {
475 auto library_name = context_find_tag<library_context>(context).actual_library_name(klass.filename); 475 auto library_name = context_find_tag<library_context>(context).actual_library_name(klass.filename);
476 std::string upper_c_name = utils::to_uppercase(evt.c_name); 476 std::string upper_c_name = utils::to_uppercase(evt.c_name);
477 bool is_concrete = context_find_tag<class_context>(context).current_wrapper_kind == class_context::concrete;
477 478
478 if (!as_generator( 479 if (!as_generator(
479 scope_tab << "/// <summary>Method to raise event "<< event_name << ".\n" 480 scope_tab << "/// <summary>Method to raise event "<< event_name << ".\n"
@@ -510,7 +511,7 @@ struct event_definition_generator
510 if (!as_generator( 511 if (!as_generator(
511 scope_tab << "/// </summary>\n" 512 scope_tab << "/// </summary>\n"
512 << scope_tab << "/// <param name=\"e\">Event to raise.</param>\n" 513 << scope_tab << "/// <param name=\"e\">Event to raise.</param>\n"
513 << scope_tab << "public void On" << event_name << "(" << event_args_type << " e)\n" 514 << scope_tab << (is_concrete ? "public" : "protected virtual") << " void On" << event_name << "(" << event_args_type << " e)\n"
514 << scope_tab << "{\n" 515 << scope_tab << "{\n"
515 << scope_tab << scope_tab << "var key = \"_" << upper_c_name << "\";\n" 516 << scope_tab << scope_tab << "var key = \"_" << upper_c_name << "\";\n"
516 << scope_tab << scope_tab << "IntPtr desc = Efl.EventDescription.GetNative(" << library_name << ", key);\n" 517 << scope_tab << scope_tab << "IntPtr desc = Efl.EventDescription.GetNative(" << library_name << ", key);\n"