InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
PMTypes.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Steve Pellegrin
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 // ABSTRACT:
24 // This file defines a set of types for use by all PageMaker applciations.
25 // See the comments below for the different types.
26 //
27 //========================================================================================
28 
29 #ifndef __PMTYPES__
30 #define __PMTYPES__
31 
32 #include "BaseType.h"
33 
34 #ifdef MACINTOSH
35 #include "MSysType.h"
36 #endif
37 #ifdef WINDOWS
38 #include "WSysType.h"
39 #endif
40 #ifdef WASM
41 #include "WasmSysType.h"
42 #endif
43 
44 #ifdef WASM
45 typedef uint32_t OSType;
46 #endif
47 
48 typedef OSType SysOSType;
49 
50 #if defined(MACINTOSH)
51 const SysOSType kAnyCreator = 0x3f3f3f3f; // this is four question marks, "?", as hex, so it isn't interpreted as a trigraph
52 const SysOSType kTextType = 'TEXT';
53 const SysOSType kAllTypes = 0x3f3f3f3f; // this is four question marks, "?", as hex, so it isn't interpreted as a trigraph
54 #endif
55 #if defined(WINDOWS)
56 const SysOSType kAnyCreator = 0;
57 const SysOSType kTextType = 0;
58 #endif
59 #if defined(WASM)
60 const SysOSType kAnyCreator = 0x3f3f3f3f;
61 const SysOSType kTextType = 0x3f3f3f3f;
62 #endif
63 
64 #include "SysFileType.h"
65 
66 #include "PMReal.h"
67 
68 const RsrcID kInvalidRsrcID = 0;
69 
70 class PMRsrcID
71 {
72  public:
73  PMRsrcID() : fId(kInvalidRsrcID),fPluginId(kInvalidPlugin) {}
74  PMRsrcID(const RsrcID rID, const PluginID& pluginID) : fId(rID),fPluginId(pluginID) {}
75  PMRsrcID(const PMRsrcID& other) : fId(other.fId),fPluginId(other.fPluginId) {}
76 
77  void operator=(const PMRsrcID& other) { fId = other.fId; fPluginId = other.fPluginId; }
78 
79  bool operator==(const PMRsrcID& other) const { return (fId == other.fId) && (fPluginId == other.fPluginId); }
80 
81  bool operator <(const PMRsrcID& rhs) const
82  {
83  if (fId != rhs.fId)
84  return fId < rhs.fId;
85  else
86  return fPluginId < rhs.fPluginId;
87  }
88 
89  RsrcID fId;
90  PluginID fPluginId;
91 
92 };
93 
95 #ifdef MACINTOSH
96  const GSysPoint kInvalidMousePoint(-kMaxInt16,-kMaxInt16);
97 #else
98  const GSysPoint kInvalidMousePoint = {-kMaxInt16,-kMaxInt16};
99 #endif
100 
101 #endif // __PMTYPES__