Mercurial > hg > xemacs-beta
comparison src/glyphs.c @ 793:e38acbeb1cae
[xemacs-hg @ 2002-03-29 04:46:17 by ben]
lots o' fixes
etc/ChangeLog: New file.
Separated out all entries for etc/ into their own ChangeLog.
Includes entries for the following files:
etc/BABYL, etc/BETA, etc/CHARSETS, etc/DISTRIB, etc/Emacs.ad,
etc/FTP, etc/GNUS-NEWS, etc/GOATS, etc/HELLO, etc/INSTALL,
etc/MACHINES, etc/MAILINGLISTS, etc/MSDOS, etc/MYTHOLOGY, etc/NEWS,
etc/OXYMORONS, etc/PACKAGES, etc/README, etc/TUTORIAL,
etc/TUTORIAL.de, etc/TUTORIAL.ja, etc/TUTORIAL.ko, etc/TUTORIAL.se,
etc/aliases.ksh, etc/altrasoft-logo.xpm, etc/check_cygwin_setup.sh,
etc/custom/example-themes/europe-theme.el,
etc/custom/example-themes/ex-custom-file,
etc/custom/example-themes/example-theme.el, etc/e/eterm.ti,
etc/edt-user.doc, etc/enriched.doc, etc/etags.1, etc/gnuserv.1,
etc/gnuserv.README, etc/package-index.LATEST.gpg,
etc/package-index.LATEST.pgp, etc/photos/jan.png, etc/recycle.xpm,
etc/refcard.tex, etc/sample.Xdefaults, etc/sample.emacs,
etc/sgml/CATALOG, etc/sgml/HTML32.dtd, etc/skk/SKK.tut.E,
etc/smilies/Face_ase.xbm, etc/smilies/Face_ase2.xbm,
etc/smilies/Face_ase3.xbm, etc/smilies/Face_smile.xbm,
etc/smilies/Face_weep.xbm, etc/sounds, etc/toolbar,
etc/toolbar/workshop-cap-up.xpm, etc/xemacs-ja.1, etc/xemacs.1,
etc/yow.lines, etc\BETA, etc\NEWS, etc\README, etc\TUTORIAL,
etc\TUTORIAL.de, etc\check_cygwin_setup.sh, etc\sample.init.el,
etc\unicode\README, etc\unicode\mule-ucs\*, etc\unicode\other\*
unicode/unicode-consortium/8859-16.TXT: New file.
mule/english.el: Define this charset now, since a bug was fixed that formerly
prevented it.
mule/ethio-util.el: Fix compile errors involving Unicode `characters', which should be
integers.
Makefile.in.in: Always include gui.c, to fix compile error when TTY-only.
EmacsFrame.c, abbrev.c, alloc.c, buffer.c, buffer.h, bytecode.c, bytecode.h, callint.c, callproc.c, casetab.c, casetab.h, charset.h, chartab.c, chartab.h, cmds.c, console-msw.c, console-msw.h, console-tty.c, console-x.c, console-x.h, console.c, console.h, data.c, database.c, device-gtk.c, device-msw.c, device-x.c, device.c, device.h, dialog-msw.c, doc.c, doprnt.c, dumper.c, dynarr.c, editfns.c, eldap.c, eldap.h, elhash.c, elhash.h, emacs.c, eval.c, event-Xt.c, event-gtk.c, event-msw.c, event-stream.c, event-tty.c, event-unixoid.c, events.c, events.h, extents.c, extents.h, faces.c, faces.h, file-coding.c, file-coding.h, fileio.c, filelock.c, fns.c, frame-gtk.c, frame-msw.c, frame-tty.c, frame-x.c, frame.c, frame.h, free-hook.c, general-slots.h, glyphs-eimage.c, glyphs-gtk.c, glyphs-msw.c, glyphs-widget.c, glyphs-x.c, glyphs.c, glyphs.h, gpmevent.c, gtk-xemacs.c, gui-msw.c, gui-x.c, gui-x.h, gui.c, gui.h, gutter.c, gutter.h, indent.c, input-method-xlib.c, insdel.c, keymap.c, keymap.h, lisp-disunion.h, lisp-union.h, lisp.h, lread.c, lrecord.h, lstream.c, lstream.h, marker.c, menubar-gtk.c, menubar-msw.c, menubar-x.c, menubar.c, minibuf.c, mule-canna.c, mule-ccl.c, mule-charset.c, mule-wnnfns.c, native-gtk-toolbar.c, objects-msw.c, objects-tty.c, objects-x.c, objects.c, objects.h, opaque.c, opaque.h, postgresql.c, postgresql.h, print.c, process-unix.c, process.c, process.h, rangetab.c, rangetab.h, redisplay-gtk.c, redisplay-msw.c, redisplay-output.c, redisplay-tty.c, redisplay-x.c, redisplay.c, scrollbar-gtk.c, scrollbar-msw.c, scrollbar-x.c, scrollbar.c, scrollbar.h, search.c, select-gtk.c, select-x.c, sound.c, specifier.c, specifier.h, strftime.c, symbols.c, symeval.h, syntax.h, text.c, text.h, toolbar-common.c, toolbar-msw.c, toolbar.c, toolbar.h, tooltalk.c, tooltalk.h, ui-gtk.c, ui-gtk.h, undo.c, vm-limit.c, window.c, window.h: Eliminate XSETFOO. Replace all usages with wrap_foo().
Make symbol->name a Lisp_Object, not Lisp_String *. Eliminate
nearly all uses of Lisp_String * in favor of Lisp_Object, and
correct macros so most of them favor Lisp_Object.
Create new error-behavior ERROR_ME_DEBUG_WARN -- output warnings,
but at level `debug' (usually ignored). Use it when instantiating
specifiers, so problems can be debugged. Move
log-warning-minimum-level into C so that we can optimize
ERROR_ME_DEBUG_WARN.
Fix warning levels consistent with new definitions.
Add default_ and parent fields to char table; not yet implemented.
New fun Dynarr_verify(); use for further error checking on Dynarrs.
Rearrange code at top of lisp.h in conjunction with dynarr changes.
Fix eifree(). Use Eistrings in various places
(format_event_object(), where_is_to_char(), and callers thereof)
to avoid fixed-size strings buffers. New fun write_eistring().
Reindent and fix GPM code to follow standards.
Set default MS Windows font to Lucida Console (same size as
Courier New but less interline spacing, so more lines fit).
Increase default frame size on Windows to 50 lines. (If that's too
big for the workspace, the frame will be shrunk as necessary.)
Fix problem with text files with no newlines (). (Change
`convert-eol' coding system to use `nil' for autodetect,
consistent with make-coding-system.)
Correct compile warnings in vm-limit.c.
Fix handling of reverse-direction charsets to avoid errors when
opening (e.g.) mule-ucs/lisp/reldata/uiso8859-6.el.
Recode some object printing methods to use write_fmt_string()
instead of a fixed buffer and sprintf.
Turn on display of png comments as warnings (level `info'), now
that they're unobtrusive.
Revamped the sound documentation.
Fixed bug in redisplay w.r.t. hscroll/truncation/continuation
glyphs causing jumping up and down of the lines, since they're
bigger than the line size. (It was seen most obviously when
there's a horizontal scroll bar, e.g. do C-h a glyph or something
like that.) The problem was that the glyph-contrib-p setting on
glyphs was ignored even if it was set properly, which it wasn't
until now.
author | ben |
---|---|
date | Fri, 29 Mar 2002 04:49:13 +0000 |
parents | 943eaba38521 |
children | a5954632b187 |
comparison
equal
deleted
inserted
replaced
792:4e83fdb13eb9 | 793:e38acbeb1cae |
---|---|
1 /* Generic glyph/image implementation + display tables | 1 /* Generic glyph/image implementation + display tables |
2 Copyright (C) 1994, 1995 Board of Trustees, University of Illinois. | 2 Copyright (C) 1994, 1995 Board of Trustees, University of Illinois. |
3 Copyright (C) 1995 Tinker Systems | 3 Copyright (C) 1995 Tinker Systems |
4 Copyright (C) 1995, 1996, 2000, 2001 Ben Wing | 4 Copyright (C) 1995, 1996, 2000, 2001, 2002 Ben Wing |
5 Copyright (C) 1995 Sun Microsystems | 5 Copyright (C) 1995 Sun Microsystems |
6 Copyright (C) 1998, 1999, 2000 Andy Piper | 6 Copyright (C) 1998, 1999, 2000 Andy Piper |
7 | 7 |
8 This file is part of XEmacs. | 8 This file is part of XEmacs. |
9 | 9 |
653 } | 653 } |
654 | 654 |
655 void | 655 void |
656 check_window_subwindow_cache (struct window* w) | 656 check_window_subwindow_cache (struct window* w) |
657 { | 657 { |
658 Lisp_Object window; | 658 Lisp_Object window = wrap_window (w); |
659 | 659 |
660 XSETWINDOW (window, w); | |
661 | 660 |
662 assert (!NILP (w->subwindow_instance_cache)); | 661 assert (!NILP (w->subwindow_instance_cache)); |
663 elisp_maphash (check_instance_cache_mapper, | 662 elisp_maphash (check_instance_cache_mapper, |
664 w->subwindow_instance_cache, | 663 w->subwindow_instance_cache, |
665 LISP_TO_VOID (window)); | 664 LISP_TO_VOID (window)); |
1284 lp->instantiator = instantiator; | 1283 lp->instantiator = instantiator; |
1285 /* So that layouts get done. */ | 1284 /* So that layouts get done. */ |
1286 lp->layout_changed = 1; | 1285 lp->layout_changed = 1; |
1287 lp->initialized = 0; | 1286 lp->initialized = 0; |
1288 | 1287 |
1289 XSETIMAGE_INSTANCE (val, lp); | 1288 val = wrap_image_instance (lp); |
1290 MARK_GLYPHS_CHANGED; | 1289 MARK_GLYPHS_CHANGED; |
1291 | 1290 |
1292 return val; | 1291 return val; |
1293 } | 1292 } |
1294 | 1293 |
1416 Error_Behavior | 1415 Error_Behavior |
1417 decode_error_behavior_flag (Lisp_Object noerror) | 1416 decode_error_behavior_flag (Lisp_Object noerror) |
1418 { | 1417 { |
1419 if (NILP (noerror)) return ERROR_ME; | 1418 if (NILP (noerror)) return ERROR_ME; |
1420 else if (EQ (noerror, Qt)) return ERROR_ME_NOT; | 1419 else if (EQ (noerror, Qt)) return ERROR_ME_NOT; |
1420 else if (EQ (noerror, Qdebug)) return ERROR_ME_DEBUG_WARN; | |
1421 else return ERROR_ME_WARN; | 1421 else return ERROR_ME_WARN; |
1422 } | 1422 } |
1423 | 1423 |
1424 Lisp_Object | 1424 Lisp_Object |
1425 encode_error_behavior_flag (Error_Behavior errb) | 1425 encode_error_behavior_flag (Error_Behavior errb) |
1426 { | 1426 { |
1427 if (ERRB_EQ (errb, ERROR_ME)) | 1427 if (ERRB_EQ (errb, ERROR_ME)) |
1428 return Qnil; | 1428 return Qnil; |
1429 else if (ERRB_EQ (errb, ERROR_ME_NOT)) | 1429 else if (ERRB_EQ (errb, ERROR_ME_NOT)) |
1430 return Qt; | 1430 return Qt; |
1431 else if (ERRB_EQ (errb, ERROR_ME_DEBUG_WARN)) | |
1432 return Qdebug; | |
1431 else | 1433 else |
1432 { | 1434 { |
1433 assert (ERRB_EQ (errb, ERROR_ME_WARN)); | 1435 assert (ERRB_EQ (errb, ERROR_ME_WARN)); |
1434 return Qwarning; | 1436 return Qwarning; |
1435 } | 1437 } |
2114 { | 2116 { |
2115 Lisp_Object image = glyph_or_ii; | 2117 Lisp_Object image = glyph_or_ii; |
2116 | 2118 |
2117 if (GLYPHP (glyph_or_ii)) | 2119 if (GLYPHP (glyph_or_ii)) |
2118 { | 2120 { |
2119 Lisp_Object window; | 2121 Lisp_Object window = wrap_window (w); |
2120 XSETWINDOW (window, w); | 2122 |
2121 image = glyph_image_instance (glyph_or_ii, window, ERROR_ME_NOT, 1); | 2123 image = glyph_image_instance (glyph_or_ii, window, |
2124 ERROR_ME_DEBUG_WARN, 1); | |
2122 } | 2125 } |
2123 | 2126 |
2124 if (TEXT_IMAGE_INSTANCEP (image)) | 2127 if (TEXT_IMAGE_INSTANCEP (image)) |
2125 { | 2128 { |
2126 Lisp_Image_Instance* ii = XIMAGE_INSTANCE (image); | 2129 Lisp_Image_Instance* ii = XIMAGE_INSTANCE (image); |
3451 LIST_LOOP (rest, possible_console_types) | 3454 LIST_LOOP (rest, possible_console_types) |
3452 { | 3455 { |
3453 Lisp_Object contype = XCAR (rest); | 3456 Lisp_Object contype = XCAR (rest); |
3454 Lisp_Object newinst = call_with_suspended_errors | 3457 Lisp_Object newinst = call_with_suspended_errors |
3455 ((lisp_fn_t) normalize_image_instantiator, | 3458 ((lisp_fn_t) normalize_image_instantiator, |
3456 Qnil, Qimage, ERROR_ME_NOT, 3, instantiator, contype, | 3459 Qnil, Qimage, ERROR_ME_DEBUG_WARN, 3, instantiator, contype, |
3457 make_int (XIMAGE_SPECIFIER_ALLOWED (specifier))); | 3460 make_int (XIMAGE_SPECIFIER_ALLOWED (specifier))); |
3458 | 3461 |
3459 if (!NILP (newinst)) | 3462 if (!NILP (newinst)) |
3460 { | 3463 { |
3461 Lisp_Object newtag; | 3464 Lisp_Object newtag; |
3747 g->baseline = Fmake_specifier (Qgeneric); | 3750 g->baseline = Fmake_specifier (Qgeneric); |
3748 set_specifier_fallback (g->baseline, tem3); | 3751 set_specifier_fallback (g->baseline, tem3); |
3749 g->face = Qnil; | 3752 g->face = Qnil; |
3750 g->plist = Qnil; | 3753 g->plist = Qnil; |
3751 g->after_change = after_change; | 3754 g->after_change = after_change; |
3752 XSETGLYPH (obj, g); | 3755 obj = wrap_glyph (g); |
3753 | 3756 |
3754 set_image_attached_to (g->image, obj, Qimage); | 3757 set_image_attached_to (g->image, obj, Qimage); |
3755 UNGCPRO; | 3758 UNGCPRO; |
3756 } | 3759 } |
3757 | 3760 |
3879 glyph_image_instance_maybe (Lisp_Object glyph_or_image, Lisp_Object window) | 3882 glyph_image_instance_maybe (Lisp_Object glyph_or_image, Lisp_Object window) |
3880 { | 3883 { |
3881 Lisp_Object instance = glyph_or_image; | 3884 Lisp_Object instance = glyph_or_image; |
3882 | 3885 |
3883 if (GLYPHP (glyph_or_image)) | 3886 if (GLYPHP (glyph_or_image)) |
3884 instance = glyph_image_instance (glyph_or_image, window, ERROR_ME_NOT, 1); | 3887 instance = glyph_image_instance (glyph_or_image, window, |
3888 ERROR_ME_DEBUG_WARN, 1); | |
3885 | 3889 |
3886 return instance; | 3890 return instance; |
3887 } | 3891 } |
3888 | 3892 |
3889 /***************************************************************************** | 3893 /***************************************************************************** |
3915 This may not be exact as it does not take into account all of the context | 3919 This may not be exact as it does not take into account all of the context |
3916 that redisplay will. | 3920 that redisplay will. |
3917 */ | 3921 */ |
3918 (glyph, window)) | 3922 (glyph, window)) |
3919 { | 3923 { |
3920 XSETWINDOW (window, decode_window (window)); | 3924 window = wrap_window (decode_window (window)); |
3921 CHECK_GLYPH (glyph); | 3925 CHECK_GLYPH (glyph); |
3922 | 3926 |
3923 return make_int (glyph_width (glyph, window)); | 3927 return make_int (glyph_width (glyph, window)); |
3924 } | 3928 } |
3925 | 3929 |
3987 This may not be exact as it does not take into account all of the context | 3991 This may not be exact as it does not take into account all of the context |
3988 that redisplay will. | 3992 that redisplay will. |
3989 */ | 3993 */ |
3990 (glyph, window)) | 3994 (glyph, window)) |
3991 { | 3995 { |
3992 XSETWINDOW (window, decode_window (window)); | 3996 window = wrap_window (decode_window (window)); |
3993 CHECK_GLYPH (glyph); | 3997 CHECK_GLYPH (glyph); |
3994 | 3998 |
3995 return make_int (glyph_ascent (glyph, window)); | 3999 return make_int (glyph_ascent (glyph, window)); |
3996 } | 4000 } |
3997 | 4001 |
4000 This may not be exact as it does not take into account all of the context | 4004 This may not be exact as it does not take into account all of the context |
4001 that redisplay will. | 4005 that redisplay will. |
4002 */ | 4006 */ |
4003 (glyph, window)) | 4007 (glyph, window)) |
4004 { | 4008 { |
4005 XSETWINDOW (window, decode_window (window)); | 4009 window = wrap_window (decode_window (window)); |
4006 CHECK_GLYPH (glyph); | 4010 CHECK_GLYPH (glyph); |
4007 | 4011 |
4008 return make_int (glyph_descent (glyph, window)); | 4012 return make_int (glyph_descent (glyph, window)); |
4009 } | 4013 } |
4010 | 4014 |
4014 This may not be exact as it does not take into account all of the context | 4018 This may not be exact as it does not take into account all of the context |
4015 that redisplay will. | 4019 that redisplay will. |
4016 */ | 4020 */ |
4017 (glyph, window)) | 4021 (glyph, window)) |
4018 { | 4022 { |
4019 XSETWINDOW (window, decode_window (window)); | 4023 window = wrap_window (decode_window (window)); |
4020 CHECK_GLYPH (glyph); | 4024 CHECK_GLYPH (glyph); |
4021 | 4025 |
4022 return make_int (glyph_height (glyph, window)); | 4026 return make_int (glyph_height (glyph, window)); |
4023 } | 4027 } |
4024 | 4028 |
4030 if (!NILP (glyph_or_image)) | 4034 if (!NILP (glyph_or_image)) |
4031 { | 4035 { |
4032 if (GLYPHP (glyph_or_image)) | 4036 if (GLYPHP (glyph_or_image)) |
4033 { | 4037 { |
4034 instance = glyph_image_instance (glyph_or_image, window, | 4038 instance = glyph_image_instance (glyph_or_image, window, |
4035 ERROR_ME_NOT, 1); | 4039 ERROR_ME_DEBUG_WARN, 1); |
4036 XGLYPH_DIRTYP (glyph_or_image) = dirty; | 4040 XGLYPH_DIRTYP (glyph_or_image) = dirty; |
4037 } | 4041 } |
4038 | 4042 |
4039 if (!IMAGE_INSTANCEP (instance)) | 4043 if (!IMAGE_INSTANCEP (instance)) |
4040 return; | 4044 return; |
4068 return Qnil; | 4072 return Qnil; |
4069 else | 4073 else |
4070 { | 4074 { |
4071 Lisp_Object retval = | 4075 Lisp_Object retval = |
4072 specifier_instance_no_quit (GLYPH_BASELINE (XGLYPH (glyph)), | 4076 specifier_instance_no_quit (GLYPH_BASELINE (XGLYPH (glyph)), |
4073 /* #### look into ERROR_ME_NOT */ | 4077 /* #### look into error flag */ |
4074 Qunbound, domain, ERROR_ME_NOT, | 4078 Qunbound, domain, ERROR_ME_DEBUG_WARN, |
4075 0, Qzero); | 4079 0, Qzero); |
4076 if (!NILP (retval) && !INTP (retval)) | 4080 if (!NILP (retval) && !INTP (retval)) |
4077 retval = Qnil; | 4081 retval = Qnil; |
4078 else if (INTP (retval)) | 4082 else if (INTP (retval)) |
4079 { | 4083 { |
4099 if (!GLYPHP (glyph)) | 4103 if (!GLYPHP (glyph)) |
4100 return 0; | 4104 return 0; |
4101 else | 4105 else |
4102 return !NILP (specifier_instance_no_quit | 4106 return !NILP (specifier_instance_no_quit |
4103 (GLYPH_CONTRIB_P (XGLYPH (glyph)), Qunbound, domain, | 4107 (GLYPH_CONTRIB_P (XGLYPH (glyph)), Qunbound, domain, |
4104 /* #### look into ERROR_ME_NOT */ | 4108 /* #### look into error flag */ |
4105 ERROR_ME_NOT, 0, Qzero)); | 4109 ERROR_ME_DEBUG_WARN, 0, Qzero)); |
4106 } | 4110 } |
4107 | 4111 |
4108 static void | 4112 static void |
4109 glyph_property_was_changed (Lisp_Object glyph, Lisp_Object property, | 4113 glyph_property_was_changed (Lisp_Object glyph, Lisp_Object property, |
4110 Lisp_Object locale) | 4114 Lisp_Object locale) |
4118 enum image_instance_geometry disp, Lisp_Object domain) | 4122 enum image_instance_geometry disp, Lisp_Object domain) |
4119 { | 4123 { |
4120 Lisp_Object instance = glyph_or_image; | 4124 Lisp_Object instance = glyph_or_image; |
4121 | 4125 |
4122 if (GLYPHP (glyph_or_image)) | 4126 if (GLYPHP (glyph_or_image)) |
4123 instance = glyph_image_instance (glyph_or_image, domain, ERROR_ME_NOT, 1); | 4127 instance = glyph_image_instance (glyph_or_image, domain, |
4128 ERROR_ME_DEBUG_WARN, 1); | |
4124 | 4129 |
4125 image_instance_query_geometry (instance, width, height, disp, domain); | 4130 image_instance_query_geometry (instance, width, height, disp, domain); |
4126 } | 4131 } |
4127 | 4132 |
4128 void | 4133 void |
4130 int xoffset, int yoffset, Lisp_Object domain) | 4135 int xoffset, int yoffset, Lisp_Object domain) |
4131 { | 4136 { |
4132 Lisp_Object instance = glyph_or_image; | 4137 Lisp_Object instance = glyph_or_image; |
4133 | 4138 |
4134 if (GLYPHP (glyph_or_image)) | 4139 if (GLYPHP (glyph_or_image)) |
4135 instance = glyph_image_instance (glyph_or_image, domain, ERROR_ME_NOT, 1); | 4140 instance = glyph_image_instance (glyph_or_image, domain, |
4141 ERROR_ME_DEBUG_WARN, 1); | |
4136 | 4142 |
4137 image_instance_layout (instance, width, height, xoffset, yoffset, domain); | 4143 image_instance_layout (instance, width, height, xoffset, yoffset, domain); |
4138 } | 4144 } |
4139 | 4145 |
4140 | 4146 |
4176 || XGLYPH_DIRTYP (cachel->glyph) | 4182 || XGLYPH_DIRTYP (cachel->glyph) |
4177 || XFRAME(WINDOW_FRAME(w))->faces_changed) | 4183 || XFRAME(WINDOW_FRAME(w))->faces_changed) |
4178 { | 4184 { |
4179 Lisp_Object window, instance; | 4185 Lisp_Object window, instance; |
4180 | 4186 |
4181 XSETWINDOW (window, w); | 4187 window = wrap_window (w); |
4182 | 4188 |
4183 cachel->glyph = glyph; | 4189 cachel->glyph = glyph; |
4184 /* Speed things up slightly by grabbing the glyph instantiation | 4190 /* Speed things up slightly by grabbing the glyph instantiation |
4185 and passing it to the size functions. */ | 4191 and passing it to the size functions. */ |
4186 instance = glyph_image_instance (glyph, window, ERROR_ME_NOT, 1); | 4192 instance = glyph_image_instance (glyph, window, ERROR_ME_DEBUG_WARN, 1); |
4187 | 4193 |
4188 if (!IMAGE_INSTANCEP (instance)) | 4194 if (!IMAGE_INSTANCEP (instance)) |
4189 return; | 4195 return; |
4190 | 4196 |
4191 /* Mark text instance of the glyph dirty if faces have changed, | 4197 /* Mark text instance of the glyph dirty if faces have changed, |
4281 /* Unset the dirty bit on all the glyph cachels that have it. */ | 4287 /* Unset the dirty bit on all the glyph cachels that have it. */ |
4282 void | 4288 void |
4283 mark_glyph_cachels_as_clean (struct window* w) | 4289 mark_glyph_cachels_as_clean (struct window* w) |
4284 { | 4290 { |
4285 int elt; | 4291 int elt; |
4286 Lisp_Object window; | 4292 Lisp_Object window = wrap_window (w); |
4287 XSETWINDOW (window, w); | 4293 |
4288 for (elt = 0; elt < Dynarr_length (w->glyph_cachels); elt++) | 4294 for (elt = 0; elt < Dynarr_length (w->glyph_cachels); elt++) |
4289 { | 4295 { |
4290 struct glyph_cachel *cachel = Dynarr_atp (w->glyph_cachels, elt); | 4296 struct glyph_cachel *cachel = Dynarr_atp (w->glyph_cachels, elt); |
4291 cachel->dirty = 0; | 4297 cachel->dirty = 0; |
4292 set_glyph_dirty_p (cachel->glyph, window, 0); | 4298 set_glyph_dirty_p (cachel->glyph, window, 0); |
4310 #endif /* MEMORY_USAGE_STATS */ | 4316 #endif /* MEMORY_USAGE_STATS */ |
4311 | 4317 |
4312 | 4318 |
4313 | 4319 |
4314 /***************************************************************************** | 4320 /***************************************************************************** |
4315 * subwindow cachel functions * | 4321 * subwindow cachel functions * |
4316 *****************************************************************************/ | 4322 *****************************************************************************/ |
4317 /* Subwindows are curious in that you have to physically unmap them to | 4323 /* Subwindows are curious in that you have to physically unmap them to |
4318 not display them. It is problematic deciding what to do in | 4324 not display them. It is problematic deciding what to do in |
4319 redisplay. We have two caches - a per-window instance cache that | 4325 redisplay. We have two caches - a per-window instance cache that |
4320 keeps track of subwindows on a window, these are linked to their | 4326 keeps track of subwindows on a window, these are linked to their |
4639 } | 4645 } |
4640 } | 4646 } |
4641 } | 4647 } |
4642 | 4648 |
4643 /* remove a subwindow from its frame */ | 4649 /* remove a subwindow from its frame */ |
4644 void unmap_subwindow (Lisp_Object subwindow) | 4650 void |
4651 unmap_subwindow (Lisp_Object subwindow) | |
4645 { | 4652 { |
4646 Lisp_Image_Instance* ii = XIMAGE_INSTANCE (subwindow); | 4653 Lisp_Image_Instance* ii = XIMAGE_INSTANCE (subwindow); |
4647 struct frame* f; | 4654 struct frame* f; |
4648 | 4655 |
4649 ERROR_CHECK_IMAGE_INSTANCE (subwindow); | 4656 ERROR_CHECK_IMAGE_INSTANCE (subwindow); |
4669 MAYBE_DEVMETH (XDEVICE (IMAGE_INSTANCE_DEVICE (ii)), | 4676 MAYBE_DEVMETH (XDEVICE (IMAGE_INSTANCE_DEVICE (ii)), |
4670 unmap_subwindow, (ii)); | 4677 unmap_subwindow, (ii)); |
4671 } | 4678 } |
4672 | 4679 |
4673 /* show a subwindow in its frame */ | 4680 /* show a subwindow in its frame */ |
4674 void map_subwindow (Lisp_Object subwindow, int x, int y, | 4681 void |
4675 struct display_glyph_area *dga) | 4682 map_subwindow (Lisp_Object subwindow, int x, int y, |
4683 struct display_glyph_area *dga) | |
4676 { | 4684 { |
4677 Lisp_Image_Instance* ii = XIMAGE_INSTANCE (subwindow); | 4685 Lisp_Image_Instance* ii = XIMAGE_INSTANCE (subwindow); |
4678 struct frame* f; | 4686 struct frame* f; |
4679 | 4687 |
4680 ERROR_CHECK_IMAGE_INSTANCE (subwindow); | 4688 ERROR_CHECK_IMAGE_INSTANCE (subwindow); |
4905 else | 4913 else |
4906 abort (); | 4914 abort (); |
4907 } | 4915 } |
4908 } | 4916 } |
4909 | 4917 |
4910 /***************************************************************************** | 4918 /**************************************************************************** |
4911 * timeouts for animated glyphs * | 4919 * timeouts for animated glyphs * |
4912 *****************************************************************************/ | 4920 ****************************************************************************/ |
4913 static Lisp_Object Qglyph_animated_timeout_handler; | 4921 static Lisp_Object Qglyph_animated_timeout_handler; |
4914 | 4922 |
4915 DEFUN ("glyph-animated-timeout-handler", Fglyph_animated_timeout_handler, 1, 1, 0, /* | 4923 DEFUN ("glyph-animated-timeout-handler", Fglyph_animated_timeout_handler, 1, 1, 0, /* |
4916 Callback function for updating animated images. | 4924 Callback function for updating animated images. |
4917 Don't use this. | 4925 Don't use this. |
4950 } | 4958 } |
4951 } | 4959 } |
4952 return Qnil; | 4960 return Qnil; |
4953 } | 4961 } |
4954 | 4962 |
4955 Lisp_Object add_glyph_animated_timeout (EMACS_INT tickms, Lisp_Object image) | 4963 Lisp_Object |
4964 add_glyph_animated_timeout (EMACS_INT tickms, Lisp_Object image) | |
4956 { | 4965 { |
4957 Lisp_Object ret = Qnil; | 4966 Lisp_Object ret = Qnil; |
4958 | 4967 |
4959 if (tickms > 0 && IMAGE_INSTANCEP (image)) | 4968 if (tickms > 0 && IMAGE_INSTANCEP (image)) |
4960 { | 4969 { |
4972 UNGCPRO; | 4981 UNGCPRO; |
4973 } | 4982 } |
4974 return ret; | 4983 return ret; |
4975 } | 4984 } |
4976 | 4985 |
4977 void disable_glyph_animated_timeout (int i) | 4986 void |
4978 { | 4987 disable_glyph_animated_timeout (int i) |
4979 Lisp_Object id; | 4988 { |
4980 XSETINT (id, i); | 4989 Fdisable_timeout (make_int (i)); |
4981 | |
4982 Fdisable_timeout (id); | |
4983 } | 4990 } |
4984 | 4991 |
4985 | 4992 |
4986 /***************************************************************************** | 4993 /***************************************************************************** |
4987 * initialization * | 4994 * initialization * |