src/swipl-devel/packages/xpce/man/refmanual/md/cursor.md

class cursor {#class-cursor}

Class cursor provides access to the available X-cursors and allows the user to define new cursors from two image objects.

Cursors are assigned at the level of graphicals. Given some position of the pointer, the displayed cursor is determined to be first graphical that will receive pointer-events from this position and that has a graphical <->cursor attribute not equal to @nil or @default. Normally, this is a graphical that overlaps with the pointer position and is exposed (i.e. above the other graphicals). When the event-focus is set for some device, the cursor is set to the cursor attribute of the graphical in focus, provided it's value is a cursor (and not @default or @nil).

Like fonts and colours, cursors are reusable objects and are automatically shared. If the <-name of the cursor is @nil, the cursor will not be shared and may be ->free'ed just like any other object.

The type conversion conventions will automatically transform an X-cursor name to a cursor object.

Bugs:

The mapping between X-cursor names and the X-font id from the cursor font is copied in the PCE sources. Changes to the X definition are therefore not automatically included in PCE.

@see graphical->focus_cursor @see window->focus_cursor @see graphical-cursor @see display-cursors

Instance variables {#class-cursor-instvars}

Send methods {#class-cursor-send}



Try the rswipl package in your browser

Any scripts or data that you put into this service are public.

rswipl documentation built on June 16, 2026, 5:07 p.m.