LJ Archive

Listing 1. event-dev-struct.txt

struct input_dev {
    
    void *private;
    
    char *name;
    char *phys;
    char *uniq;
    struct input_id id;

    unsigned long evbit[NBITS(EV_MAX)];
    unsigned long keybit[NBITS(KEY_MAX)];
    unsigned long relbit[NBITS(REL_MAX)];
    unsigned long absbit[NBITS(ABS_MAX)];
    unsigned long mscbit[NBITS(MSC_MAX)];
    unsigned long ledbit[NBITS(LED_MAX)];
    unsigned long sndbit[NBITS(SND_MAX)];
    unsigned long ffbit[NBITS(FF_MAX)];
    int ff_effects_max;
    
    unsigned int keycodemax;
    unsigned int keycodesize;
    void *keycode;
    
    unsigned int repeat_key;
    struct timer_list timer;
    
    struct pm_dev *pm_dev;
    int state;
    
    int sync;
    
    int abs[ABS_MAX + 1];
    int rep[REP_MAX + 1];

    unsigned long key[NBITS(KEY_MAX)];
    unsigned long led[NBITS(LED_MAX)];
    unsigned long snd[NBITS(SND_MAX)];
    
    int absmax[ABS_MAX + 1];
    int absmin[ABS_MAX + 1];
    int absfuzz[ABS_MAX + 1];
    int absflat[ABS_MAX + 1];
    
    int (*open)(struct input_dev *dev);
    void (*close)(struct input_dev *dev);
    int (*accept)(struct input_dev *dev,
		  struct file *file);
    int (*flush)(struct input_dev *dev,
		 struct file *file);
    int (*event)(struct input_dev *dev,
		 unsigned int type,
		 unsigned int code,
		 int value);
    int (*upload_effect)(struct input_dev *dev,
			 struct ff_effect *effect);
    int (*erase_effect)(struct input_dev *dev,
			int effect_id);
    
    struct list_head        h_list;
    struct list_head        node;
};
LJ Archive