Sha256: 08354e77cd4136dd5700537bdfd2c627c9c3bb390c011830678d09fd591ceaf3

Contents?: true

Size: 573 Bytes

Versions: 11

Compression:

Stored size: 573 Bytes

Contents

module GirFFI
  # Wraps a GIFunctioInfo struct.
  # Represents a function.
  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

11 entries across 11 versions & 1 rubygems

Version Path
gir_ffi-0.0.14 lib/gir_ffi/i_function_info.rb
gir_ffi-0.0.13 lib/gir_ffi/i_function_info.rb
gir_ffi-0.0.12 lib/gir_ffi/i_function_info.rb
gir_ffi-0.0.11 lib/gir_ffi/i_function_info.rb
gir_ffi-0.0.10 lib/gir_ffi/i_function_info.rb
gir_ffi-0.0.9 lib/gir_ffi/i_function_info.rb
gir_ffi-0.0.8 lib/gir_ffi/i_function_info.rb
gir_ffi-0.0.7 lib/gir_ffi/i_function_info.rb
gir_ffi-0.0.6 lib/gir_ffi/i_function_info.rb
gir_ffi-0.0.5 lib/gir_ffi/i_function_info.rb
gir_ffi-0.0.4 lib/gir_ffi/i_function_info.rb