Add a micro version parameter to wxGetOsVersion

In addition to getting a major and minor OS version allow a micro
version to be retrieved. In case of running on e.g. OS X 10.10.3 this
allows the "3" to be retrieved again.
This commit is contained in:
Dimitri Schoolwerth
2015-06-24 06:22:33 +04:00
committed by Tobias Taschner
parent 5983274af6
commit b1a9c6e79e
5 changed files with 30 additions and 11 deletions

View File

@@ -842,16 +842,22 @@ wxString wxGetOsDescription();
/**
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.
of the OS family; the major, minor, and micro version numbers allows to
detect a specific system.
If on Unix-like systems the version can't be detected all three version
numbers will have a value of -1.
On systems where only the micro version can't be detected or doesn't make
sense such as Windows, it will have a value of 0.
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. "4" and "1" if the machine is using kernel 4.1.4.
For 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 "11" if the machine
is using OS X El Capitan.
natural version numbers associated with the OS; e.g. "10", "11" and "2" if
the machine is using OS X El Capitan 10.11.2.
For Windows-like systems (@c wxOS_WINDOWS) the major and minor version integers will
contain the following values:
@@ -878,7 +884,7 @@ wxString wxGetOsDescription();
@header{wx/utils.h}
*/
wxOperatingSystemId wxGetOsVersion(int* major = NULL, int* minor = NULL);
wxOperatingSystemId wxGetOsVersion(int* major = NULL, int* minor = NULL, int* micro = NULL);
/**
Returns @true if the version of the operating system on which the program