Cursor.from_surface


Description:

[ CCode ( has_construct_function = false ) ]
[ Version ( since = "3.10" ) ]
public Cursor.from_surface (Display display, Surface surface, double x, double y)

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 functions supports_cursor_alpha and supports_cursor_color can be used to determine whether RGBA cursors are supported; get_default_cursor_size and get_maximal_cursor_size give information about cursor sizes.

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

Parameters:

display

the Display for which the cursor will be created

surface

the cairo image surface containing the cursor pixel data

x

the horizontal offset of the “hotspot” of the cursor

y

the vertical offset of the “hotspot” of the cursor

Returns:

a new Cursor.




2022 vala-language.org