Provide more details about the major and minor version numbers returned by wxGetOsVersion() under linux,mac,windows.
Document that wxOS_UNIX, wxOS_MAC and wxOS_WINDOWS enum values are combinations of other values (unfortunately doxygen does not show the definition of those symbols in the HTML docs so we need to explicitely state that). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63650 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
040ecf9b94
commit
9bbb78b9c1
@ -12,7 +12,12 @@
|
||||
whose version can be detected at run-time.
|
||||
|
||||
The values of the constants are chosen so that they can be combined as flags;
|
||||
this allows to check for operating system families like e.g. wxOS_MAC and wxOS_UNIX.
|
||||
this allows to check for operating system families like e.g. @c wxOS_MAC and @c wxOS_UNIX.
|
||||
|
||||
Note that you can obtain more detailed informations about the current OS
|
||||
version in use by checking the major and minor version numbers returned
|
||||
by ::wxGetOsVersion() or by wxPlatformInfo::GetOSMajorVersion(),
|
||||
wxPlatformInfo::GetOSMinorVersion().
|
||||
*/
|
||||
enum wxOperatingSystemId
|
||||
{
|
||||
@ -20,12 +25,16 @@ enum wxOperatingSystemId
|
||||
|
||||
wxOS_MAC_OS = 1 << 0, //!< Apple Mac OS 8/9/X with Mac paths
|
||||
wxOS_MAC_OSX_DARWIN = 1 << 1, //!< Apple Mac OS X with Unix paths
|
||||
|
||||
//! A combination of all @c wxOS_MAC_* values previously listed.
|
||||
wxOS_MAC = wxOS_MAC_OS|wxOS_MAC_OSX_DARWIN,
|
||||
|
||||
wxOS_WINDOWS_9X = 1 << 2, //!< Windows 9x family (95/98/ME)
|
||||
wxOS_WINDOWS_NT = 1 << 3, //!< Windows NT family (NT/2000/XP)
|
||||
wxOS_WINDOWS_NT = 1 << 3, //!< Windows NT family (NT/2000/XP/Vista/7)
|
||||
wxOS_WINDOWS_MICRO = 1 << 4, //!< MicroWindows
|
||||
wxOS_WINDOWS_CE = 1 << 5, //!< Windows CE (Window Mobile)
|
||||
|
||||
//! A combination of all @c wxOS_WINDOWS_* values previously listed.
|
||||
wxOS_WINDOWS = wxOS_WINDOWS_9X |
|
||||
wxOS_WINDOWS_NT |
|
||||
wxOS_WINDOWS_MICRO |
|
||||
@ -38,6 +47,8 @@ enum wxOperatingSystemId
|
||||
wxOS_UNIX_SOLARIS = 1 << 10, //!< SunOS
|
||||
wxOS_UNIX_AIX = 1 << 11, //!< AIX
|
||||
wxOS_UNIX_HPUX = 1 << 12, //!< HP/UX
|
||||
|
||||
//! A combination of all @c wxOS_UNIX_* values previously listed.
|
||||
wxOS_UNIX = wxOS_UNIX_LINUX |
|
||||
wxOS_UNIX_FREEBSD |
|
||||
wxOS_UNIX_OPENBSD |
|
||||
@ -354,6 +365,8 @@ public:
|
||||
|
||||
/**
|
||||
Returns the operating system ID of this wxPlatformInfo instance.
|
||||
|
||||
See wxGetOsVersion() for more info.
|
||||
*/
|
||||
wxOperatingSystemId GetOperatingSystemId() const;
|
||||
|
||||
|
@ -649,8 +649,34 @@ bool wxGetUserName(char* buf, int sz);
|
||||
wxString wxGetOsDescription();
|
||||
|
||||
/**
|
||||
Gets the version and the operating system ID for currently running OS. See
|
||||
wxPlatformInfo for more details about wxOperatingSystemId.
|
||||
Gets the version and the operating system ID for currently running OS.
|
||||
The returned wxOperatingSystemId value can be used for a basic categorization
|
||||
of the OS family; the major and minor version numbers allows to detect a specific
|
||||
system.
|
||||
|
||||
For Unix-like systems (@c wxOS_UNIX) the major and minor version integers will
|
||||
contain the kernel major and minor version numbers (as returned by the
|
||||
'uname -r' command); e.g. "2" and "6" if the machine is using kernel 2.6.19.
|
||||
|
||||
For Mac OS X systems (@c wxOS_MAC) the major and minor version integers are the
|
||||
natural version numbers associated with the OS; e.g. "10" and and "6" if the machine
|
||||
is using Mac OS X Snow Leopard.
|
||||
|
||||
For Windows-like systems (@c wxOS_WINDOWS) the major and minor version integers will
|
||||
contain the following values:
|
||||
@beginTable
|
||||
@row3col{<b>Windows OS name</b>, <b>Major version</b>, <b>Minor version</b>}
|
||||
@row3col{Windows 7, 6, 1}
|
||||
@row3col{Windows Server 2008 R2, 6, 1}
|
||||
@row3col{Windows Server 2008, 6, 0}
|
||||
@row3col{Windows Vista, 6, 0}
|
||||
@row3col{Windows Server 2003 R2, 5, 2}
|
||||
@row3col{Windows Server 2003, 5, 2}
|
||||
@row3col{Windows XP, 5, 1}
|
||||
@row3col{Windows 2000, 5, 0}
|
||||
@endDefList
|
||||
See the <a href="http://msdn.microsoft.com/en-us/library/ms724832(VS.85).aspx">MSDN</a>
|
||||
for more info about the values above.
|
||||
|
||||
@see wxGetOsDescription(), wxPlatformInfo
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user