tizen 2.4 release
[framework/uifw/libevdev.git] / test / test-common-uinput.h
1 /*
2  * Copyright © 2013 Red Hat, Inc.
3  *
4  * Permission to use, copy, modify, distribute, and sell this software and its
5  * documentation for any purpose is hereby granted without fee, provided that
6  * the above copyright notice appear in all copies and that both that copyright
7  * notice and this permission notice appear in supporting documentation, and
8  * that the name of the copyright holders not be used in advertising or
9  * publicity pertaining to distribution of the software without specific,
10  * written prior permission.  The copyright holders make no representations
11  * about the suitability of this software for any purpose.  It is provided "as
12  * is" without express or implied warranty.
13  *
14  * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
16  * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
17  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
18  * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
19  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
20  * OF THIS SOFTWARE.
21  */
22
23 #include <config.h>
24 #include <libevdev/libevdev.h>
25
26 #define DEFAULT_IDS NULL
27
28
29 struct uinput_device* uinput_device_new(const char *name);
30 int uinput_device_new_with_events(struct uinput_device **dev, const char *name, const struct input_id *ids, ...);
31 int uinput_device_new_with_events_v(struct uinput_device **dev, const char *name, const struct input_id *ids, va_list args);
32 void uinput_device_free(struct uinput_device *dev);
33
34 int uinput_device_create(struct uinput_device* dev);
35 int uinput_device_set_name(struct uinput_device* dev, const char *name);
36 int uinput_device_set_ids(struct uinput_device* dev, const struct input_id *ids);
37 int uinput_device_set_bit(struct uinput_device* dev, unsigned int bit);
38 int uinput_device_set_prop(struct uinput_device *dev, unsigned int prop);
39 int uinput_device_set_event_bit(struct uinput_device* dev, unsigned int type, unsigned int code);
40 int uinput_device_set_event_bits(struct uinput_device* dev, ...);
41 int uinput_device_set_event_bits_v(struct uinput_device* dev, va_list args);
42 int uinput_device_set_abs_bit(struct uinput_device* dev, unsigned int code, const struct input_absinfo *absinfo);
43 int uinput_device_event(const struct uinput_device* dev, unsigned int type, unsigned int code, int value);
44 int uinput_device_event_multiple(const struct uinput_device* dev, ...);
45 int uinput_device_event_multiple_v(const struct uinput_device* dev, va_list args);
46 int uinput_device_get_fd(const struct uinput_device *dev);
47 const char* uinput_device_get_devnode(const struct uinput_device *dev);
48
49 char *uinput_devnode_from_syspath(const char *syspath);