diff dstep/corefoundation/CFPreferences.d @ 11:07194b026fa4

Added bindings to a couple of frameworks, new license + some other things
author Jacob Carlborg <doob@me.com>
date Sat, 01 Aug 2009 15:03:28 +0200
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/corefoundation/CFPreferences.d	Sat Aug 01 15:03:28 2009 +0200
@@ -0,0 +1,46 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Jul 12, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.corefoundation.CFPreferences;
+
+import dstep.corefoundation.CFArray;
+import dstep.corefoundation.CFBase;
+import dstep.corefoundation.CFDictionary;
+import dstep.corefoundation.CFString;
+import dstep.objc.bridge.Bridge;
+import dstep.objc.objc : id;
+
+extern (C)
+{
+	extern
+	{
+		const CFStringRef kCFPreferencesAnyApplication;
+		const CFStringRef kCFPreferencesCurrentApplication;
+		const CFStringRef kCFPreferencesAnyHost;
+		const CFStringRef kCFPreferencesCurrentHost;
+		const CFStringRef kCFPreferencesAnyUser;
+		const CFStringRef kCFPreferencesCurrentUser;
+	}
+}
+
+extern (C)
+{
+	void* CFPreferencesCopyAppValue (CFStringRef key, CFStringRef applicationID);
+	ubyte CFPreferencesGetAppBooleanValue (CFStringRef key, CFStringRef applicationID, char* keyExistsAndHasValidFormat);
+	int CFPreferencesGetAppIntegerValue (CFStringRef key, CFStringRef applicationID, char* keyExistsAndHasValidFormat);
+	void CFPreferencesSetAppValue (CFStringRef key, void* value, CFStringRef applicationID);
+	void CFPreferencesAddSuitePreferencesToApp (CFStringRef applicationID, CFStringRef suiteID);
+	void CFPreferencesRemoveSuitePreferencesFromApp (CFStringRef applicationID, CFStringRef suiteID);
+	ubyte CFPreferencesAppSynchronize (CFStringRef applicationID);
+	void* CFPreferencesCopyValue (CFStringRef key, CFStringRef applicationID, CFStringRef userName, CFStringRef hostName);
+	CFDictionaryRef CFPreferencesCopyMultiple (CFArrayRef keysToFetch, CFStringRef applicationID, CFStringRef userName, CFStringRef hostName);
+	void CFPreferencesSetValue (CFStringRef key, void* value, CFStringRef applicationID, CFStringRef userName, CFStringRef hostName);
+	void CFPreferencesSetMultiple (CFDictionaryRef keysToSet, CFArrayRef keysToRemove, CFStringRef applicationID, CFStringRef userName, CFStringRef hostName);
+	ubyte CFPreferencesSynchronize (CFStringRef applicationID, CFStringRef userName, CFStringRef hostName);
+	CFArrayRef CFPreferencesCopyApplicationList (CFStringRef userName, CFStringRef hostName);
+	CFArrayRef CFPreferencesCopyKeyList (CFStringRef applicationID, CFStringRef userName, CFStringRef hostName);
+	ubyte CFPreferencesAppValueIsForced (CFStringRef key, CFStringRef applicationID);
+}
\ No newline at end of file