Mercurial > hg > xemacs-beta
comparison src/frame.c @ 5118:e0db3c197671 ben-lisp-object
merge up to latest default branch, doesn't compile yet
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Sat, 26 Dec 2009 21:18:49 -0600 |
parents | 3742ea8250b5 bc4f2511bbea |
children | d1247f3cc363 |
comparison
equal
deleted
inserted
replaced
5117:3742ea8250b5 | 5118:e0db3c197671 |
---|---|
137 the dynamic allocation time adds up. */ | 137 the dynamic allocation time adds up. */ |
138 static Ichar_dynarr *title_string_ichar_dynarr; | 138 static Ichar_dynarr *title_string_ichar_dynarr; |
139 | 139 |
140 | 140 |
141 | 141 |
142 #ifndef NEW_GC | |
142 extern const struct sized_memory_description gtk_frame_data_description; | 143 extern const struct sized_memory_description gtk_frame_data_description; |
143 extern const struct sized_memory_description mswindows_frame_data_description; | 144 extern const struct sized_memory_description mswindows_frame_data_description; |
144 extern const struct sized_memory_description x_frame_data_description; | 145 extern const struct sized_memory_description x_frame_data_description; |
146 #endif /* not NEW_GC */ | |
145 | 147 |
146 static const struct memory_description frame_data_description_1 []= { | 148 static const struct memory_description frame_data_description_1 []= { |
149 #ifdef NEW_GC | |
150 #ifdef HAVE_GTK | |
151 { XD_LISP_OBJECT, gtk_console }, | |
152 #endif | |
153 #ifdef HAVE_MS_WINDOWS | |
154 { XD_LISP_OBJECT, mswindows_console }, | |
155 #endif | |
156 #ifdef HAVE_X_WINDOWS | |
157 { XD_LISP_OBJECT, x_console }, | |
158 #endif | |
159 #else /* not NEW_GC */ | |
147 #ifdef HAVE_GTK | 160 #ifdef HAVE_GTK |
148 { XD_BLOCK_PTR, gtk_console, 1, { >k_frame_data_description} }, | 161 { XD_BLOCK_PTR, gtk_console, 1, { >k_frame_data_description} }, |
149 #endif | 162 #endif |
150 #ifdef HAVE_MS_WINDOWS | 163 #ifdef HAVE_MS_WINDOWS |
151 { XD_BLOCK_PTR, mswindows_console, 1, { &mswindows_frame_data_description} }, | 164 { XD_BLOCK_PTR, mswindows_console, 1, { &mswindows_frame_data_description} }, |
152 #endif | 165 #endif |
153 #ifdef HAVE_X_WINDOWS | 166 #ifdef HAVE_X_WINDOWS |
154 { XD_BLOCK_PTR, x_console, 1, { &x_frame_data_description} }, | 167 { XD_BLOCK_PTR, x_console, 1, { &x_frame_data_description} }, |
155 #endif | 168 #endif |
169 #endif /* not NEW_GC */ | |
156 { XD_END } | 170 { XD_END } |
157 }; | 171 }; |
158 | 172 |
159 static const struct sized_memory_description frame_data_description = { | 173 static const struct sized_memory_description frame_data_description = { |
160 sizeof (void *), frame_data_description_1 | 174 sizeof (void *), frame_data_description_1 |
161 }; | 175 }; |
162 | 176 |
177 #ifdef NEW_GC | |
178 static const struct memory_description expose_ignore_description_1 [] = { | |
179 { XD_LISP_OBJECT, offsetof (struct expose_ignore, next) }, | |
180 { XD_END } | |
181 }; | |
182 | |
183 DEFINE_DUMPABLE_INTERNAL_LISP_OBJECT ("expose-ignore", expose_ignore, | |
184 0, expose_ignore_description_1, | |
185 struct expose_ignore); | |
186 #else /* not NEW_GC */ | |
163 extern const struct sized_memory_description expose_ignore_description; | 187 extern const struct sized_memory_description expose_ignore_description; |
164 | 188 |
165 static const struct memory_description expose_ignore_description_1 [] = { | 189 static const struct memory_description expose_ignore_description_1 [] = { |
166 { XD_BLOCK_PTR, offsetof (struct expose_ignore, next), | 190 { XD_BLOCK_PTR, offsetof (struct expose_ignore, next), |
167 1, { &expose_ignore_description } }, | 191 1, { &expose_ignore_description } }, |
170 | 194 |
171 const struct sized_memory_description expose_ignore_description = { | 195 const struct sized_memory_description expose_ignore_description = { |
172 sizeof (struct expose_ignore), | 196 sizeof (struct expose_ignore), |
173 expose_ignore_description_1 | 197 expose_ignore_description_1 |
174 }; | 198 }; |
199 #endif /* not NEW_GC */ | |
175 | 200 |
176 static const struct memory_description display_line_dynarr_pointer_description_1 []= { | 201 static const struct memory_description display_line_dynarr_pointer_description_1 []= { |
177 { XD_BLOCK_PTR, 0, 1, { &display_line_dynarr_description} }, | 202 { XD_BLOCK_PTR, 0, 1, { &display_line_dynarr_description} }, |
178 { XD_END } | 203 { XD_END } |
179 }; | 204 }; |
187 #define MARKED_SLOT(x) { XD_LISP_OBJECT, offsetof (struct frame, x) }, | 212 #define MARKED_SLOT(x) { XD_LISP_OBJECT, offsetof (struct frame, x) }, |
188 #define MARKED_SLOT_ARRAY(slot, size) \ | 213 #define MARKED_SLOT_ARRAY(slot, size) \ |
189 { XD_LISP_OBJECT_ARRAY, offsetof (struct frame, slot), size }, | 214 { XD_LISP_OBJECT_ARRAY, offsetof (struct frame, slot), size }, |
190 #include "frameslots.h" | 215 #include "frameslots.h" |
191 | 216 |
217 #ifdef NEW_GC | |
218 { XD_LISP_OBJECT, offsetof (struct frame, subwindow_exposures) }, | |
219 { XD_LISP_OBJECT, offsetof (struct frame, subwindow_exposures_tail) }, | |
220 #else /* not NEW_GC */ | |
192 { XD_BLOCK_PTR, offsetof (struct frame, subwindow_exposures), | 221 { XD_BLOCK_PTR, offsetof (struct frame, subwindow_exposures), |
193 1, { &expose_ignore_description } }, | 222 1, { &expose_ignore_description } }, |
194 { XD_BLOCK_PTR, offsetof (struct frame, subwindow_exposures_tail), | 223 { XD_BLOCK_PTR, offsetof (struct frame, subwindow_exposures_tail), |
195 1, { &expose_ignore_description } }, | 224 1, { &expose_ignore_description } }, |
225 #endif /* not NEW_GC */ | |
196 | 226 |
197 #ifdef HAVE_SCROLLBARS | 227 #ifdef HAVE_SCROLLBARS |
198 { XD_LISP_OBJECT, offsetof (struct frame, sb_vcache) }, | 228 { XD_LISP_OBJECT, offsetof (struct frame, sb_vcache) }, |
199 { XD_LISP_OBJECT, offsetof (struct frame, sb_hcache) }, | 229 { XD_LISP_OBJECT, offsetof (struct frame, sb_hcache) }, |
200 #endif /* HAVE_SCROLLBARS */ | 230 #endif /* HAVE_SCROLLBARS */ |
204 { XD_BLOCK_ARRAY, offsetof (struct frame, desired_display_lines), | 234 { XD_BLOCK_ARRAY, offsetof (struct frame, desired_display_lines), |
205 4, { &display_line_dynarr_pointer_description } }, | 235 4, { &display_line_dynarr_pointer_description } }, |
206 | 236 |
207 { XD_BLOCK_PTR, offsetof (struct frame, framemeths), 1, | 237 { XD_BLOCK_PTR, offsetof (struct frame, framemeths), 1, |
208 { &console_methods_description } }, | 238 { &console_methods_description } }, |
209 { XD_UNION, offsetof (struct frame, frame_data), | 239 { XD_UNION, offsetof (struct frame, frame_data), |
210 XD_INDIRECT (0, 0), { &frame_data_description } }, | 240 XD_INDIRECT (0, 0), { &frame_data_description } }, |
211 { XD_END } | 241 { XD_END } |
212 }; | 242 }; |
213 | 243 |
214 static Lisp_Object | 244 static Lisp_Object |
248 FRAME_TYPE_NAME (frm)); | 278 FRAME_TYPE_NAME (frm)); |
249 print_internal (frm->name, printcharfun, 1); | 279 print_internal (frm->name, printcharfun, 1); |
250 write_fmt_string (printcharfun, " 0x%x>", frm->header.uid); | 280 write_fmt_string (printcharfun, " 0x%x>", frm->header.uid); |
251 } | 281 } |
252 | 282 |
253 DEFINE_NONDUMPABLE_LISP_OBJECT ("frame", frame, | 283 DEFINE_NODUMP_LISP_OBJECT ("frame", frame, |
254 mark_frame, print_frame, 0, 0, 0, | 284 mark_frame, print_frame, 0, 0, 0, |
255 frame_description, | 285 frame_description, |
256 struct frame); | 286 struct frame); |
257 | 287 |
258 static void | 288 static void |
259 nuke_all_frame_slots (struct frame *f) | 289 nuke_all_frame_slots (struct frame *f) |
260 { | 290 { |
261 ZERO_LCRECORD (f); | 291 ZERO_LCRECORD (f); |
441 { | 471 { |
442 Lisp_Object lissed = XCDR (kawnz); | 472 Lisp_Object lissed = XCDR (kawnz); |
443 if (!EQ (lissed, Qunbound)) | 473 if (!EQ (lissed, Qunbound)) |
444 DEVICE_FRAME_LIST (XDEVICE (XCAR (kawnz))) = lissed; | 474 DEVICE_FRAME_LIST (XDEVICE (XCAR (kawnz))) = lissed; |
445 return Qnil; | 475 return Qnil; |
446 } | 476 } |
447 | 477 |
448 DEFUN ("make-frame", Fmake_frame, 0, 2, "", /* | 478 DEFUN ("make-frame", Fmake_frame, 0, 2, "", /* |
449 Create and return a new frame, displaying the current buffer. | 479 Create and return a new frame, displaying the current buffer. |
450 Runs the functions listed in `create-frame-hook' after frame creation. | 480 Runs the functions listed in `create-frame-hook' after frame creation. |
451 | 481 |
495 { | 525 { |
496 /* We leave Vdefault_frame_name alone here so that it'll remain Qnil | 526 /* We leave Vdefault_frame_name alone here so that it'll remain Qnil |
497 in the dumped executable, and we can choose it at runtime. */ | 527 in the dumped executable, and we can choose it at runtime. */ |
498 name = build_string("XEmacs"); | 528 name = build_string("XEmacs"); |
499 } | 529 } |
500 else if (NILP (Vdefault_frame_name)) | 530 else if (NILP (Vdefault_frame_name)) |
501 { | 531 { |
502 if (egetenv ("USE_EMACS_AS_DEFAULT_APPLICATION_CLASS")) | 532 if (egetenv ("USE_EMACS_AS_DEFAULT_APPLICATION_CLASS")) |
503 { | 533 { |
504 Vdefault_frame_name = build_string ("emacs"); | 534 Vdefault_frame_name = build_string ("emacs"); |
505 } | 535 } |
506 else | 536 else |
507 { | 537 { |
508 Vdefault_frame_name = build_string ("XEmacs"); | 538 Vdefault_frame_name = build_string ("XEmacs"); |
509 } | 539 } |
510 } | 540 } |
511 | 541 |
512 if (NILP(name) && STRINGP(Vdefault_frame_name)) | 542 if (NILP(name) && STRINGP(Vdefault_frame_name)) |
513 { | 543 { |
552 update_frame_window_mirror (f); | 582 update_frame_window_mirror (f); |
553 | 583 |
554 if (initialized && !DEVICE_STREAM_P (d)) | 584 if (initialized && !DEVICE_STREAM_P (d)) |
555 { | 585 { |
556 if (!NILP (f->minibuffer_window)) | 586 if (!NILP (f->minibuffer_window)) |
557 reset_face_cachels (XWINDOW (f->minibuffer_window)); | 587 reset_face_cachels (XWINDOW (f->minibuffer_window)); |
558 reset_face_cachels (XWINDOW (f->root_window)); | 588 reset_face_cachels (XWINDOW (f->root_window)); |
559 } | 589 } |
560 | 590 |
561 /* If no frames on this device formerly existed, say this is the | 591 /* If no frames on this device formerly existed, say this is the |
562 first frame. It kind of assumes that frameless devices don't | 592 first frame. It kind of assumes that frameless devices don't |
648 first_frame_on_console)); | 678 first_frame_on_console)); |
649 | 679 |
650 if (!DEVICE_STREAM_P (d)) | 680 if (!DEVICE_STREAM_P (d)) |
651 { | 681 { |
652 /* Now initialise the gutters. This won't change the frame size, | 682 /* Now initialise the gutters. This won't change the frame size, |
653 but is needed as input to the layout that change_frame_size | 683 but is needed as input to the layout that change_frame_size |
654 will eventually do. Unfortunately gutter sizing code relies | 684 will eventually do. Unfortunately gutter sizing code relies |
655 on the frame in question being visible so we can't do this | 685 on the frame in question being visible so we can't do this |
656 earlier. */ | 686 earlier. */ |
657 init_frame_gutters (f); | 687 init_frame_gutters (f); |
658 | 688 |
659 change_frame_size (f, f->height, f->width, 0); | 689 change_frame_size (f, f->height, f->width, 0); |
660 } | 690 } |
661 | 691 |
1293 Possible values for WHICH-FRAMES are | 1323 Possible values for WHICH-FRAMES are |
1294 | 1324 |
1295 `visible' Consider only frames that are visible. | 1325 `visible' Consider only frames that are visible. |
1296 `iconic' Consider only frames that are iconic. | 1326 `iconic' Consider only frames that are iconic. |
1297 `invisible' Consider only frames that are invisible | 1327 `invisible' Consider only frames that are invisible |
1298 (this is different from iconic). | 1328 (this is different from iconic). |
1299 `visible-iconic' Consider frames that are visible or iconic. | 1329 `visible-iconic' Consider frames that are visible or iconic. |
1300 `invisible-iconic' Consider frames that are invisible or iconic. | 1330 `invisible-iconic' Consider frames that are invisible or iconic. |
1301 `nomini' Consider all frames except minibuffer-only ones. | 1331 `nomini' Consider all frames except minibuffer-only ones. |
1302 `visible-nomini' Like `visible' but omits minibuffer-only frames. | 1332 `visible-nomini' Like `visible' but omits minibuffer-only frames. |
1303 `iconic-nomini' Like `iconic' but omits minibuffer-only frames. | 1333 `iconic-nomini' Like `iconic' but omits minibuffer-only frames. |
1304 `invisible-nomini' Like `invisible' but omits minibuffer-only frames. | 1334 `invisible-nomini' Like `invisible' but omits minibuffer-only frames. |
1305 `visible-iconic-nomini' Like `visible-iconic' but omits minibuffer-only | 1335 `visible-iconic-nomini' Like `visible-iconic' but omits minibuffer-only |
1306 frames. | 1336 frames. |
1307 `invisible-iconic-nomini' Like `invisible-iconic' but omits minibuffer-only | 1337 `invisible-iconic-nomini' Like `invisible-iconic' but omits minibuffer-only |
1308 frames. | 1338 frames. |
1309 any other value Consider all frames. | 1339 any other value Consider all frames. |
1310 | 1340 |
1311 If WHICH-FRAMES is omitted, `nomini' is used. A value for WHICH-FRAMES | 1341 If WHICH-FRAMES is omitted, `nomini' is used. A value for WHICH-FRAMES |
1312 of 0 (a number) is treated like `iconic', for backwards compatibility. | 1342 of 0 (a number) is treated like `iconic', for backwards compatibility. |
1313 | 1343 |
1571 { | 1601 { |
1572 Lisp_Object next; | 1602 Lisp_Object next; |
1573 | 1603 |
1574 /* If this is a popup frame, select its parent if possible. | 1604 /* If this is a popup frame, select its parent if possible. |
1575 Otherwise, find another visible frame; if none, just take any frame. | 1605 Otherwise, find another visible frame; if none, just take any frame. |
1576 First try the same device, then the same console. */ | 1606 First try the same device, then the same console. */ |
1577 | 1607 |
1578 next = DEVMETH_OR_GIVEN (d, get_frame_parent, (f), Qnil); | 1608 next = DEVMETH_OR_GIVEN (d, get_frame_parent, (f), Qnil); |
1579 if (NILP (next) || EQ (next, frame) || ! FRAME_LIVE_P (XFRAME (next))) | 1609 if (NILP (next) || EQ (next, frame) || ! FRAME_LIVE_P (XFRAME (next))) |
1580 next = next_frame (frame, Qvisible, device); | 1610 next = next_frame (frame, Qvisible, device); |
1581 if (NILP (next) || EQ (next, frame)) | 1611 if (NILP (next) || EQ (next, frame)) |
2480 #if 0 | 2510 #if 0 |
2481 /* mly wants this, but it's not reasonable to change the name of a | 2511 /* mly wants this, but it's not reasonable to change the name of a |
2482 frame after it has been created, because the old name was used | 2512 frame after it has been created, because the old name was used |
2483 for resource lookup. */ | 2513 for resource lookup. */ |
2484 if (EQ (prop, Qname)) | 2514 if (EQ (prop, Qname)) |
2485 { | 2515 { |
2486 CHECK_STRING (val); | 2516 CHECK_STRING (val); |
2487 f->name = val; | 2517 f->name = val; |
2488 } | 2518 } |
2489 #endif /* 0 */ | 2519 #endif /* 0 */ |
2490 if (EQ (prop, Qminibuffer)) | 2520 if (EQ (prop, Qminibuffer)) |
2491 store_minibuf_frame_prop (f, val); | 2521 store_minibuf_frame_prop (f, val); |
2492 if (EQ (prop, Qunsplittable)) | 2522 if (EQ (prop, Qunsplittable)) |
2493 f->no_split = !NILP (val); | 2523 f->no_split = !NILP (val); |
2700 { | 2730 { |
2701 struct frame *f = decode_frame (frame); | 2731 struct frame *f = decode_frame (frame); |
2702 int height, pheight; | 2732 int height, pheight; |
2703 frame = wrap_frame (f); | 2733 frame = wrap_frame (f); |
2704 | 2734 |
2705 if (!window_system_pixelated_geometry (frame)) | 2735 if (!window_system_pixelated_geometry (frame)) |
2706 { | 2736 { |
2707 height = FRAME_HEIGHT (f); | 2737 height = FRAME_HEIGHT (f); |
2708 | 2738 |
2709 frame_conversion_internal (f, CHAR_TO_DISPLAYABLE_PIXEL, | 2739 frame_conversion_internal (f, CHAR_TO_DISPLAYABLE_PIXEL, |
2710 0, &pheight, 0, &height, 0); | 2740 0, &pheight, 0, &height, 0); |
2711 } | 2741 } |
2712 else | 2742 else |
2713 pheight = FRAME_PIXHEIGHT (f); | 2743 pheight = FRAME_PIXHEIGHT (f); |
2714 | 2744 |
2715 return make_int (pheight); | 2745 return make_int (pheight); |
2716 } | 2746 } |
2717 | 2747 |
2730 { | 2760 { |
2731 struct frame *f = decode_frame (frame); | 2761 struct frame *f = decode_frame (frame); |
2732 int width, pwidth; | 2762 int width, pwidth; |
2733 frame = wrap_frame (f); | 2763 frame = wrap_frame (f); |
2734 | 2764 |
2735 if (!window_system_pixelated_geometry (frame)) | 2765 if (!window_system_pixelated_geometry (frame)) |
2736 { | 2766 { |
2737 width = FRAME_WIDTH (f); | 2767 width = FRAME_WIDTH (f); |
2738 | 2768 |
2739 frame_conversion_internal (f, CHAR_TO_DISPLAYABLE_PIXEL, | 2769 frame_conversion_internal (f, CHAR_TO_DISPLAYABLE_PIXEL, |
2740 &pwidth, 0, &width, 0, 0); | 2770 &pwidth, 0, &width, 0, 0); |
2741 } | 2771 } |
2742 else | 2772 else |
2743 pwidth = FRAME_PIXWIDTH (f); | 2773 pwidth = FRAME_PIXWIDTH (f); |
2744 | 2774 |
2745 return make_int (pwidth); | 2775 return make_int (pwidth); |
2746 } | 2776 } |
2747 | 2777 |
2820 struct frame *f = decode_frame (frame); | 2850 struct frame *f = decode_frame (frame); |
2821 int pheight, width; | 2851 int pheight, width; |
2822 frame = wrap_frame (f); | 2852 frame = wrap_frame (f); |
2823 CHECK_INT (height); | 2853 CHECK_INT (height); |
2824 | 2854 |
2825 if (!window_system_pixelated_geometry (frame)) | 2855 if (!window_system_pixelated_geometry (frame)) |
2826 { | 2856 { |
2827 int h = XINT (height); | 2857 int h = XINT (height); |
2828 width = FRAME_WIDTH (f); | 2858 width = FRAME_WIDTH (f); |
2829 | 2859 |
2830 frame_conversion_internal (f, TOTAL_PIXEL_TO_CHAR, 0, &h, 0, &pheight, 0); | 2860 frame_conversion_internal (f, TOTAL_PIXEL_TO_CHAR, 0, &h, 0, &pheight, 0); |
2831 } | 2861 } |
2832 else | 2862 else |
2833 { | 2863 { |
2834 width = FRAME_PIXWIDTH (f); | 2864 width = FRAME_PIXWIDTH (f); |
2835 pheight = XINT (height); | 2865 pheight = XINT (height); |
2836 } | 2866 } |
2837 | 2867 |
2850 struct frame *f = decode_frame (frame); | 2880 struct frame *f = decode_frame (frame); |
2851 int pheight, width; | 2881 int pheight, width; |
2852 frame = wrap_frame (f); | 2882 frame = wrap_frame (f); |
2853 CHECK_INT (height); | 2883 CHECK_INT (height); |
2854 | 2884 |
2855 if (!window_system_pixelated_geometry (frame)) | 2885 if (!window_system_pixelated_geometry (frame)) |
2856 { | 2886 { |
2857 int h = XINT (height); | 2887 int h = XINT (height); |
2858 width = FRAME_WIDTH (f); | 2888 width = FRAME_WIDTH (f); |
2859 frame_conversion_internal (f, DISPLAYABLE_PIXEL_TO_CHAR, 0, &h, 0, &pheight, 0); | 2889 frame_conversion_internal (f, DISPLAYABLE_PIXEL_TO_CHAR, 0, &h, 0, &pheight, 0); |
2860 } | 2890 } |
2861 else | 2891 else |
2862 { | 2892 { |
2863 width = FRAME_PIXWIDTH (f); | 2893 width = FRAME_PIXWIDTH (f); |
2864 pheight = XINT (height); | 2894 pheight = XINT (height); |
2865 } | 2895 } |
2866 | 2896 |
2993 int pheight, pwidth; | 3023 int pheight, pwidth; |
2994 frame = wrap_frame (f); | 3024 frame = wrap_frame (f); |
2995 CHECK_INT (width); | 3025 CHECK_INT (width); |
2996 CHECK_INT (height); | 3026 CHECK_INT (height); |
2997 | 3027 |
2998 if (!window_system_pixelated_geometry (frame)) | 3028 if (!window_system_pixelated_geometry (frame)) |
2999 { | 3029 { |
3000 int w = XINT (width); | 3030 int w = XINT (width); |
3001 int h = XINT (height); | 3031 int h = XINT (height); |
3002 frame_conversion_internal (f, TOTAL_PIXEL_TO_CHAR, &w, &h, &pwidth, &pheight, 0); | 3032 frame_conversion_internal (f, TOTAL_PIXEL_TO_CHAR, &w, &h, &pwidth, &pheight, 0); |
3003 } | 3033 } |
3023 int pheight, pwidth; | 3053 int pheight, pwidth; |
3024 frame = wrap_frame (f); | 3054 frame = wrap_frame (f); |
3025 CHECK_INT (width); | 3055 CHECK_INT (width); |
3026 CHECK_INT (height); | 3056 CHECK_INT (height); |
3027 | 3057 |
3028 if (!window_system_pixelated_geometry (frame)) | 3058 if (!window_system_pixelated_geometry (frame)) |
3029 { | 3059 { |
3030 int w = XINT (width); | 3060 int w = XINT (width); |
3031 int h = XINT (height); | 3061 int h = XINT (height); |
3032 frame_conversion_internal (f, DISPLAYABLE_PIXEL_TO_CHAR, &w, &h, &pwidth, &pheight, 0); | 3062 frame_conversion_internal (f, DISPLAYABLE_PIXEL_TO_CHAR, &w, &h, &pwidth, &pheight, 0); |
3033 } | 3063 } |
3236 | 3266 |
3237 default_face_height_and_width (frame, &real_font_height, 0); | 3267 default_face_height_and_width (frame, &real_font_height, 0); |
3238 default_face_height_and_width_1 (frame, &font_height, &font_width); | 3268 default_face_height_and_width_1 (frame, &font_height, &font_width); |
3239 | 3269 |
3240 /* This size-change overrides any pending one for this frame. */ | 3270 /* This size-change overrides any pending one for this frame. */ |
3271 f->size_change_pending = 0; | |
3241 FRAME_NEW_HEIGHT (f) = 0; | 3272 FRAME_NEW_HEIGHT (f) = 0; |
3242 FRAME_NEW_WIDTH (f) = 0; | 3273 FRAME_NEW_WIDTH (f) = 0; |
3243 | 3274 |
3244 new_pixheight = newheight * font_height; | 3275 new_pixheight = newheight * font_height; |
3245 new_pixwidth = (newwidth - 1) * font_width; | 3276 new_pixwidth = (newwidth - 1) * font_width; |
3300 return; | 3331 return; |
3301 | 3332 |
3302 if (new_pixheight) | 3333 if (new_pixheight) |
3303 { | 3334 { |
3304 /* Adjust for gutters here so that we always get set | 3335 /* Adjust for gutters here so that we always get set |
3305 properly. */ | 3336 properly. */ |
3306 new_pixheight -= | 3337 new_pixheight -= |
3307 (FRAME_TOP_GUTTER_BOUNDS (f) | 3338 (FRAME_TOP_GUTTER_BOUNDS (f) |
3308 + FRAME_BOTTOM_GUTTER_BOUNDS (f)); | 3339 + FRAME_BOTTOM_GUTTER_BOUNDS (f)); |
3309 | 3340 |
3310 XWINDOW (FRAME_ROOT_WINDOW (f))->pixel_top | 3341 XWINDOW (FRAME_ROOT_WINDOW (f))->pixel_top |
3351 } | 3382 } |
3352 | 3383 |
3353 if (new_pixwidth) | 3384 if (new_pixwidth) |
3354 { | 3385 { |
3355 /* Adjust for gutters here so that we always get set | 3386 /* Adjust for gutters here so that we always get set |
3356 properly. */ | 3387 properly. */ |
3357 new_pixwidth -= | 3388 new_pixwidth -= |
3358 (FRAME_LEFT_GUTTER_BOUNDS (f) | 3389 (FRAME_LEFT_GUTTER_BOUNDS (f) |
3359 + FRAME_RIGHT_GUTTER_BOUNDS (f)); | 3390 + FRAME_RIGHT_GUTTER_BOUNDS (f)); |
3360 | 3391 |
3361 XWINDOW (FRAME_ROOT_WINDOW (f))->pixel_left = | 3392 XWINDOW (FRAME_ROOT_WINDOW (f))->pixel_left = |
3402 fact. f->size_change_pending will get reset below. The most that | 3433 fact. f->size_change_pending will get reset below. The most that |
3403 can happen is that we will cycle through redisplay once more | 3434 can happen is that we will cycle through redisplay once more |
3404 --andy. */ | 3435 --andy. */ |
3405 MARK_FRAME_SIZE_CHANGED (f); | 3436 MARK_FRAME_SIZE_CHANGED (f); |
3406 | 3437 |
3438 #ifdef NEW_GC | |
3439 if (delay || hold_frame_size_changes) | |
3440 #else /* not NEW_GC */ | |
3407 if (delay || hold_frame_size_changes || gc_in_progress) | 3441 if (delay || hold_frame_size_changes || gc_in_progress) |
3442 #endif /* not NEW_GC */ | |
3408 { | 3443 { |
3409 f->new_width = newwidth; | 3444 f->new_width = newwidth; |
3410 f->new_height = newheight; | 3445 f->new_height = newheight; |
3411 return; | 3446 return; |
3412 } | 3447 } |
3413 | 3448 |
3414 f->size_change_pending = 0; | |
3415 /* For TTY frames, it's like one, like all ... | 3449 /* For TTY frames, it's like one, like all ... |
3416 Can't have two TTY frames of different sizes on the same device. */ | 3450 Can't have two TTY frames of different sizes on the same device. */ |
3417 if (FRAME_TTY_P (f)) | 3451 if (FRAME_TTY_P (f)) |
3418 { | 3452 { |
3419 Lisp_Object frmcons; | 3453 Lisp_Object frmcons; |
3438 dl = &title_string_display_line; | 3472 dl = &title_string_display_line; |
3439 db = get_display_block_from_line (dl, TEXT); | 3473 db = get_display_block_from_line (dl, TEXT); |
3440 Dynarr_reset (db->runes); | 3474 Dynarr_reset (db->runes); |
3441 | 3475 |
3442 generate_formatted_string_db (format_str, Qnil, w, dl, db, findex, 0, | 3476 generate_formatted_string_db (format_str, Qnil, w, dl, db, findex, 0, |
3443 -1, type); | 3477 -1, type); |
3444 | 3478 |
3445 Dynarr_reset (title_string_ichar_dynarr); | 3479 Dynarr_reset (title_string_ichar_dynarr); |
3446 while (elt < Dynarr_length (db->runes)) | 3480 while (elt < Dynarr_length (db->runes)) |
3447 { | 3481 { |
3448 if (Dynarr_atp (db->runes, elt)->type == RUNE_CHAR) | 3482 if (Dynarr_atp (db->runes, elt)->type == RUNE_CHAR) |
3564 #ifndef PDUMP | 3598 #ifndef PDUMP |
3565 if (!initialized) | 3599 if (!initialized) |
3566 #endif | 3600 #endif |
3567 { | 3601 { |
3568 title_string_ichar_dynarr = Dynarr_new (Ichar); | 3602 title_string_ichar_dynarr = Dynarr_new (Ichar); |
3569 xzero (title_string_display_line); | 3603 DISPLAY_LINE_INIT (title_string_display_line); |
3570 } | 3604 } |
3571 } | 3605 } |
3572 | 3606 |
3573 void | 3607 void |
3574 syms_of_frame (void) | 3608 syms_of_frame (void) |
3575 { | 3609 { |
3576 INIT_LISP_OBJECT (frame); | 3610 INIT_LISP_OBJECT (frame); |
3611 #ifdef NEW_GC | |
3612 INIT_LISP_OBJECT (expose_ignore); | |
3613 #endif /* NEW_GC */ | |
3577 | 3614 |
3578 DEFSYMBOL (Qdelete_frame_hook); | 3615 DEFSYMBOL (Qdelete_frame_hook); |
3579 DEFSYMBOL (Qselect_frame_hook); | 3616 DEFSYMBOL (Qselect_frame_hook); |
3580 DEFSYMBOL (Qdeselect_frame_hook); | 3617 DEFSYMBOL (Qdeselect_frame_hook); |
3581 DEFSYMBOL (Qcreate_frame_hook); | 3618 DEFSYMBOL (Qcreate_frame_hook); |
3707 | 3744 |
3708 #ifdef HAVE_CDE | 3745 #ifdef HAVE_CDE |
3709 Fprovide (intern ("cde")); | 3746 Fprovide (intern ("cde")); |
3710 #endif | 3747 #endif |
3711 | 3748 |
3712 #ifdef HAVE_OFFIX_DND | |
3713 Fprovide (intern ("offix")); | |
3714 #endif | |
3715 | |
3716 #if 0 /* FSFmacs stupidity */ | 3749 #if 0 /* FSFmacs stupidity */ |
3717 xxDEFVAR_LISP ("emacs-iconified", &Vemacs_iconified /* | 3750 xxDEFVAR_LISP ("emacs-iconified", &Vemacs_iconified /* |
3718 Non-nil if all of emacs is iconified and frame updates are not needed. | 3751 Non-nil if all of emacs is iconified and frame updates are not needed. |
3719 */ ); | 3752 */ ); |
3720 Vemacs_iconified = Qnil; | 3753 Vemacs_iconified = Qnil; |
3794 the frame. | 3827 the frame. |
3795 */ ); | 3828 */ ); |
3796 Vadjust_frame_function = Qnil; | 3829 Vadjust_frame_function = Qnil; |
3797 | 3830 |
3798 DEFVAR_LISP ("mouse-motion-handler", &Vmouse_motion_handler /* | 3831 DEFVAR_LISP ("mouse-motion-handler", &Vmouse_motion_handler /* |
3799 Handler for motion events. One arg, the event. | 3832 Handler for motion events. Must be a function taking one argument, the event. |
3800 For most applications, you should use `mode-motion-hook' instead of this. | 3833 For most applications, you should use `mode-motion-hook' instead of this. |
3834 The default value is `default-mouse-motion-handler'. | |
3835 | |
3836 Note that this is NOT a hook variable, so there is no standard way to remove | |
3837 actions from it. Instead, when adding a new kind of action, a hook variable | |
3838 should be defined and initialized to the current value of this variable, then | |
3839 this variable set to a function that runs the new hook. To disable the new | |
3840 actions, use `remove-hook' rather than setting `mouse-motion-handler'. | |
3841 | |
3842 `mouse-motion-hook' in the balloon-help library exemplifies this pattern. | |
3801 */ ); | 3843 */ ); |
3802 Vmouse_motion_handler = Qnil; | 3844 Vmouse_motion_handler = Qnil; |
3803 | 3845 |
3804 DEFVAR_LISP ("synchronize-minibuffers",&Vsynchronize_minibuffers /* | 3846 DEFVAR_LISP ("synchronize-minibuffers",&Vsynchronize_minibuffers /* |
3805 Set to t if all minibuffer windows are to be synchronized. | 3847 Set to t if all minibuffer windows are to be synchronized. |