aboutsummaryrefslogtreecommitdiff
path: root/include/backend/drm/backend.h
blob: caa18bcce728681c87737e8dc041e91b25e63b72 (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
32
33
34
35
36
37
#ifndef DRM_BACKEND_H
#define DRM_BACKEND_H

#include <stdbool.h>
#include <stddef.h>
#include <EGL/egl.h>
#include <gbm.h>
#include <libudev.h>

#include "session.h"
#include "udev.h"
#include "event.h"
#include "drm.h"

struct wlr_drm_backend {
	int fd;
	bool paused;

	// Priority Queue (Max-heap)
	size_t event_cap;
	size_t event_len;
	struct wlr_drm_event *events;

	size_t display_len;
	struct wlr_drm_display *displays;

	uint32_t taken_crtcs;

	struct wlr_drm_renderer renderer;
	struct wlr_session session;
	struct wlr_udev udev;
};

struct wlr_drm_backend *wlr_drm_backend_init(void);
void wlr_drm_backend_free(struct wlr_drm_backend *backend);

#endif