summaryrefslogtreecommitdiff
path: root/src/bindings/mono/efl_mono
diff options
context:
space:
mode:
Diffstat (limited to 'src/bindings/mono/efl_mono')
-rw-r--r--src/bindings/mono/efl_mono/efl_all.cs18
-rw-r--r--src/bindings/mono/efl_mono/efl_libs.cs.in17
2 files changed, 33 insertions, 2 deletions
diff --git a/src/bindings/mono/efl_mono/efl_all.cs b/src/bindings/mono/efl_mono/efl_all.cs
index a8436bd..d8c08d3 100644
--- a/src/bindings/mono/efl_mono/efl_all.cs
+++ b/src/bindings/mono/efl_mono/efl_all.cs
@@ -9,15 +9,31 @@ using static Efl.UnsafeNativeMethods;
9namespace Efl { 9namespace Efl {
10 10
11static class UnsafeNativeMethods { 11static class UnsafeNativeMethods {
12
13 private delegate void init_func_delegate();
12 [DllImport(efl.Libs.Ecore)] public static extern void ecore_init(); 14 [DllImport(efl.Libs.Ecore)] public static extern void ecore_init();
13 [DllImport(efl.Libs.Ecore)] public static extern void ecore_shutdown(); 15 [DllImport(efl.Libs.Ecore)] public static extern void ecore_shutdown();
14 [DllImport(efl.Libs.Evas)] public static extern void evas_init(); 16 // dotnet loads libraries from DllImport with RTLD_LOCAL. Due to the
17 // way evas modules are built with meson, currently they do not link directly
18 // with libevas, leading to symbol not found errors when trying to open them.
19 // The call to FunctionWrapper makes sure evas is loaded with RTLD_GLOBAL,
20 // allowing the symbols to remain visible for the modules until the build
21 // is sorted out.
22 private static Efl.Eo.FunctionWrapper<init_func_delegate> _evas_init;
15 [DllImport(efl.Libs.Evas)] public static extern void evas_shutdown(); 23 [DllImport(efl.Libs.Evas)] public static extern void evas_shutdown();
16 [DllImport(efl.Libs.Elementary)] public static extern int elm_init(int argc, IntPtr argv); 24 [DllImport(efl.Libs.Elementary)] public static extern int elm_init(int argc, IntPtr argv);
17 [DllImport(efl.Libs.Elementary)] public static extern void elm_policy_set(int policy, int policy_detail); 25 [DllImport(efl.Libs.Elementary)] public static extern void elm_policy_set(int policy, int policy_detail);
18 [DllImport(efl.Libs.Elementary)] public static extern void elm_shutdown(); 26 [DllImport(efl.Libs.Elementary)] public static extern void elm_shutdown();
19 [DllImport(efl.Libs.Elementary)] public static extern void elm_run(); 27 [DllImport(efl.Libs.Elementary)] public static extern void elm_run();
20 [DllImport(efl.Libs.Elementary)] public static extern void elm_exit(); 28 [DllImport(efl.Libs.Elementary)] public static extern void elm_exit();
29
30 static UnsafeNativeMethods() {
31 _evas_init = new Efl.Eo.FunctionWrapper<init_func_delegate>("evas", "evas_init");
32 }
33 public static void evas_init()
34 {
35 _evas_init.Value.Delegate();
36 }
21} 37}
22 38
23public enum Components { 39public enum Components {
diff --git a/src/bindings/mono/efl_mono/efl_libs.cs.in b/src/bindings/mono/efl_mono/efl_libs.cs.in
index 8674264..0aa5690 100644
--- a/src/bindings/mono/efl_mono/efl_libs.cs.in
+++ b/src/bindings/mono/efl_mono/efl_libs.cs.in
@@ -12,12 +12,27 @@ public class Libs {
12 public const string Eo = "@EO_DL_MONO@"; 12 public const string Eo = "@EO_DL_MONO@";
13 public const string Evas = "@EVAS_DL_MONO@"; 13 public const string Evas = "@EVAS_DL_MONO@";
14 public const string Evil = "@EVIL_DL_MONO@"; 14 public const string Evil = "@EVIL_DL_MONO@";
15 public const string EcoreEvas = "@ECORE_EVAS_DL_MONO@";
16 public const string Edje = "@EDJE_DL_MONO@"; 15 public const string Edje = "@EDJE_DL_MONO@";
17 public const string Elementary = "@ELEMENTARY_DL_MONO@"; 16 public const string Elementary = "@ELEMENTARY_DL_MONO@";
18 public const string Eldbus = "@ELDBUS_DL_MONO@"; 17 public const string Eldbus = "@ELDBUS_DL_MONO@";
19 18
20 public const string CustomExports = "@CUSTOM_EXPORTS_MONO_DL_MONO@"; 19 public const string CustomExports = "@CUSTOM_EXPORTS_MONO_DL_MONO@";
20
21 public const string Libdl = "libdl.so";
22 public const string Kernel32 = "kernel32.dll";
23
24 public static Efl.Eo.NativeModule EflModule = new Efl.Eo.NativeModule(Efl);
25 public static Efl.Eo.NativeModule CoreModule = new Efl.Eo.NativeModule(Ecore);
26 public static Efl.Eo.NativeModule EinaModule = new Efl.Eo.NativeModule(Eina);
27 public static Efl.Eo.NativeModule EoModule = new Efl.Eo.NativeModule(Eo);
28 public static Efl.Eo.NativeModule EvasModule = new Efl.Eo.NativeModule(Evas);
29 public static Efl.Eo.NativeModule EvilModule = new Efl.Eo.NativeModule(Evil);
30 public static Efl.Eo.NativeModule EdjeModule = new Efl.Eo.NativeModule(Edje);
31 public static Efl.Eo.NativeModule ElementaryModule = new Efl.Eo.NativeModule(Elementary);
32 public static Efl.Eo.NativeModule EldbusModule = new Efl.Eo.NativeModule(Eldbus);
33 public static Efl.Eo.NativeModule CustomExportsModule = new Efl.Eo.NativeModule(CustomExports);
34 public static Efl.Eo.NativeModule LibdlModule = new Efl.Eo.NativeModule(Libdl);
35 public static Efl.Eo.NativeModule Kernel32Module = new Efl.Eo.NativeModule(Kernel32);
21} 36}
22 37
23} 38}