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 Eext
24 const short EEXT_CALLBACK_PRIORITY_AFTER = 100;
25 const short EEXT_CALLBACK_PRIORITY_BEFORE = -100;
26 const short EEXT_CALLBACK_PRIORITY_DEFAULT = 0;
28 internal delegate bool Eext_Rotary_Event_Cb(IntPtr data, IntPtr obj, IntPtr info);
29 internal delegate bool Eext_Rotary_Handler_Cb(IntPtr data, IntPtr info);
31 internal enum Eext_Rotary_Event_Direction
37 internal struct Eext_Rotary_Event_Info
39 public Eext_Rotary_Event_Direction Direction;
40 public uint TimeStamp;
43 internal static Eext_Rotary_Event_Info FromIntPtr(IntPtr infoPtr)
45 var info = Marshal.PtrToStructure<Eext_Rotary_Event_Info>(infoPtr);
49 [DllImport(Libraries.Eext)]
50 internal static extern IntPtr eext_rotary_object_event_activated_set(IntPtr circleObject, bool activated);
52 [DllImport(Libraries.Eext)]
53 internal static extern bool eext_rotary_object_event_callback_add(IntPtr obj, Eext_Rotary_Event_Cb func, IntPtr data);
55 [DllImport(Libraries.Eext)]
56 internal static extern bool eext_rotary_object_event_callback_priority_add(IntPtr obj, short priority, Eext_Rotary_Event_Cb func, IntPtr data);
58 [DllImport(Libraries.Eext)]
59 internal static extern IntPtr eext_rotary_object_event_callback_del(IntPtr obj, Eext_Rotary_Event_Cb func);
61 [DllImport(Libraries.Eext)]
62 internal static extern bool eext_rotary_event_handler_add(Eext_Rotary_Handler_Cb func, IntPtr data);
64 [DllImport(Libraries.Eext)]
65 internal static extern IntPtr eext_rotary_event_handler_del(Eext_Rotary_Handler_Cb func);