//	Tab Size: 2
//	Comments:																								*Column 60*

#ifndef	__X4D_FILTER_THREADS__
#define	__X4D_FILTER_THREADS__

#include "c4d_thread.h"
#include "x4d_filter.h"

typedef	LONG 	FT_APPLY_EFFECT( BM_REF bm, const RECT32 *src_rect, BM_TILE *dt, void *settings, Bool update_view, class FilterThread *thread );

class FilterThread : public Thread
{
		BM_REF	bm;
		BM_TILE	*dt;
		const RECT32	*src_rect;
		RECT32	r;
		FT_APPLY_EFFECT	*apply_effect;
		void	*settings;
		Bool	redraw;
		LONG	err;
		volatile Bool	done;

	public:

		FilterThread( void );
		void	Main( void );

		void	Init( BM_REF bm, const RECT32 *src_rect, BM_TILE *dt, FT_APPLY_EFFECT *apply_effect, void *settings, Bool redraw );
		LONG	GetErr( void );
		Bool	IsDone( void );
		void	WaitforCompletion( void );
};

#endif