67 return result;
68 }
69 #define XLoadQueryFont XLoadQueryFontX
70 #endif
71 #endif /* !HEADLESS */
72
73 /*
74 * Class: java_awt_Font
75 * Method: initIDs
76 * Signature: ()V
77 */
78
79 /* This function gets called from the static initializer for Font.java
80 to initialize the fieldIDs for fields that may be accessed from C */
81
82 JNIEXPORT void JNICALL
83 Java_java_awt_Font_initIDs
84 (JNIEnv *env, jclass cls)
85 {
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"));
90 CHECK_NULL(fontIDs.style = (*env)->GetFieldID(env, cls, "style", "I"));
91 CHECK_NULL(fontIDs.size = (*env)->GetFieldID(env, cls, "size", "I"));
92 CHECK_NULL(fontIDs.getPeer = (*env)->GetMethodID(env, cls, "getPeer_NoClientCode",
93 "()Ljava/awt/peer/FontPeer;"));
94 CHECK_NULL(fontIDs.getFamily = (*env)->GetMethodID(env, cls, "getFamily_NoClientCode",
95 "()Ljava/lang/String;"));
96 #endif /* !HEADLESS */
97 }
98
99 #ifndef HEADLESS
100 /* fieldIDs for FontDescriptor fields that may be accessed from C */
101 static struct FontDescriptorIDs {
102 jfieldID nativeName;
103 jfieldID charsetName;
104 } fontDescriptorIDs;
105 #endif /* !HEADLESS */
106
107 /*
108 * Class: sun_awt_FontDescriptor
109 * Method: initIDs
110 * Signature: ()V
111 */
112
|
67 return result;
68 }
69 #define XLoadQueryFont XLoadQueryFontX
70 #endif
71 #endif /* !HEADLESS */
72
73 /*
74 * Class: java_awt_Font
75 * Method: initIDs
76 * Signature: ()V
77 */
78
79 /* This function gets called from the static initializer for Font.java
80 to initialize the fieldIDs for fields that may be accessed from C */
81
82 JNIEXPORT void JNICALL
83 Java_java_awt_Font_initIDs
84 (JNIEnv *env, jclass cls)
85 {
86 #ifndef HEADLESS
87 CHECK_NULL(fontIDs.pData = (*env)->GetFieldID(env, cls, "pData", "J"));
88 CHECK_NULL(fontIDs.style = (*env)->GetFieldID(env, cls, "style", "I"));
89 CHECK_NULL(fontIDs.size = (*env)->GetFieldID(env, cls, "size", "I"));
90 CHECK_NULL(fontIDs.getPeer = (*env)->GetMethodID(env, cls, "getPeer",
91 "()Ljava/awt/peer/FontPeer;"));
92 CHECK_NULL(fontIDs.getFamily = (*env)->GetMethodID(env, cls, "getFamily_NoClientCode",
93 "()Ljava/lang/String;"));
94 #endif /* !HEADLESS */
95 }
96
97 #ifndef HEADLESS
98 /* fieldIDs for FontDescriptor fields that may be accessed from C */
99 static struct FontDescriptorIDs {
100 jfieldID nativeName;
101 jfieldID charsetName;
102 } fontDescriptorIDs;
103 #endif /* !HEADLESS */
104
105 /*
106 * Class: sun_awt_FontDescriptor
107 * Method: initIDs
108 * Signature: ()V
109 */
110
|