QCCompositionRepository Class Reference

Inherits from
Conforms to
Framework
/System/Library/Frameworks/Quartz.framework/Frameworks/QuartzComposer.framework
Availability
Available in OS X v10.5 and later.
Companion guide
Quartz Composer Programming Guide
Declared in
QCCompositionRepository.h
Related sample code

Overview

The QCCompositionRepository class represents a system-wide centralized repository of built-in and installed Quartz Composer compositions (/Library/Compositions and ~/Library/Compositions). The QCCompositionRepository class cannot be subclassed.

Compositions in the repository are represented by the QCComposition class. You can use the methods of the QCCompositionRepository class to fetch all compositions or only those that meet specific criteria.

Tasks

Getting the Composition Repository

Fetching Compositions

Class Methods

sharedCompositionRepository

Returns the shared instance of the composition repository.

+ (QCCompositionRepository*) sharedCompositionRepository
Return Value

The shared instance of QCCompositionRepository.

Availability
  • Available in OS X v10.5 and later.
Declared In
QCCompositionRepository.h

Instance Methods

allCompositions

Returns an array that contains all compositions currently in the composition repository.

- (NSArray*) allCompositions
Return Value

An array of QCComposition objects.

Availability
  • Available in OS X v10.5 and later.
Declared In
QCCompositionRepository.h

compositionsWithProtocols:andAttributes:

Returns an array of compositions that match a set of criteria.

- (NSArray*) compositionsWithProtocols:(NSArray*)protocols andAttributes:(NSDictionary*)attributes
Parameters
protocols

The protocols that you want compositions to conform to. Pass nil if you don’t want to filter based on the protocol. You can pass any of these protocols: QCCompositionProtocolAnimation, QCCompositionProtocolImageProducer, QCCompositionProtocolImageFilter, QCCompositionProtocolImageCompositor, QCCompositionProtocolImageTransition, and QCCompositionProtocolScreenSaverRSS.

attributes

A dictionary that contains the attributes, and their associated values, that you want compositions to match. Pass nil if you don’t want to filter based on the attributes. For example, you can pass any of these attributes: QCCompositionAttributeNameKey, QCCompositionAttributeDescriptionKey, QCCompositionAttributeCopyrightKey, QCCompositionAttributeBuiltInKey, and QCCompositionAttributeTimeDependentKey.

Return Value

An array of QCComposition objects that meet the supplied criteria.

Availability
  • Available in OS X v10.5 and later.
Declared In
QCCompositionRepository.h

compositionWithIdentifier:

Returns the composition that corresponds to the identifier.

- (QCComposition*) compositionWithIdentifier:(NSString*)identifier
Parameters
identifier

A string that uniquely identifies the composition to retrieve.

Return Value

The composition identified by the provided string, or nil if there is no composition with that identifier in the composition repository.

Availability
  • Available in OS X v10.5 and later.
Declared In
QCCompositionRepository.h

Notifications

QCCompositionRepositoryDidUpdateNotification

Posted whenever the list of compositions in the composition repository is updated.
Availability
Declared In
QCCompositionRepository.h