Package: gdk

Function gdk-cursor-new-from-surface

Lambda List

gdk-cursor-new-from-surface (display surface x y)

Arguments

display -- a gdk-display object for which the cursor will be created
surface -- a cairo-surface-t instance containing the cursor pixel data
x -- a double float with the horizontal offset of the 'hotspot' of the cursor
y -- a double float with the vertical offset of the 'hotspot' of the cursor

Return Value

A new gdk-cursor object.

Details

Creates a new cursor from a cairo image surface.

Not all GDK backends support RGBA cursors. If they are not supported, a monochrome approximation will be displayed. The gdk-display-supports-cursor-alpha and gdk-display-supports-cursor-color functions can be used to determine whether RGBA cursors are supported. The gdk-display-default-cursor-size and gdk-display-maximal-cursor-size functions give information about cursor sizes.

On the X backend, support for RGBA cursors requires a sufficently new version of the X Render extension.
 

See also

2021-12-11