Class: GObjectIntrospection::IObjectInfo

Inherits:
IRegisteredTypeInfo show all
Defined in:
lib/ffi-gobject_introspection/i_object_info.rb

Overview

Wraps a GIObjectInfo struct. Represents an object.

Instance Attribute Summary

Attributes inherited from IBaseInfo

#pointer

Instance Method Summary collapse

Methods inherited from IRegisteredTypeInfo

#g_type

Methods included from GirFFI::InfoExt::FullTypeName

#full_name

Methods included from GirFFI::InfoExt::SafeConstantName

#safe_name

Methods included from GirFFI::InfoExt::IRegisteredTypeInfo

#find_instance_method, #to_callback_ffi_type, #to_ffi_type, #to_type

Methods inherited from IBaseInfo

#==, #attribute, build_array_method, build_finder_method, #container, #deprecated?, #info_type, #initialize, make_finalizer, #name, #namespace, #safe_namespace, #to_ptr, wrap

Constructor Details

This class inherits a constructor from GObjectIntrospection::IBaseInfo

Instance Method Details

#abstract?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/ffi-gobject_introspection/i_object_info.rb', line 15

def abstract?
  Lib.g_object_info_get_abstract self
end

#class_structObject



117
118
119
# File 'lib/ffi-gobject_introspection/i_object_info.rb', line 117

def class_struct
  IStructInfo.wrap Lib.g_object_info_get_class_struct(self)
end

#constant(index) ⇒ Object



111
112
113
# File 'lib/ffi-gobject_introspection/i_object_info.rb', line 111

def constant(index)
  IConstantInfo.wrap Lib.g_object_info_get_constant(self, index)
end

#field(index) ⇒ Object



42
43
44
# File 'lib/ffi-gobject_introspection/i_object_info.rb', line 42

def field(index)
  IFieldInfo.wrap Lib.g_object_info_get_field(self, index)
end

#find_method(name) ⇒ Object



77
78
79
# File 'lib/ffi-gobject_introspection/i_object_info.rb', line 77

def find_method(name)
  IFunctionInfo.wrap Lib.g_object_info_find_method(self, name.to_s)
end

#find_property(name) ⇒ Object



61
62
63
64
# File 'lib/ffi-gobject_introspection/i_object_info.rb', line 61

def find_property(name)
  name = name.to_s.tr("_", "-")
  properties.find { |prop| prop.name == name }
end

#find_vfunc(name) ⇒ Object



101
102
103
# File 'lib/ffi-gobject_introspection/i_object_info.rb', line 101

def find_vfunc(name)
  IVFuncInfo.wrap Lib.g_object_info_find_vfunc(self, name.to_s)
end

#fundamental?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/ffi-gobject_introspection/i_object_info.rb', line 19

def fundamental?
  Lib.g_object_info_get_fundamental self
end

#get_method(index) ⇒ Object



70
71
72
# File 'lib/ffi-gobject_introspection/i_object_info.rb', line 70

def get_method(index)
  IFunctionInfo.wrap Lib.g_object_info_get_method(self, index)
end

#get_n_methodsObject



66
67
68
# File 'lib/ffi-gobject_introspection/i_object_info.rb', line 66

def get_n_methods
  Lib.g_object_info_get_n_methods self
end

#interface(index) ⇒ Object



31
32
33
# File 'lib/ffi-gobject_introspection/i_object_info.rb', line 31

def interface(index)
  IInterfaceInfo.wrap Lib.g_object_info_get_interface(self, index)
end

#n_constantsObject



107
108
109
# File 'lib/ffi-gobject_introspection/i_object_info.rb', line 107

def n_constants
  Lib.g_object_info_get_n_constants self
end

#n_fieldsObject



38
39
40
# File 'lib/ffi-gobject_introspection/i_object_info.rb', line 38

def n_fields
  Lib.g_object_info_get_n_fields self
end

#n_interfacesObject



27
28
29
# File 'lib/ffi-gobject_introspection/i_object_info.rb', line 27

def n_interfaces
  Lib.g_object_info_get_n_interfaces self
end

#n_propertiesObject



49
50
51
# File 'lib/ffi-gobject_introspection/i_object_info.rb', line 49

def n_properties
  Lib.g_object_info_get_n_properties self
end

#n_signalsObject



81
82
83
# File 'lib/ffi-gobject_introspection/i_object_info.rb', line 81

def n_signals
  Lib.g_object_info_get_n_signals self
end

#n_vfuncsObject



93
94
95
# File 'lib/ffi-gobject_introspection/i_object_info.rb', line 93

def n_vfuncs
  Lib.g_object_info_get_n_vfuncs self
end

#parentObject



23
24
25
# File 'lib/ffi-gobject_introspection/i_object_info.rb', line 23

def parent
  @parent ||= IObjectInfo.wrap Lib.g_object_info_get_parent(self)
end

#propertiesObject



57
58
59
# File 'lib/ffi-gobject_introspection/i_object_info.rb', line 57

def properties
  @properties ||= Array.new(n_properties) { |idx| property(idx) }
end

#property(index) ⇒ Object



53
54
55
# File 'lib/ffi-gobject_introspection/i_object_info.rb', line 53

def property(index)
  IPropertyInfo.wrap Lib.g_object_info_get_property(self, index)
end

#signal(index) ⇒ Object



85
86
87
# File 'lib/ffi-gobject_introspection/i_object_info.rb', line 85

def signal(index)
  ISignalInfo.wrap Lib.g_object_info_get_signal(self, index)
end

#type_initObject



11
12
13
# File 'lib/ffi-gobject_introspection/i_object_info.rb', line 11

def type_init
  Lib.g_object_info_get_type_init self
end

#type_nameObject



7
8
9
# File 'lib/ffi-gobject_introspection/i_object_info.rb', line 7

def type_name
  Lib.g_object_info_get_type_name self
end

#vfunc(index) ⇒ Object



97
98
99
# File 'lib/ffi-gobject_introspection/i_object_info.rb', line 97

def vfunc(index)
  IVFuncInfo.wrap Lib.g_object_info_get_vfunc(self, index)
end