Sign in Join

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

Mailing lists / fpc-pascal / 2003-02

graph unit and the mouse

5 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

Does anybody know a way to read the mouse at pixel resolution while using the graph unit?

Mark

Florian Klaempfl
to Mark Emerson
Mark Emerson wrote
Does anybody know a way to read the mouse at pixel resolution while using the graph unit?

You mean for go32v2? It depends on your mouse driver I think.

Mark Emerson
to Florian Klaempfl
Florian Klaempfl wrote 8 lines
Mark Emerson wrote: > Does anybody know a way to read the mouse at pixel resolution while > using the graph unit? > You mean for go32v2? It depends on your mouse driver I think.

Please excuse my ignornace, but I don't yet understand what "go32v2" means...I see this term used in the FPC documentation in connection with platforms, but I've never heard of it. Is it a processor? Or an OS? Or what?

I am running entirely in graphics mode and am using the graph unit to accomplish this. I am creating state-of-the-art graphics that can be manipulated by the user via the mouse. I simply need to be able to read mouse events (and also to change the mouse cursor). The application I'm creating must run on Win32, Linux and Unix (and Mac when FPC is ready)...with separate compilations for each platform as needed.

The units in the RTL are system independent, which I greatly appreciate. I also greatly appreciate the graph unit's capability to select the highest resolution possible for any machine. However, the mouse unit offers only "character" granularity resolution which won't work in a hi-res graphics environment...I need the mouse resolution to be at the pixel level, as it is in any modern GUI.

How can I achieve this?

Mark

Unknown author
to Mark Emerson
Mark Emerson wrote 13 lines
Florian Klaempfl wrote: > > Mark Emerson wrote: > > Does anybody know a way to read the mouse at pixel resolution while > > using the graph unit? > > > > You mean for go32v2? It depends on your mouse driver I think. > Please excuse my ignornace, but I don't yet understand what "go32v2" means...I see this term used in the FPC documentation in connection with platforms, but I've never heard of it. Is it a processor? Or an OS? Or what?

go32v2 is a so-called dos extender: It allows 32-bit programs to run on plain DOS. It was written by D.J. Delorie (http://www.delorie.com)

Since FPC is a 32 bit compiler, it relies on the services of such an extender. Another such extender is EMX, or WDOSX.

Show quoted text 16 lines
I am running entirely in graphics mode and am using the graph unit to accomplish this. I am creating state-of-the-art graphics that can be manipulated by the user via the mouse. I simply need to be able to read mouse events (and also to change the mouse cursor). The application I'm creating must run on Win32, Linux and Unix (and Mac when FPC is ready)...with separate compilations for each platform as needed. The units in the RTL are system independent, which I greatly appreciate. I also greatly appreciate the graph unit's capability to select the highest resolution possible for any machine. However, the mouse unit offers only "character" granularity resolution which won't work in a hi-res graphics environment...I need the mouse resolution to be at the pixel level, as it is in any modern GUI. How can I achieve this?

The best way to go about this is not to use the graph unit. The graph unit is provided for TP compatibility, but modern-day GUI systems do not work with the same paradigm. I suggest you look into using GTK or so. It's relatively cross-platform as well, and is quite well supported by FPC.

Michael.

Klaus Hartnegg
to Mark Emerson: Please excuse my ignornace, but I don't yet understand what "go32v2" means...I see this…
highest resolution possible for any machine. However, the mouse unit offers only "character" granularity resolution which won't work in a hi-res graphics environment...I need the mouse resolution to be at the pixel level, as it is in any modern GUI.

Did you init the mouse driver before or after switching to graphics mode? I noticed that some mouse drivers deliver different resolution depending on the active screen mode at the moment of their initialization.

hope this helps,
Klaus