OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-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 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 | 135 |
136 // Set up a filter for a Save/Open dialog, which will consist of |file_ext| file | 136 // Set up a filter for a Save/Open dialog, which will consist of |file_ext| file |
137 // extensions (internally separated by semicolons), |ext_desc| as the text | 137 // extensions (internally separated by semicolons), |ext_desc| as the text |
138 // descriptions of the |file_ext| types (optional), and (optionally) the default | 138 // descriptions of the |file_ext| types (optional), and (optionally) the default |
139 // 'All Files' view. The purpose of the filter is to show only files of a | 139 // 'All Files' view. The purpose of the filter is to show only files of a |
140 // particular type in a Windows Save/Open dialog box. The resulting filter is | 140 // particular type in a Windows Save/Open dialog box. The resulting filter is |
141 // returned. The filters created here are: | 141 // returned. The filters created here are: |
142 // 1. only files that have 'file_ext' as their extension | 142 // 1. only files that have 'file_ext' as their extension |
143 // 2. all files (only added if 'include_all_files' is true) | 143 // 2. all files (only added if 'include_all_files' is true) |
144 // Example: | 144 // Example: |
145 // file_ext: { ".txt", ".htm;.html" } | 145 // file_ext: { "*.txt", "*.htm;*.html" } |
146 // ext_desc: { "Text Document" } | 146 // ext_desc: { "Text Document" } |
147 // returned: "Text Document\0*.txt\0HTML Document\0.htm;.html\0" | 147 // returned: "Text Document\0*.txt\0HTML Document\0*.htm;*.html\0" |
148 // "All Files\0*.*\0\0" (in one big string) | 148 // "All Files\0*.*\0\0" (in one big string) |
149 // If a description is not provided for a file extension, it will be retrieved | 149 // If a description is not provided for a file extension, it will be retrieved |
150 // from the registry. If the file extension does not exist in the registry, it | 150 // from the registry. If the file extension does not exist in the registry, it |
151 // will be omitted from the filter, as it is likely a bogus extension. | 151 // will be omitted from the filter, as it is likely a bogus extension. |
152 std::wstring FormatFilterForExtensions( | 152 std::wstring FormatFilterForExtensions( |
153 const std::vector<std::wstring>& file_ext, | 153 const std::vector<std::wstring>& file_ext, |
154 const std::vector<std::wstring>& ext_desc, | 154 const std::vector<std::wstring>& ext_desc, |
155 bool include_all_files); | 155 bool include_all_files); |
156 | 156 |
157 // Prompt the user for location to save a file. 'suggested_name' is a full path | 157 // Prompt the user for location to save a file. 'suggested_name' is a full path |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 | 286 |
287 // Returns the system set window title font. | 287 // Returns the system set window title font. |
288 ChromeFont GetWindowTitleFont(); | 288 ChromeFont GetWindowTitleFont(); |
289 | 289 |
290 // The thickness of an auto-hide taskbar in pixels. | 290 // The thickness of an auto-hide taskbar in pixels. |
291 extern const int kAutoHideTaskbarThicknessPx; | 291 extern const int kAutoHideTaskbarThicknessPx; |
292 | 292 |
293 } // namespace win_util | 293 } // namespace win_util |
294 | 294 |
295 #endif // CHROME_COMMON_WIN_UTIL_H_ | 295 #endif // CHROME_COMMON_WIN_UTIL_H_ |
OLD | NEW |