Class: Wx::PlatformInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/wx/doc/gen/platform_info.rb

Overview

Note:

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.log_message("This application is running under %s.", 
                 Wx::PlatformInfo.instance.get_operating_system_id_name)

Category: Application and System configuration

See Also:

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.get_operating_system_directoryString

Returns the operating system directory.

See get_os_directory for more info.

Returns:

  • (String)


369
# File 'lib/wx/doc/gen/platform_info.rb', line 369

def self.get_operating_system_directory; end

.instanceWx::PlatformInfo

Returns the global Wx::PlatformInfo object, initialized with the values for the currently running platform.

Note that this function is thread-safe, i.e. it can be called concurrently from multiple threads without locking (unless wxWidgets was compiled without threads support, i.e. with Setup::USE_THREADS changed to be 0).

Returns:



411
# File 'lib/wx/doc/gen/platform_info.rb', line 411

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.

Parameters:

  • major (Integer)
  • minor (Integer)
  • micro (Integer) (defaults to: 0)

Returns:

  • (Boolean)

See Also:



382
# File 'lib/wx/doc/gen/platform_info.rb', line 382

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.

Parameters:

  • major (Integer)
  • minor (Integer)
  • micro (Integer) (defaults to: 0)

Returns:

  • (Boolean)

See Also:



395
# File 'lib/wx/doc/gen/platform_info.rb', line 395

def check_toolkit_version(major, minor, micro=0) end

#get_bitnessWx::Bitness Also known as: bitness

Returns the architecture bitness ID of this Wx::PlatformInfo instance.

Returns:



225
# File 'lib/wx/doc/gen/platform_info.rb', line 225

def get_bitness; end

#get_bitness_nameString Also known as: bitness_name

Returns the name for the architecture bitness of this Wx::PlatformInfo instance.

Returns:

  • (String)


337
# File 'lib/wx/doc/gen/platform_info.rb', line 337

def get_bitness_name; end

#get_cpu_architecture_nameString Also known as: cpu_architecture_name

Returns the CPU architecture name, if available.



239
# File 'lib/wx/doc/gen/platform_info.rb', line 239

def get_cpu_architecture_name; end

#get_desktop_environmentString Also known as: desktop_environment

Returns the desktop environment associated with this Wx::PlatformInfo instance.

See AppTraits#get_desktop_environment for more info.

Returns:

  • (String)


308
# File 'lib/wx/doc/gen/platform_info.rb', line 308

def get_desktop_environment; end

#get_endiannessWx::Endianness Also known as: endianness

Returns the endianness ID of this Wx::PlatformInfo instance.

Returns:



230
# File 'lib/wx/doc/gen/platform_info.rb', line 230

def get_endianness; end

#get_endianness_nameString Also known as: endianness_name

Returns the name for the endianness of this Wx::PlatformInfo instance.

Returns:

  • (String)


342
# File 'lib/wx/doc/gen/platform_info.rb', line 342

def get_endianness_name; end

#get_linux_distribution_infoWx::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.



301
# File 'lib/wx/doc/gen/platform_info.rb', line 301

def get_linux_distribution_info; end

#get_native_cpu_architecture_nameString Also known as: native_cpu_architecture_name

Returns the native CPU architecture name, if available.



248
# File 'lib/wx/doc/gen/platform_info.rb', line 248

def get_native_cpu_architecture_name; end

#get_operating_system_descriptionString 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.

Returns:

  • (String)


289
# File 'lib/wx/doc/gen/platform_info.rb', line 289

def get_operating_system_description; end

#get_operating_system_family_nameString Also known as: operating_system_family_name

Returns the operating system family name of the OS associated with this Wx::PlatformInfo instance.

Returns:

  • (String)


347
# File 'lib/wx/doc/gen/platform_info.rb', line 347

def get_operating_system_family_name; end

#get_operating_system_idWx::OperatingSystemId Also known as: operating_system_id

Returns the operating system ID of this Wx::PlatformInfo instance.

See get_os_version for more info.



282
# File 'lib/wx/doc/gen/platform_info.rb', line 282

def get_operating_system_id; end

#get_operating_system_id_nameString Also known as: operating_system_id_name

Returns the operating system name of the OS associated with this Wx::PlatformInfo instance.

Returns:

  • (String)


352
# File 'lib/wx/doc/gen/platform_info.rb', line 352

def get_operating_system_id_name; end

#get_os_major_versionInteger Also known as: os_major_version

Returns the run-time major version of the OS associated with this Wx::PlatformInfo instance.

Returns:

  • (Integer)

See Also:



257
# File 'lib/wx/doc/gen/platform_info.rb', line 257

def get_os_major_version; end

#get_os_micro_versionInteger Also known as: os_micro_version

Returns the run-time micro version of the OS associated with this Wx::PlatformInfo instance.

Returns:

  • (Integer)

See Also:



275
# File 'lib/wx/doc/gen/platform_info.rb', line 275

def get_os_micro_version; end

#get_os_minor_versionInteger Also known as: os_minor_version

Returns the run-time minor version of the OS associated with this Wx::PlatformInfo instance.

Returns:

  • (Integer)

See Also:



266
# File 'lib/wx/doc/gen/platform_info.rb', line 266

def get_os_minor_version; end

#get_port_idWx::PortId Also known as: port_id

Returns the wxWidgets port ID associated with this Wx::PlatformInfo instance.

Returns:



294
# File 'lib/wx/doc/gen/platform_info.rb', line 294

def get_port_id; end

#get_port_id_nameString Also known as: port_id_name

Returns the name of the wxWidgets port ID associated with this Wx::PlatformInfo instance.

Returns:

  • (String)


357
# File 'lib/wx/doc/gen/platform_info.rb', line 357

def get_port_id_name; end

#get_port_id_short_nameString Also known as: port_id_short_name

Returns the short name of the wxWidgets port ID associated with this Wx::PlatformInfo instance.

Returns:

  • (String)


362
# File 'lib/wx/doc/gen/platform_info.rb', line 362

def get_port_id_short_name; end

#get_toolkit_major_versionInteger 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.

Returns:

  • (Integer)

See Also:



316
# File 'lib/wx/doc/gen/platform_info.rb', line 316

def get_toolkit_major_version; end

#get_toolkit_micro_versionInteger 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.

Returns:

  • (Integer)

See Also:



332
# File 'lib/wx/doc/gen/platform_info.rb', line 332

def get_toolkit_micro_version; end

#get_toolkit_minor_versionInteger 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.

Returns:

  • (Integer)

See Also:



324
# File 'lib/wx/doc/gen/platform_info.rb', line 324

def get_toolkit_minor_version; end

#is_okBoolean Also known as: ok?

Returns true if this instance is fully initialized with valid values.

Returns:

  • (Boolean)


399
# File 'lib/wx/doc/gen/platform_info.rb', line 399

def is_ok; end

#is_using_universal_widgetsBoolean Also known as: using_universal_widgets?

Returns true if this Wx::PlatformInfo describes Universal build.

Returns:

  • (Boolean)


404
# File 'lib/wx/doc/gen/platform_info.rb', line 404

def is_using_universal_widgets; end