Sha256: b5cf91fef78f640b7ff86226f0cd0a6db27a19aadf443807e49ce44bea15e071

Contents?: true

Size: 837 Bytes

Versions: 13

Compression:

Stored size: 837 Bytes

Contents

# frozen_string_literal: true

module GObjectIntrospection
  # Wraps a GIEnumInfo struct if it represents an enum.
  # If it represents a flag, an IFlagsInfo object is used instead.
  class IEnumInfo < IRegisteredTypeInfo
    def n_values
      Lib.g_enum_info_get_n_values self
    end

    def value(index)
      IValueInfo.wrap Lib.g_enum_info_get_value(self, index)
    end
    ##
    build_array_method :values
    build_finder_method :find_value, :n_values, :value

    def get_n_methods
      Lib.g_enum_info_get_n_methods self
    end

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

    ##
    build_array_method :get_methods
    build_finder_method :find_method, :get_n_methods, :get_method

    def storage_type
      Lib.g_enum_info_get_storage_type self
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

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