/****************************************************************************
**                                                                          **
**  Template file for implementing Multidec API                             **
**  Supports: MD 8.0, 8.1 and 8.2 (API 1.02)                                **
**  Use global object g_API_Impl                                            **
**  Visual C++ 6                                                            **
**                                                                          **
**  (C) Vlinders, June 2002, V 1.00                                         **
**                                                                          **
 ****************************************************************************/

/* 
  Warning:
  adapt this file for use with stdafx.h or windows.h depending on your project type.
  See API_Impl.h for details on the functions and parameters
*/

#include "MDExtern.h"
#include "API_Impl.h"

#if BUILDING_DLL
# define DLLIMPORT __declspec (dllexport)
#else 
# define DLLIMPORT __declspec (dllimport)
#endif  


 extern "C"  DLLIMPORT void to_log(char *x)
{
	g_API_Impl->to_log(x);
}

extern "C" DLLIMPORT void On_Start(HINSTANCE MDInstance, HWND MDWnd, BOOL Log_Set, int DLL_ID, char *My_Hot_Key, 
char *Api_Version, int *Keep_me_running)
{
	g_API_Impl->On_Start(MDInstance, MDWnd, Log_Set, DLL_ID, My_Hot_Key, Api_Version, Keep_me_running);
}

extern "C" DLLIMPORT  void On_Exit(HINSTANCE MDInstance, HWND MDWnd, BOOL Log_Set)
{
	g_API_Impl->On_Exit(MDInstance, MDWnd, Log_Set);
}

extern "C" DLLIMPORT void On_Send_Dll_ID_Name(char *Name)
{
	g_API_Impl->On_Send_Dll_ID_Name(Name);
}

extern "C" DLLIMPORT void On_Menu_Select(unsigned int MenuID )
{
	g_API_Impl->On_Menu_Select(MenuID);
}

extern "C" DLLIMPORT void On_Channel_Change( struct TProgramm82 CurrentProgramm )
{
	g_API_Impl->On_Channel_Change(CurrentProgramm);
}

extern "C"  void On_Hot_Key( void )
{
	g_API_Impl->On_Hot_Key();
}
extern "C" void On_Rec_Play(int Mode)
{
	g_API_Impl->On_Rec_Play((RECPLAY_t)Mode);
}
extern "C" void On_Osd_Key( unsigned char Key )
{
	g_API_Impl->On_Osd_Key( Key );
}
extern "C"   void On_Filter_Close(unsigned int FilterOffset )
{
	g_API_Impl->On_Filter_Close(FilterOffset);
    to_log("Filter close");
}
extern "C" int On_Key_Down(UINT nChar, UINT nRepCnt, UINT nFlags)
{
	return g_API_Impl->On_Key_Down(nChar, nRepCnt, nFlags);
}
