/* The structure representing a frame. */
enum output_method
-{ output_termcap, output_x_window, output_msdos_raw, output_win32 };
+{ output_termcap, output_x_window, output_msdos_raw, output_w32 };
enum vertical_scroll_bar_type
{ vertical_scroll_bar_none, vertical_scroll_bar_left, vertical_scroll_bar_right };
/* This is handy for undrawing the cursor, because current_glyphs is
not always accurate when in do_scrolling. */
GLYPH phys_cursor_glyph;
+ /* Nonzero means the cursor is displayed. */
+ int phys_cursor_on;
/* Size of this frame, in units of characters. */
EMACS_INT height;
EMACS_INT width;
+ EMACS_INT window_width;
/* New height and width for pending size change. 0 if no change pending. */
int new_height, new_width;
/* A structure of auxiliary data used for displaying the contents.
struct x_output is used for X window frames;
it is defined in xterm.h.
- struct win32_output is used for Win32 window frames;
+ struct w32_output is used for W32 window frames;
it is defined in w32term.h. */
- union output_data { struct x_output *x; struct win32_output *win32; int nothing; } output_data;
+ union output_data { struct x_output *x; struct w32_output *w32; int nothing; } output_data;
#ifdef MULTI_KBOARD
/* A pointer to the kboard structure associated with this frame.
/* The baud rate that was used to calculate costs for this frame. */
int cost_calculation_baud_rate;
+ /* A pointer to the data structure containing all information of
+ fontsets associated with this frame. See the comments in
+ fontset.h for more detail. */
+ struct fontset_data *fontset_data;
+
/* Nonzero if the mouse has moved on this display
since the last time we checked. */
char mouse_moved;
#define WINDOW_FRAME(w) (w)->frame
#define FRAME_X_P(f) ((f)->output_method == output_x_window)
-#define FRAME_WIN32_P(f) ((f)->output_method == output_win32)
+#define FRAME_W32_P(f) ((f)->output_method == output_w32)
#define FRAME_MSDOS_P(f) ((f)->output_method == output_msdos_raw)
/* FRAME_WINDOW_P tests whether the frame is a window, and is
#define FRAME_WINDOW_P(f) FRAME_X_P (f)
#endif
#ifdef HAVE_NTGUI
-#define FRAME_WINDOW_P(f) FRAME_WIN32_P (f)
+#define FRAME_WINDOW_P(f) FRAME_W32_P (f)
#endif
#ifndef FRAME_WINDOW_P
#define FRAME_WINDOW_P(f) (0)
: 0)
#define FRAME_WINDOW_WIDTH_ARG(f, width) \
((width) + FRAME_SCROLL_BAR_WIDTH (f))
-#define FRAME_WINDOW_WIDTH(f) ((f)->width + FRAME_SCROLL_BAR_WIDTH (f))
-#define SET_FRAME_WIDTH(f,val) ((f)->width = (val))
+#define FRAME_WINDOW_WIDTH(f) ((f)->window_width)
+#define SET_FRAME_WIDTH(f,val) ((f)->width = (val), (f)->window_width = FRAME_WINDOW_WIDTH_ARG (f, (f)->width))
#define FRAME_SCROLL_BARS(f) ((f)->scroll_bars)
#define FRAME_CONDEMNED_SCROLL_BARS(f) ((f)->condemned_scroll_bars)
#define FRAME_MENU_BAR_ITEMS(f) ((f)->menu_bar_items)
#define FRAME_COST_BAUD_RATE(f) ((f)->cost_calculation_baud_rate)
+#define FRAME_FONTSET_DATA(f) ((f)->fontset_data)
+
+/* Return the size of message_buf of the frame F. We multiply the
+ width of the frame by 4 because multi-byte form may require at most
+ 4-byte for a character. */
+#define FRAME_MESSAGE_BUF_SIZE(f) (((int) (f)->width) * 4)
/* Emacs's redisplay code could become confused if a frame's
visibility changes at arbitrary times. For example, if a frame is