Add attributes for allowing use of accumulators on signals
@dlech
Submitted by David Lechner Link to original bug (#735243)
Description
GObject signals have a feature called accumulators that is currently not usable by vala. I would like to propose that we add CCode attributes to make it usable. My use case it that I would like to be able to use g_signal_accumulator_true_handled. My current workaround is to add
Signal.stop_emission_by_name (text_entry, "key-pressed");
to my signal handler, which is messy and easy to forget to do and prone to errors if you change the name of the signal.
Instead, I would like to be able to write
[CCode (accumulator = "g_signal_accumulator_true_handled")] public signal bool key_pressed (uint key_code);
and have this automatically taken care of.