Home | History | Annotate | Download | only in linux
      1 /****************************************************************************
      2  ****************************************************************************
      3  ***
      4  ***   This header was automatically generated from a Linux kernel header
      5  ***   of the same name, to make information necessary for userspace to
      6  ***   call into the kernel available to libc.  It contains only constants,
      7  ***   structures, and macros generated from the original header, and thus,
      8  ***   contains no copyrightable information.
      9  ***
     10  ****************************************************************************
     11  ****************************************************************************/
     12 #ifndef __UINPUT_H_
     13 #define __UINPUT_H_
     14 
     15 #include <linux/input.h>
     16 
     17 #define UINPUT_VERSION 3
     18 
     19 struct uinput_ff_upload {
     20  int request_id;
     21  int retval;
     22  struct ff_effect effect;
     23  struct ff_effect old;
     24 };
     25 
     26 struct uinput_ff_erase {
     27  int request_id;
     28  int retval;
     29  int effect_id;
     30 };
     31 
     32 #define UINPUT_IOCTL_BASE 'U'
     33 #define UI_DEV_CREATE _IO(UINPUT_IOCTL_BASE, 1)
     34 #define UI_DEV_DESTROY _IO(UINPUT_IOCTL_BASE, 2)
     35 
     36 #define UI_SET_EVBIT _IOW(UINPUT_IOCTL_BASE, 100, int)
     37 #define UI_SET_KEYBIT _IOW(UINPUT_IOCTL_BASE, 101, int)
     38 #define UI_SET_RELBIT _IOW(UINPUT_IOCTL_BASE, 102, int)
     39 #define UI_SET_ABSBIT _IOW(UINPUT_IOCTL_BASE, 103, int)
     40 #define UI_SET_MSCBIT _IOW(UINPUT_IOCTL_BASE, 104, int)
     41 #define UI_SET_LEDBIT _IOW(UINPUT_IOCTL_BASE, 105, int)
     42 #define UI_SET_SNDBIT _IOW(UINPUT_IOCTL_BASE, 106, int)
     43 #define UI_SET_FFBIT _IOW(UINPUT_IOCTL_BASE, 107, int)
     44 #define UI_SET_PHYS _IOW(UINPUT_IOCTL_BASE, 108, char*)
     45 #define UI_SET_SWBIT _IOW(UINPUT_IOCTL_BASE, 109, int)
     46 
     47 #define UI_BEGIN_FF_UPLOAD _IOWR(UINPUT_IOCTL_BASE, 200, struct uinput_ff_upload)
     48 #define UI_END_FF_UPLOAD _IOW(UINPUT_IOCTL_BASE, 201, struct uinput_ff_upload)
     49 #define UI_BEGIN_FF_ERASE _IOWR(UINPUT_IOCTL_BASE, 202, struct uinput_ff_erase)
     50 #define UI_END_FF_ERASE _IOW(UINPUT_IOCTL_BASE, 203, struct uinput_ff_erase)
     51 
     52 #define EV_UINPUT 0x0101
     53 #define UI_FF_UPLOAD 1
     54 #define UI_FF_ERASE 2
     55 
     56 #define UINPUT_MAX_NAME_SIZE 80
     57 struct uinput_user_dev {
     58  char name[UINPUT_MAX_NAME_SIZE];
     59  struct input_id id;
     60  int ff_effects_max;
     61  int absmax[ABS_MAX + 1];
     62  int absmin[ABS_MAX + 1];
     63  int absfuzz[ABS_MAX + 1];
     64  int absflat[ABS_MAX + 1];
     65 };
     66 #endif
     67 
     68