예제 #1
0
 public static ImageCapture getImageCapture() {
   if (instance == null) {
     if (Platform.OS_WIN32.equals(Platform.getOS())) instance = new Win32ImageCapture();
     else if (Platform.WS_GTK.equals(Platform.getWS())) {
       if (Platform.ARCH_IA64.equals(Platform.getOSArch())
           || Platform.ARCH_X86_64.equals(Platform.getOSArch()))
         instance = new org.eclipse.ve.internal.swt.targetvm.unix.bits64.ImageCapture();
       else instance = new org.eclipse.ve.internal.swt.targetvm.unix.ImageCapture();
     } else if (Platform.OS_MACOSX.equals(Platform.getOS())) {
       if (Platform.WS_COCOA.equals(Platform.getWS())) {
         instance = new org.eclipse.ve.internal.swt.targetvm.macosx.cocoa.ImageCapture();
       } else if (Platform.WS_CARBON.equals(Platform.getWS())) {
         instance = new org.eclipse.ve.internal.swt.targetvm.macosx.ImageCapture();
       } else {
         throw new UnsupportedOperationException(Platform.getOS());
       }
     } else {
       throw new UnsupportedOperationException(Platform.getOS());
     }
   }
   return instance;
 }
예제 #2
0
    @Override
    public OS getForBitness(int bitness) {
      String osgiArch = getOsgiArch();
      if (bitness == 32) {
        if (Platform.ARCH_X86_64.equals(osgiArch)) {
          return createLinux(Platform.ARCH_X86);
        }

        if (Platform.ARCH_IA64.equals(osgiArch)) {
          return createLinux(Platform.ARCH_IA64_32);
        }
      } else {
        if (Platform.ARCH_X86.equals(osgiArch)) {
          return createLinux(Platform.ARCH_X86_64);
        }

        if (Platform.ARCH_IA64_32.equals(osgiArch)) {
          return createLinux(Platform.ARCH_IA64);
        }
      }

      return this;
    }