Re: [AD] Proposal for a set_icon function

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


> I thought there was a way to set the window icon into Xlib... maybe I'm
> wrong. About other ports, I think all (except DOS of course) could support
> it, in one way or another...

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: ...

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.

> If that is the way to go, I'd try to make it as much os- independent as
> possible, i.e. some command line tool which would be called in  a way
> like (for example): fixicon myprogram.exe myicon.bmp|pcx|tga|...
>
> And it would do all the dirty stuff to provide the OS-dependent executable
> to have an icon attached to it. Could this be doable, even with some evil
> hacks?

Really evil then. Hacking the executable after it has been stubified may
prove tricky.

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

---
Eric Botcazou
ebotcazou@xxxxxxxxxx



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