Main Page   Modules   Alphabetical List   Data Structures   File List   Data Fields   Related Pages  

Nano-X cursor API.
[Nano-X public API]

Functions for controlling the appearance of the mouse pointer. More...

Functions

void GrSetWindowCursor (GR_WINDOW_ID wid, GR_CURSOR_ID cid)
 Specify a cursor for a window.

GR_CURSOR_ID GrNewCursor (GR_SIZE width, GR_SIZE height, GR_COORD hotx, GR_COORD hoty, GR_COLOR foreground, GR_COLOR background, GR_BITMAP *fgbitmap, GR_BITMAP *bgbitmap)
 Creates a server-based cursor (mouse graphic) resource.

void GrMoveCursor (GR_COORD x, GR_COORD y)
 Moves the cursor (mouse pointer) to the specified coordinates.

void GrDestroyCursor (GR_CURSOR_ID cid)
 Destroys the specified server-based cursor and reclaims the memory used by it.


Detailed Description

Functions for controlling the appearance of the mouse pointer.


Function Documentation

void GrDestroyCursor GR_CURSOR_ID  cid  ) 
 

Destroys the specified server-based cursor and reclaims the memory used by it.

Parameters:
cid ID of the cursor to destory

void GrMoveCursor GR_COORD  x,
GR_COORD  y
 

Moves the cursor (mouse pointer) to the specified coordinates.

The coordinates are relative to the root window, where (0,0) is the upper left hand corner of the screen. The reference point used for the pointer is that of the "hot spot". After moving the pointer, the graphic used for the pointer will change to the graphic defined for use in the window which it is over.

Parameters:
x the X coordinate to move the pointer to
y the Y coordinate to move the pointer to

GR_CURSOR_ID GrNewCursor GR_SIZE  width,
GR_SIZE  height,
GR_COORD  hotx,
GR_COORD  hoty,
GR_COLOR  foreground,
GR_COLOR  background,
GR_BITMAP *  fgbitmap,
GR_BITMAP *  bgbitmap
 

Creates a server-based cursor (mouse graphic) resource.

Parameters:
width the width of the pointer bitmap
height the height of the pointer bitmap
hotx the X coordinate within the bitmap used as the target of the pointer
hoty the Y coordinate within the bitmap used as the target of the pointer
foreground the colour to use for the foreground of the pointer
background the colour to use for the background of the pointer
fgbitmap pointer to bitmap data specifying the foreground of the pointer
bgbitmap pointer to bitmap data specifying the background of the pointer

void GrSetWindowCursor GR_WINDOW_ID  wid,
GR_CURSOR_ID  cid
 

Specify a cursor for a window.

This cursor will only be used within that window, and by default for its new children. If the cursor is currently within this window, it will be changed to the new one immediately. If the new cursor ID is 0, revert to the root window cursor.

Parameters:
wid the ID of the window to set the cursor for
cid the cursor ID


Generated on Sun May 18 21:03:06 2003 for Microwindows Nano-X API by doxygen1.3