CursorGetTextureCallback


Description:

[ CCode ( has_target = false ) ]
public delegate Texture? CursorGetTextureCallback (Cursor cursor, int cursor_size, double scale, out int width, out int height, out int hotspot_x, out int hotspot_y, void* data)

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.

Parameters:

cursor

the `GdkCursor`

cursor_size

the nominal cursor size, in application pixels

scale

the device scale

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

data

User data for the callback

Returns:

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


Namespace: Gdk
Package: gtk4