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(PIMoaDrUtilsThis,
ConstPMoaDrCMRefpCMRef,
PMoaMmValuepValue)

Parameters

This
Pointer to the IMoaDrUtils interface

pCMRef
ConstPMoaDrCMRefPointer to a ConstPMoaDrCMRef to be used as the basis for the new value

pValue
PMoaMmValuePointer to MoaMmValue to receive the result

Returns

MoaError

Description

This method has been superseded by methods of the IMoaDrValue interface


MediaRelease()

Syntax

MediaRelease(PIMoaDrUtilsThis,
PMoaDrMediaInfopMediaInfo)

Parameters

This
Pointer to the IMoaDrUtils interface

pMediaInfo
PMoaDrMediaInfo

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(PIMoaDrUtilsThis,
MoaMmSymbollabelSymbol,
MoaMmSymbolformatSymbol,
PMoaVoidmediaData,
MoaLongoptions,
PMoaVoidaux,
PMoaDrMediaInfopMediaInfo)

Parameters

This
Pointer to the IMoaDrUtils interface

labelSymbol
MoaMmSymbol

formatSymbol
MoaMmSymbol

mediaData
PMoaVoid

options
MoaLongUsed when setting image media. Use a kMoaDrImgMediaOpts_ constant

aux
PMoaVoidPointer to a MoaDrImageAuxInfo structure if you use the "AuxInfo" option

pMediaInfo
PMoaDrMediaInfo

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 later in this document.


NewScoreAccess()

Syntax

NewScoreAccess(PIMoaDrUtilsThis,
PIMoaDrScoreAccess FAR *ppScore)

Parameters

This
Pointer to the IMoaDrUtils interface

ppScore
PIMoaDrScoreAccess FAR *

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(PIMoaDrUtilsThis,
PIMoaDrNotificationClientpNotificationClient,
MoaDrNotifyTypenotifyType,
PMoaVoidrefCon)

Parameters

This
Pointer to the IMoaDrUtils interface

pNotificationClient
PIMoaDrNotificationClientPointer to a pre-existing IMoaDrNotificationClient interface

notifyType
MoaDrNotifyTypeValue indicating the type of notification requested

refCon
PMoaVoid

Returns

MoaError

Description

This method has been superseded by methods of the IMoaNotification interface.


UnregisterNotificationClient()

Syntax

UnregisterNotificationClient(PIMoaDrUtilsThis,
PIMoaDrNotificationClientpNotificationClient,
MoaDrNotifyTypenotifyType,
PMoaVoidrefCon)

Parameters

This
Pointer to the IMoaDrUtils interface

pNotificationClient
PIMoaDrNotificationClientPointer to a pre-existing IMoaDrNotificationClient interface

notifyType
MoaDrNotifyTypeValue indicating the type of notification requested

refCon
PMoaVoid

Returns

MoaError

Description

This method has been superseded by methods of the IMoaNotification interface.


ValueToCMRef()

Syntax

ValueToCMRef(PIMoaDrUtilsThis,

ConstPMoaMmValuepValue,
PMoaDrCMRefpCMRef)

Parameters

This
Pointer to the IMoaDrUtils interface

pValue
ConstPMoaMmValuePointer to a cast member reference type

pCMRef
PMoaDrCMRefPointer to a MoaDrCMRef to receive the result

Returns

kMoaErr_NoErr successful
kMoaDrErr_CastMemberExpected Type mismatch: CMRef expected

Description


This method has been superseded by methods of the IMoaDrValue interface

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