summaryrefslogtreecommitdiff
path: root/src/xterm.h
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2013-05-09 07:49:56 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2013-05-09 07:49:56 -0700
commit7583e2a0e23b20ecd29fa0e308e710bde4873ea4 (patch)
tree9081dd49133c3f6f0a7f2e56f66f5c2876442fb4 /src/xterm.h
parent59c886717271b57d661027685d203a3dd5cfafa7 (diff)
downloademacs-7583e2a0e23b20ecd29fa0e308e710bde4873ea4.tar.gz
* 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/>. */
typedef Widget xt_or_gtk_widget;
#endif
-/* True iff GTK's version is at least MAJOR.MINOR. */
-#define GTK_PREREQ(major, minor) \
- ((major) < GTK_MAJOR_VERSION + ((minor) <= GTK_MINOR_VERSION))
-
#ifdef USE_GTK
#include <gtk/gtk.h>
#include <gdk/gdkx.h>
@@ -57,14 +53,26 @@ typedef GtkWidget *xt_or_gtk_widget;
#undef XSync
#define XSync(d, b) do { gdk_window_process_all_updates (); \
XSync (d, b); } while (0)
+#endif /* USE_GTK */
+
+/* True iff GTK's version is at least I.J.K. */
+#ifndef GTK_CHECK_VERSION
+# ifdef USE_GTK
+# define GTK_CHECK_VERSION(i, j, k) \
+ ((i) \
+ < GTK_MAJOR_VERSION + ((j) \
+ < GTK_MINOR_VERSION + ((k) \
+ <= GTK_MICRO_VERSION)))
+# else
+# define GTK_CHECK_VERSION(i, j, k) 0
+# endif
+#endif
/* The GtkTooltip API came in 2.12, but gtk-enable-tooltips in 2.14. */
-#if GTK_PREREQ (2, 14)
+#if GTK_CHECK_VERSION (2, 14, 0)
#define USE_GTK_TOOLTIP
#endif
-#endif /* USE_GTK */
-
/* Bookkeeping to distinguish X versions. */