InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
CrossPlatformTypes.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Mouhammad Fakhoury
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 
24 #ifndef __CrossPlatformTypes__
25 #define __CrossPlatformTypes__
26 
27 
28 #ifdef __cplusplus
29 /*
30 //================================================================================
31 // Generic Macros when C++ compiler is invoked
32 //================================================================================
33 */
34 // Types that can be used in files that compiles for both C++ and Resource compiler such as ShuksanID.h
35 #define RezLong(n) ((int32)0 + n)
36 #elif defined __ODFRC__
37 #define RezLong
38  #include "GeneralBuildFlags.h" // make sure ODFRC gets important defines, like ID_DEPRECATED
39 #else
40 
41  #ifdef __PLIST__
42  /*
43  PList compiler (mac only) doesn't need any of this
44  */
45  #define RezLong(n) n
46 
47  #else
48  /*
49  //================================================================================
50  // Generic Macros when resource compiler is invoked
51  //================================================================================
52  */
53 
54  #include "CoreResTypes.h"
55 
56 
57  #ifdef MACINTOSH
58  #define RezLong
59  #else
60  #define RezLong(n) (0L+n)
61  #endif
62 
63 /*
64 //================================================================================
65 // Platform Error Table
66 //================================================================================
67 */
68 
69  #ifdef MACINTOSH
70  #define ResourcePetb Resource kPErrorTableType
71  #define AddPetb
72  #define BeginPetb {{
73  #define EndPetb }};
74  #else
75  #define ResourcePetb(resID,name,purgeable,preload) resID kPErrorTableType BEGIN name,"\0",
76  #define AddPetb "\0",
77  #define BeginPetb
78  #define EndPetb Add 0L."" END
79  #endif
80 
81 /*
82 //================================================================================
83 // User Error Table
84 //================================================================================
85 */
86 
87  #ifdef MACINTOSH
88  #define ResourceUetb Resource kUErrorTableType
89  #define AddUetb
90  #define BeginUetb {{
91  #define EndUetb }};
92  #else
93  #define ResourceUetb(resID,name,purgeable,preload) resID kUErrorTableType BEGIN name,"\0",
94  #define AddUetb "\0",
95  #define BeginUetb
96  #define EndUetb Add 0L."" END
97  #endif
98 
99 
100 #endif // __PLIST__
101 
102 #endif // __cplusplus || __ODFRC__
103 
104 #endif // __CrossPlatformTypes__
105