diff options
| author | Richard M. Stallman | 1994-04-09 06:34:13 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-04-09 06:34:13 +0000 |
| commit | 2ba6876c1ef9f157fd1034e67675f6da13135a1a (patch) | |
| tree | 111672867facc65c25d6f25caaaf0510dcb55092 /src | |
| parent | 729425b1068937c40abca197f150faca03e91100 (diff) | |
| download | emacs-2ba6876c1ef9f157fd1034e67675f6da13135a1a.tar.gz emacs-2ba6876c1ef9f157fd1034e67675f6da13135a1a.zip | |
(struct x_display): New field line_height.
(VERTICAL_SCROLL_BAR_PIXEL_HEIGHT, PIXEL_TO_CHAR_ROW)
(CHAR_TO_PIXEL_ROW): Use line_height field.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xterm.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/xterm.h b/src/xterm.h index a643712e92f..8ae3d4d0c32 100644 --- a/src/xterm.h +++ b/src/xterm.h | |||
| @@ -262,6 +262,9 @@ struct x_display | |||
| 262 | /* Size of the X window in pixels. */ | 262 | /* Size of the X window in pixels. */ |
| 263 | int pixel_height, pixel_width; | 263 | int pixel_height, pixel_width; |
| 264 | 264 | ||
| 265 | /* Height of a line, in pixels. */ | ||
| 266 | int line_height; | ||
| 267 | |||
| 265 | #ifdef HAVE_X11 | 268 | #ifdef HAVE_X11 |
| 266 | /* The tiled border used when the mouse is out of the frame. */ | 269 | /* The tiled border used when the mouse is out of the frame. */ |
| 267 | Pixmap border_tile; | 270 | Pixmap border_tile; |
| @@ -508,7 +511,7 @@ struct scroll_bar { | |||
| 508 | /* Return the outside pixel height for a vertical scroll bar HEIGHT | 511 | /* Return the outside pixel height for a vertical scroll bar HEIGHT |
| 509 | rows high on frame F. */ | 512 | rows high on frame F. */ |
| 510 | #define VERTICAL_SCROLL_BAR_PIXEL_HEIGHT(f, height) \ | 513 | #define VERTICAL_SCROLL_BAR_PIXEL_HEIGHT(f, height) \ |
| 511 | ((height) * FONT_HEIGHT ((f)->display.x->font)) | 514 | ((height) * (f)->display.x->line_height) |
| 512 | 515 | ||
| 513 | /* Return the inside width of a vertical scroll bar, given the outside | 516 | /* Return the inside width of a vertical scroll bar, given the outside |
| 514 | width. */ | 517 | width. */ |
| @@ -559,7 +562,7 @@ struct scroll_bar { | |||
| 559 | at ROW/COL. */ | 562 | at ROW/COL. */ |
| 560 | #define CHAR_TO_PIXEL_ROW(f, row) \ | 563 | #define CHAR_TO_PIXEL_ROW(f, row) \ |
| 561 | ((f)->display.x->internal_border_width \ | 564 | ((f)->display.x->internal_border_width \ |
| 562 | + (row) * FONT_HEIGHT ((f)->display.x->font)) | 565 | + (row) * (f)->display.x->line_height) |
| 563 | #define CHAR_TO_PIXEL_COL(f, col) \ | 566 | #define CHAR_TO_PIXEL_COL(f, col) \ |
| 564 | ((f)->display.x->internal_border_width \ | 567 | ((f)->display.x->internal_border_width \ |
| 565 | + (col) * FONT_WIDTH ((f)->display.x->font)) | 568 | + (col) * FONT_WIDTH ((f)->display.x->font)) |
| @@ -579,7 +582,7 @@ struct scroll_bar { | |||
| 579 | the pixel on FRAME at ROW/COL. */ | 582 | the pixel on FRAME at ROW/COL. */ |
| 580 | #define PIXEL_TO_CHAR_ROW(f, row) \ | 583 | #define PIXEL_TO_CHAR_ROW(f, row) \ |
| 581 | (((row) - (f)->display.x->internal_border_width) \ | 584 | (((row) - (f)->display.x->internal_border_width) \ |
| 582 | / FONT_HEIGHT ((f)->display.x->font)) | 585 | / (f)->display.x->line_height) |
| 583 | #define PIXEL_TO_CHAR_COL(f, col) \ | 586 | #define PIXEL_TO_CHAR_COL(f, col) \ |
| 584 | (((col) - (f)->display.x->internal_border_width) \ | 587 | (((col) - (f)->display.x->internal_border_width) \ |
| 585 | / FONT_WIDTH ((f)->display.x->font)) | 588 | / FONT_WIDTH ((f)->display.x->font)) |