#ifndef __DCDswi__H
#define __DCDswi__H

#include "kernel.h"
#include <stdbool.h>
#include "WimpLib:Event.h"
#include "WimpLib:Window.h"

typedef struct DCD_Misc_Message
{
	Msg_Hdr		hdr;
	unsigned int	reason;
	unsigned int	controller;
	union
	{
		struct
		{
			unsigned int	handle;
			unsigned int	window;
		} info;
		struct
		{
			unsigned int	cmd;
			unsigned int	value;
		} cmd;
		char text[228];
	} data;
} DCD_Misc_Message;

typedef enum
{
	  DCD_Info_Window	= 0
	, DCD_Info_Counter	= 1
//	, DCD_Info_Volume	= 2
	, DCD_Info_Title	= 3
	, DCD_Info_Source	= 4
	, DCD_Info_Task		= 5
	, DCD_Info_Pos		= 6
	, DCD_Info_StartPos	= 7
	, DCD_Info_EndPos	= 8
	, DCD_Info_MainVolume	= 9
	, DCD_Info_ScaleVolume	= 10
	, DCD_Info_ModuleName   = 11
	, DCD_Info_ModuleHandle = 12
} DCD_PlayerInfo;

#define EMsg_DCD_Misc 0x5327E

const _kernel_oserror* DCDUtils_RegisterPlayer(int* player);
const _kernel_oserror* DCDUtils_DeregisterPlayer(int player);
void DCDUtils_SetInfo(int player, int count, int type);
void DCDUtils_SetIntInfo(int player, int info, int value);
int DCDUtils_GetFullScreenPlugIn(void);
void DCDUtils_StartPlugIn(int player);
void DCDUtils_StopPlugIns(int player);
void DCDUtils_UpdatePlugInsPosition(int player);
bool DCDUtils_PlayerHasPlugIn(int player);
bool DCDUtils_HasValidDriver(int hardwaretype);
int DCDUtils_PlayerFindPlugIn(int player, const char* pName);

#endif
