configure: Regenerate
[bpt/emacs.git] / src / frame.h
CommitLineData
ff11dfa1 1/* Define frame-object for GNU Emacs.
1f922834 2 Copyright (C) 1993, 1994, 1999, 2000, 2001 Free Software Foundation, Inc.
efa4ce8b
JB
3
4This file is part of GNU Emacs.
5
6GNU Emacs is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
e5d77022 8the Free Software Foundation; either version 2, or (at your option)
efa4ce8b
JB
9any later version.
10
11GNU Emacs is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with GNU Emacs; see the file COPYING. If not, write to
3b7ad313
EN
18the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19Boston, MA 02111-1307, USA. */
efa4ce8b 20
843c9999
GM
21/* Don't multiply include: dispextern.h includes macterm.h which
22 includes frame.h some emacs source includes both dispextern.h and
23 frame.h */
24
84e01749
GM
25#ifndef EMACS_FRAME_H
26#define EMACS_FRAME_H
1f922834 27
20a6c8d7
JB
28\f
29/* Miscellanea. */
30
3b83d631
GM
31/* Nonzero means don't assume anything about current contents of
32 actual terminal frame */
33
20a6c8d7
JB
34extern int frame_garbaged;
35
36/* Nonzero means FRAME_MESSAGE_BUF (selected_frame) is being used by
37 print. */
3b83d631 38
20a6c8d7 39extern int message_buf_print;
efa4ce8b 40
20a6c8d7 41\f
e3678b64 42/* The structure representing a frame. */
efa4ce8b
JB
43
44enum output_method
3b83d631
GM
45{
46 output_termcap,
47 output_x_window,
48 output_msdos_raw,
0e015153
RS
49 output_w32,
50 output_mac
3b83d631 51};
efa4ce8b 52
a3211441 53enum vertical_scroll_bar_type
3b83d631
GM
54{
55 vertical_scroll_bar_none,
56 vertical_scroll_bar_left,
57 vertical_scroll_bar_right
58};
a3211441 59
4d418fcc
KS
60enum text_cursor_kinds
61{
62 DEFAULT_CURSOR = -2,
63 NO_CURSOR = -1,
64 FILLED_BOX_CURSOR,
65 HOLLOW_BOX_CURSOR,
66 BAR_CURSOR,
67 HBAR_CURSOR
68};
69
e0f712ba 70#if !defined(MSDOS) && !defined(WINDOWSNT) && !defined(MAC_OS)
2d764c78
EZ
71
72#if !defined(HAVE_X_WINDOWS)
73
78709231
DL
74#define PIX_TYPE int
75
2d764c78
EZ
76/* A (mostly empty) x_output structure definition for building Emacs
77 on Unix and GNU/Linux without X support. */
78struct x_output
79{
80 PIX_TYPE background_pixel;
81 PIX_TYPE foreground_pixel;
82};
83
84#endif /* ! HAVE_X_WINDOWS */
85
3da48525
GM
86
87#define FRAME_FOREGROUND_PIXEL(f) ((f)->output_data.x->foreground_pixel)
88#define FRAME_BACKGROUND_PIXEL(f) ((f)->output_data.x->background_pixel)
89
2d764c78
EZ
90/* A structure describing a termcap frame display. */
91extern struct x_output tty_display;
92
e0f712ba 93#endif /* ! MSDOS && ! WINDOWSNT && ! MAC_OS */
2d764c78 94
ff11dfa1 95struct frame
efa4ce8b 96{
0c38c2f9 97 EMACS_INT size;
efa4ce8b
JB
98 struct Lisp_Vector *next;
99
21015f9c
RS
100 /* All Lisp_Object components must come first.
101 Only EMACS_INT values can be intermixed with them.
102 That ensures they are all aligned normally. */
efa4ce8b 103
fa5d1baa
RS
104 /* Name of this frame: a Lisp string. It is used for looking up resources,
105 as well as for the title in some cases. */
efa4ce8b
JB
106 Lisp_Object name;
107
e7f79a67
RS
108 /* The name to use for the icon, the last time
109 it was refreshed. nil means not explicitly specified. */
110 Lisp_Object icon_name;
111
fa5d1baa
RS
112 /* This is the frame title specified explicitly, if any.
113 Usually it is nil. */
114 Lisp_Object title;
115
eb8c3be9 116 /* The frame which should receive keystrokes that occur in this
46a5c487
JB
117 frame, or nil if they should go to the frame itself. This is
118 usually nil, but if the frame is minibufferless, we can use this
119 to redirect keystrokes to a surrogate minibuffer frame when
120 needed.
121
122 Note that a value of nil is different than having the field point
123 to the frame itself. Whenever the Fselect_frame function is used
124 to shift from one frame to the other, any redirections to the
125 original frame are shifted to the newly selected frame; if
126 focus_frame is nil, Fselect_frame will leave it alone. */
ff11dfa1 127 Lisp_Object focus_frame;
0f79a4ae 128
ff11dfa1
JB
129 /* This frame's root window. Every frame has one.
130 If the frame has only a minibuffer window, this is it.
131 Otherwise, if the frame has a minibuffer window, this is its sibling. */
efa4ce8b
JB
132 Lisp_Object root_window;
133
ff11dfa1
JB
134 /* This frame's selected window.
135 Each frame has its own window hierarchy
136 and one of the windows in it is selected within the frame.
137 The selected window of the selected frame is Emacs's selected window. */
efa4ce8b
JB
138 Lisp_Object selected_window;
139
ff11dfa1
JB
140 /* This frame's minibuffer window.
141 Most frames have their own minibuffer windows,
142 but only the selected frame's minibuffer window
efa4ce8b
JB
143 can actually appear to exist. */
144 Lisp_Object minibuffer_window;
145
ff11dfa1
JB
146 /* Parameter alist of this frame.
147 These are the parameters specified when creating the frame
148 or modified with modify-frame-parameters. */
efa4ce8b
JB
149 Lisp_Object param_alist;
150
177c0ea7 151 /* List of scroll bars on this frame.
20a6c8d7 152 Actually, we don't specify exactly what is stored here at all; the
a3c87d4e 153 scroll bar implementation code can use it to store anything it likes.
20a6c8d7
JB
154 This field is marked by the garbage collector. It is here
155 instead of in the `display' structure so that the garbage
156 collector doesn't need to look inside the window-system-dependent
157 structure. */
a3c87d4e
JB
158 Lisp_Object scroll_bars;
159 Lisp_Object condemned_scroll_bars;
20a6c8d7 160
ad6cd733
RS
161 /* Vector describing the items to display in the menu bar.
162 Each item has four elements in this vector.
163 They are KEY, STRING, SUBMAP, and HPOS.
164 (HPOS is not used in when the X toolkit is in use.)
165 There are four additional elements of nil at the end, to terminate. */
6d05db81
RS
166 Lisp_Object menu_bar_items;
167
fb63ba7d
RS
168 /* Alist of elements (FACE-NAME . FACE-VECTOR-DATA). */
169 Lisp_Object face_alist;
170
21015f9c
RS
171 /* A vector that records the entire structure of this frame's menu bar.
172 For the format of the data, see extensive comments in xmenu.c.
173 Only the X toolkit version uses this. */
174 Lisp_Object menu_bar_vector;
175 /* Number of elements in the vector that have meaningful data. */
176 EMACS_INT menu_bar_items_used;
177
178 /* Predicate for selecting buffers for other-buffer. */
179 Lisp_Object buffer_predicate;
180
375ff4f1
RS
181 /* List of buffers viewed in this frame, for other-buffer. */
182 Lisp_Object buffer_list;
183
3b83d631
GM
184 /* A dummy window used to display menu bars under X when no X
185 toolkit support is available. */
186 Lisp_Object menu_bar_window;
187
9ea173e8
GM
188 /* A window used to display the tool-bar of a frame. */
189 Lisp_Object tool_bar_window;
3b83d631 190
9ea173e8 191 /* Desired and current tool-bar items. */
e3303a23 192 Lisp_Object tool_bar_items;
3b83d631 193
9ea173e8
GM
194 /* Desired and current contents displayed in tool_bar_window. */
195 Lisp_Object desired_tool_bar_string, current_tool_bar_string;
3b83d631 196
375ff4f1 197 /* beyond here, there should be no more Lisp_Object components. */
21015f9c 198
3b83d631
GM
199 /* Cache of realized faces. */
200 struct face_cache *face_cache;
21015f9c 201
3b83d631
GM
202 /* A buffer to hold the frame's name. We can't use the Lisp
203 string's pointer (`name', above) because it might get relocated. */
bd601e2a
KH
204 char *namebuf;
205
3b83d631
GM
206 /* Glyph pool and matrix. */
207 struct glyph_pool *current_pool;
208 struct glyph_pool *desired_pool;
209 struct glyph_matrix *desired_matrix;
210 struct glyph_matrix *current_matrix;
211
212 /* 1 means that glyphs on this frame have been initialized so it can
213 be used for output. */
214 unsigned glyphs_initialized_p : 1;
21015f9c 215
488dd4c4
JD
216#if defined (USE_GTK)
217 /* Nonzero means using a tool bar that comes from the toolkit. */
218 int external_tool_bar;
219#endif
220
9ea173e8
GM
221 /* Margin at the top of the frame. Used to display the tool-bar. */
222 int tool_bar_lines;
3b83d631 223
e3303a23 224 int n_tool_bar_items;
177c0ea7 225
3b83d631
GM
226 /* A buffer for decode_mode_line. */
227 char *decode_mode_spec_buffer;
21015f9c
RS
228
229 /* See do_line_insertion_deletion_costs for info on these arrays. */
230 /* Cost of inserting 1 line on this frame */
231 int *insert_line_cost;
232 /* Cost of deleting 1 line on this frame */
233 int *delete_line_cost;
234 /* Cost of inserting n lines on this frame */
235 int *insert_n_lines_cost;
236 /* Cost of deleting n lines on this frame */
237 int *delete_n_lines_cost;
238
b45afe99
KS
239 /* Size of this frame, excluding fringes, scroll bars etc.,
240 in units of canonical characters. */
241 EMACS_INT text_lines, text_cols;
242
243 /* Total size of this frame (i.e. its native window), in units of
244 canonical characters. */
245 EMACS_INT total_lines, total_cols;
246
247 /* New text height and width for pending size change.
248 0 if no change pending. */
249 int new_text_lines, new_text_cols;
250
251 /* Pixel position of the frame window (x and y offsets in root window). */
252 int left_pos, top_pos;
253
254 /* Size of the frame window in pixels. */
255 int pixel_height, pixel_width;
256
257 /* These many pixels are the difference between the outer window (i.e. the
258 left and top of the window manager decoration) and FRAME_X_WINDOW. */
259 int x_pixels_diff, y_pixels_diff;
260
261 /* This is the gravity value for the specified window position. */
262 int win_gravity;
263
264 /* The geometry flags for this window. */
265 int size_hint_flags;
21015f9c 266
b45afe99
KS
267 /* Border width of the frame window as known by the (X) window system. */
268 int border_width;
269
270 /* Width of the internal border. This is a line of background color
271 just inside the window's border. When the frame is selected,
272 a highlighting is displayed inside the internal border. */
273 int internal_border_width;
274
275 /* Canonical X unit. Width of default font, in pixels. */
276 int column_width;
277
278 /* Canonical Y unit. Height of a line, in pixels. */
279 int line_height;
21015f9c 280
ff11dfa1 281 /* The output method says how the contents of this frame
efa4ce8b
JB
282 are displayed. It could be using termcap, or using an X window. */
283 enum output_method output_method;
284
285 /* A structure of auxiliary data used for displaying the contents.
785ee691 286 struct x_output is used for X window frames;
177c0ea7 287 it is defined in xterm.h.
fbd6baed 288 struct w32_output is used for W32 window frames;
efa7f0f9 289 it is defined in w32term.h. */
3b83d631
GM
290 union output_data
291 {
292 struct x_output *x;
293 struct w32_output *w32;
0e015153 294 struct mac_output *mac;
cf0fb540 295 EMACS_INT nothing;
3b83d631
GM
296 }
297 output_data;
efa4ce8b 298
b45afe99
KS
299 /* Total width of fringes reserved for drawing truncation bitmaps,
300 continuation bitmaps and alike. The width is in canonical char
301 units of the frame. This must currently be the case because window
302 sizes aren't pixel values. If it weren't the case, we wouldn't be
303 able to split windows horizontally nicely. */
304 int fringe_cols;
305
306 /* The extra width (in pixels) currently allotted for fringes. */
307 int left_fringe_width, right_fringe_width;
308
37ea66e1
KH
309#ifdef MULTI_KBOARD
310 /* A pointer to the kboard structure associated with this frame.
311 For termcap frames, this points to initial_kboard. For X frames,
312 it will be the same as display.x->display_info->kboard. */
fadab1e3 313 struct kboard *kboard;
37ea66e1
KH
314#endif
315
b45afe99
KS
316 /* See FULLSCREEN_ enum below */
317 int want_fullscreen;
318
6d05db81
RS
319 /* Number of lines of menu bar. */
320 int menu_bar_lines;
321
488dd4c4
JD
322#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (MAC_OS) \
323 || defined (USE_GTK)
9c95189b
RS
324 /* Nonzero means using a menu bar that comes from the X toolkit. */
325 int external_menu_bar;
326#endif
327
ff11dfa1 328 /* Nonzero if last attempt at redisplay on this frame was preempted. */
efa4ce8b
JB
329 char display_preempted;
330
a4659527
JB
331 /* visible is nonzero if the frame is currently displayed; we check
332 it to see if we should bother updating the frame's contents.
46a5c487 333 DON'T SET IT DIRECTLY; instead, use FRAME_SET_VISIBLE.
efa4ce8b 334
20a6c8d7
JB
335 Note that, since invisible frames aren't updated, whenever a
336 frame becomes visible again, it must be marked as garbaged. The
337 FRAME_SAMPLE_VISIBILITY macro takes care of this.
338
0969b893
GV
339 On Windows NT/9X, to avoid wasting effort updating visible frames
340 that are actually completely obscured by other windows on the
341 display, we bend the meaning of visible slightly: if greater than
342 1, then the frame is obscured - we still consider it to be
343 "visible" as seen from lisp, but we don't bother updating it. We
344 must take care to garbage the frame when it ceaces to be obscured
345 though. Note that these semantics are only used on NT/9X.
346
a4659527
JB
347 iconified is nonzero if the frame is currently iconified.
348
349 Asynchronous input handlers should NOT change these directly;
350 instead, they should change async_visible or async_iconified, and
351 let the FRAME_SAMPLE_VISIBILITY macro set visible and iconified
352 at the next redisplay.
353
354 These should probably be considered read-only by everyone except
355 FRAME_SAMPLE_VISIBILITY.
356
74cc2959 357 These two are mutually exclusive. They might both be zero, if the
a4659527
JB
358 frame has been made invisible without an icon. */
359 char visible, iconified;
360
361 /* Asynchronous input handlers change these, and
362 FRAME_SAMPLE_VISIBILITY copies them into visible and iconified.
363 See FRAME_SAMPLE_VISIBILITY, below. */
b975254e 364 volatile char async_visible, async_iconified;
efa4ce8b 365
ff11dfa1 366 /* Nonzero if this frame should be redrawn. */
b975254e 367 volatile char garbaged;
efa4ce8b 368
ff11dfa1
JB
369 /* True if frame actually has a minibuffer window on it.
370 0 if using a minibuffer window that isn't on this frame. */
efa4ce8b 371 char has_minibuffer;
177c0ea7 372
ff11dfa1 373 /* 0 means, if this frame has just one window,
efa4ce8b
JB
374 show no modeline for that window. */
375 char wants_modeline;
376
46a5c487 377 /* Non-zero if the hardware device this frame is displaying on can
a3c87d4e
JB
378 support scroll bars. */
379 char can_have_scroll_bars;
46a5c487 380
a3c87d4e 381 /* If can_have_scroll_bars is non-zero, this is non-zero if we should
46a5c487 382 actually display them on this frame. */
a3211441 383 enum vertical_scroll_bar_type vertical_scroll_bar_type;
46a5c487 384
4d418fcc
KS
385 /* What kind of text cursor should we draw in the future?
386 This should always be filled_box_cursor or bar_cursor. */
387 enum text_cursor_kinds desired_cursor;
388
389 /* Width of bar cursor (if we are using that). */
390 int cursor_width;
391
392 /* What kind of text cursor should we draw when the cursor blinks off?
393 This can be filled_box_cursor or bar_cursor or no_cursor. */
394 enum text_cursor_kinds blink_off_cursor;
395
396 /* Width of bar cursor (if we are using that) for blink-off state. */
397 int blink_off_cursor_width;
398
ff11dfa1 399 /* Non-0 means raise this frame to the top of the heap when selected. */
efa4ce8b
JB
400 char auto_raise;
401
ff11dfa1 402 /* Non-0 means lower this frame to the bottom of the stack when left. */
efa4ce8b
JB
403 char auto_lower;
404
ff11dfa1 405 /* True if frame's root window can't be split. */
efa4ce8b
JB
406 char no_split;
407
fbfed6f0
JB
408 /* If this is set, then Emacs won't change the frame name to indicate
409 the current buffer, etcetera. If the user explicitly sets the frame
410 name, this gets set. If the user sets the name to Qnil, this is
411 cleared. */
412 char explicit_name;
413
adc12f0f
RS
414 /* Nonzero if size of some window on this frame has changed. */
415 char window_sizes_changed;
416
ff11dfa1 417 /* Storage for messages to this frame. */
efa4ce8b
JB
418 char *message_buf;
419
420 /* Nonnegative if current redisplay should not do scroll computation
421 for lines beyond a certain vpos. This is the vpos. */
422 int scroll_bottom_vpos;
8d6de7ce 423
b45afe99
KS
424 /* Configured width of the scroll bar, in pixels and in characters.
425 config_scroll_bar_cols tracks config_scroll_bar_width if the
426 latter is positive; a zero value in config_scroll_bar_width means
427 to compute the actual width on the fly, using config_scroll_bar_cols
428 and the current font width. */
429 int config_scroll_bar_width;
430 int config_scroll_bar_cols;
431
432 /* The size of the extra width currently allotted for vertical
433 scroll bars in this frame, in pixels. */
434 int scroll_bar_actual_width;
95b999aa
RS
435
436 /* The baud rate that was used to calculate costs for this frame. */
437 int cost_calculation_baud_rate;
6462918c
KH
438
439 /* Nonzero if the mouse has moved on this display
440 since the last time we checked. */
441 char mouse_moved;
b61cbba3
GM
442
443 /* Exponent for gamma correction of colors. 1/(VIEWING_GAMMA *
444 SCREEN_GAMMA) where viewing_gamma is 0.4545 and SCREEN_GAMMA is a
445 frame parameter. 0 means don't do gamma correction. */
446 double gamma;
d1738c45
GM
447
448 /* Additional space to put between text lines on this frame. */
449 int extra_line_spacing;
f1c69c61
GM
450
451 /* Set to non-zero in change_frame_size when size of frame changed
452 Clear the frame in clear_garbaged_frames if set. */
453 unsigned resized_p : 1;
efa4ce8b
JB
454};
455
e3678b64 456#ifdef MULTI_KBOARD
37ea66e1
KH
457#define FRAME_KBOARD(f) ((f)->kboard)
458#else
459#define FRAME_KBOARD(f) (&the_only_kboard)
460#endif
461
ff11dfa1
JB
462typedef struct frame *FRAME_PTR;
463
8801a864 464#define XFRAME(p) (eassert (GC_FRAMEP(p)),(struct frame *) XPNTR (p))
aac03cca 465#define XSETFRAME(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_FRAME))
ff11dfa1 466
cea6021b 467/* Given a window, return its frame as a Lisp_Object. */
ff11dfa1
JB
468#define WINDOW_FRAME(w) (w)->frame
469
cea6021b
RS
470/* Test a frame for particular kinds of display methods. */
471#define FRAME_TERMCAP_P(f) ((f)->output_method == output_termcap)
efa7f0f9 472#define FRAME_X_P(f) ((f)->output_method == output_x_window)
fbd6baed 473#define FRAME_W32_P(f) ((f)->output_method == output_w32)
6f181713 474#define FRAME_MSDOS_P(f) ((f)->output_method == output_msdos_raw)
0e015153 475#define FRAME_MAC_P(f) ((f)->output_method == output_mac)
efa7f0f9
GV
476
477/* FRAME_WINDOW_P tests whether the frame is a window, and is
478 defined to be the predicate for the window system being used. */
3b83d631 479
efa7f0f9
GV
480#ifdef HAVE_X_WINDOWS
481#define FRAME_WINDOW_P(f) FRAME_X_P (f)
482#endif
483#ifdef HAVE_NTGUI
fbd6baed 484#define FRAME_WINDOW_P(f) FRAME_W32_P (f)
efa7f0f9 485#endif
e0f712ba 486#ifdef MAC_OS
0e015153
RS
487#define FRAME_WINDOW_P(f) FRAME_MAC_P (f)
488#endif
7651b07e
RS
489#ifndef FRAME_WINDOW_P
490#define FRAME_WINDOW_P(f) (0)
491#endif
efa7f0f9 492
cea6021b 493/* Nonzero if frame F is still alive (not deleted). */
785ee691 494#define FRAME_LIVE_P(f) ((f)->output_data.nothing != 0)
cea6021b
RS
495
496/* Nonzero if frame F is a minibuffer-only frame. */
ff11dfa1
JB
497#define FRAME_MINIBUF_ONLY_P(f) \
498 EQ (FRAME_ROOT_WINDOW (f), FRAME_MINIBUF_WINDOW (f))
cea6021b
RS
499
500/* Nonzero if frame F contains a minibuffer window.
501 (If this is 0, F must use some other minibuffer window.) */
10a4cc63 502#define FRAME_HAS_MINIBUF_P(f) ((f)->has_minibuffer)
cea6021b 503
b45afe99
KS
504/* Pixel height of frame F, including non-toolkit menu bar and
505 non-toolkit tool bar lines. */
506#define FRAME_PIXEL_HEIGHT(f) ((f)->pixel_height)
507
508/* Pixel width of frame F. */
509#define FRAME_PIXEL_WIDTH(f) ((f)->pixel_width)
510
511/* Height of frame F, measured in canonical lines, including
512 non-toolkit menu bar and non-toolkit tool bar lines. */
513#define FRAME_LINES(f) (f)->text_lines
514
515/* Width of frame F, measured in canonical character columns,
cea6021b 516 not including scroll bars if any. */
b45afe99 517#define FRAME_COLS(f) (f)->text_cols
cea6021b
RS
518
519/* Number of lines of frame F used for menu bar.
520 This is relevant on terminal frames and on
521 X Windows when not using the X toolkit.
b45afe99 522 These lines are counted in FRAME_LINES. */
6d05db81 523#define FRAME_MENU_BAR_LINES(f) (f)->menu_bar_lines
cea6021b 524
488dd4c4
JD
525/* Nonzero if this frame should display a tool bar
526 in a way that does not use any text lines. */
527#if defined (USE_GTK)
528#define FRAME_EXTERNAL_TOOL_BAR(f) (f)->external_tool_bar
529#else
530#define FRAME_EXTERNAL_TOOL_BAR(f) 0
531#endif
532
9ea173e8 533/* Number of lines of frame F used for the tool-bar. */
3b83d631 534
9ea173e8 535#define FRAME_TOOL_BAR_LINES(f) (f)->tool_bar_lines
3b83d631 536
488dd4c4 537
3b83d631
GM
538/* Lines above the top-most window in frame F. */
539
540#define FRAME_TOP_MARGIN(F) \
9ea173e8 541 (FRAME_MENU_BAR_LINES (F) + FRAME_TOOL_BAR_LINES (F))
3b83d631 542
cea6021b
RS
543/* Nonzero if this frame should display a menu bar
544 in a way that does not use any text lines. */
488dd4c4
JD
545#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) || defined (MAC_OS) \
546 || defined (USE_GTK)
9c95189b 547#define FRAME_EXTERNAL_MENU_BAR(f) (f)->external_menu_bar
4c8888a0
RS
548#else
549#define FRAME_EXTERNAL_MENU_BAR(f) 0
550#endif
46a5c487 551#define FRAME_VISIBLE_P(f) ((f)->visible != 0)
cea6021b
RS
552
553/* Nonzero if frame F is currently visible but hidden. */
0969b893 554#define FRAME_OBSCURED_P(f) ((f)->visible > 1)
cea6021b
RS
555
556/* Nonzero if frame F is currently iconified. */
557#define FRAME_ICONIFIED_P(f) (f)->iconified
558
46a5c487
JB
559#define FRAME_SET_VISIBLE(f,p) \
560 ((f)->async_visible = (p), FRAME_SAMPLE_VISIBILITY (f))
ff11dfa1
JB
561#define SET_FRAME_GARBAGED(f) (frame_garbaged = 1, f->garbaged = 1)
562#define FRAME_GARBAGED_P(f) (f)->garbaged
cea6021b
RS
563
564/* Nonzero means do not allow splitting this frame's window. */
ff11dfa1 565#define FRAME_NO_SPLIT_P(f) (f)->no_split
cea6021b
RS
566
567/* Not really implemented. */
ff11dfa1 568#define FRAME_WANTS_MODELINE_P(f) (f)->wants_modeline
cea6021b
RS
569
570/* Nonzero if a size change has been requested for frame F
571 but not yet really put into effect. This can be true temporarily
572 when an X event comes in at a bad time. */
adc12f0f 573#define FRAME_WINDOW_SIZES_CHANGED(f) (f)->window_sizes_changed
cea6021b
RS
574
575/* The minibuffer window of frame F, if it has one; otherwise nil. */
ff11dfa1 576#define FRAME_MINIBUF_WINDOW(f) (f)->minibuffer_window
cea6021b
RS
577
578/* The root window of the window tree of frame F. */
ff11dfa1 579#define FRAME_ROOT_WINDOW(f) (f)->root_window
cea6021b
RS
580
581/* The currently selected window of the window tree of frame F. */
ff11dfa1 582#define FRAME_SELECTED_WINDOW(f) (f)->selected_window
cea6021b 583
177c0ea7
JB
584#define FRAME_INSERT_COST(f) (f)->insert_line_cost
585#define FRAME_DELETE_COST(f) (f)->delete_line_cost
ff11dfa1
JB
586#define FRAME_INSERTN_COST(f) (f)->insert_n_lines_cost
587#define FRAME_DELETEN_COST(f) (f)->delete_n_lines_cost
588#define FRAME_MESSAGE_BUF(f) (f)->message_buf
589#define FRAME_SCROLL_BOTTOM_VPOS(f) (f)->scroll_bottom_vpos
590#define FRAME_FOCUS_FRAME(f) (f)->focus_frame
cea6021b
RS
591
592/* Nonzero if frame F supports scroll bars.
593 If this is zero, then it is impossible to enable scroll bars
594 on frame F. */
a3c87d4e 595#define FRAME_CAN_HAVE_SCROLL_BARS(f) ((f)->can_have_scroll_bars)
cea6021b
RS
596
597/* This frame slot says whether scroll bars are currently enabled for frame F,
598 and which side they are on. */
a3211441
RS
599#define FRAME_VERTICAL_SCROLL_BAR_TYPE(f) ((f)->vertical_scroll_bar_type)
600#define FRAME_HAS_VERTICAL_SCROLL_BARS(f) \
601 ((f)->vertical_scroll_bar_type != vertical_scroll_bar_none)
602#define FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT(f) \
603 ((f)->vertical_scroll_bar_type == vertical_scroll_bar_left)
604#define FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT(f) \
605 ((f)->vertical_scroll_bar_type == vertical_scroll_bar_right)
cea6021b
RS
606
607/* Width that a scroll bar in frame F should have, if there is one.
608 Measured in pixels.
609 If scroll bars are turned off, this is still nonzero. */
b45afe99 610#define FRAME_CONFIG_SCROLL_BAR_WIDTH(f) ((f)->config_scroll_bar_width)
cea6021b
RS
611
612/* Width that a scroll bar in frame F should have, if there is one.
613 Measured in columns (characters).
614 If scroll bars are turned off, this is still nonzero. */
b45afe99 615#define FRAME_CONFIG_SCROLL_BAR_COLS(f) ((f)->config_scroll_bar_cols)
cea6021b
RS
616
617/* Width of a scroll bar in frame F, measured in columns (characters),
7d81cf83
GM
618 but only if scroll bars are on the left. If scroll bars are on
619 the right in this frame, or there are no scroll bars, value is 0. */
620
b45afe99 621#define FRAME_LEFT_SCROLL_BAR_COLS(f) \
7d81cf83 622 (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT (f) \
b45afe99 623 ? FRAME_CONFIG_SCROLL_BAR_COLS (f) \
7d81cf83
GM
624 : 0)
625
b45afe99
KS
626/* Width of a left scroll bar in frame F, measured in pixels */
627
628#define FRAME_LEFT_SCROLL_BAR_AREA_WIDTH(f) \
629 (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT (f) \
630 ? (FRAME_CONFIG_SCROLL_BAR_COLS (f) * FRAME_COLUMN_WIDTH (f)) \
631 : 0)
632
7d81cf83
GM
633/* Width of a scroll bar in frame F, measured in columns (characters),
634 but only if scroll bars are on the right. If scroll bars are on
635 the left in this frame, or there are no scroll bars, value is 0. */
636
b45afe99 637#define FRAME_RIGHT_SCROLL_BAR_COLS(f) \
7d81cf83 638 (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT (f) \
b45afe99 639 ? FRAME_CONFIG_SCROLL_BAR_COLS (f) \
a3211441 640 : 0)
cea6021b 641
b45afe99
KS
642/* Width of a right scroll bar area in frame F, measured in pixels */
643
644#define FRAME_RIGHT_SCROLL_BAR_AREA_WIDTH(f) \
645 (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT (f) \
646 ? (FRAME_CONFIG_SCROLL_BAR_COLS (f) * FRAME_COLUMN_WIDTH (f)) \
647 : 0)
648
649/* Actual width of a scroll bar in frame F, measured in columns. */
650
651#define FRAME_SCROLL_BAR_COLS(f) \
652 (FRAME_HAS_VERTICAL_SCROLL_BARS (f) \
653 ? FRAME_CONFIG_SCROLL_BAR_COLS (f) \
a3211441 654 : 0)
cea6021b 655
b45afe99
KS
656/* Actual width of a scroll bar area in frame F, measured in pixels. */
657
658#define FRAME_SCROLL_BAR_AREA_WIDTH(f) \
659 (FRAME_HAS_VERTICAL_SCROLL_BARS (f) \
660 ? (FRAME_CONFIG_SCROLL_BAR_COLS (f) * FRAME_COLUMN_WIDTH (f)) \
661 : 0)
662
cea6021b
RS
663/* Total width of frame F, in columns (characters),
664 including the width used by scroll bars if any. */
b45afe99
KS
665
666#define FRAME_TOTAL_COLS(f) ((f)->total_cols)
cea6021b
RS
667
668/* Set the width of frame F to VAL.
669 VAL is the width of a full-frame window,
b45afe99
KS
670 not including scroll bars and fringes. */
671
672#define SET_FRAME_COLS(f, val) \
673 (FRAME_COLS (f) = (val), \
674 (f)->total_cols = FRAME_TOTAL_COLS_ARG (f, FRAME_COLS (f)))
cea6021b
RS
675
676/* Given a value WIDTH for frame F's nominal width,
b45afe99
KS
677 return the value that FRAME_TOTAL_COLS should have. */
678
679#define FRAME_TOTAL_COLS_ARG(f, width) \
3b83d631 680 ((width) \
b45afe99 681 + FRAME_SCROLL_BAR_COLS (f) \
986f10ad 682 + FRAME_FRINGE_COLS (f))
cea6021b 683
4ff34795 684/* Maximum + 1 legitimate value for FRAME_CURSOR_X. */
b45afe99 685
4ff34795 686#define FRAME_CURSOR_X_LIMIT(f) \
b45afe99 687 (FRAME_COLS (f) + FRAME_LEFT_SCROLL_BAR_COLS (f))
cea6021b
RS
688
689/* Nonzero if frame F has scroll bars. */
b45afe99 690
a3c87d4e 691#define FRAME_SCROLL_BARS(f) ((f)->scroll_bars)
cea6021b 692
a3c87d4e 693#define FRAME_CONDEMNED_SCROLL_BARS(f) ((f)->condemned_scroll_bars)
6d05db81 694#define FRAME_MENU_BAR_ITEMS(f) ((f)->menu_bar_items)
95b999aa 695#define FRAME_COST_BAUD_RATE(f) ((f)->cost_calculation_baud_rate)
81d00831 696
4d418fcc
KS
697#define FRAME_DESIRED_CURSOR(f) ((f)->desired_cursor)
698#define FRAME_BLINK_OFF_CURSOR(f) ((f)->blink_off_cursor)
699#define FRAME_CURSOR_WIDTH(f) ((f)->cursor_width)
700#define FRAME_BLINK_OFF_CURSOR_WIDTH(f) ((f)->blink_off_cursor_width)
701
3b83d631
GM
702/* Return a pointer to the face cache of frame F. */
703
704#define FRAME_FACE_CACHE(F) (F)->face_cache
705
81d00831
KH
706/* Return the size of message_buf of the frame F. We multiply the
707 width of the frame by 4 because multi-byte form may require at most
708 4-byte for a character. */
177c0ea7 709
b45afe99 710#define FRAME_MESSAGE_BUF_SIZE(f) (((int) FRAME_COLS (f)) * 4)
ff11dfa1 711
a4659527
JB
712/* Emacs's redisplay code could become confused if a frame's
713 visibility changes at arbitrary times. For example, if a frame is
714 visible while the desired glyphs are being built, but becomes
715 invisible before they are updated, then some rows of the
716 desired_glyphs will be left marked as enabled after redisplay is
717 complete, which should never happen. The next time the frame
718 becomes visible, redisplay will probably barf.
719
720 Currently, there are no similar situations involving iconified, but
721 the principle is the same.
722
723 So instead of having asynchronous input handlers directly set and
724 clear the frame's visibility and iconification flags, they just set
725 the async_visible and async_iconified flags; the redisplay code
726 calls the FRAME_SAMPLE_VISIBILITY macro before doing any redisplay,
727 which sets visible and iconified from their asynchronous
46a5c487
JB
728 counterparts.
729
20a6c8d7
JB
730 Synchronous code must use the FRAME_SET_VISIBLE macro.
731
732 Also, if a frame used to be invisible, but has just become visible,
733 it must be marked as garbaged, since redisplay hasn't been keeping
734 up its contents. */
177c0ea7 735
a4659527 736#define FRAME_SAMPLE_VISIBILITY(f) \
0969b893
GV
737 (((f)->async_visible && (f)->visible != (f)->async_visible) ? \
738 SET_FRAME_GARBAGED (f) : 0, \
20a6c8d7 739 (f)->visible = (f)->async_visible, \
a4659527
JB
740 (f)->iconified = (f)->async_iconified)
741
00a2cef7 742#define CHECK_FRAME(x) \
c3df1ad9
GM
743 do { \
744 if (! FRAMEP (x)) \
745 x = wrong_type_argument (Qframep, (x)); \
746 } while (0)
265a9e55 747
00a2cef7 748#define CHECK_LIVE_FRAME(x) \
c3df1ad9
GM
749 do { \
750 if (! FRAMEP (x) \
751 || ! FRAME_LIVE_P (XFRAME (x))) \
752 x = wrong_type_argument (Qframe_live_p, (x)); \
753 } while (0)
265a9e55 754
ff11dfa1
JB
755/* FOR_EACH_FRAME (LIST_VAR, FRAME_VAR) followed by a statement is a
756 `for' loop which iterates over the elements of Vframe_list. The
35f56f96 757 loop will set FRAME_VAR, a Lisp_Object, to each frame in
ff11dfa1 758 Vframe_list in succession and execute the statement. LIST_VAR
35f56f96 759 should be a Lisp_Object too; it is used to iterate through the
177c0ea7 760 Vframe_list.
e5d77022 761
e3678b64
KH
762 This macro is a holdover from a time when multiple frames weren't always
763 supported. An alternate definition of the macro would expand to
764 something which executes the statement once. */
3b83d631 765
ff11dfa1
JB
766#define FOR_EACH_FRAME(list_var, frame_var) \
767 for ((list_var) = Vframe_list; \
e5d77022 768 (CONSP (list_var) \
ee88f64d
KR
769 && (frame_var = XCAR (list_var), 1)); \
770 list_var = XCDR (list_var))
e5d77022
JB
771
772
5e02ce11 773extern Lisp_Object Qframep, Qframe_live_p;
efa4ce8b 774
ff11dfa1 775extern struct frame *last_nonminibuf_frame;
efa4ce8b 776
fd6a330f
AS
777extern struct frame *make_terminal_frame P_ ((void));
778extern struct frame *make_frame P_ ((int));
c9e5d3d1 779#ifdef HAVE_WINDOW_SYSTEM
fd6a330f
AS
780extern struct frame *make_minibuffer_frame P_ ((void));
781extern struct frame *make_frame_without_minibuffer P_ ((Lisp_Object,
782 struct kboard *,
783 Lisp_Object));
c9e5d3d1 784#endif /* HAVE_WINDOW_SYSTEM */
fd6a330f 785extern int other_visible_frames P_ ((struct frame *));
efa4ce8b 786
ff11dfa1
JB
787extern Lisp_Object Vframe_list;
788extern Lisp_Object Vdefault_frame_alist;
efa4ce8b 789
ff11dfa1 790extern Lisp_Object Vterminal_frame;
0349c9af
KS
791
792extern Lisp_Object Vmouse_highlight;
b5fea23e
DL
793
794enum text_cursor_kinds get_specified_cursor_type P_ ((Lisp_Object, int *));
795enum text_cursor_kinds get_window_cursor_type P_ ((struct window *, int *, int *));
efa4ce8b 796\f
650afd94
GM
797/* The currently selected frame. */
798
799extern Lisp_Object selected_frame;
800
801/* Value is a pointer to the selected frame. If the selected frame
b975254e 802 isn't live, abort. */
650afd94
GM
803
804#define SELECTED_FRAME() \
805 ((FRAMEP (selected_frame) \
806 && FRAME_LIVE_P (XFRAME (selected_frame))) \
807 ? XFRAME (selected_frame) \
e1ef1fb2 808 : (abort (), (struct frame *) 0))
3b83d631
GM
809
810\f
811/***********************************************************************
812 Display-related Macros
813 ***********************************************************************/
814
b45afe99
KS
815/* Canonical y-unit on frame F.
816 This value currently equals the line height of the frame (which is
817 the height of the default font of F). */
818
819#define FRAME_LINE_HEIGHT(F) ((F)->line_height)
3b83d631 820
b45afe99
KS
821/* Canonical x-unit on frame F.
822 This value currently equals the width of the default font of F. */
3b83d631 823
b45afe99 824#define FRAME_COLUMN_WIDTH(F) ((F)->column_width)
3b83d631 825
3b83d631
GM
826
827/* Pixel width of areas used to display truncation marks, continuation
5cb26370 828 marks, overlay arrows. This is 0 for terminal frames. */
3b83d631
GM
829
830#ifdef HAVE_WINDOW_SYSTEM
aa5b8e15 831
b45afe99
KS
832/* Total width of fringes reserved for drawing truncation bitmaps,
833 continuation bitmaps and alike. The width is in canonical char
834 units of the frame. This must currently be the case because window
835 sizes aren't pixel values. If it weren't the case, we wouldn't be
836 able to split windows horizontally nicely. */
837
838#define FRAME_FRINGE_COLS(F) ((F)->fringe_cols)
839
840/* Pixel-width of the left and right fringe. */
841
842#define FRAME_LEFT_FRINGE_WIDTH(F) ((F)->left_fringe_width)
843#define FRAME_RIGHT_FRINGE_WIDTH(F) ((F)->right_fringe_width)
844
845/* Total width of fringes in pixels. */
846
847#define FRAME_TOTAL_FRINGE_WIDTH(F) \
848 (FRAME_LEFT_FRINGE_WIDTH (F) + FRAME_RIGHT_FRINGE_WIDTH (F))
849
850
851/* Pixel-width of internal border lines */
852
853#define FRAME_INTERNAL_BORDER_WIDTH(F) ((F)->internal_border_width)
177c0ea7 854
aa5b8e15
GM
855#else /* not HAVE_WINDOW_SYSTEM */
856
986f10ad 857#define FRAME_FRINGE_COLS(F) 0
b45afe99 858#define FRAME_TOTAL_FRINGE_WIDTH(F) 0
986f10ad 859#define FRAME_LEFT_FRINGE_WIDTH(F) 0
8432bb78 860#define FRAME_RIGHT_FRINGE_WIDTH(F) 0
b45afe99 861#define FRAME_INTERNAL_BORDER_WIDTH(F) 0
aa5b8e15
GM
862
863#endif /* not HAVE_WINDOW_SYSTEM */
177c0ea7 864
3b83d631
GM
865
866
867\f
868/***********************************************************************
869 Conversion between canonical units and pixels
870 ***********************************************************************/
871
b45afe99
KS
872/* Canonical x-values are fractions of FRAME_COLUMN_WIDTH, canonical
873 y-unit are fractions of FRAME_LINE_HEIGHT of a frame. Both are
874 represented as Lisp numbers, i.e. integers or floats. */
3b83d631
GM
875
876/* Convert canonical value X to pixels. F is the frame whose
877 canonical char width is to be used. X must be a Lisp integer or
878 float. Value is a C integer. */
177c0ea7 879
b45afe99 880#define FRAME_PIXEL_X_FROM_CANON_X(F, X) \
3b83d631 881 (INTEGERP (X) \
b45afe99
KS
882 ? XINT (X) * FRAME_COLUMN_WIDTH (F) \
883 : (int) (XFLOAT_DATA (X) * FRAME_COLUMN_WIDTH (F)))
177c0ea7 884
3b83d631
GM
885/* Convert canonical value Y to pixels. F is the frame whose
886 canonical character height is to be used. X must be a Lisp integer
887 or float. Value is a C integer. */
177c0ea7 888
b45afe99 889#define FRAME_PIXEL_Y_FROM_CANON_Y(F, Y) \
3b83d631 890 (INTEGERP (Y) \
b45afe99
KS
891 ? XINT (Y) * FRAME_LINE_HEIGHT (F) \
892 : (int) (XFLOAT_DATA (Y) * FRAME_LINE_HEIGHT (F)))
3b83d631
GM
893
894/* Convert pixel-value X to canonical units. F is the frame whose
895 canonical character width is to be used. X is a C integer. Result
896 is a Lisp float if X is not a multiple of the canon width,
897 otherwise it's a Lisp integer. */
898
b45afe99
KS
899#define FRAME_CANON_X_FROM_PIXEL_X(F, X) \
900 ((X) % FRAME_COLUMN_WIDTH (F) != 0 \
901 ? make_float ((double) (X) / FRAME_COLUMN_WIDTH (F)) \
902 : make_number ((X) / FRAME_COLUMN_WIDTH (F)))
3b83d631
GM
903
904/* Convert pixel-value Y to canonical units. F is the frame whose
905 canonical character height is to be used. Y is a C integer.
906 Result is a Lisp float if Y is not a multiple of the canon width,
907 otherwise it's a Lisp integer. */
908
b45afe99
KS
909#define FRAME_CANON_Y_FROM_PIXEL_Y(F, Y) \
910 ((Y) % FRAME_LINE_HEIGHT (F) \
911 ? make_float ((double) (Y) / FRAME_LINE_HEIGHT (F)) \
912 : make_number ((Y) / FRAME_LINE_HEIGHT (F)))
913
914
915\f
916/* Manipulating pixel sizes and character sizes.
917 Knowledge of which factors affect the overall size of the window should
918 be hidden in these macros, if that's possible.
919
920 Return the upper/left pixel position of the character cell on frame F
921 at ROW/COL. */
922
923#define FRAME_LINE_TO_PIXEL_Y(f, row) \
924 (FRAME_INTERNAL_BORDER_WIDTH (f) \
925 + (row) * FRAME_LINE_HEIGHT (f))
926
927#define FRAME_COL_TO_PIXEL_X(f, col) \
928 (FRAME_INTERNAL_BORDER_WIDTH (f) \
929 + (col) * FRAME_COLUMN_WIDTH (f))
930
931/* Return the pixel width/height of frame F if it has
932 COLS columns/LINES rows. */
933
934#define FRAME_TEXT_COLS_TO_PIXEL_WIDTH(f, cols) \
935 (FRAME_COL_TO_PIXEL_X (f, cols) \
936 + (f)->scroll_bar_actual_width \
937 + FRAME_TOTAL_FRINGE_WIDTH (f) \
938 + FRAME_INTERNAL_BORDER_WIDTH (f))
939
940#define FRAME_TEXT_LINES_TO_PIXEL_HEIGHT(f, lines) \
941 (FRAME_LINE_TO_PIXEL_Y (f, lines) \
942 + FRAME_INTERNAL_BORDER_WIDTH (f))
943
944
945/* Return the row/column (zero-based) of the character cell containing
946 the pixel on FRAME at Y/X. */
947
948#define FRAME_PIXEL_Y_TO_LINE(f, y) \
949 (((y) - FRAME_INTERNAL_BORDER_WIDTH (f)) \
950 / FRAME_LINE_HEIGHT (f))
951
952#define FRAME_PIXEL_X_TO_COL(f, x) \
953 (((x) - FRAME_INTERNAL_BORDER_WIDTH (f)) \
954 / FRAME_COLUMN_WIDTH (f))
955
956/* How many columns/rows of text can we fit in WIDTH/HEIGHT pixels on
957 frame F? */
958
959#define FRAME_PIXEL_WIDTH_TO_TEXT_COLS(f, width) \
960 (FRAME_PIXEL_X_TO_COL (f, ((width) \
961 - FRAME_INTERNAL_BORDER_WIDTH (f) \
962 - FRAME_TOTAL_FRINGE_WIDTH (f) \
963 - (f)->scroll_bar_actual_width)))
964
965#define FRAME_PIXEL_HEIGHT_TO_TEXT_LINES(f, height) \
966 (FRAME_PIXEL_Y_TO_LINE (f, ((height) \
967 - FRAME_INTERNAL_BORDER_WIDTH (f))))
177c0ea7 968
5e02ce11
KS
969
970/***********************************************************************
971 Frame Parameters
972 ***********************************************************************/
973
974extern Lisp_Object Qauto_raise, Qauto_lower;
975extern Lisp_Object Qborder_color, Qborder_width;
976extern Lisp_Object Qbuffer_predicate, Qbuffer_list;
977extern Lisp_Object Qcursor_color, Qcursor_type;
978extern Lisp_Object Qfont;
979extern Lisp_Object Qbackground_color, Qforeground_color;
980extern Lisp_Object Qicon, Qicon_name, Qicon_type, Qicon_left, Qicon_top;
981extern Lisp_Object Qinternal_border_width;
982extern Lisp_Object Qmenu_bar_lines, Qtool_bar_lines;
983extern Lisp_Object Qmouse_color;
984extern Lisp_Object Qname, Qtitle;
985extern Lisp_Object Qparent_id;
986extern Lisp_Object Qunsplittable, Qvisibility;
987extern Lisp_Object Qscroll_bar_width, Qvertical_scroll_bars;
988extern Lisp_Object Qscroll_bar_foreground, Qscroll_bar_background;
989extern Lisp_Object Qscreen_gamma;
990extern Lisp_Object Qline_spacing;
991extern Lisp_Object Qwait_for_wm;
992extern Lisp_Object Qfullscreen;
993
994extern Lisp_Object Qleft_fringe, Qright_fringe;
995extern Lisp_Object Qheight, Qwidth;
996extern Lisp_Object Qminibuffer, Qmodeline;
997extern Lisp_Object Qonly;
998extern Lisp_Object Qx, Qw32, Qmac, Qpc;
999extern Lisp_Object Qvisible;
1000extern Lisp_Object Qdisplay_type;
1001extern Lisp_Object Qbackground_mode;
1002
1003extern Lisp_Object Qx_resource_name;
1004
1005extern Lisp_Object Qleft, Qright, Qtop, Qbox;
1006extern Lisp_Object Qdisplay;
1007
1008#ifdef HAVE_WINDOW_SYSTEM
1009
1010/* The class of this X application. */
1011#define EMACS_CLASS "Emacs"
1012
1013enum
1014{
1015 /* Values used as a bit mask, BOTH == WIDTH | HEIGHT. */
1016 FULLSCREEN_NONE = 0,
1017 FULLSCREEN_WIDTH = 1,
1018 FULLSCREEN_HEIGHT = 2,
1019 FULLSCREEN_BOTH = 3,
1020 FULLSCREEN_WAIT = 4,
1021 FULLSCREEN_MOVE_WAIT = 8,
1022};
1023
1024
1025/* These are in xterm.c, w32term.c, etc. */
1026
1027extern void x_set_scroll_bar_default_width P_ ((struct frame *));
1028extern void x_set_offset P_ ((struct frame *, int, int, int));
1029extern void x_wm_set_icon_position P_ ((struct frame *, int, int));
1030
1031extern Lisp_Object x_new_font P_ ((struct frame *, char *));
1032extern Lisp_Object x_new_fontset P_ ((struct frame *, char *));
1033
1034
1035/* These are in frame.c */
1036
1037extern Lisp_Object Vx_resource_name;
1038extern Lisp_Object Vx_resource_class;
1039
1040
1041extern Lisp_Object Qface_set_after_frame_default;
1042
1043extern void x_fullscreen_adjust P_ ((struct frame *f, int *, int *,
1044 int *, int *));
1045
1046extern void x_set_frame_parameters P_ ((struct frame *, Lisp_Object));
1047extern void x_report_frame_params P_ ((struct frame *, Lisp_Object *));
1048
1049extern void x_set_fullscreen P_ ((struct frame *, Lisp_Object, Lisp_Object));
1050extern void x_set_line_spacing P_ ((struct frame *, Lisp_Object, Lisp_Object));
1051extern void x_set_screen_gamma P_ ((struct frame *, Lisp_Object, Lisp_Object));
1052extern void x_set_font P_ ((struct frame *, Lisp_Object, Lisp_Object));
1053extern void x_set_fringe_width P_ ((struct frame *, Lisp_Object, Lisp_Object));
1054extern void x_set_border_width P_ ((struct frame *, Lisp_Object, Lisp_Object));
1055extern void x_set_internal_border_width P_ ((struct frame *, Lisp_Object,
1056 Lisp_Object));
1057extern void x_set_visibility P_ ((struct frame *, Lisp_Object, Lisp_Object));
1058extern void x_set_autoraise P_ ((struct frame *, Lisp_Object, Lisp_Object));
1059extern void x_set_autolower P_ ((struct frame *, Lisp_Object, Lisp_Object));
1060extern void x_set_unsplittable P_ ((struct frame *, Lisp_Object, Lisp_Object));
1061extern void x_set_vertical_scroll_bars P_ ((struct frame *, Lisp_Object,
1062 Lisp_Object));
1063extern void x_set_scroll_bar_width P_ ((struct frame *, Lisp_Object,
1064 Lisp_Object));
1065
1066extern Lisp_Object x_icon_type P_ ((struct frame *));
1067
1068extern int x_figure_window_size P_ ((struct frame *, Lisp_Object, int));
1069
1070
1071extern void validate_x_resource_name P_ ((void));
1072
1073#endif /* HAVE_WINDOW_SYSTEM */
1074
84e01749 1075#endif /* not EMACS_FRAME_H */