< prev index next >

src/java.desktop/unix/native/common/awt/awt_p.h

Print this page


   1 /*
   2  * Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  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


  77     ColorData      *color_data;
  78     struct _GLXGraphicsConfigInfo *glxInfo;
  79     int         isTranslucencySupported; /* Uses Xrender to find this out. */
  80     XRenderPictFormat renderPictFormat; /*Used only if translucency supported*/
  81 } AwtGraphicsConfigData;
  82 
  83 typedef AwtGraphicsConfigData* AwtGraphicsConfigDataPtr;
  84 
  85 typedef struct _AwtScreenData {
  86     int numConfigs;
  87     Window root;
  88     unsigned long whitepixel;
  89     unsigned long blackpixel;
  90     AwtGraphicsConfigDataPtr defaultConfig;
  91     AwtGraphicsConfigDataPtr *configs;
  92 } AwtScreenData;
  93 
  94 typedef AwtScreenData* AwtScreenDataPtr;
  95 
  96 extern AwtGraphicsConfigDataPtr getDefaultConfig(int screen);
  97 extern AwtScreenDataPtr getScreenData(int screen);
  98 #endif /* !HEADLESS */
  99 
 100 /* allocated and initialize a structure */
 101 #define ZALLOC(T)       ((struct T *)calloc(1, sizeof(struct T)))
 102 
 103 #ifndef HEADLESS
 104 
 105 extern int awt_allocate_colors(AwtGraphicsConfigDataPtr);
 106 extern void awt_allocate_systemrgbcolors(jint *, int, AwtGraphicsConfigDataPtr);
 107 
 108 extern int awtJNI_GetColorForVis (JNIEnv *, jobject, AwtGraphicsConfigDataPtr);
 109 extern jobject awtJNI_GetColorModel(JNIEnv *, AwtGraphicsConfigDataPtr);
 110 extern void awtJNI_CreateColorData (JNIEnv *, AwtGraphicsConfigDataPtr, int lock);
 111 
 112 #endif /* !HEADLESS */
 113 #endif           /* _AWT_P_H_ */
   1 /*
   2  * Copyright (c) 1995, 2020, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  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


  77     ColorData      *color_data;
  78     struct _GLXGraphicsConfigInfo *glxInfo;
  79     int         isTranslucencySupported; /* Uses Xrender to find this out. */
  80     XRenderPictFormat renderPictFormat; /*Used only if translucency supported*/
  81 } AwtGraphicsConfigData;
  82 
  83 typedef AwtGraphicsConfigData* AwtGraphicsConfigDataPtr;
  84 
  85 typedef struct _AwtScreenData {
  86     int numConfigs;
  87     Window root;
  88     unsigned long whitepixel;
  89     unsigned long blackpixel;
  90     AwtGraphicsConfigDataPtr defaultConfig;
  91     AwtGraphicsConfigDataPtr *configs;
  92 } AwtScreenData;
  93 
  94 typedef AwtScreenData* AwtScreenDataPtr;
  95 
  96 extern AwtGraphicsConfigDataPtr getDefaultConfig(int screen);

  97 #endif /* !HEADLESS */
  98 
  99 /* allocated and initialize a structure */
 100 #define ZALLOC(T)       ((struct T *)calloc(1, sizeof(struct T)))
 101 
 102 #ifndef HEADLESS
 103 
 104 extern int awt_allocate_colors(AwtGraphicsConfigDataPtr);
 105 extern void awt_allocate_systemrgbcolors(jint *, int, AwtGraphicsConfigDataPtr);
 106 
 107 extern int awtJNI_GetColorForVis (JNIEnv *, jobject, AwtGraphicsConfigDataPtr);
 108 extern jobject awtJNI_GetColorModel(JNIEnv *, AwtGraphicsConfigDataPtr);
 109 extern void awtJNI_CreateColorData (JNIEnv *, AwtGraphicsConfigDataPtr, int lock);
 110 
 111 #endif /* !HEADLESS */
 112 #endif           /* _AWT_P_H_ */
< prev index next >