[perl-Gtk3] Add Gtk3::EVENT_PROPAGATE and Gtk3::EVENT_STOP
- From: Torsten SchÃnfeld <tsch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [perl-Gtk3] Add Gtk3::EVENT_PROPAGATE and Gtk3::EVENT_STOP
- Date: Tue, 8 Jan 2013 22:11:39 +0000 (UTC)
commit 6de0240ca61dc9da8215ee5ed0d2c142cb6de383
Author: Torsten SchÃnfeld <kaffeetisch gmx de>
Date: Tue Jan 8 22:44:57 2013 +0100
Add Gtk3::EVENT_PROPAGATE and Gtk3::EVENT_STOP
NEWS | 1 +
lib/Gtk3.pm | 13 +++++++++++++
2 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/NEWS b/NEWS
index 6715910..067daee 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,7 @@
{{$NEXT}}
* Add overrides for Gtk3::Container.
+* Add Gtk3::EVENT_PROPAGATE and Gtk3::EVENT_STOP.
* Test that no double-frees occur for custom Gtk3::Widget subclasses.
Overview of changes in Gtk3 0.008 [2012-08-26]
diff --git a/lib/Gtk3.pm b/lib/Gtk3.pm
index 63eb53d..ee886bd 100644
--- a/lib/Gtk3.pm
+++ b/lib/Gtk3.pm
@@ -205,6 +205,19 @@ sub Gtk3::check_version {
@_ == 4 ? @_[1..3] : @_);
}
+# Names "STOP" and "PROPAGATE" here are per the GtkWidget event signal
+# descriptions. In some other flavours of signals the jargon is "handled"
+# instead of "stop". "Handled" matches g_signal_accumulator_true_handled(),
+# though that function doesn't rate a mention in the Gtk docs. There's
+# nothing fixed in the idea of "true means cease emission" (whether it's
+# called "stop" or "handled"). You can just as easily have false for cease
+# (the way the underlying GSignalAccumulator func in fact operates). The
+# upshot being don't want to attempt to be too universal with the names
+# here; "EVENT" is meant to hint at the context or signal flavour they're
+# for use with.
+sub Gtk3::EVENT_PROPAGATE() { !1 };
+sub Gtk3::EVENT_STOP() { 1 };
+
sub Gtk3::init {
my $rest = Glib::Object::Introspection->invoke (
$_GTK_BASENAME, undef, 'init',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]