class GLib::Variant

Overrides for GVariant, GLib's variant data type.

Public Class Methods

wrap_copy(val) click to toggle source

For variants, wrap_copy does not do any copying.

# File lib/ffi-glib/variant.rb, line 30
def self.wrap_copy(val)
  wrap(val)
end

Public Instance Methods

get_string()
Also aliased as: get_string_without_override
get_string_with_override() click to toggle source
# File lib/ffi-glib/variant.rb, line 10
def get_string_with_override
  get_string_without_override.first
end
Also aliased as: get_string
get_string_without_override()
Alias for: get_string
store_pointer(ptr) click to toggle source

Initializing method used in constructors. For Variant, this needs to sink the variant's floating reference.

NOTE: This is very hard to test since it is not possible to get the variant's ref count directely. However, there is an error when running the tests on 32-bit systems.

Calls superclass method
# File lib/ffi-glib/variant.rb, line 24
def store_pointer(ptr)
  Lib.g_variant_ref_sink ptr
  super
end