diff options
author | Bram Moolenaar <Bram@vim.org> | 2004-07-12 15:53:54 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2004-07-12 15:53:54 +0000 |
commit | 2df6dcc596d3c79283ec9efc36425a5564a45ab5 (patch) | |
tree | 1b14d1b80195243117cb68a7c30bf08a1ebc6501 /src/if_mzsch.c | |
parent | 8299df966a58236b31c0028fd7ce799c4ac6e625 (diff) | |
download | vim-git-2df6dcc596d3c79283ec9efc36425a5564a45ab5.tar.gz |
updated for version 7.0008v7.0008
Diffstat (limited to 'src/if_mzsch.c')
-rw-r--r-- | src/if_mzsch.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/src/if_mzsch.c b/src/if_mzsch.c index 57bc4de29..ce3dc8393 100644 --- a/src/if_mzsch.c +++ b/src/if_mzsch.c @@ -208,10 +208,6 @@ static long range_end; /* 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 @@ static XtIntervalId timer_id = (XtIntervalId)0; 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 @@ mzvim_check_threads(void) } #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 @@ timer_proc(XtPointer timed_out, XtIntervalId *interval_id) # 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 @@ setup_timer(void) 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 @@ remove_timer(void) # 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 @@ mzvim_reset_timer(void) 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) |