You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
962 B

8 years ago
#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 <wayland-server.h>
8 years ago
#include <wlr/session.h>
#include <wlr/common/list.h>
8 years ago
#include <wlr/backend/drm.h>
8 years ago
#include "udev.h"
#include "event.h"
#include "drm.h"
struct wlr_drm_backend {
int fd;
bool paused;
struct wl_event_loop *event_loop;
struct {
struct wl_event_source *drm;
struct wl_event_source *udev;
} event_src;
struct {
struct wl_signal output_add;
struct wl_signal output_rem;
struct wl_signal output_render;
} signals;
8 years ago
list_t *outputs;
8 years ago
uint32_t taken_crtcs;
struct wlr_drm_renderer renderer;
struct wlr_session *session;
8 years ago
struct wlr_udev udev;
};
struct wlr_drm_backend *wlr_drm_backend_init(struct wlr_session *session,
struct wl_listener *add, struct wl_listener *rem, struct wl_listener *render);
8 years ago
void wlr_drm_backend_free(struct wlr_drm_backend *backend);
#endif