Sha256: 69b58210c55c33cf3c2940b81816a11cc67a5f2124ec06cca96133618bead799

Contents?: true

Size: 822 Bytes

Versions: 6

Compression:

Stored size: 822 Bytes

Contents

# frozen_string_literal: true

module GObjectIntrospection
  # Wraps a GIUnionInfo struct.
  # Represents a union.
  class IUnionInfo < IRegisteredTypeInfo
    def n_fields
      Lib.g_union_info_get_n_fields @gobj
    end

    def field(index)
      IFieldInfo.wrap Lib.g_union_info_get_field(@gobj, index)
    end

    ##
    build_array_method :fields

    def get_n_methods
      Lib.g_union_info_get_n_methods @gobj
    end

    def get_method(index)
      IFunctionInfo.wrap Lib.g_union_info_get_method(@gobj, index)
    end

    ##
    build_array_method :get_methods

    def find_method(name)
      IFunctionInfo.wrap Lib.g_union_info_find_method(@gobj, name.to_s)
    end

    def size
      Lib.g_union_info_get_size @gobj
    end

    def alignment
      Lib.g_union_info_get_alignment @gobj
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
gir_ffi-0.13.0 lib/ffi-gobject_introspection/i_union_info.rb
gir_ffi-0.12.1 lib/ffi-gobject_introspection/i_union_info.rb
gir_ffi-0.12.0 lib/ffi-gobject_introspection/i_union_info.rb
gir_ffi-0.11.4 lib/ffi-gobject_introspection/i_union_info.rb
gir_ffi-0.11.3 lib/ffi-gobject_introspection/i_union_info.rb
gir_ffi-0.11.2 lib/ffi-gobject_introspection/i_union_info.rb