DR Developer's Guide
DR Interfaces | DR Methods | DR Types and Misc API

IMoaDrUtils

Interface ID: IID_IMoaDrUtils
Pointer type: PIMoaDrUtils
Inheritance: IMoaUnknown
Header file: driservc.h

Description

This interface provides Director-specific utilities. It complements the features of the IMoaMmUtils interface, providing application-specific services to Xtras.

Methods

Data conversion
ValueToCMRef()
CMRefToValue()
Media management
NewMediaInfo()
MediaRelease()
Acquiring IMoaDrScoreAccess
NewScoreAccess()
Managing notification clients
RegisterNotificationClient()
UnregisterNotificationClient()

CMRefToValue()

Syntax
CMRefToValue(ConstPMoaDrCMRef pCMRef, PMoaMmValue pValue)
Parameters
pCMRef
Pointer to a ConstPMoaDrCMRef to be used as the basis for the new value
pValue
Pointer to MoaMmValue to receive the result
Returns
MoaError
Description
This method has been superseded by methods of the IMoaDrValue interface

MediaRelease()

Syntax
MediaRelease(PMoaDrMediaInfo pMediaInfo)
Parameters
pMediaInfo
Pointer to a Media Info structure filled with valid data
Returns
MoaError
Description
Releases the bulk media data referenced by the MoaDrMediaInfo structure in pMediaInfo. The formatSymbol and mediaData fields of pMediaInfo must be valid on entry. If the format of the media data is unknown to the host application, kMoaDrErr_MediaFormatNotSupported is returned and the media data is not be released. You can also release the data yourself using the appropriate native memory manager call (if the media data is a native data type), such as KillPicture() for "macPICT". The host application does not guarantee that it can dispose media data of all formats; only those that are built-in data types of the host application are supported by this call.

NewMediaInfo()

Syntax
NewMediaInfo(MoaMmSymbol labelSymbol, MoaMmSymbol formatSymbol, PMoaVoid mediaData, MoaLong options,
  PMoaVoid aux, PMoaDrMediaInfo pMediaInfo)
Parameters
labelSymbol
Symbol with a label for the type of media
formatSymbol
Symbol describing the format of the media
mediaData
Pointer to the actual data for the media
options
Used when setting image media. Use a kMoaDrImgMediaOpts_ constant
aux
Pointer to a MoaDrImageAuxInfo structure if you use the "AuxInfo" option
pMediaInfo
Pointer to the structure to be filled out
Returns
MoaError
Description
Populates a MoaDrMediaInfo structure. This call does not allocate any media data, it simply populates the supplied structure. If populating the structure for a call to SetMedia(), you must populate the labelSymbol, formatSymbol, mediaData, options, and aux fields accordingly. options tells Director how the palette and color depth of the image should be set; it currently varies only for "image" label media. aux is used only when specifying AuxInfo options; it is ignored for other options. If populating the structure for a call to GetMedia(), only the labelSymbol and formatSymbol fields are required.

Before a GetMedia(), SetMedia(), or AttachMedia() call, use this method to fill out the supplied structure, specifying NULL for the aux field. Using this call forces you to fill out all the needed parameters.

When setting or getting any media label other than "image", use the value kMoaDrMediaOpts_None for the options argument. When setting or attaching an "image" media label type, there are a number of image media constants to use as the options argument. These are described in the "Constants" section in this document.

NewScoreAccess()

Syntax
NewScoreAccess(PIMoaDrScoreAccess * ppScore)
Parameters
ppScore
Pointer to place to store the new interface.
Returns
MoaError
Description
Creates a new instance of an object supporting IMoaDrScoreAccess. The IMoaDrScoreAccess interface is used to access and edit score data for movies and film loops. Normally, if you want to access an existing movie or film loop, you would call IMoaDrMovie::GetScoreAccess() or IMoaDrCastMem::GetScoreAccess(). However, if you do not want to create new score from scratch which is not yet associated with a movie or film loop, this method can be used. To save the resulting score, you must call the IMoaDrScoreAccess::SetOwner() method to associate an owner object with the score, and then call Commit() to save the score to the object.

RegisterNotificationClient()

Syntax
RegisterNotificationClient(PIMoaDrNotificationClient pNotificationClient, MoaDrNotifyType notifyType, PMoaVoid refCon)
Parameters
pNotificationClient
Pointer to a pre-existing IMoaDrNotificationClient interface
notifyType
Value indicating the type of notification requested
refCon
Reference - may be NULL
Returns
MoaError
Description
This method has been superseded by methods of the IMoaNotification interface.

UnregisterNotificationClient()

Syntax
UnregisterNotificationClient(PIMoaDrNotificationClient pNotificationClient, MoaDrNotifyType notifyType, PMoaVoid refCon)
Parameters
pNotificationClient
Pointer to a pre-existing IMoaDrNotificationClient interface
notifyType
Value indicating the type of notification requested
refCon
Reference - may be NULL
Returns
MoaError
Description
This method has been superseded by methods of the IMoaNotification interface.

ValueToCMRef()

Syntax
ValueToCMRef(ConstPMoaMmValue pValue, PMoaDrCMRef pCMRef)
Parameters
pValue
Pointer to a value with a cast member reference
pCMRef
Pointer to a MoaDrCMRef to receive the result
Returns
MoaError
kMoaErr_NoErr successful
kMoaDrErr_CastMemberExpected Type mismatch: CMRef expected
Description
This method has been superseded by methods of the IMoaDrValue interface

Copyright © 1995-2008 Adobe Macromedia Software LLC, Inc.