home *** CD-ROM | disk | FTP | other *** search
- /**
- *
- * Name molitpen -- Enable or disable emulation of light pen
- * by mouse.
- *
- * Synopsis ercode = molitpen(option);
- *
- * int ercode Error return code:
- * MO_OK if successful;
- * MO_BAD_OPT if option not recognized;
- * MO_ABSENT if mouse not found;
- *
- * int option Action to perform:
- * MO_PEN to emulate light pen.
- * MO_NO_PEN to disable light pen
- * emulation.
- *
- * Description This function enables or disables light pen emulation.
- *
- * When light pen emulation is enabled, pressing mouse
- * buttons emulates the "pen down" state. The mouse cursor
- * location is recorded until the next button press. When
- * all mouse buttons are released, the "pen off the screen
- * state" is emulated.
- *
- * When the mouse is reset (via MORESET), it is
- * automatically put into light pen emulation mode. To use
- * a light pen in addition to the mouse, you must disable
- * emulation via molitpen(MO_NO_PEN).
- *
- * Returns ercode Error return code:
- * MO_OK if successful;
- * MO_BAD_OPT if option not recognized;
- * MO_ABSENT if mouse not found.
- * b_mouse Number of mouse buttons (0 if no driver).
- *
- * Version 6.00 (C)Copyright Blaise Computing Inc. 1989
- *
- **/
-
- #include <bmouse.h>
-
- int molitpen(option)
- int option;
- {
- DOSREG regs;
-
- switch (option)
- {
- case MO_PEN: regs.ax = 13; break;
- case MO_NO_PEN: regs.ax = 14; break;
- default: return MO_BAD_OPT;
- }
-
- return mogate(®s,®s);
- }