class GirFFI::UserDefinedObjectInfo
Represents a user defined type, conforming, as needed, to the interface of GObjectIntrospection::IObjectInfo
.
Attributes
g_name[W]
properties[R]
vfunc_implementations[R]
Public Class Methods
new(klass)
click to toggle source
# File lib/gir_ffi/user_defined_object_info.rb, line 12 def initialize(klass) @klass = klass @properties = [] @vfunc_implementations = [] end
Public Instance Methods
abstract?()
click to toggle source
# File lib/gir_ffi/user_defined_object_info.rb, line 63 def abstract? false end
class_struct()
click to toggle source
TODO: Create custom class that includes the interfaces instead
# File lib/gir_ffi/user_defined_object_info.rb, line 51 def class_struct nil end
described_class()
click to toggle source
# File lib/gir_ffi/user_defined_object_info.rb, line 18 def described_class @klass end
find_instance_method(_method)
click to toggle source
# File lib/gir_ffi/user_defined_object_info.rb, line 34 def find_instance_method(_method) nil end
find_method(_method)
click to toggle source
# File lib/gir_ffi/user_defined_object_info.rb, line 30 def find_method(_method) nil end
find_property(_property)
click to toggle source
# File lib/gir_ffi/user_defined_object_info.rb, line 38 def find_property(_property) nil end
find_signal(_signal_name)
click to toggle source
# File lib/gir_ffi/user_defined_object_info.rb, line 59 def find_signal(_signal_name) nil end
g_name()
click to toggle source
# File lib/gir_ffi/user_defined_object_info.rb, line 69 def g_name @g_name ||= @klass.name end
install_property(param_spec)
click to toggle source
# 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)
click to toggle source
# 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()
click to toggle source
# 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()
click to toggle source
# File lib/gir_ffi/user_defined_object_info.rb, line 46 def parent @parent ||= gir.find_by_gtype(parent_gtype.to_i) end
parent_gtype()
click to toggle source
# File lib/gir_ffi/user_defined_object_info.rb, line 42 def parent_gtype @parent_gtype ||= GType.new(@klass.superclass.gtype) end
Private Instance Methods
gir()
click to toggle source
# File lib/gir_ffi/user_defined_object_info.rb, line 75 def gir @gir ||= GObjectIntrospection::IRepository.default end