diff options
author | John Ankarström <john@ankarstrom.se> | 2022-07-15 00:50:32 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2022-07-15 00:50:32 +0200 |
commit | 095954fe8c0d1a64d8696d0ad0cd0ed395dd6c54 (patch) | |
tree | cc1543954c5208dfa56adfa82853239a6504ba18 /c/defs.h | |
parent | 0e22414d042207269f916298b236f1be341ddeea (diff) | |
download | EpisodeBrowser-095954fe8c0d1a64d8696d0ad0cd0ed395dd6c54.tar.gz |
Change declaration style.
Diffstat (limited to 'c/defs.h')
-rw-r--r-- | c/defs.h | 44 |
1 files changed, 21 insertions, 23 deletions
@@ -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); |