TuttleOFX  1
ofxTimeLine.h
Go to the documentation of this file.
00001 /*
00002  * Software License :
00003  *
00004  * Copyright (c) 2007-2009, The Open Effects Association Ltd. All rights reserved.
00005  *
00006  * Redistribution and use in source and binary forms, with or without
00007  * modification, are permitted provided that the following conditions are met:
00008  *
00009  * Redistributions of source code must retain the above copyright notice,
00010  *    this list of conditions and the following disclaimer.
00011  * Redistributions in binary form must reproduce the above copyright notice,
00012  *    this list of conditions and the following disclaimer in the documentation
00013  *    and/or other materials provided with the distribution.
00014  * Neither the name The Open Effects Association Ltd, nor the names of its
00015  *    contributors may be used to endorse or promote products derived from this
00016  *    software without specific prior written permission.
00017  *
00018  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
00019  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
00020  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00021  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
00022  * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
00023  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
00024  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
00025  * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00026  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00027  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00028  */
00029 
00030 #ifndef _ofxTimeLine_h_
00031 #define _ofxTimeLine_h_
00032 
00033 #include "ofxCore.h"
00034 
00035 /** @brief Name of the time line suite */
00036 #define kOfxTimeLineSuite "OfxTimeLineSuite"
00037 
00038 /** @brief Suite to control timelines
00039  *
00040  *  This suite is used to enquire and control a timeline associated with a plug-in
00041  *  instance.
00042  *
00043  *  This is an optional suite in the Image Effect API.
00044  */
00045 typedef struct OfxTimeLineSuiteV1
00046 {
00047         /** @brief Get the time value of the timeline that is controlling to the indicated effect.
00048          *
00049          *  \arg instance - is the instance of the effect changing the timeline, cast to a void *
00050          *  \arg time - a pointer through which the timeline value should be returned
00051          *
00052          *  This function returns the current time value of the timeline associated with the effect instance.
00053          *
00054          *  @returns
00055          *  - ::kOfxStatOK - the time enquiry was sucessful
00056          *  - ::kOfxStatFailed - the enquiry failed for some host specific reason
00057          *  - ::kOfxStatErrBadHandle - the effect handle was invalid
00058          */
00059         OfxStatus ( *getTime )( void* instance, double* time );
00060 
00061         /** @brief Move the timeline control to the indicated time.
00062          *
00063          *  \arg instance - is the instance of the effect changing the timeline, cast to a void *
00064          *  \arg time - is the time to change the timeline to. This is in the temporal coordinate system of the effect.
00065          *
00066          *  This function moves the timeline to the indicated frame and returns. Any side effects of the timeline
00067          *  change are also triggered and completed before this returns (for example instance changed actions and renders
00068          *  if the output of the effect is being viewed).
00069          *
00070          *  @returns
00071          *  - ::kOfxStatOK - the time was changed sucessfully, will all side effects if the change completed
00072          *  - ::kOfxStatFailed - the change failed for some host specific reason
00073          *  - ::kOfxStatErrBadHandle - the effect handle was invalid
00074          *  - ::kOfxStatErrValue - the time was an illegal value
00075          */
00076         OfxStatus ( *gotoTime )( void* instance, double time );
00077 
00078         /** @brief Get the current bounds on a timeline
00079          *
00080          *  \arg instance - is the instance of the effect changing the timeline, cast to a void *
00081          *  \arg firstTime - is the first time on the timeline. This is in the temporal coordinate system of the effect.
00082          *  \arg lastTime - is last time on the timeline. This is in the temporal coordinate system of the effect.
00083          *
00084          *  This function
00085          *
00086          *  @returns
00087          *  - ::kOfxStatOK - the time enquiry was sucessful
00088          *  - ::kOfxStatFailed - the enquiry failed for some host specific reason
00089          *  - ::kOfxStatErrBadHandle - the effect handle was invalid
00090          */
00091         OfxStatus ( *getTimeBounds )( void* instance, double* firstTime, double* lastTime );
00092 } OfxTimeLineSuiteV1;
00093 
00094 #endif