Class: GirFFI::UnintrospectableTypeInfo
- Inherits:
-
Object
- Object
- GirFFI::UnintrospectableTypeInfo
- Defined in:
- lib/gir_ffi/unintrospectable_type_info.rb
Overview
Represents a type not found in the GIR, conforming, as needed, to the interface of GObjectIntrospection::IObjectInfo.
Instance Attribute Summary collapse
-
#g_type ⇒ Object
readonly
Returns the value of attribute g_type.
Instance Method Summary collapse
-
#class_struct ⇒ Object
TODO: Create custom class that includes the interfaces instead.
- #fields ⇒ Object
- #find_property(_any) ⇒ Object
- #find_signal(_any) ⇒ Object
- #info_type ⇒ Object
-
#initialize(gtype, gir = GObjectIntrospection::IRepository.default, gobject = GObject) ⇒ UnintrospectableTypeInfo
constructor
A new instance of UnintrospectableTypeInfo.
- #interfaces ⇒ Object
- #namespace ⇒ Object
- #parent ⇒ Object
- #parent_gtype ⇒ Object
- #safe_name ⇒ Object
Constructor Details
#initialize(gtype, gir = GObjectIntrospection::IRepository.default, gobject = GObject) ⇒ UnintrospectableTypeInfo
Returns a new instance of UnintrospectableTypeInfo.
11 12 13 14 15 16 17 |
# File 'lib/gir_ffi/unintrospectable_type_info.rb', line 11 def initialize(gtype, gir = GObjectIntrospection::IRepository.default, gobject = GObject) @g_type = gtype @gir = gir @gobject = gobject end |
Instance Attribute Details
#g_type ⇒ Object (readonly)
Returns the value of attribute g_type.
9 10 11 |
# File 'lib/gir_ffi/unintrospectable_type_info.rb', line 9 def g_type @g_type end |
Instance Method Details
#class_struct ⇒ Object
TODO: Create custom class that includes the interfaces instead
58 59 60 |
# File 'lib/gir_ffi/unintrospectable_type_info.rb', line 58 def class_struct nil end |
#fields ⇒ Object
45 46 47 |
# File 'lib/gir_ffi/unintrospectable_type_info.rb', line 45 def fields [] end |
#find_property(_any) ⇒ Object
49 50 51 |
# File 'lib/gir_ffi/unintrospectable_type_info.rb', line 49 def find_property(_any) nil end |
#find_signal(_any) ⇒ Object
53 54 55 |
# File 'lib/gir_ffi/unintrospectable_type_info.rb', line 53 def find_signal(_any) nil end |
#info_type ⇒ Object
19 20 21 |
# File 'lib/gir_ffi/unintrospectable_type_info.rb', line 19 def info_type :unintrospectable end |
#interfaces ⇒ Object
39 40 41 42 43 |
# File 'lib/gir_ffi/unintrospectable_type_info.rb', line 39 def interfaces @gobject.type_interfaces(@g_type).filter_map do |gtype| @gir.find_by_gtype gtype end end |
#namespace ⇒ Object
35 36 37 |
# File 'lib/gir_ffi/unintrospectable_type_info.rb', line 35 def namespace parent.namespace end |
#parent ⇒ Object
27 28 29 |
# File 'lib/gir_ffi/unintrospectable_type_info.rb', line 27 def parent @gir.find_by_gtype(parent_gtype) || self.class.new(parent_gtype, @gir, @gobject) end |
#parent_gtype ⇒ Object
31 32 33 |
# File 'lib/gir_ffi/unintrospectable_type_info.rb', line 31 def parent_gtype @parent_gtype ||= @gobject.type_parent @g_type end |
#safe_name ⇒ Object
23 24 25 |
# File 'lib/gir_ffi/unintrospectable_type_info.rb', line 23 def safe_name @gobject.type_name @g_type end |