Package: gtk

Function gtk-window-icon-list

Lambda List

gtk-window-icon-list (window)

Syntax

(gtk-window-icon-list window) => icon-list
(setf (gtk-window-icon-list window) icon-list)

Arguments

window -- a gtk-window widget
icon-list -- a list of gdk-pixbuf instances

Details

Accessor of the icon list of the window.

The gtk-window-icon-list function retrieves the list of icons. The (setf gtk-window-icon-list) function sets up the icon representing the window.

The icon is used when the window is minimized, also known as iconified. Some window managers or desktop environments may also place it in the window frame, or display it in other contexts.

The (setf gtk-window-icon-list) function allows you to pass in the same icon in several hand drawn sizes. The list should contain the natural sizes your icon is available in. That is, do not scale the image before passing it to GTK. Scaling is postponed until the last minute, when the desired final size is known, to allow best quality.

By passing several sizes, you may improve the final image quality of the icon, by reducing or eliminating automatic image scaling.

Recommended sizes to provide: 16 x 16, 32 x 32, 48 x 48 at minimum, and larger images 64 x 64, 128 x 128, if you have them.

See also the gtk-window-default-icon-list function to set the icon for all windows in your application in one go.

Note that transient windows, those who have been set transient for another window using the gtk-window-transient-for function, will inherit their icon from their transient parent. So there is no need to explicitly set the icon on transient windows.
 

See also

2021-9-12