summaryrefslogtreecommitdiff
path: root/src/bindings/mono/eo_mono
diff options
context:
space:
mode:
authorLauro Moura <lauromoura@expertisesolutions.com.br>2019-10-24 18:42:40 +0200
committerXavi Artigas <xavierartigas@yahoo.es>2019-10-24 18:49:23 +0200
commitf33183ba04d6f71938f26850c1bf45d5dfbf3686 (patch)
treeab5ea442d00a2c24df8a7a714731469beb7cf167 /src/bindings/mono/eo_mono
parent59ad959e8532d802d4e07edc8dd16097b6b769ca (diff)
csharp: Add since information to EoWrapper.cs
Reviewers: brunobelo, segfaultxavi, felipealmeida, woohyun Reviewed By: segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10429
Diffstat (limited to 'src/bindings/mono/eo_mono')
-rw-r--r--src/bindings/mono/eo_mono/EoWrapper.cs89
1 files changed, 66 insertions, 23 deletions
diff --git a/src/bindings/mono/eo_mono/EoWrapper.cs b/src/bindings/mono/eo_mono/EoWrapper.cs
index 6f13b52..87a3743 100644
--- a/src/bindings/mono/eo_mono/EoWrapper.cs
+++ b/src/bindings/mono/eo_mono/EoWrapper.cs
@@ -31,6 +31,8 @@ namespace Eo
31/// 31///
32/// Most of it is protected functionalities to serve the generated 32/// Most of it is protected functionalities to serve the generated
33/// binding classes that inherit from it. 33/// binding classes that inherit from it.
34///
35/// <para>Since EFL 1.23.</para>
34/// </summary> 36/// </summary>
35public abstract class EoWrapper : IWrapper, IDisposable 37public abstract class EoWrapper : IWrapper, IDisposable
36{ 38{
@@ -45,14 +47,17 @@ public abstract class EoWrapper : IWrapper, IDisposable
45 private Hashtable keyValueHash = null; 47 private Hashtable keyValueHash = null;
46 48
47 /// <summary>Constructor to be used when objects are expected to be constructed from native code. 49 /// <summary>Constructor to be used when objects are expected to be constructed from native code.
48 /// For a class that inherited from an EFL# class to be properly constructed from native code 50 /// <para>For a class that inherited from an EFL# class to be properly constructed from native code
49 /// one must create a constructor with this signature and calls this base constructor from it. 51 /// one must create a constructor with this signature and calls this base constructor from it.
50 /// This constructor will take care of calling base constructors of the native classes and 52 /// This constructor will take care of calling base constructors of the native classes and
51 /// perform additional setup so objects are ready to use. 53 /// perform additional setup so objects are ready to use.</para>
52 /// It is advisable to check for the <see cref="NativeHandle"/> property in the top level 54 /// <para>It is advisable to check for the <see cref="NativeHandle"/> property in the top level
53 /// constructor and signal an error when it has a value of IntPtr.Zero after this 55 /// constructor and signal an error when it has a value of IntPtr.Zero after this
54 /// constructor completion. 56 /// constructor completion.</para>
55 /// Warning: Do not use this constructor directly from a `new` statement.</summary> 57 /// <para>Warning: Do not use this constructor directly from a `new` statement.</para>
58 /// <para>Since EFL 1.23.</para>
59 /// </summary>
60 ///
56 /// <param name="ch">Tag struct storing the native handle of the object being constructed.</param> 61 /// <param name="ch">Tag struct storing the native handle of the object being constructed.</param>
57 protected EoWrapper(ConstructingHandle ch) 62 protected EoWrapper(ConstructingHandle ch)
58 { 63 {
@@ -71,8 +76,10 @@ public abstract class EoWrapper : IWrapper, IDisposable
71 } 76 }
72 77
73 /// <summary>Initializes a new instance of the <see cref="Object"/> class. 78 /// <summary>Initializes a new instance of the <see cref="Object"/> class.
74 /// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly. 79 /// <para>Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</para>
75 /// Do not implement this constructor.</summary> 80 /// <para>Do not implement this constructor.</para>
81 /// <para>Since EFL 1.23.</para>
82 /// </summary>
76 /// <param name="wh">The native pointer to be wrapped.</param> 83 /// <param name="wh">The native pointer to be wrapped.</param>
77 protected EoWrapper(Efl.Eo.Globals.WrappingHandle wh) 84 protected EoWrapper(Efl.Eo.Globals.WrappingHandle wh)
78 { 85 {
@@ -81,8 +88,10 @@ public abstract class EoWrapper : IWrapper, IDisposable
81 } 88 }
82 89
83 /// <summary>Initializes a new instance of the <see cref="Object"/> class. 90 /// <summary>Initializes a new instance of the <see cref="Object"/> class.
84 /// Internal usage: Constructor to actually call the native library constructors. C# subclasses 91 /// <para>Internal usage: Constructor to actually call the native library constructors. C# subclasses
85 /// must use the public constructor only.</summary> 92 /// must use the public constructor only.</para>
93 /// <para>Since EFL 1.23.</para>
94 /// </summary>
86 /// <param name="baseKlass">The pointer to the base native Eo class.</param> 95 /// <param name="baseKlass">The pointer to the base native Eo class.</param>
87 /// <param name="parent">The Efl.Object parent of this instance.</param> 96 /// <param name="parent">The Efl.Object parent of this instance.</param>
88 /// <param name="file">Name of the file from where the constructor is called.</param> 97 /// <param name="file">Name of the file from where the constructor is called.</param>
@@ -129,19 +138,25 @@ public abstract class EoWrapper : IWrapper, IDisposable
129 AddWrapperSupervisor(); 138 AddWrapperSupervisor();
130 } 139 }
131 140
132 /// <summary>Destructor.</summary> 141 /// <summary>Destructor.
142 /// <para>Since EFL 1.23.</para>
143 /// </summary>
133 ~EoWrapper() 144 ~EoWrapper()
134 { 145 {
135 Dispose(false); 146 Dispose(false);
136 } 147 }
137 148
138 /// <summary>Pointer to the native instance.</summary> 149 /// <summary>Pointer to the native instance.
150 /// <para>Since EFL 1.23.</para>
151 /// </summary>
139 public System.IntPtr NativeHandle 152 public System.IntPtr NativeHandle
140 { 153 {
141 get { return handle; } 154 get { return handle; }
142 } 155 }
143 156
144 /// <summary>Pointer to the native class description.</summary> 157 /// <summary>Pointer to the native class description.
158 /// <para>Since EFL 1.23.</para>
159 /// </summary>
145 public abstract System.IntPtr NativeClass 160 public abstract System.IntPtr NativeClass
146 { 161 {
147 get; 162 get;
@@ -150,6 +165,7 @@ public abstract class EoWrapper : IWrapper, IDisposable
150 /// <summary> 165 /// <summary>
151 /// Whether this object type is one of the generated binding classes or a custom 166 /// Whether this object type is one of the generated binding classes or a custom
152 /// class defined by the user and that inherit from one of the generated ones. 167 /// class defined by the user and that inherit from one of the generated ones.
168 /// <para>Since EFL 1.23.</para>
153 /// </summary> 169 /// </summary>
154 /// <returns> 170 /// <returns>
155 /// True if this object type is one of the generated binding classes, 171 /// True if this object type is one of the generated binding classes,
@@ -161,7 +177,9 @@ public abstract class EoWrapper : IWrapper, IDisposable
161 get { return generated; } 177 get { return generated; }
162 } 178 }
163 179
164 /// <summary>Releases the underlying native instance.</summary> 180 /// <summary>Releases the underlying native instance.
181 /// <para>Since EFL 1.23.</para>
182 /// </summary>
165 protected virtual void Dispose(bool disposing) 183 protected virtual void Dispose(bool disposing)
166 { 184 {
167 if (disposing && handle != System.IntPtr.Zero) 185 if (disposing && handle != System.IntPtr.Zero)
@@ -182,14 +200,18 @@ public abstract class EoWrapper : IWrapper, IDisposable
182 } 200 }
183 } 201 }
184 202
185 /// <summary>Turns the native pointer into a string representation.</summary> 203 /// <summary>Turns the native pointer into a string representation.
204 /// <para>Since EFL 1.23.</para>
205 /// </summary>
186 /// <returns>A string with the type and the native pointer for this object.</returns> 206 /// <returns>A string with the type and the native pointer for this object.</returns>
187 public override String ToString() 207 public override String ToString()
188 { 208 {
189 return $"{this.GetType().Name}@[0x{(UInt64)handle:x}]"; 209 return $"{this.GetType().Name}@[0x{(UInt64)handle:x}]";
190 } 210 }
191 211
192 /// <summary>Releases the underlying native instance.</summary> 212 /// <summary>Releases the underlying native instance.
213 /// <para>Since EFL 1.23.</para>
214 /// </summary>
193 public void Dispose() 215 public void Dispose()
194 { 216 {
195 Dispose(true); 217 Dispose(true);
@@ -200,6 +222,7 @@ public abstract class EoWrapper : IWrapper, IDisposable
200 /// 222 ///
201 /// This method is a C# counterpart to the C `efl_del` function. It removes the parent of the object 223 /// This method is a C# counterpart to the C `efl_del` function. It removes the parent of the object
202 /// and releases the Eo reference it was holding. 224 /// and releases the Eo reference it was holding.
225 /// <para>Since EFL 1.23.</para>
203 /// </summary> 226 /// </summary>
204 public void Del() 227 public void Del()
205 { 228 {
@@ -209,7 +232,9 @@ public abstract class EoWrapper : IWrapper, IDisposable
209 } 232 }
210 233
211 /// <summary>Finishes instantiating this object. 234 /// <summary>Finishes instantiating this object.
212 /// Internal usage by generated code.</summary> 235 /// <para>Internal usage by generated code.</para>
236 /// <para>Since EFL 1.23.</para>
237 /// </summary>
213 protected void FinishInstantiation() 238 protected void FinishInstantiation()
214 { 239 {
215 Eina.Log.Debug("calling efl_add_internal_end"); 240 Eina.Log.Debug("calling efl_add_internal_end");
@@ -223,7 +248,10 @@ public abstract class EoWrapper : IWrapper, IDisposable
223 handle = h; 248 handle = h;
224 } 249 }
225 250
226 /// <summary>Adds a new event handler, registering it to the native event. For internal use only.</summary> 251 /// <summary>Adds a new event handler, registering it to the native event.
252 /// <para>For internal use only.</para>
253 /// <para>Since EFL 1.23.</para>
254 /// </summary>
227 /// <param name="lib">The name of the native library definining the event.</param> 255 /// <param name="lib">The name of the native library definining the event.</param>
228 /// <param name="key">The name of the native event.</param> 256 /// <param name="key">The name of the native event.</param>
229 /// <param name="evtCaller">Delegate to be called by native code on event raising.</param> 257 /// <param name="evtCaller">Delegate to be called by native code on event raising.</param>
@@ -259,7 +287,10 @@ public abstract class EoWrapper : IWrapper, IDisposable
259 } 287 }
260 } 288 }
261 289
262 /// <summary>Removes the given event handler for the given event. For internal use only.</summary> 290 /// <summary>Removes the given event handler for the given event.
291 /// <para>For internal use only.</para>
292 /// <para>Since EFL 1.23.</para>
293 /// </summary>
263 /// <param name="lib">The name of the native library definining the event.</param> 294 /// <param name="lib">The name of the native library definining the event.</param>
264 /// <param name="key">The name of the native event.</param> 295 /// <param name="key">The name of the native event.</param>
265 /// <param name="evtDelegate">The delegate to be removed.</param> 296 /// <param name="evtDelegate">The delegate to be removed.</param>
@@ -331,22 +362,29 @@ public abstract class EoWrapper : IWrapper, IDisposable
331 362
332 /// <summary> 363 /// <summary>
333 /// Struct to be used when constructing objects from native code. 364 /// Struct to be used when constructing objects from native code.
334 /// Wraps the pointer handle to the native object instance. 365 /// <para>For internal use by generated code only.</para>
366 /// <para>Wraps the pointer handle to the native object instance.</para>
367 /// <para>Since EFL 1.23.</para>
335 /// </summary> 368 /// </summary>
336 protected struct ConstructingHandle 369 protected struct ConstructingHandle
337 { 370 {
338 /// <summary>Constructor for wrapping the native handle.</summary> 371 /// <summary>Constructor for wrapping the native handle.
372 /// <para>Since EFL 1.23.</para>
373 /// </summary>
339 public ConstructingHandle(IntPtr h) 374 public ConstructingHandle(IntPtr h)
340 { 375 {
341 NativeHandle = h; 376 NativeHandle = h;
342 } 377 }
343 378
344 /// <summary>Pointer to the native instance.</summary> 379 /// <summary>Pointer to the native instance.
380 /// <para>Since EFL 1.23.</para>
381 /// </summary>
345 public IntPtr NativeHandle { get; private set; } 382 public IntPtr NativeHandle { get; private set; }
346 } 383 }
347 384
348 /// <summary> 385 /// <summary>
349 /// Set a value object associated with a key object. 386 /// Set a value object associated with a key object.
387 /// <para>Since EFL 1.23.</para>
350 /// </summary> 388 /// </summary>
351 public void SetKeyValue(object key, object val) 389 public void SetKeyValue(object key, object val)
352 { 390 {
@@ -358,6 +396,7 @@ public abstract class EoWrapper : IWrapper, IDisposable
358 396
359 /// <summary> 397 /// <summary>
360 /// Get a value object associated with a key object. 398 /// Get a value object associated with a key object.
399 /// <para>Since EFL 1.23.</para>
361 /// </summary> 400 /// </summary>
362 public object GetKeyValue(object key) 401 public object GetKeyValue(object key)
363 { 402 {
@@ -368,7 +407,9 @@ public abstract class EoWrapper : IWrapper, IDisposable
368 } 407 }
369 408
370 /// <summary>Wrapper for native methods and virtual method delegates. 409 /// <summary>Wrapper for native methods and virtual method delegates.
371 /// For internal use by generated code only.</summary> 410 /// <para>For internal use by generated code only.</para>
411 /// <para>Since EFL 1.23.</para>
412 /// </summary>
372 public abstract class NativeMethods : Efl.Eo.NativeClass 413 public abstract class NativeMethods : Efl.Eo.NativeClass
373 { 414 {
374 private static EflConstructorDelegate csharpEflConstructorStaticDelegate = new EflConstructorDelegate(Constructor); 415 private static EflConstructorDelegate csharpEflConstructorStaticDelegate = new EflConstructorDelegate(Constructor);
@@ -376,7 +417,9 @@ public abstract class EoWrapper : IWrapper, IDisposable
376 417
377 private delegate IntPtr EflConstructorDelegate(IntPtr obj, IntPtr pd); 418 private delegate IntPtr EflConstructorDelegate(IntPtr obj, IntPtr pd);
378 419
379 /// <summary>Gets the list of Eo operations to override.</summary> 420 /// <summary>Gets the list of Eo operations to override.
421 /// <para>Since EFL 1.23.</para>
422 /// </summary>
380 /// <returns>The list of Eo operations to be overload.</returns> 423 /// <returns>The list of Eo operations to be overload.</returns>
381 public override System.Collections.Generic.List<EflOpDescription> GetEoOps(Type type, bool includeInherited) 424 public override System.Collections.Generic.List<EflOpDescription> GetEoOps(Type type, bool includeInherited)
382 { 425 {