// Borland C++ Builder
// Copyright (c) 1995, 1999 by Borland International
// All rights reserved

// (DO NOT EDIT: machine generated header) 'ThdTimer.pas' rev: 5.00

#ifndef ThdTimerHPP
#define ThdTimerHPP

#pragma delphiheader begin
#pragma option push -w-
#pragma option push -Vx
#include <Dialogs.hpp>	// Pascal unit
#include <Forms.hpp>	// Pascal unit
#include <Controls.hpp>	// Pascal unit
#include <Graphics.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <SysUtils.hpp>	// Pascal unit
#include <Messages.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <SysInit.hpp>	// Pascal unit
#include <System.hpp>	// Pascal unit

//-- user supplied -----------------------------------------------------------

namespace Thdtimer
{
//-- type declarations -------------------------------------------------------
class DELPHICLASS TTimerThread;
class DELPHICLASS TThreadedTimer;
class PASCALIMPLEMENTATION TThreadedTimer : public Classes::TComponent 
{
	typedef Classes::TComponent inherited;
	
private:
	Classes::TNotifyEvent FOnTimer;
	TTimerThread* FTimerThread;
	bool FEnabled;
	bool FAllowZero;
	void __fastcall DoTimer(void);
	void __fastcall SetEnabled(bool Value);
	unsigned __fastcall GetInterval(void);
	void __fastcall SetInterval(unsigned Value);
	Classes::TThreadPriority __fastcall GetThreadPriority(void);
	void __fastcall SetThreadPriority(Classes::TThreadPriority Value);
	
public:
	__fastcall virtual TThreadedTimer(Classes::TComponent* AOwner);
	__fastcall virtual ~TThreadedTimer(void);
	
__published:
	__property bool AllowZero = {read=FAllowZero, write=FAllowZero, default=0};
	__property bool Enabled = {read=FEnabled, write=SetEnabled, default=0};
	__property unsigned Interval = {read=GetInterval, write=SetInterval, default=1000};
	__property Classes::TNotifyEvent OnTimer = {read=FOnTimer, write=FOnTimer};
	__property Classes::TThreadPriority ThreadPriority = {read=GetThreadPriority, write=SetThreadPriority
		, default=3};
};


class PASCALIMPLEMENTATION TTimerThread : public Classes::TThread 
{
	typedef Classes::TThread inherited;
	
private:
	TThreadedTimer* FOwner;
	unsigned FInterval;
	unsigned FStop;
	
protected:
	virtual void __fastcall Execute(void);
public:
	#pragma option push -w-inl
	/* TThread.Create */ inline __fastcall TTimerThread(bool CreateSuspended) : Classes::TThread(CreateSuspended
		) { }
	#pragma option pop
	#pragma option push -w-inl
	/* TThread.Destroy */ inline __fastcall virtual ~TTimerThread(void) { }
	#pragma option pop
	
};


//-- var, const, procedure ---------------------------------------------------
static const Word DEFAULT_INTERVAL = 0x3e8;
extern PACKAGE void __fastcall Register(void);

}	/* namespace Thdtimer */
#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace Thdtimer;
#endif
#pragma option pop	// -w-
#pragma option pop	// -Vx

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// ThdTimer
