X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Ftoolbar.c;h=573241acc5cc061cfe55899345c8896473744b3b;hb=557a8105b1bfe98e9a52f16fc2d4b10107f66b19;hp=cff25ac0d60dd0f38986503ed901294f0ab3e536;hpb=b5eeb6918c29470b36f8461c402eb0c65cb19bd2;p=chise%2Fxemacs-chise.git diff --git a/src/toolbar.c b/src/toolbar.c index cff25ac..573241a 100644 --- a/src/toolbar.c +++ b/src/toolbar.c @@ -73,24 +73,8 @@ mark_toolbar_button (Lisp_Object obj) return data->help_string; } -static void -print_toolbar_button (Lisp_Object obj, Lisp_Object printcharfun, - int escapeflag) -{ - struct toolbar_button *tb = XTOOLBAR_BUTTON (obj); - char buf[100]; - - if (print_readably) - error ("printing unreadable object #", - tb->header.uid); - - sprintf (buf, "#", tb->header.uid); - write_c_string (buf, printcharfun); -} - DEFINE_LRECORD_IMPLEMENTATION ("toolbar-button", toolbar_button, - mark_toolbar_button, print_toolbar_button, - 0, 0, 0, 0, + mark_toolbar_button, 0, 0, 0, 0, 0, struct toolbar_button); DEFUN ("toolbar-button-p", Ftoolbar_button_p, 1, 1, 0, /* @@ -722,10 +706,10 @@ set_frame_toolbar (struct frame *f, enum toolbar_pos pos) static void compute_frame_toolbars_data (struct frame *f) { - set_frame_toolbar (f, TOP_TOOLBAR); - set_frame_toolbar (f, BOTTOM_TOOLBAR); - set_frame_toolbar (f, LEFT_TOOLBAR); - set_frame_toolbar (f, RIGHT_TOOLBAR); + set_frame_toolbar (f, TOP_TOOLBAR); + set_frame_toolbar (f, BOTTOM_TOOLBAR); + set_frame_toolbar (f, LEFT_TOOLBAR); + set_frame_toolbar (f, RIGHT_TOOLBAR); } void @@ -737,7 +721,7 @@ update_frame_toolbars (struct frame *f) && (f->toolbar_changed || f->frame_changed || f->clear)) { int pos; - + /* We're not officially "in redisplay", so we still have a chance to re-layout toolbars and windows. This is done here, because toolbar is the only thing which currently might @@ -1037,9 +1021,9 @@ whole, use `check-valid-instantiator' with a specifier type of 'toolbar. if (!CONSP (elt[0])) { /* We can't check the buffer-local here because we don't know - which buffer to check in. #### I think this is a bad thing. - See if we can't get enough information to this function so - that it can check. + which buffer to check in. #### I think this is a bad thing. + See if we can't get enough information to this function so + that it can check. #### Wrong. We shouldn't be checking the value at all here. The user might set or change the value at any time. */ @@ -1160,14 +1144,9 @@ toolbar_after_change (Lisp_Object specifier, Lisp_Object locale) DEFUN ("toolbar-specifier-p", Ftoolbar_specifier_p, 1, 1, 0, /* Return non-nil if OBJECT is a toolbar specifier. -Toolbar specifiers are used to specify the format of a toolbar. -The values of the variables `default-toolbar', `top-toolbar', -`left-toolbar', `right-toolbar', and `bottom-toolbar' are always -toolbar specifiers. - -Valid toolbar instantiators are called "toolbar descriptors" -and are lists of vectors. See `default-toolbar' for a description -of the exact format. + +See `make-toolbar-specifier' for a description of possible toolbar +instantiators. */ (object)) { @@ -1272,6 +1251,8 @@ toolbar_buttons_captioned_p_changed (Lisp_Object specifier, struct window *w, void syms_of_toolbar (void) { + INIT_LRECORD_IMPLEMENTATION (toolbar_button); + defsymbol (&Qtoolbar_buttonp, "toolbar-button-p"); defsymbol (&Q2D, "2D"); defsymbol (&Q3D, "3D"); @@ -1633,7 +1614,7 @@ See `default-toolbar-height' for more information. fb = Fcons (Fcons (list1 (Qx), make_int (DEFAULT_TOOLBAR_HEIGHT)), fb); #endif #ifdef HAVE_MS_WINDOWS - fb = Fcons (Fcons (list1 (Qmswindows), + fb = Fcons (Fcons (list1 (Qmswindows), make_int (MSWINDOWS_DEFAULT_TOOLBAR_HEIGHT)), fb); #endif if (!NILP (fb)) @@ -1647,7 +1628,7 @@ See `default-toolbar-height' for more information. fb = Fcons (Fcons (list1 (Qx), make_int (DEFAULT_TOOLBAR_WIDTH)), fb); #endif #ifdef HAVE_MS_WINDOWS - fb = Fcons (Fcons (list1 (Qmswindows), + fb = Fcons (Fcons (list1 (Qmswindows), make_int (MSWINDOWS_DEFAULT_TOOLBAR_WIDTH)), fb); #endif if (!NILP (fb))