CallMeWhen
You schedule a callback event by calling theCallMeWhenfunction. You can call this function from your callback function.
pascal OSErr CallMeWhen (QTCallBack cb, QTCallBackProc callBackProc, long refcon, long param1, long param2, long param3);
cb- Specifies the callback event for the operation. You obtain this identifier from the
NewCallBackfunction, which is described in the previous section.callBackProc- Points to your callback function.
- Your callback function must have the following form:
pascal void MyCallBackProc (QTCallBack cb, long refcon);
- See "Callback Event Functions" on page 2-342 for details.
refcon- Contains a reference constant value for your callback function.
param1- Contains scheduling information. The Movie Toolbox interprets this parameter based on the value of the
cbTypeparameter to theNewCallBackfunction, described in the previous section.- If
cbTypeis set tocallBackAtTime, theparam1parameter contains flags indicating when to invoke your callback function for this callback event. The following values are defined (be sure to set unused flags to 0):triggerTimeFwd- Indicates that your callback function should be called at the time specified by
param2only when time is moving forward (positive rate). The value of this flag is 0x0001.triggerTimeBwd- Indicates that your callback function should be called at the time specified by
param2only when time is moving backward (negative rate). The value of this flag is 0x0002.triggerTimeEither- Indicates that your callback function should be called at the time specified by
param2without regard to direction, but the rate must be nonzero. The value of this flag is 0x0003.- If the
cbTypeparameter is set tocallBackAtRate,param1contains flags indicating when to invoke your callback function for this event. The following values are defined (be sure to set unused flags to 0):triggerRateChange- Indicates that your callback function should be called whenever the rate changes. The value of this flag is 0x0000.
triggerRateLT- Indicates that your callback function should be called when the rate changes to a value less than that specified by
param2. The value of this flag is 0x0004.triggerRateGT- Indicates that your callback function should be called when the rate changes to a value greater than that specified by
param2. The value of this flag is 0x0008.triggerRateEqual- Indicates that your callback function should be called when the rate changes to a value equal to that specified by
param2. The value of this flag is 0x0010.triggerRateLTE- Indicates that your callback function should be called when the rate changes to a value that is less than or equal to that specified by
param2. The value of this flag is 0x0014.triggerRateGTE- Indicates that your callback function should be called when the rate changes to a value that is less than or equal to that specified by
param2. The value of this flag is 0x0018.triggerRateNotEqual- Indicates that your callback function should be called when the rate changes to a value that is not equal to that specified by
param2. The value of this flag is 0x001C.param2- Contains scheduling information. The Movie Toolbox interprets this parameter based on the value of the
cbTypeparameter to theNewCallBackfunction, described in the previous section.- If
cbTypeis set tocallBackAtTime, theparam2parameter contains the time value at which your callback function is to be invoked for this event. Theparam1parameter contains flags affecting when the Movie Toolbox calls your function.- If
cbTypeis set tocallBackAtRate, theparam2parameter contains the rate value at which your callback function is to be invoked for this event. Theparam1parameter contains flags affecting when the Movie Toolbox calls your function.param3- Contains the time scale in which to interpret the time value that is stored in
param3ifcbTypeis set tocallBackAtTime.ERROR CODES
None
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help