OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "views/widget/native_widget_win.h" | 5 #include "views/widget/native_widget_win.h" |
6 | 6 |
7 #include <dwmapi.h> | 7 #include <dwmapi.h> |
8 #include <shellapi.h> | 8 #include <shellapi.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
704 SetWindowLong(GWL_STYLE, style & ~WS_MAXIMIZE); | 704 SetWindowLong(GWL_STYLE, style & ~WS_MAXIMIZE); |
705 SetWindowPos(NULL, bounds.x(), bounds.y(), bounds.width(), bounds.height(), | 705 SetWindowPos(NULL, bounds.x(), bounds.y(), bounds.width(), bounds.height(), |
706 SWP_NOACTIVATE | SWP_NOZORDER); | 706 SWP_NOACTIVATE | SWP_NOZORDER); |
707 } | 707 } |
708 | 708 |
709 void NativeWidgetWin::SetSize(const gfx::Size& size) { | 709 void NativeWidgetWin::SetSize(const gfx::Size& size) { |
710 SetWindowPos(NULL, 0, 0, size.width(), size.height(), | 710 SetWindowPos(NULL, 0, 0, size.width(), size.height(), |
711 SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOMOVE); | 711 SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOMOVE); |
712 } | 712 } |
713 | 713 |
714 void NativeWidgetWin::MoveAbove(gfx::NativeView native_view) { | 714 void NativeWidgetWin::StackAbove(gfx::NativeView native_view) { |
715 SetWindowPos(native_view, 0, 0, 0, 0, | 715 SetWindowPos(native_view, 0, 0, 0, 0, |
716 SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE); | 716 SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE); |
717 } | 717 } |
718 | 718 |
719 void NativeWidgetWin::MoveToTop() { | 719 void NativeWidgetWin::StackAtTop() { |
720 NOTIMPLEMENTED(); | 720 NOTIMPLEMENTED(); |
721 } | 721 } |
722 | 722 |
723 void NativeWidgetWin::SetShape(gfx::NativeRegion region) { | 723 void NativeWidgetWin::SetShape(gfx::NativeRegion region) { |
724 SetWindowRgn(region, TRUE); | 724 SetWindowRgn(region, TRUE); |
725 } | 725 } |
726 | 726 |
727 void NativeWidgetWin::Close() { | 727 void NativeWidgetWin::Close() { |
728 if (!IsWindow()) | 728 if (!IsWindow()) |
729 return; // No need to do anything. | 729 return; // No need to do anything. |
(...skipping 1785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2515 return (GetKeyState(VK_LBUTTON) & 0x80) || | 2515 return (GetKeyState(VK_LBUTTON) & 0x80) || |
2516 (GetKeyState(VK_RBUTTON) & 0x80) || | 2516 (GetKeyState(VK_RBUTTON) & 0x80) || |
2517 (GetKeyState(VK_MBUTTON) & 0x80) || | 2517 (GetKeyState(VK_MBUTTON) & 0x80) || |
2518 (GetKeyState(VK_XBUTTON1) & 0x80) || | 2518 (GetKeyState(VK_XBUTTON1) & 0x80) || |
2519 (GetKeyState(VK_XBUTTON2) & 0x80); | 2519 (GetKeyState(VK_XBUTTON2) & 0x80); |
2520 } | 2520 } |
2521 | 2521 |
2522 } // namespace internal | 2522 } // namespace internal |
2523 | 2523 |
2524 } // namespace views | 2524 } // namespace views |
OLD | NEW |