home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 April: Mac OS SDK / Dev.CD Apr 96 SDK / Dev.CD Apr 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc Development Framework / ODFDev / ODF / OS / FWGraphx / Include / FWGrDef.h < prev    next >
Encoding:
Text File  |  1995-11-08  |  2.6 KB  |  112 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWGrDef.h
  4. //    Release Version:    $ 1.0d11 $
  5. //
  6. //    Copyright:    © 1993, 1995 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef FWGRDEF_H
  11. #define FWGRDEF_H
  12.  
  13. #ifndef FWSTDDEF_H
  14. #include "FWStdDef.h"
  15. #endif
  16.  
  17. // ----- OpenDoc Includes -----
  18.  
  19. #if !defined(_QDFIX_) && defined(FW_BUILD_MAC)
  20. #include <QDFixM.h>
  21. #endif
  22.  
  23. // ----- Platform Includes -----
  24.  
  25. #if !defined(__TYPES__) && defined(FW_BUILD_MAC)
  26. #include <Types.h>
  27. #endif
  28.  
  29. #if !defined(__LOWMEM__) && defined(FW_BUILD_MAC)
  30. #include <LowMem.h>
  31. #endif
  32.  
  33. #if !defined(__QUICKDRAW__) && defined(FW_BUILD_MAC)
  34. #include <Quickdraw.h>
  35. #endif
  36.  
  37. #if defined(FW_BUILD_WIN) && !defined(_INC_WINDOWS)
  38. #include <windows.h>
  39. #endif
  40.  
  41. #if defined(FW_BUILD_MAC) && !defined(__QDOFFSCREEN__)
  42. #include <QDOffScreen.h>
  43. #endif
  44.  
  45. #if FW_LIB_EXPORT_PRAGMAS
  46. #pragma lib_export on
  47. #endif
  48.  
  49. #ifdef FW_BUILD_MAC
  50. typedef    PicHandle                FW_PlatformPict;
  51. typedef    GWorldPtr                FW_PlatformBitmap;
  52. typedef    Handle                    FW_PlatformIcon;        // Icon suite
  53. #endif
  54.  
  55. #ifdef FW_BUILD_WIN
  56. typedef    HENHMETAFILE            FW_PlatformPict;
  57. typedef    HBITMAP                    FW_PlatformBitmap;
  58. typedef    HICON                    FW_PlatformIcon;
  59. #endif
  60.  
  61. #if FW_LIB_EXPORT_PRAGMAS
  62. #pragma lib_export off
  63. #endif
  64.  
  65. //========================================================================================
  66. //    Forward class declarations
  67. //========================================================================================
  68.  
  69. class FW_CLASS_ATTR FW_CGraphicContext;
  70.  
  71. //========================================================================================
  72. //    struct FW_SDeviceState
  73. //========================================================================================
  74.  
  75. struct FW_SDeviceState
  76. {
  77. #ifdef FW_BUILD_WIN
  78.     POINT                    fWindOrg;
  79.     WORD                    fMapMode;
  80. #endif
  81. #ifdef FW_BUILD_MAC
  82.     // ----- if our port is not the current port fPreviousPlatformCanvas != NULL -----
  83.     ODPlatformCanvas        fPreviousPlatformCanvas;
  84.     
  85.     // ----- if our port was the current port (fPreviousPlatformCanvas==NULL) save its state below -----
  86.     ODRgnHandle                fClip;
  87.     Point                    fOrigin;
  88.     
  89.     FW_Boolean                fSuspended;
  90.  
  91.     FW_CGraphicContext*        fSavedContext;
  92. #endif
  93. };
  94.  
  95. //========================================================================================
  96. //    struct FW_SSuspendResumeState
  97. //========================================================================================
  98.  
  99. #ifdef FW_BUILD_WIN
  100. struct FW_SSuspendResumeState
  101. {
  102.     int                        fSavedDC;
  103.     FW_CGraphicContext*        fSavedContext;
  104. };
  105. #endif
  106.  
  107. #ifdef FW_BUILD_MAC
  108. #define FW_SSuspendResumeState    FW_SDeviceState
  109. #endif
  110.  
  111. #endif
  112.