src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java

Print this page




 775 
 776     private static Boolean sunAwtDisableCALayers = null;
 777 
 778     /**
 779      * Returns the value of "sun.awt.disableCALayers" property. Default
 780      * value is {@code false}.
 781      */
 782     public static synchronized boolean getSunAwtDisableCALayers() {
 783         if (sunAwtDisableCALayers == null) {
 784             sunAwtDisableCALayers = AccessController.doPrivileged(
 785                 new GetBooleanAction("sun.awt.disableCALayers"));
 786         }
 787         return sunAwtDisableCALayers;
 788     }
 789 
 790     /*
 791      * Returns true if the application (one of its windows) owns keyboard focus.
 792      */
 793     native boolean isApplicationActive();
 794 







 795     /************************
 796      * Native methods section
 797      ************************/
 798 
 799     static native long createAWTRunLoopMediator();
 800     /**
 801      * Method to run a nested run-loop. The nested loop is spinned in the javaRunLoop mode, so selectors sent
 802      * by [JNFRunLoop performOnMainThreadWaiting] are processed.
 803      * @param mediator a native pointer to the mediator object created by createAWTRunLoopMediator
 804      * @param processEvents if true - dispatches event while in the nested loop. Used in DnD.
 805      *                      Additional attention is needed when using this feature as we short-circuit normal event
 806      *                      processing which could break Appkit.
 807      *                      (One known example is when the window is resized with the mouse)
 808      *
 809      *                      if false - all events come after exit form the nested loop
 810      */
 811     static void doAWTRunLoop(long mediator, boolean processEvents) {
 812         doAWTRunLoopImpl(mediator, processEvents, inAWT);
 813     }
 814     private static native void doAWTRunLoopImpl(long mediator, boolean processEvents, boolean inAWT);




 775 
 776     private static Boolean sunAwtDisableCALayers = null;
 777 
 778     /**
 779      * Returns the value of "sun.awt.disableCALayers" property. Default
 780      * value is {@code false}.
 781      */
 782     public static synchronized boolean getSunAwtDisableCALayers() {
 783         if (sunAwtDisableCALayers == null) {
 784             sunAwtDisableCALayers = AccessController.doPrivileged(
 785                 new GetBooleanAction("sun.awt.disableCALayers"));
 786         }
 787         return sunAwtDisableCALayers;
 788     }
 789 
 790     /*
 791      * Returns true if the application (one of its windows) owns keyboard focus.
 792      */
 793     native boolean isApplicationActive();
 794 
 795     /**
 796      * Returns true if AWT toolkit is embedded, false otherwise
 797      *
 798      * @return true if AWT toolkit is embedded, false otherwise
 799      */
 800     public static native boolean isEmbedded();
 801 
 802     /************************
 803      * Native methods section
 804      ************************/
 805 
 806     static native long createAWTRunLoopMediator();
 807     /**
 808      * Method to run a nested run-loop. The nested loop is spinned in the javaRunLoop mode, so selectors sent
 809      * by [JNFRunLoop performOnMainThreadWaiting] are processed.
 810      * @param mediator a native pointer to the mediator object created by createAWTRunLoopMediator
 811      * @param processEvents if true - dispatches event while in the nested loop. Used in DnD.
 812      *                      Additional attention is needed when using this feature as we short-circuit normal event
 813      *                      processing which could break Appkit.
 814      *                      (One known example is when the window is resized with the mouse)
 815      *
 816      *                      if false - all events come after exit form the nested loop
 817      */
 818     static void doAWTRunLoop(long mediator, boolean processEvents) {
 819         doAWTRunLoopImpl(mediator, processEvents, inAWT);
 820     }
 821     private static native void doAWTRunLoopImpl(long mediator, boolean processEvents, boolean inAWT);