InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ICSXSPlugPlugEventHandler.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Gaurav Bhargava
6 //
7 // $Author$
8 //
9 // $DateTime$
10 //
11 // $Revision$
12 //
13 // $Change$
14 //
15 // ADOBE CONFIDENTIAL
16 //
17 // Copyright 1997-2010 Adobe Systems Incorporated. All rights reserved.
18 //
19 // NOTICE: All information contained herein is, and remains
20 // the property of Adobe Systems Incorporated and its suppliers,
21 // if any. The intellectual and technical concepts contained
22 // herein are proprietary to Adobe Systems Incorporated and its
23 // suppliers and may be covered by U.S. and Foreign Patents,
24 // patents in process, and are protected by trade secret or copyright law.
25 // Dissemination of this information or reproduction of this material
26 // is strictly forbidden unless prior written permission is obtained
27 // from Adobe Systems Incorporated.
28 //
29 //========================================================================================
30 
31 #ifndef __ICSXSPlugPlugEventHandler__
32 #define __ICSXSPlugPlugEventHandler__
33 
34 #include "IPMUnknown.h"
35 #include "CSXSID.h"
36 
37 #define kIDEnigmaCode "IDSN"
38 #define kICEnigmaCode "AICY"
39 
41 {
42 public:
43  enum { kDefaultIID = IID_ICSXSPLUGPLUG } ;
44 
46  {
53  //kEventScope_Global = 0,
54 
60 
61  kEventScope_LastValue = 0x7FFFFFFF
62  };
63 
65  {
68 
71 
74 
75  kEventErrorCode_LastValue = 0x7FFFFFFF
76  };
77 
78  struct CSXSEvent
79  {
81  const char* type;
86  const char* appId;
89  const char* extensionId;
91  const char* data;
92  CSXSEvent() : data(nil), extensionId(nil), appId(nil), type(nil), scope(kEventScope_Application)
93  {}
94  CSXSEvent(const CSXSEvent& other) = default;
95  };
96 
97  typedef void (*EventListenerFn) (const CSXSEvent* const csxsEvent, void* const context);
98 
106  virtual CSXSEventErrorCode AddPlugPlugEventListener(const char* type, EventListenerFn eventListener, void* const context ) = 0 ;
107 
108 
115  virtual CSXSEventErrorCode RemovePlugPlugEventListener(const char* type, EventListenerFn eventListener, void* const context ) = 0 ;
116 
117 
127  virtual CSXSEventErrorCode DispatchPlugPlugEvent(const CSXSEvent * const csxsEvent) const = 0;
128 
129 } ;
130 
131 #endif