comparison src/frame.h @ 13411:58efb2561888

(output_method): New method: output_win32. (output_data): New data: win32. (FRAME_WIN32_P): New macro. [HAVE_NTGUI] (external_menu_bar): Define variable. [HAVE_NTGUI] (FRAME_EXTERNAL_MENU_BAR): Defined macro. [HAVE_X_WINDOWS] (FRAME_WINDOW_P): Macro defined.
author Geoff Voelker <voelker@cs.washington.edu>
date Tue, 07 Nov 1995 07:18:50 +0000
parents 427a3d6560bf
children 01ec2620dd87
comparison
equal deleted inserted replaced
13410:7007664d3367 13411:58efb2561888
35 we lack multi-frame support, we use one instance of this structure 35 we lack multi-frame support, we use one instance of this structure
36 to represent the one frame we support. This is cleaner than 36 to represent the one frame we support. This is cleaner than
37 having miscellaneous random variables scattered about. */ 37 having miscellaneous random variables scattered about. */
38 38
39 enum output_method 39 enum output_method
40 { output_termcap, output_x_window, output_msdos_raw }; 40 { output_termcap, output_x_window, output_msdos_raw, output_win32 };
41 41
42 struct frame 42 struct frame
43 { 43 {
44 EMACS_INT size; 44 EMACS_INT size;
45 struct Lisp_Vector *next; 45 struct Lisp_Vector *next;
170 are displayed. It could be using termcap, or using an X window. */ 170 are displayed. It could be using termcap, or using an X window. */
171 enum output_method output_method; 171 enum output_method output_method;
172 172
173 /* A structure of auxiliary data used for displaying the contents. 173 /* A structure of auxiliary data used for displaying the contents.
174 struct x_output is used for X window frames; 174 struct x_output is used for X window frames;
175 it is defined in xterm.h. */ 175 it is defined in xterm.h.
176 union output_data { struct x_output *x; int nothing; } output_data; 176 struct win32_output is used for Win32 window frames;
177 it is defined in w32term.h. */
178 union output_data { struct x_output *x; struct win32_output *win32; int nothing; } output_data;
177 179
178 #ifdef MULTI_KBOARD 180 #ifdef MULTI_KBOARD
179 /* A pointer to the kboard structure associated with this frame. 181 /* A pointer to the kboard structure associated with this frame.
180 For termcap frames, this points to initial_kboard. For X frames, 182 For termcap frames, this points to initial_kboard. For X frames,
181 it will be the same as display.x->display_info->kboard. */ 183 it will be the same as display.x->display_info->kboard. */
183 #endif 185 #endif
184 186
185 /* Number of lines of menu bar. */ 187 /* Number of lines of menu bar. */
186 int menu_bar_lines; 188 int menu_bar_lines;
187 189
188 #ifdef USE_X_TOOLKIT 190 #if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI)
189 /* Nonzero means using a menu bar that comes from the X toolkit. */ 191 /* Nonzero means using a menu bar that comes from the X toolkit. */
190 int external_menu_bar; 192 int external_menu_bar;
191 #endif 193 #endif
192 194
193 /* Nonzero if last attempt at redisplay on this frame was preempted. */ 195 /* Nonzero if last attempt at redisplay on this frame was preempted. */
298 #define XFRAME(p) ((struct frame *) XPNTR (p)) 300 #define XFRAME(p) ((struct frame *) XPNTR (p))
299 #define XSETFRAME(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_FRAME)) 301 #define XSETFRAME(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_FRAME))
300 302
301 #define WINDOW_FRAME(w) (w)->frame 303 #define WINDOW_FRAME(w) (w)->frame
302 304
305 #define FRAME_X_P(f) ((f)->output_method == output_x_window)
306 #define FRAME_WIN32_P(f) ((f)->output_method == output_win32)
307
308 /* FRAME_WINDOW_P tests whether the frame is a window, and is
309 defined to be the predicate for the window system being used. */
310 #ifdef HAVE_X_WINDOWS
311 #define FRAME_WINDOW_P(f) FRAME_X_P (f)
312 #endif
313 #ifdef HAVE_NTGUI
314 #define FRAME_WINDOW_P(f) FRAME_WIN32_P (f)
315 #endif
316
303 #define FRAME_LIVE_P(f) ((f)->output_data.nothing != 0) 317 #define FRAME_LIVE_P(f) ((f)->output_data.nothing != 0)
304 #define FRAME_TERMCAP_P(f) ((f)->output_method == output_termcap) 318 #define FRAME_TERMCAP_P(f) ((f)->output_method == output_termcap)
305 #define FRAME_X_P(f) ((f)->output_method == output_x_window)
306 #define FRAME_MINIBUF_ONLY_P(f) \ 319 #define FRAME_MINIBUF_ONLY_P(f) \
307 EQ (FRAME_ROOT_WINDOW (f), FRAME_MINIBUF_WINDOW (f)) 320 EQ (FRAME_ROOT_WINDOW (f), FRAME_MINIBUF_WINDOW (f))
308 #define FRAME_HAS_MINIBUF_P(f) ((f)->has_minibuffer) 321 #define FRAME_HAS_MINIBUF_P(f) ((f)->has_minibuffer)
309 #define FRAME_CURRENT_GLYPHS(f) (f)->current_glyphs 322 #define FRAME_CURRENT_GLYPHS(f) (f)->current_glyphs
310 #define FRAME_DESIRED_GLYPHS(f) (f)->desired_glyphs 323 #define FRAME_DESIRED_GLYPHS(f) (f)->desired_glyphs
312 #define FRAME_HEIGHT(f) (f)->height 325 #define FRAME_HEIGHT(f) (f)->height
313 #define FRAME_WIDTH(f) (f)->width 326 #define FRAME_WIDTH(f) (f)->width
314 #define FRAME_NEW_HEIGHT(f) (f)->new_height 327 #define FRAME_NEW_HEIGHT(f) (f)->new_height
315 #define FRAME_NEW_WIDTH(f) (f)->new_width 328 #define FRAME_NEW_WIDTH(f) (f)->new_width
316 #define FRAME_MENU_BAR_LINES(f) (f)->menu_bar_lines 329 #define FRAME_MENU_BAR_LINES(f) (f)->menu_bar_lines
317 #ifdef USE_X_TOOLKIT 330 #if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI)
318 #define FRAME_EXTERNAL_MENU_BAR(f) (f)->external_menu_bar 331 #define FRAME_EXTERNAL_MENU_BAR(f) (f)->external_menu_bar
319 #else 332 #else
320 #define FRAME_EXTERNAL_MENU_BAR(f) 0 333 #define FRAME_EXTERNAL_MENU_BAR(f) 0
321 #endif 334 #endif
322 #define FRAME_CURSOR_X(f) (f)->cursor_x 335 #define FRAME_CURSOR_X(f) (f)->cursor_x
453 #define FRAME_X_P(f) (the_only_frame.output_method != output_termcap) 466 #define FRAME_X_P(f) (the_only_frame.output_method != output_termcap)
454 #else 467 #else
455 #define FRAME_TERMCAP_P(f) 1 468 #define FRAME_TERMCAP_P(f) 1
456 #define FRAME_X_P(f) 0 469 #define FRAME_X_P(f) 0
457 #endif 470 #endif
471 #define FRAME_WINDOW_P(f) FRAME_X_P (f)
458 #define FRAME_MINIBUF_ONLY_P(f) 0 472 #define FRAME_MINIBUF_ONLY_P(f) 0
459 #define FRAME_HAS_MINIBUF_P(f) 1 473 #define FRAME_HAS_MINIBUF_P(f) 1
460 #define FRAME_CURRENT_GLYPHS(f) (the_only_frame.current_glyphs) 474 #define FRAME_CURRENT_GLYPHS(f) (the_only_frame.current_glyphs)
461 #define FRAME_DESIRED_GLYPHS(f) (the_only_frame.desired_glyphs) 475 #define FRAME_DESIRED_GLYPHS(f) (the_only_frame.desired_glyphs)
462 #define FRAME_TEMP_GLYPHS(f) (the_only_frame.temp_glyphs) 476 #define FRAME_TEMP_GLYPHS(f) (the_only_frame.temp_glyphs)