window_set_icon

This is a "cheat sheet" for the "window_set_icon" extension by YellowAfterlife.

The extension can be found on itch.io.

The source code can be found on GitHub.

Click on sections to expand/collapse them.
Quick display controls: Categories · Sections · Everything ·

Window icon functions
Window icon functions
window_set_icon(path_to_ico)​

Changes the window icon.

Path should point to a valid ICO file.

Returns whether successful. Sets status variables.

window_set_icon_buffer(buffer_with_an_ico_inside)​

Changes the window icon.

The buffer should contain a valid ICO file.

Returns whether successful. Sets status variables.

window_set_icon_surface(surface, set_big_icon:bool)​

Changes the window icon to match the pixels in a surface.

set_big_icon indicates whether to change the big (32x32) instead of small (16x16) icon.

The "big" icon may used for display in taskbar.

Returns whether successful. Sets status variables.

window_reset_icon()​

Resets the window icon to whatever it was before you first called this extension's functions.

Cannot fail, but returns true and sets status variables just in case.

window_sync_icon()​

Re-applies whatever last icon that we had stored.

You should only call this yourself if you encounter a situation where the window icon changes back.

Cannot fail, but returns true and sets status variables just in case.

Taskbar icon overlay functions
Taskbar icon overlay functions
window_set_overlay_icon(path_to_ico, ?description)​

Changes the little overlay/notification badge icon shown in the corner of the window.

Path should point to a valid ICO file.

description (optional) is a string that provides the alt text version of the information conveyed by the overlay, for accessibility purposes. (MSDN)

Returns whether successful. Sets status variables.

window_set_overlay_icon_buffer(buffer_with_an_ico_inside, ?description)​

Changes the little overlay/notification badge icon shown in the corner of the taskbar button.

The buffer should contain a valid ICO file.

description (optional) is a string that provides the alt text version of the information conveyed by the overlay, for accessibility purposes. (MSDN)

Returns whether successful. Sets status variables.

window_set_overlay_icon_surface(surface, ?description)​

Changes the little overlay/notification badge icon shown in the corner of the taskbar button to match pixels in a surface.

description (optional) is a string that provides the alt text version of the information conveyed by the overlay, for accessibility purposes. (MSDN)

Returns whether successful. Sets status variables.

window_reset_overlay_icon()​

Resets/removes the little overlay/notification badge icon.

Cannot fail, but returns true and sets status variables just in case.

Error handling