コード例 #1
0
 internal static extern CFDictionaryRef CFDictionaryCreate(
     CFAllocatorRef allocator,
     CFStringRef[] keys,
     CFNumberRef[] values,
     CFIndex numValues,
     ref CFDictionary.CFDictionaryKeyCallBacks keyCallBacks,
     ref CFDictionary.CFDictionaryValueCallBacks valueCallBacks
     );
コード例 #2
0
ファイル: CoreFoundation.cs プロジェクト: swoolcock/opentk
        internal static string CFStringGetCString(IntPtr cfstr)
        {
            CFIndex length = CFStringGetLength(cfstr);

            if (length != IntPtr.Zero)
            {
                byte[] utf8_chars = new byte[length.ToInt32() + 1];
                if (CFStringGetCString(cfstr, utf8_chars, new IntPtr(utf8_chars.Length), CFStringEncoding.UTF8))
                {
                    return(Encoding.UTF8.GetString(utf8_chars));
                }
            }
            return(String.Empty);
        }
コード例 #3
0
		internal static extern IOReturn IOHIDDeviceGetReport(
			IOHIDDeviceRef device,
			IOHIDReportType reportType,
			CFIndex reportID,
			IntPtr report,
			IntPtr pReportLength);
コード例 #4
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;
コード例 #5
0
		internal static extern CFDictionaryRef CFDictionaryCreate (
			CFAllocatorRef allocator,
			CFStringRef[] keys,
			CFNumberRef[] values,
			CFIndex numValues,
			ref CFDictionary.CFDictionaryKeyCallBacks keyCallBacks,
			ref CFDictionary.CFDictionaryValueCallBacks valueCallBacks
			);
コード例 #6
0
		//extern static IntPtr CFArrayCreate (IntPtr allocator, IntPtr values, CFIndex numValues, IntPtr callbacks);
		internal static extern IntPtr CFArrayCreate (CFAllocatorRef allocator, IntPtr[] values, CFIndex numValues, CFArrayCallBacks callbacks);
コード例 #7
0
ファイル: CoreFoundation.cs プロジェクト: swoolcock/opentk
 internal static extern CFRunLoopSourceRef MachPortCreateRunLoopSource(
     CFAllocatorRef allocator,
     CFMachPortRef port,
     CFIndex order);
コード例 #8
0
ファイル: CoreFoundation.cs プロジェクト: swoolcock/opentk
 internal static extern Boolean CFStringGetCString(
     CFStringRef theString,
     byte[] buffer,
     CFIndex bufferSize,
     CFStringEncoding encoding
     );
コード例 #9
0
 internal static extern CFRunLoopSourceRef MachPortCreateRunLoopSource(
     CFAllocatorRef allocator,
     CFMachPortRef port,
     CFIndex order);
コード例 #10
0
 internal static extern Boolean CFStringGetCString(
     CFStringRef theString,
     byte[] buffer,
     CFIndex bufferSize,
     CFStringEncoding encoding
 );
コード例 #11
0
 extern static bool CFHTTPMessageAppendBytes(IntPtr message, ref byte[] newBytes, CFIndex numBytes);
コード例 #12
0
 internal static extern IOReturn IOHIDDeviceGetReport(
     IOHIDDeviceRef device,
     IOHIDReportType reportType,
     CFIndex reportID,
     IntPtr report,
     IntPtr pReportLength);
コード例 #13
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;
コード例 #14
0
 //extern static IntPtr CFArrayCreate (IntPtr allocator, IntPtr values, CFIndex numValues, IntPtr callbacks);
 internal static extern IntPtr CFArrayCreate(CFAllocatorRef allocator, IntPtr[] values, CFIndex numValues, CFArrayCallBacks callbacks);