KeyInputQueue.java uses JNI calls to ready the events via EventHub.h.  The
KeyInputQueue and associated InputDevice classes do the mapping from raw
device coordinates to the screen.

On Wed, Apr 7, 2010 at 12:41 PM, Deva R <r.deva...@gmail.com> wrote:

> > I know Android use the touchscreen like an input device but I don't
> > know what are the values it wants? (X,Y,...) What is the unit? (pixel,
> > mm...)
>
> It will be (x,y) co-ordinates, where (0,0) being the top-left of the
> screen and (max-x, max-y) being the bottom of the screen.
>
> how it works:
> - when user taps touch screen, it generates an interrupt and its the
> trigger for touch screen driver to read the (x,y) co-ordinate from
> touch-screen controller.
>  touch screen controller returns samples that its h/w calculated. (can
> be resistive/capacitive).
>
> Once, x,y coordinates are ready, driver publishes using input_report_abs
> calls.
> its still a black box for me, how OS takes (x,y) from this user event,
> maps to a framebuffer locaiton, and do some stuff..
>
> u can refer a sample touch screen driver at
>
> http://git.omapzoom.org/?p=kernel/omap.git;a=blob;f=drivers/input/touchscreen/tsc2007.c
>
> >> Do you know which part of Android read the event file (dev/input/event)
> of the touchscreen?
> EventHub.., "Grand Central Station for events" - as called by android team
> ;P
> ./frameworks/base/libs/ui/EventHub.cpp
> Link -
> http://git.omapzoom.org/?p=platform/frameworks/base.git;a=blob;f=libs/ui/EventHub.cpp
>
>
>
> On Wed, Apr 7, 2010 at 12:45 PM, Arnaud Frigout
> <arnaud.frig...@gmail.com> wrote:
> > Hello All:
> >
> > I'm porting Android on an imx51 for a new touchscreen.
> > I know Android use the touchscreen like an input device but I don't
> > know what are the values it wants? (X,Y,...) What is the unit? (pixel,
> > mm...)
> > Do you know which part of Android read the event file (dev/input/
> > event) of the touchscreen?
> > Where can I find a documentattion on this item?
> >
> >
> > Best regards,
> >
> > Arnaud Frigout
> >
> > --
> > unsubscribe: 
> > android-porting+unsubscr...@googlegroups.com<android-porting%2bunsubscr...@googlegroups.com>
> > website: http://groups.google.com/group/android-porting
> >
> > To unsubscribe, reply using "remove me" as the subject.
> >
>
> --
> unsubscribe: 
> android-porting+unsubscr...@googlegroups.com<android-porting%2bunsubscr...@googlegroups.com>
> website: http://groups.google.com/group/android-porting
>



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting

Reply via email to