Callbacks

ContentDeserializeFunc (deserializer)

ContentSerializeFunc (serializer)

CursorGetTextureCallback (cursor, cursor_size, scale, data)

Details

Gdk.ContentDeserializeFunc(deserializer)
Parameters:

deserializer (Gdk.ContentDeserializer) – a GdkContentDeserializer

The type of a function that can be registered with Gdk.content_register_deserializer().

When the function gets called to operate on content, it can call functions on the deserializer object to obtain the mime type, input stream, user data, etc. for its operation.

Gdk.ContentSerializeFunc(serializer)
Parameters:

serializer (Gdk.ContentSerializer) – a GdkContentSerializer

The type of a function that can be registered with Gdk.content_register_serializer().

When the function gets called to operate on content, it can call functions on the serializer object to obtain the mime type, output stream, user data, etc. for its operation.

Gdk.CursorGetTextureCallback(cursor, cursor_size, scale, data)
Parameters:
  • cursor (Gdk.Cursor) – the GdkCursor

  • cursor_size (int) – the nominal cursor size, in application pixels

  • scale (float) – the device scale

  • data (object or None) – User data for the callback

Returns:

the cursor image, or NULL if none could be produced.

width:

return location for the actual cursor width, in application pixels

height:

return location for the actual cursor height, in application pixels

hotspot_x:

return location for the hotspot X position, in application pixels

hotspot_y:

return location for the hotspot Y position, in application pixels

Return type:

(Gdk.Texture or None, width: int, height: int, hotspot_x: int, hotspot_y: int)

The type of callback used by a dynamic GdkCursor to generate a texture for the cursor image at the given cursor_size and scale.

The actual cursor size in application pixels may be different from cursor_size x cursor_size, and will be returned in width, height. The returned texture should have a size that corresponds to the actual cursor size, in device pixels (i.e. application pixels, multiplied by scale).

This function may fail and return NULL, in which case the fallback cursor will be used.