src/macosx/classes/sun/awt/CGraphicsDevice.java

Print this page




 202                 exitFullScreenExclusive(w);
 203             }
 204             nativeSetDisplayMode(displayID, dm.getWidth(), dm.getHeight(),
 205                                  dm.getBitDepth(), dm.getRefreshRate());
 206             if (isFullScreenSupported() && w != null) {
 207                 enterFullScreenExclusive(w);
 208             }
 209         }
 210     }
 211 
 212     @Override
 213     public DisplayMode getDisplayMode() {
 214         return nativeGetDisplayMode(displayID);
 215     }
 216 
 217     @Override
 218     public DisplayMode[] getDisplayModes() {
 219         return nativeGetDisplayModes(displayID);
 220     }
 221 






 222     private static native void nativeSetDisplayMode(int displayID, int w, int h, int bpp, int refrate);
 223 
 224     private static native DisplayMode nativeGetDisplayMode(int displayID);
 225 
 226     private static native DisplayMode[] nativeGetDisplayModes(int displayID);
 227 
 228     private static native double nativeGetXResolution(int displayID);
 229 
 230     private static native double nativeGetYResolution(int displayID);
 231 
 232     private static native Insets nativeGetScreenInsets(int displayID);
 233 }


 202                 exitFullScreenExclusive(w);
 203             }
 204             nativeSetDisplayMode(displayID, dm.getWidth(), dm.getHeight(),
 205                                  dm.getBitDepth(), dm.getRefreshRate());
 206             if (isFullScreenSupported() && w != null) {
 207                 enterFullScreenExclusive(w);
 208             }
 209         }
 210     }
 211 
 212     @Override
 213     public DisplayMode getDisplayMode() {
 214         return nativeGetDisplayMode(displayID);
 215     }
 216 
 217     @Override
 218     public DisplayMode[] getDisplayModes() {
 219         return nativeGetDisplayModes(displayID);
 220     }
 221 
 222     public int getScaleFactor() {
 223         return (int) nativeGetScaleFactor(displayID);
 224     }
 225 
 226     private static native double nativeGetScaleFactor(int displayID);
 227 
 228     private static native void nativeSetDisplayMode(int displayID, int w, int h, int bpp, int refrate);
 229 
 230     private static native DisplayMode nativeGetDisplayMode(int displayID);
 231 
 232     private static native DisplayMode[] nativeGetDisplayModes(int displayID);
 233 
 234     private static native double nativeGetXResolution(int displayID);
 235 
 236     private static native double nativeGetYResolution(int displayID);
 237 
 238     private static native Insets nativeGetScreenInsets(int displayID);
 239 }