From 41580f9a2e7991ffd92184547bc2ab0aba42e88f Mon Sep 17 00:00:00 2001 From: darkleem Date: Fri, 17 Mar 2017 11:28:20 +0900 Subject: [PATCH] Fix target handle of SmartEvent&EvasObjectEvent correctly Change-Id: Ie8972c05b24689c60aba8cbd97b4cb1e646c30b0 Signed-off-by: darkleem --- ElmSharp/ElmSharp/EvasObjectEvent.cs | 11 +++++++---- ElmSharp/ElmSharp/SmartEvent.cs | 9 ++++++--- packaging/elm-sharp.spec | 2 +- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/ElmSharp/ElmSharp/EvasObjectEvent.cs b/ElmSharp/ElmSharp/EvasObjectEvent.cs index eebea05..f9c957b 100644 --- a/ElmSharp/ElmSharp/EvasObjectEvent.cs +++ b/ElmSharp/ElmSharp/EvasObjectEvent.cs @@ -16,6 +16,7 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.Linq; namespace ElmSharp @@ -76,11 +77,12 @@ namespace ElmSharp private readonly SmartEventInfoParser _parser; private readonly List _nativeCallbacks = new List(); - public EvasObjectEvent(EvasObject sender, EvasObjectCallbackType type, SmartEventInfoParser parser) : this(sender, sender.Handle, type, parser) + public EvasObjectEvent(EvasObject sender, EvasObjectCallbackType type, SmartEventInfoParser parser) : this(sender, sender.RealHandle, type, parser) { } - internal EvasObjectEvent(EvasObject sender, IntPtr handle, EvasObjectCallbackType type, SmartEventInfoParser parser) + [EditorBrowsableAttribute(EditorBrowsableState.Never)] + public EvasObjectEvent(EvasObject sender, IntPtr handle, EvasObjectCallbackType type, SmartEventInfoParser parser) { _sender = sender; _handle = handle; @@ -177,11 +179,12 @@ namespace ElmSharp private event EventHandler _handlers; private bool _disposed = false; - public EvasObjectEvent(EvasObject sender, EvasObjectCallbackType type) : this(sender, sender.Handle, type) + public EvasObjectEvent(EvasObject sender, EvasObjectCallbackType type) : this(sender, sender.RealHandle, type) { } - internal EvasObjectEvent(EvasObject sender, IntPtr handle, EvasObjectCallbackType type) + [EditorBrowsableAttribute(EditorBrowsableState.Never)] + public EvasObjectEvent(EvasObject sender, IntPtr handle, EvasObjectCallbackType type) { _evasObjectEvent = new EvasObjectEvent(sender, handle, type, null); } diff --git a/ElmSharp/ElmSharp/SmartEvent.cs b/ElmSharp/ElmSharp/SmartEvent.cs index d003806..f9b36eb 100644 --- a/ElmSharp/ElmSharp/SmartEvent.cs +++ b/ElmSharp/ElmSharp/SmartEvent.cs @@ -15,6 +15,7 @@ */ using System; +using System.ComponentModel; using System.Collections.Generic; using System.Linq; @@ -30,11 +31,12 @@ namespace ElmSharp private readonly SmartEventInfoParser _parser; private readonly List _nativeCallbacks = new List(); - public SmartEvent(EvasObject sender, string eventName, SmartEventInfoParser parser) : this(sender, sender.Handle, eventName, parser) + public SmartEvent(EvasObject sender, string eventName, SmartEventInfoParser parser) : this(sender, sender.RealHandle, eventName, parser) { } - internal SmartEvent(EvasObject sender, IntPtr handle, string eventName, SmartEventInfoParser parser) + [EditorBrowsableAttribute(EditorBrowsableState.Never)] + public SmartEvent(EvasObject sender, IntPtr handle, string eventName, SmartEventInfoParser parser) { _sender = sender; _eventName = eventName; @@ -130,7 +132,8 @@ namespace ElmSharp { } - internal SmartEvent(EvasObject sender, IntPtr handle, string eventName) + [EditorBrowsableAttribute(EditorBrowsableState.Never)] + public SmartEvent(EvasObject sender, IntPtr handle, string eventName) { _smartEvent = new SmartEvent(sender, handle, eventName, null); } diff --git a/packaging/elm-sharp.spec b/packaging/elm-sharp.spec index ce78fb3..bedc9e3 100644 --- a/packaging/elm-sharp.spec +++ b/packaging/elm-sharp.spec @@ -1,4 +1,4 @@ -%define DEV_VERSION beta-014 +%define DEV_VERSION beta-015 Name: elm-sharp Summary: C# Binding for Elementary -- 2.7.4