summaryrefslogtreecommitdiff
path: root/src/bindings/mono/eo_mono
diff options
context:
space:
mode:
authorLauro Moura <lauromoura@expertisesolutions.com.br>2019-09-24 11:36:34 -0300
committerLauro Moura <lauromoura@expertisesolutions.com.br>2019-09-24 18:00:05 -0300
commit2e7b508312bf7dc6bd884475513f7d799d2f285d (patch)
tree54e94028e99f333ba6d4a2979fe9ced8cc66a2cf /src/bindings/mono/eo_mono
parent351072711cbdea756421f22abc2382bc98e95e57 (diff)
csharp: Fix wrapping of private classes
Summary: Sometimes, valid Eo objects of private classes can be returned from methods. Currently we try to wrap in a minimal `Efl.Object` instance, but as it is an abstract class, we can't instantiate directly. This commits adds a dummy `Efl.ObjectRealized` to be instantiated when wrapping such classes alongside a test case. Fixes: T8258 Reviewers: felipealmeida, brunobelo, segfaultxavi, Jaehyun_Cho Reviewed By: brunobelo Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10101
Diffstat (limited to 'src/bindings/mono/eo_mono')
-rw-r--r--src/bindings/mono/eo_mono/EoWrapper.cs11
-rw-r--r--src/bindings/mono/eo_mono/iwrapper.cs2
2 files changed, 12 insertions, 1 deletions
diff --git a/src/bindings/mono/eo_mono/EoWrapper.cs b/src/bindings/mono/eo_mono/EoWrapper.cs
index 1805071..79d597c 100644
--- a/src/bindings/mono/eo_mono/EoWrapper.cs
+++ b/src/bindings/mono/eo_mono/EoWrapper.cs
@@ -413,4 +413,15 @@ public abstract class EoWrapper : IWrapper, IDisposable
413 413
414} // namespace Eo 414} // namespace Eo
415 415
416/// <summary>Concrete realization of Efl.Object.
417///
418/// Some legacy classes (like Evas.Canvas) may be returned by some methods. As these classes are not bound, we
419/// allow minimal interaction with them through <see cref="Efl.Object" />.
420///
421/// But as <see cref="Efl.Object" /> is abstract, whis realized class will allow us to create C# instances of it.</summary>
422internal class ObjectRealized : Efl.Object
423{
424 protected ObjectRealized(Efl.Eo.Globals.WrappingHandle ch) : base(ch) { }
425}
426
416} // namespace Efl 427} // namespace Efl
diff --git a/src/bindings/mono/eo_mono/iwrapper.cs b/src/bindings/mono/eo_mono/iwrapper.cs
index a03e48a..8fe4b06 100644
--- a/src/bindings/mono/eo_mono/iwrapper.cs
+++ b/src/bindings/mono/eo_mono/iwrapper.cs
@@ -843,7 +843,7 @@ public static class ClassRegister
843 843
844 if (t == null) 844 if (t == null)
845 { 845 {
846 return typeof(Efl.Object); 846 return typeof(Efl.ObjectRealized);
847 } 847 }
848 } 848 }
849 849