/* Interface definitions for display code.
- Copyright (C) 1985, 1993, 1994, 1997, 1998, 1999, 2000, 2001, 2002,
- 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
- Free Software Foundation, Inc.
+
+Copyright (C) 1985, 1993-1994, 1997-2011 Free Software Foundation, Inc.
This file is part of GNU Emacs.
#ifdef HAVE_NS
#include "nsgui.h"
-/* following typedef needed to accomodate the MSDOS port, believe it or not */
+/* Following typedef needed to accommodate the MSDOS port, believe it or not. */
typedef struct ns_display_info Display_Info;
typedef Pixmap XImagePtr;
typedef XImagePtr XImagePtr_or_DC;
} cmp;
/* Image ID for image glyphs (type == IMAGE_GLYPH). */
- unsigned img_id;
+ int img_id;
/* Sub-structure for type == STRETCH_GLYPH. */
struct
line. */
unsigned header_line_p : 1;
-#ifdef GLYPH_DEBUG
+#if GLYPH_DEBUG
/* A string identifying the method used to display the matrix. */
char method[512];
#endif
extern struct glyph_row *updated_row;
extern int updated_area;
-/* Non-zero means reading single-character input with prompt so put
- cursor on mini-buffer after the prompt. Positive means at end of
- text in echo area; negative means at beginning of line. */
-
-extern int cursor_in_echo_area;
-
/* Non-zero means last display completed. Zero means it was
preempted. */
extern int display_completed;
-/* A temporary storage area, including a row of glyphs. Initialized
- in xdisp.c. Used for various purposes, as an example see
- get_overlay_arrow_glyph_row. */
-
-extern struct glyph_row scratch_glyph_row;
-
\f
/************************************************************************
&& !(W)->pseudo_window_p \
&& FRAME_WANTS_MODELINE_P (XFRAME (WINDOW_FRAME ((W)))) \
&& BUFFERP ((W)->buffer) \
- && !NILP (XBUFFER ((W)->buffer)->mode_line_format) \
+ && !NILP (BVAR (XBUFFER ((W)->buffer), mode_line_format)) \
&& WINDOW_TOTAL_LINES (W) > 1)
/* Value is non-zero if window W wants a header line. */
&& !(W)->pseudo_window_p \
&& FRAME_WANTS_MODELINE_P (XFRAME (WINDOW_FRAME ((W)))) \
&& BUFFERP ((W)->buffer) \
- && !NILP (XBUFFER ((W)->buffer)->header_line_format) \
- && WINDOW_TOTAL_LINES (W) > 1 + !NILP (XBUFFER ((W)->buffer)->mode_line_format))
+ && !NILP (BVAR (XBUFFER ((W)->buffer), header_line_format)) \
+ && WINDOW_TOTAL_LINES (W) > 1 + !NILP (BVAR (XBUFFER ((W)->buffer), mode_line_format)))
/* Return proper value to be used as baseline offset of font that has
/* Non-zero if FACE is suitable for displaying character CHAR. */
+#define FACE_SUITABLE_FOR_ASCII_CHAR_P(FACE, CHAR) \
+ ((FACE) == (FACE)->ascii_face)
+
#define FACE_SUITABLE_FOR_CHAR_P(FACE, CHAR) \
(ASCII_CHAR_P (CHAR) \
- ? (FACE) == (FACE)->ascii_face \
+ ? FACE_SUITABLE_FOR_ASCII_CHAR_P(FACE) \
: face_suitable_for_char_p ((FACE), (CHAR)))
/* Return the id of the realized face on frame F that is like the face
#else /* not HAVE_WINDOW_SYSTEM */
+#define FACE_SUITABLE_FOR_ASCII_CHAR_P(FACE, CHAR) 1
#define FACE_SUITABLE_FOR_CHAR_P(FACE, CHAR) 1
#define FACE_FOR_CHAR(F, FACE, CHAR, POS, OBJECT) ((FACE)->id)
OVERLAY_STRING_CHUNK_SIZE. */
int n_overlay_strings;
+ /* The charpos where n_overlay_strings was calculated. This should
+ be set at the same time as n_overlay_strings. It is needed
+ because we show before-strings at the start of invisible text;
+ see handle_invisible_prop in xdisp.c. */
+ int overlay_strings_charpos;
+
/* Vector of overlays to process. Overlay strings are processed
OVERLAY_STRING_CHUNK_SIZE at a time. */
#define OVERLAY_STRING_CHUNK_SIZE 16
int cursor_type, int cursor_width,
int on_p, int active_p);
-/* Draw vertical border for window W from (X,Y0) to (X,Y1). */
+/* Draw vertical border for window W from (X,Y_0) to (X,Y_1). */
void (*draw_vertical_window_border) (struct window *w,
- int x, int y0, int y1);
+ int x, int y_0, int y_1);
/* Shift display of frame F to make room for inserted glyphs.
The area at pixel (X,Y) of width WIDTH and height HEIGHT is
/* The binding. */
TOOL_BAR_ITEM_BINDING,
- /* Button type. One of nil, `:radio' or `:toggle'. */
+ /* Button type. One of nil (default button), t (a separator),
+ `:radio', or `:toggle'. The latter two currently do nothing. */
TOOL_BAR_ITEM_TYPE,
/* Help string. */
/* Label to show when text labels are enabled. */
TOOL_BAR_ITEM_LABEL,
+ /* If we shall show the label only below the icon and not beside it. */
+ TOOL_BAR_ITEM_VERT_ONLY,
+
/* Sentinel = number of slots in tool_bar_items occupied by one
tool-bar item. */
TOOL_BAR_ITEM_NSLOTS
TOOL_BAR_IMAGE_DISABLED_DESELECTED
};
-/* Margin around tool-bar buttons in pixels. */
-
-extern Lisp_Object Vtool_bar_button_margin;
-
-/* Tool bar style */
-
-extern Lisp_Object Vtool_bar_style;
-
-/* Maximum number of characters a label can have to be shown. */
-
-extern EMACS_INT tool_bar_max_label_size;
#define DEFAULT_TOOL_BAR_LABEL_SIZE 14
-/* Thickness of relief to draw around tool-bar buttons. */
-
-extern EMACS_INT tool_bar_button_relief;
-
/* Default values of the above variables. */
#define DEFAULT_TOOL_BAR_BUTTON_MARGIN 4
struct glyph_row *row_containing_pos (struct window *, EMACS_INT,
struct glyph_row *,
struct glyph_row *, int);
-EMACS_INT string_buffer_position (struct window *, Lisp_Object,
- EMACS_INT);
int line_bottom_y (struct it *);
int display_prop_intangible_p (Lisp_Object);
void resize_echo_area_exactly (void);
int resize_mini_window (struct window *, int);
+#if defined USE_TOOLKIT_SCROLL_BARS && !defined USE_GTK
+void set_vertical_scroll_bar (struct window *);
+#endif
int try_window (Lisp_Object, struct text_pos, int);
void window_box (struct window *, int, int *, int *, int *, int *);
int window_box_height (struct window *);
int window_box_left_offset (struct window *, int);
int window_box_right (struct window *, int);
int window_box_right_offset (struct window *, int);
-void window_box_edges (struct window *, int, int *, int *, int *, int *);
int estimate_mode_line_height (struct frame *, enum face_id);
void pixel_to_glyph_coords (struct frame *, int, int, int *, int *,
NativeRectangle *, int);
-int glyph_to_pixel_coords (struct window *, int, int, int *, int *);
void remember_mouse_glyph (struct frame *, int, int, NativeRectangle *);
void mark_window_display_accurate (Lisp_Object, int);
void redisplay_preserve_echo_area (int);
-int set_cursor_from_row (struct window *, struct glyph_row *,
- struct glyph_matrix *, EMACS_INT, EMACS_INT,
- int, int);
void init_iterator (struct it *, struct window *, EMACS_INT,
EMACS_INT, struct glyph_row *, enum face_id);
void init_iterator_to_row_start (struct it *, struct window *,
struct glyph_row *);
-int get_next_display_element (struct it *);
-void set_iterator_to_next (struct it *, int);
void start_display (struct it *, struct window *, struct text_pos);
void move_it_to (struct it *, EMACS_INT, int, int, int, int);
void move_it_vertically (struct it *, int);
void move_it_vertically_backward (struct it *, int);
-void move_it_by_lines (struct it *, int, int);
+void move_it_by_lines (struct it *, int);
void move_it_past_eol (struct it *);
void move_it_in_display_line (struct it *it,
EMACS_INT to_charpos, int to_x,
enum move_operation_enum op);
int in_display_vector_p (struct it *);
int frame_mode_line_height (struct frame *);
-void highlight_trailing_whitespace (struct frame *, struct glyph_row *);
extern Lisp_Object Qtool_bar;
-extern Lisp_Object Vshow_trailing_whitespace;
-extern int mode_line_in_non_selected_windows;
extern int redisplaying_p;
extern int help_echo_showing_p;
extern int current_mode_line_height, current_header_line_height;
extern EMACS_INT help_echo_pos;
extern struct frame *last_mouse_frame;
extern int last_tool_bar_item;
-extern Lisp_Object Vmouse_autoselect_window;
-extern int unibyte_display_via_language_environment;
-extern EMACS_INT underline_minimum_offset;
-extern Lisp_Object Vglyphless_char_display;
-
extern void reseat_at_previous_visible_line_start (struct it *);
extern Lisp_Object lookup_glyphless_char_display (int, struct it *);
extern int calc_pixel_width_or_height (double *, struct it *, Lisp_Object,
extern void x_insert_glyphs (struct glyph *, int len);
extern void x_clear_end_of_line (int);
-extern int x_stretch_cursor_p;
extern struct cursor_pos output_cursor;
extern void x_fix_overlapping_area (struct window *, struct glyph_row *,
XRectangle *);
#endif /* HAVE_WINDOW_SYSTEM */
-extern void frame_to_window_pixel_xy (struct window *, int *, int *);
extern void note_mouse_highlight (struct frame *, int, int);
extern void x_clear_window_mouse_face (struct window *);
extern void cancel_mouse_face (struct frame *);
extern int clear_mouse_face (Mouse_HLInfo *);
-extern void show_mouse_face (Mouse_HLInfo *, enum draw_glyphs_face);
extern int cursor_in_mouse_face_p (struct window *w);
-extern void draw_row_with_mouse_face (struct window *, int, struct glyph_row *,
- int, int, enum draw_glyphs_face);
extern void tty_draw_row_with_mouse_face (struct window *, struct glyph_row *,
int, int, enum draw_glyphs_face);
#define TRY_WINDOW_CHECK_MARGINS (1 << 0)
#define TRY_WINDOW_IGNORE_FONTS_CHANGE (1 << 1)
-/* Defined in fringe.c */
-
-extern Lisp_Object Voverflow_newline_into_fringe;
int lookup_fringe_bitmap (Lisp_Object);
void draw_fringe_bitmap (struct window *, struct glyph_row *, int);
void draw_row_fringe_bitmaps (struct window *, struct glyph_row *);
extern int x_create_bitmap_from_data (struct frame *, char *,
unsigned int, unsigned int);
extern int x_create_bitmap_from_file (struct frame *, Lisp_Object);
-#if defined (HAVE_XPM) && defined (HAVE_X_WINDOWS)
-extern int x_create_bitmap_from_xpm_data (struct frame *f, char **bits);
+#if defined HAVE_XPM && defined HAVE_X_WINDOWS && !defined USE_GTK
+extern int x_create_bitmap_from_xpm_data (struct frame *f, const char **bits);
#endif
#ifndef x_destroy_bitmap
extern void x_destroy_bitmap (struct frame *, int);
void unload_color (struct frame *, unsigned long);
char *choose_face_font (struct frame *, Lisp_Object *, Lisp_Object,
int *);
-int ascii_face_of_lisp_face (struct frame *, int);
void prepare_face_for_display (struct frame *, struct face *);
-int xstrcasecmp (const unsigned char *, const unsigned char *);
-int lookup_face (struct frame *, Lisp_Object *);
+int xstrcasecmp (const char *, const char *);
int lookup_named_face (struct frame *, Lisp_Object, int);
int lookup_basic_face (struct frame *, int);
int smaller_face (struct frame *, int, int);
int merge_faces (struct frame *, Lisp_Object, int, int);
int compute_char_face (struct frame *, int, Lisp_Object);
void free_all_realized_faces (Lisp_Object);
-void free_realized_face (struct frame *, struct face *);
extern Lisp_Object Qforeground_color, Qbackground_color;
extern Lisp_Object Qframe_set_background_mode;
extern char unspecified_fg[], unspecified_bg[];
-extern Lisp_Object Vface_remapping_alist;
-
/* Defined in xfns.c */
#ifdef HAVE_X_WINDOWS
#ifdef HAVE_WINDOW_SYSTEM
-int x_screen_planes (struct frame *);
void x_implicitly_set_name (struct frame *, Lisp_Object, Lisp_Object);
extern Lisp_Object tip_frame;
extern Window tip_window;
-EXFUN (Fx_show_tip, 6);
EXFUN (Fx_hide_tip, 0);
extern void start_hourglass (void);
extern void cancel_hourglass (void);
extern int hourglass_started (void);
-extern int display_hourglass_p;
extern int hourglass_shown_p;
struct atimer; /* Defined in atimer.h. */
/* If non-null, an asynchronous timer that, when it expires, displays
int popup_activated (void);
-/* Defined in dispnew.c */
-
-extern int inverse_video;
-extern int required_matrix_width (struct window *);
-extern int required_matrix_height (struct window *);
extern Lisp_Object buffer_posn_from_coords (struct window *,
int *, int *,
struct display_pos *,
Lisp_Object *,
int *, int *, int *, int *);
extern void redraw_frame (struct frame *);
-extern void redraw_garbaged_frames (void);
extern void cancel_line (int, struct frame *);
extern void init_desired_glyphs (struct frame *);
-extern int scroll_frame_lines (struct frame *, int, int, int, int);
extern int update_frame (struct frame *, int, int);
-extern int scrolling (struct frame *);
extern void bitch_at_user (void);
void adjust_glyphs (struct frame *);
void free_glyphs (struct frame *);
void increment_matrix_positions (struct glyph_matrix *,
int, int, EMACS_INT, EMACS_INT);
void blank_row (struct window *, struct glyph_row *, int);
-void increment_row_positions (struct glyph_row *, EMACS_INT, EMACS_INT);
void enable_glyph_matrix_rows (struct glyph_matrix *, int, int, int);
void clear_glyph_row (struct glyph_row *);
void prepare_desired_row (struct glyph_row *);
-int line_hash_code (struct glyph_row *);
void set_window_update_flags (struct window *, int);
void update_single_window (struct window *, int);
void do_pending_window_change (int);
/* Defined in term.c */
-extern void tty_set_terminal_modes (struct terminal *);
-extern void tty_reset_terminal_modes (struct terminal *);
extern void tty_turn_off_insert (struct tty_display_info *);
-extern void tty_turn_off_highlight (struct tty_display_info *);
extern int string_cost (const char *);
extern int per_line_cost (const char *);
extern void calculate_costs (struct frame *);
extern void produce_special_glyphs (struct it *, enum display_element_type);
extern int tty_capable_p (struct tty_display_info *, unsigned, unsigned long, unsigned long);
extern void set_tty_color_mode (struct tty_display_info *, struct frame *);
-extern struct terminal *get_tty_terminal (Lisp_Object, int);
extern struct terminal *get_named_tty (const char *);
EXFUN (Ftty_type, 1);
extern void create_tty_output (struct frame *);
/* Defined in scroll.c */
extern int scrolling_max_lines_saved (int, int, int *, int *, int *);
-extern int scroll_cost (struct frame *, int, int, int);
-extern void do_line_insertion_deletion_costs (struct frame *, char *,
- char *, char *, char *,
- char *, char *, int);
+extern void do_line_insertion_deletion_costs (struct frame *, const char *,
+ const char *, const char *,
+ const char *, const char *,
+ const char *, int);
void scrolling_1 (struct frame *, int, int, int, int *, int *, int *,
int *, int);
extern Lisp_Object x_get_arg (Display_Info *, Lisp_Object,
Lisp_Object, const char *, const char *class,
enum resource_types);
-extern Lisp_Object x_frame_get_arg (struct frame *, Lisp_Object,
- Lisp_Object, const char *, const char *,
- enum resource_types);
extern Lisp_Object x_frame_get_and_record_arg (struct frame *, Lisp_Object,
Lisp_Object,
const char *, const char *,
#endif /* HAVE_WINDOW_SYSTEM */
#endif /* not DISPEXTERN_H_INCLUDED */
-
-/* arch-tag: c65c475f-1c1e-4534-8795-990b8509fd65
- (do not change this comment) */