PnActuator

Name

PnActuator -- base class for objects that perform some action on a PnImage

Synopsis


#include <pn/pn.h>


struct      PnActuator;
void        pn_actuator_add_option          (PnActuator *actuator,
                                             PnOption *option);
PnOption*   pn_actuator_get_option_by_index (PnActuator *actuator,
                                             guint index);
PnOption*   pn_actuator_get_option_by_name  (PnActuator *actuator,
                                             const gchar *name);
void        pn_actuator_prepare             (PnActuator *actuator,
                                             PnImage *image);
void        pn_actuator_execute             (PnActuator *actuator,
                                             PnImage *image,
                                             PnAudioData *audio_data);

Object Hierarchy


  GObject
   +----PnObject
         +----PnUserObject
               +----PnActuator

Description

PnActuator is the base class for all actuators. Each actuator contains a list of PnOptions whose values can be changed by the user to alter the behavior of the actuator.

Details

struct PnActuator

struct PnActuator;


pn_actuator_add_option ()

void        pn_actuator_add_option          (PnActuator *actuator,
                                             PnOption *option);

Adds a PnOption to the actuator.

actuator : a PnActuator
option : the PnOption to add


pn_actuator_get_option_by_index ()

PnOption*   pn_actuator_get_option_by_index (PnActuator *actuator,
                                             guint index);

Retrieves a PnOption associated with the actuator based on the index of the option. Indices start at 0 and are determined by the order in which the options were added.

actuator : a PnActuator
index : the index of the option to retrieve
Returns : The PnOption at index index


pn_actuator_get_option_by_name ()

PnOption*   pn_actuator_get_option_by_name  (PnActuator *actuator,
                                             const gchar *name);

Retrieves the first PnOption associated with the actuator based on the name of the option.

actuator : a PnActuator
name : the name of the option to retrieve
Returns : The first PnOption with the name name


pn_actuator_prepare ()

void        pn_actuator_prepare             (PnActuator *actuator,
                                             PnImage *image);

Prepares an actuator to act upon a given PnImage.

actuator : a PnActuator
image : the PnImage for which the actuator should prepare


pn_actuator_execute ()

void        pn_actuator_execute             (PnActuator *actuator,
                                             PnImage *image,
                                             PnAudioData *audio_data);

Causes the actuator to perform its function on image. The pn_actuator_prepare() *MUST* have previously been called with the same actuator and image arguments.

actuator : a PnActuator
image : the PnImage to act upon
audio_data : the PnAudioData to use when basing effects on sound