# :stopdoc: # This file is automatically generated by the WXRuby3 documentation # generator. Do not alter this file. # :startdoc: module Wx # The following are the operating systems which are recognized by wxWidgets and whose version can be detected at run-time. # # The values of the constants are chosen so that they can be combined as flags; this allows checking for operating system families like e.g. {Wx::OperatingSystemId::OS_MAC} and {Wx::OperatingSystemId::OS_UNIX}. # Note that you can obtain more detailed information about the current OS version in use by checking the major, minor, and micro version numbers returned by {get_os_version} or by {Wx::PlatformInfo#get_os_major_version}, {Wx::PlatformInfo#get_os_minor_version}, and {Wx::PlatformInfo#get_os_micro_version}. # class OperatingSystemId < Wx::Enum # Returned on error. # OS_UNKNOWN = Wx::OperatingSystemId.new(0) # Apple Mac OS 8/9/X with Mac paths. # OS_MAC_OS = Wx::OperatingSystemId.new(1) # Apple macOS with Unix paths. # OS_MAC_OSX_DARWIN = Wx::OperatingSystemId.new(2) # A combination of all wxOS_MAC_* values previously listed. # OS_MAC = Wx::OperatingSystemId.new(3) # Windows NT family (XP/Vista/7/8/10/11) # OS_WINDOWS_NT = Wx::OperatingSystemId.new(8) # Any Windows system, currently can be only {Wx::OperatingSystemId::OS_WINDOWS_NT}. # OS_WINDOWS = Wx::OperatingSystemId.new(60) # Linux. # OS_UNIX_LINUX = Wx::OperatingSystemId.new(64) # FreeBSD. # OS_UNIX_FREEBSD = Wx::OperatingSystemId.new(128) # OpenBSD. # OS_UNIX_OPENBSD = Wx::OperatingSystemId.new(256) # NetBSD. # OS_UNIX_NETBSD = Wx::OperatingSystemId.new(512) # SunOS. # OS_UNIX_SOLARIS = Wx::OperatingSystemId.new(1024) # AIX. # OS_UNIX_AIX = Wx::OperatingSystemId.new(2048) # HP/UX. # OS_UNIX_HPUX = Wx::OperatingSystemId.new(4096) # A combination of all wxOS_UNIX_* values previously listed. # OS_UNIX = Wx::OperatingSystemId.new(8128) end # OperatingSystemId # The list of wxWidgets ports. # # Some of them can be used with more than a single (native) toolkit. # class PortId < Wx::Enum # returned on error # PORT_UNKNOWN = Wx::PortId.new(0) # {Wx::Base}, no native toolkit used # PORT_BASE = Wx::PortId.new(1) # {Wx::MSW}, native toolkit is Windows API # PORT_MSW = Wx::PortId.new(2) # {Wx::Motif}, using [Open]Motif or Lesstif # PORT_MOTIF = Wx::PortId.new(4) # {Wx::GTK}, using GTK+ 1.x, 2.x, 3.x, GPE # PORT_GTK = Wx::PortId.new(8) # {Wx::DFB}, using {Wx::Universal} # PORT_DFB = Wx::PortId.new(16) # {Wx::X11}, using {Wx::Universal} # PORT_X11 = Wx::PortId.new(32) # {Wx::Mac}, using Carbon or Classic Mac API # PORT_MAC = Wx::PortId.new(128) # {Wx::Cocoa}, using Cocoa NextStep/Mac API # PORT_COCOA = Wx::PortId.new(256) # {Wx::QT}, using Qt 5+ # PORT_QT = Wx::PortId.new(1024) end # PortId # The architecture bitness of the operating system (regardless of the build environment of wxWidgets library - see {is_platform64bit} documentation for more info). # # # class Bitness < Wx::Enum # returned on error # BITNESS_INVALID = Wx::Bitness.new(-1) # 32 bit # BITNESS_32 = Wx::Bitness.new(0) # 64 bit # BITNESS_64 = Wx::Bitness.new(1) # # BITNESS_MAX = Wx::Bitness.new(2) end # Bitness # The endian-ness of the machine. # # # class Endianness < Wx::Enum # returned on error # ENDIAN_INVALID = Wx::Endianness.new(-1) # 4321 # ENDIAN_BIG = Wx::Endianness.new(0) # 1234 # ENDIAN_LITTLE = Wx::Endianness.new(1) # 3412 # ENDIAN_PDP = Wx::Endianness.new(2) # # ENDIAN_MAX = Wx::Endianness.new(3) end # Endianness # Returns true only for MSW programs running under Wine. # This function can be used to check for some functionality not implemented when using Wine. # # === # # Category: Application and System configuration # @return [true,false] def self.is_running_under_wine; end # 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 {Wx::PlatformInfo} instance (using its setters) the signature of the system which generated it. # In general however you only need to use the static {Wx::PlatformInfo.get} function and then access the various information for the current platform: # # wxLogMessage("This application is running under %s.", # wxPlatformInfo::Get().GetOperatingSystemIdName()); # # === # # Category: Application and System configuration # @see get_os_version # @see is_platform_little_endian # @see is_platform64bit # @see Wx::AppTraits # @see Network # @see User and OS # # class PlatformInfo < ::Object # Returns the architecture bitness ID of this {Wx::PlatformInfo} instance. # @return [Bitness] def get_bitness; end alias_method :bitness, :get_bitness # Returns the endianness ID of this {Wx::PlatformInfo} instance. # @return [Endianness] def get_endianness; end alias_method :endianness, :get_endianness # Returns the CPU architecture name, if available. # # @see get_cpu_architecture_name # @see Wx::PlatformInfo#get_native_cpu_architecture_name # @return [String] def get_cpu_architecture_name; end alias_method :cpu_architecture_name, :get_cpu_architecture_name # Returns the native CPU architecture name, if available. # # @see get_native_cpu_architecture_name # @see Wx::PlatformInfo#get_cpu_architecture_name # @return [String] def get_native_cpu_architecture_name; end alias_method :native_cpu_architecture_name, :get_native_cpu_architecture_name # Returns the run-time major version of the OS associated with this {Wx::PlatformInfo} instance. # # @see get_os_version # @see Wx::PlatformInfo#check_os_version # @return [Integer] def get_os_major_version; end alias_method :os_major_version, :get_os_major_version # Returns the run-time minor version of the OS associated with this {Wx::PlatformInfo} instance. # # @see get_os_version # @see Wx::PlatformInfo#check_os_version # @return [Integer] def get_os_minor_version; end alias_method :os_minor_version, :get_os_minor_version # Returns the run-time micro version of the OS associated with this {Wx::PlatformInfo} instance. # # @see get_os_version # @see Wx::PlatformInfo#check_os_version # @return [Integer] def get_os_micro_version; end alias_method :os_micro_version, :get_os_micro_version # Returns the operating system ID of this {Wx::PlatformInfo} instance. # See {get_os_version} for more info. # @return [OperatingSystemId] def get_operating_system_id; end alias_method :operating_system_id, :get_operating_system_id # Returns the description of the operating system of this {Wx::PlatformInfo} instance. # See {get_os_description} for more info. # @return [String] def get_operating_system_description; end alias_method :operating_system_description, :get_operating_system_description # Returns the wxWidgets port ID associated with this {Wx::PlatformInfo} instance. # @return [PortId] def get_port_id; end alias_method :port_id, :get_port_id # Returns the Linux distribution info associated with this {Wx::PlatformInfo} instance. # See {get_linux_distribution_info} for more info. # @return [Wx::LinuxDistributionInfo] def get_linux_distribution_info; end alias_method :linux_distribution_info, :get_linux_distribution_info # Returns the desktop environment associated with this {Wx::PlatformInfo} instance. # See Wx::AppTraits#get_desktop_environment for more info. # @return [String] def get_desktop_environment; end alias_method :desktop_environment, :get_desktop_environment # Returns the run-time major version of the toolkit associated with this {Wx::PlatformInfo} instance. # Note that if {Wx::PlatformInfo#get_port_id} returns {Wx::PortId::PORT_BASE}, then this value is zero (unless externally modified with {Wx::PlatformInfo#set_toolkit_version}); that is, no native toolkit is in use. See Wx::AppTraits#get_toolkit_version for more info. # @see Wx::PlatformInfo#check_toolkit_version # @return [Integer] def get_toolkit_major_version; end alias_method :toolkit_major_version, :get_toolkit_major_version # Returns the run-time minor version of the toolkit associated with this {Wx::PlatformInfo} instance. # Note that if {Wx::PlatformInfo#get_port_id} returns {Wx::PortId::PORT_BASE}, then this value is zero (unless externally modified with {Wx::PlatformInfo#set_toolkit_version}); that is, no native toolkit is in use. See Wx::AppTraits#get_toolkit_version for more info. # @see Wx::PlatformInfo#check_toolkit_version # @return [Integer] def get_toolkit_minor_version; end alias_method :toolkit_minor_version, :get_toolkit_minor_version # Returns the run-time micro version of the toolkit associated with this {Wx::PlatformInfo} instance. # Note that if {Wx::PlatformInfo#get_port_id} returns {Wx::PortId::PORT_BASE}, then this value is zero (unless externally modified with {Wx::PlatformInfo#set_toolkit_version}); that is, no native toolkit is in use. See Wx::AppTraits#get_toolkit_version for more info. # @see Wx::PlatformInfo#check_toolkit_version # @return [Integer] def get_toolkit_micro_version; end alias_method :toolkit_micro_version, :get_toolkit_micro_version # Returns the name for the architecture bitness of this {Wx::PlatformInfo} instance. # @return [String] def get_bitness_name; end alias_method :bitness_name, :get_bitness_name # Returns the name for the endianness of this {Wx::PlatformInfo} instance. # @return [String] def get_endianness_name; end alias_method :endianness_name, :get_endianness_name # Returns the operating system family name of the OS associated with this {Wx::PlatformInfo} instance. # @return [String] def get_operating_system_family_name; end alias_method :operating_system_family_name, :get_operating_system_family_name # Returns the operating system name of the OS associated with this {Wx::PlatformInfo} instance. # @return [String] def get_operating_system_id_name; end alias_method :operating_system_id_name, :get_operating_system_id_name # Returns the name of the wxWidgets port ID associated with this {Wx::PlatformInfo} instance. # @return [String] def get_port_id_name; end alias_method :port_id_name, :get_port_id_name # Returns the short name of the wxWidgets port ID associated with this {Wx::PlatformInfo} instance. # @return [String] def get_port_id_short_name; end alias_method :port_id_short_name, :get_port_id_short_name # Returns the operating system directory. # See {get_os_directory} for more info. # @return [String] def self.get_operating_system_directory; end # Returns true if the OS version is at least major.minor.micro. # # @see Wx::PlatformInfo#get_os_major_version # @see Wx::PlatformInfo#get_os_minor_version # @see Wx::PlatformInfo#get_os_micro_version # @see Wx::PlatformInfo#check_toolkit_version # @param major [Integer] # @param minor [Integer] # @param micro [Integer] # @return [true,false] def check_os_version(major, minor, micro=0) end # Returns true if the toolkit version is at least major.minor.micro. # # @see Wx::PlatformInfo#get_toolkit_major_version # @see Wx::PlatformInfo#get_toolkit_minor_version # @see Wx::PlatformInfo#get_toolkit_micro_version # @see Wx::PlatformInfo#check_os_version # @param major [Integer] # @param minor [Integer] # @param micro [Integer] # @return [true,false] def check_toolkit_version(major, minor, micro=0) end # Returns true if this instance is fully initialized with valid values. # @return [true,false] def is_ok; end alias_method :ok?, :is_ok # Returns true if this {Wx::PlatformInfo} describes {Wx::Universal} build. # @return [true,false] def is_using_universal_widgets; end alias_method :using_universal_widgets?, :is_using_universal_widgets # Returns the global {Wx::PlatformInfo} object, initialized with the values for the currently running platform. # @return [Wx::PlatformInfo] def self.instance; end end # PlatformInfo end