1 | /* |
2 | * Copyright (c) 2003, 2011, 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 |
23 | * questions. |
24 | */ |
25 | |
26 | #ifndef GLXSurfaceData_h_Included |
27 | #define GLXSurfaceData_h_Included |
28 | |
29 | #include "J2D_GL/glx.h" |
30 | #include "awt_p.h" |
31 | #include "OGLSurfaceData.h" |
32 | |
33 | #ifdef HEADLESS |
34 | #define GLXSDOps void |
35 | #else /* HEADLESS */ |
36 | |
37 | /** |
38 | * The GLXSDOps structure contains the GLX-specific information for a given |
39 | * OGLSurfaceData. It is referenced by the native OGLSDOps structure. |
40 | * |
41 | * Window window; |
42 | * For onscreen windows, we maintain a reference to that window's associated |
43 | * XWindow handle here. Offscreen surfaces have no associated Window, so for |
44 | * those surfaces, this value will simply be zero. |
45 | * |
46 | * Drawable xdrawable; |
47 | * If a GLXDrawable has a corresponding X11 Drawable, it is stored here. For |
48 | * example, each GLXWindow has an associated Window and each GLXPixmap has an |
49 | * associated Pixmap. GLXPbuffers have no associated X11 Drawable (they are |
50 | * pure OpenGL surfaces), so for pbuffers, this field is set to zero; |
51 | * |
52 | * GLXDrawable drawable; |
53 | * The native handle to the GLXDrawable at the core of this surface. A |
54 | * GLXDrawable can be a Window, GLXWindow, GLXPixmap, or GLXPbuffer. |
55 | * |
56 | * AwtGraphicsConfigData *configData; |
57 | * A pointer to the AwtGraphicsConfigData under which this surface was |
58 | * created. |
59 | */ |
60 | typedef struct _GLXSDOps { |
61 | Window window; |
62 | Drawable xdrawable; |
63 | GLXDrawable drawable; |
64 | struct _AwtGraphicsConfigData *configData; |
65 | } GLXSDOps; |
66 | |
67 | #endif /* HEADLESS */ |
68 | |
69 | #endif /* GLXSurfaceData_h_Included */ |
70 | |