Resorted; add some missing Morohashi's Daikanwa characters; add
[chise/xemacs-chise.git] / src / redisplay-msw.c
index 9af4b5e..f53553e 100644 (file)
@@ -49,7 +49,7 @@ Boston, MA 02111-1307, USA.  */
 
 #ifdef MULE
 #include "mule-ccl.h"
-#include "mule-charset.h"
+#include "character.h"
 #endif
 
 #define MSWINDOWS_EOL_CURSOR_WIDTH     5
@@ -957,22 +957,37 @@ mswindows_eol_cursor_width (void)
 }
 
 /*****************************************************************************
- mswindows_output_begin
+ mswindows_frame_output_begin
 
  Perform any necessary initialization prior to an update.
  ****************************************************************************/
 static void
-mswindows_output_begin (struct device *d)
+mswindows_frame_output_begin (struct frame *f)
 {
 }
 
 /*****************************************************************************
- mswindows_output_end
+ mswindows_frame_output_end
 
  Perform any necessary flushing of queues when an update has completed.
  ****************************************************************************/
 static void
-mswindows_output_end (struct device *d)
+mswindows_frame_output_end (struct frame *f)
+{
+  HDWP hdwp = FRAME_MSWINDOWS_DATA (f)->hdwp;
+
+  if (hdwp != 0)
+    {
+      EndDeferWindowPos (hdwp);
+      FRAME_MSWINDOWS_DATA (f)->hdwp = 0;
+    }
+
+  GdiFlush();
+}
+
+/* Printer version is more lightweight. */
+static void
+msprinter_frame_output_end (struct frame *f)
 {
   GdiFlush();
 }
@@ -1157,8 +1172,19 @@ mswindows_output_display_block (struct window *w, struct display_line *dl, int b
                                                 findex, 0, 1);
                      break;
                      
-                   case IMAGE_SUBWINDOW:
                    case IMAGE_WIDGET:
+                     if (EQ (XIMAGE_INSTANCE_WIDGET_TYPE (instance),
+                             Qlayout))
+                       {
+                         redisplay_output_layout (w, instance, &dbox, &dga, findex,
+                                                  cursor_start, cursor_width,
+                                                  cursor_height);
+                         if (rb->cursor_type == CURSOR_ON)
+                           mswindows_output_cursor (w, dl, xpos, cursor_width,
+                                                    findex, 0, 1);
+                         break;
+                       }
+                   case IMAGE_SUBWINDOW:
                      redisplay_output_subwindow (w, instance, &dbox, &dga, findex,
                                                  cursor_start, cursor_width,
                                                  cursor_height);
@@ -1167,15 +1193,6 @@ mswindows_output_display_block (struct window *w, struct display_line *dl, int b
                                                 findex, 0, 1);
                      break;
                      
-                   case IMAGE_LAYOUT:
-                     redisplay_output_layout (w, instance, &dbox, &dga, findex,
-                                              cursor_start, cursor_width,
-                                              cursor_height);
-                     if (rb->cursor_type == CURSOR_ON)
-                       mswindows_output_cursor (w, dl, xpos, cursor_width,
-                                                findex, 0, 1);
-                     break;
-                     
                    case IMAGE_NOTHING:
                      /* nothing is as nothing does */
                      break;
@@ -1358,8 +1375,8 @@ console_type_create_redisplay_mswindows (void)
   CONSOLE_HAS_METHOD (mswindows, output_vertical_divider);
   CONSOLE_HAS_METHOD (mswindows, clear_region);
   CONSOLE_HAS_METHOD (mswindows, clear_frame);
-  CONSOLE_HAS_METHOD (mswindows, output_begin);
-  CONSOLE_HAS_METHOD (mswindows, output_end);
+  CONSOLE_HAS_METHOD (mswindows, frame_output_begin);
+  CONSOLE_HAS_METHOD (mswindows, frame_output_end);
   CONSOLE_HAS_METHOD (mswindows, flash);
   CONSOLE_HAS_METHOD (mswindows, ring_bell);
   CONSOLE_HAS_METHOD (mswindows, bevel_area);
@@ -1367,6 +1384,7 @@ console_type_create_redisplay_mswindows (void)
   CONSOLE_HAS_METHOD (mswindows, output_pixmap);
 
   /* redisplay methods - printer */
+  CONSOLE_HAS_METHOD (msprinter, frame_output_end);
   CONSOLE_INHERITS_METHOD (msprinter, mswindows, text_width);
   CONSOLE_INHERITS_METHOD (msprinter, mswindows, output_display_block);
   CONSOLE_INHERITS_METHOD (msprinter, mswindows, divider_height);
@@ -1374,8 +1392,7 @@ console_type_create_redisplay_mswindows (void)
   CONSOLE_INHERITS_METHOD (msprinter, mswindows, output_vertical_divider);
   CONSOLE_INHERITS_METHOD (msprinter, mswindows, clear_region);
   CONSOLE_INHERITS_METHOD (msprinter, mswindows, clear_frame);
-  CONSOLE_INHERITS_METHOD (msprinter, mswindows, output_begin);
-  CONSOLE_INHERITS_METHOD (msprinter, mswindows, output_end);
+  CONSOLE_INHERITS_METHOD (msprinter, mswindows, frame_output_begin);
   CONSOLE_INHERITS_METHOD (msprinter, mswindows, bevel_area);
   CONSOLE_INHERITS_METHOD (msprinter, mswindows, output_string);
   CONSOLE_INHERITS_METHOD (msprinter, mswindows, output_pixmap);