diff options
| author | Kim F. Storm | 2003-05-24 21:52:57 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2003-05-24 21:52:57 +0000 |
| commit | 0416870b3119cdc4c4b716ade904083b7d04fe3c (patch) | |
| tree | 5dca265a630d15ebfc201c785f0c0d8e2c69c9dc /src | |
| parent | 016bd3c08facbe372fe37f2ff89eb891a0ecf03f (diff) | |
| download | emacs-0416870b3119cdc4c4b716ade904083b7d04fe3c.tar.gz emacs-0416870b3119cdc4c4b716ade904083b7d04fe3c.zip | |
Major changes for fringes and oter window elements.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 539 |
1 files changed, 539 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 07450cf8d3e..ed47a31bef1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,542 @@ | |||
| 1 | 2003-05-24 Kim F. Storm <storm@cua.dk> | ||
| 2 | |||
| 3 | The following changes serve several purposes: | ||
| 4 | |||
| 5 | 1) Swap the position of fringes and display margins in windows, i.e. | ||
| 6 | the fringes are now displayed between the margins and the text area | ||
| 7 | (by default). | ||
| 8 | |||
| 9 | 2) Allow fringe and scroll bar parameters to be set per-buffer and | ||
| 10 | per-window (like display margins). Such settings are now stored | ||
| 11 | in window configurations, preserved when frames are resized, and | ||
| 12 | copied when windows are split vertically or horisontally. | ||
| 13 | Several bugs related to display margins have been fixed. | ||
| 14 | |||
| 15 | 3) Consistently use FRAME_FONT and FRAME_FONTSET macros. | ||
| 16 | |||
| 17 | 4) Use FRAME_COLUMN_WIDTH (f) consistently throughout the code | ||
| 18 | rather than FRAME_WIDTH (FRAME_FONT (f)). | ||
| 19 | |||
| 20 | 5) Introduce a consistent naming of variables, members and macros | ||
| 21 | depending on whether their value is measured in pixels or in | ||
| 22 | canonical columns/lines. Pixel dimensions are named *_width and | ||
| 23 | *_height, while canonical columns/lines are named *_cols and | ||
| 24 | *_lines. Pixel positions are named *_x and *_y, while column/line | ||
| 25 | positions are named *_col and *_line. | ||
| 26 | |||
| 27 | 6) Consolidate more of the X, W32, and MAC gui code by moving | ||
| 28 | common data into struct frame, and generalize it for the non-gui | ||
| 29 | case by using suitable defaults. | ||
| 30 | |||
| 31 | 7) Cleanup and consolidate the macros controlling frame and window | ||
| 32 | layout into frame.h and window.h, and generalize the use of the | ||
| 33 | various window_box_* functions (enhanced to handle the new fringe | ||
| 34 | position and the per-window fringe and scroll bar settings). | ||
| 35 | |||
| 36 | * frame.h (struct frame): Rename members height to text_lines, | ||
| 37 | width to text_cols, window_height to total_lines, window_width to | ||
| 38 | total_cols, new_height to new_text_lines, new_width to | ||
| 39 | new_text_cols. All uses changed. | ||
| 40 | (struct frame): New members which consolidate common members of | ||
| 41 | x_output, w32_output, and mac_output structures: left_pos, | ||
| 42 | top_pos, pixel_height, pixel_width, x_pixels_diff, y_pixels_diff, | ||
| 43 | win_gravity, size_hint_flags, border_width, internal_border_width, | ||
| 44 | line_height, fringe_cols, left_fringe_width, right_fringe_width, | ||
| 45 | want_fullscreen. All uses changed. | ||
| 46 | (struct frame): New member column_width contaning the canonical | ||
| 47 | column width, analogue to line_height. All uses changed. | ||
| 48 | (struct frame): Rename members scroll_bar_pixel_width to | ||
| 49 | config_scroll_bar_width, and scroll_bar_cols to | ||
| 50 | config_scroll_bar_cols. All uses changed. | ||
| 51 | (struct frame): New member scroll_bar_actual_width which | ||
| 52 | consolidates and renames the vertical_scroll_bar_extra member of | ||
| 53 | x_output, w32_output, and mac_output structures. All uses changed. | ||
| 54 | (FRAME_PIXEL_HEIGHT): Renamed from PIXEL_HEIGHT and moved | ||
| 55 | from x/w32/macterm.h files. All uses changed. Also change code | ||
| 56 | which referred to f->output_data...->pixel_height. | ||
| 57 | (FRAME_PIXEL_WIDTH): Renamed from PIXEL_WIDTH and moved | ||
| 58 | from x/w32/macterm.h files. All uses changed. Also change code | ||
| 59 | which referred to f->output_data...->pixel_width. | ||
| 60 | (FRAME_LINES): Renamed from FRAME_HEIGHT. All uses changed. | ||
| 61 | Also change code which referred to f->height. | ||
| 62 | (FRAME_COLS): Renamed from FRAME_WIDTH. All uses changed. | ||
| 63 | Also change code which referred to f->width. | ||
| 64 | (FRAME_NEW_HEIGHT, FRAME_NEW_WIDTH): Remove macros; change uses | ||
| 65 | to update new_text_lines and new_text_cols members directly. | ||
| 66 | (FRAME_CONFIG_SCROLL_BAR_WIDTH): Renamed from | ||
| 67 | FRAME_SCROLL_BAR_PIXEL_WIDTH. All uses changed. | ||
| 68 | (FRAME_CONFIG_SCROLL_BAR_COLS): Renamed from | ||
| 69 | FRAME_SCROLL_BAR_COLS. All uses changed. | ||
| 70 | (FRAME_LEFT_SCROLL_BAR_COLS, FRAME_RIGHT_SCROLL_BAR_COLS): | ||
| 71 | Renamed from FRAME_LEFT_SCROLL_BAR_WIDTH and | ||
| 72 | FRAME_RIGHT_SCROLL_BAR_WIDTH, resp. All uses changed. | ||
| 73 | (FRAME_SCROLL_BAR_AREA_WIDTH, FRAME_LEFT_SCROLL_BAR_AREA_WIDTH) | ||
| 74 | (FRAME_RIGHT_SCROLL_BAR_AREA_WIDTH): New macros. | ||
| 75 | (FRAME_TOTAL_COLS): Renamed from FRAME_WINDOW_WIDTH. | ||
| 76 | (SET_FRAME_COLS): Renamed from SET_FRAME_WIDTH. | ||
| 77 | (FRAME_TOTAL_COLS_ARG): Renamed from FRAME_WINDOW_WIDTH_ARG. | ||
| 78 | (WINDOW_VERTICAL_SCROLL_BAR_COLUMN): Remove unused macro. | ||
| 79 | (WINDOW_VERTICAL_SCROLL_BAR_HEIGHT): Remove unused macro. | ||
| 80 | (FRAME_LINE_HEIGHT): Renamed from CANON_Y_UNIT. Unconditionally | ||
| 81 | return line_height member (it now has proper value also for | ||
| 82 | non-window frames). | ||
| 83 | (FRAME_COLUMN_WIDTH): Renamed from CANON_X_UNIT. Unconditionally | ||
| 84 | return new column_width member (rather than the default font width). | ||
| 85 | (FRAME_FRINGE_COLS, FRAME_LEFT_FRINGE_WIDTH) | ||
| 86 | (FRAME_RIGHT_FRINGE_WIDTH): Renamed from FRAME_X_... and moved | ||
| 87 | from x/w32/macterm.h files. Unconditionally return corresponding | ||
| 88 | member of frame structure (they now have proper values also for | ||
| 89 | non-window frames). | ||
| 90 | (FRAME_TOTAL_FRINGE_WIDTH): Renamed from FRAME_FRINGE_WIDTH. | ||
| 91 | Calculate return value from left and right widths. | ||
| 92 | (FRAME_INTERNAL_BORDER_WIDTH): Unconditionally return | ||
| 93 | internal_border_width member (has proper value for non-window frame). | ||
| 94 | (FRAME_PIXEL_X_FROM_CANON_X): Renamed from PIXEL_X_FROM_CANON_X. | ||
| 95 | (FRAME_PIXEL_Y_FROM_CANON_Y): Renamed from PIXEL_Y_FROM_CANON_Y. | ||
| 96 | (FRAME_CANON_X_FROM_PIXEL_X): Renamed from CANON_X_FROM_PIXEL_X. | ||
| 97 | (FRAME_CANON_Y_FROM_PIXEL_Y): Renamed from CANON_Y_FROM_PIXEL_Y. | ||
| 98 | (FRAME_LINE_TO_PIXEL_Y): Renamed from CHAR_TO_PIXEL_ROW, | ||
| 99 | consolidated from xterm.h, macterm.h, and w32term.h. | ||
| 100 | (FRAME_COL_TO_PIXEL_X): Renamed from CHAR_TO_PIXEL_COL, | ||
| 101 | consolidated from xterm.h, macterm.h, and w32term.h. | ||
| 102 | (FRAME_TEXT_COLS_TO_PIXEL_WIDTH): Renamed from | ||
| 103 | CHAR_TO_PIXEL_WIDTH consolidated from x/mac/w32term.h. | ||
| 104 | (FRAME_TEXT_LINES_TO_PIXEL_HEIGHT): Renamed from | ||
| 105 | CHAR_TO_PIXEL_HEIGHT consolidated from x/mac/w32term.h. | ||
| 106 | (FRAME_PIXEL_Y_TO_LINE): Renamed from PIXEL_TO_CHAR_ROW | ||
| 107 | consolidated from x/mac/w32term.h. | ||
| 108 | (FRAME_PIXEL_X_TO_COL): Renamed from PIXEL_TO_CHAR_COL | ||
| 109 | consolidated from x/mac/w32term.h. | ||
| 110 | (FRAME_PIXEL_WIDTH_TO_TEXT_COLS): Renamed from | ||
| 111 | PIXEL_TO_CHAR_WIDTH consolidated from x/mac/w32term.h. | ||
| 112 | (FRAME_PIXEL_HEIGHT_TO_TEXT_LINES): Renamed from | ||
| 113 | PIXEL_TO_CHAR_HEIGHT consolidated from x/mac/w32term.h. | ||
| 114 | |||
| 115 | * window.h (struct window): Rename members left to left_col, | ||
| 116 | top to top_line, height to total_lines, width to total_cols, | ||
| 117 | left_margin_width to left_margin_cols, right_margin_width to | ||
| 118 | right_margin_cols, orig_height to orig_total_lines, orig_top to | ||
| 119 | orig_top_line. All uses changed. | ||
| 120 | (struct window): New members left_fringe_width, right_fringe_width, | ||
| 121 | fringes_outside_margins, scroll_bar_width, vertical_scroll_bar_type. | ||
| 122 | (WINDOW_XFRAME, WINDOW_FRAME_COLUMN_WIDTH, WINDOW_FRAME_LINE_HEIGHT): | ||
| 123 | New macros primarily used to simplify other macros. | ||
| 124 | (WINDOW_TOTAL_COLS): New macro. Change relevant code that | ||
| 125 | referred to XINT (w->width). | ||
| 126 | (WINDOW_TOTAL_LINES): New macro. Change relevant code that | ||
| 127 | referred to XINT (w->height). | ||
| 128 | (WINDOW_TOTAL_WIDTH): New macro. Change relevant code that | ||
| 129 | referred to XINT (w->width) * canon_x_unit. | ||
| 130 | (WINDOW_TOTAL_HEIGHT): New macro. Change relevant code that | ||
| 131 | referred to XINT (w->height) * canon_y_unit. | ||
| 132 | (WINDOW_LEFT_EDGE_COL): New macro. Change relevant code that | ||
| 133 | referred to XINT (w->left). | ||
| 134 | (WINDOW_RIGHT_EDGE_COL): Renamed from WINDOW_RIGHT_EDGE. Change | ||
| 135 | all uses and code that referred to XINT (w->left) + XINT (w->width). | ||
| 136 | (WINDOW_TOP_EDGE_LINE): New macro. Change relevant code that | ||
| 137 | referred to XINT (w->top). | ||
| 138 | (WINDOW_BOTTOM_EDGE_LINE): New macro. Change relevant code that | ||
| 139 | referred to XINT (w->top) + XINT (w->height). | ||
| 140 | (WINDOW_LEFT_EDGE_X): New macro. Change relevant code that | ||
| 141 | referred to XINT (w->left) * canon_x_unit. | ||
| 142 | (WINDOW_RIGHT_EDGE_X): New macro. Change relevant code that | ||
| 143 | referred to (XINT (w->left) + XINT (w->width)) * canon_x_unit. | ||
| 144 | (WINDOW_TOP_EDGE_Y): New macro. Change relevant code that | ||
| 145 | referred to XINT (w->top) * canon_y_unit. | ||
| 146 | (WINDOW_BOTTOM_EDGE_Y): New macro. Change relevant code that | ||
| 147 | referred to (XINT (w->top) + XINT (w->height)) * canon_y_unit. | ||
| 148 | (WINDOW_LEFTMOST_P): New macro. | ||
| 149 | (WINDOW_BOX_LEFT_EDGE_COL): Renamed from WINDOW_LEFT_MARGIN. | ||
| 150 | All uses changed. | ||
| 151 | (WINDOW_BOX_RIGHT_EDGE_COL): Renamed from WINDOW_RIGHT_MARGIN. | ||
| 152 | All uses changed. | ||
| 153 | (WINDOW_BOX_LEFT_EDGE_X): Renamed from | ||
| 154 | WINDOW_DISPLAY_LEFT_EDGE_PIXEL_X, moved from dispextern.h. | ||
| 155 | Do not exclude left fringe width. | ||
| 156 | (WINDOW_BOX_RIGHT_EDGE_X): Renamed from | ||
| 157 | WINDOW_DISPLAY_RIGHT_EDGE_PIXEL_X, moved from dispextern.h. | ||
| 158 | Do not exclude fringe widths. | ||
| 159 | (WINDOW_LEFT_FRINGE_WIDTH, WINDOW_RIGHT_FRINGE_WIDTH) | ||
| 160 | (WINDOW_FRINGE_COLS, WINDOW_TOTAL_FRINGE_WIDTH): New macros. | ||
| 161 | Change relevant code that referred to FRAME_LEFT_FRINGE_WIDTH, | ||
| 162 | FRAME_RIGHT_FRINGE_WIDTH, FRAME_FRINGE_COLS, and | ||
| 163 | FRAME_TOTAL_FRINGE_WIDTH to allow per-window fringe settings. | ||
| 164 | (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS): New macro. | ||
| 165 | (WINDOW_VERTICAL_SCROLL_BAR_TYPE, WINDOW_HAS_VERTICAL_SCROLL_BAR) | ||
| 166 | (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT) | ||
| 167 | (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT) | ||
| 168 | (WINDOW_CONFIG_SCROLL_BAR_WIDTH, WINDOW_CONFIG_SCROLL_BAR_COLS): | ||
| 169 | New macros. Change code which referenced corresponding | ||
| 170 | FRAME_VERTICAL_SCROLL_BAR_TYPE, FRAME_HAS_VERTICAL_SCROLL_BARS, | ||
| 171 | FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT, | ||
| 172 | FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT, | ||
| 173 | FRAME_SCROLL_BAR_PIXEL_WIDTH, and FRAME_SCROLL_BAR_COLS macros to | ||
| 174 | allow per-window scroll-bar settings. | ||
| 175 | (WINDOW_LEFT_SCROLL_BAR_COLS, WINDOW_RIGHT_SCROLL_BAR_COLS): New macros. | ||
| 176 | (WINDOW_LEFT_SCROLL_BAR_AREA_WIDTH): New macro. Change code that | ||
| 177 | referred to FRAME_LEFT_SCROLL_BAR_WIDTH. | ||
| 178 | (WINDOW_RIGHT_SCROLL_BAR_AREA_WIDTH): New macro. Change code | ||
| 179 | that referred to FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT and | ||
| 180 | FRAME_SCROLL_BAR_WIDTH. | ||
| 181 | (WINDOW_SCROLL_BAR_COLS, WINDOW_SCROLL_BAR_AREA_WIDTH) | ||
| 182 | (WINDOW_SCROLL_BAR_AREA_X): New macros. | ||
| 183 | (WINDOW_HEADER_LINE_HEIGHT): Renamed from | ||
| 184 | WINDOW_DISPLAY_HEADER_LINE_HEIGHT, moved from dispextern.h. | ||
| 185 | (WINDOW_BOX_HEIGHT_NO_MODE_LINE): Renamed from | ||
| 186 | WINDOW_DISPLAY_HEIGHT_NO_MODE_LINE, moved from dispextern.h. | ||
| 187 | (WINDOW_BOX_TEXT_HEIGHT): Renamed from | ||
| 188 | WINDOW_DISPLAY_PIXEL_WIDTH, moved from dispextern.h. | ||
| 189 | (WINDOW_TO_FRAME_PIXEL_X, WINDOW_TO_FRAME_PIXEL_Y) | ||
| 190 | (FRAME_TO_WINDOW_PIXEL_X, FRAME_TO_WINDOW_PIXEL_Y) | ||
| 191 | (WINDOW_TEXT_TO_FRAME_PIXEL_X): Moved here from dispextern.h. | ||
| 192 | (WINDOW_LEFT_MARGIN_WIDTH): Renamed from | ||
| 193 | WINDOW_DISPLAY_LEFT_AREA_PIXEL_WIDTH, moved from dispextern.h. | ||
| 194 | (WINDOW_RIGHT_MARGIN_WIDTH): Renamed from | ||
| 195 | WINDOW_DISPLAY_RIGHT_AREA_PIXEL_WIDTH, moved from dispextern.h. | ||
| 196 | (window_from_coordinates): Update prototype. | ||
| 197 | (Fset_window_buffer): Update EXFUN. | ||
| 198 | (set_window_buffer): Update prototype. | ||
| 199 | |||
| 200 | * dispextern.h (struct glyph_matrix): Rename members window_left_x | ||
| 201 | to window_left_col, window_top_y to window_top_line. All uses | ||
| 202 | changed. | ||
| 203 | (FRAME_INTERNAL_BORDER_WIDTH_SAFE): Remove macro; can now safely | ||
| 204 | use FRAME_INTERNAL_BORDER_WIDTH macro instead as | ||
| 205 | internal_border_width is now set to 0 for non-window frames. | ||
| 206 | (WINDOW_DISPLAY_PIXEL_WIDTH, WINDOW_DISPLAY_PIXEL_HEIGHT) | ||
| 207 | (WINDOW_DISPLAY_MODE_LINE_HEIGHT, WINDOW_DISPLAY_HEADER_LINE_HEIGHT) | ||
| 208 | (WINDOW_DISPLAY_HEIGHT_NO_MODE_LINE, WINDOW_DISPLAY_TEXT_HEIGHT) | ||
| 209 | (WINDOW_DISPLAY_LEFT_EDGE_PIXEL_X, WINDOW_DISPLAY_RIGHT_EDGE_PIXEL_X) | ||
| 210 | (WINDOW_DISPLAY_TOP_EDGE_PIXEL_Y, WINDOW_DISPLAY_BOTTOM_EDGE_PIXEL_Y) | ||
| 211 | (WINDOW_TO_FRAME_PIXEL_X, WINDOW_TO_FRAME_PIXEL_Y) | ||
| 212 | (FRAME_TO_WINDOW_PIXEL_X, FRAME_TO_WINDOW_PIXEL_Y) | ||
| 213 | (WINDOW_DISPLAY_LEFT_AREA_PIXEL_WIDTH) | ||
| 214 | (WINDOW_DISPLAY_RIGHT_AREA_PIXEL_WIDTH, WINDOW_WANTS_MODELINE_P): | ||
| 215 | Move to window.h and renamed [see window.h changes]. | ||
| 216 | (WINDOW_AREA_TO_FRAME_PIXEL_X, WINDOW_AREA_PIXEL_WIDTH) | ||
| 217 | (WINDOW_DISPLAY_TEXT_AREA_PIXEL_WIDTH): Remove macros. | ||
| 218 | (WINDOW_WANTS_MODELINE_P, WINDOW_WANTS_HEADER_LINE_P): Use | ||
| 219 | WINDOW_TOTAL_LINES. | ||
| 220 | (frame_update_line_height): Remove prototype. | ||
| 221 | |||
| 222 | * buffer.h (struct buffer): Rename members measured in columns: | ||
| 223 | left_margin_width to left_margin_cols, right_margin_width to | ||
| 224 | right_margin_cols. All uses changed. | ||
| 225 | New members left_fringe_width, right_fringe_width, | ||
| 226 | fringes_outside_margins for per-buffer fringe settings. | ||
| 227 | New members scroll_bar_width and vertical_scroll_bar_type for | ||
| 228 | per-buffer scroll bar settings. | ||
| 229 | |||
| 230 | * buffer.c (init_buffer_once): Set buffer_defaults and | ||
| 231 | buffer_local_flags for new buffer-local variables | ||
| 232 | left_fringe_width, right_fringe_width, fringes_outside_margins, | ||
| 233 | scroll_bar_width, and vertical_scroll_bar_type. | ||
| 234 | (syms_of_buffer): Defvar_per_buffer them, and defvar_lisp_nopro | ||
| 235 | default-* variables for them. | ||
| 236 | |||
| 237 | * dispnew.c: Make (many) trivial substitutions for renamed and | ||
| 238 | new macros in dispextern.h, frame.h and window.h. | ||
| 239 | (mode_line_string): No need to adjust width for mode lines, as it | ||
| 240 | is already adjusted by the caller. | ||
| 241 | (marginal_area_string): Handle fringes inside/outside margins. | ||
| 242 | |||
| 243 | * frame.c: Make (many) trivial substitutions for renamed and | ||
| 244 | new macros in dispextern.h, frame.h and window.h. | ||
| 245 | (make_frame): Initialize left_fringe_width, right_fringe_width, | ||
| 246 | fringe_cols, scroll_bar_actual_width, border_width, | ||
| 247 | internal_border_width, column_width, line_height, x_pixels_diff, | ||
| 248 | y_pixels_diff, want_fullscreen, size_hint_flags, and win_gravity | ||
| 249 | members with values suitable for a non-window frames. | ||
| 250 | |||
| 251 | * gtkutil.c: Make (many) trivial substitutions for renamed and | ||
| 252 | new macros in dispextern.h, frame.h and window.h. | ||
| 253 | |||
| 254 | * indent.c: Make (few) trivial substitutions for renamed and | ||
| 255 | new macros in dispextern.h, frame.h and window.h. | ||
| 256 | |||
| 257 | * keyboard.c: Make (many) trivial substitutions for renamed and | ||
| 258 | new macros in dispextern.h, frame.h and window.h. | ||
| 259 | (make_lispy_event): Use window positions returned from | ||
| 260 | window_from_coordinates when constructing the lisp event for | ||
| 261 | MOUSE_CLICK_EVENT and DRAG_N_DROP_EVENT, rather than calculating | ||
| 262 | (incorrect) values locally. | ||
| 263 | (make_lispy_movement): Use window positions returned from | ||
| 264 | window_from_coordinates when constructing the lisp event, rather | ||
| 265 | than calculating (incorrect) values locally. | ||
| 266 | |||
| 267 | * scroll.c: Make (some) trivial substitutions for renamed and | ||
| 268 | new macros in dispextern.h, frame.h and window.h. | ||
| 269 | |||
| 270 | * sunfns.c (Fsun_menu_internal): Adapt to per-window fringes and | ||
| 271 | scroll-bars. | ||
| 272 | |||
| 273 | * sysdep.c: Make (few) trivial substitutions for renamed and | ||
| 274 | new macros in dispextern.h, frame.h and window.h. | ||
| 275 | |||
| 276 | * term.c: Make (some) trivial substitutions for renamed and | ||
| 277 | new macros in dispextern.h, frame.h and window.h. | ||
| 278 | |||
| 279 | * widget.c: Make (few) trivial substitutions for renamed and | ||
| 280 | new macros in dispextern.h, frame.h and window.h. | ||
| 281 | |||
| 282 | * window.c: Make (many) trivial substitutions for renamed and | ||
| 283 | new macros in dispextern.h, frame.h and window.h. | ||
| 284 | (make_window): Initialize new members | ||
| 285 | left_margin_cols, right_margin_cols, left_fringe_width, | ||
| 286 | right_fringe_width, fringes_outside_margins, scroll_bar_width, | ||
| 287 | and vertical_scroll_bar_type. | ||
| 288 | (coordinates_in_window): Adapted to new fringe/margin positions | ||
| 289 | and per-window fringes and scroll-bars. | ||
| 290 | Fix bug related to incorrectly adjusting coordinates by | ||
| 291 | frame's internal_border_width (the effect normally negible since | ||
| 292 | the internal_border_width is typically 0 or 1 pixel, but very | ||
| 293 | noticeable for an internal_border_width of e.g. 25 pixels). | ||
| 294 | Upon successful return (other than ON_NOTHING), the coordinates | ||
| 295 | are now always properly converted to window relative for the | ||
| 296 | given display element. | ||
| 297 | (window_from_coordinates): Add new parameters wx and wy to | ||
| 298 | return the window relative x and y position in the returned | ||
| 299 | window and part. A null arg means, don't return the position. | ||
| 300 | All callers changed. | ||
| 301 | (adjust_window_margins): New function which may reduce the width | ||
| 302 | of the display margins if a window's text area is too small after | ||
| 303 | resizing or splitting windows. | ||
| 304 | (size_window): Fix bug that did not account for display margin | ||
| 305 | widths when checking the minimum width of a window; use | ||
| 306 | adjust_window_margins. | ||
| 307 | (set_window_buffer): Call Fset_window_fringes and | ||
| 308 | Fset_window_scroll_bars to setup per-window elements. | ||
| 309 | Add new arg KEEP_MARGINS_P. Non-nil means to keep window's | ||
| 310 | existing display margin, fringe widths, and scroll bar settings | ||
| 311 | (e.g. after splitting a window or resizing the frame). All | ||
| 312 | callers changed. | ||
| 313 | (Fset_window_buffer): New arg KEEP_MARGINS. All callers changed. | ||
| 314 | (Fsplit_window): Duplicate original window's display margin, | ||
| 315 | fringe, and scroll-bar settings; then call Fset_window_buffer with | ||
| 316 | KEEP_MARGINS non-nil. This fixes a bug which caused a split | ||
| 317 | window to only preserve the display margins in one of the windows. | ||
| 318 | When splitting horisontally, call adjust_window_margins on both | ||
| 319 | windows to ensure that the text area of the new windows is non too | ||
| 320 | narrow. This fixes a bug which could cause emacs to trap if the | ||
| 321 | width of the split window was less than the width of the display | ||
| 322 | margins. | ||
| 323 | (window_box_text_cols): Renamed from window_internal_width. All | ||
| 324 | uses changed. Adapt to per-window fringes and scroll bars. | ||
| 325 | Fix bug that caused vertical separator to be subtracted also on | ||
| 326 | window frames. Fix another bug that did not reduce the returned | ||
| 327 | value by the columns used for display margins. | ||
| 328 | (window_scroll_line_based): Fix bug related to scrolling too much | ||
| 329 | when display margins are present (implicitly fixed by the fix to | ||
| 330 | window_box_text_cols). | ||
| 331 | (scroll_left, scroll_right): Fix bug related to scrolling too far | ||
| 332 | by default when display margins are present (implicitly fixed by | ||
| 333 | the fix to window_box_text_cols). | ||
| 334 | (struct saved_window): Rename members left to left_col, top to | ||
| 335 | top_line, width to total_cols, height to total_lines, orig_top to | ||
| 336 | orig_top_line, orig_height to orig_total_lines. All uses changed. | ||
| 337 | New members left_margin_cols, right_margin_cols, | ||
| 338 | left_fringe_width, right_fringe_width, fringes_outside_margins, | ||
| 339 | scroll_bar_width, and vertical_scroll_bar_type for saving | ||
| 340 | per-window display elements. | ||
| 341 | (Fset_window_configuration): Restore display margins, fringes, | ||
| 342 | and scroll bar settings. This fixes a bug which caused display | ||
| 343 | margins to be discarded when saving and restoring a window | ||
| 344 | configuration. | ||
| 345 | (save_window_save): Save display margins, fringes, and scroll bar | ||
| 346 | settings. This fixes a bug which caused display margins to be | ||
| 347 | discarded when saving and restoring a window configuration. | ||
| 348 | (Fset_window_margins): Do nothing if display margins are not | ||
| 349 | really changed. Otherwise, call adjust_window_margins to ensure | ||
| 350 | the text area doesn't get too narrow. This fixes a bug which | ||
| 351 | could cause emacs to trap if setting display margins wider than | ||
| 352 | the width of the window. | ||
| 353 | (Fset_window_fringes): New defun to allow user to specifically set | ||
| 354 | this window's fringe widths and position vs. display margins. | ||
| 355 | (Fwindow_fringes): New defun to return window's actual fringe | ||
| 356 | settings. | ||
| 357 | (Fset_window_scroll_bars): New defun to allow user to specifically | ||
| 358 | set this window's scroll bar width and position. | ||
| 359 | (Fwindow_scroll_bars): New defun to return window's actual scroll | ||
| 360 | bar settings. | ||
| 361 | (compare_window_configurations): Also compare display margins, | ||
| 362 | fringes, and scroll bar settings. | ||
| 363 | (syms_of_window): Defsubr new defuns for fringe and scroll bars. | ||
| 364 | |||
| 365 | * xdisp.c: Make (many) trivial substitutions for renamed and | ||
| 366 | new macros in dispextern.h, frame.h and window.h. | ||
| 367 | (window_box_width): Adapt to per-window fringes and scroll bars, | ||
| 368 | and new fringe vs. display margin position. Note that returned | ||
| 369 | value is no longer guaranteed to be a whole multiple of the frame | ||
| 370 | column width, since per-window fringes may now be any width. | ||
| 371 | (window_box_left_offset): New function like window_box_left, but | ||
| 372 | value is relative to left border of window (rather than frame). | ||
| 373 | (window_box_right_offset): New function like window_box_right, | ||
| 374 | but value is relative to left border of window. | ||
| 375 | (window_box_left): Adapt to per-window fringes and scroll bars, | ||
| 376 | and new fringe vs. display margin position. Simplify by using | ||
| 377 | WINDOW_LEFT_EDGE_X and window_box_left_offset. | ||
| 378 | (window_box): Allow null args for unnecessary return values; | ||
| 379 | change/simplify relevant callers. | ||
| 380 | (x_y_to_hpos_vpos): Adapt to per-window fringes and scroll bars, | ||
| 381 | and new fringe vs. display margin position. Use | ||
| 382 | window_box_left_offset and window_box_right_offset | ||
| 383 | (get_glyph_string_clip_rect): Adapt to per-window fringes and | ||
| 384 | scroll bars, and new fringe vs. display margin position. Use | ||
| 385 | WINDOW_LEFT_EDGE_X and WINDOW_TOTAL_WIDTH. | ||
| 386 | (draw_fringe_bitmap): Rework to handle per-window fringes and new | ||
| 387 | fringe vs. display margin position. | ||
| 388 | (hscroll_window_tree): Use window_box_width instead of window_box. | ||
| 389 | (redisplay_window): Adapt to per-window scroll bars. | ||
| 390 | (draw_glyphs): Rework to handle per-window fringes and scroll | ||
| 391 | bars, and new fringe vs. display margin position. Use | ||
| 392 | WINDOW_LEFT_EDGE_X, WINDOW_TOTAL_WIDTH, and window_box_left. | ||
| 393 | (x_clear_end_of_line): Adapt to per-window fringes and scroll | ||
| 394 | bars, and new fringe vs. display margin position. Fix bug which | ||
| 395 | increased total width of full_width rows by width of scroll bars | ||
| 396 | although window's total width already includes that. | ||
| 397 | (x_fix_overlapping_area): Simplify using window_box_left_offset. | ||
| 398 | (expose_area): Simplify using window_box_left_offset. | ||
| 399 | (x_draw_vertical_border): Handle per-window scroll bar settings, | ||
| 400 | mixing windows with left, right and no scroll bars. | ||
| 401 | |||
| 402 | * xfaces.c [WINDOWSNT]: Move redefinition of FONT_WIDTH macro to | ||
| 403 | where it's used in x_list_fonts (for clarity). | ||
| 404 | (frame_update_line_height): Remove unused function; functionality | ||
| 405 | is now done directly when setting the default font in x_set_font. | ||
| 406 | |||
| 407 | * xfns.c: Make (many) trivial substitutions for renamed and | ||
| 408 | new macros in dispextern.h, frame.h and window.h. | ||
| 409 | |||
| 410 | * xmenu.c: Make (some) trivial substitutions for renamed and | ||
| 411 | new macros in dispextern.h, frame.h and window.h. | ||
| 412 | |||
| 413 | * xterm.h (struct x_output): Move members left_pos, top_pos, | ||
| 414 | border_width, pixel_height, pixel_width, line_height, | ||
| 415 | internal_border_width, vertical_scroll_bar_extra, | ||
| 416 | left_fringe_width, right_fringe_width, fringe_cols, | ||
| 417 | fringes_extra, win_gravity, size_hint_flags, want_fullscreen, | ||
| 418 | x_pixels_diff, and y_pixels_diff to struct frame (frame.h). | ||
| 419 | (FRAME_INTERNAL_BORDER_WIDTH, FRAME_LINE_HEIGHT): Move to frame.h. | ||
| 420 | (FRAME_DEFAULT_FONT_WIDTH): Remove macro. | ||
| 421 | (PIXEL_WIDTH, PIXEL_HEIGHT) | ||
| 422 | (FRAME_X_FRINGE_COLS, FRAME_X_FRINGE_WIDTH) | ||
| 423 | (FRAME_X_LEFT_FRINGE_WIDTH, FRAME_X_RIGHT_FRINGE_WIDTH): Moved to | ||
| 424 | frame.h and renamed [see frame.h changes]. | ||
| 425 | (CHAR_TO_PIXEL_ROW, CHAR_TO_PIXEL_COL, CHAR_TO_PIXEL_WIDTH) | ||
| 426 | (CHAR_TO_PIXEL_HEIGHT, PIXEL_TO_CHAR_ROW, PIXEL_TO_CHAR_COL) | ||
| 427 | (PIXEL_TO_CHAR_WIDTH, PIXEL_TO_CHAR_HEIGHT): Moved to frame.h | ||
| 428 | and renamed [see frame.h changes]. | ||
| 429 | |||
| 430 | * xterm.c: Make (several) trivial substitutions for renamed and | ||
| 431 | new macros in dispextern.h, frame.h and window.h. | ||
| 432 | (x_draw_glyph_string_box): Adapt to per-window fringes and | ||
| 433 | scroll-bars. | ||
| 434 | (scroll_run): Adapt to new fringe position. | ||
| 435 | (glyph_rect): Use window coordinates returned from | ||
| 436 | window_from_coordinates rather than frame_to_window_pixel_xy. | ||
| 437 | (XTset_vertical_scroll_bar): Adapt to per-window fringes and | ||
| 438 | scroll-bars. | ||
| 439 | (handle_one_xevent): Simplify a USE_GTK conditional. | ||
| 440 | (x_clip_to_row): Remove superfluous whole_line_p arg and code | ||
| 441 | (fringes are now inside margins, i.e. always in the clipping area). | ||
| 442 | All callers changed. | ||
| 443 | (x_new_font): Set FRAME_COLUMN_WIDTH and FRAME_LINE_HEIGHT | ||
| 444 | directly, then call compute_fringe_widths. Don't call | ||
| 445 | frame_update_line_height. | ||
| 446 | |||
| 447 | * w32term.h (struct w32_output): Move members left_pos, top_pos, | ||
| 448 | border_width, pixel_height, pixel_width, line_height, | ||
| 449 | internal_border_width, vertical_scroll_bar_extra, | ||
| 450 | left_fringe_width, right_fringe_width, fringe_cols, | ||
| 451 | fringes_extra, win_gravity, size_hint_flags, want_fullscreen, | ||
| 452 | x_pixels_diff, and y_pixels_diff to struct frame (frame.h). | ||
| 453 | (FRAME_INTERNAL_BORDER_WIDTH, FRAME_LINE_HEIGHT): Move to frame.h. | ||
| 454 | (FRAME_DEFAULT_FONT_WIDTH): Remove macro. | ||
| 455 | (PIXEL_WIDTH, PIXEL_HEIGHT) | ||
| 456 | (FRAME_X_FRINGE_COLS, FRAME_X_FRINGE_WIDTH) | ||
| 457 | (FRAME_X_LEFT_FRINGE_WIDTH, FRAME_X_RIGHT_FRINGE_WIDTH): Moved to | ||
| 458 | frame.h and renamed [see frame.h changes]. | ||
| 459 | (CHAR_TO_PIXEL_ROW, CHAR_TO_PIXEL_COL, CHAR_TO_PIXEL_WIDTH) | ||
| 460 | (CHAR_TO_PIXEL_HEIGHT, PIXEL_TO_CHAR_ROW, PIXEL_TO_CHAR_COL) | ||
| 461 | (PIXEL_TO_CHAR_WIDTH, PIXEL_TO_CHAR_HEIGHT): Moved to frame.h | ||
| 462 | and renamed [see frame.h changes]. | ||
| 463 | |||
| 464 | * w32term.c: Make (several) trivial substitutions for renamed and | ||
| 465 | new macros in dispextern.h, frame.h and window.h. | ||
| 466 | (x_draw_glyph_string_box): Adapt to per-window fringes and | ||
| 467 | scroll-bars. | ||
| 468 | (glyph_rect): Use window coordinates returned from | ||
| 469 | window_from_coordinates rather than frame_to_window_pixel_xy. | ||
| 470 | (XTset_vertical_scroll_bar): Adapt to per-window fringes and | ||
| 471 | scroll-bars. | ||
| 472 | (w32_clip_to_row): Remove superfluous whole_line_p arg and code | ||
| 473 | (fringes are now inside margins, i.e. always in the clipping area). | ||
| 474 | All callers changed. | ||
| 475 | (x_new_font): Set FRAME_COLUMN_WIDTH and FRAME_LINE_HEIGHT | ||
| 476 | directly, then call compute_fringe_widths. Don't call | ||
| 477 | frame_update_line_height. | ||
| 478 | |||
| 479 | * w32console.c: Make (few) trivial substitutions for renamed and | ||
| 480 | new macros in dispextern.h, frame.h and window.h. | ||
| 481 | |||
| 482 | * w32fns.c: Make (many) trivial substitutions for renamed and | ||
| 483 | new macros in dispextern.h, frame.h and window.h. | ||
| 484 | |||
| 485 | * w32menu.c: Make (few) trivial substitutions for renamed and | ||
| 486 | new macros in dispextern.h, frame.h and window.h. | ||
| 487 | |||
| 488 | * macterm.h (struct mac_output): Move members left_pos, top_pos, | ||
| 489 | border_width, pixel_height, pixel_width, line_height, | ||
| 490 | internal_border_width, vertical_scroll_bar_extra, | ||
| 491 | left_fringe_width, right_fringe_width, fringe_cols, | ||
| 492 | fringes_extra, win_gravity, size_hint_flags, want_fullscreen, | ||
| 493 | x_pixels_diff, y_pixels_diff to struct frame (frame.h). | ||
| 494 | (FRAME_INTERNAL_BORDER_WIDTH, FRAME_LINE_HEIGHT): Move to frame.h. | ||
| 495 | (FRAME_DEFAULT_FONT_WIDTH): Remove macro. | ||
| 496 | (PIXEL_WIDTH, PIXEL_HEIGHT) | ||
| 497 | (FRAME_X_FRINGE_COLS, FRAME_X_FRINGE_WIDTH) | ||
| 498 | (FRAME_X_LEFT_FRINGE_WIDTH, FRAME_X_RIGHT_FRINGE_WIDTH): Moved to | ||
| 499 | frame.h and renamed [see frame.h changes]. | ||
| 500 | (CHAR_TO_PIXEL_ROW, CHAR_TO_PIXEL_COL, CHAR_TO_PIXEL_WIDTH) | ||
| 501 | (CHAR_TO_PIXEL_HEIGHT, PIXEL_TO_CHAR_ROW, PIXEL_TO_CHAR_COL) | ||
| 502 | (PIXEL_TO_CHAR_WIDTH, PIXEL_TO_CHAR_HEIGHT): Moved to frame.h | ||
| 503 | and renamed [see frame.h changes]. | ||
| 504 | |||
| 505 | * macterm.c: Make (several) trivial substitutions for renamed and | ||
| 506 | new macros in dispextern.h, frame.h and window.h. | ||
| 507 | (x_draw_glyph_string_box): Adapt to per-window fringes and | ||
| 508 | scroll-bars. | ||
| 509 | (glyph_rect): Use window coordinates returned from | ||
| 510 | window_from_coordinates rather than frame_to_window_pixel_xy. | ||
| 511 | (XTset_vertical_scroll_bar): Adapt to per-window fringes and | ||
| 512 | scroll-bars. | ||
| 513 | (x_clip_to_row): Remove superfluous whole_line_p arg and code | ||
| 514 | (fringes are now inside margins, i.e. always in the clipping area). | ||
| 515 | All callers changed. | ||
| 516 | (x_new_font): Set FRAME_COLUMN_WIDTH and FRAME_LINE_HEIGHT | ||
| 517 | directly, then call compute_fringe_widths. Don't call | ||
| 518 | frame_update_line_height. | ||
| 519 | |||
| 520 | * macfns.c: Make (several) trivial substitutions for renamed and | ||
| 521 | new macros in dispextern.h, frame.h and window.h. | ||
| 522 | (x_real_positions): Set f->x_pixels_diff and f->y_pixels_diff to 0. | ||
| 523 | |||
| 524 | * macmenu.c: Make (few) trivial substitutions for renamed and | ||
| 525 | new macros in dispextern.h, frame.h and window.h. | ||
| 526 | |||
| 527 | * msdos.h (struct x_output): Remove members left_pos, top_pos, | ||
| 528 | and line_height, and use corresponding new members in struct | ||
| 529 | frame. All uses changed. | ||
| 530 | (FRAME_LINE_HEIGHT, FRAME_INTERNAL_BORDER_WIDTH): Remove macros; | ||
| 531 | superseeded by corresponding macros in frame.h. | ||
| 532 | |||
| 533 | * msdos.c: Make (several) trivial substitutions for renamed and | ||
| 534 | new macros in dispextern.h, frame.h and window.h. | ||
| 535 | (IT_note_mouse_highlight): Use updated window coordinates returned | ||
| 536 | by window_from_coordinates, rather than adjusting them locally. | ||
| 537 | (internal_terminal_init): No need to initialize line_height here; | ||
| 538 | it now defaults to 1. | ||
| 539 | |||
| 1 | 2003-05-24 Andreas Schwab <schwab@suse.de> | 540 | 2003-05-24 Andreas Schwab <schwab@suse.de> |
| 2 | 541 | ||
| 3 | * coding.c (find_safe_codings): Fix last change. | 542 | * coding.c (find_safe_codings): Fix last change. |