Package: gdk

Function gdk-cursor-new-from-pixbuf

Lambda List

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

Arguments

display -- a gdk-display object for which the cursor will be created
pixbuf -- a gdk-pixbuf object containing the cursor image
x -- an integer with the horizontal offset of the 'hotspot' of the cursor
y -- an integer with the vertical offset of the 'hotspot' of the cursor

Return Value

A new gdk-cursor object.

Details

Creates a new cursor from a pixbuf.

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.

If the x or y arguments are -1, the pixbuf must have options named "x_hot" and "y_hot", resp., containing integer values between 0 and the width resp. height of the pixbuf.

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

See also

2021-12-11