wl backend: add wlr_input_device_is_wl
This commit is contained in:
parent
d9eaca6c9f
commit
169bc9fa10
|
@ -203,6 +203,10 @@ static struct wlr_input_device_impl input_device_impl = {
|
|||
.destroy = input_device_destroy
|
||||
};
|
||||
|
||||
bool wlr_input_device_is_wl(struct wlr_input_device *dev) {
|
||||
return dev->impl == &input_device_impl;
|
||||
}
|
||||
|
||||
static struct wlr_input_device *allocate_device(struct wlr_wl_backend *backend,
|
||||
enum wlr_input_device_type type) {
|
||||
struct wlr_wl_input_device *wlr_wl_dev;
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include <wlr/render/egl.h>
|
||||
#include <wlr/backend/wayland.h>
|
||||
#include <wlr/types/wlr_box.h>
|
||||
#include <wlr/types/wlr_input_device.h>
|
||||
#include <wayland-util.h>
|
||||
|
||||
struct wlr_wl_backend {
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include <wayland-client.h>
|
||||
#include <wayland-server.h>
|
||||
#include <wlr/backend.h>
|
||||
#include <wlr/types/wlr_input_device.h>
|
||||
#include <wlr/types/wlr_output.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
|
@ -26,6 +27,11 @@ struct wlr_output *wlr_wl_output_create(struct wlr_backend *backend);
|
|||
*/
|
||||
bool wlr_backend_is_wl(struct wlr_backend *backend);
|
||||
|
||||
/**
|
||||
* True if the given input device is a wlr_wl_input_device.
|
||||
*/
|
||||
bool wlr_input_device_is_wl(struct wlr_input_device *device);
|
||||
|
||||
/**
|
||||
* True if the given output is a wlr_wl_backend_output.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue