home *** CD-ROM | disk | FTP | other *** search
/ Inside Multimedia 1995 July / IMM0795.ISO / share / os2 / pmfract / src / pmfract.h < prev    next >
Text File  |  1994-01-24  |  21KB  |  550 lines

  1. /*----------------------
  2.    FRACTINT for PM
  3.    PMFRACT.H header file
  4.    05/24/91   Donald P. Egen
  5.   ----------------------*/
  6.  
  7. #define ID_RESOURCE  1
  8. #define ID_TIMER     1
  9. #define ID_EMESSAGEBOX 2
  10. #define ID_SYNCMSGBOX 3
  11. #define ID_BADNUMERIC 4
  12.  
  13. #define IDT_TEXT        1024
  14. #define IDT_HELP_INTRO   1         /* Introduction */
  15. #define IDT_HELP_TYPES   2         /* Fractal Types */
  16. #define IDT_HELP_EXTENT  3         /* Extents dialog help */
  17. #define IDT_HELP_PARAMS  4         /* Set Params dialog help */
  18. #define IDT_HELP_OPERATE 5         /* Operation help */
  19.  
  20. #define IDM_VIEW_MENU 29
  21. #define IDM_ZIN_MENU  28
  22. #define IDM_ZOUT_MENU 27
  23. #define IDM_ZIN_2    2       /* *** WARNING **** */
  24. #define IDM_ZIN_5    5       /* Code depends on values for IDM_ZIN_x */
  25. #define IDM_ZIN_10   10
  26. #define IDM_ZIN_PICK 9
  27. #define IDM_ZOUT_2   12      /*  .. and for IDM_ZOUT_x */
  28. #define IDM_ZOUT_5   15
  29. #define IDM_ZOUT_10  20
  30. #define IDM_ZOUT_PICK 19
  31. #define IDM_PAN       21
  32. #define IDM_ZIN_WIN   22
  33. #define IDM_ZOUT_WIN  23
  34.  
  35. #define IDM_FILE_MENU   30
  36. #define IDM_NEW_FRACTAL 31
  37. #define IDM_READ_FILE   32
  38. #define IDM_SAVE_FILE   33
  39. #define IDM_READ_3D     34
  40. #define IDM_READ_3DOVER 35
  41. #define IDM_PRINT_FILE  36
  42. #define IDM_READ_COLORMAP 37
  43. #define IDM_WRITE_COLORMAP 38
  44.  
  45. #define IDM_EDIT_MENU   40
  46. #define IDM_COPY_BMP    41
  47. #define IDM_COPY_MET    42
  48. #define IDM_PASTE       43
  49. #define IDM_CLEAR_CLPB  44
  50. #define IDM_CLPB_TEXT   45
  51. #define IDM_CLPB_BMP    46
  52. #define IDM_CLPB_MET    47
  53.  
  54. #define IDM_OPTIONS_MENU 50
  55. #define IDM_SET_EXTENTS  51
  56. #define IDM_SET_SWAP     52
  57. #define IDM_SET_PARAMS   53
  58. #define IDM_SET_OPTIONS  54
  59. #define IDM_SET_RESET    55
  60. #define IDM_SET_IMAGE    56
  61. #define IDM_SET_PALETTE  57
  62.  
  63. #define IDM_HELP         60
  64. #define IDM_HELP_INTRO   61
  65. #define IDM_HELP_FRACTTYPE 62
  66. #define IDM_HELP_OPERATE 63
  67.  
  68. #define IDM_FREEZE_HALT  95
  69. #define IDM_GO           96
  70.  
  71. #define IDM_ABOUT       99
  72.  
  73. #define IDD_ABOUT    110
  74. #define IDD_NUMBER_PICK 120
  75. #define IDD_NUMBER_PROMPT 121
  76. #define IDD_NUMBER_EF   122
  77.  
  78. #define IDD_SET_EXTENTS 130
  79. #define IDD_SET_XLEFT   132
  80. #define IDD_SET_XRIGHT  133
  81. #define IDD_SET_YTOP    134
  82. #define IDD_SET_YBOTTOM 135
  83. #define IDD_SET_XCENTER 136
  84. #define IDD_SET_YCENTER 137
  85. #define IDD_SET_XHELP   138
  86. #define IDD_SET_XDEF    139
  87.  
  88. #define IDD_SET_FRACTTYPE 140
  89. #define IDD_SET_FRACTTYPE_LB 141
  90. #define IDD_SET_THELP   142
  91.  
  92. #define IDD_SET_PARAMS  150
  93. #define IDD_SET_P0      151     /* *** WARNING *** */
  94. #define IDD_SET_P1      152     /* Code depends on IDD_SET_Px being */
  95. #define IDD_SET_P2      153     /*   contiguous numbers   */
  96. #define IDD_SET_P3      154
  97. #define IDD_SET_PFRACTALTYPE 155
  98. #define IDD_SET_P0TEXT  156
  99. #define IDD_SET_P1TEXT  157
  100. #define IDD_SET_P2TEXT  158
  101. #define IDD_SET_P3TEXT  159
  102. #define IDD_SET_PDEF    160
  103. #define IDD_SET_T1TEXT  161     /* trig function parms */
  104. #define IDD_SET_T2TEXT  162
  105. #define IDD_SET_T3TEXT  163
  106. #define IDD_SET_T4TEXT  164
  107. #define IDD_SET_T1CB    165     /* *** WARNING *** */
  108. #define IDD_SET_T2CB    166     /* Code depends on IDD_SET_TxCB being */
  109. #define IDD_SET_T3CB    167     /*    contiguous numbers    */
  110. #define IDD_SET_T4CB    168
  111. #define IDD_SET_PHELP   169
  112.  
  113. #define IDD_SET_IMAGE   170
  114. #define IDD_SET_IHELP   171
  115. #define IDD_IMG_WIN     172
  116. #define IDD_IMG_SCR     173
  117. #define IDD_IMG_PRT     174
  118. #define IDD_IMG_VGA     175
  119. #define IDD_IMG_X       176
  120. #define IDD_IMG_Y       177
  121. #define IDD_IMG_C2      178
  122. #define IDD_IMG_C16     179
  123. #define IDD_IMG_C256    180
  124.  
  125. #define IDD_SET_PALETTE 190
  126. #define IDD_SET_AHELP   191
  127. #define IDD_PAL_BW      192
  128. #define IDD_PAL_WB      193
  129. #define IDD_PAL_VGA16   194
  130. #define IDD_PAL_VGA256  195
  131. #define IDD_PAL_PHYS    196
  132. #define IDD_PAL_USER    197
  133.  
  134. #define IDD_SET_OPTIONS 210
  135. #define IDD_SET_OHELP   211
  136. #define IDD_SET_ODEF    212
  137. #define IDD_OPT_PASSES1 213
  138. #define IDD_OPT_PASSES2 214
  139. #define IDD_OPT_PASSESG 215     /* solid-guessing */
  140. #define IDD_OPT_PASSESB 216     /* boundary-trace */
  141. #define IDD_OPT_MATHI   217     /* integer math */
  142. #define IDD_OPT_MATHF   218     /* floating-point math */
  143. #define IDD_OPT_MAXITER 219     /* maximum iterations */
  144. #define IDD_OPT_BIOMORF 210     /* biomorph */
  145. #define IDD_OPT_DECOMP  221     /* decomposition */
  146. #define IDD_OPT_INCOLOR 222     /* inside color */
  147. #define IDD_OPT_OUTCOLR 223     /* outside color */
  148. #define IDD_OPT_DISTEST 224     /* distance estimator */
  149.  
  150. #define IDD_PRINT       250
  151. #define IDD_PRINT_HELP  251
  152. #define IDD_PRINT_PM    253
  153. #define IDD_PRINT_PJ    254
  154. #define IDD_PRINT_FILE  255
  155. #define IDD_PRINT_PORT  256
  156. #define IDD_PRINT_PORTNAME 257
  157.  
  158. #define IDD_SEL_LIST      270
  159. #define IDD_SEL_LIST_WHAT 271
  160. #define IDD_SEL_LIST_LB   272
  161. #define IDD_SEL_LIST_HELP 273
  162.  
  163. #define IDD_LOADSAVE_TYPE 300
  164. #define IDD_LST_WHAT      301
  165. #define IDD_LST_WHAT_HELP 302
  166. #define IDD_LST_GIF       305
  167. #define IDD_LST_BMP       306
  168. #define IDD_LST_MET       307
  169. #define IDD_LST_WIN3BMP   308
  170. #define IDD_LST_PCX       309
  171.  
  172. #define IDS_ZOOM_IN  1
  173. #define IDS_ZOOM_OUT 2
  174. #define IDS_FREEZE   3
  175. #define IDS_HALT     4
  176. #define IDS_TITLEBAR 5
  177. #define IDS_SWAP_MANDEL 6
  178. #define IDS_SWAP_JULIA  7
  179. #define IDS_MISSING_SUB 8
  180. #define IDS_FLOAT_FORMAT 9
  181. #define IDS_VAL_NOTAPP 10
  182. #define IDS_CLIENT_CLASS 11
  183. #define IDS_BAD_NUMERIC 12
  184. #define IDS_SUBTASK_FATAL 13
  185. #define IDS_INIT_FATAL 14
  186. #define IDS_WORKING 15
  187. #define IDS_PRINT_NOOPEN 16
  188. #define IDS_PRINT_ACTION 17
  189. #define IDS_PRINT_HELP 18
  190. #define IDS_OPEN_TITLE 19
  191. #define IDS_OPEN_HELP  20
  192. #define IDS_FORMULA_FILE 21
  193. #define IDS_FORMULA_FILE_HELP 22
  194. #define IDS_LSYSTEM_FILE 23
  195. #define IDS_LSYSTEM_FILE_HELP 24
  196. #define IDS_IFS_FILE 25
  197. #define IDS_IFS_FILE_HELP 26
  198. #define IDS_IFS3D_FILE 27
  199. #define IDS_IFS3D_FILE_HELP 28
  200. #define IDS_SEL_FORMULA 29
  201. #define IDS_SEL_LSYSTEM 30
  202. #define IDS_COLORMAP_TITLE 31
  203. #define IDS_COLORMAP_HELP  32
  204. #define IDS_LOAD_WHAT  33
  205. #define IDS_SAVE_WHAT  34
  206. #define IDS_EXT_GIF    35
  207. #define IDS_EXT_BMP    36
  208. #define IDS_EXT_MET    37
  209. #define IDS_EXT_PCX    38
  210.  
  211. /*---------------------------------------------
  212.    The sStatus variable implements a state machine
  213.    that helps remember what we are doing, and it
  214.    is interrogated and defines much of what goes on
  215.    in the code.
  216.  
  217.    The states basically map as follows:
  218.  
  219.              [READY]------------->[FROZEN]
  220.                A \   (FREEZE command)  V
  221.                |  \                    | (Go)
  222.        (Final  |   \                   |
  223.         Paint) |    \  (GO)   /--------|
  224.                |     \       /
  225.                |      \     /
  226.                |       V   V    (New Parms)
  227.             [DONE]<---[WORKING]---------->[NEWPARMS]
  228.                  (Subtask A  A               V  (SubTask Aborted)
  229.                   Post)   |   \              |
  230.    (STARTUP)[INIT]--------/    \             |
  231.                  (subtask       \------------|
  232.                   INIT_DONE)
  233.              (goes to GO or LOAD)
  234.  
  235.  ----------------------------------------------*/
  236. #define STATUS_INIT      0
  237. #define STATUS_READY     1
  238. #define STATUS_FROZEN    2
  239. #define STATUS_WORKING   3
  240. #define STATUS_DONE      4
  241. #define STATUS_NEWPARMS  5
  242.  
  243.  /* define the codes used as communication between */
  244.  /* the subtask and the main thread */
  245. #define WM_THRD_POST       (WM_USER + 0)     /* main post from subtask */
  246.                        /* SHORT1FROMMP(mp1) is a status code: */
  247. #define SUB_STAT_OK             0  /* successful completion */
  248. #define SUB_STAT_ABORT         -1  /* action aborted */
  249. #define SUB_STAT_START_TIMER   -2  /* post to clear screen, start  */
  250.                              /*  refresh timer (CalcDriver) */
  251. #define SUB_STAT_FATAL         -3  /* fatal error (probably insufficient
  252.                                       memory), subtask is gone */
  253. #define SUB_INIT_DONE          -4  /* subtask init complete */
  254.  
  255. #define WM_SYNC_MSG        (WM_USER + 1)     /* sync message post from subtask */
  256.  
  257.  /* action codes to the subtask */
  258. #define SUB_ACT_CALC            1  /* Calculate a Fractal */
  259. #define SUB_ACT_PRINT           2  /* Print */
  260. #define SUB_ACT_SAVE            3  /* Save */
  261. #define SUB_ACT_LOAD            4  /* Load */
  262. #define SUB_ACT_TERM          999  /* shutdown */
  263.  
  264.   /* sub-function codes for the subtask */
  265.      /* sub-functions for print */
  266. #define SUB_PRINT_PM            1  /* print to PM printer */
  267. #define SUB_PRINT_PJ            2  /* print to a PaintJet */
  268.      /* sub-functions for load and save */
  269. #define SUB_LOADSAVE_GIF        1  /* load/save as GIF */
  270. #define SUB_LOADSAVE_BMP        2  /* load/save as OS/2 PM BMP */
  271. #define SUB_LOADSAVE_MET        3  /* load/save as Metafile */
  272. #define SUB_LOADSAVE_WIN3BMP    4  /* load/save as Windows 3 BMP */
  273. #define SUB_LOADSAVE_PCX        5  /* load/save as PCX file */
  274.  
  275. #define STACKSIZE   8192                   /* subtask stack size */
  276. #define TIMER_REPAINT 10000
  277.  
  278. /* in the following TWO structures, like named elements must be */
  279. /* the same types, as partial copies are effected continuously */
  280.  
  281. typedef struct _CALCPARM
  282.      {
  283.      HWND  hwnd ;
  284.      volatile  BOOL  fContinueCalc ; /* subthread stop request */
  285.      volatile  SHORT sSubAction ;    /* subthread command to process */
  286.      volatile  SHORT sSubFunction ;  /* subthread sub-function of that command */
  287.      ULONG ulSemTrigger ;     /* subthread start request */
  288.      ULONG ulSemMemPS;        /* memory PS serialization */
  289.      ULONG ulSemSubEnded;     /* subthread terminated post */
  290.      HDC   hdcScreen;         /* screen window DC */
  291.      HPS   hpsScreen;         /* screen window PS */
  292.      HPS   hpsMemory;         /* memory DC/PS/BitMap for background drawing */
  293.      HDC   hdcMemory;
  294.      HBITMAP hbmMemory;
  295.      PBITMAPINFO pbmiMemory;  /* current BITMAPINFO structure pointer */
  296.                               /*   for Engine Pixel Array */
  297.      USHORT sCurrentPalette;  /* current palette - IDD_PAL_xxx value */
  298.      unsigned char _huge *pixels;   /* the Engine Pixel Array (pointer) */
  299.      USHORT pm_xdots;         /* cx rounded to mult of 4-byte boundary, in pixels */
  300.      USHORT pm_xbytes;        /* cx rounded to mult of 4-byte boundary, in bytes */
  301.      USHORT cPlanes;          /* number of planes in Bitmap */
  302.      USHORT cBitCount;        /* bits per plane in Bitmap */
  303.      USHORT pixels_per_byte;  /* bitmap configuration data */
  304.      LONG   pixels_per_bytem1;
  305.      USHORT pixelshift_per_byte;
  306.      unsigned char pm_andmask[8];
  307.      unsigned char pm_notmask[8];
  308.      unsigned char pm_bitshift[8];
  309.  
  310.      volatile  BOOL fNewBits;  /* flag to say rebuild mem bitmap from pixel
  311.                                   array */
  312.      volatile  BOOL fSuppressPaint;  /* flag to say to paint function:
  313.                                         "Don't Touch Mem Bitmap or
  314.                                          pixel Array"    */
  315.  
  316.      ULONG ulSemSyncMsg;      /* for Sync Message processing */
  317.      ULONG ulSemSyncMsgDone;
  318.      int   SyncMsgAnswer;
  319.  
  320.      BOOL  fNewParms;
  321.      int   iFractType;
  322.      char  cFloatflag;        /* float flag */
  323.      SHORT cx, cy;            /* target image size in pixels */
  324.      double XL, XR, YT, YB;   /* x left, x right, y top, y bottom values */
  325.      double param[4];         /* parameters for fractal calc */
  326.      unsigned char trigndx[4]; /* up to 4 trig fnct in fractal */
  327.      char  szFileName[128];   /* load/save file name */
  328.      char  szIfsFileName[128];/* ifs file name */
  329.      char  szIfs3dFileName[128]; /* 3-d ifs file name */
  330.      char  szFormFileName[128];  /* Forumla file name */
  331.      char  szFormName[40];    /* formula selected from above */
  332.      char  szLSysFileName[128]; /* L-System file name */
  333.      char  szLSysName[40];    /* L-System formula selected from above */
  334.      char  szPrintName[128];  /* name to print to */
  335.      int   colors;            /* colors in the display */
  336.      int   maxiter;           /* max iteration count */
  337.      char  stdCalcMode;       /* '1', '2', 'b', 'g' */
  338.      int   distest;           /* distance estimator parm */
  339.      int   periodicitycheck;  /* RYFM */
  340.      int   biomorph;          /* biomorph */
  341.      int   decomp[2];         /* decomposition colors */
  342.      int   inside;            /* inside color; 1=blue */
  343.      int   outside;           /* outside color; -1=ignore */
  344.      BOOL  fHaveUserPalette;  /* TRUE if we have read a user palette map */
  345.      SHORT sLastLoadSaveType; /* remember load/save format between calls */
  346.                               /* values are SUB_LOADSAVE_xxx values */
  347.      }
  348.     CALCPARAM ;
  349.  
  350. typedef CALCPARAM FAR *PCALCPARAM ;
  351.  
  352. typedef struct _NEWPARAM
  353.      {
  354.      BOOL  fNewParms;
  355.      int   iFractType;        /* index into Fractal type array */
  356.      char  cFloatflag;        /* float flag */
  357.      SHORT cx, cy;            /* target image size in pixels */
  358.      double XL, XR, YT, YB;   /* x left, x right, y top, y bottom values */
  359.      double mxXL, mxXR, mxYT, mxYB;  /* left, right, top, bottom limits */
  360.      double XCenter, YCenter;
  361.      double param[4];         /* parameters for fractal calc */
  362.      unsigned char trigndx[4]; /* up to 4 trig fnct in fractal */
  363.      char  szFileName[128];   /* load/save file name */
  364.      char  szIfsFileName[128];/* ifs file name */
  365.      char  szIfs3dFileName[128]; /* 3-d ifs file name */
  366.      char  szFormFileName[128];  /* Forumla file name */
  367.      char  szFormName[40];    /* formula selected from above */
  368.      char  szLSysFileName[128]; /* L-System file name */
  369.      char  szLSysName[40];    /* L-System formula selected from above */
  370.      char  szPrintName[128];  /* name to print to */
  371.      int   colors;            /* colors in the display */
  372.      int   maxiter;           /* max iteration count */
  373.      char  stdCalcMode;       /* like he said */
  374.      int   distest;           /* distance estimator parm */
  375.      int   periodicitycheck;  /* like he said */
  376.      int   biomorph;          /* biomorph */
  377.      int   decomp[2];         /* decomposition colors */
  378.      int   inside;            /* inside color; 1=blue */
  379.      int   outside;           /* outside color; -1 = ignore */
  380.      }
  381.      NEWPARAM ;
  382.  
  383. typedef NEWPARAM FAR *PNEWPARAM ;
  384.  
  385. /* the following structure is the parameter to the General Selection
  386.    dialog box and supporting routines */
  387.  
  388. #define MAX_SEL 101           /* maximum number of items selectable at once */
  389.  
  390. typedef struct _GENSEL
  391.     {
  392.     PSZ  pszTitle;             /* title to use in Dialog Box */
  393.     char szSelected[21];       /* the name of what was selected now or last */
  394.     SHORT sCountNames;         /* how many in the array of names */
  395.     char szNames[MAX_SEL][21]; /* the actual array of names to select from */
  396.     }
  397.     GENSEL;
  398.  
  399. typedef GENSEL FAR *PGENSEL;
  400.  
  401. /*  routine prototypes */
  402.  
  403. VOID    PMfrGlobalInit(VOID);
  404. BOOL    PMfrWindowInit(HWND hwnd, MPARAM mp2);
  405. void FAR CalcDriverInit(void);
  406. int  FAR CalcDriver (VOID) ;
  407. void FAR PrintDriverInit(void);
  408. int  FAR PrintDriver (VOID);
  409. int  FAR SaveDriver (VOID) ;
  410. int  FAR LoadDriver (VOID) ;
  411. VOID FAR PMfrThread (VOID) ;
  412. int  FAR PMfrSyncMsg (int flags, PSZ msg);
  413. PSZ     GetFractalName(int iFractType);
  414. VOID    EnableMenuItem (HWND hwnd, SHORT sMenuItem, BOOL fEnable) ;
  415. VOID    UpdateMenuText (HWND hwnd, SHORT sMenuItem, PSZ szNewText);
  416. BOOL    UpdateMenuStatus (HWND hwnd, SHORT sMenuID);
  417. BOOL    GetMemoryBitmap (HAB);
  418. VOID    InitNewParms(PNEWPARAM npTempParms);
  419. VOID    ScheduleNewParms(HWND hwnd);
  420. VOID    CopyParmsToNew(VOID);
  421. VOID    CopyParmsToBase(VOID);
  422. VOID    CalcZoomValues (PNEWPARAM npTempParms, double dFactor, BOOL InOrOut);
  423. VOID    InitCrossHairs (VOID);
  424. VOID    DrawCrossHairs (HWND hwnd, PPOINTL pptlMouse);
  425. VOID    MoveCrossHairs (HWND hwnd, MPARAM mp1);
  426. VOID    EraseCrossHairs (HWND hwnd);
  427. VOID    DrawCrossHairsInner(HWND hwnd);
  428. VOID    DrawZoomBoxInner (HWND hwnd);
  429. VOID    InitZoomBox (SHORT x, SHORT y);
  430. VOID    DrawZoomBox (HWND hwnd, PPOINTL pptlMouse);
  431. VOID    MoveZoomBox (HWND hwnd, MPARAM mp1);
  432. VOID    EraseZoomBox (HWND hwnd);
  433. VOID    PanNewCenter (HWND hwnd);
  434. VOID    ZoomNewWindow (HWND hwnd, BOOL InOrOut);
  435. VOID    CancelZoomOrPan (HWND hwnd);
  436. VOID    PMfrRepaint (HWND hwnd);
  437. MRESULT PMfrCommands (HWND hwnd, USHORT msg, MPARAM mp1, MPARAM mp2);
  438. VOID    SetSwitchEntry (HWND hwnd, PSZ szTitleBar, PSZ szFract);
  439. VOID    CenterDialogBox (HWND hwnd);
  440. VOID    LoadColorMap (PSZ szFileName);
  441. VOID    SaveColorMap (PSZ szFileName);
  442. VOID    FileFmtExt (PSZ far *ppszFmt);
  443. VOID    PMfrFetchClipbrdBmp(HAB hab);
  444. VOID    PMfrWriteClipbrdBmp(HAB hab);
  445. MRESULT EXPENTRY ClientWndProc (HWND, USHORT, MPARAM, MPARAM) ;
  446. MRESULT EXPENTRY AboutDlgProc  (HWND, USHORT, MPARAM, MPARAM) ;
  447. MRESULT EXPENTRY SetExtentsDlgProc (HWND, USHORT, MPARAM, MPARAM) ;
  448. MRESULT EXPENTRY ZoomValueDlgProc (HWND, USHORT, MPARAM, MPARAM) ;
  449. MRESULT EXPENTRY SelFractalDlgProc (HWND, USHORT, MPARAM, MPARAM) ;
  450. MRESULT EXPENTRY SetParametersDlgProc (HWND, USHORT, MPARAM, MPARAM) ;
  451. MRESULT EXPENTRY SetImageDlgProc (HWND, USHORT, MPARAM, MPARAM) ;
  452. MRESULT EXPENTRY SetPaletteDlgProc (HWND, USHORT, MPARAM, MPARAM) ;
  453. MRESULT EXPENTRY SetOptionsDlgProc (HWND, USHORT, MPARAM, MPARAM) ;
  454. MRESULT EXPENTRY PrintOptionsDlgProc (HWND, USHORT, MPARAM, MPARAM) ;
  455. MRESULT EXPENTRY SelWhatDlgProc (HWND, USHORT, MPARAM, MPARAM) ;
  456. MRESULT EXPENTRY LoadSaveFmtDlgProc (HWND, USHORT, MPARAM, MPARAM) ;
  457.  
  458. /* global variables */
  459. /* this provides definition only where desired (main module) */
  460. #if !defined(EXTERN)
  461. #define EXTERN extern
  462. #endif
  463.  
  464. EXTERN HAB     hab ;              /* main thread HAB */
  465.  
  466. EXTERN CALCPARAM _far cp ;        /* shared data with subtask thread */
  467. EXTERN NEWPARAM _far npNewParms ; /* delayed copy for change of parms while working */
  468. EXTERN NEWPARAM _far npTempParms ; /* copy of copy for dialogs to play with */
  469. EXTERN POINTL  ptlCrossHairs;
  470. EXTERN POINTL  ptlZBox1, ptlZBox2;
  471. EXTERN HPOINTER hptrWait;         /* Hour-glass pointer */
  472. EXTERN HPOINTER hptrArrow;        /* normal Arrow pointer */
  473.  
  474.  
  475. EXTERN SHORT   sStatus;
  476. EXTERN BOOL    flAmIcon;
  477. EXTERN BYTE    bThreadStack [STACKSIZE];
  478. EXTERN TID     tidCalc ;
  479. EXTERN BOOL    fPan, fZoomWin, fActive, fGoodPan, fGoodZoom;
  480. EXTERN ULONG   cxMouseTol, cyMouseTol;      /* x, y mouse move tolerances (SYS_DBLCLK) */
  481. EXTERN ULONG   cxScreenRes, cyScreenRes ;   /* screen resolution */
  482. EXTERN ULONG   cxScreen, cyScreen;          /* monitor x,y size */
  483. EXTERN ULONG   cyIcon, cyMenu;              /* icon depth, menu depth */
  484. EXTERN ULONG   cxPrtRes, cyPrtRes;          /* default printer resolution */
  485. EXTERN ULONG   cxFullScreen, cyFullScreen;  /* max client window size */
  486. EXTERN ULONG   cxPrinter, cyPrinter;        /* printer page size, pels */
  487. EXTERN SHORT   cxClient, cyClient;          /* current client window size */
  488. EXTERN ULONG   lScreenColors;               /* color capability of screen */
  489. EXTERN ULONG   lPrinterColors;              /* color capability of printer */
  490. EXTERN GENSEL _far gs;                      /* interface to General Selection
  491.                                                dialog                       */
  492.  
  493. EXTERN CHAR _far szZoomIn[25];     /* Strings to fill in from resource file */
  494. EXTERN CHAR _far szZoomOut[25];
  495. EXTERN CHAR _far szFreeze[10];
  496. EXTERN CHAR _far szHalt[10];
  497. EXTERN CHAR _far szTitleBar[35];
  498. EXTERN CHAR _far szSwapMandel[35];
  499. EXTERN CHAR _far szSwapJulia[35];
  500. EXTERN CHAR _far szMissingSub[35];
  501. EXTERN CHAR _far szFloatFormat[10];
  502. EXTERN CHAR _far szValueNotApplicable[10];
  503. EXTERN CHAR _far szClientClass[10];
  504. EXTERN CHAR _far szBadNumeric[50];
  505. EXTERN CHAR _far szSubtaskFatal[50];
  506. EXTERN CHAR _far szInitFatal[50];
  507. EXTERN CHAR _far szWorking[20];
  508. EXTERN CHAR _far szPrintNoOpen[35];
  509. EXTERN CHAR _far szPrintAction[35];
  510. EXTERN CHAR _far szPrintHelp[35];
  511. EXTERN CHAR _far szOpenTitle[35];
  512. EXTERN CHAR _far szOpenHelp[35];
  513. EXTERN CHAR _far szFormTitle[35];
  514. EXTERN CHAR _far szFormHelp[35];
  515. EXTERN CHAR _far szLsysTitle[35];
  516. EXTERN CHAR _far szLsysHelp[35];
  517. EXTERN CHAR _far szIFSTitle[35];
  518. EXTERN CHAR _far szIFSHelp[35];
  519. EXTERN CHAR _far szIFS3DTitle[35];
  520. EXTERN CHAR _far szIFS3DHelp[35];
  521. EXTERN CHAR _far szSelFormula[35];
  522. EXTERN CHAR _far szSelLsystem[35];
  523. EXTERN CHAR _far szColorMapTitle[40];
  524. EXTERN CHAR _far szColorMapHelp[40];
  525. EXTERN CHAR _far szLoadWhatFmt[35];
  526. EXTERN CHAR _far szSaveWhatFmt[35];
  527. EXTERN CHAR _far szExtGIF[10];
  528. EXTERN CHAR _far szExtBMP[10];
  529. EXTERN CHAR _far szExtMET[10];
  530. EXTERN CHAR _far szExtPCX[10];
  531.  
  532. EXTERN int     MainArgc;
  533. EXTERN char  **MainArgv;
  534.  
  535.   /* for color table switching */
  536. extern BITMAPINFO _far bmiColorTableVGA16;  /* color tables are in external */
  537. extern BITMAPINFO _far bmiColorTableVGA256;   /*  assembler file */
  538. extern BITMAPINFO _far bmiColorTableBW;
  539. extern BITMAPINFO _far bmiColorTableWB;
  540. extern BITMAPINFO _far bmiColorTableUser;
  541. extern BITMAPINFO _far bmiColorTablePhys;
  542. EXTERN ULONG      _far *alPhysicalColors;
  543.  
  544. EXTERN SHORT     CountFractalList;          /* names of fractals in the */
  545. EXTERN SHORT far *asFracTypeList;        /*  engine table -fractalspecific- */
  546.  
  547. #define SYSVAL(x)  ( (USHORT) WinQuerySysValue(HWND_DESKTOP, x) )
  548.  
  549. #define MAX_TRIG   6   /* SQR  -   should be in fractype.h but isn't */
  550.