blob: 3bef77543357c96a5f998b0bd1cd15764f1161e9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#pragma once
#include "hash.h"
#include "vec.h"
#include "window.h"
#include "wlstate.h"
enum event_kind_e {
EVENT_KIND_CLOSE,
};
struct event_s {
enum event_kind_e kind;
struct window_s *window;
};
struct eventloop_s {
struct wlstate_s state;
struct vec_s<struct event_s> events;
window_id_t winid;
struct hashmap_s<window_id_t, struct window_s *> windows;
bool running;
};
bool wayc_eventloop_init(struct eventloop_s *loop);
void wayc_eventloop_deinit(struct eventloop_s *loop);
window_id_t wayc_eventloop_register(struct eventloop_s *loop,
struct window_s *window);
void wayc_eventloop_unregister(struct eventloop_s *loop, window_id_t winid);
bool wayc_eventloop_running(struct eventloop_s *loop);
void wayc_eventloop_update(struct eventloop_s *loop);
|