Exemple #1
0
  public static boolean isHelperAvailable() {
    if (!triedHelperInit) {
      try {
        System.loadLibrary("turbovnchelper");
        helperAvailable = true;
      } catch (java.lang.UnsatisfiedLinkError e) {
        vlog.info("WARNING: Could not find TurboVNC Helper JNI library.  If it is in a");
        vlog.info("  non-standard location, then add -Djava.library.path=<dir>");
        vlog.info("  to the Java command line to specify its location.");
        vlog.info("  Full-screen mode may not work correctly.");
        if (VncViewer.osEID())
          vlog.info("  Keyboard grabbing and extended input device support will be disabled.");
        else if (VncViewer.osGrab()) vlog.info("  Keyboard grabbing will be disabled.");

      } catch (java.lang.Exception e) {
        vlog.info("WARNING: Could not initialize TurboVNC Helper JNI library:");
        vlog.info("  " + e.toString());
        vlog.info("  Full-screen mode may not work correctly.");
        if (VncViewer.osEID())
          vlog.info("  Keyboard grabbing and extended input device support will be disabled.");
        else if (VncViewer.osGrab()) vlog.info("  Keyboard grabbing will be disabled.");
      }
    }
    triedHelperInit = true;
    return helperAvailable;
  }
Exemple #2
0
 boolean processExtInputEventHelper(int type) {
   boolean retval = false;
   if (isHelperAvailable() && cc.cp.supportsGII) {
     boolean isExtEvent = false;
     try {
       isExtEvent = processExtInputEvent(type);
     } catch (java.lang.UnsatisfiedLinkError e) {
       vlog.info("WARNING: Could not invoke processExtInputEvent() from TurboVNC Helper.");
       vlog.info("  Extended input device support will be disabled.");
       helperAvailable = false;
     } catch (java.lang.Exception e) {
       vlog.info("WARNING: Could not invoke processExtInputEvent() from TurboVNC Helper:");
       vlog.info("  " + e.toString());
       vlog.info("  Extended input device support may not work correctly.");
     }
     if (!isExtEvent) return false;
     if (devices == null) {
       vlog.error("ERROR: Attempted to send extended input event when no GII devices exist");
       return false;
     }
     for (Iterator<ExtInputDevice> i = devices.iterator(); i.hasNext(); ) {
       ExtInputDevice dev = (ExtInputDevice) i.next();
       if (lastEvent.deviceID == dev.id && dev.remoteID != 0) {
         if (dev.absolute && lastEvent.type == giiTypes.giiValuatorRelative)
           lastEvent.type = giiTypes.giiValuatorAbsolute;
         cc.giiSendEvent(dev, lastEvent);
         retval = true;
       }
     }
   }
   return retval;
 }
Exemple #3
0
 public QueryTableModel() {
   cache = new Vector();
   try {
     Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
   } catch (java.lang.Exception e) {
     System.err.println("Class not found exception : ");
     System.err.println(e.getMessage());
   }
 } // konstr. sonu
Exemple #4
0
 public void cleanupExtInputHelper() {
   if (isHelperAvailable() && x11dpy != 0) {
     try {
       cleanupExtInput();
     } catch (java.lang.UnsatisfiedLinkError e) {
       vlog.info("WARNING: Could not invoke cleanupExtInput() from TurboVNC Helper.");
       vlog.info("  Extended input device support will be disabled.");
       helperAvailable = false;
     } catch (java.lang.Exception e) {
       vlog.info("WARNING: Could not invoke cleanupExtInput() from TurboVNC Helper:");
       vlog.info("  " + e.toString());
     }
   }
 }
Exemple #5
0
 public void setupExtInputHelper() {
   if (isHelperAvailable() && cc.cp.supportsGII && x11dpy == 0) {
     try {
       setupExtInput();
     } catch (java.lang.UnsatisfiedLinkError e) {
       vlog.info("WARNING: Could not invoke setupExtInput() from TurboVNC Helper.");
       vlog.info("  Extended input device support will be disabled.");
       helperAvailable = false;
     } catch (java.lang.Exception e) {
       vlog.info("WARNING: Could not invoke setupExtInput() from TurboVNC Helper:");
       vlog.info("  " + e.toString());
       vlog.info("  Extended input device support may not work correctly.");
     }
   }
 }
Exemple #6
0
 public void x11FullScreenHelper(boolean on) {
   if (isHelperAvailable()) {
     try {
       x11FullScreen(on);
     } catch (java.lang.UnsatisfiedLinkError e) {
       vlog.info("WARNING: Could not invoke x11FullScreen() from TurboVNC Helper.");
       vlog.info("  Full-screen mode may not work correctly.");
       helperAvailable = false;
     } catch (java.lang.Exception e) {
       vlog.info("WARNING: Could not invoke x11FullScreen() from TurboVNC Helper:");
       vlog.info("  " + e.toString());
       vlog.info("  Full-screen mode may not work correctly.");
     }
   }
 }
Exemple #7
0
 public void grabKeyboardHelper(boolean on, boolean force) {
   if (isHelperAvailable()) {
     try {
       if (cc.keyboardGrabbed == on && !force) return;
       grabKeyboard(on, VncViewer.grabPointer.getValue());
       cc.keyboardGrabbed = on;
       cc.menu.grabKeyboard.setSelected(cc.keyboardGrabbed);
     } catch (java.lang.UnsatisfiedLinkError e) {
       vlog.info("WARNING: Could not invoke grabKeyboard() from TurboVNC Helper.");
       vlog.info("  Keyboard grabbing will be disabled.");
       helperAvailable = false;
     } catch (java.lang.Exception e) {
       vlog.info("WARNING: Could not invoke grabKeyboard() from TurboVNC Helper:");
       vlog.info("  " + e.toString());
       vlog.info("  Keyboard grabbing may not work correctly.");
     }
   }
 }