Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!pdn!xanadu!reese From: reese@xanadu.nm.paradyne.com (Don Reese) Newsgroups: comp.os.minix Subject: Re: MOUSE SYSTEM Keywords: Description of my mouse system Message-ID: <6824@pdn.paradyne.com> Date: 11 Dec 89 13:41:55 GMT References: <2675@gos.ukc.ac.uk> Sender: usenet@pdn.paradyne.com Reply-To: reese@xanadu.paradyne.com (Don Reese) Organization: AT&T Paradyne, Largo, Florida Lines: 42 In article <2675@gos.ukc.ac.uk> tkb1@ukc.ac.uk (Tor Kristjan Berge) writes: > >Basic description: >When the mouse driver detects a change in the status of the mouse >driver (ie. the mouse has moved or a button is pressed / released), a >signal is sent to the application program. The application program now >reads the mouse driver and updates the internal data of the mouse. If >neccesary, the mouse cursor is moved. > I am not a minix programmer, though I have been a Unix programmer (since rel 3 on a PDP11/34), I have also spent a good bit of time writing code for MS/Dos and X Windows systems. I have been reading this news group on an off since it became available and should personal time become available, would like to put minix on my personal machine (AT Compatable) at home. But I am a little concerned over the use of signals to indicate mouse events. Exactly what will be considered a mouse event. Any movement of the mouse? This could generate an event for each pixel the mouse is moved (if the mickey/pixel ratio is set to one both hirizontally and vertically). Why not set up the mouse driver to store all information about the current mouse state in a simple structure. Then provide a read/write interface that allows the user to set the control part of the structure via a write and access the current mouse information with a read. Use the mouse driver to keep track of the current state of the mouse, then let the application program worry about how often the mouse status is read. How will access to the mouse driver by multiple programs be controlled?. Since Minix is a multitasking environment, you will either have to limit the driver to supporting a single open (returning a busy state to the second open) or must provide some knowlege of window geometries within the mouse driver (probably better to use single open and let the window geometry code belong to a windowing system). Where will the drawing of the mouse icon be handled? In MS/Dos, the mouse driver is responsible for the drawing and moving of the mouse icon. In this way the mouse icon provides for smooth mouse movement, even when the application can not keep up with the flow of mouse information. -- Don Reese reese@pdn.paradyne.com | Eney Meeny, Jelly Beanie, AT&T Paradyne {mtdca, uunet}!pdn!reese | the spirits are about to P.O. Box 2826 Mail Stop LG-133 | speak. - Bullwinkle Moose Largo, FL 34649-2826 Phone: (813) 530-8361