aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.c
diff options
context:
space:
mode:
authorStefan Monnier2010-08-11 07:42:48 +0200
committerStefan Monnier2010-08-11 07:42:48 +0200
commitc566235d981eba73c88bbff00b6a1d88360b6e9f (patch)
treef8d653add3570fe750a83d1123ed35022e0bf4ef /src/window.c
parent0bfdb86f425a88fe43ebc88851c6f9a6418e1862 (diff)
parent490b89acab3e759426ede25c31c94268df55e925 (diff)
downloademacs-c566235d981eba73c88bbff00b6a1d88360b6e9f.tar.gz
emacs-c566235d981eba73c88bbff00b6a1d88360b6e9f.zip
Merge from trunk
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/window.c b/src/window.c
index 89563112628..1fabe72d72d 100644
--- a/src/window.c
+++ b/src/window.c
@@ -51,14 +51,11 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
51#include "nsterm.h" 51#include "nsterm.h"
52#endif 52#endif
53 53
54
55Lisp_Object Qwindowp, Qwindow_live_p, Qwindow_configuration_p; 54Lisp_Object Qwindowp, Qwindow_live_p, Qwindow_configuration_p;
56Lisp_Object Qdisplay_buffer; 55Lisp_Object Qdisplay_buffer;
57Lisp_Object Qscroll_up, Qscroll_down, Qscroll_command; 56Lisp_Object Qscroll_up, Qscroll_down, Qscroll_command;
58Lisp_Object Qwindow_size_fixed; 57Lisp_Object Qwindow_size_fixed;
59 58
60extern Lisp_Object Qleft_margin, Qright_margin;
61
62static int displayed_window_lines (struct window *); 59static int displayed_window_lines (struct window *);
63static struct window *decode_window (Lisp_Object); 60static struct window *decode_window (Lisp_Object);
64static int count_windows (struct window *); 61static int count_windows (struct window *);
@@ -191,16 +188,11 @@ static int window_scroll_preserve_vpos;
191static int inhibit_frame_unsplittable; 188static int inhibit_frame_unsplittable;
192#endif /* 0 */ 189#endif /* 0 */
193 190
194extern EMACS_INT scroll_margin;
195
196extern Lisp_Object Qwindow_scroll_functions, Vwindow_scroll_functions;
197
198/* If non-nil, then the `recenter' command with a nil argument 191/* If non-nil, then the `recenter' command with a nil argument
199 the entire frame to be redrawn; the special value `tty' causes the 192 the entire frame to be redrawn; the special value `tty' causes the
200 frame to be redrawn only if it is a tty frame. */ 193 frame to be redrawn only if it is a tty frame. */
201 194
202static Lisp_Object Vrecenter_redisplay; 195static Lisp_Object Vrecenter_redisplay;
203extern Lisp_Object Qtty;
204 196
205 197
206DEFUN ("windowp", Fwindowp, Swindowp, 1, 1, 0, 198DEFUN ("windowp", Fwindowp, Swindowp, 1, 1, 0,
@@ -508,7 +500,10 @@ DEFUN ("window-height", Fwindow_height, Swindow_height, 0, 1, 0,
508 doc: /* Return the number of lines in WINDOW. 500 doc: /* Return the number of lines in WINDOW.
509WINDOW defaults to the selected window. 501WINDOW defaults to the selected window.
510 502
511The return value includes WINDOW's mode line and header line, if any. */) 503The return value includes WINDOW's mode line and header line, if any.
504
505Note: The function does not take into account the value of `line-spacing'
506when calculating the number of lines in WINDOW. */)
512 (Lisp_Object window) 507 (Lisp_Object window)
513{ 508{
514 return decode_any_window (window)->total_lines; 509 return decode_any_window (window)->total_lines;
@@ -642,13 +637,18 @@ calc_absolute_offset(struct window *w, int *add_x, int *add_y)
642#ifdef FRAME_MENUBAR_HEIGHT 637#ifdef FRAME_MENUBAR_HEIGHT
643 *add_y += FRAME_MENUBAR_HEIGHT (f); 638 *add_y += FRAME_MENUBAR_HEIGHT (f);
644#endif 639#endif
645#ifdef FRAME_TOOLBAR_HEIGHT 640#ifdef FRAME_TOOLBAR_TOP_HEIGHT
641 *add_y += FRAME_TOOLBAR_TOP_HEIGHT (f);
642#elif FRAME_TOOLBAR_HEIGHT
646 *add_y += FRAME_TOOLBAR_HEIGHT (f); 643 *add_y += FRAME_TOOLBAR_HEIGHT (f);
647#endif 644#endif
648#ifdef FRAME_NS_TITLEBAR_HEIGHT 645#ifdef FRAME_NS_TITLEBAR_HEIGHT
649 *add_y += FRAME_NS_TITLEBAR_HEIGHT (f); 646 *add_y += FRAME_NS_TITLEBAR_HEIGHT (f);
650#endif 647#endif
651 *add_x = f->left_pos; 648 *add_x = f->left_pos;
649#ifdef FRAME_TOOLBAR_LEFT_WIDTH
650 *add_x += FRAME_TOOLBAR_LEFT_WIDTH (f);
651#endif
652} 652}
653 653
654DEFUN ("window-absolute-pixel-edges", Fwindow_absolute_pixel_edges, 654DEFUN ("window-absolute-pixel-edges", Fwindow_absolute_pixel_edges,