aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann1999-09-14 13:09:49 +0000
committerGerd Moellmann1999-09-14 13:09:49 +0000
commit5c187deef57a0bf7b1fc7cf9afcba6813f708886 (patch)
treeb03f401e8fc5db534281df171b633b0cc1a83f96 /src
parentb6d7acec859bc806a980ac7ed7e425cd7cf13623 (diff)
downloademacs-5c187deef57a0bf7b1fc7cf9afcba6813f708886.tar.gz
emacs-5c187deef57a0bf7b1fc7cf9afcba6813f708886.zip
(x_scroll_bar_handle_click): Compile only if
not USE_TOOLKIT_SCROLL_BARS. (x_scroll_bar_set_handle, x_scroll_bar_note_movement): Ditto. (x_produce_glyphs): Remove unused variable(s). (x_alloc_nearest_color_for_widget, note_tool_bar_highlight, x_set_toolkit_scroll_bar_thumb): Ditto. (x_scroll_bar_create): Move local variable to the conditionally compiled section of code where it is used. (x_scroll_bar_create): Remove unused variable(s). (x_scroll_bar_remove, XTread_socket): Ditto. (XTread_socket) <ConfigureNotify>: Move variables used for non-toolkit case into conditionally compiled section of code.
Diffstat (limited to 'src')
-rw-r--r--src/xterm.c41
1 files changed, 18 insertions, 23 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 7265d7e5084..1255370bfd7 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -1100,7 +1100,6 @@ static void x_append_glyph P_ ((struct it *));
1100static void x_append_stretch_glyph P_ ((struct it *it, Lisp_Object, 1100static void x_append_stretch_glyph P_ ((struct it *it, Lisp_Object,
1101 int, int, double)); 1101 int, int, double));
1102static void x_produce_glyphs P_ ((struct it *)); 1102static void x_produce_glyphs P_ ((struct it *));
1103static void x_produce_special_glyphs P_ ((struct it *, enum display_element_type));
1104static void x_produce_image_glyph P_ ((struct it *it)); 1103static void x_produce_image_glyph P_ ((struct it *it));
1105 1104
1106 1105
@@ -1726,9 +1725,7 @@ x_produce_glyphs (it)
1726 XFontStruct *font; 1725 XFontStruct *font;
1727 struct face *face; 1726 struct face *face;
1728 XCharStruct *pcm; 1727 XCharStruct *pcm;
1729 struct it ci;
1730 int font_not_found_p; 1728 int font_not_found_p;
1731 int c;
1732 1729
1733 /* Maybe translate single-byte characters to multibyte. */ 1730 /* Maybe translate single-byte characters to multibyte. */
1734 it->char_to_display = it->c; 1731 it->char_to_display = it->c;
@@ -2096,7 +2093,7 @@ struct glyph_string
2096}; 2093};
2097 2094
2098 2095
2099#if GLYPH_DEBUG 2096#if 0
2100 2097
2101static void 2098static void
2102x_dump_glyph_string (s) 2099x_dump_glyph_string (s)
@@ -2150,7 +2147,6 @@ static void x_set_glyph_string_gc P_ ((struct glyph_string *));
2150static void x_draw_glyph_string_background P_ ((struct glyph_string *, 2147static void x_draw_glyph_string_background P_ ((struct glyph_string *,
2151 int)); 2148 int));
2152static void x_draw_glyph_string_foreground P_ ((struct glyph_string *)); 2149static void x_draw_glyph_string_foreground P_ ((struct glyph_string *));
2153static void x_draw_glyph_string_underline P_ ((struct glyph_string *));
2154static void x_draw_glyph_string_box P_ ((struct glyph_string *)); 2150static void x_draw_glyph_string_box P_ ((struct glyph_string *));
2155static void x_draw_glyph_string P_ ((struct glyph_string *)); 2151static void x_draw_glyph_string P_ ((struct glyph_string *));
2156static void x_compute_glyph_string_overhangs P_ ((struct glyph_string *)); 2152static void x_compute_glyph_string_overhangs P_ ((struct glyph_string *));
@@ -2957,8 +2953,7 @@ x_alloc_nearest_color_for_widget (widget, cmap, color)
2957{ 2953{
2958 struct frame *f; 2954 struct frame *f;
2959 struct x_display_info *dpyinfo; 2955 struct x_display_info *dpyinfo;
2960 Lisp_Object tail, frame; 2956 Lisp_Object tail;
2961 Widget parent;
2962 2957
2963 dpyinfo = x_display_info_for_display (XtDisplay (widget)); 2958 dpyinfo = x_display_info_for_display (XtDisplay (widget));
2964 2959
@@ -6505,11 +6500,11 @@ note_tool_bar_highlight (f, x, y)
6505 int hpos, vpos; 6500 int hpos, vpos;
6506 struct glyph *glyph; 6501 struct glyph *glyph;
6507 struct glyph_row *row; 6502 struct glyph_row *row;
6508 int i, j, area; 6503 int i;
6509 Lisp_Object enabled_p; 6504 Lisp_Object enabled_p;
6510 int prop_idx; 6505 int prop_idx;
6511 enum draw_glyphs_face draw = DRAW_IMAGE_RAISED; 6506 enum draw_glyphs_face draw = DRAW_IMAGE_RAISED;
6512 int on_highlight_p, mouse_down_p, rc; 6507 int mouse_down_p, rc;
6513 6508
6514 /* Function note_mouse_highlight is called with negative x(y 6509 /* Function note_mouse_highlight is called with negative x(y
6515 values when mouse moves outside of the frame. */ 6510 values when mouse moves outside of the frame. */
@@ -7557,7 +7552,6 @@ x_set_toolkit_scroll_bar_thumb (bar, portion, position, whole)
7557 int portion, position, whole; 7552 int portion, position, whole;
7558{ 7553{
7559 float top, shown; 7554 float top, shown;
7560 Arg av[2];
7561 Widget widget = SCROLL_BAR_X_WIDGET (bar); 7555 Widget widget = SCROLL_BAR_X_WIDGET (bar);
7562 7556
7563 if (whole == 0) 7557 if (whole == 0)
@@ -7685,11 +7679,6 @@ x_scroll_bar_create (w, top, left, width, height)
7685 int top, left, width, height; 7679 int top, left, width, height;
7686{ 7680{
7687 struct frame *f = XFRAME (w->frame); 7681 struct frame *f = XFRAME (w->frame);
7688#ifdef USE_X_TOOLKIT
7689 Arg av[10];
7690#endif
7691 int ac = 0;
7692 Window window;
7693 struct scroll_bar *bar 7682 struct scroll_bar *bar
7694 = XSCROLL_BAR (Fmake_vector (make_number (SCROLL_BAR_VEC_SIZE), Qnil)); 7683 = XSCROLL_BAR (Fmake_vector (make_number (SCROLL_BAR_VEC_SIZE), Qnil));
7695 7684
@@ -7701,6 +7690,7 @@ x_scroll_bar_create (w, top, left, width, height)
7701 { 7690 {
7702 XSetWindowAttributes a; 7691 XSetWindowAttributes a;
7703 unsigned long mask; 7692 unsigned long mask;
7693 Window window;
7704 7694
7705 a.background_pixel = f->output_data.x->scroll_bar_background_pixel; 7695 a.background_pixel = f->output_data.x->scroll_bar_background_pixel;
7706 if (a.background_pixel == -1) 7696 if (a.background_pixel == -1)
@@ -7783,13 +7773,14 @@ x_scroll_bar_create (w, top, left, width, height)
7783 the bar's top is as far down as it goes; otherwise, there's no way 7773 the bar's top is as far down as it goes; otherwise, there's no way
7784 to move to the very end of the buffer. */ 7774 to move to the very end of the buffer. */
7785 7775
7776#ifndef USE_TOOLKIT_SCROLL_BARS
7777
7786static void 7778static void
7787x_scroll_bar_set_handle (bar, start, end, rebuild) 7779x_scroll_bar_set_handle (bar, start, end, rebuild)
7788 struct scroll_bar *bar; 7780 struct scroll_bar *bar;
7789 int start, end; 7781 int start, end;
7790 int rebuild; 7782 int rebuild;
7791{ 7783{
7792#ifndef USE_TOOLKIT_SCROLL_BARS
7793 int dragging = ! NILP (bar->dragging); 7784 int dragging = ! NILP (bar->dragging);
7794 Window w = SCROLL_BAR_X_WINDOW (bar); 7785 Window w = SCROLL_BAR_X_WINDOW (bar);
7795 FRAME_PTR f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window))); 7786 FRAME_PTR f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window)));
@@ -7881,9 +7872,9 @@ x_scroll_bar_set_handle (bar, start, end, rebuild)
7881 } 7872 }
7882 7873
7883 UNBLOCK_INPUT; 7874 UNBLOCK_INPUT;
7884#endif /* not USE_TOOLKIT_SCROLL_BARS */
7885} 7875}
7886 7876
7877#endif /* !USE_TOOLKIT_SCROLL_BARS */
7887 7878
7888/* Destroy scroll bar BAR, and set its Emacs window's scroll bar to 7879/* Destroy scroll bar BAR, and set its Emacs window's scroll bar to
7889 nil. */ 7880 nil. */
@@ -7892,14 +7883,15 @@ static void
7892x_scroll_bar_remove (bar) 7883x_scroll_bar_remove (bar)
7893 struct scroll_bar *bar; 7884 struct scroll_bar *bar;
7894{ 7885{
7895 FRAME_PTR f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window)));
7896
7897 BLOCK_INPUT; 7886 BLOCK_INPUT;
7898 7887
7899#if USE_TOOLKIT_SCROLL_BARS 7888#if USE_TOOLKIT_SCROLL_BARS
7900 XtDestroyWidget (SCROLL_BAR_X_WIDGET (bar)); 7889 XtDestroyWidget (SCROLL_BAR_X_WIDGET (bar));
7901#else /* not USE_TOOLKIT_SCROLL_BARS */ 7890#else /* not USE_TOOLKIT_SCROLL_BARS */
7902 XDestroyWindow (FRAME_X_DISPLAY (f), SCROLL_BAR_X_WINDOW (bar)); 7891 {
7892 FRAME_PTR f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window)));
7893 XDestroyWindow (FRAME_X_DISPLAY (f), SCROLL_BAR_X_WINDOW (bar));
7894 }
7903#endif /* not USE_TOOLKIT_SCROLL_BARS */ 7895#endif /* not USE_TOOLKIT_SCROLL_BARS */
7904 7896
7905 /* Disassociate this scroll bar from its window. */ 7897 /* Disassociate this scroll bar from its window. */
@@ -8213,6 +8205,8 @@ x_scroll_bar_expose (bar, event)
8213 This may be called from a signal handler, so we have to ignore GC 8205 This may be called from a signal handler, so we have to ignore GC
8214 mark bits. */ 8206 mark bits. */
8215 8207
8208#ifndef USE_TOOLKIT_SCROLL_BARS
8209
8216static void 8210static void
8217x_scroll_bar_handle_click (bar, event, emacs_event) 8211x_scroll_bar_handle_click (bar, event, emacs_event)
8218 struct scroll_bar *bar; 8212 struct scroll_bar *bar;
@@ -8323,6 +8317,8 @@ x_scroll_bar_note_movement (bar, event)
8323 } 8317 }
8324} 8318}
8325 8319
8320#endif /* !USE_TOOLKIT_SCROLL_BARS */
8321
8326/* Return information to the user about the current position of the mouse 8322/* Return information to the user about the current position of the mouse
8327 on the scroll bar. */ 8323 on the scroll bar. */
8328 8324
@@ -8833,7 +8829,6 @@ XTread_socket (sd, bufp, numchars, expected)
8833 reply with "Next" if we received "Page", but we 8829 reply with "Next" if we received "Page", but we
8834 currently never do because we are interested in 8830 currently never do because we are interested in
8835 images, only, which should have 1 page. */ 8831 images, only, which should have 1 page. */
8836 Window gs_window = (Window) event.xclient.data.l[0];
8837 Pixmap pixmap = (Pixmap) event.xclient.data.l[1]; 8832 Pixmap pixmap = (Pixmap) event.xclient.data.l[1];
8838 struct frame *f 8833 struct frame *f
8839 = x_window_to_frame (dpyinfo, event.xclient.window); 8834 = x_window_to_frame (dpyinfo, event.xclient.window);
@@ -9467,10 +9462,10 @@ XTread_socket (sd, bufp, numchars, expected)
9467 f = x_top_window_to_frame (dpyinfo, event.xconfigure.window); 9462 f = x_top_window_to_frame (dpyinfo, event.xconfigure.window);
9468 if (f) 9463 if (f)
9469 { 9464 {
9465#ifndef USE_X_TOOLKIT
9470 int rows = PIXEL_TO_CHAR_HEIGHT (f, event.xconfigure.height); 9466 int rows = PIXEL_TO_CHAR_HEIGHT (f, event.xconfigure.height);
9471 int columns = PIXEL_TO_CHAR_WIDTH (f, event.xconfigure.width); 9467 int columns = PIXEL_TO_CHAR_WIDTH (f, event.xconfigure.width);
9472 9468
9473#ifndef USE_X_TOOLKIT
9474 /* In the toolkit version, change_frame_size 9469 /* In the toolkit version, change_frame_size
9475 is called by the code that handles resizing 9470 is called by the code that handles resizing
9476 of the EmacsFrame widget. */ 9471 of the EmacsFrame widget. */