]> git.saurik.com Git - wxWidgets.git/blame - interface/platinfo.h
don't style using Doxygen tags; use <span> tags and CSS instead
[wxWidgets.git] / interface / platinfo.h
CommitLineData
23324ae1
FM
1/////////////////////////////////////////////////////////////////////////////
2// Name: platinfo.h
3// Purpose: documentation for wxPlatformInfo class
4// Author: wxWidgets team
5// RCS-ID: $Id$
6// Licence: wxWindows license
7/////////////////////////////////////////////////////////////////////////////
8
9/**
10 @class wxPlatformInfo
11 @wxheader{platinfo.h}
7c913512 12
23324ae1
FM
13 This class holds informations about the operating system and the toolkit that
14 the application
15 is running under and some basic architecture info of the machine where it's
16 running.
7c913512 17
23324ae1
FM
18 @library{wxbase}
19 @category{FIXME}
7c913512 20
23324ae1
FM
21 @seealso
22 wxGetOSVersion, wxIsPlatformLittleEndian, wxIsPlatform64Bit, wxAppTraits
23*/
24class wxPlatformInfo : public wxObject
25{
26public:
27 //@{
28 /**
29 Initializes the object using given values.
30 */
31 wxPlatformInfo();
7c913512
FM
32 wxPlatformInfo(wxPortId pid = wxPORT_UNKNOWN,
33 int tkMajor = -1,
34 int tkMinor = -1,
35 wxOperatingSystemId id = wxOS_UNKNOWN,
36 int osMajor = -1,
37 int osMinor = -1,
38 wxArchitecture arch = wxARCH_INVALID,
39 wxEndianness endian = wxENDIAN_INVALID);
23324ae1
FM
40 //@}
41
42 /**
43 Returns @true if the OS version is at least @c major.minor.
44
45 @sa GetOSMajorVersion(), GetOSMinorVersion(),
46 CheckToolkitVersion()
47 */
48 bool CheckOSVersion(int major, int minor);
49
50 /**
51 Returns @true if the toolkit version is at least @c major.minor.
52
53 @sa GetToolkitMajorVersion(),
54 GetToolkitMinorVersion(),
55 CheckOSVersion()
56 */
57 bool CheckToolkitVersion(int major, int minor);
58
59 /**
60 Returns the global wxPlatformInfo object, initialized with the values for the
61 currently running platform.
62 */
63#define static const wxPlatformInfo Get() /* implementation is private */
64
65 /**
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).
69 */
70 static wxArchitecture GetArch(const wxString& arch);
71
72 //@{
73 /**
74 Returns the name for the architecture of this wxPlatformInfo instance.
75 */
76 static wxString GetArchName(wxArchitecture arch);
7c913512 77 wxString GetArchName();
23324ae1
FM
78 //@}
79
80 /**
81 Returns the architecture ID of this wxPlatformInfo instance.
82 */
83 wxArchitecture GetArchitecture();
84
85 //@{
86 /**
87 Returns the endianness ID of this wxPlatformInfo instance.
88 */
89 static wxEndianness GetEndianness(const wxString& end);
7c913512 90 wxEndianness GetEndianness();
23324ae1
FM
91 //@}
92
93 //@{
94 /**
95 Returns the name for the endianness of this wxPlatformInfo instance.
96 */
97 static wxString GetEndiannessName(wxEndianness end);
7c913512 98 wxString GetEndiannessName();
23324ae1
FM
99 //@}
100
101 /**
102 Returns the run-time major version of the OS associated with this
103 wxPlatformInfo instance.
104 See wxGetOsVersion for more info.
105
106 @sa CheckOSVersion()
107 */
108 int GetOSMajorVersion();
109
110 /**
111 Returns the run-time minor version of the OS associated with this
112 wxPlatformInfo instance.
113 See wxGetOsVersion for more info.
114
115 @sa CheckOSVersion()
116 */
117 int GetOSMinorVersion();
118
119 //@{
120 /**
121 Returns the operating system family name of the OS associated with this
122 wxPlatformInfo instance.
123 */
124 static wxString GetOperatingSystemFamilyName(wxOperatingSystemId os);
7c913512 125 wxString GetOperatingSystemFamilyName();
23324ae1
FM
126 //@}
127
128 //@{
129 /**
130 Returns the operating system ID of this wxPlatformInfo instance.
131 */
132 static wxOperatingSystemId GetOperatingSystemId(const wxString& name);
7c913512 133 wxOperatingSystemId GetOperatingSystemId();
23324ae1
FM
134 //@}
135
136 //@{
137 /**
138 Returns the operating system name of the OS associated with this wxPlatformInfo
139 instance.
140 */
141 static wxString GetOperatingSystemIdName(wxOperatingSystemId os);
7c913512 142 wxString GetOperatingSystemIdName();
23324ae1
FM
143 //@}
144
145 //@{
146 /**
147 Returns the wxWidgets port ID associated with this wxPlatformInfo instance.
148 */
149 static wxPortId GetPortId(const wxString& portname);
7c913512 150 wxPortId GetPortId();
23324ae1
FM
151 //@}
152
153 //@{
154 /**
155 Returns the name of the wxWidgets port ID associated with this wxPlatformInfo
156 instance.
157 */
158 static wxString GetPortIdName(wxPortId port, bool usingUniversal);
7c913512 159 wxString GetPortIdName();
23324ae1
FM
160 //@}
161
162 //@{
163 /**
164 Returns the short name of the wxWidgets port ID associated with this
165 wxPlatformInfo instance.
166 */
167 static wxString GetPortIdShortName(wxPortId port,
168 bool usingUniversal);
7c913512 169 wxString GetPortIdShortName();
23324ae1
FM
170 //@}
171
172 /**
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.
177
178 See wxAppTraits::GetToolkitVersion for more info.
179
180 @sa CheckToolkitVersion()
181 */
182 int GetToolkitMajorVersion();
183
184 /**
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.
189
190 See wxAppTraits::GetToolkitVersion for more info.
191
192 @sa CheckToolkitVersion()
193 */
194 int GetToolkitMinorVersion();
195
196 /**
197 Returns @true if this instance is fully initialized with valid values.
198 */
199#define bool IsOk() /* implementation is private */
200
201 /**
202 Returns @true if this wxPlatformInfo describes wxUniversal build.
203 */
204 bool IsUsingUniversalWidgets();
205
206 /**
207 Sets the architecture enum value associated with this wxPlatformInfo instance.
208 */
209 void SetArchitecture(wxArchitecture n);
210
211 /**
212 Sets the endianness enum value associated with this wxPlatformInfo instance.
213 */
214 void SetEndianness(wxEndianness n);
215
216 /**
217 Sets the version of the operating system associated with this wxPlatformInfo
218 instance.
219 */
220 void SetOSVersion(int major, int minor);
221
222 /**
223 Sets the operating system associated with this wxPlatformInfo instance.
224 */
225 void SetOperatingSystemId(wxOperatingSystemId n);
226
227 /**
228 Sets the wxWidgets port ID associated with this wxPlatformInfo instance.
229 */
230 void SetPortId(wxPortId n);
231
232 /**
233 Sets the version of the toolkit associated with this wxPlatformInfo instance.
234 */
235 void SetToolkitVersion(int major, int minor);
236
237 /**
238 Inequality operator. Tests all class' internal variables.
239 */
240 bool operator!=(const wxPlatformInfo& t);
241
242 /**
243 Equality operator. Tests all class' internal variables.
244 */
245 bool operator==(const wxPlatformInfo& t);
246};