iMONDisplayWrapper.cpp
author sl
Mon, 17 Mar 2014 12:38:39 +0100
changeset 3 d5f6b2119a13
parent 0 523a7dc3469f
permissions -rw-r--r--
Fixing init result issue.
sl@0
     1
//------------------------------------------------------------------------------
sl@0
     2
#include <windows.h>
sl@0
     3
#include "iMONDisplayWrapper.h"
sl@0
     4
#include "IdwApi.h"
sl@0
     5
//------------------------------------------------------------------------------
sl@0
     6
IdwApi* pIdwApi = NULL;
sl@0
     7
//------------------------------------------------------------------------------
sl@0
     8
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
sl@2
     9
	{
sl@2
    10
	switch (fdwReason)
sl@2
    11
		{
sl@2
    12
	case DLL_PROCESS_ATTACH:
sl@2
    13
		if (pIdwApi==NULL) //Defensive
sl@2
    14
			{
sl@2
    15
			pIdwApi = new IdwApi(hinstDLL);
sl@2
    16
			}
sl@2
    17
		break;
sl@2
    18
	case DLL_PROCESS_DETACH:
sl@2
    19
		delete pIdwApi;
sl@2
    20
		pIdwApi=NULL;
sl@2
    21
		break;
sl@2
    22
		}
sl@2
    23
	return TRUE;
sl@2
    24
	}
sl@0
    25
//------------------------------------------------------------------------------
sl@0
    26
DSPResult IDW_Init(IDW_INITRESULT* pInitResult)
sl@0
    27
{
sl@0
    28
  return pIdwApi->Init(pInitResult);
sl@0
    29
}
sl@0
    30
//------------------------------------------------------------------------------
sl@0
    31
DSPResult IDW_Uninit()
sl@0
    32
{
sl@0
    33
  return pIdwApi->Uninit();
sl@0
    34
}
sl@0
    35
//------------------------------------------------------------------------------
sl@2
    36
DSPResult IDW_IsInitialized()
sl@0
    37
{
sl@2
    38
  return pIdwApi->IsInitialized();
sl@0
    39
}
sl@0
    40
//------------------------------------------------------------------------------
sl@0
    41
DSPResult IDW_IsPluginModeEnabled()
sl@0
    42
{
sl@0
    43
  return pIdwApi->IsPluginModeEnabled();
sl@0
    44
}
sl@2
    45
sl@2
    46
/**
sl@2
    47
*/
sl@2
    48
DSPResult IDW_GetStatus(IDW_STATUS* aStatus)
sl@2
    49
	{
sl@2
    50
	return pIdwApi->GetStatus(aStatus);
sl@2
    51
	}
sl@2
    52
sl@0
    53
//------------------------------------------------------------------------------
sl@0
    54
DSPResult IDW_SetVfdText(LPCWSTR lpszLine1, LPCWSTR lpszLine2)
sl@0
    55
{
sl@0
    56
/*
sl@0
    57
DSPEQDATA eqData;
sl@0
    58
eqData.BandData[0] = 100;
sl@0
    59
eqData.BandData[1] = 90;
sl@0
    60
eqData.BandData[2] = 80;
sl@0
    61
eqData.BandData[3] = 70;
sl@0
    62
eqData.BandData[4] = 60;
sl@0
    63
eqData.BandData[5] = 50;
sl@0
    64
eqData.BandData[6] = 40;
sl@0
    65
eqData.BandData[7] = 30;
sl@0
    66
eqData.BandData[8] = 30;
sl@0
    67
eqData.BandData[9] = 40;
sl@0
    68
eqData.BandData[10] = 50;
sl@0
    69
eqData.BandData[11] = 60;
sl@0
    70
eqData.BandData[12] = 70;
sl@0
    71
eqData.BandData[13] = 80;
sl@0
    72
eqData.BandData[14] = 90;
sl@0
    73
eqData.BandData[15] = 100;
sl@0
    74
return pIdwApi->SetVfdEqData(&eqData);
sl@0
    75
*/
sl@0
    76
  return pIdwApi->SetVfdText(lpszLine1, lpszLine2);
sl@0
    77
}
sl@0
    78
//------------------------------------------------------------------------------
sl@0
    79
DSPResult IDW_SetVfdEqData(PDSPEQDATA pEqData)
sl@0
    80
{
sl@0
    81
  return pIdwApi->SetVfdEqData(pEqData);
sl@0
    82
}
sl@0
    83
//------------------------------------------------------------------------------
sl@0
    84
DSPResult IDW_SetLcdText(LPCWSTR lpszLine1)
sl@0
    85
{
sl@0
    86
  return pIdwApi->SetLcdText(lpszLine1);
sl@0
    87
}
sl@0
    88
//------------------------------------------------------------------------------
sl@0
    89
DSPResult IDW_SetLcdEqData(PDSPEQDATA pEqDataL, PDSPEQDATA pEqDataR)
sl@0
    90
{
sl@0
    91
  return pIdwApi->SetLcdEqData(pEqDataL, pEqDataR);
sl@0
    92
}
sl@0
    93
//------------------------------------------------------------------------------
sl@0
    94
DSPResult IDW_SetLcdAllIcons(BOOL bOn)
sl@0
    95
{
sl@0
    96
  return pIdwApi->SetLcdAllIcons(bOn);
sl@0
    97
}
sl@0
    98
//------------------------------------------------------------------------------
sl@0
    99
DSPResult IDW_SetLcdOrangeIcon(BYTE btIconData1, BYTE btIconData2)
sl@0
   100
{
sl@0
   101
  return pIdwApi->SetLcdOrangeIcon(btIconData1, btIconData2);
sl@0
   102
}
sl@0
   103
//------------------------------------------------------------------------------
sl@0
   104
DSPResult IDW_SetLcdMediaTypeIcon(BYTE btIconData)
sl@0
   105
{
sl@0
   106
	return pIdwApi->SetLcdMediaTypeIcon(btIconData);
sl@0
   107
}
sl@0
   108
//------------------------------------------------------------------------------
sl@0
   109
DSPResult IDW_SetLcdSpeakerIcon(BYTE btIconData1, BYTE btIconData2)
sl@0
   110
{
sl@0
   111
  return pIdwApi->SetLcdSpeakerIcon(btIconData1, btIconData2);
sl@0
   112
}
sl@0
   113
//------------------------------------------------------------------------------
sl@0
   114
DSPResult IDW_SetLcdVideoCodecIcon(BYTE btIconData)
sl@0
   115
{
sl@0
   116
	return pIdwApi->SetLcdVideoCodecIcon(btIconData);
sl@0
   117
}
sl@0
   118
//------------------------------------------------------------------------------
sl@0
   119
DSPResult IDW_SetLcdAudioCodecIcon(BYTE btIconData)
sl@0
   120
{
sl@0
   121
	return pIdwApi->SetLcdAudioCodecIcon(btIconData);
sl@0
   122
}
sl@0
   123
//------------------------------------------------------------------------------
sl@0
   124
DSPResult IDW_SetLcdAspectRatioIcon(BYTE btIconData)
sl@0
   125
{
sl@0
   126
	return pIdwApi->SetLcdAspectRatioIcon(btIconData);
sl@0
   127
}
sl@0
   128
//------------------------------------------------------------------------------
sl@0
   129
DSPResult IDW_SetLcdEtcIcon(BYTE btIconData)
sl@0
   130
{
sl@0
   131
	return pIdwApi->SetLcdEtcIcon(btIconData);
sl@0
   132
}
sl@0
   133
//------------------------------------------------------------------------------
sl@0
   134
DSPResult IDW_SetLcdProgress(int nCurPos, int nTotal)
sl@0
   135
{
sl@0
   136
	return pIdwApi->SetLcdProgress(nCurPos, nTotal);
sl@0
   137
}
sl@0
   138
//------------------------------------------------------------------------------