Thanks to all … and Happy New Year !

-koko


On Dec 29, 2012, at 11:36 PM, Charles Srstka wrote:

> On Dec 29, 2012, at 10:46 PM, koko <k...@highrolls.net> wrote:
> 
>> Are the icons in the Finders Source List available to developer apps or does 
>> the developer have to capture and photoshop them?
> 
> The icons for the items that are currently in the source list can be obtained 
> like this:
> 
> LSSharedFileListRef list = LSSharedFileListCreate(kCFAllocatorDefault, 
> kLSSharedFileListFavoriteItems, NULL);
> NSArray *items = CFBridgingRelease(LSSharedFileListCopySnapshot(list, NULL));
> 
> for (id eachItem in items) {
>    IconRef iconRef = LSSharedFileListItemCopyIconRef((__bridge 
> LSSharedFileListItemRef)eachItem);
>    NSImage *iconImage = [[NSImage alloc] initWithIconRef:iconRef];
> 
>    // do something with the image
> }
> 
> CFRelease(list);
> 
> Charles
> 
> 


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to