home *** CD-ROM | disk | FTP | other *** search
- /**
- *
- * Name moavoid -- Hide mouse cursor when in specified region
- *
- * Synopsis ercode = moavoid(u_row,u_col,l_row,l_col);
- *
- * int ercode Error return code:
- * MO_OK if successful;
- * MO_ABSENT if mouse not found;
- * MO_RANGE if invalid range specified.
- * unsigned u_row Top edge of region (0 = top of screen)
- * unsigned u_col Leftmost edge of region (0 = left edge
- * of screen).
- * unsigned l_row Bottom edge of region.
- * unsigned l_col Right edge of region.
- *
- * Description This function hides the mouse cursor if it enters a
- * specified rectangular region of the screen. The mouse
- * cursor will remain hidden from the time it next enters
- * the region until mnhide(MN_SHOW) is called.
- *
- * The normal way to use this function is to call MOAVOID,
- * then perform a screen operation, then call
- * mnhide(MN_SHOW) to restore the mouse cursor. This
- * function is slightly faster than calling mnhide(MN_HIDE)
- * and will not make the cursor blink off unnecessarily.
- *
- * All screen coordinates are specified in pixels relative
- * to (0,0) at the upper left corner of the screen.
- *
- * Returns ercode Error return code:
- * MO_OK if successful;
- * MO_ABSENT if mouse not found;
- * MO_RANGE if invalid range specified.
- * b_mouse Number of mouse buttons (0 if no driver).
- *
- * Version 6.00 (C)Copyright Blaise Computing Inc. 1989
- *
- **/
-
- #include <bmouse.h>
-
- int far moavoid(u_row,u_col,l_row,l_col)
- unsigned u_row,u_col,l_row,l_col;
- {
- int result;
- DOSREG regs;
-
- if (u_row > l_row || u_col > l_col)
- result = MO_RANGE;
- else
- {
- regs.ax = 16;
- regs.cx = u_col;
- regs.dx = u_row;
- regs.si = l_col;
- regs.di = l_row;
- result = mogate(®s,®s);
- }
-
- return result;
- }