2 /////////////////////////////////////////////////////////////////////////////
3 // $Header: /usr/cvs/microwin/src/drivers/gsselect_rtems.c,v 1.1.1.1 2001/06/21 06:32:41 greg Exp $
5 // Copyright (c) 2000 - Rosimildo da Silva
8 // This module implements the "GsSelect()" function for Nano-X.
10 // MODIFICATION/HISTORY:
12 // $Log: gsselect_rtems.c,v $
13 // Revision 1.1.1.1 2001/06/21 06:32:41 greg
14 // Microwindows pre8 with patches
16 // Revision 1.1.1.1 2001/06/05 03:44:01 root
17 // First import of 5/5/2001 Microwindows to CVS
20 /////////////////////////////////////////////////////////////////////////////
26 #include <rtems/mw_uid.h>
29 /* defined in input_rtems.c */
30 extern struct MW_UID_MESSAGE m_kbd;
31 extern struct MW_UID_MESSAGE m_mou;
37 struct MW_UID_MESSAGE m;
39 unsigned int timeout = 10;
41 /* perform pre-select duties, if any*/
44 scrdev.PreSelect(&scrdev);
47 /* let's make sure that the type is invalid */
48 m.type = MV_UID_INVALID;
50 /* wait up to 100 milisecons for events */
51 rc = uid_read_message( &m, timeout );
53 /* return if timed-out or something went wrong */
56 if( errno != ETIMEDOUT )
57 EPRINTF( " rc= %d, errno=%d\n", rc, errno );
60 /* timeout handling */
66 /* let's pass the event up to microwindows */
69 /* Mouse or Touch Screen event */
73 while(GsCheckMouseEvent())
80 GsCheckKeyboardEvent();
83 /* micro-windows does nothing with those.. */