Sha256: 3bc68b46c90739dabe0ab7f0a69e31f5fda6622b2a42fa75242300433c4be132

Contents?: true

Size: 815 Bytes

Versions: 16

Compression:

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

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

    ##
    build_array_method :fields

    def get_n_methods
      Lib.g_union_info_get_n_methods self
    end

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

    ##
    build_array_method :get_methods

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

    def size
      Lib.g_union_info_get_size self
    end

    def alignment
      Lib.g_union_info_get_alignment self
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
gir_ffi-0.17.0 lib/ffi-gobject_introspection/i_union_info.rb
gir_ffi-0.16.1 lib/ffi-gobject_introspection/i_union_info.rb
gir_ffi-0.16.0 lib/ffi-gobject_introspection/i_union_info.rb
gir_ffi-0.15.9 lib/ffi-gobject_introspection/i_union_info.rb
gir_ffi-0.15.8 lib/ffi-gobject_introspection/i_union_info.rb
gir_ffi-0.15.7 lib/ffi-gobject_introspection/i_union_info.rb
gir_ffi-0.15.6 lib/ffi-gobject_introspection/i_union_info.rb
gir_ffi-0.15.5 lib/ffi-gobject_introspection/i_union_info.rb
gir_ffi-0.15.4 lib/ffi-gobject_introspection/i_union_info.rb
gir_ffi-0.15.3 lib/ffi-gobject_introspection/i_union_info.rb
gir_ffi-0.15.2 lib/ffi-gobject_introspection/i_union_info.rb
gir_ffi-0.15.1 lib/ffi-gobject_introspection/i_union_info.rb
gir_ffi-0.15.0 lib/ffi-gobject_introspection/i_union_info.rb
gir_ffi-0.14.1 lib/ffi-gobject_introspection/i_union_info.rb
gir_ffi-0.14.0 lib/ffi-gobject_introspection/i_union_info.rb
gir_ffi-0.13.1 lib/ffi-gobject_introspection/i_union_info.rb