  /*	
	HotKey plugin for Sonique 2.0
    Copyright (C) 2004  Jerome Kuptz

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/
#ifndef _SQ2_HOTKEY_H_
#define _SQ2_HOTKEY_H_

#include "mia.h"
#include "sq2_gui.h"

// {12EFDF79-94F1-426d-BC97-0A2DD4DF08A5}
DEFINE_MID(FID_SQ2_AUDIO_HOT, 0x12efdf79, 0x94f1, 0x426d, 0xbc, 0x97, 0xa, 0x2d, 0xd4, 0xdf, 0x8, 0xa5);

// {842E01FD-BB39-43c4-A05C-5FDD5A90CAB8}
DEFINE_MID(MID_MEDIAFILTER_HOT, 0x842e01fd, 0xbb39, 0x43c4, 0xa0, 0x5c, 0x5f, 0xdd, 0x5a, 0x90, 0xca, 0xb8);



class SQ2_Audio_HotKey_dll : public MIFactory
{
public:
	// MIFactory
	virtual MRESULT	__stdcall	CreateInstance( const MID& mInterface, void** ppToHere,  MObject* pOuter ) ;

protected:
	// MGeneric
	IMPLEMENT_REFERENCECOUNT();
	IMPLEMENT_QUERYMODULE();

public:
	SQ2_Audio_HotKey_dll();
	~SQ2_Audio_HotKey_dll();
	static int32 __stdcall WatcherThread(void* param);
	static int32 __stdcall Watcher(void* param);

	SignalObject m_AbortSignal;
	bool m_bAbort;
	bool m_bReloadSettings;

private:
	static char __stdcall GetKey(uint32 parCode);
	ThreadObject m_Thread;
};

#endif//_SQ2_HOTKEY_H_
