jg@max.crl.dec.com (Jim Gettys) (07/20/89)
No, Xlib does not itself provide a read with timeout feature, though it will provide you with enough information to do this in an OS dependent fashion. The Xt intrinsics, however, I believe provide this functionality, and in an OS independent fashion. I suspect other toolkits do as well. You should be using a toolkit in any case. Xlib is not the right level of abstraction for building entire serious applications, unless you are a masochist, or a toolkit implementer. - Jim Gettys
chan@hpfcmgw.HP.COM (Chan Benson) (07/22/89)
> You should be using a toolkit in any case. Xlib is not the right level > of abstraction for building entire serious applications, unless you are a > masochist, or a toolkit implementer. Or want to do any of a number of things that are difficult or impossible with Xtk; or want to make a lean and mean application. -- Chan Benson HP Fort Collins
rcb@ccpv1.ncsu.edu (Randy Buckland) (08/15/89)
Is there any way with Xlib to read events with a timeout? The only way I can think of would be to flush the internal queue and then do a select on the file number that Xlib is using to talk to the server. However this is not very portable. What I would like would be a version of XNextEvent with a timeout parameter that can take sub-second values. Randy Buckland rcb@ncsuvx.ncsu.edu
rws@EXPO.LCS.MIT.EDU (Bob Scheifler) (08/28/89)
The only way I can think of would be to flush the internal queue and then do a select on the file number that Xlib is using to talk to the server. Right. However this is not very portable. Also Right. What I would like would be a version of XNextEvent with a timeout parameter that can take sub-second values. But many others will argue that this isn't sufficient, since they need to wait on other things besides X events, or they need to wait on multiple displays, or ... It isn't obvious to me what a reasonable and portable interface would be.