2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 using System.Runtime.InteropServices;
20 internal static partial class Interop
22 internal static partial class Ecore
24 internal delegate void EcoreCallback(IntPtr data);
25 internal delegate bool EcoreTaskCallback(IntPtr data);
26 internal delegate void EcoreEventCallback(IntPtr data, int type, IntPtr evt);
28 [DllImport(Libraries.Ecore)]
29 internal static extern int ecore_init();
31 [DllImport(Libraries.Ecore)]
32 internal static extern int ecore_shutdown();
34 [DllImport(Libraries.Ecore)]
35 internal static extern void ecore_main_loop_begin();
37 [DllImport(Libraries.Ecore)]
38 internal static extern void ecore_main_loop_quit();
40 [DllImport(Libraries.Ecore)]
41 internal static extern bool ecore_main_loop_glib_integrate();
43 [DllImport(Libraries.Ecore)]
44 internal static extern IntPtr ecore_idler_add(EcoreTaskCallback callback, IntPtr data);
46 [DllImport(Libraries.Ecore)]
47 internal static extern void ecore_main_loop_thread_safe_call_async(EcoreTaskCallback callback, IntPtr data);
49 [DllImport(Libraries.Ecore)]
50 internal static extern IntPtr ecore_main_loop_thread_safe_call_sync(EcoreTaskCallback callback, IntPtr data);
52 [DllImport(Libraries.Ecore)]
53 internal static extern IntPtr ecore_idler_del(IntPtr idler);
55 [DllImport(Libraries.Ecore)]
56 internal static extern IntPtr ecore_timer_add(double interval, EcoreTaskCallback callback, IntPtr data);
58 [DllImport(Libraries.Ecore)]
59 internal static extern IntPtr ecore_timer_del(IntPtr timer);
61 [DllImport(Libraries.Ecore)]
62 internal static extern IntPtr ecore_animator_add(EcoreTaskCallback func, IntPtr data);
64 [DllImport(Libraries.Ecore)]
65 internal static extern IntPtr ecore_animator_del(IntPtr animator);
67 [DllImport(Libraries.Ecore)]
68 internal static extern double ecore_time_get();
70 [DllImport(Libraries.Ecore)]
71 internal static extern IntPtr ecore_event_handler_add(int type, EcoreEventCallback func, IntPtr data);
73 [DllImport(Libraries.Ecore)]
74 internal static extern IntPtr ecore_event_handler_del(IntPtr handler);