home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 March / macformat-022.iso / Shareware City / Science / RasMol2 / graphics.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-28  |  3.2 KB  |  184 lines  |  [TEXT/KAHL]

  1. /* graphics.h
  2.  * RasMol2 Molecular Graphics
  3.  * Roger Sayle, October 1994
  4.  * Version 2.5
  5.  */
  6.  
  7. #ifdef APPLEMAC      
  8. #define InitialWide  400
  9. #define InitialHigh  400
  10. #endif
  11.  
  12. #ifdef IBMPC
  13. #define InitialWide  480
  14. #define InitialHigh  480
  15. #endif
  16.  
  17. #ifndef InitialWide
  18. #define InitialWide  576
  19. #define InitialHigh  576
  20. #endif
  21.  
  22.  
  23. #ifdef EIGHTBIT
  24. #define LutSize  256
  25. #else
  26. #define LutSize  1024
  27. #endif
  28.  
  29.  
  30. #define RFRotateX  0x0001
  31. #define RFRotateY  0x0002
  32. #define RFRotateZ  0x0004
  33. #define RFZoom     0x0008
  34. #define RFTransX   0x0010
  35. #define RFTransY   0x0020
  36. #define RFTransZ   0x0040
  37. #define RFSlab     0x0080
  38. #define RFReSize   0x0100
  39. #define RFPoint    0x0200
  40. #define RFColour   0x0400
  41. #define RFRefresh  0x0800
  42.  
  43. #define RFTrans    0x0070
  44. #define RFRotate   0x0007
  45. #define RFApply    0x017F
  46. #define RFDials    0x00FF
  47. #define RFMagnify  0x0108
  48. #define RFInitial  0x01FF
  49.  
  50.  
  51. #define MMRasMol   0x00
  52. #define MMInsight  0x01
  53. #define MMQuanta   0x02
  54.  
  55.  
  56. #define ButMax   8
  57.  
  58.  
  59. #ifdef GRAPHICS
  60. double DialValue[8];
  61. int WinHigh, WinWide;
  62. int PointX, PointY;
  63. int XRange, WRange;
  64. int YRange, HRange;
  65. int UseHourGlass;
  66. int DisableMenu;
  67. int ReDrawFlag;
  68. int MouseMode;
  69. int Range;
  70.  
  71. Pixel Lut[LutSize];
  72. Byte RLut[LutSize];
  73. Byte GLut[LutSize];
  74. Byte BLut[LutSize];
  75. Byte ULut[LutSize];
  76.  
  77.  
  78. #ifdef IBMPC
  79. HWND CanvWin;
  80. HBITMAP PixMap;
  81. HPALETTE ColourMap;
  82. LOGPALETTE __far *Palette;
  83. #endif /* IBMPC */
  84.  
  85. #ifdef APPLEMAC
  86. ControlHandle HScroll;
  87. ControlHandle VScroll;
  88. CursHandle CanvCursor;
  89. CursHandle CmndCursor;
  90. CursHandle WaitCursor;
  91. WindowPtr CanvWin;
  92. WindowPtr CmndWin;
  93. THPrint PrintHand;
  94. #endif /* APPLEMAC */
  95.  
  96. #else /* GRAPHICS */
  97. extern double DialValue[8];
  98. extern int WinHigh, WinWide;
  99. extern int PointX, PointY;
  100. extern int XRange, WRange;
  101. extern int YRange, HRange;
  102. extern int UseHourGlass;
  103. extern int DisableMenu;
  104. extern int ReDrawFlag;
  105. extern int MouseMode;
  106. extern int Range;
  107.  
  108. extern Pixel Lut[LutSize];
  109. extern Byte RLut[LutSize];
  110. extern Byte GLut[LutSize];
  111. extern Byte BLut[LutSize];
  112. extern Byte ULut[LutSize];
  113.  
  114.  
  115. #ifdef IBMPC
  116. extern HWND CanvWin;
  117. extern HBITMAP PixMap;
  118. extern HPALETTE ColourMap;
  119. extern LOGPALETTE __far *Palette;
  120. #endif /* IBMPC */
  121.  
  122. #ifdef APPLEMAC
  123. extern ControlHandle HScroll;
  124. extern ControlHandle VScroll;
  125. extern CursHandle CanvCursor;
  126. extern CursHandle CmndCursor;
  127. extern CursHandle WaitCursor;
  128. extern WindowPtr CanvWin;
  129. extern WindowPtr CmndWin;
  130. extern THPrint PrintHand;
  131. #endif /* APPLEMAC */
  132.  
  133.  
  134. #ifdef FUNCPROTO
  135. int CreateImage();
  136. void TransferImage();
  137. int ClipboardImage();
  138. void ClearImage();
  139. int PrintImage();
  140.  
  141. void AllocateColourMap();
  142. void UpdateScrollBars();
  143. int LookUpColour( char*, int*, int*, int* );
  144. void SetMouseMode( int );
  145. void EnableMenus( int );
  146. void CloseDisplay();
  147. void BeginWait();
  148. void EndWait();
  149.  
  150. #ifdef IBMPC
  151. int OpenDisplay( HANDLE, int );
  152. #else
  153. int OpenDisplay( int, int );
  154. #endif
  155.  
  156. #if !defined(IBMPC) && !defined(APPLEMAC)
  157. int FetchEvent( int );
  158. #endif
  159.  
  160. #else /* non-ANSI C compiler */
  161. int CreateImage();
  162. void TransferImage();
  163. int ClipboardImage();
  164. void ClearImage();
  165. int PrintImage();
  166.  
  167. int OpenDisplay();
  168. void AllocateColourMap();
  169. void UpdateScrollBars();
  170. int LookUpColour();
  171. void SetMouseMode();
  172. void EnableMenus();
  173. void CloseDisplay();
  174. void BeginWait();
  175. void EndWait();
  176.  
  177. #if !defined(IBMPC) && !defined(APPLEMAC)
  178. int FetchEvent();
  179. #endif
  180.  
  181. #endif
  182. #endif /* GRAPHICS */
  183.  
  184.