sl@0
|
1 |
//------------------------------------------------------------------------------
|
sl@0
|
2 |
#ifndef IDWTHREAD_H_INCLUDED
|
sl@0
|
3 |
#define IDWTHREAD_H_INCLUDED
|
sl@0
|
4 |
//------------------------------------------------------------------------------
|
sl@0
|
5 |
#include <windows.h>
|
sl@0
|
6 |
#include "Thread.h"
|
sl@0
|
7 |
#include "Event.h"
|
sl@0
|
8 |
#include "Mutex.h"
|
sl@0
|
9 |
#include "iMONDisplayDefines.h"
|
sl@0
|
10 |
#include "iMONDisplayWrapper.h"
|
sl@2
|
11 |
|
sl@2
|
12 |
|
sl@2
|
13 |
/**
|
sl@2
|
14 |
iMON Display Wrapper thread.
|
sl@2
|
15 |
Create a window and implement its event loop.
|
sl@2
|
16 |
This window will be used to process iMON display messages.
|
sl@2
|
17 |
Implement iMON Display API by send messages to our window.
|
sl@2
|
18 |
Actual iMON Display API call call are made from the window procedure.
|
sl@2
|
19 |
*/
|
sl@0
|
20 |
class IdwThread : public Thread
|
sl@0
|
21 |
{
|
sl@0
|
22 |
public:
|
sl@1
|
23 |
IdwThread(HINSTANCE hInstance);
|
sl@1
|
24 |
virtual ~IdwThread();
|
sl@0
|
25 |
|
sl@0
|
26 |
private:
|
sl@1
|
27 |
IdwThread(const IdwThread& other) {}
|
sl@1
|
28 |
IdwThread& operator=(const IdwThread& other) { return *this; }
|
sl@0
|
29 |
|
sl@0
|
30 |
public:
|
sl@1
|
31 |
virtual void Interrupt();
|
sl@1
|
32 |
DSPResult Init(IDW_INITRESULT* pInitResult);
|
sl@1
|
33 |
DSPResult Uninit();
|
sl@3
|
34 |
DSPResult IsInitialized();
|
sl@1
|
35 |
DSPResult IsPluginModeEnabled();
|
sl@2
|
36 |
DSPResult GetStatus(IDW_STATUS* aStatus);
|
sl@1
|
37 |
DSPResult SetVfdText(LPCWSTR lpszLine1, LPCWSTR lpszLine2);
|
sl@1
|
38 |
DSPResult SetVfdEqData(PDSPEQDATA pEqData);
|
sl@1
|
39 |
DSPResult SetLcdText(LPCWSTR lpszText);
|
sl@1
|
40 |
DSPResult SetLcdEqData(PDSPEQDATA pEqDataL, PDSPEQDATA pEqDataR);
|
sl@1
|
41 |
DSPResult SetLcdAllIcons(BOOL bOn);
|
sl@1
|
42 |
DSPResult SetLcdOrangeIcon(BYTE btIconData1, BYTE btIconData2);
|
sl@1
|
43 |
DSPResult SetLcdMediaTypeIcon(BYTE btIconData);
|
sl@1
|
44 |
DSPResult SetLcdSpeakerIcon(BYTE btIconData1, BYTE btIconData2);
|
sl@1
|
45 |
DSPResult SetLcdVideoCodecIcon(BYTE btIconData);
|
sl@1
|
46 |
DSPResult SetLcdAudioCodecIcon(BYTE btIconData);
|
sl@1
|
47 |
DSPResult SetLcdAspectRatioIcon(BYTE btIconData);
|
sl@1
|
48 |
DSPResult SetLcdEtcIcon(BYTE btIconData);
|
sl@1
|
49 |
DSPResult SetLcdProgress(int nCurPos, int nTotal);
|
sl@2
|
50 |
|
sl@0
|
51 |
protected:
|
sl@1
|
52 |
virtual void Run();
|
sl@1
|
53 |
|
sl@1
|
54 |
private:
|
sl@1
|
55 |
bool RegisterClass();
|
sl@1
|
56 |
bool CreateMessageWindow();
|
sl@1
|
57 |
void AllowImonMessages();
|
sl@1
|
58 |
bool WaitForWindow();
|
sl@1
|
59 |
static LRESULT CALLBACK WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
sl@1
|
60 |
static void MapChars(LPWSTR lpszTarget, LPCWSTR lpszSource, int nMaxLength);
|
sl@1
|
61 |
static wchar_t MapChar(wchar_t ch);
|
sl@0
|
62 |
|
sl@0
|
63 |
private:
|
sl@1
|
64 |
HINSTANCE m_hInstance;
|
sl@1
|
65 |
HWND m_hWnd;
|
sl@1
|
66 |
Event m_eventWindowCreationDone;
|
sl@0
|
67 |
};
|
sl@0
|
68 |
//------------------------------------------------------------------------------
|
sl@0
|
69 |
#endif
|
sl@0
|
70 |
//------------------------------------------------------------------------------
|