Mercurial > projects > dstep
comparison dstep/corefoundation/CFBundle.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 |
comparison
equal
deleted
inserted
replaced
10:27e00625790b | 11:07194b026fa4 |
---|---|
1 /** | |
2 * Copyright: Copyright (c) 2009 Jacob Carlborg. | |
3 * Authors: Jacob Carlborg | |
4 * Version: Initial created: Jul 12, 2009 | |
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) | |
6 */ | |
7 module dstep.corefoundation.CFBundle; | |
8 | |
9 import dstep.corefoundation.CFArray; | |
10 import dstep.corefoundation.CFBase; | |
11 import dstep.corefoundation.CFDictionary; | |
12 import dstep.corefoundation.CFError; | |
13 import dstep.corefoundation.CFString; | |
14 import dstep.corefoundation.CFURL; | |
15 import dstep.objc.bridge.Bridge; | |
16 import dstep.objc.objc : id; | |
17 | |
18 struct __CFBundle; | |
19 alias __CFBundle* CFBundleRef; | |
20 alias __CFBundle* CFPlugInRef; | |
21 alias int CFBundleRefNum; | |
22 | |
23 extern (C) | |
24 { | |
25 extern | |
26 { | |
27 const CFStringRef kCFBundleInfoDictionaryVersionKey; | |
28 const CFStringRef kCFBundleExecutableKey; | |
29 const CFStringRef kCFBundleIdentifierKey; | |
30 const CFStringRef kCFBundleVersionKey; | |
31 const CFStringRef kCFBundleDevelopmentRegionKey; | |
32 const CFStringRef kCFBundleNameKey; | |
33 const CFStringRef kCFBundleLocalizationsKey; | |
34 } | |
35 } | |
36 | |
37 enum | |
38 { | |
39 kCFBundleExecutableArchitectureI386 = 0x00000007, | |
40 kCFBundleExecutableArchitecturePPC = 0x00000012, | |
41 kCFBundleExecutableArchitectureX86_64 = 0x01000007, | |
42 kCFBundleExecutableArchitecturePPC64 = 0x01000012 | |
43 } | |
44 | |
45 extern (C) | |
46 { | |
47 CFBundleRef CFBundleGetMainBundle (); | |
48 CFBundleRef CFBundleGetBundleWithIdentifier (CFStringRef bundleID); | |
49 CFArrayRef CFBundleGetAllBundles (); | |
50 uint CFBundleGetTypeID (); | |
51 CFBundleRef CFBundleCreate (CFAllocatorRef allocator, CFURLRef bundleURL); | |
52 CFArrayRef CFBundleCreateBundlesFromDirectory (CFAllocatorRef allocator, CFURLRef directoryURL, CFStringRef bundleType); | |
53 CFURLRef CFBundleCopyBundleURL (CFBundleRef bundle); | |
54 void* CFBundleGetValueForInfoDictionaryKey (CFBundleRef bundle, CFStringRef key); | |
55 CFDictionaryRef CFBundleGetInfoDictionary (CFBundleRef bundle); | |
56 CFDictionaryRef CFBundleGetLocalInfoDictionary (CFBundleRef bundle); | |
57 void CFBundleGetPackageInfo (CFBundleRef bundle, uint* packageType, uint* packageCreator); | |
58 CFStringRef CFBundleGetIdentifier (CFBundleRef bundle); | |
59 uint CFBundleGetVersionNumber (CFBundleRef bundle); | |
60 CFStringRef CFBundleGetDevelopmentRegion (CFBundleRef bundle); | |
61 CFURLRef CFBundleCopySupportFilesDirectoryURL (CFBundleRef bundle); | |
62 CFURLRef CFBundleCopyResourcesDirectoryURL (CFBundleRef bundle); | |
63 CFURLRef CFBundleCopyPrivateFrameworksURL (CFBundleRef bundle); | |
64 CFURLRef CFBundleCopySharedFrameworksURL (CFBundleRef bundle); | |
65 CFURLRef CFBundleCopySharedSupportURL (CFBundleRef bundle); | |
66 CFURLRef CFBundleCopyBuiltInPlugInsURL (CFBundleRef bundle); | |
67 CFDictionaryRef CFBundleCopyInfoDictionaryInDirectory (CFURLRef bundleURL); | |
68 ubyte CFBundleGetPackageInfoInDirectory (CFURLRef url, uint* packageType, uint* packageCreator); | |
69 CFURLRef CFBundleCopyResourceURL (CFBundleRef bundle, CFStringRef resourceName, CFStringRef resourceType, CFStringRef subDirName); | |
70 CFArrayRef CFBundleCopyResourceURLsOfType (CFBundleRef bundle, CFStringRef resourceType, CFStringRef subDirName); | |
71 CFStringRef CFBundleCopyLocalizedString (CFBundleRef bundle, CFStringRef key, CFStringRef value, CFStringRef tableName); | |
72 CFURLRef CFBundleCopyResourceURLInDirectory (CFURLRef bundleURL, CFStringRef resourceName, CFStringRef resourceType, CFStringRef subDirName); | |
73 CFArrayRef CFBundleCopyResourceURLsOfTypeInDirectory (CFURLRef bundleURL, CFStringRef resourceType, CFStringRef subDirName); | |
74 CFArrayRef CFBundleCopyBundleLocalizations (CFBundleRef bundle); | |
75 CFArrayRef CFBundleCopyPreferredLocalizationsFromArray (CFArrayRef locArray); | |
76 CFArrayRef CFBundleCopyLocalizationsForPreferences (CFArrayRef locArray, CFArrayRef prefArray); | |
77 CFURLRef CFBundleCopyResourceURLForLocalization (CFBundleRef bundle, CFStringRef resourceName, CFStringRef resourceType, CFStringRef subDirName, CFStringRef localizationName); | |
78 CFArrayRef CFBundleCopyResourceURLsOfTypeForLocalization (CFBundleRef bundle, CFStringRef resourceType, CFStringRef subDirName, CFStringRef localizationName); | |
79 CFDictionaryRef CFBundleCopyInfoDictionaryForURL (CFURLRef url); | |
80 CFArrayRef CFBundleCopyLocalizationsForURL (CFURLRef url); | |
81 CFArrayRef CFBundleCopyExecutableArchitecturesForURL (CFURLRef url); | |
82 CFURLRef CFBundleCopyExecutableURL (CFBundleRef bundle); | |
83 CFArrayRef CFBundleCopyExecutableArchitectures (CFBundleRef bundle); | |
84 ubyte CFBundlePreflightExecutable (CFBundleRef bundle, CFErrorRef* error); | |
85 ubyte CFBundleLoadExecutableAndReturnError (CFBundleRef bundle, CFErrorRef* error); | |
86 ubyte CFBundleLoadExecutable (CFBundleRef bundle); | |
87 ubyte CFBundleIsExecutableLoaded (CFBundleRef bundle); | |
88 void CFBundleUnloadExecutable (CFBundleRef bundle); | |
89 void* CFBundleGetFunctionPointerForName (CFBundleRef bundle, CFStringRef functionName); | |
90 void CFBundleGetFunctionPointersForNames (CFBundleRef bundle, CFArrayRef functionNames, void** ftbl); | |
91 void* CFBundleGetDataPointerForName (CFBundleRef bundle, CFStringRef symbolName); | |
92 void CFBundleGetDataPointersForNames (CFBundleRef bundle, CFArrayRef symbolNames, void** stbl); | |
93 CFURLRef CFBundleCopyAuxiliaryExecutableURL (CFBundleRef bundle, CFStringRef executableName); | |
94 CFPlugInRef CFBundleGetPlugIn (CFBundleRef bundle); | |
95 short CFBundleOpenBundleResourceMap (CFBundleRef bundle); | |
96 int CFBundleOpenBundleResourceFiles (CFBundleRef bundle, short* refNum, short* localizedRefNum); | |
97 void CFBundleCloseBundleResourceMap (CFBundleRef bundle, short refNum); | |
98 } |