Use WPARAM as uint64_t and LPARAM as int64_t
authorOmri Litov <omrilitov@gmail.com>
Wed, 28 Oct 2015 19:54:50 +0000 (21:54 +0200)
committerOmri Litov <omrilitov@gmail.com>
Wed, 28 Oct 2015 19:54:50 +0000 (21:54 +0200)
atom/browser/api/atom_api_window.cc
atom/browser/api/atom_api_window.h
atom/browser/native_window.cc
atom/browser/native_window_observer.h

index 077dffe..bf0d0fa 100644 (file)
@@ -190,7 +190,7 @@ void Window::OnExecuteWindowsCommand(const std::string& command_name) {
 }
 
 #if defined(OS_WIN)
-void Window::OnWindowMessage(UINT message, WPARAM w_param, uint64_t l_param) {
+void Window::OnWindowMessage(UINT message, uint64_t w_param, int64_t l_param) {
   if (IsWindowMessageHooked(message)) {
     messages_callback_map_[message].Run(w_param, l_param);
   }
index f4bc4cd..ea86150 100644 (file)
@@ -77,7 +77,8 @@ class Window : public mate::TrackableObject<Window>,
   void OnExecuteWindowsCommand(const std::string& command_name) override;
 
   #if defined(OS_WIN)
-  void OnWindowMessage(UINT message, WPARAM w_param, uint64_t l_param) override;
+  void OnWindowMessage(UINT message, uint64_t w_param,
+                       int64_t l_param) override;
   #endif
 
   // mate::Wrappable:
index 6e38f40..a1b6f95 100644 (file)
@@ -469,7 +469,8 @@ void NativeWindow::NotifyWindowMessage(UINT message, WPARAM w_param,
                                        LPARAM l_param) {
   FOR_EACH_OBSERVER(
       NativeWindowObserver, observers_,
-      OnWindowMessage(message, w_param, static_cast<uint64_t>(l_param)));
+      OnWindowMessage(message, static_cast<uint64_t>(w_param),
+                      static_cast<int64_t>(l_param)));
 }
 #endif
 
index 240a727..559d5f7 100644 (file)
@@ -61,7 +61,7 @@ class NativeWindowObserver {
 
   // Called when window message received
   #if defined(OS_WIN)
-  virtual void OnWindowMessage(UINT message, WPARAM wparam, uint64_t lparam) {}
+  virtual void OnWindowMessage(UINT message, uint64_t wparam, int64_t lparam) {}
   #endif
 
   // Called when renderer is hung.