Annotation of mstools/samples/rpc/mandel/mandel.h, revision 1.1

1.1     ! root        1: /****************************************************************************
        !             2: 
        !             3:     MANDEL.H -- Constants and function definitions for MANDEL.C 
        !             4: 
        !             5:     Copyright (C) 1990 Microsoft Corporation.
        !             6: 
        !             7: ****************************************************************************/
        !             8: 
        !             9: #define IDM_ABOUT 100
        !            10: #define IDM_ZOOMIN 101
        !            11: #define IDM_ZOOMOUT 105
        !            12: #define IDM_TOP    106
        !            13: #define IDM_REDRAW 107
        !            14: #define IDM_EXIT   108
        !            15: #define IDM_CONTINUOUS 109
        !            16: 
        !            17: #define IDM_1LINE       200
        !            18: #define IDM_2LINES      201
        !            19: #define IDM_4LINES      202
        !            20: #define IDM_8LINES      203
        !            21: #define IDM_16LINES     204
        !            22: #define IDM_32LINES     205
        !            23: 
        !            24: #define ID_OK           304
        !            25: 
        !            26: #define WM_DOSOMEWORK           (WM_USER+0)
        !            27: #define WM_PAINTLINE            (WM_USER+1)
        !            28: 
        !            29: #define LBID_SERVERS    102
        !            30: 
        !            31: #define WIDTH           300
        !            32: #define HEIGHT          300
        !            33: 
        !            34: #define MAXLINES        32
        !            35: 
        !            36: #ifndef MAXPATHLEN
        !            37: #define MAXPATHLEN      260
        !            38: #endif
        !            39: 
        !            40: #define MAXID           64    // saved zoomin operations
        !            41: 
        !            42: #define MAX_BUFSIZE         (HEIGHT * sizeof(long) * MAXLINES)
        !            43: 
        !            44: extern int iLines;
        !            45: 
        !            46: // A table of servers we know about
        !            47: typedef struct _svr_table {
        !            48:     char    name[16+1];                 // name of remote server
        !            49:     int     hfPipe;                     // RPC handle
        !            50:     int     iStatus;                    // status of connection
        !            51:     int     cPicture;                   // picture id for this line
        !            52:     DWORD   dwLine;                     // line we're drawing
        !            53:     int     cLines;                     // lines in this chunk
        !            54: } svr_table;
        !            55: 
        !            56: // if RPC, this data is defined within the IDL file
        !            57: #ifndef RPC
        !            58: typedef struct _cpoint {
        !            59:     double    real;
        !            60:     double    imag;
        !            61: } CPOINT;
        !            62: 
        !            63: typedef CPOINT * PCPOINT;
        !            64: 
        !            65: typedef struct _LONGRECT {     /* rcl */
        !            66:     long    xLeft;
        !            67:     long    yBottom;
        !            68:     long    xRight;
        !            69:     long    yTop;
        !            70: } LONGRECT;
        !            71: 
        !            72: typedef LONGRECT *PLONGRECT;
        !            73: 
        !            74: typedef struct _LINEBUF {
        !            75:     WORD adw[MAX_BUFSIZE];
        !            76: } LINEBUF;
        !            77: 
        !            78: typedef LINEBUF * PLINEBUF;
        !            79: #endif
        !            80: 
        !            81: extern svr_table    SvrTable[];         // the table
        !            82: extern int          SvrTableSz;         // # of objects in it
        !            83: extern int          cPictureID;         // current picture; index to table
        !            84: 
        !            85: extern RECT         rcHistory[];
        !            86: int APIENTRY WinMain(HANDLE, HANDLE, LPSTR, int);
        !            87: BOOL InitApplication(HANDLE);
        !            88: BOOL InitInstance(HANDLE, int);
        !            89: LONG APIENTRY MainWndProc(HWND, UINT, UINT, LONG);
        !            90: BOOL APIENTRY About(HWND, UINT, UINT, LONG);
        !            91: BOOL APIENTRY SaveAsDlgProc(HWND, UINT, UINT, LONG);
        !            92: void DoSomeWork(HWND, BOOL);
        !            93: void IncPictureID(void);
        !            94: 
        !            95: void InitHistogram(void);
        !            96: void CountHistogram(void);
        !            97: void CalcHistogram(int  x,
        !            98:          int       y,
        !            99:          DWORD  dwIter,
        !           100:          DWORD  dwThreshold);
        !           101: #define NCOLORS 11
        !           102: 
        !           103: extern int fContinueZoom;
        !           104: extern int fZoomIn;
        !           105: extern int iHistMaxI;
        !           106: extern int iHistMaxJ;
        !           107: extern int Histogram[4][4][NCOLORS+1];
        !           108: extern int ColorCount[4][4];
        !           109: extern BOOL fRectDefined;
        !           110: 
        !           111: extern char pszFail[];
        !           112: 
        !           113: BOOL InitRemote( HWND );
        !           114: void PollForServers( void );
        !           115: void CheckPoll( void );
        !           116: BOOL CheckDrawStatus( HWND);
        !           117: void RetryConnections( void );
        !           118: void SetNewCalc( CPOINT cptUL, double dPrecision, RECT rcl);
        !           119: BOOL CheckDrawingID( int );
        !           120: 
        !           121: extern BOOL    fLocalWork;
        !           122: extern BOOL    fRemoteWork;
        !           123: 
        !           124: 
        !           125: // Status of connection to server
        !           126: 
        !           127: #define SS_DISCONN      0
        !           128: #define SS_IDLE         1
        !           129: #define SS_READPENDING  2
        !           130: #define SS_PAINTING     3
        !           131: #define SS_LOCAL        4
        !           132: 
        !           133: 
        !           134: // Buffer routines
        !           135: 
        !           136: BOOL TakeDrawBuffer( void );
        !           137: PDWORD GetDrawBuffer( void );
        !           138: void FreeDrawBuffer( void );
        !           139: void ReturnDrawBuffer( void );
        !           140: DWORD QueryThreshold( void );
        !           141: 
        !           142: int GetServerCount( void );
        !           143: void GetServerName( int, char *);
        !           144: 
        !           145: 
        !           146: extern RECT rcZoom;
        !           147: extern double dPrec;
        !           148: 
        !           149: #define MINPREC  5.0E-9
        !           150: #define MAXPREC  5.0E-3
        !           151: 
        !           152: // if RPC version, this routine is defined within the IDL file
        !           153: #ifndef RPC
        !           154: void MandelCalc( PCPOINT   pcptLL,
        !           155:                 PLONGRECT prcDraw,
        !           156:                  double    precision,
        !           157:                  DWORD     ulThreshold,
        !           158:                  PLINEBUF  pbBuf);
        !           159: #endif
        !           160: 
        !           161: typedef struct _calcbuf {
        !           162:     LONGRECT  rclDraw;
        !           163:     double    dblPrecision;
        !           164:     DWORD     dwThreshold;
        !           165:     CPOINT    cptLL;
        !           166: } CALCBUF;
        !           167: 
        !           168: short calcmand(double dreal, double dimag, short maxit);
        !           169: 
        !           170: typedef struct _mults {
        !           171:     double     rs;             /* real squared */
        !           172:     double     is;             /* imag squared */
        !           173:     double     ri;             /* real * imaginary */
        !           174: } mults;

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.