Sha256: 0da88e3083e314a143ec7f35e53ef8c60fa6f1da4fc19157fd25d3ad625f8422

Contents?: true

Size: 569 Bytes

Versions: 13

Compression:

Stored size: 569 Bytes

Contents

# frozen_string_literal: true

GObject.load_class :ParamSpec

module GObject
  # Overrides for GParamSpec, GObject's base class for parameter specifications.
  class ParamSpec
    VALUE_TYPE_OFFSET = Struct.offset_of :value_type
    FLAGS_OFFSET = Struct.offset_of :flags

    def ref
      Lib.g_param_spec_ref self
      self
    end

    def accessor_name
      get_name.tr("-", "_")
    end

    def value_type
      to_ptr.get_gtype(VALUE_TYPE_OFFSET)
    end

    def flags
      GObject::ParamFlags.get_value_from_pointer(to_ptr, FLAGS_OFFSET)
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
gir_ffi-0.17.0 lib/ffi-gobject/param_spec.rb
gir_ffi-0.16.1 lib/ffi-gobject/param_spec.rb
gir_ffi-0.16.0 lib/ffi-gobject/param_spec.rb
gir_ffi-0.15.9 lib/ffi-gobject/param_spec.rb
gir_ffi-0.15.8 lib/ffi-gobject/param_spec.rb
gir_ffi-0.15.7 lib/ffi-gobject/param_spec.rb
gir_ffi-0.15.6 lib/ffi-gobject/param_spec.rb
gir_ffi-0.15.5 lib/ffi-gobject/param_spec.rb
gir_ffi-0.15.4 lib/ffi-gobject/param_spec.rb
gir_ffi-0.15.3 lib/ffi-gobject/param_spec.rb
gir_ffi-0.15.2 lib/ffi-gobject/param_spec.rb
gir_ffi-0.15.1 lib/ffi-gobject/param_spec.rb
gir_ffi-0.15.0 lib/ffi-gobject/param_spec.rb