public EventController(EvasCallback Event, Item Master) { o = Master; evnt_num = Event; private_callback = new PrivEventHandler(EventCallback); evas_object_event_callback_add(o.Raw, (int)evnt_num, private_callback, new IntPtr()); switch(evnt_num) { case EvasCallback.MouseIn: t = typeof(EventMouseIn); break; case EvasCallback.MouseOut: t = typeof(EventMouseOut); break; case EvasCallback.MouseDown: t = typeof(EventMouseDown); break; case EvasCallback.MouseUp: t = typeof(EventMouseUp); break; case EvasCallback.MouseMove: t = typeof(EventMouseMove); break; case EvasCallback.MouseWheel: t = typeof(EventMouseWheel); break; case EvasCallback.Free: t = null; break; case EvasCallback.KeyDown: t = typeof(EventKeyDown); break; case EvasCallback.KeyUp: t = typeof(EventKeyUp); break; case EvasCallback.FocusIn: case EvasCallback.FocusOut: case EvasCallback.Show: case EvasCallback.Hide: case EvasCallback.Move: case EvasCallback.Resize: case EvasCallback.Restack: t = null; break; } }
internal void AddEventHandler(EvasCallback Event, EventHandler value) { EventController ec = (EventController)events[Event]; if (ec == null) { events[Event] = ec = new EventController(Event, this); } ec.InternalHandler += value; }
internal void RemoveEventHandler(EvasCallback Event, EventHandler value) { EventController ec = (EventController)events[Event]; if (ec == null) { return; } if (ec.Remove(value)) { events.Remove(Event); } }
public EventController(EvasCallback Event, Item Master) { o = Master; evnt_num = Event; private_callback = new PrivEventHandler(EventCallback); evas_object_event_callback_add(o.Raw, (int)evnt_num, private_callback, new IntPtr()); switch (evnt_num) { case EvasCallback.MouseIn: t = typeof(EventMouseIn); break; case EvasCallback.MouseOut: t = typeof(EventMouseOut); break; case EvasCallback.MouseDown: t = typeof(EventMouseDown); break; case EvasCallback.MouseUp: t = typeof(EventMouseUp); break; case EvasCallback.MouseMove: t = typeof(EventMouseMove); break; case EvasCallback.MouseWheel: t = typeof(EventMouseWheel); break; case EvasCallback.Free: t = null; break; case EvasCallback.KeyDown: t = typeof(EventKeyDown); break; case EvasCallback.KeyUp: t = typeof(EventKeyUp); break; case EvasCallback.FocusIn: case EvasCallback.FocusOut: case EvasCallback.Show: case EvasCallback.Hide: case EvasCallback.Move: case EvasCallback.Resize: case EvasCallback.Restack: t = null; break; } }
internal static extern void evas_event_callback_del_full(IntPtr obj, ObjectCallbackType type, EvasCallback func, IntPtr data);
internal void RemoveEventHandler(EvasCallback Event, EventHandler value) { EventController ec = (EventController)events[Event]; if(ec == null) return; if(ec.Remove(value)) events.Remove(Event); }
internal void AddEventHandler(EvasCallback Event, EventHandler value) { EventController ec = (EventController)events[Event]; if(ec == null) events[Event] = ec = new EventController(Event, this); ec.InternalHandler += value; }