module GirFFI::FFIExt::Pointer

Public Instance Methods

to_object() click to toggle source
# File lib/gir_ffi/ffi_ext/pointer.rb, line 12
def to_object
  gtype = GObject.type_from_instance_pointer self
  wrap_by_gtype gtype
end
to_ptr() click to toggle source
# File lib/gir_ffi/ffi_ext/pointer.rb, line 4
def to_ptr
  self
end
to_utf8() click to toggle source
# File lib/gir_ffi/ffi_ext/pointer.rb, line 24
def to_utf8
  null? ? nil : read_string
end
to_value() click to toggle source
# File lib/gir_ffi/ffi_ext/pointer.rb, line 8
def to_value
  self
end
wrap_by_gtype(gtype) click to toggle source
# File lib/gir_ffi/ffi_ext/pointer.rb, line 17
def wrap_by_gtype gtype
  return nil if self.null?
  klass = Builder.build_by_gtype gtype
  klass.direct_wrap self
end