InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ScriptingID.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Jonathan W. Brown
6 //
7 // $Author$
8 //
9 // $DateTime$
10 //
11 // $Revision$
12 //
13 // $Change$
14 //
15 // Copyright 1997-2010 Adobe Systems Incorporated. All rights reserved.
16 //
17 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance
18 // with the terms of the Adobe license agreement accompanying it. If you have received
19 // this file from a source other than Adobe, then your use, modification, or
20 // distribution of it requires the prior written permission of Adobe.
21 //
22 //
23 // Info: Contains IDs used by the scripting architecture.
24 //
25 //========================================================================================
26 
27 #ifndef __SCRIPTINGID__
28 #define __SCRIPTINGID__
29 
30 #include "CrossPlatformTypes.h"
31 #include "IDFactory.h"
32 #include "FormatNumber.h"
33 
34 #define kScriptingPrefix RezLong(0x7700)
35 
36 //**********************************************************************************************************
37 // RsrcID
38 //**********************************************************************************************************
39 #define kScriptIconResID 129
40 #define kScriptingStringsRsrcID 7000
41 #define kScriptingStringsNoTransRsrcID 7100
42 #define kScriptErrorStringTableRsrcID 7002
43 
44 //**********************************************************************************************************
45 // PluginID
46 //**********************************************************************************************************
47 #define kScriptPluginName "Scripting"
48 
49 //**********************************************************************************************************
50 // ClassIDs
51 //**********************************************************************************************************
52 
53 //**********************************************************************************************************
54 // IIDs
55 //**********************************************************************************************************
56 
57 // IID_ISCRIPT_LABEL and IID_ISCRIPT_KEY_DPS are faux messages generated to let the client listeners know what kind of script key change occurred.
58 // If a DPS label changes or gets deleted, then IID_ISCRIPT_KEY_DPS is sent to clients, else IID_ISCRIPT_LABEL is generated.
59 // In CS6, the only known listener is the sharedContent plug-in which uses this to distinguish between DPS and non-DPS keys.
60 
61 //**********************************************************************************************************
62 // Implementation IDs
63 //**********************************************************************************************************
64 //gap
65 //gap
66 //gap
67 //gap
68 //gap
69 //gap
70 
71 // Service IDs
72 
73 // <Performance Metric IDs>
74 
75 
76 //**********************************************************************************************************
77 // DontShowAlertIDs
78 //**********************************************************************************************************
79 
80 #define kDontShowEventListenerErrorAlert kScriptingPrefix + 1
81 
82 //**********************************************************************************************************
83 // Error Codes
84 //**********************************************************************************************************
85 
86  //********* The following errors don't have string entries in our string table.
87  //We use the defined ID as a core id but intercept the errors within each
88  //scripting client in order to returning a client-specific error.
89 #define kFirstScriptErrorWithoutString kScriptingPrefix + 1
90 #define kLastScriptErrorWithoutString kScriptingPrefix + 5
91 
92  //********* Script Architecture Errors are those related to misuse of the scripting architecture.
93 #define kFirstScriptArchitectureError kScriptingPrefix + 6
94  //gap
95  //gap
96  //gap
97 #define kLastScriptArchitectureError kScriptingPrefix + 149
98 
99  //********* User-oriented Errors are those that a non-scripting language client of the scripting
100  //architecture (e.g., Action Automation) can safely display to a user; generally they are errors
101  //related to feature functionality rather than to misuse of the scripting architecture.
102 #define kFirstUserOrientedScriptError kScriptingPrefix + 150
103  //gap
104 #define kLastUserOrientedScriptError kScriptingPrefix + 255
105 
106 //**********************************************************************************************************
107 // Script Element IDs
108 //**********************************************************************************************************
109 
110 //Types
111 #define kScriptInfoFirstBaseType kScriptingPrefix + 0
112 //If you add a new type, you need to handle it in a couple of core places:
113 // CScriptManager::AppendBaseTypeAsString
114 // ScriptInfo::TypeInfo::IsValidValue
115 //Also, update any scripting clients that include this type in their DOM.
116 #define kScriptInfoLastBaseType kScriptingPrefix + 15
117 #define kScriptInfoAbstractArrayType kScriptInfoLastBaseType + 1
118 
119 #ifdef DEBUG
120 #endif
121 
122 //Suites
123 
124 //Objects
125 
126 //Metadata
127 
128 //Events
129 
130 //Methods
131 //gap
132 
133 //Functions
134 
135 //Properties
136 
137 //Enums
138 
139 //TypeDefs
140 
141 //Scripting Args
142 
143 enum ScriptingScriptIDs
144 {
145  t_IDUIColorType = 'IDCT',
146  t_TransformMatrixType = 'MTXT',
147  t_RectangleBoundsType = 'RBDT',
148  t_PathPointType = 'PPTT',
149  t_PointType = 'PNTT',
150  t_GeoPathType = 'GPTT',
151  t_KeyValuePairType = 'KVPT',
152  t_GeometryType = 'GEOT',
153  t_UnitPointType = 'UPTT',
154  t_UnitRecBoundsType = 'URBT',
155  t_NameValuePairType = 'NVPT',
156 
157  c_NonIDBased = 'noID',
158  c_IDBased = 'nuID',
159  c_UIDBased = 'unID',
160  c_Root = 'ROOT',
161  c_Object = 'BObj',
162  c_Objects = 'OBJS',
163  c_PrefsObject = 'PObj',
164  c_PrefsObjects = 'Prfs',
165  c_Event = 'evnt',
166  c_Events = 'evts',
167  c_EventListener = 'EvLi',
168  c_EventListeners = 'EvLs',
169  c_IdleEvent = 'IdEv',
170  c_MutationEvent = 'EvMu',
171  c_IdleTask = 'ITsk',
172  c_IdleTasks = 'ITks',
173 
174  e_AddEventListener = 'eAEL',
175  e_RemoveEventListener = 'eREL',
176  e_StopPropagation = 'eStP',
177  e_PreventDefault = 'ePrD',
178 
179  e_OnIdle = 'OnId',
180  e_AfterAttributeChanged = 'AfAC',
181  e_BeforeNew = 'bfNw',
182  e_AfterNew = 'afNw',
183  e_BeforeDelete = 'BfDl',
184  e_AfterDelete = 'AfDl',
185  e_BeforeMove = 'BfMv',
186  e_AfterMove = 'AfMv',
187 
188  f_HandleEvent = 'eHEv',
189 
190  p_EventType = 'pEvT',
191  p_Handler = 'pHnd',
192  p_EventData = 'pEvD',
193  p_Target = 'Xtrg',
194  p_CurrentTarget = 'pCur',
195  p_EventPhase = 'pEvP',
196  p_Captures = 'pCps',
197  p_Bubbles = 'pBus',
198  p_Cancelable = 'pCan',
199  p_TimeStamp = 'pTim',
200  p_PropagationStopped = 'pPSp',
201  p_DefaultPrevented = 'pDPr',
202  p_AttributeName = 'Xatn',
203  p_AttributeValue = 'AtVl',
204  p_Sleep = 'Slep',
205  p_TimeAllocated = 'TmAl',
206  p_Status = 'stts',
207  p_Size = 'dsiz', //kAEGetDataSize in AERegistry.h
208  p_Date = 'sdte',
209 
210  en_EventPhase = 'enEP',
211  en_NotDispatching = 'enND',
212  en_CapturingPhase = 'enCp',
213  en_AtTarget = 'enAT',
214  en_BubblingPhase = 'enBu',
215  en_DoneDispatching = 'enDD',
216 
217  p_UndoMode = 'pSUM',
218  en_UndoMode = 'eSUM',
219  en_UndoScriptRequest = 'eSrU',
220  en_UndoEntireScript = 'eScU',
221  en_AutoUndoScript = 'eSaU',
222  en_FastUndoEntireScript = 'eSfU',
223 
224  p_UserInteraction = 'UIAc',
225  en_UserInteraction = 'elnt',
226  en_NeverInteract = 'eNvr',
227  en_InteractWithSelf = 'eInS',
228  en_InteractWithLocal = 'eInL',
229  en_InteractWithAll = 'eInA',
230  en_InteractWithAlerts = 'eInB',
231 
232  m_HideFromPublishedDOM = 'HFPD',
233  m_SkipVerification = 'SkpV',
234  m_AddNothingEnumToProperties = 'ANEP',
235  m_DontAddNothingEnum = 'DANE',
236  m_IgnoreForGetProperties = 'IFGP',
237  m_AllowWithModalDialog = 'AWMD',
238 
239  // Scripting prefs
240  p_ScriptPrefs = 'pScr',
241  p_ScriptsList = 'Slst',
242  p_ScriptsFolder = 'SFdr',
243  p_CurrentScriptUndoMode = 'CSUM',
244  p_MeasurementUnit = 'MtUt',
245 
246  // Performance metrics
247  en_AttachableEventCount = 'AECt',
248  en_AttachedScriptsCount = 'ASCt',
249  en_DispatchEventTime = 'DETm',
250 };
251 
252 //GUIDS
253 // {CF550CEA-6B35-47b3-9149-5819BF3E7F35}
254 #define kObjects_CLSID { 0xcf550cea, 0x6b35, 0x47b3, { 0x91, 0x49, 0x58, 0x19, 0xbf, 0x3e, 0x7f, 0x35 } }
255 // {C6C9874C-08B6-4901-9503-86B283BD28BE}
256 #define kObject_CLSID { 0xc6c9874c, 0x8b6, 0x4901, { 0x95, 0x3, 0x86, 0xb2, 0x83, 0xbd, 0x28, 0xbe } }
257 // {5919318D-FF15-43f7-8870-489572876084}
258 #define kNonIDBasedObject_CLSID { 0x5919318d, 0xff15, 0x43f7, { 0x88, 0x70, 0x48, 0x95, 0x72, 0x87, 0x60, 0x84 } }
259 // {53658867-DC21-4eac-9BDE-F531A4826880}
260 #define kIDBasedObject_CLSID { 0x53658867, 0xdc21, 0x4eac, { 0x9b, 0xde, 0xf5, 0x31, 0xa4, 0x82, 0x68, 0x80 } }
261 // {D8035C7E-E73C-4615-B277-5CBF27E5C125}
262 #define kUIDBasedObject_CLSID { 0xd8035c7e, 0xe73c, 0x4615, { 0xb2, 0x77, 0x5c, 0xbf, 0x27, 0xe5, 0xc1, 0x25 } }
263 // {88EB691E-8FE2-4f37-BDDF-05441748B180}
264 #define kRootObject_CLSID { 0x88eb691e, 0x8fe2, 0x4f37, { 0xbd, 0xdf, 0x5, 0x44, 0x17, 0x48, 0xb1, 0x80 } }
265 // {4964C0C5-3DDA-425b-B943-3BCA8469E6B9}
266 #define kPrefsObject_CLSID { 0x4964c0c5, 0x3dda, 0x425b, { 0xb9, 0x43, 0x3b, 0xca, 0x84, 0x69, 0xe6, 0xb9 } }
267 // {D6F21922-A644-46cf-8B21-B7112ACDD69B}
268 #define kPrefsObjects_CLSID { 0xd6f21922, 0xa644, 0x46cf, { 0x8b, 0x21, 0xb7, 0x11, 0x2a, 0xcd, 0xd6, 0x9b } }
269 // {3C5D982B-F5F2-40d7-AC27-991D1A532E04}
270 #define kScriptPrefs_CLSID { 0x3c5d982b, 0xf5f2, 0x40d7, { 0xac, 0x27, 0x99, 0x1d, 0x1a, 0x53, 0x2e, 0x4 } }
271 // {A02E541B-40B3-44a9-921C-9DEC0898EAB2}
272 #define kScriptArgs_CLSID { 0xa02e541b, 0x40b3, 0x44a9, { 0x92, 0x1c, 0x9d, 0xec, 0x8, 0x98, 0xea, 0xb2 } }
273 // {83E3CEE7-839D-460b-B014-978C020C95CF}
274 #define kEventListener_CLSID { 0x83e3cee7, 0x839d, 0x460b, { 0xb0, 0x14, 0x97, 0x8c, 0x2, 0xc, 0x95, 0xcf } }
275 // {66503A71-3620-4c50-AFD2-16743353D5A5}
276 #define kEventListeners_CLSID { 0x66503a71, 0x3620, 0x4c50, { 0xaf, 0xd2, 0x16, 0x74, 0x33, 0x53, 0xd5, 0xa5 } }
277 // {CD89E052-7CED-474a-B183-CC353B4BFE3A}
278 #define kEvent_CLSID { 0xcd89e052, 0x7ced, 0x474a, { 0xb1, 0x83, 0xcc, 0x35, 0x3b, 0x4b, 0xfe, 0x3a } }
279 // {7E528261-8EA4-42d0-9955-8CED430317C9}
280 #define kEvents_CLSID { 0x7e528261, 0x8ea4, 0x42d0, { 0x99, 0x55, 0x8c, 0xed, 0x43, 0x3, 0x17, 0xc9 } }
281 // {DA1486FD-37B4-4642-A751-023322D17EC2}
282 #define kIdleEvent_CLSID { 0xda1486fd, 0x37b4, 0x4642, { 0xa7, 0x51, 0x2, 0x33, 0x22, 0xd1, 0x7e, 0xc2 } }
283 // {507774AA-EE26-4d66-B035-B15745A7E12A}
284 #define kMutationEvent_CLSID { 0x507774aa, 0xee26, 0x4d66, { 0xb0, 0x35, 0xb1, 0x57, 0x45, 0xa7, 0xe1, 0x2a } }
285 // {F66681FE-7936-42c2-8928-ECF5BC17DC04}
286 #define kIdleTask_CLSID { 0xf66681fe, 0x7936, 0x42c2, { 0x89, 0x28, 0xec, 0xf5, 0xbc, 0x17, 0xdc, 0x4 } }
287 // {1E048FE5-5927-4698-A686-5E13F68F0250}
288 #define kIdleTasks_CLSID { 0x1e048fe5, 0x5927, 0x4698, { 0xa6, 0x86, 0x5e, 0x13, 0xf6, 0x8f, 0x2, 0x50 } }
289 
290 #endif