Sha256: efa51f34fa53e5ab3fd7ee2b8a27202af3c291c14dbbda27697a531287513a60

Contents?: true

Size: 910 Bytes

Versions: 9

Compression:

Stored size: 910 Bytes

Contents

# frozen_string_literal: true
module GObjectIntrospection
  # Wraps a GITypeInfo struct.
  # Represents type information, direction, transfer etc.
  class ITypeInfo < IBaseInfo
    def pointer?
      Lib.g_type_info_is_pointer @gobj
    end

    def tag
      Lib.g_type_info_get_tag @gobj
    end

    def param_type(index)
      ITypeInfo.wrap Lib.g_type_info_get_param_type(@gobj, index)
    end

    def interface
      ptr = Lib.g_type_info_get_interface @gobj
      IRepository.wrap_ibaseinfo_pointer ptr
    end

    def array_length
      Lib.g_type_info_get_array_length @gobj
    end

    def array_fixed_size
      Lib.g_type_info_get_array_fixed_size @gobj
    end

    def array_type
      Lib.g_type_info_get_array_type @gobj
    end

    def zero_terminated?
      Lib.g_type_info_is_zero_terminated @gobj
    end

    def name
      raise 'Should not call this for ITypeInfo'
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
gir_ffi-0.11.1 lib/ffi-gobject_introspection/i_type_info.rb
gir_ffi-0.11.0 lib/ffi-gobject_introspection/i_type_info.rb
gir_ffi-0.10.2 lib/ffi-gobject_introspection/i_type_info.rb
gir_ffi-0.10.1 lib/ffi-gobject_introspection/i_type_info.rb
gir_ffi-0.10.0 lib/ffi-gobject_introspection/i_type_info.rb
gir_ffi-0.10.0.pre1 lib/ffi-gobject_introspection/i_type_info.rb
gir_ffi-0.9.5 lib/ffi-gobject_introspection/i_type_info.rb
gir_ffi-0.9.4 lib/ffi-gobject_introspection/i_type_info.rb
gir_ffi-0.9.3 lib/ffi-gobject_introspection/i_type_info.rb