62 #ifdef PRINT 63 #undef PRINT 64 #endif 65 #ifdef PRINT2 66 #undef PRINT2 67 #endif 68 69 #define PRINT if (tracing) printf 70 #define PRINT2 if (tracing > 1) printf 71 72 73 struct ComponentIDs componentIDs; 74 75 struct MenuComponentIDs menuComponentIDs; 76 77 #ifndef HEADLESS 78 79 extern Display* awt_init_Display(JNIEnv *env, jobject this); 80 extern void freeNativeStringArray(char **array, jsize length); 81 extern char** stringArrayToNative(JNIEnv *env, jobjectArray array, jsize * ret_length); 82 83 struct XFontPeerIDs xFontPeerIDs; 84 85 JNIEXPORT void JNICALL 86 Java_sun_awt_X11_XFontPeer_initIDs 87 (JNIEnv *env, jclass cls) 88 { 89 xFontPeerIDs.xfsname = 90 (*env)->GetFieldID(env, cls, "xfsname", "Ljava/lang/String;"); 91 } 92 #endif /* !HEADLESS */ 93 94 /* This function gets called from the static initializer for FileDialog.java 95 to initialize the fieldIDs for fields that may be accessed from C */ 96 97 JNIEXPORT void JNICALL 98 Java_java_awt_FileDialog_initIDs 99 (JNIEnv *env, jclass cls) 100 { 101 102 } 103 104 JNIEXPORT void JNICALL 105 Java_sun_awt_X11_XToolkit_initIDs 106 (JNIEnv *env, jclass clazz) 107 { 108 jfieldID fid = (*env)->GetStaticFieldID(env, clazz, "numLockMask", "I"); 109 CHECK_NULL(fid); 110 awt_NumLockMask = (*env)->GetStaticIntField(env, clazz, fid); 111 DTRACE_PRINTLN1("awt_NumLockMask = %u", awt_NumLockMask); | 62 #ifdef PRINT 63 #undef PRINT 64 #endif 65 #ifdef PRINT2 66 #undef PRINT2 67 #endif 68 69 #define PRINT if (tracing) printf 70 #define PRINT2 if (tracing > 1) printf 71 72 73 struct ComponentIDs componentIDs; 74 75 struct MenuComponentIDs menuComponentIDs; 76 77 #ifndef HEADLESS 78 79 extern Display* awt_init_Display(JNIEnv *env, jobject this); 80 extern void freeNativeStringArray(char **array, jsize length); 81 extern char** stringArrayToNative(JNIEnv *env, jobjectArray array, jsize * ret_length); 82 #endif /* !HEADLESS */ 83 84 /* This function gets called from the static initializer for FileDialog.java 85 to initialize the fieldIDs for fields that may be accessed from C */ 86 87 JNIEXPORT void JNICALL 88 Java_java_awt_FileDialog_initIDs 89 (JNIEnv *env, jclass cls) 90 { 91 92 } 93 94 JNIEXPORT void JNICALL 95 Java_sun_awt_X11_XToolkit_initIDs 96 (JNIEnv *env, jclass clazz) 97 { 98 jfieldID fid = (*env)->GetStaticFieldID(env, clazz, "numLockMask", "I"); 99 CHECK_NULL(fid); 100 awt_NumLockMask = (*env)->GetStaticIntField(env, clazz, fid); 101 DTRACE_PRINTLN1("awt_NumLockMask = %u", awt_NumLockMask); |