aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2017-06-04 12:23:05 -0400
committerGitHub <noreply@github.com>2017-06-04 12:23:05 -0400
commit7051d0e79dc74426c312f9eee0ce95adf85ff7c9 (patch)
treeafdc7f624abcc12348200626f2c0ec6122a85068 /include
parent40b85d992a0a8dcdbff5305e232fbcd26d873148 (diff)
parent5df56653abdef714d0a92ff88b13b9066f3167fc (diff)
Merge pull request #6 from ascent12/multi-gpu
Udev event device matching
Diffstat (limited to 'include')
-rw-r--r--include/backend/udev.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/include/backend/udev.h b/include/backend/udev.h
index c5064279..a2834063 100644
--- a/include/backend/udev.h
+++ b/include/backend/udev.h
@@ -1,19 +1,29 @@
#ifndef _WLR_INTERNAL_UDEV_H
#define _WLR_INTERNAL_UDEV_H
+#include <sys/types.h>
#include <libudev.h>
#include <wlr/session.h>
#include <wayland-server.h>
#include <wlr/backend/udev.h>
+struct wlr_udev_dev {
+ dev_t dev;
+ struct wl_signal invalidate;
+
+ struct wl_list link;
+};
+
struct wlr_udev {
struct udev *udev;
struct udev_monitor *mon;
- char *drm_path;
struct wl_event_source *event;
- struct wl_signal invalidate_drm;
+
+ struct wl_list devices;
};
int wlr_udev_find_gpu(struct wlr_udev *udev, struct wlr_session *session);
+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);
#endif