protected PointCapture() { _pointerInputTargetWindow = new PointerInputTargetWindow(); _inputProvider = new InputProvider(); _pointEventTranslator = new PointEventTranslator(_inputProvider); _pointEventTranslator.PointDown += (PointEventTranslator_PointDown); _pointEventTranslator.PointUp += (PointEventTranslator_PointUp); _pointEventTranslator.PointMove += (PointEventTranslator_PointMove); _winEventDele = WinEventProc; _hWinEventHook = SetWinEventHook(EVENT_SYSTEM_FOREGROUND, EVENT_SYSTEM_MINIMIZEEND, IntPtr.Zero, _winEventDele, 0, 0, WINEVENT_OUTOFCONTEXT | WINEVENT_SKIPOWNPROCESS); if (AppConfig.UiAccess) { ForegroundApplicationsChanged += PointCapture_ForegroundApplicationsChanged; } ModeChanged += (o, e) => { if (e.Mode == CaptureMode.UserDisabled) { _pointerInputTargetWindow.BlockTouchInputThreshold = 0; } }; _timeoutTimer.Tick += GestureRecognizedCallback; }
protected PointCapture() { _pointerInputTargetWindow = new PointerInputTargetWindow(); _inputProvider = new InputProvider(); _pointEventTranslator = new PointEventTranslator(_inputProvider); _pointEventTranslator.PointDown += (PointEventTranslator_PointDown); _pointEventTranslator.PointUp += (PointEventTranslator_PointUp); _pointEventTranslator.PointMove += (PointEventTranslator_PointMove); _currentContext = SynchronizationContext.Current; _winEventDele = WinEventProc; _hWinEventHook = SetWinEventHook(EVENT_SYSTEM_FOREGROUND, EVENT_SYSTEM_MINIMIZEEND, IntPtr.Zero, _winEventDele, 0, 0, WINEVENT_OUTOFCONTEXT | WINEVENT_SKIPOWNPROCESS); if (AppConfig.UiAccess) { _blockTouchDelayTimer = new System.Threading.Timer(UpdateBlockTouchInputThresholdCallback, null, Timeout.Infinite, Timeout.Infinite); ForegroundApplicationsChanged += PointCapture_ForegroundApplicationsChanged; } ModeChanged += (o, e) => { if (e.Mode == CaptureMode.UserDisabled) { _pointerInputTargetWindow.BlockTouchInputThreshold = 0; } }; SystemEvents.SessionSwitch += SystemEvents_SessionSwitch; }
protected TouchCapture() { _pointerInputTargetWindow = new PointerInputTargetWindow(); var inputProvider = new InputProvider(); inputProvider.TouchInputProcessor.PointsIntercepted += _touchEventTranslator.TranslateTouchEvent; _touchEventTranslator.TouchDown += (PointEventTranslator_TouchDown); _touchEventTranslator.TouchUp += (TouchEventTranslator_TouchUp); _touchEventTranslator.TouchMove += (TouchEventTranslator_TouchMove); if (AppConfig.UiAccess) { _winEventDele = WinEventProc; _hWinEventHook = SetWinEventHook(EVENT_SYSTEM_FOREGROUND, EVENT_SYSTEM_FOREGROUND, IntPtr.Zero, _winEventDele, 0, 0, WINEVENT_OUTOFCONTEXT); } ModeChanged += (o, e) => { if (e.Mode == CaptureMode.UserDisabled) { _pointerInputTargetWindow.BlockTouchInputThreshold = 0; } else if (e.Mode == CaptureMode.Normal && StackUpGesture) { StackUpGesture = false; } }; _timeoutTimer.Tick += GestureRecognizedCallback; }
protected TouchCapture() { _inputTargetWindow = new PointerInputTargetWindow(); var inputProvider = new InputProvider(); inputProvider.TouchInputProcessor.PointsIntercepted += _touchEventTranslator.TranslateTouchEvent; _touchEventTranslator.TouchDown += (PointEventTranslator_TouchDown); _touchEventTranslator.TouchUp += (TouchEventTranslator_TouchUp); _touchEventTranslator.TouchMove += (TouchEventTranslator_TouchMove); if (AppConfig.UiAccess) { _winEventDele = WinEventProc; _hWinEventHook = SetWinEventHook(EVENT_SYSTEM_FOREGROUND, EVENT_SYSTEM_FOREGROUND, IntPtr.Zero, _winEventDele, 0, 0, WINEVENT_OUTOFCONTEXT); } ModeChanged += (o, e) => { if (e.Mode == CaptureMode.UserDisabled) _inputTargetWindow.InterceptTouchInput(false); }; _timeoutTimer.Tick += GestureRecognizedCallback; }