comparison src/toolbar.c @ 412:697ef44129c6 r21-2-14

Import from CVS: tag r21-2-14
author cvs
date Mon, 13 Aug 2007 11:20:41 +0200
parents 501cfd01ee6d
children 41dbb7a9d5f2
comparison
equal deleted inserted replaced
411:12e008d41344 412:697ef44129c6
55 55
56 Lisp_Object Qinit_toolbar_from_resources; 56 Lisp_Object Qinit_toolbar_from_resources;
57 57
58 58
59 static Lisp_Object 59 static Lisp_Object
60 mark_toolbar_button (Lisp_Object obj) 60 mark_toolbar_button (Lisp_Object obj, void (*markobj) (Lisp_Object))
61 { 61 {
62 struct toolbar_button *data = XTOOLBAR_BUTTON (obj); 62 struct toolbar_button *data = XTOOLBAR_BUTTON (obj);
63 mark_object (data->next); 63 markobj (data->next);
64 mark_object (data->frame); 64 markobj (data->frame);
65 mark_object (data->up_glyph); 65 markobj (data->up_glyph);
66 mark_object (data->down_glyph); 66 markobj (data->down_glyph);
67 mark_object (data->disabled_glyph); 67 markobj (data->disabled_glyph);
68 mark_object (data->cap_up_glyph); 68 markobj (data->cap_up_glyph);
69 mark_object (data->cap_down_glyph); 69 markobj (data->cap_down_glyph);
70 mark_object (data->cap_disabled_glyph); 70 markobj (data->cap_disabled_glyph);
71 mark_object (data->callback); 71 markobj (data->callback);
72 mark_object (data->enabled_p); 72 markobj (data->enabled_p);
73 return data->help_string; 73 return data->help_string;
74 } 74 }
75 75
76 static void 76 static void
77 print_toolbar_button (Lisp_Object obj, Lisp_Object printcharfun, 77 print_toolbar_button (Lisp_Object obj, Lisp_Object printcharfun,
88 write_c_string (buf, printcharfun); 88 write_c_string (buf, printcharfun);
89 } 89 }
90 90
91 DEFINE_LRECORD_IMPLEMENTATION ("toolbar-button", toolbar_button, 91 DEFINE_LRECORD_IMPLEMENTATION ("toolbar-button", toolbar_button,
92 mark_toolbar_button, print_toolbar_button, 92 mark_toolbar_button, print_toolbar_button,
93 0, 0, 0, 0, 93 0, 0, 0,
94 struct toolbar_button); 94 struct toolbar_button);
95 95
96 DEFUN ("toolbar-button-p", Ftoolbar_button_p, 1, 1, 0, /* 96 DEFUN ("toolbar-button-p", Ftoolbar_button_p, 1, 1, 0, /*
97 Return non-nil if OBJECT is a toolbar button. 97 Return non-nil if OBJECT is a toolbar button.
98 */ 98 */
720 } 720 }
721 721
722 static void 722 static void
723 compute_frame_toolbars_data (struct frame *f) 723 compute_frame_toolbars_data (struct frame *f)
724 { 724 {
725 set_frame_toolbar (f, TOP_TOOLBAR); 725 set_frame_toolbar (f, TOP_TOOLBAR);
726 set_frame_toolbar (f, BOTTOM_TOOLBAR); 726 set_frame_toolbar (f, BOTTOM_TOOLBAR);
727 set_frame_toolbar (f, LEFT_TOOLBAR); 727 set_frame_toolbar (f, LEFT_TOOLBAR);
728 set_frame_toolbar (f, RIGHT_TOOLBAR); 728 set_frame_toolbar (f, RIGHT_TOOLBAR);
729 } 729 }
730 730
731 void 731 void
732 update_frame_toolbars (struct frame *f) 732 update_frame_toolbars (struct frame *f)
733 { 733 {
735 735
736 if (DEVICE_SUPPORTS_TOOLBARS_P (d) 736 if (DEVICE_SUPPORTS_TOOLBARS_P (d)
737 && (f->toolbar_changed || f->frame_changed || f->clear)) 737 && (f->toolbar_changed || f->frame_changed || f->clear))
738 { 738 {
739 int pos; 739 int pos;
740 740
741 /* We're not officially "in redisplay", so we still have a 741 /* We're not officially "in redisplay", so we still have a
742 chance to re-layout toolbars and windows. This is done here, 742 chance to re-layout toolbars and windows. This is done here,
743 because toolbar is the only thing which currently might 743 because toolbar is the only thing which currently might
744 necessitate this layout, as it is outside any windows. We 744 necessitate this layout, as it is outside any windows. We
745 take care not to change size if toolbar geometry is really 745 take care not to change size if toolbar geometry is really
1035 the sixth for the captioned disabled state. Only the up state is 1035 the sixth for the captioned disabled state. Only the up state is
1036 mandatory. */ 1036 mandatory. */
1037 if (!CONSP (elt[0])) 1037 if (!CONSP (elt[0]))
1038 { 1038 {
1039 /* We can't check the buffer-local here because we don't know 1039 /* We can't check the buffer-local here because we don't know
1040 which buffer to check in. #### I think this is a bad thing. 1040 which buffer to check in. #### I think this is a bad thing.
1041 See if we can't get enough information to this function so 1041 See if we can't get enough information to this function so
1042 that it can check. 1042 that it can check.
1043 1043
1044 #### Wrong. We shouldn't be checking the value at all here. 1044 #### Wrong. We shouldn't be checking the value at all here.
1045 The user might set or change the value at any time. */ 1045 The user might set or change the value at any time. */
1046 value = Fsymbol_value (elt[0]); 1046 value = Fsymbol_value (elt[0]);
1047 1047
1048 if (!CONSP (value)) 1048 if (!CONSP (value))
1158 MARK_TOOLBAR_CHANGED; 1158 MARK_TOOLBAR_CHANGED;
1159 } 1159 }
1160 1160
1161 DEFUN ("toolbar-specifier-p", Ftoolbar_specifier_p, 1, 1, 0, /* 1161 DEFUN ("toolbar-specifier-p", Ftoolbar_specifier_p, 1, 1, 0, /*
1162 Return non-nil if OBJECT is a toolbar specifier. 1162 Return non-nil if OBJECT is a toolbar specifier.
1163 1163 Toolbar specifiers are used to specify the format of a toolbar.
1164 See `make-toolbar-specifier' for a description of possible toolbar 1164 The values of the variables `default-toolbar', `top-toolbar',
1165 instantiators. 1165 `left-toolbar', `right-toolbar', and `bottom-toolbar' are always
1166 toolbar specifiers.
1167
1168 Valid toolbar instantiators are called "toolbar descriptors"
1169 and are lists of vectors. See `default-toolbar' for a description
1170 of the exact format.
1166 */ 1171 */
1167 (object)) 1172 (object))
1168 { 1173 {
1169 return TOOLBAR_SPECIFIERP (object) ? Qt : Qnil; 1174 return TOOLBAR_SPECIFIERP (object) ? Qt : Qnil;
1170 } 1175 }
1265 1270
1266 1271
1267 void 1272 void
1268 syms_of_toolbar (void) 1273 syms_of_toolbar (void)
1269 { 1274 {
1270 INIT_LRECORD_IMPLEMENTATION (toolbar_button);
1271
1272 defsymbol (&Qtoolbar_buttonp, "toolbar-button-p"); 1275 defsymbol (&Qtoolbar_buttonp, "toolbar-button-p");
1273 defsymbol (&Q2D, "2D"); 1276 defsymbol (&Q2D, "2D");
1274 defsymbol (&Q3D, "3D"); 1277 defsymbol (&Q3D, "3D");
1275 defsymbol (&Q2d, "2d"); 1278 defsymbol (&Q2d, "2d");
1276 defsymbol (&Q3d, "3d"); 1279 defsymbol (&Q3d, "3d");
1304 { 1307 {
1305 INITIALIZE_SPECIFIER_TYPE (toolbar, "toolbar", "toolbar-specifier-p"); 1308 INITIALIZE_SPECIFIER_TYPE (toolbar, "toolbar", "toolbar-specifier-p");
1306 1309
1307 SPECIFIER_HAS_METHOD (toolbar, validate); 1310 SPECIFIER_HAS_METHOD (toolbar, validate);
1308 SPECIFIER_HAS_METHOD (toolbar, after_change); 1311 SPECIFIER_HAS_METHOD (toolbar, after_change);
1309 }
1310
1311 void
1312 reinit_specifier_type_create_toolbar (void)
1313 {
1314 REINITIALIZE_SPECIFIER_TYPE (toolbar);
1315 } 1312 }
1316 1313
1317 void 1314 void
1318 specifier_vars_of_toolbar (void) 1315 specifier_vars_of_toolbar (void)
1319 { 1316 {
1429 Vdefault_toolbar = Fmake_specifier (Qtoolbar); 1426 Vdefault_toolbar = Fmake_specifier (Qtoolbar);
1430 /* #### It would be even nicer if the specifier caching 1427 /* #### It would be even nicer if the specifier caching
1431 automatically knew about specifier fallbacks, so we didn't 1428 automatically knew about specifier fallbacks, so we didn't
1432 have to do it ourselves. */ 1429 have to do it ourselves. */
1433 set_specifier_caching (Vdefault_toolbar, 1430 set_specifier_caching (Vdefault_toolbar,
1434 offsetof (struct window, default_toolbar), 1431 slot_offset (struct window,
1432 default_toolbar),
1435 default_toolbar_specs_changed, 1433 default_toolbar_specs_changed,
1436 0, 0); 1434 0, 0);
1437 1435
1438 DEFVAR_SPECIFIER ("top-toolbar", 1436 DEFVAR_SPECIFIER ("top-toolbar",
1439 &Vtoolbar[TOP_TOOLBAR] /* 1437 &Vtoolbar[TOP_TOOLBAR] /*
1441 Use `set-specifier' to change this. 1439 Use `set-specifier' to change this.
1442 See `default-toolbar' for a description of a valid toolbar instantiator. 1440 See `default-toolbar' for a description of a valid toolbar instantiator.
1443 */ ); 1441 */ );
1444 Vtoolbar[TOP_TOOLBAR] = Fmake_specifier (Qtoolbar); 1442 Vtoolbar[TOP_TOOLBAR] = Fmake_specifier (Qtoolbar);
1445 set_specifier_caching (Vtoolbar[TOP_TOOLBAR], 1443 set_specifier_caching (Vtoolbar[TOP_TOOLBAR],
1446 offsetof (struct window, toolbar[TOP_TOOLBAR]), 1444 slot_offset (struct window,
1445 toolbar[TOP_TOOLBAR]),
1447 toolbar_specs_changed, 1446 toolbar_specs_changed,
1448 0, 0); 1447 0, 0);
1449 1448
1450 DEFVAR_SPECIFIER ("bottom-toolbar", 1449 DEFVAR_SPECIFIER ("bottom-toolbar",
1451 &Vtoolbar[BOTTOM_TOOLBAR] /* 1450 &Vtoolbar[BOTTOM_TOOLBAR] /*
1458 `bottom-toolbar-height') is 0; thus, a bottom toolbar will not be 1457 `bottom-toolbar-height') is 0; thus, a bottom toolbar will not be
1459 displayed even if you provide a value for `bottom-toolbar'. 1458 displayed even if you provide a value for `bottom-toolbar'.
1460 */ ); 1459 */ );
1461 Vtoolbar[BOTTOM_TOOLBAR] = Fmake_specifier (Qtoolbar); 1460 Vtoolbar[BOTTOM_TOOLBAR] = Fmake_specifier (Qtoolbar);
1462 set_specifier_caching (Vtoolbar[BOTTOM_TOOLBAR], 1461 set_specifier_caching (Vtoolbar[BOTTOM_TOOLBAR],
1463 offsetof (struct window, toolbar[BOTTOM_TOOLBAR]), 1462 slot_offset (struct window,
1463 toolbar[BOTTOM_TOOLBAR]),
1464 toolbar_specs_changed, 1464 toolbar_specs_changed,
1465 0, 0); 1465 0, 0);
1466 1466
1467 DEFVAR_SPECIFIER ("left-toolbar", 1467 DEFVAR_SPECIFIER ("left-toolbar",
1468 &Vtoolbar[LEFT_TOOLBAR] /* 1468 &Vtoolbar[LEFT_TOOLBAR] /*
1475 `left-toolbar-width') is 0; thus, a left toolbar will not be 1475 `left-toolbar-width') is 0; thus, a left toolbar will not be
1476 displayed even if you provide a value for `left-toolbar'. 1476 displayed even if you provide a value for `left-toolbar'.
1477 */ ); 1477 */ );
1478 Vtoolbar[LEFT_TOOLBAR] = Fmake_specifier (Qtoolbar); 1478 Vtoolbar[LEFT_TOOLBAR] = Fmake_specifier (Qtoolbar);
1479 set_specifier_caching (Vtoolbar[LEFT_TOOLBAR], 1479 set_specifier_caching (Vtoolbar[LEFT_TOOLBAR],
1480 offsetof (struct window, toolbar[LEFT_TOOLBAR]), 1480 slot_offset (struct window,
1481 toolbar[LEFT_TOOLBAR]),
1481 toolbar_specs_changed, 1482 toolbar_specs_changed,
1482 0, 0); 1483 0, 0);
1483 1484
1484 DEFVAR_SPECIFIER ("right-toolbar", 1485 DEFVAR_SPECIFIER ("right-toolbar",
1485 &Vtoolbar[RIGHT_TOOLBAR] /* 1486 &Vtoolbar[RIGHT_TOOLBAR] /*
1492 `right-toolbar-width') is 0; thus, a right toolbar will not be 1493 `right-toolbar-width') is 0; thus, a right toolbar will not be
1493 displayed even if you provide a value for `right-toolbar'. 1494 displayed even if you provide a value for `right-toolbar'.
1494 */ ); 1495 */ );
1495 Vtoolbar[RIGHT_TOOLBAR] = Fmake_specifier (Qtoolbar); 1496 Vtoolbar[RIGHT_TOOLBAR] = Fmake_specifier (Qtoolbar);
1496 set_specifier_caching (Vtoolbar[RIGHT_TOOLBAR], 1497 set_specifier_caching (Vtoolbar[RIGHT_TOOLBAR],
1497 offsetof (struct window, toolbar[RIGHT_TOOLBAR]), 1498 slot_offset (struct window,
1499 toolbar[RIGHT_TOOLBAR]),
1498 toolbar_specs_changed, 1500 toolbar_specs_changed,
1499 0, 0); 1501 0, 0);
1500 1502
1501 /* initially, top inherits from default; this can be 1503 /* initially, top inherits from default; this can be
1502 changed with `set-default-toolbar-position'. */ 1504 changed with `set-default-toolbar-position'. */
1546 left toolbar but the selected window specifies that the left toolbar 1548 left toolbar but the selected window specifies that the left toolbar
1547 is not visible, so it is expanded to take up the slack. 1549 is not visible, so it is expanded to take up the slack.
1548 */ ); 1550 */ );
1549 Vdefault_toolbar_height = Fmake_specifier (Qnatnum); 1551 Vdefault_toolbar_height = Fmake_specifier (Qnatnum);
1550 set_specifier_caching (Vdefault_toolbar_height, 1552 set_specifier_caching (Vdefault_toolbar_height,
1551 offsetof (struct window, default_toolbar_height), 1553 slot_offset (struct window,
1554 default_toolbar_height),
1552 default_toolbar_size_changed_in_window, 1555 default_toolbar_size_changed_in_window,
1553 offsetof (struct frame, default_toolbar_height), 1556 slot_offset (struct frame,
1557 default_toolbar_height),
1554 default_toolbar_size_changed_in_frame); 1558 default_toolbar_size_changed_in_frame);
1555 1559
1556 DEFVAR_SPECIFIER ("default-toolbar-width", &Vdefault_toolbar_width /* 1560 DEFVAR_SPECIFIER ("default-toolbar-width", &Vdefault_toolbar_width /*
1557 *Width of the default toolbar, if it's oriented vertically. 1561 *Width of the default toolbar, if it's oriented vertically.
1558 This is a specifier; use `set-specifier' to change it. 1562 This is a specifier; use `set-specifier' to change it.
1559 1563
1560 See `default-toolbar-height' for more information. 1564 See `default-toolbar-height' for more information.
1561 */ ); 1565 */ );
1562 Vdefault_toolbar_width = Fmake_specifier (Qnatnum); 1566 Vdefault_toolbar_width = Fmake_specifier (Qnatnum);
1563 set_specifier_caching (Vdefault_toolbar_width, 1567 set_specifier_caching (Vdefault_toolbar_width,
1564 offsetof (struct window, default_toolbar_width), 1568 slot_offset (struct window,
1569 default_toolbar_width),
1565 default_toolbar_size_changed_in_window, 1570 default_toolbar_size_changed_in_window,
1566 offsetof (struct frame, default_toolbar_width), 1571 slot_offset (struct frame,
1572 default_toolbar_width),
1567 default_toolbar_size_changed_in_frame); 1573 default_toolbar_size_changed_in_frame);
1568 1574
1569 DEFVAR_SPECIFIER ("top-toolbar-height", 1575 DEFVAR_SPECIFIER ("top-toolbar-height",
1570 &Vtoolbar_size[TOP_TOOLBAR] /* 1576 &Vtoolbar_size[TOP_TOOLBAR] /*
1571 *Height of the top toolbar. 1577 *Height of the top toolbar.
1573 1579
1574 See `default-toolbar-height' for more information. 1580 See `default-toolbar-height' for more information.
1575 */ ); 1581 */ );
1576 Vtoolbar_size[TOP_TOOLBAR] = Fmake_specifier (Qnatnum); 1582 Vtoolbar_size[TOP_TOOLBAR] = Fmake_specifier (Qnatnum);
1577 set_specifier_caching (Vtoolbar_size[TOP_TOOLBAR], 1583 set_specifier_caching (Vtoolbar_size[TOP_TOOLBAR],
1578 offsetof (struct window, toolbar_size[TOP_TOOLBAR]), 1584 slot_offset (struct window,
1585 toolbar_size[TOP_TOOLBAR]),
1579 toolbar_geometry_changed_in_window, 1586 toolbar_geometry_changed_in_window,
1580 offsetof (struct frame, toolbar_size[TOP_TOOLBAR]), 1587 slot_offset (struct frame,
1588 toolbar_size[TOP_TOOLBAR]),
1581 frame_size_slipped); 1589 frame_size_slipped);
1582 1590
1583 DEFVAR_SPECIFIER ("bottom-toolbar-height", 1591 DEFVAR_SPECIFIER ("bottom-toolbar-height",
1584 &Vtoolbar_size[BOTTOM_TOOLBAR] /* 1592 &Vtoolbar_size[BOTTOM_TOOLBAR] /*
1585 *Height of the bottom toolbar. 1593 *Height of the bottom toolbar.
1587 1595
1588 See `default-toolbar-height' for more information. 1596 See `default-toolbar-height' for more information.
1589 */ ); 1597 */ );
1590 Vtoolbar_size[BOTTOM_TOOLBAR] = Fmake_specifier (Qnatnum); 1598 Vtoolbar_size[BOTTOM_TOOLBAR] = Fmake_specifier (Qnatnum);
1591 set_specifier_caching (Vtoolbar_size[BOTTOM_TOOLBAR], 1599 set_specifier_caching (Vtoolbar_size[BOTTOM_TOOLBAR],
1592 offsetof (struct window, toolbar_size[BOTTOM_TOOLBAR]), 1600 slot_offset (struct window,
1601 toolbar_size[BOTTOM_TOOLBAR]),
1593 toolbar_geometry_changed_in_window, 1602 toolbar_geometry_changed_in_window,
1594 offsetof (struct frame, toolbar_size[BOTTOM_TOOLBAR]), 1603 slot_offset (struct frame,
1604 toolbar_size[BOTTOM_TOOLBAR]),
1595 frame_size_slipped); 1605 frame_size_slipped);
1596 1606
1597 DEFVAR_SPECIFIER ("left-toolbar-width", 1607 DEFVAR_SPECIFIER ("left-toolbar-width",
1598 &Vtoolbar_size[LEFT_TOOLBAR] /* 1608 &Vtoolbar_size[LEFT_TOOLBAR] /*
1599 *Width of left toolbar. 1609 *Width of left toolbar.
1601 1611
1602 See `default-toolbar-height' for more information. 1612 See `default-toolbar-height' for more information.
1603 */ ); 1613 */ );
1604 Vtoolbar_size[LEFT_TOOLBAR] = Fmake_specifier (Qnatnum); 1614 Vtoolbar_size[LEFT_TOOLBAR] = Fmake_specifier (Qnatnum);
1605 set_specifier_caching (Vtoolbar_size[LEFT_TOOLBAR], 1615 set_specifier_caching (Vtoolbar_size[LEFT_TOOLBAR],
1606 offsetof (struct window, toolbar_size[LEFT_TOOLBAR]), 1616 slot_offset (struct window,
1617 toolbar_size[LEFT_TOOLBAR]),
1607 toolbar_geometry_changed_in_window, 1618 toolbar_geometry_changed_in_window,
1608 offsetof (struct frame, toolbar_size[LEFT_TOOLBAR]), 1619 slot_offset (struct frame,
1620 toolbar_size[LEFT_TOOLBAR]),
1609 frame_size_slipped); 1621 frame_size_slipped);
1610 1622
1611 DEFVAR_SPECIFIER ("right-toolbar-width", 1623 DEFVAR_SPECIFIER ("right-toolbar-width",
1612 &Vtoolbar_size[RIGHT_TOOLBAR] /* 1624 &Vtoolbar_size[RIGHT_TOOLBAR] /*
1613 *Width of right toolbar. 1625 *Width of right toolbar.
1615 1627
1616 See `default-toolbar-height' for more information. 1628 See `default-toolbar-height' for more information.
1617 */ ); 1629 */ );
1618 Vtoolbar_size[RIGHT_TOOLBAR] = Fmake_specifier (Qnatnum); 1630 Vtoolbar_size[RIGHT_TOOLBAR] = Fmake_specifier (Qnatnum);
1619 set_specifier_caching (Vtoolbar_size[RIGHT_TOOLBAR], 1631 set_specifier_caching (Vtoolbar_size[RIGHT_TOOLBAR],
1620 offsetof (struct window, toolbar_size[RIGHT_TOOLBAR]), 1632 slot_offset (struct window,
1633 toolbar_size[RIGHT_TOOLBAR]),
1621 toolbar_geometry_changed_in_window, 1634 toolbar_geometry_changed_in_window,
1622 offsetof (struct frame, toolbar_size[RIGHT_TOOLBAR]), 1635 slot_offset (struct frame,
1636 toolbar_size[RIGHT_TOOLBAR]),
1623 frame_size_slipped); 1637 frame_size_slipped);
1624 1638
1625 fb = Qnil; 1639 fb = Qnil;
1626 #ifdef HAVE_TTY 1640 #ifdef HAVE_TTY
1627 fb = Fcons (Fcons (list1 (Qtty), Qzero), fb); 1641 fb = Fcons (Fcons (list1 (Qtty), Qzero), fb);
1628 #endif 1642 #endif
1629 #ifdef HAVE_X_WINDOWS 1643 #ifdef HAVE_X_WINDOWS
1630 fb = Fcons (Fcons (list1 (Qx), make_int (DEFAULT_TOOLBAR_HEIGHT)), fb); 1644 fb = Fcons (Fcons (list1 (Qx), make_int (DEFAULT_TOOLBAR_HEIGHT)), fb);
1631 #endif 1645 #endif
1632 #ifdef HAVE_MS_WINDOWS 1646 #ifdef HAVE_MS_WINDOWS
1633 fb = Fcons (Fcons (list1 (Qmswindows), 1647 fb = Fcons (Fcons (list1 (Qmswindows),
1634 make_int (MSWINDOWS_DEFAULT_TOOLBAR_HEIGHT)), fb); 1648 make_int (MSWINDOWS_DEFAULT_TOOLBAR_HEIGHT)), fb);
1635 #endif 1649 #endif
1636 if (!NILP (fb)) 1650 if (!NILP (fb))
1637 set_specifier_fallback (Vdefault_toolbar_height, fb); 1651 set_specifier_fallback (Vdefault_toolbar_height, fb);
1638 1652
1642 #endif 1656 #endif
1643 #ifdef HAVE_X_WINDOWS 1657 #ifdef HAVE_X_WINDOWS
1644 fb = Fcons (Fcons (list1 (Qx), make_int (DEFAULT_TOOLBAR_WIDTH)), fb); 1658 fb = Fcons (Fcons (list1 (Qx), make_int (DEFAULT_TOOLBAR_WIDTH)), fb);
1645 #endif 1659 #endif
1646 #ifdef HAVE_MS_WINDOWS 1660 #ifdef HAVE_MS_WINDOWS
1647 fb = Fcons (Fcons (list1 (Qmswindows), 1661 fb = Fcons (Fcons (list1 (Qmswindows),
1648 make_int (MSWINDOWS_DEFAULT_TOOLBAR_WIDTH)), fb); 1662 make_int (MSWINDOWS_DEFAULT_TOOLBAR_WIDTH)), fb);
1649 #endif 1663 #endif
1650 if (!NILP (fb)) 1664 if (!NILP (fb))
1651 set_specifier_fallback (Vdefault_toolbar_width, fb); 1665 set_specifier_fallback (Vdefault_toolbar_width, fb);
1652 1666
1678 domain will result in a size change in the frame itself, while changing 1692 domain will result in a size change in the frame itself, while changing
1679 the value in a window domain will not. 1693 the value in a window domain will not.
1680 */ ); 1694 */ );
1681 Vdefault_toolbar_border_width = Fmake_specifier (Qnatnum); 1695 Vdefault_toolbar_border_width = Fmake_specifier (Qnatnum);
1682 set_specifier_caching (Vdefault_toolbar_border_width, 1696 set_specifier_caching (Vdefault_toolbar_border_width,
1683 offsetof (struct window, default_toolbar_border_width), 1697 slot_offset (struct window,
1698 default_toolbar_border_width),
1684 default_toolbar_border_width_changed_in_window, 1699 default_toolbar_border_width_changed_in_window,
1685 offsetof (struct frame, default_toolbar_border_width), 1700 slot_offset (struct frame,
1701 default_toolbar_border_width),
1686 default_toolbar_border_width_changed_in_frame); 1702 default_toolbar_border_width_changed_in_frame);
1687 1703
1688 DEFVAR_SPECIFIER ("top-toolbar-border-width", 1704 DEFVAR_SPECIFIER ("top-toolbar-border-width",
1689 &Vtoolbar_border_width[TOP_TOOLBAR] /* 1705 &Vtoolbar_border_width[TOP_TOOLBAR] /*
1690 *Border width of the top toolbar. 1706 *Border width of the top toolbar.
1692 1708
1693 See `default-toolbar-height' for more information. 1709 See `default-toolbar-height' for more information.
1694 */ ); 1710 */ );
1695 Vtoolbar_border_width[TOP_TOOLBAR] = Fmake_specifier (Qnatnum); 1711 Vtoolbar_border_width[TOP_TOOLBAR] = Fmake_specifier (Qnatnum);
1696 set_specifier_caching (Vtoolbar_border_width[TOP_TOOLBAR], 1712 set_specifier_caching (Vtoolbar_border_width[TOP_TOOLBAR],
1697 offsetof (struct window, 1713 slot_offset (struct window,
1698 toolbar_border_width[TOP_TOOLBAR]), 1714 toolbar_border_width[TOP_TOOLBAR]),
1699 toolbar_geometry_changed_in_window, 1715 toolbar_geometry_changed_in_window,
1700 offsetof (struct frame, 1716 slot_offset (struct frame,
1701 toolbar_border_width[TOP_TOOLBAR]), 1717 toolbar_border_width[TOP_TOOLBAR]),
1702 frame_size_slipped); 1718 frame_size_slipped);
1703 1719
1704 DEFVAR_SPECIFIER ("bottom-toolbar-border-width", 1720 DEFVAR_SPECIFIER ("bottom-toolbar-border-width",
1705 &Vtoolbar_border_width[BOTTOM_TOOLBAR] /* 1721 &Vtoolbar_border_width[BOTTOM_TOOLBAR] /*
1706 *Border width of the bottom toolbar. 1722 *Border width of the bottom toolbar.
1708 1724
1709 See `default-toolbar-height' for more information. 1725 See `default-toolbar-height' for more information.
1710 */ ); 1726 */ );
1711 Vtoolbar_border_width[BOTTOM_TOOLBAR] = Fmake_specifier (Qnatnum); 1727 Vtoolbar_border_width[BOTTOM_TOOLBAR] = Fmake_specifier (Qnatnum);
1712 set_specifier_caching (Vtoolbar_border_width[BOTTOM_TOOLBAR], 1728 set_specifier_caching (Vtoolbar_border_width[BOTTOM_TOOLBAR],
1713 offsetof (struct window, 1729 slot_offset (struct window,
1714 toolbar_border_width[BOTTOM_TOOLBAR]), 1730 toolbar_border_width[BOTTOM_TOOLBAR]),
1715 toolbar_geometry_changed_in_window, 1731 toolbar_geometry_changed_in_window,
1716 offsetof (struct frame, 1732 slot_offset (struct frame,
1717 toolbar_border_width[BOTTOM_TOOLBAR]), 1733 toolbar_border_width[BOTTOM_TOOLBAR]),
1718 frame_size_slipped); 1734 frame_size_slipped);
1719 1735
1720 DEFVAR_SPECIFIER ("left-toolbar-border-width", 1736 DEFVAR_SPECIFIER ("left-toolbar-border-width",
1721 &Vtoolbar_border_width[LEFT_TOOLBAR] /* 1737 &Vtoolbar_border_width[LEFT_TOOLBAR] /*
1722 *Border width of left toolbar. 1738 *Border width of left toolbar.
1724 1740
1725 See `default-toolbar-height' for more information. 1741 See `default-toolbar-height' for more information.
1726 */ ); 1742 */ );
1727 Vtoolbar_border_width[LEFT_TOOLBAR] = Fmake_specifier (Qnatnum); 1743 Vtoolbar_border_width[LEFT_TOOLBAR] = Fmake_specifier (Qnatnum);
1728 set_specifier_caching (Vtoolbar_border_width[LEFT_TOOLBAR], 1744 set_specifier_caching (Vtoolbar_border_width[LEFT_TOOLBAR],
1729 offsetof (struct window, 1745 slot_offset (struct window,
1730 toolbar_border_width[LEFT_TOOLBAR]), 1746 toolbar_border_width[LEFT_TOOLBAR]),
1731 toolbar_geometry_changed_in_window, 1747 toolbar_geometry_changed_in_window,
1732 offsetof (struct frame, 1748 slot_offset (struct frame,
1733 toolbar_border_width[LEFT_TOOLBAR]), 1749 toolbar_border_width[LEFT_TOOLBAR]),
1734 frame_size_slipped); 1750 frame_size_slipped);
1735 1751
1736 DEFVAR_SPECIFIER ("right-toolbar-border-width", 1752 DEFVAR_SPECIFIER ("right-toolbar-border-width",
1737 &Vtoolbar_border_width[RIGHT_TOOLBAR] /* 1753 &Vtoolbar_border_width[RIGHT_TOOLBAR] /*
1738 *Border width of right toolbar. 1754 *Border width of right toolbar.
1740 1756
1741 See `default-toolbar-height' for more information. 1757 See `default-toolbar-height' for more information.
1742 */ ); 1758 */ );
1743 Vtoolbar_border_width[RIGHT_TOOLBAR] = Fmake_specifier (Qnatnum); 1759 Vtoolbar_border_width[RIGHT_TOOLBAR] = Fmake_specifier (Qnatnum);
1744 set_specifier_caching (Vtoolbar_border_width[RIGHT_TOOLBAR], 1760 set_specifier_caching (Vtoolbar_border_width[RIGHT_TOOLBAR],
1745 offsetof (struct window, 1761 slot_offset (struct window,
1746 toolbar_border_width[RIGHT_TOOLBAR]), 1762 toolbar_border_width[RIGHT_TOOLBAR]),
1747 toolbar_geometry_changed_in_window, 1763 toolbar_geometry_changed_in_window,
1748 offsetof (struct frame, 1764 slot_offset (struct frame,
1749 toolbar_border_width[RIGHT_TOOLBAR]), 1765 toolbar_border_width[RIGHT_TOOLBAR]),
1750 frame_size_slipped); 1766 frame_size_slipped);
1751 1767
1752 fb = Qnil; 1768 fb = Qnil;
1753 #ifdef HAVE_TTY 1769 #ifdef HAVE_TTY
1754 fb = Fcons (Fcons (list1 (Qtty), Qzero), fb); 1770 fb = Fcons (Fcons (list1 (Qtty), Qzero), fb);
1788 `default-toolbar-visible-p' and all of the position-specific toolbar 1804 `default-toolbar-visible-p' and all of the position-specific toolbar
1789 visibility specifiers have a fallback value of true. 1805 visibility specifiers have a fallback value of true.
1790 */ ); 1806 */ );
1791 Vdefault_toolbar_visible_p = Fmake_specifier (Qboolean); 1807 Vdefault_toolbar_visible_p = Fmake_specifier (Qboolean);
1792 set_specifier_caching (Vdefault_toolbar_visible_p, 1808 set_specifier_caching (Vdefault_toolbar_visible_p,
1793 offsetof (struct window, default_toolbar_visible_p), 1809 slot_offset (struct window,
1810 default_toolbar_visible_p),
1794 default_toolbar_visible_p_changed_in_window, 1811 default_toolbar_visible_p_changed_in_window,
1795 offsetof (struct frame, default_toolbar_visible_p), 1812 slot_offset (struct frame,
1813 default_toolbar_visible_p),
1796 default_toolbar_visible_p_changed_in_frame); 1814 default_toolbar_visible_p_changed_in_frame);
1797 1815
1798 DEFVAR_SPECIFIER ("top-toolbar-visible-p", 1816 DEFVAR_SPECIFIER ("top-toolbar-visible-p",
1799 &Vtoolbar_visible_p[TOP_TOOLBAR] /* 1817 &Vtoolbar_visible_p[TOP_TOOLBAR] /*
1800 *Whether the top toolbar is visible. 1818 *Whether the top toolbar is visible.
1802 1820
1803 See `default-toolbar-visible-p' for more information. 1821 See `default-toolbar-visible-p' for more information.
1804 */ ); 1822 */ );
1805 Vtoolbar_visible_p[TOP_TOOLBAR] = Fmake_specifier (Qboolean); 1823 Vtoolbar_visible_p[TOP_TOOLBAR] = Fmake_specifier (Qboolean);
1806 set_specifier_caching (Vtoolbar_visible_p[TOP_TOOLBAR], 1824 set_specifier_caching (Vtoolbar_visible_p[TOP_TOOLBAR],
1807 offsetof (struct window, 1825 slot_offset (struct window,
1808 toolbar_visible_p[TOP_TOOLBAR]), 1826 toolbar_visible_p[TOP_TOOLBAR]),
1809 toolbar_geometry_changed_in_window, 1827 toolbar_geometry_changed_in_window,
1810 offsetof (struct frame, 1828 slot_offset (struct frame,
1811 toolbar_visible_p[TOP_TOOLBAR]), 1829 toolbar_visible_p[TOP_TOOLBAR]),
1812 frame_size_slipped); 1830 frame_size_slipped);
1813 1831
1814 DEFVAR_SPECIFIER ("bottom-toolbar-visible-p", 1832 DEFVAR_SPECIFIER ("bottom-toolbar-visible-p",
1815 &Vtoolbar_visible_p[BOTTOM_TOOLBAR] /* 1833 &Vtoolbar_visible_p[BOTTOM_TOOLBAR] /*
1816 *Whether the bottom toolbar is visible. 1834 *Whether the bottom toolbar is visible.
1818 1836
1819 See `default-toolbar-visible-p' for more information. 1837 See `default-toolbar-visible-p' for more information.
1820 */ ); 1838 */ );
1821 Vtoolbar_visible_p[BOTTOM_TOOLBAR] = Fmake_specifier (Qboolean); 1839 Vtoolbar_visible_p[BOTTOM_TOOLBAR] = Fmake_specifier (Qboolean);
1822 set_specifier_caching (Vtoolbar_visible_p[BOTTOM_TOOLBAR], 1840 set_specifier_caching (Vtoolbar_visible_p[BOTTOM_TOOLBAR],
1823 offsetof (struct window, 1841 slot_offset (struct window,
1824 toolbar_visible_p[BOTTOM_TOOLBAR]), 1842 toolbar_visible_p[BOTTOM_TOOLBAR]),
1825 toolbar_geometry_changed_in_window, 1843 toolbar_geometry_changed_in_window,
1826 offsetof (struct frame, 1844 slot_offset (struct frame,
1827 toolbar_visible_p[BOTTOM_TOOLBAR]), 1845 toolbar_visible_p[BOTTOM_TOOLBAR]),
1828 frame_size_slipped); 1846 frame_size_slipped);
1829 1847
1830 DEFVAR_SPECIFIER ("left-toolbar-visible-p", 1848 DEFVAR_SPECIFIER ("left-toolbar-visible-p",
1831 &Vtoolbar_visible_p[LEFT_TOOLBAR] /* 1849 &Vtoolbar_visible_p[LEFT_TOOLBAR] /*
1832 *Whether the left toolbar is visible. 1850 *Whether the left toolbar is visible.
1834 1852
1835 See `default-toolbar-visible-p' for more information. 1853 See `default-toolbar-visible-p' for more information.
1836 */ ); 1854 */ );
1837 Vtoolbar_visible_p[LEFT_TOOLBAR] = Fmake_specifier (Qboolean); 1855 Vtoolbar_visible_p[LEFT_TOOLBAR] = Fmake_specifier (Qboolean);
1838 set_specifier_caching (Vtoolbar_visible_p[LEFT_TOOLBAR], 1856 set_specifier_caching (Vtoolbar_visible_p[LEFT_TOOLBAR],
1839 offsetof (struct window, 1857 slot_offset (struct window,
1840 toolbar_visible_p[LEFT_TOOLBAR]), 1858 toolbar_visible_p[LEFT_TOOLBAR]),
1841 toolbar_geometry_changed_in_window, 1859 toolbar_geometry_changed_in_window,
1842 offsetof (struct frame, 1860 slot_offset (struct frame,
1843 toolbar_visible_p[LEFT_TOOLBAR]), 1861 toolbar_visible_p[LEFT_TOOLBAR]),
1844 frame_size_slipped); 1862 frame_size_slipped);
1845 1863
1846 DEFVAR_SPECIFIER ("right-toolbar-visible-p", 1864 DEFVAR_SPECIFIER ("right-toolbar-visible-p",
1847 &Vtoolbar_visible_p[RIGHT_TOOLBAR] /* 1865 &Vtoolbar_visible_p[RIGHT_TOOLBAR] /*
1848 *Whether the right toolbar is visible. 1866 *Whether the right toolbar is visible.
1850 1868
1851 See `default-toolbar-visible-p' for more information. 1869 See `default-toolbar-visible-p' for more information.
1852 */ ); 1870 */ );
1853 Vtoolbar_visible_p[RIGHT_TOOLBAR] = Fmake_specifier (Qboolean); 1871 Vtoolbar_visible_p[RIGHT_TOOLBAR] = Fmake_specifier (Qboolean);
1854 set_specifier_caching (Vtoolbar_visible_p[RIGHT_TOOLBAR], 1872 set_specifier_caching (Vtoolbar_visible_p[RIGHT_TOOLBAR],
1855 offsetof (struct window, 1873 slot_offset (struct window,
1856 toolbar_visible_p[RIGHT_TOOLBAR]), 1874 toolbar_visible_p[RIGHT_TOOLBAR]),
1857 toolbar_geometry_changed_in_window, 1875 toolbar_geometry_changed_in_window,
1858 offsetof (struct frame, 1876 slot_offset (struct frame,
1859 toolbar_visible_p[RIGHT_TOOLBAR]), 1877 toolbar_visible_p[RIGHT_TOOLBAR]),
1860 frame_size_slipped); 1878 frame_size_slipped);
1861 1879
1862 /* initially, top inherits from default; this can be 1880 /* initially, top inherits from default; this can be
1863 changed with `set-default-toolbar-position'. */ 1881 changed with `set-default-toolbar-position'. */
1864 fb = list1 (Fcons (Qnil, Qt)); 1882 fb = list1 (Fcons (Qnil, Qt));
1876 captioned versions specified. 1894 captioned versions specified.
1877 This is a specifier; use `set-specifier' to change it. 1895 This is a specifier; use `set-specifier' to change it.
1878 */ ); 1896 */ );
1879 Vtoolbar_buttons_captioned_p = Fmake_specifier (Qboolean); 1897 Vtoolbar_buttons_captioned_p = Fmake_specifier (Qboolean);
1880 set_specifier_caching (Vtoolbar_buttons_captioned_p, 1898 set_specifier_caching (Vtoolbar_buttons_captioned_p,
1881 offsetof (struct window, toolbar_buttons_captioned_p), 1899 slot_offset (struct window,
1900 toolbar_buttons_captioned_p),
1882 toolbar_buttons_captioned_p_changed, 1901 toolbar_buttons_captioned_p_changed,
1883 0, 0); 1902 0, 0);
1884 set_specifier_fallback (Vtoolbar_buttons_captioned_p, 1903 set_specifier_fallback (Vtoolbar_buttons_captioned_p,
1885 list1 (Fcons (Qnil, Qt))); 1904 list1 (Fcons (Qnil, Qt)));
1886 } 1905 }