summaryrefslogtreecommitdiffstats
path: root/src/livecode/api/context.cpp
blob: 43c6881d16db6899b9be6410cad66d9d73599c91 (plain)
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;
}

}
}