diff options
| author | Juri Linkov | 2019-10-01 23:15:03 +0300 |
|---|---|---|
| committer | Juri Linkov | 2019-10-01 23:15:03 +0300 |
| commit | 2698d3dba2e9858b026ed127d4de3f86810a5ef3 (patch) | |
| tree | 8e9b8f194cfcad8af83a4174a0105bbc691f06d6 /src/window.h | |
| parent | 25f45d710e91a7c1049f056ff27bc3e6968f5624 (diff) | |
| parent | 3f981a0a89bca47a207fb362485f07e7322bb145 (diff) | |
| download | emacs-2698d3dba2e9858b026ed127d4de3f86810a5ef3.tar.gz emacs-2698d3dba2e9858b026ed127d4de3f86810a5ef3.zip | |
Merge branch 'feature/tabs'
Diffstat (limited to 'src/window.h')
| -rw-r--r-- | src/window.h | 38 |
1 files changed, 31 insertions, 7 deletions
diff --git a/src/window.h b/src/window.h index dfbc6385312..21d2f3d3671 100644 --- a/src/window.h +++ b/src/window.h | |||
| @@ -361,6 +361,9 @@ struct window | |||
| 361 | /* Effective height of the header line, or -1 if not known. */ | 361 | /* Effective height of the header line, or -1 if not known. */ |
| 362 | int header_line_height; | 362 | int header_line_height; |
| 363 | 363 | ||
| 364 | /* Effective height of the tab line, or -1 if not known. */ | ||
| 365 | int tab_line_height; | ||
| 366 | |||
| 364 | /* Z - the buffer position of the last glyph in the current | 367 | /* Z - the buffer position of the last glyph in the current |
| 365 | matrix of W. Only valid if window_end_valid is true. */ | 368 | matrix of W. Only valid if window_end_valid is true. */ |
| 366 | ptrdiff_t window_end_pos; | 369 | ptrdiff_t window_end_pos; |
| @@ -697,7 +700,7 @@ wset_next_buffers (struct window *w, Lisp_Object val) | |||
| 697 | (WINDOW_LEFT_EDGE_COL (W) + WINDOW_TOTAL_COLS (W)) | 700 | (WINDOW_LEFT_EDGE_COL (W) + WINDOW_TOTAL_COLS (W)) |
| 698 | 701 | ||
| 699 | /* Return the canonical frame line at which window W starts. | 702 | /* Return the canonical frame line at which window W starts. |
| 700 | This includes a header line, if any. */ | 703 | This includes a header/tab line, if any. */ |
| 701 | #define WINDOW_TOP_EDGE_LINE(W) (W)->top_line | 704 | #define WINDOW_TOP_EDGE_LINE(W) (W)->top_line |
| 702 | 705 | ||
| 703 | /* Return the canonical frame line before which window W ends. | 706 | /* Return the canonical frame line before which window W ends. |
| @@ -715,7 +718,7 @@ wset_next_buffers (struct window *w, Lisp_Object val) | |||
| 715 | (WINDOW_LEFT_PIXEL_EDGE (W) + WINDOW_PIXEL_WIDTH (W)) | 718 | (WINDOW_LEFT_PIXEL_EDGE (W) + WINDOW_PIXEL_WIDTH (W)) |
| 716 | 719 | ||
| 717 | /* Return the top pixel edge at which window W starts. | 720 | /* Return the top pixel edge at which window W starts. |
| 718 | This includes a header line, if any. */ | 721 | This includes a header/tab line, if any. */ |
| 719 | #define WINDOW_TOP_PIXEL_EDGE(W) (W)->pixel_top | 722 | #define WINDOW_TOP_PIXEL_EDGE(W) (W)->pixel_top |
| 720 | 723 | ||
| 721 | /* Return the bottom pixel edge before which window W ends. | 724 | /* Return the bottom pixel edge before which window W ends. |
| @@ -745,6 +748,15 @@ wset_next_buffers (struct window *w, Lisp_Object val) | |||
| 745 | #define WINDOW_MENU_BAR_P(W) false | 748 | #define WINDOW_MENU_BAR_P(W) false |
| 746 | #endif | 749 | #endif |
| 747 | 750 | ||
| 751 | /* True if W is a tab bar window. */ | ||
| 752 | #if defined (HAVE_WINDOW_SYSTEM) | ||
| 753 | #define WINDOW_TAB_BAR_P(W) \ | ||
| 754 | (WINDOWP (WINDOW_XFRAME (W)->tab_bar_window) \ | ||
| 755 | && (W) == XWINDOW (WINDOW_XFRAME (W)->tab_bar_window)) | ||
| 756 | #else | ||
| 757 | #define WINDOW_TAB_BAR_P(W) false | ||
| 758 | #endif | ||
| 759 | |||
| 748 | /* True if W is a tool bar window. */ | 760 | /* True if W is a tool bar window. */ |
| 749 | #if defined (HAVE_WINDOW_SYSTEM) && ! defined (HAVE_EXT_TOOL_BAR) | 761 | #if defined (HAVE_WINDOW_SYSTEM) && ! defined (HAVE_EXT_TOOL_BAR) |
| 750 | #define WINDOW_TOOL_BAR_P(W) \ | 762 | #define WINDOW_TOOL_BAR_P(W) \ |
| @@ -756,13 +768,13 @@ wset_next_buffers (struct window *w, Lisp_Object val) | |||
| 756 | 768 | ||
| 757 | /* Return the frame y-position at which window W starts. */ | 769 | /* Return the frame y-position at which window W starts. */ |
| 758 | #define WINDOW_TOP_EDGE_Y(W) \ | 770 | #define WINDOW_TOP_EDGE_Y(W) \ |
| 759 | (((WINDOW_MENU_BAR_P (W) || WINDOW_TOOL_BAR_P (W)) \ | 771 | (((WINDOW_MENU_BAR_P (W) || WINDOW_TAB_BAR_P (W) || WINDOW_TOOL_BAR_P (W)) \ |
| 760 | ? 0 : FRAME_INTERNAL_BORDER_WIDTH (WINDOW_XFRAME (W))) \ | 772 | ? 0 : FRAME_INTERNAL_BORDER_WIDTH (WINDOW_XFRAME (W))) \ |
| 761 | + WINDOW_TOP_PIXEL_EDGE (W)) | 773 | + WINDOW_TOP_PIXEL_EDGE (W)) |
| 762 | 774 | ||
| 763 | /* Return the frame y-position before which window W ends. */ | 775 | /* Return the frame y-position before which window W ends. */ |
| 764 | #define WINDOW_BOTTOM_EDGE_Y(W) \ | 776 | #define WINDOW_BOTTOM_EDGE_Y(W) \ |
| 765 | (((WINDOW_MENU_BAR_P (W) || WINDOW_TOOL_BAR_P (W)) \ | 777 | (((WINDOW_MENU_BAR_P (W) || WINDOW_TAB_BAR_P (W) || WINDOW_TOOL_BAR_P (W)) \ |
| 766 | ? 0 : FRAME_INTERNAL_BORDER_WIDTH (WINDOW_XFRAME (W))) \ | 778 | ? 0 : FRAME_INTERNAL_BORDER_WIDTH (WINDOW_XFRAME (W))) \ |
| 767 | + WINDOW_BOTTOM_PIXEL_EDGE (W)) | 779 | + WINDOW_BOTTOM_PIXEL_EDGE (W)) |
| 768 | 780 | ||
| @@ -996,6 +1008,16 @@ wset_next_buffers (struct window *w, Lisp_Object val) | |||
| 996 | #define WINDOW_HEADER_LINE_LINES(W) \ | 1008 | #define WINDOW_HEADER_LINE_LINES(W) \ |
| 997 | window_wants_header_line (W) | 1009 | window_wants_header_line (W) |
| 998 | 1010 | ||
| 1011 | /* Height in pixels of the tab line. | ||
| 1012 | Zero if W doesn't have a tab line. */ | ||
| 1013 | #define WINDOW_TAB_LINE_HEIGHT(W) \ | ||
| 1014 | (window_wants_tab_line (W) \ | ||
| 1015 | ? CURRENT_TAB_LINE_HEIGHT (W) \ | ||
| 1016 | : 0) | ||
| 1017 | |||
| 1018 | #define WINDOW_TAB_LINE_LINES(W) \ | ||
| 1019 | window_wants_tab_line (W) | ||
| 1020 | |||
| 999 | /* Pixel height of window W without mode line, bottom scroll bar and | 1021 | /* Pixel height of window W without mode line, bottom scroll bar and |
| 1000 | bottom divider. */ | 1022 | bottom divider. */ |
| 1001 | #define WINDOW_BOX_HEIGHT_NO_MODE_LINE(W) \ | 1023 | #define WINDOW_BOX_HEIGHT_NO_MODE_LINE(W) \ |
| @@ -1004,14 +1026,15 @@ wset_next_buffers (struct window *w, Lisp_Object val) | |||
| 1004 | - WINDOW_SCROLL_BAR_AREA_HEIGHT (W) \ | 1026 | - WINDOW_SCROLL_BAR_AREA_HEIGHT (W) \ |
| 1005 | - WINDOW_MODE_LINE_HEIGHT (W)) | 1027 | - WINDOW_MODE_LINE_HEIGHT (W)) |
| 1006 | 1028 | ||
| 1007 | /* Pixel height of window W without mode and header line and bottom | 1029 | /* Pixel height of window W without mode and header/tab line and bottom |
| 1008 | divider. */ | 1030 | divider. */ |
| 1009 | #define WINDOW_BOX_TEXT_HEIGHT(W) \ | 1031 | #define WINDOW_BOX_TEXT_HEIGHT(W) \ |
| 1010 | (WINDOW_PIXEL_HEIGHT ((W)) \ | 1032 | (WINDOW_PIXEL_HEIGHT ((W)) \ |
| 1011 | - WINDOW_BOTTOM_DIVIDER_WIDTH (W) \ | 1033 | - WINDOW_BOTTOM_DIVIDER_WIDTH (W) \ |
| 1012 | - WINDOW_SCROLL_BAR_AREA_HEIGHT (W) \ | 1034 | - WINDOW_SCROLL_BAR_AREA_HEIGHT (W) \ |
| 1013 | - WINDOW_MODE_LINE_HEIGHT (W) \ | 1035 | - WINDOW_MODE_LINE_HEIGHT (W) \ |
| 1014 | - WINDOW_HEADER_LINE_HEIGHT (W)) | 1036 | - WINDOW_HEADER_LINE_HEIGHT (W) \ |
| 1037 | - WINDOW_TAB_LINE_HEIGHT (W)) | ||
| 1015 | 1038 | ||
| 1016 | /* Return the frame position where the horizontal scroll bar of window W | 1039 | /* Return the frame position where the horizontal scroll bar of window W |
| 1017 | starts. */ | 1040 | starts. */ |
| @@ -1068,7 +1091,7 @@ extern Lisp_Object minibuf_selected_window; | |||
| 1068 | 1091 | ||
| 1069 | extern Lisp_Object make_window (void); | 1092 | extern Lisp_Object make_window (void); |
| 1070 | extern Lisp_Object window_from_coordinates (struct frame *, int, int, | 1093 | extern Lisp_Object window_from_coordinates (struct frame *, int, int, |
| 1071 | enum window_part *, bool); | 1094 | enum window_part *, bool, bool); |
| 1072 | extern void resize_frame_windows (struct frame *, int, bool); | 1095 | extern void resize_frame_windows (struct frame *, int, bool); |
| 1073 | extern void restore_window_configuration (Lisp_Object); | 1096 | extern void restore_window_configuration (Lisp_Object); |
| 1074 | extern void delete_all_child_windows (Lisp_Object); | 1097 | extern void delete_all_child_windows (Lisp_Object); |
| @@ -1158,6 +1181,7 @@ extern bool compare_window_configurations (Lisp_Object, Lisp_Object, bool); | |||
| 1158 | extern void mark_window_cursors_off (struct window *); | 1181 | extern void mark_window_cursors_off (struct window *); |
| 1159 | extern bool window_wants_mode_line (struct window *); | 1182 | extern bool window_wants_mode_line (struct window *); |
| 1160 | extern bool window_wants_header_line (struct window *); | 1183 | extern bool window_wants_header_line (struct window *); |
| 1184 | extern bool window_wants_tab_line (struct window *); | ||
| 1161 | extern int window_internal_height (struct window *); | 1185 | extern int window_internal_height (struct window *); |
| 1162 | extern int window_body_width (struct window *w, bool); | 1186 | extern int window_body_width (struct window *w, bool); |
| 1163 | enum margin_unit { MARGIN_IN_LINES, MARGIN_IN_PIXELS }; | 1187 | enum margin_unit { MARGIN_IN_LINES, MARGIN_IN_PIXELS }; |