| Framework | Frameworks/QuickTime.framework |
| Declared in | HIMovieView.h Movies.h OSTypes.h |
Movie controllers provide a user interface for playing and editing movies, eliminating much of the complexity of working with movies. Movie controllers are implemented in QuickTime as components. This allows customized controllers to be plugged in to QuickTime for use by your application.
MCClear
MCCopy
MCCut
MCEnableEditing
MCGetMenuString
MCIsEditingEnabled
MCPaste
MCSetUpEditMenu
MCUndo
MCDrawBadge
MCGetClip
MCGetControllerBoundsRect
MCGetControllerBoundsRgn
MCGetControllerPort
MCGetVisible
MCGetWindowRgn
MCIsControllerAttached
MCPositionController
MCSetClip
MCSetControllerAttached
MCSetControllerBoundsRect
MCSetControllerPort
MCSetVisible
DisposeMCActionFilterUPP
DisposeMCActionFilterWithRefConUPP
HIMovieViewChangeAttributes
HIMovieViewCreate
HIMovieViewGetAttributes
HIMovieViewGetControllerBarSize
HIMovieViewGetMovie
HIMovieViewGetMovieController
HIMovieViewPause
HIMovieViewPlay
HIMovieViewSetMovie
MCAddMovieSegment
MCAdjustCursor
MCGetDoActionsProc
MCGetInterfaceElement
MCInvalidate
MCRemoveAllMovies
MCRemoveAMovie
MCRemoveMovie
MCSetActionFilter
MCSetControllerCapabilities
MCTrimMovieSegment
NewMCActionFilterUPP
NewMCActionFilterWithRefConUPP
Disposes of a MCActionFilterUPP pointer.
void DisposeMCActionFilterUPP ( MCActionFilterUPP userUPP );
A MCActionFilterUPP pointer. See Universal Procedure Pointers.
You can access this function's error returns through GetMoviesError and GetMoviesStickyError.
Introduced in QuickTime 4.1.
Movies.hDisposes of a MCActionFilterWithRefConUPP pointer.
void DisposeMCActionFilterWithRefConUPP ( MCActionFilterWithRefConUPP userUPP );
A MCActionFilterWithRefConUPP pointer. See Universal Procedure Pointers.
You can access this function's error returns through GetMoviesError and GetMoviesStickyError.
Introduced in QuickTime 4.1.
Movies.hChanges the views attributes.
OSStatus HIMovieViewChangeAttributes ( HIViewRef inView, OptionBits inAttributesToSet, OptionBits inAttributesToClear );
The HIMovieView.
Attributes to set.
Attributes to clear.
An error code. Returns noErr if there is no error.
Setting an attribute takes precedence over clearing the attribute.
HIMovieView.hCreates an HIMovieView object.
OSStatus HIMovieViewCreate ( Movie inMovie, OptionBits inAttributes, HIViewRef *outMovieView );
Initial movie to view; may be NULL.
Initial HIMovieView attributes.
Points to variable to receive new HIMovieView.
Undocumented.
If successful, the created view will have a single retain count.
HIMovieView.hReturns the view's current attributes.
OptionBits HIMovieViewGetAttributes ( HIViewRef inView );
The HIMovieView.
Undocumented.
The view's current attributes are returned.
HIMovieView.hReturns the size of the visible movie controller bar.
HISize HIMovieViewGetControllerBarSize ( HIViewRef inView );
The HIMovieView.
Undocumented.
The size of the visible movie controller bar is returned.
HIMovieView.hReturns the view's current movie.
Movie HIMovieViewGetMovie ( HIViewRef inView );
The HIMovieView.
Undocumented.
The view's current movie is returned.
HIMovieView.hReturns the view's current movie controller.
MovieController HIMovieViewGetMovieController ( HIViewRef inView );
The HIMovieView.
Undocumented.
The view's current movie controller is returned.
HIMovieView.hPauses the view's current movie.
OSStatus HIMovieViewPause ( HIViewRef movieView );
The movie view.
An error code. Returns noErr if there is no error.
This is a convenience routine to pause the view's current movie. If the movie is already paused, this function does nothing.
HIMovieView.hPlays the view's current movie.
OSStatus HIMovieViewPlay ( HIViewRef movieView );
The movie view.
An error code. Returns noErr if there is no error.
This is a convenience routine to play the view's current movie. If the movie is already playing, this function does nothing.
HIMovieView.hSets the view's current movie.
OSStatus HIMovieViewSetMovie ( HIViewRef inView, Movie inMovie );
The HIMovieView.
The new movie to display.
An error code. Returns noErr if there is no error.
This routine sets the view's current movie.
HIMovieView.hLets a controller respond to activate, deactivate, suspend, and resume events.
ComponentResult MCActivate ( MovieController mc, WindowRef w, Boolean activate );
The movie controller for the operation. You obtain this identifier from OpenComponent or OpenDefaultComponent, or from NewMovieController.
A pointer to the window in which the event has occurred.
The nature of the event. Set this parameter to TRUE for activate and resume events. Set it to FALSE for deactivate and suspend events.
You can access Movie Toolbox error returns through GetMoviesError and GetMoviesStickyError, as well as in the function result. See Error Codes.
Introduced in QuickTime 3 or earlier.
Movies.hUndocumented
ComponentResult MCAddMovieSegment ( MovieController mc, Movie srcMovie, Boolean scaled );
The movie controller for the operation. You obtain this identifier from OpenComponent or OpenDefaultComponent, or from NewMovieController.
The source movie. Your application obtains this movie identifier from such functions as NewMovie, NewMovieFromFile, or NewMovieFromHandle.
Undocumented
You can access Movie Toolbox error returns through GetMoviesError and GetMoviesStickyError, as well as in the function result. See Error Codes.
Introduced in QuickTime 5.
Movies.hUndocumented
ComponentResult MCAdjustCursor ( MovieController mc, WindowRef w, Point where, long modifiers );
The movie controller for the operation. You obtain this identifier from OpenComponent or OpenDefaultComponent, or from NewMovieController.
A pointer to the window in which the cursor is located.
The location of the cursor. This value is expressed in the local coordinates of the window specified by the w parameter.
The cursor form (see below). See these constants:
kQTCursorOpenHand
kQTCursorClosedHand
kQTCursorPointingHand
kQTCursorRightArrow
kQTCursorLeftArrow
kQTCursorDownArrow
kQTCursorUpArrow
kQTCursorIBeam
You can access Movie Toolbox error returns through GetMoviesError and GetMoviesStickyError, as well as in the function result. See Error Codes.
Introduced in QuickTime 3 or earlier.
Movies.hRemoves the current movie selection from the movie associated with a specified controller.
ComponentResult MCClear ( MovieController mc );
The movie controller for the operation. You obtain this identifier from OpenComponent or OpenDefaultComponent, or from NewMovieController.
You can access Movie Toolbox error returns through GetMoviesError and GetMoviesStickyError, as well as in the function result. See Error Codes.
Introduced in QuickTime 3 or earlier.
Movies.hLets a controller respond when the user clicks in a movie controller window.
ComponentResult MCClick ( MovieController mc, WindowRef w, Point where, long when, long modifiers );
The movie controller for the operation. You obtain this identifier from OpenComponent or OpenDefaultComponent, or from NewMovieController.
A pointer to the window in which the event has occurred.
The location of the click. This value is expressed in the local coordinates of the window specified by the w parameter. Your application must convert this value from the global coordinates returned in the EventRecord structure.
Indicates when the user pressed the mouse button. You obtain this value from the EventRecord structure.
Specifies modifier flags for the event. You obtain this value from the EventRecord structure.
You can access Movie Toolbox error returns through GetMoviesError and GetMoviesStickyError, as well as in the function result. See Error Codes.
Introduced in QuickTime 3 or earlier.
Movies.hReturns a copy of the current movie selection from the movie associated with a specified controller.
Movie MCCopy ( MovieController mc );
The movie controller for the operation. You obtain this identifier from OpenComponent or OpenDefaultComponent, or from NewMovieController.
A copy of the movie.
Introduced in QuickTime 3 or earlier.
Movies.hReturns a copy of the current movie selection from the movie associated with a specified controller and then removes the current movie selection from the source movie.
Movie MCCut ( MovieController mc );
The movie controller for the operation. You obtain this identifier from OpenComponent or OpenDefaultComponent, or from NewMovieController.
A copy of the current movie selection.
Your application is responsible for the returned movie. MCCut returns a movie containing the current selection from the movie associated with the specified controller. If the user has not made a selection, the returned movie reference is set to NIL.
Introduced in QuickTime 3 or earlier.
Movies.hInvokes a movie controller component and makes it perform a specified action.
ComponentResult MCDoAction ( MovieController mc, short action, void *params );
The movie controller for the operation. You obtain this identifier from OpenComponent or OpenDefaultComponent, or from NewMovieController.
The action to be taken. See Movie Controller Actions.
A pointer to the parameter data appropriate to the action. See Movie Controller Actions for information about the parameters required for each supported action.
You can access Movie Toolbox error returns through GetMoviesError and GetMoviesStickyError, as well as in the function result. See Error Codes.
Introduced in QuickTime 3 or earlier.
Movies.hResponds to an update event.
ComponentResult MCDraw ( MovieController mc, WindowRef w );
The movie controller for the operation. You obtain this identifier from OpenComponent or OpenDefaultComponent, or from NewMovieController.
A pointer to the window in which the update event has occurred.
You can access Movie Toolbox error returns through GetMoviesError and GetMoviesStickyError, as well as in the function result. See Error Codes.
Introduced in QuickTime 3 or earlier.
Movies.hDisplays a controller's badge.
ComponentResult MCDrawBadge ( MovieController mc, RgnHandle movieRgn, RgnHandle *badgeRgn );
The movie controller for the operation. You obtain this identifier from OpenComponent or OpenDefaultComponent, or from NewMovieController.
The boundary region of the controller's movie.
A pointer to a region that is to receive information about the location of the badge. The movie controller returns the region where the badge is displayed. If you are not interested in this information, you may set this parameter to NIL. Your application must dispose of this handle.
You can access Movie Toolbox error returns through GetMoviesError and GetMoviesStickyError, as well as in the function result. See Error Codes.
This function places the badge in an appropriate location based on the location of the controller's movie. MCDrawBadge can be useful in circumstances where you are using a movie controller component but do not want to incur the overhead of having the QuickTime movie in memory all the time. This function allows you to display the badge without having to display the movie. In addition, you can use the badge region to perform mouse-down event testing.
Introduced in QuickTime 3 or earlier.
Movies.hEnables and disables editing for a movie controller.
ComponentResult MCEnableEditing ( MovieController mc, Boolean enabled );
The movie controller for the operation. You obtain this identifier from OpenComponent or OpenDefaultComponent, or from NewMovieController.
Specifies whether to enable or disable editing for the controller. Set this parameter to TRUE to enable editing; set it to FALSE to disable editing.
You can access Movie Toolbox error returns through GetMoviesError and GetMoviesStickyError, as well as in the function result. See Error Codes.
Once editing is enabled for a controller, the user may edit the movie associated with the controller.
Introduced in QuickTime 3 or earlier.
Movies.hObtains information describing a movie controller's clipping regions.
ComponentResult MCGetClip ( MovieController mc, RgnHandle *theClip, RgnHandle *movieClip );
The movie controller for the operation. You obtain this identifier from OpenComponent or OpenDefaultComponent, or from NewMovieController.
A pointer to a field that is to receive a handle to the clipping region of the entire movie controller. You must dispose of this region when you are done with it. If you are not interested in this information, set this parameter to NIL.
A pointer to a field that is to receive a handle to the clipping region of the controller's movie. You must dispose of this region when you are done with it. If you are not interested in this information, set this parameter to NIL.
You can access Movie Toolbox error returns through GetMoviesError and GetMoviesStickyError, as well as in the function result. See Error Codes.
Introduced in QuickTime 3 or earlier.
Movies.hReturns a movie controller's boundary rectangle.
ComponentResult MCGetControllerBoundsRect ( MovieController mc, Rect *bounds );
The movie controller for the operation. You obtain this identifier from OpenComponent or OpenDefaultComponent, or from NewMovieController.
A pointer to a Rect structure that is to receive the coordinates of the movie controller's boundary rectangle. If there is insufficient screen space to display the controller, the function may return an empty structure.
You can access Movie Toolbox error returns through GetMoviesError and GetMoviesStickyError, as well as in the function result. See Error Codes.
Introduced in QuickTime 3 or earlier.
Movies.hReturns the actual region occupied by the controller and its movie.
RgnHandle MCGetControllerBoundsRgn ( MovieController mc );
The movie controller for the operation. You obtain this identifier from OpenComponent or OpenDefaultComponent, or from NewMovieController.
A handle to a MacRegion structure that reflects the size, shape, and location of the controller. Your application must dispose of this structure.
As with MCGetControllerBoundsRect, this function returns a region even if the controller is hidden. Some movie controllers may not be rectangular in shape. If the movie is not attached to its controller, the boundary region encloses only the control portion of the controller.
Introduced in QuickTime 3 or earlier.
Movies.hDetermines the current status of a movie controller and its associated movie, for menu highlighting.
ComponentResult MCGetControllerInfo ( MovieController mc, long *someFlags );
The movie controller for the operation. You obtain this identifier from OpenComponent or OpenDefaultComponent, or from NewMovieController.
A pointer to flags (see below) that specify the current status and capabilities of the controller. More than one flag may be set to 1. See these constants:
mcInfoUndoAvailable
mcInfoCutAvailable
mcInfoCopyAvailable
mcInfoPasteAvailable
mcInfoClearAvailable
mcInfoHasSound
mcInfoIsPlaying
mcInfoIsLooping
mcInfoIsInPalindrome
mcInfoEditingEnabled
You can access Movie Toolbox error returns through GetMoviesError and GetMoviesStickyError, as well as in the function result. See Error Codes.
You can use the information returned by this function to control your application's menu highlighting.
Introduced in QuickTime 3 or earlier.
Movies.hReturns a movie controller's color graphics port.
CGrafPtr MCGetControllerPort ( MovieController mc );
The movie controller for the operation. You obtain this identifier from OpenComponent or OpenDefaultComponent, or from NewMovieController.
A pointer to the movie controller's CGrafPort structure.
Introduced in QuickTime 3 or earlier.
Movies.hObtains the time value represented by the indicator on the movie controller's slider.
TimeValue MCGetCurrentTime ( MovieController mc, TimeScale *scale );
The movie controller for the operation. You obtain this identifier from OpenComponent or OpenDefaultComponent, or from NewMovieController.
A pointer to a field that is to receive the time scale for the controller.
A time value containing the time shown by the indicator on the movie controller's slider.
Introduced in QuickTime 3 or earlier.
Movies.hRetrieves the DoMCActionProc callback attached to a movie controller.
ComponentResult MCGetDoActionsProc ( MovieController mc, DoMCActionUPP *doMCActionProc, long *doMCActionRefCon );
The movie controller for the operation. You obtain this identifier from OpenComponent or OpenDefaultComponent, or from NewMovieController.
A pointer to a DoMCActionProc callback.
A reference constant that is passed to your callback. This parameter may point to a data structure containing information your function needs.
You can access Movie Toolbox error returns through GetMoviesError and GetMoviesStickyError, as well as in the function result. See Error Codes.
Introduced in QuickTime 4.
Movies.hLets your application to retrieve the movie reference for a movie that is associated with a movie controller.
Movie MCGetIndMovie ( MovieController mc, short index );
The movie controller for the operation. You obtain this identifier from OpenComponent or OpenDefaultComponent, or from NewMovieController.
Index for the movie. When set to 0, this call duplicates the action of the previous call to this function.
The movie identifier for the movie that is assigned to the specified controller, or NIL if there is no movie assigned to the controller.
Introduced in QuickTime 3 or earlier.
Movies.hGets the interface element of a specified type for a movie controller.
ComponentResult MCGetInterfaceElement ( MovieController mc, MCInterfaceElement whichElement, void *element );
The movie controller for the operation. You obtain this identifier from OpenComponent or OpenDefaultComponent, or from NewMovieController.
A constant (see below) that identifies the interface element type. See these constants:
kMCIEEnabledButtonPicture
kMCIEDisabledButtonPicture
kMCIEDepressedButtonPicture
kMCIEEnabledSizeBoxPicture
kMCIEDisabledSizeBoxPicture
kMCIEEnabledUnavailableButtonPicture
kMCIEDisabledUnavailableButtonPicture
kMCIESoundSlider
kMCIESoundThumb
A pointer to the element type.
You can access Movie Toolbox error returns through GetMoviesError and GetMoviesStickyError, as well as in the function result. See Error Codes.
Introduced in QuickTime 3 or earlier.
Movies.hRetrieves the text string for a movie controller menu command.
ComponentResult MCGetMenuString ( MovieController mc, long modifiers, short item, Str255 aString );
The movie controller for the operation. You obtain this identifier from OpenComponent or OpenDefaultComponent, or from NewMovieController.
The current modifiers from the mouse-down or key-down event to which you are responding.
One of the movie controller Edit menu constants (see below). See these constants:
mcMenuUndo
mcMenuCut
mcMenuCopy
mcMenuPaste
mcMenuClear
On entry, pass a string of type Str255; on exit, this string is set to the text of the menu item specified by the item parameter.
You can access Movie Toolbox error returns through GetMoviesError and GetMoviesStickyError, as well as in the function result. See Error Codes.
MCGetMenuString is used by MCSetUpEditMenu.
Introduced in QuickTime 3 or earlier.
Movies.hReturns a value that indicates whether or not a movie controller is visible.
ComponentResult MCGetVisible ( MovieController mc );
The movie controller for the operation. You obtain this identifier from OpenComponent or OpenDefaultComponent, or from NewMovieController.
If the controller is visible, the function result is set to 1. If the controller is not showing, the function result is set to 0. You can access Movie Toolbox error returns through GetMoviesError and GetMoviesStickyError. See Error Codes.
Introduced in QuickTime 3 or earlier.
Movies.hDetermines the window region that is actually in use by a controller and its movie.
RgnHandle MCGetWindowRgn ( MovieController mc, WindowRef w );
The movie controller for the operation. You obtain this identifier from OpenComponent or OpenDefaultComponent, or from NewMovieController.
A pointer to the window in which the movie controller and its movie are displayed, if the control portion of the controller is attached to the movie. If the controller is detached and in a separate window from the movie, specify one of the windows.
A handle to the MacRegion structure for the window that is actually in use. Your application must dispose of this structure.
The region returned by this function contains only the visible portions of the controller and its movie.
Introduced in QuickTime 3 or earlier.
Movies.hPerforms idle processing for a movie controller.
ComponentResult MCIdle ( MovieController mc );
The movie controller for the operation. You obtain this identifier from OpenComponent or OpenDefaultComponent, or from NewMovieController.
You can access Movie Toolbox error returns through GetMoviesError and GetMoviesStickyError, as well as in the function result. See Error Codes.
Introduced in QuickTime 3 or earlier.
Movies.hInvalidates a region of a movie controller's display.
ComponentResult MCInvalidate ( MovieController mc, WindowRef w, RgnHandle invalidRgn );
The movie controller for the operation. You obtain this identifier from OpenComponent or OpenDefaultComponent, or from NewMovieController.
A pointer to the window in which the movie controller and its movie are displayed, if the control portion of the controller is attached to the movie. If the controller is detached and in a separate window from the movie, specify one of the windows.
A handle to a MacRegion structure that defines a region to invalidate.
You can access Movie Toolbox error returns through GetMoviesError and GetMoviesStickyError, as well as in the function result. See Error Codes.
Introduced in QuickTime 3 or earlier.
Movies.hReturns a value that indicates whether a movie controller is attached to its movie.
ComponentResult MCIsControllerAttached ( MovieController mc );
The movie controller for the operation. You obtain this identifier from OpenComponent or OpenDefaultComponent, or from NewMovieController.
If the controller is attached, the returned value is set to 1. If the controller is not attached, the returned value is set to 0. You can access Movie Toolbox error returns through GetMoviesError and GetMoviesStickyError.
Introduced in QuickTime 3 or earlier.
Movies.hDetermines whether editing is currently enabled for a movie controller.
long MCIsEditingEnabled ( MovieController mc );
The movie controller for the operation. You obtain this identifier from OpenComponent or OpenDefaultComponent, or from NewMovieController.
Returns 1 if editing is enabled; set to 0 if editing is disabled or if the controller component does not support editing.
Once editing is enabled for a controller, the user may edit the movie associated with the controller.
Introduced in QuickTime 3 or earlier.
Movies.hHandles all events for a movie controller.
ComponentResult ADD_MEDIA_BASENAME() MCIsPlayerEvent
The movie controller for the operation. You obtain this identifier from OpenComponent or OpenDefaultComponent, or from NewMovieController.
A pointer to the current EventRecord structure.
A long integer indicating whether the movie controller component handled the event. The component sets this long integer to 1 if it handled the event. Your application should then skip the rest of its event loop and wait for the next event. The return value is 0 otherwise. Your application must then handle the event as part of its normal event processing.
The movie controller component does everything necessary to support the movie controller and its associated movie. For example, the component calls MoviesTask for each movie. The movie controller component also handles suspend and resume events. It treats suspend events as deactivate requests and resume events as activate requests.
The following sample code shows how to convert Windows messages to Macintosh events and then pass those events to the QuickTime movie controller, using this function:
// MCIsPlayerEvent coding example |
// See "Discovering QuickTime," page 240 |
MovieController mc; // Movie controller for movie |
LRESULT CALLBACK WndProc |
(HWND hwnd, // Handle to window |
UINT iMsg, // Message type |
WPARAM wParam, // Message-dependent parameter |
LPARAM lParam) // Message-dependent parameter |
{ |
MSG msg; // Windows message structure |
EventRecord er; // Macintosh event record |
DWORD dwPos; // Mouse coordinates of message |
msg.hwnd =hwnd; // Window handle |
msg.message =iMsg; // Message type |
msg.wParam =wParam; // Word-length parameter |
msg.lParam =lParam; // Long-word parameter |
msg.time =GetMessageTime(); // Get time of message |
dwPos =GetMessagePos(); // Get mouse position |
msg.pt.x =LOWORD(dwPos); // Extract x coordinate |
msg.pt.y =HIWORD(dwPos); // Extract y coordinate |
WinEventToMacEvent(&msg, &er); // Convert to event |
MCIsPlayerEvent(mc, &er); // Pass event to QuickTime |
switch (iMsg) { // Dispatch on message type |
. . . // Handle message according to type |
} // end switch (iMsg) |
} // end WndProc |
Introduced in QuickTime 3 or earlier.
Movies.hHandles keyboard events for a movie controller.
ComponentResult MCKey ( MovieController mc, SInt8 key, long modifiers );
The movie controller for the operation. You obtain this identifier from OpenComponent or OpenDefaultComponent, or from