Aqua Icons support on HiDPI displays.

Mike Swingler swingler at apple.com
Fri Oct 18 15:45:15 PDT 2013


On Oct 18, 2013, at 4:49 AM, Alexander Scherbatiy <alexandr.scherbatiy at oracle.com> wrote:

>  Hello,
> 
>  The GetIconRef method is used in the CImage.m now to get the system icons on MacOSX.
> 
>  The NSImage + (id)imageNamed:(NSString *)name method can be used directly instead.
> 
>  There are NSImageNameFolder, NSImageNameFolderBurnable, and NSImageNameFolderSmart constants but I can't find
>  the constant for the open folder icon.
> https://developer.apple.com/library/mac/documentation/cocoa/reference/applicationkit/classes/NSImage_Class/Reference/Reference.html#//apple_ref/doc/constant_group/Toolbar_Named_Images
> 
>  The same is for the alert stop system icon. There are NSImageNameInfo and NSImageNameCaution icons but I can't find
>  the constant for the alert stop icon.
> 
>  Where is it possible to get the open folder and stop icons that are defined as kOpenFolderIcon and kAlertStopIcon for the GetIconRef method?

There are no corresponding constants for +[NSImage imageNamed:], however you can use the same constants you pass into GetIconRef(), and send them into:
[[NSWorkspace sharedWorkspace] iconForFileType: NSFileTypeForHFSTypeCode(kOpenFolderIcon)]

Regards,
Mike Swingler
Apple Inc.



More information about the macosx-port-dev mailing list