/* Window definitions for GNU Emacs.
Copyright (C) 1985, 1986, 1993, 1995, 1997, 1998, 1999, 2000, 2001,
- 2002, 2003, 2004, 2005, 2006, 2007, 2008
+ 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
This file is part of GNU Emacs.
/* The buffer displayed in this window */
/* Of the fields vchild, hchild and buffer, only one is non-nil. */
Lisp_Object buffer;
- /* A marker pointing to where in the text to start displaying */
+ /* A marker pointing to where in the text to start displaying.
+ BIDI Note: This is the _logical-order_ start, i.e. the smallest
+ buffer position visible in the window, not necessarily the
+ character displayed in the top left corner of the window. */
Lisp_Object start;
/* A marker pointing to where in the text point is in this window,
used only when the window is not selected.
proportionally. */
Lisp_Object resize_proportionally;
- /* Original window height and top before mini-window was
- enlarged. */
+ /* Original window height and top before mini-window was enlarged. */
Lisp_Object orig_total_lines, orig_top_line;
+ /* An alist with parameteres. */
+ Lisp_Object window_parameters;
+
/* No Lisp data may follow below this point without changing
mark_object in alloc.c. The member current_matrix must be the
first non-Lisp member. */
Currently only used for menu bar windows of frames. */
unsigned pseudo_window_p : 1;
+ /* 1 means the window start of this window is frozen and may not
+ be changed during redisplay. If point is not in the window,
+ accept that. */
+ unsigned frozen_window_start_p : 1;
+
/* Amount by which lines of this window are scrolled in
y-direction (smooth scrolling). */
int vscroll;
/* Z_BYTE - the buffer position of the last glyph in the current matrix
of W. Only valid if WINDOW_END_VALID is not nil. */
int window_end_bytepos;
-
- /* 1 means the window start of this window is frozen and may not
- be changed during redisplay. If point is not in the window,
- accept that. */
- unsigned frozen_window_start_p : 1;
};
/* 1 if W is a minibuffer window. */
(FRAME_INTERNAL_BORDER_WIDTH (WINDOW_XFRAME (W)) \
+ WINDOW_RIGHT_EDGE_COL (W) * WINDOW_FRAME_COLUMN_WIDTH (W))
+/* 1 if W is a menu bar window. */
+
+#define WINDOW_MENU_BAR_P(W) \
+ (WINDOWP (WINDOW_XFRAME (W)->menu_bar_window) \
+ && (W) == XWINDOW (WINDOW_XFRAME (W)->menu_bar_window))
+
+/* 1 if W is a tool bar window. */
+
+#define WINDOW_TOOL_BAR_P(W) \
+ (WINDOWP (WINDOW_XFRAME (W)->tool_bar_window) \
+ && (W) == XWINDOW (WINDOW_XFRAME (W)->tool_bar_window))
+
/* Return the frame y-position at which window W starts.
This includes a header line, if any. */
#define WINDOW_TOP_EDGE_Y(W) \
- (FRAME_INTERNAL_BORDER_WIDTH (WINDOW_XFRAME (W)) \
+ (((WINDOW_MENU_BAR_P (W) || WINDOW_TOOL_BAR_P (W)) \
+ ? 0 : FRAME_INTERNAL_BORDER_WIDTH (WINDOW_XFRAME (W))) \
+ WINDOW_TOP_EDGE_LINE (W) * WINDOW_FRAME_LINE_HEIGHT (W))
/* Return the frame y-position before which window W ends.
This includes a mode line, if any. */
#define WINDOW_BOTTOM_EDGE_Y(W) \
- (FRAME_INTERNAL_BORDER_WIDTH (WINDOW_XFRAME (W)) \
+ (((WINDOW_MENU_BAR_P (W) || WINDOW_TOOL_BAR_P (W)) \
+ ? 0 : FRAME_INTERNAL_BORDER_WIDTH (WINDOW_XFRAME (W))) \
+ WINDOW_BOTTOM_EDGE_LINE (W) * WINDOW_FRAME_LINE_HEIGHT (W))
EXFUN (Fnext_window, 3);
EXFUN (Fselect_window, 2);
-EXFUN (Fdisplay_buffer, 3);
EXFUN (Fset_window_buffer, 3);
EXFUN (Fset_window_hscroll, 2);
EXFUN (Fwindow_hscroll, 1);