[ Previous | Next | Contents | Glossary | Home | Search ]
GL3.2 for AIX: Graphics Library (GL) Technical Reference

defcursor Subroutine

Purpose

Defines a cursor glyph.

Libraries

Graphics Library

C (libgl.a)

FORTRAN (libfgl.a)

C Syntax

void defcursor(Int32 index, Uint16 *cursor)

FORTRAN Syntax

SUBROUTINE DEFCUR(index, cursor)
INTEGER*4 index
INTEGER*2 cursor(1);

Description

The defcursor subroutine defines a cursor glyph with the specified name and bitmap. Call the curstype subroutine to set the type and size of cursor before calling the defcursor subroutine.

The bitmap can be 16x16 or 32x32 and one or two layers deep. If the cursor has been defined by the curstype subroutine as type C16X2 or C32X2, the bitmap array is two layers deep.

By default, the bitmap cursor origin is at (0,0), its lower-left corner. Use the curorigin subroutine to reset the cursor origin (the position controlled by valuators attached to the cursor and the position used for the picking region).

To replace the bitmap assigned to a cursor constant, call the defcursor subroutine again, keeping the index parameter the same but changing the bitmap cursor parameter.

By default, a cross-hair cursor origin is at (15,15), the intersection of its two lines.

By default, an arrow is defined as cursor 0 (zero) and cannot be redefined.

Note: This subroutine cannot be used to add to a display list.

The ordering of the values in the cursor array is left-to-right, then bottom-to-top, low-order bit plane, then high-order bit plane. This format is the same as that used by the defrasterfont subroutine. In other words, the first 16-bit short word specifies the lower-left bits of the image. If the cursor is 32 bits wide, the next short word specifies the lower-right bits. For a 16-bit wide cursor, the second short word specifies the second row from the bottom, the third word specifies the third row, and so on. If the cursor is a three-color cursor, place the bitmap for the high bit after the data for the low bit. The four different cursor configurations make use of different array sizes, as follows:

Cursor Type Array Size
C16X1 16
C16X2 32
C32X1 64
C32X2 128

Parameters

index Specifies a number to identify a cursor to other cursor routines.
cursor Specifies the bitmap for the cursor. For the cross-hair cursor type, this parameter is disregarded.

Implementation Specifics

This subroutine is part of GL in the AIXwindows Environment/6000 Version 1, Release 2 with AIXwindows/3D Feature.

Files

/usr/include/gl/gl.h Contains C language constant and variable type definitions for GL.
/usr/include/gl/fgl.h Contains FORTRAN constant and variable type definitions for GL.

Related Information

Setting the origin of a cursor with the curorigin subroutine.

Controlling cursor visibility by window with the curson or cursoff subroutine.

Defining the type and size of a cursor with the curstype subroutine.

Returning the cursor characteristics with the getcursor subroutine.

Putting the system in picking mode with the pick subroutine.

Setting the cursor characteristics with the setcursor subroutine.

AIX Graphics Library Overview, Creating and Managing Windows.

Creating a Cursor.


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