wlroots/include/wlr/backend/drm.h

32 lines
900 B
C
Raw Normal View History

2017-05-02 06:13:17 +00:00
#ifndef WLR_BACKEND_DRM_H
#define WLR_BACKEND_DRM_H
#include <wayland-server.h>
#include <wlr/session.h>
2017-05-03 10:40:19 +00:00
#include <xf86drmMode.h> // drmModeModeInfo
2017-05-02 06:13:17 +00:00
struct wlr_drm_backend;
struct wlr_drm_output;
2017-05-02 06:13:17 +00:00
2017-05-03 10:40:19 +00:00
struct wlr_drm_mode {
uint16_t width;
uint16_t height;
uint32_t rate;
drmModeModeInfo mode;
};
2017-05-03 09:28:44 +00:00
struct wlr_drm_backend *wlr_drm_backend_init(struct wl_display *display,
struct wlr_session *session, struct wl_listener *add, struct wl_listener *rem,
struct wl_listener *render);
2017-05-02 06:13:17 +00:00
void wlr_drm_backend_free(struct wlr_drm_backend *backend);
const char *wlr_drm_output_get_name(struct wlr_drm_output *out);
2017-05-03 10:40:19 +00: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);
void wlr_drm_output_begin(struct wlr_drm_output *out);
void wlr_drm_output_end(struct wlr_drm_output *out);
2017-05-02 06:13:17 +00:00
#endif