Mercurial > hg > xemacs-beta
comparison src/frame.h @ 282:c42ec1d1cded r21-0b39
Import from CVS: tag r21-0b39
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:33:18 +0200 |
parents | c5d627a313b1 |
children | 558f606b08ae |
comparison
equal
deleted
inserted
replaced
281:090b52736db2 | 282:c42ec1d1cded |
---|---|
45 | 45 |
46 /* Methods for this frame's console. This can also be retrieved | 46 /* Methods for this frame's console. This can also be retrieved |
47 through frame->device->console, but it's faster this way. */ | 47 through frame->device->console, but it's faster this way. */ |
48 struct console_methods *framemeths; | 48 struct console_methods *framemeths; |
49 | 49 |
50 /* Size of this frame, in units of characters. */ | 50 /* Size of text only area of this frame, excluding scrollbars, |
51 int height; | 51 toolbars and end of line glyphs. The size can be in charactes |
52 int width; | 52 or pixels, depending on units in which window system resizes |
53 | 53 its windows */ |
54 /* Size of this frame, in units of pixels. */ | 54 int height, width; |
55 int pixheight; | 55 |
56 int pixwidth; | 56 /* New height and width for pending size change, in the same units |
57 as above. 0 if no change pending. */ | |
58 int new_height, new_width; | |
59 | |
60 /* Size of text-only are of the frame, in default font characters. | |
61 This may be inaccurate due to rounding error */ | |
62 int char_height, char_width; | |
63 | |
64 /* Size of the whole frame, including scrollbars, toolbars and end | |
65 of line glyphs, in pixels */ | |
66 int pixheight, pixwidth; | |
57 | 67 |
58 #ifdef HAVE_TTY | 68 #ifdef HAVE_TTY |
59 /* The count of frame number. This applies to TTY frames only. */ | 69 /* The count of frame number. This applies to TTY frames only. */ |
60 int order_count; | 70 int order_count; |
61 #endif | 71 #endif |
64 just inside the window's border. It is normally only non-zero on | 74 just inside the window's border. It is normally only non-zero on |
65 X frames, but we put it here to avoid introducing window system | 75 X frames, but we put it here to avoid introducing window system |
66 dependencies. */ | 76 dependencies. */ |
67 int internal_border_width; | 77 int internal_border_width; |
68 | 78 |
69 /* New height and width for pending size change. 0 if no change pending. */ | |
70 int new_height, new_width; | |
71 | |
72 /* This frame's root window mirror. This structure exactly mirrors | 79 /* This frame's root window mirror. This structure exactly mirrors |
73 the frame's window structure but contains only pointers to the | 80 the frame's window structure but contains only pointers to the |
74 display structures. */ | 81 display structures. */ |
75 struct window_mirror *root_mirror; | 82 struct window_mirror *root_mirror; |
76 | 83 |
77 int modiff; | 84 int modiff; |
78 | 85 |
79 #ifdef HAVE_SCROLLBARS | 86 #ifdef HAVE_SCROLLBARS |
80 /* frame-local scrollbar information. See scrollbar.c. */ | 87 /* frame-local scrollbar information. See scrollbar.c. */ |
81 int scrollbar_y_offset; | 88 int scrollbar_y_offset; |
82 int scrollbar_on_left; | |
83 int scrollbar_on_top; | |
84 | 89 |
85 /* cache of created scrollbars */ | 90 /* cache of created scrollbars */ |
86 struct scrollbar_instance *sb_vcache; | 91 struct scrollbar_instance *sb_vcache; |
87 struct scrollbar_instance *sb_hcache; | 92 struct scrollbar_instance *sb_hcache; |
88 #endif | 93 #endif |
174 unsigned int toolbar_changed :1; | 179 unsigned int toolbar_changed :1; |
175 unsigned int windows_changed :1; | 180 unsigned int windows_changed :1; |
176 unsigned int windows_structure_changed :1; | 181 unsigned int windows_structure_changed :1; |
177 unsigned int window_face_cache_reset :1; /* used by expose handler */ | 182 unsigned int window_face_cache_reset :1; /* used by expose handler */ |
178 unsigned int echo_area_garbaged :1; /* used by Fredisplay_echo_area */ | 183 unsigned int echo_area_garbaged :1; /* used by Fredisplay_echo_area */ |
184 unsigned int size_slipped :1; | |
179 | 185 |
180 unsigned int size_change_pending :1; | 186 unsigned int size_change_pending :1; |
181 unsigned int mirror_dirty :1; | 187 unsigned int mirror_dirty :1; |
182 | 188 |
183 /* flag indicating if any window on this frame is displaying a subwindow */ | 189 /* flag indicating if any window on this frame is displaying a subwindow */ |
376 } \ | 382 } \ |
377 else \ | 383 else \ |
378 windows_structure_changed = 1; \ | 384 windows_structure_changed = 1; \ |
379 } while (0) | 385 } while (0) |
380 | 386 |
387 #define MARK_FRAME_SIZE_SLIPPED(f) do { \ | |
388 struct frame *fwsc_f = (f); \ | |
389 fwsc_f->size_slipped = 1; \ | |
390 fwsc_f->modiff++; \ | |
391 if (!NILP (fwsc_f->device)) \ | |
392 { \ | |
393 struct device *fwsc_d = XDEVICE (fwsc_f->device); \ | |
394 MARK_DEVICE_FRAME_CHANGED (fwsc_d); \ | |
395 } \ | |
396 else \ | |
397 frame_changed = 1; \ | |
398 } while (0) | |
399 | |
400 #define CLEAR_FRAME_SIZE_SLIPPED(f) do { \ | |
401 struct frame *fwsc_f = (f); \ | |
402 fwsc_f->size_slipped = 0; \ | |
403 } while (0) | |
404 | |
381 #define SET_FRAME_CLEAR(f) MARK_FRAME_CHANGED (f); (f)->clear = 1 | 405 #define SET_FRAME_CLEAR(f) MARK_FRAME_CHANGED (f); (f)->clear = 1 |
382 #define FRAME_DEVICE(f) ((f)->device) | 406 #define FRAME_DEVICE(f) ((f)->device) |
383 #define FRAME_CONSOLE(f) DEVICE_CONSOLE (XDEVICE (FRAME_DEVICE (f))) | 407 #define FRAME_CONSOLE(f) DEVICE_CONSOLE (XDEVICE (FRAME_DEVICE (f))) |
384 #define FRAME_LIVE_P(f) (!(f)->dead) | 408 #define FRAME_LIVE_P(f) (!(f)->dead) |
385 | 409 |
386 #define FRAME_MINIBUF_ONLY_P(f) \ | 410 #define FRAME_MINIBUF_ONLY_P(f) \ |
387 EQ (FRAME_ROOT_WINDOW (f), FRAME_MINIBUF_WINDOW (f)) | 411 EQ (FRAME_ROOT_WINDOW (f), FRAME_MINIBUF_WINDOW (f)) |
388 #define FRAME_HAS_MINIBUF_P(f) ((f)->has_minibuffer) | 412 #define FRAME_HAS_MINIBUF_P(f) ((f)->has_minibuffer) |
389 #define FRAME_HEIGHT(f) ((f)->height) | 413 #define FRAME_HEIGHT(f) ((f)->height) |
390 #define FRAME_WIDTH(f) ((f)->width) | 414 #define FRAME_WIDTH(f) ((f)->width) |
415 #define FRAME_CHARHEIGHT(f) ((f)->char_height) | |
416 #define FRAME_CHARWIDTH(f) ((f)->char_width) | |
391 #define FRAME_PIXHEIGHT(f) ((f)->pixheight) | 417 #define FRAME_PIXHEIGHT(f) ((f)->pixheight) |
392 #define FRAME_PIXWIDTH(f) ((f)->pixwidth) | 418 #define FRAME_PIXWIDTH(f) ((f)->pixwidth) |
393 #ifdef HAVE_SCROLLBARS | 419 #ifdef HAVE_SCROLLBARS |
394 #define FRAME_SCROLLBAR_WIDTH(f) XINT ((f)->scrollbar_width) | 420 #define FRAME_SCROLLBAR_WIDTH(f) \ |
395 #define FRAME_SCROLLBAR_HEIGHT(f) XINT ((f)->scrollbar_height) | 421 (NILP ((f)->vertical_scrollbar_visible_p) ? \ |
422 0 : XINT ((f)->scrollbar_width)) | |
423 #define FRAME_SCROLLBAR_HEIGHT(f) \ | |
424 (NILP ((f)->horizontal_scrollbar_visible_p) ? \ | |
425 0 : XINT ((f)->scrollbar_height)) | |
396 #else | 426 #else |
397 #define FRAME_SCROLLBAR_WIDTH(f) 0 | 427 #define FRAME_SCROLLBAR_WIDTH(f) 0 |
398 #define FRAME_SCROLLBAR_HEIGHT(f) 0 | 428 #define FRAME_SCROLLBAR_HEIGHT(f) 0 |
399 #endif | 429 #endif |
400 | 430 |
658 void round_size_to_real_char (struct frame *f, int in_width, int in_height, | 688 void round_size_to_real_char (struct frame *f, int in_width, int in_height, |
659 int *out_width, int *out_height); | 689 int *out_width, int *out_height); |
660 void change_frame_size (struct frame *frame, | 690 void change_frame_size (struct frame *frame, |
661 int newlength, int newwidth, | 691 int newlength, int newwidth, |
662 int delay); | 692 int delay); |
693 void adjust_frame_size (struct frame *frame); | |
694 void frame_size_slipped (Lisp_Object specifier, struct frame *f, | |
695 Lisp_Object oldval); | |
663 void hold_frame_size_changes (void); | 696 void hold_frame_size_changes (void); |
664 void unhold_one_frame_size_changes (struct frame *f); | 697 void unhold_one_frame_size_changes (struct frame *f); |
665 void unhold_frame_size_changes (void); | 698 void unhold_frame_size_changes (void); |
666 void select_frame_1 (Lisp_Object frame); | 699 void select_frame_1 (Lisp_Object frame); |
667 void select_frame_2 (Lisp_Object frame); | 700 void select_frame_2 (Lisp_Object frame); |