Changeset View
Changeset View
Standalone View
Standalone View
src/bindings/mono/efl_mono/efl_all.cs
Show All 17 Lines | 13 | { | |||
---|---|---|---|---|---|
18 | // way evas modules are built with meson, currently they do not link directly | 18 | // way evas modules are built with meson, currently they do not link directly | ||
19 | // with libevas, leading to symbol not found errors when trying to open them. | 19 | // with libevas, leading to symbol not found errors when trying to open them. | ||
20 | // The call to FunctionWrapper makes sure evas is loaded with RTLD_GLOBAL, | 20 | // The call to FunctionWrapper makes sure evas is loaded with RTLD_GLOBAL, | ||
21 | // allowing the symbols to remain visible for the modules until the build | 21 | // allowing the symbols to remain visible for the modules until the build | ||
22 | // is sorted out. | 22 | // is sorted out. | ||
23 | private static Efl.Eo.FunctionWrapper<init_func_delegate> _evas_init; | 23 | private static Efl.Eo.FunctionWrapper<init_func_delegate> _evas_init; | ||
24 | [DllImport(efl.Libs.Evas)] public static extern void evas_shutdown(); | 24 | [DllImport(efl.Libs.Evas)] public static extern void evas_shutdown(); | ||
25 | [DllImport(efl.Libs.Elementary)] public static extern int elm_init(int argc, IntPtr argv); | 25 | [DllImport(efl.Libs.Elementary)] public static extern int elm_init(int argc, IntPtr argv); | ||
26 | [DllImport(efl.Libs.Elementary)] public static extern void elm_policy_set(int policy, int policy_detail); | | |||
27 | [DllImport(efl.Libs.Elementary)] public static extern void elm_shutdown(); | 26 | [DllImport(efl.Libs.Elementary)] public static extern void elm_shutdown(); | ||
28 | [DllImport(efl.Libs.Elementary)] public static extern void elm_run(); | 27 | [DllImport(efl.Libs.Elementary)] public static extern void elm_run(); | ||
29 | [DllImport(efl.Libs.Elementary)] public static extern void elm_exit(); | 28 | [DllImport(efl.Libs.Elementary)] public static extern void elm_exit(); | ||
30 | 29 | | |||
31 | static UnsafeNativeMethods() | 30 | static UnsafeNativeMethods() | ||
32 | { | 31 | { | ||
33 | _evas_init = new Efl.Eo.FunctionWrapper<init_func_delegate>(efl.Libs.Evas, "evas_init"); | 32 | _evas_init = new Efl.Eo.FunctionWrapper<init_func_delegate>(efl.Libs.Evas, "evas_init"); | ||
34 | } | 33 | } | ||
▲ Show 20 Lines • Show All 77 Lines • ▼ Show 20 Line(s) | 110 | #if WIN32 // Not a native define, we define it in our build system | |||
112 | // Ecore_Win32 uses OleInitialize, which requires single thread apartments | 111 | // Ecore_Win32 uses OleInitialize, which requires single thread apartments | ||
113 | if (System.Threading.Thread.CurrentThread.GetApartmentState() != ApartmentState.STA) | 112 | if (System.Threading.Thread.CurrentThread.GetApartmentState() != ApartmentState.STA) | ||
114 | { | 113 | { | ||
115 | throw new InvalidOperationException("UI Applications require STAThreadAttribute in Main()"); | 114 | throw new InvalidOperationException("UI Applications require STAThreadAttribute in Main()"); | ||
116 | } | 115 | } | ||
117 | #endif | 116 | #endif | ||
118 | elm_init(0, IntPtr.Zero); | 117 | elm_init(0, IntPtr.Zero); | ||
119 | 118 | | |||
120 | elm_policy_set((int)Elm.Policy.Quit, (int)Elm.PolicyQuit.LastWindowHidden); | 119 | Efl.Ui.Win.ExitOnAllWindowsClosed = new Eina.Value(0); | ||
121 | } | 120 | } | ||
122 | 121 | | |||
123 | public static void Shutdown() | 122 | public static void Shutdown() | ||
124 | { | 123 | { | ||
125 | elm_shutdown(); | 124 | elm_shutdown(); | ||
126 | } | 125 | } | ||
127 | 126 | | |||
128 | public static void Run() | 127 | public static void Run() | ||
Show All 13 Lines |