diff options
| author | Fabrice <fabrice@schaub-dev.xyz> | 2026-02-10 09:32:35 +0100 |
|---|---|---|
| committer | Fabrice <fabrice@schaub-dev.xyz> | 2026-02-10 09:32:35 +0100 |
| commit | ccab86b21825ebc41f0887ea633ea28906b32a8e (patch) | |
| tree | 60f378c3629c139f412d41a85142d1b48518e54f /src/events.cc | |
| parent | 86c09e193ed66420da48a7fd62678286b89dace2 (diff) | |
adding vector and eventloop implementation
Diffstat (limited to 'src/events.cc')
| -rw-r--r-- | src/events.cc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/events.cc b/src/events.cc new file mode 100644 index 0000000..850d48f --- /dev/null +++ b/src/events.cc @@ -0,0 +1,19 @@ +#include "events.h" +#include "vec.h" + +bool wayc_eventloop_init(struct eventloop_s *loop) { + wayc_notnull(loop); + + if (!wayc_wlstate_init(&loop->state)) + return false; + + loop->events = WAYC_VEC_INIT(struct event_s); + return true; +} + +void wayc_eventloop_deinit(struct eventloop_s *loop) { + wayc_notnull(loop); + + wayc_wlstate_deinit(&loop->state); + wayc_vec_deinit(&loop->events); +} |
