112 |
#define BETWEEN(X, LOWER, UPPER) ((X) >= (LOWER) && (X) < (UPPER)) |
#define BETWEEN(X, LOWER, UPPER) ((X) >= (LOWER) && (X) < (UPPER)) |
113 |
|
|
114 |
|
|
115 |
/* Bitmaps for truncated lines. */ |
/* Fringe bitmaps. */ |
116 |
|
|
117 |
enum bitmap_type |
enum fringe_bitmap_type |
118 |
{ |
{ |
119 |
NO_BITMAP, |
NO_FRINGE_BITMAP, |
120 |
LEFT_TRUNCATION_BITMAP, |
LEFT_TRUNCATION_BITMAP, |
121 |
RIGHT_TRUNCATION_BITMAP, |
RIGHT_TRUNCATION_BITMAP, |
122 |
OVERLAY_ARROW_BITMAP, |
OVERLAY_ARROW_BITMAP, |
430 |
static void x_update_window_cursor P_ ((struct window *, int)); |
static void x_update_window_cursor P_ ((struct window *, int)); |
431 |
static void x_erase_phys_cursor P_ ((struct window *)); |
static void x_erase_phys_cursor P_ ((struct window *)); |
432 |
void x_display_and_set_cursor P_ ((struct window *, int, int, int, int, int)); |
void x_display_and_set_cursor P_ ((struct window *, int, int, int, int, int)); |
433 |
static void x_draw_bitmap P_ ((struct window *, struct glyph_row *, |
static void x_draw_fringe_bitmap P_ ((struct window *, struct glyph_row *, |
434 |
enum bitmap_type)); |
enum fringe_bitmap_type)); |
435 |
|
|
436 |
static void x_clip_to_row P_ ((struct window *, struct glyph_row *, |
static void x_clip_to_row P_ ((struct window *, struct glyph_row *, |
437 |
GC, int)); |
GC, int)); |
438 |
static int x_phys_cursor_in_rect_p P_ ((struct window *, Rect *)); |
static int x_phys_cursor_in_rect_p P_ ((struct window *, Rect *)); |
439 |
static void x_draw_row_bitmaps P_ ((struct window *, struct glyph_row *)); |
static void x_draw_row_fringe_bitmaps P_ ((struct window *, struct glyph_row *)); |
440 |
static void note_overwritten_text_cursor P_ ((struct window *, int, int)); |
static void note_overwritten_text_cursor P_ ((struct window *, int, int)); |
441 |
static void x_flush P_ ((struct frame *f)); |
static void x_flush P_ ((struct frame *f)); |
442 |
static void x_update_begin P_ ((struct frame *)); |
static void x_update_begin P_ ((struct frame *)); |
1154 |
int x0, x1, y0, y1; |
int x0, x1, y0, y1; |
1155 |
|
|
1156 |
window_box_edges (w, -1, &x0, &y0, &x1, &y1); |
window_box_edges (w, -1, &x0, &y0, &x1, &y1); |
1157 |
x1 += FRAME_X_RIGHT_FLAGS_AREA_WIDTH (f); |
x1 += FRAME_X_RIGHT_FRINGE_WIDTH (f); |
1158 |
y1 -= 1; |
y1 -= 1; |
1159 |
|
|
1160 |
XDrawLine (FRAME_MAC_DISPLAY (f), FRAME_MAC_WINDOW (f), |
XDrawLine (FRAME_MAC_DISPLAY (f), FRAME_MAC_WINDOW (f), |
1260 |
|
|
1261 |
|
|
1262 |
/* Draw truncation mark bitmaps, continuation mark bitmaps, overlay |
/* Draw truncation mark bitmaps, continuation mark bitmaps, overlay |
1263 |
arrow bitmaps, or clear the areas where they would be displayed |
arrow bitmaps, or clear the fringes if no bitmaps are required |
1264 |
before DESIRED_ROW is made current. The window being updated is |
before DESIRED_ROW is made current. The window being updated is |
1265 |
found in updated_window. This function It is called from |
found in updated_window. This function It is called from |
1266 |
update_window_line only if it is known that there are differences |
update_window_line only if it is known that there are differences |
1277 |
if (!desired_row->mode_line_p && !w->pseudo_window_p) |
if (!desired_row->mode_line_p && !w->pseudo_window_p) |
1278 |
{ |
{ |
1279 |
BLOCK_INPUT; |
BLOCK_INPUT; |
1280 |
x_draw_row_bitmaps (w, desired_row); |
x_draw_row_fringe_bitmaps (w, desired_row); |
1281 |
|
|
1282 |
/* When a window has disappeared, make sure that no rest of |
/* When a window has disappeared, make sure that no rest of |
1283 |
full-width rows stays visible in the internal border. */ |
full-width rows stays visible in the internal border. */ |
1287 |
int width = FRAME_INTERNAL_BORDER_WIDTH (f); |
int width = FRAME_INTERNAL_BORDER_WIDTH (f); |
1288 |
int height = desired_row->visible_height; |
int height = desired_row->visible_height; |
1289 |
int x = (window_box_right (w, -1) |
int x = (window_box_right (w, -1) |
1290 |
+ FRAME_X_RIGHT_FLAGS_AREA_WIDTH (f)); |
+ FRAME_X_RIGHT_FRINGE_WIDTH (f)); |
1291 |
int y = WINDOW_TO_FRAME_PIXEL_Y (w, max (0, desired_row->y)); |
int y = WINDOW_TO_FRAME_PIXEL_Y (w, max (0, desired_row->y)); |
1292 |
|
|
1293 |
XClearArea (FRAME_MAC_DISPLAY (f), FRAME_MAC_WINDOW (f), |
XClearArea (FRAME_MAC_DISPLAY (f), FRAME_MAC_WINDOW (f), |
1299 |
} |
} |
1300 |
|
|
1301 |
|
|
1302 |
/* Draw the bitmap WHICH in one of the areas to the left or right of |
/* Draw the bitmap WHICH in one of the left or right fringes of |
1303 |
window W. ROW is the glyph row for which to display the bitmap; it |
window W. ROW is the glyph row for which to display the bitmap; it |
1304 |
determines the vertical position at which the bitmap has to be |
determines the vertical position at which the bitmap has to be |
1305 |
drawn. */ |
drawn. */ |
1306 |
|
|
1307 |
static void |
static void |
1308 |
x_draw_bitmap (w, row, which) |
x_draw_fringe_bitmap (w, row, which) |
1309 |
struct window *w; |
struct window *w; |
1310 |
struct glyph_row *row; |
struct glyph_row *row; |
1311 |
enum bitmap_type which; |
enum fringe_bitmap_type which; |
1312 |
{ |
{ |
1313 |
struct frame *f = XFRAME (WINDOW_FRAME (w)); |
struct frame *f = XFRAME (WINDOW_FRAME (w)); |
1314 |
Display *display = FRAME_MAC_DISPLAY (f); |
Display *display = FRAME_MAC_DISPLAY (f); |
1330 |
bits = left_bits; |
bits = left_bits; |
1331 |
x = (WINDOW_TO_FRAME_PIXEL_X (w, 0) |
x = (WINDOW_TO_FRAME_PIXEL_X (w, 0) |
1332 |
- wd |
- wd |
1333 |
- (FRAME_X_LEFT_FLAGS_AREA_WIDTH (f) - wd) / 2); |
- (FRAME_X_LEFT_FRINGE_WIDTH (f) - wd) / 2); |
1334 |
break; |
break; |
1335 |
|
|
1336 |
case OVERLAY_ARROW_BITMAP: |
case OVERLAY_ARROW_BITMAP: |
1339 |
bits = ov_bits; |
bits = ov_bits; |
1340 |
x = (WINDOW_TO_FRAME_PIXEL_X (w, 0) |
x = (WINDOW_TO_FRAME_PIXEL_X (w, 0) |
1341 |
- wd |
- wd |
1342 |
- (FRAME_X_LEFT_FLAGS_AREA_WIDTH (f) - wd) / 2); |
- (FRAME_X_LEFT_FRINGE_WIDTH (f) - wd) / 2); |
1343 |
break; |
break; |
1344 |
|
|
1345 |
case RIGHT_TRUNCATION_BITMAP: |
case RIGHT_TRUNCATION_BITMAP: |
1347 |
h = right_height; |
h = right_height; |
1348 |
bits = right_bits; |
bits = right_bits; |
1349 |
x = window_box_right (w, -1); |
x = window_box_right (w, -1); |
1350 |
x += (FRAME_X_RIGHT_FLAGS_AREA_WIDTH (f) - wd) / 2; |
x += (FRAME_X_RIGHT_FRINGE_WIDTH (f) - wd) / 2; |
1351 |
break; |
break; |
1352 |
|
|
1353 |
case CONTINUED_LINE_BITMAP: |
case CONTINUED_LINE_BITMAP: |
1355 |
h = right_height; |
h = right_height; |
1356 |
bits = continued_bits; |
bits = continued_bits; |
1357 |
x = window_box_right (w, -1); |
x = window_box_right (w, -1); |
1358 |
x += (FRAME_X_RIGHT_FLAGS_AREA_WIDTH (f) - wd) / 2; |
x += (FRAME_X_RIGHT_FRINGE_WIDTH (f) - wd) / 2; |
1359 |
break; |
break; |
1360 |
|
|
1361 |
case CONTINUATION_LINE_BITMAP: |
case CONTINUATION_LINE_BITMAP: |
1364 |
bits = continuation_bits; |
bits = continuation_bits; |
1365 |
x = (WINDOW_TO_FRAME_PIXEL_X (w, 0) |
x = (WINDOW_TO_FRAME_PIXEL_X (w, 0) |
1366 |
- wd |
- wd |
1367 |
- (FRAME_X_LEFT_FLAGS_AREA_WIDTH (f) - wd) / 2); |
- (FRAME_X_LEFT_FRINGE_WIDTH (f) - wd) / 2); |
1368 |
break; |
break; |
1369 |
|
|
1370 |
case ZV_LINE_BITMAP: |
case ZV_LINE_BITMAP: |
1373 |
bits = zv_bits; |
bits = zv_bits; |
1374 |
x = (WINDOW_TO_FRAME_PIXEL_X (w, 0) |
x = (WINDOW_TO_FRAME_PIXEL_X (w, 0) |
1375 |
- wd |
- wd |
1376 |
- (FRAME_X_LEFT_FLAGS_AREA_WIDTH (f) - wd) / 2); |
- (FRAME_X_LEFT_FRINGE_WIDTH (f) - wd) / 2); |
1377 |
break; |
break; |
1378 |
|
|
1379 |
default: |
default: |
1387 |
|
|
1388 |
/* Draw the bitmap. I believe these small pixmaps can be cached |
/* Draw the bitmap. I believe these small pixmaps can be cached |
1389 |
by the server. */ |
by the server. */ |
1390 |
face = FACE_FROM_ID (f, BITMAP_AREA_FACE_ID); |
face = FACE_FROM_ID (f, FRINGE_FACE_ID); |
1391 |
|
|
1392 |
mac_create_bitmap_from_bitmap_data (&bitmap, bits, wd, h); |
mac_create_bitmap_from_bitmap_data (&bitmap, bits, wd, h); |
1393 |
gcv.foreground = face->foreground; |
gcv.foreground = face->foreground; |
1400 |
} |
} |
1401 |
|
|
1402 |
|
|
1403 |
/* Draw flags bitmaps for glyph row ROW on window W. Call this |
/* Draw fringe bitmaps for glyph row ROW on window W. Call this |
1404 |
function with input blocked. */ |
function with input blocked. */ |
1405 |
|
|
1406 |
static void |
static void |
1407 |
x_draw_row_bitmaps (w, row) |
x_draw_row_fringe_bitmaps (w, row) |
1408 |
struct window *w; |
struct window *w; |
1409 |
struct glyph_row *row; |
struct glyph_row *row; |
1410 |
{ |
{ |
1411 |
struct frame *f = XFRAME (w->frame); |
struct frame *f = XFRAME (w->frame); |
1412 |
enum bitmap_type bitmap; |
enum fringe_bitmap_type bitmap; |
1413 |
struct face *face; |
struct face *face; |
1414 |
int header_line_height = -1; |
int header_line_height = -1; |
1415 |
|
|
1420 |
if (row->visible_height <= 0) |
if (row->visible_height <= 0) |
1421 |
return; |
return; |
1422 |
|
|
1423 |
face = FACE_FROM_ID (f, BITMAP_AREA_FACE_ID); |
face = FACE_FROM_ID (f, FRINGE_FACE_ID); |
1424 |
PREPARE_FACE_FOR_DISPLAY (f, face); |
PREPARE_FACE_FOR_DISPLAY (f, face); |
1425 |
|
|
1426 |
/* Decide which bitmap to draw at the left side. */ |
/* Decide which bitmap to draw in the left fringe. */ |
1427 |
if (row->overlay_arrow_p) |
if (row->overlay_arrow_p) |
1428 |
bitmap = OVERLAY_ARROW_BITMAP; |
bitmap = OVERLAY_ARROW_BITMAP; |
1429 |
else if (row->truncated_on_left_p) |
else if (row->truncated_on_left_p) |
1433 |
else if (row->indicate_empty_line_p) |
else if (row->indicate_empty_line_p) |
1434 |
bitmap = ZV_LINE_BITMAP; |
bitmap = ZV_LINE_BITMAP; |
1435 |
else |
else |
1436 |
bitmap = NO_BITMAP; |
bitmap = NO_FRINGE_BITMAP; |
1437 |
|
|
1438 |
/* Clear flags area if no bitmap to draw or if bitmap doesn't fill |
/* Clear left fringe if no bitmap to draw or if bitmap doesn't fill |
1439 |
the flags area. */ |
the fringe. */ |
1440 |
if (bitmap == NO_BITMAP |
if (bitmap == NO_FRINGE_BITMAP |
1441 |
|| FRAME_FLAGS_BITMAP_WIDTH (f) < FRAME_X_LEFT_FLAGS_AREA_WIDTH (f) |
|| FRAME_FRINGE_BITMAP_WIDTH (f) < FRAME_X_LEFT_FRINGE_WIDTH (f) |
1442 |
|| row->height > FRAME_FLAGS_BITMAP_HEIGHT (f)) |
|| row->height > FRAME_FRINGE_BITMAP_HEIGHT (f)) |
1443 |
{ |
{ |
1444 |
/* If W has a vertical border to its left, don't draw over it. */ |
/* If W has a vertical border to its left, don't draw over it. */ |
1445 |
int border = ((XFASTINT (w->left) > 0 |
int border = ((XFASTINT (w->left) > 0 |
1451 |
header_line_height = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (w); |
header_line_height = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (w); |
1452 |
|
|
1453 |
#if 0 /* MAC_TODO: stipple */ |
#if 0 /* MAC_TODO: stipple */ |
1454 |
/* In case the same realized face is used for bitmap areas and |
/* In case the same realized face is used for fringes and |
1455 |
for something displayed in the text (e.g. face `region' on |
for something displayed in the text (e.g. face `region' on |
1456 |
mono-displays, the fill style may have been changed to |
mono-displays, the fill style may have been changed to |
1457 |
FillSolid in x_draw_glyph_string_background. */ |
FillSolid in x_draw_glyph_string_background. */ |
1463 |
XFillRectangle (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), |
XFillRectangle (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), |
1464 |
face->gc, |
face->gc, |
1465 |
(left |
(left |
1466 |
- FRAME_X_LEFT_FLAGS_AREA_WIDTH (f) |
- FRAME_X_LEFT_FRINGE_WIDTH (f) |
1467 |
+ border), |
+ border), |
1468 |
WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height, |
WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height, |
1469 |
row->y)), |
row->y)), |
1470 |
FRAME_X_LEFT_FLAGS_AREA_WIDTH (f) - border, |
FRAME_X_LEFT_FRINGE_WIDTH (f) - border, |
1471 |
row->visible_height); |
row->visible_height); |
1472 |
if (!face->stipple) |
if (!face->stipple) |
1473 |
XSetForeground (FRAME_X_DISPLAY (f), face->gc, face->foreground); |
XSetForeground (FRAME_X_DISPLAY (f), face->gc, face->foreground); |
1478 |
XFillRectangle (FRAME_MAC_DISPLAY (f), FRAME_MAC_WINDOW (f), |
XFillRectangle (FRAME_MAC_DISPLAY (f), FRAME_MAC_WINDOW (f), |
1479 |
&gcv, |
&gcv, |
1480 |
(left |
(left |
1481 |
- FRAME_X_LEFT_FLAGS_AREA_WIDTH (f) |
- FRAME_X_LEFT_FRINGE_WIDTH (f) |
1482 |
+ border), |
+ border), |
1483 |
WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height, |
WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height, |
1484 |
row->y)), |
row->y)), |
1485 |
FRAME_X_LEFT_FLAGS_AREA_WIDTH (f) - border, |
FRAME_X_LEFT_FRINGE_WIDTH (f) - border, |
1486 |
row->visible_height); |
row->visible_height); |
1487 |
} |
} |
1488 |
|
|
1489 |
} |
} |
1490 |
|
|
1491 |
/* Draw the left bitmap. */ |
/* Draw the left bitmap. */ |
1492 |
if (bitmap != NO_BITMAP) |
if (bitmap != NO_FRINGE_BITMAP) |
1493 |
x_draw_bitmap (w, row, bitmap); |
x_draw_fringe_bitmap (w, row, bitmap); |
1494 |
|
|
1495 |
/* Decide which bitmap to draw at the right side. */ |
/* Decide which bitmap to draw in the right fringe. */ |
1496 |
if (row->truncated_on_right_p) |
if (row->truncated_on_right_p) |
1497 |
bitmap = RIGHT_TRUNCATION_BITMAP; |
bitmap = RIGHT_TRUNCATION_BITMAP; |
1498 |
else if (row->continued_p) |
else if (row->continued_p) |
1499 |
bitmap = CONTINUED_LINE_BITMAP; |
bitmap = CONTINUED_LINE_BITMAP; |
1500 |
else |
else |
1501 |
bitmap = NO_BITMAP; |
bitmap = NO_FRINGE_BITMAP; |
1502 |
|
|
1503 |
/* Clear flags area if no bitmap to draw of if bitmap doesn't fill |
/* Clear right fringe if no bitmap to draw of if bitmap doesn't fill |
1504 |
the flags area. */ |
the fringe. */ |
1505 |
if (bitmap == NO_BITMAP |
if (bitmap == NO_FRINGE_BITMAP |
1506 |
|| FRAME_FLAGS_BITMAP_WIDTH (f) < FRAME_X_RIGHT_FLAGS_AREA_WIDTH (f) |
|| FRAME_FRINGE_BITMAP_WIDTH (f) < FRAME_X_RIGHT_FRINGE_WIDTH (f) |
1507 |
|| row->height > FRAME_FLAGS_BITMAP_HEIGHT (f)) |
|| row->height > FRAME_FRINGE_BITMAP_HEIGHT (f)) |
1508 |
{ |
{ |
1509 |
int right = window_box_right (w, -1); |
int right = window_box_right (w, -1); |
1510 |
|
|
1512 |
header_line_height = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (w); |
header_line_height = WINDOW_DISPLAY_HEADER_LINE_HEIGHT (w); |
1513 |
|
|
1514 |
#if 0 /* MAC_TODO: stipple */ |
#if 0 /* MAC_TODO: stipple */ |
1515 |
/* In case the same realized face is used for bitmap areas and |
/* In case the same realized face is used for fringes and |
1516 |
for something displayed in the text (e.g. face `region' on |
for something displayed in the text (e.g. face `region' on |
1517 |
mono-displays, the fill style may have been changed to |
mono-displays, the fill style may have been changed to |
1518 |
FillSolid in x_draw_glyph_string_background. */ |
FillSolid in x_draw_glyph_string_background. */ |
1525 |
right, |
right, |
1526 |
WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height, |
WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height, |
1527 |
row->y)), |
row->y)), |
1528 |
FRAME_X_RIGHT_FLAGS_AREA_WIDTH (f), |
FRAME_X_RIGHT_FRINGE_WIDTH (f), |
1529 |
row->visible_height); |
row->visible_height); |
1530 |
if (!face->stipple) |
if (!face->stipple) |
1531 |
XSetForeground (FRAME_X_DISPLAY (f), face->gc, face->foreground); |
XSetForeground (FRAME_X_DISPLAY (f), face->gc, face->foreground); |
1538 |
right, |
right, |
1539 |
WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height, |
WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height, |
1540 |
row->y)), |
row->y)), |
1541 |
FRAME_X_RIGHT_FLAGS_AREA_WIDTH (f), |
FRAME_X_RIGHT_FRINGE_WIDTH (f), |
1542 |
row->visible_height); |
row->visible_height); |
1543 |
} |
} |
1544 |
|
|
1545 |
} |
} |
1546 |
|
|
1547 |
/* Draw the right bitmap. */ |
/* Draw the right bitmap. */ |
1548 |
if (bitmap != NO_BITMAP) |
if (bitmap != NO_FRINGE_BITMAP) |
1549 |
x_draw_bitmap (w, row, bitmap); |
x_draw_fringe_bitmap (w, row, bitmap); |
1550 |
} |
} |
1551 |
|
|
1552 |
|
|
4143 |
if (s->row->full_width_p |
if (s->row->full_width_p |
4144 |
&& !s->w->pseudo_window_p) |
&& !s->w->pseudo_window_p) |
4145 |
{ |
{ |
4146 |
last_x += FRAME_X_RIGHT_FLAGS_AREA_WIDTH (s->f); |
last_x += FRAME_X_RIGHT_FRINGE_WIDTH (s->f); |
4147 |
if (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT (s->f)) |
if (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT (s->f)) |
4148 |
last_x += FRAME_SCROLL_BAR_WIDTH (s->f) * CANON_X_UNIT (s->f); |
last_x += FRAME_SCROLL_BAR_WIDTH (s->f) * CANON_X_UNIT (s->f); |
4149 |
} |
} |
5193 |
if (row->full_width_p) |
if (row->full_width_p) |
5194 |
{ |
{ |
5195 |
/* X is relative to the left edge of W, without scroll bars |
/* X is relative to the left edge of W, without scroll bars |
5196 |
or flag areas. */ |
or fringes. */ |
5197 |
struct frame *f = XFRAME (w->frame); |
struct frame *f = XFRAME (w->frame); |
5198 |
/* int width = FRAME_FLAGS_AREA_WIDTH (f); */ |
/* int width = FRAME_FRINGE_WIDTH (f); */ |
5199 |
int window_left_x = WINDOW_LEFT_MARGIN (w) * CANON_X_UNIT (f); |
int window_left_x = WINDOW_LEFT_MARGIN (w) * CANON_X_UNIT (f); |
5200 |
|
|
5201 |
x += window_left_x; |
x += window_left_x; |
5750 |
int x, y, width, height, from_y, to_y, bottom_y; |
int x, y, width, height, from_y, to_y, bottom_y; |
5751 |
|
|
5752 |
/* Get frame-relative bounding box of the text display area of W, |
/* Get frame-relative bounding box of the text display area of W, |
5753 |
without mode lines. Include in this box the flags areas to the |
without mode lines. Include in this box the left and right |
5754 |
left and right of W. */ |
fringes of W. */ |
5755 |
window_box (w, -1, &x, &y, &width, &height); |
window_box (w, -1, &x, &y, &width, &height); |
5756 |
width += FRAME_X_FLAGS_AREA_WIDTH (f); |
width += FRAME_X_FRINGE_WIDTH (f); |
5757 |
x -= FRAME_X_LEFT_FLAGS_AREA_WIDTH (f); |
x -= FRAME_X_LEFT_FRINGE_WIDTH (f); |
5758 |
|
|
5759 |
from_y = WINDOW_TO_FRAME_PIXEL_Y (w, run->current_y); |
from_y = WINDOW_TO_FRAME_PIXEL_Y (w, run->current_y); |
5760 |
to_y = WINDOW_TO_FRAME_PIXEL_Y (w, run->desired_y); |
to_y = WINDOW_TO_FRAME_PIXEL_Y (w, run->desired_y); |
5922 |
&window_height); |
&window_height); |
5923 |
window_rect.left |
window_rect.left |
5924 |
= (window_x |
= (window_x |
5925 |
- FRAME_X_LEFT_FLAGS_AREA_WIDTH (f) |
- FRAME_X_LEFT_FRINGE_WIDTH (f) |
5926 |
- FRAME_LEFT_SCROLL_BAR_WIDTH (f) * CANON_Y_UNIT (f)); |
- FRAME_LEFT_SCROLL_BAR_WIDTH (f) * CANON_Y_UNIT (f)); |
5927 |
window_rect.top = window_y; |
window_rect.top = window_y; |
5928 |
window_rect.right = window_rect.left |
window_rect.right = window_rect.left |
5929 |
+ (window_width |
+ (window_width |
5930 |
+ FRAME_X_FLAGS_AREA_WIDTH (f) |
+ FRAME_X_FRINGE_WIDTH (f) |
5931 |
+ FRAME_SCROLL_BAR_WIDTH (f) * CANON_X_UNIT (f)); |
+ FRAME_SCROLL_BAR_WIDTH (f) * CANON_X_UNIT (f)); |
5932 |
window_rect.bottom = window_rect.top |
window_rect.bottom = window_rect.top |
5933 |
+ window_height + CURRENT_MODE_LINE_HEIGHT (w); |
+ window_height + CURRENT_MODE_LINE_HEIGHT (w); |
6028 |
expose_area (w, row, r, TEXT_AREA); |
expose_area (w, row, r, TEXT_AREA); |
6029 |
if (row->used[RIGHT_MARGIN_AREA]) |
if (row->used[RIGHT_MARGIN_AREA]) |
6030 |
expose_area (w, row, r, RIGHT_MARGIN_AREA); |
expose_area (w, row, r, RIGHT_MARGIN_AREA); |
6031 |
x_draw_row_bitmaps (w, row); |
x_draw_row_fringe_bitmaps (w, row); |
6032 |
} |
} |
6033 |
} |
} |
6034 |
|
|
6752 |
/* Take proper action when mouse has moved to the mode or top line of |
/* Take proper action when mouse has moved to the mode or top line of |
6753 |
window W, x-position X. MODE_LINE_P non-zero means mouse is on the |
window W, x-position X. MODE_LINE_P non-zero means mouse is on the |
6754 |
mode line. X is relative to the start of the text display area of |
mode line. X is relative to the start of the text display area of |
6755 |
W, so the width of bitmap areas and scroll bars must be subtracted |
W, so the width of fringes and scroll bars must be subtracted |
6756 |
to get a position relative to the start of the mode line. */ |
to get a position relative to the start of the mode line. */ |
6757 |
|
|
6758 |
static void |
static void |
6780 |
glyph = row->glyphs[TEXT_AREA]; |
glyph = row->glyphs[TEXT_AREA]; |
6781 |
end = glyph + row->used[TEXT_AREA]; |
end = glyph + row->used[TEXT_AREA]; |
6782 |
x0 = - (FRAME_LEFT_SCROLL_BAR_WIDTH (f) * CANON_X_UNIT (f) |
x0 = - (FRAME_LEFT_SCROLL_BAR_WIDTH (f) * CANON_X_UNIT (f) |
6783 |
+ FRAME_X_LEFT_FLAGS_AREA_WIDTH (f)); |
+ FRAME_X_LEFT_FRINGE_WIDTH (f)); |
6784 |
while (glyph < end |
while (glyph < end |
6785 |
&& x >= x0 + glyph->pixel_width) |
&& x >= x0 + glyph->pixel_width) |
6786 |
{ |
{ |
8281 |
the rectangle to the left and increase its width. */ |
the rectangle to the left and increase its width. */ |
8282 |
if (whole_line_p) |
if (whole_line_p) |
8283 |
{ |
{ |
8284 |
clip_rect.left -= FRAME_X_LEFT_FLAGS_AREA_WIDTH (f); |
clip_rect.left -= FRAME_X_LEFT_FRINGE_WIDTH (f); |
8285 |
clip_rect.right += FRAME_X_FLAGS_AREA_WIDTH (f); |
clip_rect.right += FRAME_X_FRINGE_WIDTH (f); |
8286 |
} |
} |
8287 |
|
|
8288 |
mac_set_clip_rectangle (FRAME_MAC_DISPLAY (f), FRAME_MAC_WINDOW (f), &clip_rect); |
mac_set_clip_rectangle (FRAME_MAC_DISPLAY (f), FRAME_MAC_WINDOW (f), &clip_rect); |
9514 |
: FRAME_SCROLL_BAR_PIXEL_WIDTH (f) > 0 |
: FRAME_SCROLL_BAR_PIXEL_WIDTH (f) > 0 |
9515 |
? FRAME_SCROLL_BAR_PIXEL_WIDTH (f) |
? FRAME_SCROLL_BAR_PIXEL_WIDTH (f) |
9516 |
: (FRAME_SCROLL_BAR_COLS (f) * FONT_WIDTH (f->output_data.mac->font))); |
: (FRAME_SCROLL_BAR_COLS (f) * FONT_WIDTH (f->output_data.mac->font))); |
9517 |
f->output_data.mac->flags_areas_extra |
f->output_data.mac->fringes_extra |
9518 |
= FRAME_FLAGS_AREA_WIDTH (f); |
= FRAME_FRINGE_WIDTH (f); |
9519 |
pixelwidth = CHAR_TO_PIXEL_WIDTH (f, cols); |
pixelwidth = CHAR_TO_PIXEL_WIDTH (f, cols); |
9520 |
pixelheight = CHAR_TO_PIXEL_HEIGHT (f, rows); |
pixelheight = CHAR_TO_PIXEL_HEIGHT (f, rows); |
9521 |
|
|