| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 APP_L10N_UTIL_WIN_H_ | 5 #ifndef APP_L10N_UTIL_WIN_H_ |
| 6 #define APP_L10N_UTIL_WIN_H_ | 6 #define APP_L10N_UTIL_WIN_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <windows.h> | 9 #include <windows.h> |
| 10 #include <string> |
| 11 #include <vector> |
| 10 | 12 |
| 11 namespace l10n_util { | 13 namespace l10n_util { |
| 12 | 14 |
| 13 // Returns the locale-dependent extended window styles. | 15 // Returns the locale-dependent extended window styles. |
| 14 // This function is used for adding locale-dependent extended window styles | 16 // This function is used for adding locale-dependent extended window styles |
| 15 // (e.g. WS_EX_LAYOUTRTL, WS_EX_RTLREADING, etc.) when creating a window. | 17 // (e.g. WS_EX_LAYOUTRTL, WS_EX_RTLREADING, etc.) when creating a window. |
| 16 // Callers should OR this value into their extended style value when creating | 18 // Callers should OR this value into their extended style value when creating |
| 17 // a window. | 19 // a window. |
| 18 int GetExtendedStyles(); | 20 int GetExtendedStyles(); |
| 19 | 21 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 40 | 42 |
| 41 // If the default UI font stored in |logfont| is not suitable, its family | 43 // If the default UI font stored in |logfont| is not suitable, its family |
| 42 // and size are replaced with those stored in the per-locale resource. | 44 // and size are replaced with those stored in the per-locale resource. |
| 43 void AdjustUIFont(LOGFONT* logfont); | 45 void AdjustUIFont(LOGFONT* logfont); |
| 44 | 46 |
| 45 // If the font for a given window (pointed to by HWND) is not suitable for the | 47 // If the font for a given window (pointed to by HWND) is not suitable for the |
| 46 // UI in the current UI langauge, its family and size are replaced with those | 48 // UI in the current UI langauge, its family and size are replaced with those |
| 47 // stored in the per-locale resource. | 49 // stored in the per-locale resource. |
| 48 void AdjustUIFontForWindow(HWND hwnd); | 50 void AdjustUIFontForWindow(HWND hwnd); |
| 49 | 51 |
| 52 // Allow processes to override the configured locale with the user's Windows UI |
| 53 // languages. This function should generally be called once early in |
| 54 // Application startup. |
| 55 void OverrideLocaleWithUILanguageList(); |
| 56 |
| 57 // Retrieve the locale override, or an empty vector if the locale has not been |
| 58 // or failed to be overridden. |
| 59 const std::vector<std::string>& GetLocaleOverrides(); |
| 60 |
| 50 } // namespace l10n_util | 61 } // namespace l10n_util |
| 51 | 62 |
| 52 #endif // APP_L10N_UTIL_WIN_H_ | 63 #endif // APP_L10N_UTIL_WIN_H_ |
| OLD | NEW |