63dbf2a3ee20bee82a01cc525d3b7fe9f65908df
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / Interop.Eext.Rotary.cs
1 using System;
2 using System.Runtime.InteropServices;
3
4 internal static partial class Interop
5 {
6     internal static partial class Eext
7     {
8         const short EEXT_CALLBACK_PRIORITY_AFTER = 100;
9         const short EEXT_CALLBACK_PRIORITY_BEFORE = -100;
10         const short EEXT_CALLBACK_PRIORITY_DEFAULT = 0;
11
12         internal delegate bool Eext_Rotary_Event_Cb(IntPtr data, IntPtr obj, IntPtr info);
13         internal delegate bool Eext_Rotary_Handler_Cb(IntPtr data, IntPtr info);
14
15         internal enum Eext_Rotary_Event_Direction
16         {
17             Clockwise,
18             CounterClockwise
19         }
20
21         [StructLayout(LayoutKind.Sequential)]
22         internal struct Eext_Rotary_Event_Info
23         {
24             public Eext_Rotary_Event_Direction Direction;
25             public uint TimeStamp;
26         }
27
28         internal static Eext_Rotary_Event_Info FromIntPtr(IntPtr infoPtr)
29         {
30             var info = Marshal.PtrToStructure<Eext_Rotary_Event_Info>(infoPtr);
31             return info;
32         }
33
34         [DllImport(efl.Libs.Eext)]
35         internal static extern IntPtr eext_rotary_object_event_activated_set(IntPtr circleObject, bool activated);
36
37         [DllImport(efl.Libs.Eext)]
38         internal static extern bool eext_rotary_object_event_callback_add(IntPtr obj, Eext_Rotary_Event_Cb func, IntPtr data);
39
40         [DllImport(efl.Libs.Eext)]
41         internal static extern bool eext_rotary_object_event_callback_priority_add(IntPtr obj, short priority, Eext_Rotary_Event_Cb func, IntPtr data);
42
43         [DllImport(efl.Libs.Eext)]
44         internal static extern IntPtr eext_rotary_object_event_callback_del(IntPtr obj, Eext_Rotary_Event_Cb func);
45
46         [DllImport(efl.Libs.Eext)]
47         internal static extern bool eext_rotary_event_handler_add(Eext_Rotary_Handler_Cb func, IntPtr data);
48
49         [DllImport(efl.Libs.Eext)]
50         internal static extern IntPtr eext_rotary_event_handler_del(Eext_Rotary_Handler_Cb func);
51     }
52 }