2 * Acess GUI (AxWin) Version 2
3 * By John Hodge (thePowersGang)
14 giMouseFD = open(gsMouseDevice, 3);
17 num_value.Value = giScreenWidth;
18 ioctl(giMouseFD, 6, &num_value);
21 num_value.Value = giScreenHeight;
22 ioctl(giMouseFD, 6, &num_value);
27 void Input_FillSelect(int *nfds, fd_set *set)
29 if(*nfds < giTerminalFD) *nfds = giTerminalFD;
30 if(*nfds < giMouseFD) *nfds = giMouseFD;
31 FD_SET(giTerminalFD, set);
32 FD_SET(giMouseFD, set);
35 void Input_HandleSelect(fd_set *set)
37 if(FD_ISSET(giTerminalFD, set))
40 if( read(giTerminalFD, sizeof(codepoint), &codepoint) != sizeof(codepoint) )
44 // TODO: pass on to message handler
45 _SysDebug("Keypress 0x%x", codepoint);
48 if(FD_ISSET(giMouseFD, set))
51 uint16_t NAxies, NButtons;
53 int16_t MinValue, MaxValue;
60 _SysDebug("Cursor event");
62 seek(giMouseFD, 0, SEEK_SET);
63 if( read(giMouseFD, sizeof(mouseinfo), &mouseinfo) != sizeof(mouseinfo) )
65 // Not a 3 button mouse, oops
70 // Video_SetCursorPos( mouseinfo.Axies[0], mouseinfo.Axies[1] );
71 _SysDebug("Cursor to %i,%i\n", mouseinfo.Axies[0], mouseinfo.Axies[1]);