comparison 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
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.LSSharedFileList;
8
9 //import dstep.AvailabilityMacros;
10 import dstep.coreservices.carboncore.CarbonCore;
11 import dstep.corefoundation.CoreFoundation;
12 import dstep.coreservices.launchservices.IconsCore;
13 import dstep.security.Security;
14
15 struct OpaqueLSSharedFileListRef;
16 struct OpaqueLSSharedFileListItemRef;
17
18 alias OpaqueLSSharedFileListRef* LSSharedFileListRef;
19 alias OpaqueLSSharedFileListItemRef* LSSharedFileListItemRef;
20
21 extern (C)
22 {
23 alias void function (LSSharedFileListRef, void*) LSSharedFileListChangedProcPtr;
24 }
25
26 extern (C)
27 {
28 extern
29 {
30 CFStringRef kLSSharedFileListFavoriteVolumes;
31 CFStringRef kLSSharedFileListFavoriteItems;
32 CFStringRef kLSSharedFileListRecentApplicationItems;
33 CFStringRef kLSSharedFileListRecentDocumentItems;
34 CFStringRef kLSSharedFileListRecentServerItems;
35 CFStringRef kLSSharedFileListSessionLoginItems;
36 CFStringRef kLSSharedFileListGlobalLoginItems;
37 CFStringRef kLSSharedFileListRecentItemsMaxAmount;
38 CFStringRef kLSSharedFileListVolumesComputerVisible;
39 CFStringRef kLSSharedFileListVolumesIDiskVisible;
40 CFStringRef kLSSharedFileListVolumesNetworkVisible;
41 LSSharedFileListItemRef kLSSharedFileListItemBeforeFirst;
42 LSSharedFileListItemRef kLSSharedFileListItemLast;
43 CFStringRef kLSSharedFileListItemHidden;
44 }
45 }
46
47 enum
48 {
49 kLSSharedFileListNoUserInteraction = 1 << 0,
50 kLSSharedFileListDoNotMountVolumes = 1 << 1
51 }
52
53 extern (C)
54 {
55 uint LSSharedFileListGetTypeID ();
56 uint LSSharedFileListItemGetTypeID ();
57 LSSharedFileListRef LSSharedFileListCreate (CFAllocatorRef inAllocator, CFStringRef inListType, CFTypeRef listOptions);
58 int LSSharedFileListSetAuthorization (LSSharedFileListRef inList, AuthorizationRef inAuthorization);
59 void LSSharedFileListAddObserver (LSSharedFileListRef inList, CFRunLoopRef inRunloop, CFStringRef inRunloopMode, LSSharedFileListChangedProcPtr callback, void* context);
60 void LSSharedFileListRemoveObserver (LSSharedFileListRef inList, CFRunLoopRef inRunloop, CFStringRef inRunloopMode, LSSharedFileListChangedProcPtr callback, void* context);
61 uint LSSharedFileListGetSeedValue (LSSharedFileListRef inList);
62 CFTypeRef LSSharedFileListCopyProperty (LSSharedFileListRef inList, CFStringRef inPropertyName);
63 int LSSharedFileListSetProperty (LSSharedFileListRef inList, CFStringRef inPropertyName, CFTypeRef inPropertyData);
64 CFArrayRef LSSharedFileListCopySnapshot (LSSharedFileListRef inList, UInt32* outSnapshotSeed);
65 LSSharedFileListItemRef LSSharedFileListInsertItemURL (LSSharedFileListRef inList, LSSharedFileListItemRef insertAfterThisItem, CFStringRef inDisplayName, IconRef inIconRef, CFURLRef inURL, CFDictionaryRef inPropertiesToSet, CFArrayRef inPropertiesToClear);
66 LSSharedFileListItemRef LSSharedFileListInsertItemFSRef (LSSharedFileListRef inList, LSSharedFileListItemRef insertAfterThisItem, CFStringRef inDisplayName, IconRef inIconRef, FSRef* inFSRef, CFDictionaryRef inPropertiesToSet, CFArrayRef inPropertiesToClear);
67 int LSSharedFileListItemMove (LSSharedFileListRef inList, LSSharedFileListItemRef inItem, LSSharedFileListItemRef inMoveAfterItem);
68 int LSSharedFileListItemRemove (LSSharedFileListRef inList, LSSharedFileListItemRef inItem);
69 int LSSharedFileListRemoveAllItems (LSSharedFileListRef inList);
70 uint LSSharedFileListItemGetID (LSSharedFileListItemRef inItem);
71 IconRef LSSharedFileListItemCopyIconRef (LSSharedFileListItemRef inItem);
72 CFStringRef LSSharedFileListItemCopyDisplayName (LSSharedFileListItemRef inItem);
73 int LSSharedFileListItemResolve (LSSharedFileListItemRef inItem, uint inFlags, CFURLRef* outURL, FSRef* outRef);
74 CFTypeRef LSSharedFileListItemCopyProperty (LSSharedFileListItemRef inItem, CFStringRef inPropertyName);
75 int LSSharedFileListItemSetProperty (LSSharedFileListItemRef inItem, CFStringRef inPropertyName, CFTypeRef inPropertyData);
76 }