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)


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

def self.get_operating_system_directory; end

.instanceWx::PlatformInfo

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

Returns:



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.

Parameters:

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

Returns:

  • (Boolean)

See Also:



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.

Parameters:

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

Returns:

  • (Boolean)

See Also:



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

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:



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

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)


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

def get_bitness_name; end

#get_cpu_architecture_nameString 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_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)


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

def get_desktop_environment; end

#get_endiannessWx::Endianness Also known as: endianness

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

Returns:



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

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)


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

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.



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

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.



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

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)


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

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)


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

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.



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

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)


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

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:



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

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:



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

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:



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

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:



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

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)


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

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)


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

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:



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

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:



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

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:



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

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)


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

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)


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

def is_using_universal_widgets; end