[MPlayer-cvslog] r22434 - trunk/libvo/w32_common.c

reimar subversion at mplayerhq.hu
Sun Mar 4 11:39:02 CET 2007


Author: reimar
Date: Sun Mar  4 11:39:02 2007
New Revision: 22434

Modified:
   trunk/libvo/w32_common.c

Log:
Whitespace-only cosmetics: get rid of all remaining tabs

Modified: trunk/libvo/w32_common.c
==============================================================================
--- trunk/libvo/w32_common.c	(original)
+++ trunk/libvo/w32_common.c	Sun Mar  4 11:39:02 2007
@@ -42,84 +42,84 @@ static LRESULT CALLBACK WndProc(HWND hWn
     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 @@ int vo_w32_check_events(void) {
     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 @@ static void updateScreenProperties() {
     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 @@ static void changeMode(void) {
     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 @@ static int createRenderingContext(void) 
 
     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 @@ static int createRenderingContext(void) 
     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_config(uint32_t width, uint32
 }
 
 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 @@ int vo_w32_init(void) {
                   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 @@ void vo_w32_ontop( void )
 {
     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);
     }
 }
 



More information about the MPlayer-cvslog mailing list