]> code.delx.au - gnu-emacs/blobdiff - src/dispextern.h
Auto-commit of generated files.
[gnu-emacs] / src / dispextern.h
index e91403bce6861c0ecb668a78860397e86dc9827a..681eba25cb3d399e8ad18708ef28de5f34ad2b5f 100644 (file)
@@ -49,12 +49,9 @@ typedef struct {
 #endif
 
 INLINE_HEADER_BEGIN
-#ifndef DISPEXTERN_INLINE
-# define DISPEXTERN_INLINE INLINE
-#endif
 
 #include <c-strcase.h>
-DISPEXTERN_INLINE int
+INLINE int
 xstrcasecmp (char const *a, char const *b)
 {
   return c_strcasecmp (a, b);
@@ -289,10 +286,10 @@ typedef struct {
 } GLYPH;
 
 /* Return a glyph's character code.  */
-DISPEXTERN_INLINE int GLYPH_CHAR (GLYPH glyph) { return glyph.ch; }
+INLINE int GLYPH_CHAR (GLYPH glyph) { return glyph.ch; }
 
 /* Return a glyph's face ID.  */
-DISPEXTERN_INLINE int GLYPH_FACE (GLYPH glyph) { return glyph.face_id; }
+INLINE int GLYPH_FACE (GLYPH glyph) { return glyph.face_id; }
 
 #define SET_GLYPH_CHAR(glyph, char) ((glyph).ch = (char))
 #define SET_GLYPH_FACE(glyph, face) ((glyph).face_id = (face))
@@ -301,7 +298,7 @@ DISPEXTERN_INLINE int GLYPH_FACE (GLYPH glyph) { return glyph.face_id; }
 
 /* The following are valid only if GLYPH_CODE_P (gc).  */
 
-DISPEXTERN_INLINE int
+INLINE int
 GLYPH_CODE_CHAR (Lisp_Object gc)
 {
   return (CONSP (gc)
@@ -309,7 +306,7 @@ GLYPH_CODE_CHAR (Lisp_Object gc)
          : XINT (gc) & MAX_CHAR);
 }
 
-DISPEXTERN_INLINE int
+INLINE int
 GLYPH_CODE_FACE (Lisp_Object gc)
 {
   return CONSP (gc) ? XINT (XCDR (gc)) : XINT (gc) >> CHARACTERBITS;
@@ -795,7 +792,10 @@ enum glyph_row_area
    Rows in window matrices on frames having no frame matrices point to
    glyphs allocated from the heap via xmalloc;
    glyphs[LEFT_MARGIN_AREA] is the start address of the allocated
-   glyph structure array.  */
+   glyph structure array.
+
+   NOTE: layout of first four members of this structure is important,
+   see clear_glyph_row and copy_row_except_pointers to check why.  */
 
 struct glyph_row
 {
@@ -815,8 +815,13 @@ struct glyph_row
      removed some day, so don't use it in new code.  */
   struct glyph *glyphs[1 + LAST_AREA];
 
-  /* Number of glyphs actually filled in areas.  */
-  short used[LAST_AREA];
+  /* Number of glyphs actually filled in areas.  This could have size
+     LAST_AREA, but it's 1 + LAST_AREA to simplify offset calculations.  */
+  short used[1 + LAST_AREA];
+
+  /* Hash code.  This hash code is available as soon as the row
+     is constructed, i.e. after a call to display_line.  */
+  unsigned hash;
 
   /* Window-relative x and y-position of the top-left corner of this
      row.  If y < 0, this means that eabs (y) pixels of the row are
@@ -849,10 +854,6 @@ struct glyph_row
      in last row when checking if row is fully visible.  */
   int extra_line_spacing;
 
-  /* Hash code.  This hash code is available as soon as the row
-     is constructed, i.e. after a call to display_line.  */
-  unsigned hash;
-
   /* First position in this row.  This is the text position, including
      overlay position information etc, where the display of this row
      started, and can thus be less than the position of the first
@@ -1824,7 +1825,7 @@ struct face_cache
 #endif /* not HAVE_WINDOW_SYSTEM */
 
 /* Return true if G contains a valid character code.  */
-DISPEXTERN_INLINE bool
+INLINE bool
 GLYPH_CHAR_VALID_P (GLYPH g)
 {
   return CHAR_VALID_P (GLYPH_CHAR (g));
@@ -1834,7 +1835,7 @@ GLYPH_CHAR_VALID_P (GLYPH g)
    encodes a char code in the lower CHARACTERBITS bits and a (very small)
    face-id in the upper bits, or it may be a cons (CHAR . FACE-ID).  */
 
-DISPEXTERN_INLINE bool
+INLINE bool
 GLYPH_CODE_P (Lisp_Object gc)
 {
   return (CONSP (gc)
@@ -2705,7 +2706,7 @@ typedef struct {
   unsigned mouse_face_hidden : 1;
 } Mouse_HLInfo;
 
-DISPEXTERN_INLINE void
+INLINE void
 reset_mouse_highlight (Mouse_HLInfo *hlinfo)
 {
 
@@ -3190,11 +3191,10 @@ int in_display_vector_p (struct it *);
 int frame_mode_line_height (struct frame *);
 extern Lisp_Object Qtool_bar;
 extern bool redisplaying_p;
-extern int help_echo_showing_p;
+extern bool help_echo_showing_p;
 extern Lisp_Object help_echo_string, help_echo_window;
 extern Lisp_Object help_echo_object, previous_help_echo_string;
 extern ptrdiff_t help_echo_pos;
-extern struct frame *last_mouse_frame;
 extern int last_tool_bar_item;
 extern void reseat_at_previous_visible_line_start (struct it *);
 extern Lisp_Object lookup_glyphless_char_display (int, struct it *);
@@ -3229,7 +3229,9 @@ extern void draw_phys_cursor_glyph (struct window *,
                                     enum draw_glyphs_face);
 extern void get_phys_cursor_geometry (struct window *, struct glyph_row *,
                                       struct glyph *, int *, int *, int *);
+#ifdef WINDOWSNT
 extern void erase_phys_cursor (struct window *);
+#endif
 extern void display_and_set_cursor (struct window *, bool, int, int, int, int);
 extern void x_update_cursor (struct frame *, bool);
 extern void x_clear_cursor (struct window *);
@@ -3256,6 +3258,7 @@ extern int clear_mouse_face (Mouse_HLInfo *);
 extern int cursor_in_mouse_face_p (struct window *w);
 extern void tty_draw_row_with_mouse_face (struct window *, struct glyph_row *,
                                          int, int, enum draw_glyphs_face);
+extern void display_tty_menu_item (const char *, int, int, int, int, int);
 
 /* Flags passed to try_window.  */
 #define TRY_WINDOW_CHECK_MARGINS       (1 << 0)
@@ -3342,8 +3345,10 @@ void update_face_from_frame_parameter (struct frame *, Lisp_Object,
                                        Lisp_Object);
 Lisp_Object tty_color_name (struct frame *, int);
 void clear_face_cache (int);
+#ifdef MSDOS
 unsigned long load_color (struct frame *, struct face *, Lisp_Object,
                           enum lface_attribute_index);
+#endif
 void unload_color (struct frame *, unsigned long);
 char *choose_face_font (struct frame *, Lisp_Object *, Lisp_Object,
                         int *);
@@ -3393,7 +3398,7 @@ extern frame_parm_handler x_frame_parm_handlers[];
 
 extern void start_hourglass (void);
 extern void cancel_hourglass (void);
-extern int hourglass_shown_p;
+extern bool hourglass_shown_p;
 /* If non-null, an asynchronous timer that, when it expires, displays
    an hourglass cursor on all frames.  */
 extern struct atimer *hourglass_atimer;
@@ -3427,6 +3432,8 @@ extern void hide_hourglass (void);
 
 int popup_activated (void);
 
+/* Defined in dispnew.c */
+
 extern Lisp_Object buffer_posn_from_coords (struct window *,
                                             int *, int *,
                                             struct display_pos *,
@@ -3441,9 +3448,8 @@ extern Lisp_Object marginal_area_string (struct window *, enum window_part,
                                          Lisp_Object *,
                                          int *, int *, int *, int *);
 extern void redraw_frame (struct frame *);
-extern void cancel_line (int, struct frame *);
-extern void init_desired_glyphs (struct frame *);
 extern bool update_frame (struct frame *, bool, bool);
+extern void update_frame_with_menu (struct frame *);
 extern void bitch_at_user (void);
 extern void adjust_frame_glyphs (struct frame *);
 void free_glyphs (struct frame *);
@@ -3462,14 +3468,15 @@ void blank_row (struct window *, struct glyph_row *, int);
 void clear_glyph_matrix_rows (struct glyph_matrix *, int, int);
 void clear_glyph_row (struct glyph_row *);
 void prepare_desired_row (struct glyph_row *);
-void set_window_update_flags (struct window *, bool);
+void set_window_update_flags (struct window *, struct buffer *, bool);
 void update_single_window (struct window *, bool);
 void do_pending_window_change (bool);
 void change_frame_size (struct frame *, int, int, bool, bool, bool);
 void init_display (void);
 void syms_of_display (void);
 extern Lisp_Object Qredisplay_dont_pause;
-void spec_glyph_lookup_face (struct window *, GLYPH *);
+extern void spec_glyph_lookup_face (struct window *, GLYPH *);
+extern void fill_up_frame_row_with_spaces (struct glyph_row *, int);
 
 /* Defined in terminal.c */
 
@@ -3546,6 +3553,11 @@ extern Lisp_Object x_default_parameter (struct frame *, Lisp_Object,
 extern char *x_get_string_resource (XrmDatabase, const char *,
                                    const char *);
 
+#ifndef HAVE_NS /* These both used on W32 and X only.  */
+extern bool x_mouse_grabbed (Display_Info *);
+extern void x_redo_mouse_highlight (Display_Info *);
+#endif /* HAVE_NS */
+
 #endif /* HAVE_WINDOW_SYSTEM */
 
 INLINE_HEADER_END