Class

QCPlugIn

The QCPlugIn class provides the base class to subclass for writing custom Quartz Composer patches. You implement a custom patch by subclassing QCPlugIn, overriding the appropriate methods, packaging the code as an NSBundle object, and installing the bundle in the appropriate location. A bundle can contain more than one subclass of QCPlugIn, allowing you to provide a suite of custom patches in one bundle. Quartz Composer Custom Patch Programming Guide provides detailed instructions on how to create and package a custom patch. QCPlugIn Class Reference supplements the information in the programming guide.

Declaration

@interface QCPlugIn : NSObject

Overview

The methods related to the executing the custom patch (called when the Quartz Composer engine is rendering) are passed an opaque object that conforms to the QCPlugInContext protocol. This object represents the execution context of the QCPlugIn object. You should not retain the execution context or use it outside of the scope of the execution method that it is passed to.

Topics

Defining the Characteristics of a Custom Patch

+ executionMode

Returns the execution mode of the custom patch.

+ timeMode

Returns the time mode for the custom patch.

Executing a Custom Patch

- execute:atTime:withArguments:

Performs the processing or rendering tasks appropriate for the custom patch.

Performing Custom Tasks During Execution

- startExecution:

Allows you to perform custom setup tasks before the Quartz Composer engine starts rendering.

- enableExecution:

Allows you to perform custom tasks when the execution of the QCPlugIn object is resumed.

- disableExecution:

Allows you to perform custom tasks when the execution of the QCPlugIn object is paused.

- stopExecution:

Allows you to perform custom tasks when the QCPlugIn object stops executing.

Defining Patch and Property Port Attributes

+ attributes

Returns a dictionary that contains strings for the user interface that describe the custom patch.

+ attributesForPropertyPortWithKey:

Returns a dictionary that contains strings for the user interface that describe the optional attributes for ports created from properties.

Defining Internal Settings

- createViewController

Creates and returns a view controller for the Settings pane of a custom patch.

+ plugInKeys

Returns the keys for the internal settings of a custom patch.

Supporting Saving and Retrieving Internal Settings

- serializedValueForKey:

Provides custom serialization for patch internal settings that do not comply to the NSCoding protocol.

- setSerializedValue:forKey:

Provides custom deserialization for patch internal settings that were previously serialized using the method serializedValueForKey:.

Adding Ports Dynamically

- addInputPortWithType:forKey:withAttributes:

Adds an input port of the specified type and associates a key and attributes with the port.

- removeInputPortForKey:

Removes the input port for a given key.

- addOutputPortWithType:forKey:withAttributes:

Adds an output port of the specified type and associates a key and attributes with the port.

- removeOutputPortForKey:

Removes the output port for a given key.

Getting and Setting Port Values

- didValueForInputKeyChange:

Returns whether the input port value changed since the last execution of the custom patch.

- valueForInputKey:

Returns the current value for an input port.

- setValue:forOutputKey:

Sets the value of an output port.

Loading Bundle and Custom Patches Manually

+ loadPlugInAtPath:

Loads a Quartz Composer plug-in bundle from the specified path.

+ registerPlugInClass:

Registers a QCPlugIn subclass.

Ordering Property Ports

+ sortedPropertyPortKeys

Returns and array of property port keys in the order you want them to appear in the user interface.

Constants

Patch Attributes

Attributes for custom patches.

Input and Output Port Attributes

Attributes for input and output ports.

Port Input and Output Types

Data types for input and output ports.

Pixel Formats

Supported image pixel formats.

QCPlugInExecutionMode

Execution modes for custom patches.

QCPlugInTimeMode

Time modes for custom patches.

Relationships

Inherits From