pointer

Name

pointer -- 

Synopsis



GR_CURSOR_ID GrSetCursor                    (GR_WINDOW_ID wid,
                                             GR_SIZE width,
                                             GR_SIZE height,
                                             GR_COORD hotx,
                                             GR_COORD hoty,
                                             GR_COLOR foreground,
                                             GR_COLOR background,
                                             GR_BITMAP *fbbitmap,
                                             GR_BITMAP *bgbitmap);
void        GrMoveCursor                    (GR_COORD x,
                                             GR_COORD y);
void        GrInjectPointerEvent            (MWCOORD x,
                                             MWCOORD y,
                                             int button,
                                             int visible);
void        GrDestroyCursor                 (GR_CURSOR_ID cid);
void        GrCalibrateMouse                (int mode,
                                             GR_COORD xmin,
                                             GR_COORD xmax,
                                             GR_COORD ymin,
                                             GR_COORD ymax,
                                             GR_BOOL xswap,
                                             GR_BOOL yswap,
                                             GR_COORD zthresh,
                                             GR_BOOL showcursor);

Description

Details

GrSetCursor ()

GR_CURSOR_ID GrSetCursor                    (GR_WINDOW_ID wid,
                                             GR_SIZE width,
                                             GR_SIZE height,
                                             GR_COORD hotx,
                                             GR_COORD hoty,
                                             GR_COLOR foreground,
                                             GR_COLOR background,
                                             GR_BITMAP *fbbitmap,
                                             GR_BITMAP *bgbitmap);

wid : 
width : 
height : 
hotx : 
hoty : 
foreground : 
background : 
fbbitmap : 
bgbitmap : 
Returns : 


GrMoveCursor ()

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.

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


GrInjectPointerEvent ()

void        GrInjectPointerEvent            (MWCOORD x,
                                             MWCOORD y,
                                             int button,
                                             int visible);

Sets the pointer invisible if the visible parameter is GR_FALSE, or visible if it is GR_TRUE, then moves the pointer to the specified position and generates a mouse event with the specified button status. Also performs a GrFlush() so that the event takes effect immediately.

x : the X coordinate of the pointer event relevant to the root window
y : the Y coordinate of the pointer event relevant to the root window
button : the pointer button status
visible : whether to display the pointer after the event


GrDestroyCursor ()

void        GrDestroyCursor                 (GR_CURSOR_ID cid);

Destroys the specified cursor.

cid : the ID of the cursor to destroy


GrCalibrateMouse ()

void        GrCalibrateMouse                (int mode,
                                             GR_COORD xmin,
                                             GR_COORD xmax,
                                             GR_COORD ymin,
                                             GR_COORD ymax,
                                             GR_BOOL xswap,
                                             GR_BOOL yswap,
                                             GR_COORD zthresh,
                                             GR_BOOL showcursor);

Sets the mouse calibration to the specified values, and puts it into the specified mode. The possible modes are GR_MOUSEMODE_RAW and GR_MOUSEMODE_COOKED. In raw mode, the values returned for mouse events are the direct numbers returned by the hardware. In cooked mode, the values are scaled, filtered, and if necessary inverted according to the previously specified calibration values. Raw mode is intended to be used only by the calibration program to obtain the parameters of the touch panel in use so that it can calculate the calibration values.

mode : the mode to run the mouse interface in (raw or cooked)
xmin : the minimum raw X value this device can generate
xmax : the maximum raw X value this device can generate
ymin : the minimum raw Y value this device can generate
ymax : the maximum raw Y value this device can generate
xswap : boolean specifying whether or not to invert the X values
yswap : boolean specifying whether or not to invert the Y values
zthresh : the pressure value which indicates that the pen is down
showcursor : boolean specifying whether the cursor should be shown