compositor-drm: Work around page flip not setting tiling mode on BYT
[platform/upstream/weston.git] / src / libinput-seat.h
1 /*
2  * Copyright © 2013 Intel Corporation
3  * Copyright © 2013 Jonas Ådahl
4  *
5  * Permission to use, copy, modify, distribute, and sell this software and
6  * its documentation for any purpose is hereby granted without fee, provided
7  * that the above copyright notice appear in all copies and that both that
8  * copyright notice and this permission notice appear in supporting
9  * documentation, and that the name of the copyright holders not be used in
10  * advertising or publicity pertaining to distribution of the software
11  * without specific, written prior permission.  The copyright holders make
12  * no representations about the suitability of this software for any
13  * purpose.  It is provided "as is" without express or implied warranty.
14  *
15  * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
16  * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
17  * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
18  * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
19  * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
20  * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
21  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
22  */
23
24 #ifndef _LIBINPUT_SEAT_H_
25 #define _LIBINPUT_SEAT_H_
26
27 #include "config.h"
28
29 #include <libudev.h>
30
31 #include "compositor.h"
32
33 struct udev_seat {
34         struct weston_seat base;
35         struct wl_list devices_list;
36         struct wl_listener output_create_listener;
37 };
38
39 struct udev_input {
40         struct libinput *libinput;
41         struct wl_event_source *libinput_source;
42         struct weston_compositor *compositor;
43         int suspended;
44 };
45
46 int
47 udev_input_enable(struct udev_input *input);
48 void
49 udev_input_disable(struct udev_input *input);
50 int
51 udev_input_init(struct udev_input *input,
52                 struct weston_compositor *c,
53                 struct udev *udev,
54                 const char *seat_id);
55 void
56 udev_input_destroy(struct udev_input *input);
57
58 struct udev_seat *
59 udev_seat_get_named(struct udev_input *u,
60                     const char *seat_name);
61
62 #endif