]> git.sesse.net Git - vlc/blobdiff - modules/gui/skins/win32/win32_window.cpp
* Added support of wheel with win32
[vlc] / modules / gui / skins / win32 / win32_window.cpp
index dfdfaeeef4ed08ea0986de1b7804d783bf648784..f3cb5486d3ca1994fc5e18f1926fde186e36149c 100644 (file)
@@ -2,7 +2,7 @@
  * win32_window.cpp: Win32 implementation of the Window class
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: win32_window.cpp,v 1.3 2003/03/20 09:29:07 karibu Exp $
+ * $Id: win32_window.cpp,v 1.8 2003/04/20 15:06:07 karibu Exp $
  *
  * Authors: Olivier Teulière <ipkiss@via.ecp.fr>
  *          Emmanuel Puig    <karibu@via.ecp.fr>
@@ -23,6 +23,7 @@
  * USA.
  *****************************************************************************/
 
+#ifdef WIN32
 
 //--- GENERAL ---------------------------------------------------------------
 //#include <math.h>
 #include <windows.h>
 
 //--- SKIN ------------------------------------------------------------------
-#include "os_api.h"
-#include "anchor.h"
-#include "generic.h"
-#include "window.h"
-#include "os_window.h"
-#include "event.h"
-#include "os_event.h"
-#include "graphics.h"
-#include "os_graphics.h"
-#include "skin_common.h"
-#include "theme.h"
+#include "../os_api.h"
+#include "../src/anchor.h"
+#include "../controls/generic.h"
+#include "../src/window.h"
+#include "../os_window.h"
+#include "../src/event.h"
+#include "../os_event.h"
+#include "../src/graphics.h"
+#include "../os_graphics.h"
+#include "../src/skin_common.h"
+#include "../src/theme.h"
 
 
 
@@ -200,6 +201,13 @@ bool Win32Window::ProcessOSEvent( Event *evt )
             OSAPI_PostMessage( this, WINDOW_LEAVE, 0, 0 );
             return true;
 
+        case WM_MOUSEWHEEL:
+            if( HIWORD( p1 ) > 0 )
+                MouseScroll( LOWORD( p2 ), HIWORD( p2 ), MOUSE_SCROLL_UP );
+            else if( HIWORD( p1 ) < 0 )
+                MouseScroll( LOWORD( p2 ), HIWORD( p2 ), MOUSE_SCROLL_DOWN );
+            return true;
+
         default:
             return false;
     }
@@ -293,3 +301,4 @@ void Win32Window::ChangeToolTipText( string text )
 }
 //---------------------------------------------------------------------------
 
+#endif