src/solaris/native/sun/xawt/XToolkit.c

Print this page




 145  */
 146 JNIEXPORT void JNICALL Java_sun_awt_X11_XToolkit_nativeLoadSystemColors
 147   (JNIEnv *env, jobject this, jintArray systemColors)
 148 {
 149     AwtGraphicsConfigDataPtr defaultConfig =
 150         getDefaultConfig(DefaultScreen(awt_display));
 151     awtJNI_CreateColorData(env, defaultConfig, 1);
 152 }
 153 
 154 JNIEXPORT void JNICALL
 155 Java_java_awt_Component_initIDs
 156   (JNIEnv *env, jclass cls)
 157 {
 158     jclass keyclass = NULL;
 159 
 160 
 161     componentIDs.x = (*env)->GetFieldID(env, cls, "x", "I");
 162     componentIDs.y = (*env)->GetFieldID(env, cls, "y", "I");
 163     componentIDs.width = (*env)->GetFieldID(env, cls, "width", "I");
 164     componentIDs.height = (*env)->GetFieldID(env, cls, "height", "I");
 165     componentIDs.isPacked = (*env)->GetFieldID(env, cls, "isPacked", "Z");
 166     componentIDs.peer =
 167       (*env)->GetFieldID(env, cls, "peer", "Ljava/awt/peer/ComponentPeer;");
 168     componentIDs.background =
 169       (*env)->GetFieldID(env, cls, "background", "Ljava/awt/Color;");
 170     componentIDs.foreground =
 171       (*env)->GetFieldID(env, cls, "foreground", "Ljava/awt/Color;");
 172     componentIDs.graphicsConfig =
 173         (*env)->GetFieldID(env, cls, "graphicsConfig",
 174                            "Ljava/awt/GraphicsConfiguration;");
 175     componentIDs.name =
 176       (*env)->GetFieldID(env, cls, "name", "Ljava/lang/String;");
 177 
 178     /* Use _NoClientCode() methods for trusted methods, so that we
 179      *  know that we are not invoking client code on trusted threads
 180      */
 181     componentIDs.getParent =
 182       (*env)->GetMethodID(env, cls, "getParent_NoClientCode",
 183                          "()Ljava/awt/Container;");
 184 
 185     componentIDs.getLocationOnScreen =




 145  */
 146 JNIEXPORT void JNICALL Java_sun_awt_X11_XToolkit_nativeLoadSystemColors
 147   (JNIEnv *env, jobject this, jintArray systemColors)
 148 {
 149     AwtGraphicsConfigDataPtr defaultConfig =
 150         getDefaultConfig(DefaultScreen(awt_display));
 151     awtJNI_CreateColorData(env, defaultConfig, 1);
 152 }
 153 
 154 JNIEXPORT void JNICALL
 155 Java_java_awt_Component_initIDs
 156   (JNIEnv *env, jclass cls)
 157 {
 158     jclass keyclass = NULL;
 159 
 160 
 161     componentIDs.x = (*env)->GetFieldID(env, cls, "x", "I");
 162     componentIDs.y = (*env)->GetFieldID(env, cls, "y", "I");
 163     componentIDs.width = (*env)->GetFieldID(env, cls, "width", "I");
 164     componentIDs.height = (*env)->GetFieldID(env, cls, "height", "I");

 165     componentIDs.peer =
 166       (*env)->GetFieldID(env, cls, "peer", "Ljava/awt/peer/ComponentPeer;");
 167     componentIDs.background =
 168       (*env)->GetFieldID(env, cls, "background", "Ljava/awt/Color;");
 169     componentIDs.foreground =
 170       (*env)->GetFieldID(env, cls, "foreground", "Ljava/awt/Color;");
 171     componentIDs.graphicsConfig =
 172         (*env)->GetFieldID(env, cls, "graphicsConfig",
 173                            "Ljava/awt/GraphicsConfiguration;");
 174     componentIDs.name =
 175       (*env)->GetFieldID(env, cls, "name", "Ljava/lang/String;");
 176 
 177     /* Use _NoClientCode() methods for trusted methods, so that we
 178      *  know that we are not invoking client code on trusted threads
 179      */
 180     componentIDs.getParent =
 181       (*env)->GetMethodID(env, cls, "getParent_NoClientCode",
 182                          "()Ljava/awt/Container;");
 183 
 184     componentIDs.getLocationOnScreen =