diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-02-23 17:14:37 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-02-23 17:14:37 +0100 |
commit | 9892189d2e7ab94b750f99e6da4cbfc3c8014517 (patch) | |
tree | 18634bacebb9e922feceff40c924cdc48550d7ac /src/if_mzsch.c | |
parent | 6bd364e08461159ad3c153ffba4def5b896486a1 (diff) | |
download | vim-9892189d2e7ab94b750f99e6da4cbfc3c8014517.zip |
patch 7.4.1402
Problem: GTK 3 is not supported.
Solution: Add GTK 3 support. (Kazunobu Kuriyama)
Diffstat (limited to 'src/if_mzsch.c')
-rw-r--r-- | src/if_mzsch.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/if_mzsch.c b/src/if_mzsch.c index 0a3c201f3..4be3c7201 100644 --- a/src/if_mzsch.c +++ b/src/if_mzsch.c @@ -852,7 +852,11 @@ static int mz_threads_allow = 0; static void CALLBACK timer_proc(HWND, UINT, UINT, DWORD); static UINT timer_id = 0; #elif defined(FEAT_GUI_GTK) +# if GTK_CHECK_VERSION(3,0,0) +static gboolean timer_proc(gpointer); +# else static gint timer_proc(gpointer); +# endif static guint timer_id = 0; #elif defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) static void timer_proc(XtPointer, XtIntervalId *); @@ -892,7 +896,11 @@ static void remove_timer(void); static void CALLBACK timer_proc(HWND hwnd UNUSED, UINT uMsg UNUSED, UINT idEvent UNUSED, DWORD dwTime UNUSED) # elif defined(FEAT_GUI_GTK) +# if GTK_CHECK_VERSION(3,0,0) + static gboolean +# else static gint +# endif timer_proc(gpointer data UNUSED) # elif defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) static void @@ -919,7 +927,11 @@ setup_timer(void) # if defined(FEAT_GUI_W32) timer_id = SetTimer(NULL, 0, p_mzq, timer_proc); # elif defined(FEAT_GUI_GTK) +# if GTK_CHECK_VERSION(3,0,0) + timer_id = g_timeout_add((guint)p_mzq, (GSourceFunc)timer_proc, NULL); +# else timer_id = gtk_timeout_add((guint32)p_mzq, (GtkFunction)timer_proc, NULL); +# endif # elif defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) timer_id = XtAppAddTimeOut(app_context, p_mzq, timer_proc, NULL); # elif defined(FEAT_GUI_MAC) @@ -935,7 +947,11 @@ remove_timer(void) # if defined(FEAT_GUI_W32) KillTimer(NULL, timer_id); # elif defined(FEAT_GUI_GTK) +# if GTK_CHECK_VERSION(3,0,0) + g_source_remove(timer_id); +# else gtk_timeout_remove(timer_id); +# endif # elif defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA) XtRemoveTimeOut(timer_id); # elif defined(FEAT_GUI_MAC) |