blob: 246cadcdf4938c85f86e8b03b0a9e1644917ab9c [file] [log] [blame]
J. Duke319a3b92007-12-01 00:00:00 +00001/*
2 * Copyright 2003-2004 Sun Microsystems, Inc. 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. Sun designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
22 * CA 95054 USA or visit www.sun.com if you need additional information or
23 * have any 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; (used in XAWT only)
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 * Widget widget; (used in MAWT only)
47 * For onscreen windows, we maintain a reference to that window's associated
48 * Widget handle here. Offscreen surfaces have no associated Widget, so for
49 * those surfaces, this value will simply be zero.
50 *
51 * Drawable xdrawable;
52 * If a GLXDrawable has a corresponding X11 Drawable, it is stored here. For
53 * example, each GLXWindow has an associated Window and each GLXPixmap has an
54 * associated Pixmap. GLXPbuffers have no associated X11 Drawable (they are
55 * pure OpenGL surfaces), so for pbuffers, this field is set to zero;
56 *
57 * GLXDrawable drawable;
58 * The native handle to the GLXDrawable at the core of this surface. A
59 * GLXDrawable can be a Window, GLXWindow, GLXPixmap, or GLXPbuffer.
60 *
61 * AwtGraphicsConfigData *configData;
62 * A pointer to the AwtGraphicsConfigData under which this surface was
63 * created.
64 */
65typedef struct _GLXSDOps {
66#ifdef XAWT
67 Window window;
68#else
69 Widget widget;
70#endif
71 Drawable xdrawable;
72 GLXDrawable drawable;
73 struct _AwtGraphicsConfigData *configData;
74} GLXSDOps;
75
76#endif /* HEADLESS */
77
78#endif /* GLXSurfaceData_h_Included */