Lines Matching refs:input_dev

85 	InputDevice *input_dev;
165 void report_event(InputDevice *input_dev, uint32_t type, uint32_t code, int32_t value)
167 DPRINTF("%s type = %u, code = %u, value = %d\n", input_dev->devName, type, code, value);
169 PushOnePackage(input_dev, type, code, value);
171 PushOnePackage(input_dev, type, code, value);
175 void mouse_report_events(InputDevice *input_dev, void *buffer, int len)
183 report_event(input_dev, EV_KEY, BTN_LEFT, BTN_LEFT_VALUE((unsigned char)buf[0]));
184 report_event(input_dev, EV_KEY, BTN_RIGHT, BTN_RIGHT_VALUE((unsigned char)buf[0]));
185 report_event(input_dev, EV_KEY, BTN_MIDDLE, BTN_MIDDLE_VALUE((unsigned char)buf[0]));
186 report_event(input_dev, EV_REL, REL_X, buf[1]);
187 report_event(input_dev, EV_REL, REL_Y, buf[2]);
188 report_event(input_dev, EV_REL, REL_WHEEL, buf[3]);
189 report_event(input_dev, EV_SYN, SYN_REPORT, 0);
206 if (sc->input_dev && sc->input_dev->devType == INDEV_TYPE_MOUSE) {
207 mouse_report_events(sc->input_dev, pc->buffer, actlen);
864 sc->input_dev = (InputDevice*)zalloc(sizeof(InputDevice));
865 if (sc->input_dev) {
867 sc->input_dev->devType = INDEV_TYPE_MOUSE;
868 sc->input_dev->devName = "mouse";
870 sc->input_dev->devType = INDEV_TYPE_UNKNOWN;
871 sc->input_dev->devName = "other";
874 ret = RegisterInputDevice(sc->input_dev);
876 DPRINTF("%s register failed, ret = %d!\n", sc->input_dev->devName, ret);
877 free(sc->input_dev);
878 sc->input_dev = NULL;
879 } else if (sc->input_dev->devType == INDEV_TYPE_MOUSE) {
902 if (sc->input_dev) {
903 if (sc->input_dev->devType == INDEV_TYPE_MOUSE) {
907 UnregisterInputDevice(sc->input_dev);
908 free(sc->input_dev);
909 sc->input_dev = NULL;