Mercurial > mplayer.hg
changeset 22416:02783a09e1b3
Whitespace-only cosmetics: get rid of all remaining tabs
author | reimar |
---|---|
date | Sun, 04 Mar 2007 10:39:02 +0000 |
parents | c36b8d705d08 |
children | 0d507228e65b |
files | libvo/w32_common.c |
diffstat | 1 files changed, 112 insertions(+), 112 deletions(-) [+] |
line wrap: on
line diff
--- a/libvo/w32_common.c Sun Mar 04 10:30:55 2007 +0000 +++ b/libvo/w32_common.c Sun Mar 04 10:39:02 2007 +0000 @@ -42,84 +42,84 @@ RECT r; POINT p; switch (message) { - case WM_PAINT: - event_flags |= VO_EVENT_EXPOSE; - break; - case WM_MOVE: - p.x = 0; - p.y = 0; - ClientToScreen(vo_window, &p); - vo_dx = p.x; - vo_dy = p.y; - break; - case WM_SIZE: - event_flags |= VO_EVENT_RESIZE; - GetClientRect(vo_window, &r); - vo_dwidth = r.right; - vo_dheight = r.bottom; - break; - case WM_WINDOWPOSCHANGING: + case WM_PAINT: + event_flags |= VO_EVENT_EXPOSE; + break; + case WM_MOVE: + p.x = 0; + p.y = 0; + ClientToScreen(vo_window, &p); + vo_dx = p.x; + vo_dy = p.y; + break; + case WM_SIZE: + event_flags |= VO_EVENT_RESIZE; + GetClientRect(vo_window, &r); + vo_dwidth = r.right; + vo_dheight = r.bottom; + break; + case WM_WINDOWPOSCHANGING: return 0; - case WM_CLOSE: - mplayer_put_key(KEY_CLOSE_WIN); - break; + case WM_CLOSE: + mplayer_put_key(KEY_CLOSE_WIN); + break; case WM_SYSCOMMAND: - switch (wParam) { - case SC_SCREENSAVE: - case SC_MONITORPOWER: - mp_msg(MSGT_VO, MSGL_V, "vo: win32: killing screensaver\n"); - return 0; - } - break; + switch (wParam) { + case SC_SCREENSAVE: + case SC_MONITORPOWER: + mp_msg(MSGT_VO, MSGL_V, "vo: win32: killing screensaver\n"); + return 0; + } + break; case WM_KEYDOWN: - switch (wParam) { - case VK_LEFT: mplayer_put_key(KEY_LEFT); break; - case VK_UP: mplayer_put_key(KEY_UP); break; - case VK_RIGHT: mplayer_put_key(KEY_RIGHT); break; - case VK_DOWN: mplayer_put_key(KEY_DOWN); break; - case VK_TAB: mplayer_put_key(KEY_TAB); break; - case VK_CONTROL: mplayer_put_key(KEY_CTRL); break; - case VK_BACK: mplayer_put_key(KEY_BS); break; - case VK_DELETE: mplayer_put_key(KEY_DELETE); break; - case VK_INSERT: mplayer_put_key(KEY_INSERT); break; - case VK_HOME: mplayer_put_key(KEY_HOME); break; - case VK_END: mplayer_put_key(KEY_END); break; - case VK_PRIOR: mplayer_put_key(KEY_PAGE_UP); break; - case VK_NEXT: mplayer_put_key(KEY_PAGE_DOWN); break; - case VK_ESCAPE: mplayer_put_key(KEY_ESC); break; - } - break; + switch (wParam) { + case VK_LEFT: mplayer_put_key(KEY_LEFT); break; + case VK_UP: mplayer_put_key(KEY_UP); break; + case VK_RIGHT: mplayer_put_key(KEY_RIGHT); break; + case VK_DOWN: mplayer_put_key(KEY_DOWN); break; + case VK_TAB: mplayer_put_key(KEY_TAB); break; + case VK_CONTROL: mplayer_put_key(KEY_CTRL); break; + case VK_BACK: mplayer_put_key(KEY_BS); break; + case VK_DELETE: mplayer_put_key(KEY_DELETE); break; + case VK_INSERT: mplayer_put_key(KEY_INSERT); break; + case VK_HOME: mplayer_put_key(KEY_HOME); break; + case VK_END: mplayer_put_key(KEY_END); break; + case VK_PRIOR: mplayer_put_key(KEY_PAGE_UP); break; + case VK_NEXT: mplayer_put_key(KEY_PAGE_DOWN); break; + case VK_ESCAPE: mplayer_put_key(KEY_ESC); break; + } + break; case WM_CHAR: - mplayer_put_key(wParam); - break; - case WM_LBUTTONDOWN: - if (!vo_nomouse_input && (vo_fs || (wParam & MK_CONTROL))) { - mplayer_put_key(MOUSE_BTN0); - break; - } - if (!vo_fs) { - ReleaseCapture(); - SendMessage(hWnd, WM_NCLBUTTONDOWN, HTCAPTION, 0); - return 0; - } - break; - case WM_MBUTTONDOWN: - if (!vo_nomouse_input) - mplayer_put_key(MOUSE_BTN1); - break; - case WM_RBUTTONDOWN: - if (!vo_nomouse_input) - mplayer_put_key(MOUSE_BTN2); - break; - case WM_MOUSEWHEEL: - if (!vo_nomouse_input) { - int x = GET_WHEEL_DELTA_WPARAM(wParam); - if (x > 0) - mplayer_put_key(MOUSE_BTN3); - else - mplayer_put_key(MOUSE_BTN4); - break; - } + mplayer_put_key(wParam); + break; + case WM_LBUTTONDOWN: + if (!vo_nomouse_input && (vo_fs || (wParam & MK_CONTROL))) { + mplayer_put_key(MOUSE_BTN0); + break; + } + if (!vo_fs) { + ReleaseCapture(); + SendMessage(hWnd, WM_NCLBUTTONDOWN, HTCAPTION, 0); + return 0; + } + break; + case WM_MBUTTONDOWN: + if (!vo_nomouse_input) + mplayer_put_key(MOUSE_BTN1); + break; + case WM_RBUTTONDOWN: + if (!vo_nomouse_input) + mplayer_put_key(MOUSE_BTN2); + break; + case WM_MOUSEWHEEL: + if (!vo_nomouse_input) { + int x = GET_WHEEL_DELTA_WPARAM(wParam); + if (x > 0) + mplayer_put_key(MOUSE_BTN3); + else + mplayer_put_key(MOUSE_BTN4); + break; + } } return DefWindowProc(hWnd, message, wParam, lParam); @@ -129,8 +129,8 @@ MSG msg; event_flags = 0; while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) { - TranslateMessage(&msg); - DispatchMessage(&msg); + TranslateMessage(&msg); + DispatchMessage(&msg); } if (WinID >= 0) { RECT r; @@ -188,8 +188,8 @@ dm.dmDriverExtra = 0; dm.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT; if (!EnumDisplaySettings(0, ENUM_CURRENT_SETTINGS, &dm)) { - mp_msg(MSGT_VO, MSGL_ERR, "vo: win32: unable to enumerate display settings!\n"); - return; + mp_msg(MSGT_VO, MSGL_ERR, "vo: win32: unable to enumerate display settings!\n"); + return; } vo_screenwidth = dm.dmPelsWidth; @@ -209,23 +209,23 @@ dm.dmPelsHeight = vo_screenheight; if (vo_vm) { - int bestMode = -1; - int bestScore = INT_MAX; - int i; - for (i = 0; EnumDisplaySettings(0, i, &dm); ++i) { - int score = (dm.dmPelsWidth - o_dwidth) * (dm.dmPelsHeight - o_dheight); - if (dm.dmBitsPerPel != vo_depthonscreen) continue; - if (dm.dmPelsWidth < o_dwidth) continue; - if (dm.dmPelsHeight < o_dheight) continue; + int bestMode = -1; + int bestScore = INT_MAX; + int i; + for (i = 0; EnumDisplaySettings(0, i, &dm); ++i) { + int score = (dm.dmPelsWidth - o_dwidth) * (dm.dmPelsHeight - o_dheight); + if (dm.dmBitsPerPel != vo_depthonscreen) continue; + if (dm.dmPelsWidth < o_dwidth) continue; + if (dm.dmPelsHeight < o_dheight) continue; - if (score < bestScore) { - bestScore = score; - bestMode = i; - } - } + if (score < bestScore) { + bestScore = score; + bestMode = i; + } + } - if (bestMode != -1) - EnumDisplaySettings(0, bestMode, &dm); + if (bestMode != -1) + EnumDisplaySettings(0, bestMode, &dm); ChangeDisplaySettings(&dm, CDS_FULLSCREEN); } @@ -247,11 +247,11 @@ if (vo_fs || vo_ontop) layer = HWND_TOPMOST; if (vo_fs) { - changeMode(); - while (ShowCursor(0) >= 0) /**/ ; + changeMode(); + while (ShowCursor(0) >= 0) /**/ ; } else { - resetMode(); - while (ShowCursor(1) < 0) /**/ ; + resetMode(); + while (ShowCursor(1) < 0) /**/ ; } updateScreenProperties(); ShowWindow(vo_window, SW_HIDE); @@ -293,8 +293,8 @@ pfd.iLayerType = PFD_MAIN_PLANE; pf = ChoosePixelFormat(vo_hdc, &pfd); if (!pf) { - mp_msg(MSGT_VO, MSGL_ERR, "vo: win32: unable to select a valid pixel format!\n"); - return 0; + mp_msg(MSGT_VO, MSGL_ERR, "vo: win32: unable to select a valid pixel format!\n"); + return 0; } SetPixelFormat(vo_hdc, pf, &pfd); @@ -320,26 +320,26 @@ } int vo_w32_init(void) { - HICON mplayerIcon = 0; - char exedir[MAX_PATH]; - HINSTANCE user32; + HICON mplayerIcon = 0; + char exedir[MAX_PATH]; + HINSTANCE user32; if (vo_window) - return 1; + return 1; hInstance = GetModuleHandle(0); if (GetModuleFileName(0, exedir, MAX_PATH)) - mplayerIcon = ExtractIcon(hInstance, exedir, 0); + mplayerIcon = ExtractIcon(hInstance, exedir, 0); if (!mplayerIcon) - mplayerIcon = LoadIcon(0, IDI_APPLICATION); + mplayerIcon = LoadIcon(0, IDI_APPLICATION); { WNDCLASSEX wcex = { sizeof wcex, CS_OWNDC, WndProc, 0, 0, hInstance, mplayerIcon, LoadCursor(0, IDC_ARROW), (HBRUSH)GetStockObject(BLACK_BRUSH), 0, classname, mplayerIcon }; if (!RegisterClassEx(&wcex)) { - mp_msg(MSGT_VO, MSGL_ERR, "vo: win32: unable to register window class!\n"); - return 0; + mp_msg(MSGT_VO, MSGL_ERR, "vo: win32: unable to register window class!\n"); + return 0; } } @@ -350,8 +350,8 @@ vo_border ? (WS_OVERLAPPEDWINDOW | WS_SIZEBOX) : WS_POPUP, CW_USEDEFAULT, 0, 100, 100, 0, 0, hInstance, 0); if (!vo_window) { - mp_msg(MSGT_VO, MSGL_ERR, "vo: win32: unable to create window!\n"); - return 0; + mp_msg(MSGT_VO, MSGL_ERR, "vo: win32: unable to create window!\n"); + return 0; } } @@ -386,9 +386,9 @@ { vo_ontop = !vo_ontop; if (!vo_fs) { - HWND layer = HWND_NOTOPMOST; - if (vo_ontop) layer = HWND_TOPMOST; - SetWindowPos(vo_window, layer, (vo_screenwidth - vo_dwidth) / 2, (vo_screenheight - vo_dheight) / 2, vo_dwidth, vo_dheight, SWP_SHOWWINDOW); + HWND layer = HWND_NOTOPMOST; + if (vo_ontop) layer = HWND_TOPMOST; + SetWindowPos(vo_window, layer, (vo_screenwidth - vo_dwidth) / 2, (vo_screenheight - vo_dheight) / 2, vo_dwidth, vo_dheight, SWP_SHOWWINDOW); } }