3 * (c) 2010 Adam Lackorzynski <adam@os.inf.tu-dresden.de>,
4 * Alexander Warg <warg@os.inf.tu-dresden.de>
5 * economic rights: Technische Universität Dresden (Germany)
7 * This file is part of TUD:OS and distributed under the terms of the
8 * GNU General Public License 2.
9 * Please see the COPYING-GPL-2 file for details.
13 #include <l4/re/event>
17 namespace Mag_server {
23 Input_source *_next_active;
24 void add_lua_input_source(lua_State *l);
31 typedef L4Re::Event_buffer::Event Event;
32 typedef L4Re::Event_stream_info Input_info;
33 typedef L4Re::Event_absinfo Input_absinfo;
36 explicit Input_source(Core_api *core = 0) : _core(core) {}
37 virtual void poll_events() = 0;
38 void post_event(Event const *e);
39 Input_source *next() const { return _next_active; }
40 virtual int get_stream_info(l4_umword_t stream_id, Input_info *info) = 0;
41 virtual int get_axis_info(l4_umword_t stream_id, unsigned naxes, unsigned *axes, Input_absinfo *info) = 0;
42 virtual ~Input_source() = 0;
45 inline Input_source::~Input_source() {}