Ejemplo n.º 1
0
 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;
 }
Ejemplo n.º 2
0
        }         //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);
        }
Ejemplo n.º 3
0
 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);
     }
 }