|
|
1.1 root 1: /****************************************************************************
2:
3: MANDEL.H -- Constants and function definitions for MANDEL.C
4:
1.1.1.3 root 5: Copyright (C) 1990, 1992 Microsoft Corporation
1.1 root 6:
7: ****************************************************************************/
8:
1.1.1.4 ! root 9: /* Constants */
! 10:
! 11: #ifdef WIN16
! 12: #define APIENTRY PASCAL
! 13: #define UNREFERENCED_PARAMETER
! 14: #endif
! 15:
! 16: #define IDM_ABOUT 100
! 17: #define IDM_ZOOMIN 101
! 18: #define IDM_ZOOMOUT 105
! 19: #define IDM_TOP 106
! 20: #define IDM_REDRAW 107
! 21: #define IDM_EXIT 108
! 22: #define IDM_CONTINUOUS 109
! 23: #define IDM_SERVER 110
! 24: #define IDD_SERVERNAME 111
! 25: #define IDD_ENDPOINT 112
! 26: #define IDM_BIND 113
! 27: #define IDM_1LINE 200
1.1 root 28: #define IDM_2LINES 201
29: #define IDM_4LINES 202
30:
31: #define WIDTH 300
32: #define HEIGHT 300
1.1.1.4 ! root 33: #define LINES 4
! 34: #define BUFSIZE 1200 // (HEIGHT * LINES)
! 35: #define MAX_BUFSIZE 4800 // (BUFSIZE * sizeof(short))
1.1 root 36:
1.1.1.4 ! root 37: #define POLL_TIME 100
1.1 root 38:
1.1.1.4 ! root 39: #define CNLEN 15 // computer name length
! 40: #define UNCLEN CNLEN+2 // \\computername
! 41: #define MSGLEN 256
1.1 root 42:
1.1.1.4 ! root 43: #define NCOLORS 11
1.1 root 44:
1.1.1.4 ! root 45: #define SVR_TABLE_SZ 20
1.1 root 46:
1.1.1.4 ! root 47: // Status of connection to server
! 48: #define SS_DISCONN 0
! 49: #define SS_IDLE 1
! 50: #define SS_READPENDING 2
! 51: #define SS_PAINTING 3
! 52: #define SS_LOCAL 4
! 53:
! 54: #define MINPREC 5.0E-9
! 55: #define MAXPREC 5.0E-3
! 56:
! 57: #define WM_DOSOMEWORK (WM_USER+0)
! 58: #define WM_PAINTLINE (WM_USER+1)
! 59: #define WM_EXCEPTION (WM_USER+2)
1.1.1.3 root 60:
1.1.1.4 ! root 61: /* Data Structures */
1.1 root 62:
63: typedef struct _svr_table {
1.1.1.4 ! root 64: char name[UNCLEN]; // name of remote server
! 65: int hfPipe; // RPC handle
! 66: int iStatus; // status of connection
! 67: int cPicture; // picture id for this line
! 68: DWORD dwLine; // line we're drawing
! 69: int cLines; // lines in this chunk
1.1 root 70: } svr_table;
71:
1.1.1.4 ! root 72: #ifndef RPC // If RPC, the following data would be
! 73: // defined in the IDL file
1.1 root 74: typedef struct _cpoint {
75: double real;
76: double imag;
77: } CPOINT;
78:
79: typedef CPOINT * PCPOINT;
80:
1.1.1.4 ! root 81: typedef struct _LONGRECT {
1.1 root 82: long xLeft;
83: long yBottom;
84: long xRight;
85: long yTop;
86: } LONGRECT;
87:
88: typedef LONGRECT *PLONGRECT;
89:
1.1.1.4 ! root 90: typedef unsigned short LINEBUF[BUFSIZE];
1.1 root 91:
92: #endif
93:
1.1.1.4 ! root 94: typedef struct _calcbuf {
! 95: LONGRECT rclDraw;
! 96: double dblPrecision;
! 97: DWORD dwThreshold;
! 98: CPOINT cptLL;
! 99: } CALCBUF;
! 100:
! 101:
! 102: /* Function Prototypes */
1.1 root 103:
1.1.1.4 ! root 104: int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int);
1.1 root 105: BOOL InitApplication(HANDLE);
106: BOOL InitInstance(HANDLE, int);
1.1.1.4 ! root 107:
1.1 root 108: LONG APIENTRY MainWndProc(HWND, UINT, UINT, LONG);
109: BOOL APIENTRY About(HWND, UINT, UINT, LONG);
1.1.1.3 root 110: BOOL APIENTRY Server(HWND, UINT, UINT, LONG);
1.1.1.4 ! root 111: BOOL APIENTRY Exception(HWND, UINT, UINT, LONG);
1.1.1.3 root 112:
113: #ifdef RPC
114: RPC_STATUS Bind(HWND);
115: #endif
116:
1.1 root 117: void CountHistogram(void);
118:
1.1.1.4 ! root 119: BOOL InitRemote(HWND);
! 120: BOOL CheckDrawStatus(HWND);
! 121: void SetNewCalc(CPOINT, double, RECT);
! 122: void IncPictureID(void);
! 123: void ResetPictureID(void);
! 124: BOOL CheckDrawingID(int);
! 125: DWORD QueryThreshold(void);
! 126:
! 127: // buffer routines
! 128: BOOL TakeDrawBuffer(void);
! 129: LPVOID LockDrawBuffer(void);
! 130: void UnlockDrawBuffer(void);
! 131: void ReturnDrawBuffer(void);
! 132: void FreeDrawBuffer(void);
! 133:
! 134:
! 135: #ifndef RPC // If RPC, MandelCalc() would be
! 136: // defined in the IDL file
! 137: void MandelCalc(PCPOINT pcptLL,
! 138: PLONGRECT prcDraw,
! 139: double precision,
! 140: DWORD ulThreshold,
! 141: LINEBUF * pbBuf);
1.1 root 142: #endif
143:
144:
145:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.