Mercurial > projects > dstep
diff dstep/coreservices/launchservices/LSSharedFileList.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/coreservices/launchservices/LSSharedFileList.d Sat Aug 01 15:03:28 2009 +0200 @@ -0,0 +1,76 @@ +/** + * 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.LSSharedFileList; + +//import dstep.AvailabilityMacros; +import dstep.coreservices.carboncore.CarbonCore; +import dstep.corefoundation.CoreFoundation; +import dstep.coreservices.launchservices.IconsCore; +import dstep.security.Security; + +struct OpaqueLSSharedFileListRef; +struct OpaqueLSSharedFileListItemRef; + +alias OpaqueLSSharedFileListRef* LSSharedFileListRef; +alias OpaqueLSSharedFileListItemRef* LSSharedFileListItemRef; + +extern (C) +{ + alias void function (LSSharedFileListRef, void*) LSSharedFileListChangedProcPtr; +} + +extern (C) +{ + extern + { + CFStringRef kLSSharedFileListFavoriteVolumes; + CFStringRef kLSSharedFileListFavoriteItems; + CFStringRef kLSSharedFileListRecentApplicationItems; + CFStringRef kLSSharedFileListRecentDocumentItems; + CFStringRef kLSSharedFileListRecentServerItems; + CFStringRef kLSSharedFileListSessionLoginItems; + CFStringRef kLSSharedFileListGlobalLoginItems; + CFStringRef kLSSharedFileListRecentItemsMaxAmount; + CFStringRef kLSSharedFileListVolumesComputerVisible; + CFStringRef kLSSharedFileListVolumesIDiskVisible; + CFStringRef kLSSharedFileListVolumesNetworkVisible; + LSSharedFileListItemRef kLSSharedFileListItemBeforeFirst; + LSSharedFileListItemRef kLSSharedFileListItemLast; + CFStringRef kLSSharedFileListItemHidden; + } +} + +enum +{ + kLSSharedFileListNoUserInteraction = 1 << 0, + kLSSharedFileListDoNotMountVolumes = 1 << 1 +} + +extern (C) +{ + uint LSSharedFileListGetTypeID (); + uint LSSharedFileListItemGetTypeID (); + LSSharedFileListRef LSSharedFileListCreate (CFAllocatorRef inAllocator, CFStringRef inListType, CFTypeRef listOptions); + int LSSharedFileListSetAuthorization (LSSharedFileListRef inList, AuthorizationRef inAuthorization); + void LSSharedFileListAddObserver (LSSharedFileListRef inList, CFRunLoopRef inRunloop, CFStringRef inRunloopMode, LSSharedFileListChangedProcPtr callback, void* context); + void LSSharedFileListRemoveObserver (LSSharedFileListRef inList, CFRunLoopRef inRunloop, CFStringRef inRunloopMode, LSSharedFileListChangedProcPtr callback, void* context); + uint LSSharedFileListGetSeedValue (LSSharedFileListRef inList); + CFTypeRef LSSharedFileListCopyProperty (LSSharedFileListRef inList, CFStringRef inPropertyName); + int LSSharedFileListSetProperty (LSSharedFileListRef inList, CFStringRef inPropertyName, CFTypeRef inPropertyData); + CFArrayRef LSSharedFileListCopySnapshot (LSSharedFileListRef inList, UInt32* outSnapshotSeed); + LSSharedFileListItemRef LSSharedFileListInsertItemURL (LSSharedFileListRef inList, LSSharedFileListItemRef insertAfterThisItem, CFStringRef inDisplayName, IconRef inIconRef, CFURLRef inURL, CFDictionaryRef inPropertiesToSet, CFArrayRef inPropertiesToClear); + LSSharedFileListItemRef LSSharedFileListInsertItemFSRef (LSSharedFileListRef inList, LSSharedFileListItemRef insertAfterThisItem, CFStringRef inDisplayName, IconRef inIconRef, FSRef* inFSRef, CFDictionaryRef inPropertiesToSet, CFArrayRef inPropertiesToClear); + int LSSharedFileListItemMove (LSSharedFileListRef inList, LSSharedFileListItemRef inItem, LSSharedFileListItemRef inMoveAfterItem); + int LSSharedFileListItemRemove (LSSharedFileListRef inList, LSSharedFileListItemRef inItem); + int LSSharedFileListRemoveAllItems (LSSharedFileListRef inList); + uint LSSharedFileListItemGetID (LSSharedFileListItemRef inItem); + IconRef LSSharedFileListItemCopyIconRef (LSSharedFileListItemRef inItem); + CFStringRef LSSharedFileListItemCopyDisplayName (LSSharedFileListItemRef inItem); + int LSSharedFileListItemResolve (LSSharedFileListItemRef inItem, uint inFlags, CFURLRef* outURL, FSRef* outRef); + CFTypeRef LSSharedFileListItemCopyProperty (LSSharedFileListItemRef inItem, CFStringRef inPropertyName); + int LSSharedFileListItemSetProperty (LSSharedFileListItemRef inItem, CFStringRef inPropertyName, CFTypeRef inPropertyData); +} \ No newline at end of file