示例#1
0
 void OnInputReportReceived(IOReturn result, IOHIDReportType type, int id, byte[] data)
 {
     if (InputReportReceived != null)
     {
         InputReportReceived(this, new IOHIDReportEventArgs(result, type, id, data));
     }
 }
示例#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);
        }
示例#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);
        }
示例#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;
示例#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);
示例#7
0
 public static extern IOReturn IOHIDDeviceSetReport(IntPtr device, IOHIDReportType type, IntPtr reportID, IntPtr report, IntPtr reportLength);
示例#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;
示例#9
0
 public static extern IOReturn IOHIDDeviceSetReport(IntPtr device, IOHIDReportType type, IntPtr reportID, IntPtr report, IntPtr reportLength);
示例#10
0
 public IOHIDReportEventArgs(IOReturn result, IOHIDReportType type, int id, byte[] data) : base(result)
 {
     Type = type;
     ID   = id;
     Data = data;
 }
示例#11
0
		void OnInputReportReceived (IOReturn result, IOHIDReportType type, int id, byte[] data)
		{
			if (InputReportReceived != null)
				InputReportReceived (this, new IOHIDReportEventArgs (result, type, id, data));
		}
示例#12
0
 internal static extern IOReturn IOHIDDeviceGetReport(
     IOHIDDeviceRef device,
     IOHIDReportType reportType,
     CFIndex reportID,
     IntPtr report,
     IntPtr pReportLength);
示例#13
0
        internal static extern IOReturn IOHIDDeviceSetReportWithCallback(
			IOHIDDeviceRef device,
			IOHIDReportType reportType,
			int reportID,
			IntPtr report,
			int reportLength,
			CFTimeInterval timeout,
			IOHIDReportCallback callback,
			IntPtr context);
示例#14
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;
示例#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);
		}
示例#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;
示例#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);
		}
示例#18
0
		extern static IOReturn IOHIDDeviceGetReport (
			    IOHIDDeviceRef                  device,
			    IOHIDReportType                 reportType,
			    CFIndex                         reportID,
			    [MarshalAs (UnmanagedType.LPArray, SizeParamIndex = 4)]
			    uint8_t[]                       report,
			ref CFIndex                         pReportLength);
示例#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);
示例#20
0
		internal static extern IOReturn IOHIDDeviceGetReport(
			IOHIDDeviceRef device,
			IOHIDReportType reportType,
			CFIndex reportID,
			IntPtr report,
			IntPtr pReportLength);
示例#21
0
		public IOHIDReportEventArgs (IOReturn result, IOHIDReportType type, int id, byte[] data) : base (result)
		{
			Type = type;
			ID = id;
			Data = data;
		}