Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Library for Clipper - <b>mouse functions</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
                            MOUSE FUNCTIONS

   The History of MICE...

   Much time and energy has gone into investigating how people interact
   with computers.

   A major advantage of the Apple Macintosh since its advent has been
   its graphical interface.  Similar software products have emerged
   over the years.

   Digital Research, Microsoft and IBM have released GEM, Windows and
   more recently Presentation Manager respectively which greatly
   improves the way people interact with computers.

   On the hardware front Graphics tablets, Tracker balls, Light pens,
   joysticks and mice have all been introduced to supplement the
   keyboard and under certain circumstances have all but eliminated
   the need for it.  The mouse appears to have become the most popular
   supplement.

   They have become affordable and popular enough to be taken seriously
   and an number of manufacturers in the industry have standardised on
   a method of  controlling the mouse in PC systems if not in their
   terminology.

   Microsoft manufacture two-button mice whilst Logitech and Mouse
   Systems manufacture two-button and three-button mice.


   Mouse Installation

   The following functions give Clipper developers the ability to offer
   the mouse as an option in their applications.

   The mouse function calls give access to most of the published and
   documented functions needed to control the mouse.

   The functions below range from determining if the mouse is present and
   functioning through to setting an area in which the mouse can operate.

   The standard method of controlling the mouse is via a device driver.

   A device driver is a piece of software which informs MS-DOS of the
   presence of a specified piece of hardware and specifies how it is
   to be handled.  The driver which comes with the Microsoft Mouse
   system may be installed in the system in 3 ways.


   1.          Editing CONFIG.SYS to include the line :-
               DEVICE=C:\MOUSE.SYS


   2.          Typing MOUSE from the DOS prompt which runs mouse.exe.


   3.          Editing AUTOEXEC.BAT to include MOUSE as a command.
               This will mean that the driver is loaded automatically
               when the system is initially started or the whenever it
               is restarted.


   Whichever method is used to load the mouse driver, perfoming an INT
   33H with particular values in the registers of the CPU a pre-
   determined function which controls the mouse will be performed.

   The mouse functions all perform the task of pre-setting the registers,
   sometimes with specified values, performing the interrupt and passing
   any values back to Clipper.

   Lastly, it is worth mentioning that L_CHIDECUR() accepts row and
   column co-ordinates whilst the other functions accept and return
   absolute pixel horizontal and vertical co-ordinates.

   Check that the values passed and returned are within the correct
   ranges before suspecting any anomalies (bugs) with the functions.
   In most cases these values will need to be multiplied or divided by 8.


   Summary

   The functions of this section can naturally be divided into a number
   of areas and these are shown below.


   1. Mouse Status & Cursor positioning
   L_CHKMDRVR(), L_GETMSTAT(), L_GETXPOSN(), L_GETYPOSN()
   L_ISMOUSE(),


   2. General Cursor.
   L_CHIDECUR(), L_HIDECURS(), L_SETMAREA(), L_SHOWCURS()
   L_TCURSOR()


   3. Speed & Motion.
   L_SETRATIO(), L_SETSPEED(), L_GETXMOTN(), L_GETYMOTN()


   4. Button Information.
   L_PRESSES(), L_RELEASES(), L_XPRESS(), L_XRELEASE()
   L_YPRESS(), L_YRELEASE()


   5. Light Pen.
   L_PENOFF(), L_PENON()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson