2 using System.Runtime.InteropServices;
4 internal static partial class Interop
6 internal static partial class Eext
8 const short EEXT_CALLBACK_PRIORITY_AFTER = 100;
9 const short EEXT_CALLBACK_PRIORITY_BEFORE = -100;
10 const short EEXT_CALLBACK_PRIORITY_DEFAULT = 0;
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);
15 internal enum Eext_Rotary_Event_Direction
21 [StructLayout(LayoutKind.Sequential)]
22 internal struct Eext_Rotary_Event_Info
24 public Eext_Rotary_Event_Direction Direction;
25 public uint TimeStamp;
28 internal static Eext_Rotary_Event_Info FromIntPtr(IntPtr infoPtr)
30 var info = Marshal.PtrToStructure<Eext_Rotary_Event_Info>(infoPtr);
34 [DllImport(efl.Libs.Eext)]
35 internal static extern IntPtr eext_rotary_object_event_activated_set(IntPtr circleObject, bool activated);
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);
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);
43 [DllImport(efl.Libs.Eext)]
44 internal static extern IntPtr eext_rotary_object_event_callback_del(IntPtr obj, Eext_Rotary_Event_Cb func);
46 [DllImport(efl.Libs.Eext)]
47 internal static extern bool eext_rotary_event_handler_add(Eext_Rotary_Handler_Cb func, IntPtr data);
49 [DllImport(efl.Libs.Eext)]
50 internal static extern IntPtr eext_rotary_event_handler_del(Eext_Rotary_Handler_Cb func);