summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCamil Staps2019-10-25 08:49:36 +0200
committerCamil Staps2019-10-25 08:49:36 +0200
commit8d8d249e3983d4ce070f317f1957ad42d59052df (patch)
tree02075c317c329b23caf7fc0a6a839f84bb882f7c /src
parentAdd hide function for widgets and ptr instances for GtkFrame and GtkTextBuffer (diff)
Add tune instance for GSignalHandler (convenience)
Diffstat (limited to 'src')
-rw-r--r--src/Gtk/Signal.dcl1
-rw-r--r--src/Gtk/Signal.icl4
2 files changed, 5 insertions, 0 deletions
diff --git a/src/Gtk/Signal.dcl b/src/Gtk/Signal.dcl
index 571aeff..225cda2 100644
--- a/src/Gtk/Signal.dcl
+++ b/src/Gtk/Signal.dcl
@@ -27,6 +27,7 @@ instance signalHandler GSignalHandler
installSignalHandler :: !h !w -> GtkM w | signalHandler h & gtkWidget w
instance tune w SignalHandler | gtkWidget w
+instance tune w GSignalHandler | gtkWidget w
saveState :: GtkM ()
retrieveState :: GtkM GtkState
diff --git a/src/Gtk/Signal.icl b/src/Gtk/Signal.icl
index 55aca6d..6780ae9 100644
--- a/src/Gtk/Signal.icl
+++ b/src/Gtk/Signal.icl
@@ -45,6 +45,10 @@ instance tune w SignalHandler | gtkWidget w
where
tune (SignalHandler handler) widget = installSignalHandler handler widget
+instance tune w GSignalHandler | gtkWidget w
+where
+ tune 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