5. GFX Janet Loader

<<gfx_function_declarations>>=
#ifdef USE_JANET
void monolith_gfx_janet(JanetTable *env);
#endif
<<gfx_functions>>=
#ifdef USE_JANET
<<gfx_janet>>
static const JanetReg gfx_cfuns[] = {
<<gfx_janet_entries>>
      {NULL, NULL, NULL}
};
void monolith_gfx_auxload(JanetTable *env);
void monolith_gfx_janet(JanetTable *env)
{
    janet_cfuns(env, NULL, gfx_cfuns);
    monolith_gfx_auxload(env);
}
#endif

5.1. foo

placeholder. will delete later.

<<gfx_janet>>=
static Janet gfx_foo(int32_t argc, Janet *argv)
{
    janet_fixarity(argc, 0);
    printf("a foo function\n");
    return janet_wrap_nil();
}
<<gfx_janet_entries>>=
{
"monolith/gfx-foo",
gfx_foo,
"A simple foo function"
},



prev | home | next