Re: [AD] Proposal for a set_icon function

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


>Ok, let's try to summarize the problem for every platform:
>- Win32: ico format, icon needs to be attached to exe, no really need for
>runtime setting function
>- BeOS: how is a particular icon assigned to an exe on the desktop ?
>- X11: xpm format for every window manager ? same dimensions ? The icon
>needs to be manually attached to an executable (KDE, Gnome) ?
>- QNX: ...
>- MacOS: ...

Well, I've just found a way that would allow to set the program icon on BeOS 
without affecting the exe. If an icon is attached on the exe as a resource, 
any change on the icon via the set_icon function would do nothing... So this 
means Win32, Linux and BeOS could behave exactly the same way for a realtime 
window icon setting function.

>I think some platforms might be ok with a runtime setting function, whereas
>others don't need it. This icon business is very platform dependent.

We already said in previous post that if an icon is attached to an exe, it 
should have an higher priority over the icon set from the program code; 
what's so bad in allowing realtime icon changing anyway? The same could have 
been said for the set_window_title() function, but as this is already in, a 
set_window_icon() would fit nicely IMHO.

>Actually what I was initially thinking of for the Windows port is an utility
>that can be called from a makefile:
>
>icon.res: images.dat
>    fixicon -o icon.res -i images.dat -n 0
>
>prog.exe: $(OBJ) icon.res

If this is doable (and I'm not sure it is for anything except Win32), it 
would be nice to be shipped with the library. But in any case the 
set_window_icon() should be available as the icon as a resource attached to 
the exe could not be available on some platforms at all (see Linux).

-- 
Angelo Mottola
a.mottola@xxxxxxxxxx
http://www.ecplusplus.com



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/