Class: GirFFI::UserDefinedObjectInfo
- Inherits:
-
Object
- Object
- GirFFI::UserDefinedObjectInfo
- Defined in:
- lib/gir_ffi/user_defined_object_info.rb
Overview
Represents a user defined type, conforming, as needed, to the interface of GObjectIntrospection::IObjectInfo.
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
- #abstract? ⇒ Boolean
-
#class_struct ⇒ Object
TODO: Create custom class that includes the interfaces instead.
- #described_class ⇒ Object
- #find_instance_method(_method) ⇒ Object
- #find_method(_method) ⇒ Object
- #find_property(_property) ⇒ Object
- #find_signal(_signal_name) ⇒ Object
-
#initialize(klass) ⇒ UserDefinedObjectInfo
constructor
A new instance of UserDefinedObjectInfo.
- #install_property(param_spec) ⇒ Object
- #install_vfunc_implementation(name, implementation = nil) ⇒ Object
- #interfaces ⇒ Object
- #parent ⇒ Object
- #parent_gtype ⇒ Object
Constructor Details
#initialize(klass) ⇒ UserDefinedObjectInfo
Returns a new instance of UserDefinedObjectInfo.
12 13 14 15 16 |
# File 'lib/gir_ffi/user_defined_object_info.rb', line 12 def initialize(klass) @klass = klass @properties = [] @vfunc_implementations = [] end |
Instance Attribute Details
#g_name ⇒ Object
69 70 71 |
# File 'lib/gir_ffi/user_defined_object_info.rb', line 69 def g_name @g_name ||= @klass.name end |
#properties ⇒ Object (readonly)
Returns the value of attribute properties.
10 11 12 |
# File 'lib/gir_ffi/user_defined_object_info.rb', line 10 def properties @properties end |
#vfunc_implementations ⇒ Object (readonly)
Returns the value of attribute vfunc_implementations.
10 11 12 |
# File 'lib/gir_ffi/user_defined_object_info.rb', line 10 def vfunc_implementations @vfunc_implementations end |
Instance Method Details
#abstract? ⇒ Boolean
63 64 65 |
# File 'lib/gir_ffi/user_defined_object_info.rb', line 63 def abstract? false end |
#class_struct ⇒ Object
TODO: Create custom class that includes the interfaces instead
51 52 53 |
# File 'lib/gir_ffi/user_defined_object_info.rb', line 51 def class_struct nil end |
#described_class ⇒ Object
18 19 20 |
# File 'lib/gir_ffi/user_defined_object_info.rb', line 18 def described_class @klass end |
#find_instance_method(_method) ⇒ Object
34 35 36 |
# File 'lib/gir_ffi/user_defined_object_info.rb', line 34 def find_instance_method(_method) nil end |
#find_method(_method) ⇒ Object
30 31 32 |
# File 'lib/gir_ffi/user_defined_object_info.rb', line 30 def find_method(_method) nil end |
#find_property(_property) ⇒ Object
38 39 40 |
# File 'lib/gir_ffi/user_defined_object_info.rb', line 38 def find_property(_property) nil end |
#find_signal(_signal_name) ⇒ Object
59 60 61 |
# File 'lib/gir_ffi/user_defined_object_info.rb', line 59 def find_signal(_signal_name) nil end |
#install_property(param_spec) ⇒ Object
22 23 24 |
# File 'lib/gir_ffi/user_defined_object_info.rb', line 22 def install_property(param_spec) @properties << param_spec end |
#install_vfunc_implementation(name, implementation = nil) ⇒ Object
26 27 28 |
# File 'lib/gir_ffi/user_defined_object_info.rb', line 26 def install_vfunc_implementation(name, implementation = nil) @vfunc_implementations << VFuncImplementation.new(name, implementation) end |
#interfaces ⇒ Object
55 56 57 |
# File 'lib/gir_ffi/user_defined_object_info.rb', line 55 def interfaces (@klass.included_modules - @klass.superclass.included_modules).map(&:gir_info) end |
#parent ⇒ Object
46 47 48 |
# File 'lib/gir_ffi/user_defined_object_info.rb', line 46 def parent @parent ||= gir.find_by_gtype(parent_gtype.to_i) end |