/* Reads an event from the mouse buffer. Warning: For now, we assume there's no console switching. */ static int mouse_update (void) { int result; result = get_ms_event(0); return result; }
void update_mysky(void) { MS_EVENT x; get_ms_event(&x); if (x.event) { ms_last_event=x; } if(!visible) move_ms_cursor(x.x-h_x,x.y-h_y,0); }
void mouse_waitforupdate() { #if 0 fd_set *readfds, writefds, exceptfds; struct timeval timeout; FD_ZERO(readfds); FD_ZERO(writefds); FD_ZERO(exceptfds); FD_SET(__svgalib_mouse_fd, readfds); /* need to setup timeout. */ select(readfds, writefds, exceptfds, &timeout); #else get_ms_event(1); #endif return; }
void ms_idle_event(EVENT_MSG *info,void *user_data) { void *i;MS_EVENT x; user_data;info; if (info->msg==E_WATCH) { *otevri_zavoru=1; get_ms_event(&x); if (x.event) { ms_last_event=x; i=&ms_last_event; *otevri_zavoru=1; send_message(E_MOUSE,i); } } }
int mouse_update() { int result; result = get_ms_event(0); return result; }