Example #1
0
      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;
	}
      }
Example #2
0
        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;
        }
Example #3
0
        internal void RemoveEventHandler(EvasCallback Event, EventHandler value)
        {
            EventController ec = (EventController)events[Event];

            if (ec == null)
            {
                return;
            }
            if (ec.Remove(value))
            {
                events.Remove(Event);
            }
        }
Example #4
0
            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;
                }
            }
Example #5
0
 internal static extern void evas_event_callback_del_full(IntPtr obj, ObjectCallbackType type, EvasCallback func, IntPtr data);
Example #6
0
    internal void RemoveEventHandler(EvasCallback Event, EventHandler value)
    {
      EventController ec = (EventController)events[Event];
      if(ec == null) return;
      if(ec.Remove(value))
	events.Remove(Event);
    }
Example #7
0
 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;
 }