Package: gtk

Function gtk:widget-visual

Lambda List

gtk:widget-visual (widget)

Syntax

(gtk:widget-visual object) => visual
(setf (gtk:widget-visual object) visual)

Arguments

widget -- a gtk:widget object
visual -- a gdk:visual object to be used or nil to unset a previous one

Details

Accessor of the visual be used to render the widget. The gtk:widget-visual function gets the visual that will be used to render the widget. The (setf gtk:widget-visual) function sets the visual that should be used for by the widget and its children for creating gdk:window objects.

The visual must be on the same gdk:screen object as returned by the gtk:widget-screen function, so handling the "screen-changed" signal is necessary.

Setting a new visual will not cause the widget to recreate its windows, so you should call this function before the widget is realized.
 

See also

#2023-3-8