Mercurial > projects > dstep
view 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 |
line wrap: on
line source
/** * Copyright: Copyright (c) 2009 Jacob Carlborg. * Authors: Jacob Carlborg * Version: Initial created: Jul 22, 2009 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) */ module dstep.coreservices.launchservices.LSOpen; //import dstep.AvailabilityMacros; import dstep.corefoundation.CoreFoundation; import dstep.coreservices.ae.AE; import dstep.coreservices.carboncore.CarbonCore; import dstep.coreservices.launchservices.LSInfo; alias uint LSLaunchFlags; enum { kLSLaunchDefaults = 0x00000001, kLSLaunchAndPrint = 0x00000002, kLSLaunchReserved2 = 0x00000004, kLSLaunchReserved3 = 0x00000008, kLSLaunchReserved4 = 0x00000010, kLSLaunchReserved5 = 0x00000020, kLSLaunchAndDisplayErrors = 0x00000040, kLSLaunchInhibitBGOnly = 0x00000080, kLSLaunchDontAddToRecents = 0x00000100, kLSLaunchDontSwitch = 0x00000200, kLSLaunchNoParams = 0x00000800, kLSLaunchAsync = 0x00010000, kLSLaunchStartClassic = 0x00020000, kLSLaunchInClassic = 0x00040000, kLSLaunchNewInstance = 0x00080000, kLSLaunchAndHide = 0x00100000, kLSLaunchAndHideOthers = 0x00200000, kLSLaunchHasUntrustedContents = 0x00400000 } struct LSLaunchFSRefSpec { FSRef* appRef; uint numDocs; FSRef* itemRefs; AEDesc* passThruParams; uint launchFlags; void* asyncRefCon; } struct LSLaunchURLSpec { CFURLRef appURL; CFArrayRef itemURLs; AEDesc* passThruParams; uint launchFlags; void* asyncRefCon; } struct LSApplicationParameters { int version_; uint flags; FSRef* application; void* asyncLaunchRefCon; CFDictionaryRef environment; CFArrayRef argv; AppleEvent* initialEvent; } extern (C) { int LSOpenFSRef (FSRef* inRef, FSRef* outLaunchedRef); int LSOpenCFURLRef (CFURLRef inURL, CFURLRef* outLaunchedURL); int LSOpenFromRefSpec (LSLaunchFSRefSpec* inLaunchSpec, FSRef* outLaunchedRef); int LSOpenFromURLSpec (LSLaunchURLSpec* inLaunchSpec, CFURLRef* outLaunchedURL); int LSOpenApplication (LSApplicationParameters* appParams, ProcessSerialNumber* outPSN); int LSOpenItemsWithRole (FSRef* inItems, int inItemCount, uint inRole, AEKeyDesc* inAEParam, LSApplicationParameters* inAppParams, ProcessSerialNumber* outPSNs, int inMaxPSNCount); int LSOpenURLsWithRole (CFArrayRef inURLs, uint inRole, AEKeyDesc* inAEParam, LSApplicationParameters* inAppParams, ProcessSerialNumber* outPSNs, int inMaxPSNCount); }