Package quicktime.qd

Source Code of quicktime.qd.GDevice

/*     */ package quicktime.qd;
/*     */
/*     */ import java.security.AccessController;
/*     */ import java.security.AllPermission;
/*     */ import quicktime.QTObject;
/*     */ import quicktime.QTSession;
/*     */ import quicktime.std.StdQTException;
/*     */ import quicktime.std.sg.SequenceGrabber;
/*     */ import quicktime.util.QTHandleRef;
/*     */ import quicktime.util.QTUtils;
/*     */
/*     */ public final class GDevice extends QTHandleRef
/*     */ {
/*  29 */   private static boolean apriori = QTSession.apriori();
/*     */   private static final int singleDevicesBit = 0;
/*     */   private static final int dontMatchSeedsBit = 1;
/*     */   private static final int allDevicesBit = 2;
/*     */
/*     */   public static GDevice fromSequenceGrabber(SequenceGrabber paramSequenceGrabber)
/*     */     throws StdQTException
/*     */   {
/*  70 */     if (QTSession.hasSecurityRestrictions()) {
/*  71 */       AccessController.checkPermission(new AllPermission());
/*     */     }
/*     */
/*  74 */     int[] arrayOfInt1 = new int[1];
/*  75 */     int[] arrayOfInt2 = new int[1];
/*  76 */     int i = SGGetGWorld(QTObject.ID(paramSequenceGrabber), arrayOfInt1, arrayOfInt2);
/*  77 */     StdQTException.checkError(i);
/*  78 */     return new GDevice(arrayOfInt2[0]);
/*     */   }
/*     */
/*     */   private GDevice(int paramInt)
/*     */   {
/*  98 */     super(paramInt, new Object(), false);
/*     */   }
/*     */
/*     */   public static GDevice get()
/*     */   {
/* 109 */     if (QTSession.hasSecurityRestrictions()) {
/* 110 */       AccessController.checkPermission(new AllPermission());
/*     */     }
/*     */
/* 113 */     int i = GetGDevice();
/* 114 */     return new GDevice(i);
/*     */   }
/*     */
/*     */   public static GDevice getList()
/*     */   {
/* 126 */     if (QTSession.hasSecurityRestrictions()) {
/* 127 */       AccessController.checkPermission(new AllPermission());
/*     */     }
/*     */
/* 130 */     int i = GetDeviceList();
/* 131 */     return new GDevice(i);
/*     */   }
/*     */
/*     */   public static GDevice getMain()
/*     */   {
/* 143 */     if (QTSession.hasSecurityRestrictions()) {
/* 144 */       AccessController.checkPermission(new AllPermission());
/*     */     }
/*     */
/* 147 */     int i = GetMainDevice();
/* 148 */     return new GDevice(i);
/*     */   }
/*     */
/*     */   public static GDevice getMax(QDRect paramQDRect)
/*     */   {
/* 162 */     if (QTSession.hasSecurityRestrictions()) {
/* 163 */       AccessController.checkPermission(new AllPermission());
/*     */     }
/*     */
/* 166 */     int i = GetMaxDevice(paramQDRect.getRect());
/* 167 */     return new GDevice(i);
/*     */   }
/*     */
/*     */   public void init(int paramInt1, int paramInt2)
/*     */   {
/* 183 */     InitGDevice((short)paramInt1, paramInt2, _ID());
/*     */   }
/*     */
/*     */   public void setAttribute(int paramInt, boolean paramBoolean)
/*     */   {
/* 196 */     SetDeviceAttribute(_ID(), (short)paramInt, (byte)(paramBoolean ? 1 : 0));
/*     */   }
/*     */
/*     */   public void set()
/*     */   {
/* 208 */     SetGDevice(_ID());
/*     */   }
/*     */
/*     */   public GDevice getNext()
/*     */   {
/* 219 */     int i = GetNextDevice(_ID());
/* 220 */     return i == 0 ? null : new GDevice(i);
/*     */   }
/*     */
/*     */   public boolean testAttribute(int paramInt)
/*     */   {
/* 233 */     int i = TestDeviceAttribute(_ID(), (short)paramInt);
/* 234 */     return i != 0;
/*     */   }
/*     */
/*     */   public PixMap getPixMap()
/*     */   {
/* 242 */     return PixMap.fromGDevice(this);
/*     */   }
/*     */
/*     */   public QDRect getBounds()
/*     */   {
/* 250 */     byte[] arrayOfByte = new byte[8];
/* 251 */     getBytesAt(34, 8, arrayOfByte, 0);
/* 252 */     return QDRect.fromArray(arrayOfByte, 8);
/*     */   }
/*     */
/*     */   public float hasScale(int paramInt, float paramFloat)
/*     */     throws StdQTException
/*     */   {
/* 264 */     int[] arrayOfInt = { QTUtils.X2Fix(paramFloat) };
/* 265 */     StdQTException.checkError(GDHasScale(_ID(), (short)paramInt, arrayOfInt));
/* 266 */     return QTUtils.Fix2X(arrayOfInt[0]);
/*     */   }
/*     */
/*     */   public float getScale()
/*     */     throws StdQTException
/*     */   {
/* 275 */     int[] arrayOfInt = { 0 };
/* 276 */     short[] arrayOfShort = { 0 };
/* 277 */     StdQTException.checkError(GDGetScale(_ID(), arrayOfInt, arrayOfShort));
/* 278 */     return QTUtils.Fix2X(arrayOfInt[0]);
/*     */   }
/*     */
/*     */   public int getFlags()
/*     */     throws StdQTException
/*     */   {
/* 287 */     int[] arrayOfInt = { 0 };
/* 288 */     short[] arrayOfShort = { 0 };
/* 289 */     StdQTException.checkError(GDGetScale(_ID(), arrayOfInt, arrayOfShort));
/* 290 */     return arrayOfShort[0];
/*     */   }
/*     */
/*     */   public void setScale(int paramInt1, int paramInt2)
/*     */     throws StdQTException
/*     */   {
/* 300 */     StdQTException.checkError(GDSetScale(_ID(), QTUtils.X2Fix(paramInt1), (short)paramInt2));
/*     */   }
/*     */
/*     */   private static native int SGGetGWorld(int paramInt, int[] paramArrayOfInt1, int[] paramArrayOfInt2);
/*     */
/*     */   private static native int GetGDevice();
/*     */
/*     */   private static native int GetDeviceList();
/*     */
/*     */   private static native int GetMainDevice();
/*     */
/*     */   private static native int GetMaxDevice(byte[] paramArrayOfByte);
/*     */
/*     */   private static native void InitGDevice(short paramShort, int paramInt1, int paramInt2);
/*     */
/*     */   private static native void SetDeviceAttribute(int paramInt, short paramShort, byte paramByte);
/*     */
/*     */   private static native void SetGDevice(int paramInt);
/*     */
/*     */   private static native int GetNextDevice(int paramInt);
/*     */
/*     */   private static native int TestDeviceAttribute(int paramInt, short paramShort);
/*     */
/*     */   private static native short GDHasScale(int paramInt, short paramShort, int[] paramArrayOfInt);
/*     */
/*     */   private static native short GDGetScale(int paramInt, int[] paramArrayOfInt, short[] paramArrayOfShort);
/*     */
/*     */   private static native short GDSetScale(int paramInt1, int paramInt2, short paramShort);
/*     */ }

/* Location:           Z:\System\Library\Java\Extensions\QTJava.zip
* Qualified Name:     quicktime.qd.GDevice
* JD-Core Version:    0.6.2
*/
TOP

Related Classes of quicktime.qd.GDevice

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.