Functions
gdk_cursor_new_from_name ()
GdkCursor *
gdk_cursor_new_from_name (GdkDisplay *display,
const gchar *name);
Creates a new cursor by looking up name
in the current cursor
theme.
A recommended set of cursor names that will work across different
platforms can be found in the CSS specification:
"none"
"default"
"help"
"pointer"
"context-menu"
"progress"
"wait"
"cell"
"crosshair"
"text"
"vertical-text"
"alias"
"copy"
"no-drop"
"move"
"not-allowed"
"grab"
"grabbing"
"all-scroll"
"col-resize"
"row-resize"
"n-resize"
"e-resize"
"s-resize"
"w-resize"
"ne-resize"
"nw-resize"
"sw-resize"
"se-resize"
"ew-resize"
"ns-resize"
"nesw-resize"
"nwse-resize"
"zoom-in"
"zoom-out"
Returns
a new GdkCursor, or NULL if there is no
cursor with the given name.
[nullable]
Since: 2.8
gdk_cursor_new_for_display ()
GdkCursor *
gdk_cursor_new_for_display (GdkDisplay *display,
GdkCursorType cursor_type);
Creates a new cursor from the set of builtin cursors.
Since: 2.2
gdk_cursor_get_display ()
GdkDisplay *
gdk_cursor_get_display (GdkCursor *cursor);
Returns the display on which the GdkCursor is defined.
Returns
the GdkDisplay associated to cursor
.
[transfer none]
Since: 2.2
gdk_cursor_get_image ()
GdkPixbuf *
gdk_cursor_get_image (GdkCursor *cursor);
Returns a GdkPixbuf with the image used to display the cursor.
Note that depending on the capabilities of the windowing system and
on the cursor, GDK may not be able to obtain the image data. In this
case, NULL is returned.
Returns
a GdkPixbuf representing
cursor
, or NULL.
[nullable][transfer full]
Since: 2.8
gdk_cursor_get_surface ()
cairo_surface_t *
gdk_cursor_get_surface (GdkCursor *cursor,
gdouble *x_hot,
gdouble *y_hot);
Returns a cairo image surface with the image used to display the cursor.
Note that depending on the capabilities of the windowing system and
on the cursor, GDK may not be able to obtain the image data. In this
case, NULL is returned.
Since: 3.10
gdk_cursor_get_cursor_type ()
GdkCursorType
gdk_cursor_get_cursor_type (GdkCursor *cursor);
Returns the cursor type for this cursor.
Since: 2.22
gdk_cursor_ref ()
GdkCursor *
gdk_cursor_ref (GdkCursor *cursor);
gdk_cursor_ref has been deprecated since version 3.0 and should not be used in newly-written code.
Use g_object_ref() instead
Adds a reference to cursor
.
Returns
Same cursor
that was passed in.
[transfer full]
gdk_cursor_unref ()
void
gdk_cursor_unref (GdkCursor *cursor);
gdk_cursor_unref has been deprecated since version 3.0 and should not be used in newly-written code.
Use g_object_unref() instead
Removes a reference from cursor
, deallocating the cursor
if no references remain.
Types and Values
GdkCursor
typedef struct _GdkCursor GdkCursor;
A GdkCursor represents a cursor. Its contents are private.
enum GdkCursorType
Predefined cursors.
Note that these IDs are directly taken from the X cursor font, and many
of these cursors are either not useful, or are not available on other platforms.
The recommended way to create cursors is to use gdk_cursor_new_from_name().