2 * (c) 2010 Adam Lackorzynski <adam@os.inf.tu-dresden.de>,
3 * Alexander Warg <warg@os.inf.tu-dresden.de>
4 * economic rights: Technische Universität Dresden (Germany)
6 * This file is part of TUD:OS and distributed under the terms of the
7 * GNU General Public License 2.
8 * Please see the COPYING-GPL-2 file for details.
17 namespace Mag_server {
19 Plugin *Plugin::_first;
21 Core_api::Core_api(Registry *r, lua_State *lua, User_state *u,
22 L4::Cap<void> rcvc, L4::Cap<L4Re::Video::Goos> fb)
23 : _reg(r), _ust(u), _rcv_cap(rcvc), _fb(fb), _lua(lua)
25 lua_pushlightuserdata(_lua, this);
27 lua_rawset(_lua, LUA_REGISTRYINDEX);
31 Core_api::get_refs_table() const
33 lua_pushlightuserdata(_lua, const_cast<Core_api*>(this));
34 lua_rawget(_lua, LUA_REGISTRYINDEX);
39 Core_api::add_input_source(Input_source *i)
41 i->_next_active = _input;
44 i->add_lua_input_source(_lua, -1);