Sha256: d62c377a9c30b6ba122f1d3de8fcec96193f9ee29f45e154b6ce4231bb23416f

Contents?: true

Size: 903 Bytes

Versions: 3

Compression:

Stored size: 903 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 self
    end

    def tag
      Lib.g_type_info_get_tag self
    end

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

    def interface
      ptr = Lib.g_type_info_get_interface self
      IRepository.wrap_ibaseinfo_pointer ptr
    end

    def array_length
      Lib.g_type_info_get_array_length self
    end

    def array_fixed_size
      Lib.g_type_info_get_array_fixed_size self
    end

    def array_type
      Lib.g_type_info_get_array_type self
    end

    def zero_terminated?
      Lib.g_type_info_is_zero_terminated self
    end

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
gir_ffi-0.14.1 lib/ffi-gobject_introspection/i_type_info.rb
gir_ffi-0.14.0 lib/ffi-gobject_introspection/i_type_info.rb
gir_ffi-0.13.1 lib/ffi-gobject_introspection/i_type_info.rb