Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2003-02

Mouse Unit

4 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Mark Emerson

The mouse unit appears to support resolution only at "character" granularity. What about pixels?

Michael Van Canneyt
to Mark Emerson
Mark Emerson wrote
The mouse unit appears to support resolution only at "character" granularity. What about pixels?

That is not the purpose of this mouse unit. The mouse unit is intended for text-based screens only, so the character granularity is sufficient.

Michael.

Aitor Santamaría Merino
to Michael Van Canneyt
Michael Van Canneyt wrote 10 lines
On Thu, 6 Feb 2003, Mark Emerson wrote: >The mouse unit appears to support resolution only at "character" >granularity. What about pixels? > That is not the purpose of this mouse unit. The mouse unit is intended for text-based screens only, so the character granularity is sufficient.

Not quite right.
The quite old antivirus "Artemis Professional", ancestor of nowaday's Panda Antivirus, had a nice feature: it is textmode, but it used MS-MOUSE pixel granularity at text mode to display a "kind-of" graphic mode mouse: I guess it read the mouse pointer (at pixel granularity), and modified four characters in the Character Generator of the graphic card to create a mouse pointer that moved with pixel granularity. True that effectively, clicks must be then catched by dividing by the character size and to adapt to the correct granularity. But the previous behaviour wouldn't be possible.

I think the that using MS-MOUSE interface (I think MSMOUSE unit), you can have this pixel granularity in text mode, but breaks portability.

Aitor

Sebastian Günther
to Aitor Santamaría Merino
Show quoted text 13 lines
Not quite right. The quite old antivirus "Artemis Professional", ancestor of nowaday's Panda Antivirus, had a nice feature: it is textmode, but it used MS-MOUSE pixel granularity at text mode to display a "kind-of" graphic mode mouse: I guess it read the mouse pointer (at pixel granularity), and modified four characters in the Character Generator of the graphic card to create a mouse pointer that moved with pixel granularity. True that effectively, clicks must be then catched by dividing by the character size and to adapt to the correct granularity. But the previous behaviour wouldn't be possible. I think the that using MS-MOUSE interface (I think MSMOUSE unit), you can have this pixel granularity in text mode, but breaks portability.

there are other old DOS programs which have this pseudo-graphic mouse cursor as well (I think Norton Utilities for example). German magazine c't had an article on this topic about 10 years ago, and they even provided source code which shows how this can be done (basically you are right, 4 characters are permanently modified). To Mark: This is a quite complex task, and is totally out of scope for a general-purpose and portable mouse unit. You would have to write your own unit specifically for DOS, and it wouldn't be possible to port it to Win32 or Unix.

- Sebastian