1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
#include "livecode/api/api.h" namespace Inkscape { namespace Livecode { static Context *_context = nullptr; Context &ctx() { if (!_context) { janet_panic("Livecode Context uninitialized!!"); } return *_context; } void janet_lib_context(JanetTable *env, Context &context) { _context = &context; } } }