Method: RCGTK::FunctionType#argument_types

Defined in:
lib/rcgtk/type.rb

#argument_typesArray<Type> Also known as: arg_types



379
380
381
382
383
384
385
386
387
388
389
390
391
# File 'lib/rcgtk/type.rb', line 379

def argument_types
  @arg_types ||=
  begin
    num_elements = Bindings.count_param_types(@ptr)

    ret_ptr = FFI::MemoryPointer.new(:pointer)
    Bindings.get_param_types(@ptr, ret_ptr)

    types_ptr = ret_ptr.get_pointer(0)

    types_ptr.get_array_of_pointer(0, num_elements).map { |ptr| Type.from_ptr(ptr) }
  end
end