comparison src/frame.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
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */ 19 Boston, MA 02111-1307, USA. */
20 20
21 /* Synched up with: FSF 19.30. */ 21 /* Synched up with: FSF 19.30. */
22 22
23 #ifndef INCLUDED_frame_h_ 23 #ifndef _XEMACS_FRAME_H_
24 #define INCLUDED_frame_h_ 24 #define _XEMACS_FRAME_H_
25 25
26 #ifdef HAVE_SCROLLBARS 26 #ifdef HAVE_SCROLLBARS
27 #include "scrollbar.h" 27 #include "scrollbar.h"
28 #endif 28 #endif
29 29
31 #include "toolbar.h" 31 #include "toolbar.h"
32 #endif 32 #endif
33 33
34 #include "device.h" 34 #include "device.h"
35 #include "glyphs.h" 35 #include "glyphs.h"
36 #include "redisplay.h"
37 36
38 #define FRAME_TYPE_NAME(f) ((f)->framemeths->name) 37 #define FRAME_TYPE_NAME(f) ((f)->framemeths->name)
39 #define FRAME_TYPE(f) ((f)->framemeths->symbol) 38 #define FRAME_TYPE(f) ((f)->framemeths->symbol)
40 39
41 /******** Accessing / calling a frame method *********/ 40 /******** Accessing / calling a frame method *********/
76 #ifdef HAVE_TTY 75 #ifdef HAVE_TTY
77 /* The count of frame number. This applies to TTY frames only. */ 76 /* The count of frame number. This applies to TTY frames only. */
78 int order_count; 77 int order_count;
79 #endif 78 #endif
80 79
81 /* Current page number for a printer frame. */
82 int page_number;
83
84 /* Width of the internal border. This is a line of background color 80 /* Width of the internal border. This is a line of background color
85 just inside the window's border. It is normally only non-zero on 81 just inside the window's border. It is normally only non-zero on
86 X frames, but we put it here to avoid introducing window system 82 X frames, but we put it here to avoid introducing window system
87 dependencies. */ 83 dependencies. */
88 int internal_border_width; 84 int internal_border_width;
92 display structures. */ 88 display structures. */
93 struct window_mirror *root_mirror; 89 struct window_mirror *root_mirror;
94 90
95 int modiff; 91 int modiff;
96 92
97 struct expose_ignore* subwindow_exposures; 93 /* subwindow cache elements for this frame */
98 struct expose_ignore* subwindow_exposures_tail; 94 subwindow_cachel_dynarr *subwindow_cachels;
99 95
100 #ifdef HAVE_SCROLLBARS 96 #ifdef HAVE_SCROLLBARS
101 /* frame-local scrollbar information. See scrollbar.c. */ 97 /* frame-local scrollbar information. See scrollbar.c. */
102 int scrollbar_y_offset; 98 int scrollbar_y_offset;
103 99
110 /* Size of toolbars as seen by redisplay. This is used to determine 106 /* Size of toolbars as seen by redisplay. This is used to determine
111 whether to re-layout windows by a call to change_frame_size early 107 whether to re-layout windows by a call to change_frame_size early
112 in redisplay_frame. */ 108 in redisplay_frame. */
113 unsigned int current_toolbar_size[4]; 109 unsigned int current_toolbar_size[4];
114 #endif 110 #endif
115
116 /* Size of gutters as seen by redisplay. This is used to determine
117 whether to re-layout windows by a call to change_frame_size early
118 in redisplay_frame. */
119 unsigned int current_gutter_bounds[4];
120
121 /* Dynamic arrays of display lines for gutters */
122 display_line_dynarr *current_display_lines[4];
123 display_line_dynarr *desired_display_lines[4];
124 111
125 /* A structure of auxiliary data specific to the device type. 112 /* A structure of auxiliary data specific to the device type.
126 struct x_frame is used for X window frames; defined in console-x.h */ 113 struct x_frame is used for X window frames; defined in console-x.h */
127 void *frame_data; 114 void *frame_data;
128 115
171 158
172 unsigned int top_toolbar_was_visible :1; 159 unsigned int top_toolbar_was_visible :1;
173 unsigned int bottom_toolbar_was_visible :1; 160 unsigned int bottom_toolbar_was_visible :1;
174 unsigned int left_toolbar_was_visible :1; 161 unsigned int left_toolbar_was_visible :1;
175 unsigned int right_toolbar_was_visible :1; 162 unsigned int right_toolbar_was_visible :1;
176 /* gutter visibility */
177 unsigned int top_gutter_was_visible :1;
178 unsigned int bottom_gutter_was_visible :1;
179 unsigned int left_gutter_was_visible :1;
180 unsigned int right_gutter_was_visible :1;
181 163
182 /* redisplay flags */ 164 /* redisplay flags */
183 unsigned int buffers_changed :1; 165 unsigned int buffers_changed :1;
184 unsigned int clip_changed :1; 166 unsigned int clip_changed :1;
185 unsigned int extents_changed :1; 167 unsigned int extents_changed :1;
186 unsigned int faces_changed :1; 168 unsigned int faces_changed :1;
187 unsigned int frame_changed :1; 169 unsigned int frame_changed :1;
188 unsigned int subwindows_changed :1; 170 unsigned int subwindows_changed :1;
189 unsigned int subwindows_state_changed :1;
190 unsigned int glyphs_changed :1; 171 unsigned int glyphs_changed :1;
191 unsigned int icon_changed :1; 172 unsigned int icon_changed :1;
192 unsigned int menubar_changed :1; 173 unsigned int menubar_changed :1;
193 unsigned int modeline_changed :1; 174 unsigned int modeline_changed :1;
194 unsigned int point_changed :1; 175 unsigned int point_changed :1;
195 unsigned int size_changed :1; 176 unsigned int size_changed :1;
196 unsigned int toolbar_changed :1; 177 unsigned int toolbar_changed :1;
197 unsigned int gutter_changed :1;
198 unsigned int windows_changed :1; 178 unsigned int windows_changed :1;
199 unsigned int windows_structure_changed :1; 179 unsigned int windows_structure_changed :1;
200 unsigned int window_face_cache_reset :1; /* used by expose handler */ 180 unsigned int window_face_cache_reset :1; /* used by expose handler */
201 unsigned int echo_area_garbaged :1; /* used by Fredisplay_echo_area */ 181 unsigned int echo_area_garbaged :1; /* used by Fredisplay_echo_area */
202 unsigned int size_slipped :1; 182 unsigned int size_slipped :1;
216 EXFUN (Fmake_frame_visible, 1); 196 EXFUN (Fmake_frame_visible, 1);
217 EXFUN (Fraise_frame, 1); 197 EXFUN (Fraise_frame, 1);
218 EXFUN (Fselect_frame, 1); 198 EXFUN (Fselect_frame, 1);
219 EXFUN (Fset_frame_pointer, 2); 199 EXFUN (Fset_frame_pointer, 2);
220 EXFUN (Fset_frame_position, 3); 200 EXFUN (Fset_frame_position, 3);
221 EXFUN (Fset_frame_properties, 2);
222 EXFUN (Fset_frame_size, 4); 201 EXFUN (Fset_frame_size, 4);
223 202
224 extern Lisp_Object Qbackground_toolbar_color, Qbell_volume, Qborder_color; 203 extern Lisp_Object Qbackground_toolbar_color, Qbell_volume, Qborder_color;
225 extern Lisp_Object Qborder_width, Qbottom_toolbar_shadow_color; 204 extern Lisp_Object Qborder_width, Qbottom_toolbar_shadow_color;
226 extern Lisp_Object Qbottom_toolbar_shadow_pixmap, Qdelete_frame; 205 extern Lisp_Object Qbottom_toolbar_shadow_pixmap, Qdelete_frame;
241 220
242 DECLARE_LRECORD (frame, struct frame); 221 DECLARE_LRECORD (frame, struct frame);
243 #define XFRAME(x) XRECORD (x, frame, struct frame) 222 #define XFRAME(x) XRECORD (x, frame, struct frame)
244 #define XSETFRAME(x, p) XSETRECORD (x, p, frame) 223 #define XSETFRAME(x, p) XSETRECORD (x, p, frame)
245 #define FRAMEP(x) RECORDP (x, frame) 224 #define FRAMEP(x) RECORDP (x, frame)
225 #define GC_FRAMEP(x) GC_RECORDP (x, frame)
246 #define CHECK_FRAME(x) CHECK_RECORD (x, frame) 226 #define CHECK_FRAME(x) CHECK_RECORD (x, frame)
247 #define CONCHECK_FRAME(x) CONCHECK_RECORD (x, frame) 227 #define CONCHECK_FRAME(x) CONCHECK_RECORD (x, frame)
248 228
249 #define CHECK_LIVE_FRAME(x) do { \ 229 #define CHECK_LIVE_FRAME(x) do { \
250 CHECK_FRAME (x); \ 230 CHECK_FRAME (x); \
258 } while (0) 238 } while (0)
259 239
260 #define FRAME_TYPE_P(f, type) EQ (FRAME_TYPE (f), Q##type) 240 #define FRAME_TYPE_P(f, type) EQ (FRAME_TYPE (f), Q##type)
261 241
262 #ifdef ERROR_CHECK_TYPECHECK 242 #ifdef ERROR_CHECK_TYPECHECK
263 INLINE_HEADER struct frame * 243 INLINE struct frame *
264 error_check_frame_type (struct frame * f, Lisp_Object sym); 244 error_check_frame_type (struct frame * f, Lisp_Object sym);
265 INLINE_HEADER struct frame * 245 INLINE struct frame *
266 error_check_frame_type (struct frame * f, Lisp_Object sym) 246 error_check_frame_type (struct frame * f, Lisp_Object sym)
267 { 247 {
268 assert (EQ (FRAME_TYPE (f), sym)); 248 assert (EQ (FRAME_TYPE (f), sym));
269 return f; 249 return f;
270 } 250 }
271 # define FRAME_TYPE_DATA(f, type) \ 251 # define FRAME_TYPE_DATA(f, type) \
272 ((struct type##_frame *) error_check_frame_type (f, Q##type)->frame_data) 252 ((struct type##_frame *) (error_check_frame_type (f, Q##type))->frame_data)
273 #else 253 #else
274 # define FRAME_TYPE_DATA(f, type) \ 254 # define FRAME_TYPE_DATA(f, type) \
275 ((struct type##_frame *) (f)->frame_data) 255 ((struct type##_frame *) (f)->frame_data)
276 #endif 256 #endif
277 257
288 if (!FRAME_TYPE_P (XFRAME (x), type)) \ 268 if (!FRAME_TYPE_P (XFRAME (x), type)) \
289 x = wrong_type_argument \ 269 x = wrong_type_argument \
290 (type##_console_methods->predicate_symbol, x); \ 270 (type##_console_methods->predicate_symbol, x); \
291 } while (0) 271 } while (0)
292 272
293 #define FRAME_DISPLAY_P(frm) \
294 (DEVICE_DISPLAY_P (XDEVICE (FRAME_DEVICE (frm))))
295
296 #define CHECK_DISPLAY_FRAME(frm) \
297 do { \
298 CHECK_FRAME (frm); \
299 CHECK_LIVE_FRAME (frm); \
300 CHECK_DISPLAY_DEVICE (FRAME_DEVICE (XFRAME (frm))); \
301 } while (0)
302
303 #define CONCHECK_DISPLAY_FRAME(frm) \
304 do { \
305 CONCHECK_FRAME (frm); \
306 CONCHECK_LIVE_FRAME (frm); \
307 CONCHECK_DISPLAY_DEVICE (FRAME_DEVICE (XFRAME (frm))); \
308 } while (0)
309
310 #define FRAME_PRINTER_P(frm) \
311 (DEVICE_PRINTER_P (XDEVICE (FRAME_DEVICE (frm))))
312
313 #define CHECK_PRINTER_FRAME(frm) \
314 do { \
315 CHECK_FRAME (frm); \
316 CHECK_LIVE_FRAME (frm); \
317 CHECK_PRINTER_DEVICE (FRAME_DEVICE (XFRAME (frm))); \
318 } while (0)
319
320 #define CONCHECK_PRINTER_FRAME(frm) \
321 do { \
322 CONCHECK_FRAME (frm); \
323 CONCHECK_LIVE_FRAME (frm); \
324 CONCHECK_PRINTER_DEVICE (FRAME_DEVICE (XFRAME (frm))); \
325 } while (0)
326
327 /* #### These should be in the frame-*.h files but there are 273 /* #### These should be in the frame-*.h files but there are
328 too many places where the abstraction is broken. Need to 274 too many places where the abstraction is broken. Need to
329 fix. */ 275 fix. */
330 276
331 #define FRAME_X_P(frm) CONSOLE_TYPESYM_X_P (FRAME_TYPE (frm)) 277 #define FRAME_X_P(frm) CONSOLE_TYPESYM_X_P (FRAME_TYPE (frm))
370 glyphs_changed = 1; \ 316 glyphs_changed = 1; \
371 } while (0) 317 } while (0)
372 318
373 #define MARK_FRAME_SUBWINDOWS_CHANGED(f) do { \ 319 #define MARK_FRAME_SUBWINDOWS_CHANGED(f) do { \
374 struct frame *mfgc_f = (f); \ 320 struct frame *mfgc_f = (f); \
375 mfgc_f->subwindows_changed = 1; \ 321 mfgc_f->subwindows_changed = 1; \
376 mfgc_f->modiff++; \ 322 mfgc_f->modiff++; \
377 if (!NILP (mfgc_f->device)) \ 323 if (!NILP (mfgc_f->device)) \
378 { \ 324 { \
379 struct device *mfgc_d = XDEVICE (mfgc_f->device); \ 325 struct device *mfgc_d = XDEVICE (mfgc_f->device); \
380 MARK_DEVICE_SUBWINDOWS_CHANGED (mfgc_d); \ 326 MARK_DEVICE_SUBWINDOWS_CHANGED (mfgc_d); \
381 } \ 327 } \
382 else \ 328 else \
383 subwindows_changed = 1; \ 329 subwindows_changed = 1; \
384 } while (0)
385
386 #define MARK_FRAME_SUBWINDOWS_STATE_CHANGED(f) do { \
387 struct frame *mfgc_f = (f); \
388 mfgc_f->subwindows_state_changed = 1; \
389 mfgc_f->modiff++; \
390 if (!NILP (mfgc_f->device)) \
391 { \
392 struct device *mfgc_d = XDEVICE (mfgc_f->device); \
393 MARK_DEVICE_SUBWINDOWS_STATE_CHANGED (mfgc_d); \
394 } \
395 else \
396 subwindows_state_changed = 1; \
397 } while (0) 330 } while (0)
398 331
399 #define MARK_FRAME_TOOLBARS_CHANGED(f) do { \ 332 #define MARK_FRAME_TOOLBARS_CHANGED(f) do { \
400 struct frame *mftc_f = (f); \ 333 struct frame *mftc_f = (f); \
401 mftc_f->toolbar_changed = 1; \ 334 mftc_f->toolbar_changed = 1; \
405 struct device *mftc_d = XDEVICE (mftc_f->device); \ 338 struct device *mftc_d = XDEVICE (mftc_f->device); \
406 MARK_DEVICE_TOOLBARS_CHANGED (mftc_d); \ 339 MARK_DEVICE_TOOLBARS_CHANGED (mftc_d); \
407 } \ 340 } \
408 else \ 341 else \
409 toolbar_changed = 1; \ 342 toolbar_changed = 1; \
410 } while (0)
411
412 #define MARK_FRAME_GUTTERS_CHANGED(f) do { \
413 struct frame *mftc_f = (f); \
414 mftc_f->gutter_changed = 1; \
415 mftc_f->modiff++; \
416 if (!NILP (mftc_f->device)) \
417 { \
418 struct device *mftc_d = XDEVICE (mftc_f->device); \
419 MARK_DEVICE_GUTTERS_CHANGED (mftc_d); \
420 } \
421 else \
422 gutter_changed = 1; \
423 } while (0) 343 } while (0)
424 344
425 #define MARK_FRAME_SIZE_CHANGED(f) do { \ 345 #define MARK_FRAME_SIZE_CHANGED(f) do { \
426 struct frame *mfsc_f = (f); \ 346 struct frame *mfsc_f = (f); \
427 mfsc_f->size_changed = 1; \ 347 mfsc_f->size_changed = 1; \
499 #define FRAME_CONSOLE(f) DEVICE_CONSOLE (XDEVICE (FRAME_DEVICE (f))) 419 #define FRAME_CONSOLE(f) DEVICE_CONSOLE (XDEVICE (FRAME_DEVICE (f)))
500 #define FRAME_LIVE_P(f) (!(f)->dead) 420 #define FRAME_LIVE_P(f) (!(f)->dead)
501 421
502 #define FRAME_MINIBUF_ONLY_P(f) \ 422 #define FRAME_MINIBUF_ONLY_P(f) \
503 EQ (FRAME_ROOT_WINDOW (f), FRAME_MINIBUF_WINDOW (f)) 423 EQ (FRAME_ROOT_WINDOW (f), FRAME_MINIBUF_WINDOW (f))
504 #define FRAME_HAS_MINIBUF_P(f) ((f)->has_minibuffer) 424 #define FRAME_HAS_MINIBUF_P(f) ((f)->has_minibuffer)
505 #define FRAME_HEIGHT(f) ((f)->height) 425 #define FRAME_HEIGHT(f) ((f)->height)
506 #define FRAME_WIDTH(f) ((f)->width) 426 #define FRAME_WIDTH(f) ((f)->width)
507 #define FRAME_CHARHEIGHT(f) ((f)->char_height) 427 #define FRAME_CHARHEIGHT(f) ((f)->char_height)
508 #define FRAME_CHARWIDTH(f) ((f)->char_width) 428 #define FRAME_CHARWIDTH(f) ((f)->char_width)
509 #define FRAME_PIXHEIGHT(f) ((f)->pixheight) 429 #define FRAME_PIXHEIGHT(f) ((f)->pixheight)
510 #define FRAME_PIXWIDTH(f) ((f)->pixwidth) 430 #define FRAME_PIXWIDTH(f) ((f)->pixwidth)
511 #define FRAME_PAGENUMBER(f) ((f)->page_number + 0)
512 #define FRAME_SET_PAGENUMBER(f,x) (f)->page_number = (x);
513 #ifdef HAVE_SCROLLBARS 431 #ifdef HAVE_SCROLLBARS
514 #define FRAME_SCROLLBAR_WIDTH(f) \ 432 #define FRAME_SCROLLBAR_WIDTH(f) \
515 (NILP ((f)->vertical_scrollbar_visible_p) ? \ 433 (NILP ((f)->vertical_scrollbar_visible_p) ? \
516 0 : XINT ((f)->scrollbar_width)) 434 0 : XINT ((f)->scrollbar_width))
517 #define FRAME_SCROLLBAR_HEIGHT(f) \ 435 #define FRAME_SCROLLBAR_HEIGHT(f) \
522 #define FRAME_SCROLLBAR_HEIGHT(f) 0 440 #define FRAME_SCROLLBAR_HEIGHT(f) 0
523 #endif 441 #endif
524 442
525 #define FW_FRAME(obj) \ 443 #define FW_FRAME(obj) \
526 (WINDOWP (obj) ? WINDOW_FRAME (XWINDOW (obj)) \ 444 (WINDOWP (obj) ? WINDOW_FRAME (XWINDOW (obj)) \
527 : (FRAMEP (obj) ? obj \ 445 : (FRAMEP (obj) ? obj \
528 : Qnil)) 446 : Qnil))
529 447
530 #define FRAME_NEW_HEIGHT(f) ((f)->new_height) 448 #define FRAME_NEW_HEIGHT(f) ((f)->new_height)
531 #define FRAME_NEW_WIDTH(f) ((f)->new_width) 449 #define FRAME_NEW_WIDTH(f) ((f)->new_width)
532 #define FRAME_CURSOR_X(f) ((f)->cursor_x) 450 #define FRAME_CURSOR_X(f) ((f)->cursor_x)
533 #define FRAME_CURSOR_Y(f) ((f)->cursor_y) 451 #define FRAME_CURSOR_Y(f) ((f)->cursor_y)
542 #define FRAME_SELECTED_WINDOW(f) NON_LVALUE ((f)->selected_window) 460 #define FRAME_SELECTED_WINDOW(f) NON_LVALUE ((f)->selected_window)
543 #define FRAME_LAST_NONMINIBUF_WINDOW(f) \ 461 #define FRAME_LAST_NONMINIBUF_WINDOW(f) \
544 NON_LVALUE ((f)->last_nonminibuf_window) 462 NON_LVALUE ((f)->last_nonminibuf_window)
545 #define FRAME_SB_VCACHE(f) ((f)->sb_vcache) 463 #define FRAME_SB_VCACHE(f) ((f)->sb_vcache)
546 #define FRAME_SB_HCACHE(f) ((f)->sb_hcache) 464 #define FRAME_SB_HCACHE(f) ((f)->sb_hcache)
547 #define FRAME_SUBWINDOW_CACHE(f) ((f)->subwindow_instance_cache) 465 #define FRAME_SUBWINDOW_CACHE(f) ((f)->subwindow_cachels)
548 466
549 #if 0 /* FSFmacs */ 467 #if 0 /* FSFmacs */
550 468
551 #define FRAME_VISIBLE_P(f) ((f)->visible != 0) 469 #define FRAME_VISIBLE_P(f) ((f)->visible != 0)
552 #define FRAME_SET_VISIBLE(f,p) \ 470 #define FRAME_SET_VISIBLE(f,p) \
619 FRAME_THEORETICAL_TOOLBAR_SIZE (f, LEFT_TOOLBAR) 537 FRAME_THEORETICAL_TOOLBAR_SIZE (f, LEFT_TOOLBAR)
620 #define FRAME_THEORETICAL_RIGHT_TOOLBAR_WIDTH(f) \ 538 #define FRAME_THEORETICAL_RIGHT_TOOLBAR_WIDTH(f) \
621 FRAME_THEORETICAL_TOOLBAR_SIZE (f, RIGHT_TOOLBAR) 539 FRAME_THEORETICAL_TOOLBAR_SIZE (f, RIGHT_TOOLBAR)
622 540
623 #define FRAME_THEORETICAL_TOOLBAR_BORDER_WIDTH(f, pos) \ 541 #define FRAME_THEORETICAL_TOOLBAR_BORDER_WIDTH(f, pos) \
624 (FRAME_RAW_THEORETICAL_TOOLBAR_VISIBLE (f, pos) \ 542 (FRAME_RAW_THEORETICAL_TOOLBAR_VISIBLE (f, pos) \
625 ? FRAME_RAW_THEORETICAL_TOOLBAR_BORDER_WIDTH (f, pos) \ 543 ? FRAME_RAW_THEORETICAL_TOOLBAR_BORDER_WIDTH (f, pos) \
626 : 0) 544 : 0)
627 545
628 #define FRAME_THEORETICAL_TOP_TOOLBAR_BORDER_WIDTH(f) \ 546 #define FRAME_THEORETICAL_TOP_TOOLBAR_BORDER_WIDTH(f) \
629 FRAME_THEORETICAL_TOOLBAR_BORDER_WIDTH (f, TOP_TOOLBAR) 547 FRAME_THEORETICAL_TOOLBAR_BORDER_WIDTH (f, TOP_TOOLBAR)
678 sure that there aren't some places in the redisplay code 596 sure that there aren't some places in the redisplay code
679 that use these macros and expect the former semantics, so 597 that use these macros and expect the former semantics, so
680 if you encounter some odd toolbar behavior, you might want 598 if you encounter some odd toolbar behavior, you might want
681 to look into this. --ben */ 599 to look into this. --ben */
682 600
683 #define FRAME_REAL_TOOLBAR_VISIBLE(f, pos) \ 601 #define FRAME_REAL_TOOLBAR_VISIBLE(f, pos) \
684 ((!NILP (FRAME_REAL_TOOLBAR (f, pos)) \ 602 ((!NILP (FRAME_REAL_TOOLBAR (f, pos)) \
685 && FRAME_RAW_REAL_TOOLBAR_SIZE (f, pos) > 0) \ 603 && FRAME_RAW_REAL_TOOLBAR_SIZE (f, pos) > 0) \
686 ? FRAME_RAW_REAL_TOOLBAR_VISIBLE (f, pos) \ 604 ? FRAME_RAW_REAL_TOOLBAR_VISIBLE (f, pos) \
687 : 0) 605 : 0)
688 #define FRAME_REAL_TOOLBAR_SIZE(f, pos) \ 606 #define FRAME_REAL_TOOLBAR_SIZE(f, pos) \
689 ((!NILP (FRAME_REAL_TOOLBAR (f, pos)) \ 607 ((!NILP (FRAME_REAL_TOOLBAR (f, pos)) \
690 && FRAME_RAW_REAL_TOOLBAR_VISIBLE (f, pos)) \ 608 && FRAME_RAW_REAL_TOOLBAR_VISIBLE (f, pos)) \
691 ? FRAME_RAW_REAL_TOOLBAR_SIZE (f, pos) \ 609 ? FRAME_RAW_REAL_TOOLBAR_SIZE (f, pos) \
692 : 0) 610 : 0)
693 #define FRAME_REAL_TOOLBAR_BORDER_WIDTH(f, pos) \ 611 #define FRAME_REAL_TOOLBAR_BORDER_WIDTH(f, pos) \
694 ((!NILP (FRAME_REAL_TOOLBAR (f, pos)) \ 612 ((!NILP (FRAME_REAL_TOOLBAR (f, pos)) \
695 && FRAME_RAW_REAL_TOOLBAR_VISIBLE (f, pos)) \ 613 && FRAME_RAW_REAL_TOOLBAR_VISIBLE (f, pos)) \
696 ? FRAME_RAW_REAL_TOOLBAR_BORDER_WIDTH (f, pos) \ 614 ? FRAME_RAW_REAL_TOOLBAR_BORDER_WIDTH (f, pos) \
697 : 0) 615 : 0)
698 616
699 #define FRAME_REAL_TOP_TOOLBAR_HEIGHT(f) \ 617 #define FRAME_REAL_TOP_TOOLBAR_HEIGHT(f) \
721 #define FRAME_REAL_LEFT_TOOLBAR_VISIBLE(f) \ 639 #define FRAME_REAL_LEFT_TOOLBAR_VISIBLE(f) \
722 FRAME_REAL_TOOLBAR_VISIBLE (f, LEFT_TOOLBAR) 640 FRAME_REAL_TOOLBAR_VISIBLE (f, LEFT_TOOLBAR)
723 #define FRAME_REAL_RIGHT_TOOLBAR_VISIBLE(f) \ 641 #define FRAME_REAL_RIGHT_TOOLBAR_VISIBLE(f) \
724 FRAME_REAL_TOOLBAR_VISIBLE (f, RIGHT_TOOLBAR) 642 FRAME_REAL_TOOLBAR_VISIBLE (f, RIGHT_TOOLBAR)
725 643
726 #define FRAME_TOP_BORDER_START(f) \ 644 #define FRAME_TOP_BORDER_START(f) \
727 (FRAME_REAL_TOP_TOOLBAR_HEIGHT (f) + \ 645 (FRAME_REAL_TOP_TOOLBAR_HEIGHT (f) + \
728 2 * FRAME_REAL_TOP_TOOLBAR_BORDER_WIDTH (f)) 646 2 * FRAME_REAL_TOP_TOOLBAR_BORDER_WIDTH (f))
729 #define FRAME_TOP_BORDER_END(f) \ 647 #define FRAME_TOP_BORDER_END(f) \
730 (FRAME_TOP_BORDER_START (f) + FRAME_BORDER_HEIGHT (f)) 648 (FRAME_TOP_BORDER_START (f) + FRAME_BORDER_HEIGHT (f))
731 649
732 #define FRAME_BOTTOM_BORDER_START(f) \ 650 #define FRAME_BOTTOM_BORDER_START(f) \
733 (FRAME_PIXHEIGHT (f) - FRAME_BORDER_HEIGHT (f) - \ 651 (FRAME_PIXHEIGHT (f) - FRAME_BORDER_HEIGHT (f) - \
734 FRAME_REAL_BOTTOM_TOOLBAR_HEIGHT (f) - \ 652 FRAME_REAL_BOTTOM_TOOLBAR_HEIGHT (f) - \
735 2 * FRAME_REAL_BOTTOM_TOOLBAR_BORDER_WIDTH (f)) 653 2 * FRAME_REAL_BOTTOM_TOOLBAR_BORDER_WIDTH (f))
736 #define FRAME_BOTTOM_BORDER_END(f) \ 654 #define FRAME_BOTTOM_BORDER_END(f) \
737 (FRAME_PIXHEIGHT (f) - FRAME_REAL_BOTTOM_TOOLBAR_HEIGHT (f) - \ 655 (FRAME_PIXHEIGHT (f) - FRAME_REAL_BOTTOM_TOOLBAR_HEIGHT (f) - \
738 2 * FRAME_REAL_BOTTOM_TOOLBAR_BORDER_WIDTH (f)) 656 2 * FRAME_REAL_BOTTOM_TOOLBAR_BORDER_WIDTH (f))
739 657
740 #define FRAME_LEFT_BORDER_START(f) \ 658 #define FRAME_LEFT_BORDER_START(f) \
741 (FRAME_REAL_LEFT_TOOLBAR_WIDTH (f) + \ 659 (FRAME_REAL_LEFT_TOOLBAR_WIDTH (f) + \
742 2 * FRAME_REAL_LEFT_TOOLBAR_BORDER_WIDTH (f)) 660 2 * FRAME_REAL_LEFT_TOOLBAR_BORDER_WIDTH (f))
743 #define FRAME_LEFT_BORDER_END(f) \ 661 #define FRAME_LEFT_BORDER_END(f) \
744 (FRAME_LEFT_BORDER_START (f) + FRAME_BORDER_WIDTH (f)) 662 (FRAME_LEFT_BORDER_START (f) + FRAME_BORDER_WIDTH (f))
745 663
746 #define FRAME_RIGHT_BORDER_START(f) \ 664 #define FRAME_RIGHT_BORDER_START(f) \
747 (FRAME_PIXWIDTH (f) - FRAME_BORDER_WIDTH (f) - \ 665 (FRAME_PIXWIDTH (f) - FRAME_BORDER_WIDTH (f) - \
748 FRAME_REAL_RIGHT_TOOLBAR_WIDTH(f) - \ 666 FRAME_REAL_RIGHT_TOOLBAR_WIDTH(f) - \
749 2 * FRAME_REAL_RIGHT_TOOLBAR_BORDER_WIDTH (f)) 667 2 * FRAME_REAL_RIGHT_TOOLBAR_BORDER_WIDTH (f))
750 #define FRAME_RIGHT_BORDER_END(f) \ 668 #define FRAME_RIGHT_BORDER_END(f) \
751 (FRAME_PIXWIDTH (f) - FRAME_REAL_RIGHT_TOOLBAR_WIDTH (f) - \ 669 (FRAME_PIXWIDTH (f) - FRAME_REAL_RIGHT_TOOLBAR_WIDTH (f) - \
752 2 * FRAME_REAL_RIGHT_TOOLBAR_BORDER_WIDTH(f)) 670 2 * FRAME_REAL_RIGHT_TOOLBAR_BORDER_WIDTH(f))
753 671
754 /* Equivalent in FSF Emacs: 672 /* Equivalent in FSF Emacs:
755 673
756 FOR_EACH_FRAME (LIST_VAR, FRAME_VAR) followed by a statement is a 674 FOR_EACH_FRAME (LIST_VAR, FRAME_VAR) followed by a statement is a
770 void update_frame_title (struct frame *f); 688 void update_frame_title (struct frame *f);
771 Lisp_Object next_frame (Lisp_Object f, Lisp_Object frametype, 689 Lisp_Object next_frame (Lisp_Object f, Lisp_Object frametype,
772 Lisp_Object console); 690 Lisp_Object console);
773 Lisp_Object prev_frame (Lisp_Object f, Lisp_Object frametype, 691 Lisp_Object prev_frame (Lisp_Object f, Lisp_Object frametype,
774 Lisp_Object console); 692 Lisp_Object console);
693 void store_in_alist (Lisp_Object *alistptr,
694 CONST char *propname,
695 Lisp_Object val);
775 void pixel_to_char_size (struct frame *f, int pixel_width, int pixel_height, 696 void pixel_to_char_size (struct frame *f, int pixel_width, int pixel_height,
776 int *char_width, int *char_height); 697 int *char_width, int *char_height);
777 void char_to_pixel_size (struct frame *f, int char_width, int char_height, 698 void char_to_pixel_size (struct frame *f, int char_width, int char_height,
778 int *pixel_width, int *pixel_height); 699 int *pixel_width, int *pixel_height);
779 void round_size_to_char (struct frame *f, int in_width, int in_height, 700 void round_size_to_char (struct frame *f, int in_width, int in_height,
814 void set_frame_selected_window (struct frame *f, Lisp_Object window); 735 void set_frame_selected_window (struct frame *f, Lisp_Object window);
815 int is_surrogate_for_selected_frame (struct frame *f); 736 int is_surrogate_for_selected_frame (struct frame *f);
816 void update_frame_icon (struct frame *f); 737 void update_frame_icon (struct frame *f);
817 void invalidate_vertical_divider_cache_in_frame (struct frame *f); 738 void invalidate_vertical_divider_cache_in_frame (struct frame *f);
818 739
819 void init_frame (void); 740 #endif /* _XEMACS_FRAME_H_ */
820
821 #endif /* INCLUDED_frame_h_ */