aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoakim Verona2012-07-08 17:42:57 +0200
committerJoakim Verona2012-07-08 17:42:57 +0200
commit08ab3a852d01cd7a1530657d099cd5066d747dd5 (patch)
tree288661fcfe569491b3a2618d32e83c2470ba576e
parentabef2047941f87ae4baa34b3a8675de4d0068b7a (diff)
downloademacs-08ab3a852d01cd7a1530657d099cd5066d747dd5.tar.gz
emacs-08ab3a852d01cd7a1530657d099cd5066d747dd5.zip
fixes so xwidgets doesnt pollute a non xwidget build
-rw-r--r--lisp/xwidget.el3
-rw-r--r--src/xdisp.c24
-rw-r--r--src/xwidget.c2
3 files changed, 23 insertions, 6 deletions
diff --git a/lisp/xwidget.el b/lisp/xwidget.el
index d90dca3f755..38b404586e6 100644
--- a/lisp/xwidget.el
+++ b/lisp/xwidget.el
@@ -5,7 +5,8 @@
5;;; Commentary: 5;;; Commentary:
6;; 6;;
7 7
8(require 'xwidget-internal) 8;;TODO this breaks compilation when we dont have xwidgets
9;;(require 'xwidget-internal)
9 10
10;;TODO model after make-text-button instead! 11;;TODO model after make-text-button instead!
11;;; Code: 12;;; Code:
diff --git a/src/xdisp.c b/src/xdisp.c
index 87e079f8ab1..c06d822de2f 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -23264,7 +23264,7 @@ compute_overhangs_and_x (struct glyph_string *s, int x, int backward_p)
23264 to allocate glyph strings (because draw_glyphs can be called 23264 to allocate glyph strings (because draw_glyphs can be called
23265 asynchronously). */ 23265 asynchronously). */
23266 23266
23267#define BUILD_GLYPH_STRINGS(START, END, HEAD, TAIL, HL, X, LAST_X) \ 23267#define BUILD_GLYPH_STRINGS_1(START, END, HEAD, TAIL, HL, X, LAST_X) \
23268 do \ 23268 do \
23269 { \ 23269 { \
23270 HEAD = TAIL = NULL; \ 23270 HEAD = TAIL = NULL; \
@@ -23295,13 +23295,15 @@ compute_overhangs_and_x (struct glyph_string *s, int x, int backward_p)
23295 case IMAGE_GLYPH: \ 23295 case IMAGE_GLYPH: \
23296 BUILD_IMAGE_GLYPH_STRING (START, END, HEAD, TAIL, \ 23296 BUILD_IMAGE_GLYPH_STRING (START, END, HEAD, TAIL, \
23297 HL, X, LAST_X); \ 23297 HL, X, LAST_X); \
23298 break; \ 23298 break;
23299
23300#define BUILD_GLYPH_STRINGS_XW(START, END, HEAD, TAIL, HL, X, LAST_X) \
23299 case XWIDGET_GLYPH: \ 23301 case XWIDGET_GLYPH: \
23300 BUILD_XWIDGET_GLYPH_STRING (START, END, HEAD, TAIL, \ 23302 BUILD_XWIDGET_GLYPH_STRING (START, END, HEAD, TAIL, \
23301 HL, X, LAST_X); \ 23303 HL, X, LAST_X); \
23302 break; \ 23304 break;
23303 \ 23305
23304 \ 23306#define BUILD_GLYPH_STRINGS_2(START, END, HEAD, TAIL, HL, X, LAST_X) \
23305 case GLYPHLESS_GLYPH: \ 23307 case GLYPHLESS_GLYPH: \
23306 BUILD_GLYPHLESS_GLYPH_STRING (START, END, HEAD, TAIL, \ 23308 BUILD_GLYPHLESS_GLYPH_STRING (START, END, HEAD, TAIL, \
23307 HL, X, LAST_X); \ 23309 HL, X, LAST_X); \
@@ -23320,6 +23322,18 @@ compute_overhangs_and_x (struct glyph_string *s, int x, int backward_p)
23320 } while (0) 23322 } while (0)
23321 23323
23322 23324
23325#ifdef HAVE_XWIDGETS
23326#define BUILD_GLYPH_STRINGS(START, END, HEAD, TAIL, HL, X, LAST_X) \
23327BUILD_GLYPH_STRINGS_1(START, END, HEAD, TAIL, HL, X, LAST_X) \
23328BUILD_GLYPH_STRINGS_XW(START, END, HEAD, TAIL, HL, X, LAST_X) \
23329BUILD_GLYPH_STRINGS_2(START, END, HEAD, TAIL, HL, X, LAST_X)
23330#else
23331#define BUILD_GLYPH_STRINGS(START, END, HEAD, TAIL, HL, X, LAST_X) \
23332BUILD_GLYPH_STRINGS_1(START, END, HEAD, TAIL, HL, X, LAST_X) \
23333BUILD_GLYPH_STRINGS_2(START, END, HEAD, TAIL, HL, X, LAST_X)
23334#endif
23335
23336
23323/* Draw glyphs between START and END in AREA of ROW on window W, 23337/* Draw glyphs between START and END in AREA of ROW on window W,
23324 starting at x-position X. X is relative to AREA in W. HL is a 23338 starting at x-position X. X is relative to AREA in W. HL is a
23325 face-override with the following meaning: 23339 face-override with the following meaning:
diff --git a/src/xwidget.c b/src/xwidget.c
index b43cc14a791..6718f4a14c7 100644
--- a/src/xwidget.c
+++ b/src/xwidget.c
@@ -1,3 +1,4 @@
1#ifdef HAVE_XWIDGETS
1#include <config.h> 2#include <config.h>
2 3
3#include <signal.h> 4#include <signal.h>
@@ -1451,3 +1452,4 @@ xwidget_end_redisplay (struct window *w, struct glyph_matrix *matrix)
1451 } 1452 }
1452 } 1453 }
1453} 1454}
1455#endif