LRaspi  2022.1
A Lua Player for Rasberry Pi
laux.h
Go to the documentation of this file.
1 /*
2  * laux.h - NEKERAFA - 1st november 2021
3  * Auxiliary functions
4  *
5  * Under MIT License
6  * Copyright (c) 2019 - Rafael Alcalde Azpiazu (NEKERAFA)
7  */
8 
9 #ifndef LRASPI_AUX_H
10 #define LRASPI_AUX_H
11 
12 #include "lua.h"
13 #include "lauxlib.h"
14 
15 #define LRASPI_SCREENMODULE "screen"
16 #define LRASPI_FONTMODULE "font"
17 #define LRASPI_COLOURMODULE "colour"
18 #define LRASPI_DRAWMODULE "draw"
19 #define LRASPI_IMAGEMODULE "image"
20 
21 #define LRASPI_TFONT "font"
22 #define LRASPI_TCOLOUR "colour"
23 #define LRASPI_TIMAGE "image"
24 
39 void lraspi_openlibs(lua_State* L);
40 
47 void lraspi_dofile(lua_State* L, const char* path);
48 
56 void lraspi_newobject(lua_State* L, const char* objname, const luaL_Reg methods[]);
57 
62 #endif // LRASPI_AUX_H
63 
void lraspi_newobject(lua_State *L, const char *objname, const luaL_Reg methods[])
Creates a new metatable that represents an object.
void lraspi_openlibs(lua_State *L)
Opens default LRaspi libraries.
void lraspi_dofile(lua_State *L, const char *path)
Opens a lua file.