home *** CD-ROM | disk | FTP | other *** search
- I was playing with a Shareware product, but it was broke, so I used this
- better PD package, but changed the function names to match what I was using
- in the program already.
-
- Special thanks to Rodney Loos, who wrote this code!
-
- Source:
-
- m_condit.c m_graph_.c m_locate.c m_ratio.c m_status.c
- m_displa.c m_init.c m_motion.c m_releas.c m_text_c.c
- m_event.c m_light_.c m_press.c m_speed.c m_window.c
-
- Transfer mouse.h to your \tc\include directory.
- Transfer the resulting .lib's to your \tc\lib directory.
-
- Use "make -DMODEL=m" for medium, "MODEL=l" for large, etc
-
- ---
-
- m_init allocates a structure which contains mouse position and status
- information. The other routines will return references or store data
- to this structure:
-
- struct {
- unsigned buttons; /* button status */
- unsigned cury; /* last column pos */
- unsigned curx; /* last row position */
- unsigned count; /* button event count */
- unsigned display; /* cursor status 1=ON 0=OFF */
- } M_POS;
-
- The global __Mptr is used to reference this structure.
-
- Functions
- ---------------------------------------------------------------------------
- int m_init(void);
-
- Returns 0 if mouse software not installed.
- Returns 2 if MS-DOS version < 2.0
-
- M_POS *m_press(int button);
-
- Interrogates the mouse internal button counter and updates structure
-
- M_POS *m_release(int button);
-
- Interrogates the mouse internal button counter and updates structure
-
- M_POS *m_status(void);
-
- Interrogates the mouse internal counters and updates structure
-
- void mouse(Param *mptr);
-
- Low level routine used by all functions.
-
- void m_display(int on_off);
-
- Mouse pointer is default ON, this function allows toggling
-
- void m_locate(int x, int y);
-
- Move mouse display pointer (pixels), doesn't update structure
-
- void m_text_cursor(int cursor_type, int cursor_attr1, int cursor_attr2);
-
- cursor_type is 0/Software or 1/Hardware. See mouse.doc
-
- void m_graph_cursor(int x_hot, int y_hot, void far *cmask);
-
- Allows you to custom design a mouse cursor and its "Hot" spot.
- cmask is a far pointer to an array of 32 integers (16 bits each).
- 16 Integers for screen mask, 16 for cursor mask. See mouse.doc
-
- void m_conditional(int ux, int uy, int lx, int ly);
-
- Turns off mouse cursor if within limits.
-
- void m_window(int left, int top, int right, int bottom);
-
- Sets the limits for the mouse to travel
-
- void m_light_pen(int on_off);
-
- Light pen emulation, default on.
-
- void m_motion(int *x, int *y);
-
- Reads the mouse internal motion counters.
-
- void m_event(unsigned mask, void (far * func)(void));
-
- Allows a function to execute on detection of the selected mask.
- See mouse.doc, and Turbo-C interrupt explanation.
-
- void m_ratio(int x, int y);
-
- Sets the vertical and horizontal mickey/pixel ratio.
-
- void m_speed(int x);
-
- Sets a mickey speed where the mouse cursor movement is doubled.
-
-
- ---
-
- See mouse.doc for more information.
-
- ---
-
- I included a little program which uses the mouse (esm.c).
-
- ...