Mercurial > hg > xemacs-beta
comparison src/gutter.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 | 576fb035e263 |
children | 0784d089fdc9 |
comparison
equal
deleted
inserted
replaced
445:34f3776fcf0e | 446:1ccc32a20af4 |
---|---|
216 default: | 216 default: |
217 abort (); | 217 abort (); |
218 } | 218 } |
219 } | 219 } |
220 | 220 |
221 /* | |
222 display_boxes_in_gutter_p | |
223 | |
224 Determine whether the required display_glyph_area is completely | |
225 inside the gutter. -1 means the display_box is not in the gutter. 1 | |
226 means the display_box and the display_glyph_area are in the | |
227 window. 0 means the display_box is in the gutter but the | |
228 display_glyph_area is not. */ | |
229 int display_boxes_in_gutter_p (struct frame *f, struct display_box* db, | |
230 struct display_glyph_area* dga) | |
231 { | |
232 enum gutter_pos pos; | |
233 GUTTER_POS_LOOP (pos) | |
234 { | |
235 if (FRAME_GUTTER_VISIBLE (f, pos)) | |
236 { | |
237 int x, y, width, height; | |
238 get_gutter_coords (f, pos, &x, &y, &width, &height); | |
239 if (db->xpos + dga->xoffset >= x | |
240 && | |
241 db->ypos + dga->yoffset >= y | |
242 && | |
243 db->xpos + dga->xoffset + dga->width <= x + width | |
244 && | |
245 db->ypos + dga->yoffset + dga->height <= y + height) | |
246 return 1; | |
247 else if (db->xpos >= x && db->ypos >= y | |
248 && db->xpos + db->width <= x + width | |
249 && db->ypos + db->height <= y + height) | |
250 return 0; | |
251 } | |
252 } | |
253 return -1; | |
254 } | |
255 | |
221 /* Convert the gutter specifier into something we can actually | 256 /* Convert the gutter specifier into something we can actually |
222 display. */ | 257 display. */ |
223 static Lisp_Object construct_window_gutter_spec (struct window* w, | 258 static Lisp_Object construct_window_gutter_spec (struct window* w, |
224 enum gutter_pos pos) | 259 enum gutter_pos pos) |
225 { | 260 { |
387 w->windows_changed || f->windows_structure_changed || | 422 w->windows_changed || f->windows_structure_changed || |
388 cdla_len != Dynarr_length (ddla) || | 423 cdla_len != Dynarr_length (ddla) || |
389 (f->extents_changed && w->gutter_extent_modiff[pos])) | 424 (f->extents_changed && w->gutter_extent_modiff[pos])) |
390 { | 425 { |
391 #ifdef DEBUG_GUTTERS | 426 #ifdef DEBUG_GUTTERS |
392 printf ("gutter redisplay triggered by %s\n", force ? "force" : | 427 printf ("gutter redisplay [%dx%d@%d+%d] triggered by %s,\n", |
428 width, height, x, y, force ? "force" : | |
393 f->faces_changed ? "f->faces_changed" : | 429 f->faces_changed ? "f->faces_changed" : |
394 f->frame_changed ? "f->frame_changed" : | 430 f->frame_changed ? "f->frame_changed" : |
395 f->gutter_changed ? "f->gutter_changed" : | 431 f->gutter_changed ? "f->gutter_changed" : |
396 f->glyphs_changed ? "f->glyphs_changed" : | 432 f->glyphs_changed ? "f->glyphs_changed" : |
397 f->size_changed ? "f->size_changed" : | 433 f->size_changed ? "f->size_changed" : |