XEmacs 21.2.28 "Hermes".
[chise/xemacs-chise.git.1] / src / redisplay.h
index 96e2e92..648dea8 100644 (file)
@@ -22,8 +22,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Synched up with: Not in FSF. */
 
-#ifndef _XEMACS_REDISPLAY_H_
-#define _XEMACS_REDISPLAY_H_
+#ifndef INCLUDED_redisplay_h_
+#define INCLUDED_redisplay_h_
 
 /* Redisplay DASSERT types */
 #define DB_DISP_POS            1
@@ -91,6 +91,13 @@ typedef struct
    but control characters have two -- a ^ and a letter -- and other
    non-printing characters (those displayed in octal) have four. */
 
+/* WARNING! In compare_runes (one of the most heavily used functions)
+   two runes are compared. So please be careful with changes to this
+   structure. See comments in compare_runes.
+
+   #### This should really be made smaller.
+*/
+
 typedef struct rune rune;
 struct rune
 {
@@ -105,10 +112,6 @@ struct rune
                                   each of the face properties in this
                                   particular window. */
 
-  short xpos;                  /* horizontal starting position in pixels */
-  short width;                 /* pixel width of rune */
-
-
   Bufpos bufpos;               /* buffer position this rune is displaying;
                                   for the modeline, the value here is a
                                   Charcount, but who's looking? */
@@ -116,11 +119,26 @@ struct rune
                                /* #### Chuck, what does it mean for a rune
                                   to cover a range of pos?  I don't get
                                   this. */
-  unsigned int cursor_type :3; /* is this rune covered by the cursor? */
-  unsigned int type :3;                /* type of rune object */
+                                /* #### This isn't used as an rvalue anywhere!
+                                   remove! */
+
+
+  short xpos;                  /* horizontal starting position in pixels */
+  short width;                 /* pixel width of rune */
+
+
+  unsigned char cursor_type;   /* is this rune covered by the cursor? */
+  unsigned char type;          /* type of rune object */
+                                /* We used to do bitfields here, but if I
+                                   (JV) count correctly that doesn't matter
+                                   for the size of the structure. All the bit
+                                   fiddling _does_ slow down redisplay by
+                                   about 10%. So don't do that */
 
   union                                /* Information specific to the type of rune */
   {
+    /* #### GLyps are are. Is it really necessary to waste 8 bytes on every
+       rune for that?! */
     /* DGLYPH */
     struct
     {
@@ -542,7 +560,7 @@ extern int windows_structure_changed;
   gutter_changed = 0;                          \
   glyphs_changed = 0;                          \
   subwindows_changed = 0;                      \
-  subwindows_state_changed = 0;                        \
+  subwindows_state_changed = 0;                \
   windows_changed = 0;                         \
   windows_structure_changed = 0;               \
 } while (0)
@@ -560,6 +578,7 @@ extern int windows_structure_changed;
     (p)->toolbar_changed ||                    \
     (p)->gutter_changed ||                     \
     (p)->glyphs_changed ||                     \
+    (p)->size_changed ||                               \
     (p)->subwindows_changed ||                 \
     (p)->subwindows_state_changed ||           \
     (p)->windows_changed ||                    \
@@ -578,6 +597,7 @@ extern int windows_structure_changed;
     toolbar_changed ||                         \
     gutter_changed ||                          \
     glyphs_changed ||                          \
+    size_changed ||                            \
     subwindows_changed ||                      \
     subwindows_state_changed ||                        \
     windows_changed ||                         \
@@ -676,13 +696,18 @@ int window_half_pixpos (struct window *w);
 void redisplay_echo_area (void);
 void free_display_structs (struct window_mirror *mir);
 void free_display_lines (display_line_dynarr *dla);
-Bufbyte *generate_formatted_string (struct window *w, Lisp_Object format_str,
-                                    Lisp_Object result_str, face_index findex,
-                                    int type);
 void generate_displayable_area (struct window *w, Lisp_Object disp_string,
                                int xpos, int ypos, int width, int height,
                                display_line_dynarr* dl,
                                Bufpos start_pos, face_index default_face);
+/* `generate_title_string' in frame.c needs this */
+void generate_formatted_string_db (Lisp_Object format_str,
+                                  Lisp_Object result_str,
+                                  struct window *w,
+                                  struct display_line *dl,
+                                  struct display_block *db,
+                                  face_index findex,
+                                  int min_pixpos, int max_pixpos, int type);
 int real_current_modeline_height (struct window *w);
 int pixel_to_glyph_translation (struct frame *f, int x_coord,
                                int y_coord, int *col, int *row,
@@ -759,4 +784,4 @@ void output_display_line (struct window *w, display_line_dynarr *cdla,
                          display_line_dynarr *ddla, int line,
                          int force_start, int force_end);
 
-#endif /* _XEMACS_REDISPLAY_H_ */
+#endif /* INCLUDED_redisplay_h_ */