Mercurial > hg > xemacs-beta
comparison src/redisplay-output.c @ 446:1ccc32a20af4 r21-2-38
Import from CVS: tag r21-2-38
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:37:21 +0200 |
parents | abe6d1db359e |
children | 3078fd1074e8 |
comparison
equal
deleted
inserted
replaced
445:34f3776fcf0e | 446:1ccc32a20af4 |
---|---|
38 #include "frame.h" | 38 #include "frame.h" |
39 #include "device.h" | 39 #include "device.h" |
40 #include "glyphs.h" | 40 #include "glyphs.h" |
41 #include "redisplay.h" | 41 #include "redisplay.h" |
42 #include "faces.h" | 42 #include "faces.h" |
43 #include "gutter.h" | |
43 | 44 |
44 static int compare_runes (struct window *w, struct rune *crb, | 45 static int compare_runes (struct window *w, struct rune *crb, |
45 struct rune *drb); | 46 struct rune *drb); |
46 static void redraw_cursor_in_window (struct window *w, | 47 static void redraw_cursor_in_window (struct window *w, |
47 int run_end_begin_glyphs); | 48 int run_end_begin_glyphs); |
1261 sdga.xoffset = -dga->xoffset; | 1262 sdga.xoffset = -dga->xoffset; |
1262 sdga.yoffset = -dga->yoffset; | 1263 sdga.yoffset = -dga->yoffset; |
1263 sdga.height = IMAGE_INSTANCE_HEIGHT (p); | 1264 sdga.height = IMAGE_INSTANCE_HEIGHT (p); |
1264 sdga.width = IMAGE_INSTANCE_WIDTH (p); | 1265 sdga.width = IMAGE_INSTANCE_WIDTH (p); |
1265 | 1266 |
1266 if (redisplay_display_boxes_in_window_p (w, db, &sdga) < 0) | 1267 if (redisplay_display_boxes_in_window_p (w, db, &sdga) == 0 |
1268 || | |
1269 /* We only want to do full subwindow display for windows that | |
1270 are completely in the gutter, otherwise we must clip to be | |
1271 safe. */ | |
1272 display_boxes_in_gutter_p (XFRAME (w->frame), db, &sdga) <= 0) | |
1267 { | 1273 { |
1268 map_subwindow (image_instance, db->xpos, db->ypos, dga); | 1274 map_subwindow (image_instance, db->xpos, db->ypos, dga); |
1269 } | 1275 } |
1270 else | 1276 else |
1271 { | 1277 { |
1820 } | 1826 } |
1821 | 1827 |
1822 /***************************************************************************** | 1828 /***************************************************************************** |
1823 redisplay_display_boxes_in_window_p | 1829 redisplay_display_boxes_in_window_p |
1824 | 1830 |
1825 Determine whether the require display_glyph_area is completely inside | 1831 Determine whether the required display_glyph_area is completely inside |
1826 the window. 0 means the display_box is not in the window. 1 means the | 1832 the window. -1 means the display_box is not in the window. 1 means the |
1827 display_box and the display_glyph_area are in the window. -1 means | 1833 display_box and the display_glyph_area are in the window. 0 means |
1828 the display_box is in the window but the display_glyph_area is not. | 1834 the display_box is in the window but the display_glyph_area is not. |
1829 ****************************************************************************/ | 1835 ****************************************************************************/ |
1830 static int | 1836 static int |
1831 redisplay_display_boxes_in_window_p (struct window* w, | 1837 redisplay_display_boxes_in_window_p (struct window* w, |
1832 struct display_box* db, | 1838 struct display_box* db, |
1838 int bottom = WINDOW_TEXT_BOTTOM (w); | 1844 int bottom = WINDOW_TEXT_BOTTOM (w); |
1839 | 1845 |
1840 if (db->xpos < left || db->ypos < top | 1846 if (db->xpos < left || db->ypos < top |
1841 || db->xpos + db->width > right | 1847 || db->xpos + db->width > right |
1842 || db->ypos + db->height > bottom) | 1848 || db->ypos + db->height > bottom) |
1843 /* We are not displaying in a window at all */ | 1849 /* We are not displaying in a window at all */ |
1844 return 0; | 1850 return -1; |
1845 | 1851 |
1846 if (db->xpos + dga->xoffset >= left | 1852 if (db->xpos + dga->xoffset >= left |
1847 && | 1853 && |
1848 db->ypos + dga->yoffset >= top | 1854 db->ypos + dga->yoffset >= top |
1849 && | 1855 && |
1850 db->xpos + dga->xoffset + dga->width <= right | 1856 db->xpos + dga->xoffset + dga->width <= right |
1851 && | 1857 && |
1852 db->ypos + dga->yoffset + dga->height <= bottom) | 1858 db->ypos + dga->yoffset + dga->height <= bottom) |
1853 return 1; | 1859 return 1; |
1854 | 1860 |
1855 return -1; | 1861 return 0; |
1856 } | 1862 } |
1857 | 1863 |
1858 /***************************************************************************** | 1864 /***************************************************************************** |
1859 redisplay_calculate_display_boxes | 1865 redisplay_calculate_display_boxes |
1860 | 1866 |