aboutsummaryrefslogtreecommitdiffstats
path: root/src/xterm.h
diff options
context:
space:
mode:
authorPaul Eggert2013-05-09 07:49:56 -0700
committerPaul Eggert2013-05-09 07:49:56 -0700
commit7583e2a0e23b20ecd29fa0e308e710bde4873ea4 (patch)
tree9081dd49133c3f6f0a7f2e56f66f5c2876442fb4 /src/xterm.h
parent59c886717271b57d661027685d203a3dd5cfafa7 (diff)
downloademacs-7583e2a0e23b20ecd29fa0e308e710bde4873ea4.tar.gz
emacs-7583e2a0e23b20ecd29fa0e308e710bde4873ea4.zip
* xterm.h (GTK_PREREQ): Remove, replacing with GTK_CHECK_VERSION.
(GTK_CHECK_VERSION): New macro, if not already defined. All uses of GTK_PREREQ, GTK_MAJOR_VERSION, etc. replaced by GTK_CHECK_VERSION.
Diffstat (limited to 'src/xterm.h')
-rw-r--r--src/xterm.h22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/xterm.h b/src/xterm.h
index 7722372ce6b..4a5ebc66370 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -43,10 +43,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
43typedef Widget xt_or_gtk_widget; 43typedef Widget xt_or_gtk_widget;
44#endif 44#endif
45 45
46/* True iff GTK's version is at least MAJOR.MINOR. */
47#define GTK_PREREQ(major, minor) \
48 ((major) < GTK_MAJOR_VERSION + ((minor) <= GTK_MINOR_VERSION))
49
50#ifdef USE_GTK 46#ifdef USE_GTK
51#include <gtk/gtk.h> 47#include <gtk/gtk.h>
52#include <gdk/gdkx.h> 48#include <gdk/gdkx.h>
@@ -57,14 +53,26 @@ typedef GtkWidget *xt_or_gtk_widget;
57#undef XSync 53#undef XSync
58#define XSync(d, b) do { gdk_window_process_all_updates (); \ 54#define XSync(d, b) do { gdk_window_process_all_updates (); \
59 XSync (d, b); } while (0) 55 XSync (d, b); } while (0)
56#endif /* USE_GTK */
57
58/* True iff GTK's version is at least I.J.K. */
59#ifndef GTK_CHECK_VERSION
60# ifdef USE_GTK
61# define GTK_CHECK_VERSION(i, j, k) \
62 ((i) \
63 < GTK_MAJOR_VERSION + ((j) \
64 < GTK_MINOR_VERSION + ((k) \
65 <= GTK_MICRO_VERSION)))
66# else
67# define GTK_CHECK_VERSION(i, j, k) 0
68# endif
69#endif
60 70
61/* The GtkTooltip API came in 2.12, but gtk-enable-tooltips in 2.14. */ 71/* The GtkTooltip API came in 2.12, but gtk-enable-tooltips in 2.14. */
62#if GTK_PREREQ (2, 14) 72#if GTK_CHECK_VERSION (2, 14, 0)
63#define USE_GTK_TOOLTIP 73#define USE_GTK_TOOLTIP
64#endif 74#endif
65 75
66#endif /* USE_GTK */
67
68 76
69/* Bookkeeping to distinguish X versions. */ 77/* Bookkeeping to distinguish X versions. */
70 78