diff --git a/src/bindings/mono/eina_mono/eina_slice.cs b/src/bindings/mono/eina_mono/eina_slice.cs
index a0c8fd971c..20bd81f6f7 100644
--- a/src/bindings/mono/eina_mono/eina_slice.cs
+++ b/src/bindings/mono/eina_mono/eina_slice.cs
@@ -2,15 +2,33 @@
using System;
using System.Runtime.InteropServices;
+using System.ComponentModel;
namespace Eina
{
+///
+/// Basic interface for both slice types.
+/// Since EFL 1.23.
+///
public interface ISliceBase
{
+ ///
+ /// The length of this slice in bytes.
+ /// Since EFL 1.23.
+ ///
UIntPtr Len {get;set;}
+
+ ///
+ /// The contents of this slice.
+ /// Since EFL 1.23.
+ ///
IntPtr Mem {get;set;}
+ ///
+ /// The length in bytes as an integer.
+ /// Since EFL 1.23.
+ ///
int Length {get;set;}
};
@@ -21,27 +39,39 @@ public interface ISliceBase
[StructLayout(LayoutKind.Sequential)]
public struct Slice : ISliceBase
{
+ ///
+ /// The length of this slice.
+ /// Since EFL 1.23.
+ ///
public UIntPtr Len {get;set;}
+
+ ///
+ /// The contents of this slice.
+ /// Since EFL 1.23.
+ ///
public IntPtr Mem {get;set;}
+ ///
+ /// The length as an integer.
+ /// Since EFL 1.23.
+ ///
public int Length
{
get { return (int)Len; }
set { Len = (UIntPtr)value; }
}
+ ///
+ /// Creates a new slice from the given memory and length.
+ /// Since EFL 1.23.
+ ///
+ /// The memory slice.
+ /// The length.
public Slice(IntPtr mem, UIntPtr len)
{
Mem = mem;
Len = len;
}
-
- public Slice PinnedDataSet(IntPtr mem, UIntPtr len)
- {
- Mem = mem;
- Len = len;
- return this;
- }
}
/// Pointer to a slice of native memory.
@@ -51,28 +81,44 @@ public struct Slice : ISliceBase
[StructLayout(LayoutKind.Sequential)]
public struct RwSlice : ISliceBase
{
+ ///
+ /// The length of this slice.
+ /// Since EFL 1.23.
+ ///
public UIntPtr Len {get;set;}
+
+ ///
+ /// The contents of this slice.
+ /// Since EFL 1.23.
+ ///
public IntPtr Mem {get;set;}
+ ///
+ /// The length as an integer.
+ /// Since EFL 1.23.
+ ///
public int Length
{
get { return (int)Len; }
set { Len = (UIntPtr)value; }
}
+ ///
+ /// Creates a new slice from the given memory and length.
+ /// Since EFL 1.23.
+ ///
+ /// The memory slice.
+ /// The length.
public RwSlice(IntPtr mem, UIntPtr len)
{
Mem = mem;
Len = len;
}
- public RwSlice PinnedDataSet(IntPtr mem, UIntPtr len)
- {
- Mem = mem;
- Len = len;
- return this;
- }
-
+ ///
+ /// Returns a read-only slice from this writable memory.
+ /// Since EFL 1.23.
+ ///
Slice ToSlice()
{
var r = new Slice();
diff --git a/src/tests/efl_mono/Eina.cs b/src/tests/efl_mono/Eina.cs
index cebe2ec2e6..5a9b94e9af 100644
--- a/src/tests/efl_mono/Eina.cs
+++ b/src/tests/efl_mono/Eina.cs
@@ -340,7 +340,7 @@ class TestEinaSlice
public static void pinned_data_set()
{
var binbuf = new Eina.Binbuf();
- binbuf.Append(new Eina.Slice().PinnedDataSet(pinnedPtr, (UIntPtr)3));
+ binbuf.Append(new Eina.Slice(pinnedPtr, (UIntPtr)3));
Test.Assert(binbuf.GetBytes().SequenceEqual(base_seq));
}
#endif