Mercurial > hg > xemacs-beta
comparison src/window.h @ 412:697ef44129c6 r21-2-14
Import from CVS: tag r21-2-14
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:20:41 +0200 |
parents | 501cfd01ee6d |
children | 95016f13131a |
comparison
equal
deleted
inserted
replaced
411:12e008d41344 | 412:697ef44129c6 |
---|---|
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 INCLUDED_window_h_ | 27 #ifndef _XEMACS_WINDOW_H_ |
28 #define INCLUDED_window_h_ | 28 #define _XEMACS_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 Charcount modeline_hscroll; | 132 int 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; | |
141 /* Number saying how recently window was selected */ | 133 /* Number saying how recently window was selected */ |
142 Lisp_Object use_time; | 134 Lisp_Object use_time; |
143 /* text.modified of displayed buffer as of last time display completed */ | 135 /* text.modified of displayed buffer as of last time display completed */ |
144 Lisp_Object last_modified[3]; | 136 Lisp_Object last_modified[3]; |
145 /* Value of point at that time */ | 137 /* Value of point at that time */ |
181 int window_end_pos[3]; | 173 int window_end_pos[3]; |
182 | 174 |
183 /* If redisplay in this window goes beyond this buffer position, | 175 /* If redisplay in this window goes beyond this buffer position, |
184 must run the redisplay-end-trigger-functions. */ | 176 must run the redisplay-end-trigger-functions. */ |
185 Lisp_Object redisplay_end_trigger; | 177 Lisp_Object redisplay_end_trigger; |
186 | |
187 /* Set by the extent code when extents in the gutter are changed. */ | |
188 int gutter_extent_modiff[4]; | |
189 | 178 |
190 /* Set by redisplay to the last position seen. This is used | 179 /* Set by redisplay to the last position seen. This is used |
191 to implement the redisplay-end-trigger-functions. */ | 180 to implement the redisplay-end-trigger-functions. */ |
192 Bufpos last_redisplay_pos; | 181 Bufpos last_redisplay_pos; |
193 | 182 |
263 | 252 |
264 DECLARE_LRECORD (window, struct window); | 253 DECLARE_LRECORD (window, struct window); |
265 #define XWINDOW(x) XRECORD (x, window, struct window) | 254 #define XWINDOW(x) XRECORD (x, window, struct window) |
266 #define XSETWINDOW(x, p) XSETRECORD (x, p, window) | 255 #define XSETWINDOW(x, p) XSETRECORD (x, p, window) |
267 #define WINDOWP(x) RECORDP (x, window) | 256 #define WINDOWP(x) RECORDP (x, window) |
257 #define GC_WINDOWP(x) GC_RECORDP (x, window) | |
268 #define CHECK_WINDOW(x) CHECK_RECORD (x, window) | 258 #define CHECK_WINDOW(x) CHECK_RECORD (x, window) |
269 #define CONCHECK_WINDOW(x) CONCHECK_RECORD (x, window) | 259 #define CONCHECK_WINDOW(x) CONCHECK_RECORD (x, window) |
270 | 260 |
271 #define WINDOW_LIVE_P(x) (!(x)->dead) | 261 #define WINDOW_LIVE_P(x) (!(x)->dead) |
272 #define CHECK_LIVE_WINDOW(x) do { \ | 262 #define CHECK_LIVE_WINDOW(x) do { \ |
311 EXFUN (Fmove_to_window_line, 2); | 301 EXFUN (Fmove_to_window_line, 2); |
312 EXFUN (Frecenter, 2); | 302 EXFUN (Frecenter, 2); |
313 EXFUN (Freplace_buffer_in_windows, 1); | 303 EXFUN (Freplace_buffer_in_windows, 1); |
314 EXFUN (Fselect_window, 2); | 304 EXFUN (Fselect_window, 2); |
315 EXFUN (Fselected_window, 1); | 305 EXFUN (Fselected_window, 1); |
316 EXFUN (Fset_window_buffer, 3); | 306 EXFUN (Fset_window_buffer, 2); |
317 EXFUN (Fset_window_hscroll, 2); | 307 EXFUN (Fset_window_hscroll, 2); |
318 EXFUN (Fset_window_point, 2); | 308 EXFUN (Fset_window_point, 2); |
319 EXFUN (Fset_window_start, 3); | 309 EXFUN (Fset_window_start, 3); |
320 EXFUN (Fwindow_buffer, 1); | 310 EXFUN (Fwindow_buffer, 1); |
321 EXFUN (Fwindow_highest_p, 1); | 311 EXFUN (Fwindow_highest_p, 1); |
337 int window_char_width (struct window *, int include_margins_p); | 327 int window_char_width (struct window *, int include_margins_p); |
338 int window_char_height (struct window *, int include_gutters_p); | 328 int window_char_height (struct window *, int include_gutters_p); |
339 int window_displayed_height (struct window *); | 329 int window_displayed_height (struct window *); |
340 int window_is_leftmost (struct window *w); | 330 int window_is_leftmost (struct window *w); |
341 int window_is_rightmost (struct window *w); | 331 int window_is_rightmost (struct window *w); |
342 int window_is_lowest (struct window *w); | |
343 int window_is_highest (struct window *w); | |
344 int window_truncation_on (struct window *w); | 332 int window_truncation_on (struct window *w); |
345 int window_needs_vertical_divider (struct window *); | 333 int window_needs_vertical_divider (struct window *); |
346 int window_scrollbar_width (struct window *w); | 334 int window_scrollbar_width (struct window *w); |
347 int window_scrollbar_height (struct window *w); | 335 int window_scrollbar_height (struct window *w); |
348 int window_modeline_height (struct window *w); | 336 int window_modeline_height (struct window *w); |
350 int window_right_margin_width (struct window *w); | 338 int window_right_margin_width (struct window *w); |
351 int window_top_gutter_height (struct window *w); | 339 int window_top_gutter_height (struct window *w); |
352 int window_bottom_gutter_height (struct window *w); | 340 int window_bottom_gutter_height (struct window *w); |
353 int window_left_gutter_width (struct window *w, int modeline); | 341 int window_left_gutter_width (struct window *w, int modeline); |
354 int window_right_gutter_width (struct window *w, int modeline); | 342 int window_right_gutter_width (struct window *w, int modeline); |
343 int window_bottom_toolbar_height (struct window *w); | |
355 | 344 |
356 void delete_all_subwindows (struct window *w); | 345 void delete_all_subwindows (struct window *w); |
357 void set_window_pixheight (Lisp_Object window, int pixheight, | 346 void set_window_pixheight (Lisp_Object window, int pixheight, |
358 int nodelete); | 347 int nodelete); |
359 void set_window_pixwidth (Lisp_Object window, int pixwidth, | 348 void set_window_pixwidth (Lisp_Object window, int pixwidth, |
361 void window_scroll (Lisp_Object window, Lisp_Object n, int direction, | 350 void window_scroll (Lisp_Object window, Lisp_Object n, int direction, |
362 Error_behavior errb); | 351 Error_behavior errb); |
363 int buffer_window_count (struct buffer *b, struct frame *f); | 352 int buffer_window_count (struct buffer *b, struct frame *f); |
364 int buffer_window_mru (struct window *w); | 353 int buffer_window_mru (struct window *w); |
365 void check_frame_size (struct frame *frame, int *rows, int *cols); | 354 void check_frame_size (struct frame *frame, int *rows, int *cols); |
366 int frame_pixsize_valid_p (struct frame *frame, int width, int height); | |
367 int frame_size_valid_p (struct frame *frame, int rows, int cols); | |
368 struct window *decode_window (Lisp_Object window); | 355 struct window *decode_window (Lisp_Object window); |
369 struct window *find_window_by_pixel_pos (int pix_x, int pix_y, Lisp_Object win); | 356 struct window *find_window_by_pixel_pos (int pix_x, int pix_y, Lisp_Object win); |
370 | 357 |
371 /* new functions to handle the window mirror */ | 358 /* new functions to handle the window mirror */ |
372 void free_window_mirror (struct window_mirror *mir); | 359 void free_window_mirror (struct window_mirror *mir); |
385 int invalidate_vertical_divider_cache_in_window (struct window *w, | 372 int invalidate_vertical_divider_cache_in_window (struct window *w, |
386 void *u_n_u_s_e_d); | 373 void *u_n_u_s_e_d); |
387 int window_divider_width (struct window *w); | 374 int window_divider_width (struct window *w); |
388 | 375 |
389 #define WINDOW_FRAME(w) ((w)->frame) | 376 #define WINDOW_FRAME(w) ((w)->frame) |
390 #define WINDOW_XFRAME(w) XFRAME (WINDOW_FRAME (w)) | |
391 #define WINDOW_BUFFER(w) ((w)->buffer) | 377 #define WINDOW_BUFFER(w) ((w)->buffer) |
392 #define WINDOW_XBUFFER(w) XBUFFER (WINDOW_BUFFER (w)) | |
393 #define WINDOW_DEVICE(w) FRAME_DEVICE (XFRAME (WINDOW_FRAME (w))) | 378 #define WINDOW_DEVICE(w) FRAME_DEVICE (XFRAME (WINDOW_FRAME (w))) |
394 #define WINDOW_XDEVICE(w) XDEVICE (WINDOW_DEVICE (w)) | |
395 #define WINDOW_CONSOLE(w) DEVICE_CONSOLE (XDEVICE (WINDOW_DEVICE (w))) | 379 #define WINDOW_CONSOLE(w) DEVICE_CONSOLE (XDEVICE (WINDOW_DEVICE (w))) |
396 #define WINDOW_XCONSOLE(w) XCONSOLE (WINDOW_CONSOLE (w)) | |
397 | 380 |
398 /* XEmacs window size and positioning macros. */ | 381 /* XEmacs window size and positioning macros. */ |
399 #define WINDOW_TOP(w) ((w)->pixel_top) | 382 #define WINDOW_TOP(w) ((w)->pixel_top) |
400 #define WINDOW_TEXT_TOP(w) (WINDOW_TOP (w) + window_top_gutter_height (w)) | 383 #define WINDOW_TEXT_TOP(w) (WINDOW_TOP (w) + window_top_gutter_height (w)) |
401 #define WINDOW_TEXT_TOP_CLIP(w) ((w)->top_yoffset) | |
402 #define WINDOW_BOTTOM(w) ((w)->pixel_top + (w)->pixel_height) | 384 #define WINDOW_BOTTOM(w) ((w)->pixel_top + (w)->pixel_height) |
403 #define WINDOW_TEXT_BOTTOM(w) (WINDOW_BOTTOM (w) - window_bottom_gutter_height (w)) | 385 #define WINDOW_TEXT_BOTTOM(w) (WINDOW_BOTTOM (w) - window_bottom_gutter_height (w)) |
404 #define WINDOW_LEFT(w) ((w)->pixel_left) | 386 #define WINDOW_LEFT(w) ((w)->pixel_left) |
405 #define WINDOW_TEXT_LEFT(w) (WINDOW_LEFT (w) + window_left_gutter_width (w, 0)) | 387 #define WINDOW_TEXT_LEFT(w) (WINDOW_LEFT (w) + window_left_gutter_width (w, 0)) |
406 #define WINDOW_MODELINE_LEFT(w) \ | 388 #define WINDOW_MODELINE_LEFT(w) \ |
432 ? 10 \ | 414 ? 10 \ |
433 : MODELINE_OFF_SHADOW_THICKNESS_ADJUSTED (win)) | 415 : MODELINE_OFF_SHADOW_THICKNESS_ADJUSTED (win)) |
434 | 416 |
435 #endif /* emacs */ | 417 #endif /* emacs */ |
436 | 418 |
437 #endif /* INCLUDED_window_h_ */ | 419 #endif /* _XEMACS_WINDOW_H_ */ |