2019-10-18 21:32:29 +00:00
|
|
|
/* Copyright (c), Charlotte Meyer <dev@buffet.sh>
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
|
|
* You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef KIWMI_LUAK_H
|
|
|
|
#define KIWMI_LUAK_H
|
|
|
|
|
|
|
|
#include <stdbool.h>
|
|
|
|
|
|
|
|
#include <lua.h>
|
|
|
|
|
|
|
|
#include "server.h"
|
|
|
|
|
2019-12-30 23:33:07 +00:00
|
|
|
struct kiwmi_lua {
|
|
|
|
lua_State *L;
|
2019-12-31 00:09:06 +00:00
|
|
|
struct wl_list callbacks; // lua_callback::link
|
2019-12-30 23:33:07 +00:00
|
|
|
};
|
|
|
|
|
2019-10-18 21:32:29 +00:00
|
|
|
bool luaK_init(struct kiwmi_server *server);
|
2019-12-30 23:33:07 +00:00
|
|
|
bool luaK_dofile(struct kiwmi_lua *lua, const char *config_path);
|
2019-12-31 00:09:06 +00:00
|
|
|
void luaK_fini(struct kiwmi_lua *lua);
|
2019-10-18 21:32:29 +00:00
|
|
|
|
|
|
|
#endif /* KIWMI_LUAK_H */
|