Sha256: 973dce41a9b929e4591e0cea03938ee9f2af699a3989076262484c27f0a61754

Contents?: true

Size: 778 Bytes

Versions: 3

Compression:

Stored size: 778 Bytes

Contents

module GirFFI
  # 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

    def n_methods; Lib.g_struct_info_get_n_methods @gobj; end
    def method(index); IFunctionInfo.wrap(Lib.g_struct_info_get_method @gobj, index); end

    ##
    build_array_method :methods

    def find_method(name); IFunctionInfo.wrap(Lib.g_struct_info_find_method @gobj, name); end
    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

3 entries across 3 versions & 1 rubygems

Version Path
gir_ffi-0.0.3 lib/gir_ffi/i_struct_info.rb
gir_ffi-0.0.2 lib/gir_ffi/i_struct_info.rb
gir_ffi-0.0.1 lib/gir_ffi/i_struct_info.rb