summaryrefslogtreecommitdiff
path: root/src/bindings/mono/eo_mono/FunctionWrapper_Unix.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/bindings/mono/eo_mono/FunctionWrapper_Unix.cs')
-rw-r--r--src/bindings/mono/eo_mono/FunctionWrapper_Unix.cs36
1 files changed, 24 insertions, 12 deletions
diff --git a/src/bindings/mono/eo_mono/FunctionWrapper_Unix.cs b/src/bindings/mono/eo_mono/FunctionWrapper_Unix.cs
index 0069fc6..636f83e 100644
--- a/src/bindings/mono/eo_mono/FunctionWrapper_Unix.cs
+++ b/src/bindings/mono/eo_mono/FunctionWrapper_Unix.cs
@@ -1,22 +1,36 @@
1/*
2 * Copyright 2019 by its authors. See AUTHORS.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
1using System; 16using System;
2using System.Runtime.InteropServices; 17using System.Runtime.InteropServices;
3 18
4namespace Efl 19namespace Efl.Eo
5{ 20{
6 21
7namespace Eo 22internal static partial class FunctionInterop
8{
9
10public static partial class FunctionInterop
11{ 23{
12 [DllImport(efl.Libs.Libdl)] 24 [DllImport(efl.Libs.Libdl)]
13 private static extern IntPtr dlsym(IntPtr handle, string symbol); 25 private static extern IntPtr dlsym(IntPtr handle, string symbol);
14 26
15 ///<summary>Loads a function pointer from the given module.</summary> 27 /// <summary>Loads a function pointer from the given module.
16 ///<param name="nativeLibraryHandle">The module containing the function.</param> 28 /// <para>Since EFL 1.23.</para>
17 ///<param name="functionName">The name of the function to search for.</param> 29 /// </summary>
18 ///<returns>A function pointer that can be used with delegates.</returns> 30 /// <param name="nativeLibraryHandle">The module containing the function.</param>
19 public static IntPtr LoadFunctionPointer(IntPtr nativeLibraryHandle, string functionName) 31 /// <param name="functionName">The name of the function to search for.</param>
32 /// <returns>A function pointer that can be used with delegates.</returns>
33 internal static IntPtr LoadFunctionPointer(IntPtr nativeLibraryHandle, string functionName)
20 { 34 {
21 Eina.Log.Debug($"searching {nativeLibraryHandle} for {functionName}"); 35 Eina.Log.Debug($"searching {nativeLibraryHandle} for {functionName}");
22 var s = FunctionInterop.dlsym(nativeLibraryHandle, functionName); 36 var s = FunctionInterop.dlsym(nativeLibraryHandle, functionName);
@@ -26,5 +40,3 @@ public static partial class FunctionInterop
26} 40}
27 41
28} 42}
29
30}