Class: GirFFI::StructBase

Inherits:
ClassBase show all
Extended by:
FFI::DataConverter
Includes:
StructLikeBase
Defined in:
lib/gir_ffi/struct_base.rb

Overview

Base class for generated classes representing GLib structs.

Direct Known Subclasses

BoxedBase

Constant Summary

Constants inherited from ClassBase

ClassBase::GIR_FFI_BUILDER

Instance Attribute Summary

Attributes inherited from ClassBase

#struct

Instance Method Summary collapse

Methods included from StructLikeBase

included

Methods inherited from ClassBase

#==, direct_wrap, from, #setup_and_call, setup_and_call, setup_instance_method, setup_method, to_ffi_type, try_in_ancestors, wrap

Methods included from RegisteredTypeBase

#gtype

Methods included from TypeBase

#gir_ffi_builder, #gir_info

Constructor Details

#initializeStructBase

Returns a new instance of StructBase.



10
11
12
13
14
# File 'lib/gir_ffi/struct_base.rb', line 10

def initialize
  @struct = self.class::Struct.new
  @struct.owned = true
  @struct.to_ptr.autorelease = false
end