Class: Wx::PlatformInfo
- Inherits:
-
Object
- Object
- Wx::PlatformInfo
- Defined in:
- lib/wx/doc/gen/platform_info.rb
Overview
This class is untracked and should not be derived from nor instances extended!
This class holds information about the operating system, the toolkit and the basic architecture bitness of the machine where the application is currently running.
This class does not only have getters for the information above, it also has setters. This allows you to e.g. save the current platform information in a data file (maybe in string form) so that when you later load it, you can easily retrieve (see the static getters for string->enum conversion functions) and store inside a PlatformInfo instance (using its setters) the signature of the system which generated it. In general however you only need to use the static PlatformInfo.instance method and then access the various information for the current platform:
Wx.("This application is running under %s.",
Wx::PlatformInfo.instance.)
Category: Application and System configuration
Class Method Summary collapse
-
.get_operating_system_directory ⇒ String
Returns the operating system directory.
-
.instance ⇒ Wx::PlatformInfo
Returns the global PlatformInfo object, initialized with the values for the currently running platform.
Instance Method Summary collapse
-
#check_os_version(major, minor, micro = 0) ⇒ Boolean
Returns true if the OS version is at least major.minor.micro.
-
#check_toolkit_version(major, minor, micro = 0) ⇒ Boolean
Returns true if the toolkit version is at least major.minor.micro.
-
#get_bitness ⇒ Wx::Bitness
(also: #bitness)
Returns the architecture bitness ID of this PlatformInfo instance.
-
#get_bitness_name ⇒ String
(also: #bitness_name)
Returns the name for the architecture bitness of this PlatformInfo instance.
-
#get_cpu_architecture_name ⇒ String
(also: #cpu_architecture_name)
Returns the CPU architecture name, if available.
-
#get_desktop_environment ⇒ String
(also: #desktop_environment)
Returns the desktop environment associated with this PlatformInfo instance.
-
#get_endianness ⇒ Wx::Endianness
(also: #endianness)
Returns the endianness ID of this PlatformInfo instance.
-
#get_endianness_name ⇒ String
(also: #endianness_name)
Returns the name for the endianness of this PlatformInfo instance.
-
#get_linux_distribution_info ⇒ Wx::LinuxDistributionInfo
(also: #linux_distribution_info)
Returns the Linux distribution info associated with this PlatformInfo instance.
-
#get_native_cpu_architecture_name ⇒ String
(also: #native_cpu_architecture_name)
Returns the native CPU architecture name, if available.
-
#get_operating_system_description ⇒ String
(also: #operating_system_description)
Returns the description of the operating system of this PlatformInfo instance.
-
#get_operating_system_family_name ⇒ String
(also: #operating_system_family_name)
Returns the operating system family name of the OS associated with this PlatformInfo instance.
-
#get_operating_system_id ⇒ Wx::OperatingSystemId
(also: #operating_system_id)
Returns the operating system ID of this PlatformInfo instance.
-
#get_operating_system_id_name ⇒ String
(also: #operating_system_id_name)
Returns the operating system name of the OS associated with this PlatformInfo instance.
-
#get_os_major_version ⇒ Integer
(also: #os_major_version)
Returns the run-time major version of the OS associated with this PlatformInfo instance.
-
#get_os_micro_version ⇒ Integer
(also: #os_micro_version)
Returns the run-time micro version of the OS associated with this PlatformInfo instance.
-
#get_os_minor_version ⇒ Integer
(also: #os_minor_version)
Returns the run-time minor version of the OS associated with this PlatformInfo instance.
-
#get_port_id ⇒ Wx::PortId
(also: #port_id)
Returns the wxWidgets port ID associated with this PlatformInfo instance.
-
#get_port_id_name ⇒ String
(also: #port_id_name)
Returns the name of the wxWidgets port ID associated with this PlatformInfo instance.
-
#get_port_id_short_name ⇒ String
(also: #port_id_short_name)
Returns the short name of the wxWidgets port ID associated with this PlatformInfo instance.
-
#get_toolkit_major_version ⇒ Integer
(also: #toolkit_major_version)
Returns the run-time major version of the toolkit associated with this PlatformInfo instance.
-
#get_toolkit_micro_version ⇒ Integer
(also: #toolkit_micro_version)
Returns the run-time micro version of the toolkit associated with this PlatformInfo instance.
-
#get_toolkit_minor_version ⇒ Integer
(also: #toolkit_minor_version)
Returns the run-time minor version of the toolkit associated with this PlatformInfo instance.
-
#is_ok ⇒ Boolean
(also: #ok?)
Returns true if this instance is fully initialized with valid values.
-
#is_using_universal_widgets ⇒ Boolean
(also: #using_universal_widgets?)
Returns true if this PlatformInfo describes Universal build.
Class Method Details
.get_operating_system_directory ⇒ String
Returns the operating system directory.
See get_os_directory for more info.
350 |
# File 'lib/wx/doc/gen/platform_info.rb', line 350 def self.; end |
.instance ⇒ Wx::PlatformInfo
Returns the global Wx::PlatformInfo object, initialized with the values for the currently running platform.
390 |
# File 'lib/wx/doc/gen/platform_info.rb', line 390 def self.instance; end |
Instance Method Details
#check_os_version(major, minor, micro = 0) ⇒ Boolean
Returns true if the OS version is at least major.minor.micro.
363 |
# File 'lib/wx/doc/gen/platform_info.rb', line 363 def check_os_version(major, minor, micro=0) end |
#check_toolkit_version(major, minor, micro = 0) ⇒ Boolean
Returns true if the toolkit version is at least major.minor.micro.
376 |
# File 'lib/wx/doc/gen/platform_info.rb', line 376 def check_toolkit_version(major, minor, micro=0) end |
#get_bitness ⇒ Wx::Bitness Also known as: bitness
Returns the architecture bitness ID of this Wx::PlatformInfo instance.
206 |
# File 'lib/wx/doc/gen/platform_info.rb', line 206 def get_bitness; end |
#get_bitness_name ⇒ String Also known as: bitness_name
Returns the name for the architecture bitness of this Wx::PlatformInfo instance.
318 |
# File 'lib/wx/doc/gen/platform_info.rb', line 318 def get_bitness_name; end |
#get_cpu_architecture_name ⇒ String Also known as: cpu_architecture_name
Returns the CPU architecture name, if available.
220 |
# File 'lib/wx/doc/gen/platform_info.rb', line 220 def get_cpu_architecture_name; end |
#get_desktop_environment ⇒ String Also known as: desktop_environment
Returns the desktop environment associated with this Wx::PlatformInfo instance.
See AppTraits#get_desktop_environment for more info.
289 |
# File 'lib/wx/doc/gen/platform_info.rb', line 289 def get_desktop_environment; end |
#get_endianness ⇒ Wx::Endianness Also known as: endianness
Returns the endianness ID of this Wx::PlatformInfo instance.
211 |
# File 'lib/wx/doc/gen/platform_info.rb', line 211 def get_endianness; end |
#get_endianness_name ⇒ String Also known as: endianness_name
Returns the name for the endianness of this Wx::PlatformInfo instance.
323 |
# File 'lib/wx/doc/gen/platform_info.rb', line 323 def get_endianness_name; end |
#get_linux_distribution_info ⇒ Wx::LinuxDistributionInfo Also known as: linux_distribution_info
Returns the Linux distribution info associated with this Wx::PlatformInfo instance.
See #get_linux_distribution_info for more info.
282 |
# File 'lib/wx/doc/gen/platform_info.rb', line 282 def get_linux_distribution_info; end |
#get_native_cpu_architecture_name ⇒ String Also known as: native_cpu_architecture_name
Returns the native CPU architecture name, if available.
229 |
# File 'lib/wx/doc/gen/platform_info.rb', line 229 def get_native_cpu_architecture_name; end |
#get_operating_system_description ⇒ String Also known as: operating_system_description
Returns the description of the operating system of this Wx::PlatformInfo instance.
See Wx.get_os_description for more info.
270 |
# File 'lib/wx/doc/gen/platform_info.rb', line 270 def ; end |
#get_operating_system_family_name ⇒ String Also known as: operating_system_family_name
Returns the operating system family name of the OS associated with this Wx::PlatformInfo instance.
328 |
# File 'lib/wx/doc/gen/platform_info.rb', line 328 def ; end |
#get_operating_system_id ⇒ Wx::OperatingSystemId Also known as: operating_system_id
Returns the operating system ID of this Wx::PlatformInfo instance.
See get_os_version for more info.
263 |
# File 'lib/wx/doc/gen/platform_info.rb', line 263 def ; end |
#get_operating_system_id_name ⇒ String Also known as: operating_system_id_name
Returns the operating system name of the OS associated with this Wx::PlatformInfo instance.
333 |
# File 'lib/wx/doc/gen/platform_info.rb', line 333 def ; end |
#get_os_major_version ⇒ Integer Also known as: os_major_version
Returns the run-time major version of the OS associated with this Wx::PlatformInfo instance.
238 |
# File 'lib/wx/doc/gen/platform_info.rb', line 238 def get_os_major_version; end |
#get_os_micro_version ⇒ Integer Also known as: os_micro_version
Returns the run-time micro version of the OS associated with this Wx::PlatformInfo instance.
256 |
# File 'lib/wx/doc/gen/platform_info.rb', line 256 def get_os_micro_version; end |
#get_os_minor_version ⇒ Integer Also known as: os_minor_version
Returns the run-time minor version of the OS associated with this Wx::PlatformInfo instance.
247 |
# File 'lib/wx/doc/gen/platform_info.rb', line 247 def get_os_minor_version; end |
#get_port_id ⇒ Wx::PortId Also known as: port_id
Returns the wxWidgets port ID associated with this Wx::PlatformInfo instance.
275 |
# File 'lib/wx/doc/gen/platform_info.rb', line 275 def get_port_id; end |
#get_port_id_name ⇒ String Also known as: port_id_name
Returns the name of the wxWidgets port ID associated with this Wx::PlatformInfo instance.
338 |
# File 'lib/wx/doc/gen/platform_info.rb', line 338 def get_port_id_name; end |
#get_port_id_short_name ⇒ String Also known as: port_id_short_name
Returns the short name of the wxWidgets port ID associated with this Wx::PlatformInfo instance.
343 |
# File 'lib/wx/doc/gen/platform_info.rb', line 343 def get_port_id_short_name; end |
#get_toolkit_major_version ⇒ Integer Also known as: toolkit_major_version
Returns the run-time major version of the toolkit associated with this Wx::PlatformInfo instance.
Note that if #get_port_id returns Wx::PortId::PORT_BASE, then this value is zero (unless externally modified with set_toolkit_version); that is, no native toolkit is in use. See AppTraits#get_toolkit_version for more info.
297 |
# File 'lib/wx/doc/gen/platform_info.rb', line 297 def get_toolkit_major_version; end |
#get_toolkit_micro_version ⇒ Integer Also known as: toolkit_micro_version
Returns the run-time micro version of the toolkit associated with this Wx::PlatformInfo instance.
Note that if #get_port_id returns Wx::PortId::PORT_BASE, then this value is zero (unless externally modified with set_toolkit_version); that is, no native toolkit is in use. See AppTraits#get_toolkit_version for more info.
313 |
# File 'lib/wx/doc/gen/platform_info.rb', line 313 def get_toolkit_micro_version; end |
#get_toolkit_minor_version ⇒ Integer Also known as: toolkit_minor_version
Returns the run-time minor version of the toolkit associated with this Wx::PlatformInfo instance.
Note that if #get_port_id returns Wx::PortId::PORT_BASE, then this value is zero (unless externally modified with set_toolkit_version); that is, no native toolkit is in use. See AppTraits#get_toolkit_version for more info.
305 |
# File 'lib/wx/doc/gen/platform_info.rb', line 305 def get_toolkit_minor_version; end |
#is_ok ⇒ Boolean Also known as: ok?
Returns true if this instance is fully initialized with valid values.
380 |
# File 'lib/wx/doc/gen/platform_info.rb', line 380 def is_ok; end |
#is_using_universal_widgets ⇒ Boolean Also known as: using_universal_widgets?
Returns true if this Wx::PlatformInfo describes Universal build.
385 |
# File 'lib/wx/doc/gen/platform_info.rb', line 385 def ; end |