/* See Porting Layer Definition - p. 17 */ void InitInput (int argc, char *argv[]) { DeviceIntPtr pMouse, pKeyboard; #if CYGDEBUG winDebug ("InitInput\n"); #endif #ifdef XWIN_CLIPBOARD /* * Wrap some functions at every generation of the server. */ if (InitialVector[2] != winProcEstablishConnection) { winProcEstablishConnectionOrig = InitialVector[2]; InitialVector[2] = winProcEstablishConnection; } if (g_fXdmcpEnabled && ProcVector[X_QueryTree] != winProcQueryTree) { winProcQueryTreeOrig = ProcVector[X_QueryTree]; ProcVector[X_QueryTree] = winProcQueryTree; } #endif pMouse = AddInputDevice (winMouseProc, TRUE); pKeyboard = AddInputDevice (winKeybdProc, TRUE); RegisterPointerDevice (pMouse); RegisterKeyboardDevice (pKeyboard); miRegisterPointerDevice (screenInfo.screens[0], pMouse); mieqInit ((DevicePtr)pKeyboard, (DevicePtr)pMouse); /* Initialize the mode key states */ winInitializeModeKeyStates (); #ifdef HAS_DEVWINDOWS /* Only open the windows message queue device once */ if (g_fdMessageQueue == WIN_FD_INVALID) { /* Open a file descriptor for the Windows message queue */ g_fdMessageQueue = open (WIN_MSG_QUEUE_FNAME, O_RDONLY); if (g_fdMessageQueue == -1) { FatalError ("InitInput - Failed opening %s\n", WIN_MSG_QUEUE_FNAME); } /* Add the message queue as a device to wait for in WaitForSomething */ AddEnabledDevice (g_fdMessageQueue); } #endif #if CYGDEBUG winDebug ("InitInput - returning\n"); #endif }
void InitInput(int argc, char *argv[]) { DeviceIntPtr p, k; p = AddInputDevice(vfbMouseProc, TRUE); k = AddInputDevice(vfbKeybdProc, TRUE); RegisterPointerDevice(p); RegisterKeyboardDevice(k); miRegisterPointerDevice(screenInfo.screens[0], p); (void)mieqInit ((DevicePtr) k, (DevicePtr) p); }
void InitInput( int argc, char **argv) { DeviceIntPtr ptr, kbd; ptr = AddInputDevice((DeviceProc)PointerProc, TRUE); kbd = AddInputDevice((DeviceProc)KeyboardProc, TRUE); RegisterPointerDevice(ptr); RegisterKeyboardDevice(kbd); return; }
void InitInput(int argc, char *argv[]) { xnestPointerDevice = AddInputDevice(xnestPointerProc, TRUE); xnestKeyboardDevice = AddInputDevice(xnestKeyboardProc, TRUE); if (!xnestEvents) xnestEvents = (xEvent *) xcalloc(sizeof(xEvent), GetMaximumEventsNum()); if (!xnestEvents) FatalError("couldn't allocate room for events\n"); RegisterPointerDevice(xnestPointerDevice); RegisterKeyboardDevice(xnestKeyboardDevice); mieqInit(); AddEnabledDevice(XConnectionNumber(xnestDisplay)); RegisterBlockAndWakeupHandlers(xnestBlockHandler, xnestWakeupHandler, NULL); }
/* See Porting Layer Definition - p. 17 */ void InitInput (int argc, char *argv[]) { DeviceIntPtr pMouse, pKeyboard; #if CYGDEBUG ErrorF ("InitInput\n"); #endif pMouse = AddInputDevice (winMouseProc, TRUE); pKeyboard = AddInputDevice (winKeybdProc, TRUE); RegisterPointerDevice (pMouse); RegisterKeyboardDevice (pKeyboard); miRegisterPointerDevice (screenInfo.screens[0], pMouse); mieqInit ((DevicePtr)pKeyboard, (DevicePtr)pMouse); /* Initialize the mode key states */ winInitializeModeKeyStates (); /* Only open the windows message queue device once */ if (g_fdMessageQueue == WIN_FD_INVALID) { /* Open a file descriptor for the Windows message queue */ g_fdMessageQueue = open (WIN_MSG_QUEUE_FNAME, O_RDONLY); if (g_fdMessageQueue == -1) { FatalError ("InitInput - Failed opening %s\n", WIN_MSG_QUEUE_FNAME); } /* Add the message queue as a device to wait for in WaitForSomething */ AddEnabledDevice (g_fdMessageQueue); } #if CYGDEBUG ErrorF ("InitInput - returning\n"); #endif }
/* See Porting Layer Definition - p. 17 */ void InitInput (int argc, char *argv[]) { DeviceIntPtr pMouse, pKeyboard; #if CYGDEBUG ErrorF ("InitInput\n"); #endif pMouse = AddInputDevice (winMouseProc, TRUE); pKeyboard = AddInputDevice (winKeybdProc, TRUE); RegisterPointerDevice (pMouse); RegisterKeyboardDevice (pKeyboard); miRegisterPointerDevice (screenInfo.screens[0], pMouse); mieqInit ((DevicePtr)pKeyboard, (DevicePtr)pMouse); /* Initialize the mode key states */ winInitializeModeKeyStates (); /* Only open the windows message queue device once */ if (g_fdMessageQueue == WIN_FD_INVALID) { /* Open a file descriptor for the Windows message queue */ g_fdMessageQueue = open (WIN_MSG_QUEUE_FNAME, O_RDONLY); if (g_fdMessageQueue == -1) { FatalError ("InitInput - Failed opening %s\n", WIN_MSG_QUEUE_FNAME); } /* Add the message queue as a device to wait for in WaitForSomething */ AddEnabledDevice (g_fdMessageQueue); } #if 0 { MiscExtReturn ret; pointer kbd; #if 0 if ((kbd = MiscExtCreateStruct(MISC_KEYBOARD)) == (pointer) 0) return BadAlloc; #else kbd = MiscExtCreateStruct (MISC_KEYBOARD); #endif MiscExtSetKbdValue(kbd, MISC_KBD_TYPE, 0); MiscExtSetKbdValue(kbd, MISC_KBD_RATE, 0); MiscExtSetKbdValue(kbd, MISC_KBD_DELAY, 0); MiscExtSetKbdValue(kbd, MISC_KBD_SERVNUMLOCK, 0); switch ((ret = MiscExtApply (kbd, MISC_KEYBOARD))) { case MISC_RET_SUCCESS: break; case MISC_RET_BADVAL: case MISC_RET_BADKBDTYPE: default: ErrorF ("Unexpected return from MiscExtApply(KEYBOARD) = %d\n", ret); } } #endif #if CYGDEBUG ErrorF ("InitInput - returning\n"); #endif }