[Mono-osx] System.Windows.Forms.XplatUIOSX:SetIcon not implemented

Troy Phillips troy.phillips at zettaserve.com
Wed May 25 22:13:58 EDT 2005


On 26/5/05 12:27 AM, "millenomi aka l0ne" <millenomi at gmail.com> wrote:
> Il giorno 25/mag/05, alle ore 12:12, Troy Phillips ha scritto:
> 
>> Since OS X doesn¹t really have window icons, I thought that SetIcon
>> should be ignored on OS X rather than throw a ³not implemented²
>> error. The only alternative that springs to mind is to alter the
>> dock icon but I think that this would not look good?
> 
> OS X does have window icons, although it's not good form to modify
> them for they are document proxies. The use of one suggests that the
> window is tied to a document -- an abstraction .NET does not have.

Wow - I am surprised that I never noticed that. I am looking around and
noticing them in lots of applications now (Finder, Office, TextWrangler -
all the applications that interact with file system objects)

> Cocoa does not expose APIs to modify window icons directly. Carbon
> should have this (quartz-wm uses them to mark X11 windows, for
> instance) but I don't know if the two things are integrated.

I found a posting (refer
http://mozdev.org/pipermail/camino/2003-July/000071.html) that implies that
you could get a handle to use the Carbon API (refer
http://developer.apple.com/documentation/Carbon/Reference/Window_Manager/win
d_mgr_ref/chapter_1.2_section_10.html#//apple_ref/doc/uid/TP30000176-DontLin
kChapterID_2-F09074) - but as you say this would probably be considered bad
form. 

> I'm all  
> for stubbing it out to an empty subroutine, but there might be
> reasons for this not to be true, although I can't think of any.

My vote is to stub to an empty subroutine

> There's also NSWindow's -setMiniwindowImage:, which sets the image to
> use as a Dock representation when the window is minimized (see
> iChat's windows).

Personally I don't think that would be a good fit in general.
-- 
Troy Phillips
ZettaServe Pty Ltd
phone: +61 8 9488 9545
fax: +61 8 9488 9545
mobile: +61 419 185 245
http://www.zettaserve.com
mailto:troy.phillips at zettaserve.com



More information about the Mono-osx mailing list