File: test-common-uinput.h

package info (click to toggle)
libevdev 1.5.6%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 2,184 kB
  • ctags: 1,594
  • sloc: ansic: 8,764; sh: 4,195; makefile: 204; python: 171
file content (48 lines) | stat: -rw-r--r-- 2,779 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
 * Copyright © 2013 Red Hat, Inc.
 *
 * 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.
 */

#include <config.h>
#include <libevdev/libevdev.h>

#define DEFAULT_IDS NULL

struct uinput_device* uinput_device_new(const char *name);
int uinput_device_new_with_events(struct uinput_device **dev, const char *name, const struct input_id *ids, ...);
int uinput_device_new_with_events_v(struct uinput_device **dev, const char *name, const struct input_id *ids, va_list args);
void uinput_device_free(struct uinput_device *dev);

int uinput_device_create(struct uinput_device* dev);
int uinput_device_set_name(struct uinput_device* dev, const char *name);
int uinput_device_set_ids(struct uinput_device* dev, const struct input_id *ids);
int uinput_device_set_bit(struct uinput_device* dev, unsigned int bit);
int uinput_device_set_prop(struct uinput_device *dev, unsigned int prop);
int uinput_device_set_event_bit(struct uinput_device* dev, unsigned int type, unsigned int code);
int uinput_device_set_event_bits(struct uinput_device* dev, ...);
int uinput_device_set_event_bits_v(struct uinput_device* dev, va_list args);
int uinput_device_set_abs_bit(struct uinput_device* dev, unsigned int code, const struct input_absinfo *absinfo);
int uinput_device_event(const struct uinput_device* dev, unsigned int type, unsigned int code, int value);
int uinput_device_event_multiple(const struct uinput_device* dev, ...);
int uinput_device_event_multiple_v(const struct uinput_device* dev, va_list args);
int uinput_device_get_fd(const struct uinput_device *dev);
const char* uinput_device_get_devnode(const struct uinput_device *dev);

char *uinput_devnode_from_syspath(const char *syspath);