InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
GraphicsExternal.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Greg St. Pierre (for lack of someone better)
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 // GraphicsExternal.h
24 //
25 // Data types and structures for use by external developers.
26 //
27 //========================================================================================
28 
29 #ifndef __BravoExternal__
30 #define __BravoExternal__
31 
32 #ifndef _H_AGMTypes
33 #ifndef _H_AGMPrint
34 
35 #include "BravoForwardDecl.h"
36 
37 #define AGMPrintAPIVersion 3 /* API version number */
38 #define PS_INK_NAME_MAX 32 /* max #of chars in an ink name */
39 
40 #define kAGMPrintMinNDensity 0.001
41 #define kAGMPrintMaxNDensity 10.0
42 #define kAGMPrintMinAngle 0
43 #define kAGMPrintMaxAngle 360
44 #define kAGMPrintMinBlkDen 0.001
45 #define kAGMPrintMaxBlkDen 10.0
46 #define kAGMPrintMinBlkColor 0.0
47 #define kAGMPrintMaxBlkColor 100.0
48 #define kAGMPrintMinTrapWid 0
49 #define kAGMPrintMaxTrapWid 8.0
50 #define kOnHostMaxTrapWid 4.0
51 #define kAGMPrintMinBlackWidth 0
52 #define kAGMPrintDefaultBlkWidthScaleFator 1.0
53 #define kAGMPrintMinDPI 36
54 #define kAGMPrintMaxDPI 10000
55 
56 // declare structs in the bib namespace -- this prevents
57 // us from getting ambiguous declaration compiler errors.
58 // rcook - below are the structs giving SDK samplecode a problem.
59 BEGIN_BIB_NAMESPACE
60 
61 typedef struct _t_AGMFloatRect {
62  float xMin;
63  float yMin;
64  float xMax;
65  float yMax;
66 } AGMFloatRect;
67 
68 
69 typedef struct _t_AGMFloatPoint {
70  float x;
71  float y;
73 
74 #define kGrayColorSpace 0
75 #define kRGBColorSpace 1
76 #define kCMYKColorSpace 2
77 #define kLabColorSpace 3
78 
97 #define kColorSpaceHasAlpha 16
98 #define kColorSpaceSwapAlpha 0x200
99 
100 typedef struct _t_AGMInt16Rect {
101  int16 xMin;
102  int16 yMin;
103  int16 xMax;
104  int16 yMax;
105 } AGMInt16Rect;
106 
107 typedef struct _t_AGMColorTab {
108  int32 numColors;
109  void* theColors;
110 } AGMColorTab;
111 
112 
113 typedef struct _t_AGMImageRecord {
114  AGMInt16Rect bounds;
115  void* baseAddr;
116  int32 byteWidth;
117  int16 colorSpace;
118  int16 bitsPerPixel;
119  float* decodeArray; // can be nil - used to be Fixed*
120  AGMColorTab colorTab;
122 
123 //
124 // Progress constants
125 // Possible ProgressProcPtr "process" values and their meanings (see IPrintCmdData.h)
126 //
127 enum {
128  kAGMPPopLastProgress,
129  kAGMPPushCompilingDocumentResources,
130  kAGMPPushCompilingPageResources,
131  kAGMPPushStreamingDocumentFont,
132  kAGMPPushStreamingDocumentResource,
133  kAGMPPushStreamingPageFont,
134  kAGMPPushStreamingPageResource,
135  kAGMPPushStreamingPageContent,
136  kAGMPPushStreamingPageEpilogue,
137  kAGMPPushStreamingDocumentEpilogue,
138  kAGMPPushStreamingDocumentProcset,
139  kAGMPPushStreamingPageSeparation,
140  kAGMPPushStreamingPageImage,
141  kAGMPPushStreamingPageImageOPI,
142  kAGMPPushStreamingPageCSA,
143  kAGMPPushStreamingPageCRD,
144  kAGMPPushStreamingPageGradient,
145  kAGMPPushOnHostTrapBeginPage,
146  kAGMPSetOnHostTrapProgressPercent,
147  kAGMPStreamingPageImageProgressPercent
148 };
149 /*
150 kAGMPPushCompilingDocumentResources:
151 
152  This typically happens during the first pass of a two pass
153  process. It is compiling the description of resources that
154  are used by the entire document.
155 
156 kAGMPPushCompilingPageResources
157 
158  This typically happens during the first pass of a two pass
159  process. It is compiling the description of resources that
160  are used by a particular page.
161 
162 kAGMPPushStreamingDocumentFont
163 
164  It is sending out a description of a font that will be used
165  across the entire document. For this call:
166 
167  name = name of font (a C string)
168 
169 kAGMPPushStreamingDocumentResource
170 
171  It is sending out a non-font resource that is used across
172  the entire document. For this call:
173 
174  name = name of resource (a C string), or null if no name exists
175 
176 kAGMPPushStreamingPageFont
177 
178  It is sending a description of a font that is used on this
179  page only. For this call:
180 
181  name = name of font (a C string)
182 
183 kAGMPPushStreamingPageResource
184 
185  It is sending out a non-font resource that is used for
186  this page only. For this call:
187 
188  name = name of resource (a C string), or null if no name exists
189 
190 kAGMPPushStreamingPageContent
191 
192  It is sending out the description of a page.
193 
194 kAGMPPushStreamingPageEpilogue
195 
196  It is sending things that go at the end of a page (like
197  showpage stuff).
198 
199 kAGMPPushStreamingDocumentEpilogue
200 
201  It is sending things that go at the end of a document.
202 
203 kAGMPPushStreamingDocumentProcset
204 
205  It is sending out a procset needed by the document. For this call:
206 
207  name = 0 or filename (if procset is external)
208 
209 kAGMPPushStreamingPageSeparation
210 
211  It is beginning a separation. For this call:
212 
213  name = current plate name (char *, PS_INK_NAME_MAX chars)
214 
215 kAGMPPushStreamingPageImage
216 
217  It is sending out the description of an image.
218 
219 kAGMPPushStreamingPageImageOPI
220 
221  It is sending out the description of an OPI image.
222 
223 kAGMPPushStreamingPageCSA
224 
225  It is sending out the description of a color space.
226 
227 kAGMPPushStreamingPageCRD
228 
229  It is sending out the description of a color rendering dictionary.
230 
231 kAGMPPushStreamingPageGradient
232 
233  It is sending out the description of a color gradient.
234 
235 
236  return value:
237 
238  kTrue if successful (continue processing), or kFalse if cancelled.
239 */
240 
241 //
242 // Error codes
243 // The errors below will be offsets from the constant kAGMErrorStartNumError (defined in PrintID.h)
244 //
245 enum {
247  kAGMPrtErrSuccess,
249  kAGMPrtErrSchema,
251  kAGMPrtErrInit,
253  kAGMPrtErrPPD,
255  kAGMPrtErrNoMem,
257  kAGMPrtErrUserAbort,
259  kAGMPrtErrEvtOrder,
261  kAGMPrtErrConfig,
263  kAGMPrtErrInvldArg,
265  kAGMPrtErrStream,
267  kAGMPrtErrUnsprtdDeviceType,
269  kAGMPrtErrGenrlPSErr,
271  kAGMPrtErrPrtrNotFound,
273  kAGMPrtErrDfltPrtrNotFound,
275  kAGMPrtErrNoPrtrsFound,
277  kAGMPrtErrOther,
279  kAGMPrtErrDiskFull,
281  kAGMPrtErrCatch,
288  kAGMPrtErrUnsupported = 0xFFFF
289 };
290 
291 END_BIB_NAMESPACE
292 
293 
294 #endif
295 #endif
296 
297 #endif