Package: gtk

Function gtk-window-focus

Lambda List

gtk-window-focus (window)

Syntax

(gtk-window-focus window) => focus
(setf (gtk-window-focus window) focus)

Arguments

window -- a gtk-window widget
focus -- the gtk-widget object to be the focus widget, or nil to unset any focus widget for the toplevel window

Details

Accessor of the focus widget of the window.

The gtk-window-focus function retrieves the current focused widget within the window. If the focus argument is not the current focus widget, and is focusable, the (setf gtk-window-focus) function sets it as the focus widget for the window.

If the focus argument is nil, unsets the focus widget for the window. To set the focus to a particular widget in the toplevel, it is usually more convenient to use the gtk-widget-grab-focus function instead of this function.

Note that this is the widget that would have the focus if the toplevel window focused. If the toplevel window is not focused then the gtk-widget-has-focus function will not return true for the widget.
 

See also

2021-9-12