(stuff_char) [PROTOTYPES]: Provide ISO C arglist.
[bpt/emacs.git] / src / dispextern.h
index 8b74068..ec5e16b 100644 (file)
@@ -1,5 +1,5 @@
 /* Interface definitions for display code.
-   Copyright (C) 1985, 1993, 1994, 1997, 1998, 1999, 2000, 2001
+   Copyright (C) 1985, 1993, 1994, 1997, 1998, 1999, 2000, 2001, 2002
      Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
@@ -25,10 +25,23 @@ Boston, MA 02111-1307, USA.  */
 #define DISPEXTERN_H_INCLUDED
 
 #ifdef HAVE_X_WINDOWS
+
 #include <X11/Xlib.h>
 #ifdef USE_X_TOOLKIT
 #include <X11/Intrinsic.h>
 #endif /* USE_X_TOOLKIT */
+
+#else /* !HAVE_X_WINDOWS */
+
+/* X-related stuff used by non-X gui code. */
+
+typedef struct {
+  unsigned long pixel;
+  unsigned short red, green, blue;
+  char flags;
+  char pad;
+} XColor;
+
 #endif /* HAVE_X_WINDOWS */
 
 #ifdef MSDOS
@@ -39,7 +52,7 @@ Boston, MA 02111-1307, USA.  */
 #include "w32gui.h"
 #endif
 
-#ifdef macintosh
+#ifdef MAC_OS
 #include "macgui.h"
 #endif
 
@@ -931,15 +944,15 @@ extern struct glyph_row scratch_glyph_row;
    selected_window, this macro needs three arguments: SELW which is
    compared against the current value of selected_window, MBW which is
    compared against minibuf_window (if SELW doesn't match), and SCRW
-   which is compared against Vminibuf_scroll_window (if MBW matches).  */
+   which is compared against minibuf_selected_window (if MBW matches).  */
 
 #define CURRENT_MODE_LINE_FACE_ID_3(SELW, MBW, SCRW)           \
      ((!mode_line_in_non_selected_windows                      \
        || (SELW) == XWINDOW (selected_window)                  \
        || (minibuf_level > 0                                   \
-           && !NILP (Vminibuf_scroll_window)                   \
+           && !NILP (minibuf_selected_window)                  \
            && (MBW) == XWINDOW (minibuf_window)                        \
-           && (SCRW) == XWINDOW (Vminibuf_scroll_window)))     \
+           && (SCRW) == XWINDOW (minibuf_selected_window)))    \
       ? MODE_LINE_FACE_ID                                      \
       : MODE_LINE_INACTIVE_FACE_ID)
 
@@ -1346,6 +1359,9 @@ struct face
      realize_x_face).  */
   unsigned colors_copied_bitwise_p : 1;
 
+  /* If non-zero, use overstrike (to simulate bold-face).  */
+  unsigned overstrike : 1;
+
   /* Next and previous face in hash collision list of face cache.  */
   struct face *next, *prev;
 
@@ -1852,10 +1868,16 @@ struct it
 /* Call produce_glyphs or produce_glyphs_hook, if set.  Shortcut to
    avoid the function call overhead.  */
 
-#define PRODUCE_GLYPHS(IT)                     \
-     (rif                                      \
-      ? rif->produce_glyphs ((IT))             \
-      : produce_glyphs ((IT)))
+#define PRODUCE_GLYPHS(IT)                     \
+     do {                                      \
+       extern int inhibit_free_realized_faces; \
+       if (rif != NULL)                                \
+        rif->produce_glyphs ((IT));            \
+       else                                    \
+        produce_glyphs ((IT));                 \
+       if ((IT)->glyph_row != NULL)            \
+        inhibit_free_realized_faces = 1;       \
+     } while (0)
 
 /* Bit-flags indicating what operation move_it_to should perform.  */
 
@@ -2188,12 +2210,12 @@ extern Lisp_Object Vtool_bar_button_margin;
 
 /* Thickness of relief to draw around tool-bar buttons.  */
 
-extern int tool_bar_button_relief;
+extern EMACS_INT tool_bar_button_relief;
 
 /* Default values of the above variables.  */
 
-#define DEFAULT_TOOL_BAR_BUTTON_MARGIN 1
-#define DEFAULT_TOOL_BAR_BUTTON_RELIEF 3
+#define DEFAULT_TOOL_BAR_BUTTON_MARGIN 4
+#define DEFAULT_TOOL_BAR_BUTTON_RELIEF 1
 
 /* The height in pixels of the default tool-bar images.  */
 
@@ -2201,7 +2223,24 @@ extern int tool_bar_button_relief;
 
 \f
 /***********************************************************************
-                        Function Prototypes
+                        Terminal Capabilities
+ ***********************************************************************/
+
+/* Each of these is a bit representing a terminal `capability' (bold,
+   inverse, etc).  They are or'd together to specify the set of
+   capabilities being queried for when calling `tty_capable_p' (which
+   returns true if the terminal supports all of them).  */
+
+#define TTY_CAP_INVERSE                0x01
+#define TTY_CAP_UNDERLINE      0x02
+#define TTY_CAP_BOLD           0x04
+#define TTY_CAP_DIM            0x08
+#define TTY_CAP_BLINK          0x10
+#define TTY_CAP_ALT_CHARSET    0x20
+
+\f
+/***********************************************************************
+                         Function Prototypes
  ***********************************************************************/
 
 /* Defined in xdisp.c */
@@ -2251,7 +2290,6 @@ extern Lisp_Object Vimage_types;
 extern void add_to_log P_ ((char *, Lisp_Object, Lisp_Object));
 extern int help_echo_showing_p;
 extern int current_mode_line_height, current_header_line_height;
-extern int cursor_in_non_selected_windows;
 
 /* Defined in sysdep.c */
 
@@ -2278,7 +2316,7 @@ void unload_color P_ ((struct frame *, unsigned long));
 int frame_update_line_height P_ ((struct frame *));
 int ascii_face_of_lisp_face P_ ((struct frame *, int));
 void prepare_face_for_display P_ ((struct frame *, struct face *));
-int xstricmp P_ ((unsigned char *, unsigned char *));
+int xstricmp P_ ((const unsigned char *, const unsigned char *));
 int lookup_face P_ ((struct frame *, Lisp_Object *, int, struct face *));
 int lookup_named_face P_ ((struct frame *, Lisp_Object, int));
 int smaller_face P_ ((struct frame *, int, int));
@@ -2367,6 +2405,7 @@ extern int required_matrix_width P_ ((struct window *));
 extern int required_matrix_height P_ ((struct window *));
 extern int estimate_mode_line_height P_ ((struct frame *, enum face_id));
 extern Lisp_Object mode_line_string P_ ((struct window *, int, int, int, int *));
+extern Lisp_Object marginal_area_string P_ ((struct window *, int, int, int, int *));
 extern void redraw_frame P_ ((struct frame *));
 extern void redraw_garbaged_frames P_ ((void));
 extern void cancel_line P_ ((int, struct frame *));
@@ -2442,6 +2481,7 @@ extern void tty_setup_colors P_ ((int));
 extern void term_init P_ ((char *));
 extern void fatal P_ ((/* char *, ... */));
 void cursor_to P_ ((int, int));
+extern int tty_capable_p P_ ((struct frame *, unsigned, unsigned long, unsigned long));
 
 /* Defined in scroll.c */