comparison src/window.h @ 398:74fd4e045ea6 r21-2-29

Import from CVS: tag r21-2-29
author cvs
date Mon, 13 Aug 2007 11:13:30 +0200
parents bbff43aa5eb7
children 2f8bb876ab1d
comparison
equal deleted inserted replaced
397:f4aeb21a5bad 398:74fd4e045ea6
22 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 22 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23 Boston, MA 02111-1307, USA. */ 23 Boston, MA 02111-1307, USA. */
24 24
25 /* Synched up with: FSF 19.30. */ 25 /* Synched up with: FSF 19.30. */
26 26
27 #ifndef _XEMACS_WINDOW_H_ 27 #ifndef INCLUDED_window_h_
28 #define _XEMACS_WINDOW_H_ 28 #define INCLUDED_window_h_
29 29
30 #include "redisplay.h" 30 #include "redisplay.h"
31 #ifdef HAVE_SCROLLBARS 31 #ifdef HAVE_SCROLLBARS
32 #include "scrollbar.h" 32 #include "scrollbar.h"
33 #endif 33 #endif
127 /* A marker pointing to where in the text the scrollbar is pointing */ 127 /* A marker pointing to where in the text the scrollbar is pointing */
128 Lisp_Object sb_point; 128 Lisp_Object sb_point;
129 /* Number of columns display within the window is scrolled to the left. */ 129 /* Number of columns display within the window is scrolled to the left. */
130 int hscroll; 130 int hscroll;
131 /* Idem for the window's modeline */ 131 /* Idem for the window's modeline */
132 int modeline_hscroll; 132 Charcount modeline_hscroll;
133 /* Amount to clip off the top line for pixel-based scrolling. Point
134 will remain constant but this will be incremented to
135 incrementally shift lines up. */
136 int top_yoffset;
137 /* Amount to clip off the left of the lines for pixel-based
138 scrolling. Hscroll will remain constant but this will be
139 incremented to incrementally shift lines left.*/
140 int left_xoffset;
133 /* Number saying how recently window was selected */ 141 /* Number saying how recently window was selected */
134 Lisp_Object use_time; 142 Lisp_Object use_time;
135 /* text.modified of displayed buffer as of last time display completed */ 143 /* text.modified of displayed buffer as of last time display completed */
136 Lisp_Object last_modified[3]; 144 Lisp_Object last_modified[3];
137 /* Value of point at that time */ 145 /* Value of point at that time */
252 260
253 DECLARE_LRECORD (window, struct window); 261 DECLARE_LRECORD (window, struct window);
254 #define XWINDOW(x) XRECORD (x, window, struct window) 262 #define XWINDOW(x) XRECORD (x, window, struct window)
255 #define XSETWINDOW(x, p) XSETRECORD (x, p, window) 263 #define XSETWINDOW(x, p) XSETRECORD (x, p, window)
256 #define WINDOWP(x) RECORDP (x, window) 264 #define WINDOWP(x) RECORDP (x, window)
257 #define GC_WINDOWP(x) GC_RECORDP (x, window)
258 #define CHECK_WINDOW(x) CHECK_RECORD (x, window) 265 #define CHECK_WINDOW(x) CHECK_RECORD (x, window)
259 #define CONCHECK_WINDOW(x) CONCHECK_RECORD (x, window) 266 #define CONCHECK_WINDOW(x) CONCHECK_RECORD (x, window)
260 267
261 #define WINDOW_LIVE_P(x) (!(x)->dead) 268 #define WINDOW_LIVE_P(x) (!(x)->dead)
262 #define CHECK_LIVE_WINDOW(x) do { \ 269 #define CHECK_LIVE_WINDOW(x) do { \
301 EXFUN (Fmove_to_window_line, 2); 308 EXFUN (Fmove_to_window_line, 2);
302 EXFUN (Frecenter, 2); 309 EXFUN (Frecenter, 2);
303 EXFUN (Freplace_buffer_in_windows, 1); 310 EXFUN (Freplace_buffer_in_windows, 1);
304 EXFUN (Fselect_window, 2); 311 EXFUN (Fselect_window, 2);
305 EXFUN (Fselected_window, 1); 312 EXFUN (Fselected_window, 1);
306 EXFUN (Fset_window_buffer, 2); 313 EXFUN (Fset_window_buffer, 3);
307 EXFUN (Fset_window_hscroll, 2); 314 EXFUN (Fset_window_hscroll, 2);
308 EXFUN (Fset_window_point, 2); 315 EXFUN (Fset_window_point, 2);
309 EXFUN (Fset_window_start, 3); 316 EXFUN (Fset_window_start, 3);
310 EXFUN (Fwindow_buffer, 1); 317 EXFUN (Fwindow_buffer, 1);
311 EXFUN (Fwindow_highest_p, 1); 318 EXFUN (Fwindow_highest_p, 1);
327 int window_char_width (struct window *, int include_margins_p); 334 int window_char_width (struct window *, int include_margins_p);
328 int window_char_height (struct window *, int include_gutters_p); 335 int window_char_height (struct window *, int include_gutters_p);
329 int window_displayed_height (struct window *); 336 int window_displayed_height (struct window *);
330 int window_is_leftmost (struct window *w); 337 int window_is_leftmost (struct window *w);
331 int window_is_rightmost (struct window *w); 338 int window_is_rightmost (struct window *w);
339 int window_is_lowest (struct window *w);
340 int window_is_highest (struct window *w);
332 int window_truncation_on (struct window *w); 341 int window_truncation_on (struct window *w);
333 int window_needs_vertical_divider (struct window *); 342 int window_needs_vertical_divider (struct window *);
334 int window_scrollbar_width (struct window *w); 343 int window_scrollbar_width (struct window *w);
335 int window_scrollbar_height (struct window *w); 344 int window_scrollbar_height (struct window *w);
336 int window_modeline_height (struct window *w); 345 int window_modeline_height (struct window *w);
338 int window_right_margin_width (struct window *w); 347 int window_right_margin_width (struct window *w);
339 int window_top_gutter_height (struct window *w); 348 int window_top_gutter_height (struct window *w);
340 int window_bottom_gutter_height (struct window *w); 349 int window_bottom_gutter_height (struct window *w);
341 int window_left_gutter_width (struct window *w, int modeline); 350 int window_left_gutter_width (struct window *w, int modeline);
342 int window_right_gutter_width (struct window *w, int modeline); 351 int window_right_gutter_width (struct window *w, int modeline);
343 int window_bottom_toolbar_height (struct window *w);
344 352
345 void delete_all_subwindows (struct window *w); 353 void delete_all_subwindows (struct window *w);
346 void set_window_pixheight (Lisp_Object window, int pixheight, 354 void set_window_pixheight (Lisp_Object window, int pixheight,
347 int nodelete); 355 int nodelete);
348 void set_window_pixwidth (Lisp_Object window, int pixwidth, 356 void set_window_pixwidth (Lisp_Object window, int pixwidth,
350 void window_scroll (Lisp_Object window, Lisp_Object n, int direction, 358 void window_scroll (Lisp_Object window, Lisp_Object n, int direction,
351 Error_behavior errb); 359 Error_behavior errb);
352 int buffer_window_count (struct buffer *b, struct frame *f); 360 int buffer_window_count (struct buffer *b, struct frame *f);
353 int buffer_window_mru (struct window *w); 361 int buffer_window_mru (struct window *w);
354 void check_frame_size (struct frame *frame, int *rows, int *cols); 362 void check_frame_size (struct frame *frame, int *rows, int *cols);
363 int frame_pixsize_valid_p (struct frame *frame, int width, int height);
364 int frame_size_valid_p (struct frame *frame, int rows, int cols);
355 struct window *decode_window (Lisp_Object window); 365 struct window *decode_window (Lisp_Object window);
356 struct window *find_window_by_pixel_pos (int pix_x, int pix_y, Lisp_Object win); 366 struct window *find_window_by_pixel_pos (int pix_x, int pix_y, Lisp_Object win);
357 367
358 /* new functions to handle the window mirror */ 368 /* new functions to handle the window mirror */
359 void free_window_mirror (struct window_mirror *mir); 369 void free_window_mirror (struct window_mirror *mir);
379 #define WINDOW_CONSOLE(w) DEVICE_CONSOLE (XDEVICE (WINDOW_DEVICE (w))) 389 #define WINDOW_CONSOLE(w) DEVICE_CONSOLE (XDEVICE (WINDOW_DEVICE (w)))
380 390
381 /* XEmacs window size and positioning macros. */ 391 /* XEmacs window size and positioning macros. */
382 #define WINDOW_TOP(w) ((w)->pixel_top) 392 #define WINDOW_TOP(w) ((w)->pixel_top)
383 #define WINDOW_TEXT_TOP(w) (WINDOW_TOP (w) + window_top_gutter_height (w)) 393 #define WINDOW_TEXT_TOP(w) (WINDOW_TOP (w) + window_top_gutter_height (w))
394 #define WINDOW_TEXT_TOP_CLIP(w) ((w)->top_yoffset)
384 #define WINDOW_BOTTOM(w) ((w)->pixel_top + (w)->pixel_height) 395 #define WINDOW_BOTTOM(w) ((w)->pixel_top + (w)->pixel_height)
385 #define WINDOW_TEXT_BOTTOM(w) (WINDOW_BOTTOM (w) - window_bottom_gutter_height (w)) 396 #define WINDOW_TEXT_BOTTOM(w) (WINDOW_BOTTOM (w) - window_bottom_gutter_height (w))
386 #define WINDOW_LEFT(w) ((w)->pixel_left) 397 #define WINDOW_LEFT(w) ((w)->pixel_left)
387 #define WINDOW_TEXT_LEFT(w) (WINDOW_LEFT (w) + window_left_gutter_width (w, 0)) 398 #define WINDOW_TEXT_LEFT(w) (WINDOW_LEFT (w) + window_left_gutter_width (w, 0))
388 #define WINDOW_MODELINE_LEFT(w) \ 399 #define WINDOW_MODELINE_LEFT(w) \
414 ? 10 \ 425 ? 10 \
415 : MODELINE_OFF_SHADOW_THICKNESS_ADJUSTED (win)) 426 : MODELINE_OFF_SHADOW_THICKNESS_ADJUSTED (win))
416 427
417 #endif /* emacs */ 428 #endif /* emacs */
418 429
419 #endif /* _XEMACS_WINDOW_H_ */ 430 #endif /* INCLUDED_window_h_ */