| Adopted by | |
| Framework | /System/Library/Frameworks/Quartz.framework/Frameworks/QuartzComposer.framework |
| Availability | Available in Mac OS X v10.5 and later.
|
| Declared in | QCRenderer.h |
The QCRenderer protocol defines the methods used to pass data to the input ports or retrieve data from the output ports of the root patch of a Quartz Composer composition. This protocol is adopted by the QCRenderer, QCView, and QCCompositionLayer classes.
Returns the attributes of the composition associated with the renderer.
- (NSDictionary *)attributes
A dictionary that contains the attributes that describe the composition, including the input and output ports of the root patch.
The dictionary can define any of the attributes that are specified by the composition attribute keys. See QCCompositionAttributeNameKey, QCCompositionAttributeDescriptionKey, and QCCompositionAttributeCopyrightKey.
The dictionary can also contain dictionaries that correspond to the keys that identify the input and output ports of the root patch of the composition. See QCPortAttributeTypeKey, QCPortAttributeNameKey, QCPortAttributeMinimumValueKey, QCPortAttributeMaximumValueKey, and QCPortAttributeMenuItemsKey.
QCRenderer.hReturns an array that contains the keys that identify the input ports of the root patch of the composition.
- (NSArray *)inputKeys
An array of keys associated with input ports.
QCRenderer.hReturns an array that contains the keys that identify the output ports of the root patch of the composition.
- (NSArray *)outputKeys
An array of keys associated with input ports.
QCRenderer.hReturns a property list object that represents the current values for all the input keys of the composition.
- (id) propertyListFromInputValues
A property list object.
This is a convenience method that allows you to easily save the set of input values on a composition. Typically, you store the set of values in application preferences.
QCRenderer.hSets the values for the input keys of the composition from a previously saved property list.
- (void) setInputValuesWithPropertyList:(id)plist
This is a convenience method that allows you to restore the set of input values that you obtained previously by calling the method propertyListFromInputValues. If the property list object does not define a value for an input key, or if the value is not of the proper type, Quartz Composer does not set a value for the corresponding input port.
QCRenderer.hSets the value for an input port of a composition.
- (BOOL)setValue:(id)value forInputKey:(NSString *)key
The value to set for the input port. The input port must be at the root patch of the composition. The data type of the value argument must match the input port. See QCPortAttributeTypeKey for the data types accepted by a particular port type.
The key associated with the input port of the composition. This method throws an exception if key is invalid.
Returns NO if it cannot set the value.
QCRenderer.hReturns a mutable dictionary for storing arbitrary information.
- (NSMutableDictionary*) userInfo
A mutable dictionary.
The userInfo dictionary is shared—there is one per Quartz Composer context. In fact, it is the same dictionary as the one available for the plug-in execution context for instances of the QCPlugIn class.
When you add information to the dictionary, make sure that you use unique keys, such as "com.myCompany.foo".
QCRenderer.hReturns the value for an input port of a composition.
- (id)valueForInputKey:(NSString *)key
The key associated with an input port for the root patch of a composition. This method throws an exception if key is invalid.
The value. The data type of returned value depends on the type of the input port. See QCPortAttributeTypeKey for more information.
QCRenderer.hReturns the value for an output port of a composition.
- (id)valueForOutputKey:(NSString *)key
The key associated with an output port for the root patch of a composition. This method throws an exception if key is invalid.
The value. The data type of returned value depends on the type of the output port. See QCPortAttributeTypeKey for more information.
QCRenderer.hReturns the current value on an output port (identified by its key) of the root patch of the composition.
- (id) valueForOutputKey:(NSString*)key ofType:(NSString*)type
The key associated with an output port for the root patch of a composition. This method throws an exception if key is invalid.
A string that specifies the class.
The value.
The value type depends on the type of the port type, as shown in the following table
Port type | Value type |
|---|---|
Boolean, Index, or Number |
|
String |
|
Color | |
Image |
|
Structure |
QCRenderer.h
Last updated: 2008-04-08