summaryrefslogtreecommitdiff
path: root/src/window.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/window.h')
-rw-r--r--src/window.h62
1 files changed, 44 insertions, 18 deletions
diff --git a/src/window.h b/src/window.h
index 27fab7ca463..19283725931 100644
--- a/src/window.h
+++ b/src/window.h
@@ -286,6 +286,25 @@ struct window
it should be positive. */
ptrdiff_t last_point;
+#ifdef HAVE_TEXT_CONVERSION
+ /* ``ephemeral'' last point position. This is used while
+ processing text conversion events.
+
+ `last_point' is normally used during redisplay to indicate the
+ position of point as seem by the input method. However, it is
+ not updated if consecutive conversions are processed at the
+ same time.
+
+ This `ephemeral_last_point' field is either the last point as
+ set in redisplay or the last point after a text editing
+ operation. */
+ ptrdiff_t ephemeral_last_point;
+#endif
+
+ /* Value of mark in the selected window at the time of the last
+ redisplay. -1 if the mark is not valid or active. */
+ ptrdiff_t last_mark;
+
/* Line number and position of a line somewhere above the top of the
screen. If this field is zero, it means we don't have a base line. */
ptrdiff_t base_line_number;
@@ -576,11 +595,11 @@ wset_next_buffers (struct window *w, Lisp_Object val)
/* Non-nil if window W is leaf window (has a buffer). */
#define WINDOW_LEAF_P(W) \
- (BUFFERP ((W)->contents))
+ BUFFERP ((W)->contents)
/* Non-nil if window W is internal (is a parent window). */
#define WINDOW_INTERNAL_P(W) \
- (WINDOWP ((W)->contents))
+ WINDOWP ((W)->contents)
/* True if window W is a horizontal combination of windows. */
#define WINDOW_HORIZONTAL_COMBINATION_P(W) \
@@ -591,7 +610,7 @@ wset_next_buffers (struct window *w, Lisp_Object val)
(WINDOW_INTERNAL_P (W) && !(W)->horizontal)
/* Window W's XFRAME. */
-#define WINDOW_XFRAME(W) (XFRAME (WINDOW_FRAME ((W))))
+#define WINDOW_XFRAME(W) XFRAME (WINDOW_FRAME (W))
/* Whether window W is a pseudo window. */
#define WINDOW_PSEUDO_P(W) ((W)->pseudo_window_p)
@@ -611,11 +630,11 @@ wset_next_buffers (struct window *w, Lisp_Object val)
/* Return the canonical column width of the frame of window W. */
#define WINDOW_FRAME_COLUMN_WIDTH(W) \
- (FRAME_COLUMN_WIDTH (WINDOW_XFRAME ((W))))
+ FRAME_COLUMN_WIDTH (WINDOW_XFRAME (W))
/* Return the canonical line height of the frame of window W. */
#define WINDOW_FRAME_LINE_HEIGHT(W) \
- (FRAME_LINE_HEIGHT (WINDOW_XFRAME ((W))))
+ FRAME_LINE_HEIGHT (WINDOW_XFRAME (W))
/* Return the pixel width of window W. This includes dividers, scroll
bars, fringes and margins, if any. */
@@ -647,7 +666,7 @@ wset_next_buffers (struct window *w, Lisp_Object val)
#define MIN_SAFE_WINDOW_HEIGHT (1)
#define MIN_SAFE_WINDOW_PIXEL_HEIGHT(W) \
- (WINDOW_FRAME_LINE_HEIGHT (W))
+ WINDOW_FRAME_LINE_HEIGHT (W)
/* True if window W has no other windows to its left on its frame. */
#define WINDOW_LEFTMOST_P(W) \
@@ -740,17 +759,17 @@ wset_next_buffers (struct window *w, Lisp_Object val)
+ WINDOW_RIGHT_PIXEL_EDGE (W))
/* True if W is a menu bar window. */
-#if defined (HAVE_X_WINDOWS) && ! defined (USE_X_TOOLKIT) && ! defined (USE_GTK)
+#if defined HAVE_WINDOW_SYSTEM && !defined HAVE_EXT_MENU_BAR
#define WINDOW_MENU_BAR_P(W) \
(WINDOWP (WINDOW_XFRAME (W)->menu_bar_window) \
&& (W) == XWINDOW (WINDOW_XFRAME (W)->menu_bar_window))
-#else
+#else /* !HAVE_WINDOW_SYSTEM || HAVE_EXT_MENU_BAR */
/* No menu bar windows if X toolkit is in use. */
#define WINDOW_MENU_BAR_P(W) false
-#endif
+#endif /* HAVE_WINDOW_SYSTEM && !HAVE_EXT_MENU_BAR */
/* True if W is a tab bar window. */
-#if defined (HAVE_WINDOW_SYSTEM) && !defined (HAVE_PGTK)
+#if defined (HAVE_WINDOW_SYSTEM)
# define WINDOW_TAB_BAR_P(W) \
(WINDOWP (WINDOW_XFRAME (W)->tab_bar_window) \
&& (W) == XWINDOW (WINDOW_XFRAME (W)->tab_bar_window))
@@ -992,7 +1011,7 @@ wset_next_buffers (struct window *w, Lisp_Object val)
/* Height in pixels of the mode line.
May be zero if W doesn't have a mode line. */
#define WINDOW_MODE_LINE_HEIGHT(W) \
- (window_wants_mode_line ((W)) \
+ (window_wants_mode_line (W) \
? CURRENT_MODE_LINE_HEIGHT (W) \
: 0)
@@ -1030,7 +1049,7 @@ wset_next_buffers (struct window *w, Lisp_Object val)
/* Pixel height of window W without mode and header/tab line and bottom
divider. */
#define WINDOW_BOX_TEXT_HEIGHT(W) \
- (WINDOW_PIXEL_HEIGHT ((W)) \
+ (WINDOW_PIXEL_HEIGHT (W) \
- WINDOW_BOTTOM_DIVIDER_WIDTH (W) \
- WINDOW_SCROLL_BAR_AREA_HEIGHT (W) \
- WINDOW_MODE_LINE_HEIGHT (W) \
@@ -1046,7 +1065,7 @@ wset_next_buffers (struct window *w, Lisp_Object val)
/* Convert window W relative pixel X to frame pixel coordinates. */
#define WINDOW_TO_FRAME_PIXEL_X(W, X) \
- ((X) + WINDOW_BOX_LEFT_EDGE_X ((W)))
+ ((X) + WINDOW_BOX_LEFT_EDGE_X (W))
/* Convert window W relative pixel Y to frame pixel coordinates. */
#define WINDOW_TO_FRAME_PIXEL_Y(W, Y) \
@@ -1054,7 +1073,7 @@ wset_next_buffers (struct window *w, Lisp_Object val)
/* Convert frame relative pixel X to window relative pixel X. */
#define FRAME_TO_WINDOW_PIXEL_X(W, X) \
- ((X) - WINDOW_BOX_LEFT_EDGE_X ((W)))
+ ((X) - WINDOW_BOX_LEFT_EDGE_X (W))
/* Convert frame relative pixel Y to window relative pixel Y. */
#define FRAME_TO_WINDOW_PIXEL_Y(W, Y) \
@@ -1063,7 +1082,7 @@ wset_next_buffers (struct window *w, Lisp_Object val)
/* Convert a text area relative x-position in window W to frame X
pixel coordinates. */
#define WINDOW_TEXT_TO_FRAME_PIXEL_X(W, X) \
- (window_box_left ((W), TEXT_AREA) + (X))
+ window_box_left (W, TEXT_AREA) + (X)
/* This is the window in which the terminal's cursor should be left when
nothing is being done with it. This must always be a leaf window, and its
@@ -1092,7 +1111,7 @@ extern Lisp_Object minibuf_selected_window;
extern Lisp_Object make_window (void);
extern Lisp_Object window_from_coordinates (struct frame *, int, int,
- enum window_part *, bool, bool);
+ enum window_part *, bool, bool, bool);
extern void resize_frame_windows (struct frame *, int, bool);
extern void restore_window_configuration (Lisp_Object);
extern void delete_all_child_windows (Lisp_Object);
@@ -1114,9 +1133,11 @@ void set_window_buffer (Lisp_Object window, Lisp_Object buffer,
extern Lisp_Object echo_area_window;
-/* Non-zero if we should redraw the mode lines on the next redisplay.
+/* Non-zero if we should redraw the mode line*s* on the next redisplay.
Usually set to a unique small integer so we can track the main causes of
- full redisplays in `redisplay--mode-lines-cause'. */
+ full redisplays in `redisplay--mode-lines-cause'.
+ Here "mode lines" includes other elements not coming from the buffer's
+ text, such as header-lines, tab lines, frame names, menu-bars, .... */
extern int update_mode_lines;
@@ -1134,6 +1155,11 @@ extern int windows_or_buffers_changed;
extern void wset_redisplay (struct window *w);
extern void fset_redisplay (struct frame *f);
extern void bset_redisplay (struct buffer *b);
+
+/* Routines to indicate that the mode-lines might need to be redisplayed.
+ Just as for `update_mode_lines`, this includes other elements not coming
+ from the buffer's text, such as header-lines, tab lines, frame names,
+ menu-bars, .... */
extern void bset_update_mode_line (struct buffer *b);
extern void wset_update_mode_line (struct window *w);
/* Call this to tell redisplay to look for other windows than selected-window