コード例 #1
0
ファイル: WindowsTouch.cs プロジェクト: hillwhite/DeltaEngine
 public WindowsTouch(Window window, ScreenSpace screen)
 {
     var positionTranslator = new CursorPositionTranslater(window, screen);
     touches = new TouchCollection(positionTranslator);
     hook = new TouchHook(window);
     IsAvailable = CheckIfWindows7OrHigher();
 }
コード例 #2
0
ファイル: WindowsMouse.cs プロジェクト: whztt07/DeltaEngine
		//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();
		}
コード例 #3
0
ファイル: TouchCollection.cs プロジェクト: remy22/DeltaEngine
 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;
 }
コード例 #4
0
ファイル: SharpDXMouse.cs プロジェクト: hillwhite/DeltaEngine
 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();
 }
コード例 #5
0
 //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();
 }
コード例 #6
0
ファイル: WindowsTouch.cs プロジェクト: remy22/DeltaEngine
 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!");
 }
コード例 #7
0
 public TouchCollection(CursorPositionTranslater positionTranslater)
 {
     this.positionTranslater = positionTranslater;
 }
コード例 #8
0
ファイル: WindowsMouse.cs プロジェクト: hillwhite/DeltaEngine
 public WindowsMouse(CursorPositionTranslater  positionTranslater)
 {
     hook = new MouseHook();
     this.positionTranslater = positionTranslater;
     mouseCounter = new MouseDeviceCounter();
 }
コード例 #9
0
		public TouchCollection(CursorPositionTranslater positionTranslater)
		{
			this.positionTranslater = positionTranslater;
		}