diff options
| author | Kim F. Storm | 2003-05-24 22:10:38 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2003-05-24 22:10:38 +0000 |
| commit | 43a74f12dd614bc4d69cc7e91848de595f6c2073 (patch) | |
| tree | db97a2bb4d2b44e3532dd47e266a700bf35c59db /src | |
| parent | 0899d58cb7271248b482bfff217f32b87c1d5c67 (diff) | |
| download | emacs-43a74f12dd614bc4d69cc7e91848de595f6c2073.tar.gz emacs-43a74f12dd614bc4d69cc7e91848de595f6c2073.zip | |
(struct x_output): Move members left_pos, top_pos,
border_width, pixel_height, pixel_width, line_height,
internal_border_width, vertical_scroll_bar_extra,
left_fringe_width, right_fringe_width, fringe_cols,
fringes_extra, win_gravity, size_hint_flags, want_fullscreen,
x_pixels_diff, and y_pixels_diff to struct frame (frame.h).
(FRAME_INTERNAL_BORDER_WIDTH, FRAME_LINE_HEIGHT): Move to frame.h.
(FRAME_DEFAULT_FONT_WIDTH): Remove macro.
(PIXEL_WIDTH, PIXEL_HEIGHT)
(FRAME_X_FRINGE_COLS, FRAME_X_FRINGE_WIDTH)
(FRAME_X_LEFT_FRINGE_WIDTH, FRAME_X_RIGHT_FRINGE_WIDTH): Moved to
frame.h and renamed [see frame.h changes].
(CHAR_TO_PIXEL_ROW, CHAR_TO_PIXEL_COL, CHAR_TO_PIXEL_WIDTH)
(CHAR_TO_PIXEL_HEIGHT, PIXEL_TO_CHAR_ROW, PIXEL_TO_CHAR_COL)
(PIXEL_TO_CHAR_WIDTH, PIXEL_TO_CHAR_HEIGHT): Moved to frame.h
and renamed [see frame.h changes].
Diffstat (limited to 'src')
| -rw-r--r-- | src/xterm.h | 121 |
1 files changed, 0 insertions, 121 deletions
diff --git a/src/xterm.h b/src/xterm.h index c81d97b0119..47be04e0fbe 100644 --- a/src/xterm.h +++ b/src/xterm.h | |||
| @@ -405,16 +405,6 @@ extern void x_find_ccl_program P_ ((struct font_info *)); | |||
| 405 | 405 | ||
| 406 | struct x_output | 406 | struct x_output |
| 407 | { | 407 | { |
| 408 | /* Position of the X window (x and y offsets in root window). */ | ||
| 409 | int left_pos; | ||
| 410 | int top_pos; | ||
| 411 | |||
| 412 | /* Border width of the X window as known by the X window system. */ | ||
| 413 | int border_width; | ||
| 414 | |||
| 415 | /* Size of the X window in pixels. */ | ||
| 416 | int pixel_height, pixel_width; | ||
| 417 | |||
| 418 | /* Height of menu bar widget, in pixels. | 408 | /* Height of menu bar widget, in pixels. |
| 419 | Zero if not using the X toolkit. | 409 | Zero if not using the X toolkit. |
| 420 | When using the toolkit, this value is not meaningful | 410 | When using the toolkit, this value is not meaningful |
| @@ -425,9 +415,6 @@ struct x_output | |||
| 425 | Zero if not using an external tool bar. */ | 415 | Zero if not using an external tool bar. */ |
| 426 | int toolbar_height; | 416 | int toolbar_height; |
| 427 | 417 | ||
| 428 | /* Height of a line, in pixels. */ | ||
| 429 | int line_height; | ||
| 430 | |||
| 431 | /* The tiled border used when the mouse is out of the frame. */ | 418 | /* The tiled border used when the mouse is out of the frame. */ |
| 432 | Pixmap border_tile; | 419 | Pixmap border_tile; |
| 433 | 420 | ||
| @@ -436,11 +423,6 @@ struct x_output | |||
| 436 | GC reverse_gc; /* Reverse video */ | 423 | GC reverse_gc; /* Reverse video */ |
| 437 | GC cursor_gc; /* cursor drawing */ | 424 | GC cursor_gc; /* cursor drawing */ |
| 438 | 425 | ||
| 439 | /* Width of the internal border. This is a line of background color | ||
| 440 | just inside the window's border. When the frame is selected, | ||
| 441 | a highlighting is displayed inside the internal border. */ | ||
| 442 | int internal_border_width; | ||
| 443 | |||
| 444 | /* The X window used for this frame. | 426 | /* The X window used for this frame. |
| 445 | May be zero while the frame object is being created | 427 | May be zero while the frame object is being created |
| 446 | and the X window has not yet been created. */ | 428 | and the X window has not yet been created. */ |
| @@ -556,22 +538,6 @@ struct x_output | |||
| 556 | to the mask as we go. */ | 538 | to the mask as we go. */ |
| 557 | XWMHints wm_hints; | 539 | XWMHints wm_hints; |
| 558 | 540 | ||
| 559 | /* The size of the extra width currently allotted for vertical | ||
| 560 | scroll bars, in pixels. */ | ||
| 561 | int vertical_scroll_bar_extra; | ||
| 562 | |||
| 563 | /* The extra width currently allotted for the areas in which | ||
| 564 | truncation marks, continuation marks, and overlay arrows are | ||
| 565 | displayed. */ | ||
| 566 | int left_fringe_width, right_fringe_width; | ||
| 567 | int fringe_cols, fringes_extra; | ||
| 568 | |||
| 569 | /* This is the gravity value for the specified window position. */ | ||
| 570 | int win_gravity; | ||
| 571 | |||
| 572 | /* The geometry flags for this window. */ | ||
| 573 | int size_hint_flags; | ||
| 574 | |||
| 575 | /* This is the Emacs structure for the X display this frame is on. */ | 541 | /* This is the Emacs structure for the X display this frame is on. */ |
| 576 | struct x_display_info *display_info; | 542 | struct x_display_info *display_info; |
| 577 | 543 | ||
| @@ -621,17 +587,6 @@ struct x_output | |||
| 621 | zero, tell Xt not to wait. */ | 587 | zero, tell Xt not to wait. */ |
| 622 | int wait_for_wm; | 588 | int wait_for_wm; |
| 623 | 589 | ||
| 624 | /* See enum below */ | ||
| 625 | int want_fullscreen; | ||
| 626 | |||
| 627 | /* This many pixels are the difference between the outer window (i.e. the | ||
| 628 | left of the window manager decoration) and FRAME_X_WINDOW. */ | ||
| 629 | int x_pixels_diff; | ||
| 630 | |||
| 631 | /* This many pixels are the difference between the outer window (i.e. the | ||
| 632 | top of the window manager titlebar) and FRAME_X_WINDOW. */ | ||
| 633 | int y_pixels_diff; | ||
| 634 | |||
| 635 | /* As x_pixels_diff, but to FRAME_OUTER_WINDOW. For some reason the | 590 | /* As x_pixels_diff, but to FRAME_OUTER_WINDOW. For some reason the |
| 636 | two might differ by a pixel, depending on WM */ | 591 | two might differ by a pixel, depending on WM */ |
| 637 | int x_pixels_outer_diff; | 592 | int x_pixels_outer_diff; |
| @@ -693,14 +648,8 @@ enum | |||
| 693 | 648 | ||
| 694 | #define FRAME_FONT(f) ((f)->output_data.x->font) | 649 | #define FRAME_FONT(f) ((f)->output_data.x->font) |
| 695 | #define FRAME_FONTSET(f) ((f)->output_data.x->fontset) | 650 | #define FRAME_FONTSET(f) ((f)->output_data.x->fontset) |
| 696 | #define FRAME_INTERNAL_BORDER_WIDTH(f) ((f)->output_data.x->internal_border_width) | ||
| 697 | #define FRAME_MENUBAR_HEIGHT(f) ((f)->output_data.x->menubar_height) | 651 | #define FRAME_MENUBAR_HEIGHT(f) ((f)->output_data.x->menubar_height) |
| 698 | #define FRAME_TOOLBAR_HEIGHT(f) ((f)->output_data.x->toolbar_height) | 652 | #define FRAME_TOOLBAR_HEIGHT(f) ((f)->output_data.x->toolbar_height) |
| 699 | #define FRAME_LINE_HEIGHT(f) ((f)->output_data.x->line_height) | ||
| 700 | |||
| 701 | /* Width of the default font of frame F. Must be defined by each | ||
| 702 | terminal specific header. */ | ||
| 703 | #define FRAME_DEFAULT_FONT_WIDTH(F) FONT_WIDTH (FRAME_FONT (F)) | ||
| 704 | #define FRAME_BASELINE_OFFSET(f) ((f)->output_data.x->baseline_offset) | 653 | #define FRAME_BASELINE_OFFSET(f) ((f)->output_data.x->baseline_offset) |
| 705 | 654 | ||
| 706 | /* This gives the x_display_info structure for the display F is on. */ | 655 | /* This gives the x_display_info structure for the display F is on. */ |
| @@ -722,10 +671,6 @@ enum | |||
| 722 | /* This is the 'font_info *' which frame F has. */ | 671 | /* This is the 'font_info *' which frame F has. */ |
| 723 | #define FRAME_X_FONT_TABLE(f) (FRAME_X_DISPLAY_INFO (f)->font_table) | 672 | #define FRAME_X_FONT_TABLE(f) (FRAME_X_DISPLAY_INFO (f)->font_table) |
| 724 | 673 | ||
| 725 | /* These two really ought to be called FRAME_PIXEL_{WIDTH,HEIGHT}. */ | ||
| 726 | #define PIXEL_WIDTH(f) ((f)->output_data.x->pixel_width) | ||
| 727 | #define PIXEL_HEIGHT(f) ((f)->output_data.x->pixel_height) | ||
| 728 | |||
| 729 | /* The difference in pixels between the top left corner of the | 674 | /* The difference in pixels between the top left corner of the |
| 730 | Emacs window (including possible window manager decorations) | 675 | Emacs window (including possible window manager decorations) |
| 731 | and FRAME_X_WINDOW (f). */ | 676 | and FRAME_X_WINDOW (f). */ |
| @@ -757,25 +702,6 @@ enum | |||
| 757 | #define FRAME_X_IMAGE_CACHE(F) FRAME_X_DISPLAY_INFO ((F))->image_cache | 702 | #define FRAME_X_IMAGE_CACHE(F) FRAME_X_DISPLAY_INFO ((F))->image_cache |
| 758 | 703 | ||
| 759 | 704 | ||
| 760 | /* Total width of fringes reserved for drawing truncation bitmaps, | ||
| 761 | continuation bitmaps and alike. The width is in canonical char | ||
| 762 | units of the frame. This must currently be the case because window | ||
| 763 | sizes aren't pixel values. If it weren't the case, we wouldn't be | ||
| 764 | able to split windows horizontally nicely. */ | ||
| 765 | |||
| 766 | #define FRAME_X_FRINGE_COLS(F) ((F)->output_data.x->fringe_cols) | ||
| 767 | |||
| 768 | /* Total width of fringes in pixels. */ | ||
| 769 | |||
| 770 | #define FRAME_X_FRINGE_WIDTH(F) ((F)->output_data.x->fringes_extra) | ||
| 771 | |||
| 772 | /* Pixel-width of the left and right fringe. */ | ||
| 773 | |||
| 774 | #define FRAME_X_LEFT_FRINGE_WIDTH(F) ((F)->output_data.x->left_fringe_width) | ||
| 775 | #define FRAME_X_RIGHT_FRINGE_WIDTH(F) ((F)->output_data.x->right_fringe_width) | ||
| 776 | |||
| 777 | |||
| 778 | |||
| 779 | /* X-specific scroll bar stuff. */ | 705 | /* X-specific scroll bar stuff. */ |
| 780 | 706 | ||
| 781 | /* We represent scroll bars as lisp vectors. This allows us to place | 707 | /* We represent scroll bars as lisp vectors. This allows us to place |
| @@ -917,52 +843,6 @@ struct scroll_bar | |||
| 917 | #define VERTICAL_SCROLL_BAR_WIDTH_TRIM (0) | 843 | #define VERTICAL_SCROLL_BAR_WIDTH_TRIM (0) |
| 918 | 844 | ||
| 919 | 845 | ||
| 920 | /* Manipulating pixel sizes and character sizes. | ||
| 921 | Knowledge of which factors affect the overall size of the window should | ||
| 922 | be hidden in these macros, if that's possible. | ||
| 923 | |||
| 924 | Return the upper/left pixel position of the character cell on frame F | ||
| 925 | at ROW/COL. */ | ||
| 926 | #define CHAR_TO_PIXEL_ROW(f, row) \ | ||
| 927 | ((f)->output_data.x->internal_border_width \ | ||
| 928 | + (row) * (f)->output_data.x->line_height) | ||
| 929 | #define CHAR_TO_PIXEL_COL(f, col) \ | ||
| 930 | ((f)->output_data.x->internal_border_width \ | ||
| 931 | + (col) * FONT_WIDTH ((f)->output_data.x->font)) | ||
| 932 | |||
| 933 | /* Return the pixel width/height of frame F if it has | ||
| 934 | WIDTH columns/HEIGHT rows. */ | ||
| 935 | #define CHAR_TO_PIXEL_WIDTH(f, width) \ | ||
| 936 | (CHAR_TO_PIXEL_COL (f, width) \ | ||
| 937 | + (f)->output_data.x->vertical_scroll_bar_extra \ | ||
| 938 | + (f)->output_data.x->fringes_extra \ | ||
| 939 | + (f)->output_data.x->internal_border_width) | ||
| 940 | #define CHAR_TO_PIXEL_HEIGHT(f, height) \ | ||
| 941 | (CHAR_TO_PIXEL_ROW (f, height) \ | ||
| 942 | + (f)->output_data.x->internal_border_width) | ||
| 943 | |||
| 944 | |||
| 945 | /* Return the row/column (zero-based) of the character cell containing | ||
| 946 | the pixel on FRAME at ROW/COL. */ | ||
| 947 | #define PIXEL_TO_CHAR_ROW(f, row) \ | ||
| 948 | (((row) - (f)->output_data.x->internal_border_width) \ | ||
| 949 | / (f)->output_data.x->line_height) | ||
| 950 | #define PIXEL_TO_CHAR_COL(f, col) \ | ||
| 951 | (((col) - (f)->output_data.x->internal_border_width) \ | ||
| 952 | / FONT_WIDTH ((f)->output_data.x->font)) | ||
| 953 | |||
| 954 | /* How many columns/rows of text can we fit in WIDTH/HEIGHT pixels on | ||
| 955 | frame F? */ | ||
| 956 | #define PIXEL_TO_CHAR_WIDTH(f, width) \ | ||
| 957 | (PIXEL_TO_CHAR_COL (f, ((width) \ | ||
| 958 | - (f)->output_data.x->internal_border_width \ | ||
| 959 | - (f)->output_data.x->fringes_extra \ | ||
| 960 | - (f)->output_data.x->vertical_scroll_bar_extra))) | ||
| 961 | #define PIXEL_TO_CHAR_HEIGHT(f, height) \ | ||
| 962 | (PIXEL_TO_CHAR_ROW (f, ((height) \ | ||
| 963 | - (f)->output_data.x->internal_border_width))) | ||
| 964 | |||
| 965 | |||
| 966 | /* If a struct input_event has a kind which is SELECTION_REQUEST_EVENT | 846 | /* If a struct input_event has a kind which is SELECTION_REQUEST_EVENT |
| 967 | or SELECTION_CLEAR_EVENT, then its contents are really described | 847 | or SELECTION_CLEAR_EVENT, then its contents are really described |
| 968 | by this structure. */ | 848 | by this structure. */ |
| @@ -1122,7 +1002,6 @@ extern void x_set_tool_bar_lines P_ ((struct frame *, Lisp_Object, Lisp_Object)) | |||
| 1122 | 1002 | ||
| 1123 | /* Defined in xfaces.c */ | 1003 | /* Defined in xfaces.c */ |
| 1124 | 1004 | ||
| 1125 | extern int frame_update_line_height P_ ((struct frame *)); | ||
| 1126 | extern int compute_glyph_face P_ ((struct frame *, int, int)); | 1005 | extern int compute_glyph_face P_ ((struct frame *, int, int)); |
| 1127 | extern int compute_glyph_face_1 P_ ((struct frame *, Lisp_Object, int)); | 1006 | extern int compute_glyph_face_1 P_ ((struct frame *, Lisp_Object, int)); |
| 1128 | extern void x_free_dpy_colors P_ ((Display *, Screen *, Colormap, | 1007 | extern void x_free_dpy_colors P_ ((Display *, Screen *, Colormap, |