Merge r21-4-11-chise-0_20-=ucs.
[chise/xemacs-chise.git.1] / src / redisplay.h
index 4f5e6b1..88d272f 100644 (file)
@@ -25,6 +25,8 @@ Boston, MA 02111-1307, USA.  */
 #ifndef INCLUDED_redisplay_h_
 #define INCLUDED_redisplay_h_
 
+#include "character.h"
+
 /* Redisplay DASSERT types */
 #define DB_DISP_POS            1
 #define DB_DISP_TEXT_LAYOUT    2
@@ -137,7 +139,7 @@ struct rune
 
   union                                /* Information specific to the type of rune */
   {
-    /* #### GLyps are are. Is it really necessary to waste 8 bytes on every
+    /* #### Glyphs are rare. Is it really necessary to waste 8 bytes on every
        rune for that?! */
     /* DGLYPH */
     struct
@@ -147,6 +149,9 @@ struct rune
                                    If this is a rune in the modeline
                                    then this might be nil. */
 
+      int ascent;               /* Ascent of this glyph, in pixels. */
+      int descent;              /* Descent of this glyph, in pixels. */
+      int yoffset;              /* Offset from line top to reach glyph top */
       int xoffset;             /* Number of pixels that need to be
                                   chopped off the left of the glyph.
                                   This has the effect of shifting the
@@ -155,10 +160,7 @@ struct rune
     } dglyph;
 
     /* CHAR */
-    struct
-    {
-      Emchar ch;               /* Character of this rune. */
-    } chr;
+    struct Charc cglyph;       /* Character of this rune. */
 
     /* HLINE */
     struct
@@ -272,7 +274,7 @@ typedef struct
   to the things that are being displayed, and the context,
   e.g. buffers and windows. According to Chuck this is so that we can
   get speed, which seems fine to me, however this usage is extended
-  too far down the redispay routines IMO. At some level there should
+  too far down the redisplay routines IMO. At some level there should
   be functions that know how to display strings with extents and
   faces, regardless of buffer etc. After all the window system does
   not care. <andy@xemacs.org> */
@@ -477,6 +479,10 @@ extern int size_changed;
 /* Nonzero if some device has signaled that it wants to change size. */
 extern int asynch_device_change_pending;
 
+/* Nonzero if some frame has changed the layout of internal elements
+   (gutters or toolbars). */
+extern int frame_layout_changed;
+
 /* Nonzero if any toolbar has changed. */
 extern int toolbar_changed;
 extern int toolbar_changed_set;
@@ -536,6 +542,7 @@ extern int windows_structure_changed;
   (p)->extents_changed = 0;                    \
   (p)->faces_changed = 0;                      \
   (p)->frame_changed = 0;                      \
+  (p)->frame_layout_changed = 0;               \
   (p)->icon_changed = 0;                       \
   (p)->menubar_changed = 0;                    \
   (p)->modeline_changed = 0;                   \
@@ -554,6 +561,7 @@ extern int windows_structure_changed;
   clip_changed = 0;                            \
   extents_changed = 0;                         \
   frame_changed = 0;                           \
+  frame_layout_changed = 0;                    \
   icon_changed = 0;                            \
   menubar_changed = 0;                         \
   modeline_changed = 0;                                \
@@ -573,6 +581,7 @@ extern int windows_structure_changed;
     (p)->extents_changed ||                    \
     (p)->faces_changed ||                      \
     (p)->frame_changed ||                      \
+    (p)->frame_layout_changed ||               \
     (p)->icon_changed ||                       \
     (p)->menubar_changed ||                    \
     (p)->modeline_changed ||                   \
@@ -592,6 +601,7 @@ extern int windows_structure_changed;
     extents_changed ||                         \
     faces_changed ||                           \
     frame_changed ||                           \
+    frame_layout_changed ||                    \
     icon_changed ||                            \
     menubar_changed ||                         \
     modeline_changed ||                                \
@@ -751,7 +761,7 @@ int compute_line_start_cache_dynarr_usage (line_start_cache_dynarr *dyn,
 int get_next_display_block (layout_bounds bounds,
                            display_block_dynarr *dba, int start_pos,
                            int *next_start);
-void redisplay_output_layout (struct window *w,
+void redisplay_output_layout (Lisp_Object domain,
                              Lisp_Object image_instance,
                              struct display_box* db, struct display_glyph_area* dga,
                              face_index findex, int cursor_start, int cursor_width,
@@ -768,14 +778,15 @@ void redisplay_output_pixmap (struct window *w,
                              face_index findex, int cursor_start, int cursor_width,
                              int cursor_height, int offset_bitmap);
 int redisplay_calculate_display_boxes (struct display_line *dl, int xpos,
-                                      int xoffset, int start_pixpos, int width,
-                                      struct display_box* dest,
+                                      int xoffset, int yoffset, int start_pixpos,
+                                       int width, struct display_box* dest,
                                       struct display_glyph_area* src);
 int redisplay_normalize_glyph_area (struct display_box* dest,
                                    struct display_glyph_area* glyphsrc);
 void redisplay_clear_to_window_end (struct window *w, int ypos1, int ypos2);
 void redisplay_clear_region (Lisp_Object window, face_index findex, int x,
                             int y, int width, int height);
+void redisplay_clear_top_of_window (struct window *w);
 void redisplay_clear_bottom_of_window (struct window *w,
                                       display_line_dynarr *ddla,
                                       int min_start, int max_end);