On Wed, Jul 30, 2003 at 07:01:45PM +0200, Mathieu Lacage wrote: >Le mer 30/07/2003 à 16:36, Egbert Eich a écrit : > >> > One of the things I don't really get is what xf86AddInputHandler is >> > supposed to be used for. Despite reading a lot of code and grepping >> > multiple times, I found only very few locations using >> > xf86AddInputHandler and I could not figure out what it is used for. I'd >> > be most grateful for any kind of hint :) >> > >> >> Please take a look at: >> >> http://xfree86.linuxwiki.org/xf86_2a_2a_20Functions > >Thanks for the pointer. This documentation is indeed useful but I had >already figured what the function does by myself. I am more interested >in what it is expected to be used for: who will call this function ? You >could probably rephrase this to: "what is an Input Handler?".
An input handler consists of a file descriptor to get input from, and a function to call when it has input to read and be processed. The InputHandler functionality in xf86Events.c also ensures that such input is only read and processed when XFree86's VT is the active one. >[EMAIL PROTECTED] Xserver]$ grep -r xf86AddInputHandler * >hw/xfree86/common/xf86.h:pointer xf86AddInputHandler(int fd, InputHandlerProc proc, >pointer data); >hw/xfree86/common/xf86Events.c:xf86AddInputHandler(int fd, InputHandlerProc proc, >pointer data) >hw/xfree86/drivers/glint/pm2_video.c: xf86AddInputHandler(xvipc_fd, >Permedia2ReadInput, NULL); >hw/xfree86/loader/xf86sym.c: SYMFUNC(xf86AddInputHandler) >hw/xfree86/os-support/bsd/bsd_apm.c: APMihPtr = xf86AddInputHandler(fd, >xf86HandlePMEvents, NULL); >hw/xfree86/os-support/bsd/bsd_kqueue_apm.c: APMihPtr = xf86AddInputHandler(kq, >xf86HandlePMEvents, NULL); >hw/xfree86/os-support/linux/lnx_apm.c: APMihPtr = >xf86AddInputHandler(fd,xf86HandlePMEvents,NULL); >[EMAIL PROTECTED] Xserver]$ > > >grep does not show any meaningful use of the function: I'd expect way >more people to be interested in adding a fd to the list of fds to watch >for in select. Is there another way to do this ? The APM cases you found with grep should be typical examples. >Obviously, I missed something rather fundamental about this code because >I feel like I am going nowhere. What specifically are you looking for? David -- David Dawes Founder/committer/developer The XFree86 Project www.XFree86.org/~dawes _______________________________________________ Devel mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/devel