OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2009 Apple Inc. All Rights Reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 13 matching lines...) Expand all Loading... |
24 */ | 24 */ |
25 | 25 |
26 #ifndef SystemInfo_h | 26 #ifndef SystemInfo_h |
27 #define SystemInfo_h | 27 #define SystemInfo_h |
28 | 28 |
29 #include "platform/PlatformExport.h" | 29 #include "platform/PlatformExport.h" |
30 #include "wtf/text/WTFString.h" | 30 #include "wtf/text/WTFString.h" |
31 | 31 |
32 namespace WebCore { | 32 namespace WebCore { |
33 | 33 |
34 // NOTE: Keep these in order so callers can do things like | 34 PLATFORM_EXPORT bool isWindowsVistaOrGreater(); |
35 // "if (windowsVersion() >= WindowsVista) ...". It's OK to change or add values, | |
36 // though. | |
37 enum WindowsVersion { | |
38 // CE-based versions | |
39 WindowsCE1 = 0, | |
40 WindowsCE2, | |
41 WindowsCE3, | |
42 WindowsCE4, | |
43 WindowsCE5, | |
44 WindowsCE6, | |
45 WindowsCE7, | |
46 // 3.x-based versions | |
47 Windows3_1, | |
48 // 9x-based versions | |
49 Windows95, | |
50 Windows98, | |
51 WindowsME, | |
52 // NT-based versions | |
53 WindowsNT3, | |
54 WindowsNT4, | |
55 Windows2000, | |
56 WindowsXP, | |
57 WindowsServer2003, | |
58 WindowsVista, | |
59 WindowsServer2008, | |
60 Windows7, | |
61 }; | |
62 | |
63 // If supplied, |major| and |minor| are set to the OSVERSIONINFO::dwMajorVersion | |
64 // and dwMinorVersion field values, respectively. | |
65 PLATFORM_EXPORT WindowsVersion windowsVersion(int* major = 0, int* minor = 0); | |
66 | 35 |
67 } // namespace WebCore | 36 } // namespace WebCore |
68 | 37 |
69 #endif // SystemInfo_h | 38 #endif // SystemInfo_h |
OLD | NEW |