added static wxPlatformInfo::Get() and use it (patch 1549176)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41807 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -83,6 +83,8 @@ It's normally the same for wxBase and wxGUI except in the case of wxMac and wxCo
|
||||
Returns the wxWidgets port ID used by the running program and eventually
|
||||
fills the given pointers with the values of the major and minor digits
|
||||
of the native toolkit currently used.
|
||||
The version numbers returned are thus detected at run-time and not compile-time
|
||||
(except when this is not possible e.g. wxMotif).
|
||||
|
||||
E.g. if your program is using wxGTK port this function will return wxPORT\_GTK and
|
||||
put in given pointers the versions of the GTK library in use.
|
||||
|
@@ -92,7 +92,8 @@ enum wxPortId
|
||||
wxPORT_MAC = 1 << 7, // wxMac, using Carbon or Classic Mac API
|
||||
wxPORT_COCOA = 1 << 8, // wxCocoa, using Cocoa NextStep/Mac API
|
||||
wxPORT_WINCE = 1 << 9, // wxWinCE, toolkit is WinCE SDK API
|
||||
wxPORT_PALMOS = 1 << 10 // wxPalmOS, toolkit is PalmOS API
|
||||
wxPORT_PALMOS = 1 << 10, // wxPalmOS, toolkit is PalmOS API
|
||||
wxPORT_DFB = 1 << 11 // wxDFB, using wxUniversal
|
||||
};
|
||||
\end{verbatim}
|
||||
|
||||
@@ -135,6 +136,8 @@ enum wxEndianness
|
||||
\func{}{wxPlatformInfo}{}
|
||||
|
||||
Initializes the instance with the values corresponding to the currently running platform.
|
||||
This is a fast operation because it only requires to copy the values internally cached for the
|
||||
currently running platform (see also \helpref{Get}{wxplatforminfoget}).
|
||||
|
||||
\func{}{wxPlatformInfo}{\param{wxPortId }{pid = wxPORT\_UNKNOWN}, \param{int }{tkMajor = -1}, \param{int }{tkMinor = -1}, \param{wxOperatingSystemId }{id = wxOS\_UNKNOWN}, \param{int }{osMajor = -1}, \param{int }{osMinor = -1}, \param{wxArchitecture }{arch = wxARCH\_INVALID}, \param{wxEndianness }{endian = wxENDIAN\_INVALID}}
|
||||
|
||||
@@ -169,6 +172,13 @@ Returns \true if the toolkit version is at least \texttt{major.minor}.
|
||||
|
||||
|
||||
|
||||
\membersection{wxPlatformInfo::Get}\label{wxplatforminfoget}
|
||||
|
||||
\func{static const wxPlatformInfo\& }{Get}{\void}
|
||||
|
||||
Returns the global wxPlatformInfo object, initialized with the values for the currently running platform.
|
||||
|
||||
|
||||
\membersection{wxPlatformInfo::GetArch}\label{wxplatforminfogetarch}
|
||||
|
||||
\func{static wxArchitecture}{GetArch}{\param{const wxString\& }{arch}}
|
||||
@@ -228,7 +238,8 @@ Returns the name for the endianness of this wxPlatformInfo instance.
|
||||
|
||||
\constfunc{int}{GetOSMajorVersion}{\void}
|
||||
|
||||
Returns the major version of the OS associated with this wxPlatformInfo instance.
|
||||
Returns the run-time major version of the OS associated with this wxPlatformInfo instance.
|
||||
See \helpref{wxGetOsVersion}{wxgetosversion} for more info.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
@@ -239,7 +250,10 @@ Returns the major version of the OS associated with this wxPlatformInfo instance
|
||||
|
||||
\constfunc{int}{GetOSMinorVersion}{\void}
|
||||
|
||||
Returns the minor version of the OS associated with this wxPlatformInfo instance.
|
||||
Returns the run-time minor version of the OS associated with this wxPlatformInfo instance.
|
||||
See \helpref{wxGetOsVersion}{wxgetosversion} for more info.
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{CheckOSVersion}{wxplatforminfocheckosversion}
|
||||
|
||||
@@ -340,8 +354,11 @@ Returns the short name of the wxWidgets port ID associated with this wxPlatformI
|
||||
|
||||
\constfunc{int}{GetToolkitMajorVersion}{\void}
|
||||
|
||||
Returns the major version of the toolkit associated with this wxPlatformInfo instance.
|
||||
Note that if {GetPortId}{wxplatforminfogetportid} returns wxPORT\_BASE, then this value is zero (unless externally modified with SetToolkitVersion); that is, no native toolkit is in use.
|
||||
Returns the run-time major version of the toolkit associated with this wxPlatformInfo instance.
|
||||
Note that if \helpref{GetPortId}{wxplatforminfogetportid} returns wxPORT\_BASE, then this value is zero (unless externally modified with \helpref{SetToolkitVersion}{wxplatforminfosettoolkitversion}); that is, no native toolkit is in use.
|
||||
|
||||
See \helpref{wxAppTraits::GetToolkitVersion}{wxapptraitsgettoolkitversion} for more info.
|
||||
|
||||
|
||||
\wxheading{See also}
|
||||
|
||||
@@ -352,9 +369,10 @@ Note that if {GetPortId}{wxplatforminfogetportid} returns wxPORT\_BASE, then thi
|
||||
|
||||
\constfunc{int}{GetToolkitMinorVersion}{\void}
|
||||
|
||||
Returns the minor version of the toolkit associated with this wxPlatformInfo instance.
|
||||
Note that if {GetPortId}{wxplatforminfogetportid} returns wxPORT\_BASE, then this value is zero (unless externally modified with SetToolkitVersion); that is, no native toolkit is in use.
|
||||
Returns the run-time minor version of the toolkit associated with this wxPlatformInfo instance.
|
||||
Note that if \helpref{GetPortId}{wxplatforminfogetportid} returns wxPORT\_BASE, then this value is zero (unless externally modified with \helpref{SetToolkitVersion}{wxplatforminfosettoolkitversion}); that is, no native toolkit is in use.
|
||||
|
||||
See \helpref{wxAppTraits::GetToolkitVersion}{wxapptraitsgettoolkitversion} for more info.
|
||||
\wxheading{See also}
|
||||
|
||||
\helpref{CheckToolkitVersion}{wxplatforminfochecktoolkitversion}
|
||||
|
Reference in New Issue
Block a user