Class: GirFFI::UserDefinedTypeInfo
- Inherits:
-
Object
- Object
- GirFFI::UserDefinedTypeInfo
- Defined in:
- lib/gir_ffi/user_defined_type_info.rb
Overview
Represents a user defined type, conforming, as needed, to the interface of GObjectIntrospection::IObjectInfo. TODO: Rename to UserDefinedObjectInfo
Instance Attribute Summary collapse
- #g_name ⇒ Object
-
#properties ⇒ Object
readonly
Returns the value of attribute properties.
-
#vfunc_implementations ⇒ Object
readonly
Returns the value of attribute vfunc_implementations.
Instance Method Summary collapse
-
#class_struct ⇒ Object
TODO: Create custom class that includes the interfaces instead.
- #described_class ⇒ Object
- #find_instance_method(_method) ⇒ Object
- #find_method(_method) ⇒ Object
-
#initialize(klass) {|_self| ... } ⇒ UserDefinedTypeInfo
constructor
A new instance of UserDefinedTypeInfo.
- #install_property(property) ⇒ Object
- #install_vfunc_implementation(name, implementation) ⇒ Object
- #parent ⇒ Object
- #parent_gtype ⇒ Object
Constructor Details
#initialize(klass) {|_self| ... } ⇒ UserDefinedTypeInfo
Returns a new instance of UserDefinedTypeInfo.
11 12 13 14 15 16 |
# File 'lib/gir_ffi/user_defined_type_info.rb', line 11 def initialize(klass) @klass = klass @properties = [] @vfunc_implementations = [] yield self if block_given? end |
Instance Attribute Details
#g_name ⇒ Object
53 54 55 |
# File 'lib/gir_ffi/user_defined_type_info.rb', line 53 def g_name @g_name ||= @klass.name end |
#properties ⇒ Object (readonly)
Returns the value of attribute properties.
9 10 11 |
# File 'lib/gir_ffi/user_defined_type_info.rb', line 9 def properties @properties end |
#vfunc_implementations ⇒ Object (readonly)
Returns the value of attribute vfunc_implementations.
9 10 11 |
# File 'lib/gir_ffi/user_defined_type_info.rb', line 9 def vfunc_implementations @vfunc_implementations end |
Instance Method Details
#class_struct ⇒ Object
TODO: Create custom class that includes the interfaces instead
47 48 49 |
# File 'lib/gir_ffi/user_defined_type_info.rb', line 47 def class_struct parent.class_struct end |
#described_class ⇒ Object
18 19 20 |
# File 'lib/gir_ffi/user_defined_type_info.rb', line 18 def described_class @klass end |
#find_instance_method(_method) ⇒ Object
34 35 36 |
# File 'lib/gir_ffi/user_defined_type_info.rb', line 34 def find_instance_method(_method) nil end |
#find_method(_method) ⇒ Object
30 31 32 |
# File 'lib/gir_ffi/user_defined_type_info.rb', line 30 def find_method(_method) nil end |
#install_property(property) ⇒ Object
22 23 24 |
# File 'lib/gir_ffi/user_defined_type_info.rb', line 22 def install_property(property) @properties << UserDefinedPropertyInfo.new(property) end |
#install_vfunc_implementation(name, implementation) ⇒ Object
26 27 28 |
# File 'lib/gir_ffi/user_defined_type_info.rb', line 26 def install_vfunc_implementation(name, implementation) @vfunc_implementations << VFuncImplementation.new(name, implementation) end |
#parent ⇒ Object
42 43 44 |
# File 'lib/gir_ffi/user_defined_type_info.rb', line 42 def parent @parent ||= gir.find_by_gtype(parent_gtype.to_i) end |
#parent_gtype ⇒ Object
38 39 40 |
# File 'lib/gir_ffi/user_defined_type_info.rb', line 38 def parent_gtype @parent_gtype ||= GType.new(@klass.superclass.gtype) end |