[EflSharp] Separate efl and Circle cs files and Update cs files (#786)
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / efl / FunctionWrapper_Unix.cs
1 using System;
2 using System.Runtime.InteropServices;
3
4 namespace Efl
5 {
6
7 namespace Eo
8 {
9
10 public partial class FunctionInterop
11 {
12     [DllImport(efl.Libs.Libdl)]
13     private static extern IntPtr dlsym(IntPtr handle, string symbol);
14
15     ///<summary>Loads a function pointer from the given module.</summary>
16     ///<param name="nativeLibraryHandle">The module containing the function.</param>
17     ///<param name="functionName">The name of the function to search for.</param>
18     ///<returns>A function pointer that can be used with delegates.</returns>
19     public static IntPtr LoadFunctionPointer(IntPtr nativeLibraryHandle, string functionName)
20     {
21         Eina.Log.Debug("searching {nativeLibraryHandle} for {functionName}");
22         var s = FunctionInterop.dlsym(nativeLibraryHandle, functionName);
23         Eina.Log.Debug("searching {nativeLibraryHandle} for {functionName}, result {s}");
24         return s;
25     }
26 }
27
28 }
29
30 }