diff options
| author | Kim F. Storm | 2001-12-01 01:35:14 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2001-12-01 01:35:14 +0000 |
| commit | 099603aedff1efaa76342b1f51dd62c83bda9408 (patch) | |
| tree | 95de4ea634a0d4ec7c6e7efcf6d3fd00b544a121 | |
| parent | d33c49e8795f8094ec2587e57203b1245af0d6ca (diff) | |
| download | emacs-099603aedff1efaa76342b1f51dd62c83bda9408.tar.gz emacs-099603aedff1efaa76342b1f51dd62c83bda9408.zip | |
Merged fringe width related changes from xterm.h.
| -rw-r--r-- | mac/inc/macterm.h | 30 | ||||
| -rw-r--r-- | src/w32term.h | 30 |
2 files changed, 14 insertions, 46 deletions
diff --git a/mac/inc/macterm.h b/mac/inc/macterm.h index f105dcab8cd..340be4e35f3 100644 --- a/mac/inc/macterm.h +++ b/mac/inc/macterm.h | |||
| @@ -358,7 +358,8 @@ struct mac_output { | |||
| 358 | /* The extra width currently allotted for the areas in which | 358 | /* The extra width currently allotted for the areas in which |
| 359 | truncation marks, continuation marks, and overlay arrows are | 359 | truncation marks, continuation marks, and overlay arrows are |
| 360 | displayed. */ | 360 | displayed. */ |
| 361 | int fringes_extra; | 361 | int left_fringe_width, right_fringe_width; |
| 362 | int fringe_cols, fringes_extra; | ||
| 362 | 363 | ||
| 363 | /* This is the gravity value for the specified window position. */ | 364 | /* This is the gravity value for the specified window position. */ |
| 364 | int win_gravity; | 365 | int win_gravity; |
| @@ -451,39 +452,22 @@ typedef struct mac_output mac_output; | |||
| 451 | #define FRAME_X_IMAGE_CACHE(F) FRAME_MAC_DISPLAY_INFO ((F))->image_cache | 452 | #define FRAME_X_IMAGE_CACHE(F) FRAME_MAC_DISPLAY_INFO ((F))->image_cache |
| 452 | 453 | ||
| 453 | 454 | ||
| 454 | /* Pixel width of the fringe bitmaps drawn to indicate truncation, | ||
| 455 | continuation etc. */ | ||
| 456 | |||
| 457 | #define FRAME_FRINGE_BITMAP_WIDTH(f) 8 | ||
| 458 | #define FRAME_FRINGE_BITMAP_HEIGHT(f) 8 | ||
| 459 | |||
| 460 | /* Total width of fringes reserved for drawing truncation bitmaps, | 455 | /* Total width of fringes reserved for drawing truncation bitmaps, |
| 461 | continuation bitmaps and alike. The width is in canonical char | 456 | continuation bitmaps and alike. The width is in canonical char |
| 462 | units of the frame. This must currently be the case because window | 457 | units of the frame. This must currently be the case because window |
| 463 | sizes aren't pixel values. If it weren't the case, we wouldn't be | 458 | sizes aren't pixel values. If it weren't the case, we wouldn't be |
| 464 | able to split windows horizontally nicely. */ | 459 | able to split windows horizontally nicely. */ |
| 465 | 460 | ||
| 466 | #define FRAME_X_FRINGE_COLS(F) \ | 461 | #define FRAME_X_FRINGE_COLS(F) ((F)->output_data.mac->fringe_cols) |
| 467 | ((2 * FRAME_FRINGE_BITMAP_WIDTH ((F)) + CANON_X_UNIT ((F)) - 1) \ | ||
| 468 | / CANON_X_UNIT ((F))) | ||
| 469 | 462 | ||
| 470 | /* Total width of fringes in pixels. */ | 463 | /* Total width of fringes in pixels. */ |
| 471 | 464 | ||
| 472 | #define FRAME_X_FRINGE_WIDTH(F) \ | 465 | #define FRAME_X_FRINGE_WIDTH(F) ((F)->output_data.mac->fringes_extra) |
| 473 | (FRAME_X_FRINGE_COLS ((F)) * CANON_X_UNIT ((F))) | ||
| 474 | |||
| 475 | /* Pixel-width of the left fringe. */ | ||
| 476 | |||
| 477 | #define FRAME_X_LEFT_FRINGE_WIDTH(F) \ | ||
| 478 | (FRAME_X_FRINGE_WIDTH (F) / 2) | ||
| 479 | |||
| 480 | /* Pixel-width of the right fringe. Note that we are doing | ||
| 481 | integer arithmetic here, so don't loose a pixel if the total | ||
| 482 | width is an odd number. */ | ||
| 483 | 466 | ||
| 484 | #define FRAME_X_RIGHT_FRINGE_WIDTH(F) \ | 467 | /* Pixel-width of the left and right fringe. */ |
| 485 | (FRAME_X_FRINGE_WIDTH (F) - FRAME_X_FRINGE_WIDTH (F) / 2) | ||
| 486 | 468 | ||
| 469 | #define FRAME_X_LEFT_FRINGE_WIDTH(F) ((F)->output_data.mac->left_fringe_width) | ||
| 470 | #define FRAME_X_RIGHT_FRINGE_WIDTH(F) ((F)->output_data.mac->right_fringe_width) | ||
| 487 | 471 | ||
| 488 | 472 | ||
| 489 | /* Mac-specific scroll bar stuff. */ | 473 | /* Mac-specific scroll bar stuff. */ |
diff --git a/src/w32term.h b/src/w32term.h index 99a32de6a97..66121078187 100644 --- a/src/w32term.h +++ b/src/w32term.h | |||
| @@ -385,7 +385,8 @@ struct w32_output | |||
| 385 | /* The extra width currently allotted for the areas in which | 385 | /* The extra width currently allotted for the areas in which |
| 386 | truncation marks, continuation marks, and overlay arrows are | 386 | truncation marks, continuation marks, and overlay arrows are |
| 387 | displayed. */ | 387 | displayed. */ |
| 388 | int fringes_extra; | 388 | int left_fringe_width, right_fringe_width; |
| 389 | int fringe_cols, fringes_extra; | ||
| 389 | 390 | ||
| 390 | /* This is the gravity value for the specified window position. */ | 391 | /* This is the gravity value for the specified window position. */ |
| 391 | int win_gravity; | 392 | int win_gravity; |
| @@ -468,39 +469,22 @@ extern struct w32_output w32term_display; | |||
| 468 | #define FRAME_X_IMAGE_CACHE(F) FRAME_W32_DISPLAY_INFO ((F))->image_cache | 469 | #define FRAME_X_IMAGE_CACHE(F) FRAME_W32_DISPLAY_INFO ((F))->image_cache |
| 469 | 470 | ||
| 470 | 471 | ||
| 471 | /* Pixel width of the fringe bitmaps drawn to indicate truncation, | ||
| 472 | continuation etc. */ | ||
| 473 | |||
| 474 | #define FRAME_FRINGE_BITMAP_WIDTH(f) 8 | ||
| 475 | #define FRAME_FRINGE_BITMAP_HEIGHT(f) 8 | ||
| 476 | |||
| 477 | /* Total width of fringes reserved for drawing truncation bitmaps, | 472 | /* Total width of fringes reserved for drawing truncation bitmaps, |
| 478 | continuation bitmaps and alike. The width is in canonical char | 473 | continuation bitmaps and alike. The width is in canonical char |
| 479 | units of the frame. This must currently be the case because window | 474 | units of the frame. This must currently be the case because window |
| 480 | sizes aren't pixel values. If it weren't the case, we wouldn't be | 475 | sizes aren't pixel values. If it weren't the case, we wouldn't be |
| 481 | able to split windows horizontally nicely. */ | 476 | able to split windows horizontally nicely. */ |
| 482 | 477 | ||
| 483 | #define FRAME_X_FRINGE_COLS(F) \ | 478 | #define FRAME_X_FRINGE_COLS(F) ((F)->output_data.w32->fringe_cols) |
| 484 | ((F) == XFRAME (tip_frame) ? 0 : \ | ||
| 485 | (2 * FRAME_FRINGE_BITMAP_WIDTH ((F)) + CANON_X_UNIT ((F)) - 1) \ | ||
| 486 | / CANON_X_UNIT ((F))) | ||
| 487 | 479 | ||
| 488 | /* Total width of fringes in pixels. */ | 480 | /* Total width of fringes in pixels. */ |
| 489 | 481 | ||
| 490 | #define FRAME_X_FRINGE_WIDTH(F) \ | 482 | #define FRAME_X_FRINGE_WIDTH(F) ((F)->output_data.w32->fringes_extra) |
| 491 | (FRAME_X_FRINGE_COLS ((F)) * CANON_X_UNIT ((F))) | ||
| 492 | |||
| 493 | /* Pixel-width of the left fringe. */ | ||
| 494 | |||
| 495 | #define FRAME_X_LEFT_FRINGE_WIDTH(F) \ | ||
| 496 | (FRAME_X_FRINGE_WIDTH (F) / 2) | ||
| 497 | 483 | ||
| 498 | /* Pixel-width of the right fringe. Note that we are doing | 484 | /* Pixel-width of the left and right fringe. */ |
| 499 | integer arithmetic here, so don't loose a pixel if the total | ||
| 500 | width is an odd number. */ | ||
| 501 | 485 | ||
| 502 | #define FRAME_X_RIGHT_FRINGE_WIDTH(F) \ | 486 | #define FRAME_X_LEFT_FRINGE_WIDTH(F) ((F)->output_data.w32->left_fringe_width) |
| 503 | (FRAME_X_FRINGE_WIDTH (F) - FRAME_X_FRINGE_WIDTH (F) / 2) | 487 | #define FRAME_X_RIGHT_FRINGE_WIDTH(F) ((F)->output_data.w32->right_fringe_width) |
| 504 | 488 | ||
| 505 | 489 | ||
| 506 | 490 | ||