Package: gtk

Accessor gtk-window-attached-to

Lambda List

gtk-window-attached-to (object)

Syntax

(gtk-window-attached-to object) => widget
(setf (gtk-window-attached-to object) widget)

Arguments

object -- a gtk-window widget
widget -- a gtk-widget object, or nil

Details

Accessor of the attached-to slot of the gtk-window class.

The gtk-window-attached-to slot access function returns the widget where the window is attached, or nil if the window is not attached to any widget. The (setf gtk-window-attached-to) slot access function marks the window as attached to widget. This creates a logical binding between the window and the widget it belongs to, which is used by GTK to propagate information such as styling or accessibility to the window as if it was a children of widget.

Examples of places where specifying this relation is useful are for instance a gtk-menu widget created by a gtk-combo-box widget, a completion popup window created by a gtk-entry widget or a typeahead search entry created by a gtk-tree-view widget.

Note that this function should not be confused with the gtk-window-transient-for function, which specifies a window manager relation between two toplevels instead.

Passing nil for widget detaches the window.
 

See also

2021-9-9