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


IMoaAwEventSender


Interface ID: IID_IMoaAwEventSender
Pointer type: PIMoaAwEventSender
Inheritance: IMoaUnknown
Header file: awiservc.h

Description

The IMoaAwEventSender interface is implemented by an Xtra to provide information about the kind of events it can send to Authorware so that Authorware can present this information to the user in the Event Response Properties dialog. Any Xtra that uses the SendSpriteEvent function must implement the IMoaAwEventSender interface in the same class that implements its IMoaMmXAsset interface. If you want the Xtra-level sender name to appear in the Event Response Properties dialog, you must add a registry entry for it in the MOA cache.

Methods

Event methods

GetXtraEventDescriptions()
GetInstanceEventDescriptions()
GetSenderXtraName()
HandleReply()

GetInstanceEventDescriptions()

Syntax

GetInstanceEventDescriptions(PIMoaAwEventSender This,
PMoaChar pDescriptions,
MoaLong maxLen)

Parameters

This
Pointer to the IMoaAwEventSender interface

pDescriptions
List of event descriptions Xtra sends for all instances

maxLen
Maximum characters copied into string

Returns

kMoaErr_NoErr Function call succeeded

Description

For senders which are assets, this returns the list of events sent by this specific instance of the asset. The format of the returned string is "eventName1 argtype1 argname1, argtype2 argname2... -- description eventName2..." Valid argument types are int, integer, float, rect, point, symbol, string, any, *. This is the same general format as for Scripting Xtra message tables.



GetSenderXtraName()

Syntax

GetSenderXtraName(PIMoaAwEventSender This,
PMoaChar pName,
MoaLong maxLen)

Parameters

This
Pointer to the IMoaAwEventSender interface

pName
String containing Xtra name

maxLen
Number of characters in name

Returns

kMoaErr_NoErr Function call succeeded

Description

This method returns the name of the Xtra as shown in the list of event senders in Authorware's Reponse Properties dialog for the Event Response type. For Scripting Xtras, you should return the same string that you used to identify your Xtra in the message table of your Scripting Xtra. For Asset Xtras, you should return the same string as the display name for the Asset Xtra. Return an empty string if you don't want the Xtra to appear in the Response Properties dialog sender list.



GetXtraEventDescriptions()

Syntax

GetXtraEventDescriptions(PIMoaAwEventSender This,
PMoaChar pDescriptions,
MoaLong maxLen)

Parameters

This
Pointer to the IMoaAwEventSender interface

pDescriptions
List of event descriptions Xtra sends for all instances

maxLen
Maximum number of characters copied into string

Returns

kMoaErr_NoErr Function call succeeded

Description

This method returns as a string the list of event descriptions that the Xtra sends for all its instances. It is the caller's responsibility to allocate the string. No more than maxLen characters will be copied into the string. The events in this list are the events that are common to all instance sof the Xtra (events that can be sent by any of its instantiated icons). The format of the returned string is "eventName1 argtype1 argname1, argtype2 argname2... -- description eventName2..." Valid argument types are int, integer, float, rect, point, symbol, string, any, *. This is the same general format as for Scripting Xtra message tables. If you don't want a particular event to appear in the list of available events in the Authorware Response Properties dialog, precede it with a '/'.



HandleReply()

Syntax

HandleReply(PIMoaAwEventSender This,
MoaMmSymbol eventName,
PMoaMmValue pReply,
PMoaVoid replyRefcon)

Parameters

This
Pointer to the IMoaAwEventSender interface

eventName
Symbol naming this event

pReply
Reply value generated by Authorware

replyRefcon
Data passed back from reply

Returns

kMoaErr_NoErr Function call succeeded

Description

Processes a reply from Authorware, generated by an earlier call to SendEventWithReply. pEventName and replyRefcon are the same values passed in to SendEventWithReply. pEventName is a string naming this event for example, "mouseClick"). replyRefcon is data that is passed back to the HandleReply method of the pSender when a reply is sent back. pReply is the value of the reply generated by Authorware.

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