Class: GirFFI::ObjectBase
- Defined in:
- lib/gir_ffi/object_base.rb
Overview
Base class for all generated classes of type :object.
Class Method Summary collapse
-
.constructor_wrap(ptr) ⇒ Object
Wraps a pointer retrieved from a constructor method.
-
.find_property(name) ⇒ GObjectIntrospection::IPropertyInfo
Find property info for the named property.
-
.find_signal(name) ⇒ GObjectIntrospection::ISignalInfo
Find signal info for the named signal.
-
.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
_builder, _setup_instance_method, _setup_method, allocate, direct_wrap, ffi_structure, from, gir_ffi_builder, gir_info, setup_and_call, #setup_and_call, setup_instance_method, setup_method
Class Method Details
.constructor_wrap(ptr) ⇒ Object
Wraps a pointer retrieved from a constructor method. Here, it is simply defined as a wrapper around direct_wrap, but, e.g., InitiallyUnowned overrides it to sink the floating object.
Unlike wrap, this method assumes the pointer will always be of the type corresponding to the current class, and never of a subtype.
16 17 18 |
# File 'lib/gir_ffi/object_base.rb', line 16 def self.constructor_wrap ptr direct_wrap ptr end |
.find_property(name) ⇒ GObjectIntrospection::IPropertyInfo
Find property info for the named property.
33 34 35 |
# File 'lib/gir_ffi/object_base.rb', line 33 def self.find_property name gir_ffi_builder.find_property name end |
.find_signal(name) ⇒ GObjectIntrospection::ISignalInfo
Find signal info for the named signal.
44 45 46 |
# File 'lib/gir_ffi/object_base.rb', line 44 def self.find_signal name gir_ffi_builder.find_signal name 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.
22 23 24 |
# File 'lib/gir_ffi/object_base.rb', line 22 def self.wrap ptr GirFFI::ArgHelper.object_pointer_to_object ptr end |