]>
git.saurik.com Git - wxWidgets.git/blob - interface/platinfo.h
cad17745adc060cfa56737a0cfb657238243933c
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: documentation for wxPlatformInfo class
4 // Author: wxWidgets team
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
13 This class holds informations about the operating system and the toolkit that
15 is running under and some basic architecture info of the machine where it's
22 wxGetOSVersion, wxIsPlatformLittleEndian, wxIsPlatform64Bit, wxAppTraits
24 class wxPlatformInfo
: public wxObject
29 Initializes the object using given values.
32 wxPlatformInfo(wxPortId pid
= wxPORT_UNKNOWN
,
35 wxOperatingSystemId id
= wxOS_UNKNOWN
,
38 wxArchitecture arch
= wxARCH_INVALID
,
39 wxEndianness endian
= wxENDIAN_INVALID
);
43 Returns @true if the OS version is at least @c major.minor.
45 @sa GetOSMajorVersion(), GetOSMinorVersion(),
48 bool CheckOSVersion(int major
, int minor
);
51 Returns @true if the toolkit version is at least @c major.minor.
53 @sa GetToolkitMajorVersion(),
54 GetToolkitMinorVersion(),
57 bool CheckToolkitVersion(int major
, int minor
);
60 Returns the global wxPlatformInfo object, initialized with the values for the
61 currently running platform.
63 #define static const wxPlatformInfo Get() /* implementation is private */
66 Converts the given string to a wxArchitecture enum value or to
67 wxARCH_INVALID if the given string is not a valid architecture string
68 (i.e. does not contain nor @c 32 nor @c 64 strings).
70 static wxArchitecture
GetArch(const wxString
& arch
);
74 Returns the name for the architecture of this wxPlatformInfo instance.
76 static wxString
GetArchName(wxArchitecture arch
);
77 wxString
GetArchName();
81 Returns the architecture ID of this wxPlatformInfo instance.
83 wxArchitecture
GetArchitecture();
87 Returns the endianness ID of this wxPlatformInfo instance.
89 static wxEndianness
GetEndianness(const wxString
& end
);
90 wxEndianness
GetEndianness();
95 Returns the name for the endianness of this wxPlatformInfo instance.
97 static wxString
GetEndiannessName(wxEndianness end
);
98 wxString
GetEndiannessName();
102 Returns the run-time major version of the OS associated with this
103 wxPlatformInfo instance.
104 See wxGetOsVersion for more info.
108 int GetOSMajorVersion();
111 Returns the run-time minor version of the OS associated with this
112 wxPlatformInfo instance.
113 See wxGetOsVersion for more info.
117 int GetOSMinorVersion();
121 Returns the operating system family name of the OS associated with this
122 wxPlatformInfo instance.
124 static wxString
GetOperatingSystemFamilyName(wxOperatingSystemId os
);
125 wxString
GetOperatingSystemFamilyName();
130 Returns the operating system ID of this wxPlatformInfo instance.
132 static wxOperatingSystemId
GetOperatingSystemId(const wxString
& name
);
133 wxOperatingSystemId
GetOperatingSystemId();
138 Returns the operating system name of the OS associated with this wxPlatformInfo
141 static wxString
GetOperatingSystemIdName(wxOperatingSystemId os
);
142 wxString
GetOperatingSystemIdName();
147 Returns the wxWidgets port ID associated with this wxPlatformInfo instance.
149 static wxPortId
GetPortId(const wxString
& portname
);
150 wxPortId
GetPortId();
155 Returns the name of the wxWidgets port ID associated with this wxPlatformInfo
158 static wxString
GetPortIdName(wxPortId port
, bool usingUniversal
);
159 wxString
GetPortIdName();
164 Returns the short name of the wxWidgets port ID associated with this
165 wxPlatformInfo instance.
167 static wxString
GetPortIdShortName(wxPortId port
,
168 bool usingUniversal
);
169 wxString
GetPortIdShortName();
173 Returns the run-time major version of the toolkit associated with this
174 wxPlatformInfo instance.
175 Note that if GetPortId() returns wxPORT_BASE, then this value is zero (unless
176 externally modified with wxPlatformInfo::SetToolkitVersion); that is, no native toolkit is in use.
178 See wxAppTraits::GetToolkitVersion for more info.
180 @sa CheckToolkitVersion()
182 int GetToolkitMajorVersion();
185 Returns the run-time minor version of the toolkit associated with this
186 wxPlatformInfo instance.
187 Note that if GetPortId() returns wxPORT_BASE, then this value is zero (unless
188 externally modified with wxPlatformInfo::SetToolkitVersion); that is, no native toolkit is in use.
190 See wxAppTraits::GetToolkitVersion for more info.
192 @sa CheckToolkitVersion()
194 int GetToolkitMinorVersion();
197 Returns @true if this instance is fully initialized with valid values.
199 #define bool IsOk() /* implementation is private */
202 Returns @true if this wxPlatformInfo describes wxUniversal build.
204 bool IsUsingUniversalWidgets();
207 Sets the architecture enum value associated with this wxPlatformInfo instance.
209 void SetArchitecture(wxArchitecture n
);
212 Sets the endianness enum value associated with this wxPlatformInfo instance.
214 void SetEndianness(wxEndianness n
);
217 Sets the version of the operating system associated with this wxPlatformInfo
220 void SetOSVersion(int major
, int minor
);
223 Sets the operating system associated with this wxPlatformInfo instance.
225 void SetOperatingSystemId(wxOperatingSystemId n
);
228 Sets the wxWidgets port ID associated with this wxPlatformInfo instance.
230 void SetPortId(wxPortId n
);
233 Sets the version of the toolkit associated with this wxPlatformInfo instance.
235 void SetToolkitVersion(int major
, int minor
);
238 Inequality operator. Tests all class' internal variables.
240 bool operator!=(const wxPlatformInfo
& t
);
243 Equality operator. Tests all class' internal variables.
245 bool operator==(const wxPlatformInfo
& t
);