diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/frame.h | 56 |
1 files changed, 37 insertions, 19 deletions
diff --git a/src/frame.h b/src/frame.h index 6f63e4e2ec4..5a3f45a080d 100644 --- a/src/frame.h +++ b/src/frame.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Define frame-object for GNU Emacs. | 1 | /* Define frame-object for GNU Emacs. |
| 2 | Copyright (C) 1988, 1992 Free Software Foundation, Inc. | 2 | Copyright (C) 1988, 1992, 1993 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is part of GNU Emacs. | 4 | This file is part of GNU Emacs. |
| 5 | 5 | ||
| @@ -17,7 +17,18 @@ You should have received a copy of the GNU General Public License | |||
| 17 | along with GNU Emacs; see the file COPYING. If not, write to | 17 | along with GNU Emacs; see the file COPYING. If not, write to |
| 18 | the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ | 18 | the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ |
| 19 | 19 | ||
| 20 | |||
| 21 | /* Miscellanea. */ | ||
| 22 | |||
| 23 | /* Nonzero means don't assume anything about current | ||
| 24 | contents of actual terminal frame */ | ||
| 25 | extern int frame_garbaged; | ||
| 26 | |||
| 27 | /* Nonzero means FRAME_MESSAGE_BUF (selected_frame) is being used by | ||
| 28 | print. */ | ||
| 29 | extern int message_buf_print; | ||
| 20 | 30 | ||
| 31 | |||
| 21 | /* The structure representing a frame. | 32 | /* The structure representing a frame. |
| 22 | 33 | ||
| 23 | We declare this even if MULTI_FRAME is not defined, because when | 34 | We declare this even if MULTI_FRAME is not defined, because when |
| @@ -111,6 +122,16 @@ struct frame | |||
| 111 | or modified with modify-frame-parameters. */ | 122 | or modified with modify-frame-parameters. */ |
| 112 | Lisp_Object param_alist; | 123 | Lisp_Object param_alist; |
| 113 | 124 | ||
| 125 | /* List of scrollbars on this frame. | ||
| 126 | Actually, we don't specify exactly what is stored here at all; the | ||
| 127 | scrollbar implementation code can use it to store anything it likes. | ||
| 128 | This field is marked by the garbage collector. It is here | ||
| 129 | instead of in the `display' structure so that the garbage | ||
| 130 | collector doesn't need to look inside the window-system-dependent | ||
| 131 | structure. */ | ||
| 132 | Lisp_Object scrollbars; | ||
| 133 | Lisp_Object condemned_scrollbars; | ||
| 134 | |||
| 114 | /* The output method says how the contents of this frame | 135 | /* The output method says how the contents of this frame |
| 115 | are displayed. It could be using termcap, or using an X window. */ | 136 | are displayed. It could be using termcap, or using an X window. */ |
| 116 | enum output_method output_method; | 137 | enum output_method output_method; |
| @@ -127,6 +148,10 @@ struct frame | |||
| 127 | it to see if we should bother updating the frame's contents. | 148 | it to see if we should bother updating the frame's contents. |
| 128 | DON'T SET IT DIRECTLY; instead, use FRAME_SET_VISIBLE. | 149 | DON'T SET IT DIRECTLY; instead, use FRAME_SET_VISIBLE. |
| 129 | 150 | ||
| 151 | Note that, since invisible frames aren't updated, whenever a | ||
| 152 | frame becomes visible again, it must be marked as garbaged. The | ||
| 153 | FRAME_SAMPLE_VISIBILITY macro takes care of this. | ||
| 154 | |||
| 130 | iconified is nonzero if the frame is currently iconified. | 155 | iconified is nonzero if the frame is currently iconified. |
| 131 | 156 | ||
| 132 | Asynchronous input handlers should NOT change these directly; | 157 | Asynchronous input handlers should NOT change these directly; |
| @@ -240,6 +265,8 @@ typedef struct frame *FRAME_PTR; | |||
| 240 | #define FRAME_FOCUS_FRAME(f) (f)->focus_frame | 265 | #define FRAME_FOCUS_FRAME(f) (f)->focus_frame |
| 241 | #define FRAME_CAN_HAVE_SCROLLBARS(f) ((f)->can_have_scrollbars) | 266 | #define FRAME_CAN_HAVE_SCROLLBARS(f) ((f)->can_have_scrollbars) |
| 242 | #define FRAME_HAS_VERTICAL_SCROLLBARS(f) ((f)->has_vertical_scrollbars) | 267 | #define FRAME_HAS_VERTICAL_SCROLLBARS(f) ((f)->has_vertical_scrollbars) |
| 268 | #define FRAME_SCROLLBARS(f) ((f)->scrollbars) | ||
| 269 | #define FRAME_CONDEMNED_SCROLLBARS(f) ((f)->condemned_scrollbars) | ||
| 243 | 270 | ||
| 244 | /* Emacs's redisplay code could become confused if a frame's | 271 | /* Emacs's redisplay code could become confused if a frame's |
| 245 | visibility changes at arbitrary times. For example, if a frame is | 272 | visibility changes at arbitrary times. For example, if a frame is |
| @@ -259,9 +286,14 @@ typedef struct frame *FRAME_PTR; | |||
| 259 | which sets visible and iconified from their asynchronous | 286 | which sets visible and iconified from their asynchronous |
| 260 | counterparts. | 287 | counterparts. |
| 261 | 288 | ||
| 262 | Synchronous code must use the FRAME_SET_VISIBLE macro. */ | 289 | Synchronous code must use the FRAME_SET_VISIBLE macro. |
| 290 | |||
| 291 | Also, if a frame used to be invisible, but has just become visible, | ||
| 292 | it must be marked as garbaged, since redisplay hasn't been keeping | ||
| 293 | up its contents. */ | ||
| 263 | #define FRAME_SAMPLE_VISIBILITY(f) \ | 294 | #define FRAME_SAMPLE_VISIBILITY(f) \ |
| 264 | ((f)->visible = (f)->async_visible, \ | 295 | (((f)->async_visible && ! (f)->visible) ? SET_FRAME_GARBAGED (f) : 0, \ |
| 296 | (f)->visible = (f)->async_visible, \ | ||
| 265 | (f)->iconified = (f)->async_iconified) | 297 | (f)->iconified = (f)->async_iconified) |
| 266 | 298 | ||
| 267 | #define CHECK_FRAME(x, i) \ | 299 | #define CHECK_FRAME(x, i) \ |
| @@ -303,10 +335,6 @@ extern struct frame *make_frame (); | |||
| 303 | extern struct frame *make_minibuffer_frame (); | 335 | extern struct frame *make_minibuffer_frame (); |
| 304 | extern struct frame *make_frame_without_minibuffer (); | 336 | extern struct frame *make_frame_without_minibuffer (); |
| 305 | 337 | ||
| 306 | /* Nonzero means FRAME_MESSAGE_BUF (selected_frame) is being used by | ||
| 307 | print. */ | ||
| 308 | extern int message_buf_print; | ||
| 309 | |||
| 310 | extern Lisp_Object Vframe_list; | 338 | extern Lisp_Object Vframe_list; |
| 311 | extern Lisp_Object Vdefault_frame_alist; | 339 | extern Lisp_Object Vdefault_frame_alist; |
| 312 | 340 | ||
| @@ -327,10 +355,6 @@ extern struct frame the_only_frame; | |||
| 327 | extern int selected_frame; | 355 | extern int selected_frame; |
| 328 | extern int last_nonminibuf_frame; | 356 | extern int last_nonminibuf_frame; |
| 329 | 357 | ||
| 330 | /* Nonzero means FRAME_MESSAGE_BUF (selected_frame) is being used by | ||
| 331 | print. */ | ||
| 332 | extern int message_buf_print; | ||
| 333 | |||
| 334 | #define XFRAME(f) selected_frame | 358 | #define XFRAME(f) selected_frame |
| 335 | #define WINDOW_FRAME(w) selected_frame | 359 | #define WINDOW_FRAME(w) selected_frame |
| 336 | 360 | ||
| @@ -370,6 +394,8 @@ extern int message_buf_print; | |||
| 370 | #define FRAME_CAN_HAVE_SCROLLBARS(f) (the_only_frame.can_have_scrollbars) | 394 | #define FRAME_CAN_HAVE_SCROLLBARS(f) (the_only_frame.can_have_scrollbars) |
| 371 | #define FRAME_HAS_VERTICAL_SCROLLBARS(f) \ | 395 | #define FRAME_HAS_VERTICAL_SCROLLBARS(f) \ |
| 372 | (the_only_frame.has_vertical_scrollbars) | 396 | (the_only_frame.has_vertical_scrollbars) |
| 397 | #define FRAME_SCROLLBARS(f) (the_only_frame.scrollbars) | ||
| 398 | #define FRAME_CONDEMNED_SCROLLBARS(f) (the_only_frame.condemned_scrollbars) | ||
| 373 | 399 | ||
| 374 | /* See comments in definition above. */ | 400 | /* See comments in definition above. */ |
| 375 | #define FRAME_SAMPLE_VISIBILITY(f) (0) | 401 | #define FRAME_SAMPLE_VISIBILITY(f) (0) |
| @@ -398,14 +424,6 @@ extern int message_buf_print; | |||
| 398 | /* The number of columns a vertical scrollbar occupies. */ | 424 | /* The number of columns a vertical scrollbar occupies. */ |
| 399 | #define VERTICAL_SCROLLBAR_WIDTH (2) | 425 | #define VERTICAL_SCROLLBAR_WIDTH (2) |
| 400 | 426 | ||
| 401 | /* Turn a window's scrollbar member into a `struct scrollbar *'; | ||
| 402 | return NULL if the window doesn't have a scrollbar. */ | ||
| 403 | #define WINDOW_VERTICAL_SCROLLBAR(w) \ | ||
| 404 | (XTYPE ((w)->vertical_scrollbar) == Lisp_Int \ | ||
| 405 | ? (struct scrollbar *) XPNTR ((w)->vertical_scrollbar) \ | ||
| 406 | : (struct scrollbar *) 0) | ||
| 407 | |||
| 408 | |||
| 409 | /* Return the starting column (zero-based) of the vertical scrollbar | 427 | /* Return the starting column (zero-based) of the vertical scrollbar |
| 410 | for window W. The column before this one is the last column we can | 428 | for window W. The column before this one is the last column we can |
| 411 | use for text. If the window touches the right edge of the frame, | 429 | use for text. If the window touches the right edge of the frame, |