comparison src/window.c @ 255:084402c475ba r20-5b26

Import from CVS: tag r20-5b26
author cvs
date Mon, 13 Aug 2007 10:21:18 +0200
parents 677f6a0ee643
children 65c19d2020f7
comparison
equal deleted inserted replaced
254:e92abcaa252b 255:084402c475ba
4479 int hscroll; 4479 int hscroll;
4480 int parent_index; /* index into saved_windows */ 4480 int parent_index; /* index into saved_windows */
4481 int prev_index; /* index into saved_windows */ 4481 int prev_index; /* index into saved_windows */
4482 Lisp_Object dedicated; 4482 Lisp_Object dedicated;
4483 char start_at_line_beg; /* boolean */ 4483 char start_at_line_beg; /* boolean */
4484 Lisp_Object display_table;
4485 Lisp_Object modeline_shadow_thickness;
4486 Lisp_Object has_modeline_p;
4487 #ifdef HAVE_SCROLLBARS
4488 Lisp_Object scrollbar_width;
4489 Lisp_Object scrollbar_height;
4490 Lisp_Object scrollbar_pointer;
4491 #endif /* HAVE_SCROLLBARS */
4492 #ifdef HAVE_TOOLBARS
4493 Lisp_Object toolbar[4];
4494 Lisp_Object toolbar_size[4];
4495 Lisp_Object toolbar_border_width[4];
4496 Lisp_Object toolbar_visible_p[4];
4497 Lisp_Object toolbar_buttons_captioned_p;
4498 Lisp_Object default_toolbar;
4499 Lisp_Object default_toolbar_width, default_toolbar_height;
4500 Lisp_Object default_toolbar_visible_p;
4501 Lisp_Object default_toolbar_border_width;
4502 #endif /* HAVE_TOOLBARS */
4503 Lisp_Object left_margin_width, right_margin_width;
4504 Lisp_Object minimum_line_ascent, minimum_line_descent;
4505 Lisp_Object use_left_overflow, use_right_overflow;
4506 #ifdef HAVE_MENUBARS
4507 Lisp_Object menubar_visible_p;
4508 #endif /* HAVE_MENUBARS */
4509 Lisp_Object text_cursor_visible_p;
4484 }; 4510 };
4485 4511
4486 /* If you add anything to this structure make sure window_config_equal 4512 /* If you add anything to this structure make sure window_config_equal
4487 knows about it. */ 4513 knows about it. */
4488 struct window_config 4514 struct window_config
4593 win1->pixel_height == win2->pixel_height && 4619 win1->pixel_height == win2->pixel_height &&
4594 win1->hscroll == win2->hscroll && 4620 win1->hscroll == win2->hscroll &&
4595 win1->parent_index == win2->parent_index && 4621 win1->parent_index == win2->parent_index &&
4596 win1->prev_index == win2->prev_index && 4622 win1->prev_index == win2->prev_index &&
4597 EQ (win1->dedicated, win2->dedicated) && 4623 EQ (win1->dedicated, win2->dedicated) &&
4598 win1->start_at_line_beg == win2->start_at_line_beg; 4624 win1->start_at_line_beg == win2->start_at_line_beg &&
4625 internal_equal(win1->display_table, win2->display_table, 0) &&
4626 EQ(win1->modeline_shadow_thickness, win2->modeline_shadow_thickness) &&
4627 EQ(win1->has_modeline_p, win2->has_modeline_p) &&
4628 #ifdef HAVE_SCROLLBARS
4629 EQ(win1->scrollbar_width, win2->scrollbar_width) &&
4630 EQ(win1->scrollbar_height, win2->scrollbar_height) &&
4631 EQ(win1->scrollbar_pointer, win2->scrollbar_pointer) &&
4632 #endif /* HAVE_SCROLLBARS */
4633 #ifdef HAVE_TOOLBARS
4634 internal_equal(win1->toolbar[0], win2->toolbar[0], 0) &&
4635 internal_equal(win1->toolbar[1], win2->toolbar[1], 0) &&
4636 internal_equal(win1->toolbar[2], win2->toolbar[2], 0) &&
4637 internal_equal(win1->toolbar[3], win2->toolbar[3], 0) &&
4638 internal_equal(win1->toolbar_border_width[0], win2->toolbar_border_width[0], 0) &&
4639 internal_equal(win1->toolbar_border_width[1], win2->toolbar_border_width[1], 0) &&
4640 internal_equal(win1->toolbar_border_width[2], win2->toolbar_border_width[2], 0) &&
4641 internal_equal(win1->toolbar_border_width[3], win2->toolbar_border_width[3], 0) &&
4642 internal_equal(win1->toolbar_size[0], win2->toolbar_size[0], 0) &&
4643 internal_equal(win1->toolbar_size[1], win2->toolbar_size[1], 0) &&
4644 internal_equal(win1->toolbar_size[2], win2->toolbar_size[2], 0) &&
4645 internal_equal(win1->toolbar_size[3], win2->toolbar_size[3], 0) &&
4646 internal_equal(win1->toolbar_visible_p[0], win2->toolbar_visible_p[0], 0) &&
4647 internal_equal(win1->toolbar_visible_p[1], win2->toolbar_visible_p[1], 0) &&
4648 internal_equal(win1->toolbar_visible_p[2], win2->toolbar_visible_p[2], 0) &&
4649 internal_equal(win1->toolbar_visible_p[3], win2->toolbar_visible_p[3], 0) &&
4650 EQ(win1->toolbar_buttons_captioned_p, win2->toolbar_buttons_captioned_p) &&
4651 internal_equal(win1->default_toolbar, win2->default_toolbar, 0) &&
4652 EQ(win1->default_toolbar_width, win2->default_toolbar_width) &&
4653 EQ(win1->default_toolbar_height, win2->default_toolbar_height) &&
4654 EQ(win1->default_toolbar_visible_p, win2->default_toolbar_visible_p) &&
4655 EQ(win1->default_toolbar_border_width, win2->default_toolbar_border_width) &&
4656 #endif /* HAVE_TOOLBARS */
4657 EQ(win1->left_margin_width, win2->left_margin_width) &&
4658 EQ(win1->right_margin_width, win2->right_margin_width) &&
4659 EQ(win1->minimum_line_ascent, win2->minimum_line_ascent) &&
4660 EQ(win1->minimum_line_descent, win2->minimum_line_descent) &&
4661 EQ(win1->use_left_overflow, win2->use_left_overflow) &&
4662 EQ(win1->use_right_overflow, win2->use_right_overflow) &&
4663 #ifdef HAVE_MENUBARS
4664 EQ(win1->menubar_visible_p, win2->menubar_visible_p) &&
4665 #endif /* HAVE_MENUBARS */
4666 EQ(win1->text_cursor_visible_p, win2->text_cursor_visible_p);
4599 } 4667 }
4600 4668
4601 /* Returns a boolean indicating whether the two given configurations 4669 /* Returns a boolean indicating whether the two given configurations
4602 are identical. */ 4670 are identical. */
4603 static int 4671 static int
4870 WINDOW_LEFT (w) = WINDOW_LEFT (p); 4938 WINDOW_LEFT (w) = WINDOW_LEFT (p);
4871 WINDOW_TOP (w) = WINDOW_TOP (p); 4939 WINDOW_TOP (w) = WINDOW_TOP (p);
4872 WINDOW_WIDTH (w) = WINDOW_WIDTH (p); 4940 WINDOW_WIDTH (w) = WINDOW_WIDTH (p);
4873 WINDOW_HEIGHT (w) = WINDOW_HEIGHT (p); 4941 WINDOW_HEIGHT (w) = WINDOW_HEIGHT (p);
4874 w->hscroll = p->hscroll; 4942 w->hscroll = p->hscroll;
4875 /* #### Here we need to restore the saved specs for 4943 w->display_table = p->display_table;
4876 has-modeline-p, scrollbar-width, scrollbar-height, 4944 w->modeline_shadow_thickness = p->modeline_shadow_thickness;
4877 modeline-shadow-thickness, left-margin-width, 4945 w->has_modeline_p = p->has_modeline_p;
4878 right-margin-width, and current-display-table. */ 4946 #ifdef HAVE_SCROLLBARS
4947 w->scrollbar_width = p->scrollbar_width;
4948 w->scrollbar_height = p->scrollbar_height;
4949 w->scrollbar_pointer = p->scrollbar_pointer;
4950 #endif /* HAVE_SCROLLBARS */
4951 #ifdef HAVE_TOOLBARS
4952 {
4953 int ix;
4954 for (ix = 0; ix < 4; ix++)
4955 {
4956 w->toolbar[ix] = p->toolbar[ix];
4957 w->toolbar_size[ix] = p->toolbar_size[ix];
4958 w->toolbar_border_width[ix] = p->toolbar_border_width[ix];
4959 w->toolbar_visible_p[ix] = p->toolbar_visible_p[ix];
4960 }
4961 }
4962 w->toolbar_buttons_captioned_p = p->toolbar_buttons_captioned_p;
4963 w->default_toolbar = p->default_toolbar;
4964 w->default_toolbar_width = p->default_toolbar_width;
4965 w->default_toolbar_visible_p = p->default_toolbar_visible_p;
4966 w->default_toolbar_border_width = p->default_toolbar_border_width;
4967 #endif /* HAVE_TOOLBARS */
4968 w->left_margin_width = p->left_margin_width;
4969 w->right_margin_width = p->right_margin_width;
4970 w->minimum_line_ascent = p->minimum_line_ascent;
4971 w->minimum_line_descent = p->minimum_line_descent;
4972 w->use_left_overflow = p->use_left_overflow;
4973 w->use_right_overflow = p->use_right_overflow;
4974 #ifdef HAVE_MENUBARS
4975 w->menubar_visible_p = p->menubar_visible_p;
4976 #endif /* HAVE_MENUBARS */
4977 w->text_cursor_visible_p = p->text_cursor_visible_p;
4879 w->dedicated = p->dedicated; 4978 w->dedicated = p->dedicated;
4880 w->line_cache_last_updated = Qzero; 4979 w->line_cache_last_updated = Qzero;
4881 SET_LAST_MODIFIED (w, 1); 4980 SET_LAST_MODIFIED (w, 1);
4882 SET_LAST_FACECHANGE (w); 4981 SET_LAST_FACECHANGE (w);
4883 w->config_mark = 0; 4982 w->config_mark = 0;
5106 WINDOW_LEFT (p) = WINDOW_LEFT (w); 5205 WINDOW_LEFT (p) = WINDOW_LEFT (w);
5107 WINDOW_TOP (p) = WINDOW_TOP (w); 5206 WINDOW_TOP (p) = WINDOW_TOP (w);
5108 WINDOW_WIDTH (p) = WINDOW_WIDTH (w); 5207 WINDOW_WIDTH (p) = WINDOW_WIDTH (w);
5109 WINDOW_HEIGHT (p) = WINDOW_HEIGHT (w); 5208 WINDOW_HEIGHT (p) = WINDOW_HEIGHT (w);
5110 p->hscroll = w->hscroll; 5209 p->hscroll = w->hscroll;
5111 /* #### Here we need to save the specs for 5210 p->display_table = w->display_table;
5112 has-modeline-p, scrollbar-width, scrollbar-height, 5211 p->modeline_shadow_thickness = w->modeline_shadow_thickness;
5113 modeline-shadow-thickness, left-margin-width, 5212 p->has_modeline_p = w->has_modeline_p;
5114 right-margin-width, current-display-table, etc. */ 5213 #ifdef HAVE_SCROLLBARS
5214 p->scrollbar_width = w->scrollbar_width;
5215 p->scrollbar_height = w->scrollbar_height;
5216 p->scrollbar_pointer = w->scrollbar_pointer;
5217 #endif /* HAVE_SCROLLBARS */
5218 #ifdef HAVE_TOOLBARS
5219 {
5220 int ix;
5221 for (ix = 0; ix < 4; ix++)
5222 {
5223 p->toolbar[ix] = w->toolbar[ix];
5224 p->toolbar_size[ix] = w->toolbar_size[ix];
5225 p->toolbar_border_width[ix] = w->toolbar_border_width[ix];
5226 p->toolbar_visible_p[ix] = w->toolbar_visible_p[ix];
5227 }
5228 }
5229 p->toolbar_buttons_captioned_p = w->toolbar_buttons_captioned_p;
5230 p->default_toolbar = w->default_toolbar;
5231 p->default_toolbar_width = w->default_toolbar_width;
5232 p->default_toolbar_visible_p = w->default_toolbar_visible_p;
5233 p->default_toolbar_border_width = w->default_toolbar_border_width;
5234 #endif /* HAVE_TOOLBARS */
5235 p->left_margin_width = w->left_margin_width;
5236 p->right_margin_width = w->right_margin_width;
5237 p->minimum_line_ascent = w->minimum_line_ascent;
5238 p->minimum_line_descent = w->minimum_line_descent;
5239 p->use_left_overflow = w->use_left_overflow;
5240 p->use_right_overflow = w->use_right_overflow;
5241 #ifdef HAVE_MENUBARS
5242 p->menubar_visible_p = w->menubar_visible_p;
5243 #endif /* HAVE_MENUBARS */
5244 p->text_cursor_visible_p = w->text_cursor_visible_p;
5245
5115 if (!NILP (w->buffer)) 5246 if (!NILP (w->buffer))
5116 { 5247 {
5117 /* Save w's value of point in the window configuration. 5248 /* Save w's value of point in the window configuration.
5118 If w is the selected window, then get the value of point 5249 If w is the selected window, then get the value of point
5119 from the buffer; pointm is garbage in the selected window. */ 5250 from the buffer; pointm is garbage in the selected window. */