Next: Think Inside the Box =>

Watching the Mouse Move

---
---

[For the demonstration, move the mouse around on this page.]

As the user moves the mouse pointer around on the screen, the operating system tracks its location and converts it to two numbers. Like the graph paper in high school Geometry, the "X" axis measures a horizontal location, expressed as the number of dots from the left margin of the screen to the tip of the pointer. The "Y" axis, however, is upside down. The 0 point is the top of the screen and the number measures the number of lines of dots down from the top to the tip of the pointer.

The system, whether Windows, Macintosh, or the Unix "X" system, tracks the mouse pointer everywhere on the screen. Applications shouldn't be interested in the mouse when it is just on the desktop or inside a window belonging to another application. However, once the mouse moves inside the window belonging to an application, the system begins to inform the application where the mouse is and what it is doing. The first problem for the system is to decide where the mouse is.

(c) Copyright 2003 Howard Gilbert