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

IMoaMmMacEventHandler

Interface ID: IID_IMoaMmMacEventHandler
Pointer type: PIMoaMmMacEventHandler
Inheritance: IMoaUnknown
Header file: mmiservc.h

Description

Implement this interface to handle Macintosh events in modeless windows. Pass an instance of this interface to the IMoaMmUtils::MacRegisterWindow() method; the interface is passed back to you in the IMoaMmUtils::MacUnregisterWindow() method.

Methods

SetRegistered()
HandleEvent()

HandleEvent()

Syntax

HandleEvent(PMoaVoid pWindow, PMoaVoid pEventRecord, PMoaVoid refCon)

Parameters

pWindow
WindowPtr to the Macintosh window associated with IMoaMmMacEventHandler
pEventRecord
Pointer to a Macintosh EventRecord structure
refCon
User data passed to MacRegisterWindow() when the window was registered

Returns

MoaError

Description

Handles a Macintosh event dispatched from the host application. pWindow is the Macintosh WindowPtr for the Macintosh window associated with the IMoaMmMacEventHandler through a call to IMoaMmUtils::MacRegisterWindow(). pEventRecord is a pointer to a Macintosh EventRecord structure. This is different from a MoaMmEventInfo structure used by the IMoaMmXSpriteActor interface. refCon is arbitrary user data passed to MacRegisterWindow() when the window was registered. If you handled the event, return kMoaErr_NoErr.

The host application passes the kMoaMmMacEvent_CloseWindow event when it wants you to close your window. Handle this event in the same way you would if the user clicked in the goAway box.

SetRegistered()

Syntax

SetRegistered(MoaBoolParam registered, PMoaVoid refCon)

Parameters

registered
MoaBoolParam
refCon
User data passed to MacRegisterWindow() when the window was registered

Returns

MoaError

Description

Called just after the event handler has been registered and just before the event handler is unregistered. This is a simple notification call and is intended for the convenience of the event handler. Its implementation is optional. refCon is arbitrary user data passed to MacRegisterWindow() when the window was registered; it provides a simple way to initialize or dispose data shared between the event handler and the object that registered it.

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