Sha256: 28c1d5a6f067331abf07bdb6fc60be125366ee31310992df8dd39f28887e8a02
Contents?: true
Size: 982 Bytes
Versions: 22
Compression:
Stored size: 982 Bytes
Contents
# frozen_string_literal: true module GirFFI # Represents a signal not found in the GIR, conforming, as needed, to the # interface of GObjectIntrospection::ISignalInfo. class UnintrospectableSignalInfo attr_reader :signal_id def initialize(signal_id) @signal_id = signal_id end def name GObject.signal_name signal_id end def wrap_in_closure(&block) GObject::RubyClosure.new(&block) end def arguments_to_gvalues(instance, arguments) param_gtypes = signal_query.param_types || [] argument_gvalues = param_gtypes.zip(arguments).map do |gtype, arg| GObject::Value.for_gtype(gtype).tap { |it| it.set_value arg } end argument_gvalues.unshift GObject::Value.wrap_instance(instance) end def gvalue_for_return_value GObject::Value.for_gtype signal_query.return_type end private def signal_query @signal_query ||= GObject.signal_query signal_id end end end
Version data entries
22 entries across 22 versions & 1 rubygems