From 1937e3368754d792ef4f9580b97b910b46d890bc Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Fri, 25 Oct 2019 09:00:24 +0200 Subject: Add G modifier to ccalls that may trigger GTK signals (which may cause re-entrance if there is a handler; add withPossibleCallback to save and retrieve state around such calls) --- src/Gtk/Signal.dcl | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/Gtk/Signal.dcl') diff --git a/src/Gtk/Signal.dcl b/src/Gtk/Signal.dcl index 225cda2..d92455e 100644 --- a/src/Gtk/Signal.dcl +++ b/src/Gtk/Signal.dcl @@ -31,4 +31,8 @@ instance tune w GSignalHandler | gtkWidget w saveState :: GtkM () retrieveState :: GtkM GtkState + +//* Wrap functionality in `saveState` and `retrieveState` if it can be re-entrant. +withPossibleCallback :: !(GtkM a) -> GtkM a + handleSignal :: !Int !{#Int} -> Int -- cgit v1.2.3