/* */ package quicktime.std.movies;
/* */
/* */ import java.io.PrintStream;
/* */ import java.util.Hashtable;
/* */ import java.util.Vector;
/* */ import quicktime.QTException;
/* */ import quicktime.QTObject;
/* */ import quicktime.QTRuntimeException;
/* */ import quicktime.QTSession;
/* */ import quicktime.jdirect.QTNative;
/* */ import quicktime.qd.ColorTable;
/* */ import quicktime.qd.QDDimension;
/* */ import quicktime.qd.QDException;
/* */ import quicktime.qd.QDGraphics;
/* */ import quicktime.qd.QDPoint;
/* */ import quicktime.qd.QDRect;
/* */ import quicktime.qd.Region;
/* */ import quicktime.std.StdQTException;
/* */ import quicktime.std.clocks.TimeRecord;
/* */ import quicktime.std.comp.Component;
/* */ import quicktime.util.QTUtils;
/* */ import quicktime.util.StringHandle;
/* */
/* */ public class MovieController extends Component
/* */ {
/* 36 */ private static final boolean isMacOS = QTSession.isCurrentOS(1);
/* */
/* 124 */ private static final int[] savedPort = { 0 };
/* 125 */ private static final int[] savedDevice = { 0 };
/* 126 */ private int currentPort = 0;
/* */
/* 167 */ static Hashtable mcHashtable = new Hashtable();
/* */ private static int currentSessionID;
/* 172 */ private Movie movieRef = null;
/* */
/* 174 */ private MoviesDispatcher uppRef = null;
/* */ private int cWidth;
/* */ private int cHeight;
/* */ private long lastFlush;
/* 239 */ private long deltaTime = 50L;
/* 240 */ private long msecs = 0L;
/* 241 */ private boolean debug = false;
/* */
/* */ public MovieController(Movie paramMovie)
/* */ throws QTException
/* */ {
/* 47 */ this(paramMovie, 0);
/* */ }
/* */
/* */ public MovieController(Movie paramMovie, int paramInt)
/* */ throws QTException
/* */ {
/* 59 */ super(allocate(paramMovie, paramInt), null);
/* 60 */ if (QTSession.isCurrentOS(4))
/* 61 */ setDragEnabled(false);
/* 62 */ this.currentPort = QTObject.ID(QDGraphics.scratch);
/* 63 */ SetGWorld(this.currentPort, 0);
/* 64 */ initControllerSize();
/* 65 */ this.movieRef = paramMovie;
/* 66 */ if (currentSessionID != this.sessionAllocated) {
/* 67 */ mcHashtable.clear();
/* 68 */ currentSessionID = this.sessionAllocated;
/* */ }
/* 70 */ Vector localVector = new Vector();
/* 71 */ localVector.addElement(this.movieRef);
/* 72 */ mcHashtable.put(new Integer(_ID()), localVector);
/* */ }
/* */
/* */ public MovieController(int paramInt, Movie paramMovie, QDGraphics paramQDGraphics, QDPoint paramQDPoint)
/* */ throws QTException
/* */ {
/* 85 */ super(1886151033, paramInt);
/* */
/* 87 */ int i = 0;
/* 88 */ if ((!QTSession.isCurrentOS(4)) &&
/* 89 */ (paramQDGraphics == null)) throw new StdQTException(-50);
/* 90 */ synchronized (QTNative.globalsLock) {
/* 91 */ if ((QTSession.isCurrentOS(1)) || (QTSession.isCurrentOS(4)))
/* 92 */ GetGWorld(savedPort, savedDevice);
/* 93 */ this.currentPort = QTObject.ID(paramQDGraphics);
/* 94 */ SetGWorld(this.currentPort, 0);
/* */
/* 96 */ if (QTSession.isCurrentOS(4)) {
/* 97 */ i = MCNewAttachedController(_ID(), QTObject.ID(paramMovie), 0, paramQDPoint.getPoint());
/* */ }
/* */ else
/* */ {
/* 102 */ i = MCNewAttachedController(_ID(), QTObject.ID(paramMovie), QTObject.ID(paramQDGraphics), paramQDPoint.getPoint());
/* */ }
/* */
/* 107 */ if ((QTSession.isCurrentOS(1)) || (QTSession.isCurrentOS(4)))
/* 108 */ SetGWorld(savedPort[0], savedDevice[0]);
/* */ }
/* 110 */ StdQTException.checkError(i);
/* 111 */ initControllerSize();
/* 112 */ if (QTSession.isCurrentOS(4))
/* 113 */ setDragEnabled(false);
/* 114 */ this.movieRef = paramMovie;
/* 115 */ if (currentSessionID != this.sessionAllocated) {
/* 116 */ mcHashtable.clear();
/* 117 */ currentSessionID = this.sessionAllocated;
/* */ }
/* 119 */ ??? = new Vector();
/* 120 */ ((Vector)???).addElement(this.movieRef);
/* 121 */ mcHashtable.put(new Integer(_ID()), ???);
/* */ }
/* */
/* */ private static int allocate(Movie paramMovie, int paramInt)
/* */ throws StdQTException, QDException
/* */ {
/* 129 */ QDRect localQDRect = paramMovie.getBounds();
/* 130 */ int i = 0;
/* */
/* 132 */ synchronized (QTNative.globalsLock) {
/* 133 */ if ((QTSession.isCurrentOS(1)) || (QTSession.isCurrentOS(4)))
/* 134 */ GetGWorld(savedPort, savedDevice);
/* 135 */ i = NewMovieController(QTObject.ID(paramMovie), localQDRect.getRect(), paramInt | 0x1);
/* 136 */ if ((QTSession.isCurrentOS(1)) || (QTSession.isCurrentOS(4))) {
/* 137 */ SetGWorld(savedPort[0], savedDevice[0]);
/* */ }
/* */ }
/* 140 */ StdQTException.checkError(GetMoviesError());
/* */
/* 142 */ return i;
/* */ }
/* */
/* */ MovieController(int paramInt, Object paramObject)
/* */ {
/* 149 */ super(paramInt, paramObject);
/* 150 */ if (paramObject == null)
/* 151 */ throw new QTRuntimeException("Wrong use of Constructor");
/* */ try
/* */ {
/* 154 */ if (QTSession.isCurrentOS(4))
/* 155 */ setDragEnabled(false);
/* */ } catch (QTException localQTException) {
/* 157 */ throw new QTRuntimeException(localQTException.getMessage());
/* */ }
/* */ }
/* */
/* */ protected static final Object mm(int paramInt, Object paramObject)
/* */ {
/* 164 */ return new Movie(paramInt, paramObject);
/* */ }
/* */
/* */ protected void _dispose()
/* */ throws QTException
/* */ {
/* 179 */ Object localObject = mcHashtable.remove(new Integer(_ID()));
/* 180 */ if (localObject != null)
/* 181 */ ((Vector)localObject).removeAllElements();
/* */ }
/* */
/* */ private void initControllerSize() throws StdQTException {
/* 185 */ QDRect localQDRect1 = getMovie().getBounds();
/* 186 */ QDRect localQDRect2 = getBounds();
/* 187 */ this.cWidth = (localQDRect2.getWidth() - localQDRect1.getWidth());
/* 188 */ this.cHeight = (localQDRect2.getHeight() - localQDRect1.getHeight());
/* */ }
/* */
/* */ public final QDDimension getRequiredSize()
/* */ {
/* 198 */ return new QDDimension(this.cWidth, this.cHeight);
/* */ }
/* */
/* */ public final void idle()
/* */ throws QTException
/* */ {
/* 207 */ int i = 0;
/* 208 */ synchronized (QTNative.globalsLock) {
/* 209 */ if (QTSession.isInitialized()) {
/* 210 */ if ((QTSession.isCurrentOS(1)) || (QTSession.isCurrentOS(4))) {
/* 211 */ GetGWorld(savedPort, savedDevice);
/* */ }
/* 213 */ SetGWorld(this.currentPort, 0);
/* */
/* 215 */ QDGraphics localQDGraphics = getPort();
/* 216 */ Region localRegion = localQDGraphics.getVisClipRgn();
/* */
/* 218 */ i = MCIdle(_ID());
/* */
/* 220 */ if ((QTSession.getJavaVersion() == 65539) && (QTSession.isCurrentOS(4))) {
/* 221 */ long l = System.currentTimeMillis();
/* 222 */ if (l - this.lastFlush > this.deltaTime) {
/* 223 */ QDFlushPortBuffer(this.currentPort, QTObject.ID(localRegion));
/* 224 */ this.lastFlush = System.currentTimeMillis();
/* */ }
/* */ }
/* 227 */ if (this.debug) {
/* 228 */ System.out.println("idle:" + (System.currentTimeMillis() - this.msecs) + "msecs");
/* 229 */ this.msecs = System.currentTimeMillis();
/* */ }
/* 231 */ if ((QTSession.isCurrentOS(1)) || (QTSession.isCurrentOS(4)))
/* 232 */ SetGWorld(savedPort[0], savedDevice[0]);
/* */ }
/* */ }
/* 235 */ if (i < 0) StdQTException.checkError(GetMoviesError());
/* */ }
/* */
/* */ public final void setActionFilter(ActionFilter paramActionFilter)
/* */ throws StdQTException
/* */ {
/* 252 */ setActionFilter(paramActionFilter, false);
/* */ }
/* */
/* */ public final void setActionFilter(ActionFilter paramActionFilter, boolean paramBoolean)
/* */ throws StdQTException
/* */ {
/* 264 */ if (paramActionFilter == null) {
/* 265 */ removeActionFilter();
/* 266 */ return;
/* */ }
/* 268 */ if (this.uppRef != null) {
/* 269 */ removeActionFilter();
/* */ }
/* 271 */ this.uppRef = new MoviesDispatcher(this, paramActionFilter, paramBoolean);
/* 272 */ synchronized (QTNative.globalsLock) {
/* 273 */ StdQTException.checkError(MCSetActionFilterWithRefCon(_ID(), this.uppRef.ID(), 0));
/* */ }
/* */ }
/* */
/* */ public final void removeActionFilter()
/* */ throws StdQTException
/* */ {
/* 282 */ if (this.uppRef != null)
/* 283 */ this.uppRef.cleanupMethodClosure();
/* 284 */ this.uppRef = null;
/* 285 */ synchronized (QTNative.globalsLock) {
/* 286 */ StdQTException.checkError(MCSetActionFilterWithRefCon(_ID(), 0, 0));
/* */ }
/* */ }
/* */
/* */ public void setMovie(Movie paramMovie, QDGraphics paramQDGraphics, QDPoint paramQDPoint)
/* */ throws StdQTException
/* */ {
/* 305 */ StdQTException.checkError(MCRemoveMovie(_ID()));
/* 306 */ synchronized (QTNative.globalsLock) {
/* 307 */ if (QTSession.isCurrentOS(4)) {
/* 308 */ StdQTException.checkError(MCSetMovie(_ID(), QTObject.ID(paramMovie), 0, paramQDPoint.getPoint()));
/* */
/* 314 */ setPort(paramQDGraphics);
/* */ }
/* */ else {
/* 317 */ if ((paramMovie != null) &&
/* 318 */ (paramQDGraphics == null)) throw new StdQTException(-50);
/* */
/* 320 */ StdQTException.checkError(MCSetMovie(_ID(), QTObject.ID(paramMovie), QTObject.ID(paramQDGraphics), paramQDPoint.getPoint()));
/* */ }
/* */
/* */ }
/* */
/* 328 */ ??? = mcHashtable.get(new Integer(_ID()));
/* 329 */ if ((this.movieRef != null) && (??? != null)) {
/* 330 */ ((Vector)???).removeElement(this.movieRef);
/* */ }
/* 332 */ this.movieRef = paramMovie;
/* 333 */ if ((this.movieRef != null) && (??? != null))
/* 334 */ ((Vector)???).addElement(this.movieRef);
/* */ }
/* */
/* */ public final Movie getMovie()
/* */ throws StdQTException
/* */ {
/* 344 */ int i = 0;
/* 345 */ synchronized (QTNative.globalsLock) {
/* 346 */ i = MCGetIndMovie(_ID(), (short)0);
/* */ }
/* 348 */ StdQTException.checkError(GetMoviesError());
/* 349 */ return new Movie(i, this);
/* */ }
/* */
/* */ public void removeMovie()
/* */ throws StdQTException
/* */ {
/* 357 */ synchronized (QTNative.globalsLock) {
/* 358 */ StdQTException.checkError(MCRemoveMovie(_ID()));
/* */ }
/* 360 */ this.movieRef = null;
/* 361 */ ??? = mcHashtable.get(new Integer(_ID()));
/* 362 */ if ((this.movieRef != null) && (??? != null))
/* 363 */ ((Vector)???).removeElement(this.movieRef);
/* */ }
/* */
/* */ public final void draw()
/* */ throws StdQTException
/* */ {
/* 375 */ int i = 0;
/* 376 */ synchronized (QTNative.globalsLock) {
/* 377 */ if ((QTSession.isCurrentOS(1)) || (QTSession.isCurrentOS(4))) {
/* 378 */ GetGWorld(savedPort, savedDevice);
/* */ }
/* 380 */ SetGWorld(this.currentPort, 0);
/* */
/* 382 */ if (QTSession.isCurrentOS(4))
/* 383 */ i = MCDraw(_ID(), 0);
/* */ else
/* 385 */ i = MCDraw(_ID(), this.currentPort);
/* 386 */ if ((QTSession.isCurrentOS(1)) || (QTSession.isCurrentOS(4)))
/* 387 */ SetGWorld(savedPort[0], savedDevice[0]);
/* */ }
/* 389 */ StdQTException.checkError(i);
/* */ }
/* */
/* */ public final boolean click(QDPoint paramQDPoint, int paramInt)
/* */ throws StdQTException
/* */ {
/* 400 */ int i = 0;
/* 401 */ synchronized (QTNative.globalsLock) {
/* 402 */ if ((QTSession.isCurrentOS(1)) || (QTSession.isCurrentOS(4)))
/* */ {
/* 404 */ GetGWorld(savedPort, savedDevice);
/* 405 */ SetGWorld(MCGetControllerPort(_ID()), 0);
/* */ }
/* */
/* 409 */ if (QTSession.isCurrentOS(4)) {
/* 410 */ i = MCClick(_ID(), 0, paramQDPoint.getPoint(), TickCount(), QTUtils.convertEventModifier(paramInt));
/* */ }
/* */ else
/* */ {
/* 416 */ i = MCClick(_ID(), this.currentPort, paramQDPoint.getPoint(), TickCount(), QTUtils.convertEventModifier(paramInt));
/* */ }
/* */
/* 422 */ if ((QTSession.isCurrentOS(1)) || (QTSession.isCurrentOS(4)))
/* 423 */ SetGWorld(savedPort[0], savedDevice[0]);
/* */ }
/* 425 */ if (i < 0)
/* 426 */ StdQTException.checkError(i);
/* 427 */ return i == 1;
/* */ }
/* */
/* */ public final boolean key(int paramInt1, int paramInt2)
/* */ throws StdQTException
/* */ {
/* 440 */ int i = 0;
/* 441 */ synchronized (QTNative.globalsLock) {
/* 442 */ if ((QTSession.isCurrentOS(1)) || (QTSession.isCurrentOS(4))) {
/* 443 */ GetGWorld(savedPort, savedDevice);
/* */ }
/* 445 */ SetGWorld(this.currentPort, 0);
/* 446 */ i = MCKey(_ID(), (byte)QTUtils.convertKeyValue(paramInt1), QTUtils.convertEventModifier(paramInt2));
/* */
/* 449 */ if ((QTSession.isCurrentOS(1)) || (QTSession.isCurrentOS(4)))
/* 450 */ SetGWorld(savedPort[0], savedDevice[0]);
/* */ }
/* 452 */ if (i < 0)
/* 453 */ StdQTException.checkError(i);
/* 454 */ return i == 1;
/* */ }
/* */
/* */ private final boolean doAction(short paramShort, int[] paramArrayOfInt)
/* */ throws StdQTException
/* */ {
/* 465 */ int i = 0;
/* 466 */ synchronized (QTNative.globalsLock) {
/* 467 */ i = MCDoAction(_ID(), paramShort, paramArrayOfInt);
/* */ }
/* 469 */ StdQTException.checkError(i);
/* 470 */ return i != 0;
/* */ }
/* */
/* */ private final boolean doAction(short paramShort, int paramInt)
/* */ throws StdQTException
/* */ {
/* 481 */ int i = 0;
/* 482 */ synchronized (QTNative.globalsLock) {
/* 483 */ i = MCDoAction(_ID(), paramShort, paramInt);
/* */ }
/* 485 */ StdQTException.checkError(i);
/* 486 */ return i != 0;
/* */ }
/* */
/* */ private final boolean doAction(short paramShort, short[] paramArrayOfShort)
/* */ throws StdQTException
/* */ {
/* 497 */ int i = 0;
/* 498 */ synchronized (QTNative.globalsLock) {
/* 499 */ i = MCDoAction(_ID(), paramShort, paramArrayOfShort);
/* */ }
/* 501 */ StdQTException.checkError(i);
/* 502 */ return i != 0;
/* */ }
/* */
/* */ private final boolean doAction(short paramShort1, short paramShort2)
/* */ throws StdQTException
/* */ {
/* 513 */ int i = 0;
/* 514 */ synchronized (QTNative.globalsLock) {
/* 515 */ i = MCDoAction(_ID(), paramShort1, paramShort2);
/* */ }
/* 517 */ StdQTException.checkError(i);
/* 518 */ return i != 0;
/* */ }
/* */
/* */ private final boolean doAction(short paramShort, byte[] paramArrayOfByte)
/* */ throws StdQTException
/* */ {
/* 529 */ int i = 0;
/* 530 */ synchronized (QTNative.globalsLock) {
/* 531 */ i = MCDoAction(_ID(), paramShort, paramArrayOfByte);
/* */ }
/* 533 */ StdQTException.checkError(i);
/* 534 */ return i != 0;
/* */ }
/* */
/* */ private final boolean doAction(short paramShort, byte paramByte)
/* */ throws StdQTException
/* */ {
/* 545 */ int i = 0;
/* 546 */ synchronized (QTNative.globalsLock) {
/* 547 */ i = MCDoAction(_ID(), paramShort, paramByte);
/* */ }
/* 549 */ StdQTException.checkError(i);
/* 550 */ return i != 0;
/* */ }
/* */
/* */ public final void activate()
/* */ throws StdQTException
/* */ {
/* 558 */ doAction((short)3, 0);
/* */ }
/* */
/* */ public final void deactivate()
/* */ throws StdQTException
/* */ {
/* 566 */ doAction((short)4, 0);
/* */ }
/* */
/* */ public final void play(float paramFloat)
/* */ throws StdQTException
/* */ {
/* 577 */ doAction((short)8, QTUtils.X2Fix(paramFloat));
/* */ }
/* */
/* */ public final void goToTime(TimeRecord paramTimeRecord)
/* */ throws StdQTException
/* */ {
/* 586 */ doAction((short)12, QTObject.ID(paramTimeRecord));
/* */ }
/* */
/* */ public final void setVolume(float paramFloat)
/* */ throws StdQTException
/* */ {
/* 597 */ doAction((short)14, QTUtils.X2ShortFix(paramFloat));
/* */ }
/* */
/* */ public final float getVolume()
/* */ throws StdQTException
/* */ {
/* 608 */ short[] arrayOfShort = new short[1];
/* 609 */ doAction((short)15, arrayOfShort);
/* 610 */ return QTUtils.ShortFix2X(arrayOfShort[0]);
/* */ }
/* */
/* */ public final void step(int paramInt)
/* */ throws StdQTException
/* */ {
/* 623 */ doAction((short)18, (short)paramInt);
/* */ }
/* */
/* */ public final void setLooping(boolean paramBoolean)
/* */ throws StdQTException
/* */ {
/* 632 */ doAction((short)21, (byte)(paramBoolean ? 1 : 0));
/* */ }
/* */
/* */ public final boolean getLooping()
/* */ throws StdQTException
/* */ {
/* 642 */ byte[] arrayOfByte = new byte[1];
/* 643 */ doAction((short)22, arrayOfByte);
/* 644 */ return arrayOfByte[0] == 1;
/* */ }
/* */
/* */ public final void setLoopIsPalindrome(boolean paramBoolean)
/* */ throws StdQTException
/* */ {
/* 656 */ doAction((short)23, (byte)(paramBoolean ? 1 : 0));
/* */ }
/* */
/* */ public final boolean getLoopIsPalindrome()
/* */ throws StdQTException
/* */ {
/* 668 */ byte[] arrayOfByte = new byte[1];
/* 669 */ doAction((short)22, arrayOfByte);
/* 670 */ return arrayOfByte[0] == 1;
/* */ }
/* */
/* */ public final void setGrowBoxBounds(QDRect paramQDRect)
/* */ throws StdQTException
/* */ {
/* 679 */ doAction((short)25, paramQDRect.getRect());
/* */ }
/* */
/* */ public final void setSelectionBegin(TimeRecord paramTimeRecord)
/* */ throws StdQTException
/* */ {
/* 688 */ doAction((short)29, QTObject.ID(paramTimeRecord));
/* */ }
/* */
/* */ public final void setSelectionDuration(TimeRecord paramTimeRecord)
/* */ throws StdQTException
/* */ {
/* 697 */ doAction((short)30, QTObject.ID(paramTimeRecord));
/* */ }
/* */
/* */ public final void setKeysEnabled(boolean paramBoolean)
/* */ throws StdQTException
/* */ {
/* 707 */ doAction((short)32, (byte)(paramBoolean ? 1 : 0));
/* */ }
/* */
/* */ public final boolean getKeysEnabled()
/* */ throws StdQTException
/* */ {
/* 718 */ byte[] arrayOfByte = new byte[1];
/* 719 */ doAction((short)33, arrayOfByte);
/* 720 */ return arrayOfByte[0] == 1;
/* */ }
/* */
/* */ public final void setPlaySelection(boolean paramBoolean)
/* */ throws StdQTException
/* */ {
/* 730 */ doAction((short)34, (byte)(paramBoolean ? 1 : 0));
/* */ }
/* */
/* */ public final boolean getPlaySelection()
/* */ throws StdQTException
/* */ {
/* 741 */ byte[] arrayOfByte = new byte[1];
/* 742 */ doAction((short)35, arrayOfByte);
/* 743 */ return arrayOfByte[0] == 1;
/* */ }
/* */
/* */ public final void setUseBadge(boolean paramBoolean)
/* */ throws StdQTException
/* */ {
/* 756 */ doAction((short)36, (byte)(paramBoolean ? 1 : 0));
/* */ }
/* */
/* */ public final boolean getUseBadge()
/* */ throws StdQTException
/* */ {
/* 769 */ byte[] arrayOfByte = new byte[1];
/* 770 */ doAction((short)37, arrayOfByte);
/* 771 */ return arrayOfByte[0] == 1;
/* */ }
/* */
/* */ public final void setFlags(int paramInt)
/* */ throws StdQTException
/* */ {
/* 780 */ doAction((short)38, paramInt);
/* */ }
/* */
/* */ public final int getFlags()
/* */ throws StdQTException
/* */ {
/* 789 */ int[] arrayOfInt = new int[1];
/* 790 */ doAction((short)39, arrayOfInt);
/* 791 */ return arrayOfInt[0];
/* */ }
/* */
/* */ public final void setPlayEveryFrame(boolean paramBoolean)
/* */ throws StdQTException
/* */ {
/* 806 */ doAction((short)40, (byte)(paramBoolean ? 1 : 0));
/* */ }
/* */
/* */ public final boolean getPlayEveryFrame()
/* */ throws StdQTException
/* */ {
/* 819 */ byte[] arrayOfByte = new byte[1];
/* 820 */ doAction((short)41, arrayOfByte);
/* 821 */ return arrayOfByte[0] == 1;
/* */ }
/* */
/* */ public final float getPlayRate()
/* */ throws StdQTException
/* */ {
/* 834 */ int[] arrayOfInt = new int[1];
/* 835 */ doAction((short)42, arrayOfInt);
/* 836 */ return QTUtils.Fix2X(arrayOfInt[0]);
/* */ }
/* */
/* */ public final void suspend()
/* */ throws StdQTException
/* */ {
/* 844 */ doAction((short)46, 0);
/* */ }
/* */
/* */ public final void resume()
/* */ throws StdQTException
/* */ {
/* 852 */ doAction((short)47, 0);
/* */ }
/* */
/* */ public final void setControllerKeysEnabled(boolean paramBoolean)
/* */ throws StdQTException
/* */ {
/* 860 */ doAction((short)48, (byte)(paramBoolean ? 1 : 0));
/* */ }
/* */
/* */ public final QDRect getTimeSliderRect()
/* */ throws StdQTException
/* */ {
/* 870 */ QDRect localQDRect = new QDRect();
/* 871 */ doAction((short)49, localQDRect.getRect());
/* 872 */ return localQDRect;
/* */ }
/* */
/* */ public final boolean getDragEnabled()
/* */ throws StdQTException
/* */ {
/* 883 */ byte[] arrayOfByte = new byte[1];
/* 884 */ doAction((short)51, arrayOfByte);
/* 885 */ return arrayOfByte[0] == 1;
/* */ }
/* */
/* */ public final void setDragEnabled(boolean paramBoolean)
/* */ throws StdQTException
/* */ {
/* 894 */ doAction((short)52, (byte)(paramBoolean ? 1 : 0));
/* */ }
/* */
/* */ public final TimeRecord getSelectionBegin()
/* */ throws QTException
/* */ {
/* 903 */ TimeRecord localTimeRecord = new TimeRecord();
/* 904 */ doAction((short)53, QTObject.ID(localTimeRecord));
/* 905 */ return localTimeRecord;
/* */ }
/* */
/* */ public final TimeRecord getSelectionDuration()
/* */ throws QTException
/* */ {
/* 914 */ TimeRecord localTimeRecord = new TimeRecord();
/* 915 */ doAction((short)54, QTObject.ID(localTimeRecord));
/* 916 */ return localTimeRecord;
/* */ }
/* */
/* */ public final void prerollAndPlay(float paramFloat)
/* */ throws StdQTException
/* */ {
/* 926 */ synchronized (QTNative.globalsLock)
/* */ {
/* 928 */ if ((QTSession.isCurrentOS(1)) || (QTSession.isCurrentOS(4))) {
/* 929 */ GetGWorld(savedPort, savedDevice);
/* */ }
/* 931 */ SetGWorld(this.currentPort, 0);
/* 932 */ doAction((short)55, QTUtils.X2Fix(paramFloat));
/* 933 */ if ((QTSession.isCurrentOS(1)) || (QTSession.isCurrentOS(4)))
/* 934 */ SetGWorld(savedPort[0], savedDevice[0]);
/* */ }
/* */ }
/* */
/* */ public final boolean getCursorSettingEnabled()
/* */ throws StdQTException
/* */ {
/* 947 */ int[] arrayOfInt = new int[1];
/* 948 */ doAction((short)56, arrayOfInt);
/* 949 */ return arrayOfInt[0] == 1;
/* */ }
/* */
/* */ public final void setCursorSettingEnabled(boolean paramBoolean)
/* */ throws StdQTException
/* */ {
/* 960 */ doAction((short)57, (byte)(paramBoolean ? 1 : 0));
/* */ }
/* */
/* */ public final void setColorTable(ColorTable paramColorTable)
/* */ throws StdQTException
/* */ {
/* 969 */ doAction((short)58, QTObject.ID(paramColorTable));
/* */ }
/* */
/* */ public final void controllerSizeChanged()
/* */ throws StdQTException
/* */ {
/* 977 */ doAction((short)26, 0);
/* */ }
/* */
/* */ public final void badgeClick(boolean paramBoolean)
/* */ throws StdQTException
/* */ {
/* 986 */ doAction((short)44, (byte)(paramBoolean ? 1 : 0));
/* */ }
/* */
/* */ public final void movieEdited()
/* */ throws StdQTException
/* */ {
/* 994 */ doAction((short)50, 0);
/* */ }
/* */
/* */ public final void forceTimeTableUpdate()
/* */ throws StdQTException
/* */ {
/* 1002 */ doAction((short)61, 0);
/* */ }
/* */
/* */ public final void linkToURL(String paramString)
/* */ throws QTException
/* */ {
/* 1011 */ if (paramString.startsWith("file:")) {
/* 1012 */ localObject = System.getSecurityManager();
/* 1013 */ if (localObject != null) {
/* 1014 */ ((SecurityManager)localObject).checkRead(paramString);
/* */ }
/* */ }
/* 1017 */ Object localObject = new StringHandle(paramString, 1);
/* 1018 */ doAction((short)59, QTObject.ID((QTObject)localObject));
/* */ }
/* */
/* */ public final boolean clickAndHoldPoint(QDPoint paramQDPoint)
/* */ throws StdQTException
/* */ {
/* 1028 */ return doAction((short)67, paramQDPoint.getPoint());
/* */ }
/* */
/* */ public final void setAttached(boolean paramBoolean)
/* */ throws QTException
/* */ {
/* 1037 */ synchronized (QTNative.globalsLock) {
/* 1038 */ int i = MCSetControllerAttached(_ID(), (byte)(paramBoolean ? 1 : 0));
/* 1039 */ StdQTException.checkError(i);
/* */ }
/* */ }
/* */
/* */ public final boolean isAttached()
/* */ throws StdQTException
/* */ {
/* 1050 */ int i = 0;
/* 1051 */ synchronized (QTNative.globalsLock) {
/* 1052 */ i = MCIsControllerAttached(_ID());
/* */ }
/* 1054 */ if (i < 0) StdQTException.checkError(i);
/* 1055 */ return i == 1;
/* */ }
/* */
/* */ public final void setBounds(QDRect paramQDRect)
/* */ throws StdQTException
/* */ {
/* 1069 */ synchronized (QTNative.globalsLock) {
/* 1070 */ StdQTException.checkError(MCSetControllerBoundsRect(_ID(), paramQDRect.getRect()));
/* */ }
/* */ }
/* */
/* */ public final QDRect getBounds()
/* */ throws StdQTException
/* */ {
/* 1087 */ synchronized (QTNative.globalsLock) {
/* 1088 */ QDRect localQDRect = new QDRect();
/* 1089 */ StdQTException.checkError(MCGetControllerBoundsRect(_ID(), localQDRect.getRect()));
/* 1090 */ return localQDRect;
/* */ }
/* */ }
/* */
/* */ public final void setPort(QDGraphics paramQDGraphics)
/* */ throws StdQTException
/* */ {
/* 1106 */ if (paramQDGraphics == null) throw new StdQTException(-50);
/* 1107 */ synchronized (QTNative.globalsLock) {
/* 1108 */ StdQTException.checkError(MCSetControllerPort(_ID(), QTObject.ID(paramQDGraphics)));
/* */ }
/* */
/* 1112 */ this.currentPort = QTObject.ID(paramQDGraphics);
/* */ }
/* */
/* */ public final QDGraphics getPort()
/* */ throws StdQTException
/* */ {
/* 1121 */ synchronized (QTNative.globalsLock) {
/* 1122 */ return QDGraphics.fromMovieController(this);
/* */ }
/* */ }
/* */
/* */ public final void setVisible(boolean paramBoolean)
/* */ throws StdQTException
/* */ {
/* 1134 */ synchronized (QTNative.globalsLock) {
/* 1135 */ StdQTException.checkError(MCSetVisible(_ID(), (byte)(paramBoolean ? 1 : 0)));
/* */ }
/* */ }
/* */
/* */ public final boolean getVisible()
/* */ throws StdQTException
/* */ {
/* 1146 */ int i = 0;
/* 1147 */ synchronized (QTNative.globalsLock) {
/* 1148 */ i = MCGetVisible(_ID());
/* */ }
/* 1150 */ if (i < 0)
/* 1151 */ StdQTException.checkError(i);
/* 1152 */ return i == 1;
/* */ }
/* */
/* */ public final Region getBoundsRgn()
/* */ throws QTException
/* */ {
/* 1162 */ synchronized (QTNative.globalsLock) {
/* 1163 */ return Region.fromMovieControllerBounds(this);
/* */ }
/* */ }
/* */
/* */ public final Region getWindowRgn(QDGraphics paramQDGraphics)
/* */ throws QTException
/* */ {
/* 1175 */ synchronized (QTNative.globalsLock) {
/* 1176 */ return Region.fromMovieControllerWindow(this, paramQDGraphics);
/* */ }
/* */ }
/* */
/* */ public final void movieChanged()
/* */ throws StdQTException
/* */ {
/* 1187 */ synchronized (QTNative.globalsLock) {
/* 1188 */ int i = MCGetIndMovie(_ID(), (short)0);
/* 1189 */ StdQTException.checkError(MCMovieChanged(_ID(), i));
/* */ }
/* */ }
/* */
/* */ public final void setDuration(int paramInt)
/* */ throws StdQTException
/* */ {
/* 1203 */ synchronized (QTNative.globalsLock) {
/* 1204 */ StdQTException.checkError(MCSetDuration(_ID(), paramInt));
/* */ }
/* */ }
/* */
/* */ public final int getCurrentTime()
/* */ throws StdQTException
/* */ {
/* 1216 */ int[] arrayOfInt = new int[1];
/* 1217 */ int i = 0;
/* 1218 */ int j = 0;
/* 1219 */ synchronized (QTNative.globalsLock) {
/* 1220 */ i = MCGetCurrentTime(_ID(), arrayOfInt);
/* */ }
/* 1222 */ StdQTException.checkError(GetMoviesError());
/* 1223 */ return i;
/* */ }
/* */
/* */ public final int getTimeScale()
/* */ throws StdQTException
/* */ {
/* 1232 */ int[] arrayOfInt = new int[1];
/* 1233 */ synchronized (QTNative.globalsLock) {
/* 1234 */ MCGetCurrentTime(_ID(), arrayOfInt);
/* */ }
/* 1236 */ StdQTException.checkError(GetMoviesError());
/* 1237 */ return arrayOfInt[0];
/* */ }
/* */
/* */ public final void activate(QDGraphics paramQDGraphics, boolean paramBoolean)
/* */ throws StdQTException, QDException
/* */ {
/* 1250 */ if ((!QTSession.isCurrentOS(4)) &&
/* 1251 */ (paramQDGraphics == null)) throw new StdQTException(-50);
/* 1252 */ synchronized (QTNative.globalsLock) {
/* 1253 */ int i = MCActivate(_ID(), QTObject.ID(paramQDGraphics), (byte)(paramBoolean ? 1 : 0));
/* 1254 */ StdQTException.checkError(i);
/* */ }
/* */ }
/* */
/* */ public final void enableEditing(boolean paramBoolean)
/* */ throws StdQTException
/* */ {
/* 1265 */ synchronized (QTNative.globalsLock) {
/* 1266 */ StdQTException.checkError(MCEnableEditing(_ID(), (byte)(paramBoolean ? 1 : 0)));
/* */ }
/* */ }
/* */
/* */ public final boolean isEditingEnabled()
/* */ throws StdQTException
/* */ {
/* 1278 */ int i = 0;
/* 1279 */ synchronized (QTNative.globalsLock) {
/* 1280 */ i = MCIsEditingEnabled(_ID());
/* */ }
/* 1282 */ StdQTException.checkError(GetMoviesError());
/* 1283 */ return i == 1;
/* */ }
/* */
/* */ public final Movie copy()
/* */ throws QTException
/* */ {
/* 1294 */ int i = 0;
/* 1295 */ synchronized (QTNative.globalsLock) {
/* 1296 */ i = MCCopy(_ID());
/* */ }
/* 1298 */ StdQTException.checkError(GetMoviesError());
/* 1299 */ return new Movie(i, null);
/* */ }
/* */
/* */ public final Movie cut()
/* */ throws QTException
/* */ {
/* 1310 */ int i = 0;
/* 1311 */ synchronized (QTNative.globalsLock) {
/* 1312 */ i = MCCut(_ID());
/* */ }
/* 1314 */ StdQTException.checkError(GetMoviesError());
/* 1315 */ return new Movie(i, null);
/* */ }
/* */
/* */ public final void paste()
/* */ throws StdQTException
/* */ {
/* 1325 */ paste(null);
/* */ }
/* */
/* */ public final void paste(Movie paramMovie)
/* */ throws StdQTException
/* */ {
/* 1336 */ synchronized (QTNative.globalsLock) {
/* 1337 */ StdQTException.checkError(MCPaste(_ID(), QTObject.ID(paramMovie)));
/* */ }
/* */ }
/* */
/* */ public final void clear()
/* */ throws StdQTException
/* */ {
/* 1349 */ synchronized (QTNative.globalsLock) {
/* 1350 */ StdQTException.checkError(MCClear(_ID()));
/* */ }
/* */ }
/* */
/* */ public final void undo()
/* */ throws StdQTException
/* */ {
/* 1359 */ synchronized (QTNative.globalsLock) {
/* 1360 */ StdQTException.checkError(MCUndo(_ID()));
/* */ }
/* */ }
/* */
/* */ public final void position(QDRect paramQDRect1, QDRect paramQDRect2, int paramInt)
/* */ throws StdQTException
/* */ {
/* 1376 */ synchronized (QTNative.globalsLock) {
/* 1377 */ StdQTException.checkError(MCPositionController(_ID(), paramQDRect1.getRect(), paramQDRect2.getRect(), paramInt));
/* */ }
/* */ }
/* */
/* */ public final void position(QDRect paramQDRect, int paramInt)
/* */ throws StdQTException
/* */ {
/* 1392 */ synchronized (QTNative.globalsLock) {
/* 1393 */ StdQTException.checkError(MCPositionController(_ID(), paramQDRect.getRect(), null, paramInt));
/* */ }
/* */ }
/* */
/* */ public final int getControllerInfo()
/* */ throws StdQTException
/* */ {
/* 1405 */ int[] arrayOfInt = new int[1];
/* 1406 */ synchronized (QTNative.globalsLock) {
/* 1407 */ StdQTException.checkError(MCGetControllerInfo(_ID(), arrayOfInt));
/* */ }
/* 1409 */ return arrayOfInt[0];
/* */ }
/* */
/* */ public final void setClip(Region paramRegion)
/* */ throws StdQTException
/* */ {
/* 1418 */ synchronized (QTNative.globalsLock) {
/* 1419 */ StdQTException.checkError(MCSetClip(_ID(), QTObject.ID(paramRegion), 0));
/* */ }
/* */ }
/* */
/* */ public final Region getClip()
/* */ throws QTException
/* */ {
/* 1431 */ synchronized (QTNative.globalsLock) {
/* 1432 */ return Region.fromMovieControllerClip(this);
/* */ }
/* */ }
/* */
/* */ public final void setMovieClip(Region paramRegion)
/* */ throws StdQTException
/* */ {
/* 1442 */ synchronized (QTNative.globalsLock) {
/* 1443 */ StdQTException.checkError(MCSetClip(_ID(), 0, QTObject.ID(paramRegion)));
/* */ }
/* */ }
/* */
/* */ public final Region drawBadge(Region paramRegion, boolean paramBoolean)
/* */ throws QTException
/* */ {
/* 1456 */ synchronized (QTNative.globalsLock) {
/* 1457 */ return Region.fromMovieControllerBadge(this, paramRegion, paramBoolean);
/* */ }
/* */ }
/* */
/* */ public final boolean inController(QDPoint paramQDPoint)
/* */ throws StdQTException
/* */ {
/* 1467 */ byte[] arrayOfByte = new byte[1];
/* 1468 */ synchronized (QTNative.globalsLock) {
/* 1469 */ StdQTException.checkError(MCPtInController(_ID(), paramQDPoint.getPoint(), arrayOfByte));
/* */ }
/* 1471 */ return arrayOfByte[0] == 1;
/* */ }
/* */
/* */ public final void invalidate(QDGraphics paramQDGraphics, Region paramRegion)
/* */ throws StdQTException, QDException
/* */ {
/* 1481 */ if (paramQDGraphics == null) throw new StdQTException(-50);
/* 1482 */ synchronized (QTNative.globalsLock) {
/* 1483 */ int i = MCInvalidate(_ID(), QTObject.ID(paramQDGraphics), QTObject.ID(paramRegion));
/* 1484 */ StdQTException.checkError(i);
/* */ }
/* */ }
/* */
/* */ private static native void QDFlushPortBuffer(int paramInt1, int paramInt2);
/* */
/* */ private static native int MCNewAttachedController(int paramInt1, int paramInt2, int paramInt3, int paramInt4);
/* */
/* */ private static native int NewMovieController(int paramInt1, byte[] paramArrayOfByte, int paramInt2);
/* */
/* */ private static native short GetMoviesError();
/* */
/* */ private static native int MCIdle(int paramInt);
/* */
/* */ private static native int MCSetActionFilterWithRefCon(int paramInt1, int paramInt2, int paramInt3);
/* */
/* */ private static native int MCRemoveMovie(int paramInt);
/* */
/* */ private static native int MCSetMovie(int paramInt1, int paramInt2, int paramInt3, int paramInt4);
/* */
/* */ private static native int MCGetIndMovie(int paramInt, short paramShort);
/* */
/* */ private static native int MCGetControllerPort(int paramInt);
/* */
/* */ private static native int MCClick(int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5);
/* */
/* */ private static native int TickCount();
/* */
/* */ private static native int MCKey(int paramInt1, byte paramByte, int paramInt2);
/* */
/* */ private static native int MCDoAction(int paramInt, short paramShort, int[] paramArrayOfInt);
/* */
/* */ private static native int MCDoAction(int paramInt1, short paramShort, int paramInt2);
/* */
/* */ private static native int MCDoAction(int paramInt, short paramShort, short[] paramArrayOfShort);
/* */
/* */ private static native int MCDoAction(int paramInt, short paramShort1, short paramShort2);
/* */
/* */ private static native int MCDoAction(int paramInt, short paramShort, byte paramByte);
/* */
/* */ private static native int MCDoAction(int paramInt, short paramShort, byte[] paramArrayOfByte);
/* */
/* */ private static native int MCSetControllerAttached(int paramInt, byte paramByte);
/* */
/* */ private static native int MCIsControllerAttached(int paramInt);
/* */
/* */ private static native int MCSetControllerBoundsRect(int paramInt, byte[] paramArrayOfByte);
/* */
/* */ private static native int MCGetControllerBoundsRect(int paramInt, byte[] paramArrayOfByte);
/* */
/* */ private static native int MCSetControllerPort(int paramInt1, int paramInt2);
/* */
/* */ private static native int MCSetVisible(int paramInt, byte paramByte);
/* */
/* */ private static native int MCGetVisible(int paramInt);
/* */
/* */ private static native int MCMovieChanged(int paramInt1, int paramInt2);
/* */
/* */ private static native int MCSetDuration(int paramInt1, int paramInt2);
/* */
/* */ private static native int MCGetCurrentTime(int paramInt, int[] paramArrayOfInt);
/* */
/* */ private static native int MCActivate(int paramInt1, int paramInt2, byte paramByte);
/* */
/* */ private static native int MCEnableEditing(int paramInt, byte paramByte);
/* */
/* */ private static native int MCIsEditingEnabled(int paramInt);
/* */
/* */ private static native int MCCopy(int paramInt);
/* */
/* */ private static native int MCCut(int paramInt);
/* */
/* */ private static native int MCPaste(int paramInt1, int paramInt2);
/* */
/* */ private static native int MCClear(int paramInt);
/* */
/* */ private static native int MCUndo(int paramInt);
/* */
/* */ private static native int MCPositionController(int paramInt1, byte[] paramArrayOfByte1, byte[] paramArrayOfByte2, int paramInt2);
/* */
/* */ private static native int MCGetControllerInfo(int paramInt, int[] paramArrayOfInt);
/* */
/* */ private static native int MCSetClip(int paramInt1, int paramInt2, int paramInt3);
/* */
/* */ private static native int MCPtInController(int paramInt1, int paramInt2, byte[] paramArrayOfByte);
/* */
/* */ private static native int MCInvalidate(int paramInt1, int paramInt2, int paramInt3);
/* */
/* */ private static native int MCDraw(int paramInt1, int paramInt2);
/* */
/* */ private static native void SetGWorld(int paramInt1, int paramInt2);
/* */
/* */ private static native void GetGWorld(int[] paramArrayOfInt1, int[] paramArrayOfInt2);
/* */ }
/* Location: Z:\System\Library\Java\Extensions\QTJava.zip
* Qualified Name: quicktime.std.movies.MovieController
* JD-Core Version: 0.6.2
*/