Commit graph

6 commits

Author SHA1 Message Date
Dima Zavin
88e0899617 minui: events: only open input devices with EV_KEY and/or EV_REL
Change-Id: I8283d7aaa0f66d488f462cd108350cc49657a745
Signed-off-by: Dima Zavin <dima@android.com>
2011-09-02 14:55:20 -07:00
Dima Zavin
365836736c minui: events: add ability to poll on non-input fds
Change-Id: Iad52a6f2adcae0068d252d6163586f9d7b93121d
Signed-off-by: Dima Zavin <dima@android.com>
2011-09-02 14:55:20 -07:00
Dima Zavin
bc29063bf4 minui: events: refactor event acquisition
Events are now delivered through a callback mechanism during
a call to ev_dispatch(). This will allow us to extend the events
code to handle other devices/fds, not just input. One such example
is the ability to process uevents.

During initialization, we provide an input callback to ev_init
that gets called when a new event is encountered during dispatch.

ev_get has been removed and replaced with ev_get_input() helper
function that can be called from inside the callback to attempt
to get an input event.

The existing client of ev_get in recovery has been split up such
that the input thread just calls ev_wait(); ev_dispatch(); and
the input_callback handles individual events by using the
ev_get_input() helper.

Change-Id: I24d8e71bd1533876b4ab1ae751ba200fea43c049
Signed-off-by: Dima Zavin <dima@android.com>
2011-09-02 14:55:20 -07:00
The Android Open Source Project
c24a8e688a auto import from //depot/cupcake/@135843 2009-03-03 19:28:42 -08:00
The Android Open Source Project
ffb48f64fe auto import from //depot/cupcake/@135843 2009-03-03 18:28:14 -08:00
The Android Open Source Project
23580ca27a Initial Contribution 2008-10-21 07:00:00 -07:00