Ejemplo n.º 1
0
        private void SendSyntheticEvent(EventType Type, Event OriginalEvent, double X, double XRoot, double Y, double YRoot, IList <Widget> Widgets, int Index)
        {
            SyntheticEventCrossing se = new SyntheticEventCrossing();

            se.Detail    = NotifyType.Ancestor;
            se.Focus     = false;
            se.Mode      = CrossingMode.Normal;
            se.SendEvent = false;
            se.State     = ModifierType.None;
            se.Subwindow = null;
            //se.Time = DateTime.Now.Ticks / 10000;	// TODO: the real value shoud be the uptime I think
            se.Time   = 0;
            se.Type   = Type;
            se.Window = OriginalEvent.Window;
            se.X      = X;
            se.XRoot  = XRoot;
            se.Y      = Y;
            se.YRoot  = YRoot;

            unsafe
            {
                Event managedEvent = new Event(new IntPtr(&se));

                for (int i = Index; i < Widgets.Count; ++i)
                {
                    Widgets[i].ProcessEvent(managedEvent);
                }
            }
        }
Ejemplo n.º 2
0
		private void SendSyntheticEvent (EventType Type, Event OriginalEvent, double X, double XRoot, double Y, double YRoot, IList<Widget> Widgets, int Index)
		{
			SyntheticEventCrossing se = new SyntheticEventCrossing();
			se.Detail = NotifyType.Ancestor;
			se.Focus = false;
			se.Mode = CrossingMode.Normal;
			se.SendEvent = false;
			se.State = ModifierType.None;
			se.Subwindow = null;
			//se.Time = DateTime.Now.Ticks / 10000;	// TODO: the real value shoud be the uptime I think
			se.Time = 0;
			se.Type = Type;
			se.Window = OriginalEvent.Window;
			se.X = X;
			se.XRoot = XRoot;
			se.Y = Y;
			se.YRoot = YRoot;
			
			unsafe
			{
				Event managedEvent = new Event(new IntPtr(&se));
				
				for(int i = Index ; i < Widgets.Count ; ++i)
				{
					Widgets[i].ProcessEvent (managedEvent);
				}
			}
		}