diff options
| author | Jim Blandy | 1992-07-14 15:21:18 +0000 |
|---|---|---|
| committer | Jim Blandy | 1992-07-14 15:21:18 +0000 |
| commit | 44fa5b1e24d7722ef58d51b3d9fc12ed2b9696fc (patch) | |
| tree | 9488c9e6ef13c2c26eb13b42b16acbfd14d0ff92 /src | |
| parent | be14d3120a2502e5f06ef905f3b3e40a62c08d15 (diff) | |
| download | emacs-44fa5b1e24d7722ef58d51b3d9fc12ed2b9696fc.tar.gz emacs-44fa5b1e24d7722ef58d51b3d9fc12ed2b9696fc.zip | |
*** empty log message ***
Diffstat (limited to 'src')
| -rw-r--r-- | src/window.c | 494 | ||||
| -rw-r--r-- | src/window.h | 28 | ||||
| -rw-r--r-- | src/xdisp.c | 352 |
3 files changed, 437 insertions, 437 deletions
diff --git a/src/window.c b/src/window.c index 20281235dac..3b2c123a6ae 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -21,7 +21,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ | |||
| 21 | #include "config.h" | 21 | #include "config.h" |
| 22 | #include "lisp.h" | 22 | #include "lisp.h" |
| 23 | #include "buffer.h" | 23 | #include "buffer.h" |
| 24 | #include "screen.h" | 24 | #include "frame.h" |
| 25 | #include "window.h" | 25 | #include "window.h" |
| 26 | #include "commands.h" | 26 | #include "commands.h" |
| 27 | #include "indent.h" | 27 | #include "indent.h" |
| @@ -43,11 +43,11 @@ static struct window *decode_window(); | |||
| 43 | the top level editing loop at the end of each command. | 43 | the top level editing loop at the end of each command. |
| 44 | 44 | ||
| 45 | This value is always the same as | 45 | This value is always the same as |
| 46 | SCREEN_SELECTED_WINDOW (selected_screen). */ | 46 | FRAME_SELECTED_WINDOW (selected_frame). */ |
| 47 | 47 | ||
| 48 | Lisp_Object selected_window; | 48 | Lisp_Object selected_window; |
| 49 | 49 | ||
| 50 | /* The minibuffer window of the selected screen. | 50 | /* The minibuffer window of the selected frame. |
| 51 | Note that you cannot test for minibufferness of an arbitrary window | 51 | Note that you cannot test for minibufferness of an arbitrary window |
| 52 | by comparing against this; but you can test for minibufferness of | 52 | by comparing against this; but you can test for minibufferness of |
| 53 | the selected window. */ | 53 | the selected window. */ |
| @@ -76,11 +76,11 @@ int window_min_width; | |||
| 76 | /* Nonzero implies Fdisplay_buffer should create windows. */ | 76 | /* Nonzero implies Fdisplay_buffer should create windows. */ |
| 77 | int pop_up_windows; | 77 | int pop_up_windows; |
| 78 | 78 | ||
| 79 | /* Nonzero implies make new X screens for Fdisplay_buffer. */ | 79 | /* Nonzero implies make new frames for Fdisplay_buffer. */ |
| 80 | int pop_up_screens; | 80 | int pop_up_frames; |
| 81 | 81 | ||
| 82 | /* Non-nil means use this function instead of default */ | 82 | /* Non-nil means use this function instead of default */ |
| 83 | Lisp_Object Vpop_up_screen_function; | 83 | Lisp_Object Vpop_up_frame_function; |
| 84 | 84 | ||
| 85 | /* Function to call to handle Fdisplay_buffer. */ | 85 | /* Function to call to handle Fdisplay_buffer. */ |
| 86 | Lisp_Object Vdisplay_buffer_function; | 86 | Lisp_Object Vdisplay_buffer_function; |
| @@ -128,7 +128,7 @@ make_window () | |||
| 128 | p->start = Fmake_marker (); | 128 | p->start = Fmake_marker (); |
| 129 | p->pointm = Fmake_marker (); | 129 | p->pointm = Fmake_marker (); |
| 130 | XFASTINT (p->use_time) = 0; | 130 | XFASTINT (p->use_time) = 0; |
| 131 | p->screen = Qnil; | 131 | p->frame = Qnil; |
| 132 | p->display_table = Qnil; | 132 | p->display_table = Qnil; |
| 133 | p->dedicated = Qnil; | 133 | p->dedicated = Qnil; |
| 134 | return val; | 134 | return val; |
| @@ -145,9 +145,9 @@ DEFUN ("minibuffer-window", Fminibuffer_window, Sminibuffer_window, 0, 0, 0, | |||
| 145 | "Return the window used now for minibuffers.") | 145 | "Return the window used now for minibuffers.") |
| 146 | () | 146 | () |
| 147 | { | 147 | { |
| 148 | #ifdef MULTI_SCREEN | 148 | #ifdef MULTI_FRAME |
| 149 | choose_minibuf_screen (); | 149 | choose_minibuf_frame (); |
| 150 | #endif /* MULTI_SCREEN */ | 150 | #endif /* MULTI_FRAME */ |
| 151 | return minibuf_window; | 151 | return minibuf_window; |
| 152 | } | 152 | } |
| 153 | 153 | ||
| @@ -162,7 +162,7 @@ DEFUN ("window-minibuffer-p", Fwindow_minibuffer_p, Swindow_minibuffer_p, 1, 1, | |||
| 162 | 162 | ||
| 163 | DEFUN ("pos-visible-in-window-p", Fpos_visible_in_window_p, | 163 | DEFUN ("pos-visible-in-window-p", Fpos_visible_in_window_p, |
| 164 | Spos_visible_in_window_p, 0, 2, 0, | 164 | Spos_visible_in_window_p, 0, 2, 0, |
| 165 | "Return t if position POS is currently on the screen in WINDOW.\n\ | 165 | "Return t if position POS is currently on the frame in WINDOW.\n\ |
| 166 | Returns nil if that position is scrolled vertically out of view.\n\ | 166 | Returns nil if that position is scrolled vertically out of view.\n\ |
| 167 | POS defaults to point; WINDOW, to the selected window.") | 167 | POS defaults to point; WINDOW, to the selected window.") |
| 168 | (pos, window) | 168 | (pos, window) |
| @@ -198,7 +198,7 @@ POS defaults to point; WINDOW, to the selected window.") | |||
| 198 | buf = XBUFFER (w->buffer); | 198 | buf = XBUFFER (w->buffer); |
| 199 | if (XFASTINT (w->last_modified) >= BUF_MODIFF (buf)) | 199 | if (XFASTINT (w->last_modified) >= BUF_MODIFF (buf)) |
| 200 | { | 200 | { |
| 201 | /* If screen is up to date, | 201 | /* If frame is up to date, |
| 202 | use the info recorded about how much text fit on it. */ | 202 | use the info recorded about how much text fit on it. */ |
| 203 | if (posint < BUF_Z (buf) - XFASTINT (w->window_end_pos) | 203 | if (posint < BUF_Z (buf) - XFASTINT (w->window_end_pos) |
| 204 | || (XFASTINT (w->window_end_vpos) < height)) | 204 | || (XFASTINT (w->window_end_vpos) < height)) |
| @@ -214,7 +214,7 @@ POS defaults to point; WINDOW, to the selected window.") | |||
| 214 | posval = *compute_motion (top, 0, 0, posint, height, 0, | 214 | posval = *compute_motion (top, 0, 0, posint, height, 0, |
| 215 | XFASTINT (w->width) - 1 | 215 | XFASTINT (w->width) - 1 |
| 216 | - (XFASTINT (w->width) + XFASTINT (w->left) | 216 | - (XFASTINT (w->width) + XFASTINT (w->left) |
| 217 | != SCREEN_WIDTH (XSCREEN (w->screen))), | 217 | != FRAME_WIDTH (XFRAME (w->frame))), |
| 218 | XINT (w->hscroll), 0); | 218 | XINT (w->hscroll), 0); |
| 219 | 219 | ||
| 220 | return posval.vpos < height ? Qt : Qnil; | 220 | return posval.vpos < height ? Qt : Qnil; |
| @@ -258,7 +258,7 @@ DEFUN ("window-width", Fwindow_width, Swindow_width, 0, 1, 0, | |||
| 258 | 258 | ||
| 259 | /* If this window does not end at the right margin, | 259 | /* If this window does not end at the right margin, |
| 260 | must deduct one column for the border */ | 260 | must deduct one column for the border */ |
| 261 | if ((width + w->left) == SCREEN_WIDTH (XSCREEN (WINDOW_SCREEN (w)))) | 261 | if ((width + w->left) == FRAME_WIDTH (XFRAME (WINDOW_FRAME (w)))) |
| 262 | return width; | 262 | return width; |
| 263 | return width - 1; | 263 | return width - 1; |
| 264 | } | 264 | } |
| @@ -292,7 +292,7 @@ NCOL should be zero or positive.") | |||
| 292 | 292 | ||
| 293 | DEFUN ("window-edges", Fwindow_edges, Swindow_edges, 0, 1, 0, | 293 | DEFUN ("window-edges", Fwindow_edges, Swindow_edges, 0, 1, 0, |
| 294 | "Return a list of the edge coordinates of WINDOW.\n\ | 294 | "Return a list of the edge coordinates of WINDOW.\n\ |
| 295 | \(LEFT TOP RIGHT BOTTOM), all relative to 0, 0 at top left corner of screen.\n\ | 295 | \(LEFT TOP RIGHT BOTTOM), all relative to 0, 0 at top left corner of frame.\n\ |
| 296 | RIGHT is one more than the rightmost column used by WINDOW,\n\ | 296 | RIGHT is one more than the rightmost column used by WINDOW,\n\ |
| 297 | and BOTTOM is one more than the bottommost row used by WINDOW\n\ | 297 | and BOTTOM is one more than the bottommost row used by WINDOW\n\ |
| 298 | and its mode-line.") | 298 | and its mode-line.") |
| @@ -338,7 +338,7 @@ coordinates_in_window (w, x, y) | |||
| 338 | 338 | ||
| 339 | /* Is the character in the right border? */ | 339 | /* Is the character in the right border? */ |
| 340 | if (*x == left + width - 1 | 340 | if (*x == left + width - 1 |
| 341 | && left + width != SCREEN_WIDTH (XSCREEN (w->screen))) | 341 | && left + width != FRAME_WIDTH (XFRAME (w->frame))) |
| 342 | return 3; | 342 | return 3; |
| 343 | 343 | ||
| 344 | *x -= left; | 344 | *x -= left; |
| @@ -350,9 +350,9 @@ DEFUN ("coordinates-in-window-p", Fcoordinates_in_window_p, | |||
| 350 | Scoordinates_in_window_p, 2, 2, 0, | 350 | Scoordinates_in_window_p, 2, 2, 0, |
| 351 | "Return non-nil if COORDINATES are in WINDOW.\n\ | 351 | "Return non-nil if COORDINATES are in WINDOW.\n\ |
| 352 | COORDINATES is a cons of the form (X . Y), X and Y being distances\n\ | 352 | COORDINATES is a cons of the form (X . Y), X and Y being distances\n\ |
| 353 | measured in characters from the upper-left corner of the screen.\n\ | 353 | measured in characters from the upper-left corner of the frame.\n\ |
| 354 | (0 . 0) denotes the character in the upper left corner of the\n\ | 354 | (0 . 0) denotes the character in the upper left corner of the\n\ |
| 355 | screen.\n\ | 355 | frame.\n\ |
| 356 | If COORDINATES are in the text portion of WINDOW,\n\ | 356 | If COORDINATES are in the text portion of WINDOW,\n\ |
| 357 | the coordinates relative to the window are returned.\n\ | 357 | the coordinates relative to the window are returned.\n\ |
| 358 | If they are in the mode line of WINDOW, `mode-line' is returned.\n\ | 358 | If they are in the mode line of WINDOW, `mode-line' is returned.\n\ |
| @@ -393,14 +393,14 @@ If they are on the border between WINDOW and its right sibling,\n\ | |||
| 393 | right sibling, set it to 2; otherwise set it to 0. If there is no | 393 | right sibling, set it to 2; otherwise set it to 0. If there is no |
| 394 | window under x, y return nil and leave *part unmodified. */ | 394 | window under x, y return nil and leave *part unmodified. */ |
| 395 | Lisp_Object | 395 | Lisp_Object |
| 396 | window_from_coordinates (screen, x, y, part) | 396 | window_from_coordinates (frame, x, y, part) |
| 397 | SCREEN_PTR screen; | 397 | FRAME_PTR frame; |
| 398 | int x, y; | 398 | int x, y; |
| 399 | int *part; | 399 | int *part; |
| 400 | { | 400 | { |
| 401 | register Lisp_Object tem, first; | 401 | register Lisp_Object tem, first; |
| 402 | 402 | ||
| 403 | tem = first = SCREEN_SELECTED_WINDOW (screen); | 403 | tem = first = FRAME_SELECTED_WINDOW (frame); |
| 404 | 404 | ||
| 405 | do | 405 | do |
| 406 | { | 406 | { |
| @@ -420,23 +420,23 @@ window_from_coordinates (screen, x, y, part) | |||
| 420 | } | 420 | } |
| 421 | 421 | ||
| 422 | DEFUN ("window-at", Fwindow_at, Swindow_at, 2, 3, 0, | 422 | DEFUN ("window-at", Fwindow_at, Swindow_at, 2, 3, 0, |
| 423 | "Return window containing row ROW, column COLUMN on SCREEN.\n\ | 423 | "Return window containing row ROW, column COLUMN on FRAME.\n\ |
| 424 | If omitted, SCREEN defaults to the currently selected screen.\n\ | 424 | If omitted, FRAME defaults to the currently selected frame.\n\ |
| 425 | The top left corner of the screen is considered to be row 0,\n\ | 425 | The top left corner of the frame is considered to be row 0,\n\ |
| 426 | column 0.") | 426 | column 0.") |
| 427 | (row, column, screen) | 427 | (row, column, frame) |
| 428 | Lisp_Object row, column, screen; | 428 | Lisp_Object row, column, frame; |
| 429 | { | 429 | { |
| 430 | int part; | 430 | int part; |
| 431 | 431 | ||
| 432 | if (NILP (screen)) | 432 | if (NILP (frame)) |
| 433 | XSET (screen, Lisp_Screen, selected_screen); | 433 | XSET (frame, Lisp_Frame, selected_frame); |
| 434 | else | 434 | else |
| 435 | CHECK_LIVE_SCREEN (screen, 2); | 435 | CHECK_LIVE_FRAME (frame, 2); |
| 436 | CHECK_NUMBER (row, 0); | 436 | CHECK_NUMBER (row, 0); |
| 437 | CHECK_NUMBER (column, 1); | 437 | CHECK_NUMBER (column, 1); |
| 438 | 438 | ||
| 439 | return window_from_coordinates (XSCREEN (screen), | 439 | return window_from_coordinates (XFRAME (frame), |
| 440 | XINT (row), XINT (column), | 440 | XINT (row), XINT (column), |
| 441 | &part); | 441 | &part); |
| 442 | } | 442 | } |
| @@ -631,11 +631,11 @@ replace_window (old, replacement) | |||
| 631 | register Lisp_Object tem; | 631 | register Lisp_Object tem; |
| 632 | register struct window *o = XWINDOW (old), *p = XWINDOW (replacement); | 632 | register struct window *o = XWINDOW (old), *p = XWINDOW (replacement); |
| 633 | 633 | ||
| 634 | /* If OLD is its screen's root_window, then replacement is the new | 634 | /* If OLD is its frame's root_window, then replacement is the new |
| 635 | root_window for that screen. */ | 635 | root_window for that frame. */ |
| 636 | 636 | ||
| 637 | if (old == SCREEN_ROOT_WINDOW (XSCREEN (o->screen))) | 637 | if (old == FRAME_ROOT_WINDOW (XFRAME (o->frame))) |
| 638 | SCREEN_ROOT_WINDOW (XSCREEN (o->screen)) = replacement; | 638 | FRAME_ROOT_WINDOW (XFRAME (o->frame)) = replacement; |
| 639 | 639 | ||
| 640 | p->left = o->left; | 640 | p->left = o->left; |
| 641 | p->top = o->top; | 641 | p->top = o->top; |
| @@ -748,7 +748,7 @@ DEFUN ("delete-window", Fdelete_window, Sdelete_window, 0, 1, "", | |||
| 748 | } | 748 | } |
| 749 | 749 | ||
| 750 | 750 | ||
| 751 | extern Lisp_Object next_screen (), prev_screen (); | 751 | extern Lisp_Object next_frame (), prev_frame (); |
| 752 | 752 | ||
| 753 | DEFUN ("next-window", Fnext_window, Snext_window, 0, 3, 0, | 753 | DEFUN ("next-window", Fnext_window, Snext_window, 0, 3, 0, |
| 754 | "Return next window after WINDOW in canonical ordering of windows.\n\ | 754 | "Return next window after WINDOW in canonical ordering of windows.\n\ |
| @@ -759,17 +759,17 @@ if not active. MINIBUF nil or omitted means count the minibuffer iff\n\ | |||
| 759 | it is active. MINIBUF neither t nor nil means not to count the\n\ | 759 | it is active. MINIBUF neither t nor nil means not to count the\n\ |
| 760 | minibuffer even if it is active.\n\ | 760 | minibuffer even if it is active.\n\ |
| 761 | \n\ | 761 | \n\ |
| 762 | Several screens may share a single minibuffer; if the minibuffer\n\ | 762 | Several frames may share a single minibuffer; if the minibuffer\n\ |
| 763 | counts, all windows on all screens that share that minibuffer count\n\ | 763 | counts, all windows on all frames that share that minibuffer count\n\ |
| 764 | too. This means that next-window may be used to iterate through the\n\ | 764 | too. This means that next-window may be used to iterate through the\n\ |
| 765 | set of windows even when the minibuffer is on another screen. If the\n\ | 765 | set of windows even when the minibuffer is on another frame. If the\n\ |
| 766 | minibuffer does not count, only windows from WINDOW's screen count.\n\ | 766 | minibuffer does not count, only windows from WINDOW's frame count.\n\ |
| 767 | \n\ | 767 | \n\ |
| 768 | Optional third arg ALL-SCREENS t means include windows on all screens.\n\ | 768 | Optional third arg ALL-FRAMES t means include windows on all frames.\n\ |
| 769 | ALL-SCREENS nil or omitted means cycle within the screens as specified\n\ | 769 | ALL-FRAMES nil or omitted means cycle within the frames as specified\n\ |
| 770 | above. If neither nil nor t, restrict to WINDOW's screen.") | 770 | above. If neither nil nor t, restrict to WINDOW's frame.") |
| 771 | (window, minibuf, all_screens) | 771 | (window, minibuf, all_frames) |
| 772 | register Lisp_Object window, minibuf, all_screens; | 772 | register Lisp_Object window, minibuf, all_frames; |
| 773 | { | 773 | { |
| 774 | register Lisp_Object tem; | 774 | register Lisp_Object tem; |
| 775 | Lisp_Object start_window; | 775 | Lisp_Object start_window; |
| @@ -786,17 +786,17 @@ above. If neither nil nor t, restrict to WINDOW's screen.") | |||
| 786 | if (NILP (minibuf)) | 786 | if (NILP (minibuf)) |
| 787 | minibuf = (minibuf_level ? Qt : Qlambda); | 787 | minibuf = (minibuf_level ? Qt : Qlambda); |
| 788 | 788 | ||
| 789 | /* all_screens == nil doesn't specify which screens to include. | 789 | /* all_frames == nil doesn't specify which frames to include. |
| 790 | Decide which screens it includes. */ | 790 | Decide which frames it includes. */ |
| 791 | if (NILP (all_screens)) | 791 | if (NILP (all_frames)) |
| 792 | all_screens = (EQ (minibuf, Qt) | 792 | all_frames = (EQ (minibuf, Qt) |
| 793 | ? (SCREEN_MINIBUF_WINDOW | 793 | ? (FRAME_MINIBUF_WINDOW |
| 794 | (XSCREEN | 794 | (XFRAME |
| 795 | (WINDOW_SCREEN | 795 | (WINDOW_FRAME |
| 796 | (XWINDOW (window))))) | 796 | (XWINDOW (window))))) |
| 797 | : Qnil); | 797 | : Qnil); |
| 798 | else if (! EQ (all_screens, Qt)) | 798 | else if (! EQ (all_frames, Qt)) |
| 799 | all_screens = Qnil; | 799 | all_frames = Qnil; |
| 800 | 800 | ||
| 801 | /* Do this loop at least once, to get the next window, and perhaps | 801 | /* Do this loop at least once, to get the next window, and perhaps |
| 802 | again, if we hit the minibuffer and that is not acceptable. */ | 802 | again, if we hit the minibuffer and that is not acceptable. */ |
| @@ -809,14 +809,14 @@ above. If neither nil nor t, restrict to WINDOW's screen.") | |||
| 809 | window = tem; | 809 | window = tem; |
| 810 | else | 810 | else |
| 811 | { | 811 | { |
| 812 | /* We've reached the end of this screen. | 812 | /* We've reached the end of this frame. |
| 813 | Which other screens are acceptable? */ | 813 | Which other frames are acceptable? */ |
| 814 | tem = WINDOW_SCREEN (XWINDOW (window)); | 814 | tem = WINDOW_FRAME (XWINDOW (window)); |
| 815 | #ifdef MULTI_SCREEN | 815 | #ifdef MULTI_FRAME |
| 816 | if (! NILP (all_screens)) | 816 | if (! NILP (all_frames)) |
| 817 | tem = next_screen (tem, all_screens); | 817 | tem = next_frame (tem, all_frames); |
| 818 | #endif | 818 | #endif |
| 819 | tem = SCREEN_ROOT_WINDOW (XSCREEN (tem)); | 819 | tem = FRAME_ROOT_WINDOW (XFRAME (tem)); |
| 820 | 820 | ||
| 821 | break; | 821 | break; |
| 822 | } | 822 | } |
| @@ -855,18 +855,18 @@ if not active. MINIBUF nil or omitted means count the minibuffer iff\n\ | |||
| 855 | it is active. MINIBUF neither t nor nil means not to count the\n\ | 855 | it is active. MINIBUF neither t nor nil means not to count the\n\ |
| 856 | minibuffer even if it is active.\n\ | 856 | minibuffer even if it is active.\n\ |
| 857 | \n\ | 857 | \n\ |
| 858 | Several screens may share a single minibuffer; if the minibuffer\n\ | 858 | Several frames may share a single minibuffer; if the minibuffer\n\ |
| 859 | counts, all windows on all screens that share that minibuffer count\n\ | 859 | counts, all windows on all frames that share that minibuffer count\n\ |
| 860 | too. This means that previous-window may be used to iterate through\n\ | 860 | too. This means that previous-window may be used to iterate through\n\ |
| 861 | the set of windows even when the minibuffer is on another screen. If\n\ | 861 | the set of windows even when the minibuffer is on another frame. If\n\ |
| 862 | the minibuffer does not count, only windows from WINDOW's screen\n\ | 862 | the minibuffer does not count, only windows from WINDOW's frame\n\ |
| 863 | count.\n\ | 863 | count.\n\ |
| 864 | \n\ | 864 | \n\ |
| 865 | Optional third arg ALL-SCREENS t means include windows on all screens.\n\ | 865 | Optional third arg ALL-FRAMES t means include windows on all frames.\n\ |
| 866 | ALL-SCREENS nil or omitted means cycle within the screens as specified\n\ | 866 | ALL-FRAMES nil or omitted means cycle within the frames as specified\n\ |
| 867 | above. If neither nil nor t, restrict to WINDOW's screen.") | 867 | above. If neither nil nor t, restrict to WINDOW's frame.") |
| 868 | (window, minibuf, all_screens) | 868 | (window, minibuf, all_frames) |
| 869 | register Lisp_Object window, minibuf, all_screens; | 869 | register Lisp_Object window, minibuf, all_frames; |
| 870 | { | 870 | { |
| 871 | register Lisp_Object tem; | 871 | register Lisp_Object tem; |
| 872 | Lisp_Object start_window; | 872 | Lisp_Object start_window; |
| @@ -883,17 +883,17 @@ above. If neither nil nor t, restrict to WINDOW's screen.") | |||
| 883 | if (NILP (minibuf)) | 883 | if (NILP (minibuf)) |
| 884 | minibuf = (minibuf_level ? Qt : Qlambda); | 884 | minibuf = (minibuf_level ? Qt : Qlambda); |
| 885 | 885 | ||
| 886 | /* all_screens == nil doesn't specify which screens to include. | 886 | /* all_frames == nil doesn't specify which frames to include. |
| 887 | Decide which screens it includes. */ | 887 | Decide which frames it includes. */ |
| 888 | if (NILP (all_screens)) | 888 | if (NILP (all_frames)) |
| 889 | all_screens = (EQ (minibuf, Qt) | 889 | all_frames = (EQ (minibuf, Qt) |
| 890 | ? (SCREEN_MINIBUF_WINDOW | 890 | ? (FRAME_MINIBUF_WINDOW |
| 891 | (XSCREEN | 891 | (XFRAME |
| 892 | (WINDOW_SCREEN | 892 | (WINDOW_FRAME |
| 893 | (XWINDOW (window))))) | 893 | (XWINDOW (window))))) |
| 894 | : Qnil); | 894 | : Qnil); |
| 895 | else if (! EQ (all_screens, Qt)) | 895 | else if (! EQ (all_frames, Qt)) |
| 896 | all_screens = Qnil; | 896 | all_frames = Qnil; |
| 897 | 897 | ||
| 898 | /* Do this loop at least once, to get the previous window, and perhaps | 898 | /* Do this loop at least once, to get the previous window, and perhaps |
| 899 | again, if we hit the minibuffer and that is not acceptable. */ | 899 | again, if we hit the minibuffer and that is not acceptable. */ |
| @@ -906,14 +906,14 @@ above. If neither nil nor t, restrict to WINDOW's screen.") | |||
| 906 | window = tem; | 906 | window = tem; |
| 907 | else | 907 | else |
| 908 | { | 908 | { |
| 909 | /* We have found the top window on the screen. | 909 | /* We have found the top window on the frame. |
| 910 | Which screens are acceptable? */ | 910 | Which frames are acceptable? */ |
| 911 | tem = WINDOW_SCREEN (XWINDOW (window)); | 911 | tem = WINDOW_FRAME (XWINDOW (window)); |
| 912 | #ifdef MULTI_SCREEN | 912 | #ifdef MULTI_FRAME |
| 913 | if (! NILP (all_screens)) | 913 | if (! NILP (all_frames)) |
| 914 | tem = next_screen (tem, all_screens); | 914 | tem = next_frame (tem, all_frames); |
| 915 | #endif | 915 | #endif |
| 916 | tem = SCREEN_ROOT_WINDOW (XSCREEN (tem)); | 916 | tem = FRAME_ROOT_WINDOW (XFRAME (tem)); |
| 917 | 917 | ||
| 918 | break; | 918 | break; |
| 919 | } | 919 | } |
| @@ -945,13 +945,13 @@ above. If neither nil nor t, restrict to WINDOW's screen.") | |||
| 945 | } | 945 | } |
| 946 | 946 | ||
| 947 | DEFUN ("other-window", Fother_window, Sother_window, 1, 2, "p", | 947 | DEFUN ("other-window", Fother_window, Sother_window, 1, 2, "p", |
| 948 | "Select the ARG'th different window on this screen.\n\ | 948 | "Select the ARG'th different window on this frame.\n\ |
| 949 | All windows on current screen are arranged in a cyclic order.\n\ | 949 | All windows on current frame are arranged in a cyclic order.\n\ |
| 950 | This command selects the window ARG steps away in that order.\n\ | 950 | This command selects the window ARG steps away in that order.\n\ |
| 951 | A negative ARG moves in the opposite order. If the optional second\n\ | 951 | A negative ARG moves in the opposite order. If the optional second\n\ |
| 952 | argument ALL_SCREENS is non-nil, cycle through all screens.") | 952 | argument ALL_FRAMES is non-nil, cycle through all frames.") |
| 953 | (n, all_screens) | 953 | (n, all_frames) |
| 954 | register Lisp_Object n, all_screens; | 954 | register Lisp_Object n, all_frames; |
| 955 | { | 955 | { |
| 956 | register int i; | 956 | register int i; |
| 957 | register Lisp_Object w; | 957 | register Lisp_Object w; |
| @@ -962,12 +962,12 @@ argument ALL_SCREENS is non-nil, cycle through all screens.") | |||
| 962 | 962 | ||
| 963 | while (i > 0) | 963 | while (i > 0) |
| 964 | { | 964 | { |
| 965 | w = Fnext_window (w, Qnil, all_screens); | 965 | w = Fnext_window (w, Qnil, all_frames); |
| 966 | i--; | 966 | i--; |
| 967 | } | 967 | } |
| 968 | while (i < 0) | 968 | while (i < 0) |
| 969 | { | 969 | { |
| 970 | w = Fprevious_window (w, Qnil, all_screens); | 970 | w = Fprevious_window (w, Qnil, all_frames); |
| 971 | i++; | 971 | i++; |
| 972 | } | 972 | } |
| 973 | Fselect_window (w); | 973 | Fselect_window (w); |
| @@ -976,8 +976,8 @@ argument ALL_SCREENS is non-nil, cycle through all screens.") | |||
| 976 | 976 | ||
| 977 | /* Look at all windows, performing an operation specified by TYPE | 977 | /* Look at all windows, performing an operation specified by TYPE |
| 978 | with argument OBJ. | 978 | with argument OBJ. |
| 979 | If SCREENS is Qt, look at all screens, if Qnil, look at just the selected | 979 | If FRAMES is Qt, look at all frames, if Qnil, look at just the selected |
| 980 | screen. If SCREENS is a screen, just look at windows on that screen. | 980 | frame. If FRAMES is a frame, just look at windows on that frame. |
| 981 | If MINI is non-zero, perform the operation on minibuffer windows too. | 981 | If MINI is non-zero, perform the operation on minibuffer windows too. |
| 982 | */ | 982 | */ |
| 983 | 983 | ||
| @@ -993,34 +993,34 @@ enum window_loop | |||
| 993 | }; | 993 | }; |
| 994 | 994 | ||
| 995 | static Lisp_Object | 995 | static Lisp_Object |
| 996 | window_loop (type, obj, mini, screens) | 996 | window_loop (type, obj, mini, frames) |
| 997 | enum window_loop type; | 997 | enum window_loop type; |
| 998 | register Lisp_Object obj, screens; | 998 | register Lisp_Object obj, frames; |
| 999 | int mini; | 999 | int mini; |
| 1000 | { | 1000 | { |
| 1001 | register Lisp_Object w; | 1001 | register Lisp_Object w; |
| 1002 | register Lisp_Object best_window; | 1002 | register Lisp_Object best_window; |
| 1003 | register Lisp_Object next_window; | 1003 | register Lisp_Object next_window; |
| 1004 | register Lisp_Object first_window; | 1004 | register Lisp_Object first_window; |
| 1005 | SCREEN_PTR screen; | 1005 | FRAME_PTR frame; |
| 1006 | 1006 | ||
| 1007 | /* If we're only looping through windows on a particular screen, | 1007 | /* If we're only looping through windows on a particular frame, |
| 1008 | screen points to that screen. If we're looping through windows | 1008 | frame points to that frame. If we're looping through windows |
| 1009 | on all screens, screen is 0. */ | 1009 | on all frames, frame is 0. */ |
| 1010 | if (SCREENP (screens)) | 1010 | if (FRAMEP (frames)) |
| 1011 | screen = XSCREEN (screens); | 1011 | frame = XFRAME (frames); |
| 1012 | else if (NILP (screens)) | 1012 | else if (NILP (frames)) |
| 1013 | screen = selected_screen; | 1013 | frame = selected_frame; |
| 1014 | else | 1014 | else |
| 1015 | screen = 0; | 1015 | frame = 0; |
| 1016 | 1016 | ||
| 1017 | /* Pick a window to start with. */ | 1017 | /* Pick a window to start with. */ |
| 1018 | if (XTYPE (obj) == Lisp_Window) | 1018 | if (XTYPE (obj) == Lisp_Window) |
| 1019 | first_window = obj; | 1019 | first_window = obj; |
| 1020 | else if (screen) | 1020 | else if (frame) |
| 1021 | first_window = SCREEN_SELECTED_WINDOW (screen); | 1021 | first_window = FRAME_SELECTED_WINDOW (frame); |
| 1022 | else | 1022 | else |
| 1023 | first_window = SCREEN_SELECTED_WINDOW (selected_screen); | 1023 | first_window = FRAME_SELECTED_WINDOW (selected_frame); |
| 1024 | 1024 | ||
| 1025 | w = first_window; | 1025 | w = first_window; |
| 1026 | best_window = Qnil; | 1026 | best_window = Qnil; |
| @@ -1028,13 +1028,13 @@ window_loop (type, obj, mini, screens) | |||
| 1028 | { | 1028 | { |
| 1029 | /* Pick the next window now, since some operations will delete | 1029 | /* Pick the next window now, since some operations will delete |
| 1030 | the current window. */ | 1030 | the current window. */ |
| 1031 | #ifdef MULTI_SCREEN | 1031 | #ifdef MULTI_FRAME |
| 1032 | if (screen) | 1032 | if (frame) |
| 1033 | next_window = Fnext_window (w, (mini ? Qt : Qnil), Qlambda); | 1033 | next_window = Fnext_window (w, (mini ? Qt : Qnil), Qlambda); |
| 1034 | else | 1034 | else |
| 1035 | #endif /* MULTI_SCREEN */ | 1035 | #endif /* MULTI_FRAME */ |
| 1036 | /* We know screen is 0, so we're looping through all screens. | 1036 | /* We know frame is 0, so we're looping through all frames. |
| 1037 | Or we know this isn't a MULTI_SCREEN Emacs, so who cares? */ | 1037 | Or we know this isn't a MULTI_FRAME Emacs, so who cares? */ |
| 1038 | next_window = Fnext_window (w, mini ? Qt : Qnil, Qt); | 1038 | next_window = Fnext_window (w, mini ? Qt : Qnil, Qt); |
| 1039 | 1039 | ||
| 1040 | if (!MINI_WINDOW_P (XWINDOW (w)) | 1040 | if (!MINI_WINDOW_P (XWINDOW (w)) |
| @@ -1043,9 +1043,9 @@ window_loop (type, obj, mini, screens) | |||
| 1043 | { | 1043 | { |
| 1044 | case GET_BUFFER_WINDOW: | 1044 | case GET_BUFFER_WINDOW: |
| 1045 | #if 0 | 1045 | #if 0 |
| 1046 | /* Ignore invisible and iconified screens. */ | 1046 | /* Ignore invisible and iconified frames. */ |
| 1047 | if (! SCREEN_VISIBLE_P (XSCREEN (WINDOW_SCREEN (XWINDOW (w)))) | 1047 | if (! FRAME_VISIBLE_P (XFRAME (WINDOW_FRAME (XWINDOW (w)))) |
| 1048 | || SCREEN_ICONIFIED_P (XSCREEN (WINDOW_SCREEN (XWINDOW (w))))) | 1048 | || FRAME_ICONIFIED_P (XFRAME (WINDOW_FRAME (XWINDOW (w))))) |
| 1049 | break; | 1049 | break; |
| 1050 | #endif | 1050 | #endif |
| 1051 | if (XBUFFER (XWINDOW (w)->buffer) == XBUFFER (obj)) | 1051 | if (XBUFFER (XWINDOW (w)->buffer) == XBUFFER (obj)) |
| @@ -1055,12 +1055,12 @@ window_loop (type, obj, mini, screens) | |||
| 1055 | case GET_LRU_WINDOW: | 1055 | case GET_LRU_WINDOW: |
| 1056 | /* t as arg means consider only full-width windows */ | 1056 | /* t as arg means consider only full-width windows */ |
| 1057 | if (!NILP (obj) && XFASTINT (XWINDOW (w)->width) | 1057 | if (!NILP (obj) && XFASTINT (XWINDOW (w)->width) |
| 1058 | != SCREEN_WIDTH (screen)) | 1058 | != FRAME_WIDTH (frame)) |
| 1059 | break; | 1059 | break; |
| 1060 | #if 0 | 1060 | #if 0 |
| 1061 | /* Ignore invisible and iconified screens. */ | 1061 | /* Ignore invisible and iconified frames. */ |
| 1062 | if (! SCREEN_VISIBLE_P (XSCREEN (WINDOW_SCREEN (XWINDOW (w)))) | 1062 | if (! FRAME_VISIBLE_P (XFRAME (WINDOW_FRAME (XWINDOW (w)))) |
| 1063 | || SCREEN_ICONIFIED_P (XSCREEN (WINDOW_SCREEN (XWINDOW (w))))) | 1063 | || FRAME_ICONIFIED_P (XFRAME (WINDOW_FRAME (XWINDOW (w))))) |
| 1064 | break; | 1064 | break; |
| 1065 | #endif | 1065 | #endif |
| 1066 | /* Ignore dedicated windows and minibuffers. */ | 1066 | /* Ignore dedicated windows and minibuffers. */ |
| @@ -1082,7 +1082,7 @@ window_loop (type, obj, mini, screens) | |||
| 1082 | if (EQ (XWINDOW (w)->buffer, obj)) | 1082 | if (EQ (XWINDOW (w)->buffer, obj)) |
| 1083 | { | 1083 | { |
| 1084 | /* If we're deleting the buffer displayed in the only window | 1084 | /* If we're deleting the buffer displayed in the only window |
| 1085 | on the screen, find a new buffer to display there. */ | 1085 | on the frame, find a new buffer to display there. */ |
| 1086 | if (NILP (XWINDOW (w)->parent)) | 1086 | if (NILP (XWINDOW (w)->parent)) |
| 1087 | { | 1087 | { |
| 1088 | Lisp_Object new_buffer = Fother_buffer (obj); | 1088 | Lisp_Object new_buffer = Fother_buffer (obj); |
| @@ -1099,9 +1099,9 @@ window_loop (type, obj, mini, screens) | |||
| 1099 | 1099 | ||
| 1100 | case GET_LARGEST_WINDOW: | 1100 | case GET_LARGEST_WINDOW: |
| 1101 | #if 0 | 1101 | #if 0 |
| 1102 | /* Ignore invisible and iconified screens. */ | 1102 | /* Ignore invisible and iconified frames. */ |
| 1103 | if (! SCREEN_VISIBLE_P (XSCREEN (WINDOW_SCREEN (XWINDOW (w)))) | 1103 | if (! FRAME_VISIBLE_P (XFRAME (WINDOW_FRAME (XWINDOW (w)))) |
| 1104 | || SCREEN_ICONIFIED_P (XSCREEN (WINDOW_SCREEN (XWINDOW (w))))) | 1104 | || FRAME_ICONIFIED_P (XFRAME (WINDOW_FRAME (XWINDOW (w))))) |
| 1105 | break; | 1105 | break; |
| 1106 | #endif | 1106 | #endif |
| 1107 | /* Ignore dedicated windows and minibuffers. */ | 1107 | /* Ignore dedicated windows and minibuffers. */ |
| @@ -1142,49 +1142,49 @@ window_loop (type, obj, mini, screens) | |||
| 1142 | 1142 | ||
| 1143 | DEFUN ("get-lru-window", Fget_lru_window, Sget_lru_window, 0, 1, 0, | 1143 | DEFUN ("get-lru-window", Fget_lru_window, Sget_lru_window, 0, 1, 0, |
| 1144 | "Return the window least recently selected or used for display.\n\ | 1144 | "Return the window least recently selected or used for display.\n\ |
| 1145 | If optional argument SCREENS is t, search all screens. If SCREEN is a\n\ | 1145 | If optional argument FRAMES is t, search all frames. If FRAME is a\n\ |
| 1146 | screen, search only that screen.\n") | 1146 | frame, search only that frame.\n") |
| 1147 | (screens) | 1147 | (frames) |
| 1148 | Lisp_Object screens; | 1148 | Lisp_Object frames; |
| 1149 | { | 1149 | { |
| 1150 | register Lisp_Object w; | 1150 | register Lisp_Object w; |
| 1151 | /* First try for a window that is full-width */ | 1151 | /* First try for a window that is full-width */ |
| 1152 | w = window_loop (GET_LRU_WINDOW, Qt, 0, screens); | 1152 | w = window_loop (GET_LRU_WINDOW, Qt, 0, frames); |
| 1153 | if (!NILP (w) && !EQ (w, selected_window)) | 1153 | if (!NILP (w) && !EQ (w, selected_window)) |
| 1154 | return w; | 1154 | return w; |
| 1155 | /* If none of them, try the rest */ | 1155 | /* If none of them, try the rest */ |
| 1156 | return window_loop (GET_LRU_WINDOW, Qnil, 0, screens); | 1156 | return window_loop (GET_LRU_WINDOW, Qnil, 0, frames); |
| 1157 | } | 1157 | } |
| 1158 | 1158 | ||
| 1159 | DEFUN ("get-largest-window", Fget_largest_window, Sget_largest_window, 0, 1, 0, | 1159 | DEFUN ("get-largest-window", Fget_largest_window, Sget_largest_window, 0, 1, 0, |
| 1160 | "Return the largest window in area.\n\ | 1160 | "Return the largest window in area.\n\ |
| 1161 | If optional argument SCREENS is t, search all screens. If SCREEN is a\n\ | 1161 | If optional argument FRAMES is t, search all frames. If FRAME is a\n\ |
| 1162 | screen, search only that screen.\n") | 1162 | frame, search only that frame.\n") |
| 1163 | (screen) | 1163 | (frame) |
| 1164 | Lisp_Object screen; | 1164 | Lisp_Object frame; |
| 1165 | { | 1165 | { |
| 1166 | return window_loop (GET_LARGEST_WINDOW, Qnil, 0, | 1166 | return window_loop (GET_LARGEST_WINDOW, Qnil, 0, |
| 1167 | screen); | 1167 | frame); |
| 1168 | } | 1168 | } |
| 1169 | 1169 | ||
| 1170 | DEFUN ("get-buffer-window", Fget_buffer_window, Sget_buffer_window, 1, 2, 0, | 1170 | DEFUN ("get-buffer-window", Fget_buffer_window, Sget_buffer_window, 1, 2, 0, |
| 1171 | "Return a window currently displaying BUFFER, or nil if none.\n\ | 1171 | "Return a window currently displaying BUFFER, or nil if none.\n\ |
| 1172 | If optional argument SCREENS is t, search all screens. If SCREEN is a\n\ | 1172 | If optional argument FRAMES is t, search all frames. If FRAME is a\n\ |
| 1173 | screen, search only that screen.\n") | 1173 | frame, search only that frame.\n") |
| 1174 | (buffer, screen) | 1174 | (buffer, frame) |
| 1175 | Lisp_Object buffer, screen; | 1175 | Lisp_Object buffer, frame; |
| 1176 | { | 1176 | { |
| 1177 | buffer = Fget_buffer (buffer); | 1177 | buffer = Fget_buffer (buffer); |
| 1178 | if (XTYPE (buffer) == Lisp_Buffer) | 1178 | if (XTYPE (buffer) == Lisp_Buffer) |
| 1179 | return window_loop (GET_BUFFER_WINDOW, buffer, 1, screen); | 1179 | return window_loop (GET_BUFFER_WINDOW, buffer, 1, frame); |
| 1180 | else | 1180 | else |
| 1181 | return Qnil; | 1181 | return Qnil; |
| 1182 | } | 1182 | } |
| 1183 | 1183 | ||
| 1184 | DEFUN ("delete-other-windows", Fdelete_other_windows, Sdelete_other_windows, | 1184 | DEFUN ("delete-other-windows", Fdelete_other_windows, Sdelete_other_windows, |
| 1185 | 0, 1, "", | 1185 | 0, 1, "", |
| 1186 | "Make WINDOW (or the selected window) fill its screen.\n\ | 1186 | "Make WINDOW (or the selected window) fill its frame.\n\ |
| 1187 | Only the screen WINDOW is on is affected.") | 1187 | Only the frame WINDOW is on is affected.") |
| 1188 | (window) | 1188 | (window) |
| 1189 | Lisp_Object window; | 1189 | Lisp_Object window; |
| 1190 | { | 1190 | { |
| @@ -1201,7 +1201,7 @@ Only the screen WINDOW is on is affected.") | |||
| 1201 | w = XWINDOW (window); | 1201 | w = XWINDOW (window); |
| 1202 | top = XFASTINT (w->top); | 1202 | top = XFASTINT (w->top); |
| 1203 | 1203 | ||
| 1204 | window_loop (DELETE_OTHER_WINDOWS, window, 0, WINDOW_SCREEN(w)); | 1204 | window_loop (DELETE_OTHER_WINDOWS, window, 0, WINDOW_FRAME(w)); |
| 1205 | 1205 | ||
| 1206 | Fset_buffer (w->buffer); | 1206 | Fset_buffer (w->buffer); |
| 1207 | SET_PT (marker_position (w->start)); | 1207 | SET_PT (marker_position (w->start)); |
| @@ -1439,14 +1439,14 @@ before each command.") | |||
| 1439 | ow->buffer); | 1439 | ow->buffer); |
| 1440 | 1440 | ||
| 1441 | selected_window = window; | 1441 | selected_window = window; |
| 1442 | #ifdef MULTI_SCREEN | 1442 | #ifdef MULTI_FRAME |
| 1443 | if (XSCREEN (WINDOW_SCREEN (w)) != selected_screen) | 1443 | if (XFRAME (WINDOW_FRAME (w)) != selected_frame) |
| 1444 | { | 1444 | { |
| 1445 | XSCREEN (WINDOW_SCREEN (w))->selected_window = window; | 1445 | XFRAME (WINDOW_FRAME (w))->selected_window = window; |
| 1446 | Fselect_screen (WINDOW_SCREEN (w), Qnil); | 1446 | Fselect_frame (WINDOW_FRAME (w), Qnil); |
| 1447 | } | 1447 | } |
| 1448 | else | 1448 | else |
| 1449 | selected_screen->selected_window = window; | 1449 | selected_frame->selected_window = window; |
| 1450 | #endif | 1450 | #endif |
| 1451 | 1451 | ||
| 1452 | record_buffer (w->buffer); | 1452 | record_buffer (w->buffer); |
| @@ -1499,48 +1499,48 @@ Returns the window displaying BUFFER.") | |||
| 1499 | && (NILP (not_this_window) || !EQ (window, selected_window))) | 1499 | && (NILP (not_this_window) || !EQ (window, selected_window))) |
| 1500 | return window; | 1500 | return window; |
| 1501 | 1501 | ||
| 1502 | #ifdef MULTI_SCREEN | 1502 | #ifdef MULTI_FRAME |
| 1503 | /* If there are no screens open that have more than a minibuffer, | 1503 | /* If there are no frames open that have more than a minibuffer, |
| 1504 | we need to create a new screen. */ | 1504 | we need to create a new frame. */ |
| 1505 | if (pop_up_screens || last_nonminibuf_screen == 0) | 1505 | if (pop_up_frames || last_nonminibuf_frame == 0) |
| 1506 | { | 1506 | { |
| 1507 | window | 1507 | window |
| 1508 | = Fscreen_selected_window (call0 (Vpop_up_screen_function)); | 1508 | = Fframe_selected_window (call0 (Vpop_up_frame_function)); |
| 1509 | Fset_window_buffer (window, buffer); | 1509 | Fset_window_buffer (window, buffer); |
| 1510 | #if 0 | 1510 | #if 0 |
| 1511 | Fselect_screen (XWINDOW (window)->screen, Qnil); | 1511 | Fselect_frame (XWINDOW (window)->frame, Qnil); |
| 1512 | #endif | 1512 | #endif |
| 1513 | return window; | 1513 | return window; |
| 1514 | } | 1514 | } |
| 1515 | #endif /* MULTI_SCREEN */ | 1515 | #endif /* MULTI_FRAME */ |
| 1516 | 1516 | ||
| 1517 | if (pop_up_windows | 1517 | if (pop_up_windows |
| 1518 | #ifdef MULTI_SCREEN | 1518 | #ifdef MULTI_FRAME |
| 1519 | || SCREEN_MINIBUF_ONLY_P (selected_screen) | 1519 | || FRAME_MINIBUF_ONLY_P (selected_frame) |
| 1520 | #endif | 1520 | #endif |
| 1521 | ) | 1521 | ) |
| 1522 | { | 1522 | { |
| 1523 | Lisp_Object screens = Qnil; | 1523 | Lisp_Object frames = Qnil; |
| 1524 | 1524 | ||
| 1525 | #ifdef MULTI_SCREEN | 1525 | #ifdef MULTI_FRAME |
| 1526 | if (SCREEN_MINIBUF_ONLY_P (selected_screen)) | 1526 | if (FRAME_MINIBUF_ONLY_P (selected_frame)) |
| 1527 | XSET (screens, Lisp_Screen, last_nonminibuf_screen); | 1527 | XSET (frames, Lisp_Frame, last_nonminibuf_frame); |
| 1528 | #endif | 1528 | #endif |
| 1529 | /* Don't try to create a window if would get an error */ | 1529 | /* Don't try to create a window if would get an error */ |
| 1530 | if (split_height_threshold < window_min_height << 1) | 1530 | if (split_height_threshold < window_min_height << 1) |
| 1531 | split_height_threshold = window_min_height << 1; | 1531 | split_height_threshold = window_min_height << 1; |
| 1532 | 1532 | ||
| 1533 | window = Fget_largest_window (screens); | 1533 | window = Fget_largest_window (frames); |
| 1534 | 1534 | ||
| 1535 | if (!NILP (window) | 1535 | if (!NILP (window) |
| 1536 | && window_height (window) >= split_height_threshold | 1536 | && window_height (window) >= split_height_threshold |
| 1537 | && | 1537 | && |
| 1538 | (XFASTINT (XWINDOW (window)->width) | 1538 | (XFASTINT (XWINDOW (window)->width) |
| 1539 | == SCREEN_WIDTH (XSCREEN (WINDOW_SCREEN (XWINDOW (window)))))) | 1539 | == FRAME_WIDTH (XFRAME (WINDOW_FRAME (XWINDOW (window)))))) |
| 1540 | window = Fsplit_window (window, Qnil, Qnil); | 1540 | window = Fsplit_window (window, Qnil, Qnil); |
| 1541 | else | 1541 | else |
| 1542 | { | 1542 | { |
| 1543 | window = Fget_lru_window (screens); | 1543 | window = Fget_lru_window (frames); |
| 1544 | if ((EQ (window, selected_window) | 1544 | if ((EQ (window, selected_window) |
| 1545 | || EQ (XWINDOW (window)->parent, Qnil)) | 1545 | || EQ (XWINDOW (window)->parent, Qnil)) |
| 1546 | && window_height (window) >= window_min_height << 1) | 1546 | && window_height (window) >= window_min_height << 1) |
| @@ -1576,10 +1576,10 @@ temp_output_buffer_show (buf) | |||
| 1576 | { | 1576 | { |
| 1577 | window = Fdisplay_buffer (buf, Qnil); | 1577 | window = Fdisplay_buffer (buf, Qnil); |
| 1578 | 1578 | ||
| 1579 | #ifdef MULTI_SCREEN | 1579 | #ifdef MULTI_FRAME |
| 1580 | if (XSCREEN (XWINDOW (window)->screen) != selected_screen) | 1580 | if (XFRAME (XWINDOW (window)->frame) != selected_frame) |
| 1581 | Fmake_screen_visible (XWINDOW (window)->screen); | 1581 | Fmake_frame_visible (WINDOW_FRAME (XWINDOW (window))); |
| 1582 | #endif /* MULTI_SCREEN */ | 1582 | #endif /* MULTI_FRAME */ |
| 1583 | Vminibuf_scroll_window = window; | 1583 | Vminibuf_scroll_window = window; |
| 1584 | w = XWINDOW (window); | 1584 | w = XWINDOW (window); |
| 1585 | XFASTINT (w->hscroll) = 0; | 1585 | XFASTINT (w->hscroll) = 0; |
| @@ -1654,8 +1654,8 @@ and put SIZE columns in the first of the pair.") | |||
| 1654 | 1654 | ||
| 1655 | if (MINI_WINDOW_P (o)) | 1655 | if (MINI_WINDOW_P (o)) |
| 1656 | error ("Attempt to split minibuffer window"); | 1656 | error ("Attempt to split minibuffer window"); |
| 1657 | else if (SCREEN_NO_SPLIT_P (XSCREEN (WINDOW_SCREEN (o)))) | 1657 | else if (FRAME_NO_SPLIT_P (XFRAME (WINDOW_FRAME (o)))) |
| 1658 | error ("Attempt to split unsplittable screen"); | 1658 | error ("Attempt to split unsplittable frame"); |
| 1659 | 1659 | ||
| 1660 | /* Smaller values might permit a crash. */ | 1660 | /* Smaller values might permit a crash. */ |
| 1661 | if (window_min_width < 2) | 1661 | if (window_min_width < 2) |
| @@ -1698,7 +1698,7 @@ and put SIZE columns in the first of the pair.") | |||
| 1698 | new = make_window (); | 1698 | new = make_window (); |
| 1699 | p = XWINDOW (new); | 1699 | p = XWINDOW (new); |
| 1700 | 1700 | ||
| 1701 | p->screen = o->screen; | 1701 | p->frame = o->frame; |
| 1702 | p->next = o->next; | 1702 | p->next = o->next; |
| 1703 | if (!NILP (p->next)) | 1703 | if (!NILP (p->next)) |
| 1704 | XWINDOW (p->next)->prev = new; | 1704 | XWINDOW (p->next)->prev = new; |
| @@ -1709,7 +1709,7 @@ and put SIZE columns in the first of the pair.") | |||
| 1709 | 1709 | ||
| 1710 | Fset_window_buffer (new, o->buffer); | 1710 | Fset_window_buffer (new, o->buffer); |
| 1711 | 1711 | ||
| 1712 | /* Apportion the available screen space among the two new windows */ | 1712 | /* Apportion the available frame space among the two new windows */ |
| 1713 | 1713 | ||
| 1714 | if (!NILP (horflag)) | 1714 | if (!NILP (horflag)) |
| 1715 | { | 1715 | { |
| @@ -1833,14 +1833,14 @@ change_window_height (delta, widthflag) | |||
| 1833 | maxdelta = (!NILP (parent) ? (*sizefun) (parent) - *sizep | 1833 | maxdelta = (!NILP (parent) ? (*sizefun) (parent) - *sizep |
| 1834 | : !NILP (p->next) ? (*sizefun) (p->next) - MINSIZE (p->next) | 1834 | : !NILP (p->next) ? (*sizefun) (p->next) - MINSIZE (p->next) |
| 1835 | : !NILP (p->prev) ? (*sizefun) (p->prev) - MINSIZE (p->prev) | 1835 | : !NILP (p->prev) ? (*sizefun) (p->prev) - MINSIZE (p->prev) |
| 1836 | /* This is a screen with only one window, a minibuffer-only | 1836 | /* This is a frame with only one window, a minibuffer-only |
| 1837 | or a minibufferless screen. */ | 1837 | or a minibufferless frame. */ |
| 1838 | : (delta = 0)); | 1838 | : (delta = 0)); |
| 1839 | 1839 | ||
| 1840 | if (delta > maxdelta) | 1840 | if (delta > maxdelta) |
| 1841 | /* This case traps trying to make the minibuffer | 1841 | /* This case traps trying to make the minibuffer |
| 1842 | the full screen, or make the only window aside from the | 1842 | the full frame, or make the only window aside from the |
| 1843 | minibuffer the full screen. */ | 1843 | minibuffer the full frame. */ |
| 1844 | delta = maxdelta; | 1844 | delta = maxdelta; |
| 1845 | 1845 | ||
| 1846 | if (delta == 0) | 1846 | if (delta == 0) |
| @@ -1914,7 +1914,7 @@ window_internal_height (w) | |||
| 1914 | 1914 | ||
| 1915 | if (!NILP (w->parent) || !NILP (w->vchild) || !NILP (w->hchild) | 1915 | if (!NILP (w->parent) || !NILP (w->vchild) || !NILP (w->hchild) |
| 1916 | || !NILP (w->next) || !NILP (w->prev) | 1916 | || !NILP (w->next) || !NILP (w->prev) |
| 1917 | || SCREEN_WANTS_MODELINE_P (XSCREEN (WINDOW_SCREEN (w)))) | 1917 | || FRAME_WANTS_MODELINE_P (XFRAME (WINDOW_FRAME (w)))) |
| 1918 | return ht - 1; | 1918 | return ht - 1; |
| 1919 | 1919 | ||
| 1920 | return ht; | 1920 | return ht; |
| @@ -2145,11 +2145,11 @@ Default for ARG is window width minus 2.") | |||
| 2145 | } | 2145 | } |
| 2146 | 2146 | ||
| 2147 | DEFUN ("recenter", Frecenter, Srecenter, 0, 1, "P", | 2147 | DEFUN ("recenter", Frecenter, Srecenter, 0, 1, "P", |
| 2148 | "Center point in window and redisplay screen. With ARG, put point on line ARG.\n\ | 2148 | "Center point in window and redisplay frame. With ARG, put point on line ARG.\n\ |
| 2149 | The desired position of point is always relative to the current window.\n\ | 2149 | The desired position of point is always relative to the current window.\n\ |
| 2150 | Just C-u as prefix means put point in the center of the screen.\n\ | 2150 | Just C-u as prefix means put point in the center of the window.\n\ |
| 2151 | No arg (i.e., it is nil) erases the entire screen and then\n\ | 2151 | No arg (i.e., it is nil) erases the entire frame and then\n\ |
| 2152 | redraws with point in the center.") | 2152 | redraws with point in the center of the current window.") |
| 2153 | (n) | 2153 | (n) |
| 2154 | register Lisp_Object n; | 2154 | register Lisp_Object n; |
| 2155 | { | 2155 | { |
| @@ -2159,9 +2159,9 @@ redraws with point in the center.") | |||
| 2159 | 2159 | ||
| 2160 | if (NILP (n)) | 2160 | if (NILP (n)) |
| 2161 | { | 2161 | { |
| 2162 | extern int screen_garbaged; | 2162 | extern int frame_garbaged; |
| 2163 | 2163 | ||
| 2164 | SET_SCREEN_GARBAGED (XSCREEN (WINDOW_SCREEN (w))); | 2164 | SET_FRAME_GARBAGED (XFRAME (WINDOW_FRAME (w))); |
| 2165 | XFASTINT (n) = ht / 2; | 2165 | XFASTINT (n) = ht / 2; |
| 2166 | } | 2166 | } |
| 2167 | else if (XTYPE (n) == Lisp_Cons) /* Just C-u. */ | 2167 | else if (XTYPE (n) == Lisp_Cons) /* Just C-u. */ |
| @@ -2193,7 +2193,7 @@ DEFUN ("move-to-window-line", Fmove_to_window_line, Smove_to_window_line, | |||
| 2193 | 1, 1, "P", | 2193 | 1, 1, "P", |
| 2194 | "Position point relative to window.\n\ | 2194 | "Position point relative to window.\n\ |
| 2195 | With no argument, position text at center of window.\n\ | 2195 | With no argument, position text at center of window.\n\ |
| 2196 | An argument specifies screen line; zero means top of window,\n\ | 2196 | An argument specifies frame line; zero means top of window,\n\ |
| 2197 | negative means relative to bottom of window.") | 2197 | negative means relative to bottom of window.") |
| 2198 | (arg) | 2198 | (arg) |
| 2199 | register Lisp_Object arg; | 2199 | register Lisp_Object arg; |
| @@ -2229,7 +2229,7 @@ struct save_window_data | |||
| 2229 | { | 2229 | { |
| 2230 | int size_from_Lisp_Vector_struct; | 2230 | int size_from_Lisp_Vector_struct; |
| 2231 | struct Lisp_Vector *next_from_Lisp_Vector_struct; | 2231 | struct Lisp_Vector *next_from_Lisp_Vector_struct; |
| 2232 | Lisp_Object screen_width, screen_height; | 2232 | Lisp_Object frame_width, frame_height; |
| 2233 | Lisp_Object current_window; | 2233 | Lisp_Object current_window; |
| 2234 | Lisp_Object current_buffer; | 2234 | Lisp_Object current_buffer; |
| 2235 | Lisp_Object minibuf_scroll_window; | 2235 | Lisp_Object minibuf_scroll_window; |
| @@ -2285,7 +2285,7 @@ by `current-window-configuration' (which see).") | |||
| 2285 | register Lisp_Object tem; | 2285 | register Lisp_Object tem; |
| 2286 | Lisp_Object new_current_buffer; | 2286 | Lisp_Object new_current_buffer; |
| 2287 | int k; | 2287 | int k; |
| 2288 | SCREEN_PTR s; | 2288 | FRAME_PTR f; |
| 2289 | 2289 | ||
| 2290 | while (XTYPE (arg) != Lisp_Window_Configuration) | 2290 | while (XTYPE (arg) != Lisp_Window_Configuration) |
| 2291 | { | 2291 | { |
| @@ -2295,16 +2295,16 @@ by `current-window-configuration' (which see).") | |||
| 2295 | data = (struct save_window_data *) XVECTOR (arg); | 2295 | data = (struct save_window_data *) XVECTOR (arg); |
| 2296 | saved_windows = XVECTOR (data->saved_windows); | 2296 | saved_windows = XVECTOR (data->saved_windows); |
| 2297 | 2297 | ||
| 2298 | s = XSCREEN (XWINDOW (SAVED_WINDOW_N (saved_windows, 0)->window)->screen); | 2298 | f = XFRAME (XWINDOW (SAVED_WINDOW_N (saved_windows, 0)->window)->frame); |
| 2299 | 2299 | ||
| 2300 | if (XFASTINT (data->screen_height) != SCREEN_HEIGHT (s) | 2300 | if (XFASTINT (data->frame_height) != FRAME_HEIGHT (f) |
| 2301 | || XFASTINT (data->screen_width) != SCREEN_WIDTH (s)) | 2301 | || XFASTINT (data->frame_width) != FRAME_WIDTH (f)) |
| 2302 | { | 2302 | { |
| 2303 | /* Presumably something clever could be done. | 2303 | /* Presumably something clever could be done. |
| 2304 | However, it doesn't seem worth the effort */ | 2304 | However, it doesn't seem worth the effort */ |
| 2305 | error ("Screen size %dx%d in saved window configuration mismatches screen.", | 2305 | error ("Frame size %dx%d in saved window configuration mismatches frame.", |
| 2306 | XFASTINT (data->screen_height), | 2306 | XFASTINT (data->frame_height), |
| 2307 | XFASTINT (data->screen_width)); | 2307 | XFASTINT (data->frame_width)); |
| 2308 | } | 2308 | } |
| 2309 | 2309 | ||
| 2310 | windows_or_buffers_changed++; | 2310 | windows_or_buffers_changed++; |
| @@ -2312,12 +2312,12 @@ by `current-window-configuration' (which see).") | |||
| 2312 | if (NILP (XBUFFER (new_current_buffer)->name)) | 2312 | if (NILP (XBUFFER (new_current_buffer)->name)) |
| 2313 | new_current_buffer = Qnil; | 2313 | new_current_buffer = Qnil; |
| 2314 | 2314 | ||
| 2315 | /* Mark all windows now on screen as "deleted". | 2315 | /* Mark all windows now on frame as "deleted". |
| 2316 | Restoring the new configuration "undeletes" any that are in it. */ | 2316 | Restoring the new configuration "undeletes" any that are in it. */ |
| 2317 | 2317 | ||
| 2318 | delete_all_subwindows (XWINDOW (SCREEN_ROOT_WINDOW (s))); | 2318 | delete_all_subwindows (XWINDOW (FRAME_ROOT_WINDOW (f))); |
| 2319 | #if 0 | 2319 | #if 0 |
| 2320 | /* This loses when the minibuf screen is not s. */ | 2320 | /* This loses when the minibuf frame is not f. */ |
| 2321 | delete_all_subwindows (XWINDOW (XWINDOW (minibuf_window)->prev)); | 2321 | delete_all_subwindows (XWINDOW (XWINDOW (minibuf_window)->prev)); |
| 2322 | #endif | 2322 | #endif |
| 2323 | 2323 | ||
| @@ -2335,12 +2335,12 @@ by `current-window-configuration' (which see).") | |||
| 2335 | if (!NILP (p->prev)) | 2335 | if (!NILP (p->prev)) |
| 2336 | { | 2336 | { |
| 2337 | w->prev = SAVED_WINDOW_N (saved_windows, XFASTINT (p->prev))->window; | 2337 | w->prev = SAVED_WINDOW_N (saved_windows, XFASTINT (p->prev))->window; |
| 2338 | #ifdef MULTI_SCREEN | 2338 | #ifdef MULTI_FRAME |
| 2339 | /* This is true for a minibuffer-only screen. */ | 2339 | /* This is true for a minibuffer-only frame. */ |
| 2340 | if (w->mini_p && EQ (w->prev, p->window)) | 2340 | if (w->mini_p && EQ (w->prev, p->window)) |
| 2341 | w->next = Qnil; | 2341 | w->next = Qnil; |
| 2342 | else | 2342 | else |
| 2343 | #endif /* MULTI_SCREEN */ | 2343 | #endif /* MULTI_FRAME */ |
| 2344 | XWINDOW (w->prev)->next = p->window; | 2344 | XWINDOW (w->prev)->next = p->window; |
| 2345 | } | 2345 | } |
| 2346 | else | 2346 | else |
| @@ -2412,14 +2412,14 @@ by `current-window-configuration' (which see).") | |||
| 2412 | } | 2412 | } |
| 2413 | } | 2413 | } |
| 2414 | 2414 | ||
| 2415 | SCREEN_ROOT_WINDOW (s) = data->root_window; | 2415 | FRAME_ROOT_WINDOW (f) = data->root_window; |
| 2416 | 2416 | ||
| 2417 | #ifdef MULTI_SCREEN | 2417 | #ifdef MULTI_FRAME |
| 2418 | if (s != selected_screen && ! SCREEN_IS_TERMCAP (s)) | 2418 | if (f != selected_frame && ! FRAME_IS_TERMCAP (f)) |
| 2419 | Fselect_screen (WINDOW_SCREEN (XWINDOW (data->root_window)), Qnil); | 2419 | Fselect_frame (WINDOW_FRAME (XWINDOW (data->root_window)), Qnil); |
| 2420 | #endif | 2420 | #endif |
| 2421 | 2421 | ||
| 2422 | if (s == selected_screen) | 2422 | if (f == selected_frame) |
| 2423 | { | 2423 | { |
| 2424 | Fselect_window (data->current_window); | 2424 | Fselect_window (data->current_window); |
| 2425 | if (!NILP (new_current_buffer)) | 2425 | if (!NILP (new_current_buffer)) |
| @@ -2432,7 +2432,7 @@ by `current-window-configuration' (which see).") | |||
| 2432 | return (Qnil); | 2432 | return (Qnil); |
| 2433 | } | 2433 | } |
| 2434 | 2434 | ||
| 2435 | /* Mark all windows now on screen as deleted | 2435 | /* Mark all windows now on frame as deleted |
| 2436 | by setting their buffers to nil. */ | 2436 | by setting their buffers to nil. */ |
| 2437 | 2437 | ||
| 2438 | static void | 2438 | static void |
| @@ -2536,45 +2536,45 @@ save_window_save (window, vector, i) | |||
| 2536 | 2536 | ||
| 2537 | DEFUN ("current-window-configuration", | 2537 | DEFUN ("current-window-configuration", |
| 2538 | Fcurrent_window_configuration, Scurrent_window_configuration, 0, 1, 0, | 2538 | Fcurrent_window_configuration, Scurrent_window_configuration, 0, 1, 0, |
| 2539 | "Return an object representing the current window configuration of SCREEN.\n\ | 2539 | "Return an object representing the current window configuration of FRAME.\n\ |
| 2540 | If SCREEN is nil or omitted, use the selected screen.\n\ | 2540 | If FRAME is nil or omitted, use the selected frame.\n\ |
| 2541 | This describes the number of windows, their sizes and current buffers,\n\ | 2541 | This describes the number of windows, their sizes and current buffers,\n\ |
| 2542 | and for each displayed buffer, where display starts, and the positions of\n\ | 2542 | and for each displayed buffer, where display starts, and the positions of\n\ |
| 2543 | point and mark. An exception is made for point in the current buffer:\n\ | 2543 | point and mark. An exception is made for point in the current buffer:\n\ |
| 2544 | its value is -not- saved.") | 2544 | its value is -not- saved.") |
| 2545 | (screen) | 2545 | (frame) |
| 2546 | Lisp_Object screen; | 2546 | Lisp_Object frame; |
| 2547 | { | 2547 | { |
| 2548 | register Lisp_Object tem; | 2548 | register Lisp_Object tem; |
| 2549 | register int n_windows; | 2549 | register int n_windows; |
| 2550 | register struct save_window_data *data; | 2550 | register struct save_window_data *data; |
| 2551 | register int i; | 2551 | register int i; |
| 2552 | SCREEN_PTR s; | 2552 | FRAME_PTR f; |
| 2553 | 2553 | ||
| 2554 | if (NILP (screen)) | 2554 | if (NILP (frame)) |
| 2555 | s = selected_screen; | 2555 | f = selected_frame; |
| 2556 | else | 2556 | else |
| 2557 | { | 2557 | { |
| 2558 | CHECK_LIVE_SCREEN (screen, 0); | 2558 | CHECK_LIVE_FRAME (frame, 0); |
| 2559 | s = XSCREEN (screen); | 2559 | f = XFRAME (frame); |
| 2560 | } | 2560 | } |
| 2561 | 2561 | ||
| 2562 | n_windows = count_windows (XWINDOW (SCREEN_ROOT_WINDOW (s))); | 2562 | n_windows = count_windows (XWINDOW (FRAME_ROOT_WINDOW (f))); |
| 2563 | data = (struct save_window_data *) | 2563 | data = (struct save_window_data *) |
| 2564 | XVECTOR (Fmake_vector (make_number (SAVE_WINDOW_DATA_SIZE), | 2564 | XVECTOR (Fmake_vector (make_number (SAVE_WINDOW_DATA_SIZE), |
| 2565 | Qnil)); | 2565 | Qnil)); |
| 2566 | XFASTINT (data->screen_width) = SCREEN_WIDTH (s); | 2566 | XFASTINT (data->frame_width) = FRAME_WIDTH (f); |
| 2567 | XFASTINT (data->screen_height) = SCREEN_HEIGHT (s); | 2567 | XFASTINT (data->frame_height) = FRAME_HEIGHT (f); |
| 2568 | data->current_window = SCREEN_SELECTED_WINDOW (s); | 2568 | data->current_window = FRAME_SELECTED_WINDOW (f); |
| 2569 | XSET (data->current_buffer, Lisp_Buffer, current_buffer); | 2569 | XSET (data->current_buffer, Lisp_Buffer, current_buffer); |
| 2570 | data->minibuf_scroll_window = Vminibuf_scroll_window; | 2570 | data->minibuf_scroll_window = Vminibuf_scroll_window; |
| 2571 | data->root_window = SCREEN_ROOT_WINDOW (s); | 2571 | data->root_window = FRAME_ROOT_WINDOW (f); |
| 2572 | tem = Fmake_vector (make_number (n_windows), Qnil); | 2572 | tem = Fmake_vector (make_number (n_windows), Qnil); |
| 2573 | data->saved_windows = tem; | 2573 | data->saved_windows = tem; |
| 2574 | for (i = 0; i < n_windows; i++) | 2574 | for (i = 0; i < n_windows; i++) |
| 2575 | XVECTOR (tem)->contents[i] | 2575 | XVECTOR (tem)->contents[i] |
| 2576 | = Fmake_vector (make_number (SAVED_WINDOW_VECTOR_SIZE), Qnil); | 2576 | = Fmake_vector (make_number (SAVED_WINDOW_VECTOR_SIZE), Qnil); |
| 2577 | save_window_save (SCREEN_ROOT_WINDOW (s), | 2577 | save_window_save (FRAME_ROOT_WINDOW (f), |
| 2578 | XVECTOR (tem), 0); | 2578 | XVECTOR (tem), 0); |
| 2579 | XSET (tem, Lisp_Window_Configuration, data); | 2579 | XSET (tem, Lisp_Window_Configuration, data); |
| 2580 | return (tem); | 2580 | return (tem); |
| @@ -2600,47 +2600,47 @@ Does not restore the value of point in current buffer.") | |||
| 2600 | 2600 | ||
| 2601 | init_window_once () | 2601 | init_window_once () |
| 2602 | { | 2602 | { |
| 2603 | #ifdef MULTI_SCREEN | 2603 | #ifdef MULTI_FRAME |
| 2604 | selected_screen = make_terminal_screen (); | 2604 | selected_frame = make_terminal_frame (); |
| 2605 | minibuf_window = selected_screen->minibuffer_window; | 2605 | minibuf_window = selected_frame->minibuffer_window; |
| 2606 | selected_window = selected_screen->selected_window; | 2606 | selected_window = selected_frame->selected_window; |
| 2607 | last_nonminibuf_screen = selected_screen; | 2607 | last_nonminibuf_frame = selected_frame; |
| 2608 | #else /* not MULTI_SCREEN */ | 2608 | #else /* not MULTI_FRAME */ |
| 2609 | extern Lisp_Object get_minibuffer (); | 2609 | extern Lisp_Object get_minibuffer (); |
| 2610 | 2610 | ||
| 2611 | SCREEN_ROOT_WINDOW (selected_screen) = make_window (); | 2611 | FRAME_ROOT_WINDOW (selected_frame) = make_window (); |
| 2612 | minibuf_window = make_window (); | 2612 | minibuf_window = make_window (); |
| 2613 | 2613 | ||
| 2614 | XWINDOW (SCREEN_ROOT_WINDOW (selected_screen))->next = minibuf_window; | 2614 | XWINDOW (FRAME_ROOT_WINDOW (selected_frame))->next = minibuf_window; |
| 2615 | XWINDOW (minibuf_window)->prev = SCREEN_ROOT_WINDOW (selected_screen); | 2615 | XWINDOW (minibuf_window)->prev = FRAME_ROOT_WINDOW (selected_frame); |
| 2616 | 2616 | ||
| 2617 | /* These values 9 and 10 are arbitrary, | 2617 | /* These values 9 and 10 are arbitrary, |
| 2618 | just so that there is "something there." | 2618 | just so that there is "something there." |
| 2619 | Correct values are put in in init_xdisp */ | 2619 | Correct values are put in in init_xdisp */ |
| 2620 | 2620 | ||
| 2621 | XFASTINT (XWINDOW (SCREEN_ROOT_WINDOW (selected_screen))->width) = 10; | 2621 | XFASTINT (XWINDOW (FRAME_ROOT_WINDOW (selected_frame))->width) = 10; |
| 2622 | XFASTINT (XWINDOW (minibuf_window)->width) = 10; | 2622 | XFASTINT (XWINDOW (minibuf_window)->width) = 10; |
| 2623 | 2623 | ||
| 2624 | XFASTINT (XWINDOW (SCREEN_ROOT_WINDOW (selected_screen))->height) = 9; | 2624 | XFASTINT (XWINDOW (FRAME_ROOT_WINDOW (selected_frame))->height) = 9; |
| 2625 | XFASTINT (XWINDOW (minibuf_window)->top) = 9; | 2625 | XFASTINT (XWINDOW (minibuf_window)->top) = 9; |
| 2626 | XFASTINT (XWINDOW (minibuf_window)->height) = 1; | 2626 | XFASTINT (XWINDOW (minibuf_window)->height) = 1; |
| 2627 | 2627 | ||
| 2628 | /* Prevent error in Fset_window_buffer. */ | 2628 | /* Prevent error in Fset_window_buffer. */ |
| 2629 | XWINDOW (SCREEN_ROOT_WINDOW (selected_screen))->buffer = Qt; | 2629 | XWINDOW (FRAME_ROOT_WINDOW (selected_frame))->buffer = Qt; |
| 2630 | XWINDOW (minibuf_window)->buffer = Qt; | 2630 | XWINDOW (minibuf_window)->buffer = Qt; |
| 2631 | 2631 | ||
| 2632 | /* Now set them up for real. */ | 2632 | /* Now set them up for real. */ |
| 2633 | Fset_window_buffer (SCREEN_ROOT_WINDOW (selected_screen), | 2633 | Fset_window_buffer (FRAME_ROOT_WINDOW (selected_frame), |
| 2634 | Fcurrent_buffer ()); | 2634 | Fcurrent_buffer ()); |
| 2635 | Fset_window_buffer (minibuf_window, get_minibuffer (0)); | 2635 | Fset_window_buffer (minibuf_window, get_minibuffer (0)); |
| 2636 | 2636 | ||
| 2637 | selected_window = SCREEN_ROOT_WINDOW (selected_screen); | 2637 | selected_window = FRAME_ROOT_WINDOW (selected_frame); |
| 2638 | /* Make sure this window seems more recently used than | 2638 | /* Make sure this window seems more recently used than |
| 2639 | a newly-created, never-selected window. Increment | 2639 | a newly-created, never-selected window. Increment |
| 2640 | window_select_count so the first selection ever will get | 2640 | window_select_count so the first selection ever will get |
| 2641 | something newer than this. */ | 2641 | something newer than this. */ |
| 2642 | XFASTINT (XWINDOW (selected_window)->use_time) = ++window_select_count; | 2642 | XFASTINT (XWINDOW (selected_window)->use_time) = ++window_select_count; |
| 2643 | #endif /* not MULTI_SCREEN */ | 2643 | #endif /* not MULTI_FRAME */ |
| 2644 | } | 2644 | } |
| 2645 | 2645 | ||
| 2646 | syms_of_window () | 2646 | syms_of_window () |
| @@ -2670,13 +2670,13 @@ work using this function."); | |||
| 2670 | 2670 | ||
| 2671 | DEFVAR_LISP ("mouse-event", &Vmouse_event, | 2671 | DEFVAR_LISP ("mouse-event", &Vmouse_event, |
| 2672 | "The last mouse-event object. A list of four elements:\n\ | 2672 | "The last mouse-event object. A list of four elements:\n\ |
| 2673 | ((X-POS Y-POS) WINDOW SCREEN-PART KEYSEQ).\n\ | 2673 | ((X-POS Y-POS) WINDOW FRAME-PART KEYSEQ).\n\ |
| 2674 | KEYSEQ is a string, the key sequence to be looked up in the mouse maps.\n\ | 2674 | KEYSEQ is a string, the key sequence to be looked up in the mouse maps.\n\ |
| 2675 | WINDOW is the window that the click applies do.\n\ | 2675 | WINDOW is the window that the click applies do.\n\ |
| 2676 | If SCREEN-PART is non-nil, the event was on a scrollbar;\n\ | 2676 | If FRAME-PART is non-nil, the event was on a scrollbar;\n\ |
| 2677 | then Y-POS is really the total length of the scrollbar, while X-POS is\n\ | 2677 | then Y-POS is really the total length of the scrollbar, while X-POS is\n\ |
| 2678 | the relative position of the scrollbar's value within that total length.\n\ | 2678 | the relative position of the scrollbar's value within that total length.\n\ |
| 2679 | SCREEN-PART is one of the following symbols:\n\ | 2679 | FRAME-PART is one of the following symbols:\n\ |
| 2680 | `vertical-scrollbar', `vertical-slider',\n\ | 2680 | `vertical-scrollbar', `vertical-slider',\n\ |
| 2681 | `vertical-thumbup', `vertical-thumbdown',\n\ | 2681 | `vertical-thumbup', `vertical-thumbdown',\n\ |
| 2682 | `horizontal-scrollbar', `horizontal-slider',\n\ | 2682 | `horizontal-scrollbar', `horizontal-slider',\n\ |
| @@ -2691,18 +2691,18 @@ SCREEN-PART is one of the following symbols:\n\ | |||
| 2691 | "If non-nil, this is a buffer and \\[scroll-other-window] should scroll its window."); | 2691 | "If non-nil, this is a buffer and \\[scroll-other-window] should scroll its window."); |
| 2692 | Vother_window_scroll_buffer = Qnil; | 2692 | Vother_window_scroll_buffer = Qnil; |
| 2693 | 2693 | ||
| 2694 | #ifdef MULTI_SCREEN | 2694 | #ifdef MULTI_FRAME |
| 2695 | DEFVAR_BOOL ("pop-up-screens", &pop_up_screens, | 2695 | DEFVAR_BOOL ("pop-up-frames", &pop_up_frames, |
| 2696 | "*Non-nil means `display-buffer' should make a separate X-window."); | 2696 | "*Non-nil means `display-buffer' should make a separate X-window."); |
| 2697 | pop_up_screens = 0; | 2697 | pop_up_frames = 0; |
| 2698 | 2698 | ||
| 2699 | DEFVAR_LISP ("pop-up-screen-function", &Vpop_up_screen_function, | 2699 | DEFVAR_LISP ("pop-up-frame-function", &Vpop_up_frame_function, |
| 2700 | "*If non-nil, function to call to handle automatic new screen creation.\n\ | 2700 | "*If non-nil, function to call to handle automatic new frame creation.\n\ |
| 2701 | It is called with no arguments and should return a newly created screen.\n\ | 2701 | It is called with no arguments and should return a newly created frame.\n\ |
| 2702 | \n\ | 2702 | \n\ |
| 2703 | A typical value might be `(lambda () (x-create-screen auto-screen-parms))'\n\ | 2703 | A typical value might be `(lambda () (new-frame pop-up-frame-alist))'\n\ |
| 2704 | where `auto-screen-parms' would hold the default screen parameters."); | 2704 | where `pop-up-frame-alist' would hold the default frame parameters."); |
| 2705 | Vpop_up_screen_function = Qnil; | 2705 | Vpop_up_frame_function = Qnil; |
| 2706 | #endif | 2706 | #endif |
| 2707 | 2707 | ||
| 2708 | DEFVAR_BOOL ("pop-up-windows", &pop_up_windows, | 2708 | DEFVAR_BOOL ("pop-up-windows", &pop_up_windows, |
diff --git a/src/window.h b/src/window.h index 62a6c5b0c2e..8cb36ef0a8d 100644 --- a/src/window.h +++ b/src/window.h | |||
| @@ -27,7 +27,7 @@ All windows in use are arranged into a tree, with pointers up and down. | |||
| 27 | Windows that are leaves of the tree are actually displayed | 27 | Windows that are leaves of the tree are actually displayed |
| 28 | and show the contents of buffers. Windows that are not leaves | 28 | and show the contents of buffers. Windows that are not leaves |
| 29 | are used for representing the way groups of leaf windows are | 29 | are used for representing the way groups of leaf windows are |
| 30 | arranged on the screen. Leaf windows never become non-leaves. | 30 | arranged on the frame. Leaf windows never become non-leaves. |
| 31 | They are deleted only by calling delete-window on them (but | 31 | They are deleted only by calling delete-window on them (but |
| 32 | this can be done implicitly). Combination windows can be created | 32 | this can be done implicitly). Combination windows can be created |
| 33 | and deleted at any time. | 33 | and deleted at any time. |
| @@ -38,7 +38,7 @@ A leaf window has a non-nil buffer field, and also | |||
| 38 | 38 | ||
| 39 | Non-leaf windows are either vertical or horizontal combinations. | 39 | Non-leaf windows are either vertical or horizontal combinations. |
| 40 | 40 | ||
| 41 | A vertical combination window has children that are arranged on the screen | 41 | A vertical combination window has children that are arranged on the frame |
| 42 | one above the next. Its vchild field points to the uppermost child. | 42 | one above the next. Its vchild field points to the uppermost child. |
| 43 | The parent field of each of the children points to the vertical | 43 | The parent field of each of the children points to the vertical |
| 44 | combination window. The next field of each child points to the | 44 | combination window. The next field of each child points to the |
| @@ -57,7 +57,7 @@ combination window may be leaf windows or vertical combination windows. | |||
| 57 | 57 | ||
| 58 | At the top of the tree are two windows which have nil as parent. | 58 | At the top of the tree are two windows which have nil as parent. |
| 59 | The second of these is minibuf_window. The first one manages all | 59 | The second of these is minibuf_window. The first one manages all |
| 60 | the screen area that is not minibuffer, and is called the root window. | 60 | the frame area that is not minibuffer, and is called the root window. |
| 61 | Different windows can be the root at different times; | 61 | Different windows can be the root at different times; |
| 62 | initially the root window is a leaf window, but if more windows | 62 | initially the root window is a leaf window, but if more windows |
| 63 | are created then that leaf window ceases to be root and a newly | 63 | are created then that leaf window ceases to be root and a newly |
| @@ -75,8 +75,8 @@ struct window | |||
| 75 | /* The window code does not refer to them. */ | 75 | /* The window code does not refer to them. */ |
| 76 | int size; | 76 | int size; |
| 77 | struct Lisp_Vector *vec_next; | 77 | struct Lisp_Vector *vec_next; |
| 78 | /* The screen this window is on. */ | 78 | /* The frame this window is on. */ |
| 79 | Lisp_Object screen; | 79 | Lisp_Object frame; |
| 80 | /* t if this window is a minibuffer window. */ | 80 | /* t if this window is a minibuffer window. */ |
| 81 | Lisp_Object mini_p; | 81 | Lisp_Object mini_p; |
| 82 | /* Following child (to right or down) at same level of tree */ | 82 | /* Following child (to right or down) at same level of tree */ |
| @@ -90,7 +90,7 @@ struct window | |||
| 90 | /* The window this one is a child of. */ | 90 | /* The window this one is a child of. */ |
| 91 | Lisp_Object parent; | 91 | Lisp_Object parent; |
| 92 | /* The upper left corner coordinates of this window, | 92 | /* The upper left corner coordinates of this window, |
| 93 | as integers relative to upper left corner of screen = 0, 0 */ | 93 | as integers relative to upper left corner of frame = 0, 0 */ |
| 94 | Lisp_Object left; | 94 | Lisp_Object left; |
| 95 | Lisp_Object top; | 95 | Lisp_Object top; |
| 96 | /* The size of the window */ | 96 | /* The size of the window */ |
| @@ -122,11 +122,11 @@ struct window | |||
| 122 | /* Value of point at that time */ | 122 | /* Value of point at that time */ |
| 123 | Lisp_Object last_point; | 123 | Lisp_Object last_point; |
| 124 | /* The rest are currently not used or only half used */ | 124 | /* The rest are currently not used or only half used */ |
| 125 | /* Screen coords of point at that time */ | 125 | /* Frame coords of point at that time */ |
| 126 | Lisp_Object last_point_x; | 126 | Lisp_Object last_point_x; |
| 127 | Lisp_Object last_point_y; | 127 | Lisp_Object last_point_y; |
| 128 | /* Screen coords of mark as of last time display completed */ | 128 | /* Frame coords of mark as of last time display completed */ |
| 129 | /* May be nil if mark does not exist or was not on screen */ | 129 | /* May be nil if mark does not exist or was not on frame */ |
| 130 | Lisp_Object last_mark_x; | 130 | Lisp_Object last_mark_x; |
| 131 | Lisp_Object last_mark_y; | 131 | Lisp_Object last_mark_y; |
| 132 | /* Number of characters in buffer past bottom of window, | 132 | /* Number of characters in buffer past bottom of window, |
| @@ -134,8 +134,8 @@ struct window | |||
| 134 | Lisp_Object window_end_pos; | 134 | Lisp_Object window_end_pos; |
| 135 | /* t if window_end_pos is truly valid. | 135 | /* t if window_end_pos is truly valid. |
| 136 | This is nil if nontrivial redisplay is preempted | 136 | This is nil if nontrivial redisplay is preempted |
| 137 | since in that case the screen image that window_end_pos | 137 | since in that case the frame image that window_end_pos |
| 138 | did not get onto the screen. */ | 138 | did not get onto the frame. */ |
| 139 | Lisp_Object window_end_valid; | 139 | Lisp_Object window_end_valid; |
| 140 | /* Vertical position (relative to window top) of that buffer position | 140 | /* Vertical position (relative to window top) of that buffer position |
| 141 | of the first of those characters */ | 141 | of the first of those characters */ |
| @@ -162,17 +162,17 @@ struct window | |||
| 162 | the top level editing loop at the end of each command. | 162 | the top level editing loop at the end of each command. |
| 163 | 163 | ||
| 164 | This value is always the same as | 164 | This value is always the same as |
| 165 | SCREEN_SELECTED_WINDOW (selected_screen). */ | 165 | FRAME_SELECTED_WINDOW (selected_frame). */ |
| 166 | 166 | ||
| 167 | extern Lisp_Object selected_window; | 167 | extern Lisp_Object selected_window; |
| 168 | 168 | ||
| 169 | /* This is a time stamp for window selection, so we can find the least | 169 | /* This is a time stamp for window selection, so we can find the least |
| 170 | recently used window. Its only users are Fselect_window, | 170 | recently used window. Its only users are Fselect_window, |
| 171 | init_window_once, and make_screen. */ | 171 | init_window_once, and make_frame. */ |
| 172 | 172 | ||
| 173 | extern int window_select_count; | 173 | extern int window_select_count; |
| 174 | 174 | ||
| 175 | /* The minibuffer window of the selected screen. | 175 | /* The minibuffer window of the selected frame. |
| 176 | Note that you cannot test for minibufferness of an arbitrary window | 176 | Note that you cannot test for minibufferness of an arbitrary window |
| 177 | by comparing against this; but you can test for minibufferness of | 177 | by comparing against this; but you can test for minibufferness of |
| 178 | the selected window or of any window that is displayed. */ | 178 | the selected window or of any window that is displayed. */ |
diff --git a/src/xdisp.c b/src/xdisp.c index 2808c515d47..3b23c489a95 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -23,7 +23,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ | |||
| 23 | /*#include <ctype.h>*/ | 23 | /*#include <ctype.h>*/ |
| 24 | #undef NULL | 24 | #undef NULL |
| 25 | #include "lisp.h" | 25 | #include "lisp.h" |
| 26 | #include "screen.h" | 26 | #include "frame.h" |
| 27 | #include "window.h" | 27 | #include "window.h" |
| 28 | #include "termchar.h" | 28 | #include "termchar.h" |
| 29 | #include "dispextern.h" | 29 | #include "dispextern.h" |
| @@ -44,18 +44,18 @@ int noninteractive_need_newline; | |||
| 44 | #define max(a, b) ((a) > (b) ? (a) : (b)) | 44 | #define max(a, b) ((a) > (b) ? (a) : (b)) |
| 45 | 45 | ||
| 46 | /* The buffer position of the first character appearing | 46 | /* The buffer position of the first character appearing |
| 47 | entirely or partially on the current screen line. | 47 | entirely or partially on the current frame line. |
| 48 | Or zero, which disables the optimization for the current screen line. */ | 48 | Or zero, which disables the optimization for the current frame line. */ |
| 49 | static int this_line_bufpos; | 49 | static int this_line_bufpos; |
| 50 | 50 | ||
| 51 | /* Number of characters past the end of this line, | 51 | /* Number of characters past the end of this line, |
| 52 | including the terminating newline */ | 52 | including the terminating newline */ |
| 53 | static int this_line_endpos; | 53 | static int this_line_endpos; |
| 54 | 54 | ||
| 55 | /* The vertical position of this screen line. */ | 55 | /* The vertical position of this frame line. */ |
| 56 | static int this_line_vpos; | 56 | static int this_line_vpos; |
| 57 | 57 | ||
| 58 | /* Hpos value for start of display on this screen line. | 58 | /* Hpos value for start of display on this frame line. |
| 59 | Usually zero, but negative if first character really began | 59 | Usually zero, but negative if first character really began |
| 60 | on previous line */ | 60 | on previous line */ |
| 61 | static int this_line_start_hpos; | 61 | static int this_line_start_hpos; |
| @@ -64,17 +64,17 @@ static int this_line_start_hpos; | |||
| 64 | static struct buffer *this_line_buffer; | 64 | static struct buffer *this_line_buffer; |
| 65 | 65 | ||
| 66 | /* Set by try_window_id to the vpos of first of any lines | 66 | /* Set by try_window_id to the vpos of first of any lines |
| 67 | scrolled on to the bottom of the screen. These lines should | 67 | scrolled on to the bottom of the frame. These lines should |
| 68 | not be included in any general scroll computation. */ | 68 | not be included in any general scroll computation. */ |
| 69 | static int scroll_bottom_vpos; | 69 | static int scroll_bottom_vpos; |
| 70 | 70 | ||
| 71 | /* Value of echo_area_glyphs when it was last acted on. | 71 | /* Value of echo_area_glyphs when it was last acted on. |
| 72 | If this is nonzero, there is a message on the screen | 72 | If this is nonzero, there is a message on the frame |
| 73 | in the minibuffer and it should be erased as soon | 73 | in the minibuffer and it should be erased as soon |
| 74 | as it is no longer requested to appear. */ | 74 | as it is no longer requested to appear. */ |
| 75 | char *previous_echo_glyphs; | 75 | char *previous_echo_glyphs; |
| 76 | 76 | ||
| 77 | /* Nonzero means truncate lines in all windows less wide than the screen */ | 77 | /* Nonzero means truncate lines in all windows less wide than the frame */ |
| 78 | int truncate_partial_width_windows; | 78 | int truncate_partial_width_windows; |
| 79 | 79 | ||
| 80 | Lisp_Object Vglobal_mode_string; | 80 | Lisp_Object Vglobal_mode_string; |
| @@ -91,7 +91,7 @@ Lisp_Object last_arrow_position, last_arrow_string; | |||
| 91 | /* Nonzero if overlay arrow has been displayed once in this window. */ | 91 | /* Nonzero if overlay arrow has been displayed once in this window. */ |
| 92 | static int overlay_arrow_seen; | 92 | static int overlay_arrow_seen; |
| 93 | 93 | ||
| 94 | /* If cursor motion alone moves point off screen, | 94 | /* If cursor motion alone moves point off frame, |
| 95 | Try scrolling this many lines up or down if that will bring it back. */ | 95 | Try scrolling this many lines up or down if that will bring it back. */ |
| 96 | int scroll_step; | 96 | int scroll_step; |
| 97 | 97 | ||
| @@ -103,7 +103,7 @@ static int blank_end_of_window; | |||
| 103 | keyboard.c refers to this. */ | 103 | keyboard.c refers to this. */ |
| 104 | int buffer_shared; | 104 | int buffer_shared; |
| 105 | 105 | ||
| 106 | /* display_text_line sets these to the screen position (origin 0) of point, | 106 | /* display_text_line sets these to the frame position (origin 0) of point, |
| 107 | whether the window is selected or not. | 107 | whether the window is selected or not. |
| 108 | Set one to -1 first to determine whether point was found afterwards. */ | 108 | Set one to -1 first to determine whether point was found afterwards. */ |
| 109 | 109 | ||
| @@ -167,7 +167,7 @@ int clip_changed; | |||
| 167 | int windows_or_buffers_changed; | 167 | int windows_or_buffers_changed; |
| 168 | 168 | ||
| 169 | 169 | ||
| 170 | /* Nonzero if SCREEN_MESSAGE_BUF (selected_screen) is being used by print; | 170 | /* Nonzero if FRAME_MESSAGE_BUF (selected_frame) is being used by print; |
| 171 | zero if being used by message. */ | 171 | zero if being used by message. */ |
| 172 | int message_buf_print; | 172 | int message_buf_print; |
| 173 | 173 | ||
| @@ -187,14 +187,14 @@ message (m, a1, a2, a3) | |||
| 187 | fprintf (stderr, "\n"); | 187 | fprintf (stderr, "\n"); |
| 188 | fflush (stderr); | 188 | fflush (stderr); |
| 189 | } | 189 | } |
| 190 | /* A null message buffer means that the screen hasn't really been | 190 | /* A null message buffer means that the frame hasn't really been |
| 191 | initialized yet. Error messages get reported properly by | 191 | initialized yet. Error messages get reported properly by |
| 192 | cmd_error, so this must be just an informative message; toss it. */ | 192 | cmd_error, so this must be just an informative message; toss it. */ |
| 193 | else if (INTERACTIVE && SCREEN_MESSAGE_BUF (selected_screen)) | 193 | else if (INTERACTIVE && FRAME_MESSAGE_BUF (selected_frame)) |
| 194 | { | 194 | { |
| 195 | #ifdef MULTI_SCREEN | 195 | #ifdef MULTI_FRAME |
| 196 | choose_minibuf_screen (); | 196 | choose_minibuf_frame (); |
| 197 | Fmake_screen_visible (WINDOW_SCREEN (XWINDOW (minibuf_window))); | 197 | Fmake_frame_visible (WINDOW_FRAME (XWINDOW (minibuf_window))); |
| 198 | #endif | 198 | #endif |
| 199 | 199 | ||
| 200 | { | 200 | { |
| @@ -204,15 +204,15 @@ message (m, a1, a2, a3) | |||
| 204 | a[1] = a2; | 204 | a[1] = a2; |
| 205 | a[2] = a3; | 205 | a[2] = a3; |
| 206 | 206 | ||
| 207 | doprnt (SCREEN_MESSAGE_BUF (selected_screen), | 207 | doprnt (FRAME_MESSAGE_BUF (selected_frame), |
| 208 | SCREEN_WIDTH (selected_screen), m, 0, 3, a); | 208 | FRAME_WIDTH (selected_frame), m, 0, 3, a); |
| 209 | #else | 209 | #else |
| 210 | doprnt (SCREEN_MESSAGE_BUF (selected_screen), | 210 | doprnt (FRAME_MESSAGE_BUF (selected_frame), |
| 211 | SCREEN_WIDTH (selected_screen), m, 0, 3, &a1); | 211 | FRAME_WIDTH (selected_frame), m, 0, 3, &a1); |
| 212 | #endif /* NO_ARG_ARRAY */ | 212 | #endif /* NO_ARG_ARRAY */ |
| 213 | } | 213 | } |
| 214 | 214 | ||
| 215 | echo_area_glyphs = SCREEN_MESSAGE_BUF (selected_screen); | 215 | echo_area_glyphs = FRAME_MESSAGE_BUF (selected_frame); |
| 216 | 216 | ||
| 217 | /* Print should start at the beginning of the message | 217 | /* Print should start at the beginning of the message |
| 218 | buffer next time. */ | 218 | buffer next time. */ |
| @@ -220,7 +220,7 @@ message (m, a1, a2, a3) | |||
| 220 | 220 | ||
| 221 | do_pending_window_change (); | 221 | do_pending_window_change (); |
| 222 | echo_area_display (); | 222 | echo_area_display (); |
| 223 | update_screen (XSCREEN (XWINDOW (minibuf_window)->screen), 1, 1); | 223 | update_frame (XFRAME (XWINDOW (minibuf_window)->frame), 1, 1); |
| 224 | do_pending_window_change (); | 224 | do_pending_window_change (); |
| 225 | } | 225 | } |
| 226 | } | 226 | } |
| @@ -238,20 +238,20 @@ message1 (m) | |||
| 238 | fprintf (stderr, "%s\n", m); | 238 | fprintf (stderr, "%s\n", m); |
| 239 | fflush (stderr); | 239 | fflush (stderr); |
| 240 | } | 240 | } |
| 241 | /* A null message buffer means that the screen hasn't really been | 241 | /* A null message buffer means that the frame hasn't really been |
| 242 | initialized yet. Error messages get reported properly by | 242 | initialized yet. Error messages get reported properly by |
| 243 | cmd_error, so this must be just an informative message; toss it. */ | 243 | cmd_error, so this must be just an informative message; toss it. */ |
| 244 | else if (INTERACTIVE && SCREEN_MESSAGE_BUF (selected_screen)) | 244 | else if (INTERACTIVE && FRAME_MESSAGE_BUF (selected_frame)) |
| 245 | { | 245 | { |
| 246 | #ifdef MULTI_SCREEN | 246 | #ifdef MULTI_FRAME |
| 247 | choose_minibuf_screen (); | 247 | choose_minibuf_frame (); |
| 248 | Fmake_screen_visible (WINDOW_SCREEN (XWINDOW (minibuf_window))); | 248 | Fmake_frame_visible (WINDOW_FRAME (XWINDOW (minibuf_window))); |
| 249 | #endif | 249 | #endif |
| 250 | 250 | ||
| 251 | echo_area_glyphs = m; | 251 | echo_area_glyphs = m; |
| 252 | do_pending_window_change (); | 252 | do_pending_window_change (); |
| 253 | echo_area_display (); | 253 | echo_area_display (); |
| 254 | update_screen (XSCREEN (XWINDOW (minibuf_window)->screen), 1, 1); | 254 | update_frame (XFRAME (XWINDOW (minibuf_window)->frame), 1, 1); |
| 255 | do_pending_window_change (); | 255 | do_pending_window_change (); |
| 256 | } | 256 | } |
| 257 | } | 257 | } |
| @@ -260,33 +260,33 @@ static void | |||
| 260 | echo_area_display () | 260 | echo_area_display () |
| 261 | { | 261 | { |
| 262 | register int vpos; | 262 | register int vpos; |
| 263 | SCREEN_PTR s; | 263 | FRAME_PTR f; |
| 264 | 264 | ||
| 265 | #ifdef MULTI_SCREEN | 265 | #ifdef MULTI_FRAME |
| 266 | choose_minibuf_screen (); | 266 | choose_minibuf_frame (); |
| 267 | s = XSCREEN (WINDOW_SCREEN (XWINDOW (minibuf_window))); | 267 | f = XFRAME (WINDOW_FRAME (XWINDOW (minibuf_window))); |
| 268 | 268 | ||
| 269 | if (! SCREEN_VISIBLE_P (s)) | 269 | if (! FRAME_VISIBLE_P (f)) |
| 270 | return; | 270 | return; |
| 271 | #endif | 271 | #endif |
| 272 | 272 | ||
| 273 | if (screen_garbaged) | 273 | if (frame_garbaged) |
| 274 | { | 274 | { |
| 275 | Fredraw_display (); | 275 | Fredraw_display (); |
| 276 | screen_garbaged = 0; | 276 | frame_garbaged = 0; |
| 277 | } | 277 | } |
| 278 | 278 | ||
| 279 | if (echo_area_glyphs || minibuf_level == 0) | 279 | if (echo_area_glyphs || minibuf_level == 0) |
| 280 | { | 280 | { |
| 281 | vpos = XFASTINT (XWINDOW (minibuf_window)->top); | 281 | vpos = XFASTINT (XWINDOW (minibuf_window)->top); |
| 282 | get_display_line (s, vpos, 0); | 282 | get_display_line (f, vpos, 0); |
| 283 | display_string (XWINDOW (minibuf_window), vpos, | 283 | display_string (XWINDOW (minibuf_window), vpos, |
| 284 | echo_area_glyphs ? echo_area_glyphs : "", | 284 | echo_area_glyphs ? echo_area_glyphs : "", |
| 285 | 0, 0, 0, SCREEN_WIDTH (s)); | 285 | 0, 0, 0, FRAME_WIDTH (f)); |
| 286 | 286 | ||
| 287 | /* If desired cursor location is on this line, put it at end of text */ | 287 | /* If desired cursor location is on this line, put it at end of text */ |
| 288 | if (SCREEN_CURSOR_Y (s) == vpos) | 288 | if (FRAME_CURSOR_Y (f) == vpos) |
| 289 | SCREEN_CURSOR_X (s) = SCREEN_DESIRED_GLYPHS (s)->used[vpos]; | 289 | FRAME_CURSOR_X (f) = FRAME_DESIRED_GLYPHS (f)->used[vpos]; |
| 290 | 290 | ||
| 291 | /* Fill the rest of the minibuffer window with blank lines. */ | 291 | /* Fill the rest of the minibuffer window with blank lines. */ |
| 292 | { | 292 | { |
| @@ -294,9 +294,9 @@ echo_area_display () | |||
| 294 | 294 | ||
| 295 | for (i = vpos + 1; i < vpos + XWINDOW (minibuf_window)->height; i++) | 295 | for (i = vpos + 1; i < vpos + XWINDOW (minibuf_window)->height; i++) |
| 296 | { | 296 | { |
| 297 | get_display_line (s, i, 0); | 297 | get_display_line (f, i, 0); |
| 298 | display_string (XWINDOW (minibuf_window), vpos, | 298 | display_string (XWINDOW (minibuf_window), vpos, |
| 299 | "", 0, 0, 0, SCREEN_WIDTH (s)); | 299 | "", 0, 0, 0, FRAME_WIDTH (f)); |
| 300 | } | 300 | } |
| 301 | } | 301 | } |
| 302 | } | 302 | } |
| @@ -309,7 +309,7 @@ echo_area_display () | |||
| 309 | previous_echo_glyphs = echo_area_glyphs; | 309 | previous_echo_glyphs = echo_area_glyphs; |
| 310 | } | 310 | } |
| 311 | 311 | ||
| 312 | /* Do a screen update, taking possible shortcuts into account. | 312 | /* Do a frame update, taking possible shortcuts into account. |
| 313 | This is the main external entry point for redisplay. | 313 | This is the main external entry point for redisplay. |
| 314 | 314 | ||
| 315 | If the last redisplay displayed an echo area message and that | 315 | If the last redisplay displayed an echo area message and that |
| @@ -338,17 +338,17 @@ redisplay () | |||
| 338 | if (noninteractive) | 338 | if (noninteractive) |
| 339 | return; | 339 | return; |
| 340 | 340 | ||
| 341 | /* Notice any pending interrupt request to change screen size. */ | 341 | /* Notice any pending interrupt request to change frame size. */ |
| 342 | do_pending_window_change (); | 342 | do_pending_window_change (); |
| 343 | 343 | ||
| 344 | if (screen_garbaged) | 344 | if (frame_garbaged) |
| 345 | { | 345 | { |
| 346 | Fredraw_display (); | 346 | Fredraw_display (); |
| 347 | screen_garbaged = 0; | 347 | frame_garbaged = 0; |
| 348 | } | 348 | } |
| 349 | 349 | ||
| 350 | /* Normally the message* functions will have already displayed and | 350 | /* Normally the message* functions will have already displayed and |
| 351 | updated the echo area, but the screen may have been trashed, or | 351 | updated the echo area, but the frame may have been trashed, or |
| 352 | the update may have been preempted, so display the echo area | 352 | the update may have been preempted, so display the echo area |
| 353 | again here. */ | 353 | again here. */ |
| 354 | if (echo_area_glyphs || previous_echo_glyphs) | 354 | if (echo_area_glyphs || previous_echo_glyphs) |
| @@ -369,7 +369,7 @@ redisplay () | |||
| 369 | update_mode_lines++; | 369 | update_mode_lines++; |
| 370 | } | 370 | } |
| 371 | 371 | ||
| 372 | SCREEN_SCROLL_BOTTOM_VPOS (XSCREEN (w->screen)) = -1; | 372 | FRAME_SCROLL_BOTTOM_VPOS (XFRAME (w->frame)) = -1; |
| 373 | 373 | ||
| 374 | all_windows = update_mode_lines || buffer_shared > 1; | 374 | all_windows = update_mode_lines || buffer_shared > 1; |
| 375 | 375 | ||
| @@ -382,7 +382,7 @@ redisplay () | |||
| 382 | tlbufpos = this_line_bufpos; | 382 | tlbufpos = this_line_bufpos; |
| 383 | tlendpos = this_line_endpos; | 383 | tlendpos = this_line_endpos; |
| 384 | if (!all_windows && tlbufpos > 0 && NILP (w->update_mode_line) | 384 | if (!all_windows && tlbufpos > 0 && NILP (w->update_mode_line) |
| 385 | && SCREEN_VISIBLE_P (XSCREEN (w->screen)) | 385 | && FRAME_VISIBLE_P (XFRAME (w->frame)) |
| 386 | /* Make sure recorded data applies to current buffer, etc */ | 386 | /* Make sure recorded data applies to current buffer, etc */ |
| 387 | && this_line_buffer == current_buffer | 387 | && this_line_buffer == current_buffer |
| 388 | && current_buffer == XBUFFER (w->buffer) | 388 | && current_buffer == XBUFFER (w->buffer) |
| @@ -422,7 +422,7 @@ redisplay () | |||
| 422 | if (cursor_vpos >= 0 && this_line_bufpos | 422 | if (cursor_vpos >= 0 && this_line_bufpos |
| 423 | && this_line_endpos == tlendpos) | 423 | && this_line_endpos == tlendpos) |
| 424 | { | 424 | { |
| 425 | if (XFASTINT (w->width) != SCREEN_WIDTH (XSCREEN (WINDOW_SCREEN (w)))) | 425 | if (XFASTINT (w->width) != FRAME_WIDTH (XFRAME (WINDOW_FRAME (w)))) |
| 426 | preserve_other_columns (w); | 426 | preserve_other_columns (w); |
| 427 | goto update; | 427 | goto update; |
| 428 | } | 428 | } |
| @@ -445,14 +445,14 @@ redisplay () | |||
| 445 | point, 2, - (1 << (SHORTBITS - 1)), | 445 | point, 2, - (1 << (SHORTBITS - 1)), |
| 446 | XFASTINT (w->width) - 1 | 446 | XFASTINT (w->width) - 1 |
| 447 | - (XFASTINT (w->width) + XFASTINT (w->left) | 447 | - (XFASTINT (w->width) + XFASTINT (w->left) |
| 448 | != SCREEN_WIDTH (selected_screen)), | 448 | != FRAME_WIDTH (selected_frame)), |
| 449 | XINT (w->hscroll), | 449 | XINT (w->hscroll), |
| 450 | pos_tab_offset (w, tlbufpos)); | 450 | pos_tab_offset (w, tlbufpos)); |
| 451 | if (pos.vpos < 1) | 451 | if (pos.vpos < 1) |
| 452 | { | 452 | { |
| 453 | SCREEN_CURSOR_X (selected_screen) | 453 | FRAME_CURSOR_X (selected_frame) |
| 454 | = XFASTINT (w->left) + max (pos.hpos, 0); | 454 | = XFASTINT (w->left) + max (pos.hpos, 0); |
| 455 | SCREEN_CURSOR_Y (selected_screen) = this_line_vpos; | 455 | FRAME_CURSOR_Y (selected_frame) = this_line_vpos; |
| 456 | goto update; | 456 | goto update; |
| 457 | } | 457 | } |
| 458 | else | 458 | else |
| @@ -460,7 +460,7 @@ redisplay () | |||
| 460 | } | 460 | } |
| 461 | cancel: | 461 | cancel: |
| 462 | /* Text changed drastically or point moved off of line */ | 462 | /* Text changed drastically or point moved off of line */ |
| 463 | cancel_line (this_line_vpos, selected_screen); | 463 | cancel_line (this_line_vpos, selected_frame); |
| 464 | } | 464 | } |
| 465 | 465 | ||
| 466 | this_line_bufpos = 0; | 466 | this_line_bufpos = 0; |
| @@ -468,33 +468,33 @@ redisplay () | |||
| 468 | 468 | ||
| 469 | if (all_windows) | 469 | if (all_windows) |
| 470 | { | 470 | { |
| 471 | #ifdef MULTI_SCREEN | 471 | #ifdef MULTI_FRAME |
| 472 | Lisp_Object tail; | 472 | Lisp_Object tail; |
| 473 | 473 | ||
| 474 | /* Recompute # windows showing selected buffer. | 474 | /* Recompute # windows showing selected buffer. |
| 475 | This will be incremented each time such a window is displayed. */ | 475 | This will be incremented each time such a window is displayed. */ |
| 476 | buffer_shared = 0; | 476 | buffer_shared = 0; |
| 477 | 477 | ||
| 478 | for (tail = Vscreen_list; CONSP (tail); tail = XCONS (tail)->cdr) | 478 | for (tail = Vframe_list; CONSP (tail); tail = XCONS (tail)->cdr) |
| 479 | { | 479 | { |
| 480 | SCREEN_PTR s; | 480 | FRAME_PTR f; |
| 481 | 481 | ||
| 482 | if (XTYPE (XCONS (tail)->car) != Lisp_Screen) | 482 | if (XTYPE (XCONS (tail)->car) != Lisp_Frame) |
| 483 | continue; | 483 | continue; |
| 484 | 484 | ||
| 485 | s = XSCREEN (XCONS (tail)->car); | 485 | f = XFRAME (XCONS (tail)->car); |
| 486 | if (s->visible) | 486 | if (f->visible) |
| 487 | /* Redraw its windows. */ | 487 | /* Redraw its windows. */ |
| 488 | redisplay_windows (SCREEN_ROOT_WINDOW (s)); | 488 | redisplay_windows (FRAME_ROOT_WINDOW (f)); |
| 489 | } | 489 | } |
| 490 | #else | 490 | #else |
| 491 | redisplay_windows (SCREEN_ROOT_WINDOW (s)); | 491 | redisplay_windows (FRAME_ROOT_WINDOW (f)); |
| 492 | #endif /* not MULTI_SCREEN */ | 492 | #endif /* not MULTI_FRAME */ |
| 493 | } | 493 | } |
| 494 | else if (SCREEN_VISIBLE_P (selected_screen)) | 494 | else if (FRAME_VISIBLE_P (selected_frame)) |
| 495 | { | 495 | { |
| 496 | redisplay_window (selected_window, 1); | 496 | redisplay_window (selected_window, 1); |
| 497 | if (XFASTINT (w->width) != SCREEN_WIDTH (selected_screen)) | 497 | if (XFASTINT (w->width) != FRAME_WIDTH (selected_frame)) |
| 498 | preserve_other_columns (w); | 498 | preserve_other_columns (w); |
| 499 | } | 499 | } |
| 500 | 500 | ||
| @@ -506,51 +506,51 @@ update: | |||
| 506 | unrequest_sigio (); | 506 | unrequest_sigio (); |
| 507 | stop_polling (); | 507 | stop_polling (); |
| 508 | 508 | ||
| 509 | #ifdef MULTI_SCREEN | 509 | #ifdef MULTI_FRAME |
| 510 | if (all_windows) | 510 | if (all_windows) |
| 511 | { | 511 | { |
| 512 | Lisp_Object tail; | 512 | Lisp_Object tail; |
| 513 | 513 | ||
| 514 | pause = 0; | 514 | pause = 0; |
| 515 | 515 | ||
| 516 | for (tail = Vscreen_list; CONSP (tail); tail = XCONS (tail)->cdr) | 516 | for (tail = Vframe_list; CONSP (tail); tail = XCONS (tail)->cdr) |
| 517 | { | 517 | { |
| 518 | SCREEN_PTR s; | 518 | FRAME_PTR f; |
| 519 | 519 | ||
| 520 | if (XTYPE (XCONS (tail)->car) != Lisp_Screen) | 520 | if (XTYPE (XCONS (tail)->car) != Lisp_Frame) |
| 521 | continue; | 521 | continue; |
| 522 | 522 | ||
| 523 | s = XSCREEN (XCONS (tail)->car); | 523 | f = XFRAME (XCONS (tail)->car); |
| 524 | if (s->visible) | 524 | if (f->visible) |
| 525 | { | 525 | { |
| 526 | pause |= update_screen (s, 0, 0); | 526 | pause |= update_frame (f, 0, 0); |
| 527 | if (!pause) | 527 | if (!pause) |
| 528 | mark_window_display_accurate (s->root_window, 1); | 528 | mark_window_display_accurate (f->root_window, 1); |
| 529 | } | 529 | } |
| 530 | } | 530 | } |
| 531 | } | 531 | } |
| 532 | else | 532 | else |
| 533 | #endif /* MULTI_SCREEN */ | 533 | #endif /* MULTI_FRAME */ |
| 534 | { | 534 | { |
| 535 | if (SCREEN_VISIBLE_P (selected_screen)) | 535 | if (FRAME_VISIBLE_P (selected_frame)) |
| 536 | pause = update_screen (selected_screen, 0, 0); | 536 | pause = update_frame (selected_frame, 0, 0); |
| 537 | #ifdef MULTI_SCREEN | 537 | #ifdef MULTI_FRAME |
| 538 | /* We may have called echo_area_display at the top of this | 538 | /* We may have called echo_area_display at the top of this |
| 539 | function. If the echo area is on another screen, that may | 539 | function. If the echo area is on another frame, that may |
| 540 | have put text on a screen other than the selected one, so the | 540 | have put text on a frame other than the selected one, so the |
| 541 | above call to update_screen would not have caught it. Catch | 541 | above call to update_frame would not have caught it. Catch |
| 542 | it here. */ | 542 | it here. */ |
| 543 | { | 543 | { |
| 544 | SCREEN_PTR mini_screen = | 544 | FRAME_PTR mini_frame = |
| 545 | XSCREEN (WINDOW_SCREEN (XWINDOW (minibuf_window))); | 545 | XFRAME (WINDOW_FRAME (XWINDOW (minibuf_window))); |
| 546 | 546 | ||
| 547 | if (mini_screen != selected_screen) | 547 | if (mini_frame != selected_frame) |
| 548 | pause |= update_screen (mini_screen, 0, 0); | 548 | pause |= update_frame (mini_frame, 0, 0); |
| 549 | } | 549 | } |
| 550 | #endif | 550 | #endif |
| 551 | } | 551 | } |
| 552 | 552 | ||
| 553 | /* If screen does not match, prevent doing single-line-update next time. | 553 | /* If frame does not match, prevent doing single-line-update next time. |
| 554 | Also, don't forget to check every line to update the arrow. */ | 554 | Also, don't forget to check every line to update the arrow. */ |
| 555 | if (pause) | 555 | if (pause) |
| 556 | { | 556 | { |
| @@ -560,15 +560,15 @@ update: | |||
| 560 | last_arrow_position = Qt; | 560 | last_arrow_position = Qt; |
| 561 | last_arrow_string = Qt; | 561 | last_arrow_string = Qt; |
| 562 | } | 562 | } |
| 563 | /* If we pause after scrolling, some lines in current_screen | 563 | /* If we pause after scrolling, some lines in current_frame |
| 564 | may be null, so preserve_other_columns won't be able to | 564 | may be null, so preserve_other_columns won't be able to |
| 565 | preserve all the vertical-bar separators. So, avoid using it | 565 | preserve all the vertical-bar separators. So, avoid using it |
| 566 | in that case. */ | 566 | in that case. */ |
| 567 | if (XFASTINT (w->width) != SCREEN_WIDTH (selected_screen)) | 567 | if (XFASTINT (w->width) != FRAME_WIDTH (selected_frame)) |
| 568 | update_mode_lines = 1; | 568 | update_mode_lines = 1; |
| 569 | } | 569 | } |
| 570 | 570 | ||
| 571 | /* Now text on screen agrees with windows, so | 571 | /* Now text on frame agrees with windows, so |
| 572 | put info into the windows for partial redisplay to follow */ | 572 | put info into the windows for partial redisplay to follow */ |
| 573 | 573 | ||
| 574 | if (!pause) | 574 | if (!pause) |
| @@ -582,8 +582,8 @@ update: | |||
| 582 | end_unchanged = BUF_Z (b) - BUF_GPT (b); | 582 | end_unchanged = BUF_Z (b) - BUF_GPT (b); |
| 583 | 583 | ||
| 584 | XFASTINT (w->last_point) = BUF_PT (b); | 584 | XFASTINT (w->last_point) = BUF_PT (b); |
| 585 | XFASTINT (w->last_point_x) = SCREEN_CURSOR_X (selected_screen); | 585 | XFASTINT (w->last_point_x) = FRAME_CURSOR_X (selected_frame); |
| 586 | XFASTINT (w->last_point_y) = SCREEN_CURSOR_Y (selected_screen); | 586 | XFASTINT (w->last_point_y) = FRAME_CURSOR_Y (selected_frame); |
| 587 | 587 | ||
| 588 | if (all_windows) | 588 | if (all_windows) |
| 589 | mark_window_display_accurate (XWINDOW (minibuf_window)->prev, 1); | 589 | mark_window_display_accurate (XWINDOW (minibuf_window)->prev, 1); |
| @@ -610,7 +610,7 @@ update: | |||
| 610 | request_sigio (); | 610 | request_sigio (); |
| 611 | start_polling (); | 611 | start_polling (); |
| 612 | 612 | ||
| 613 | /* Change screen size now if a change is pending. */ | 613 | /* Change frame size now if a change is pending. */ |
| 614 | do_pending_window_change (); | 614 | do_pending_window_change (); |
| 615 | } | 615 | } |
| 616 | 616 | ||
| @@ -688,13 +688,13 @@ redisplay_window (window, just_this_one) | |||
| 688 | int just_this_one; | 688 | int just_this_one; |
| 689 | { | 689 | { |
| 690 | register struct window *w = XWINDOW (window); | 690 | register struct window *w = XWINDOW (window); |
| 691 | SCREEN_PTR s = XSCREEN (w->screen); | 691 | FRAME_PTR f = XFRAME (w->frame); |
| 692 | int height; | 692 | int height; |
| 693 | register int lpoint = point; | 693 | register int lpoint = point; |
| 694 | struct buffer *old = current_buffer; | 694 | struct buffer *old = current_buffer; |
| 695 | register int width = XFASTINT (w->width) - 1 | 695 | register int width = XFASTINT (w->width) - 1 |
| 696 | - (XFASTINT (w->width) + XFASTINT (w->left) | 696 | - (XFASTINT (w->width) + XFASTINT (w->left) |
| 697 | != SCREEN_WIDTH (XSCREEN (WINDOW_SCREEN (w)))); | 697 | != FRAME_WIDTH (XFRAME (WINDOW_FRAME (w)))); |
| 698 | register int startp; | 698 | register int startp; |
| 699 | register int hscroll = XINT (w->hscroll); | 699 | register int hscroll = XINT (w->hscroll); |
| 700 | struct position pos; | 700 | struct position pos; |
| @@ -702,7 +702,7 @@ redisplay_window (window, just_this_one) | |||
| 702 | int tem; | 702 | int tem; |
| 703 | int window_needs_modeline; | 703 | int window_needs_modeline; |
| 704 | 704 | ||
| 705 | if (SCREEN_HEIGHT (s) == 0) abort (); /* Some bug zeros some core */ | 705 | if (FRAME_HEIGHT (f) == 0) abort (); /* Some bug zeros some core */ |
| 706 | 706 | ||
| 707 | /* If this is a combination window, do its children; that's all. */ | 707 | /* If this is a combination window, do its children; that's all. */ |
| 708 | 708 | ||
| @@ -733,12 +733,12 @@ redisplay_window (window, just_this_one) | |||
| 733 | { | 733 | { |
| 734 | /* This is a minibuffer, but it's not the currently active one, so | 734 | /* This is a minibuffer, but it's not the currently active one, so |
| 735 | clear it. */ | 735 | clear it. */ |
| 736 | int vpos = XFASTINT (XWINDOW (SCREEN_MINIBUF_WINDOW (s))->top); | 736 | int vpos = XFASTINT (XWINDOW (FRAME_MINIBUF_WINDOW (f))->top); |
| 737 | int i; | 737 | int i; |
| 738 | 738 | ||
| 739 | for (i = 0; i < height; i++) | 739 | for (i = 0; i < height; i++) |
| 740 | { | 740 | { |
| 741 | get_display_line (s, vpos + i, 0); | 741 | get_display_line (f, vpos + i, 0); |
| 742 | display_string (w, vpos + i, "", 0, 0, 0, width); | 742 | display_string (w, vpos + i, "", 0, 0, 0, width); |
| 743 | } | 743 | } |
| 744 | 744 | ||
| @@ -806,20 +806,20 @@ redisplay_window (window, just_this_one) | |||
| 806 | - (1 << (SHORTBITS - 1)), | 806 | - (1 << (SHORTBITS - 1)), |
| 807 | width, hscroll, pos_tab_offset (w, startp)); | 807 | width, hscroll, pos_tab_offset (w, startp)); |
| 808 | SET_PT (pos.bufpos); | 808 | SET_PT (pos.bufpos); |
| 809 | if (w != XWINDOW (SCREEN_SELECTED_WINDOW (s))) | 809 | if (w != XWINDOW (FRAME_SELECTED_WINDOW (f))) |
| 810 | Fset_marker (w->pointm, make_number (point), Qnil); | 810 | Fset_marker (w->pointm, make_number (point), Qnil); |
| 811 | else | 811 | else |
| 812 | { | 812 | { |
| 813 | lpoint = point; | 813 | lpoint = point; |
| 814 | SCREEN_CURSOR_X (s) = max (0, pos.hpos) + XFASTINT (w->left); | 814 | FRAME_CURSOR_X (f) = max (0, pos.hpos) + XFASTINT (w->left); |
| 815 | SCREEN_CURSOR_Y (s) = pos.vpos + XFASTINT (w->top); | 815 | FRAME_CURSOR_Y (f) = pos.vpos + XFASTINT (w->top); |
| 816 | } | 816 | } |
| 817 | } | 817 | } |
| 818 | goto done; | 818 | goto done; |
| 819 | } | 819 | } |
| 820 | 820 | ||
| 821 | /* Handle case where text has not changed, only point, | 821 | /* Handle case where text has not changed, only point, |
| 822 | and it has not moved off the screen */ | 822 | and it has not moved off the frame */ |
| 823 | 823 | ||
| 824 | /* This code is not used for minibuffer for the sake of | 824 | /* This code is not used for minibuffer for the sake of |
| 825 | the case of redisplaying to replace an echo area message; | 825 | the case of redisplaying to replace an echo area message; |
| @@ -830,7 +830,7 @@ redisplay_window (window, just_this_one) | |||
| 830 | 830 | ||
| 831 | if (XFASTINT (w->last_modified) >= MODIFF | 831 | if (XFASTINT (w->last_modified) >= MODIFF |
| 832 | && point >= startp && !clip_changed | 832 | && point >= startp && !clip_changed |
| 833 | && (just_this_one || XFASTINT (w->width) == SCREEN_WIDTH (s)) | 833 | && (just_this_one || XFASTINT (w->width) == FRAME_WIDTH (f)) |
| 834 | && !EQ (window, minibuf_window)) | 834 | && !EQ (window, minibuf_window)) |
| 835 | { | 835 | { |
| 836 | pos = *compute_motion (startp, 0, (hscroll ? 1 - hscroll : 0), | 836 | pos = *compute_motion (startp, 0, (hscroll ? 1 - hscroll : 0), |
| @@ -839,18 +839,18 @@ redisplay_window (window, just_this_one) | |||
| 839 | 839 | ||
| 840 | if (pos.vpos < height) | 840 | if (pos.vpos < height) |
| 841 | { | 841 | { |
| 842 | /* Ok, point is still on screen */ | 842 | /* Ok, point is still on frame */ |
| 843 | if (w == XWINDOW (SCREEN_SELECTED_WINDOW (s))) | 843 | if (w == XWINDOW (FRAME_SELECTED_WINDOW (f))) |
| 844 | { | 844 | { |
| 845 | /* These variables are supposed to be origin 1 */ | 845 | /* These variables are supposed to be origin 1 */ |
| 846 | SCREEN_CURSOR_X (s) = max (0, pos.hpos) + XFASTINT (w->left); | 846 | FRAME_CURSOR_X (f) = max (0, pos.hpos) + XFASTINT (w->left); |
| 847 | SCREEN_CURSOR_Y (s) = pos.vpos + XFASTINT (w->top); | 847 | FRAME_CURSOR_Y (f) = pos.vpos + XFASTINT (w->top); |
| 848 | } | 848 | } |
| 849 | /* This doesn't do the trick, because if a window to the right of | 849 | /* This doesn't do the trick, because if a window to the right of |
| 850 | this one must be redisplayed, this does nothing because there | 850 | this one must be redisplayed, this does nothing because there |
| 851 | is nothing in DesiredScreen yet, and then the other window is | 851 | is nothing in DesiredFrame yet, and then the other window is |
| 852 | redisplayed, making likes that are empty in this window's columns. | 852 | redisplayed, making likes that are empty in this window's columns. |
| 853 | if (XFASTINT (w->width) != SCREEN_WIDTH (s)) | 853 | if (XFASTINT (w->width) != FRAME_WIDTH (f)) |
| 854 | preserve_my_columns (w); | 854 | preserve_my_columns (w); |
| 855 | */ | 855 | */ |
| 856 | goto done; | 856 | goto done; |
| @@ -872,10 +872,10 @@ redisplay_window (window, just_this_one) | |||
| 872 | && ! EQ (w->window_end_valid, Qnil) | 872 | && ! EQ (w->window_end_valid, Qnil) |
| 873 | && do_id && !clip_changed | 873 | && do_id && !clip_changed |
| 874 | && !blank_end_of_window | 874 | && !blank_end_of_window |
| 875 | && XFASTINT (w->width) == SCREEN_WIDTH (s) | 875 | && XFASTINT (w->width) == FRAME_WIDTH (f) |
| 876 | && EQ (last_arrow_position, Voverlay_arrow_position) | 876 | && EQ (last_arrow_position, Voverlay_arrow_position) |
| 877 | && EQ (last_arrow_string, Voverlay_arrow_string) | 877 | && EQ (last_arrow_string, Voverlay_arrow_string) |
| 878 | && (tem = try_window_id (SCREEN_SELECTED_WINDOW (s))) | 878 | && (tem = try_window_id (FRAME_SELECTED_WINDOW (f))) |
| 879 | && tem != -2) | 879 | && tem != -2) |
| 880 | { | 880 | { |
| 881 | /* tem > 0 means success. tem == -1 means choose new start. | 881 | /* tem > 0 means success. tem == -1 means choose new start. |
| @@ -891,7 +891,7 @@ redisplay_window (window, just_this_one) | |||
| 891 | || (XFASTINT (w->last_modified) >= MODIFF))) | 891 | || (XFASTINT (w->last_modified) >= MODIFF))) |
| 892 | { | 892 | { |
| 893 | /* Try to redisplay starting at same place as before */ | 893 | /* Try to redisplay starting at same place as before */ |
| 894 | /* If point has not moved off screen, accept the results */ | 894 | /* If point has not moved off frame, accept the results */ |
| 895 | try_window (window, startp); | 895 | try_window (window, startp); |
| 896 | if (cursor_vpos >= 0) | 896 | if (cursor_vpos >= 0) |
| 897 | goto done; | 897 | goto done; |
| @@ -942,7 +942,7 @@ done: | |||
| 942 | /* If window not full width, must redo its mode line | 942 | /* If window not full width, must redo its mode line |
| 943 | if the window to its side is being redone */ | 943 | if the window to its side is being redone */ |
| 944 | if ((!NILP (w->update_mode_line) | 944 | if ((!NILP (w->update_mode_line) |
| 945 | || (!just_this_one && width < SCREEN_WIDTH (s) - 1)) | 945 | || (!just_this_one && width < FRAME_WIDTH (f) - 1)) |
| 946 | && height != XFASTINT (w->height)) | 946 | && height != XFASTINT (w->height)) |
| 947 | display_mode_line (w); | 947 | display_mode_line (w); |
| 948 | 948 | ||
| @@ -963,9 +963,9 @@ try_window (window, pos) | |||
| 963 | register int vpos = XFASTINT (w->top); | 963 | register int vpos = XFASTINT (w->top); |
| 964 | register int last_text_vpos = vpos; | 964 | register int last_text_vpos = vpos; |
| 965 | int tab_offset = pos_tab_offset (w, pos); | 965 | int tab_offset = pos_tab_offset (w, pos); |
| 966 | SCREEN_PTR s = XSCREEN (w->screen); | 966 | FRAME_PTR f = XFRAME (w->frame); |
| 967 | int width = XFASTINT (w->width) - 1 | 967 | int width = XFASTINT (w->width) - 1 |
| 968 | - (XFASTINT (w->width) + XFASTINT (w->left) != SCREEN_WIDTH (s)); | 968 | - (XFASTINT (w->width) + XFASTINT (w->left) != FRAME_WIDTH (f)); |
| 969 | struct position val; | 969 | struct position val; |
| 970 | 970 | ||
| 971 | Fset_marker (w->start, make_number (pos), Qnil); | 971 | Fset_marker (w->start, make_number (pos), Qnil); |
| @@ -987,16 +987,16 @@ try_window (window, pos) | |||
| 987 | } | 987 | } |
| 988 | 988 | ||
| 989 | /* If last line is continued in middle of character, | 989 | /* If last line is continued in middle of character, |
| 990 | include the split character in the text considered on the screen */ | 990 | include the split character in the text considered on the frame */ |
| 991 | if (val.hpos < (XINT (w->hscroll) ? 1 - XINT (w->hscroll) : 0)) | 991 | if (val.hpos < (XINT (w->hscroll) ? 1 - XINT (w->hscroll) : 0)) |
| 992 | pos++; | 992 | pos++; |
| 993 | 993 | ||
| 994 | /* If bottom just moved off end of screen, change mode line percentage. */ | 994 | /* If bottom just moved off end of frame, change mode line percentage. */ |
| 995 | if (XFASTINT (w->window_end_pos) == 0 | 995 | if (XFASTINT (w->window_end_pos) == 0 |
| 996 | && Z != pos) | 996 | && Z != pos) |
| 997 | w->update_mode_line = Qt; | 997 | w->update_mode_line = Qt; |
| 998 | 998 | ||
| 999 | /* Say where last char on screen will be, once redisplay is finished. */ | 999 | /* Say where last char on frame will be, once redisplay is finished. */ |
| 1000 | XFASTINT (w->window_end_pos) = Z - pos; | 1000 | XFASTINT (w->window_end_pos) = Z - pos; |
| 1001 | XFASTINT (w->window_end_vpos) = last_text_vpos - XFASTINT (w->top); | 1001 | XFASTINT (w->window_end_vpos) = last_text_vpos - XFASTINT (w->top); |
| 1002 | /* But that is not valid info until redisplay finishes. */ | 1002 | /* But that is not valid info until redisplay finishes. */ |
| @@ -1017,11 +1017,11 @@ try_window_id (window) | |||
| 1017 | int pos; | 1017 | int pos; |
| 1018 | register struct window *w = XWINDOW (window); | 1018 | register struct window *w = XWINDOW (window); |
| 1019 | register int height = window_internal_height (w); | 1019 | register int height = window_internal_height (w); |
| 1020 | SCREEN_PTR s = XSCREEN (w->screen); | 1020 | FRAME_PTR f = XFRAME (w->frame); |
| 1021 | int top = XFASTINT (w->top); | 1021 | int top = XFASTINT (w->top); |
| 1022 | int start = marker_position (w->start); | 1022 | int start = marker_position (w->start); |
| 1023 | int width = XFASTINT (w->width) - 1 | 1023 | int width = XFASTINT (w->width) - 1 |
| 1024 | - (XFASTINT (w->width) + XFASTINT (w->left) != SCREEN_WIDTH (s)); | 1024 | - (XFASTINT (w->width) + XFASTINT (w->left) != FRAME_WIDTH (f)); |
| 1025 | int hscroll = XINT (w->hscroll); | 1025 | int hscroll = XINT (w->hscroll); |
| 1026 | int lmargin = hscroll > 0 ? 1 - hscroll : 0; | 1026 | int lmargin = hscroll > 0 ? 1 - hscroll : 0; |
| 1027 | register int vpos; | 1027 | register int vpos; |
| @@ -1050,8 +1050,8 @@ try_window_id (window) | |||
| 1050 | { | 1050 | { |
| 1051 | if (point < bp.bufpos && !bp.contin) | 1051 | if (point < bp.bufpos && !bp.contin) |
| 1052 | { | 1052 | { |
| 1053 | /* All changes are below the screen, and point is on the screen. | 1053 | /* All changes are below the frame, and point is on the frame. |
| 1054 | We don't need to change the screen at all. | 1054 | We don't need to change the frame at all. |
| 1055 | But we need to update window_end_pos to account for | 1055 | But we need to update window_end_pos to account for |
| 1056 | any change in buffer size. */ | 1056 | any change in buffer size. */ |
| 1057 | bp = *compute_motion (start, 0, lmargin, | 1057 | bp = *compute_motion (start, 0, lmargin, |
| @@ -1066,7 +1066,7 @@ try_window_id (window) | |||
| 1066 | 1066 | ||
| 1067 | vpos = bp.vpos; | 1067 | vpos = bp.vpos; |
| 1068 | 1068 | ||
| 1069 | /* Find beginning of that screen line. Must display from there. */ | 1069 | /* Find beginning of that frame line. Must display from there. */ |
| 1070 | bp = *vmotion (bp.bufpos, 0, width, hscroll, window); | 1070 | bp = *vmotion (bp.bufpos, 0, width, hscroll, window); |
| 1071 | 1071 | ||
| 1072 | pos = bp.bufpos; | 1072 | pos = bp.bufpos; |
| @@ -1075,7 +1075,7 @@ try_window_id (window) | |||
| 1075 | return -1; | 1075 | return -1; |
| 1076 | 1076 | ||
| 1077 | /* If about to start displaying at the beginning of a continuation line, | 1077 | /* If about to start displaying at the beginning of a continuation line, |
| 1078 | really start with previous screen line, in case it was not | 1078 | really start with previous frame line, in case it was not |
| 1079 | continued when last redisplayed */ | 1079 | continued when last redisplayed */ |
| 1080 | if ((bp.contin && bp.bufpos - 1 == beg_unchanged && vpos > 0) | 1080 | if ((bp.contin && bp.bufpos - 1 == beg_unchanged && vpos > 0) |
| 1081 | || | 1081 | || |
| @@ -1111,8 +1111,8 @@ try_window_id (window) | |||
| 1111 | height, - (1 << (SHORTBITS - 1)), | 1111 | height, - (1 << (SHORTBITS - 1)), |
| 1112 | width, hscroll, pos_tab_offset (w, bp.bufpos)); | 1112 | width, hscroll, pos_tab_offset (w, bp.bufpos)); |
| 1113 | 1113 | ||
| 1114 | /* If changes reach past the text available on the screen, | 1114 | /* If changes reach past the text available on the frame, |
| 1115 | just display rest of screen. */ | 1115 | just display rest of frame. */ |
| 1116 | if (ep.bufpos > Z - XFASTINT (w->window_end_pos)) | 1116 | if (ep.bufpos > Z - XFASTINT (w->window_end_pos)) |
| 1117 | stop_vpos = height; | 1117 | stop_vpos = height; |
| 1118 | else | 1118 | else |
| @@ -1143,7 +1143,7 @@ try_window_id (window) | |||
| 1143 | 10000, 0, width, hscroll, epto); | 1143 | 10000, 0, width, hscroll, epto); |
| 1144 | scroll_amount = xp.vpos - XFASTINT (w->window_end_vpos); | 1144 | scroll_amount = xp.vpos - XFASTINT (w->window_end_vpos); |
| 1145 | 1145 | ||
| 1146 | /* Is everything on screen below the changes whitespace? | 1146 | /* Is everything on frame below the changes whitespace? |
| 1147 | If so, no scrolling is really necessary. */ | 1147 | If so, no scrolling is really necessary. */ |
| 1148 | for (i = ep.bufpos; i < xp.bufpos; i++) | 1148 | for (i = ep.bufpos; i < xp.bufpos; i++) |
| 1149 | { | 1149 | { |
| @@ -1156,7 +1156,7 @@ try_window_id (window) | |||
| 1156 | 1156 | ||
| 1157 | XFASTINT (w->window_end_vpos) += scroll_amount; | 1157 | XFASTINT (w->window_end_vpos) += scroll_amount; |
| 1158 | 1158 | ||
| 1159 | /* Before doing any scrolling, verify that point will be on screen. */ | 1159 | /* Before doing any scrolling, verify that point will be on frame. */ |
| 1160 | if (point > ep.bufpos && !(point <= xp.bufpos && xp.bufpos < height)) | 1160 | if (point > ep.bufpos && !(point <= xp.bufpos && xp.bufpos < height)) |
| 1161 | { | 1161 | { |
| 1162 | if (point <= xp.bufpos) | 1162 | if (point <= xp.bufpos) |
| @@ -1186,9 +1186,9 @@ try_window_id (window) | |||
| 1186 | /* In this path, we have altered window_end_vpos | 1186 | /* In this path, we have altered window_end_vpos |
| 1187 | and not left it negative. | 1187 | and not left it negative. |
| 1188 | We must make sure that, in case display is preempted | 1188 | We must make sure that, in case display is preempted |
| 1189 | before the screen changes to reflect what we do here, | 1189 | before the frame changes to reflect what we do here, |
| 1190 | further updates will not come to try_window_id | 1190 | further updates will not come to try_window_id |
| 1191 | and assume the screen and window_end_vpos match. */ | 1191 | and assume the frame and window_end_vpos match. */ |
| 1192 | blank_end_of_window = 1; | 1192 | blank_end_of_window = 1; |
| 1193 | } | 1193 | } |
| 1194 | else if (!scroll_amount) | 1194 | else if (!scroll_amount) |
| @@ -1197,7 +1197,7 @@ try_window_id (window) | |||
| 1197 | { | 1197 | { |
| 1198 | /* If reprinting everything is nearly as fast as scrolling, | 1198 | /* If reprinting everything is nearly as fast as scrolling, |
| 1199 | don't bother scrolling. Can happen if lines are short. */ | 1199 | don't bother scrolling. Can happen if lines are short. */ |
| 1200 | if (scroll_cost (s, bp.vpos + top - scroll_amount, | 1200 | if (scroll_cost (f, bp.vpos + top - scroll_amount, |
| 1201 | top + height - max (0, scroll_amount), | 1201 | top + height - max (0, scroll_amount), |
| 1202 | scroll_amount) | 1202 | scroll_amount) |
| 1203 | > xp.bufpos - bp.bufpos - 20) | 1203 | > xp.bufpos - bp.bufpos - 20) |
| @@ -1208,7 +1208,7 @@ try_window_id (window) | |||
| 1208 | In common case of killing a line, this can save the | 1208 | In common case of killing a line, this can save the |
| 1209 | following line from being overwritten by scrolling | 1209 | following line from being overwritten by scrolling |
| 1210 | and therefore having to be redrawn. */ | 1210 | and therefore having to be redrawn. */ |
| 1211 | tem = scroll_screen_lines (s, bp.vpos + top - scroll_amount, | 1211 | tem = scroll_frame_lines (f, bp.vpos + top - scroll_amount, |
| 1212 | top + height - max (0, scroll_amount), | 1212 | top + height - max (0, scroll_amount), |
| 1213 | scroll_amount); | 1213 | scroll_amount); |
| 1214 | if (!tem) stop_vpos = height; | 1214 | if (!tem) stop_vpos = height; |
| @@ -1220,14 +1220,14 @@ try_window_id (window) | |||
| 1220 | /* Note that if scroll_amount > 0, xp.bufpos - bp.bufpos is an | 1220 | /* Note that if scroll_amount > 0, xp.bufpos - bp.bufpos is an |
| 1221 | overestimate of cost of reprinting, since xp.bufpos | 1221 | overestimate of cost of reprinting, since xp.bufpos |
| 1222 | would end up below the bottom of the window. */ | 1222 | would end up below the bottom of the window. */ |
| 1223 | if (scroll_cost (s, ep.vpos + top - scroll_amount, | 1223 | if (scroll_cost (f, ep.vpos + top - scroll_amount, |
| 1224 | top + height - max (0, scroll_amount), | 1224 | top + height - max (0, scroll_amount), |
| 1225 | scroll_amount) | 1225 | scroll_amount) |
| 1226 | > xp.bufpos - ep.bufpos - 20) | 1226 | > xp.bufpos - ep.bufpos - 20) |
| 1227 | /* Return "try normal display with same window-start." | 1227 | /* Return "try normal display with same window-start." |
| 1228 | Too bad we can't prevent further scroll-thinking. */ | 1228 | Too bad we can't prevent further scroll-thinking. */ |
| 1229 | return -2; | 1229 | return -2; |
| 1230 | tem = scroll_screen_lines (s, ep.vpos + top - scroll_amount, | 1230 | tem = scroll_frame_lines (f, ep.vpos + top - scroll_amount, |
| 1231 | top + height - max (0, scroll_amount), | 1231 | top + height - max (0, scroll_amount), |
| 1232 | scroll_amount); | 1232 | scroll_amount); |
| 1233 | if (!tem) stop_vpos = height; | 1233 | if (!tem) stop_vpos = height; |
| @@ -1272,7 +1272,7 @@ try_window_id (window) | |||
| 1272 | if (vpos == height) | 1272 | if (vpos == height) |
| 1273 | { | 1273 | { |
| 1274 | /* If last line is continued in middle of character, | 1274 | /* If last line is continued in middle of character, |
| 1275 | include the split character in the text considered on the screen */ | 1275 | include the split character in the text considered on the frame */ |
| 1276 | if (val.hpos < lmargin) | 1276 | if (val.hpos < lmargin) |
| 1277 | val.bufpos++; | 1277 | val.bufpos++; |
| 1278 | XFASTINT (w->window_end_vpos) = last_text_vpos; | 1278 | XFASTINT (w->window_end_vpos) = last_text_vpos; |
| @@ -1285,7 +1285,7 @@ try_window_id (window) | |||
| 1285 | { | 1285 | { |
| 1286 | /* Don't consider these lines for general-purpose scrolling. | 1286 | /* Don't consider these lines for general-purpose scrolling. |
| 1287 | That will save time in the scrolling computation. */ | 1287 | That will save time in the scrolling computation. */ |
| 1288 | SCREEN_SCROLL_BOTTOM_VPOS (s) = xp.vpos; | 1288 | FRAME_SCROLL_BOTTOM_VPOS (f) = xp.vpos; |
| 1289 | vpos = xp.vpos; | 1289 | vpos = xp.vpos; |
| 1290 | pos = xp.bufpos; | 1290 | pos = xp.bufpos; |
| 1291 | val.hpos = lmargin; | 1291 | val.hpos = lmargin; |
| @@ -1319,7 +1319,7 @@ try_window_id (window) | |||
| 1319 | cursor_vpos = -1; | 1319 | cursor_vpos = -1; |
| 1320 | } | 1320 | } |
| 1321 | 1321 | ||
| 1322 | /* If bottom just moved off end of screen, change mode line percentage. */ | 1322 | /* If bottom just moved off end of frame, change mode line percentage. */ |
| 1323 | if (XFASTINT (w->window_end_pos) == 0 | 1323 | if (XFASTINT (w->window_end_pos) == 0 |
| 1324 | && Z != val.bufpos) | 1324 | && Z != val.bufpos) |
| 1325 | w->update_mode_line = Qt; | 1325 | w->update_mode_line = Qt; |
| @@ -1346,19 +1346,19 @@ try_window_id (window) | |||
| 1346 | { | 1346 | { |
| 1347 | val = *compute_motion (start, 0, lmargin, point, 10000, 10000, | 1347 | val = *compute_motion (start, 0, lmargin, point, 10000, 10000, |
| 1348 | width, hscroll, pos_tab_offset (w, start)); | 1348 | width, hscroll, pos_tab_offset (w, start)); |
| 1349 | /* Admit failure if point is off screen now */ | 1349 | /* Admit failure if point is off frame now */ |
| 1350 | if (val.vpos >= height) | 1350 | if (val.vpos >= height) |
| 1351 | { | 1351 | { |
| 1352 | for (vpos = 0; vpos < height; vpos++) | 1352 | for (vpos = 0; vpos < height; vpos++) |
| 1353 | cancel_line (vpos + top, s); | 1353 | cancel_line (vpos + top, f); |
| 1354 | return 0; | 1354 | return 0; |
| 1355 | } | 1355 | } |
| 1356 | cursor_vpos = val.vpos + top; | 1356 | cursor_vpos = val.vpos + top; |
| 1357 | cursor_hpos = val.hpos + XFASTINT (w->left); | 1357 | cursor_hpos = val.hpos + XFASTINT (w->left); |
| 1358 | } | 1358 | } |
| 1359 | 1359 | ||
| 1360 | SCREEN_CURSOR_X (s) = max (0, cursor_hpos); | 1360 | FRAME_CURSOR_X (f) = max (0, cursor_hpos); |
| 1361 | SCREEN_CURSOR_Y (s) = cursor_vpos; | 1361 | FRAME_CURSOR_Y (f) = cursor_vpos; |
| 1362 | 1362 | ||
| 1363 | if (debug_end_pos) | 1363 | if (debug_end_pos) |
| 1364 | { | 1364 | { |
| @@ -1408,7 +1408,7 @@ copy_rope (t, s, from) | |||
| 1408 | 1408 | ||
| 1409 | TABOFFSET is an offset for ostensible hpos, used in tab stop calculations. | 1409 | TABOFFSET is an offset for ostensible hpos, used in tab stop calculations. |
| 1410 | 1410 | ||
| 1411 | Display on position VPOS on the screen. (origin 0). | 1411 | Display on position VPOS on the frame. (origin 0). |
| 1412 | 1412 | ||
| 1413 | Returns a STRUCT POSITION giving character to start next line with | 1413 | Returns a STRUCT POSITION giving character to start next line with |
| 1414 | and where to display it, including a zero or negative hpos. | 1414 | and where to display it, including a zero or negative hpos. |
| @@ -1433,18 +1433,18 @@ display_text_line (w, start, vpos, hpos, taboffset) | |||
| 1433 | GLYPH *endp; | 1433 | GLYPH *endp; |
| 1434 | register GLYPH *startp; | 1434 | register GLYPH *startp; |
| 1435 | register GLYPH *p1prev; | 1435 | register GLYPH *p1prev; |
| 1436 | SCREEN_PTR s = XSCREEN (w->screen); | 1436 | FRAME_PTR f = XFRAME (w->frame); |
| 1437 | int tab_width = XINT (current_buffer->tab_width); | 1437 | int tab_width = XINT (current_buffer->tab_width); |
| 1438 | int ctl_arrow = !NILP (current_buffer->ctl_arrow); | 1438 | int ctl_arrow = !NILP (current_buffer->ctl_arrow); |
| 1439 | int width = XFASTINT (w->width) - 1 | 1439 | int width = XFASTINT (w->width) - 1 |
| 1440 | - (XFASTINT (w->width) + XFASTINT (w->left) != SCREEN_WIDTH (s)); | 1440 | - (XFASTINT (w->width) + XFASTINT (w->left) != FRAME_WIDTH (f)); |
| 1441 | struct position val; | 1441 | struct position val; |
| 1442 | int lastpos; | 1442 | int lastpos; |
| 1443 | int invis; | 1443 | int invis; |
| 1444 | int hscroll = XINT (w->hscroll); | 1444 | int hscroll = XINT (w->hscroll); |
| 1445 | int truncate = hscroll | 1445 | int truncate = hscroll |
| 1446 | || (truncate_partial_width_windows | 1446 | || (truncate_partial_width_windows |
| 1447 | && XFASTINT (w->width) < SCREEN_WIDTH (s)) | 1447 | && XFASTINT (w->width) < FRAME_WIDTH (f)) |
| 1448 | || !NILP (current_buffer->truncate_lines); | 1448 | || !NILP (current_buffer->truncate_lines); |
| 1449 | int selective | 1449 | int selective |
| 1450 | = XTYPE (current_buffer->selective_display) == Lisp_Int | 1450 | = XTYPE (current_buffer->selective_display) == Lisp_Int |
| @@ -1453,7 +1453,7 @@ display_text_line (w, start, vpos, hpos, taboffset) | |||
| 1453 | #ifndef old | 1453 | #ifndef old |
| 1454 | int selective_e = selective && !NILP (current_buffer->selective_display_ellipses); | 1454 | int selective_e = selective && !NILP (current_buffer->selective_display_ellipses); |
| 1455 | #endif | 1455 | #endif |
| 1456 | register struct screen_glyphs *desired_glyphs = SCREEN_DESIRED_GLYPHS (s); | 1456 | register struct frame_glyphs *desired_glyphs = FRAME_DESIRED_GLYPHS (f); |
| 1457 | register struct Lisp_Vector *dp = window_display_table (w); | 1457 | register struct Lisp_Vector *dp = window_display_table (w); |
| 1458 | int selective_rlen | 1458 | int selective_rlen |
| 1459 | = (selective && dp && XTYPE (DISP_INVIS_ROPE (dp)) == Lisp_String | 1459 | = (selective && dp && XTYPE (DISP_INVIS_ROPE (dp)) == Lisp_String |
| @@ -1464,7 +1464,7 @@ display_text_line (w, start, vpos, hpos, taboffset) | |||
| 1464 | ? '\\' : XINT (DISP_CONTINUE_GLYPH (dp))); | 1464 | ? '\\' : XINT (DISP_CONTINUE_GLYPH (dp))); |
| 1465 | 1465 | ||
| 1466 | hpos += XFASTINT (w->left); | 1466 | hpos += XFASTINT (w->left); |
| 1467 | get_display_line (s, vpos, XFASTINT (w->left)); | 1467 | get_display_line (f, vpos, XFASTINT (w->left)); |
| 1468 | if (tab_width <= 0 || tab_width > 20) tab_width = 8; | 1468 | if (tab_width <= 0 || tab_width > 20) tab_width = 8; |
| 1469 | 1469 | ||
| 1470 | if (MINI_WINDOW_P (w) && start == 1 | 1470 | if (MINI_WINDOW_P (w) && start == 1 |
| @@ -1652,7 +1652,7 @@ display_text_line (w, start, vpos, hpos, taboffset) | |||
| 1652 | } | 1652 | } |
| 1653 | 1653 | ||
| 1654 | /* If point is at eol or in invisible text at eol, | 1654 | /* If point is at eol or in invisible text at eol, |
| 1655 | record its screen location now. */ | 1655 | record its frame location now. */ |
| 1656 | 1656 | ||
| 1657 | if (start <= point && point <= lastpos && cursor_vpos < 0) | 1657 | if (start <= point && point <= lastpos && cursor_vpos < 0) |
| 1658 | { | 1658 | { |
| @@ -1665,10 +1665,10 @@ display_text_line (w, start, vpos, hpos, taboffset) | |||
| 1665 | if (cursor_hpos < 0) cursor_hpos = 0; | 1665 | if (cursor_hpos < 0) cursor_hpos = 0; |
| 1666 | if (cursor_hpos > width) cursor_hpos = width; | 1666 | if (cursor_hpos > width) cursor_hpos = width; |
| 1667 | cursor_hpos += XFASTINT (w->left); | 1667 | cursor_hpos += XFASTINT (w->left); |
| 1668 | if (w == XWINDOW (SCREEN_SELECTED_WINDOW (s))) | 1668 | if (w == XWINDOW (FRAME_SELECTED_WINDOW (f))) |
| 1669 | { | 1669 | { |
| 1670 | SCREEN_CURSOR_Y (s) = cursor_vpos; | 1670 | FRAME_CURSOR_Y (f) = cursor_vpos; |
| 1671 | SCREEN_CURSOR_X (s) = cursor_hpos; | 1671 | FRAME_CURSOR_X (f) = cursor_hpos; |
| 1672 | 1672 | ||
| 1673 | if (w == XWINDOW (selected_window)) | 1673 | if (w == XWINDOW (selected_window)) |
| 1674 | { | 1674 | { |
| @@ -1698,7 +1698,7 @@ display_text_line (w, start, vpos, hpos, taboffset) | |||
| 1698 | p1 = startp + 1; | 1698 | p1 = startp + 1; |
| 1699 | } | 1699 | } |
| 1700 | 1700 | ||
| 1701 | if (XFASTINT (w->width) + XFASTINT (w->left) != SCREEN_WIDTH (s)) | 1701 | if (XFASTINT (w->width) + XFASTINT (w->left) != FRAME_WIDTH (f)) |
| 1702 | { | 1702 | { |
| 1703 | endp++; | 1703 | endp++; |
| 1704 | if (p1 < startp) p1 = startp; | 1704 | if (p1 < startp) p1 = startp; |
| @@ -1747,12 +1747,12 @@ display_mode_line (w) | |||
| 1747 | register int vpos = XFASTINT (w->height) + XFASTINT (w->top) - 1; | 1747 | register int vpos = XFASTINT (w->height) + XFASTINT (w->top) - 1; |
| 1748 | register int left = XFASTINT (w->left); | 1748 | register int left = XFASTINT (w->left); |
| 1749 | register int right = XFASTINT (w->width) + left; | 1749 | register int right = XFASTINT (w->width) + left; |
| 1750 | register SCREEN_PTR s = XSCREEN (WINDOW_SCREEN (w)); | 1750 | register FRAME_PTR f = XFRAME (WINDOW_FRAME (w)); |
| 1751 | 1751 | ||
| 1752 | get_display_line (s, vpos, left); | 1752 | get_display_line (f, vpos, left); |
| 1753 | display_mode_element (w, vpos, left, 0, right, right, | 1753 | display_mode_element (w, vpos, left, 0, right, right, |
| 1754 | current_buffer->mode_line_format); | 1754 | current_buffer->mode_line_format); |
| 1755 | SCREEN_DESIRED_GLYPHS (s)->bufp[vpos] = 0; | 1755 | FRAME_DESIRED_GLYPHS (f)->bufp[vpos] = 0; |
| 1756 | 1756 | ||
| 1757 | /* Make the mode line inverse video if the entire line | 1757 | /* Make the mode line inverse video if the entire line |
| 1758 | is made of mode lines. | 1758 | is made of mode lines. |
| @@ -1760,19 +1760,19 @@ display_mode_line (w) | |||
| 1760 | or if it is the child of a full width window | 1760 | or if it is the child of a full width window |
| 1761 | (which implies that that window is split side-by-side | 1761 | (which implies that that window is split side-by-side |
| 1762 | and the rest of this line is mode lines of the sibling windows). */ | 1762 | and the rest of this line is mode lines of the sibling windows). */ |
| 1763 | if (XFASTINT (w->width) == SCREEN_WIDTH (s) | 1763 | if (XFASTINT (w->width) == FRAME_WIDTH (f) |
| 1764 | || XFASTINT (XWINDOW (w->parent)->width) == SCREEN_WIDTH (s)) | 1764 | || XFASTINT (XWINDOW (w->parent)->width) == FRAME_WIDTH (f)) |
| 1765 | SCREEN_DESIRED_GLYPHS (s)->highlight[vpos] = mode_line_inverse_video; | 1765 | FRAME_DESIRED_GLYPHS (f)->highlight[vpos] = mode_line_inverse_video; |
| 1766 | 1766 | ||
| 1767 | #ifdef HAVE_X_WINDOWS | 1767 | #ifdef HAVE_X_WINDOWS |
| 1768 | /* I'm trying this out because I saw Unimpress use it, but it's | 1768 | /* I'm trying this out because I saw Unimpress use it, but it's |
| 1769 | possible that this may mess adversely with some window managers. jla */ | 1769 | possible that this may mess adversely with some window managers. jla */ |
| 1770 | 1770 | ||
| 1771 | if (SCREEN_IS_X (s) | 1771 | if (FRAME_IS_X (f) |
| 1772 | && ! SCREEN_MINIBUF_ONLY_P (s) | 1772 | && ! FRAME_MINIBUF_ONLY_P (f) |
| 1773 | && w == XWINDOW (s->selected_window) | 1773 | && w == XWINDOW (f->selected_window) |
| 1774 | && (NILP (Fstring_equal (XBUFFER (w->buffer)->name, s->name)))) | 1774 | && (NILP (Fstring_equal (XBUFFER (w->buffer)->name, f->name)))) |
| 1775 | x_set_name (s, XBUFFER (w->buffer)->name, Qnil); | 1775 | x_set_name (f, XBUFFER (w->buffer)->name, Qnil); |
| 1776 | #endif | 1776 | #endif |
| 1777 | } | 1777 | } |
| 1778 | 1778 | ||
| @@ -1781,7 +1781,7 @@ display_mode_line (w) | |||
| 1781 | 1781 | ||
| 1782 | VPOS is the position of the mode line being displayed. | 1782 | VPOS is the position of the mode line being displayed. |
| 1783 | 1783 | ||
| 1784 | HPOS is the position (absolute on screen) where this element's text | 1784 | HPOS is the position (absolute on frame) where this element's text |
| 1785 | should start. The output is truncated automatically at the right | 1785 | should start. The output is truncated automatically at the right |
| 1786 | edge of window W. | 1786 | edge of window W. |
| 1787 | 1787 | ||
| @@ -1994,11 +1994,11 @@ decode_mode_spec (w, c, maxwidth) | |||
| 1994 | register int maxwidth; | 1994 | register int maxwidth; |
| 1995 | { | 1995 | { |
| 1996 | Lisp_Object obj = Qnil; | 1996 | Lisp_Object obj = Qnil; |
| 1997 | SCREEN_PTR scr = XSCREEN (WINDOW_SCREEN (w)); | 1997 | FRAME_PTR f = XFRAME (WINDOW_FRAME (w)); |
| 1998 | char *decode_mode_spec_buf = (char *) SCREEN_TEMP_GLYPHS (scr)->total_contents; | 1998 | char *decode_mode_spec_buf = (char *) FRAME_TEMP_GLYPHS (f)->total_contents; |
| 1999 | 1999 | ||
| 2000 | if (maxwidth > SCREEN_WIDTH (scr)) | 2000 | if (maxwidth > FRAME_WIDTH (f)) |
| 2001 | maxwidth = SCREEN_WIDTH (scr); | 2001 | maxwidth = FRAME_WIDTH (f); |
| 2002 | 2002 | ||
| 2003 | switch (c) | 2003 | switch (c) |
| 2004 | { | 2004 | { |
| @@ -2143,7 +2143,7 @@ decode_mode_spec (w, c, maxwidth) | |||
| 2143 | MINCOL is the first column ok to end at. (Pad with spaces to this col.) | 2143 | MINCOL is the first column ok to end at. (Pad with spaces to this col.) |
| 2144 | MAXCOL is the last column ok to end at. Truncate here. | 2144 | MAXCOL is the last column ok to end at. Truncate here. |
| 2145 | -1 for MINCOL or MAXCOL means no explicit minimum or maximum. | 2145 | -1 for MINCOL or MAXCOL means no explicit minimum or maximum. |
| 2146 | Both count from the left edge of the screen, as does HPOS. | 2146 | Both count from the left edge of the frame, as does HPOS. |
| 2147 | The right edge of W is an implicit maximum. | 2147 | The right edge of W is an implicit maximum. |
| 2148 | If TRUNCATE is nonzero, the implicit maximum is one column before the edge. | 2148 | If TRUNCATE is nonzero, the implicit maximum is one column before the edge. |
| 2149 | 2149 | ||
| @@ -2163,7 +2163,7 @@ display_string (w, vpos, string, hpos, truncate, mincol, maxcol) | |||
| 2163 | int tab_width = XINT (current_buffer->tab_width); | 2163 | int tab_width = XINT (current_buffer->tab_width); |
| 2164 | register GLYPH *start; | 2164 | register GLYPH *start; |
| 2165 | register GLYPH *end; | 2165 | register GLYPH *end; |
| 2166 | struct screen_glyphs *desired_glyphs = SCREEN_DESIRED_GLYPHS (XSCREEN (w->screen)); | 2166 | struct frame_glyphs *desired_glyphs = FRAME_DESIRED_GLYPHS (XFRAME (w->frame)); |
| 2167 | GLYPH *p1start = desired_glyphs->glyphs[vpos] + hpos; | 2167 | GLYPH *p1start = desired_glyphs->glyphs[vpos] + hpos; |
| 2168 | int window_width = XFASTINT (w->width); | 2168 | int window_width = XFASTINT (w->width); |
| 2169 | 2169 | ||
| @@ -2182,7 +2182,7 @@ display_string (w, vpos, string, hpos, truncate, mincol, maxcol) | |||
| 2182 | end = start + window_width - (truncate != 0); | 2182 | end = start + window_width - (truncate != 0); |
| 2183 | 2183 | ||
| 2184 | if ((window_width + XFASTINT (w->left)) | 2184 | if ((window_width + XFASTINT (w->left)) |
| 2185 | != SCREEN_WIDTH (XSCREEN (WINDOW_SCREEN (w)))) | 2185 | != FRAME_WIDTH (XFRAME (WINDOW_FRAME (w)))) |
| 2186 | *end-- = '|'; | 2186 | *end-- = '|'; |
| 2187 | 2187 | ||
| 2188 | if (maxcol >= 0 && end - desired_glyphs->glyphs[vpos] > maxcol) | 2188 | if (maxcol >= 0 && end - desired_glyphs->glyphs[vpos] > maxcol) |
| @@ -2288,14 +2288,14 @@ See also `overlay-arrow-string'."); | |||
| 2288 | 2288 | ||
| 2289 | DEFVAR_INT ("scroll-step", &scroll_step, | 2289 | DEFVAR_INT ("scroll-step", &scroll_step, |
| 2290 | "*The number of lines to try scrolling a window by when point moves out.\n\ | 2290 | "*The number of lines to try scrolling a window by when point moves out.\n\ |
| 2291 | If that fails to bring point back on screen, point is centered instead.\n\ | 2291 | If that fails to bring point back on frame, point is centered instead.\n\ |
| 2292 | If this is zero, point is always centered after it moves off screen."); | 2292 | If this is zero, point is always centered after it moves off frame."); |
| 2293 | 2293 | ||
| 2294 | DEFVAR_INT ("debug-end-pos", &debug_end_pos, "Don't ask"); | 2294 | DEFVAR_INT ("debug-end-pos", &debug_end_pos, "Don't ask"); |
| 2295 | 2295 | ||
| 2296 | DEFVAR_BOOL ("truncate-partial-width-windows", | 2296 | DEFVAR_BOOL ("truncate-partial-width-windows", |
| 2297 | &truncate_partial_width_windows, | 2297 | &truncate_partial_width_windows, |
| 2298 | "*Non-nil means truncate lines in all windows less than full screen wide."); | 2298 | "*Non-nil means truncate lines in all windows less than full frame wide."); |
| 2299 | truncate_partial_width_windows = 1; | 2299 | truncate_partial_width_windows = 1; |
| 2300 | 2300 | ||
| 2301 | DEFVAR_BOOL ("mode-line-inverse-video", &mode_line_inverse_video, | 2301 | DEFVAR_BOOL ("mode-line-inverse-video", &mode_line_inverse_video, |
| @@ -2322,13 +2322,13 @@ init_xdisp () | |||
| 2322 | 2322 | ||
| 2323 | if (!noninteractive) | 2323 | if (!noninteractive) |
| 2324 | { | 2324 | { |
| 2325 | SCREEN_PTR s = XSCREEN (WINDOW_SCREEN (XWINDOW (root_window))); | 2325 | FRAME_PTR f = XFRAME (WINDOW_FRAME (XWINDOW (root_window))); |
| 2326 | XFASTINT (XWINDOW (root_window)->top) = 0; | 2326 | XFASTINT (XWINDOW (root_window)->top) = 0; |
| 2327 | set_window_height (root_window, SCREEN_HEIGHT (s) - 1, 0); | 2327 | set_window_height (root_window, FRAME_HEIGHT (f) - 1, 0); |
| 2328 | XFASTINT (mini_w->top) = SCREEN_HEIGHT (s) - 1; | 2328 | XFASTINT (mini_w->top) = FRAME_HEIGHT (f) - 1; |
| 2329 | set_window_height (minibuf_window, 1, 0); | 2329 | set_window_height (minibuf_window, 1, 0); |
| 2330 | 2330 | ||
| 2331 | XFASTINT (XWINDOW (root_window)->width) = SCREEN_WIDTH (s); | 2331 | XFASTINT (XWINDOW (root_window)->width) = FRAME_WIDTH (f); |
| 2332 | XFASTINT (mini_w->width) = SCREEN_WIDTH (s); | 2332 | XFASTINT (mini_w->width) = FRAME_WIDTH (f); |
| 2333 | } | 2333 | } |
| 2334 | } | 2334 | } |