Sha256: b1485563f25113fd0f3028f2340d5f0cf003793cd1dc9d90835f6b26936dc808

Contents?: true

Size: 554 Bytes

Versions: 3

Compression:

Stored size: 554 Bytes

Contents

# frozen_string_literal: true

module GObjectIntrospection
  # Wraps a GIFieldInfo struct.
  # Represents a field of an IStructInfo or an IUnionInfo.
  class IFieldInfo < IBaseInfo
    def flags
      Lib.g_field_info_get_flags self
    end

    def size
      Lib.g_field_info_get_size self
    end

    def offset
      Lib.g_field_info_get_offset self
    end

    def field_type
      ITypeInfo.wrap Lib.g_field_info_get_type(self)
    end

    def readable?
      flags[:readable]
    end

    def writable?
      flags[:writable]
    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_field_info.rb
gir_ffi-0.14.0 lib/ffi-gobject_introspection/i_field_info.rb
gir_ffi-0.13.1 lib/ffi-gobject_introspection/i_field_info.rb