A few comments:
First, a comment like this:
+ /* We bogusly don't take f->extents_changed and f->glyphs_changed
+ into account. This is because if we do we always redisplay the
+ entire layout. So far I have seen no ill effects to we'll see. */
should always have a #### next to it to indicate a potential problem.
Also, the "progress" functions are too generically-named. For namespace
cleanliness, you should do something like
s/lprogress/labelled-progress/
then
s/progress/progress-gauge/g
or even
s/progress/gutter-progress-gauge/g
because it's quite possible that "regular" progress gauges (i.e. displayed
in
their own dialog box) will also be implemented.
Also, expressions like
(vector ...)
and
(list ...)
can be made much clearer using
`[ ... ]
and
`( ... )
For example, instead of
(vector
'layout :orientation 'vertical :justify 'left
:items (list
progress-text-glyph
(make-glyph
(vector
'layout :pixel-height progress-glyph-height
:orientation 'horizontal
:items (list
progress-gauge-glyph
(vector
'button :pixel-height (- progress-glyph-height 8)
:descriptor " Stop "
:callback '(funcall progress-stop-callback)))))))))
use
`[layout
:orientation vertical
:justify left
:items (,progress-text-glyph
[layout
:pixel-height ,progress-glyph-height
:orientation horizontal
:items (,progress-gauge-glyph
[button
:pixel-height ,(- progress-glyph-height 8)
:descriptor " Stop "
:callback (funcall progress-stop-callback)])])]
where I omitted the make-glyph call inside because it's apparently not
necessary.
ben
Andy Piper wrote:
Misc fixes for things.
andy
1999-10-14 Andy Piper <andy(a)xemacs.org>
* event-msw.c (mswindows_key_to_emacs_keysym): add some more
keycodes.
* redisplay-x.c (x_output_shadows): fix dodgy maths for border
calculations.
* gutter.c (output_gutter): be more accurate about the area to be
cleared since X seems to manage to do the clear after drawing the
border.
* redisplay.h (RESET_CHANGED_FLAGS): new macro for setting
redisplay flags as a group.
(RESET_CHANGED_SET_FLAGS): ditto.
(CLASS_RESET_CHANGED_FLAGS): ditto.
(GLOBAL_RESET_CHANGED_FLAGS): ditto.
(REDISPLAY_FLAGS_CHANGEDP): new macro for testing redisplay flags
as a group.
(CLASS_REDISPLAY_FLAGS_CHANGEDP): ditto.
(GLOBAL_REDISPLAY_FLAGS_CHANGEDP): ditto.
* redisplay.c (redisplay_frame): use CLASS_RESET_CHANGED_FLAGS
instead of setting flags individually.
(redisplay_device): ditto CLASS_REDISPLAY_FLAGS_CHANGEDP.
(redisplay_device): ditto.
(redisplay_device): ditto CLASS_RESET_CHANGED_FLAGS.
(redisplay_without_hooks): ditto GLOBAL_REDISPLAY_FLAGS_CHANGEDP.
(redisplay_without_hooks): ditto CLASS_REDISPLAY_FLAGS_CHANGEDP.
(redisplay_without_hooks): ditto.
(redisplay_without_hooks): ditto GLOBAL_RESET_CHANGED_FLAGS.
* redisplay-x.c (x_output_string): unmap subwindows in the area.
(x_output_blank): ditto.
* redisplay-output.c (redisplay_output_display_block): don't unmap
subwindows in case layout optimization can avoid it.
(redisplay_output_subwindow): unmap subwindows in the area.
(redisplay_output_layout): optimize the output of layouts - only
output glyphs that have changed if nothing else of redisplay
significance has occurred.
(redisplay_output_pixmap): change args to
redisplay_clear_clipped_region.
(redisplay_clear_clipped_region): allow the clipped region to be
cleared of all subwindows except the one passed in.
* redisplay-msw.c (mswindows_output_blank): unmap subwindows in
the area.
(mswindows_output_cursor): ditto.
(mswindows_output_string): ditto.
* gutter.c (calculate_gutter_size): if the window buffer is nil
then don't continue.
(update_frame_gutters): be more lenient about when we actually
update the gutter. Layout optimization makes this
non-costly. Cache redisplay flags that we want to temporarily
ignore.
* glyphs.c (Fglyph_animated_timeout_handler): handle image
specific timeouts rather than iterating over the instance cache.
(glyph_animated_timeout_mapper): deleted.
(add_glyph_animated_timeout): use a weak list to hold onto the
image so that it can be GC'ed.
(disable_glyph_animated_timeout): disable a specific timeout.
(vars_of_glyphs): disable-animated-pixmaps is a new boolean for
controlling whether pixmaps are animated or not.
* glyphs-msw.c (mswindows_finalize_image_instance): make sure the
image timeout gets disabled when the image gets freed.
* glyphs-eimage.c (gif_instantiate): remove meaningless
comment. Cope with timeouts specified in the gif extension block.
* event-msw.c (vars_of_event_mswindows): new variable
mswindows-meta-activates-menu.
(mswindows_wnd_proc): only goto defproc with VK_MENU if the user
wants it.
* glyphs-x.c (x_finalize_image_instance): delete mask first so
that we can compare with image.
1999-10-13 Andy Piper <andy(a)xemacs.org>
* gutter-items.el (progress-abort-glyph): new glyph for showing
abort status.
(append-progress): dispatch-event rather than sit-for.
(abort-progress): new function. Show the abort glyph with an
appropriate message.
(raw-append-progress): dispatch-event rather than sit-for.
(display-progress): cope with aborts.
* gui.el (make-gui-button): Use native widgets for buttons
unconditionally.
(insert-gui-button): ditto.
(gui-button-p): ditto.
* xbm-button.el: remove from core.
* xpm-button.el: remove from core.
------------------------------------------------------------------------
Name: miscstuff.patch
miscstuff.patch Type: Plain Text (text/plain)
Encoding: quoted-printable
------------------------------------------------------------------------
--------------------------------------------------------------
Dr Andy Piper
Senior Consultant Architect, BEA Systems Ltd