Class: GirFFI::Builders::UnintrospectableBuilder
- Inherits:
-
ObjectBuilder
- Object
- GirFFI::BaseTypeBuilder
- RegisteredTypeBuilder
- ObjectBuilder
- GirFFI::Builders::UnintrospectableBuilder
- Defined in:
- lib/gir_ffi/builders/unintrospectable_builder.rb
Overview
Implements the creation of a class representing an object type for which no data is found in the GIR. Typically, these are created to cast objects returned by a function that returns an interface.
Instance Attribute Summary
Attributes inherited from GirFFI::BaseTypeBuilder
Instance Method Summary collapse
- #find_signal(signal_name) ⇒ Object
- #klass ⇒ Object
- #setup_class ⇒ Object
- #setup_instance_method(_method) ⇒ Object
Methods inherited from ObjectBuilder
#ancestor_infos, #class_struct_class, #eligible_properties, #find_property
Methods included from WithLayout
Methods inherited from RegisteredTypeBuilder
Methods inherited from GirFFI::BaseTypeBuilder
#build_class, #initialize, #instantiate_class
Methods included from GirFFI::BuilderHelper
#get_or_define_class, #get_or_define_module, #optionally_define_constant
Constructor Details
This class inherits a constructor from GirFFI::BaseTypeBuilder
Instance Method Details
#find_signal(signal_name) ⇒ Object
26 27 28 29 30 31 32 33 34 |
# File 'lib/gir_ffi/builders/unintrospectable_builder.rb', line 26 def find_signal(signal_name) info = super return info if info signal_id = GObject.signal_lookup signal_name, target_gtype return if signal_id == 0 UnintrospectableSignalInfo.new(signal_id) end |
#klass ⇒ Object
12 13 14 |
# File 'lib/gir_ffi/builders/unintrospectable_builder.rb', line 12 def klass @klass ||= TypeBuilder::CACHE[target_gtype] ||= Class.new(superclass) end |
#setup_class ⇒ Object
16 17 18 19 20 |
# File 'lib/gir_ffi/builders/unintrospectable_builder.rb', line 16 def setup_class setup_constants setup_layout setup_interfaces end |
#setup_instance_method(_method) ⇒ Object
22 23 24 |
# File 'lib/gir_ffi/builders/unintrospectable_builder.rb', line 22 def setup_instance_method(_method) false end |