« Dear music industry execs: | Main | Well, that didn't work. »

Of NSImages and IconRefs

Like a fan-made tribute, I'm trying to copy the look and feel of the finder while improving a few spots. As I iconForFile: and iconForFileType: are quick and easy. But there's no 'darken' option, and I couldn't find a way to specify a generic folder as a file type. I suppose I could make my own solutions, but it'd break when later versions of the OS changes the default icons. Enter GetIconRefFromFileInfo and GetIconRefFromTypeInfo. (Yes, there's almost no mention of FromTypeInfo on the dev pages, either -- I radared it as Bug ID# 5504413)

Included is the result of this, for your use.

A good deal of this code was inspired/lifted from IconGrabber. Like TweakedTables, I'm placing the parts I've added into public domain. Like a mathematical function, law of physics, or Hello World, it has no warranty or other promises. It's simply code for demonstration and education. Enjoy.

BTHIconResources.h
BTHIconResources.m

TrackBack

TrackBack URL for this entry:
http://unlogica.com/cgi-bin/mt/mt-tb.cgi/25

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

About

This page contains a single entry from the blog posted on October 11, 2007 5:08 PM.

The previous post in this blog was Dear music industry execs:.

The next post in this blog is Well, that didn't work..

Many more can be found on the main index page or by looking through the archives.

Creative Commons License
This weblog is licensed under a Creative Commons License.
Powered by
Movable Type 3.35