コード例 #1
0
ファイル: IOHIDDevice.cs プロジェクト: NikoXu/maccore
 void OnInputReportReceived(IOReturn result, IOHIDReportType type, int id, byte[] data)
 {
     if (InputReportReceived != null)
     {
         InputReportReceived(this, new IOHIDReportEventArgs(result, type, id, data));
     }
 }
コード例 #2
0
ファイル: IOHIDDevice.cs プロジェクト: NikoXu/maccore
        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
ファイル: IOHIDDevice.cs プロジェクト: NikoXu/maccore
        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
ファイル: IOHIDDevice.cs プロジェクト: NikoXu/maccore
 extern static IOReturn IOHIDDeviceGetReport(
     IOHIDDeviceRef device,
     IOHIDReportType reportType,
     CFIndex reportID,
     [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 4)]
     uint8_t[]                       report,
     ref CFIndex pReportLength);
コード例 #5
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;
コード例 #6
0
ファイル: IOHIDDevice.cs プロジェクト: NikoXu/maccore
 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
ファイル: NativeMethods.cs プロジェクト: Nielk1/HIDSharp
 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
ファイル: IOHIDDevice.cs プロジェクト: polipo/maccore
		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
ファイル: Native.cs プロジェクト: Driky/Unity3d-InputMapper
        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
ファイル: IOHIDDevice.cs プロジェクト: polipo/maccore
		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
ファイル: IOHIDDevice.cs プロジェクト: polipo/maccore
		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
ファイル: IOHIDDevice.cs プロジェクト: polipo/maccore
		extern static IOReturn IOHIDDeviceGetReport (
			    IOHIDDeviceRef                  device,
			    IOHIDReportType                 reportType,
			    CFIndex                         reportID,
			    [MarshalAs (UnmanagedType.LPArray, SizeParamIndex = 4)]
			    uint8_t[]                       report,
			ref CFIndex                         pReportLength);
コード例 #19
0
ファイル: IOHIDDevice.cs プロジェクト: polipo/maccore
		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;
		}