First contribution.
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/Event.cpp Sun Mar 16 09:11:39 2014 +0100
1.3 @@ -0,0 +1,29 @@
1.4 +//------------------------------------------------------------------------------
1.5 +#include "Event.h"
1.6 +//------------------------------------------------------------------------------
1.7 +Event::Event()
1.8 +{
1.9 + m_hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
1.10 +}
1.11 +//------------------------------------------------------------------------------
1.12 +Event::~Event()
1.13 +{
1.14 + if (m_hEvent)
1.15 + CloseHandle(m_hEvent);
1.16 +}
1.17 +//------------------------------------------------------------------------------
1.18 +void Event::Signal() const
1.19 +{
1.20 + SetEvent(m_hEvent);
1.21 +}
1.22 +//------------------------------------------------------------------------------
1.23 +void Event::Reset() const
1.24 +{
1.25 + ResetEvent(m_hEvent);
1.26 +}
1.27 +//------------------------------------------------------------------------------
1.28 +void Event::Await() const
1.29 +{
1.30 + WaitForSingleObject(m_hEvent, INFINITE);
1.31 +}
1.32 +//------------------------------------------------------------------------------
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/Event.h Sun Mar 16 09:11:39 2014 +0100
2.3 @@ -0,0 +1,27 @@
2.4 +//------------------------------------------------------------------------------
2.5 +#ifndef EVENT_H_INCLUDED
2.6 +#define EVENT_H_INCLUDED
2.7 +//------------------------------------------------------------------------------
2.8 +#include <windows.h>
2.9 +//------------------------------------------------------------------------------
2.10 +class Event
2.11 +{
2.12 +public:
2.13 + Event();
2.14 + virtual ~Event();
2.15 +
2.16 +private:
2.17 + Event(const Event& other) {}
2.18 + Event& operator=(const Event& other) { return *this; }
2.19 +
2.20 +public:
2.21 + void Signal() const;
2.22 + void Reset() const;
2.23 + void Await() const;
2.24 +
2.25 +private:
2.26 + HANDLE m_hEvent;
2.27 +};
2.28 +//------------------------------------------------------------------------------
2.29 +#endif
2.30 +//------------------------------------------------------------------------------
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
3.2 +++ b/IdwApi.cpp Sun Mar 16 09:11:39 2014 +0100
3.3 @@ -0,0 +1,247 @@
3.4 +//------------------------------------------------------------------------------
3.5 +#include "IdwApi.h"
3.6 +#include <windows.h>
3.7 +//------------------------------------------------------------------------------
3.8 +IdwApi::IdwApi(HINSTANCE hInstance)
3.9 +: m_hInstance(hInstance)
3.10 +, m_pIdwThread(NULL)
3.11 +, m_nInitCount(0)
3.12 +{
3.13 +}
3.14 +//------------------------------------------------------------------------------
3.15 +IdwApi::~IdwApi()
3.16 +{
3.17 +}
3.18 +//------------------------------------------------------------------------------
3.19 +DSPResult IdwApi::Init(IDW_INITRESULT* pInitResult)
3.20 +{
3.21 + m_mutex.Request();
3.22 + if (m_nInitCount == 0)
3.23 + {
3.24 + m_pIdwThread = new IdwThread(m_hInstance);
3.25 + m_pIdwThread->Start();
3.26 + }
3.27 + ++m_nInitCount;
3.28 + DSPResult ret = m_pIdwThread->Init(pInitResult);
3.29 + m_mutex.Release();
3.30 + return ret;
3.31 +}
3.32 +//------------------------------------------------------------------------------
3.33 +DSPResult IdwApi::Uninit()
3.34 +{
3.35 + m_mutex.Request();
3.36 + if (m_nInitCount == 0)
3.37 + {
3.38 + m_mutex.Release();
3.39 + return DSP_E_NOT_INITED;
3.40 + }
3.41 + DSPResult ret = m_pIdwThread->Uninit();
3.42 + if (ret == DSP_SUCCEEDED)
3.43 + {
3.44 + --m_nInitCount;
3.45 + if (m_nInitCount == 0)
3.46 + {
3.47 + m_pIdwThread->Interrupt();
3.48 + m_pIdwThread->Join();
3.49 + delete m_pIdwThread;
3.50 + }
3.51 + }
3.52 + m_mutex.Release();
3.53 + return ret;
3.54 +}
3.55 +//------------------------------------------------------------------------------
3.56 +DSPResult IdwApi::IsInited()
3.57 +{
3.58 + m_mutex.Request();
3.59 + if (m_nInitCount == 0)
3.60 + {
3.61 + m_mutex.Release();
3.62 + return DSP_S_NOT_INITED;
3.63 + }
3.64 + DSPResult ret = m_pIdwThread->IsInited();
3.65 + m_mutex.Release();
3.66 + return ret;
3.67 +}
3.68 +//------------------------------------------------------------------------------
3.69 +DSPResult IdwApi::IsPluginModeEnabled()
3.70 +{
3.71 + m_mutex.Request();
3.72 + if (m_nInitCount == 0)
3.73 + {
3.74 + m_mutex.Release();
3.75 + return DSP_S_NOT_IN_PLUGIN_MODE;
3.76 + }
3.77 + DSPResult ret = m_pIdwThread->IsPluginModeEnabled();
3.78 + m_mutex.Release();
3.79 + return ret;
3.80 +}
3.81 +//------------------------------------------------------------------------------
3.82 +DSPResult IdwApi::SetVfdText(LPCWSTR lpszLine1, LPCWSTR lpszLine2)
3.83 +{
3.84 + m_mutex.Request();
3.85 + if (m_nInitCount == 0)
3.86 + {
3.87 + m_mutex.Release();
3.88 + return DSP_E_NOT_INITED;
3.89 + }
3.90 + DSPResult ret = m_pIdwThread->SetVfdText(lpszLine1, lpszLine2);
3.91 + m_mutex.Release();
3.92 + return ret;
3.93 +}
3.94 +//------------------------------------------------------------------------------
3.95 +DSPResult IdwApi::SetVfdEqData(PDSPEQDATA pEqData)
3.96 +{
3.97 + m_mutex.Request();
3.98 + if (m_nInitCount == 0)
3.99 + {
3.100 + m_mutex.Release();
3.101 + return DSP_E_NOT_INITED;
3.102 + }
3.103 + DSPResult ret = m_pIdwThread->SetVfdEqData(pEqData);
3.104 + m_mutex.Release();
3.105 + return ret;
3.106 +}
3.107 +//------------------------------------------------------------------------------
3.108 +DSPResult IdwApi::SetLcdText(LPCWSTR lpszLine1)
3.109 +{
3.110 + m_mutex.Request();
3.111 + if (m_nInitCount == 0)
3.112 + {
3.113 + m_mutex.Release();
3.114 + return DSP_E_NOT_INITED;
3.115 + }
3.116 + DSPResult ret = m_pIdwThread->SetLcdText(lpszLine1);
3.117 + m_mutex.Release();
3.118 + return ret;
3.119 +}
3.120 +//------------------------------------------------------------------------------
3.121 +DSPResult IdwApi::SetLcdEqData(PDSPEQDATA pEqDataL, PDSPEQDATA pEqDataR)
3.122 +{
3.123 + m_mutex.Request();
3.124 + if (m_nInitCount == 0)
3.125 + {
3.126 + m_mutex.Release();
3.127 + return DSP_E_NOT_INITED;
3.128 + }
3.129 + DSPResult ret = m_pIdwThread->SetLcdEqData(pEqDataL, pEqDataR);
3.130 + m_mutex.Release();
3.131 + return ret;
3.132 +}
3.133 +//------------------------------------------------------------------------------
3.134 +DSPResult IdwApi::SetLcdAllIcons(BOOL bOn)
3.135 +{
3.136 + m_mutex.Request();
3.137 + if (m_nInitCount == 0)
3.138 + {
3.139 + m_mutex.Release();
3.140 + return DSP_E_NOT_INITED;
3.141 + }
3.142 + DSPResult ret = m_pIdwThread->SetLcdAllIcons(bOn);
3.143 + m_mutex.Release();
3.144 + return ret;
3.145 +}
3.146 +//------------------------------------------------------------------------------
3.147 +DSPResult IdwApi::SetLcdOrangeIcon(BYTE btIconData1, BYTE btIconData2)
3.148 +{
3.149 + m_mutex.Request();
3.150 + if (m_nInitCount == 0)
3.151 + {
3.152 + m_mutex.Release();
3.153 + return DSP_E_NOT_INITED;
3.154 + }
3.155 + DSPResult ret = m_pIdwThread->SetLcdOrangeIcon(btIconData1, btIconData2);
3.156 + m_mutex.Release();
3.157 + return ret;
3.158 +}
3.159 +//------------------------------------------------------------------------------
3.160 +DSPResult IdwApi::SetLcdMediaTypeIcon(BYTE btIconData)
3.161 +{
3.162 + m_mutex.Request();
3.163 + if (m_nInitCount == 0)
3.164 + {
3.165 + m_mutex.Release();
3.166 + return DSP_E_NOT_INITED;
3.167 + }
3.168 + DSPResult ret = m_pIdwThread->SetLcdMediaTypeIcon(btIconData);
3.169 + m_mutex.Release();
3.170 + return ret;
3.171 +}
3.172 +//------------------------------------------------------------------------------
3.173 +DSPResult IdwApi::SetLcdSpeakerIcon(BYTE btIconData1, BYTE btIconData2)
3.174 +{
3.175 + m_mutex.Request();
3.176 + if (m_nInitCount == 0)
3.177 + {
3.178 + m_mutex.Release();
3.179 + return DSP_E_NOT_INITED;
3.180 + }
3.181 + DSPResult ret = m_pIdwThread->SetLcdSpeakerIcon(btIconData1, btIconData2);
3.182 + m_mutex.Release();
3.183 + return ret;
3.184 +}
3.185 +//------------------------------------------------------------------------------
3.186 +DSPResult IdwApi::SetLcdVideoCodecIcon(BYTE btIconData)
3.187 +{
3.188 + m_mutex.Request();
3.189 + if (m_nInitCount == 0)
3.190 + {
3.191 + m_mutex.Release();
3.192 + return DSP_E_NOT_INITED;
3.193 + }
3.194 + DSPResult ret = m_pIdwThread->SetLcdVideoCodecIcon(btIconData);
3.195 + m_mutex.Release();
3.196 + return ret;
3.197 +}
3.198 +//------------------------------------------------------------------------------
3.199 +DSPResult IdwApi::SetLcdAudioCodecIcon(BYTE btIconData)
3.200 +{
3.201 + m_mutex.Request();
3.202 + if (m_nInitCount == 0)
3.203 + {
3.204 + m_mutex.Release();
3.205 + return DSP_E_NOT_INITED;
3.206 + }
3.207 + DSPResult ret = m_pIdwThread->SetLcdAudioCodecIcon(btIconData);
3.208 + m_mutex.Release();
3.209 + return ret;
3.210 +}
3.211 +//------------------------------------------------------------------------------
3.212 +DSPResult IdwApi::SetLcdAspectRatioIcon(BYTE btIconData)
3.213 +{
3.214 + m_mutex.Request();
3.215 + if (m_nInitCount == 0)
3.216 + {
3.217 + m_mutex.Release();
3.218 + return DSP_E_NOT_INITED;
3.219 + }
3.220 + DSPResult ret = m_pIdwThread->SetLcdAspectRatioIcon(btIconData);
3.221 + m_mutex.Release();
3.222 + return ret;
3.223 +}
3.224 +//------------------------------------------------------------------------------
3.225 +DSPResult IdwApi::SetLcdEtcIcon(BYTE btIconData)
3.226 +{
3.227 + m_mutex.Request();
3.228 + if (m_nInitCount == 0)
3.229 + {
3.230 + m_mutex.Release();
3.231 + return DSP_E_NOT_INITED;
3.232 + }
3.233 + DSPResult ret = m_pIdwThread->SetLcdEtcIcon(btIconData);
3.234 + m_mutex.Release();
3.235 + return ret;
3.236 +}
3.237 +//------------------------------------------------------------------------------
3.238 +DSPResult IdwApi::SetLcdProgress(int nCurPos, int nTotal)
3.239 +{
3.240 + m_mutex.Request();
3.241 + if (m_nInitCount == 0)
3.242 + {
3.243 + m_mutex.Release();
3.244 + return DSP_E_NOT_INITED;
3.245 + }
3.246 + DSPResult ret = m_pIdwThread->SetLcdProgress(nCurPos, nTotal);
3.247 + m_mutex.Release();
3.248 + return ret;
3.249 +}
3.250 +//------------------------------------------------------------------------------
3.251 \ No newline at end of file
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
4.2 +++ b/IdwApi.h Sun Mar 16 09:11:39 2014 +0100
4.3 @@ -0,0 +1,48 @@
4.4 +//------------------------------------------------------------------------------
4.5 +#ifndef IDWAPI_H_INCLUDED
4.6 +#define IDWAPI_H_INCLUDED
4.7 +//------------------------------------------------------------------------------
4.8 +#include <windows.h>
4.9 +#include "Mutex.h"
4.10 +#include "iMONDisplayDefines.h"
4.11 +#include "iMONDisplayWrapper.h"
4.12 +#include "IdwThread.h"
4.13 +//------------------------------------------------------------------------------
4.14 +class IdwApi
4.15 +{
4.16 +public:
4.17 + IdwApi(HINSTANCE hInstance);
4.18 + ~IdwApi();
4.19 +
4.20 +public:
4.21 + DSPResult Init(IDW_INITRESULT* pInitResult);
4.22 + DSPResult Uninit();
4.23 + DSPResult IsInited();
4.24 + DSPResult IsPluginModeEnabled();
4.25 + DSPResult SetVfdText(LPCWSTR lpszLine1, LPCWSTR lpszLine2);
4.26 + DSPResult SetVfdEqData(PDSPEQDATA pEqData);
4.27 + DSPResult SetLcdText(LPCWSTR lpszText);
4.28 + DSPResult SetLcdEqData(PDSPEQDATA pEqDataL, PDSPEQDATA pEqDataR);
4.29 + DSPResult SetLcdAllIcons(BOOL bOn);
4.30 + DSPResult SetLcdOrangeIcon(BYTE btIconData1, BYTE btIconData2);
4.31 + DSPResult SetLcdMediaTypeIcon(BYTE btIconData);
4.32 + DSPResult SetLcdSpeakerIcon(BYTE btIconData1, BYTE btIconData2);
4.33 + DSPResult SetLcdVideoCodecIcon(BYTE btIconData);
4.34 + DSPResult SetLcdAudioCodecIcon(BYTE btIconData);
4.35 + DSPResult SetLcdAspectRatioIcon(BYTE btIconData);
4.36 + DSPResult SetLcdEtcIcon(BYTE btIconData);
4.37 + DSPResult SetLcdProgress(int nCurPos, int nTotal);
4.38 +
4.39 +private:
4.40 + IdwApi(const IdwApi& other) {}
4.41 + IdwApi& operator=(const IdwApi& other) { return *this; }
4.42 +
4.43 +private:
4.44 + HINSTANCE m_hInstance;
4.45 + Mutex m_mutex;
4.46 + int m_nInitCount;
4.47 + IdwThread* m_pIdwThread;
4.48 +};
4.49 +//------------------------------------------------------------------------------
4.50 +#endif
4.51 +//------------------------------------------------------------------------------
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
5.2 +++ b/IdwThread.cpp Sun Mar 16 09:11:39 2014 +0100
5.3 @@ -0,0 +1,745 @@
5.4 +//------------------------------------------------------------------------------
5.5 +#include "IdwThread.h"
5.6 +#include "iMONDisplayAPI.h"
5.7 +//------------------------------------------------------------------------------
5.8 +#define CLASSNAME TEXT("IDW_IMON_COM_WNDCLASS")
5.9 +//------------------------------------------------------------------------------
5.10 +#define WM_IDW_IMON (WM_USER + 1)
5.11 +#define WM_IDW_INIT (WM_USER + 2)
5.12 +#define WM_IDW_UNINIT (WM_USER + 3)
5.13 +#define WM_IDW_ISINITED (WM_USER + 4)
5.14 +#define WM_IDW_ISPLUGINMODEENABLED (WM_USER + 5)
5.15 +#define WM_IDW_SETVFDTEXT (WM_USER + 6)
5.16 +#define WM_IDW_SETVFDEQ (WM_USER + 7)
5.17 +#define WM_IDW_SETLCDTEXT (WM_USER + 8)
5.18 +#define WM_IDW_SETLCDEQ (WM_USER + 9)
5.19 +#define WM_IDW_SETLCDALLICONS (WM_USER + 10)
5.20 +#define WM_IDW_SETLCDORANGEICON (WM_USER + 11)
5.21 +#define WM_IDW_SETLCDMEDIATYPEICON (WM_USER + 12)
5.22 +#define WM_IDW_SETLCDSPEAKERICON (WM_USER + 13)
5.23 +#define WM_IDW_SETLCDVIDEOCODEC (WM_USER + 14)
5.24 +#define WM_IDW_SETLCDAUDIOCODEC (WM_USER + 15)
5.25 +#define WM_IDW_SETLCDASPECTRATIO (WM_USER + 16)
5.26 +#define WM_IDW_SETLCDETCICON (WM_USER + 17)
5.27 +#define WM_IDW_SETLCDPROGRESS (WM_USER + 18)
5.28 +#define WM_IDW_INTERRUPT (WM_USER + 100)
5.29 +//------------------------------------------------------------------------------
5.30 +struct IdwImonInitResult
5.31 +{
5.32 + DSPResult result;
5.33 + DSPNInitResult initResult;
5.34 + DSPType dspType;
5.35 +};
5.36 +struct IdwSetVfdText
5.37 +{
5.38 + DSPResult result;
5.39 + LPCWSTR pszLine1;
5.40 + LPCWSTR pszLine2;
5.41 +};
5.42 +struct IdwSetVfdEq
5.43 +{
5.44 + DSPResult result;
5.45 + PDSPEQDATA pEqData;
5.46 +};
5.47 +struct IdwSetLcdText
5.48 +{
5.49 + DSPResult result;
5.50 + LPCWSTR pszLine1;
5.51 +};
5.52 +struct IdwSetLcdEq
5.53 +{
5.54 + DSPResult result;
5.55 + PDSPEQDATA pEqDataL;
5.56 + PDSPEQDATA pEqDataR;
5.57 +};
5.58 +struct IdwSetLcdAllIcons
5.59 +{
5.60 + DSPResult result;
5.61 + BOOL bOn;
5.62 +};
5.63 +struct IdwSetLcdIcons
5.64 +{
5.65 + DSPResult result;
5.66 + BYTE btIconData;
5.67 +};
5.68 +struct IdwSetLcdIcons2
5.69 +{
5.70 + DSPResult result;
5.71 + BYTE btIconData1;
5.72 + BYTE btIconData2;
5.73 +};
5.74 +struct IdwSetLcdProgress
5.75 +{
5.76 + DSPResult result;
5.77 + int nCurPos;
5.78 + int nTotal;
5.79 +};
5.80 +//------------------------------------------------------------------------------
5.81 +IdwThread::IdwThread(HINSTANCE hInstance)
5.82 +: m_hInstance(hInstance)
5.83 +, m_hWnd(NULL)
5.84 +{
5.85 +}
5.86 +//------------------------------------------------------------------------------
5.87 +IdwThread::~IdwThread()
5.88 +{
5.89 +}
5.90 +//------------------------------------------------------------------------------
5.91 +void IdwThread::Interrupt()
5.92 +{
5.93 + if (!WaitForWindow())
5.94 + return;
5.95 + PostMessage(m_hWnd, WM_IDW_INTERRUPT, 0, 0);
5.96 +}
5.97 +//------------------------------------------------------------------------------
5.98 +DSPResult IdwThread::Init(IDW_INITRESULT* pInitResult)
5.99 +{
5.100 + if (!WaitForWindow())
5.101 + return DSP_E_FAIL;
5.102 +
5.103 + IdwImonInitResult result;
5.104 + Event finished;
5.105 + PostMessage(m_hWnd, WM_IDW_INIT, (WPARAM)&result, (LPARAM)&finished);
5.106 + finished.Await();
5.107 + if (pInitResult != NULL)
5.108 + {
5.109 + pInitResult->initResult = result.initResult;
5.110 + pInitResult->dspType = result.dspType;
5.111 + }
5.112 +
5.113 + return result.result;
5.114 +}
5.115 +//------------------------------------------------------------------------------
5.116 +DSPResult IdwThread::Uninit()
5.117 +{
5.118 + if (!WaitForWindow())
5.119 + return DSP_E_FAIL;
5.120 +
5.121 + DSPResult result;
5.122 + Event finished;
5.123 + PostMessage(m_hWnd, WM_IDW_UNINIT, (WPARAM)&result, (LPARAM)&finished);
5.124 + finished.Await();
5.125 +
5.126 + return result;
5.127 +}
5.128 +//------------------------------------------------------------------------------
5.129 +DSPResult IdwThread::IsInited()
5.130 +{
5.131 + if (!WaitForWindow())
5.132 + return DSP_E_FAIL;
5.133 +
5.134 + DSPResult result;
5.135 + Event finished;
5.136 + PostMessage(m_hWnd, WM_IDW_ISINITED, (WPARAM)&result, (LPARAM)&finished);
5.137 + finished.Await();
5.138 +
5.139 + return result;
5.140 +}
5.141 +//------------------------------------------------------------------------------
5.142 +DSPResult IdwThread::IsPluginModeEnabled()
5.143 +{
5.144 + if (!WaitForWindow())
5.145 + return DSP_E_FAIL;
5.146 +
5.147 + DSPResult result;
5.148 + Event finished;
5.149 + PostMessage(m_hWnd, WM_IDW_ISPLUGINMODEENABLED, (WPARAM)&result,
5.150 + (LPARAM)&finished);
5.151 + finished.Await();
5.152 +
5.153 + return result;
5.154 +}
5.155 +//------------------------------------------------------------------------------
5.156 +DSPResult IdwThread::SetVfdText(LPCWSTR lpszLine1, LPCWSTR lpszLine2)
5.157 +{
5.158 + if (!WaitForWindow())
5.159 + return DSP_E_FAIL;
5.160 +
5.161 + IdwSetVfdText text;
5.162 + text.pszLine1 = lpszLine1;
5.163 + text.pszLine2 = lpszLine2;
5.164 + Event finished;
5.165 + PostMessage(m_hWnd, WM_IDW_SETVFDTEXT, (WPARAM)&text, (LPARAM)&finished);
5.166 + finished.Await();
5.167 +
5.168 + return text.result;
5.169 +}
5.170 +//------------------------------------------------------------------------------
5.171 +DSPResult IdwThread::SetVfdEqData(PDSPEQDATA pEqData)
5.172 +{
5.173 + if (!WaitForWindow())
5.174 + return DSP_E_FAIL;
5.175 +
5.176 + IdwSetVfdEq eq;
5.177 + eq.pEqData = pEqData;
5.178 + Event finished;
5.179 + PostMessage(m_hWnd, WM_IDW_SETVFDEQ, (WPARAM)&eq, (LPARAM)&finished);
5.180 + finished.Await();
5.181 +
5.182 + return eq.result;
5.183 +}
5.184 +//------------------------------------------------------------------------------
5.185 +DSPResult IdwThread::SetLcdText(LPCWSTR lpszLine1)
5.186 +{
5.187 + if (!WaitForWindow())
5.188 + return DSP_E_FAIL;
5.189 +
5.190 + IdwSetLcdText text;
5.191 + text.pszLine1 = lpszLine1;
5.192 + Event finished;
5.193 + PostMessage(m_hWnd, WM_IDW_SETLCDTEXT, (WPARAM)&text, (LPARAM)&finished);
5.194 + finished.Await();
5.195 +
5.196 + return text.result;
5.197 +}
5.198 +//------------------------------------------------------------------------------
5.199 +DSPResult IdwThread::SetLcdEqData(PDSPEQDATA pEqDataL, PDSPEQDATA pEqDataR)
5.200 +{
5.201 + if (!WaitForWindow())
5.202 + return DSP_E_FAIL;
5.203 +
5.204 + IdwSetLcdEq eq;
5.205 + eq.pEqDataL = pEqDataL;
5.206 + eq.pEqDataR = pEqDataR;
5.207 + Event finished;
5.208 + PostMessage(m_hWnd, WM_IDW_SETLCDEQ, (WPARAM)&eq, (LPARAM)&finished);
5.209 + finished.Await();
5.210 +
5.211 + return eq.result;
5.212 +}
5.213 +//------------------------------------------------------------------------------
5.214 +DSPResult IdwThread::SetLcdAllIcons(BOOL bOn)
5.215 +{
5.216 + if (!WaitForWindow())
5.217 + return DSP_E_FAIL;
5.218 +
5.219 + IdwSetLcdAllIcons allIcons;
5.220 + allIcons.bOn = bOn;
5.221 + Event finished;
5.222 + PostMessage(m_hWnd, WM_IDW_SETLCDALLICONS,
5.223 + (WPARAM)&allIcons, (LPARAM)&finished);
5.224 + finished.Await();
5.225 +
5.226 + return allIcons.result;
5.227 +}
5.228 +//------------------------------------------------------------------------------
5.229 +DSPResult IdwThread::SetLcdOrangeIcon(BYTE btIconData1, BYTE btIconData2)
5.230 +{
5.231 + if (!WaitForWindow())
5.232 + return DSP_E_FAIL;
5.233 +
5.234 + IdwSetLcdIcons2 iconData;
5.235 + iconData.btIconData1 = btIconData1;
5.236 + iconData.btIconData2 = btIconData2;
5.237 + Event finished;
5.238 + PostMessage(m_hWnd, WM_IDW_SETLCDORANGEICON,
5.239 + (WPARAM)&iconData, (LPARAM)&finished);
5.240 + finished.Await();
5.241 +
5.242 + return iconData.result;
5.243 +}
5.244 +//------------------------------------------------------------------------------
5.245 +DSPResult IdwThread::SetLcdMediaTypeIcon(BYTE btIconData)
5.246 +{
5.247 + if (!WaitForWindow())
5.248 + return DSP_E_FAIL;
5.249 +
5.250 + IdwSetLcdIcons iconData;
5.251 + iconData.btIconData = btIconData;
5.252 + Event finished;
5.253 + PostMessage(m_hWnd, WM_IDW_SETLCDMEDIATYPEICON,
5.254 + (WPARAM)&iconData, (LPARAM)&finished);
5.255 + finished.Await();
5.256 +
5.257 + return iconData.result;
5.258 +}
5.259 +//------------------------------------------------------------------------------
5.260 +DSPResult IdwThread::SetLcdSpeakerIcon(BYTE btIconData1, BYTE btIconData2)
5.261 +{
5.262 + if (!WaitForWindow())
5.263 + return DSP_E_FAIL;
5.264 +
5.265 + IdwSetLcdIcons2 iconData;
5.266 + iconData.btIconData1 = btIconData1;
5.267 + iconData.btIconData2 = btIconData2;
5.268 + Event finished;
5.269 + PostMessage(m_hWnd, WM_IDW_SETLCDSPEAKERICON,
5.270 + (WPARAM)&iconData, (LPARAM)&finished);
5.271 + finished.Await();
5.272 +
5.273 + return iconData.result;
5.274 +}
5.275 +//------------------------------------------------------------------------------
5.276 +DSPResult IdwThread::SetLcdVideoCodecIcon(BYTE btIconData)
5.277 +{
5.278 + if (!WaitForWindow())
5.279 + return DSP_E_FAIL;
5.280 +
5.281 + IdwSetLcdIcons iconData;
5.282 + iconData.btIconData = btIconData;
5.283 + Event finished;
5.284 + PostMessage(m_hWnd, WM_IDW_SETLCDVIDEOCODEC,
5.285 + (WPARAM)&iconData, (LPARAM)&finished);
5.286 + finished.Await();
5.287 +
5.288 + return iconData.result;
5.289 +}
5.290 +//------------------------------------------------------------------------------
5.291 +DSPResult IdwThread::SetLcdAudioCodecIcon(BYTE btIconData)
5.292 +{
5.293 + if (!WaitForWindow())
5.294 + return DSP_E_FAIL;
5.295 +
5.296 + IdwSetLcdIcons iconData;
5.297 + iconData.btIconData = btIconData;
5.298 + Event finished;
5.299 + PostMessage(m_hWnd, WM_IDW_SETLCDAUDIOCODEC,
5.300 + (WPARAM)&iconData, (LPARAM)&finished);
5.301 + finished.Await();
5.302 +
5.303 + return iconData.result;
5.304 +}
5.305 +//------------------------------------------------------------------------------
5.306 +DSPResult IdwThread::SetLcdAspectRatioIcon(BYTE btIconData)
5.307 +{
5.308 + if (!WaitForWindow())
5.309 + return DSP_E_FAIL;
5.310 +
5.311 + IdwSetLcdIcons iconData;
5.312 + iconData.btIconData = btIconData;
5.313 + Event finished;
5.314 + PostMessage(m_hWnd, WM_IDW_SETLCDASPECTRATIO,
5.315 + (WPARAM)&iconData, (LPARAM)&finished);
5.316 + finished.Await();
5.317 +
5.318 + return iconData.result;
5.319 +}
5.320 +//------------------------------------------------------------------------------
5.321 +DSPResult IdwThread::SetLcdEtcIcon(BYTE btIconData)
5.322 +{
5.323 + if (!WaitForWindow())
5.324 + return DSP_E_FAIL;
5.325 +
5.326 + IdwSetLcdIcons iconData;
5.327 + iconData.btIconData = btIconData;
5.328 + Event finished;
5.329 + PostMessage(m_hWnd, WM_IDW_SETLCDETCICON,
5.330 + (WPARAM)&iconData, (LPARAM)&finished);
5.331 + finished.Await();
5.332 +
5.333 + return iconData.result;
5.334 +}
5.335 +//------------------------------------------------------------------------------
5.336 +DSPResult IdwThread::SetLcdProgress(int nCurPos, int nTotal)
5.337 +{
5.338 + if (!WaitForWindow())
5.339 + return DSP_E_FAIL;
5.340 +
5.341 + IdwSetLcdProgress progressData;
5.342 + progressData.nCurPos = nCurPos;
5.343 + progressData.nTotal = nTotal;
5.344 + Event finished;
5.345 + PostMessage(m_hWnd, WM_IDW_SETLCDPROGRESS,
5.346 + (WPARAM)&progressData, (LPARAM)&finished);
5.347 + finished.Await();
5.348 +
5.349 + return progressData.result;
5.350 +}
5.351 +//------------------------------------------------------------------------------
5.352 +void IdwThread::Run()
5.353 +{
5.354 + if (!RegisterClass())
5.355 + {
5.356 + m_eventWindowCreationDone.Signal();
5.357 + return;
5.358 + }
5.359 + if (!CreateMessageWindow())
5.360 + {
5.361 + m_eventWindowCreationDone.Signal();
5.362 + return;
5.363 + }
5.364 + AllowImonMessages();
5.365 +
5.366 + m_eventWindowCreationDone.Signal();
5.367 +
5.368 + MSG msg;
5.369 + BOOL fGotMessage;
5.370 + while ((fGotMessage = GetMessage(&msg, (HWND) NULL, 0, 0)) != 0
5.371 + && fGotMessage != -1)
5.372 + {
5.373 + TranslateMessage(&msg);
5.374 + DispatchMessage(&msg);
5.375 + }
5.376 +}
5.377 +//------------------------------------------------------------------------------
5.378 +bool IdwThread::RegisterClass()
5.379 +{
5.380 + WNDCLASSEX wc;
5.381 + if (GetClassInfoEx(m_hInstance, CLASSNAME, &wc))
5.382 + {
5.383 + return true;
5.384 + }
5.385 +
5.386 + wc.cbSize = sizeof(wc);
5.387 + wc.style = CS_HREDRAW | CS_VREDRAW;
5.388 + wc.lpfnWndProc = IdwThread::WndProc;
5.389 + wc.cbClsExtra = 0;
5.390 + wc.cbWndExtra = 0;
5.391 + wc.hInstance = m_hInstance;
5.392 + wc.hIcon = NULL;
5.393 + wc.hCursor = NULL;
5.394 + wc.hbrBackground = NULL;
5.395 + wc.lpszMenuName = NULL;
5.396 + wc.lpszClassName = CLASSNAME;
5.397 + wc.hIconSm = NULL;
5.398 + if (::RegisterClassEx(&wc))
5.399 + {
5.400 + return true;
5.401 + }
5.402 + return false;
5.403 +}
5.404 +//------------------------------------------------------------------------------
5.405 +bool IdwThread::CreateMessageWindow()
5.406 +{
5.407 + m_hWnd = CreateWindow(
5.408 + CLASSNAME,
5.409 + TEXT("MP iMON MessageWindow"),
5.410 + 0,
5.411 + 0, 0, 0, 0,
5.412 + HWND_MESSAGE,
5.413 + NULL,
5.414 + m_hInstance,
5.415 + NULL);
5.416 +
5.417 + if (!m_hWnd)
5.418 + return false;
5.419 + return true;
5.420 +}
5.421 +//------------------------------------------------------------------------------
5.422 +void IdwThread::AllowImonMessages()
5.423 +{
5.424 + // Determine OS
5.425 + OSVERSIONINFO version;
5.426 + version.dwOSVersionInfoSize = sizeof(version);
5.427 + GetVersionEx(&version);
5.428 + if (version.dwMajorVersion < 6)
5.429 + {
5.430 + return;
5.431 + }
5.432 +
5.433 + // Determine and allow iMON message number
5.434 + UINT iMonMsg =
5.435 + RegisterWindowMessage(
5.436 + TEXT("iMonMessage-431F1DC6-F31A-4AC6-A1FA-A4BB9C44FF10"));
5.437 + ChangeWindowMessageFilter(iMonMsg, MSGFLT_ADD);
5.438 +}
5.439 +//------------------------------------------------------------------------------
5.440 +bool IdwThread::WaitForWindow()
5.441 +{
5.442 + m_eventWindowCreationDone.Await();
5.443 + if (m_hWnd == NULL)
5.444 + return false;
5.445 + return true;
5.446 +}
5.447 +//------------------------------------------------------------------------------
5.448 +LRESULT CALLBACK IdwThread::WndProc(HWND hwnd, UINT uMsg, WPARAM wParam,
5.449 + LPARAM lParam)
5.450 +{
5.451 + static bool initing = false;
5.452 + static IdwImonInitResult* pInitResult = NULL;
5.453 + static Event* pInitFinished = NULL;
5.454 +
5.455 + DSPResult* pResult;
5.456 + Event* pFinished;
5.457 +
5.458 + switch (uMsg)
5.459 + {
5.460 + case WM_CREATE:
5.461 + return 0;
5.462 +
5.463 + case WM_DESTROY:
5.464 + PostQuitMessage(0);
5.465 + return 0;
5.466 +
5.467 + case WM_IDW_IMON:
5.468 + if (initing)
5.469 + {
5.470 + initing = false;
5.471 + pInitResult->initResult = (DSPNInitResult)wParam;
5.472 + pInitResult->dspType = (DSPType)lParam;
5.473 + pInitFinished->Signal();
5.474 + }
5.475 + return 0;
5.476 +
5.477 + case WM_IDW_INIT:
5.478 + initing = true;
5.479 + pInitResult = (IdwImonInitResult*)wParam;
5.480 + pInitFinished = (Event*)lParam;
5.481 + pInitResult->result = IMON_Display_Init(hwnd, WM_IDW_IMON);
5.482 + if (pInitResult->result != DSP_SUCCEEDED)
5.483 + {
5.484 + initing = false;
5.485 + pInitResult->initResult = DSPN_ERR_UNKNOWN;
5.486 + pInitResult->dspType = DSPN_DSP_NONE;
5.487 + pInitFinished->Signal();
5.488 + }
5.489 + return 0;
5.490 +
5.491 + case WM_IDW_UNINIT:
5.492 + pResult = (DSPResult*)wParam;
5.493 + pFinished = (Event*)lParam;
5.494 + *pResult = IMON_Display_Uninit();
5.495 + pFinished->Signal();
5.496 + return 0;
5.497 +
5.498 + case WM_IDW_ISINITED:
5.499 + pResult = (DSPResult*)wParam;
5.500 + pFinished = (Event*)lParam;
5.501 + *pResult = IMON_Display_IsInited();
5.502 + pFinished->Signal();
5.503 + return 0;
5.504 +
5.505 + case WM_IDW_ISPLUGINMODEENABLED:
5.506 + pResult = (DSPResult*)wParam;
5.507 + pFinished = (Event*)lParam;
5.508 + *pResult = IMON_Display_IsPluginModeEnabled();
5.509 + pFinished->Signal();
5.510 + return 0;
5.511 +
5.512 + case WM_IDW_SETVFDTEXT:
5.513 + {
5.514 + IdwSetVfdText* pSetVfdText = (IdwSetVfdText*)wParam;
5.515 + WCHAR szLine1[20];
5.516 + WCHAR szLine2[20];
5.517 + pFinished = (Event*)lParam;
5.518 + MapChars(szLine1, pSetVfdText->pszLine1, 16);
5.519 + MapChars(szLine2, pSetVfdText->pszLine2, 16);
5.520 + pSetVfdText->result = IMON_Display_SetVfdText(szLine1, szLine2);
5.521 + pFinished->Signal();
5.522 + return 0;
5.523 + }
5.524 +
5.525 + case WM_IDW_SETVFDEQ:
5.526 + {
5.527 + IdwSetVfdEq* pSetVfdEq = (IdwSetVfdEq*)wParam;
5.528 + pFinished = (Event*)lParam;
5.529 + pSetVfdEq->result = IMON_Display_SetVfdEqData(pSetVfdEq->pEqData);
5.530 + pFinished->Signal();
5.531 + return 0;
5.532 + }
5.533 +
5.534 + case WM_IDW_SETLCDTEXT:
5.535 + {
5.536 + IdwSetLcdText* pSetLcdText = (IdwSetLcdText*)wParam;
5.537 + pFinished = (Event*)lParam;
5.538 + pSetLcdText->result = IMON_Display_SetLcdText(pSetLcdText->pszLine1);
5.539 + pFinished->Signal();
5.540 + return 0;
5.541 + }
5.542 +
5.543 + case WM_IDW_SETLCDEQ:
5.544 + {
5.545 + IdwSetLcdEq* pSetLcdEq = (IdwSetLcdEq*)wParam;
5.546 + pFinished = (Event*)lParam;
5.547 + pSetLcdEq->result =
5.548 + IMON_Display_SetLcdEqData(pSetLcdEq->pEqDataL, pSetLcdEq->pEqDataR);
5.549 + pFinished->Signal();
5.550 + return 0;
5.551 + }
5.552 +
5.553 + case WM_IDW_SETLCDALLICONS:
5.554 + {
5.555 + IdwSetLcdAllIcons* pSetLcdAllIcons = (IdwSetLcdAllIcons*)wParam;
5.556 + pFinished = (Event*)lParam;
5.557 + pSetLcdAllIcons->result =
5.558 + IMON_Display_SetLcdAllIcons(pSetLcdAllIcons->bOn);
5.559 + pFinished->Signal();
5.560 + return 0;
5.561 + }
5.562 +
5.563 + case WM_IDW_SETLCDORANGEICON:
5.564 + {
5.565 + IdwSetLcdIcons2* pSetLcdIcons2 = (IdwSetLcdIcons2*)wParam;
5.566 + pFinished = (Event*)lParam;
5.567 + pSetLcdIcons2->result = IMON_Display_SetLcdOrangeIcon(
5.568 + pSetLcdIcons2->btIconData1, pSetLcdIcons2->btIconData2);
5.569 + pFinished->Signal();
5.570 + return 0;
5.571 + }
5.572 +
5.573 + case WM_IDW_SETLCDMEDIATYPEICON:
5.574 + {
5.575 + IdwSetLcdIcons* pSetLcdIcons = (IdwSetLcdIcons*)wParam;
5.576 + pFinished = (Event*)lParam;
5.577 + pSetLcdIcons->result =
5.578 + IMON_Display_SetLcdMediaTypeIcon(pSetLcdIcons->btIconData);
5.579 + pFinished->Signal();
5.580 + return 0;
5.581 + }
5.582 +
5.583 + case WM_IDW_SETLCDSPEAKERICON:
5.584 + {
5.585 + IdwSetLcdIcons2* pSetLcdIcons2 = (IdwSetLcdIcons2*)wParam;
5.586 + pFinished = (Event*)lParam;
5.587 + pSetLcdIcons2->result = IMON_Display_SetLcdSpeakerIcon(
5.588 + pSetLcdIcons2->btIconData1, pSetLcdIcons2->btIconData2);
5.589 + pFinished->Signal();
5.590 + return 0;
5.591 + }
5.592 +
5.593 + case WM_IDW_SETLCDVIDEOCODEC:
5.594 + {
5.595 + IdwSetLcdIcons* pSetLcdIcons = (IdwSetLcdIcons*)wParam;
5.596 + pFinished = (Event*)lParam;
5.597 + pSetLcdIcons->result =
5.598 + IMON_Display_SetLcdVideoCodecIcon(pSetLcdIcons->btIconData);
5.599 + pFinished->Signal();
5.600 + return 0;
5.601 + }
5.602 +
5.603 + case WM_IDW_SETLCDAUDIOCODEC:
5.604 + {
5.605 + IdwSetLcdIcons* pSetLcdIcons = (IdwSetLcdIcons*)wParam;
5.606 + pFinished = (Event*)lParam;
5.607 + pSetLcdIcons->result =
5.608 + IMON_Display_SetLcdAudioCodecIcon(pSetLcdIcons->btIconData);
5.609 + pFinished->Signal();
5.610 + return 0;
5.611 + }
5.612 +
5.613 + case WM_IDW_SETLCDASPECTRATIO:
5.614 + {
5.615 + IdwSetLcdIcons* pSetLcdIcons = (IdwSetLcdIcons*)wParam;
5.616 + pFinished = (Event*)lParam;
5.617 + pSetLcdIcons->result =
5.618 + IMON_Display_SetLcdAspectRatioIcon(pSetLcdIcons->btIconData);
5.619 + pFinished->Signal();
5.620 + return 0;
5.621 + }
5.622 +
5.623 + case WM_IDW_SETLCDETCICON:
5.624 + {
5.625 + IdwSetLcdIcons* pSetLcdIcons = (IdwSetLcdIcons*)wParam;
5.626 + pFinished = (Event*)lParam;
5.627 + pSetLcdIcons->result =
5.628 + IMON_Display_SetLcdEtcIcon(pSetLcdIcons->btIconData);
5.629 + pFinished->Signal();
5.630 + return 0;
5.631 + }
5.632 +
5.633 + case WM_IDW_SETLCDPROGRESS:
5.634 + {
5.635 + IdwSetLcdProgress* pSetLcdProgress = (IdwSetLcdProgress*)wParam;
5.636 + pFinished = (Event*)lParam;
5.637 + pSetLcdProgress->result = IMON_Display_SetLcdProgress(
5.638 + pSetLcdProgress->nCurPos, pSetLcdProgress->nTotal);
5.639 + pFinished->Signal();
5.640 + return 0;
5.641 + }
5.642 +
5.643 + case WM_IDW_INTERRUPT:
5.644 + DestroyWindow(hwnd);
5.645 + return 0;
5.646 + }
5.647 + return DefWindowProc(hwnd, uMsg, wParam, lParam);
5.648 +}
5.649 +//------------------------------------------------------------------------------
5.650 +void IdwThread::MapChars(LPWSTR lpszTarget, LPCWSTR lpszSource,
5.651 + int nMaxLength)
5.652 +{
5.653 + int len = (int)wcslen(lpszSource);
5.654 + if ((nMaxLength > 0) && (len > nMaxLength))
5.655 + len = nMaxLength;
5.656 + lpszTarget[len] = 0;
5.657 + for (int i = 0; i < len; ++i)
5.658 + {
5.659 + wchar_t ch = lpszSource[i];
5.660 + lpszTarget[i] = MapChar(ch);
5.661 + }
5.662 +}
5.663 +//------------------------------------------------------------------------------
5.664 +#define IN_RANGE(ch, s, e) ((ch >= s) && (ch <= e))
5.665 +#define IS(ch, c) (ch == c)
5.666 +wchar_t IdwThread::MapChar(wchar_t ch)
5.667 +{
5.668 + if (IN_RANGE(ch, 0x0020, 0x005B)
5.669 + || IN_RANGE(ch, 0x005D, 0x007D)
5.670 + || IS(ch, 0x0401)
5.671 + || IS(ch, 0x0404)
5.672 + || IN_RANGE(ch, 0x0406, 0x0407)
5.673 + || IN_RANGE(ch, 0x0410, 0x044F)
5.674 + || IS(ch, 0x0451)
5.675 + || IS(ch, 0x0454)
5.676 + || IN_RANGE(ch, 0x0456, 0x0457)
5.677 + || IN_RANGE(ch, 0x0490, 0x0491))
5.678 + return ch;
5.679 +
5.680 + switch (ch)
5.681 + {
5.682 + case 0x5C:
5.683 + return 0x8C;
5.684 + case 0x7E:
5.685 + return 0x8E;
5.686 + case 0x7F:
5.687 + return 0x20;
5.688 + case 0xA2:
5.689 + return 0xEC;
5.690 + case 0xA3:
5.691 + return 0x92;
5.692 + case 0xA5:
5.693 + return 0x5C;
5.694 + case 0xA6:
5.695 + return 0x98;
5.696 + case 0xA7:
5.697 + return 0x8F;
5.698 + case 0xB0:
5.699 + return 0xDF;
5.700 + case 0xB5:
5.701 + return 0xE4;
5.702 + case 0xC2:
5.703 + return 0x82;
5.704 + case 0xC4:
5.705 + return 0x80;
5.706 + case 0xC5:
5.707 + return 0x81;
5.708 + case 0xC6:
5.709 + return 0x90;
5.710 + case 0xC7:
5.711 + return 0x99;
5.712 + case 0xD1:
5.713 + return 0xEE;
5.714 + case 0xD6:
5.715 + return 0x86;
5.716 + case 0xD8:
5.717 + return 0x88;
5.718 + case 0xDC:
5.719 + return 0x8A;
5.720 + case 0xDE:
5.721 + return 0xF0;
5.722 + case 0xDF:
5.723 + return 0xE2;
5.724 + case 0xE1:
5.725 + return 0x83;
5.726 + case 0xE4:
5.727 + return 0xE1;
5.728 + case 0xE5:
5.729 + return 0x84;
5.730 + case 0xE7:
5.731 + return 0x99;
5.732 + case 0xF1:
5.733 + return 0xD1;
5.734 + case 0xF6:
5.735 + return 0x87;
5.736 + case 0xF7:
5.737 + return 0xFD;
5.738 + case 0xF8:
5.739 + return 0x89;
5.740 + case 0xFC:
5.741 + return 0x8B;
5.742 + case 0xFE:
5.743 + return 0xF0;
5.744 + default:
5.745 + return L'#';
5.746 + }
5.747 +}
5.748 +//------------------------------------------------------------------------------
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
6.2 +++ b/IdwThread.h Sun Mar 16 09:11:39 2014 +0100
6.3 @@ -0,0 +1,63 @@
6.4 +//------------------------------------------------------------------------------
6.5 +#ifndef IDWTHREAD_H_INCLUDED
6.6 +#define IDWTHREAD_H_INCLUDED
6.7 +//------------------------------------------------------------------------------
6.8 +#include <windows.h>
6.9 +#include "Thread.h"
6.10 +#include "Event.h"
6.11 +#include "Mutex.h"
6.12 +#include "iMONDisplayDefines.h"
6.13 +#include "iMONDisplayWrapper.h"
6.14 +//------------------------------------------------------------------------------
6.15 +class IdwThread : public Thread
6.16 +{
6.17 +public:
6.18 + IdwThread(HINSTANCE hInstance);
6.19 + virtual ~IdwThread();
6.20 +
6.21 +private:
6.22 + IdwThread(const IdwThread& other) {}
6.23 + IdwThread& operator=(const IdwThread& other) { return *this; }
6.24 +
6.25 +public:
6.26 + virtual void Interrupt();
6.27 + DSPResult Init(IDW_INITRESULT* pInitResult);
6.28 + DSPResult Uninit();
6.29 + DSPResult IsInited();
6.30 + DSPResult IsPluginModeEnabled();
6.31 + DSPResult SetVfdText(LPCWSTR lpszLine1, LPCWSTR lpszLine2);
6.32 + DSPResult SetVfdEqData(PDSPEQDATA pEqData);
6.33 + DSPResult SetLcdText(LPCWSTR lpszText);
6.34 + DSPResult SetLcdEqData(PDSPEQDATA pEqDataL, PDSPEQDATA pEqDataR);
6.35 + DSPResult SetLcdAllIcons(BOOL bOn);
6.36 + DSPResult SetLcdOrangeIcon(BYTE btIconData1, BYTE btIconData2);
6.37 + DSPResult SetLcdMediaTypeIcon(BYTE btIconData);
6.38 + DSPResult SetLcdSpeakerIcon(BYTE btIconData1, BYTE btIconData2);
6.39 + DSPResult SetLcdVideoCodecIcon(BYTE btIconData);
6.40 + DSPResult SetLcdAudioCodecIcon(BYTE btIconData);
6.41 + DSPResult SetLcdAspectRatioIcon(BYTE btIconData);
6.42 + DSPResult SetLcdEtcIcon(BYTE btIconData);
6.43 + DSPResult SetLcdProgress(int nCurPos, int nTotal);
6.44 +
6.45 +protected:
6.46 + virtual void Run();
6.47 +
6.48 +private:
6.49 + bool RegisterClass();
6.50 + bool CreateMessageWindow();
6.51 + void AllowImonMessages();
6.52 + bool WaitForWindow();
6.53 + static LRESULT CALLBACK WndProc(
6.54 + HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
6.55 + static void MapChars(
6.56 + LPWSTR lpszTarget, LPCWSTR lpszSource, int nMaxLength);
6.57 + static wchar_t MapChar(wchar_t ch);
6.58 +
6.59 +private:
6.60 + HINSTANCE m_hInstance;
6.61 + HWND m_hWnd;
6.62 + Event m_eventWindowCreationDone;
6.63 +};
6.64 +//------------------------------------------------------------------------------
6.65 +#endif
6.66 +//------------------------------------------------------------------------------
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
7.2 +++ b/Mutex.cpp Sun Mar 16 09:11:39 2014 +0100
7.3 @@ -0,0 +1,24 @@
7.4 +//------------------------------------------------------------------------------
7.5 +#include "Mutex.h"
7.6 +//------------------------------------------------------------------------------
7.7 +Mutex::Mutex()
7.8 +{
7.9 + m_hMutex = CreateMutex(NULL, FALSE, NULL);
7.10 +}
7.11 +//------------------------------------------------------------------------------
7.12 +Mutex::~Mutex()
7.13 +{
7.14 + if (m_hMutex)
7.15 + CloseHandle(m_hMutex);
7.16 +}
7.17 +//------------------------------------------------------------------------------
7.18 +void Mutex::Request() const
7.19 +{
7.20 + WaitForSingleObject(m_hMutex, INFINITE);
7.21 +}
7.22 +//------------------------------------------------------------------------------
7.23 +void Mutex::Release() const
7.24 +{
7.25 + ReleaseMutex(m_hMutex);
7.26 +}
7.27 +//------------------------------------------------------------------------------
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
8.2 +++ b/Mutex.h Sun Mar 16 09:11:39 2014 +0100
8.3 @@ -0,0 +1,26 @@
8.4 +//------------------------------------------------------------------------------
8.5 +#ifndef MUTEX_H_INCLUDED
8.6 +#define MUTEX_H_INCLUDED
8.7 +//------------------------------------------------------------------------------
8.8 +#include <windows.h>
8.9 +//------------------------------------------------------------------------------
8.10 +class Mutex
8.11 +{
8.12 +public:
8.13 + Mutex();
8.14 + virtual ~Mutex();
8.15 +
8.16 +private:
8.17 + Mutex(const Mutex& other) {}
8.18 + Mutex& operator=(const Mutex& other) { return *this; }
8.19 +
8.20 +public:
8.21 + void Request() const;
8.22 + void Release() const;
8.23 +
8.24 +private:
8.25 + HANDLE m_hMutex;
8.26 +};
8.27 +//------------------------------------------------------------------------------
8.28 +#endif
8.29 +//------------------------------------------------------------------------------
9.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
9.2 +++ b/Thread.cpp Sun Mar 16 09:11:39 2014 +0100
9.3 @@ -0,0 +1,41 @@
9.4 +//------------------------------------------------------------------------------
9.5 +#include "Thread.h"
9.6 +//------------------------------------------------------------------------------
9.7 +Thread::Thread() : m_hThread(NULL), m_dwThreadId(0)
9.8 +{
9.9 +}
9.10 +//------------------------------------------------------------------------------
9.11 +Thread::~Thread()
9.12 +{
9.13 + if (m_hThread != NULL)
9.14 + {
9.15 + TerminateThread(m_hThread, -1);
9.16 + m_hThread = NULL;
9.17 + }
9.18 +}
9.19 +//------------------------------------------------------------------------------
9.20 +void Thread::Start()
9.21 +{
9.22 + if (m_hThread != NULL)
9.23 + return;
9.24 + m_hThread = CreateThread(
9.25 + NULL,
9.26 + 0,
9.27 + Thread::ThreadProc,
9.28 + this,
9.29 + 0,
9.30 + &m_dwThreadId);
9.31 +}
9.32 +//------------------------------------------------------------------------------
9.33 +void Thread::Join() const
9.34 +{
9.35 + WaitForSingleObject(m_hThread, INFINITE);
9.36 +}
9.37 +//------------------------------------------------------------------------------
9.38 +DWORD WINAPI Thread::ThreadProc(LPVOID lpParam)
9.39 +{
9.40 + Thread* pThread = (Thread*)lpParam;
9.41 + pThread->Run();
9.42 + return 0;
9.43 +}
9.44 +//------------------------------------------------------------------------------
10.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
10.2 +++ b/Thread.h Sun Mar 16 09:11:39 2014 +0100
10.3 @@ -0,0 +1,34 @@
10.4 +//------------------------------------------------------------------------------
10.5 +#ifndef THREAD_H_INCLUDED
10.6 +#define THREAD_H_INCLUDED
10.7 +//------------------------------------------------------------------------------
10.8 +#include <windows.h>
10.9 +//------------------------------------------------------------------------------
10.10 +class Thread
10.11 +{
10.12 +protected:
10.13 + Thread();
10.14 + virtual ~Thread();
10.15 +
10.16 +private:
10.17 + Thread(const Thread& other) {}
10.18 + Thread& operator=(const Thread& other) { *this; }
10.19 +
10.20 +public:
10.21 + void Start();
10.22 + virtual void Interrupt() = 0;
10.23 + void Join() const;
10.24 +
10.25 +protected:
10.26 + virtual void Run() = 0;
10.27 +
10.28 +private:
10.29 + static DWORD WINAPI ThreadProc(LPVOID lpParam);
10.30 +
10.31 +private:
10.32 + HANDLE m_hThread;
10.33 + DWORD m_dwThreadId;
10.34 +};
10.35 +//------------------------------------------------------------------------------
10.36 +#endif
10.37 +//------------------------------------------------------------------------------
11.1 Binary file iMONDisplay.lib has changed
12.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
12.2 +++ b/iMONDisplayAPI.h Sun Mar 16 09:11:39 2014 +0100
12.3 @@ -0,0 +1,163 @@
12.4 +#ifndef __IMON_DISPLAY_API_H__
12.5 +#define __IMON_DISPLAY_API_H__
12.6 +
12.7 +////////////////////////////////////
12.8 +// includes
12.9 +/** iMONDisplayDefines.h
12.10 +This header file defines several enumerations. Open this file and check the definition and usage of enumerations and structures*/
12.11 +#include <windows.h>
12.12 +#include "iMONDisplayDefines.h"
12.13 +
12.14 +#ifdef IMON_DISPLAY_API_EXPORT
12.15 +#define IMONDSPAPI __declspec(dllexport)
12.16 +#else
12.17 +#define IMONDSPAPI __declspec(dllimport)
12.18 +#endif
12.19 +
12.20 +#ifdef __cplusplus
12.21 +extern "C"
12.22 +{
12.23 +#endif //__cplusplus
12.24 +
12.25 + /////////////////////////////////////
12.26 + ///// Interfaces
12.27 + /**DSPResult IMON_Display_Init(HWND hwndNoti, UINT uMsgNotification)
12.28 + @brief This function should be called to use other functions in iMON Display API.\n
12.29 + When the caller application calls this function, API tries to request Display Plug-in Mode to iMON.
12.30 + @param [in] hwndNoti API will send/post message to this handle.
12.31 + @param [in] uMsgNotification API will send/post message to hwndNoti with this message identifier.
12.32 + @return This function will return one of DSPResult enumeration value.\n
12.33 + DSP_SUCCEEDED will be returned if succeeded. DSP_E_INVALIDARG or DSP_E_OUTOFMEMORY can be returned when error occurs.*/
12.34 + IMONDSPAPI DSPResult IMON_Display_Init(HWND hwndNoti, UINT uMsgNotification);
12.35 +
12.36 + /**DSPResult IMON_Display_Uninit()
12.37 + @brief This function should be called when the caller application need not use this API any more.\n
12.38 + If this function call is missed, iMON can't display other information.\n
12.39 + @return This function will return one of DSPResult enumeration value.\n
12.40 + DSP_SUCCEEDED will be returned if succeeded.*/
12.41 + IMONDSPAPI DSPResult IMON_Display_Uninit();
12.42 +
12.43 + /**DSPResult IMON_Display_IsInited()
12.44 + @brief This function can be used when the caller application wants to know if API is initialized.\n
12.45 + @return This function will return one of DSPResult enumeration value.\n
12.46 + If API is initialized, this call will return DSP_S_INITED. Otherwise DSP_S_NOT_INITED will be returned.*/
12.47 + IMONDSPAPI DSPResult IMON_Display_IsInited();
12.48 +
12.49 + /**DSPResult IMON_Display_IsPluginModeEnabled()
12.50 + @brief This function can be used when the caller application wants to know if API can control iMON display.\n
12.51 + @return This function will return one of DSPResult enumeration value.\n
12.52 + If API can control iMON display, this call will return DSP_S_IN_PLUGIN_MODE. Otherwise DSP_S_NOT_IN_PLUGIN_MODE will be returned.*/
12.53 + IMONDSPAPI DSPResult IMON_Display_IsPluginModeEnabled();
12.54 +
12.55 +
12.56 + /**DSPResult IMON_Display_SetVfdText(LPCTSTR lpsz1stLine, LPCTSTR lpsz2ndLine)
12.57 + @brief This function can be used when the caller application wants to display text data on VFD module.\n
12.58 + @param [in] lpsz1stLine This string data will be displayed on the 1st line of VFD module.\n
12.59 + It doesn't support multi-byte character and if string data is longer than 16 characters, it displays 16 characters from the first.\n
12.60 + @param [in] lpsz2ndLine This string data will be displayed on the 2nd line of VFD module.\n
12.61 + It doesn't support multi-byte character and if string data is longer than 16 characters, it displays 16 characters from the first.\n
12.62 + @return This function will return one of DSPResult enumeration value.\n
12.63 + DSP_SUCCEEDED will be returned if succeeded. DSP_E_POINTER, DSP_E_NOT_INITED or DSP_E_FAIL can be returned if failed.*/
12.64 + IMONDSPAPI DSPResult IMON_Display_SetVfdText(LPCTSTR lpsz1stLine, LPCTSTR lpsz2ndLine);
12.65 +
12.66 + /**DSPResult IMON_Display_SetVfdEqData(PDSPEQDATA pEqData)
12.67 + @brief This function can be used when the caller application wants to display equalizer data on VFD module.\n
12.68 + @param [in] pEqData Pointer of DSPEQDATA structure. The caller application should fill this structure with the equalizer data for 16 bands.\n
12.69 + @return This function will return one of DSPResult enumeration value.\n
12.70 + DSP_SUCCEEDED will be returned if succeeded. DSP_E_POINTER, DSP_E_NOT_INITED or DSP_E_FAIL can be returned if failed.*/
12.71 + IMONDSPAPI DSPResult IMON_Display_SetVfdEqData(PDSPEQDATA pEqData);
12.72 +
12.73 +
12.74 + /**DSPResult IMON_Display_SetLcdText(LPCTSTR lpszText)
12.75 + @brief This function can be used when the caller application wants to display text data on LCD module.\n
12.76 + @param [in] lpszText This string data will be displayed on the LCD module.\n
12.77 + It supports multi-byte character and if string data is longer than display area, it will start to scroll.\n
12.78 + When text scrolling is finished, API will notify it with DSPNotifyCode enumeration value, DSPNM_LCD_TEXT_SCROLL_DONE.\n
12.79 + @return This function will return one of DSPResult enumeration value.\n
12.80 + DSP_SUCCEEDED will be returned if succeeded. DSP_E_POINTER, DSP_E_NOT_INITED or DSP_E_FAIL can be returned if failed.*/
12.81 + IMONDSPAPI DSPResult IMON_Display_SetLcdText(LPCTSTR lpszText);
12.82 +
12.83 + /**DSPResult IMON_Display_SetLcdEqData(PDSPEQDATA pEqDataL, PDSPEQDATA pEqDataR)
12.84 + @brief This function can be used when the caller application wants to display equalizer data on LCD module.\n
12.85 + @param [in] pEqDataL Pointer of DSPEQDATA structure. This parameter represents equalizer data of left channel.\n
12.86 + The caller application should fill this structure with the equalizer data of left channel for 16 bands.\n
12.87 + @param [in] pEqDataR Pointer of DSPEQDATA structure. This parameter represents equalizer data of right channel.\n
12.88 + The caller application should fill this structure with the equalizer data of right channel for 16 bands.\n
12.89 + @return This function will return one of DSPResult enumeration value.\n
12.90 + DSP_SUCCEEDED will be returned if succeeded. DSP_E_POINTER, DSP_E_NOT_INITED or DSP_E_FAIL can be returned if failed.*/
12.91 + IMONDSPAPI DSPResult IMON_Display_SetLcdEqData(PDSPEQDATA pEqDataL, PDSPEQDATA pEqDataR);
12.92 +
12.93 +
12.94 + /**DSPResult IMON_Display_SetLcdAllIcons(BOOL bOn)
12.95 + @brief This function can be used when the caller application wants to turn on/off all icons on LCD module.\n
12.96 + @param [in] bOn If this value is TRUE, iMON will turn on all icons. Otherwise, iMON will turn off all icons.\n
12.97 + @return This function will return one of DSPResult enumeration value.\n
12.98 + DSP_SUCCEEDED will be returned if succeeded. DSP_E_NOT_INITED or DSP_E_FAIL can be returned if failed.*/
12.99 + IMONDSPAPI DSPResult IMON_Display_SetLcdAllIcons(BOOL bOn);
12.100 +
12.101 + /**DSPResult IMON_Display_SetLcdOrangeIcon(BYTE btIconData1, BYTE btIconData2)
12.102 + @brief This function can be used when the caller application wants to turn on/off orange shaped disk icons on the upper left part of LCD module.\n
12.103 + Disk icons consist of 8 pieces of orange and orange peel.\n
12.104 + @param [in] btIconData1 Each bit represents one of icons shaped the piece of orange.\n
12.105 + MSB is used for the piece placed on top and the remaining bits are for the piece placed in CCW from top.\n
12.106 + @param [in] btIconData2 MSB represents the orange peel shaped icon. Other bits are not used.\n
12.107 + @return This function will return one of DSPResult enumeration value.\n
12.108 + DSP_SUCCEEDED will be returned if succeeded. DSP_E_NOT_INITED or DSP_E_FAIL can be returned if failed.*/
12.109 + IMONDSPAPI DSPResult IMON_Display_SetLcdOrangeIcon(BYTE btIconData1, BYTE btIconData2);
12.110 +
12.111 + /**DSPResult IMON_Display_SetLcdMediaTypeIcon(BYTE btIconData)
12.112 + @brief This function can be used when the caller application wants to turn on/off media type icons on the upper part of LCD module.\n
12.113 + @param [in] btIconData Each bit represents one of media type icons. From MSB each bit represents MUSIC, MOVIE, PHOTO, CD/DVD, TV, WEBCASTING and NEWS/WEATHER icon.\n
12.114 + @return This function will return one of DSPResult enumeration value.\n
12.115 + DSP_SUCCEEDED will be returned if succeeded. DSP_E_NOT_INITED or DSP_E_FAIL can be returned if failed.*/
12.116 + IMONDSPAPI DSPResult IMON_Display_SetLcdMediaTypeIcon(BYTE btIconData);
12.117 +
12.118 + /**DSPResult IMON_Display_SetLcdSpeakerIcon(BYTE btIconData1, BYTE btIconData2)
12.119 + @brief This function can be used when the caller application wants to turn on/off speaker icons on the upper right part of LCD module.\n
12.120 + @param [in] btIconData1 Each bit represents one of speaker icons.\nFrom MSB each bit represents L, C, R, SL, LFE, SR, RL and SPDIF icon.
12.121 + @param [in] btIconData2 MSB represents RR icon. Other bits are not used.\n
12.122 + @return This function will return one of DSPResult enumeration value.\n
12.123 + DSP_SUCCEEDED will be returned if succeeded. DSP_E_NOT_INITED or DSP_E_FAIL can be returned if failed.*/
12.124 + IMONDSPAPI DSPResult IMON_Display_SetLcdSpeakerIcon(BYTE btIconData1, BYTE btIconData2);
12.125 +
12.126 + /**DSPResult IMON_Display_SetLcdVideoCodecIcon(BYTE btIconData)
12.127 + @brief This function can be used when the caller application wants to turn on/off codec icons for video file on the lower part of LCD module.\n
12.128 + @param [in] btIconData Each bit represents one of video codec icons. From MSB each bit represents MPG, DIVX, XVID, WMV, MPG, AC3, DTS and WMA icon.\n
12.129 + @return This function will return one of DSPResult enumeration value.\n
12.130 + DSP_SUCCEEDED will be returned if succeeded. DSP_E_NOT_INITED or DSP_E_FAIL can be returned if failed.*/
12.131 + IMONDSPAPI DSPResult IMON_Display_SetLcdVideoCodecIcon(BYTE btIconData);
12.132 +
12.133 + /**DSPResult IMON_Display_SetLcdAudioCodecIcon(BYTE btIconData)
12.134 + @brief This function can be used when the caller application wants to turn on/off codec icons for audio file on the lower part of LCD module.\n
12.135 + @param [in] btIconData Each bit represents one of audio codec icons. From MSB each bit represents MP3, OGG, WMA and WAV icon.\n
12.136 + @return This function will return one of DSPResult enumeration value.\n
12.137 + DSP_SUCCEEDED will be returned if succeeded. DSP_E_NOT_INITED or DSP_E_FAIL can be returned if failed.*/
12.138 + IMONDSPAPI DSPResult IMON_Display_SetLcdAudioCodecIcon(BYTE btIconData);
12.139 +
12.140 + /**DSPResult IMON_Display_SetLcdAspectRatioIcon(BYTE btIconData)
12.141 + @brief This function can be used when the caller application wants to turn on/off aspect ratio icons on the lower right part of LCD module.\n
12.142 + @param [in] btIconData Each bit represents one of aspect ratio icons. From MSB each bit represents SRC, FIT, TV, HDTV, SCR1 and SCR2 icon.\n
12.143 + @return This function will return one of DSPResult enumeration value.\n
12.144 + DSP_SUCCEEDED will be returned if succeeded. DSP_E_NOT_INITED or DSP_E_FAIL can be returned if failed.*/
12.145 + IMONDSPAPI DSPResult IMON_Display_SetLcdAspectRatioIcon(BYTE btIconData);
12.146 +
12.147 + /**DSPResult IMON_Display_SetLcdEtcIcon(BYTE btIconData)
12.148 + @brief This function can be used when the caller application wants to turn on/off icons on the lower left part of LCD module.\n
12.149 + @param [in] btIconData Each bit represents icon. From MSB each bit represents REPEAT, SHUFFLE, ALARM, REC, VOL and TIME icon.\n
12.150 + @return This function will return one of DSPResult enumeration value.\n
12.151 + DSP_SUCCEEDED will be returned if succeeded. DSP_E_NOT_INITED or DSP_E_FAIL can be returned if failed.*/
12.152 + IMONDSPAPI DSPResult IMON_Display_SetLcdEtcIcon(BYTE btIconData);
12.153 +
12.154 + /**DSPResult IMON_Display_SetLcdProgress(int nCurPos, int nTotal)
12.155 + @brief This function can be used when the caller application wants to display progress bar on the upper and lower left part of text area of LCD module.\n
12.156 + @param [in] nCurPos It represents the current position of progress bar.\n
12.157 + @param [in] nTotal It represents the total length of progress bar.\n
12.158 + @return This function will return one of DSPResult enumeration value.\n
12.159 + DSP_SUCCEEDED will be returned if succeeded. DSP_E_NOT_INITED or DSP_E_FAIL can be returned if failed.*/
12.160 + IMONDSPAPI DSPResult IMON_Display_SetLcdProgress(int nCurPos, int nTotal);
12.161 +
12.162 +#ifdef __cplusplus
12.163 +}
12.164 +#endif //__cplusplus
12.165 +
12.166 +#endif //__IMON_DISPLAY_API_H__
12.167 \ No newline at end of file
13.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
13.2 +++ b/iMONDisplayDefines.h Sun Mar 16 09:11:39 2014 +0100
13.3 @@ -0,0 +1,114 @@
13.4 +#ifndef __IMON_DISPLAY_API_DEFINES_H__
13.5 +#define __IMON_DISPLAY_API_DEFINES_H__
13.6 +
13.7 +//////////////////////////////////////////////////
13.8 +//////////////////////////////////////////////////
13.9 +// Enumerations
13.10 +
13.11 +/**DSPResult
13.12 +@brief These enumeration values represent the returned result for iMON Display API function calls.\n
13.13 + All iMON Display API function calls return one of this result values.\n
13.14 + For meaning of each result, refer the comment of each line below*/
13.15 +enum DSPResult
13.16 +{
13.17 + DSP_SUCCEEDED = 0, //// Function Call Succeeded Without Error
13.18 + DSP_E_FAIL, //// Unspecified Failure
13.19 + DSP_E_OUTOFMEMORY, //// Failed to Allocate Necessary Memory
13.20 + DSP_E_INVALIDARG, //// One or More Arguments Are Not Valid
13.21 + DSP_E_NOT_INITED, //// API is Not Initialized
13.22 + DSP_E_POINTER, //// Pointer is Not Valid
13.23 +
13.24 + DSP_S_INITED = 0x1000, //// API is Initialized
13.25 + DSP_S_NOT_INITED, //// API is Not Initialized
13.26 + DSP_S_IN_PLUGIN_MODE, //// API Can Control iMON Display (Display Plug-in Mode)
13.27 + DSP_S_NOT_IN_PLUGIN_MODE, //// API Can't Control iMON Display
13.28 +};
13.29 +
13.30 +
13.31 +/**DSPNInitResult
13.32 +@brief These enumeration values represent the result status for requesting Display Plug-in Mode to iMON.\n
13.33 + iMON Display API notifies one of this result values to the caller application after requesting Display Plug-in Mode to iMON.\n
13.34 + For more information, refer the comment of each line below*/
13.35 +enum DSPNInitResult
13.36 +{
13.37 + DSPN_SUCCEEDED = 0, //// Display Plug-in Mode is Initialized Successfully
13.38 + DSPN_ERR_IN_USED = 0x0100, //// Display Plug-in is Already Used by Other Application
13.39 + DSPN_ERR_HW_DISCONNECTED, //// iMON HW is Not Connected
13.40 + DSPN_ERR_NOT_SUPPORTED_HW, //// The Connected iMON HW doesn't Support Display Plug-in
13.41 + DSPN_ERR_PLUGIN_DISABLED, //// Display Plug-in Mode Option is Disabled
13.42 + DSPN_ERR_IMON_NO_REPLY, //// The Latest iMON is Not Installed or iMON Not Running
13.43 + DSPN_ERR_UNKNOWN = 0x0200, //// Unknown Failure
13.44 +};
13.45 +
13.46 +
13.47 +/**DSPType
13.48 +@brief These enumeration values represent display type.\n
13.49 + Currently iMON Display API supports VFD and LCD products.*/
13.50 +enum DSPType
13.51 +{
13.52 + DSPN_DSP_NONE = 0,
13.53 + DSPN_DSP_VFD = 0x01, //// VFD products
13.54 + DSPN_DSP_LCD = 0x02, //// LCD products
13.55 +};
13.56 +
13.57 +
13.58 +/**DSPNotifyCode
13.59 +@brief These enumeration values represent the notification codes.\n
13.60 + iMON Display API will send or post message to the caller application.\n
13.61 + The caller application should assign the message and the winodw handle to receivce message with IMON_Display_Init fucntion.\n
13.62 + These enumeration values are used with WPARAM parameter of the message.\n
13.63 + For more information, see the explanation of each notification code below*/
13.64 +enum DSPNotifyCode
13.65 +{
13.66 + /**DSPNM_PLUGIN_SUCCEED
13.67 + @brief When API succeeds to get the control for the display, API will post caller-specified message with DSPNM_PLUGIN_SUCCEED as WPARAM parameter.\n
13.68 + LPARAM represents DSPType. This value can be 0x01 (VFD), 0x02 (LCD) or 0x03 (VFD+LCD).*/
13.69 + DSPNM_PLUGIN_SUCCEED = 0,
13.70 +
13.71 + /**DSPNM_PLUGIN_FAILED
13.72 + @brief When API fails to get the control for the display, API will post caller-specified message with DSPNM_PLUGIN_FAILED as WPARAM parameter.\n
13.73 + LPARAM represents error code with DSPNResult.*/
13.74 + DSPNM_PLUGIN_FAILED,
13.75 +
13.76 + /**DSPNM_IMON_RESTARTED
13.77 + @brief When iMON starts, API will post caller-specified message with DSPNM_IMON_RESTARTED as WPARAM parameter.\n
13.78 + LPARAM represents DSPType. This value can be 0 (No Display), 0x01 (VFD), 0x02 (LCD) or 0x03 (VFD+LCD).*/
13.79 + DSPNM_IMON_RESTARTED,
13.80 +
13.81 + /**DSPNM_IMON_CLOSED
13.82 + @brief When iMON closed, API will post caller-specified message with DSPNM_IMON_CLOSED as WPARAM parameter.\n
13.83 + LPARAM is not used.*/
13.84 + DSPNM_IMON_CLOSED,
13.85 +
13.86 + /**DSPNM_HW_CONNECTED
13.87 + @brief When iMON HW newly connected, API will post caller-specified message with DSPNM_HW_CONNECTED as WPARAM parameter.\n
13.88 + LPARAM represents DSPType. This value can be 0 (No Display), 0x01 (VFD), 0x02 (LCD) or 0x03 (VFD+LCD).*/
13.89 + DSPNM_HW_CONNECTED,
13.90 +
13.91 + /**DSPNM_HW_DISCONNECTED
13.92 + @brief When iMON HW disconnected, API will post caller-specified message with DSPNM_HW_DISCONNECTED as WPARAM parameter.\n
13.93 + LPARAM is DSPNResult value, DSPN_ERR_HW_DISCONNECTED.*/
13.94 + DSPNM_HW_DISCONNECTED,
13.95 +
13.96 +
13.97 + /**DSPNM_LCD_TEXT_SCROLL_DONE
13.98 + @brief When iMON LCD finishes scrolling Text, API will post caller-specified message with DSPNM_LCD_TEXT_SCROLL_DONE as WPARAM parameter.\n
13.99 + The caller application may need to know when text scroll is finished, for sending next text.\n
13.100 + LPARAM is not used.*/
13.101 + DSPNM_LCD_TEXT_SCROLL_DONE = 0x1000,
13.102 +};
13.103 +
13.104 +//////////////////////////////////////////////////
13.105 +//////////////////////////////////////////////////
13.106 +// Structure
13.107 +
13.108 +/**DspEqData
13.109 +@brief This structure contains Equalizer data for 16 bands.
13.110 +@param BandData It represents Equalizer data for 16 bands. Its range is from 0 to 100.*/
13.111 +typedef struct DspEqData
13.112 +{
13.113 + int BandData[16];
13.114 +
13.115 +} DSPEQDATA, *PDSPEQDATA;
13.116 +
13.117 +#endif //__IMON_DISPLAY_API_DEFINES_H__
13.118 \ No newline at end of file
14.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
14.2 +++ b/iMONDisplayWrapper.cpp Sun Mar 16 09:11:39 2014 +0100
14.3 @@ -0,0 +1,126 @@
14.4 +//------------------------------------------------------------------------------
14.5 +#include <windows.h>
14.6 +#include "iMONDisplayWrapper.h"
14.7 +#include "IdwApi.h"
14.8 +//------------------------------------------------------------------------------
14.9 +IdwApi* pIdwApi = NULL;
14.10 +//------------------------------------------------------------------------------
14.11 +BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
14.12 +{
14.13 + switch (fdwReason)
14.14 + {
14.15 + case DLL_PROCESS_ATTACH:
14.16 + pIdwApi = new IdwApi(hinstDLL);
14.17 + break;
14.18 + case DLL_PROCESS_DETACH:
14.19 + delete pIdwApi;
14.20 + break;
14.21 + }
14.22 + return TRUE;
14.23 +}
14.24 +//------------------------------------------------------------------------------
14.25 +DSPResult IDW_Init(IDW_INITRESULT* pInitResult)
14.26 +{
14.27 + return pIdwApi->Init(pInitResult);
14.28 +}
14.29 +//------------------------------------------------------------------------------
14.30 +DSPResult IDW_Uninit()
14.31 +{
14.32 + return pIdwApi->Uninit();
14.33 +}
14.34 +//------------------------------------------------------------------------------
14.35 +DSPResult IDW_IsInited()
14.36 +{
14.37 + return pIdwApi->IsInited();
14.38 +}
14.39 +//------------------------------------------------------------------------------
14.40 +DSPResult IDW_IsPluginModeEnabled()
14.41 +{
14.42 + return pIdwApi->IsPluginModeEnabled();
14.43 +}
14.44 +//------------------------------------------------------------------------------
14.45 +DSPResult IDW_SetVfdText(LPCWSTR lpszLine1, LPCWSTR lpszLine2)
14.46 +{
14.47 +/*
14.48 +DSPEQDATA eqData;
14.49 +eqData.BandData[0] = 100;
14.50 +eqData.BandData[1] = 90;
14.51 +eqData.BandData[2] = 80;
14.52 +eqData.BandData[3] = 70;
14.53 +eqData.BandData[4] = 60;
14.54 +eqData.BandData[5] = 50;
14.55 +eqData.BandData[6] = 40;
14.56 +eqData.BandData[7] = 30;
14.57 +eqData.BandData[8] = 30;
14.58 +eqData.BandData[9] = 40;
14.59 +eqData.BandData[10] = 50;
14.60 +eqData.BandData[11] = 60;
14.61 +eqData.BandData[12] = 70;
14.62 +eqData.BandData[13] = 80;
14.63 +eqData.BandData[14] = 90;
14.64 +eqData.BandData[15] = 100;
14.65 +return pIdwApi->SetVfdEqData(&eqData);
14.66 +*/
14.67 + return pIdwApi->SetVfdText(lpszLine1, lpszLine2);
14.68 +}
14.69 +//------------------------------------------------------------------------------
14.70 +DSPResult IDW_SetVfdEqData(PDSPEQDATA pEqData)
14.71 +{
14.72 + return pIdwApi->SetVfdEqData(pEqData);
14.73 +}
14.74 +//------------------------------------------------------------------------------
14.75 +DSPResult IDW_SetLcdText(LPCWSTR lpszLine1)
14.76 +{
14.77 + return pIdwApi->SetLcdText(lpszLine1);
14.78 +}
14.79 +//------------------------------------------------------------------------------
14.80 +DSPResult IDW_SetLcdEqData(PDSPEQDATA pEqDataL, PDSPEQDATA pEqDataR)
14.81 +{
14.82 + return pIdwApi->SetLcdEqData(pEqDataL, pEqDataR);
14.83 +}
14.84 +//------------------------------------------------------------------------------
14.85 +DSPResult IDW_SetLcdAllIcons(BOOL bOn)
14.86 +{
14.87 + return pIdwApi->SetLcdAllIcons(bOn);
14.88 +}
14.89 +//------------------------------------------------------------------------------
14.90 +DSPResult IDW_SetLcdOrangeIcon(BYTE btIconData1, BYTE btIconData2)
14.91 +{
14.92 + return pIdwApi->SetLcdOrangeIcon(btIconData1, btIconData2);
14.93 +}
14.94 +//------------------------------------------------------------------------------
14.95 +DSPResult IDW_SetLcdMediaTypeIcon(BYTE btIconData)
14.96 +{
14.97 + return pIdwApi->SetLcdMediaTypeIcon(btIconData);
14.98 +}
14.99 +//------------------------------------------------------------------------------
14.100 +DSPResult IDW_SetLcdSpeakerIcon(BYTE btIconData1, BYTE btIconData2)
14.101 +{
14.102 + return pIdwApi->SetLcdSpeakerIcon(btIconData1, btIconData2);
14.103 +}
14.104 +//------------------------------------------------------------------------------
14.105 +DSPResult IDW_SetLcdVideoCodecIcon(BYTE btIconData)
14.106 +{
14.107 + return pIdwApi->SetLcdVideoCodecIcon(btIconData);
14.108 +}
14.109 +//------------------------------------------------------------------------------
14.110 +DSPResult IDW_SetLcdAudioCodecIcon(BYTE btIconData)
14.111 +{
14.112 + return pIdwApi->SetLcdAudioCodecIcon(btIconData);
14.113 +}
14.114 +//------------------------------------------------------------------------------
14.115 +DSPResult IDW_SetLcdAspectRatioIcon(BYTE btIconData)
14.116 +{
14.117 + return pIdwApi->SetLcdAspectRatioIcon(btIconData);
14.118 +}
14.119 +//------------------------------------------------------------------------------
14.120 +DSPResult IDW_SetLcdEtcIcon(BYTE btIconData)
14.121 +{
14.122 + return pIdwApi->SetLcdEtcIcon(btIconData);
14.123 +}
14.124 +//------------------------------------------------------------------------------
14.125 +DSPResult IDW_SetLcdProgress(int nCurPos, int nTotal)
14.126 +{
14.127 + return pIdwApi->SetLcdProgress(nCurPos, nTotal);
14.128 +}
14.129 +//------------------------------------------------------------------------------
14.130 \ No newline at end of file
15.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
15.2 +++ b/iMONDisplayWrapper.h Sun Mar 16 09:11:39 2014 +0100
15.3 @@ -0,0 +1,48 @@
15.4 +//------------------------------------------------------------------------------
15.5 +#ifndef IMONDISPLAYWRAPPER_H_INCLUDED
15.6 +#define IMONDISPLAYWRAPPER_H_INCLUDED
15.7 +//------------------------------------------------------------------------------
15.8 +#include "iMONDisplayDefines.h"
15.9 +#include <windows.h>
15.10 +//------------------------------------------------------------------------------
15.11 +#ifdef IMONDISPLAYWRAPPER_EXPORTS
15.12 +#define IMONDSPWRAPPER __declspec(dllexport)
15.13 +#else
15.14 +#define IMONDSPWRAPPER __declspec(dllimport)
15.15 +#endif
15.16 +//------------------------------------------------------------------------------
15.17 +typedef struct _IDW_INITRESULT
15.18 +{
15.19 + DSPNInitResult initResult;
15.20 + DSPType dspType;
15.21 +} IDW_INITRESULT;
15.22 +//------------------------------------------------------------------------------
15.23 +#ifdef __cplusplus
15.24 +extern "C"
15.25 +{
15.26 +#endif
15.27 +//------------------------------------------------------------------------------
15.28 +IMONDSPWRAPPER DSPResult IDW_Init(IDW_INITRESULT* pInitResult);
15.29 +IMONDSPWRAPPER DSPResult IDW_Uninit();
15.30 +IMONDSPWRAPPER DSPResult IDW_IsInited();
15.31 +IMONDSPWRAPPER DSPResult IDW_IsPluginModeEnabled();
15.32 +IMONDSPWRAPPER DSPResult IDW_SetVfdText(LPCWSTR lpszLine1, LPCWSTR lpszLine2);
15.33 +IMONDSPWRAPPER DSPResult IDW_SetVfdEqData(PDSPEQDATA pEqData);
15.34 +IMONDSPWRAPPER DSPResult IDW_SetLcdText(LPCWSTR lpszLine1);
15.35 +IMONDSPWRAPPER DSPResult IDW_SetLcdEqData(PDSPEQDATA pEqDataL, PDSPEQDATA pEqDataR);
15.36 +IMONDSPWRAPPER DSPResult IDW_SetLcdAllIcons(BOOL bOn);
15.37 +IMONDSPWRAPPER DSPResult IDW_SetLcdOrangeIcon(BYTE btIconData1, BYTE btIconData2);
15.38 +IMONDSPWRAPPER DSPResult IDW_SetLcdMediaTypeIcon(BYTE btIconData);
15.39 +IMONDSPWRAPPER DSPResult IDW_SetLcdSpeakerIcon(BYTE btIconData1, BYTE btIconData2);
15.40 +IMONDSPWRAPPER DSPResult IDW_SetLcdVideoCodecIcon(BYTE btIconData);
15.41 +IMONDSPWRAPPER DSPResult IDW_SetLcdAudioCodecIcon(BYTE btIconData);
15.42 +IMONDSPWRAPPER DSPResult IDW_SetLcdAspectRatioIcon(BYTE btIconData);
15.43 +IMONDSPWRAPPER DSPResult IDW_SetLcdEtcIcon(BYTE btIconData);
15.44 +IMONDSPWRAPPER DSPResult IDW_SetLcdProgress(int nCurPos, int nTotal);
15.45 +//------------------------------------------------------------------------------
15.46 +#ifdef __cplusplus
15.47 +}
15.48 +#endif
15.49 +//------------------------------------------------------------------------------
15.50 +#endif
15.51 +//------------------------------------------------------------------------------
16.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
16.2 +++ b/iMONDisplayWrapper.rc Sun Mar 16 09:11:39 2014 +0100
16.3 @@ -0,0 +1,103 @@
16.4 +// Microsoft Visual C++ generated resource script.
16.5 +//
16.6 +#include "resource.h"
16.7 +
16.8 +#define APSTUDIO_READONLY_SYMBOLS
16.9 +/////////////////////////////////////////////////////////////////////////////
16.10 +//
16.11 +// Generated from the TEXTINCLUDE 2 resource.
16.12 +//
16.13 +#include "afxres.h"
16.14 +
16.15 +/////////////////////////////////////////////////////////////////////////////
16.16 +#undef APSTUDIO_READONLY_SYMBOLS
16.17 +
16.18 +/////////////////////////////////////////////////////////////////////////////
16.19 +// German (Germany) resources
16.20 +
16.21 +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU)
16.22 +#ifdef _WIN32
16.23 +LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
16.24 +#pragma code_page(1252)
16.25 +#endif //_WIN32
16.26 +
16.27 +#ifdef APSTUDIO_INVOKED
16.28 +/////////////////////////////////////////////////////////////////////////////
16.29 +//
16.30 +// TEXTINCLUDE
16.31 +//
16.32 +
16.33 +1 TEXTINCLUDE
16.34 +BEGIN
16.35 + "resource.h\0"
16.36 +END
16.37 +
16.38 +2 TEXTINCLUDE
16.39 +BEGIN
16.40 + "#include ""afxres.h""\r\n"
16.41 + "\0"
16.42 +END
16.43 +
16.44 +3 TEXTINCLUDE
16.45 +BEGIN
16.46 + "\r\n"
16.47 + "\0"
16.48 +END
16.49 +
16.50 +#endif // APSTUDIO_INVOKED
16.51 +
16.52 +
16.53 +/////////////////////////////////////////////////////////////////////////////
16.54 +//
16.55 +// Version
16.56 +//
16.57 +
16.58 +VS_VERSION_INFO VERSIONINFO
16.59 + FILEVERSION 0,2,3,1
16.60 + PRODUCTVERSION 0,2,3,1
16.61 + FILEFLAGSMASK 0x17L
16.62 +#ifdef _DEBUG
16.63 + FILEFLAGS 0x1L
16.64 +#else
16.65 + FILEFLAGS 0x0L
16.66 +#endif
16.67 + FILEOS 0x4L
16.68 + FILETYPE 0x2L
16.69 + FILESUBTYPE 0x0L
16.70 +BEGIN
16.71 + BLOCK "StringFileInfo"
16.72 + BEGIN
16.73 + BLOCK "000004b0"
16.74 + BEGIN
16.75 + VALUE "Comments", "Use with iMON Manager 8.01.0419 or later"
16.76 + VALUE "CompanyName", "Team MediaPortal"
16.77 + VALUE "FileDescription", "iMONDisplayAPI Wrapper"
16.78 + VALUE "FileVersion", "0, 2, 3, 1"
16.79 + VALUE "InternalName", "iMONDisp"
16.80 + VALUE "LegalCopyright", "Copyright (C) 2011 Team MediaPortal"
16.81 + VALUE "OriginalFilename", "iMONDisplayWrapper.dll"
16.82 + VALUE "ProductName", "iMONDisplayAPI Wrapper"
16.83 + VALUE "ProductVersion", "0, 2, 3, 1"
16.84 + END
16.85 + END
16.86 + BLOCK "VarFileInfo"
16.87 + BEGIN
16.88 + VALUE "Translation", 0x0, 1200
16.89 + END
16.90 +END
16.91 +
16.92 +#endif // German (Germany) resources
16.93 +/////////////////////////////////////////////////////////////////////////////
16.94 +
16.95 +
16.96 +
16.97 +#ifndef APSTUDIO_INVOKED
16.98 +/////////////////////////////////////////////////////////////////////////////
16.99 +//
16.100 +// Generated from the TEXTINCLUDE 3 resource.
16.101 +//
16.102 +
16.103 +
16.104 +/////////////////////////////////////////////////////////////////////////////
16.105 +#endif // not APSTUDIO_INVOKED
16.106 +
17.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
17.2 +++ b/iMONDisplayWrapper.sln Sun Mar 16 09:11:39 2014 +0100
17.3 @@ -0,0 +1,20 @@
17.4 +
17.5 +Microsoft Visual Studio Solution File, Format Version 12.00
17.6 +# Visual Studio 2012
17.7 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iMONDisplayWrapper", "iMONDisplayWrapper.vcxproj", "{E1A2655B-02A2-437A-8270-4AD81DDDC502}"
17.8 +EndProject
17.9 +Global
17.10 + GlobalSection(SolutionConfigurationPlatforms) = preSolution
17.11 + Debug|Win32 = Debug|Win32
17.12 + Release|Win32 = Release|Win32
17.13 + EndGlobalSection
17.14 + GlobalSection(ProjectConfigurationPlatforms) = postSolution
17.15 + {E1A2655B-02A2-437A-8270-4AD81DDDC502}.Debug|Win32.ActiveCfg = Debug|Win32
17.16 + {E1A2655B-02A2-437A-8270-4AD81DDDC502}.Debug|Win32.Build.0 = Debug|Win32
17.17 + {E1A2655B-02A2-437A-8270-4AD81DDDC502}.Release|Win32.ActiveCfg = Release|Win32
17.18 + {E1A2655B-02A2-437A-8270-4AD81DDDC502}.Release|Win32.Build.0 = Release|Win32
17.19 + EndGlobalSection
17.20 + GlobalSection(SolutionProperties) = preSolution
17.21 + HideSolutionNode = FALSE
17.22 + EndGlobalSection
17.23 +EndGlobal
18.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
18.2 +++ b/iMONDisplayWrapper.vcxproj Sun Mar 16 09:11:39 2014 +0100
18.3 @@ -0,0 +1,116 @@
18.4 +<?xml version="1.0" encoding="utf-8"?>
18.5 +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
18.6 + <ItemGroup Label="ProjectConfigurations">
18.7 + <ProjectConfiguration Include="Debug|Win32">
18.8 + <Configuration>Debug</Configuration>
18.9 + <Platform>Win32</Platform>
18.10 + </ProjectConfiguration>
18.11 + <ProjectConfiguration Include="Release|Win32">
18.12 + <Configuration>Release</Configuration>
18.13 + <Platform>Win32</Platform>
18.14 + </ProjectConfiguration>
18.15 + </ItemGroup>
18.16 + <PropertyGroup Label="Globals">
18.17 + <ProjectGuid>{E1A2655B-02A2-437A-8270-4AD81DDDC502}</ProjectGuid>
18.18 + <RootNamespace>iMONDisplayWrapper</RootNamespace>
18.19 + <Keyword>Win32Proj</Keyword>
18.20 + </PropertyGroup>
18.21 + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
18.22 + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
18.23 + <ConfigurationType>DynamicLibrary</ConfigurationType>
18.24 + <PlatformToolset>v110</PlatformToolset>
18.25 + <CharacterSet>Unicode</CharacterSet>
18.26 + <WholeProgramOptimization>true</WholeProgramOptimization>
18.27 + </PropertyGroup>
18.28 + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
18.29 + <ConfigurationType>DynamicLibrary</ConfigurationType>
18.30 + <PlatformToolset>v110</PlatformToolset>
18.31 + <CharacterSet>Unicode</CharacterSet>
18.32 + </PropertyGroup>
18.33 + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
18.34 + <ImportGroup Label="ExtensionSettings">
18.35 + </ImportGroup>
18.36 + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
18.37 + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
18.38 + </ImportGroup>
18.39 + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
18.40 + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
18.41 + </ImportGroup>
18.42 + <PropertyGroup Label="UserMacros" />
18.43 + <PropertyGroup>
18.44 + <_ProjectFileVersion>11.0.61030.0</_ProjectFileVersion>
18.45 + </PropertyGroup>
18.46 + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
18.47 + <OutDir>$(SolutionDir)$(Configuration)\</OutDir>
18.48 + <IntDir>$(Configuration)\</IntDir>
18.49 + <LinkIncremental>true</LinkIncremental>
18.50 + </PropertyGroup>
18.51 + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
18.52 + <OutDir>$(SolutionDir)$(Configuration)\</OutDir>
18.53 + <IntDir>$(Configuration)\</IntDir>
18.54 + <LinkIncremental>false</LinkIncremental>
18.55 + </PropertyGroup>
18.56 + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
18.57 + <ClCompile>
18.58 + <Optimization>Disabled</Optimization>
18.59 + <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;IMONDISPLAYWRAPPER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
18.60 + <MinimalRebuild>true</MinimalRebuild>
18.61 + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
18.62 + <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
18.63 + <PrecompiledHeader />
18.64 + <WarningLevel>Level3</WarningLevel>
18.65 + <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
18.66 + </ClCompile>
18.67 + <Link>
18.68 + <AdditionalDependencies>iMONDisplay.lib;%(AdditionalDependencies)</AdditionalDependencies>
18.69 + <GenerateDebugInformation>true</GenerateDebugInformation>
18.70 + <SubSystem>Windows</SubSystem>
18.71 + <TargetMachine>MachineX86</TargetMachine>
18.72 + </Link>
18.73 + </ItemDefinitionGroup>
18.74 + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
18.75 + <ClCompile>
18.76 + <Optimization>MaxSpeed</Optimization>
18.77 + <IntrinsicFunctions>true</IntrinsicFunctions>
18.78 + <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;IMONDISPLAYWRAPPER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
18.79 + <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
18.80 + <FunctionLevelLinking>true</FunctionLevelLinking>
18.81 + <PrecompiledHeader />
18.82 + <WarningLevel>Level3</WarningLevel>
18.83 + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
18.84 + </ClCompile>
18.85 + <Link>
18.86 + <AdditionalDependencies>iMONDisplay.lib;%(AdditionalDependencies)</AdditionalDependencies>
18.87 + <GenerateDebugInformation>true</GenerateDebugInformation>
18.88 + <SubSystem>Windows</SubSystem>
18.89 + <OptimizeReferences>true</OptimizeReferences>
18.90 + <EnableCOMDATFolding>true</EnableCOMDATFolding>
18.91 + <TargetMachine>MachineX86</TargetMachine>
18.92 + </Link>
18.93 + </ItemDefinitionGroup>
18.94 + <ItemGroup>
18.95 + <ClCompile Include="Event.cpp" />
18.96 + <ClCompile Include="IdwApi.cpp" />
18.97 + <ClCompile Include="IdwThread.cpp" />
18.98 + <ClCompile Include="iMONDisplayWrapper.cpp" />
18.99 + <ClCompile Include="Mutex.cpp" />
18.100 + <ClCompile Include="Thread.cpp" />
18.101 + </ItemGroup>
18.102 + <ItemGroup>
18.103 + <ClInclude Include="Event.h" />
18.104 + <ClInclude Include="IdwApi.h" />
18.105 + <ClInclude Include="IdwThread.h" />
18.106 + <ClInclude Include="iMONDisplayAPI.h" />
18.107 + <ClInclude Include="iMONDisplayDefines.h" />
18.108 + <ClInclude Include="iMONDisplayWrapper.h" />
18.109 + <ClInclude Include="Mutex.h" />
18.110 + <ClInclude Include="resource.h" />
18.111 + <ClInclude Include="Thread.h" />
18.112 + </ItemGroup>
18.113 + <ItemGroup>
18.114 + <ResourceCompile Include="iMONDisplayWrapper.rc" />
18.115 + </ItemGroup>
18.116 + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
18.117 + <ImportGroup Label="ExtensionTargets">
18.118 + </ImportGroup>
18.119 +</Project>
18.120 \ No newline at end of file
19.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
19.2 +++ b/iMONDisplayWrapper.vcxproj.filters Sun Mar 16 09:11:39 2014 +0100
19.3 @@ -0,0 +1,71 @@
19.4 +<?xml version="1.0" encoding="utf-8"?>
19.5 +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
19.6 + <ItemGroup>
19.7 + <Filter Include="Source Files">
19.8 + <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
19.9 + <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
19.10 + </Filter>
19.11 + <Filter Include="Header Files">
19.12 + <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
19.13 + <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
19.14 + </Filter>
19.15 + <Filter Include="Resource Files">
19.16 + <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
19.17 + <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
19.18 + </Filter>
19.19 + </ItemGroup>
19.20 + <ItemGroup>
19.21 + <ClCompile Include="Event.cpp">
19.22 + <Filter>Source Files</Filter>
19.23 + </ClCompile>
19.24 + <ClCompile Include="IdwApi.cpp">
19.25 + <Filter>Source Files</Filter>
19.26 + </ClCompile>
19.27 + <ClCompile Include="IdwThread.cpp">
19.28 + <Filter>Source Files</Filter>
19.29 + </ClCompile>
19.30 + <ClCompile Include="iMONDisplayWrapper.cpp">
19.31 + <Filter>Source Files</Filter>
19.32 + </ClCompile>
19.33 + <ClCompile Include="Mutex.cpp">
19.34 + <Filter>Source Files</Filter>
19.35 + </ClCompile>
19.36 + <ClCompile Include="Thread.cpp">
19.37 + <Filter>Source Files</Filter>
19.38 + </ClCompile>
19.39 + </ItemGroup>
19.40 + <ItemGroup>
19.41 + <ClInclude Include="Event.h">
19.42 + <Filter>Header Files</Filter>
19.43 + </ClInclude>
19.44 + <ClInclude Include="IdwApi.h">
19.45 + <Filter>Header Files</Filter>
19.46 + </ClInclude>
19.47 + <ClInclude Include="IdwThread.h">
19.48 + <Filter>Header Files</Filter>
19.49 + </ClInclude>
19.50 + <ClInclude Include="iMONDisplayAPI.h">
19.51 + <Filter>Header Files</Filter>
19.52 + </ClInclude>
19.53 + <ClInclude Include="iMONDisplayDefines.h">
19.54 + <Filter>Header Files</Filter>
19.55 + </ClInclude>
19.56 + <ClInclude Include="iMONDisplayWrapper.h">
19.57 + <Filter>Header Files</Filter>
19.58 + </ClInclude>
19.59 + <ClInclude Include="Mutex.h">
19.60 + <Filter>Header Files</Filter>
19.61 + </ClInclude>
19.62 + <ClInclude Include="resource.h">
19.63 + <Filter>Header Files</Filter>
19.64 + </ClInclude>
19.65 + <ClInclude Include="Thread.h">
19.66 + <Filter>Header Files</Filter>
19.67 + </ClInclude>
19.68 + </ItemGroup>
19.69 + <ItemGroup>
19.70 + <ResourceCompile Include="iMONDisplayWrapper.rc">
19.71 + <Filter>Resource Files</Filter>
19.72 + </ResourceCompile>
19.73 + </ItemGroup>
19.74 +</Project>
19.75 \ No newline at end of file
20.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
20.2 +++ b/resource.h Sun Mar 16 09:11:39 2014 +0100
20.3 @@ -0,0 +1,14 @@
20.4 +//{{NO_DEPENDENCIES}}
20.5 +// Microsoft Visual C++ generated include file.
20.6 +// Used by iMONDisplayWrapper.rc
20.7 +
20.8 +// Next default values for new objects
20.9 +//
20.10 +#ifdef APSTUDIO_INVOKED
20.11 +#ifndef APSTUDIO_READONLY_SYMBOLS
20.12 +#define _APS_NEXT_RESOURCE_VALUE 101
20.13 +#define _APS_NEXT_COMMAND_VALUE 40001
20.14 +#define _APS_NEXT_CONTROL_VALUE 1001
20.15 +#define _APS_NEXT_SYMED_VALUE 101
20.16 +#endif
20.17 +#endif