Sha256: c361ced97b7aba4b2a60ee7b6c559f41ae54af8c52bc4652b92039b309a3fb7c

Contents?: true

Size: 949 Bytes

Versions: 6

Compression:

Stored size: 949 Bytes

Contents

module GObjectIntrospection
  # Wraps a GIStructInfo struct.
  # Represents a struct.
  class IStructInfo < IRegisteredTypeInfo
    def n_fields
      Lib.g_struct_info_get_n_fields @gobj
    end
    def field(index)
      IFieldInfo.wrap(Lib.g_struct_info_get_field @gobj, index)
    end

    ##
    build_array_method :fields
    build_finder_method :find_field

    def get_n_methods
      Lib.g_struct_info_get_n_methods @gobj
    end
    def get_method(index)
      IFunctionInfo.wrap(Lib.g_struct_info_get_method @gobj, index)
    end

    ##
    build_array_method :get_methods
    # There is a function g_object_info_find_method but it causes a core dump.
    build_finder_method :find_method, :get_n_methods, :get_method

    def size
      Lib.g_struct_info_get_size @gobj
    end

    def alignment
      Lib.g_struct_info_get_alignment @gobj
    end

    def gtype_struct?
      Lib.g_struct_info_is_gtype_struct @gobj
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
gir_ffi-0.7.4 lib/ffi-gobject_introspection/i_struct_info.rb
gir_ffi-0.7.3 lib/ffi-gobject_introspection/i_struct_info.rb
gir_ffi-0.7.2 lib/ffi-gobject_introspection/i_struct_info.rb
gir_ffi-0.7.1 lib/ffi-gobject_introspection/i_struct_info.rb
gir_ffi-0.7.0 lib/ffi-gobject_introspection/i_struct_info.rb
gir_ffi-0.6.7 lib/ffi-gobject_introspection/i_struct_info.rb