Example #1
0
        static CFSet()
        {
            var handle = Dlfcn.dlopen(Constants.CoreFoundationLibrary, 0);

            try {
                var kCFTypeSetCallBacksPtr = Dlfcn.GetIndirect(handle, "kCFTypeSetCallBacks");
                kCFTypeSetCallBacks = (CFSetCallBacks)Marshal.PtrToStructure(kCFTypeSetCallBacksPtr, typeof(CFSetCallBacks));
                var kCFCopyStringSetCallBacksPtr = Dlfcn.GetIndirect(handle, "kCFCopyStringSetCallBacks");
                kCFCopyStringSetCallBacks = (CFSetCallBacks)Marshal.PtrToStructure(kCFCopyStringSetCallBacksPtr, typeof(CFSetCallBacks));
            } finally {
                Dlfcn.dlclose(handle);
            }
        }
Example #2
0
		static CFSet ()
		{
			var handle = Dlfcn.dlopen (Constants.CoreFoundationLibrary, 0);
			try {
				var kCFTypeSetCallBacksPtr = Dlfcn.GetIndirect (handle, "kCFTypeSetCallBacks");
				kCFTypeSetCallBacks = (CFSetCallBacks)Marshal.PtrToStructure (kCFTypeSetCallBacksPtr, typeof(CFSetCallBacks));
				var kCFCopyStringSetCallBacksPtr = Dlfcn.GetIndirect (handle, "kCFCopyStringSetCallBacks");
				kCFCopyStringSetCallBacks = (CFSetCallBacks)Marshal.PtrToStructure (kCFCopyStringSetCallBacksPtr, typeof(CFSetCallBacks));
			} finally {
				Dlfcn.dlclose (handle);
			}
		}
Example #3
0
 extern static CFMutableSetRef CFSetCreateMutable(CFAllocatorRef allocator,
                                                  CFIndex capacity,
                                                  [MarshalAs(UnmanagedType.LPStruct)][In] CFSetCallBacks callBacks);
Example #4
0
 extern static CFSetRef CFSetCreate(CFAllocatorRef allocator,
                                    [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)][In] IntPtr[] values,
                                    CFIndex numValues,
                                    [MarshalAs(UnmanagedType.LPStruct)][In] CFSetCallBacks callBacks);