SetGestureCallback(type, state, new Action<object>((info) => action((T)info)));
}
- private void GestureCallbackHandler(IntPtr data, IntPtr event_info)
+ private int GestureCallbackHandler(IntPtr data, IntPtr event_info)
{
// so EFL called our callback, lets use data to find the right Action to call
var handlerIndex = (int)data;
// thanks to the fact that we never remove item from _handlers, we don't need a lock here
if (handlerIndex < 0 || handlerIndex >= _handlers.Count)
- return;
+ return 0;
var currentHandler = _handlers[handlerIndex];
Action<object> action = currentHandler.Action;
if (action == null)
- return;
+ return 0;
// the interpretation of the event_info struct pointer depends on the GestureType
switch (currentHandler.Type)
action(Marshal.PtrToStructure<RotateData>(event_info));
break;
}
+ return 0;
}
#region Info structures
{
internal static partial class Elementary
{
- public delegate void GestureEventCallback(IntPtr data, IntPtr event_info);
+ public delegate int GestureEventCallback(IntPtr data, IntPtr event_info);
[DllImport(Libraries.Elementary)]
internal static extern IntPtr elm_gesture_layer_add(IntPtr parent);