コード例 #1
0
ファイル: CFDictionary.cs プロジェクト: NikoXu/maccore
        public static bool GetBooleanValue(IntPtr theDict, IntPtr key)
        {
            var value = GetValue(theDict, key);

            if (value == IntPtr.Zero)
            {
                return(false);
            }
            return(CFBoolean.GetValue(value));
        }
コード例 #2
0
ファイル: CFBoolean.cs プロジェクト: polipo/maccore
		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);
			}
		}
コード例 #3
0
ファイル: CFBoolean.cs プロジェクト: Terricide/monomac
        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);
            }
        }
コード例 #4
0
ファイル: CGSConnection.cs プロジェクト: HaKDMoDz/Alloy
 public void SetProperty(CGSConnection target, string property, CFBoolean value)
 {
     var cfProperty = new CFString(property);
     CGSSetConnectionProperty(Handle, target.Handle, cfProperty.Handle, value.Handle);
 }