summaryrefslogtreecommitdiff
path: root/src/events.h
blob: 8e27576b059a0db08f430f42cca8206f041753f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#pragma once

#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;
  vec_s<struct event_s> events;
};

bool wayc_eventloop_init(struct eventloop_s *loop);
void wayc_eventloop_deinit(struct eventloop_s *loop);