Go to the documentation of this file.
8 #ifndef SKETCHUP_COMMON_H_
9 #define SKETCHUP_COMMON_H_
72 #if defined(__APPLE__) || defined(__LINUX__)
73 #ifndef FOUNDATION_IMPORT
75 #endif // FOUNDATION_IMPORT
81 #ifndef DOXYGEN_SHOULD_SKIP_THIS
84 #if defined WIN32 && !defined GSLAPI_NO_EXPORTS
86 #ifdef GSLAPI_API_EXPORTS
87 #define SU_EXPORT __declspec(dllexport)
89 #define SU_EXPORT __declspec(dllimport)
90 #endif // GSLAPI_API_EXPORTS
95 #ifdef GSLAPI_API_EXPORTS
96 #define SU_EXPORT __attribute__((visibility("default")))
98 #define SU_EXPORT __attribute__((visibility("hidden")))
100 #endif // #if defined __APPLE__
102 #define DEFINE_SU_TYPE(TYPENAME) \
109 #endif // DOXYGEN_SHOULD_SKIP_THIS
114 #define SU_RESULT SU_EXPORT enum SUResult
127 #define SUIsValid(VARIABLE) ((VARIABLE).ptr != 0)
133 #define SUIsInvalid(VARIABLE) ((VARIABLE).ptr == 0)
138 #define SUSetInvalid(VARIABLE) (VARIABLE).ptr = 0
143 #define SUAreEqual(VARIABLE1, VARIABLE2) ((VARIABLE1).ptr == (VARIABLE2).ptr)
147 #if !defined(__STDC_HOSTED__) || (__STDC_HOSTED__ == 0)
150 typedef __int64 int64_t;
151 typedef __int32 int32_t;
152 typedef __int16 int16_t;
153 typedef unsigned __int32 uint32_t;
155 #error Unsupported compiler!
159 #endif // #if !defined(__STDC_HOSTED__) || (__STDC_HOSTED__ == 0)
166 #ifndef SU_SUPPRESS_DEPRECATION_WARNINGS
168 #define SU_DEPRECATED_FUNCTION(version_num) \
169 __declspec(deprecated("first deprecated in SketchUp API " version_num))
171 #define SU_DEPRECATED_FUNCTION(version_num) \
172 __attribute__((deprecated("first deprecated in SketchUp API " version_num)))
175 #define SU_DEPRECATED_FUNCTION(version_num)
178 #endif // SKETCHUP_COMMON_H_