comparison src/window.c @ 257:65c19d2020f7 r20-5b27

Import from CVS: tag r20-5b27
author cvs
date Mon, 13 Aug 2007 10:22:03 +0200
parents 084402c475ba
children 11cf20601dec
comparison
equal deleted inserted replaced
256:19076a51efde 257:65c19d2020f7
1352 (window)) 1352 (window))
1353 { 1353 {
1354 return make_int (decode_window (window)->hscroll); 1354 return make_int (decode_window (window)->hscroll);
1355 } 1355 }
1356 1356
1357 DEFUN ("modeline-hscroll", Fmodeline_hscroll, 0, 1, 0, /*
1358 Return the number of columns by which WINDOW's modeline is scrolled from
1359 left margin. If the window has no modeline, return nil.
1360 */
1361 (window))
1362 {
1363 struct window *w;
1364
1365 w = decode_window (window);
1366 return (WINDOW_HAS_MODELINE_P (w)) ? make_int (w->modeline_hscroll) : Qnil;
1367 }
1368
1357 DEFUN ("set-window-hscroll", Fset_window_hscroll, 2, 2, 0, /* 1369 DEFUN ("set-window-hscroll", Fset_window_hscroll, 2, 2, 0, /*
1358 Set number of columns WINDOW is scrolled from left margin to NCOL. 1370 Set number of columns WINDOW is scrolled from left margin to NCOL.
1359 NCOL should be zero or positive. 1371 NCOL should be zero or positive.
1360 */ 1372 */
1361 (window, ncol)) 1373 (window, ncol))
1369 w = decode_window (window); 1381 w = decode_window (window);
1370 if (w->hscroll != ncols) 1382 if (w->hscroll != ncols)
1371 MARK_CLIP_CHANGED; /* FSF marks differently but we aren't FSF. */ 1383 MARK_CLIP_CHANGED; /* FSF marks differently but we aren't FSF. */
1372 w->hscroll = ncols; 1384 w->hscroll = ncols;
1373 return ncol; 1385 return ncol;
1386 }
1387
1388 DEFUN ("set-modeline-hscroll", Fset_modeline_hscroll, 2, 2, 0, /*
1389 Set number of columns WINDOW's modeline is scrolled from left margin to NCOL.
1390 NCOL should be zero or positive. If NCOL is negative, it will be forced to 0.
1391 If the window has no modeline, do nothing and return nil.
1392 */
1393 (window, ncol))
1394 {
1395 struct window *w;
1396 int ncols;
1397
1398 w = decode_window (window);
1399 if (WINDOW_HAS_MODELINE_P (w))
1400 {
1401 CHECK_INT (ncol);
1402 ncols = XINT (ncol);
1403 if (ncols < 0) ncols = 0;
1404 if (w->modeline_hscroll != ncols)
1405 MARK_MODELINE_CHANGED;
1406 w->modeline_hscroll = ncols;
1407 return ncol;
1408 }
1409 return Qnil;
1374 } 1410 }
1375 1411
1376 #if 0 /* bogus crock */ 1412 #if 0 /* bogus crock */
1377 1413
1378 xxDEFUN ("window-redisplay-end-trigger", 1414 xxDEFUN ("window-redisplay-end-trigger",
3147 Fmake_frame_visible (WINDOW_FRAME (XWINDOW (window))); 3183 Fmake_frame_visible (WINDOW_FRAME (XWINDOW (window)));
3148 3184
3149 Vminibuf_scroll_window = window; 3185 Vminibuf_scroll_window = window;
3150 w = XWINDOW (window); 3186 w = XWINDOW (window);
3151 w->hscroll = 0; 3187 w->hscroll = 0;
3188 w->modeline_hscroll = 0;
3152 set_marker_restricted (w->start[CURRENT_DISP], make_int (1), buf); 3189 set_marker_restricted (w->start[CURRENT_DISP], make_int (1), buf);
3153 set_marker_restricted (w->pointm[CURRENT_DISP], make_int (1), buf); 3190 set_marker_restricted (w->pointm[CURRENT_DISP], make_int (1), buf);
3154 set_marker_restricted (w->sb_point, make_int (1), buf); 3191 set_marker_restricted (w->sb_point, make_int (1), buf);
3155 3192
3156 /* Run temp-buffer-show-hook, with the chosen window selected. */ 3193 /* Run temp-buffer-show-hook, with the chosen window selected. */
4475 int pixel_left; 4512 int pixel_left;
4476 int pixel_top; 4513 int pixel_top;
4477 int pixel_width; 4514 int pixel_width;
4478 int pixel_height; 4515 int pixel_height;
4479 int hscroll; 4516 int hscroll;
4517 int modeline_hscroll;
4480 int parent_index; /* index into saved_windows */ 4518 int parent_index; /* index into saved_windows */
4481 int prev_index; /* index into saved_windows */ 4519 int prev_index; /* index into saved_windows */
4482 Lisp_Object dedicated; 4520 Lisp_Object dedicated;
4483 char start_at_line_beg; /* boolean */ 4521 char start_at_line_beg; /* boolean */
4484 Lisp_Object display_table; 4522 Lisp_Object display_table;
4616 win1->pixel_left == win2->pixel_left && 4654 win1->pixel_left == win2->pixel_left &&
4617 win1->pixel_top == win2->pixel_top && 4655 win1->pixel_top == win2->pixel_top &&
4618 win1->pixel_width == win2->pixel_width && 4656 win1->pixel_width == win2->pixel_width &&
4619 win1->pixel_height == win2->pixel_height && 4657 win1->pixel_height == win2->pixel_height &&
4620 win1->hscroll == win2->hscroll && 4658 win1->hscroll == win2->hscroll &&
4659 win1->modeline_hscroll == win2->modeline_hscroll &&
4621 win1->parent_index == win2->parent_index && 4660 win1->parent_index == win2->parent_index &&
4622 win1->prev_index == win2->prev_index && 4661 win1->prev_index == win2->prev_index &&
4623 EQ (win1->dedicated, win2->dedicated) && 4662 EQ (win1->dedicated, win2->dedicated) &&
4624 win1->start_at_line_beg == win2->start_at_line_beg && 4663 win1->start_at_line_beg == win2->start_at_line_beg &&
4625 internal_equal(win1->display_table, win2->display_table, 0) && 4664 internal_equal(win1->display_table, win2->display_table, 0) &&
4938 WINDOW_LEFT (w) = WINDOW_LEFT (p); 4977 WINDOW_LEFT (w) = WINDOW_LEFT (p);
4939 WINDOW_TOP (w) = WINDOW_TOP (p); 4978 WINDOW_TOP (w) = WINDOW_TOP (p);
4940 WINDOW_WIDTH (w) = WINDOW_WIDTH (p); 4979 WINDOW_WIDTH (w) = WINDOW_WIDTH (p);
4941 WINDOW_HEIGHT (w) = WINDOW_HEIGHT (p); 4980 WINDOW_HEIGHT (w) = WINDOW_HEIGHT (p);
4942 w->hscroll = p->hscroll; 4981 w->hscroll = p->hscroll;
4982 w->modeline_hscroll = p->modeline_hscroll;
4943 w->display_table = p->display_table; 4983 w->display_table = p->display_table;
4944 w->modeline_shadow_thickness = p->modeline_shadow_thickness; 4984 w->modeline_shadow_thickness = p->modeline_shadow_thickness;
4945 w->has_modeline_p = p->has_modeline_p; 4985 w->has_modeline_p = p->has_modeline_p;
4946 #ifdef HAVE_SCROLLBARS 4986 #ifdef HAVE_SCROLLBARS
4947 w->scrollbar_width = p->scrollbar_width; 4987 w->scrollbar_width = p->scrollbar_width;
5205 WINDOW_LEFT (p) = WINDOW_LEFT (w); 5245 WINDOW_LEFT (p) = WINDOW_LEFT (w);
5206 WINDOW_TOP (p) = WINDOW_TOP (w); 5246 WINDOW_TOP (p) = WINDOW_TOP (w);
5207 WINDOW_WIDTH (p) = WINDOW_WIDTH (w); 5247 WINDOW_WIDTH (p) = WINDOW_WIDTH (w);
5208 WINDOW_HEIGHT (p) = WINDOW_HEIGHT (w); 5248 WINDOW_HEIGHT (p) = WINDOW_HEIGHT (w);
5209 p->hscroll = w->hscroll; 5249 p->hscroll = w->hscroll;
5250 p->modeline_hscroll = w->modeline_hscroll;
5210 p->display_table = w->display_table; 5251 p->display_table = w->display_table;
5211 p->modeline_shadow_thickness = w->modeline_shadow_thickness; 5252 p->modeline_shadow_thickness = w->modeline_shadow_thickness;
5212 p->has_modeline_p = w->has_modeline_p; 5253 p->has_modeline_p = w->has_modeline_p;
5213 #ifdef HAVE_SCROLLBARS 5254 #ifdef HAVE_SCROLLBARS
5214 p->scrollbar_width = w->scrollbar_width; 5255 p->scrollbar_width = w->scrollbar_width;
5463 DEFSUBR (Fwindow_displayed_height); 5504 DEFSUBR (Fwindow_displayed_height);
5464 DEFSUBR (Fwindow_width); 5505 DEFSUBR (Fwindow_width);
5465 DEFSUBR (Fwindow_pixel_height); 5506 DEFSUBR (Fwindow_pixel_height);
5466 DEFSUBR (Fwindow_pixel_width); 5507 DEFSUBR (Fwindow_pixel_width);
5467 DEFSUBR (Fwindow_hscroll); 5508 DEFSUBR (Fwindow_hscroll);
5509 DEFSUBR (Fmodeline_hscroll);
5468 #if 0 /* bogus crock */ 5510 #if 0 /* bogus crock */
5469 DEFSUBR (Fwindow_redisplay_end_trigger); 5511 DEFSUBR (Fwindow_redisplay_end_trigger);
5470 DEFSUBR (Fset_window_redisplay_end_trigger); 5512 DEFSUBR (Fset_window_redisplay_end_trigger);
5471 #endif 5513 #endif
5472 DEFSUBR (Fset_window_hscroll); 5514 DEFSUBR (Fset_window_hscroll);
5515 DEFSUBR (Fset_modeline_hscroll);
5473 DEFSUBR (Fwindow_pixel_edges); 5516 DEFSUBR (Fwindow_pixel_edges);
5474 DEFSUBR (Fwindow_point); 5517 DEFSUBR (Fwindow_point);
5475 DEFSUBR (Fwindow_start); 5518 DEFSUBR (Fwindow_start);
5476 DEFSUBR (Fwindow_end); 5519 DEFSUBR (Fwindow_end);
5477 DEFSUBR (Fset_window_point); 5520 DEFSUBR (Fset_window_point);