Class: GirFFI::ObjectBase
- Defined in:
- lib/gir_ffi/object_base.rb
Overview
Base class for all generated classes of type :object.
Instance Attribute Summary
Attributes inherited from ClassBase
Class Method Summary collapse
- .copy_value_to_pointer(value, pointer, offset = 0) ⇒ Object
-
.find_property(name) ⇒ GObjectIntrospection::IPropertyInfo
Find property info for the named property.
-
.find_signal(name) ⇒ GObjectIntrospection::ISignalInfo
Find signal info for the named signal.
- .object_class ⇒ Object
- .to_ffitype ⇒ Object
-
.wrap(ptr) ⇒ Object
Wrap the passed pointer in an instance of its type’s corresponding class, generally assumed to be a descendant of the current type.
Methods inherited from ClassBase
#==, _allocate, constructor_wrap, direct_wrap, from, #setup_and_call, setup_and_call, setup_instance_method, setup_method, try_in_ancestors
Methods included from RegisteredTypeBase
Methods included from TypeBase
Class Method Details
.copy_value_to_pointer(value, pointer, offset = 0) ⇒ Object
36 37 38 |
# File 'lib/gir_ffi/object_base.rb', line 36 def self.copy_value_to_pointer value, pointer, offset = 0 pointer.put_pointer offset, value.to_ptr end |
.find_property(name) ⇒ GObjectIntrospection::IPropertyInfo
Find property info for the named property.
17 18 19 |
# File 'lib/gir_ffi/object_base.rb', line 17 def self.find_property name gir_ffi_builder.find_property name end |
.find_signal(name) ⇒ GObjectIntrospection::ISignalInfo
Find signal info for the named signal.
28 29 30 |
# File 'lib/gir_ffi/object_base.rb', line 28 def self.find_signal name gir_ffi_builder.find_signal name end |
.object_class ⇒ Object
40 41 42 |
# File 'lib/gir_ffi/object_base.rb', line 40 def self.object_class gir_ffi_builder.object_class end |
.to_ffitype ⇒ Object
32 33 34 |
# File 'lib/gir_ffi/object_base.rb', line 32 def self.to_ffitype :pointer end |
.wrap(ptr) ⇒ Object
Wrap the passed pointer in an instance of its type’s corresponding class, generally assumed to be a descendant of the current type.
6 7 8 |
# File 'lib/gir_ffi/object_base.rb', line 6 def self.wrap ptr ptr.to_object end |