updated for version 7.0008
diff --git a/src/if_mzsch.c b/src/if_mzsch.c
index 57bc4de..ce3dc83 100644
--- a/src/if_mzsch.c
+++ b/src/if_mzsch.c
@@ -208,10 +208,6 @@
/* MzScheme threads scheduling stuff */
static int mz_threads_allow = 0;
-#ifdef FEAT_GUI
-static void setup_timer(void);
-static void remove_timer(void);
-#endif
#if defined(FEAT_GUI_W32)
static void CALLBACK timer_proc(HWND, UINT, UINT, DWORD);
@@ -226,6 +222,8 @@
pascal void timer_proc(EventLoopTimerRef, void *);
static EventLoopTimerRef timer_id = NULL;
static EventLoopTimerUPP timerUPP;
+#elif defined(FEAT_GUI_KDE)
+static int timer_id = 0;
#endif
#ifndef FEAT_GUI_W32 /* Win32 console and Unix */
@@ -248,7 +246,10 @@
}
#endif
-#ifdef FEAT_GUI
+#ifdef MZSCHEME_GUI_THREADS
+static void setup_timer(void);
+static void remove_timer(void);
+
/* timers are presented in GUI only */
# if defined(FEAT_GUI_W32)
static void CALLBACK
@@ -264,6 +265,9 @@
# elif defined(FEAT_GUI_MAC)
pascal void
timer_proc(EventLoopTimerRef theTimer, void *userData)
+#elif defined(FEAT_GUI_KDE)
+ void
+timer_proc(void)
# endif
{
scheme_check_threads();
@@ -290,6 +294,9 @@
timerUPP = NewEventLoopTimerUPP(timer_proc);
InstallEventLoopTimer(GetMainEventLoop(), p_mzq * kEventDurationMillisecond,
p_mzq * kEventDurationMillisecond, timerUPP, NULL, &timer_id);
+#elif defined(FEAT_GUI_KDE)
+ mzscheme_kde_start_timer();
+ timer_id = 1; /* just signal that timer was started */
# endif
}
@@ -305,6 +312,8 @@
# elif defined(FEAT_GUI_MAC)
RemoveEventLoopTimer(timer_id);
DisposeEventLoopTimerUPP(timerUPP);
+#elif defined(FEAT_GUI_KDE)
+ mzscheme_kde_stop_timer();
# endif
timer_id = 0;
}
@@ -318,13 +327,13 @@
setup_timer();
}
-#endif
+#endif /* MZSCHEME_GUI_THREADS */
static void
notify_multithread(int on)
{
mz_threads_allow = on;
-#ifdef FEAT_GUI
+#ifdef MZSCHEME_GUI_THREADS
if (on && timer_id == 0 && p_mzq > 0 && gui.in_use)
setup_timer();
if (!on && timer_id != 0)