Lines Matching refs:ev
220 struct input_event ev; in injectKeyEvent() local
221 memset(&ev, 0, sizeof(ev)); in injectKeyEvent()
222 gettimeofday(&ev.time,0); in injectKeyEvent()
223 ev.type = EV_KEY; in injectKeyEvent()
224 ev.code = code; in injectKeyEvent()
225 ev.value = value; in injectKeyEvent()
226 if(write(kbdfd, &ev, sizeof(ev)) < 0) in injectKeyEvent()
309 struct input_event ev; in injectTouchEvent() local
319 memset(&ev, 0, sizeof(ev)); in injectTouchEvent()
322 gettimeofday(&ev.time,0); in injectTouchEvent()
323 ev.type = EV_KEY; in injectTouchEvent()
324 ev.code = BTN_TOUCH; in injectTouchEvent()
325 ev.value = down; in injectTouchEvent()
326 if(write(touchfd, &ev, sizeof(ev)) < 0) in injectTouchEvent()
332 gettimeofday(&ev.time,0); in injectTouchEvent()
333 ev.type = EV_ABS; in injectTouchEvent()
334 ev.code = ABS_X; in injectTouchEvent()
335 ev.value = x; in injectTouchEvent()
336 if(write(touchfd, &ev, sizeof(ev)) < 0) in injectTouchEvent()
342 gettimeofday(&ev.time,0); in injectTouchEvent()
343 ev.type = EV_ABS; in injectTouchEvent()
344 ev.code = ABS_Y; in injectTouchEvent()
345 ev.value = y; in injectTouchEvent()
346 if(write(touchfd, &ev, sizeof(ev)) < 0) in injectTouchEvent()
352 gettimeofday(&ev.time,0); in injectTouchEvent()
353 ev.type = EV_SYN; in injectTouchEvent()
354 ev.code = 0; in injectTouchEvent()
355 ev.value = 0; in injectTouchEvent()
356 if(write(touchfd, &ev, sizeof(ev)) < 0) in injectTouchEvent()