#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);
}
#ifdef HAVE_X_WINDOWS
+#include <X11/Xresource.h> /* for XrmDatabase */
typedef struct x_display_info Display_Info;
typedef XImage * XImagePtr;
typedef XImagePtr XImagePtr_or_DC;
} 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))
/* The following are valid only if GLYPH_CODE_P (gc). */
-DISPEXTERN_INLINE int
+INLINE int
GLYPH_CODE_CHAR (Lisp_Object gc)
{
return (CONSP (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;
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
{
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
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
#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));
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)
unsigned mouse_face_hidden : 1;
} Mouse_HLInfo;
-DISPEXTERN_INLINE void
+INLINE void
reset_mouse_highlight (Mouse_HLInfo *hlinfo)
{
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 *);
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 *);
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)
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 *);
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;
int popup_activated (void);
+/* Defined in dispnew.c */
+
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 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 *);
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 */
RES_TYPE_BOOLEAN_NUMBER
};
+extern Display_Info *check_x_display_info (Lisp_Object);
extern Lisp_Object x_get_arg (Display_Info *, Lisp_Object,
Lisp_Object, const char *, const char *class,
enum resource_types);
Lisp_Object, Lisp_Object,
const char *, const char *,
enum resource_types);
+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 */