diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/backend/drm/drm.h | 1 | ||||
-rw-r--r-- | include/wlr/backend/drm.h | 3 | ||||
-rw-r--r-- | include/wlr/backend/session.h | 16 |
3 files changed, 12 insertions, 8 deletions
diff --git a/include/backend/drm/drm.h b/include/backend/drm/drm.h index 80bc7669..f46d565c 100644 --- a/include/backend/drm/drm.h +++ b/include/backend/drm/drm.h @@ -82,6 +82,7 @@ struct wlr_drm_backend { bool addfb2_modifiers; int fd; + struct wlr_device *dev; size_t num_crtcs; struct wlr_drm_crtc *crtcs; diff --git a/include/wlr/backend/drm.h b/include/wlr/backend/drm.h index c1380323..cd0f3405 100644 --- a/include/wlr/backend/drm.h +++ b/include/wlr/backend/drm.h @@ -22,7 +22,8 @@ * a DRM backend, other kinds of backends raise SIGABRT). */ struct wlr_backend *wlr_drm_backend_create(struct wl_display *display, - struct wlr_session *session, int gpu_fd, struct wlr_backend *parent, + struct wlr_session *session, struct wlr_device *dev, + struct wlr_backend *parent, wlr_renderer_create_func_t create_renderer_func); bool wlr_backend_is_drm(struct wlr_backend *backend); diff --git a/include/wlr/backend/session.h b/include/wlr/backend/session.h index 36b80a8d..82f22a3f 100644 --- a/include/wlr/backend/session.h +++ b/include/wlr/backend/session.h @@ -11,9 +11,11 @@ struct session_impl; struct wlr_device { int fd; dev_t dev; - struct wl_signal signal; - struct wl_list link; + + struct { + struct wl_signal change; + } events; }; struct wlr_session { @@ -74,21 +76,21 @@ void wlr_session_destroy(struct wlr_session *session); * * Returns -errno on error. */ -int wlr_session_open_file(struct wlr_session *session, const char *path); +struct wlr_device *wlr_session_open_file(struct wlr_session *session, + const char *path); /* * Closes a file previously opened with wlr_session_open_file. */ -void wlr_session_close_file(struct wlr_session *session, int fd); +void wlr_session_close_file(struct wlr_session *session, + struct wlr_device *device); -void wlr_session_signal_add(struct wlr_session *session, int fd, - struct wl_listener *listener); /* * Changes the virtual terminal. */ bool wlr_session_change_vt(struct wlr_session *session, unsigned vt); size_t wlr_session_find_gpus(struct wlr_session *session, - size_t ret_len, int *ret); + size_t ret_len, struct wlr_device **ret); #endif |