[][src]Struct ofx_sys::OfxParameterSuiteV1

#[repr(C)]
pub struct OfxParameterSuiteV1 { pub paramDefine: Option<unsafe extern "C" fn(paramSet: OfxParamSetHandle, paramType: *const c_char, name: *const c_char, propertySet: *mut OfxPropertySetHandle) -> OfxStatus>, pub paramGetHandle: Option<unsafe extern "C" fn(paramSet: OfxParamSetHandle, name: *const c_char, param: *mut OfxParamHandle, propertySet: *mut OfxPropertySetHandle) -> OfxStatus>, pub paramSetGetPropertySet: Option<unsafe extern "C" fn(paramSet: OfxParamSetHandle, propHandle: *mut OfxPropertySetHandle) -> OfxStatus>, pub paramGetPropertySet: Option<unsafe extern "C" fn(param: OfxParamHandle, propHandle: *mut OfxPropertySetHandle) -> OfxStatus>, pub paramGetValue: Option<unsafe extern "C" fn(paramHandle: OfxParamHandle, ...) -> OfxStatus>, pub paramGetValueAtTime: Option<unsafe extern "C" fn(paramHandle: OfxParamHandle, time: OfxTime, ...) -> OfxStatus>, pub paramGetDerivative: Option<unsafe extern "C" fn(paramHandle: OfxParamHandle, time: OfxTime, ...) -> OfxStatus>, pub paramGetIntegral: Option<unsafe extern "C" fn(paramHandle: OfxParamHandle, time1: OfxTime, time2: OfxTime, ...) -> OfxStatus>, pub paramSetValue: Option<unsafe extern "C" fn(paramHandle: OfxParamHandle, ...) -> OfxStatus>, pub paramSetValueAtTime: Option<unsafe extern "C" fn(paramHandle: OfxParamHandle, time: OfxTime, ...) -> OfxStatus>, pub paramGetNumKeys: Option<unsafe extern "C" fn(paramHandle: OfxParamHandle, numberOfKeys: *mut c_uint) -> OfxStatus>, pub paramGetKeyTime: Option<unsafe extern "C" fn(paramHandle: OfxParamHandle, nthKey: c_uint, time: *mut OfxTime) -> OfxStatus>, pub paramGetKeyIndex: Option<unsafe extern "C" fn(paramHandle: OfxParamHandle, time: OfxTime, direction: c_int, index: *mut c_int) -> OfxStatus>, pub paramDeleteKey: Option<unsafe extern "C" fn(paramHandle: OfxParamHandle, time: OfxTime) -> OfxStatus>, pub paramDeleteAllKeys: Option<unsafe extern "C" fn(paramHandle: OfxParamHandle) -> OfxStatus>, pub paramCopy: Option<unsafe extern "C" fn(paramTo: OfxParamHandle, paramFrom: OfxParamHandle, dstOffset: OfxTime, frameRange: *const OfxRangeD) -> OfxStatus>, pub paramEditBegin: Option<unsafe extern "C" fn(paramSet: OfxParamSetHandle, name: *const c_char) -> OfxStatus>, pub paramEditEnd: Option<unsafe extern "C" fn(paramSet: OfxParamSetHandle) -> OfxStatus>, }

@brief The OFX suite used to define and manipulate user visible parameters

Fields

paramDefine: Option<unsafe extern "C" fn(paramSet: OfxParamSetHandle, paramType: *const c_char, name: *const c_char, propertySet: *mut OfxPropertySetHandle) -> OfxStatus>

@brief Defines a new parameter of the given type in a describe action

\arg paramSet handle to the parameter set descriptor that will hold this parameter \arg paramType type of the parameter to create, one of the kOfxParamType* #defines \arg name unique name of the parameter \arg propertySet if not null, a pointer to the parameter descriptor's property set will be placed here.

This function defines a parameter in a parameter set and returns a property set which is used to describe that parameter.

This function does not actually create a parameter, it only says that one should exist in any subsequent instances. To fetch an parameter instance paramGetHandle must be called on an instance.

This function can always be called in one of a plug-in's "describe" functions which defines the parameter sets common to all instances of a plugin.

@returns

  • ::kOfxStatOK - the parameter was created correctly
  • ::kOfxStatErrBadHandle - if the plugin handle was invalid
  • ::kOfxStatErrExists - if a parameter of that name exists already in this plugin
  • ::kOfxStatErrUnknown - if the type is unknown
  • ::kOfxStatErrUnsupported - if the type is known but unsupported
paramGetHandle: Option<unsafe extern "C" fn(paramSet: OfxParamSetHandle, name: *const c_char, param: *mut OfxParamHandle, propertySet: *mut OfxPropertySetHandle) -> OfxStatus>

@brief Retrieves the handle for a parameter in a given parameter set

\arg paramSet instance of the plug-in to fetch the property handle from \arg name parameter to ask about \arg param pointer to a param handle, the value is returned here \arg propertySet if not null, a pointer to the parameter's property set will be placed here.

Parameter handles retrieved from an instance are always distinct in each instance. The paramter handle is valid for the life-time of the instance. Parameter handles in instances are distinct from paramter handles in plugins. You cannot call this in a plugin's describe function, as it needs an instance to work on.

@returns

  • ::kOfxStatOK - the parameter was found and returned
  • ::kOfxStatErrBadHandle - if the plugin handle was invalid
  • ::kOfxStatErrUnknown - if the type is unknown
paramSetGetPropertySet: Option<unsafe extern "C" fn(paramSet: OfxParamSetHandle, propHandle: *mut OfxPropertySetHandle) -> OfxStatus>

@brief Retrieves the property set handle for the given parameter set

\arg paramSet parameter set to get the property set for \arg propHandle pointer to a the property set handle, value is returedn her

\note The property handle belonging to a parameter set is the same as the property handle belonging to the plugin instance.

@returns

  • ::kOfxStatOK - the property set was found and returned
  • ::kOfxStatErrBadHandle - if the paramter handle was invalid
  • ::kOfxStatErrUnknown - if the type is unknown
paramGetPropertySet: Option<unsafe extern "C" fn(param: OfxParamHandle, propHandle: *mut OfxPropertySetHandle) -> OfxStatus>

@brief Retrieves the property set handle for the given parameter

\arg param parameter to get the property set for \arg propHandle pointer to a the property set handle, value is returedn her

The property handle is valid for the lifetime of the parameter, which is the lifetime of the instance that owns the parameter

@returns

  • ::kOfxStatOK - the property set was found and returned
  • ::kOfxStatErrBadHandle - if the paramter handle was invalid
  • ::kOfxStatErrUnknown - if the type is unknown
paramGetValue: Option<unsafe extern "C" fn(paramHandle: OfxParamHandle, ...) -> OfxStatus>

@brief Gets the current value of a parameter,

\arg paramHandle parameter handle to fetch value from \arg ... one or more pointers to variables of the relevant type to hold the parameter's value

This gets the current value of a parameter. The varargs ... argument needs to be pointer to C variables of the relevant type for this parameter. Note that params with multiple values (eg Colour) take multiple args here. For example...

@verbatim OfxParamHandle myDoubleParam, *myColourParam; ofxHost->paramGetHandle(instance, "myDoubleParam", &myDoubleParam); double myDoubleValue; ofxHost->paramGetValue(myDoubleParam, &myDoubleValue); ofxHost->paramGetHandle(instance, "myColourParam", &myColourParam); double myR, myG, myB; ofxHost->paramGetValue(myColourParam, &myR, &myG, &myB); @endverbatim

\note paramGetValue should only be called from within a ::kOfxActionInstanceChanged or interact action and never from the render actions (which should always use paramGetValueAtTime).

@returns

  • ::kOfxStatOK - all was OK
  • ::kOfxStatErrBadHandle - if the parameter handle was invalid
paramGetValueAtTime: Option<unsafe extern "C" fn(paramHandle: OfxParamHandle, time: OfxTime, ...) -> OfxStatus>

@brief Gets the value of a parameter at a specific time.

\arg paramHandle parameter handle to fetch value from \arg time at what point in time to look up the parameter \arg ... one or more pointers to variables of the relevant type to hold the parameter's value

This gets the current value of a parameter. The varargs needs to be pointer to C variables of the relevant type for this parameter. See OfxParameterSuiteV1::paramGetValue for notes on the varags list

@returns

  • ::kOfxStatOK - all was OK
  • ::kOfxStatErrBadHandle - if the parameter handle was invalid
paramGetDerivative: Option<unsafe extern "C" fn(paramHandle: OfxParamHandle, time: OfxTime, ...) -> OfxStatus>

@brief Gets the derivative of a parameter at a specific time.

\arg paramHandle parameter handle to fetch value from \arg time at what point in time to look up the parameter \arg ... one or more pointers to variables of the relevant type to hold the parameter's derivative

This gets the derivative of the parameter at the indicated time.

The varargs needs to be pointer to C variables of the relevant type for this parameter. See OfxParameterSuiteV1::paramGetValue for notes on the varags list.

Only double and colour params can have their derivatives found.

@returns

  • ::kOfxStatOK - all was OK
  • ::kOfxStatErrBadHandle - if the parameter handle was invalid
paramGetIntegral: Option<unsafe extern "C" fn(paramHandle: OfxParamHandle, time1: OfxTime, time2: OfxTime, ...) -> OfxStatus>

@brief Gets the integral of a parameter over a specific time range,

\arg paramHandle parameter handle to fetch integral from \arg time1 where to start evaluating the integral \arg time2 where to stop evaluating the integral \arg ... one or more pointers to variables of the relevant type to hold the parameter's integral

This gets the integral of the parameter over the specified time range.

The varargs needs to be pointer to C variables of the relevant type for this parameter. See OfxParameterSuiteV1::paramGetValue for notes on the varags list.

Only double and colour params can be integrated.

@returns

  • ::kOfxStatOK - all was OK
  • ::kOfxStatErrBadHandle - if the parameter handle was invalid
paramSetValue: Option<unsafe extern "C" fn(paramHandle: OfxParamHandle, ...) -> OfxStatus>

@brief Sets the current value of a parameter

\arg paramHandle parameter handle to set value in \arg ... one or more variables of the relevant type to hold the parameter's value

This sets the current value of a parameter. The varargs ... argument needs to be values of the relevant type for this parameter. Note that params with multiple values (eg Colour) take multiple args here. For example... @verbatim ofxHost->paramSetValue(instance, "myDoubleParam", double(10)); ofxHost->paramSetValue(instance, "myColourParam", double(pix.r), double(pix.g), double(pix.b)); @endverbatim

\note paramSetValue should only be called from within a ::kOfxActionInstanceChanged or interact action.

@returns

  • ::kOfxStatOK - all was OK
  • ::kOfxStatErrBadHandle - if the parameter handle was invalid
paramSetValueAtTime: Option<unsafe extern "C" fn(paramHandle: OfxParamHandle, time: OfxTime, ...) -> OfxStatus>

@brief Keyframes the value of a parameter at a specific time.

\arg paramHandle parameter handle to set value in \arg time at what point in time to set the keyframe \arg ... one or more variables of the relevant type to hold the parameter's value

This sets a keyframe in the parameter at the indicated time to have the indicated value. The varargs ... argument needs to be values of the relevant type for this parameter. See the note on OfxParameterSuiteV1::paramSetValue for more detail

\note paramSetValueAtTime should only be called from within a ::kOfxActionInstanceChanged or interact action.

V1.3: This function can be called the ::kOfxActionInstanceChanged action and during image effect analysis render passes. V1.4: This function can be called the ::kOfxActionInstanceChanged action @returns

  • ::kOfxStatOK - all was OK
  • ::kOfxStatErrBadHandle - if the parameter handle was invalid
paramGetNumKeys: Option<unsafe extern "C" fn(paramHandle: OfxParamHandle, numberOfKeys: *mut c_uint) -> OfxStatus>

@brief Returns the number of keyframes in the parameter

\arg paramHandle parameter handle to interogate \arg numberOfKeys pointer to integer where the return value is placed

V1.3: This function can be called the ::kOfxActionInstanceChanged action and during image effect analysis render passes. V1.4: This function can be called the ::kOfxActionInstanceChanged action

Returns the number of keyframes in the parameter.

@returns

  • ::kOfxStatOK - all was OK
  • ::kOfxStatErrBadHandle - if the parameter handle was invalid
paramGetKeyTime: Option<unsafe extern "C" fn(paramHandle: OfxParamHandle, nthKey: c_uint, time: *mut OfxTime) -> OfxStatus>

@brief Returns the time of the nth key

\arg paramHandle parameter handle to interogate \arg nthKey which key to ask about (0 to paramGetNumKeys -1), ordered by time \arg time pointer to OfxTime where the return value is placed

@returns

  • ::kOfxStatOK - all was OK
  • ::kOfxStatErrBadHandle - if the parameter handle was invalid
  • ::kOfxStatErrBadIndex - the nthKey does not exist
paramGetKeyIndex: Option<unsafe extern "C" fn(paramHandle: OfxParamHandle, time: OfxTime, direction: c_int, index: *mut c_int) -> OfxStatus>

@brief Finds the index of a keyframe at/before/after a specified time.

\arg paramHandle parameter handle to search \arg time what time to search from \arg direction

  • == 0 indicates search for a key at the indicated time (some small delta)
  • 0 indicates search for the next key after the indicated time

  • < 0 indicates search for the previous key before the indicated time \arg index pointer to an integer which in which the index is returned set to -1 if no key was found

@returns

  • ::kOfxStatOK - all was OK
  • ::kOfxStatFailed - if the search failed to find a key
  • ::kOfxStatErrBadHandle - if the parameter handle was invalid
paramDeleteKey: Option<unsafe extern "C" fn(paramHandle: OfxParamHandle, time: OfxTime) -> OfxStatus>

@brief Deletes a keyframe if one exists at the given time.

\arg paramHandle parameter handle to delete the key from \arg time time at which a keyframe is

@returns

  • ::kOfxStatOK - all was OK
  • ::kOfxStatErrBadHandle - if the parameter handle was invalid
  • ::kOfxStatErrBadIndex - no key at the given time
paramDeleteAllKeys: Option<unsafe extern "C" fn(paramHandle: OfxParamHandle) -> OfxStatus>

@brief Deletes all keyframes from a parameter.

\arg paramHandle parameter handle to delete the keys from \arg name parameter to delete the keyframes frome is

V1.3: This function can be called the ::kOfxActionInstanceChanged action and during image effect analysis render passes. V1.4: This function can be called the ::kOfxActionInstanceChanged action

@returns

  • ::kOfxStatOK - all was OK
  • ::kOfxStatErrBadHandle - if the parameter handle was invalid
paramCopy: Option<unsafe extern "C" fn(paramTo: OfxParamHandle, paramFrom: OfxParamHandle, dstOffset: OfxTime, frameRange: *const OfxRangeD) -> OfxStatus>

@brief Copies one parameter to another, including any animation etc...

\arg paramTo parameter to set \arg paramFrom parameter to copy from \arg dstOffset temporal offset to apply to keys when writing to the paramTo \arg frameRange if paramFrom has animation, and frameRange is not null, only this range of keys will be copied

This copies the value of \e paramFrom to \e paramTo, including any animation it may have. All the previous values in \e paramTo will be lost.

To choose all animation in \e paramFrom set \e frameRange to [0, 0]

V1.3: This function can be called the ::kOfxActionInstanceChanged action and during image effect analysis render passes. V1.4: This function can be called the ::kOfxActionInstanceChanged action

\pre

  • Both parameters must be of the same type.

\return

  • ::kOfxStatOK - all was OK
  • ::kOfxStatErrBadHandle - if the parameter handle was invalid
paramEditBegin: Option<unsafe extern "C" fn(paramSet: OfxParamSetHandle, name: *const c_char) -> OfxStatus>

@brief Used to group any parameter changes for undo/redo purposes

\arg paramSet the parameter set in which this is happening \arg name label to attach to any undo/redo string UTF8

If a plugin calls paramSetValue/paramSetValueAtTime on one or more parameters, either from custom GUI interaction or some analysis of imagery etc.. this is used to indicate the start of a set of a parameter changes that should be considered part of a single undo/redo block.

\note paramEditBegin should only be called from within a ::kOfxActionInstanceChanged or interact action.

See also OfxParameterSuiteV1::paramEditEnd

\return

  • ::kOfxStatOK - all was OK
  • ::kOfxStatErrBadHandle - if the instance handle was invalid
paramEditEnd: Option<unsafe extern "C" fn(paramSet: OfxParamSetHandle) -> OfxStatus>

@brief Used to group any parameter changes for undo/redo purposes

\arg paramSet the parameter set in which this is happening

If a plugin calls paramSetValue/paramSetValueAtTime on one or more parameters, either from custom GUI interaction or some analysis of imagery etc.. this is used to indicate the end of a set of parameter changes that should be considerred part of a single undo/redo block

\note paramEditEnd should only be called from within a ::kOfxActionInstanceChanged or interact action.

See also OfxParameterSuiteV1::paramEditBegin

@returns

  • ::kOfxStatOK - all was OK
  • ::kOfxStatErrBadHandle - if the instance handle was invalid

Trait Implementations

impl Clone for OfxParameterSuiteV1[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Copy for OfxParameterSuiteV1[src]

impl Debug for OfxParameterSuiteV1[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]