summaryrefslogtreecommitdiff
path: root/src/Gtk/Signal.icl
diff options
context:
space:
mode:
authorCamil Staps2019-10-23 09:25:57 +0200
committerCamil Staps2019-10-23 09:25:57 +0200
commitdf8cfa2edd72585ac2f002ea11e8736849759ca5 (patch)
tree9b9641ff886a6b2d5560a53a2b88bedcb41abeab /src/Gtk/Signal.icl
parentFix config; remove test (diff)
Add tune instance for signal handlers
Diffstat (limited to 'src/Gtk/Signal.icl')
-rw-r--r--src/Gtk/Signal.icl4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Gtk/Signal.icl b/src/Gtk/Signal.icl
index e51614c..040d6f7 100644
--- a/src/Gtk/Signal.icl
+++ b/src/Gtk/Signal.icl
@@ -36,6 +36,10 @@ installSignalHandler handler widget =
-> g_signal_connect 2 (toPtr (gtkWidget widget)) (signalName handler) id) >>|
pure widget
+instance tune w SignalHandler | gtkWidget w
+where
+ tune (SignalHandler handler) widget = installSignalHandler handler widget
+
// NB: low-level hacking to use and modify the GtkState from within callbacks.
// We use a CAF to keep track of the state. In runGtk, the state is saved with
// saveState. This state is retrieved with retrieveState there (to check