Package: gdk

Class gdk:cursor

Superclasses

gobject:object, common-lisp:standard-object, common-lisp:t

Documented Subclasses

None

Direct Slots

fallback
The fallback property of type gdk:cursor (Read / Write / Construct only)
Cursor image to fall back to if the cursor cannot be displayed.
hotspot-x
The hotspot-x property of type :int (Read / Write / Construct only)
Horizontal offset of the cursor hotspot.
Allowed values: >= 0
Default value: 0
hotspot-y
The hotspot-y property of type :int (Read / Write / Construct only)
Vertical offset of the cursor hotspot.
Allowed values: >= 0
Default value: 0
name
The name property of type :string (Read / Write / Construct only)
The name of the cursor.
Default value: nil
texture
The texture property of type gdk:texture (Read / Write / Construct only)
The texture displayed by this cursor.

Details

The gdk:cursor object represents a cursor. Cursors are immutable objects, so once you created them, there is no way to modify them later. Create a new cursor when you want to change something about it.

Cursors by themselves are not very interesting, they must be bound to a window for users to see them. This is done with the gdk:surface-cursor or the gdk:surface-device-cursor functions. Applications will typically use higher-level GTK functions such as the gtk:widget-cursor function instead.

Cursors are not bound to a given gdk:display object, so they can be shared. However, the appearance of cursors may vary when used on different platforms.

There are multiple ways to create cursors. The platform's own cursors can be created with the gdk:cursor-new-from-name function. That function lists the commonly available names that are shared with the CSS specification. Other names may be available, depending on the platform in use. On some platforms, what images are used for named cursors may be influenced by the cursor theme.

Another option to create a cursor is to use the gdk:cursor-new-from-texture function and provide an image to use for the cursor.

To ease work with unsupported cursors, a fallback cursor can be provided. If a gdk:surface object cannot use a cursor because of the reasons mentioned above, it will try the fallback cursor. Fallback cursors can themselves have fallback cursors again, so it is possible to provide a chain of progressively easier to support cursors. If none of the provided cursors can be supported, the default cursor will be the ultimate fallback.
 

Returned by

Slot Access Functions

Inherited Slot Access Functions

2024-6-30