diff src/redisplay-output.c @ 388:aabb7f5b1c81 r21-2-9

Import from CVS: tag r21-2-9
author cvs
date Mon, 13 Aug 2007 11:09:42 +0200
parents bbff43aa5eb7
children 74fd4e045ea6
line wrap: on
line diff
--- a/src/redisplay-output.c	Mon Aug 13 11:08:51 2007 +0200
+++ b/src/redisplay-output.c	Mon Aug 13 11:09:42 2007 +0200
@@ -41,6 +41,10 @@
 			  struct rune *drb);
 static void redraw_cursor_in_window (struct window *w,
 				     int run_end_begin_glyphs);
+static void redisplay_output_display_block (struct window *w, struct display_line *dl,
+					    int block, int start, int end, int start_pixpos,
+					    int cursor_start, int cursor_width, 
+					    int cursor_height);
 
 /*****************************************************************************
  sync_rune_structs
@@ -302,8 +306,6 @@
 			int cursor_height)
 {
   struct frame *f = XFRAME (w->frame);
-  struct device *d = XDEVICE (f->device);
-
   struct display_block *cdb, *ddb;
   int start_pos;
   int stop_pos;
@@ -413,10 +415,10 @@
 	  stop_pos = elt + 1;
 	}
 
-      DEVMETH (d, output_display_block, (w, ddl, d_block, start_pos,
-					 stop_pos, start_pixpos,
-					 cursor_start, cursor_width,
-					 cursor_height));
+      redisplay_output_display_block (w, ddl, d_block, start_pos,
+				      stop_pos, start_pixpos,
+				      cursor_start, cursor_width,
+				      cursor_height);
       return 1;
     }
 
@@ -471,7 +473,6 @@
 
 {
   struct frame *f = XFRAME (w->frame);
-  struct device *d = XDEVICE (f->device);
   struct buffer *b = XBUFFER (w->buffer);
   struct buffer *old_b = window_display_buffer (w);
   struct display_line *cdl, *ddl;
@@ -542,8 +543,8 @@
 	}
       else
 	{
-	  DEVMETH (d, output_display_block, (w, ddl, 0, 0, -1, start_pixpos,
-					     0, 0, 0));
+	  redisplay_output_display_block (w, ddl, 0, 0, -1, start_pixpos,
+					  0, 0, 0);
 	  must_sync = 1;
 	}
 
@@ -679,13 +680,13 @@
 		}
 
 	      must_sync = 1;
-	      DEVMETH (d, output_display_block, (w, ddl, block, first_elt,
-						 last_elt,
-						 start_pixpos,
-						 cursor_start, cursor_width,
-						 cursor_height));
+	      redisplay_output_display_block (w, ddl, block, first_elt,
+					      last_elt,
+					      start_pixpos,
+					      cursor_start, cursor_width,
+					      cursor_height);
 	    }
-
+	  
 	  start_pixpos = next_start_pixpos;
 	}
     }
@@ -982,6 +983,26 @@
 }
 
 /****************************************************************************
+ redisplay_output_display_block
+
+ Given a display line, a block number for that start line, output all
+ runes between start and end in the specified display block.
+ ****************************************************************************/
+static void
+redisplay_output_display_block (struct window *w, struct display_line *dl, int block,
+				int start, int end, int start_pixpos, int cursor_start,
+				int cursor_width, int cursor_height)
+{
+  struct frame *f = XFRAME (w->frame);
+  struct device *d = XDEVICE (f->device);
+
+  DEVMETH (d, output_display_block, (w, dl, block, start,
+				     end, start_pixpos,
+				     cursor_start, cursor_width,
+				     cursor_height));
+}
+  
+/****************************************************************************
  redisplay_unmap_subwindows
 
  Remove subwindows from the area in the box defined by the given
@@ -1008,6 +1029,20 @@
 }
 
 /****************************************************************************
+ redisplay_unmap_subwindows_maybe
+
+ Potentially subwindows from the area in the box defined by the given
+ parameters.
+ ****************************************************************************/
+void redisplay_unmap_subwindows_maybe (struct frame* f, int x, int y, int width, int height)
+{
+  if (Dynarr_length (FRAME_SUBWINDOW_CACHE (f)))
+    {
+      redisplay_unmap_subwindows (f, x, y, width, height);
+    }
+}
+
+/****************************************************************************
  redisplay_output_subwindow