Mercurial > projects > dstep
comparison dstep/coreservices/launchservices/LSOpen.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 22, 2009 | |
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) | |
6 */ | |
7 module dstep.coreservices.launchservices.LSOpen; | |
8 | |
9 //import dstep.AvailabilityMacros; | |
10 import dstep.corefoundation.CoreFoundation; | |
11 import dstep.coreservices.ae.AE; | |
12 import dstep.coreservices.carboncore.CarbonCore; | |
13 import dstep.coreservices.launchservices.LSInfo; | |
14 | |
15 alias uint LSLaunchFlags; | |
16 | |
17 enum | |
18 { | |
19 kLSLaunchDefaults = 0x00000001, | |
20 kLSLaunchAndPrint = 0x00000002, | |
21 kLSLaunchReserved2 = 0x00000004, | |
22 kLSLaunchReserved3 = 0x00000008, | |
23 kLSLaunchReserved4 = 0x00000010, | |
24 kLSLaunchReserved5 = 0x00000020, | |
25 kLSLaunchAndDisplayErrors = 0x00000040, | |
26 kLSLaunchInhibitBGOnly = 0x00000080, | |
27 kLSLaunchDontAddToRecents = 0x00000100, | |
28 kLSLaunchDontSwitch = 0x00000200, | |
29 kLSLaunchNoParams = 0x00000800, | |
30 kLSLaunchAsync = 0x00010000, | |
31 kLSLaunchStartClassic = 0x00020000, | |
32 kLSLaunchInClassic = 0x00040000, | |
33 kLSLaunchNewInstance = 0x00080000, | |
34 kLSLaunchAndHide = 0x00100000, | |
35 kLSLaunchAndHideOthers = 0x00200000, | |
36 kLSLaunchHasUntrustedContents = 0x00400000 | |
37 } | |
38 | |
39 struct LSLaunchFSRefSpec | |
40 { | |
41 FSRef* appRef; | |
42 uint numDocs; | |
43 FSRef* itemRefs; | |
44 AEDesc* passThruParams; | |
45 uint launchFlags; | |
46 void* asyncRefCon; | |
47 } | |
48 | |
49 | |
50 struct LSLaunchURLSpec | |
51 { | |
52 CFURLRef appURL; | |
53 CFArrayRef itemURLs; | |
54 AEDesc* passThruParams; | |
55 uint launchFlags; | |
56 void* asyncRefCon; | |
57 } | |
58 | |
59 | |
60 struct LSApplicationParameters | |
61 { | |
62 int version_; | |
63 uint flags; | |
64 FSRef* application; | |
65 void* asyncLaunchRefCon; | |
66 CFDictionaryRef environment; | |
67 CFArrayRef argv; | |
68 AppleEvent* initialEvent; | |
69 } | |
70 | |
71 extern (C) | |
72 { | |
73 int LSOpenFSRef (FSRef* inRef, FSRef* outLaunchedRef); | |
74 int LSOpenCFURLRef (CFURLRef inURL, CFURLRef* outLaunchedURL); | |
75 int LSOpenFromRefSpec (LSLaunchFSRefSpec* inLaunchSpec, FSRef* outLaunchedRef); | |
76 int LSOpenFromURLSpec (LSLaunchURLSpec* inLaunchSpec, CFURLRef* outLaunchedURL); | |
77 int LSOpenApplication (LSApplicationParameters* appParams, ProcessSerialNumber* outPSN); | |
78 int LSOpenItemsWithRole (FSRef* inItems, int inItemCount, uint inRole, AEKeyDesc* inAEParam, LSApplicationParameters* inAppParams, ProcessSerialNumber* outPSNs, int inMaxPSNCount); | |
79 int LSOpenURLsWithRole (CFArrayRef inURLs, uint inRole, AEKeyDesc* inAEParam, LSApplicationParameters* inAppParams, ProcessSerialNumber* outPSNs, int inMaxPSNCount); | |
80 } |