Пример #1
0
/* 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
}
Пример #2
0
/**
 * Initialize all supported input devices present and referenced in the
 * xorg.conf.
 */
void
InitInput(int argc, char **argv)
{
    InputInfoPtr *pInfo;
    DeviceIntPtr dev;

    xf86Info.vtRequestsPending = FALSE;

    /* Enable threaded input */
    InputThreadPreInit();

    mieqInit();

    /* Initialize all configured input devices */
    for (pInfo = xf86ConfigLayout.inputs; pInfo && *pInfo; pInfo++) {
        (*pInfo)->options =
            xf86AddNewOption((*pInfo)->options, "driver", (*pInfo)->driver);
        (*pInfo)->options =
            xf86AddNewOption((*pInfo)->options, "identifier", (*pInfo)->name);
        /* If one fails, the others will too */
        if (NewInputDeviceRequest((*pInfo)->options, NULL, &dev) == BadAlloc)
            break;
    }

    config_init();
}
Пример #3
0
void
InitInput(int argc, char **argv)
{
    IDevPtr* pDev;
    DeviceIntPtr dev;

    xf86Info.vtRequestsPending = FALSE;

    mieqInit();

    GetEventList(&xf86Events);

    /* Call the PreInit function for each input device instance. */
    for (pDev = xf86ConfigLayout.inputs; pDev && *pDev; pDev++) {
        /* Replace obsolete keyboard driver with kbd */
        if (!xf86NameCmp((*pDev)->driver, "keyboard")) {
            strcpy((*pDev)->driver, "kbd");
        }

        /* If one fails, the others will too */
        if (xf86NewInputDevice(*pDev, &dev, TRUE) == BadAlloc)
            break;
    }

    config_init();
}
Пример #4
0
void InitInput(int argc, char *argv[])
{
  int i;
  for (i = 0;i < screenInfo.numScreens;i++) {
    if (!vncExtensionIsActive(i))
        FatalError("failed to activate VNC extension for one or more screens");
  }
  mieqInit ();
}
Пример #5
0
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);
}
Пример #6
0
void
InitInput(int argc, char *argv[])
{
    DeviceIntPtr p, k;
    Atom xiclass;

    p = AddInputDevice(serverClient, vfbMouseProc, TRUE);
    k = AddInputDevice(serverClient, vfbKeybdProc, TRUE);
    xiclass = MakeAtom(XI_MOUSE, sizeof(XI_MOUSE) - 1, TRUE);
    AssignTypeAndName(p, xiclass, "Xvfb mouse");
    xiclass = MakeAtom(XI_KEYBOARD, sizeof(XI_KEYBOARD) - 1, TRUE);
    AssignTypeAndName(k, xiclass, "Xvfb keyboard");
    (void) mieqInit();
}
Пример #7
0
/* See Porting Layer Definition - p. 17 */
void
InitInput(int argc, char *argv[])
{
#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;
    }
#endif

    if (AllocDevicePair(serverClient, "Windows",
                        &g_pwinPointer, &g_pwinKeyboard,
                        winMouseProc, winKeybdProc,
                        FALSE) != Success)
        FatalError("InitInput - Failed to allocate slave devices.\n");

    mieqInit();

    /* 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 */
        SetNotifyFd(g_fdMessageQueue, xwinDevWindowsHandlerNotify, X_NOTIFY_READ, NULL);
    }
#endif

#if CYGDEBUG
    winDebug("InitInput - returning\n");
#endif
}
Пример #8
0
/**
 * Initialize all supported input devices present and referenced in the
 * xorg.conf.
 */
void
InitInput(int argc, char **argv)
{
    InputInfoPtr* pInfo;
    DeviceIntPtr dev;

    xf86Info.vtRequestsPending = FALSE;

    mieqInit();

    /* Initialize all configured input devices */
    for (pInfo = xf86ConfigLayout.inputs; pInfo && *pInfo; pInfo++) {
        /* If one fails, the others will too */
        if (NewInputDeviceRequest((*pInfo)->options, NULL, &dev) == BadAlloc)
            break;
    }

    config_init();
}
Пример #9
0
void
InitInput(int argc, char *argv[])
{
    int rc;

    rc = AllocDevicePair(serverClient, "Xnest",
                         &xnestPointerDevice,
                         &xnestKeyboardDevice,
                         xnestPointerProc, xnestKeyboardProc, FALSE);

    if (rc != Success)
        FatalError("Failed to init Xnest default devices.\n");

    mieqInit();

    AddEnabledDevice(XConnectionNumber(xnestDisplay));

    RegisterBlockAndWakeupHandlers(xnestBlockHandler, xnestWakeupHandler, NULL);
}
Пример #10
0
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);
}
Пример #11
0
/* 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
}
Пример #12
0
Bool
DarwinEQInit(void)
{
    int *p;

    for (p = darwin_x11_modifier_mask_list; *p; p++) {
        darwin_x11_modifier_mask |= *p;
    }

    darwin_all_modifier_mask = darwin_x11_modifier_mask;
    for (p = darwin_all_modifier_mask_additions; *p; p++) {
        darwin_all_modifier_mask |= *p;
    }

    mieqInit();
    mieqSetHandler(ET_XQuartz, DarwinEventHandler);

    /* Note that this *could* cause a potential async issue, since we're checking
     * darwinEvents without holding the lock, but darwinEvents is only ever set
     * here, so I don't bother.
     */
    if (!darwinEvents) {
        darwinEvents = InitEventList(GetMaximumEventsNum());

        if (!darwinEvents)
            FatalError("Couldn't allocate event buffer\n");

        darwinEvents_lock();
        pthread_cond_broadcast(&mieq_ready_cond);
        darwinEvents_unlock();
    }

    if (!fd_add_tid)
        fd_add_tid = create_thread(DarwinProcessFDAdditionQueue_thread, NULL);

    return TRUE;
}
Пример #13
0
/* 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
}
Пример #14
0
void InitInput(int argc, char *argv[])
{
  mieqInit ();
}