This patch makes changes to widgets be deferred until redisplay actually
runs. This should on balance make redisplay of widgets better, but expect
some glitches short term as this whole area is a bit hairy.
andy
2000-02-09 Andy Piper <andy(a)xemacs.org>
* redisplay-output.c (redisplay_output_layout): be more clever
about when we output based on the changed flags.
* glyphs.h (struct image_instantiator_methods): add update_method.
(struct Lisp_Image_Instance): add changed flags. Declare new
macros for manipulating them.
* glyphs.c (allocate_image_instance): renamed glyph -> parent.
(image_instance_parent_glyph): find an image_instance's parent
glyph or image_instance.
(image_instance_layout): mark the size as changed.
(set_image_instance_dirty_p): new function. mark an image
instance, plus all of its parents, as dirty.
(Fset_image_instance_property): use it.
(Fglyph_animated_timeout_handler): use it.
(update_subwindow): call update_widget and device methods for
update_subwindow. Mark all changed flags as clean.
(Fresize_subwindow): mark size as changed.
* glyphs-x.c (x_finalize_image_instance): try and detect gc
failures.
(x_update_subwindow): only resize subwindows here.
(x_update_widget): new function. Update all changed properties of
a widget.
(x_resize_subwindow): deleted.
(x_widget_set_property): deleted.
(x_progress_gauge_set_property): deleted.
(x_progress_gauge_update): new function. Implement recorded
changes.
(x_tab_control_update): ditto.
(x_tab_control_set_property): deleted.
(console_type_create_glyphs_x): declare new functions.
(image_instantiator_format_create_glyphs_x): ditto.
* glyphs-widget.c (widget_set_property): mark text changed.
(update_widget): new function. Update properties of a widget.
(widget_instantiate): for layouts make sure we set their
children's parent correctly.
(tab_control_set_property): new function. Record changes that will
take place under redisplay's control.
(progress_gauge_set_property): ditto.
(image_instantiator_progress_guage): declare new functions.
(image_instantiator_tab_control): ditto.
* glyphs-msw.c (mswindows_update_subwindow): just do resizing here
now.
(mswindows_update_widget): new function. Update all properties on
a widget that have changed.
(mswindows_button_update): new function. Update a button's set
state.
(mswindows_tab_control_update): new function. Update the items in
a tab.
(mswindows_tab_control_set_property): deleted.
(mswindows_progress_gauge_update): new function. Update the
progress gauge's progress.
(mswindows_widget_set_property): deleted. This is all done
asynchronously now.
(mswindows_progress_gauge_set_property): ditto.
(console_type_create_glyphs_mswindows): declare new methods.
(image_instantiator_format_create_glyphs_mswindows): ditto.
* frame-msw.c (msprinter_init_frame_1): Remove unused variables.
(msprinter_set_frame_properties): ditto.
* console.h (struct console_methods): Add update_widget_method.
--------------------------------------------------------------
Dr Andy Piper
Senior Consultant Architect, BEA Systems Ltd