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

Print this page




 794     public static synchronized boolean getSunAwtDisableCALayers() {
 795         if (sunAwtDisableCALayers == null) {
 796             sunAwtDisableCALayers = AccessController.doPrivileged(
 797                 new GetBooleanAction("sun.awt.disableCALayers"));
 798         }
 799         return sunAwtDisableCALayers;
 800     }
 801 
 802     /*
 803      * Returns true if the application (one of its windows) owns keyboard focus.
 804      */
 805     native boolean isApplicationActive();
 806 
 807     /**
 808      * Returns true if AWT toolkit is embedded, false otherwise.
 809      *
 810      * @return true if AWT toolkit is embedded, false otherwise
 811      */
 812     public static native boolean isEmbedded();
 813 





 814     /************************
 815      * Native methods section
 816      ************************/
 817 
 818     static native long createAWTRunLoopMediator();
 819     /**
 820      * Method to run a nested run-loop. The nested loop is spinned in the javaRunLoop mode, so selectors sent
 821      * by [JNFRunLoop performOnMainThreadWaiting] are processed.
 822      * @param mediator a native pointer to the mediator object created by createAWTRunLoopMediator
 823      * @param processEvents if true - dispatches event while in the nested loop. Used in DnD.
 824      *                      Additional attention is needed when using this feature as we short-circuit normal event
 825      *                      processing which could break Appkit.
 826      *                      (One known example is when the window is resized with the mouse)
 827      *
 828      *                      if false - all events come after exit form the nested loop
 829      */
 830     static void doAWTRunLoop(long mediator, boolean processEvents) {
 831         doAWTRunLoopImpl(mediator, processEvents, inAWT);
 832     }
 833     private static native void doAWTRunLoopImpl(long mediator, boolean processEvents, boolean inAWT);




 794     public static synchronized boolean getSunAwtDisableCALayers() {
 795         if (sunAwtDisableCALayers == null) {
 796             sunAwtDisableCALayers = AccessController.doPrivileged(
 797                 new GetBooleanAction("sun.awt.disableCALayers"));
 798         }
 799         return sunAwtDisableCALayers;
 800     }
 801 
 802     /*
 803      * Returns true if the application (one of its windows) owns keyboard focus.
 804      */
 805     native boolean isApplicationActive();
 806 
 807     /**
 808      * Returns true if AWT toolkit is embedded, false otherwise.
 809      *
 810      * @return true if AWT toolkit is embedded, false otherwise
 811      */
 812     public static native boolean isEmbedded();
 813 
 814     /*
 815      * Activates application ignoring other apps.
 816      */
 817     public native void activateApplication();
 818 
 819     /************************
 820      * Native methods section
 821      ************************/
 822 
 823     static native long createAWTRunLoopMediator();
 824     /**
 825      * Method to run a nested run-loop. The nested loop is spinned in the javaRunLoop mode, so selectors sent
 826      * by [JNFRunLoop performOnMainThreadWaiting] are processed.
 827      * @param mediator a native pointer to the mediator object created by createAWTRunLoopMediator
 828      * @param processEvents if true - dispatches event while in the nested loop. Used in DnD.
 829      *                      Additional attention is needed when using this feature as we short-circuit normal event
 830      *                      processing which could break Appkit.
 831      *                      (One known example is when the window is resized with the mouse)
 832      *
 833      *                      if false - all events come after exit form the nested loop
 834      */
 835     static void doAWTRunLoop(long mediator, boolean processEvents) {
 836         doAWTRunLoopImpl(mediator, processEvents, inAWT);
 837     }
 838     private static native void doAWTRunLoopImpl(long mediator, boolean processEvents, boolean inAWT);