[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
X11R6 Technical Reference

XCreateCrossHairCursor Extension Function

Purpose

Creates a pair of cross hairs and returns the cursor resource ID associated with it.

Library

Enhanced X-Windows Library (libXext.a)

C Syntax

Cursor XCreateCrossHairCursor (DisplayPtr, LineWidth, LineColor, Base)
Display *DisplayPtr;
short LineWidth;
XColor *LineColor;
short Base;

Description

The XCreateCrossHairCursor extension function creates a pair of cross hairs and returns the cursor resource ID associated with it. The cursor resource ID can then be used with the XRecolorCursor, XFreeCursor, and XDefineCursor functions. The XDefineCursor function associates the cursor resource with a window ID.

If the LineWidth parameter is the value of 0 (zero), lines that are one pixel wide are drawn by using the server's new line width algorithms. The color specified is used as the line color for both vertical and horizontal crossbars.

The Base parameter specifies if the cursor to be created is a full screen cursor or a cross hair clipped to the associated window ID. The default value is clipped to the associated window ID or a window-based cursor.

Parameters

Base Specifies if the cursor to be created is a full-screen cursor or a cross hair clipped to the associated window ID.
DisplayPtr Specifies the connection to the X server.
LineColor Specifies the color of the vertical and horizontal lines.
LineWidth Specifies the width of the vertical and horizontal lines of the cursor.

Error Codes

BadAlloc

Return Values

CursorID Indicates that the XCreateCrossHairCursor extension function succeeded.
0 Indicates that the XCreateCrossHairCursor extension function failed.

Related Information

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

The XDefineCursor function, the XFreeCursor function, and the XRecolorCursor function.

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


[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]