home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / ODF / OS / FWGraphx / SLGDev.h < prev    next >
Encoding:
Text File  |  1996-09-17  |  2.8 KB  |  113 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                SLGDev.h
  4. //    Release Version:    $ ODF 2 $
  5. //
  6. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef SLGDEV_H
  11. #define SLGDEV_H
  12.  
  13. #ifndef FWSTDDEF_H
  14. #include "FWStdDef.h"
  15. #endif
  16.  
  17. #ifndef FWFXMATH_H
  18. #include "FWFxMath.h"
  19. #endif
  20.  
  21. #ifndef SLGCONST_K
  22. #include "SLGConst.k"
  23. #endif
  24.  
  25. #ifndef SLSHATTR_H
  26. #include "SLShAttr.h"
  27. #endif
  28.  
  29. #ifndef SLGRDEF_H
  30. #include "SLGrDef.h"
  31. #endif
  32.  
  33. #ifndef SLPTRECT_H
  34. #include "SLPtRect.h"
  35. #endif
  36.  
  37. // ----- OpenDoc Includes -----
  38.  
  39. #ifndef SOM_ODCanvas_xh
  40. #include <Canvas.xh>
  41. #endif
  42.  
  43. #ifndef SOM_ODTransform_xh
  44. #include <Trnsform.xh>
  45. #endif
  46.  
  47. //========================================================================================
  48. // Related types
  49. //========================================================================================
  50.  
  51. struct FW_SPrivDeviceState;
  52. struct FW_SPrivSuspendResumeState;
  53.  
  54. #ifdef FW_BUILD_MAC
  55. #define FW_SPrivSuspendResumeState    FW_SPrivDeviceState
  56. #endif
  57.  
  58. //========================================================================================
  59. // Graphics device
  60. //========================================================================================
  61.  
  62. class FW_CPrivGraphicsDevice;
  63. typedef FW_CPrivGraphicsDevice* FW_HGDevice;
  64.  
  65. // Export or Import functions for CFM-68K [sfu]
  66.  
  67. #if defined(FW_ODFLIB_IMPORT)
  68. #pragma import on
  69. #elif defined(FW_ODFLIB)
  70. #pragma export on
  71. #endif
  72.  
  73. FW_EXTERN_C_BEGIN
  74.  
  75. // Creation
  76.  
  77. FW_HGDevice            SL_API        FW_PrivGDev_CreateFromODCanvas(Environment *ev, ODCanvas* odCanvas);
  78. FW_HGDevice            SL_API        FW_PrivGDev_CreateFromPlatformCanvas(Environment *ev, ODPlatformCanvas platformCanvas);
  79.  
  80. // Ref counting
  81.  
  82. void                SL_API        FW_PrivGDev_Acquire(FW_HGDevice gdev);
  83. void                SL_API        FW_PrivGDev_Release(FW_HGDevice gdev);
  84.  
  85. // Attributes
  86.  
  87. ODPlatformCanvas    SL_API        FW_PrivGDev_GetPlatformCanvas(FW_HGDevice gdev);
  88. FW_PlatformError    SL_API        FW_PrivGDev_GetFontMetrics(FW_HGDevice gdev, FW_HFont font, FW_PlatformFontMetrics& metrics);
  89. FW_PlatformError    SL_API        FW_PrivGDev_GetResolution(FW_HGDevice gdev, FW_SPoint& pt);
  90.  
  91. // Suspend/resume
  92.  
  93. FW_SPrivSuspendResumeState*        SL_API    FW_PrivGDev_Suspend(FW_HGDevice gdev, FW_PlatformError* error);
  94. void                            SL_API    FW_PrivGDev_Resume(FW_HGDevice gdev, FW_SPrivSuspendResumeState *suspendResumeState, FW_PlatformError* error);
  95.  
  96. // Operations
  97.  
  98. FW_PlatformError    SL_API        FW_PrivGDev_SetResolution(FW_HGDevice gdev, FW_Fixed x, FW_Fixed y);
  99. void                SL_API        FW_PrivGDev_CanvasChanged(FW_HGDevice gdev, Environment *ev, ODCanvas* canvas);
  100.  
  101. FW_EXTERN_C_END
  102.  
  103. // For CFM-68K [sfu]
  104.  
  105. #if defined(FW_ODFLIB_IMPORT)
  106. #pragma import off
  107. #elif defined(FW_ODFLIB)
  108. #pragma export off
  109. #endif
  110.  
  111.  
  112. #endif // SLGDEV_H
  113.