82 JNIEXPORT void JNICALL |
82 JNIEXPORT void JNICALL |
83 Java_java_awt_Font_initIDs |
83 Java_java_awt_Font_initIDs |
84 (JNIEnv *env, jclass cls) |
84 (JNIEnv *env, jclass cls) |
85 { |
85 { |
86 #ifndef HEADLESS |
86 #ifndef HEADLESS |
87 /** We call "NoClientCode" methods because they won't invoke client |
|
88 code on the privileged toolkit thread **/ |
|
89 CHECK_NULL(fontIDs.pData = (*env)->GetFieldID(env, cls, "pData", "J")); |
87 CHECK_NULL(fontIDs.pData = (*env)->GetFieldID(env, cls, "pData", "J")); |
90 CHECK_NULL(fontIDs.style = (*env)->GetFieldID(env, cls, "style", "I")); |
88 CHECK_NULL(fontIDs.style = (*env)->GetFieldID(env, cls, "style", "I")); |
91 CHECK_NULL(fontIDs.size = (*env)->GetFieldID(env, cls, "size", "I")); |
89 CHECK_NULL(fontIDs.size = (*env)->GetFieldID(env, cls, "size", "I")); |
92 CHECK_NULL(fontIDs.getPeer = (*env)->GetMethodID(env, cls, "getPeer_NoClientCode", |
90 CHECK_NULL(fontIDs.getPeer = (*env)->GetMethodID(env, cls, "getFontPeer", |
93 "()Ljava/awt/peer/FontPeer;")); |
91 "()Ljava/awt/peer/FontPeer;")); |
94 CHECK_NULL(fontIDs.getFamily = (*env)->GetMethodID(env, cls, "getFamily_NoClientCode", |
92 CHECK_NULL(fontIDs.getFamily = (*env)->GetMethodID(env, cls, "getFamily_NoClientCode", |
95 "()Ljava/lang/String;")); |
93 "()Ljava/lang/String;")); |
96 #endif /* !HEADLESS */ |
94 #endif /* !HEADLESS */ |
97 } |
95 } |