Class: GirFFI::BoxedBase

Inherits:
StructLikeBase show all
Defined in:
lib/gir_ffi/boxed_base.rb

Overview

Base class for generated classes representing boxed types.

Constant Summary

Constants inherited from ClassBase

ClassBase::GIR_FFI_BUILDER

Instance Attribute Summary

Attributes inherited from ClassBase

#struct

Class Method Summary collapse

Methods inherited from StructLikeBase

copy_from, copy_value_to_pointer, get_value_from_pointer, #initialize, native_type, size, to_ffi_type, to_native, wrap_copy, wrap_own

Methods inherited from ClassBase

#==, direct_wrap, from, #setup_and_call, setup_and_call, to_callback_ffi_type, to_ffi_type, try_in_ancestors, wrap

Methods included from RegisteredTypeBase

#gtype

Methods included from TypeBase

#gir_ffi_builder, #gir_info

Methods included from MethodSetup

#setup_method, #setup_method!

Methods included from InstanceMethodSetup

#setup_instance_method, #setup_instance_method!

Constructor Details

This class inherits a constructor from GirFFI::StructLikeBase

Class Method Details

.copy(val) ⇒ Object



12
13
14
15
# File 'lib/gir_ffi/boxed_base.rb', line 12

def self.copy(val)
  ptr = GObject.boxed_copy(gtype, val)
  wrap(ptr)
end

.make_finalizer(struct) ⇒ Object



8
9
10
# File 'lib/gir_ffi/boxed_base.rb', line 8

def self.make_finalizer(struct)
  proc { finalize(struct) }
end