summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno da Silva Belo <brunodasilvabelo@gmail.com>2019-10-14 16:36:25 -0300
committerLauro Moura <lauromoura@expertisesolutions.com.br>2019-10-14 16:43:01 -0300
commitdef27320b3e798ad0a822edc9980b75d539c2ea3 (patch)
treee996fa7a3d9670a01d7b9ab04e64185430b4a11a
parent8ba2638f0ea0e5542cb93d9880e3b0740b8d325e (diff)
csharp: updating eina_common docs and hide api.
Reviewers: lauromoura, felipealmeida, segfaultxavi, woohyun Reviewed By: lauromoura Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8293 Differential Revision: https://phab.enlightenment.org/D10311
-rw-r--r--src/bindings/mono/eina_mono/eina_common.cs31
1 files changed, 23 insertions, 8 deletions
diff --git a/src/bindings/mono/eina_mono/eina_common.cs b/src/bindings/mono/eina_mono/eina_common.cs
index 77ed8b719e..badd62ecfa 100644
--- a/src/bindings/mono/eina_mono/eina_common.cs
+++ b/src/bindings/mono/eina_mono/eina_common.cs
@@ -3,6 +3,7 @@
3using System; 3using System;
4using System.Text; 4using System.Text;
5using System.Runtime.InteropServices; 5using System.Runtime.InteropServices;
6using System.ComponentModel;
6 7
7namespace Eina 8namespace Eina
8{ 9{
@@ -11,7 +12,7 @@ namespace Callbacks
11{ 12{
12 13
13internal delegate int EinaCompareCb(IntPtr data1, IntPtr data2); 14internal delegate int EinaCompareCb(IntPtr data1, IntPtr data2);
14public delegate void EinaFreeCb(IntPtr data); 15internal delegate void EinaFreeCb(IntPtr data);
15 16
16} 17}
17 18
@@ -42,9 +43,9 @@ internal static class NativeCustomExportFunctions
42} 43}
43 44
44/// <summary>Wrapper around native memory DllImport'd functions. 45/// <summary>Wrapper around native memory DllImport'd functions.
45/// 46/// <para>Since EFL 1.23.</para>
46/// Since EFL 1.23.
47/// </summary> 47/// </summary>
48[EditorBrowsable(EditorBrowsableState.Never)]
48public static class MemoryNative 49public static class MemoryNative
49{ 50{
50 public static void Free(IntPtr ptr) 51 public static void Free(IntPtr ptr)
@@ -78,6 +79,13 @@ public static class MemoryNative
78 return NativeCustomExportFunctions.efl_mono_native_strdup(str); 79 return NativeCustomExportFunctions.efl_mono_native_strdup(str);
79 } 80 }
80 81
82 /// <summary>
83 /// Retrieves an instance of a string for use in program.
84 /// <para>Since EFL 1.23.</para>
85 /// </summary>
86 /// <param name="str"> The NULL-terminated string to retrieve an instance of.</param>
87 /// <returns> A pointer to an instance of the string on success,
88 /// on failure a exception is raised.</returns>
81 public static IntPtr AddStringshare(string str) 89 public static IntPtr AddStringshare(string str)
82 { 90 {
83 IntPtr nativeStr = StringConversion.ManagedStringToNativeUtf8Alloc(str); 91 IntPtr nativeStr = StringConversion.ManagedStringToNativeUtf8Alloc(str);
@@ -92,6 +100,10 @@ public static class MemoryNative
92 } 100 }
93 } 101 }
94 102
103 /// <summary>
104 /// Notes that the given string has lost an instance.
105 /// </summary>
106 /// <param name="str">the given string</param>
95 public static void DelStringshare(IntPtr str) 107 public static void DelStringshare(IntPtr str)
96 { 108 {
97 NativeMethods.eina_stringshare_del(str); 109 NativeMethods.eina_stringshare_del(str);
@@ -131,9 +143,9 @@ public static class MemoryNative
131 143
132/// <summary> 144/// <summary>
133/// Conversor of raw pointer to a type and type to raw pointer 145/// Conversor of raw pointer to a type and type to raw pointer
134/// 146/// <para>Since EFL 1.23.</para>
135/// Since EFL 1.23.
136/// </summary> 147/// </summary>
148[EditorBrowsable(EditorBrowsableState.Never)]
137public static class PrimitiveConversion 149public static class PrimitiveConversion
138{ 150{
139 public static T PointerToManaged<T>(IntPtr nat) 151 public static T PointerToManaged<T>(IntPtr nat)
@@ -158,9 +170,9 @@ public static class PrimitiveConversion
158 170
159/// <summary> 171/// <summary>
160/// Conversor of string to native string and native string to string. 172/// Conversor of string to native string and native string to string.
161/// 173/// <para>Since EFL 1.23.</para>
162/// Since EFL 1.23.
163/// </summary> 174/// </summary>
175[EditorBrowsable(EditorBrowsableState.Never)]
164public static class StringConversion 176public static class StringConversion
165{ 177{
166 public static IntPtr ManagedStringToNativeUtf8Alloc(string managedString) 178 public static IntPtr ManagedStringToNativeUtf8Alloc(string managedString)
@@ -204,7 +216,10 @@ public static class StringConversion
204 } 216 }
205} 217}
206 218
207/// <summary>Enum to handle resource ownership between managed and unmanaged code.</summary> 219/// <summary>Enum to handle resource ownership between managed and unmanaged code.
220/// <para>Since EFL 1.23.</para>
221/// </summary>
222[EditorBrowsable(EditorBrowsableState.Never)]
208public enum Ownership 223public enum Ownership
209{ 224{
210 /// <summary> The resource is owned by the managed code. It should free the handle on disposal.</summary> 225 /// <summary> The resource is owned by the managed code. It should free the handle on disposal.</summary>