EventFunc (event, *data)
  FilterFunc (xevent, event, *data)
  SeatGrabPrepareFunc (seat, window, *user_data)
  WindowChildFunc (window, *user_data)
  WindowInvalidateHandlerFunc (window, region)


Gdk.EventFunc(event, *data)

Specifies the type of function passed to Gdk.Event.handler_set() to handle all GDK events.

Gdk.FilterFunc(xevent, event, *data)
  • xevent (object) – the native event to filter.
  • event (Gdk.Event) – the GDK event to which the X event will be translated.
  • data (object or None) – user data set when the filter was installed.

a Gdk.FilterReturn value.

Return type:


Specifies the type of function used to filter native events before they are converted to GDK events.

When a filter is called, event is unpopulated, except for event->window. The filter may translate the native event to a GDK event and store the result in event, or handle it without translation. If the filter translates the event and processing should continue, it should return Gdk.FilterReturn.TRANSLATE.

Gdk.SeatGrabPrepareFunc(seat, window, *user_data)

Type of the callback used to set up window so it can be grabbed. A typical action would be ensuring the window is visible, although there’s room for other initialization actions.

New in version 3.20.

Gdk.WindowChildFunc(window, *user_data)

True to invalidate window recursively

Return type:


A function of this type is passed to Gdk.Window.invalidate_maybe_recurse(). It gets called for each child of the window to determine whether to recursively invalidate it or now.

Gdk.WindowInvalidateHandlerFunc(window, region)

Whenever some area of the window is invalidated (directly in the window or in a child window) this gets called with region in the coordinate space of window. You can use region to just keep track of the dirty region, or you can actually change region in case you are doing display tricks like showing a child in multiple places.

New in version 3.10.