Main Page | Modules | Data Structures | File List | Data Fields | Globals

Parameters


Detailed Description

Livido Parameters are used by the plugin to describe the the controls of its filter, they should be parsed by the host and their values can be changed thru processing in order to change filter states.

Parameters also include hints on how the user interface should offer interactivity to user.

You can browse the livido_parameter_template struct to discover about which fields describe a parameter, while the livido_parameter struct holds the actual values for parameters.


Data Structures

struct  livido_parameter
 instance allocated by the host from parameter templates, it holds actual values More...

struct  livido_parameter_template
 template provided by the plugin to describe its public parameters More...


Defines

#define LIVIDO_PARAM_SWITCH   0x10
 on/off switch

#define LIVIDO_PARAM_NUMBER   0x11
 double value

#define LIVIDO_PARAM_RGBA32   0x13
 color triplet for RGBA (8 bits per channel)

#define LIVIDO_PARAM_RGB24   0x14
 color triplet for RGB (8 bits per channel)

#define LIVIDO_PARAM_COORD2D   0x15
 2d cartesian coordinates (double)

#define LIVIDO_PARAM_STRING   0x16
 string of maximum length = LIVIDO_STRING_SIZE

#define LIVIDO_PARAM_POINTER   0x17
 pointer to custom data buffer

#define LIVIDO_PARAM_CUSTOM   0x18
 customized parameter (see scanf(3) description)

#define LIVIDO_PARAMETER_NEEDS_INIT   (1<<0)
 set by plugin: host needs to re-init parameter change

#define LIVIDO_PARAMETER_INTERPOLATED   (1<<1)
 set by host: plugin should interpolate value changes


Functions

int livido_set_parameter (livido_parameter_t *parameter,...)
 set parameter values in instance

int livido_get_parameter (livido_parameter_t *parameter,...)
 get parameter values in instance


Define Documentation

#define LIVIDO_PARAMETER_NEEDS_INIT   (1<<0)
 

set by plugin: host needs to re-init parameter change

This flag should be declared by the plugin whenever it is strictly necessary to re-initialize the filter (i.e. to reallocate buffers) after the value of a certain parameter changes.

GOOD PRACTICE: If possible, try avoiding use of this flag and write your plugin in a way that can handle dynamic changes of parameters while processing

Definition at line 619 of file livido.h.


Function Documentation

int livido_get_parameter livido_parameter_t parameter,
... 
 

get parameter values in instance

This function can be used to get the values of instantiated parameters inside variables of the proper type.

It can be used both by the host and the plugin in order to communicate values to each other thru the processing cycle.

For internal rendering it makes use of scanf/fprintf with the livido_parameter_template::format provided by the parameter template.

The programmer using this function must clearly know in advance which parameter type is being read in order to supply the proper number and type of arguments: see livido_parameter_template::type

Parameters:
parameter reference to the instance of a parameter
... variable list of arguments (depending from livido_parameter_template::type)
Returns:
0 on success, LIVIDO_ERROR_SET_PARAMETER on error

render the parameter values

Definition at line 770 of file livido.h.

References livido_instance_template::author, livido_instance_template::description, livido_instance_template::flags, livido_instance_template::in_parameter_templates, livido_instance_template::livido_api_version, livido_instance_template::name, livido_instance_template::out_parameter_templates, and livido_instance_template::version.

int livido_set_parameter livido_parameter_t parameter,
... 
 

set parameter values in instance

This function can be used to set the values of instantiated parameters. Tt can be used both by the host and the plugin in order to communicate values to each other thru the processing cycle.

For internal rendering it makes use of scanf/fprintf with the livido_parameter_template::format provided by the parameter template.

The programmer using this function must clearly know in advance which parameter type is being set in order to supply the proper number of arguments: see livido_parameter_template::type

Parameters:
parameter reference to the instance of a parameter
... variable list of arguments, a la scanf(3)/fprintf(3)
Returns:
0 on success, LIVIDO_ERROR_SET_PARAMETER on error

initialize parameter rendering format

render the parameter values

Definition at line 722 of file livido.h.


Generated on Wed Apr 6 20:21:07 2005 for LiViDO by doxygen 1.3.4