Package: gtk

Accessor gtk-widget-events

Lambda List

gtk-widget-events (object)

Syntax

(gtk-widget-events object) => events
(setf (gtk-widget-events object) events)

Arguments

object -- a gtk-widget object
events -- a gdk-event-mask event mask

Details

Accessor of the events slot of the gtk-widget class.

The gtk-widget-events slot access function gets the event mask for the widget. The (setf gtk-widget-events) slot access function sets the event mask. The event mask is a bitfield containing flags from the gdk-event-mask flags. These are the events that the widget will receive.

Keep in mind that different widgets have different default event masks, and by changing the event mask you may disrupt the functionality of a widget, so be careful. This function must be called while a widget is unrealized. Consider the gtk-widget-add-events function for widgets that are already realized, or if you want to preserve the existing event mask. This function cannot be used with widgets that have no window. To get events on those widgets, place them inside a gtk-event-box widget and receive events on the event box.

Note

Internally, the widget event mask will be the logical OR of the event mask set through the (setf gtk-widget-events) or gtk-widget-add-events functions , and the event mask necessary to cater for every gtk-event-controller object created for the widget.
 

See also

2021-9-15