natiny_script_open_backend

C
void natiny_script_open_backend(NatinyScript script);

Makes the Lua API for application startup, events and the frame loop available as natiny.backend in the specified state.

Parameters

Name Type Description
script NatinyScript State whose natiny module receives the backend table

Example

C
natiny_script_open_std(script);
natiny_script_open_backend(script);
if (natiny_script_run(script, source) != NATINY_SCRIPT_OK)
    return 1;

Here, source may contain:

Lua
local natiny = require("natiny")
assert(natiny.backend ~= nil)