01: /*
02: * @(#)X11DrawingSurface.java 1.10 06/10/10
03: *
04: * Copyright 1990-2006 Sun Microsystems, Inc. All Rights Reserved.
05: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
06: *
07: * This program is free software; you can redistribute it and/or
08: * modify it under the terms of the GNU General Public License version
09: * 2 only, as published by the Free Software Foundation.
10: *
11: * This program is distributed in the hope that it will be useful, but
12: * WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * General Public License version 2 for more details (a copy is
15: * included at /legal/license.txt).
16: *
17: * You should have received a copy of the GNU General Public License
18: * version 2 along with this work; if not, write to the Free Software
19: * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20: * 02110-1301 USA
21: *
22: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
23: * Clara, CA 95054 or visit www.sun.com if you need additional
24: * information or have any questions.
25: *
26: */
27:
28: package sun.awt;
29:
30: import sun.awt.PhysicalDrawingSurface;
31: import java.awt.image.ColorModel;
32:
33: /**
34: * The X11DrawingSurface interface defines the methods needed to
35: * be able to render to an X11 window. Only the commonly needed
36: * attributes are returned, other attributes can be queried by
37: * calling the X11 XGetWindowAttributes() function.
38: *
39: * Many of the methods return Java integers which must be cast to the
40: * appropriate Windows data types using a cast similar to the pseudocode
41: * indicated in the class comments of the various methods.
42: *
43: * @version 1.6, 08/19/02
44: * @author Jim Graham
45: */
46: public interface X11DrawingSurface extends PhysicalDrawingSurface {
47: /**
48: * Return the X11 Display pointer for the window or pixmap
49: * represented by this object.
50: * <p>
51: * Display *dpy = (Display *) getDisplay();
52: */
53: public int getDisplay();
54:
55: /**
56: * Return the X11 Drawable ID for the window or pixmap
57: * represented by this object.
58: * <p>
59: * Drawable d = (Drawable) getDrawable();
60: */
61: public int getDrawable();
62:
63: /**
64: * Return the depth of the window or pixmap
65: * represented by this object.
66: * <p>
67: * int depth = getDepth();
68: */
69: public int getDepth();
70:
71: /**
72: * Return the X11 Visual ID of the window or pixmap
73: * represented by this object.
74: * <p>
75: * VisualID vid = (VisualID) getVisualID();
76: */
77: public int getVisualID();
78:
79: /**
80: * Return the X11 Colormap ID of the window or pixmap
81: * represented by this object.
82: * <p>
83: * Colormap cmapid = (Colormap) getColormapID();
84: */
85: public int getColormapID();
86:
87: /**
88: * Return the ColorModel of the window or pixmap
89: * represented by this object.
90: * <p>
91: * Hjava_awt_image_ColorModel *cm =
92: * (Hjava_awt_image_ColorModel *) getColorModel();
93: */
94: public ColorModel getColorModel();
95: }
|