1. NAME

XRecolorCursor, XFreeCursor, XQueryBestCursor - manipulate cursors

2. SYNTAX

int XRecolorCursor(Display *display, Cursor cursor, XColor *foreground_color, XColor *background_color); int XFreeCursor(Display *display, Cursor cursor); Status XQueryBestCursor(Display *display, Drawable d, unsigned int width, unsigned int height, unsigned int *width_return, unsigned int *height_return);

3. ARGUMENTS

background_color 1i Specifies the RGB values for the background of the source.

cursor 1i Specifies the cursor.

d 1i Specifies the drawable\*(Dr.

display 1i Specifies the connection to the X server.

foreground_color 1i Specifies the RGB values for the foreground of the source.

width 1i

height 1i Specify the width and height\*(Wh.

width_return 1i

height_return 1i Return the best width and height that is closest to the specified width and height.

4. DESCRIPTION

The .ZN XRecolorCursor function changes the color of the specified cursor, and if the cursor is being displayed on a screen, the change is visible immediately. The pixel members of the .ZN XColor structures are ignored; only the RGB values are used.

.ZN XRecolorCursor can generate a .ZN BadCursor error.

The .ZN XFreeCursor function deletes the association between the cursor resource ID and the specified cursor. The cursor storage is freed when no other resource references it. The specified cursor ID should not be referred to again.

.ZN XFreeCursor can generate a .ZN BadCursor error.

Some displays allow larger cursors than other displays. The .ZN XQueryBestCursor function provides a way to find out what size cursors are actually possible on the display. It returns the largest size that can be displayed. Applications should be prepared to use smaller cursors on displays that cannot support large ones.

.ZN XQueryBestCursor can generate a .ZN BadDrawable error.

5. DIAGNOSTICS

  • .ZN BadCursor
     A value for a Cursor argument does not name a defined Cursor.
  • .ZN BadDrawable
     A value for a Drawable argument does not name a defined Window or Pixmap.

6. SEE ALSO