aboutsummaryrefslogtreecommitdiff
path: root/c/defs.h
diff options
context:
space:
mode:
Diffstat (limited to 'c/defs.h')
-rw-r--r--c/defs.h44
1 files changed, 21 insertions, 23 deletions
diff --git a/c/defs.h b/c/defs.h
index c83dd8c..06b1ef1 100644
--- a/c/defs.h
+++ b/c/defs.h
@@ -8,40 +8,36 @@
/* common.cpp */
TCHAR *TszFromSz(const char *, int);
-class Library {
-private:
- HMODULE m_hModule;
-public:
- static std::unique_ptr<Library> Load(const TCHAR *);
+struct Library
+{
Library(const TCHAR *);
~Library();
FARPROC GetProcAddress(const char *);
+ static std::unique_ptr<Library> Load(const TCHAR *);
+private:
+ HMODULE m_hModule;
};
/* main.cpp */
void UpdateLayout();
/* listview.cpp */
-class ListView {
-protected:
- int m_bHeader = 1;
- WNDPROC m_prevProc;
- HWND m_hWnd;
-public:
+struct ListView
+{
ListView(HMENU, DWORD);
int Height(int = -1);
HWND HWnd(void) const;
virtual void UpdateTheme(BOOL);
virtual LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
+protected:
+ int m_bHeader = 1;
+ WNDPROC m_prevProc;
+ HWND m_hWnd;
};
/* episodelistview.cpp */
-class EpisodeListView : public ListView {
-private:
- int m_iSort;
- LVITEM m_lviFocus;
- friend int CALLBACK ElvSort(LPARAM, LPARAM, LPARAM);
-public:
+struct EpisodeListView : public ListView
+{
EpisodeListView(void);
void DoSort(void);
void EnsureFocusVisible(void);
@@ -56,11 +52,15 @@ public:
void Update(void);
void UpdateItem(LPLVITEM);
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM) override;
+private:
+ int m_iSort;
+ LVITEM m_lviFocus;
+ friend int CALLBACK ElvSort(LPARAM, LPARAM, LPARAM);
};
/* datalistview.cpp */
-class DataListView : public ListView {
-public:
+struct DataListView : public ListView
+{
DataListView(void);
void ShowEpisode(int);
};
@@ -83,8 +83,7 @@ int Plg(term_t, const char *, ...);
#define ELVSITITLE 1
#define ELVSIRATING 2
-inline int
-Cmp(int a, int b)
+inline int Cmp(int a, int b)
{
if (a == b)
return 0;
@@ -93,8 +92,7 @@ Cmp(int a, int b)
return -1;
}
-inline int
-Dpi(int i)
+inline int Dpi(int i)
{
extern int g_iDPI;
return MulDiv(i, g_iDPI, 96);