diff options
| author | Richard M. Stallman | 1998-04-28 23:39:57 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1998-04-28 23:39:57 +0000 |
| commit | cea6021b073e11280b57ab4bcc8efa4bf76e2018 (patch) | |
| tree | c355d41f50d8492b85a15665565d01836b45f58f | |
| parent | 7acceb4aaf5debb95df8bb1e7d52642e42f75b0b (diff) | |
| download | emacs-cea6021b073e11280b57ab4bcc8efa4bf76e2018.tar.gz emacs-cea6021b073e11280b57ab4bcc8efa4bf76e2018.zip | |
Comment changes.
| -rw-r--r-- | src/frame.h | 104 |
1 files changed, 97 insertions, 7 deletions
diff --git a/src/frame.h b/src/frame.h index 2afefa2907f..219ba288508 100644 --- a/src/frame.h +++ b/src/frame.h | |||
| @@ -322,8 +322,11 @@ typedef struct frame *FRAME_PTR; | |||
| 322 | #define XFRAME(p) ((struct frame *) XPNTR (p)) | 322 | #define XFRAME(p) ((struct frame *) XPNTR (p)) |
| 323 | #define XSETFRAME(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_FRAME)) | 323 | #define XSETFRAME(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_FRAME)) |
| 324 | 324 | ||
| 325 | /* Given a window, return its frame as a Lisp_Object. */ | ||
| 325 | #define WINDOW_FRAME(w) (w)->frame | 326 | #define WINDOW_FRAME(w) (w)->frame |
| 326 | 327 | ||
| 328 | /* Test a frame for particular kinds of display methods. */ | ||
| 329 | #define FRAME_TERMCAP_P(f) ((f)->output_method == output_termcap) | ||
| 327 | #define FRAME_X_P(f) ((f)->output_method == output_x_window) | 330 | #define FRAME_X_P(f) ((f)->output_method == output_x_window) |
| 328 | #define FRAME_W32_P(f) ((f)->output_method == output_w32) | 331 | #define FRAME_W32_P(f) ((f)->output_method == output_w32) |
| 329 | #define FRAME_MSDOS_P(f) ((f)->output_method == output_msdos_raw) | 332 | #define FRAME_MSDOS_P(f) ((f)->output_method == output_msdos_raw) |
| @@ -340,40 +343,90 @@ typedef struct frame *FRAME_PTR; | |||
| 340 | #define FRAME_WINDOW_P(f) (0) | 343 | #define FRAME_WINDOW_P(f) (0) |
| 341 | #endif | 344 | #endif |
| 342 | 345 | ||
| 346 | /* Nonzero if frame F is still alive (not deleted). */ | ||
| 343 | #define FRAME_LIVE_P(f) ((f)->output_data.nothing != 0) | 347 | #define FRAME_LIVE_P(f) ((f)->output_data.nothing != 0) |
| 344 | #define FRAME_TERMCAP_P(f) ((f)->output_method == output_termcap) | 348 | |
| 349 | /* Nonzero if frame F is a minibuffer-only frame. */ | ||
| 345 | #define FRAME_MINIBUF_ONLY_P(f) \ | 350 | #define FRAME_MINIBUF_ONLY_P(f) \ |
| 346 | EQ (FRAME_ROOT_WINDOW (f), FRAME_MINIBUF_WINDOW (f)) | 351 | EQ (FRAME_ROOT_WINDOW (f), FRAME_MINIBUF_WINDOW (f)) |
| 352 | |||
| 353 | /* Nonzero if frame F contains a minibuffer window. | ||
| 354 | (If this is 0, F must use some other minibuffer window.) */ | ||
| 347 | #define FRAME_HAS_MINIBUF_P(f) ((f)->has_minibuffer) | 355 | #define FRAME_HAS_MINIBUF_P(f) ((f)->has_minibuffer) |
| 356 | |||
| 357 | /* This points to the structure which describes the contents | ||
| 358 | currently displayed on frame F. See dispextern.h. */ | ||
| 348 | #define FRAME_CURRENT_GLYPHS(f) (f)->current_glyphs | 359 | #define FRAME_CURRENT_GLYPHS(f) (f)->current_glyphs |
| 360 | |||
| 361 | /* This points to the structure which describes the contents | ||
| 362 | intended to be displayed on frame F. See dispextern.h. */ | ||
| 349 | #define FRAME_DESIRED_GLYPHS(f) (f)->desired_glyphs | 363 | #define FRAME_DESIRED_GLYPHS(f) (f)->desired_glyphs |
| 364 | |||
| 350 | #define FRAME_TEMP_GLYPHS(f) (f)->temp_glyphs | 365 | #define FRAME_TEMP_GLYPHS(f) (f)->temp_glyphs |
| 366 | #define SET_GLYPHS_FRAME(glyphs,frame) ((glyphs)->frame = (frame)) | ||
| 367 | |||
| 368 | /* Height of frame F, measured in character lines. */ | ||
| 351 | #define FRAME_HEIGHT(f) (f)->height | 369 | #define FRAME_HEIGHT(f) (f)->height |
| 370 | |||
| 371 | /* Width of frame F, measured in character columns, | ||
| 372 | not including scroll bars if any. */ | ||
| 352 | #define FRAME_WIDTH(f) (f)->width | 373 | #define FRAME_WIDTH(f) (f)->width |
| 353 | #define FRAME_NEW_HEIGHT(f) (f)->new_height | 374 | |
| 354 | #define FRAME_NEW_WIDTH(f) (f)->new_width | 375 | /* Number of lines of frame F used for menu bar. |
| 376 | This is relevant on terminal frames and on | ||
| 377 | X Windows when not using the X toolkit. | ||
| 378 | These lines are counted in FRAME_HEIGHT. */ | ||
| 355 | #define FRAME_MENU_BAR_LINES(f) (f)->menu_bar_lines | 379 | #define FRAME_MENU_BAR_LINES(f) (f)->menu_bar_lines |
| 380 | |||
| 381 | /* Nonzero if this frame should display a menu bar | ||
| 382 | in a way that does not use any text lines. */ | ||
| 356 | #if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) | 383 | #if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) |
| 357 | #define FRAME_EXTERNAL_MENU_BAR(f) (f)->external_menu_bar | 384 | #define FRAME_EXTERNAL_MENU_BAR(f) (f)->external_menu_bar |
| 358 | #else | 385 | #else |
| 359 | #define FRAME_EXTERNAL_MENU_BAR(f) 0 | 386 | #define FRAME_EXTERNAL_MENU_BAR(f) 0 |
| 360 | #endif | 387 | #endif |
| 388 | |||
| 389 | /* Current cursor position for frame F. */ | ||
| 361 | #define FRAME_CURSOR_X(f) (f)->cursor_x | 390 | #define FRAME_CURSOR_X(f) (f)->cursor_x |
| 362 | #define FRAME_CURSOR_Y(f) (f)->cursor_y | 391 | #define FRAME_CURSOR_Y(f) (f)->cursor_y |
| 392 | |||
| 393 | /* Nonzero if frame F is currently visible. */ | ||
| 363 | #define FRAME_VISIBLE_P(f) ((f)->visible != 0) | 394 | #define FRAME_VISIBLE_P(f) ((f)->visible != 0) |
| 395 | |||
| 396 | /* Nonzero if frame F is currently visible but hidden. */ | ||
| 364 | #define FRAME_OBSCURED_P(f) ((f)->visible > 1) | 397 | #define FRAME_OBSCURED_P(f) ((f)->visible > 1) |
| 398 | |||
| 399 | /* Nonzero if frame F is currently iconified. */ | ||
| 400 | #define FRAME_ICONIFIED_P(f) (f)->iconified | ||
| 401 | |||
| 365 | #define FRAME_SET_VISIBLE(f,p) \ | 402 | #define FRAME_SET_VISIBLE(f,p) \ |
| 366 | ((f)->async_visible = (p), FRAME_SAMPLE_VISIBILITY (f)) | 403 | ((f)->async_visible = (p), FRAME_SAMPLE_VISIBILITY (f)) |
| 367 | #define SET_FRAME_GARBAGED(f) (frame_garbaged = 1, f->garbaged = 1) | 404 | #define SET_FRAME_GARBAGED(f) (frame_garbaged = 1, f->garbaged = 1) |
| 368 | #define FRAME_GARBAGED_P(f) (f)->garbaged | 405 | #define FRAME_GARBAGED_P(f) (f)->garbaged |
| 406 | |||
| 407 | /* Nonzero means do not allow splitting this frame's window. */ | ||
| 369 | #define FRAME_NO_SPLIT_P(f) (f)->no_split | 408 | #define FRAME_NO_SPLIT_P(f) (f)->no_split |
| 409 | |||
| 410 | /* Not really implemented. */ | ||
| 370 | #define FRAME_WANTS_MODELINE_P(f) (f)->wants_modeline | 411 | #define FRAME_WANTS_MODELINE_P(f) (f)->wants_modeline |
| 371 | #define FRAME_ICONIFIED_P(f) (f)->iconified | 412 | |
| 413 | /* Nonzero if a size change has been requested for frame F | ||
| 414 | but not yet really put into effect. This can be true temporarily | ||
| 415 | when an X event comes in at a bad time. */ | ||
| 372 | #define FRAME_WINDOW_SIZES_CHANGED(f) (f)->window_sizes_changed | 416 | #define FRAME_WINDOW_SIZES_CHANGED(f) (f)->window_sizes_changed |
| 417 | /* When a size change is pending, these are the requested new sizes. */ | ||
| 418 | #define FRAME_NEW_HEIGHT(f) (f)->new_height | ||
| 419 | #define FRAME_NEW_WIDTH(f) (f)->new_width | ||
| 420 | |||
| 421 | /* The minibuffer window of frame F, if it has one; otherwise nil. */ | ||
| 373 | #define FRAME_MINIBUF_WINDOW(f) (f)->minibuffer_window | 422 | #define FRAME_MINIBUF_WINDOW(f) (f)->minibuffer_window |
| 423 | |||
| 424 | /* The root window of the window tree of frame F. */ | ||
| 374 | #define FRAME_ROOT_WINDOW(f) (f)->root_window | 425 | #define FRAME_ROOT_WINDOW(f) (f)->root_window |
| 426 | |||
| 427 | /* The currently selected window of the window tree of frame F. */ | ||
| 375 | #define FRAME_SELECTED_WINDOW(f) (f)->selected_window | 428 | #define FRAME_SELECTED_WINDOW(f) (f)->selected_window |
| 376 | #define SET_GLYPHS_FRAME(glyphs,frame) ((glyphs)->frame = (frame)) | 429 | |
| 377 | #define FRAME_INSERT_COST(f) (f)->insert_line_cost | 430 | #define FRAME_INSERT_COST(f) (f)->insert_line_cost |
| 378 | #define FRAME_DELETE_COST(f) (f)->delete_line_cost | 431 | #define FRAME_DELETE_COST(f) (f)->delete_line_cost |
| 379 | #define FRAME_INSERTN_COST(f) (f)->insert_n_lines_cost | 432 | #define FRAME_INSERTN_COST(f) (f)->insert_n_lines_cost |
| @@ -381,7 +434,14 @@ typedef struct frame *FRAME_PTR; | |||
| 381 | #define FRAME_MESSAGE_BUF(f) (f)->message_buf | 434 | #define FRAME_MESSAGE_BUF(f) (f)->message_buf |
| 382 | #define FRAME_SCROLL_BOTTOM_VPOS(f) (f)->scroll_bottom_vpos | 435 | #define FRAME_SCROLL_BOTTOM_VPOS(f) (f)->scroll_bottom_vpos |
| 383 | #define FRAME_FOCUS_FRAME(f) (f)->focus_frame | 436 | #define FRAME_FOCUS_FRAME(f) (f)->focus_frame |
| 437 | |||
| 438 | /* Nonzero if frame F supports scroll bars. | ||
| 439 | If this is zero, then it is impossible to enable scroll bars | ||
| 440 | on frame F. */ | ||
| 384 | #define FRAME_CAN_HAVE_SCROLL_BARS(f) ((f)->can_have_scroll_bars) | 441 | #define FRAME_CAN_HAVE_SCROLL_BARS(f) ((f)->can_have_scroll_bars) |
| 442 | |||
| 443 | /* This frame slot says whether scroll bars are currently enabled for frame F, | ||
| 444 | and which side they are on. */ | ||
| 385 | #define FRAME_VERTICAL_SCROLL_BAR_TYPE(f) ((f)->vertical_scroll_bar_type) | 445 | #define FRAME_VERTICAL_SCROLL_BAR_TYPE(f) ((f)->vertical_scroll_bar_type) |
| 386 | #define FRAME_HAS_VERTICAL_SCROLL_BARS(f) \ | 446 | #define FRAME_HAS_VERTICAL_SCROLL_BARS(f) \ |
| 387 | ((f)->vertical_scroll_bar_type != vertical_scroll_bar_none) | 447 | ((f)->vertical_scroll_bar_type != vertical_scroll_bar_none) |
| @@ -389,24 +449,54 @@ typedef struct frame *FRAME_PTR; | |||
| 389 | ((f)->vertical_scroll_bar_type == vertical_scroll_bar_left) | 449 | ((f)->vertical_scroll_bar_type == vertical_scroll_bar_left) |
| 390 | #define FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT(f) \ | 450 | #define FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT(f) \ |
| 391 | ((f)->vertical_scroll_bar_type == vertical_scroll_bar_right) | 451 | ((f)->vertical_scroll_bar_type == vertical_scroll_bar_right) |
| 452 | |||
| 453 | /* Width that a scroll bar in frame F should have, if there is one. | ||
| 454 | Measured in pixels. | ||
| 455 | If scroll bars are turned off, this is still nonzero. */ | ||
| 392 | #define FRAME_SCROLL_BAR_PIXEL_WIDTH(f) ((f)->scroll_bar_pixel_width) | 456 | #define FRAME_SCROLL_BAR_PIXEL_WIDTH(f) ((f)->scroll_bar_pixel_width) |
| 457 | |||
| 458 | /* Width that a scroll bar in frame F should have, if there is one. | ||
| 459 | Measured in columns (characters). | ||
| 460 | If scroll bars are turned off, this is still nonzero. */ | ||
| 393 | #define FRAME_SCROLL_BAR_COLS(f) ((f)->scroll_bar_cols) | 461 | #define FRAME_SCROLL_BAR_COLS(f) ((f)->scroll_bar_cols) |
| 462 | |||
| 463 | /* Width of a scroll bar in frame F, measured in columns (characters), | ||
| 464 | but only if scroll bars are on the left. | ||
| 465 | If scroll bars are on the right in this frame, it is 0. */ | ||
| 394 | #define FRAME_LEFT_SCROLL_BAR_WIDTH(f) \ | 466 | #define FRAME_LEFT_SCROLL_BAR_WIDTH(f) \ |
| 395 | (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT (f) \ | 467 | (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT (f) \ |
| 396 | ? FRAME_SCROLL_BAR_COLS (f) \ | 468 | ? FRAME_SCROLL_BAR_COLS (f) \ |
| 397 | : 0) | 469 | : 0) |
| 470 | |||
| 471 | /* Width of a scroll bar in frame F, measured in columns (characters). */ | ||
| 398 | #define FRAME_SCROLL_BAR_WIDTH(f) \ | 472 | #define FRAME_SCROLL_BAR_WIDTH(f) \ |
| 399 | (FRAME_HAS_VERTICAL_SCROLL_BARS (f) \ | 473 | (FRAME_HAS_VERTICAL_SCROLL_BARS (f) \ |
| 400 | ? FRAME_SCROLL_BAR_COLS (f) \ | 474 | ? FRAME_SCROLL_BAR_COLS (f) \ |
| 401 | : 0) | 475 | : 0) |
| 476 | |||
| 477 | /* Total width of frame F, in columns (characters), | ||
| 478 | including the width used by scroll bars if any. */ | ||
| 479 | #define FRAME_WINDOW_WIDTH(f) ((f)->window_width) | ||
| 480 | |||
| 481 | /* Set the width of frame F to VAL. | ||
| 482 | VAL is the width of a full-frame window, | ||
| 483 | not including scroll bars. */ | ||
| 484 | #define SET_FRAME_WIDTH(f, val) \ | ||
| 485 | ((f)->width = (val), \ | ||
| 486 | (f)->window_width = FRAME_WINDOW_WIDTH_ARG (f, (f)->width)) | ||
| 487 | |||
| 488 | /* Given a value WIDTH for frame F's nominal width, | ||
| 489 | return the value that FRAME_WINDOW_WIDTH should have. */ | ||
| 402 | #define FRAME_WINDOW_WIDTH_ARG(f, width) \ | 490 | #define FRAME_WINDOW_WIDTH_ARG(f, width) \ |
| 403 | ((width) + FRAME_SCROLL_BAR_WIDTH (f)) | 491 | ((width) + FRAME_SCROLL_BAR_WIDTH (f)) |
| 404 | #define FRAME_WINDOW_WIDTH(f) ((f)->window_width) | 492 | |
| 405 | /* Maximum + 1 legitimate value for FRAME_CURSOR_X. */ | 493 | /* Maximum + 1 legitimate value for FRAME_CURSOR_X. */ |
| 406 | #define FRAME_CURSOR_X_LIMIT(f) \ | 494 | #define FRAME_CURSOR_X_LIMIT(f) \ |
| 407 | (FRAME_WIDTH (f) + FRAME_LEFT_SCROLL_BAR_WIDTH (f)) | 495 | (FRAME_WIDTH (f) + FRAME_LEFT_SCROLL_BAR_WIDTH (f)) |
| 408 | #define SET_FRAME_WIDTH(f,val) ((f)->width = (val), (f)->window_width = FRAME_WINDOW_WIDTH_ARG (f, (f)->width)) | 496 | |
| 497 | /* Nonzero if frame F has scroll bars. */ | ||
| 409 | #define FRAME_SCROLL_BARS(f) ((f)->scroll_bars) | 498 | #define FRAME_SCROLL_BARS(f) ((f)->scroll_bars) |
| 499 | |||
| 410 | #define FRAME_CONDEMNED_SCROLL_BARS(f) ((f)->condemned_scroll_bars) | 500 | #define FRAME_CONDEMNED_SCROLL_BARS(f) ((f)->condemned_scroll_bars) |
| 411 | #define FRAME_MENU_BAR_ITEMS(f) ((f)->menu_bar_items) | 501 | #define FRAME_MENU_BAR_ITEMS(f) ((f)->menu_bar_items) |
| 412 | #define FRAME_COST_BAUD_RATE(f) ((f)->cost_calculation_baud_rate) | 502 | #define FRAME_COST_BAUD_RATE(f) ((f)->cost_calculation_baud_rate) |