private void DeviceValueReceived(IntPtr context, IntPtr res, IntPtr sender, IntPtr val) { MouseState state1; if (this.MouseDevices.TryGetValue(sender, out state1)) { this.MouseDevices[sender] = HIDInput.UpdateMouse(state1, val); } else { KeyboardState state2; if (!this.KeyboardDevices.TryGetValue(sender, out state2)) { return; } this.KeyboardDevices[sender] = HIDInput.UpdateKeyboard(state2, val); } }
public static double IOHIDValueGetScaledValue(IntPtr value, HIDInput.IOHIDValueScaleType type);
public static void IOHIDManagerRegisterDeviceRemovalCallback(IntPtr inIOHIDManagerRef, HIDInput.NativeMethods.IOHIDDeviceCallback inIOHIDDeviceCallback, IntPtr inContext);
public static void IOHIDDeviceRegisterInputValueCallback(IntPtr device, HIDInput.NativeMethods.IOHIDValueCallback callback, IntPtr context);
public static bool IOHIDDeviceConformsTo(IntPtr inIOHIDDeviceRef, HIDInput.HIDPage inUsagePage, int inUsage);