diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2013-02-18 16:15:53 -0500 |
---|---|---|
committer | Jonas Ådahl <jadahl@gmail.com> | 2013-11-16 21:54:06 +0100 |
commit | 0b6adcd5e4e957c6b15706097e4fe6aab1414b02 (patch) | |
tree | 81081a708be0e81222e81a65705557dba8f9b681 /src/udev-seat.h | |
parent | 9b1b1ba4df6f988bcdce50a813206cb4f53ee309 (diff) |
compositor-drm: Move udev_seat to its own file
We get to move the input code out of compositor-drm.c and we'll be
able to share it with the fbdev backend.
Diffstat (limited to 'src/udev-seat.h')
-rw-r--r-- | src/udev-seat.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/udev-seat.h b/src/udev-seat.h new file mode 100644 index 00000000..b98fae76 --- /dev/null +++ b/src/udev-seat.h @@ -0,0 +1,47 @@ +/* + * Copyright © 2013 Intel Corporation + * + * Permission to use, copy, modify, distribute, and sell this software and + * its documentation for any purpose is hereby granted without fee, provided + * that the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of the copyright holders not be used in + * advertising or publicity pertaining to distribution of the software + * without specific, written prior permission. The copyright holders make + * no representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS + * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY + * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER + * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF + * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef _UDEV_SEAT_H_ +#define _UDEV_SEAT_H_ + +#include <libudev.h> + +#include "compositor.h" + +struct udev_seat { + struct weston_seat base; + struct wl_list devices_list; + struct udev_monitor *udev_monitor; + struct wl_event_source *udev_monitor_source; + char *seat_id; +}; + +int udev_seat_add_devices(struct udev_seat *seat, struct udev *udev); +int udev_seat_enable_udev_monitor(struct udev_seat *seat, struct udev *udev); +void udev_seat_disable_udev_monitor(struct udev_seat *seat); +struct udev_seat *udev_seat_create(struct weston_compositor *c, + struct udev *udev, + const char *seat_id); +void udev_seat_remove_devices(struct udev_seat *seat); +void udev_seat_destroy(struct udev_seat *seat); + +#endif |