module GirFFI::InterfaceBase
Base module for modules representing GLib
interfaces.
Public Instance Methods
Source
# File lib/gir_ffi/interface_base.rb, line 22 def copy_value_to_pointer(value, pointer, offset = 0) pointer.put_pointer offset, value.to_ptr end
TODO: Unify with implementation in ObjectBase
Source
# File lib/gir_ffi/interface_base.rb, line 14 def setup_and_call(method, arguments, &) method_name = setup_method method.to_s raise NoMethodError, "undefined method `#{method}' for #{self}" unless method_name send(method_name, *arguments, &) end
Source
# File lib/gir_ffi/interface_base.rb, line 34 def to_callback_ffi_type :pointer end