/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
////																					////
////																					////
////							 - Wmp.h -	    										////
////																					////
////																					////
////				Implementation of WMP API Scol Functions            		    	////
////						Version  1.0	(August 2001)    			 				////
////																					////
////								  Nadège SONNET     								////
////																					////
////																					////
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////


/* Buffer structure definition  */

#ifndef _MYWMPBUF_
#define _MYWMPBUF_

#include "../x/scolplugin.h"


/****************************************************/
/*					Structures						*/
/****************************************************/

/***Video Buffer***/
struct MyWmpBuf
{
	int id;
	
	//$BLG: v4.6a5 - Del (Unused)
	//int size;
	
	//$BLG: v4.6a5 - Modif: 15bits to 24bits
	//short *buf;
	unsigned char *buf;
	
	int width;
	int height;
	mmachine m;
	char *login;
	char *password;
	bool msgPosted;
};
typedef struct MyWmpBuf *mywmpbuf;


//$LB
/***render Buffer***/
struct RenderBuffer
{
  OBJBITMAP_BUFFER start;
  int nextline;
  int nbcolumn;
  int nblines;
};
typedef struct RenderBuffer *renderbuffer;


/***************************************************/
/*				Constante Variables			   */
/***************************************************/

#define ONE_MILLISECOND 10000
#define ONE_SECOND 10000000

#define VOLUME_FULL     0L
#define VOLUME_SILENCE  -10000L

#define RFLWMP_NB 2
#define RFLWMP_IMAGE 0
#define RFLWMP_STATE 1

#define WMP_BUFFERING 1240
#define WMP_CONTACTING 1242
#define WMP_ONBEGIN 1244
#define WMP_ONPAUSE 1246
#define WMP_ONSTOP 1248
#define WMP_ONCLOSED 12410
#define WMP_ONOPENED 12412
#define WMP_POSITION 12414


/****************************************************/
/*					Externe variables				*/
/****************************************************/
extern int typeWMP;
extern int WMP_BLIT;
extern int WMP_STATE;
extern int WM_GRAPHNOTIFY;
extern HWND hwndMain;


/*******************************************************/
/*			Message Event Functions						*/
/*******************************************************/
int DLGBlitSample (mmachine m,HWND h,unsigned msg,UINT id,LONG param,int *ret);
int DLGState (mmachine m,HWND h,unsigned msg,UINT id,LONG param,int *ret);
int DLGGraphEvent(mmachine m,HWND h,unsigned msg,UINT id,LONG param,int *ret);


/*******************************************************/
/*			Display Errors Function					*/
/*******************************************************/
HRESULT DisplayWmpErrorMessage(HRESULT hr);

#endif
	