| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #ifndef CHROME_COMMON_WIN_UTIL_H_ | 5 #ifndef CHROME_COMMON_WIN_UTIL_H_ |
| 6 #define CHROME_COMMON_WIN_UTIL_H_ | 6 #define CHROME_COMMON_WIN_UTIL_H_ |
| 7 | 7 |
| 8 #include <objbase.h> | 8 #include <objbase.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 // If the window does not fit on the default monitor, it is moved and possibly | 204 // If the window does not fit on the default monitor, it is moved and possibly |
| 205 // resized appropriately. | 205 // resized appropriately. |
| 206 void AdjustWindowToFit(HWND hwnd); | 206 void AdjustWindowToFit(HWND hwnd); |
| 207 | 207 |
| 208 // Sizes the window to have a client or window size (depending on the value of | 208 // Sizes the window to have a client or window size (depending on the value of |
| 209 // |pref_is_client|) of pref, then centers the window over parent, ensuring the | 209 // |pref_is_client|) of pref, then centers the window over parent, ensuring the |
| 210 // window fits on screen. | 210 // window fits on screen. |
| 211 void CenterAndSizeWindow(HWND parent, HWND window, const SIZE& pref, | 211 void CenterAndSizeWindow(HWND parent, HWND window, const SIZE& pref, |
| 212 bool pref_is_client); | 212 bool pref_is_client); |
| 213 | 213 |
| 214 // Returns true if edge |edge| (one of ABE_LEFT, TOP, RIGHT, or BOTTOM) of |
| 215 // monitor |monitor| has an auto-hiding taskbar. |
| 216 bool EdgeHasAutoHideTaskbar(UINT edge, HMONITOR monitor); |
| 217 |
| 214 // Duplicates a section handle from another process to the current process. | 218 // Duplicates a section handle from another process to the current process. |
| 215 // Returns the new valid handle if the function succeed. NULL otherwise. | 219 // Returns the new valid handle if the function succeed. NULL otherwise. |
| 216 HANDLE GetSectionFromProcess(HANDLE section, HANDLE process, bool read_only); | 220 HANDLE GetSectionFromProcess(HANDLE section, HANDLE process, bool read_only); |
| 217 | 221 |
| 218 // Returns true if the specified window is the current active top window or one | 222 // Returns true if the specified window is the current active top window or one |
| 219 // of its children. | 223 // of its children. |
| 220 bool DoesWindowBelongToActiveWindow(HWND window); | 224 bool DoesWindowBelongToActiveWindow(HWND window); |
| 221 | 225 |
| 222 // Adjusts the value of |child_rect| if necessary to ensure that it is | 226 // Adjusts the value of |child_rect| if necessary to ensure that it is |
| 223 // completely visible within |parent_rect|. | 227 // completely visible within |parent_rect|. |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 // callers don't have to worry about adding these flags when running in a | 271 // callers don't have to worry about adding these flags when running in a |
| 268 // right-to-left locale. | 272 // right-to-left locale. |
| 269 int MessageBox(HWND hwnd, | 273 int MessageBox(HWND hwnd, |
| 270 const std::wstring& text, | 274 const std::wstring& text, |
| 271 const std::wstring& caption, | 275 const std::wstring& caption, |
| 272 UINT flags); | 276 UINT flags); |
| 273 | 277 |
| 274 // Returns the system set window title font. | 278 // Returns the system set window title font. |
| 275 ChromeFont GetWindowTitleFont(); | 279 ChromeFont GetWindowTitleFont(); |
| 276 | 280 |
| 281 // The thickness of an auto-hide taskbar in pixels. |
| 282 extern const int kAutoHideTaskbarThicknessPx; |
| 283 |
| 277 } // namespace win_util | 284 } // namespace win_util |
| 278 | 285 |
| 279 #endif // CHROME_COMMON_WIN_UTIL_H_ | 286 #endif // CHROME_COMMON_WIN_UTIL_H_ |
| OLD | NEW |