SketchUp SDK
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
slapi.h
Go to the documentation of this file.
1 // Copyright 2013 Trimble Navigation Ltd., All rights reserved.
2 // This file is intended for public distribution.
3 
4 #ifndef SLAPI_SLAPI_H_
5 #define SLAPI_SLAPI_H_
6 
361 enum SUResult {
363 
365 
367 
368 
370 
372 
373 
375 
376 
377 
379 
381 
382 
384 
385 
387 
388 
389 
391 
392 
394 };
395 
396 // Define a platform-independent UTF16 type.
397 #if defined(__APPLE__) || defined(__LINUX__)
398 #ifndef FOUNDATION_IMPORT
399 typedef unsigned short unichar;
400 #endif // FOUNDATION_IMPORT
401 #else // WIN32
402 #include <wtypes.h>
403 typedef wchar_t unichar;
404 #endif
405 
406 #ifndef DOXYGEN_SHOULD_SKIP_THIS
407 
408 #define SU_EXPORT
409 #if defined WIN32 && !defined GSLAPI_NO_EXPORTS
410 #undef SU_EXPORT
411 #ifdef GSLAPI_API_EXPORTS
412 #define SU_EXPORT __declspec(dllexport)
413 #else
414 #define SU_EXPORT __declspec(dllimport)
415 #endif // GSLAPI_API_EXPORTS
416 #endif // WINDOWS
417 
418 #if defined __APPLE__
419 #undef SU_EXPORT
420 #ifdef GSLAPI_API_EXPORTS
421 #define SU_EXPORT __attribute__ ((visibility("default")))
422 #else
423 #define SU_EXPORT __attribute__ ((visibility("hidden")))
424 #endif
425 #endif // #if defined __APPLE__
426 
427 #define DEFINE_SU_TYPE(TYPENAME) \
428  typedef struct { \
429  void *ptr; \
430  } TYPENAME;
431 
432 #define SU_RESULT SU_EXPORT enum SUResult
433 
434 #endif // DOXYGEN_SHOULD_SKIP_THIS
435 
440 #define SU_INVALID { 0 }
441 
446 #define SUIsInvalid(VARIABLE) (VARIABLE).ptr == 0
447 
451 #define SUSetInvalid(VARIABLE) (VARIABLE).ptr = 0
452 
456 #define SUAreEqual(VARIABLE1, VARIABLE2) ((VARIABLE1).ptr == (VARIABLE2).ptr)
457 
458 #include <stddef.h> // for size_t
459 
460 #if !defined(__STDC_HOSTED__) || (__STDC_HOSTED__ == 0)
461 // The host compiler does not implement C99
462 #ifdef WIN32
463 typedef __int64 int64_t;
464 typedef __int32 int32_t;
465 typedef __int16 int16_t;
466 #else
467 #error Unsupported compiler!
468 #endif
469 #else
470 #include <stdint.h>
471 #endif // #if !defined(__STDC_HOSTED__) || (__STDC_HOSTED__ == 0)
472 
473 #endif // SLAPI_SLAPI_H_