Sha256: 1ee5adc34af7a8cd11856188fe8054eb68b4630cbeea3d699e69f522101583c4

Contents?: true

Size: 605 Bytes

Versions: 16

Compression:

Stored size: 605 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

16 entries across 16 versions & 1 rubygems

Version Path
gir_ffi-0.9.2 lib/ffi-gobject_introspection/i_function_info.rb
gir_ffi-0.9.1 lib/ffi-gobject_introspection/i_function_info.rb
gir_ffi-0.9.0 lib/ffi-gobject_introspection/i_function_info.rb
gir_ffi-0.8.6 lib/ffi-gobject_introspection/i_function_info.rb
gir_ffi-0.8.5 lib/ffi-gobject_introspection/i_function_info.rb
gir_ffi-0.8.4 lib/ffi-gobject_introspection/i_function_info.rb
gir_ffi-0.8.3 lib/ffi-gobject_introspection/i_function_info.rb
gir_ffi-0.8.2 lib/ffi-gobject_introspection/i_function_info.rb
gir_ffi-0.8.1 lib/ffi-gobject_introspection/i_function_info.rb
gir_ffi-0.8.0 lib/ffi-gobject_introspection/i_function_info.rb
gir_ffi-0.7.10 lib/ffi-gobject_introspection/i_function_info.rb
gir_ffi-0.7.9 lib/ffi-gobject_introspection/i_function_info.rb
gir_ffi-0.7.8 lib/ffi-gobject_introspection/i_function_info.rb
gir_ffi-0.7.7 lib/ffi-gobject_introspection/i_function_info.rb
gir_ffi-0.7.6 lib/ffi-gobject_introspection/i_function_info.rb
gir_ffi-0.7.5 lib/ffi-gobject_introspection/i_function_info.rb