home *** CD-ROM | disk | FTP | other *** search
- package sun.awt.windows;
-
- import java.awt.Component;
- import java.awt.Rectangle;
- import java.awt.Shape;
- import java.awt.image.ColorModel;
- import sun.awt.DrawingSurfaceInfo;
- import sun.awt.PhysicalDrawingSurface;
- import sun.awt.Win32DrawingSurface;
- import sun.awt.image.ImageRepresentation;
-
- public class WDrawingSurfaceInfo implements DrawingSurfaceInfo, Win32DrawingSurface {
- private int pData;
- int state;
- // $FF: renamed from: w int
- int field_0;
- // $FF: renamed from: h int
- int field_1;
- WComponentPeer peer;
- ImageRepresentation imgrep;
-
- WDrawingSurfaceInfo(WComponentPeer var1) {
- this.peer = var1;
- }
-
- WDrawingSurfaceInfo(ImageRepresentation var1) {
- this.imgrep = var1;
- }
-
- public native int lock();
-
- public native void unlock();
-
- public Rectangle getBounds() {
- Rectangle var1;
- if (this.peer != null) {
- var1 = ((Component)this.peer.target).getBounds();
- var1.setLocation(0, 0);
- } else {
- var1 = new Rectangle(0, 0, this.imgrep.width, this.imgrep.height);
- }
-
- return var1;
- }
-
- public PhysicalDrawingSurface getSurface() {
- return this;
- }
-
- public Shape getClip() {
- return this.getBounds();
- }
-
- public native int getHWnd();
-
- public native int getHBitmap();
-
- public native int getPBits();
-
- public native int getHDC();
-
- public native int getDepth();
-
- public native int getHPalette();
-
- public ColorModel getColorModel() {
- return WToolkit.getStaticColorModel();
- }
- }
-