Class: GirFFI::BoxedBase
- Inherits:
-
StructBase
- Object
- ClassBase
- StructBase
- GirFFI::BoxedBase
- Defined in:
- lib/gir_ffi/boxed_base.rb
Overview
Base class for generated classes representing boxed types.
Constant Summary
Constants inherited from ClassBase
Instance Attribute Summary
Attributes inherited from ClassBase
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ BoxedBase
constructor
A new instance of BoxedBase.
Methods included from StructLikeBase
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
Methods included from TypeBase
Methods included from MethodSetup
Methods included from InstanceMethodSetup
#setup_instance_method, #setup_instance_method!
Constructor Details
#initialize ⇒ BoxedBase
Returns a new instance of BoxedBase.
8 9 10 |
# File 'lib/gir_ffi/boxed_base.rb', line 8 def initialize store_pointer(nil) end |
Class Method Details
.copy(val) ⇒ Object
21 22 23 24 |
# File 'lib/gir_ffi/boxed_base.rb', line 21 def self.copy(val) ptr = GObject.boxed_copy(gtype, val) wrap(ptr) end |
.make_finalizer(struct) ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/gir_ffi/boxed_base.rb', line 12 def self.make_finalizer(struct) proc do if struct.owned? struct.owned = nil GObject.boxed_free gtype, struct.to_ptr end end end |