I don't know if there is any interest in this functionality or if it was deliberately left out for simplicity but I went ahead
and tried my best at adding a set_icon() method under Windows and X11.
Wayland is not supported since they use .desktop files to link icons and executable files.
RedoxOS I am not sure they even have such a thing as icons yet.
MacOS I cannot test but it seems relatively easy from what I have seen.
Now for Windows (and probably MacOS) one can just use a file and a path to it, though not with X11.
X11 needs a u64 ARGB buffer and I think implementing an "any image to ARGB" converter is out of scope, so
I tried to split up the functionality but probably didn't do it in the best way possible.
If there is any interest in adding this functionality, I hope someone can help adding the missing operating systems or just generally take a look at the code.
I don't know if there is any interest in this functionality or if it was deliberately left out for simplicity but I went ahead and tried my best at adding a
set_icon()
method under Windows and X11.Wayland is not supported since they use
.desktop
files to link icons and executable files. RedoxOS I am not sure they even have such a thing as icons yet. MacOS I cannot test but it seems relatively easy from what I have seen.Now for Windows (and probably MacOS) one can just use a file and a path to it, though not with X11. X11 needs a
u64
ARGB buffer and I think implementing an "any image to ARGB" converter is out of scope, so I tried to split up the functionality but probably didn't do it in the best way possible.If there is any interest in adding this functionality, I hope someone can help adding the missing operating systems or just generally take a look at the code.