internal NativeTouchInput[] GetTouchDataFromHandle(int inputCount, IntPtr handle) { var inputs = new NativeTouchInput[inputCount]; bool isTouchProcessed = NativeMethods.GetTouchInputInfo(handle, inputCount, inputs, NativeTouchByteSize); return isTouchProcessed == false ? null : inputs; }
} //ncrunch: no coverage end internal static IEnumerable <NativeTouchInput> GetTouchDataFromHandle(int inputCount, IntPtr handle) { var inputs = new NativeTouchInput[inputCount]; bool isTouchProcessed = NativeMethods.GetTouchInputInfo(handle, inputCount, inputs, NativeTouchByteSize); return(isTouchProcessed == false ? null : inputs); }
private void UpdateTouchIfPreviouslyPresent(int index, List <NativeTouchInput> newTouches) { for (int newTouchIndex = 0; newTouchIndex < newTouches.Count; newTouchIndex++) { if (newTouches[newTouchIndex].Id != ids[index]) { continue; } NativeTouchInput newTouch = newTouches[newTouchIndex]; newTouches.RemoveAt(newTouchIndex); UpdateTouchState(index, newTouch.Flags); locations[index] = CalculateQuadraticPosition(newTouch.X, newTouch.Y); } }