aboutsummaryrefslogtreecommitdiffstats
path: root/src/loop.h
blob: 05f30658d669ac84af22ecc43c7c7915fb864167 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#ifndef _RUNES_LOOP_H
#define _RUNES_LOOP_H

#include <uv.h>

struct runes_loop {
    uv_loop_t *loop;
};

struct runes_loop_data {
    uv_work_t req;
    RunesTerm *t;
};

void runes_loop_init(RunesTerm *t);
void runes_loop_run(RunesTerm *t);
void runes_loop_timer_set(RunesTerm *t, int timeout, int repeat,
                          void (*cb)(RunesTerm*));
void runes_loop_cleanup(RunesTerm *t);

#endif