Inside Macintosh: QuickTime Reference
| Previous | Chapter Contents | Chapter Top | Next |
The parameters to your custom action may be the result of a wired expression. Don't worry about analyzing the kActionParameter child atoms, the wired expression evaluation machinery has been made accessible via a movie controller action called mcActionFetchParameterAs.
Fill out a QTFetchParameterAsRecord and pass it to mcActionFetchParameterAs as in:
CallDoMCActionProc(resolvedTarget->doMCActionCallbackProc,Set the container and atom of the paramListSpec to the actionContainer and actionAtom passed to ExecuteWiredAction().
Set the paramIndex to the index of the parameter you wish to fetch. If you allow a variable number of parameters, you may count how many child atoms of type kActionParameter the actionAtom has.
Set the paramType to one of the parameter types from the following enumeration:
enum {Set the allowedFlags to flags from the following enumeration, or zero fetching without constraints.
enum {If allowedFlags is not set to zero, set the min, max, current, and isUnsignedValue fields to appropriate values based on the data type being fetched.
The newValue field returns the result of the parameter.
For scalar and structure types, pass a pointer to the appropriate data type and it will be filled in.
For Handle, RgnHandle, and Cstring pass in a new empty handle that will be resized as needed, you are responsible for disposing the handle when done.
For kFetchAsNewAtomContainer, pass in a pointer to a non-allocated QTAtomContainer. On return, this container will contain the contents of the single child atom of the parameter atom and all of its children. This lets you pass arbitrary data that is not evaluated in an atom container as a parameter.
A sample custom wired action-handling component has been provided.
Inside Macintosh: QuickTime Reference
| Previous | Chapter Contents | Chapter Top | Next |