diff options
author | Scott Anderson <ascent12@hotmail.com> | 2017-08-26 14:02:04 +1200 |
---|---|---|
committer | Scott Anderson <ascent12@hotmail.com> | 2017-08-26 14:02:04 +1200 |
commit | fb93628bda0cb7750628e227213a1ddc2ae34be9 (patch) | |
tree | fbf3e2aa08594ad6f30dfdc51089a5309ad1a597 /include/wlr | |
parent | 46823152ea5e2d0f888fa25ba6b4b1896e4e89b9 (diff) |
Merge wlr_udev into wlr_session
Diffstat (limited to 'include/wlr')
-rw-r--r-- | include/wlr/backend/drm.h | 3 | ||||
-rw-r--r-- | include/wlr/backend/libinput.h | 3 | ||||
-rw-r--r-- | include/wlr/backend/multi.h | 4 | ||||
-rw-r--r-- | include/wlr/backend/session.h | 11 | ||||
-rw-r--r-- | include/wlr/backend/udev.h | 9 |
5 files changed, 14 insertions, 16 deletions
diff --git a/include/wlr/backend/drm.h b/include/wlr/backend/drm.h index fe1cc5a7..fa63df0a 100644 --- a/include/wlr/backend/drm.h +++ b/include/wlr/backend/drm.h @@ -4,10 +4,9 @@ #include <wayland-server.h> #include <wlr/backend/session.h> #include <wlr/backend.h> -#include <wlr/backend/udev.h> struct wlr_backend *wlr_drm_backend_create(struct wl_display *display, - struct wlr_session *session, struct wlr_udev *udev, int gpu_fd); + struct wlr_session *session, int gpu_fd); bool wlr_backend_is_drm(struct wlr_backend *backend); diff --git a/include/wlr/backend/libinput.h b/include/wlr/backend/libinput.h index b227a7ad..95b8829d 100644 --- a/include/wlr/backend/libinput.h +++ b/include/wlr/backend/libinput.h @@ -5,11 +5,10 @@ #include <wayland-server.h> #include <wlr/backend/session.h> #include <wlr/backend.h> -#include <wlr/backend/udev.h> #include <wlr/types/wlr_input_device.h> struct wlr_backend *wlr_libinput_backend_create(struct wl_display *display, - struct wlr_session *session, struct wlr_udev *udev); + struct wlr_session *session); struct libinput_device *wlr_libinput_get_device_handle(struct wlr_input_device *dev); bool wlr_backend_is_libinput(struct wlr_backend *backend); diff --git a/include/wlr/backend/multi.h b/include/wlr/backend/multi.h index e8e46bed..3fcaaf1e 100644 --- a/include/wlr/backend/multi.h +++ b/include/wlr/backend/multi.h @@ -2,11 +2,9 @@ #define _WLR_BACKEND_MULTI_H #include <wlr/backend.h> -#include <wlr/backend/udev.h> #include <wlr/backend/session.h> -struct wlr_backend *wlr_multi_backend_create(struct wlr_session *session, - struct wlr_udev *udev); +struct wlr_backend *wlr_multi_backend_create(struct wlr_session *session); void wlr_multi_backend_add(struct wlr_backend *multi, struct wlr_backend *backend); diff --git a/include/wlr/backend/session.h b/include/wlr/backend/session.h index 24854431..fbdc97fc 100644 --- a/include/wlr/backend/session.h +++ b/include/wlr/backend/session.h @@ -3,6 +3,7 @@ #include <stdbool.h> #include <wayland-server.h> +#include <libudev.h> #include <sys/types.h> struct session_impl; @@ -19,6 +20,12 @@ struct wlr_session { int drm_fd; unsigned vtnr; char seat[8]; + + struct udev *udev; + struct udev_monitor *mon; + struct wl_event_source *udev_event; + + struct wl_list devices; }; /* @@ -57,9 +64,13 @@ int wlr_session_open_file(struct wlr_session *session, const char *path); */ void wlr_session_close_file(struct wlr_session *session, int fd); +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); +int wlr_session_find_gpu(struct wlr_session *session); + #endif diff --git a/include/wlr/backend/udev.h b/include/wlr/backend/udev.h deleted file mode 100644 index 387a63e6..00000000 --- a/include/wlr/backend/udev.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef _WLR_BACKEND_UDEV_H -#define _WLR_BACKEND_UDEV_H - -struct wlr_udev; - -struct wlr_udev *wlr_udev_create(struct wl_display *display); -void wlr_udev_destroy(struct wlr_udev *udev); - -#endif |