public WindowsTouch(Window window, ScreenSpace screen) { var positionTranslator = new CursorPositionTranslater(window, screen); touches = new TouchCollection(positionTranslator); hook = new TouchHook(window); IsAvailable = CheckIfWindows7OrHigher(); }
//ncrunch: no coverage start public WindowsMouse(Window window) { if (!StackTraceExtensions.StartedFromNCrunchOrNunitConsole) hook = new MouseHook(); positionTranslater = new CursorPositionTranslater(window); positionTranslater.window.ViewportSizeChanged += size => wasViewportResizedThisFrame = true; mouseCounter = new MouseDeviceCounter(); }
public TouchCollection(CursorPositionTranslater positionTranslater) { this.positionTranslater = positionTranslater; states = new State[MaxNumberOfTouches]; locations = new Vector2D[MaxNumberOfTouches]; ids = new int[MaxNumberOfTouches]; for (int index = 0; index < MaxNumberOfTouches; index++) ids[index] = -1; }
public SharpDXMouse(CursorPositionTranslater positionTranslater) { this.positionTranslater = positionTranslater; mouseCounter = new MouseDeviceCounter(); directInput = new DInput.DirectInput(); mouse = new DInput.Mouse(directInput); mouse.Properties.AxisMode = DInput.DeviceAxisMode.Absolute; mouse.Acquire(); currentState = new DInput.MouseState(); }
//ncrunch: no coverage start public WindowsMouse(Window window) { if (!StackTraceExtensions.StartedFromNCrunchOrNunitConsole) { hook = new MouseHook(); } positionTranslater = new CursorPositionTranslater(window); positionTranslater.window.ViewportSizeChanged += size => wasViewportResizedThisFrame = true; mouseCounter = new MouseDeviceCounter(); }
public WindowsTouch(Window window) { var positionTranslator = new CursorPositionTranslater(window); touches = new TouchCollection(positionTranslator); IsAvailable = CheckIfWindows7OrHigher(); if (IsAvailable) hook = new TouchHook(window); else //ncrunch: no coverage start (can only be reached from Windows Vista or earlier) Logger.Warning("Touch is not supported by the OS. Touch triggers won't work!"); }
public TouchCollection(CursorPositionTranslater positionTranslater) { this.positionTranslater = positionTranslater; }
public WindowsMouse(CursorPositionTranslater positionTranslater) { hook = new MouseHook(); this.positionTranslater = positionTranslater; mouseCounter = new MouseDeviceCounter(); }