1 /* toolbar implementation -- X interface.
2 Copyright (C) 1995 Board of Trustees, University of Illinois.
3 Copyright (C) 1995 Sun Microsystems, Inc.
4 Copyright (C) 1995, 1996 Ben Wing.
5 Copyright (C) 1996 Chuck Thompson.
7 This file is part of XEmacs.
9 XEmacs is free software; you can redistribute it and/or modify it
10 under the terms of the GNU General Public License as published by the
11 Free Software Foundation; either version 2, or (at your option) any
14 XEmacs is distributed in the hope that it will be useful, but WITHOUT
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19 You should have received a copy of the GNU General Public License
20 along with XEmacs; see the file COPYING. If not, write to
21 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
22 Boston, MA 02111-1307, USA. */
24 /* Synched up with: Not in FSF. */
26 /* This file Mule-ized (more like Mule-verified) by Ben Wing, 7-8-00. */
31 #include "console-x.h"
33 #include "objects-x.h"
34 #include "EmacsFrame.h"
35 #include "EmacsFrameP.h"
43 x_draw_blank_toolbar_button (struct frame *f, int x, int y, int width,
44 int height, int threed, int border_width,
47 struct device *d = XDEVICE (f->device);
48 EmacsFrame ef = (EmacsFrame) FRAME_X_TEXT_WIDGET (f);
49 int shadow_thickness = ef->emacs_frame.toolbar_shadow_thickness;
50 int sx = x, sy = y, swidth = width, sheight = height;
52 Display *dpy = DEVICE_X_DISPLAY (d);
53 Window x_win = XtWindow (FRAME_X_TEXT_WIDGET (f));
54 GC top_shadow_gc, bottom_shadow_gc, background_gc;
56 background_gc = FRAME_X_TOOLBAR_BLANK_BACKGROUND_GC (f);
60 top_shadow_gc = FRAME_X_TOOLBAR_TOP_SHADOW_GC (f);
61 bottom_shadow_gc = FRAME_X_TOOLBAR_BOTTOM_SHADOW_GC (f);
65 top_shadow_gc = background_gc;
66 bottom_shadow_gc = background_gc;
72 swidth -= 2 * border_width;
77 sheight -= 2 * border_width;
80 /* Draw the outline. */
81 x_output_shadows (f, sx, sy, swidth, sheight, top_shadow_gc,
82 bottom_shadow_gc, background_gc, shadow_thickness,
85 /* Blank the middle. */
86 XFillRectangle (dpy, x_win, background_gc, sx + shadow_thickness,
87 sy + shadow_thickness, swidth - shadow_thickness * 2,
88 sheight - shadow_thickness * 2);
91 XFillRectangle (dpy, x_win, background_gc, x, y,
92 (vertical ? border_width : width),
93 (vertical ? height : border_width));
94 XFillRectangle (dpy, x_win, background_gc,
95 (vertical ? sx + swidth : x),
96 (vertical ? y : sy + sheight),
97 (vertical ? border_width : width),
98 (vertical ? height : border_width));
102 x_output_toolbar_button (struct frame *f, Lisp_Object button)
104 struct device *d = XDEVICE (f->device);
105 EmacsFrame ef = (EmacsFrame) FRAME_X_TEXT_WIDGET (f);
106 int shadow_thickness = ef->emacs_frame.toolbar_shadow_thickness;
107 int x_adj, y_adj, width_adj, height_adj;
109 Display *dpy = DEVICE_X_DISPLAY (d);
110 Window x_win = XtWindow (FRAME_X_TEXT_WIDGET (f));
111 GC top_shadow_gc, bottom_shadow_gc, background_gc;
112 Lisp_Object instance, frame, window, glyph;
113 struct toolbar_button *tb = XTOOLBAR_BUTTON (button);
114 Lisp_Image_Instance *p;
116 int vertical = tb->vertical;
117 int border_width = tb->border_width;
121 x_adj = border_width;
122 width_adj = - 2 * border_width;
130 y_adj = border_width;
131 height_adj = - 2 * border_width;
134 XSETFRAME (frame, f);
135 window = FRAME_LAST_NONMINIBUF_WINDOW (f);
136 w = XWINDOW (window);
138 glyph = get_toolbar_button_glyph (w, tb);
144 top_shadow_gc = FRAME_X_TOOLBAR_BOTTOM_SHADOW_GC (f);
145 bottom_shadow_gc = FRAME_X_TOOLBAR_TOP_SHADOW_GC (f);
149 top_shadow_gc = FRAME_X_TOOLBAR_TOP_SHADOW_GC (f);
150 bottom_shadow_gc = FRAME_X_TOOLBAR_BOTTOM_SHADOW_GC (f);
155 top_shadow_gc = FRAME_X_TOOLBAR_BLANK_BACKGROUND_GC (f);
156 bottom_shadow_gc = FRAME_X_TOOLBAR_BLANK_BACKGROUND_GC (f);
158 background_gc = FRAME_X_TOOLBAR_BLANK_BACKGROUND_GC (f);
160 /* Draw the outline. */
161 x_output_shadows (f, tb->x + x_adj, tb->y + y_adj,
162 tb->width + width_adj, tb->height + height_adj,
164 bottom_shadow_gc, background_gc, shadow_thickness,
167 /* Clear the pixmap area. */
168 XFillRectangle (dpy, x_win, background_gc, tb->x + x_adj + shadow_thickness,
169 tb->y + y_adj + shadow_thickness,
170 tb->width + width_adj - shadow_thickness * 2,
171 tb->height + height_adj - shadow_thickness * 2);
174 XFillRectangle (dpy, x_win, background_gc, tb->x, tb->y,
175 (vertical ? border_width : tb->width),
176 (vertical ? tb->height : border_width));
178 XFillRectangle (dpy, x_win, background_gc,
179 (vertical ? tb->x + tb->width - border_width : tb->x),
180 (vertical ? tb->y : tb->y + tb->height - border_width),
181 (vertical ? border_width : tb->width),
182 (vertical ? tb->height : border_width));
184 background_gc = FRAME_X_TOOLBAR_PIXMAP_BACKGROUND_GC (f);
186 /* #### It is currently possible for users to trash us by directly
187 changing the toolbar glyphs. Avoid crashing in that case. */
189 instance = glyph_image_instance (glyph, window, ERROR_ME_NOT, 1);
193 if (IMAGE_INSTANCEP (instance))
195 int width = tb->width + width_adj - shadow_thickness * 2;
196 int height = tb->height + height_adj - shadow_thickness * 2;
197 int x_offset = x_adj + shadow_thickness;
198 int y_offset = y_adj + shadow_thickness;
200 p = XIMAGE_INSTANCE (instance);
202 if (IMAGE_INSTANCE_PIXMAP_TYPE_P (p))
204 if (width > (int) IMAGE_INSTANCE_PIXMAP_WIDTH (p))
206 x_offset += ((int) (width - IMAGE_INSTANCE_PIXMAP_WIDTH (p))
208 width = IMAGE_INSTANCE_PIXMAP_WIDTH (p);
210 if (height > (int) IMAGE_INSTANCE_PIXMAP_HEIGHT (p))
212 y_offset += ((int) (height - IMAGE_INSTANCE_PIXMAP_HEIGHT (p))
214 height = IMAGE_INSTANCE_PIXMAP_HEIGHT (p);
217 x_output_x_pixmap (f, XIMAGE_INSTANCE (instance), tb->x + x_offset,
218 tb->y + y_offset, 0, 0, width, height,
219 0, 0, background_gc);
221 else if (IMAGE_INSTANCE_TYPE (p) == IMAGE_TEXT)
223 /* #### We need to make the face used configurable. */
224 struct face_cachel *cachel =
225 WINDOW_FACE_CACHEL (w, DEFAULT_INDEX);
226 struct display_line dl;
227 Lisp_Object string = IMAGE_INSTANCE_TEXT_STRING (p);
228 Charset_ID charsets[NUM_LEADING_BYTES];
230 struct font_metric_info fm;
232 /* This could be true if we were called via the Expose event
233 handler. Mark the button as dirty and return
235 if (f->window_face_cache_reset)
238 MARK_TOOLBAR_CHANGED;
241 buf = Dynarr_new (Charc);
242 convert_bufbyte_string_into_charc_dynarr
243 (XSTRING_DATA (string), XSTRING_LENGTH (string), buf);
244 find_charsets_in_charc_string (charsets, Dynarr_atp (buf, 0),
245 Dynarr_length (buf));
246 ensure_face_cachel_complete (cachel, window, charsets);
247 face_cachel_charset_font_metric_info (cachel, charsets, &fm);
249 dl.ascent = fm.ascent;
250 dl.descent = fm.descent;
251 dl.ypos = tb->y + y_offset + fm.ascent;
253 if (fm.ascent + fm.descent <= height)
255 dl.ypos += (height - fm.ascent - fm.descent) / 2;
260 dl.clip = fm.ascent + fm.descent - height;
263 x_output_string (w, &dl, buf, tb->x + x_offset, 0, 0, width,
264 DEFAULT_INDEX, 0, 0, 0, 0);
268 /* We silently ignore the image if it isn't a pixmap or text. */
275 x_get_button_size (struct frame *f, Lisp_Object window,
276 struct toolbar_button *tb, int vert, int pos)
278 EmacsFrame ef = (EmacsFrame) FRAME_X_TEXT_WIDGET (f);
279 int shadow_thickness = ef->emacs_frame.toolbar_shadow_thickness;
284 if (!NILP (tb->down_glyph))
285 size = XINT (tb->down_glyph);
287 size = DEFAULT_TOOLBAR_BLANK_SIZE;
291 struct window *w = XWINDOW (window);
292 Lisp_Object glyph = get_toolbar_button_glyph (w, tb);
294 /* Unless, of course, the user has done something stupid like
295 change the glyph out from under us. Use a blank placeholder
298 return XINT (f->toolbar_size[pos]);
301 size = glyph_height (glyph, window);
303 size = glyph_width (glyph, window);
308 /* If the glyph doesn't have a size we'll insert a blank
309 placeholder instead. */
310 return XINT (f->toolbar_size[pos]);
313 size += shadow_thickness * 2;
318 #define X_OUTPUT_BUTTONS_LOOP(left) \
320 while (!NILP (button)) \
322 struct toolbar_button *tb = XTOOLBAR_BUTTON (button); \
323 int size, height, width; \
325 if (left && tb->pushright) \
328 size = x_get_button_size (f, window, tb, vert, pos); \
333 if (y + size > max_pixpos) \
334 height = max_pixpos - y; \
340 if (x + size > max_pixpos) \
341 width = max_pixpos - x; \
344 height = bar_height; \
349 || tb->width != width \
350 || tb->height != height \
352 || f->clear) /* This is clearly necessary. */ \
354 if (width && height) \
359 tb->height = height; \
360 tb->border_width = border_width; \
361 tb->vertical = vert; \
363 if (tb->blank || NILP (tb->up_glyph)) \
365 int threed = (EQ (Qt, tb->up_glyph) ? 1 : 0); \
366 x_draw_blank_toolbar_button (f, x, y, width, \
368 border_width, vert); \
371 x_output_toolbar_button (f, button); \
380 if ((vert && y == max_pixpos) || (!vert && x == max_pixpos)) \
387 #define SET_TOOLBAR_WAS_VISIBLE_FLAG(frame, pos, flag) \
392 (frame)->top_toolbar_was_visible = flag; \
394 case BOTTOM_TOOLBAR: \
395 (frame)->bottom_toolbar_was_visible = flag; \
398 (frame)->left_toolbar_was_visible = flag; \
400 case RIGHT_TOOLBAR: \
401 (frame)->right_toolbar_was_visible = flag; \
409 x_output_toolbar (struct frame *f, enum toolbar_pos pos)
411 struct device *d = XDEVICE (f->device);
412 int x, y, bar_width, bar_height, vert;
413 int max_pixpos, right_size, right_start, blank_size;
414 int border_width = FRAME_REAL_TOOLBAR_BORDER_WIDTH (f, pos);
415 Lisp_Object button, window;
416 Display *dpy = DEVICE_X_DISPLAY (d);
417 Window x_win = XtWindow (FRAME_X_TEXT_WIDGET (f));
418 GC background_gc = FRAME_X_TOOLBAR_BLANK_BACKGROUND_GC (f);
420 get_toolbar_coords (f, pos, &x, &y, &bar_width, &bar_height, &vert, 1);
421 window = FRAME_LAST_NONMINIBUF_WINDOW (f);
424 XFillRectangle (dpy, x_win, background_gc, x, y,
425 (vert ? bar_width : border_width),
426 (vert ? border_width : bar_height));
427 XFillRectangle (dpy, x_win, background_gc,
428 (vert ? x : x + bar_width - border_width),
429 (vert ? y + bar_height - border_width : y),
430 (vert ? bar_width : border_width),
431 (vert ? border_width : bar_height));
435 max_pixpos = y + bar_height - border_width;
440 max_pixpos = x + bar_width - border_width;
444 button = FRAME_TOOLBAR_BUTTONS (f, pos);
447 /* First loop over all of the buttons to determine how much room we
448 need for left hand and right hand buttons. This loop will also
449 make sure that all instances are instantiated so when we actually
450 output them they will come up immediately. */
451 while (!NILP (button))
453 struct toolbar_button *tb = XTOOLBAR_BUTTON (button);
454 int size = x_get_button_size (f, window, tb, vert, pos);
462 button = FRAME_TOOLBAR_BUTTONS (f, pos);
464 /* Loop over the left buttons, updating and outputting them. */
465 X_OUTPUT_BUTTONS_LOOP (1);
467 /* Now determine where the right buttons start. */
468 right_start = max_pixpos - right_size;
469 if (right_start < (vert ? y : x))
470 right_start = (vert ? y : x);
472 /* Output the blank which goes from the end of the left buttons to
473 the start of the right. */
474 blank_size = right_start - (vert ? y : x);
491 * Use a 3D pushright separator only if there isn't a toolbar
492 * border. A flat separator meshes with the border and looks
495 x_draw_blank_toolbar_button (f, x, y, width, height, !border_width,
504 /* Loop over the right buttons, updating and outputting them. */
505 X_OUTPUT_BUTTONS_LOOP (0);
511 XSETFRAME (frame, f);
512 redisplay_clear_region (frame,
513 DEFAULT_INDEX, FRAME_PIXWIDTH (f) - 1, y, 1,
517 SET_TOOLBAR_WAS_VISIBLE_FLAG (f, pos, 1);
519 XFlush (DEVICE_X_DISPLAY (d));
523 x_clear_toolbar (struct frame *f, enum toolbar_pos pos, int thickness_change)
526 struct device *d = XDEVICE (f->device);
527 int x, y, width, height, vert;
529 get_toolbar_coords (f, pos, &x, &y, &width, &height, &vert, 1);
530 XSETFRAME (frame, f);
532 /* The thickness_change parameter is used by the toolbar resize routines
533 to clear any excess toolbar if the size shrinks. */
534 if (thickness_change < 0)
536 if (pos == LEFT_TOOLBAR || pos == RIGHT_TOOLBAR)
538 x = x + width + thickness_change;
539 width = -thickness_change;
543 y = y + height + thickness_change;
544 height = -thickness_change;
548 SET_TOOLBAR_WAS_VISIBLE_FLAG (f, pos, 0);
550 redisplay_clear_region (frame, DEFAULT_INDEX, x, y, width, height);
551 XFlush (DEVICE_X_DISPLAY (d));
555 x_output_frame_toolbars (struct frame *f)
557 assert (FRAME_X_P (f));
559 if (FRAME_REAL_TOP_TOOLBAR_VISIBLE (f))
560 x_output_toolbar (f, TOP_TOOLBAR);
561 if (FRAME_REAL_BOTTOM_TOOLBAR_VISIBLE (f))
562 x_output_toolbar (f, BOTTOM_TOOLBAR);
563 if (FRAME_REAL_LEFT_TOOLBAR_VISIBLE (f))
564 x_output_toolbar (f, LEFT_TOOLBAR);
565 if (FRAME_REAL_RIGHT_TOOLBAR_VISIBLE (f))
566 x_output_toolbar (f, RIGHT_TOOLBAR);
570 x_clear_frame_toolbars (struct frame *f)
572 assert (FRAME_X_P (f));
574 if (f->top_toolbar_was_visible
575 && !FRAME_REAL_TOP_TOOLBAR_VISIBLE (f))
576 x_clear_toolbar (f, TOP_TOOLBAR, 0);
577 if (f->bottom_toolbar_was_visible
578 && !FRAME_REAL_BOTTOM_TOOLBAR_VISIBLE (f))
579 x_clear_toolbar (f, BOTTOM_TOOLBAR, 0);
580 if (f->left_toolbar_was_visible
581 && !FRAME_REAL_LEFT_TOOLBAR_VISIBLE (f))
582 x_clear_toolbar (f, LEFT_TOOLBAR, 0);
583 if (f->right_toolbar_was_visible
584 && !FRAME_REAL_RIGHT_TOOLBAR_VISIBLE (f))
585 x_clear_toolbar (f, RIGHT_TOOLBAR, 0);
589 x_redraw_exposed_toolbar (struct frame *f, enum toolbar_pos pos, int x, int y,
590 int width, int height)
592 int bar_x, bar_y, bar_width, bar_height, vert;
593 Lisp_Object button = FRAME_TOOLBAR_BUTTONS (f, pos);
595 get_toolbar_coords (f, pos, &bar_x, &bar_y, &bar_width, &bar_height,
598 if (((y + height) < bar_y) || (y > (bar_y + bar_height)))
600 if (((x + width) < bar_x) || (x > (bar_x + bar_width)))
603 while (!NILP (button))
605 struct toolbar_button *tb = XTOOLBAR_BUTTON (button);
609 if (((tb->y + tb->height) > y) && (tb->y < (y + height)))
612 /* If this is true we have gone past the exposed region. */
613 if (tb->y > (y + height))
618 if (((tb->x + tb->width) > x) && (tb->x < (x + width)))
621 /* If this is true we have gone past the exposed region. */
622 if (tb->x > (x + width))
629 /* Even if none of the buttons is in the area, the blank region at
630 the very least must be because the first thing we did is verify
631 that some portion of the toolbar is in the exposed region. */
632 x_output_toolbar (f, pos);
636 x_redraw_exposed_toolbars (struct frame *f, int x, int y, int width,
639 assert (FRAME_X_P (f));
641 if (FRAME_REAL_TOP_TOOLBAR_VISIBLE (f))
642 x_redraw_exposed_toolbar (f, TOP_TOOLBAR, x, y, width, height);
644 if (FRAME_REAL_BOTTOM_TOOLBAR_VISIBLE (f))
645 x_redraw_exposed_toolbar (f, BOTTOM_TOOLBAR, x, y, width, height);
647 if (FRAME_REAL_LEFT_TOOLBAR_VISIBLE (f))
648 x_redraw_exposed_toolbar (f, LEFT_TOOLBAR, x, y, width, height);
650 if (FRAME_REAL_RIGHT_TOOLBAR_VISIBLE (f))
651 x_redraw_exposed_toolbar (f, RIGHT_TOOLBAR, x, y, width, height);
655 x_redraw_frame_toolbars (struct frame *f)
657 /* There are certain startup paths that lead to update_EmacsFrame in
658 faces.c being called before a new frame is fully initialized. In
659 particular before we have actually mapped it. That routine can
660 call this one. So, we need to make sure that the frame is
661 actually ready before we try and draw all over it. */
663 if (XtIsRealized (FRAME_X_SHELL_WIDGET (f)))
664 x_redraw_exposed_toolbars (f, 0, 0, FRAME_PIXWIDTH (f),
665 FRAME_PIXHEIGHT (f));
670 x_initialize_frame_toolbar_gcs (struct frame *f)
672 EmacsFrame ef = (EmacsFrame) FRAME_X_TEXT_WIDGET (f);
673 EmacsFramePart *efp = &(ef->emacs_frame);
675 unsigned long flags = (GCForeground | GCBackground | GCGraphicsExposures);
678 * If backgroundToolBarColor is specified, use it.
679 * Otherwise use the background resource.
681 if (efp->background_toolbar_pixel == (Pixel) (-1))
682 efp->background_toolbar_pixel = efp->background_pixel;
686 * If foregroundToolBarColor is specified, use it.
687 * Otherwise use the foreground resource.
689 * The foreground pixel is currently unused, but will likely be
690 * used when toolbar captions are generated by the toolbar code
691 * instead being incorporated into the icon image.
693 if (efp->foreground_toolbar_pixel == (Pixel) (-1))
694 efp->foreground_toolbar_pixel = efp->foreground_pixel;
696 gcv.foreground = efp->background_toolbar_pixel;
697 gcv.background = ef->core.background_pixel;
698 gcv.graphics_exposures = False;
699 FRAME_X_TOOLBAR_BLANK_BACKGROUND_GC (f) =
700 XtGetGC ((Widget) ef, flags, &gcv);
702 if (efp->top_toolbar_shadow_pixel == efp->bottom_toolbar_shadow_pixel)
704 efp->top_toolbar_shadow_pixel = efp->background_toolbar_pixel;
705 efp->bottom_toolbar_shadow_pixel = efp->background_toolbar_pixel;
708 x_generate_shadow_pixels (f, &efp->top_toolbar_shadow_pixel,
709 &efp->bottom_toolbar_shadow_pixel,
710 efp->background_toolbar_pixel,
711 ef->core.background_pixel);
713 gcv.foreground = efp->top_toolbar_shadow_pixel;
714 gcv.background = ef->core.background_pixel;
715 gcv.graphics_exposures = False;
716 flags = GCForeground | GCBackground | GCGraphicsExposures;
717 if (efp->top_toolbar_shadow_pixmap)
719 gcv.fill_style = FillOpaqueStippled;
720 gcv.stipple = efp->top_toolbar_shadow_pixmap;
721 flags |= GCStipple | GCFillStyle;
723 FRAME_X_TOOLBAR_TOP_SHADOW_GC (f) = XtGetGC ((Widget) ef, flags, &gcv);
725 gcv.foreground = efp->bottom_toolbar_shadow_pixel;
726 gcv.background = ef->core.background_pixel;
727 gcv.graphics_exposures = False;
728 flags = GCForeground | GCBackground | GCGraphicsExposures;
729 if (efp->bottom_toolbar_shadow_pixmap)
731 gcv.fill_style = FillOpaqueStippled;
732 gcv.stipple = efp->bottom_toolbar_shadow_pixmap;
733 flags |= GCStipple | GCFillStyle;
735 FRAME_X_TOOLBAR_BOTTOM_SHADOW_GC (f) = XtGetGC ((Widget) ef, flags, &gcv);
738 FRAME_X_TOOLBAR_PIXMAP_BACKGROUND_GC (f) =
739 FRAME_X_TOOLBAR_BLANK_BACKGROUND_GC (f);
742 struct device *d = XDEVICE (f->device);
743 Display *dpy = DEVICE_X_DISPLAY (d);
745 gcv.background = WhitePixelOfScreen (DefaultScreenOfDisplay (dpy));
746 gcv.foreground = BlackPixelOfScreen (DefaultScreenOfDisplay (dpy));
747 gcv.graphics_exposures = False;
748 flags = GCForeground | GCBackground | GCGraphicsExposures;
749 FRAME_X_TOOLBAR_PIXMAP_BACKGROUND_GC (f) =
750 XtGetGC ((Widget) ef, flags, &gcv);
756 x_release_frame_toolbar_gcs (struct frame *f)
758 Widget ew = (Widget) FRAME_X_TEXT_WIDGET (f);
759 XtReleaseGC (ew, FRAME_X_TOOLBAR_BLANK_BACKGROUND_GC (f));
760 /* If compiled with XPM support, this is a pointer to the same GC as
761 FRAME_X_BLANK_BACKGROUND_GC so we need to make sure we don't
764 XtReleaseGC (ew, FRAME_X_TOOLBAR_PIXMAP_BACKGROUND_GC (f));
766 XtReleaseGC (ew, FRAME_X_TOOLBAR_TOP_SHADOW_GC (f));
767 XtReleaseGC (ew, FRAME_X_TOOLBAR_BOTTOM_SHADOW_GC (f));
769 /* Seg fault if we try and use these again. */
770 FRAME_X_TOOLBAR_BLANK_BACKGROUND_GC (f) = (GC) - 1;
771 FRAME_X_TOOLBAR_PIXMAP_BACKGROUND_GC (f) = (GC) - 1;
772 FRAME_X_TOOLBAR_TOP_SHADOW_GC (f) = (GC) - 1;
773 FRAME_X_TOOLBAR_BOTTOM_SHADOW_GC (f) = (GC) - 1;
777 x_initialize_frame_toolbars (struct frame *f)
779 EmacsFrame ef = (EmacsFrame) FRAME_X_TEXT_WIDGET (f);
781 if (ef->emacs_frame.toolbar_shadow_thickness < MINIMUM_SHADOW_THICKNESS)
782 Xt_SET_VALUE (FRAME_X_TEXT_WIDGET (f),
783 XtNtoolBarShadowThickness, MINIMUM_SHADOW_THICKNESS);
785 x_initialize_frame_toolbar_gcs (f);
788 /* This only calls one function but we go ahead and create this in
789 case we ever do decide that we need to do more work. */
791 x_free_frame_toolbars (struct frame *f)
793 x_release_frame_toolbar_gcs (f);
797 /************************************************************************/
799 /************************************************************************/
802 console_type_create_toolbar_x (void)
804 CONSOLE_HAS_METHOD (x, output_frame_toolbars);
805 CONSOLE_HAS_METHOD (x, clear_frame_toolbars);
806 CONSOLE_HAS_METHOD (x, initialize_frame_toolbars);
807 CONSOLE_HAS_METHOD (x, free_frame_toolbars);
808 CONSOLE_HAS_METHOD (x, output_toolbar_button);
809 CONSOLE_HAS_METHOD (x, redraw_exposed_toolbars);
810 CONSOLE_HAS_METHOD (x, redraw_frame_toolbars);