//---------------------------------------------------------------------------

#ifndef DisplayThreadH
#define DisplayThreadH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include "GR32.hpp"
//---------------------------------------------------------------------------
class TOSCABoard;

class VideoThread : public TThread
{
	typedef struct tagTHREADNAME_INFO
	{
		DWORD 	dwType;     // must be 0x1000
		LPCSTR 	szName;    	// pointer to name (in user addr space)
		DWORD 	dwThreadID; // thread ID (-1=caller thread)
		DWORD 	dwFlags;    // reserved for future use, must be zero
	} THREADNAME_INFO;

	private:
		TOSCABoard				*m_pOwner;
		TBitmap32				*m_pDisplayImage;
		int						lastScanline;
		Types::TRect			fSrcRect;
		Types::TRect			fDstRect;

		void 						SetName();
		void __fastcall		RunVideo(void);

	protected:
		void __fastcall 		Execute();

	public:
		__fastcall 				VideoThread(TOSCABoard *owner);
		virtual __fastcall	~VideoThread();
};

//---------------------------------------------------------------------------

#endif
