aboutsummaryrefslogtreecommitdiff
path: root/c/listview.c
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-03-02 22:03:00 +0100
committerJohn Ankarström <john@ankarstrom.se>2022-03-03 12:05:55 +0100
commit23df5644c2ce8209a8387257f8d6942736008663 (patch)
tree4e74c3ea0fe1a7e3b1e8dd2a2bd312ec1be3e0cb /c/listview.c
parent170e048f4ceb11633b62cfcc5b82df6a5aa9c27b (diff)
downloadEpisodeBrowser-23df5644c2ce8209a8387257f8d6942736008663.tar.gz
Update code style.
Diffstat (limited to 'c/listview.c')
-rw-r--r--c/listview.c37
1 files changed, 17 insertions, 20 deletions
diff --git a/c/listview.c b/c/listview.c
index 2c24048..40c3108 100644
--- a/c/listview.c
+++ b/c/listview.c
@@ -16,22 +16,21 @@ LvCreate(HMENU hMenu)
HWND hLv;
hLv = CreateWindowEx(
- WS_EX_CLIENTEDGE,
- WC_LISTVIEW,
- TEXT(""),
- WS_CHILD|WS_VISIBLE|WS_VSCROLL|WS_TABSTOP
- |LVS_REPORT|LVS_NOSORTHEADER,
- 0, 0, 0, 0,
- HWnd, hMenu, GetModuleHandle(NULL), NULL
+ WS_EX_CLIENTEDGE,
+ WC_LISTVIEW,
+ TEXT(""),
+ WS_CHILD|WS_VISIBLE|WS_VSCROLL|WS_TABSTOP
+ |LVS_REPORT|LVS_NOSORTHEADER,
+ 0, 0, 0, 0,
+ HWnd, hMenu, GetModuleHandle(NULL), NULL
);
LvPrevProc = (WNDPROC)SetWindowLongPtr(hLv,
- GWLP_WNDPROC, (LONG_PTR)LvProc);
+ GWLP_WNDPROC, (LONG_PTR)LvProc);
ListView_SetExtendedListViewStyle(hLv, LVS_EX_FULLROWSELECT);
- SendMessage(hLv, WM_SETFONT,
- (WPARAM)HfNormal, MAKELPARAM(FALSE, 0));
+ SendMessage(hLv, WM_SETFONT, (WPARAM)HfNormal, MAKELPARAM(FALSE, 0));
return hLv;
}
@@ -53,16 +52,16 @@ LvProc(HWND hLv, UINT uMsg, WPARAM wParam, LPARAM lParam)
extern HWND HElv;
extern LPLVITEM LpLviElvSelection;
- /* For the episode list view, the Enter key should not
- * be handled by the dialog manager, but instead be sent
- * along to the main window procedure, so that it may be
- * handled by the NM_RETURN case in ElvHandleNotify.
- */
+ /* For the episode list view, the Enter key should not
+ * be handled by the dialog manager, but instead be sent
+ * along to the main window procedure, so that it may be
+ * handled by the NM_RETURN case in ElvHandleNotify.
+ */
if (hLv != HElv) break;
lResult = CallWindowProc(LvPrevProc, hLv, uMsg, wParam, lParam);
if (lParam && ((MSG *)lParam)->message == WM_KEYDOWN
- && ((MSG *)lParam)->wParam == VK_RETURN)
+ && ((MSG *)lParam)->wParam == VK_RETURN)
return DLGC_WANTMESSAGE;
return lResult;
}
@@ -75,10 +74,8 @@ void
LvSetTheme(HWND hLv, int bUseTheme)
{
ListView_SetExtendedListViewStyleEx(hLv,
- LVS_EX_DOUBLEBUFFER,
- bUseTheme ? LVS_EX_DOUBLEBUFFER : 0);
+ LVS_EX_DOUBLEBUFFER, bUseTheme ? LVS_EX_DOUBLEBUFFER : 0);
SendMessage(hLv, WM_CHANGEUISTATE,
- MAKEWPARAM(bUseTheme ? UIS_SET : UIS_CLEAR,
- UISF_HIDEFOCUS), 0);
+ MAKEWPARAM(bUseTheme ? UIS_SET : UIS_CLEAR, UISF_HIDEFOCUS), 0);
SetWindowTheme(hLv, bUseTheme ? TEXT("Explorer") : NULL, NULL);
}