|
void | lraspi_openlibs (lua_State *L) |
| Opens default LRaspi libraries. More...
|
|
void | lraspi_dofile (lua_State *L, const char *path) |
| Opens a lua file. More...
|
|
void | lraspi_newobject (lua_State *L, const char *objname, const luaL_Reg methods[]) |
| Creates a new metatable that represents an object. More...
|
|
void | lraspi_pushfont (lua_State *L, lraspi_Font *font) |
| Pushes a font object onto the stack. More...
|
|
lua_Font | lraspi_checkfont (lua_State *L, int narg) |
| Checks whether the function argument narg is a font object. More...
|
|
lua_Font | lraspi_optfont (lua_State *L, int arg, lua_Font d) |
| If the function argument arg is a font object, return this font. If this argument is absent or is nil, return d . Otherwise, raises an error. More...
|
|
void | lraspi_pushcolour (lua_State *L, lraspi_Colour *colour) |
| Pushes a colour object onto the stack. More...
|
|
lua_Colour | lraspi_checkcolour (lua_State *L, int narg) |
| Checks whether the function argument narg is a colour object. More...
|
|
lua_Colour | lraspi_optcolour (lua_State *L, int arg, lua_Colour d) |
| If the function argument arg is a colour object, return this colour. If the argument is absent or is nil, return d . Otherwise, raises an error. More...
|
|
Functions to extends Lua.
◆ lua_Colour
◆ lua_Font
◆ lraspi_checkcolour()
lua_Colour lraspi_checkcolour |
( |
lua_State * |
L, |
|
|
int |
narg |
|
) |
| |
Checks whether the function argument narg
is a colour object.
- Parameters
-
L | A Lua state. |
narg | The position of the argument. |
- Returns
- A font object.
◆ lraspi_checkfont()
lua_Font lraspi_checkfont |
( |
lua_State * |
L, |
|
|
int |
narg |
|
) |
| |
Checks whether the function argument narg
is a font object.
- Parameters
-
L | A Lua state. |
narg | The position of the argument. |
- Returns
- A font object.
◆ lraspi_dofile()
void lraspi_dofile |
( |
lua_State * |
L, |
|
|
const char * |
path |
|
) |
| |
Opens a lua file.
- Parameters
-
L | A Lua state. |
path | The path of the lua file. |
◆ lraspi_newobject()
void lraspi_newobject |
( |
lua_State * |
L, |
|
|
const char * |
objname, |
|
|
const luaL_Reg |
methods[] |
|
) |
| |
Creates a new metatable that represents an object.
- Parameters
-
L | A Lua state. |
objname | The name of the object. |
methods | The methods that contains the object. |
◆ lraspi_openlibs()
void lraspi_openlibs |
( |
lua_State * |
L | ) |
|
Opens default LRaspi libraries.
- Parameters
-
◆ lraspi_optcolour()
If the function argument arg
is a colour object, return this colour. If the argument is absent or is nil, return d
. Otherwise, raises an error.
- Parameters
-
L | A Lua state. |
arg | The position of the argument. |
d | The default value if the argument is absent or nil. |
- Returns
- A colour object.
◆ lraspi_optfont()
If the function argument arg
is a font object, return this font. If this argument is absent or is nil, return d
. Otherwise, raises an error.
- Parameters
-
L | A Lua state. |
arg | The position of the argument. |
d | The default value if the argument is absent or nil. |
- Returns
- A font object.
◆ lraspi_pushcolour()
Pushes a colour object onto the stack.
- Parameters
-
L | A Lua state. |
colour | A colour object. |
◆ lraspi_pushfont()
void lraspi_pushfont |
( |
lua_State * |
L, |
|
|
lraspi_Font * |
font |
|
) |
| |
Pushes a font object onto the stack.
- Parameters
-
L | A Lua state. |
font | A font object. |