01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: /**
18: * @author Igor V. Stolyarov
19: * @version $Revision$
20: * Created on 10.01.2006
21: *
22: */package org.apache.harmony.awt.gl.windows;
23:
24: import java.awt.image.ColorModel;
25: import java.awt.image.WritableRaster;
26:
27: import org.apache.harmony.awt.gl.Surface;
28:
29: /**
30: * This class represent Window Surface and Surface for WinVolatileImages.
31: * Used conjointly with GDIBlitter.
32: */
33:
34: public class GDISurface extends Surface {
35:
36: public GDISurface(long gi) {
37: surfaceDataPtr = createSurfData(gi);
38: }
39:
40: @Override
41: public void dispose() {
42: if (surfaceDataPtr == 0) {
43: return;
44: }
45:
46: dispose(surfaceDataPtr);
47: surfaceDataPtr = 0;
48: }
49:
50: @Override
51: public long lock() {
52: return 0;
53: }
54:
55: @Override
56: public void unlock() {
57:
58: }
59:
60: private native long createSurfData(long gi);
61:
62: private native void dispose(long structPtr);
63:
64: @Override
65: public ColorModel getColorModel() {
66: return null;
67: }
68:
69: @Override
70: public WritableRaster getRaster() {
71: return null;
72: }
73:
74: @Override
75: public int getSurfaceType() {
76: return 0;
77: }
78:
79: @Override
80: public Surface getImageSurface() {
81: return this;
82: }
83:
84: }
|