Re: [AD] Proposal for a set_icon function

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


> At this point, what's the problem with adding a normal
> set_window_icon(BITMAP *icon) function to Allegro, shared by all ports?

What do you mean by "shared by all ports" ? Would such a function be really
portable ? What of the n X window managers, the m Unix desktop
environments... ?

> Adding a Win32 specific function only to change the window icon doesn't
> make much sense to me, as other ports would need something very similar
> too...

I totally agree, there is already a Win32 API function to do that.

> Other ports should make the set_window_icon function to behave the normal
> way whenever possible - i.e. set the window icon at runtime, leaving the
> exe icon untouched.

Again I don't see the point of setting the icon at runtime if there is
already an icon attached to the exe that will be automatically loaded.

Under Windows, Allegro would search the exe for an icon named "allegro_icon"
and automatically load it if it is present. Thus programmers would only have
to link an object file containing an icon named so and that icon would be
used both on the desktop when the app is not running and in the window title
bar when the app is running.

Expert Win32 programmers could directly provide the object file, whereas
non-expert ones could use the utility to generate it from Allegro bitmaps.
The utility would be basically an "outsourced" version of your fonction.

---
Eric Botcazou
ebotcazou@xxxxxxxxxx



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