src/solaris/native/sun/awt/awt.h

Print this page
rev 9924 : 8003900: X11 dependencies should be removed from Mac OS X build.
Reviewed-by:
Contributed-by: David DeHaven <david.dehaven@oracle.com>


  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 /*
  27  * Common AWT definitions
  28  */
  29 
  30 #ifndef _AWT_
  31 #define _AWT_
  32 
  33 #include "jvm.h"
  34 #include "jni_util.h"
  35 #include "debug_util.h"
  36 
  37 #ifndef HEADLESS
  38 #include <X11/Intrinsic.h>
  39 #endif /* !HEADLESS */
  40 
  41 
  42 /* The JVM instance: defined in awt_MToolkit.c */
  43 extern JavaVM *jvm;
  44 
  45 extern jclass tkClass;
  46 extern jmethodID awtLockMID;
  47 extern jmethodID awtUnlockMID;
  48 extern jmethodID awtWaitMID;
  49 extern jmethodID awtNotifyMID;
  50 extern jmethodID awtNotifyAllMID;
  51 extern jboolean awtLockInited;
  52 
  53 /* Perform sanity and consistency checks on AWT locking */
  54 #ifdef DEBUG
  55 #define DEBUG_AWT_LOCK
  56 #endif
  57 
  58 /*
  59  * The following locking primitives should be defined


  93          (*env)->Throw(env, pendingException); \
  94       } \
  95     } while (0)
  96 #define AWT_WAIT_IMPL(tm) \
  97     (*env)->CallStaticVoidMethod(env, tkClass, awtWaitMID, (jlong)(tm))
  98 #define AWT_NOTIFY_IMPL() \
  99     (*env)->CallStaticVoidMethod(env, tkClass, awtNotifyMID)
 100 #define AWT_NOTIFY_ALL_IMPL() \
 101     (*env)->CallStaticVoidMethod(env, tkClass, awtNotifyAllMID)
 102 
 103 /*
 104  * Unfortunately AWT_LOCK debugging does not work with XAWT due to mixed
 105  * Java/C use of AWT lock.
 106  */
 107 #define AWT_LOCK()           AWT_LOCK_IMPL()
 108 #define AWT_NOFLUSH_UNLOCK() AWT_NOFLUSH_UNLOCK_IMPL()
 109 #define AWT_WAIT(tm)         AWT_WAIT_IMPL(tm)
 110 #define AWT_NOTIFY()         AWT_NOTIFY_IMPL()
 111 #define AWT_NOTIFY_ALL()     AWT_NOTIFY_ALL_IMPL()
 112 
 113 #ifndef HEADLESS
 114 extern Display         *awt_display; /* awt_GraphicsEnv.c */
 115 extern Boolean          awt_ModLockIsShiftLock; /* XToolkit.c */
 116 #endif /* !HEADLESS */
 117 
 118 #endif /* ! _AWT_ */


  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 /*
  27  * Common AWT definitions
  28  */
  29 
  30 #ifndef _AWT_
  31 #define _AWT_
  32 
  33 #include "jvm.h"
  34 #include "jni_util.h"
  35 #include "debug_util.h"
  36 
  37 #if !defined(HEADLESS) && !defined(MACOSX)
  38 #include <X11/Intrinsic.h>
  39 #endif /* !HEADLESS && !MACOSX */
  40 
  41 
  42 /* The JVM instance: defined in awt_MToolkit.c */
  43 extern JavaVM *jvm;
  44 
  45 extern jclass tkClass;
  46 extern jmethodID awtLockMID;
  47 extern jmethodID awtUnlockMID;
  48 extern jmethodID awtWaitMID;
  49 extern jmethodID awtNotifyMID;
  50 extern jmethodID awtNotifyAllMID;
  51 extern jboolean awtLockInited;
  52 
  53 /* Perform sanity and consistency checks on AWT locking */
  54 #ifdef DEBUG
  55 #define DEBUG_AWT_LOCK
  56 #endif
  57 
  58 /*
  59  * The following locking primitives should be defined


  93          (*env)->Throw(env, pendingException); \
  94       } \
  95     } while (0)
  96 #define AWT_WAIT_IMPL(tm) \
  97     (*env)->CallStaticVoidMethod(env, tkClass, awtWaitMID, (jlong)(tm))
  98 #define AWT_NOTIFY_IMPL() \
  99     (*env)->CallStaticVoidMethod(env, tkClass, awtNotifyMID)
 100 #define AWT_NOTIFY_ALL_IMPL() \
 101     (*env)->CallStaticVoidMethod(env, tkClass, awtNotifyAllMID)
 102 
 103 /*
 104  * Unfortunately AWT_LOCK debugging does not work with XAWT due to mixed
 105  * Java/C use of AWT lock.
 106  */
 107 #define AWT_LOCK()           AWT_LOCK_IMPL()
 108 #define AWT_NOFLUSH_UNLOCK() AWT_NOFLUSH_UNLOCK_IMPL()
 109 #define AWT_WAIT(tm)         AWT_WAIT_IMPL(tm)
 110 #define AWT_NOTIFY()         AWT_NOTIFY_IMPL()
 111 #define AWT_NOTIFY_ALL()     AWT_NOTIFY_ALL_IMPL()
 112 
 113 #if !defined(HEADLESS) && !defined(MACOSX)
 114 extern Display         *awt_display; /* awt_GraphicsEnv.c */
 115 extern Boolean          awt_ModLockIsShiftLock; /* XToolkit.c */
 116 #endif /* !HEADLESS && !MACOSX */
 117 
 118 #endif /* ! _AWT_ */