Mercurial > projects > dstep
view dstep/coreservices/carboncore/Finder.d @ 16:19885b43130e
Huge update, the bridge actually works now
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Sun, 03 Jan 2010 22:06:11 +0100 |
parents | 07194b026fa4 |
children |
line wrap: on
line source
/** * Copyright: Copyright (c) 2009 Jacob Carlborg. * Authors: Jacob Carlborg * Version: Initial created: Jul 21, 2009 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) */ module dstep.coreservices.carboncore.Finder; //import dstep.AvailabilityMacros; import dstep.coreservices.carboncore.MacTypes; import dstep.objc.bridge.TypeEncoding; alias CustomBadgeResource* CustomBadgeResourcePtr; alias CustomBadgeResourcePtr* CustomBadgeResourceHandle; alias RoutingResourceEntry* RoutingResourcePtr; alias RoutingResourcePtr* RoutingResourceHandle; // This is needed otherwise the enums will fail compiling with gdc version (GNU) { private { const __kClippingCreator = getOSType!("drag"); const __kClippingPictureType = getOSType!("clpp"); const __kClippingTextType = getOSType!("clpt"); const __kClippingSoundType = getOSType!("clps"); const __kClippingUnknownType = getOSType!("clpu"); } } // This is needed otherwise the enums will fail compiling with gdc version (GNU) { private { const __kInternetLocationCreator = getOSType!("drag"); const __kInternetLocationHTTP = getOSType!("ilht"); const __kInternetLocationFTP = getOSType!("ilft"); const __kInternetLocationFile = getOSType!("ilfi"); const __kInternetLocationMail = getOSType!("ilma"); const __kInternetLocationNNTP = getOSType!("ilnw"); const __kInternetLocationAFP = getOSType!("ilaf"); const __kInternetLocationAppleTalk = getOSType!("ilat"); const __kInternetLocationNSL = getOSType!("ilns"); const __kInternetLocationGeneric = getOSType!("ilge"); } } // This is needed otherwise the enums will fail compiling with gdc version (GNU) { private { const __kCustomBadgeResourceType = getOSType!("badg"); } } // This is needed otherwise the enums will fail compiling with gdc version (GNU) { private { const __kRoutingResourceType = getOSType!("rout"); } } // This is needed otherwise the enums will fail compiling with gdc version (GNU) { private { const __kContainerFolderAliasType = getOSType!("fdrp"); const __kContainerTrashAliasType = getOSType!("trsh"); const __kContainerHardDiskAliasType = getOSType!("hdsk"); const __kContainerFloppyAliasType = getOSType!("flpy"); const __kContainerServerAliasType = getOSType!("srvr"); const __kApplicationAliasType = getOSType!("adrp"); const __kContainerAliasType = getOSType!("drop"); const __kDesktopPrinterAliasType = getOSType!("dtpa"); const __kContainerCDROMAliasType = getOSType!("cddr"); const __kApplicationCPAliasType = getOSType!("acdp"); const __kApplicationDAAliasType = getOSType!("addp"); const __kPackageAliasType = getOSType!("fpka"); const __kAppPackageAliasType = getOSType!("fapa"); } } // This is needed otherwise the enums will fail compiling with gdc version (GNU) { private { const __kSystemFolderAliasType = getOSType!("fasy"); const __kAppleMenuFolderAliasType = getOSType!("faam"); const __kStartupFolderAliasType = getOSType!("fast"); const __kPrintMonitorDocsFolderAliasType = getOSType!("fapn"); const __kPreferencesFolderAliasType = getOSType!("fapf"); const __kControlPanelFolderAliasType = getOSType!("fact"); const __kExtensionFolderAliasType = getOSType!("faex"); } } // This is needed otherwise the enums will fail compiling with gdc version (GNU) { private { const __kExportedFolderAliasType = getOSType!("faet"); const __kDropFolderAliasType = getOSType!("fadr"); const __kSharedFolderAliasType = getOSType!("fash"); const __kMountedFolderAliasType = getOSType!("famn"); } } // This is needed otherwise the enums will fail compiling with gdc version (GNU) { private { const __kFirstMagicBusyFiletype = getOSType!("bzy "); const __kLastMagicBusyFiletype = getOSType!("bzy?"); } } enum { kClippingCreator = getOSType!("drag"), kClippingPictureType = getOSType!("clpp"), kClippingTextType = getOSType!("clpt"), kClippingSoundType = getOSType!("clps"), kClippingUnknownType = getOSType!("clpu") } enum { kInternetLocationCreator = getOSType!("drag"), kInternetLocationHTTP = getOSType!("ilht"), kInternetLocationFTP = getOSType!("ilft"), kInternetLocationFile = getOSType!("ilfi"), kInternetLocationMail = getOSType!("ilma"), kInternetLocationNNTP = getOSType!("ilnw"), kInternetLocationAFP = getOSType!("ilaf"), kInternetLocationAppleTalk = getOSType!("ilat"), kInternetLocationNSL = getOSType!("ilns"), kInternetLocationGeneric = getOSType!("ilge") } enum { kCustomIconResource = -16455 } enum { kCustomBadgeResourceType = getOSType!("badg"), kCustomBadgeResourceID = kCustomIconResource, kCustomBadgeResourceVersion = 0 } enum { kRoutingResourceType = getOSType!("rout"), kRoutingResourceID = 0 } enum { kContainerFolderAliasType = getOSType!("fdrp"), kContainerTrashAliasType = getOSType!("trsh"), kContainerHardDiskAliasType = getOSType!("hdsk"), kContainerFloppyAliasType = getOSType!("flpy"), kContainerServerAliasType = getOSType!("srvr"), kApplicationAliasType = getOSType!("adrp"), kContainerAliasType = getOSType!("drop"), kDesktopPrinterAliasType = getOSType!("dtpa"), kContainerCDROMAliasType = getOSType!("cddr"), kApplicationCPAliasType = getOSType!("acdp"), kApplicationDAAliasType = getOSType!("addp"), kPackageAliasType = getOSType!("fpka"), kAppPackageAliasType = getOSType!("fapa") } enum { kSystemFolderAliasType = getOSType!("fasy"), kAppleMenuFolderAliasType = getOSType!("faam"), kStartupFolderAliasType = getOSType!("fast"), kPrintMonitorDocsFolderAliasType = getOSType!("fapn"), kPreferencesFolderAliasType = getOSType!("fapf"), kControlPanelFolderAliasType = getOSType!("fact"), kExtensionFolderAliasType = getOSType!("faex") } enum { kExportedFolderAliasType = getOSType!("faet"), kDropFolderAliasType = getOSType!("fadr"), kSharedFolderAliasType = getOSType!("fash"), kMountedFolderAliasType = getOSType!("famn") } enum { kIsOnDesk = 0x0001, kColor = 0x000E, kIsShared = 0x0040, kHasNoINITs = 0x0080, kHasBeenInited = 0x0100, kHasCustomIcon = 0x0400, kIsStationery = 0x0800, kNameLocked = 0x1000, kHasBundle = 0x2000, kIsInvisible = 0x4000, kIsAlias = 0x8000 } enum { fOnDesk = kIsOnDesk, fHasBundle = kHasBundle, fInvisible = kIsInvisible } enum { fTrash = -3, fDesktop = -2, fDisk = 0 } enum { kExtendedFlagsAreInvalid = 0x8000, kExtendedFlagHasCustomBadge = 0x0100, kExtendedFlagObjectIsBusy = 0x0080, kExtendedFlagHasRoutingInfo = 0x0004 } enum { kFirstMagicBusyFiletype = getOSType!("bzy "), kLastMagicBusyFiletype = getOSType!("bzy?") } enum { kMagicBusyCreationDate = 0x4F3AFDB0 } struct CustomBadgeResource { short version_; short customBadgeResourceID; uint customBadgeType; uint customBadgeCreator; uint windowBadgeType; uint windowBadgeCreator; uint overrideType; uint overrideCreator; } struct RoutingResourceEntry { uint creator; uint fileType; uint targetFolder; uint destinationFolder; uint reservedField; } struct FileInfo { uint fileType; uint fileCreator; ushort finderFlags; Point location; ushort reservedField; } struct FolderInfo { Rect windowBounds; ushort finderFlags; Point location; ushort reservedField; } struct ExtendedFileInfo { SInt16* reserved1; ushort extendedFinderFlags; short reserved2; int putAwayFolderID; } struct ExtendedFolderInfo { Point scrollPosition; int reserved1; ushort extendedFinderFlags; short reserved2; int putAwayFolderID; } struct FInfo { uint fdType; uint fdCreator; ushort fdFlags; Point fdLocation; short fdFldr; } struct FXInfo { short fdIconID; SInt16* fdReserved; byte fdScript; byte fdXFlags; short fdComment; int fdPutAway; } struct DInfo { Rect frRect; ushort frFlags; Point frLocation; short frView; } struct DXInfo { Point frScroll; int frOpenChain; byte frScript; byte frXFlags; short frComment; int frPutAway; }