Package: gdk

Function gdk:window-user-data

Lambda List

gdk:window-user-data (window)

Syntax

(gdk:window-user-data window) => data
(setf (gdk:window-user-data window) data)

Arguments

window -- a gdk:window object
data -- a pointer with the user data

Details

The gdk:window-user-data function retrieves the user data for window, which is normally the widget that window belongs to. The (setf gdk:window-user-data) function sets the user data.

For most purposes this function is deprecated in favor of the g:object-data function. However, for historical reasons GTK stores the gtk:widget widget that owns a gdk:window object as user data on the gdk:window object. So, custom widget implementations should use this function for that. If GTK receives an event for a gdk:window object, and the user data for the window is non-nil, GTK will assume the user data is a gtk:widget widget, and forward the event to that widget.
 

See also

#2023-2-26