Package: gdk

Function gdk-window-user-data

Lambda List

gdk-window-user-data (window)

Syntax

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

Arguments

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

Details

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

For most purposes this function is deprecated in favor of the fucntion g-object-data. However, for historical reasons GTK stores the gtk-widget object that owns a gdk-window object as user data on the gdk-window. 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 object, and forward the event to that widget.
 

See also

2020-9-23