Package: gtk

Accessor gtk-window-icon

Lambda List

gtk-window-icon (object)

Syntax

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

Arguments

object -- a gtk-window widget
icon -- a gdk-pixbuf icon image, or nil

Details

Accessor of the icon slot of the gtk-window class.

The gtk-window-icon slot access function gets the icon or if you have called the gtk-window-icon-list function, gets the first icon in the icon list. The (setf gtk-window-icon) slot access function sets up the icon representing the window. This 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 icon should be provided in whatever size it was naturally drawn. 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.

If you have your icon hand drawn in multiple sizes, use the gtk-window-icon-list function. Then the best size will be used. This function is equivalent to calling the gtk-window-icon-list function with a 1-element list.

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

See also

2021-9-9