Mercurial > hg > xemacs-beta
comparison src/gui-x.c @ 771:943eaba38521
[xemacs-hg @ 2002-03-13 08:51:24 by ben]
The big ben-mule-21-5 check-in!
Various files were added and deleted. See CHANGES-ben-mule.
There are still some test suite failures. No crashes, though.
Many of the failures have to do with problems in the test suite itself
rather than in the actual code. I'll be addressing these in the next
day or so -- none of the test suite failures are at all critical.
Meanwhile I'll be trying to address the biggest issues -- i.e. build
or run failures, which will almost certainly happen on various platforms.
All comments should be sent to ben@xemacs.org -- use a Cc: if necessary
when sending to mailing lists. There will be pre- and post- tags,
something like
pre-ben-mule-21-5-merge-in, and
post-ben-mule-21-5-merge-in.
author | ben |
---|---|
date | Wed, 13 Mar 2002 08:54:06 +0000 |
parents | fdefd0186b75 |
children | e38acbeb1cae |
comparison
equal
deleted
inserted
replaced
770:336a418893b5 | 771:943eaba38521 |
---|---|
1 /* General GUI code -- X-specific. (menubars, scrollbars, toolbars, dialogs) | 1 /* General GUI code -- X-specific. (menubars, scrollbars, toolbars, dialogs) |
2 Copyright (C) 1995 Board of Trustees, University of Illinois. | 2 Copyright (C) 1995 Board of Trustees, University of Illinois. |
3 Copyright (C) 1995, 1996, 2000 Ben Wing. | 3 Copyright (C) 1995, 1996, 2000, 2001 Ben Wing. |
4 Copyright (C) 1995 Sun Microsystems, Inc. | 4 Copyright (C) 1995 Sun Microsystems, Inc. |
5 Copyright (C) 1998 Free Software Foundation, Inc. | 5 Copyright (C) 1998 Free Software Foundation, Inc. |
6 | 6 |
7 This file is part of XEmacs. | 7 This file is part of XEmacs. |
8 | 8 |
380 } | 380 } |
381 | 381 |
382 return retval; | 382 return retval; |
383 } | 383 } |
384 | 384 |
385 /* This does the dirty work. gc_currently_forbidden is 1 when this is called. | 385 /* This does the dirty work. begin_gc_forbidden() is active when this is |
386 */ | 386 called. */ |
387 int | 387 int |
388 button_item_to_widget_value (Lisp_Object gui_object_instance, | 388 button_item_to_widget_value (Lisp_Object gui_object_instance, |
389 Lisp_Object gui_item, widget_value *wv, | 389 Lisp_Object gui_item, widget_value *wv, |
390 int allow_text_field_p, int no_keys_p, | 390 int allow_text_field_p, int no_keys_p, |
391 int menu_entry_p, int accel_p) | 391 int menu_entry_p, int accel_p) |
392 { | 392 { |
393 /* This function cannot GC because gc_currently_forbidden is set when | 393 /* This function cannot GC because begin_gc_forbidden() is active when |
394 it's called */ | 394 it's called. */ |
395 Lisp_Gui_Item* pgui = 0; | 395 Lisp_Gui_Item* pgui = 0; |
396 | 396 |
397 /* degenerate case */ | 397 /* degenerate case */ |
398 if (STRINGP (gui_item)) | 398 if (STRINGP (gui_item)) |
399 { | 399 { |
625 gui_items_to_widget_values (Lisp_Object gui_object_instance, Lisp_Object items, | 625 gui_items_to_widget_values (Lisp_Object gui_object_instance, Lisp_Object items, |
626 int accel_p) | 626 int accel_p) |
627 { | 627 { |
628 /* This function can GC */ | 628 /* This function can GC */ |
629 widget_value *control = 0, *tmp = 0; | 629 widget_value *control = 0, *tmp = 0; |
630 int count = specpdl_depth (); | 630 int count; |
631 Lisp_Object wv_closure; | 631 Lisp_Object wv_closure; |
632 | 632 |
633 if (NILP (items)) | 633 if (NILP (items)) |
634 sferror ("must have some items", items); | 634 sferror ("must have some items", items); |
635 | 635 |
636 /* Inhibit GC during this conversion. The reasons for this are | 636 /* Inhibit GC during this conversion. The reasons for this are |
637 the same as in menu_item_descriptor_to_widget_value(); see | 637 the same as in menu_item_descriptor_to_widget_value(); see |
638 the large comment above that function. */ | 638 the large comment above that function. */ |
639 record_unwind_protect (restore_gc_inhibit, | 639 count = begin_gc_forbidden (); |
640 make_int (gc_currently_forbidden)); | |
641 gc_currently_forbidden = 1; | |
642 | 640 |
643 /* Also make sure that we free the partially-created widget_value | 641 /* Also make sure that we free the partially-created widget_value |
644 tree on Lisp error. */ | 642 tree on Lisp error. */ |
645 control = xmalloc_widget_value (); | 643 control = xmalloc_widget_value (); |
646 wv_closure = make_opaque_ptr (control); | 644 wv_closure = make_opaque_ptr (control); |
656 tmp->contents = 0; | 654 tmp->contents = 0; |
657 free_widget_value_tree (tmp); | 655 free_widget_value_tree (tmp); |
658 | 656 |
659 /* No more need to free the half-filled-in structures. */ | 657 /* No more need to free the half-filled-in structures. */ |
660 set_opaque_ptr (wv_closure, 0); | 658 set_opaque_ptr (wv_closure, 0); |
661 unbind_to (count, Qnil); | 659 unbind_to (count); |
662 | 660 |
663 return control; | 661 return control; |
664 } | 662 } |
665 | 663 |
666 void | 664 void |