comparison src/toolbar.c @ 280:7df0dd720c89 r21-0b38

Import from CVS: tag r21-0b38
author cvs
date Mon, 13 Aug 2007 10:32:22 +0200
parents 6330739388db
children c42ec1d1cded
comparison
equal deleted inserted replaced
279:c20b2fb5bb0a 280:7df0dd720c89
719 719
720 UNGCPRO; 720 UNGCPRO;
721 return first_button; 721 return first_button;
722 } 722 }
723 723
724 static int 724 static void
725 set_frame_toolbar (struct frame *f, enum toolbar_pos pos, int first_time_p) 725 set_frame_toolbar (struct frame *f, enum toolbar_pos pos)
726 { 726 {
727 Lisp_Object toolbar, buttons; 727 Lisp_Object toolbar, buttons;
728 struct window *w = XWINDOW (FRAME_LAST_NONMINIBUF_WINDOW (f)); 728 struct window *w = XWINDOW (FRAME_LAST_NONMINIBUF_WINDOW (f));
729 Lisp_Object buffer = w->buffer; 729 Lisp_Object buffer = w->buffer;
730 int visible = FRAME_THEORETICAL_TOOLBAR_SIZE (f, pos); 730
731 731 if (!f->toolbar_changed
732 && !NILP (f->toolbar_data[pos])
733 && EQ (FRAME_TOOLBAR_DATA (f, pos)->last_toolbar_buffer, buffer))
734 return;
735
732 toolbar = w->toolbar[pos]; 736 toolbar = w->toolbar[pos];
733 737
734 if (NILP (f->toolbar_data[pos])) 738 if (NILP (f->toolbar_data[pos]))
735 { 739 {
736 struct toolbar_data *td = alloc_lcrecord_type (struct toolbar_data, 740 struct toolbar_data *td = alloc_lcrecord_type (struct toolbar_data,
739 td->last_toolbar_buffer = Qnil; 743 td->last_toolbar_buffer = Qnil;
740 td->toolbar_buttons = Qnil; 744 td->toolbar_buttons = Qnil;
741 XSETTOOLBAR_DATA (f->toolbar_data[pos], td); 745 XSETTOOLBAR_DATA (f->toolbar_data[pos], td);
742 } 746 }
743 747
744 buttons = visible ? compute_frame_toolbar_buttons (f, pos, toolbar) : Qnil; 748 buttons = (FRAME_REAL_TOOLBAR_VISIBLE (f, pos)
749 ? compute_frame_toolbar_buttons (f, pos, toolbar) : Qnil);
745 750
746 FRAME_TOOLBAR_DATA (f, pos)->last_toolbar_buffer = buffer; 751 FRAME_TOOLBAR_DATA (f, pos)->last_toolbar_buffer = buffer;
747 FRAME_TOOLBAR_DATA (f, pos)->toolbar_buttons = buttons; 752 FRAME_TOOLBAR_DATA (f, pos)->toolbar_buttons = buttons;
748 753 }
749 return visible;
750 }
751
752 #define COMPUTE_TOOLBAR_DATA(position) \
753 do \
754 { \
755 local_toolbar_changed = \
756 (f->toolbar_changed \
757 || NILP (f->toolbar_data[position]) \
758 || (!EQ (FRAME_TOOLBAR_DATA (f, position)->last_toolbar_buffer, \
759 XWINDOW (FRAME_LAST_NONMINIBUF_WINDOW (f))->buffer))); \
760 \
761 toolbar_was_visible = \
762 (!NILP (f->toolbar_data[position]) \
763 && !NILP (FRAME_TOOLBAR_DATA (f, position)->toolbar_buttons)); \
764 toolbar_will_be_visible = toolbar_was_visible; \
765 \
766 if (local_toolbar_changed) \
767 toolbar_will_be_visible = \
768 set_frame_toolbar (f, position, first_time_p); \
769 \
770 toolbar_visibility_changed = \
771 (toolbar_was_visible != toolbar_will_be_visible); \
772 \
773 if (toolbar_visibility_changed) \
774 frame_changed_size = 1; \
775 } while (0)
776 754
777 static void 755 static void
778 compute_frame_toolbars_data (struct frame *f, int first_time_p) 756 compute_frame_toolbars_data (struct frame *f, int first_time_p)
779 { 757 {
780 int local_toolbar_changed; 758 set_frame_toolbar (f, TOP_TOOLBAR);
781 int toolbar_was_visible, toolbar_will_be_visible; 759 set_frame_toolbar (f, BOTTOM_TOOLBAR);
782 int toolbar_visibility_changed; 760 set_frame_toolbar (f, LEFT_TOOLBAR);
783 int frame_changed_size = 0; 761 set_frame_toolbar (f, RIGHT_TOOLBAR);
784 762
785 COMPUTE_TOOLBAR_DATA (TOP_TOOLBAR); 763 if (!first_time_p)
786 COMPUTE_TOOLBAR_DATA (BOTTOM_TOOLBAR); 764 {
787 COMPUTE_TOOLBAR_DATA (LEFT_TOOLBAR); 765 int height, width;
788 COMPUTE_TOOLBAR_DATA (RIGHT_TOOLBAR); 766 pixel_to_char_size (f, FRAME_PIXWIDTH(f), FRAME_PIXHEIGHT(f),
789 767 &width, &height);
790 /* The frame itself doesn't actually change size, but the usable 768 change_frame_size (f, height, width, 0);
791 text area does. All we have to do is call change_frame_size with 769 }
792 the current height and width parameters and it will readjust for 770 }
793 all changes in the toolbars. */
794 if (frame_changed_size && !first_time_p)
795 change_frame_size (f, FRAME_HEIGHT (f), FRAME_WIDTH (f), 0);
796 }
797 #undef COMPUTE_TOOLBAR_DATA
798 771
799 void 772 void
800 update_frame_toolbars (struct frame *f) 773 update_frame_toolbars (struct frame *f)
801 { 774 {
802 struct device *d = XDEVICE (f->device); 775 struct device *d = XDEVICE (f->device);
804 777
805 /* If the buffer of the selected window is not equal to the 778 /* If the buffer of the selected window is not equal to the
806 last_toolbar_buffer value for any of the toolbars, then the 779 last_toolbar_buffer value for any of the toolbars, then the
807 toolbars need to be recomputed. */ 780 toolbars need to be recomputed. */
808 if ((HAS_DEVMETH_P (d, output_frame_toolbars)) 781 if ((HAS_DEVMETH_P (d, output_frame_toolbars))
809 && (f->toolbar_changed 782 && (f->toolbar_changed || f->frame_changed || f->clear
810 || !EQ (FRAME_TOOLBAR_BUFFER (f, TOP_TOOLBAR), buffer) 783 || !EQ (FRAME_TOOLBAR_BUFFER (f, TOP_TOOLBAR), buffer)
811 || !EQ (FRAME_TOOLBAR_BUFFER (f, BOTTOM_TOOLBAR), buffer) 784 || !EQ (FRAME_TOOLBAR_BUFFER (f, BOTTOM_TOOLBAR), buffer)
812 || !EQ (FRAME_TOOLBAR_BUFFER (f, LEFT_TOOLBAR), buffer) 785 || !EQ (FRAME_TOOLBAR_BUFFER (f, LEFT_TOOLBAR), buffer)
813 || !EQ (FRAME_TOOLBAR_BUFFER (f, RIGHT_TOOLBAR), buffer))) 786 || !EQ (FRAME_TOOLBAR_BUFFER (f, RIGHT_TOOLBAR), buffer)))
814 { 787 {
1228 { 1201 {
1229 return TOOLBAR_SPECIFIERP (object) ? Qt : Qnil; 1202 return TOOLBAR_SPECIFIERP (object) ? Qt : Qnil;
1230 } 1203 }
1231 1204
1232 1205
1206 /*
1207 Helper for invalidating the real specifier when default
1208 specifier caching changes
1209 */
1210 static void
1211 recompute_overlaying_specifier (Lisp_Object real_one[4])
1212 {
1213 enum toolbar_pos pos = decode_toolbar_position (Vdefault_toolbar_position);
1214 Fset_specifier_dirty_flag (real_one[pos]);
1215 }
1216
1233 static void 1217 static void
1234 toolbar_specs_changed (Lisp_Object specifier, struct window *w, 1218 toolbar_specs_changed (Lisp_Object specifier, struct window *w,
1235 Lisp_Object oldval) 1219 Lisp_Object oldval)
1236 { 1220 {
1237 /* This could be smarter but I doubt that it would make any 1221 /* This could be smarter but I doubt that it would make any
1243 1227
1244 static void 1228 static void
1245 default_toolbar_specs_changed (Lisp_Object specifier, struct window *w, 1229 default_toolbar_specs_changed (Lisp_Object specifier, struct window *w,
1246 Lisp_Object oldval) 1230 Lisp_Object oldval)
1247 { 1231 {
1248 enum toolbar_pos pos = decode_toolbar_position (Vdefault_toolbar_position); 1232 recompute_overlaying_specifier (Vtoolbar);
1249
1250 Fset_specifier_dirty_flag (Vtoolbar[pos]);
1251 } 1233 }
1252 1234
1253 static void 1235 static void
1254 toolbar_size_changed_in_frame (Lisp_Object specifier, struct frame *f, 1236 toolbar_size_changed_in_frame (Lisp_Object specifier, struct frame *f,
1255 Lisp_Object oldval) 1237 Lisp_Object oldval)
1311 1293
1312 static void 1294 static void
1313 default_toolbar_size_changed_in_frame (Lisp_Object specifier, struct frame *f, 1295 default_toolbar_size_changed_in_frame (Lisp_Object specifier, struct frame *f,
1314 Lisp_Object oldval) 1296 Lisp_Object oldval)
1315 { 1297 {
1316 enum toolbar_pos pos = decode_toolbar_position (Vdefault_toolbar_position); 1298 recompute_overlaying_specifier (Vtoolbar_size);
1317
1318 Fset_specifier_dirty_flag (Vtoolbar_size[pos]);
1319
1320 /* Let redisplay know that something has possibly changed. */
1321 MARK_TOOLBAR_CHANGED;
1322 } 1299 }
1323 1300
1324 static void 1301 static void
1325 default_toolbar_border_width_changed_in_frame (Lisp_Object specifier, 1302 default_toolbar_border_width_changed_in_frame (Lisp_Object specifier,
1326 struct frame *f, 1303 struct frame *f,
1327 Lisp_Object oldval) 1304 Lisp_Object oldval)
1328 { 1305 {
1329 enum toolbar_pos pos = decode_toolbar_position (Vdefault_toolbar_position); 1306 recompute_overlaying_specifier (Vtoolbar_border_width);
1330
1331 Fset_specifier_dirty_flag (Vtoolbar_border_width[pos]);
1332
1333 /* Let redisplay know that something has possibly changed. */
1334 MARK_TOOLBAR_CHANGED;
1335 } 1307 }
1336 1308
1337 static void 1309 static void
1338 default_toolbar_visible_p_changed_in_frame (Lisp_Object specifier, 1310 default_toolbar_visible_p_changed_in_frame (Lisp_Object specifier,
1339 struct frame *f, 1311 struct frame *f,
1340 Lisp_Object oldval) 1312 Lisp_Object oldval)
1341 { 1313 {
1342 enum toolbar_pos pos = decode_toolbar_position (Vdefault_toolbar_position); 1314 recompute_overlaying_specifier (Vtoolbar_visible_p);
1343 1315 }
1344 Fset_specifier_dirty_flag (Vtoolbar_visible_p[pos]); 1316
1345 1317 static void
1346 /* Let redisplay know that something has possibly changed. */ 1318 toolbar_geometry_changed_in_window (Lisp_Object specifier, struct window *w,
1319 Lisp_Object oldval)
1320 {
1347 MARK_TOOLBAR_CHANGED; 1321 MARK_TOOLBAR_CHANGED;
1348 } 1322 MARK_WINDOWS_CHANGED (w);
1349 1323 }
1324
1325 static void
1326 default_toolbar_size_changed_in_window (Lisp_Object specifier, struct window *w,
1327 Lisp_Object oldval)
1328 {
1329 recompute_overlaying_specifier (Vtoolbar_size);
1330 }
1331
1332 static void
1333 default_toolbar_border_width_changed_in_window (Lisp_Object specifier,
1334 struct window *w,
1335 Lisp_Object oldval)
1336 {
1337 recompute_overlaying_specifier (Vtoolbar_border_width);
1338 }
1339
1340 static void
1341 default_toolbar_visible_p_changed_in_window (Lisp_Object specifier,
1342 struct window *w,
1343 Lisp_Object oldval)
1344 {
1345 recompute_overlaying_specifier (Vtoolbar_visible_p);
1346 }
1350 1347
1351 static void 1348 static void
1352 toolbar_buttons_captioned_p_changed (Lisp_Object specifier, struct window *w, 1349 toolbar_buttons_captioned_p_changed (Lisp_Object specifier, struct window *w,
1353 Lisp_Object oldval) 1350 Lisp_Object oldval)
1354 { 1351 {
1640 */ ); 1637 */ );
1641 Vdefault_toolbar_height = Fmake_specifier (Qnatnum); 1638 Vdefault_toolbar_height = Fmake_specifier (Qnatnum);
1642 set_specifier_caching (Vdefault_toolbar_height, 1639 set_specifier_caching (Vdefault_toolbar_height,
1643 slot_offset (struct window, 1640 slot_offset (struct window,
1644 default_toolbar_height), 1641 default_toolbar_height),
1645 some_window_value_changed, 1642 default_toolbar_size_changed_in_window,
1646 slot_offset (struct frame, 1643 slot_offset (struct frame,
1647 default_toolbar_height), 1644 default_toolbar_height),
1648 default_toolbar_size_changed_in_frame); 1645 default_toolbar_size_changed_in_frame);
1649 1646
1650 DEFVAR_SPECIFIER ("default-toolbar-width", &Vdefault_toolbar_width /* 1647 DEFVAR_SPECIFIER ("default-toolbar-width", &Vdefault_toolbar_width /*
1655 */ ); 1652 */ );
1656 Vdefault_toolbar_width = Fmake_specifier (Qnatnum); 1653 Vdefault_toolbar_width = Fmake_specifier (Qnatnum);
1657 set_specifier_caching (Vdefault_toolbar_width, 1654 set_specifier_caching (Vdefault_toolbar_width,
1658 slot_offset (struct window, 1655 slot_offset (struct window,
1659 default_toolbar_width), 1656 default_toolbar_width),
1660 some_window_value_changed, 1657 default_toolbar_size_changed_in_window,
1661 slot_offset (struct frame, 1658 slot_offset (struct frame,
1662 default_toolbar_width), 1659 default_toolbar_width),
1663 default_toolbar_size_changed_in_frame); 1660 default_toolbar_size_changed_in_frame);
1664 1661
1665 DEFVAR_SPECIFIER ("top-toolbar-height", 1662 DEFVAR_SPECIFIER ("top-toolbar-height",
1671 */ ); 1668 */ );
1672 Vtoolbar_size[TOP_TOOLBAR] = Fmake_specifier (Qnatnum); 1669 Vtoolbar_size[TOP_TOOLBAR] = Fmake_specifier (Qnatnum);
1673 set_specifier_caching (Vtoolbar_size[TOP_TOOLBAR], 1670 set_specifier_caching (Vtoolbar_size[TOP_TOOLBAR],
1674 slot_offset (struct window, 1671 slot_offset (struct window,
1675 toolbar_size[TOP_TOOLBAR]), 1672 toolbar_size[TOP_TOOLBAR]),
1676 some_window_value_changed, 1673 toolbar_geometry_changed_in_window,
1677 slot_offset (struct frame, 1674 slot_offset (struct frame,
1678 toolbar_size[TOP_TOOLBAR]), 1675 toolbar_size[TOP_TOOLBAR]),
1679 toolbar_size_changed_in_frame); 1676 toolbar_size_changed_in_frame);
1680 1677
1681 DEFVAR_SPECIFIER ("bottom-toolbar-height", 1678 DEFVAR_SPECIFIER ("bottom-toolbar-height",
1687 */ ); 1684 */ );
1688 Vtoolbar_size[BOTTOM_TOOLBAR] = Fmake_specifier (Qnatnum); 1685 Vtoolbar_size[BOTTOM_TOOLBAR] = Fmake_specifier (Qnatnum);
1689 set_specifier_caching (Vtoolbar_size[BOTTOM_TOOLBAR], 1686 set_specifier_caching (Vtoolbar_size[BOTTOM_TOOLBAR],
1690 slot_offset (struct window, 1687 slot_offset (struct window,
1691 toolbar_size[BOTTOM_TOOLBAR]), 1688 toolbar_size[BOTTOM_TOOLBAR]),
1692 some_window_value_changed, 1689 toolbar_geometry_changed_in_window,
1693 slot_offset (struct frame, 1690 slot_offset (struct frame,
1694 toolbar_size[BOTTOM_TOOLBAR]), 1691 toolbar_size[BOTTOM_TOOLBAR]),
1695 toolbar_size_changed_in_frame); 1692 toolbar_size_changed_in_frame);
1696 1693
1697 DEFVAR_SPECIFIER ("left-toolbar-width", 1694 DEFVAR_SPECIFIER ("left-toolbar-width",
1703 */ ); 1700 */ );
1704 Vtoolbar_size[LEFT_TOOLBAR] = Fmake_specifier (Qnatnum); 1701 Vtoolbar_size[LEFT_TOOLBAR] = Fmake_specifier (Qnatnum);
1705 set_specifier_caching (Vtoolbar_size[LEFT_TOOLBAR], 1702 set_specifier_caching (Vtoolbar_size[LEFT_TOOLBAR],
1706 slot_offset (struct window, 1703 slot_offset (struct window,
1707 toolbar_size[LEFT_TOOLBAR]), 1704 toolbar_size[LEFT_TOOLBAR]),
1708 some_window_value_changed, 1705 toolbar_geometry_changed_in_window,
1709 slot_offset (struct frame, 1706 slot_offset (struct frame,
1710 toolbar_size[LEFT_TOOLBAR]), 1707 toolbar_size[LEFT_TOOLBAR]),
1711 toolbar_size_changed_in_frame); 1708 toolbar_size_changed_in_frame);
1712 1709
1713 DEFVAR_SPECIFIER ("right-toolbar-width", 1710 DEFVAR_SPECIFIER ("right-toolbar-width",
1719 */ ); 1716 */ );
1720 Vtoolbar_size[RIGHT_TOOLBAR] = Fmake_specifier (Qnatnum); 1717 Vtoolbar_size[RIGHT_TOOLBAR] = Fmake_specifier (Qnatnum);
1721 set_specifier_caching (Vtoolbar_size[RIGHT_TOOLBAR], 1718 set_specifier_caching (Vtoolbar_size[RIGHT_TOOLBAR],
1722 slot_offset (struct window, 1719 slot_offset (struct window,
1723 toolbar_size[RIGHT_TOOLBAR]), 1720 toolbar_size[RIGHT_TOOLBAR]),
1724 some_window_value_changed, 1721 toolbar_geometry_changed_in_window,
1725 slot_offset (struct frame, 1722 slot_offset (struct frame,
1726 toolbar_size[RIGHT_TOOLBAR]), 1723 toolbar_size[RIGHT_TOOLBAR]),
1727 toolbar_size_changed_in_frame); 1724 toolbar_size_changed_in_frame);
1728 1725
1729 fb = Qnil; 1726 fb = Qnil;
1784 */ ); 1781 */ );
1785 Vdefault_toolbar_border_width = Fmake_specifier (Qnatnum); 1782 Vdefault_toolbar_border_width = Fmake_specifier (Qnatnum);
1786 set_specifier_caching (Vdefault_toolbar_border_width, 1783 set_specifier_caching (Vdefault_toolbar_border_width,
1787 slot_offset (struct window, 1784 slot_offset (struct window,
1788 default_toolbar_border_width), 1785 default_toolbar_border_width),
1789 some_window_value_changed, 1786 default_toolbar_border_width_changed_in_window,
1790 slot_offset (struct frame, 1787 slot_offset (struct frame,
1791 default_toolbar_border_width), 1788 default_toolbar_border_width),
1792 default_toolbar_border_width_changed_in_frame); 1789 default_toolbar_border_width_changed_in_frame);
1793 1790
1794 DEFVAR_SPECIFIER ("top-toolbar-border-width", 1791 DEFVAR_SPECIFIER ("top-toolbar-border-width",
1800 */ ); 1797 */ );
1801 Vtoolbar_border_width[TOP_TOOLBAR] = Fmake_specifier (Qnatnum); 1798 Vtoolbar_border_width[TOP_TOOLBAR] = Fmake_specifier (Qnatnum);
1802 set_specifier_caching (Vtoolbar_border_width[TOP_TOOLBAR], 1799 set_specifier_caching (Vtoolbar_border_width[TOP_TOOLBAR],
1803 slot_offset (struct window, 1800 slot_offset (struct window,
1804 toolbar_border_width[TOP_TOOLBAR]), 1801 toolbar_border_width[TOP_TOOLBAR]),
1805 some_window_value_changed, 1802 toolbar_geometry_changed_in_window,
1806 slot_offset (struct frame, 1803 slot_offset (struct frame,
1807 toolbar_border_width[TOP_TOOLBAR]), 1804 toolbar_border_width[TOP_TOOLBAR]),
1808 toolbar_border_width_changed_in_frame); 1805 toolbar_border_width_changed_in_frame);
1809 1806
1810 DEFVAR_SPECIFIER ("bottom-toolbar-border-width", 1807 DEFVAR_SPECIFIER ("bottom-toolbar-border-width",
1816 */ ); 1813 */ );
1817 Vtoolbar_border_width[BOTTOM_TOOLBAR] = Fmake_specifier (Qnatnum); 1814 Vtoolbar_border_width[BOTTOM_TOOLBAR] = Fmake_specifier (Qnatnum);
1818 set_specifier_caching (Vtoolbar_border_width[BOTTOM_TOOLBAR], 1815 set_specifier_caching (Vtoolbar_border_width[BOTTOM_TOOLBAR],
1819 slot_offset (struct window, 1816 slot_offset (struct window,
1820 toolbar_border_width[BOTTOM_TOOLBAR]), 1817 toolbar_border_width[BOTTOM_TOOLBAR]),
1821 some_window_value_changed, 1818 toolbar_geometry_changed_in_window,
1822 slot_offset (struct frame, 1819 slot_offset (struct frame,
1823 toolbar_border_width[BOTTOM_TOOLBAR]), 1820 toolbar_border_width[BOTTOM_TOOLBAR]),
1824 toolbar_border_width_changed_in_frame); 1821 toolbar_border_width_changed_in_frame);
1825 1822
1826 DEFVAR_SPECIFIER ("left-toolbar-border-width", 1823 DEFVAR_SPECIFIER ("left-toolbar-border-width",
1832 */ ); 1829 */ );
1833 Vtoolbar_border_width[LEFT_TOOLBAR] = Fmake_specifier (Qnatnum); 1830 Vtoolbar_border_width[LEFT_TOOLBAR] = Fmake_specifier (Qnatnum);
1834 set_specifier_caching (Vtoolbar_border_width[LEFT_TOOLBAR], 1831 set_specifier_caching (Vtoolbar_border_width[LEFT_TOOLBAR],
1835 slot_offset (struct window, 1832 slot_offset (struct window,
1836 toolbar_border_width[LEFT_TOOLBAR]), 1833 toolbar_border_width[LEFT_TOOLBAR]),
1837 some_window_value_changed, 1834 toolbar_geometry_changed_in_window,
1838 slot_offset (struct frame, 1835 slot_offset (struct frame,
1839 toolbar_border_width[LEFT_TOOLBAR]), 1836 toolbar_border_width[LEFT_TOOLBAR]),
1840 toolbar_border_width_changed_in_frame); 1837 toolbar_border_width_changed_in_frame);
1841 1838
1842 DEFVAR_SPECIFIER ("right-toolbar-border-width", 1839 DEFVAR_SPECIFIER ("right-toolbar-border-width",
1848 */ ); 1845 */ );
1849 Vtoolbar_border_width[RIGHT_TOOLBAR] = Fmake_specifier (Qnatnum); 1846 Vtoolbar_border_width[RIGHT_TOOLBAR] = Fmake_specifier (Qnatnum);
1850 set_specifier_caching (Vtoolbar_border_width[RIGHT_TOOLBAR], 1847 set_specifier_caching (Vtoolbar_border_width[RIGHT_TOOLBAR],
1851 slot_offset (struct window, 1848 slot_offset (struct window,
1852 toolbar_border_width[RIGHT_TOOLBAR]), 1849 toolbar_border_width[RIGHT_TOOLBAR]),
1853 some_window_value_changed, 1850 toolbar_geometry_changed_in_window,
1854 slot_offset (struct frame, 1851 slot_offset (struct frame,
1855 toolbar_border_width[RIGHT_TOOLBAR]), 1852 toolbar_border_width[RIGHT_TOOLBAR]),
1856 toolbar_border_width_changed_in_frame); 1853 toolbar_border_width_changed_in_frame);
1857 1854
1858 fb = Qnil; 1855 fb = Qnil;
1896 */ ); 1893 */ );
1897 Vdefault_toolbar_visible_p = Fmake_specifier (Qboolean); 1894 Vdefault_toolbar_visible_p = Fmake_specifier (Qboolean);
1898 set_specifier_caching (Vdefault_toolbar_visible_p, 1895 set_specifier_caching (Vdefault_toolbar_visible_p,
1899 slot_offset (struct window, 1896 slot_offset (struct window,
1900 default_toolbar_visible_p), 1897 default_toolbar_visible_p),
1901 some_window_value_changed, 1898 default_toolbar_visible_p_changed_in_window,
1902 slot_offset (struct frame, 1899 slot_offset (struct frame,
1903 default_toolbar_visible_p), 1900 default_toolbar_visible_p),
1904 default_toolbar_visible_p_changed_in_frame); 1901 default_toolbar_visible_p_changed_in_frame);
1905 1902
1906 DEFVAR_SPECIFIER ("top-toolbar-visible-p", 1903 DEFVAR_SPECIFIER ("top-toolbar-visible-p",
1912 */ ); 1909 */ );
1913 Vtoolbar_visible_p[TOP_TOOLBAR] = Fmake_specifier (Qboolean); 1910 Vtoolbar_visible_p[TOP_TOOLBAR] = Fmake_specifier (Qboolean);
1914 set_specifier_caching (Vtoolbar_visible_p[TOP_TOOLBAR], 1911 set_specifier_caching (Vtoolbar_visible_p[TOP_TOOLBAR],
1915 slot_offset (struct window, 1912 slot_offset (struct window,
1916 toolbar_visible_p[TOP_TOOLBAR]), 1913 toolbar_visible_p[TOP_TOOLBAR]),
1917 some_window_value_changed, 1914 toolbar_geometry_changed_in_window,
1918 slot_offset (struct frame, 1915 slot_offset (struct frame,
1919 toolbar_visible_p[TOP_TOOLBAR]), 1916 toolbar_visible_p[TOP_TOOLBAR]),
1920 toolbar_visible_p_changed_in_frame); 1917 toolbar_visible_p_changed_in_frame);
1921 1918
1922 DEFVAR_SPECIFIER ("bottom-toolbar-visible-p", 1919 DEFVAR_SPECIFIER ("bottom-toolbar-visible-p",
1928 */ ); 1925 */ );
1929 Vtoolbar_visible_p[BOTTOM_TOOLBAR] = Fmake_specifier (Qboolean); 1926 Vtoolbar_visible_p[BOTTOM_TOOLBAR] = Fmake_specifier (Qboolean);
1930 set_specifier_caching (Vtoolbar_visible_p[BOTTOM_TOOLBAR], 1927 set_specifier_caching (Vtoolbar_visible_p[BOTTOM_TOOLBAR],
1931 slot_offset (struct window, 1928 slot_offset (struct window,
1932 toolbar_visible_p[BOTTOM_TOOLBAR]), 1929 toolbar_visible_p[BOTTOM_TOOLBAR]),
1933 some_window_value_changed, 1930 toolbar_geometry_changed_in_window,
1934 slot_offset (struct frame, 1931 slot_offset (struct frame,
1935 toolbar_visible_p[BOTTOM_TOOLBAR]), 1932 toolbar_visible_p[BOTTOM_TOOLBAR]),
1936 toolbar_visible_p_changed_in_frame); 1933 toolbar_visible_p_changed_in_frame);
1937 1934
1938 DEFVAR_SPECIFIER ("left-toolbar-visible-p", 1935 DEFVAR_SPECIFIER ("left-toolbar-visible-p",
1944 */ ); 1941 */ );
1945 Vtoolbar_visible_p[LEFT_TOOLBAR] = Fmake_specifier (Qboolean); 1942 Vtoolbar_visible_p[LEFT_TOOLBAR] = Fmake_specifier (Qboolean);
1946 set_specifier_caching (Vtoolbar_visible_p[LEFT_TOOLBAR], 1943 set_specifier_caching (Vtoolbar_visible_p[LEFT_TOOLBAR],
1947 slot_offset (struct window, 1944 slot_offset (struct window,
1948 toolbar_visible_p[LEFT_TOOLBAR]), 1945 toolbar_visible_p[LEFT_TOOLBAR]),
1949 some_window_value_changed, 1946 toolbar_geometry_changed_in_window,
1950 slot_offset (struct frame, 1947 slot_offset (struct frame,
1951 toolbar_visible_p[LEFT_TOOLBAR]), 1948 toolbar_visible_p[LEFT_TOOLBAR]),
1952 toolbar_visible_p_changed_in_frame); 1949 toolbar_visible_p_changed_in_frame);
1953 1950
1954 DEFVAR_SPECIFIER ("right-toolbar-visible-p", 1951 DEFVAR_SPECIFIER ("right-toolbar-visible-p",
1960 */ ); 1957 */ );
1961 Vtoolbar_visible_p[RIGHT_TOOLBAR] = Fmake_specifier (Qboolean); 1958 Vtoolbar_visible_p[RIGHT_TOOLBAR] = Fmake_specifier (Qboolean);
1962 set_specifier_caching (Vtoolbar_visible_p[RIGHT_TOOLBAR], 1959 set_specifier_caching (Vtoolbar_visible_p[RIGHT_TOOLBAR],
1963 slot_offset (struct window, 1960 slot_offset (struct window,
1964 toolbar_visible_p[RIGHT_TOOLBAR]), 1961 toolbar_visible_p[RIGHT_TOOLBAR]),
1965 some_window_value_changed, 1962 toolbar_geometry_changed_in_window,
1966 slot_offset (struct frame, 1963 slot_offset (struct frame,
1967 toolbar_visible_p[RIGHT_TOOLBAR]), 1964 toolbar_visible_p[RIGHT_TOOLBAR]),
1968 toolbar_visible_p_changed_in_frame); 1965 toolbar_visible_p_changed_in_frame);
1969 1966
1970 /* initially, top inherits from default; this can be 1967 /* initially, top inherits from default; this can be