[ Previous | Next | Contents | Glossary | Home | Search ]
x11 R6 Technical Reference

XRecolorMultiColorCursor Extension Function

Purpose

Changes one or more of the colors in a multicolored cursor.

Library

Enhanced X-Windows Library (libXext.a)

C Syntax

Status XRecolorMultiColorCursor (DisplayPtr, CursorResourceID, Number, Colors)
Display *DisplayPtr;
Cursor CursorResourceID;
INT32 Number;
XColor *Colors;

Description

The XRecolorMultiColorCursor extension function changes one or more of the colors in a multicolored cursor. The Number parameter indicates the number of colors to be changed. The array of XColor structures specifies which colors are to be changed and what their new values are.

The XColor structure is defined as follows:

typedef struct {
   unsigned long    pixel;             /* pixel value           */
   unsigned short   red, green, blue;  /* rgb values            */
   char             flags;             /* DoRed,DoGreen,DoBlue  */
   char             pad;}
XColor;

The pixel value in each array element corresponds to the pixel value in the cursor. This pixel value will be colored with the color specified by the red, green, and blue (RGB) values in the same array element. Typically, a pixel value of 0x00 in a cursor is considered transparent.

Parameters

Colors Specifies the array of XColor structures that indicate the pixel values to be changed to new RGB values for these pixels.
CursorResourceID Specifies the X server resource ID of the cursor to be recolored used for the cursor.
DisplayPtr Specifies the connection to the X server.
Number Specifies the number of colors in the Colors parameter.

Return Values

True Indicates that the XRecolorMultiColorCursor extension function is successful.
False Indicates that the XRecolorMultiColorCursor extension function is not successful.

Error Codes

BadCursor

BadMatch

BadValue

Related Information

Using Extensions in AIXwindows in AIX Version 4.3 AIXwindows Programming Guide.

The XColor data structure.

The XCreateMultiColorCursor extension function.

The XDefineCursor function.

AIXwindows Overview for Programmers in AIX Version 4.3 AIXwindows Programming Guide.


[ Previous | Next | Contents | Glossary | Home | Search ]