From: Brad Campbell <brad@wasp.net.au>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Absolute USB-HID device musings (was Re: VNC Terminal Server)
Date: Sun, 09 Apr 2006 20:49:56 +0400 [thread overview]
Message-ID: <44393B34.1090907@wasp.net.au> (raw)
In-Reply-To: <44393064.2050300@win4lin.com>
Leonardo E. Reiter wrote:
> Yeah, the min/max value thing would be a pain for sure. The X server
> config method seems to be the best bet.
>
> On another note, I am trying to imagine what would make logical sense
> for say, a touch screen. For example, an LCD panel has a native
> resolution, say 1024x768. It would then emulate (or transparently
> expand) other VESA resolutions, such as 640x480, on the fly. I would
> think that if it had touchscreen capabilities, the coordinates would
> always be reported in native mode. So the guest OS must have to scale
> them down... especially if the device reports the range early on in the
> identification process.
Every touchscreen I've ever used (which would be serial and USB Intellitouch and serial MicroTouch)
used to report fixed absolute positions and the driver scaled them after a simple 2 or 5 point
calibration routine. So they were indexed to the position on the monitor glass, not what was
underneath it. We never changed screen resolutions so that was never an issue itself..
On LCD's it worked great and never needed recalibrating as the pixels don't move. On CRT's we needed
to recalibrate every time some donkey fiddled with the H&V pos/scale knobs.
Interestingly enough the Intellitouch reports z axis as well. It delivers an 8 bit force value.
From what I've been able to figure thus far, the min/max thing seems to be the device telling the
OS what it's minimum and maximum values are on each axis. It's then up to the OS to relate that to
the current screen resolution.
And after finding my old code buried under many TB of other garbage.. I note my memory failed me
partially. The mouse events were poked directly into the windows message queue with
MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_MOVE and the X and Y values were calculated from the touchscreen
calibration values, scaled to be 0x0->0xffff and poked in as dwords.
This was all cool as I had the cursor turned off. If the cursor needed to be displayed/moved also
then it was set with SetCursorPos() which of course uses resolution dependent coordinates. Nice of
windows to be consistent!
Time to do some 'sperimenting I guess..
--
"Human beings, who are almost unique in having the ability
to learn from the experience of others, are also remarkable
for their apparent disinclination to do so." -- Douglas Adams
next prev parent reply other threads:[~2006-04-09 16:48 UTC|newest]
Thread overview: 68+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-08 16:20 [Qemu-devel] VNC terminal server? Samuel Hunt
2006-04-08 18:12 ` Brad Campbell
2006-04-21 15:31 ` Troy Benjegerdes
2006-04-21 15:58 ` WaxDragon
2006-04-08 18:24 ` Johannes Schindelin
2006-04-08 18:37 ` Leonardo E. Reiter
2006-04-08 19:04 ` Johannes Schindelin
2006-04-08 19:15 ` Leonardo E. Reiter
2006-04-09 2:54 ` Anthony Liguori
2006-04-08 20:19 ` Brad Campbell
2006-04-08 20:29 ` Leonardo E. Reiter
2006-04-08 21:06 ` [Qemu-devel] Absolute USB-HID device musings (was Re: VNC Terminal Server) Leonardo E. Reiter
2006-04-08 21:18 ` Leonardo E. Reiter
2006-04-08 21:22 ` Brad Campbell
2006-04-08 21:36 ` Leonardo E. Reiter
2006-04-09 4:36 ` Anthony Liguori
2006-04-09 15:14 ` Jim C. Brown
2006-04-09 16:03 ` Leonardo E. Reiter
2006-04-09 16:49 ` Brad Campbell [this message]
2006-04-09 18:07 ` andrzej zaborowski
2006-04-09 18:35 ` Brad Campbell
2006-04-09 18:41 ` Lonnie Mendez
2006-04-09 19:22 ` Brad Campbell
2006-04-09 20:27 ` [Qemu-devel] Gentlemen we have absolute movement! was:Absolute " Brad Campbell
2006-04-09 20:31 ` Anthony Liguori
2006-04-09 20:57 ` Anthony Liguori
2006-04-09 21:02 ` Brad Campbell
2006-04-09 21:10 ` Brad Campbell
2006-04-09 21:20 ` Johannes Schindelin
2006-04-09 21:35 ` Brad Campbell
2006-04-09 21:39 ` Anthony Liguori
2006-04-09 22:01 ` Brad Campbell
2006-04-09 22:08 ` Anthony Liguori
2006-04-09 22:12 ` Brad Campbell
2006-04-09 22:18 ` Brad Campbell
2006-04-09 23:14 ` Brad Campbell
2006-04-10 3:40 ` [Qemu-devel] USB Tablet Emulation (was: Gentlemen we have absolute movement! was:Absolute USB-HID device musings (was Re: VNC Terminal Server)) Anthony Liguori
2006-04-10 8:23 ` [Qemu-devel] USB Tablet Emulation Brad Campbell
2006-04-10 8:32 ` Johannes Schindelin
2006-04-10 10:27 ` Brad Campbell
2006-04-10 11:27 ` Johannes Schindelin
2006-04-19 17:18 ` [Qemu-devel] USB Tablet Emulation + VNC patch Troy Benjegerdes
2006-04-21 21:13 ` Brad Campbell
2006-04-26 0:55 ` Troy Benjegerdes
2006-04-26 7:37 ` Brad Campbell
2006-04-10 14:58 ` [Qemu-devel] USB Tablet Emulation Leonardo E. Reiter
2006-04-10 15:27 ` Anthony Liguori
2006-04-10 15:39 ` Leonardo E. Reiter
2006-04-10 16:08 ` Brad Campbell
2006-04-10 19:28 ` Brad Campbell
2006-04-10 19:44 ` Brad Campbell
2006-04-10 21:27 ` Brad Campbell
2006-04-10 21:39 ` Brad Campbell
2006-04-08 18:38 ` [Qemu-devel] VNC terminal server? Mark Williamson
2006-04-08 18:53 ` Johannes Schindelin
2006-04-08 19:01 ` Jim C. Brown
2006-04-08 19:12 ` Johannes Schindelin
2006-04-08 19:30 ` Jim C. Brown
2006-04-08 19:40 ` Johannes Schindelin
2006-04-09 2:55 ` Anthony Liguori
2006-04-09 2:53 ` Anthony Liguori
2006-04-08 19:21 ` andrzej zaborowski
2006-04-08 19:33 ` Leonardo E. Reiter
2006-04-09 2:59 ` Anthony Liguori
2006-04-09 16:06 ` Leonardo E. Reiter
2006-04-09 16:40 ` Anthony Liguori
2006-04-09 2:57 ` Anthony Liguori
2006-04-09 2:52 ` Anthony Liguori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=44393B34.1090907@wasp.net.au \
--to=brad@wasp.net.au \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).