Sha256: 6b681c60dbca249d37eddac66e8fb73604b43649119fd91f4386a95841b05c9e

Contents?: true

Size: 598 Bytes

Versions: 4

Compression:

Stored size: 598 Bytes

Contents

module GObjectIntrospection
  # Wraps a GIFunctionInfo struct.
  # Represents a function or method.
  class IFunctionInfo < ICallableInfo
    def symbol
      Lib.g_function_info_get_symbol @gobj
    end
    def flags
      Lib.g_function_info_get_flags @gobj
    end

    #TODO: Use some sort of bitfield
    def method?
      flags & 1 != 0
    end
    def constructor?
      flags & 2 != 0
    end
    def getter?
      flags & 4 != 0
    end
    def setter?
      flags & 8 != 0
    end
    def wraps_vfunc?
      flags & 16 != 0
    end
    def throws?
      flags & 32 != 0
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
gir_ffi-0.7.4 lib/ffi-gobject_introspection/i_function_info.rb
gir_ffi-0.7.3 lib/ffi-gobject_introspection/i_function_info.rb
gir_ffi-0.7.2 lib/ffi-gobject_introspection/i_function_info.rb
gir_ffi-0.7.1 lib/ffi-gobject_introspection/i_function_info.rb