2017-06-02 00:29:10 +00:00
|
|
|
#ifndef _WLR_INTERNAL_UDEV_H
|
|
|
|
#define _WLR_INTERNAL_UDEV_H
|
2017-05-01 03:20:48 +00:00
|
|
|
|
2017-06-04 05:43:34 +00:00
|
|
|
#include <sys/types.h>
|
2017-05-01 05:49:18 +00:00
|
|
|
#include <libudev.h>
|
2017-05-03 04:23:07 +00:00
|
|
|
#include <wlr/session.h>
|
2017-05-03 09:28:44 +00:00
|
|
|
#include <wayland-server.h>
|
2017-06-02 00:29:10 +00:00
|
|
|
#include <wlr/backend/udev.h>
|
2017-05-01 05:49:18 +00:00
|
|
|
|
2017-06-04 05:43:34 +00:00
|
|
|
struct wlr_udev_dev {
|
|
|
|
dev_t dev;
|
|
|
|
struct wl_signal invalidate;
|
|
|
|
|
|
|
|
struct wl_list link;
|
|
|
|
};
|
|
|
|
|
2017-05-01 05:49:18 +00:00
|
|
|
struct wlr_udev {
|
|
|
|
struct udev *udev;
|
|
|
|
struct udev_monitor *mon;
|
2017-05-03 09:28:44 +00:00
|
|
|
struct wl_event_source *event;
|
2017-06-04 05:43:34 +00:00
|
|
|
|
|
|
|
struct wl_list devices;
|
2017-05-01 05:49:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
int wlr_udev_find_gpu(struct wlr_udev *udev, struct wlr_session *session);
|
2017-06-04 05:43:34 +00:00
|
|
|
bool wlr_udev_signal_add(struct wlr_udev *udev, dev_t dev, struct wl_listener *listener);
|
|
|
|
void wlr_udev_signal_remove(struct wlr_udev *udev, struct wl_listener *listener);
|
2017-05-01 05:49:18 +00:00
|
|
|
|
2017-05-01 03:20:48 +00:00
|
|
|
#endif
|