Gui::GUIApplicationNativeEventAware::~GUIApplicationNativeEventAware()
{
#ifdef Q_WS_X11
#ifdef SPNAV_FOUND
    if (spnav_close())
        Base::Console().Log("Couldn't disconnect from spacenav daemon\n");
    else
        Base::Console().Log("Disconnected from spacenav daemon\n");
#endif
#endif

#ifdef _USE_3DCONNEXION_SDK
#ifdef Q_WS_WIN
    if (gMouseInput == this) {
        gMouseInput = 0;
    }
#endif
//mac
#ifdef Q_WS_MACX
    /* make sure the framework is installed */
    if (InstallConnexionHandlers == NULL)
      {
        Base::Console().Log("3Dconnexion framework not found!\n");
        return;
      }
    /* close the connection with the 3dx driver */
    //std::cerr << "tdxClientID: " << tdxClientID << std::endl;
    if (tdxClientID)
      UnregisterConnexionClient(tdxClientID);
    CleanupConnexionHandlers();
    Base::Console().Log("Disconnected from 3DConnexion driver\n");
#endif
#endif
}
Exemplo n.º 2
0
static int tdx_detach() {
  if (tdxevent.enabled) {
    UnregisterConnexionClient(tdxevent.client);
    CleanupConnexionHandlers();
  }
  tdx_clear();
}
Gui::GUIApplicationNativeEventAware::~GUIApplicationNativeEventAware()
{
#ifdef Q_WS_X11
#ifdef SPNAV_FOUND
    if (spnav_close())
        Base::Console().Log("Couldn't disconnect from spacenav daemon\n");
    else
        Base::Console().Log("Disconnected from spacenav daemon\n");
#endif
#endif

#ifdef _USE_3DCONNEXION_SDK
#ifdef Q_WS_WIN
    if (gMouseInput == this) {
        gMouseInput = 0;
        Base::Console().Log("3Dconnexion device detached.\n");
    }
#endif
//mac
#ifdef Q_WS_MACX
    // if 3Dconnexion library was loaded at runtime
    if (InstallConnexionHandlers) {
        // Close our connection with the 3dx driver
        if (tdxClientID)
            UnregisterConnexionClient(tdxClientID);
        CleanupConnexionHandlers();
        Base::Console().Log("Disconnected from 3Dconnexion driver\n");
    }
#endif
#endif
}
void ossimPlanetQtApplication::terminateInputDevices()
{
   UInt16 wasConnexionOpen = gDevWrapperInfo.clientID;

   if (InstallConnexionHandlers == NULL)
   {
      return;
   }
    
   /* make sure the framework is installed */
//	if (InstallConnexionHandlers == NULL)
//        return;
   
   /* close the connection with the 3dx driver */
   if (wasConnexionOpen)
   {
      UnregisterConnexionClient(gDevWrapperInfo.clientID);
   }
   
   CleanupConnexionHandlers();
   
   ///fprintf(stderr, "Terminated connection with 3Dconnexion device.\n");
}