-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcandify.h
More file actions
71 lines (55 loc) · 1.39 KB
/
candify.h
File metadata and controls
71 lines (55 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#pragma once
#define CANDIFY_WNDCLASS "candify_wnd_"
#define CANDIFY_TITLE "Candify"
#include <d2d1.h>
#include "audio.h"
class SpotifyPlayer;
class Visualizer;
class Candify
{
public:
Candify(SpotifyPlayer *sp, Visualizer *pVisualizer, HANDLE hSpotifyEvent);
~Candify();
// Register the window class and call methods for instantiating drawing resources
HRESULT Initialize();
// Process and dispatch messages
void RunMessageLoop();
HWND GetHWND() { return m_hWnd; }
private:
// Window state
HWND m_hWnd;
HWND m_hDialogWnd;
// Spotify
SpotifyPlayer *m_lpSpotify;
HANDLE m_hSpotifyEvent;
// Visualizer
Visualizer *m_pVisualizer;
private:
// Resize the render target.
void OnResize(
UINT width,
UINT height
);
void Connect(LPCSTR szUsername, LPCSTR szPassword);
void SubclassControl(HWND hControl);
// The windows procedure.
static LRESULT CALLBACK WndProc(
HWND hWnd,
UINT message,
WPARAM wParam,
LPARAM lParam
);
// The windows procedure.
static LRESULT CALLBACK DialogProc(
HWND hWnd,
UINT message,
WPARAM wParam,
LPARAM lParam
);
static LRESULT CALLBACK TabControlProc(
HWND hWnd,
UINT message,
WPARAM wParam,
LPARAM lParam
);
};