diff options
Diffstat (limited to 'src/Gtk/Signal.icl')
-rw-r--r-- | src/Gtk/Signal.icl | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/Gtk/Signal.icl b/src/Gtk/Signal.icl index 94d6ecd..3ed3bca 100644 --- a/src/Gtk/Signal.icl +++ b/src/Gtk/Signal.icl @@ -132,8 +132,8 @@ addTimeout interval callback = , timeout_counter = id }) >>= \{timeout_counter=id} -> case interval of - Milliseconds ms -> toState (g_timeout_add ms id) - Seconds s -> toState (g_timeout_add_seconds s id) + Milliseconds ms -> toState (g_timeout_add ms get_handleTimeout_address id) + Seconds s -> toState (g_timeout_add_seconds s get_handleTimeout_address id) where wrapped_callback id = callback >>= \r -> @@ -142,6 +142,11 @@ where (modState \st -> {st & timeouts='Data.Map'.del id st.timeouts}) >>| pure r + get_handleTimeout_address :: Pointer + get_handleTimeout_address = code { + pushLc handleTimeout + } + foreign export handleTimeout handleTimeout :: !Int -> Int handleTimeout id |