Simple touching test (maybe someday multitouch test)

Aapo Rantalainen aapo.rantalainen at gmail.com
Tue Mar 24 21:48:22 CET 2009


Hi, I made first simple application to test touchscreen. It doesn't
give me much hope about multitouching, but maybe we can discuss better
if we have something.

http://cc.oulu.fi/~rantalai/freerunner/touching/


It is gtk program which prints
1) mouse location
2) mouse button press (and its location)
3) mouse button release (and its location)

Compiling for Moko:
 . /usr/local/openmoko/arm/environment-setup
make

Compiling for Computer:
comment out 'CC = arm-angstrom-linux-gnueabi-gcc'  on Makefile
make

I made these test with OM2008.12. If you have time check what your
distribution says.

Usage:
ssh -X root at moko
Case A)  [ using computers screen and mouse ]
./touching_test

Move mousepointer to window, press button down, move pointer, release button.
Terminal output:
Pointer moving at (17, 11)
Button pressed at (17, 11)
Pointer moving at (18, 11)
Pointer moving at (19, 11)
Pointer moving at (20, 11)
Pointer moving at (29, 11)
Pointer moving at (43, 11)
Pointer moving at (51, 11)
Pointer moving at (69, 11)
Pointer moving at (89, 11)
Pointer moving at (99, 13)
Pointer moving at (109, 13)
Button released at (113, 13)
Pointer moving at (112, 13)
Pointer moving at (112, 12)


Case B) [ using touchscreen ]
DISPLAY=:0 ./touching_test
Put stylus somewhere, move it, release it.
Terminal output:
Pointer moving at (113, 101)
Button pressed at (113, 101)
Pointer moving at (112, 102)
Button released at (436, 103)

Case C) [ touchscreen with two stylus]
DISPLAY=:0 ./touching_test
Put 1st stylus somewhere in top left (and do not release it)
Terminal output
Pointer moving at (37, 20)
Button pressed at (37, 20)
Pointer moving at (42, 26)

  (Start all subcases 1st stylus is in top left)
  Subcase 1)
  Put 2nd stylus somewhere in bottom right
  Terminal output
  <NOTHING>

  Subcase 2)
  Put 2nd stylus anywhere and move it, release it, put it again, move etc.
  Terminal output
  <NOTHING>

  Subcase 3)
  Put 2nd stylus somewhere in bottom right.
  Release 1st stylus
  Terminal output
  <NOTHING>
   Release 2nd stylus
  Terminal output
   Button released at (454, 438)

   Subcase 4)
   Put 2nd stylus somewhere in bottom right
   Release both in ~sametime
   Terminal output
    Button released at (216, 363)  <midpoint>




Case B was something which breaks my plans how to implement
multitouch. (It doesn't give any messages when dragged)
btw: If  this doesn't work with GTK, can it work some other way? (Xlib, Qt)

-Aapo Rantalainen




More information about the community mailing list