class GirFFI::ObjectBase

Base class for all generated classes of type :object.

Public Class Methods

copy_value_to_pointer(value, pointer, offset = 0) click to toggle source
# File lib/gir_ffi/object_base.rb, line 24
def self.copy_value_to_pointer(value, pointer, offset = 0)
  pointer.put_pointer offset, value.to_ptr
end
find_property(name) click to toggle source

Find property info for the named property.

@param name The property's name

@return [GObjectIntrospection::IPropertyInfo] The property's info

# File lib/gir_ffi/object_base.rb, line 41
def self.find_property(name)
  gir_ffi_builder.find_property name
end
find_signal(name) click to toggle source

Find signal info for the named signal.

@param name The signal's name

@return [GObjectIntrospection::ISignalInfo] The signal's info

# File lib/gir_ffi/object_base.rb, line 52
def self.find_signal(name)
  gir_ffi_builder.find_signal name
end
get_value_from_pointer(pointer, offset = 0) click to toggle source
# File lib/gir_ffi/object_base.rb, line 20
def self.get_value_from_pointer(pointer, offset = 0)
  pointer.get_pointer offset
end
native_type() click to toggle source
# File lib/gir_ffi/object_base.rb, line 8
def self.native_type
  FFI::Type::POINTER
end
object_class() click to toggle source
# File lib/gir_ffi/object_base.rb, line 56
def self.object_class
  gir_ffi_builder.object_class
end
to_ffi_type() click to toggle source
# File lib/gir_ffi/object_base.rb, line 12
def self.to_ffi_type
  self
end
to_native(it, _) click to toggle source
# File lib/gir_ffi/object_base.rb, line 16
def self.to_native(it, _)
  it.to_ptr
end
wrap(ptr) click to toggle source

Wrap the passed pointer in an instance of its type's corresponding class, generally assumed to be a descendant of the current type.

# File lib/gir_ffi/object_base.rb, line 30
def self.wrap(ptr)
  ptr.to_object
end