diff options
Diffstat (limited to 'src/event.cpp')
-rw-r--r-- | src/event.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/event.cpp b/src/event.cpp new file mode 100644 index 0000000..050914c --- /dev/null +++ b/src/event.cpp @@ -0,0 +1,24 @@ +#ifdef SALTICIDAE_CBINDINGS +#include "salticidae/event.h" + +extern "C" { + +eventcontext_t *eventcontext_new() { return new eventcontext_t(); } + +void eventcontext_dispatch(eventcontext_t *self) { return self->dispatch(); } + +void eventcontext_stop(eventcontext_t *self) { return self->stop(); } + +void eventcontext_free(eventcontext_t *self) { delete self; } + +void sigev_new(const eventcontext_t *self, sigev_callback_t cb) { + return new SigEvent(*self, cb); +} + +void sigev_add(sigev_t *self, int sig) { self->add(sig); } + +void sigev_delete() { delete self; } + +} + +#endif |