Example #1
0
        public static bool GetBooleanValue(IntPtr theDict, IntPtr key)
        {
            var value = GetValue(theDict, key);

            if (value == IntPtr.Zero)
            {
                return(false);
            }
            return(CFBoolean.GetValue(value));
        }
Example #2
0
		static CFBoolean ()
		{
			var handle = Dlfcn.dlopen (Constants.CoreFoundationLibrary, 0);
			if (handle == IntPtr.Zero)
				return;
			try {
				True  = new CFBoolean (Dlfcn.GetIntPtr (handle, "kCFBooleanTrue"), false);
				False = new CFBoolean (Dlfcn.GetIntPtr (handle, "kCFBooleanFalse"), false);
			}
			finally {
				Dlfcn.dlclose (handle);
			}
		}
Example #3
0
        static CFBoolean()
        {
            var handle = Dlfcn.dlopen(Constants.CoreFoundationLibrary, 0);

            if (handle == IntPtr.Zero)
            {
                return;
            }
            try {
                True  = new CFBoolean(Dlfcn.GetIntPtr(handle, "kCFBooleanTrue"), false);
                False = new CFBoolean(Dlfcn.GetIntPtr(handle, "kCFBooleanFalse"), false);
            }
            finally {
                Dlfcn.dlclose(handle);
            }
        }