lauromoura pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=790fa0e04b9760ee99ce33839191936159430df5

commit 790fa0e04b9760ee99ce33839191936159430df5
Author: Yeongjong Lee <[email protected]>
Date:   Wed Nov 13 03:58:39 2019 -0300

    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
---
 src/bin/eolian_mono/eolian/mono/events.hh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/bin/eolian_mono/eolian/mono/events.hh 
b/src/bin/eolian_mono/eolian/mono/events.hh
index e6a78577bb..abd5368ccd 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
    {
       auto library_name = 
context_find_tag<library_context>(context).actual_library_name(klass.filename);
       std::string upper_c_name = utils::to_uppercase(evt.c_name);
+      bool is_concrete = 
context_find_tag<class_context>(context).current_wrapper_kind == 
class_context::concrete;
 
       if (!as_generator(
             scope_tab << "/// <summary>Method to raise event "<< event_name << 
".\n"
@@ -510,7 +511,7 @@ struct event_definition_generator
       if (!as_generator(
             scope_tab << "/// </summary>\n"
             << scope_tab << "/// <param name=\"e\">Event to raise.</param>\n"
-            << scope_tab << "public void On" << event_name << "(" << 
event_args_type << " e)\n"
+            << scope_tab << (is_concrete ? "public" : "protected virtual") << 
" void On" << event_name << "(" << event_args_type << " e)\n"
             << scope_tab << "{\n"
             << scope_tab << scope_tab << "var key = \"_" << upper_c_name << 
"\";\n"
             << scope_tab << scope_tab << "IntPtr desc = 
Efl.EventDescription.GetNative(" << library_name << ", key);\n"

-- 


Reply via email to