MyProgressProc
Your progress function should support the following interface:
pascal OSErr MyProgressProc (Movie theMovie, short message, short whatOperation, Fixed percentDone, long refcon);
theMovie- Specifies the movie for this operation. The Movie Toolbox sets this parameter to identify the appropriate movie.
message- Indicates why the Movie Toolbox called your function. The following values are valid:
movieProgressOpen- Indicates the start of a long operation. This is always the first message sent to your function. Your function can use this message to trigger the display of your progress window.
movieProgressUpdatePercent- Passes completion information to your function. The Movie Toolbox repeatedly sends this message to your function. The
percentDoneparameter indicates the relative completion of the operation. You can use this value to update your progress window.movieProgressClose- Indicates the end of a long operation. This is always the last message sent to your function. Your function can use this message as an indication to remove its progress window.
whatOperation- Indicates the long operation that is currently underway. The following values are valid:
progressOpFlatten- Your application has called the
FlattenMovieorFlattenMovieDatafunction (described on page 2-93 and page 2-94, respectively).progressOpInsertTrackSegment- Your application has called the
InsertTrackSegmentfunction (described on page 2-246). The Movie Toolbox calls the progress function that is assigned to the movie that contains the destination track.progressOpInsertMovieSegment- Your application has called the
InsertMovieSegmentfunction (described on page 2-241). The Movie Toolbox calls the progress function that is assigned to the destination movie.progressOpPaste- Your application has called the
PasteMovieSelectionfunction (described on page 2-233). The Movie Toolbox calls the progress function that is assigned to the destination movie.progressOpAddMovieSelection- Your application has called the
AddMovieSelectionfunction (described on page 2-234). The Movie Toolbox calls the progress function that is assigned to the destination movie. The Movie Toolbox calls the progress function that is assigned to the destination movie.progressOpCopy- Your application has called the
CopyMovieSelectionfunction (described on page 2-232). The Movie Toolbox calls the progress function that is assigned to the destination movie.progressOpCut- Your application has called the
CutMovieSelectionfunction (described on page 2-231). The Movie Toolbox calls the progress function that is assigned to the destination movie.progressOpLoadMovieIntoRam- Your application has called the
LoadMovieIntoRamfunction (described on page 2-125). The Movie Toolbox calls the progress function that is assigned to the destination movie.progressOpLoadTrackIntoRam- Your application has called the
LoadTrackIntoRamfunction (described on page 2-127). The Movie Toolbox calls the progress function that is assigned to the destination track.progressOpLoadMediaIntoRam- Your application has called the
LoadMediaIntoRamfunction (described on page 2-128). The Movie Toolbox calls the progress function that is assigned to the destination media.progressOpImportMovie- Your application has called the
ConvertFileToMovieFilefunction (described on page 2-81). The Movie Toolbox calls the progress function that is associated with the destination movie file.
This flag is also used, as appropriate, for thePasteHandleIntoMoviefunctions (described on page 2-236).progressOpExportMovie- Your application has called the
ConvertMovieFilefunction (described on page 2-82). The Movie Toolbox calls the progress function that is associated with the destination movie. This flag is also used, as appropriate, for thePutMovieIntoTypedHandlefunction (described on page 2-237).percentDone- Contains a fixed-point value indicating how far the operation has progressed. Its value is always between 0.0 and 1.0. This parameter is valid only when the message field is set to
movieProgressUpdatePercent.refcon- Reference constant value for use by your progress function. Your application specifies the value of this reference constant when you assign the progress function to the movie.
DESCRIPTION
Your progress function should return an error value. The Movie Toolbox examines this value after eachmovieProgressUpdatePercentmessage and before continuing the current operation. Set this value to a nonzero value, such asuserCanceledErr, to cancel the operation; set it tonoErrto continue.
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help