class PlatformAvailability
Represents platform availability information for a cursor.
Definitions
def initialize(memory_pointer)
Initialize platform availability from a memory pointer.
Signature
-
parameter
memory_pointerFFI::MemoryPointer The memory pointer.
Implementation
def initialize(memory_pointer)
pointer = FFI::Pointer.new(memory_pointer)
super(pointer)
# I'm not sure this is safe.
# Keep a reference to CXPlatformAvailability itself allocated by MemoryPointer.
@memory_pointer = memory_pointer
@platform_availability = Lib::CXPlatformAvailability.new(memory_pointer)
end
def self.release(pointer)
Release the platform availability pointer.
Signature
-
parameter
pointerFFI::Pointer The pointer to release.
Implementation
def self.release(pointer)
# Memory allocated by get_cursor_platform_availability is managed by AutoPointer.
Lib.dispose_platform_availability(Lib::CXPlatformAvailability.new(pointer))
end
def platform
Get the platform name.
Signature
-
returns
String The platform name.
Implementation
def platform
Lib.get_string @platform_availability[:platform]
end
def platform
Get the platform name.
Signature
-
returns
String The platform name.
Implementation
def platform
Lib.get_string @platform_availability[:platform]
end
def introduced
Get the version where the feature was introduced.
Signature
-
returns
Lib::CXVersion The introduced version.
Implementation
def introduced
@platform_availability[:introduced]
end
def deprecated
Get the version where the feature was deprecated.
Signature
-
returns
Lib::CXVersion The deprecated version.
Implementation
def deprecated
@platform_availability[:deprecated]
end
def obsoleted
Get the version where the feature was obsoleted.
Signature
-
returns
Lib::CXVersion The obsoleted version.
Implementation
def obsoleted
@platform_availability[:obsoleted]
end
def message
Get the availability message.
Signature
-
returns
String The availability message.
Implementation
def message
Lib.get_string @platform_availability[:message]
end