Example #1
0
 void OnInputReportReceived(IOReturn result, IOHIDReportType type, int id, byte[] data)
 {
     if (InputReportReceived != null)
     {
         InputReportReceived(this, new IOHIDReportEventArgs(result, type, id, data));
     }
 }
Example #2
0
        public void SendReport(IOHIDReportType type, int id, byte[] data)
        {
            ThrowIfDisposed();
            var result = IOHIDDeviceSetReport(Handle, type, (CFIndex)id, data, (CFIndex)data.Length);

            IOObject.ThrowIfError(result);
        }
Example #3
0
        void InputReportReceivedCallback(IntPtr context, IOReturn result, IntPtr senderRef,
                                         IOHIDReportType type, uint id, byte[] data, CFIndex length)
        {
            var device = GetCFObject <IOHIDDevice> (senderRef);

            device.OnInputReportReceived(result, type, (int)id, data);
        }
Example #4
0
 extern static IOReturn IOHIDDeviceGetReport(
     IOHIDDeviceRef device,
     IOHIDReportType reportType,
     CFIndex reportID,
     [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 4)]
     uint8_t[]                       report,
     ref CFIndex pReportLength);
 internal static extern IOReturn IOHIDDeviceSetReportWithCallback(
     IOHIDDeviceRef device,
     IOHIDReportType reportType,
     int reportID,
     IntPtr report,
     int reportLength,
     CFTimeInterval timeout,
     IOHIDReportCallback callback,
     IntPtr context);             //AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
Example #6
0
 extern static IOReturn IOHIDDeviceGetReportWithCallback(
     IOHIDDeviceRef device,
     IOHIDReportType reportType,
     CFIndex reportID,
     [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 4)]
     uint8_t[]                       report,
     ref CFIndex pReportLength,
     CFTimeInterval timeout,
     IOHIDReportCallback callback,
     IntPtr context);
 public static extern IOReturn IOHIDDeviceSetReport(IntPtr device, IOHIDReportType type, IntPtr reportID, IntPtr report, IntPtr reportLength);
Example #8
0
		internal static extern IOReturn IOHIDDeviceSetReport(
			IOHIDDeviceRef device,
			IOHIDReportType reportType,
			int reportID,
			IntPtr report,
			CFIndex reportLength);// AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
Example #9
0
 public static extern IOReturn IOHIDDeviceSetReport(IntPtr device, IOHIDReportType type, IntPtr reportID, IntPtr report, IntPtr reportLength);
Example #10
0
 public IOHIDReportEventArgs(IOReturn result, IOHIDReportType type, int id, byte[] data) : base(result)
 {
     Type = type;
     ID   = id;
     Data = data;
 }
Example #11
0
		void OnInputReportReceived (IOReturn result, IOHIDReportType type, int id, byte[] data)
		{
			if (InputReportReceived != null)
				InputReportReceived (this, new IOHIDReportEventArgs (result, type, id, data));
		}
 internal static extern IOReturn IOHIDDeviceGetReport(
     IOHIDDeviceRef device,
     IOHIDReportType reportType,
     CFIndex reportID,
     IntPtr report,
     IntPtr pReportLength);
Example #13
0
        internal static extern IOReturn IOHIDDeviceSetReportWithCallback(
			IOHIDDeviceRef device,
			IOHIDReportType reportType,
			int reportID,
			IntPtr report,
			int reportLength,
			CFTimeInterval timeout,
			IOHIDReportCallback callback,
			IntPtr context);
 internal static extern IOReturn IOHIDDeviceSetReport(
     IOHIDDeviceRef device,
     IOHIDReportType reportType,
     int reportID,
     IntPtr report,
     CFIndex reportLength);            // AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
Example #15
0
		void InputReportReceivedCallback (IntPtr context, IOReturn result, IntPtr senderRef,
		                            IOHIDReportType type, uint id, byte[] data, CFIndex length)
		{
			var device = GetCFObject<IOHIDDevice> (senderRef);
			device.OnInputReportReceived (result, type, (int)id, data);
		}
Example #16
0
		internal static extern IOReturn IOHIDDeviceSetReportWithCallback(
			IOHIDDeviceRef device,
			IOHIDReportType reportType,
			int reportID,
			IntPtr report,
			int reportLength,
			CFTimeInterval timeout,
			IOHIDReportCallback callback,
			IntPtr context) ;//AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
Example #17
0
		public void SendReport (IOHIDReportType type, int id, byte[] data)
		{
			ThrowIfDisposed ();
			var result = IOHIDDeviceSetReport (Handle, type, (CFIndex)id, data, (CFIndex)data.Length);
			IOObject.ThrowIfError (result);
		}
Example #18
0
		extern static IOReturn IOHIDDeviceGetReport (
			    IOHIDDeviceRef                  device,
			    IOHIDReportType                 reportType,
			    CFIndex                         reportID,
			    [MarshalAs (UnmanagedType.LPArray, SizeParamIndex = 4)]
			    uint8_t[]                       report,
			ref CFIndex                         pReportLength);
Example #19
0
		extern static IOReturn IOHIDDeviceGetReportWithCallback (
			    IOHIDDeviceRef                  device,
			    IOHIDReportType                 reportType,
			    CFIndex                         reportID,
			    [MarshalAs (UnmanagedType.LPArray, SizeParamIndex = 4)]
			    uint8_t[]                       report,
			ref CFIndex                         pReportLength,
			    CFTimeInterval                  timeout,
			    IOHIDReportCallback             callback,
			    IntPtr                          context);
Example #20
0
		internal static extern IOReturn IOHIDDeviceGetReport(
			IOHIDDeviceRef device,
			IOHIDReportType reportType,
			CFIndex reportID,
			IntPtr report,
			IntPtr pReportLength);
Example #21
0
		public IOHIDReportEventArgs (IOReturn result, IOHIDReportType type, int id, byte[] data) : base (result)
		{
			Type = type;
			ID = id;
			Data = data;
		}