/*
 | TSSIM.H
 |
 | Standard driver for simulation graphics.
 |
 | Copyright (c) Siemens AG 1993.
 | All rights reserved.
 |
 | $Header:   P:/VCS/TSEX/PENDADV/TSSIM.H_V   1.1   10 Dec 1993 17:39:40   ror  $
 */

// Window specific data for this window.
//
typedef struct
{
    HWND hWnd;			// The window handle for this window
    FLOAT Theta;
    FLOAT StickSize;
    FLOAT MotorSize;
    FLOAT BobMass;
    FLOAT Position;
    POINT pBob;
} WINDATA;
typedef WINDATA *PWINDATA;

// Macros.
//
#define NOTUSED(p)	(p=p)
#define M_PI            3.1459
#define CLASS		"TSSIMGRAPHIC"

#if (defined(M_I86SM) | defined(M_I86MM))
#define GetWinMem(hWnd) 	((PWINDATA) GetWindowWord ((hWnd), 0))
#define SetWinMem(hWnd, p)	((PWINDATA) SetWindowWord ((hWnd), 0, (WORD) p))
#else
#define GetWinMem(hWnd) 	((PWINDATA) GetWindowLong ((hWnd), 0))
#define SetWinMem(hWnd, p)	((PWINDATA) SetWindowLong ((hWnd), 0, (LONG) p))
#endif

// Public Data.
//
extern HWND hWndGraphic;
extern HWND hWndFrame;
extern HWND hWndMDIClient;
extern HINSTANCE hInst;

// Public Routines.
//
void SimGraphic_OnPaint(PWINDATA pWinData);
void SimGraphic_InitWindowData(PWINDATA pWinData);
GLOBALHANDLE FAR PASCAL TSSimGraphicInit(LPGRAPHICINIT pInit);
int FAR PASCAL TSSimGraphic(GLOBALHANDLE hMem, LPSTR paramfmt, LPIOVALUE params);
int FAR PASCAL TSSimGraphicReset(GLOBALHANDLE hMem);
void FAR PASCAL TSSimGraphicClean(GLOBALHANDLE hMem);
