diff options
author | Camil Staps | 2019-10-25 09:00:24 +0200 |
---|---|---|
committer | Camil Staps | 2019-10-25 09:00:24 +0200 |
commit | 1937e3368754d792ef4f9580b97b910b46d890bc (patch) | |
tree | e4a1d21873e20a5a9c324dd15329ad8b534948d7 /src/Gtk/Signal.dcl | |
parent | Add tune instance for GSignalHandler (convenience) (diff) |
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)
Diffstat (limited to 'src/Gtk/Signal.dcl')
-rw-r--r-- | src/Gtk/Signal.dcl | 4 |
1 files changed, 4 insertions, 0 deletions
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 |