2017-05-02 08:13:17 +02:00
|
|
|
#ifndef WLR_BACKEND_DRM_H
|
|
|
|
#define WLR_BACKEND_DRM_H
|
|
|
|
|
|
|
|
#include <wayland-server.h>
|
2017-05-03 06:23:07 +02:00
|
|
|
#include <wlr/session.h>
|
2017-05-07 16:00:23 +02:00
|
|
|
#include <wlr/backend.h>
|
2017-05-03 12:40:19 +02:00
|
|
|
#include <xf86drmMode.h> // drmModeModeInfo
|
2017-05-02 08:13:17 +02:00
|
|
|
|
|
|
|
struct wlr_drm_backend;
|
2017-05-03 07:49:03 +02:00
|
|
|
struct wlr_drm_output;
|
2017-05-02 08:13:17 +02:00
|
|
|
|
2017-05-03 12:40:19 +02:00
|
|
|
struct wlr_drm_mode {
|
|
|
|
uint16_t width;
|
|
|
|
uint16_t height;
|
|
|
|
uint32_t rate;
|
|
|
|
drmModeModeInfo mode;
|
|
|
|
};
|
|
|
|
|
2017-05-07 16:00:23 +02:00
|
|
|
struct wlr_backend *wlr_drm_backend_create(struct wl_display *display,
|
|
|
|
struct wlr_session *session);
|
2017-05-02 08:13:17 +02:00
|
|
|
|
2017-05-04 11:58:11 +02:00
|
|
|
const char *wlr_drm_output_get_name(struct wlr_drm_output *out);
|
|
|
|
|
2017-05-03 12:40:19 +02:00
|
|
|
struct wlr_drm_mode *wlr_drm_output_get_modes(struct wlr_drm_output *out, size_t *count);
|
|
|
|
bool wlr_drm_output_modeset(struct wlr_drm_output *out, struct wlr_drm_mode *mode);
|
|
|
|
|
2017-05-03 07:49:03 +02:00
|
|
|
void wlr_drm_output_begin(struct wlr_drm_output *out);
|
|
|
|
void wlr_drm_output_end(struct wlr_drm_output *out);
|
2017-05-02 08:13:17 +02:00
|
|
|
|
|
|
|
#endif
|