InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ICSXSPlugPlugEventHandler Class Referenceabstract
Inheritance diagram for ICSXSPlugPlugEventHandler:
IPMUnknownICSXSPlugPlugExtensions

Classes

struct  CSXSEvent
 

Public Types

enum  { kDefaultIID = IID_ICSXSPLUGPLUG }
 
enum  CSXSEventScope { kEventScope_Application = 1, kEventScope_LastValue = 0x7FFFFFFF }
 
enum  CSXSEventErrorCode { kEventErrorCode_Success = 0, kEventErrorCode_OperationFailed, kEventErrorCode_Unknown, kEventErrorCode_LastValue = 0x7FFFFFFF }
 
typedef void(* EventListenerFn )(const CSXSEvent *const csxsEvent, void *const context)
 

Public Member Functions

virtual CSXSEventErrorCode AddPlugPlugEventListener (const char *type, EventListenerFn eventListener, void *const context)=0
 
virtual CSXSEventErrorCode RemovePlugPlugEventListener (const char *type, EventListenerFn eventListener, void *const context)=0
 
virtual CSXSEventErrorCode DispatchPlugPlugEvent (const CSXSEvent *const csxsEvent) const =0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Member Enumeration Documentation

Enumerator
kEventErrorCode_Success 

Success.

kEventErrorCode_OperationFailed 

Failure of a known type.

kEventErrorCode_Unknown 

Failure of an unknown type.

Enumerator
kEventScope_Application 

OBSOLETE: Please use vulcan messages for sending messages to all available applications. (See ICSXSVulcanMessageHandler) Events with this scope are dispatched to all available applications and all native listeners. Events with this scope are dispatched only within the application in which the event was generated.

Member Function Documentation

virtual CSXSEventErrorCode ICSXSPlugPlugEventHandler::AddPlugPlugEventListener (const char * type,
EventListenerFn eventListener,
void *const context 
)
pure virtual
Adds the given eventListener to the list of plugplug listener for the given type.

Parameters
typeThe type of events to register for. Must not be NULL.
eventListenerThe event listener to add.
contextA user specific context pointer or NULL.
Returns
The error code for this operation.
virtual CSXSEventErrorCode ICSXSPlugPlugEventHandler::DispatchPlugPlugEvent (const CSXSEvent *const csxsEvent) const
pure virtual
Dispatches the given event. 

Parameters
Theevent to dispatch.
Returns
The error code for this operation.

This method will notify all event listeners which have registered for the type of the event plus all event listeners which have registered for all events. The order in which the listeners are notified is undeterministic.

virtual CSXSEventErrorCode ICSXSPlugPlugEventHandler::RemovePlugPlugEventListener (const char * type,
EventListenerFn eventListener,
void *const context 
)
pure virtual

Removes the given eventListener from the list of plugplug listener for the given type.

Parameters
eventListenerThe event listener to remove.
contextThe user specific context pointer the event listener was registered with or NULL.
Returns
The error code for this operation.