Module: GirFFI::FFIExt::Pointer
- Defined in:
- lib/gir_ffi/ffi_ext/pointer.rb
Instance Method Summary collapse
- #to_object ⇒ Object
- #to_ptr ⇒ Object
- #to_utf8 ⇒ Object
- #to_value ⇒ Object
- #wrap_by_gtype(gtype) ⇒ Object
Instance Method Details
#to_object ⇒ Object
12 13 14 15 |
# File 'lib/gir_ffi/ffi_ext/pointer.rb', line 12 def to_object gtype = GObject.type_from_instance_pointer self wrap_by_gtype gtype end |
#to_ptr ⇒ Object
4 5 6 |
# File 'lib/gir_ffi/ffi_ext/pointer.rb', line 4 def to_ptr self end |
#to_utf8 ⇒ Object
24 25 26 |
# File 'lib/gir_ffi/ffi_ext/pointer.rb', line 24 def to_utf8 null? ? nil : read_string end |
#to_value ⇒ Object
8 9 10 |
# File 'lib/gir_ffi/ffi_ext/pointer.rb', line 8 def to_value self end |
#wrap_by_gtype(gtype) ⇒ Object
17 18 19 20 21 |
# File 'lib/gir_ffi/ffi_ext/pointer.rb', line 17 def wrap_by_gtype gtype return nil if self.null? klass = Builder.build_by_gtype gtype klass.direct_wrap self end |