diff options
| author | s-ol <s-ol@users.noreply.github.com> | 2019-12-02 14:32:42 +0000 |
|---|---|---|
| committer | s-ol <s-ol@users.noreply.github.com> | 2019-12-02 14:32:42 +0000 |
| commit | 81fe2250a70c892eeb195725117d566a042e5c93 (patch) | |
| tree | e2c70bd1b0f9e9d9063f6ff7aa11f6fa6b8ced80 /src/livecode/api/context.cpp | |
| parent | add basic livecode toolbar (diff) | |
| download | inkscape-81fe2250a70c892eeb195725117d566a042e5c93.tar.gz inkscape-81fe2250a70c892eeb195725117d566a042e5c93.zip | |
add draft janet interface for livecoding
Diffstat (limited to 'src/livecode/api/context.cpp')
| -rw-r--r-- | src/livecode/api/context.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/livecode/api/context.cpp b/src/livecode/api/context.cpp new file mode 100644 index 000000000..43c6881d1 --- /dev/null +++ b/src/livecode/api/context.cpp @@ -0,0 +1,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; +} + +} +} |
