From b1eb92d949b1e27b5fd2b7831a083fe769c8cdfd Mon Sep 17 00:00:00 2001 From: Bruno da Silva Belo Date: Mon, 14 Oct 2019 16:36:25 -0300 Subject: [PATCH] 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 --- src/bindings/mono/eina_mono/eina_common.cs | 31 ++++++++++++++++++++++-------- 1 file 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 77ed8b7..badd62e 100644 --- a/src/bindings/mono/eina_mono/eina_common.cs +++ b/src/bindings/mono/eina_mono/eina_common.cs @@ -3,6 +3,7 @@ using System; using System.Text; using System.Runtime.InteropServices; +using System.ComponentModel; namespace Eina { @@ -11,7 +12,7 @@ namespace Callbacks { internal delegate int EinaCompareCb(IntPtr data1, IntPtr data2); -public delegate void EinaFreeCb(IntPtr data); +internal delegate void EinaFreeCb(IntPtr data); } @@ -42,9 +43,9 @@ internal static class NativeCustomExportFunctions } /// Wrapper around native memory DllImport'd functions. -/// -/// Since EFL 1.23. +/// Since EFL 1.23. /// +[EditorBrowsable(EditorBrowsableState.Never)] public static class MemoryNative { public static void Free(IntPtr ptr) @@ -78,6 +79,13 @@ public static class MemoryNative return NativeCustomExportFunctions.efl_mono_native_strdup(str); } + /// + /// Retrieves an instance of a string for use in program. + /// Since EFL 1.23. + /// + /// The NULL-terminated string to retrieve an instance of. + /// A pointer to an instance of the string on success, + /// on failure a exception is raised. public static IntPtr AddStringshare(string str) { IntPtr nativeStr = StringConversion.ManagedStringToNativeUtf8Alloc(str); @@ -92,6 +100,10 @@ public static class MemoryNative } } + /// + /// Notes that the given string has lost an instance. + /// + /// the given string public static void DelStringshare(IntPtr str) { NativeMethods.eina_stringshare_del(str); @@ -131,9 +143,9 @@ public static class MemoryNative /// /// Conversor of raw pointer to a type and type to raw pointer -/// -/// Since EFL 1.23. +/// Since EFL 1.23. /// +[EditorBrowsable(EditorBrowsableState.Never)] public static class PrimitiveConversion { public static T PointerToManaged(IntPtr nat) @@ -158,9 +170,9 @@ public static class PrimitiveConversion /// /// Conversor of string to native string and native string to string. -/// -/// Since EFL 1.23. +/// Since EFL 1.23. /// +[EditorBrowsable(EditorBrowsableState.Never)] public static class StringConversion { public static IntPtr ManagedStringToNativeUtf8Alloc(string managedString) @@ -204,7 +216,10 @@ public static class StringConversion } } -/// Enum to handle resource ownership between managed and unmanaged code. +/// Enum to handle resource ownership between managed and unmanaged code. +/// Since EFL 1.23. +/// +[EditorBrowsable(EditorBrowsableState.Never)] public enum Ownership { /// The resource is owned by the managed code. It should free the handle on disposal. -- 2.7.4