]> code.delx.au - gnu-emacs/blobdiff - src/frame.h
(encode_terminal_code): Check validity of character code.
[gnu-emacs] / src / frame.h
index 6d21437c8604a789f49ea42e01eea0fabdb095ac..47970c3d6db9341f1bbf79a11de59fba27579efb 100644 (file)
@@ -33,7 +33,7 @@ extern int message_buf_print;
 /* 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 };
@@ -181,9 +181,9 @@ struct frame
   /* 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.
@@ -290,6 +290,11 @@ struct 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;
@@ -309,7 +314,7 @@ typedef struct frame *FRAME_PTR;
 #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
@@ -318,7 +323,7 @@ typedef struct frame *FRAME_PTR;
 #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)
@@ -390,6 +395,12 @@ typedef struct frame *FRAME_PTR;
 #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