Function
GdkCursorGetTextureCallback
Declaration
GdkTexture*
(* GdkCursorGetTextureCallback) (
GdkCursor* cursor,
int cursor_size,
double scale,
int* width,
int* height,
int* hotspot_x,
int* hotspot_y,
gpointer data
)
Description [src]
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
-
Type:
GdkCursor
The
GdkCursor
.The data is owned by the caller of the function. cursor_size
-
Type:
int
The nominal cursor size, in application pixels.
scale
-
Type:
double
The device scale.
width
-
Type:
int*
Return location for the actual cursor width, in application pixels.
The argument will be set by the function. height
-
Type:
int*
Return location for the actual cursor height, in application pixels.
The argument will be set by the function. hotspot_x
-
Type:
int*
Return location for the hotspot X position, in application pixels.
The argument will be set by the function. hotspot_y
-
Type:
int*
Return location for the hotspot Y position, in application pixels.
The argument will be set by the function. data
-
Type:
gpointer
User data for the callback.
The argument can be NULL
.The data is owned by the caller of the function.
Return value
Type: GdkTexture
The cursor image, or
NULL
if none could be produced.
The caller of the function takes ownership of the data, and is responsible for freeing it. |
The return value can be NULL . |