diff options
| author | Stefan Monnier | 2010-08-11 07:42:48 +0200 |
|---|---|---|
| committer | Stefan Monnier | 2010-08-11 07:42:48 +0200 |
| commit | c566235d981eba73c88bbff00b6a1d88360b6e9f (patch) | |
| tree | f8d653add3570fe750a83d1123ed35022e0bf4ef /src/window.c | |
| parent | 0bfdb86f425a88fe43ebc88851c6f9a6418e1862 (diff) | |
| parent | 490b89acab3e759426ede25c31c94268df55e925 (diff) | |
| download | emacs-c566235d981eba73c88bbff00b6a1d88360b6e9f.tar.gz emacs-c566235d981eba73c88bbff00b6a1d88360b6e9f.zip | |
Merge from trunk
Diffstat (limited to 'src/window.c')
| -rw-r--r-- | src/window.c | 20 |
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 | |||
| 55 | Lisp_Object Qwindowp, Qwindow_live_p, Qwindow_configuration_p; | 54 | Lisp_Object Qwindowp, Qwindow_live_p, Qwindow_configuration_p; |
| 56 | Lisp_Object Qdisplay_buffer; | 55 | Lisp_Object Qdisplay_buffer; |
| 57 | Lisp_Object Qscroll_up, Qscroll_down, Qscroll_command; | 56 | Lisp_Object Qscroll_up, Qscroll_down, Qscroll_command; |
| 58 | Lisp_Object Qwindow_size_fixed; | 57 | Lisp_Object Qwindow_size_fixed; |
| 59 | 58 | ||
| 60 | extern Lisp_Object Qleft_margin, Qright_margin; | ||
| 61 | |||
| 62 | static int displayed_window_lines (struct window *); | 59 | static int displayed_window_lines (struct window *); |
| 63 | static struct window *decode_window (Lisp_Object); | 60 | static struct window *decode_window (Lisp_Object); |
| 64 | static int count_windows (struct window *); | 61 | static int count_windows (struct window *); |
| @@ -191,16 +188,11 @@ static int window_scroll_preserve_vpos; | |||
| 191 | static int inhibit_frame_unsplittable; | 188 | static int inhibit_frame_unsplittable; |
| 192 | #endif /* 0 */ | 189 | #endif /* 0 */ |
| 193 | 190 | ||
| 194 | extern EMACS_INT scroll_margin; | ||
| 195 | |||
| 196 | extern 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 | ||
| 202 | static Lisp_Object Vrecenter_redisplay; | 195 | static Lisp_Object Vrecenter_redisplay; |
| 203 | extern Lisp_Object Qtty; | ||
| 204 | 196 | ||
| 205 | 197 | ||
| 206 | DEFUN ("windowp", Fwindowp, Swindowp, 1, 1, 0, | 198 | DEFUN ("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. |
| 509 | WINDOW defaults to the selected window. | 501 | WINDOW defaults to the selected window. |
| 510 | 502 | ||
| 511 | The return value includes WINDOW's mode line and header line, if any. */) | 503 | The return value includes WINDOW's mode line and header line, if any. |
| 504 | |||
| 505 | Note: The function does not take into account the value of `line-spacing' | ||
| 506 | when 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 | ||
| 654 | DEFUN ("window-absolute-pixel-edges", Fwindow_absolute_pixel_edges, | 654 | DEFUN ("window-absolute-pixel-edges", Fwindow_absolute_pixel_edges, |