Mercurial > hg > xemacs-beta
annotate src/redisplay.h @ 5353:38e24b8be4ea
Improve the lexical scoping in #'block, #'return-from.
lisp/ChangeLog addition:
2011-02-07 Aidan Kehoe <kehoea@parhasard.net>
* bytecomp.el:
* bytecomp.el (byte-compile-initial-macro-environment):
Shadow `block', `return-from' here, we implement them differently
when byte-compiling.
* bytecomp.el (byte-compile-active-blocks): New.
* bytecomp.el (byte-compile-block-1): New.
* bytecomp.el (byte-compile-return-from-1): New.
* bytecomp.el (return-from-1): New.
* bytecomp.el (block-1): New.
These are two aliases that exist to have their own associated
byte-compile functions, which functions implement `block' and
`return-from'.
* cl-extra.el (cl-macroexpand-all):
Fix a bug here when macros in the environment have been compiled.
* cl-macs.el (block):
* cl-macs.el (return):
* cl-macs.el (return-from):
Be more careful about lexical scope in these macros.
* cl.el:
* cl.el ('cl-block-wrapper): Removed.
* cl.el ('cl-block-throw): Removed.
These aren't needed in code generated by this XEmacs. They
shouldn't be needed in code generated by XEmacs 21.4, but if it
turns out the packages do need them, we can put them back.
2011-01-30 Mike Sperber <mike@xemacs.org>
* font-lock.el (font-lock-fontify-pending-extents): Don't fail if
`font-lock-mode' is unset, which can happen in the middle of
`revert-buffer'.
2011-01-23 Aidan Kehoe <kehoea@parhasard.net>
* cl-macs.el (delete):
* cl-macs.el (delq):
* cl-macs.el (remove):
* cl-macs.el (remq):
Don't use the compiler macro if these functions were given the
wrong number of arguments, as happens in lisp-tests.el.
* cl-seq.el (remove, remq): Removed.
I added these to subr.el, and forgot to remove them from here.
2011-01-22 Aidan Kehoe <kehoea@parhasard.net>
* bytecomp.el (byte-compile-setq, byte-compile-set):
Remove kludge allowing keywords' values to be set, all the code
that does that is gone.
* cl-compat.el (elt-satisfies-test-p):
* faces.el (set-face-parent):
* faces.el (face-doc-string):
* gtk-font-menu.el:
* gtk-font-menu.el (gtk-reset-device-font-menus):
* msw-font-menu.el:
* msw-font-menu.el (mswindows-reset-device-font-menus):
* package-get.el (package-get-installedp):
* select.el (select-convert-from-image-data):
* sound.el:
* sound.el (load-sound-file):
* x-font-menu.el (x-reset-device-font-menus-core):
Don't quote keywords, they're self-quoting, and the
win from backward-compatibility is sufficiently small now that the
style problem overrides it.
2011-01-22 Aidan Kehoe <kehoea@parhasard.net>
* cl-macs.el (block, return-from): Require that NAME be a symbol
in these macros, as always documented in the #'block docstring and
as required by Common Lisp.
* descr-text.el (unidata-initialize-unihan-database):
Correct the use of non-symbols in #'block and #'return-from in
this function.
2011-01-15 Aidan Kehoe <kehoea@parhasard.net>
* cl-extra.el (concatenate): Accept more complicated TYPEs in this
function, handing the sequences over to #'coerce if we don't
understand them here.
* cl-macs.el (inline): Don't proclaim #'concatenate as inline, its
compiler macro is more useful than doing that.
2011-01-11 Aidan Kehoe <kehoea@parhasard.net>
* subr.el (delete, delq, remove, remq): Move #'remove, #'remq
here, they don't belong in cl-seq.el; move #'delete, #'delq here
from fns.c, implement them in terms of #'delete*, allowing support
for sequences generally.
* update-elc.el (do-autoload-commands): Use #'delete*, not #'delq
here, now the latter's no longer dumped.
* cl-macs.el (delete, delq): Add compiler macros transforming
#'delete and #'delq to #'delete* calls.
2011-01-10 Aidan Kehoe <kehoea@parhasard.net>
* dialog.el (make-dialog-box): Correct a misplaced parenthesis
here, thank you Mats Lidell in 87zkr9gqrh.fsf@mail.contactor.se !
2011-01-02 Aidan Kehoe <kehoea@parhasard.net>
* dialog.el (make-dialog-box):
* list-mode.el (display-completion-list):
These functions used to use cl-parsing-keywords; change them to
use defun* instead, fixing the build. (Not sure what led to me
not including this change in d1b17a33450b!)
2011-01-02 Aidan Kehoe <kehoea@parhasard.net>
* cl-macs.el (define-star-compiler-macros):
Make sure the form has ITEM and LIST specified before attempting
to change to calls with explicit tests; necessary for some tests
in lisp-tests.el to compile correctly.
(stable-union, stable-intersection): Add compiler macros for these
functions, in the same way we do for most of the other functions
in cl-seq.el.
2011-01-01 Aidan Kehoe <kehoea@parhasard.net>
* cl-macs.el (dolist, dotimes, do-symbols, macrolet)
(symbol-macrolet):
Define these macros with defmacro* instead of parsing the argument
list by hand, for the sake of style and readability; use backquote
where appropriate, instead of calling #'list and and friends, for
the same reason.
2010-12-30 Aidan Kehoe <kehoea@parhasard.net>
* x-misc.el (device-x-display):
Provide this function, documented in the Lispref for years, but
not existing previously. Thank you Julian Bradfield, thank you
Jeff Mincy.
2010-12-30 Aidan Kehoe <kehoea@parhasard.net>
* cl-seq.el:
Move the heavy lifting from this file to C. Dump the
cl-parsing-keywords macro, but don't use defun* for the functions
we define that do take keywords, dynamic scope lossage makes that
not practical.
* subr.el (sort, fillarray): Move these aliases here.
(map-plist): #'nsublis is now built-in, but at this point #'eql
isn't necessarily available as a test; use #'eq.
* obsolete.el (cl-delete-duplicates): Make this available for old
compiler macros and old code.
(memql): Document that this is equivalent to #'member*, and worse.
* cl.el (adjoin, subst): Removed. These are in C.
2010-12-30 Aidan Kehoe <kehoea@parhasard.net>
* simple.el (assoc-ignore-case): Remove a duplicate definition of
this function (it's already in subr.el).
* iso8859-1.el (char-width):
On non-Mule, make this function equivalent to that produced by
(constantly 1), but preserve its docstring.
* subr.el (subst-char-in-string): Define this in terms of
#'substitute, #'nsubstitute.
(string-width): Define this using #'reduce and #'char-width.
(char-width): Give this a simpler definition, it makes far more
sense to check for mule at load time and redefine, as we do in
iso8859-1.el.
(store-substring): Implement this in terms of #'replace, now
#'replace is cheap.
2010-12-30 Aidan Kehoe <kehoea@parhasard.net>
* update-elc.el (lisp-files-needed-for-byte-compilation)
(lisp-files-needing-early-byte-compilation):
cl-macs belongs in the former, not the latter, it is as
fundamental as bytecomp.el.
2010-12-30 Aidan Kehoe <kehoea@parhasard.net>
* cl.el:
Provde the Common Lisp program-error, type-error as error
symbols. This doesn't nearly go far enough for anyone using the
Common Lisp errors.
2010-12-29 Aidan Kehoe <kehoea@parhasard.net>
* cl-macs.el (delete-duplicates):
If the form has an incorrect number of arguments, don't attempt a
compiler macroexpansion.
2010-12-29 Aidan Kehoe <kehoea@parhasard.net>
* cl-macs.el (cl-safe-expr-p):
Forms that start with the symbol lambda are also safe.
2010-12-29 Aidan Kehoe <kehoea@parhasard.net>
* cl-macs.el (= < > <= >=):
For these functions' compiler macros, the optimisation is safe
even if the first and the last arguments have side effects, since
they're only used the once.
2010-12-29 Aidan Kehoe <kehoea@parhasard.net>
* cl-macs.el (inline-side-effect-free-compiler-macros):
Unroll a loop here at macro-expansion time, so these compiler
macros are compiled. Use #'eql instead of #'eq in a couple of
places for better style.
2010-12-29 Aidan Kehoe <kehoea@parhasard.net>
* cl-extra.el (notany, notevery): Avoid some dynamic scope
stupidity with local variable names in these functions, when they
weren't prefixed with cl-; go into some more detail in the doc
strings.
2010-12-29 Aidan Kehoe <kehoea@parhasard.net>
* byte-optimize.el (side-effect-free-fns): #'remove, #'remq are
free of side-effects.
(side-effect-and-error-free-fns):
Drop dot, dot-marker from the list.
2010-11-17 Aidan Kehoe <kehoea@parhasard.net>
* cl-extra.el (coerce):
In the argument list, name the first argument OBJECT, not X; the
former name was always used in the doc string and is clearer.
Handle vector type specifications which include the length of the
target sequence, error if there's a mismatch.
* cl-macs.el (cl-make-type-test): Handle type specifications
starting with the symbol 'eql.
2010-11-14 Aidan Kehoe <kehoea@parhasard.net>
* cl-macs.el (eql): Don't remove the byte-compile property of this
symbol. That was necessary to override a bug in bytecomp.el where
#'eql was confused with #'eq, which bug we no longer have.
If neither expression is constant, don't attempt to handle the
expression in this compiler macro, leave it to byte-compile-eql,
which produces better code anyway.
* bytecomp.el (eq): #'eql is not the function associated with the
byte-eq byte code.
(byte-compile-eql): Add an explicit compile method for this
function, for cases where the cl-macs compiler macro hasn't
reduced it to #'eq or #'equal.
2010-10-25 Aidan Kehoe <kehoea@parhasard.net>
Add compiler macros and compilation sanity-checking for various
functions that take keywords.
* byte-optimize.el (side-effect-free-fns): #'symbol-value is
side-effect free and not error free.
* bytecomp.el (byte-compile-normal-call): Check keyword argument
lists for sanity; store information about the positions where
keyword arguments start using the new byte-compile-keyword-start
property.
* cl-macs.el (cl-const-expr-val): Take a new optional argument,
cl-not-constant, defaulting to nil, in this function; return it if
the expression is not constant.
(cl-non-fixnum-number-p): Make this into a separate function, we
want to pass it to #'every.
(eql): Use it.
(define-star-compiler-macros): Use the same code to generate the
member*, assoc* and rassoc* compiler macros; special-case some
code in #'add-to-list in subr.el.
(remove, remq): Add compiler macros for these two functions, in
preparation for #'remove being in C.
(define-foo-if-compiler-macros): Transform (remove-if-not ...) calls to
(remove ... :if-not) at compile time, which will be a real win
once the latter is in C.
(define-substitute-if-compiler-macros)
(define-subst-if-compiler-macros): Similarly for these functions.
(delete-duplicates): Change this compiler macro to use
#'plists-equal; if we don't have information about the type of
SEQUENCE at compile time, don't bother attempting to inline the
call, the function will be in C soon enough.
(equalp): Remove an old commented-out compiler macro for this, if
we want to see it it's in version control.
(subst-char-in-string): Transform this to a call to nsubstitute or
nsubstitute, if that is appropriate.
* cl.el (ldiff): Don't call setf here, this makes for a load-time
dependency problem in cl-macs.el
2010-06-14 Stephen J. Turnbull <stephen@xemacs.org>
* term/vt100.el:
Refer to XEmacs, not GNU Emacs, in permissions.
* term/bg-mouse.el:
* term/sup-mouse.el:
Put copyright notice in canonical "Copyright DATE AUTHOR" form.
Refer to XEmacs, not GNU Emacs, in permissions.
* site-load.el:
Add permission boilerplate.
* mule/canna-leim.el:
* alist.el:
Refer to XEmacs, not APEL/this program, in permissions.
* mule/canna-leim.el:
Remove my copyright, I've assigned it to the FSF.
2010-06-14 Stephen J. Turnbull <stephen@xemacs.org>
* gtk.el:
* gtk-widget-accessors.el:
* gtk-package.el:
* gtk-marshal.el:
* gtk-compose.el:
* gnome.el:
Add copyright notice based on internal evidence.
2010-06-14 Stephen J. Turnbull <stephen@xemacs.org>
* easymenu.el: Add reference to COPYING to permission notice.
* gutter.el:
* gutter-items.el:
* menubar-items.el:
Fix typo "Xmacs" in permissions notice.
2010-06-14 Stephen J. Turnbull <stephen@xemacs.org>
* auto-save.el:
* font.el:
* fontconfig.el:
* mule/kinsoku.el:
Add "part of XEmacs" text to permission notice.
2010-10-14 Aidan Kehoe <kehoea@parhasard.net>
* byte-optimize.el (side-effect-free-fns):
* cl-macs.el (remf, getf):
* cl-extra.el (tailp, cl-set-getf, cl-do-remf):
* cl.el (ldiff, endp):
Tighten up Common Lisp compatibility for #'ldiff, #'endp, #'tailp;
add circularity checking for the first two.
#'cl-set-getf and #'cl-do-remf were Lisp implementations of
#'plist-put and #'plist-remprop; change the names to aliases,
changes the macros that use them to using #'plist-put and
#'plist-remprop directly.
2010-10-12 Aidan Kehoe <kehoea@parhasard.net>
* abbrev.el (fundamental-mode-abbrev-table, global-abbrev-table):
Create both these abbrev tables using the usual
#'define-abbrev-table calls, rather than attempting to
special-case them.
* cl-extra.el: Force cl-macs to be loaded here, if cl-extra.el is
being loaded interpreted. Previously other, later files would
redundantly call (load "cl-macs") when interpreted, it's more
reasonable to do it here, once.
* cmdloop.el (read-quoted-char-radix): Use defcustom here, we
don't have any dump-order dependencies that would prevent that.
* custom.el (eval-when-compile): Don't load cl-macs when
interpreted or when byte-compiling, rely on cl-extra.el in the
former case and the appropriate entry in bytecomp-load-hook in the
latter. Get rid of custom-declare-variable-list, we have no
dump-time dependencies that would require it.
* faces.el (eval-when-compile): Don't load cl-macs when
interpreted or when byte-compiling.
* packages.el: Remove some inaccurate comments.
* post-gc.el (cleanup-simple-finalizers): Use #'delete-if-not
here, now the order of preloaded-file-list has been changed to
make it available.
* subr.el (custom-declare-variable-list): Remove. No need for it.
Also remove a stub define-abbrev-table from this file, given the
current order of preloaded-file-list there's no need for it.
2010-10-10 Aidan Kehoe <kehoea@parhasard.net>
* bytecomp.el (byte-compile-constp) Forms quoted with FUNCTION are
also constant.
(byte-compile-initial-macro-environment): In #'the, if FORM is
constant and does not match TYPE, warn at byte-compile time.
2010-10-10 Aidan Kehoe <kehoea@parhasard.net>
* backquote.el (bq-vector-contents, bq-list*): Remove; the former
is equivalent to (append VECTOR nil), the latter to (list* ...).
(bq-process-2): Use (append VECTOR nil) instead of using
#'bq-vector-contents to convert to a list.
(bq-process-1): Now we use list* instead of bq-list
* subr.el (list*): Moved from cl.el, since it is now required to
be available the first time a backquoted form is encountered.
* cl.el (list*): Move to subr.el.
2010-09-16 Aidan Kehoe <kehoea@parhasard.net>
* test-harness.el (Check-Message):
Add an omitted comma here, thank you the buildbot.
2010-09-16 Aidan Kehoe <kehoea@parhasard.net>
* hash-table.el (hash-table-key-list, hash-table-value-list)
(hash-table-key-value-alist, hash-table-key-value-plist):
Remove some useless #'nreverse calls in these files; our hash
tables have no order, it's not helpful to pretend they do.
* behavior.el (read-behavior):
Do the same in this file, in some code evidently copied from
hash-table.el.
2010-09-16 Aidan Kehoe <kehoea@parhasard.net>
* info.el (Info-insert-dir):
* format.el (format-deannotate-region):
* files.el (cd, save-buffers-kill-emacs):
Use #'some, #'every and related functions for applying boolean
operations to lists, instead of rolling our own ones that cons and
don't short-circuit.
2010-09-16 Aidan Kehoe <kehoea@parhasard.net>
* bytecomp.el (byte-compile-initial-macro-environment):
* cl-macs.el (the):
Rephrase the docstring, make its implementation when compiling
files a little nicer.
2010-09-16 Aidan Kehoe <kehoea@parhasard.net>
* descr-text.el (unidata-initialize-unicodedata-database)
(unidata-initialize-unihan-database, describe-char-unicode-data)
(describe-char-unicode-data):
Wrap calls to the database functions with (with-fboundp ...),
avoiding byte compile warnings on builds without support for the
database functions.
(describe-char): (reduce #'max ...), not (apply #'max ...), no
need to cons needlessly.
(describe-char): Remove a redundant lambda wrapping
#'extent-properties.
(describe-char-unicode-data): Call #'nsubst when replacing "" with
nil in the result of #'split-string, instead of consing inside
mapcar.
2010-09-16 Aidan Kehoe <kehoea@parhasard.net>
* x-faces.el (x-available-font-sizes):
* specifier.el (let-specifier):
* package-ui.el (pui-add-required-packages):
* msw-faces.el (mswindows-available-font-sizes):
* modeline.el (modeline-minor-mode-menu):
* minibuf.el (minibuf-directory-files):
Replace the O2N (delq nil (mapcar (lambda (W) (and X Y)) Z)) with
the ON (mapcan (lambda (W) (and X (list Y))) Z) in these files.
2010-09-16 Aidan Kehoe <kehoea@parhasard.net>
* cl-macs.el (= < > <= >=):
When these functions are handed more than two arguments, and those
arguments have no side effects, transform to a series of two
argument calls, avoiding funcall in the byte-compiled code.
* mule/mule-cmds.el (finish-set-language-environment):
Take advantage of this change in a function called 256 times at
startup.
2010-09-16 Aidan Kehoe <kehoea@parhasard.net>
* bytecomp.el (byte-compile-function-form, byte-compile-quote)
(byte-compile-quote-form):
Warn at compile time, and error at runtime, if a (quote ...) or a
(function ...) form attempts to quote more than one object.
2010-09-16 Aidan Kehoe <kehoea@parhasard.net>
* byte-optimize.el (byte-optimize-apply): Transform (apply 'nconc
(mapcar ...)) to (mapcan ...); warn about use of the first idiom.
* update-elc.el (do-autoload-commands):
* packages.el (packages-find-package-library-path):
* frame.el (frame-list):
* extents.el (extent-descendants):
* etags.el (buffer-tag-table-files):
* dumped-lisp.el (preloaded-file-list):
* device.el (device-list):
* bytecomp-runtime.el (proclaim-inline, proclaim-notinline)
Use #'mapcan, not (apply #'nconc (mapcar ...) in all these files.
* bytecomp-runtime.el (eval-when-compile, eval-and-compile):
In passing, mention that these macros also evaluate the body when
interpreted.
tests/ChangeLog addition:
2011-02-07 Aidan Kehoe <kehoea@parhasard.net>
* automated/lisp-tests.el:
Test lexical scope for `block', `return-from'; add a
Known-Bug-Expect-Failure for a contorted example that fails when
byte-compiled.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Mon, 07 Feb 2011 12:01:24 +0000 |
parents | 39304a35b6b3 |
children | 0af042a0c116 |
rev | line source |
---|---|
428 | 1 /* Redisplay data structures. |
2 Copyright (C) 1994, 1995 Board of Trustees, University of Illinois. | |
3 Copyright (C) 1996 Chuck Thompson. | |
2518 | 4 Copyright (C) 1995, 1996, 2002, 2003, 2004 Ben Wing. |
428 | 5 |
6 This file is part of XEmacs. | |
7 | |
8 XEmacs is free software; you can redistribute it and/or modify it | |
9 under the terms of the GNU General Public License as published by the | |
10 Free Software Foundation; either version 2, or (at your option) any | |
11 later version. | |
12 | |
13 XEmacs is distributed in the hope that it will be useful, but WITHOUT | |
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
16 for more details. | |
17 | |
18 You should have received a copy of the GNU General Public License | |
19 along with XEmacs; see the file COPYING. If not, write to | |
20 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
21 Boston, MA 02111-1307, USA. */ | |
22 | |
23 /* Synched up with: Not in FSF. */ | |
24 | |
440 | 25 #ifndef INCLUDED_redisplay_h_ |
26 #define INCLUDED_redisplay_h_ | |
428 | 27 |
28 /* Redisplay DASSERT types */ | |
29 #define DB_DISP_POS 1 | |
30 #define DB_DISP_TEXT_LAYOUT 2 | |
31 #define DB_DISP_REDISPLAY 4 | |
32 | |
33 /* These are the possible return values from pixel_to_glyph_translation. */ | |
34 #define OVER_MODELINE 0 | |
35 #define OVER_TEXT 1 | |
36 #define OVER_OUTSIDE 2 | |
37 #define OVER_NOTHING 3 | |
38 #define OVER_BORDER 4 | |
39 #define OVER_TOOLBAR 5 | |
40 #define OVER_V_DIVIDER 6 | |
41 | |
42 #define NO_BLOCK -1 | |
43 | |
44 /* Imagine that the text in the buffer is displayed on a piece of paper | |
45 the width of the frame and very very tall. The line start cache is | |
46 an array of struct line_start_cache's, describing the start and | |
47 end buffer positions for a contiguous set of lines on that piece | |
48 of paper. */ | |
49 | |
50 typedef struct line_start_cache line_start_cache; | |
51 struct line_start_cache | |
52 { | |
665 | 53 Charbpos start, end; |
428 | 54 int height; |
55 }; | |
56 | |
57 typedef struct | |
58 { | |
59 Dynarr_declare (line_start_cache); | |
60 } line_start_cache_dynarr; | |
61 | |
62 /* The possible types of runes. | |
63 | |
64 #### The Lisp_Glyph type is broken. There should instead be a pixmap | |
65 type. Currently the device-specific output routines have to worry | |
66 about whether the glyph is textual or not, etc. For Mule this is | |
67 a big problem because you might need multiple fonts to display the | |
68 text. It also eliminates optimizations that could come from glumping | |
69 the text of multiple text glyphs together -- this makes displaying | |
70 binary files (with lots of control chars, etc.) very very slow. */ | |
71 | |
72 #define RUNE_BLANK 0 | |
73 #define RUNE_CHAR 1 | |
74 #define RUNE_DGLYPH 2 | |
75 #define RUNE_HLINE 3 | |
76 #define RUNE_VLINE 4 | |
77 | |
78 #define CURSOR_ON 0 | |
79 #define CURSOR_OFF 1 | |
80 #define NO_CURSOR 2 | |
81 #define NEXT_CURSOR 3 | |
82 #define IGNORE_CURSOR 4 | |
83 | |
4187 | 84 /* #### NOTE: these indexes depend on the order in which the faces are added |
85 to the cache in the function reset_face_cachels. */ | |
428 | 86 #define DEFAULT_INDEX (face_index) 0 |
87 #define MODELINE_INDEX (face_index) 1 | |
88 | |
89 /* A rune is a single display element, such as a printable character | |
90 or pixmap. Any single character in a buffer has one or more runes | |
91 (or zero, if the character is invisible) corresponding to it. | |
92 (Printable characters typically have one rune associated with them, | |
93 but control characters have two -- a ^ and a letter -- and other | |
94 non-printing characters (those displayed in octal) have four. */ | |
95 | |
96 /* WARNING! In compare_runes (one of the most heavily used functions) | |
97 two runes are compared. So please be careful with changes to this | |
98 structure. See comments in compare_runes. | |
99 | |
100 #### This should really be made smaller. | |
101 */ | |
432 | 102 |
1204 | 103 struct rune_dglyph |
104 { | |
105 Lisp_Object glyph; | |
106 Lisp_Object extent; /* extent rune is attached to, if any. | |
107 If this is a rune in the modeline | |
108 then this might be nil. */ | |
109 | |
110 int ascent; /* Ascent of this glyph, in pixels. */ | |
111 int descent; /* Descent of this glyph, in pixels. */ | |
112 int yoffset; /* Offset from line top to reach glyph top */ | |
113 int xoffset; /* Number of pixels that need to be | |
114 chopped off the left of the glyph. | |
115 This has the effect of shifting the | |
116 glyph to the left while still clipping | |
117 at XPOS. */ | |
118 }; | |
119 | |
428 | 120 typedef struct rune rune; |
121 struct rune | |
122 { | |
123 face_index findex; /* face rune is displayed with. The | |
124 face_index is an index into a | |
125 window-specific array of face cache | |
126 elements. Each face cache element | |
127 corresponds to one "merged face" | |
128 (the result of merging all the | |
129 faces that overlap the rune) and | |
130 contains the instance values for | |
131 each of the face properties in this | |
132 particular window. */ | |
133 | |
826 | 134 Charxpos charpos; /* buffer position this rune is displaying; |
428 | 135 for the modeline, the value here is a |
136 Charcount, but who's looking? */ | |
826 | 137 Charxpos endpos; /* if set this rune covers a range of pos; |
138 used in redisplay_move_cursor(). */ | |
4187 | 139 /* #### Chuck, what does it mean for a rune |
428 | 140 to cover a range of pos? I don't get |
141 this. */ | |
432 | 142 |
143 | |
428 | 144 short xpos; /* horizontal starting position in pixels */ |
145 short width; /* pixel width of rune */ | |
432 | 146 |
147 | |
428 | 148 unsigned char cursor_type; /* is this rune covered by the cursor? */ |
2642 | 149 unsigned int type; /* type of rune object */ |
4187 | 150 /* We used to do bitfields here, but if I |
151 (JV) count correctly that doesn't matter | |
152 for the size of the structure. All the bit | |
153 fiddling _does_ slow down redisplay by | |
154 about 10%. So don't do that */ | |
428 | 155 |
156 union /* Information specific to the type of rune */ | |
157 { | |
450 | 158 /* #### Glyphs are rare. Is it really necessary to waste 8 bytes on every |
428 | 159 rune for that?! */ |
160 /* DGLYPH */ | |
1204 | 161 struct rune_dglyph dglyph; |
428 | 162 |
163 /* CHAR */ | |
164 struct | |
165 { | |
867 | 166 Ichar ch; /* Character of this rune. */ |
428 | 167 } chr; |
168 | |
169 /* HLINE */ | |
170 struct | |
171 { | |
172 short thickness; /* how thick to make hline */ | |
173 short yoffset; /* how far down from top of line to put top */ | |
174 } hline; | |
175 } object; /* actual rune object */ | |
176 }; | |
177 | |
178 typedef struct | |
179 { | |
180 Dynarr_declare (rune); | |
181 } rune_dynarr; | |
182 | |
183 /* These must have distinct values. Note that the ordering actually | |
184 represents priority levels. TEXT has the lowest priority level. */ | |
185 enum display_type | |
186 { | |
187 TEXT, | |
188 LEFT_OUTSIDE_MARGIN, | |
189 LEFT_INSIDE_MARGIN, | |
190 RIGHT_INSIDE_MARGIN, | |
191 RIGHT_OUTSIDE_MARGIN, | |
192 OVERWRITE | |
193 }; | |
194 | |
195 /* A display block represents a run of text on a single line. | |
196 Apparently there is only one display block per line for each | |
197 of the types listed in `enum display_type'. | |
198 | |
199 A display block consists mostly of an array of runes, one per | |
200 atomic display element (printable character, pixmap, etc.). */ | |
201 | |
202 /* #### Yuckity yuckity yuck yuck yuck yuck yuck!! | |
203 | |
204 Chuck, I think you should redo this. It should not be the | |
205 responsibility of the device-specific code to worry about | |
206 the different faces. The generic stuff in redisplay-output.c | |
207 should glump things up into sub-blocks, each of which | |
208 corresponds to a single pixmap or a single run of text in | |
209 the same font. | |
210 | |
211 It might still make sense for the device-specific output routine | |
212 to get passed an entire display line. That way, it can make | |
213 calls to XDrawText() (which draws multiple runs of single-font | |
214 data) instead of XDrawString(). The reason for this is to | |
215 reduce the amount of X traffic, which will help things significantly | |
216 on a slow line. */ | |
217 | |
218 typedef struct display_block display_block; | |
219 struct display_block | |
220 { | |
221 enum display_type type; /* type of display block */ | |
222 | |
223 int start_pos; /* starting pixel position of block */ | |
224 int end_pos; /* ending pixel position of block */ | |
225 | |
226 rune_dynarr *runes; /* Dynamic array of runes */ | |
227 }; | |
228 | |
229 typedef struct | |
230 { | |
231 Dynarr_declare (display_block); | |
232 } display_block_dynarr; | |
233 | |
234 typedef struct layout_bounds_type | |
235 { | |
236 int left_out; | |
237 int left_in; | |
238 int left_white; | |
239 int right_white; | |
240 int right_in; | |
241 int right_out; | |
242 } layout_bounds; | |
243 | |
244 typedef struct glyph_block glyph_block; | |
245 struct glyph_block | |
246 { | |
247 Lisp_Object glyph; | |
248 Lisp_Object extent; | |
249 /* The rest are only used by margin routines. */ | |
250 face_index findex; | |
251 int active; | |
252 int width; | |
253 }; | |
254 | |
255 typedef struct | |
256 { | |
257 Dynarr_declare (glyph_block); | |
258 } glyph_block_dynarr; | |
259 | |
260 /*************************************************************************/ | |
617 | 261 /* display lines */ |
428 | 262 /*************************************************************************/ |
263 | |
826 | 264 /* Modeline commentary: IMO the modeline is handled very badly, we |
428 | 265 special case virtually *everything* in the redisplay routines for |
826 | 266 the modeline. The fact that dl->charpos can be either a buffer |
428 | 267 position or a char count highlights this. There is no abstraction at |
268 all that I can find and it means that the code is made very ugly as | |
269 a result. Either we should treat the modeline *entirely* separately, | |
270 or we should abstract to something that applies equally well to the | |
271 modeline and to buffer text, the things are not enormously different | |
272 after all and handling them identically at some level would | |
273 eliminate some bugs that still exist (mainly to do with modeline | |
274 handling). This problem doesn't help trying to implement gutters | |
275 which are somewhere in between buffer text and modeline text. | |
276 | |
277 Redisplay commentary: Everything in redisplay is tied very tightly | |
278 to the things that are being displayed, and the context, | |
279 e.g. buffers and windows. According to Chuck this is so that we can | |
280 get speed, which seems fine to me, however this usage is extended | |
442 | 281 too far down the redisplay routines IMO. At some level there should |
428 | 282 be functions that know how to display strings with extents and |
283 faces, regardless of buffer etc. After all the window system does | |
284 not care. <andy@xemacs.org> */ | |
285 | |
286 typedef struct display_line display_line; | |
287 struct display_line | |
288 { | |
289 short ypos; /* vertical position in pixels | |
290 of the baseline for this line. */ | |
291 unsigned short ascent, descent; /* maximum values for this line. | |
292 The ascent is the number of | |
293 pixels above the baseline, and | |
294 the descent is the number of | |
295 pixels below the baseline. | |
296 The descent includes the baseline | |
297 pixel-row itself, I think. */ | |
298 unsigned short clip; /* amount of bottom of line to clip | |
299 in pixels.*/ | |
300 unsigned short top_clip; /* amount of top of line to clip | |
301 in pixels.*/ | |
826 | 302 Charxpos charpos; /* first buffer position on line */ |
303 Charxpos end_charpos; /* last buffer position on line */ | |
304 Charcount offset; /* adjustment to charpos vals */ | |
428 | 305 Charcount num_chars; /* # of chars on line |
306 including expansion of tabs | |
307 and control chars */ | |
308 int cursor_elt; /* rune block of TEXT display | |
309 block cursor is at or -1 */ | |
310 char used_prop_data; /* can't incrementally update if line | |
311 used propagation data */ | |
312 | |
313 layout_bounds bounds; /* line boundary positions */ | |
314 | |
315 char modeline; /* t if this line is a modeline */ | |
316 | |
442 | 317 char line_continuation; /* t if this line continues to |
4187 | 318 next display line. */ |
442 | 319 |
428 | 320 /* Dynamic array of display blocks */ |
321 display_block_dynarr *display_blocks; | |
322 | |
323 /* Dynamic arrays of left and right glyph blocks */ | |
324 glyph_block_dynarr *left_glyphs; | |
325 glyph_block_dynarr *right_glyphs; | |
326 | |
327 face_index left_margin_findex; | |
328 face_index right_margin_findex; | |
329 face_index default_findex; | |
330 }; | |
331 | |
4207 | 332 #define DISPLAY_LINE_INIT(dl) \ |
333 do \ | |
334 { \ | |
335 xzero (dl); \ | |
336 dl.default_findex = DEFAULT_INDEX; \ | |
337 } \ | |
338 while (0) | |
339 | |
428 | 340 #define DISPLAY_LINE_HEIGHT(dl) \ |
341 (dl->ascent + dl->descent - (dl->clip + dl->top_clip)) | |
342 #define DISPLAY_LINE_YPOS(dl) \ | |
343 (dl->ypos - (dl->ascent - dl->top_clip)) | |
344 #define DISPLAY_LINE_YEND(dl) \ | |
345 ((dl->ypos + dl->descent) - dl->clip) | |
346 | |
347 typedef struct | |
348 { | |
349 Dynarr_declare (display_line); | |
350 } display_line_dynarr; | |
351 | |
352 /* The following two structures are used to represent an area to | |
353 displayed and where to display it. Using these two structures all | |
354 combinations of clipping and position can be accommodated. */ | |
355 | |
356 /* This represents an area to be displayed into. */ | |
357 typedef struct display_box display_box; | |
358 struct display_box | |
359 { | |
360 int xpos; /* absolute horizontal position of area */ | |
361 int ypos; /* absolute vertical position of area */ | |
362 int width, height; | |
363 }; | |
364 | |
365 /* This represents the area from a glyph to be displayed. */ | |
366 typedef struct display_glyph_area display_glyph_area; | |
367 struct display_glyph_area | |
368 { | |
369 int xoffset; /* horizontal offset of the glyph, +ve means | |
370 display the glyph with x offset by xoffset, | |
371 -ve means display starting xoffset into the | |
372 glyph. */ | |
373 int yoffset; /* vertical offset of the glyph, +ve means | |
374 display the glyph with y offset by yoffset, | |
375 -ve means display starting xoffset into the | |
376 glyph. */ | |
377 int width, height; /* width and height of glyph to display. */ | |
378 }; | |
379 | |
380 /* It could be argued that the following two structs belong in | |
381 extents.h, but they're only used by redisplay and it simplifies | |
382 the header files to put them here. */ | |
383 | |
384 typedef struct | |
385 { | |
386 Dynarr_declare (EXTENT); | |
387 } EXTENT_dynarr; | |
388 | |
389 struct font_metric_info | |
390 { | |
391 int width; | |
392 int height; /* always ascent + descent; for convenience */ | |
393 int ascent; | |
394 int descent; | |
395 | |
396 int proportional_p; | |
397 }; | |
398 | |
399 /* NOTE NOTE NOTE: Currently the positions in an extent fragment | |
826 | 400 structure are Bytexpos's, not Charxpos's. This could change. */ |
428 | 401 |
402 struct extent_fragment | |
403 { | |
404 Lisp_Object object; /* buffer or string */ | |
405 struct frame *frm; | |
826 | 406 Bytexpos pos, end; |
428 | 407 EXTENT_dynarr *extents; |
408 glyph_block_dynarr *begin_glyphs, *end_glyphs; | |
409 unsigned int invisible:1; | |
410 unsigned int invisible_ellipses:1; | |
411 unsigned int previously_invisible:1; | |
412 unsigned int invisible_ellipses_already_displayed:1; | |
413 }; | |
414 | |
415 #define EDGE_TOP 1 | |
416 #define EDGE_LEFT 2 | |
417 #define EDGE_BOTTOM 4 | |
418 #define EDGE_RIGHT 8 | |
419 #define EDGE_ALL (EDGE_TOP | EDGE_LEFT | EDGE_BOTTOM | EDGE_RIGHT) | |
420 | |
421 | |
422 /*************************************************************************/ | |
423 /* change flags */ | |
424 /*************************************************************************/ | |
425 | |
426 /* Quick flags to signal redisplay. redisplay() sets them all to 0 | |
427 when it finishes. If none of them are set when it starts, it | |
428 assumes that nothing needs to be done. Functions that make a change | |
429 that is (potentially) visible on the screen should set the | |
430 appropriate flag. | |
431 | |
432 If any of these flags are set, redisplay will look more carefully | |
433 to see if anything has really changed. */ | |
434 | |
442 | 435 /* Nonzero if the contents of a buffer have changed since the last time |
436 redisplay completed. */ | |
428 | 437 extern int buffers_changed; |
438 extern int buffers_changed_set; | |
439 | |
440 /* Nonzero if head_clip or tail_clip of a buffer has changed | |
442 | 441 since last redisplay that finished. */ |
428 | 442 extern int clip_changed; |
443 extern int clip_changed_set; | |
444 | |
442 | 445 /* Nonzero if any extent has changed since the last time redisplay completed. */ |
428 | 446 extern int extents_changed; |
447 extern int extents_changed_set; | |
448 | |
442 | 449 /* Nonzero if any face has changed since the last time redisplay completed. */ |
428 | 450 extern int faces_changed; |
451 | |
442 | 452 /* Nonzero means one or more frames have been marked as garbaged. */ |
428 | 453 extern int frame_changed; |
454 | |
455 /* True if any of the builtin display glyphs (continuation, | |
456 hscroll, control-arrow, etc) is in need of updating | |
457 somewhere. */ | |
458 extern int glyphs_changed; | |
459 extern int glyphs_changed_set; | |
460 | |
461 /* True if any displayed subwindow is in need of updating | |
462 somewhere. */ | |
463 extern int subwindows_changed; | |
464 extern int subwindows_changed_set; | |
465 | |
466 /* True if any displayed subwindow is in need of updating | |
467 somewhere. */ | |
468 extern int subwindows_state_changed; | |
469 extern int subwindows_state_changed_set; | |
470 | |
471 /* True if an icon is in need of updating somewhere. */ | |
472 extern int icon_changed; | |
473 extern int icon_changed_set; | |
474 | |
475 /* True if a menubar is in need of updating somewhere. */ | |
476 extern int menubar_changed; | |
477 extern int menubar_changed_set; | |
478 | |
442 | 479 /* True iff we should redraw the modelines on the next redisplay. */ |
428 | 480 extern int modeline_changed; |
481 extern int modeline_changed_set; | |
482 | |
442 | 483 /* Nonzero if point has changed in some buffer since the last time |
484 redisplay completed. */ | |
428 | 485 extern int point_changed; |
486 extern int point_changed_set; | |
487 | |
442 | 488 /* Nonzero if some frame has changed its size. */ |
428 | 489 extern int size_changed; |
490 | |
442 | 491 /* Nonzero if some device has signaled that it wants to change size. */ |
428 | 492 extern int asynch_device_change_pending; |
493 | |
905 | 494 /* Nonzero if some frame has changed the layout of internal elements |
495 (gutters or toolbars). */ | |
496 extern int frame_layout_changed; | |
497 | |
442 | 498 /* Nonzero if any toolbar has changed. */ |
428 | 499 extern int toolbar_changed; |
500 extern int toolbar_changed_set; | |
501 | |
442 | 502 /* Nonzero if any gutter has changed. */ |
428 | 503 extern int gutter_changed; |
504 extern int gutter_changed_set; | |
505 | |
442 | 506 /* Nonzero if any window has changed since the last time redisplay completed */ |
428 | 507 extern int windows_changed; |
508 | |
442 | 509 /* Nonzero if any frame's window structure has changed since the last |
510 time redisplay completed. */ | |
428 | 511 extern int windows_structure_changed; |
512 | |
513 /* These macros can be relatively expensive. Since they are often | |
514 called numerous times between each call to redisplay, we keep track | |
515 if each has already been called and don't bother doing most of the | |
516 work if it is currently set. */ | |
517 | |
518 #define MARK_TYPE_CHANGED(object) do { \ | |
519 if (!object##_changed_set) { \ | |
520 Lisp_Object MTC_devcons, MTC_concons; \ | |
521 DEVICE_LOOP_NO_BREAK (MTC_devcons, MTC_concons) \ | |
522 { \ | |
4187 | 523 Lisp_Object MTC_frmcons; \ |
524 struct device *MTC_d = XDEVICE (XCAR (MTC_devcons)); \ | |
525 DEVICE_FRAME_LOOP (MTC_frmcons, MTC_d) \ | |
428 | 526 { \ |
527 struct frame *MTC_f = XFRAME (XCAR (MTC_frmcons)); \ | |
4187 | 528 MTC_f->object##_changed = 1; \ |
428 | 529 MTC_f->modiff++; \ |
530 } \ | |
4187 | 531 MTC_d->object##_changed = 1; \ |
428 | 532 } \ |
533 object##_changed = 1; \ | |
534 object##_changed_set = 1; } \ | |
535 } while (0) | |
536 | |
872 | 537 void mark_buffers_changed (void); |
538 #define MARK_BUFFERS_CHANGED mark_buffers_changed () | |
539 void mark_clip_changed (void); | |
540 #define MARK_CLIP_CHANGED mark_clip_changed () | |
541 void mark_extents_changed (void); | |
542 #define MARK_EXTENTS_CHANGED mark_extents_changed () | |
543 void mark_icon_changed (void); | |
544 #define MARK_ICON_CHANGED mark_icon_changed () | |
545 void mark_menubar_changed (void); | |
546 #define MARK_MENUBAR_CHANGED mark_menubar_changed () | |
547 void mark_modeline_changed (void); | |
548 #define MARK_MODELINE_CHANGED mark_modeline_changed () | |
549 void mark_point_changed (void); | |
550 #define MARK_POINT_CHANGED mark_point_changed () | |
551 void mark_toolbar_changed (void); | |
552 #define MARK_TOOLBAR_CHANGED mark_toolbar_changed () | |
553 void mark_gutter_changed (void); | |
554 #define MARK_GUTTER_CHANGED mark_gutter_changed () | |
555 void mark_glyphs_changed (void); | |
556 #define MARK_GLYPHS_CHANGED mark_glyphs_changed () | |
557 void mark_subwindows_changed (void); | |
558 #define MARK_SUBWINDOWS_CHANGED mark_subwindows_changed () | |
559 void mark_subwindows_state_changed (void); | |
560 #define MARK_SUBWINDOWS_STATE_CHANGED mark_subwindows_state_changed () | |
428 | 561 |
562 #define CLASS_RESET_CHANGED_FLAGS(p) do { \ | |
563 (p)->buffers_changed = 0; \ | |
564 (p)->clip_changed = 0; \ | |
565 (p)->extents_changed = 0; \ | |
566 (p)->faces_changed = 0; \ | |
567 (p)->frame_changed = 0; \ | |
905 | 568 (p)->frame_layout_changed = 0; \ |
428 | 569 (p)->icon_changed = 0; \ |
570 (p)->menubar_changed = 0; \ | |
571 (p)->modeline_changed = 0; \ | |
572 (p)->point_changed = 0; \ | |
573 (p)->toolbar_changed = 0; \ | |
574 (p)->gutter_changed = 0; \ | |
575 (p)->glyphs_changed = 0; \ | |
576 (p)->subwindows_changed = 0; \ | |
577 (p)->subwindows_state_changed = 0; \ | |
578 (p)->windows_changed = 0; \ | |
579 (p)->windows_structure_changed = 0; \ | |
580 } while (0) | |
581 | |
582 #define GLOBAL_RESET_CHANGED_FLAGS do { \ | |
583 buffers_changed = 0; \ | |
584 clip_changed = 0; \ | |
585 extents_changed = 0; \ | |
586 frame_changed = 0; \ | |
905 | 587 frame_layout_changed = 0; \ |
428 | 588 icon_changed = 0; \ |
589 menubar_changed = 0; \ | |
590 modeline_changed = 0; \ | |
591 point_changed = 0; \ | |
592 toolbar_changed = 0; \ | |
593 gutter_changed = 0; \ | |
594 glyphs_changed = 0; \ | |
595 subwindows_changed = 0; \ | |
442 | 596 subwindows_state_changed = 0; \ |
428 | 597 windows_changed = 0; \ |
598 windows_structure_changed = 0; \ | |
599 } while (0) | |
600 | |
601 #define CLASS_REDISPLAY_FLAGS_CHANGEDP(p) \ | |
602 ( (p)->buffers_changed || \ | |
603 (p)->clip_changed || \ | |
604 (p)->extents_changed || \ | |
605 (p)->faces_changed || \ | |
606 (p)->frame_changed || \ | |
905 | 607 (p)->frame_layout_changed || \ |
428 | 608 (p)->icon_changed || \ |
609 (p)->menubar_changed || \ | |
610 (p)->modeline_changed || \ | |
611 (p)->point_changed || \ | |
612 (p)->toolbar_changed || \ | |
613 (p)->gutter_changed || \ | |
614 (p)->glyphs_changed || \ | |
442 | 615 (p)->size_changed || \ |
428 | 616 (p)->subwindows_changed || \ |
617 (p)->subwindows_state_changed || \ | |
618 (p)->windows_changed || \ | |
619 (p)->windows_structure_changed ) | |
620 | |
621 #define GLOBAL_REDISPLAY_FLAGS_CHANGEDP \ | |
622 ( buffers_changed || \ | |
623 clip_changed || \ | |
624 extents_changed || \ | |
625 faces_changed || \ | |
626 frame_changed || \ | |
905 | 627 frame_layout_changed || \ |
428 | 628 icon_changed || \ |
629 menubar_changed || \ | |
630 modeline_changed || \ | |
631 point_changed || \ | |
632 toolbar_changed || \ | |
633 gutter_changed || \ | |
634 glyphs_changed || \ | |
430 | 635 size_changed || \ |
428 | 636 subwindows_changed || \ |
637 subwindows_state_changed || \ | |
638 windows_changed || \ | |
639 windows_structure_changed ) | |
640 | |
641 | |
642 /* Anytime a console, device or frame is added or deleted we need to reset | |
643 these flags. */ | |
644 #define RESET_CHANGED_SET_FLAGS do { \ | |
645 buffers_changed_set = 0; \ | |
646 clip_changed_set = 0; \ | |
647 extents_changed_set = 0; \ | |
648 icon_changed_set = 0; \ | |
649 menubar_changed_set = 0; \ | |
650 modeline_changed_set = 0; \ | |
651 point_changed_set = 0; \ | |
652 toolbar_changed_set = 0; \ | |
653 gutter_changed_set = 0; \ | |
654 glyphs_changed_set = 0; \ | |
655 subwindows_changed_set = 0; \ | |
656 subwindows_state_changed_set = 0; \ | |
657 } while (0) | |
658 | |
659 | |
660 /*************************************************************************/ | |
661 /* redisplay global variables */ | |
662 /*************************************************************************/ | |
663 | |
1204 | 664 extern const struct sized_memory_description display_line_dynarr_description; |
665 | |
428 | 666 /* redisplay structure used by various utility routines. */ |
667 extern display_line_dynarr *cmotion_display_lines; | |
668 | |
669 /* Nonzero means truncate lines in all windows less wide than the frame. */ | |
670 extern int truncate_partial_width_windows; | |
671 | |
672 /* Nonzero if we're in a display critical section. */ | |
673 extern int in_display; | |
674 | |
1318 | 675 /* Whether we should delay size changes. Broken out of |
676 enter_redisplay_critical_section(). */ | |
677 extern int hold_frame_size_changes; | |
678 | |
428 | 679 /* Nonzero means no need to redraw the entire frame on resuming |
680 a suspended Emacs. This is useful on terminals with multiple pages, | |
681 where one page is used for Emacs and another for all else. */ | |
682 extern int no_redraw_on_reenter; | |
683 | |
442 | 684 /* Non-nil means flash the frame instead of ringing the bell. */ |
685 extern Lisp_Object Vvisible_bell; | |
428 | 686 |
687 /* Thickness of shadow border around 3D modelines. */ | |
688 extern Lisp_Object Vmodeline_shadow_thickness; | |
689 | |
690 /* Scroll if point lands on the bottom line and that line is partially | |
691 clipped. */ | |
692 extern int scroll_on_clipped_lines; | |
693 | |
694 extern Lisp_Object Vglobal_mode_string; | |
695 | |
696 /* The following two variables are defined in emacs.c and are used | |
697 to convey information discovered on the command line way early | |
698 (before *anything* is initialized). */ | |
699 | |
700 /* If non-zero, a window-system was specified on the command line. | |
701 Defined in emacs.c. */ | |
702 extern int display_arg; | |
703 | |
704 /* Type of display specified. Defined in emacs.c. */ | |
2367 | 705 extern const Ascbyte *display_use; |
428 | 706 |
707 /* Nonzero means reading single-character input with prompt | |
708 so put cursor on minibuffer after the prompt. */ | |
709 | |
710 extern int cursor_in_echo_area; | |
711 | |
712 extern Lisp_Object Qbar_cursor, Qcursor_in_echo_area, Vwindow_system; | |
713 | |
442 | 714 extern Lisp_Object Qtop_bottom; |
715 | |
428 | 716 |
717 /*************************************************************************/ | |
718 /* redisplay exported functions */ | |
719 /*************************************************************************/ | |
720 EXFUN (Fredraw_frame, 2); | |
721 | |
4815
6540302eedf5
Fix query_string_geometry lookup domain
Didier Verna <didier@lrde.epita.fr>
parents:
4207
diff
changeset
|
722 int redisplay_text_width_string (Lisp_Object domain, Lisp_Object face, |
867 | 723 Ibyte *nonreloc, Lisp_Object reloc, |
428 | 724 Bytecount offset, Bytecount len); |
442 | 725 int redisplay_frame (struct frame *f, int preemption_check); |
853 | 726 void redisplay_no_pre_idle_hook (void); |
428 | 727 void redisplay (void); |
853 | 728 Lisp_Object eval_within_redisplay (Lisp_Object dont_trust_this_damn_sucker); |
428 | 729 struct display_block *get_display_block_from_line (struct display_line *dl, |
730 enum display_type type); | |
731 layout_bounds calculate_display_line_boundaries (struct window *w, | |
732 int modeline); | |
665 | 733 Charbpos point_at_center (struct window *w, int type, Charbpos start, |
826 | 734 Charbpos point); |
735 int line_at_center (struct window *w, int type, Charbpos start, | |
736 Charbpos point); | |
428 | 737 int window_half_pixpos (struct window *w); |
738 void redisplay_echo_area (void); | |
739 void free_display_structs (struct window_mirror *mir); | |
740 void free_display_lines (display_line_dynarr *dla); | |
442 | 741 void mark_redisplay_structs (display_line_dynarr *dla); |
428 | 742 void generate_displayable_area (struct window *w, Lisp_Object disp_string, |
743 int xpos, int ypos, int width, int height, | |
744 display_line_dynarr* dl, | |
665 | 745 Charbpos start_pos, face_index default_face); |
438 | 746 /* `generate_title_string' in frame.c needs this */ |
747 void generate_formatted_string_db (Lisp_Object format_str, | |
748 Lisp_Object result_str, | |
749 struct window *w, | |
750 struct display_line *dl, | |
751 struct display_block *db, | |
752 face_index findex, | |
753 int min_pixpos, int max_pixpos, int type); | |
428 | 754 int real_current_modeline_height (struct window *w); |
755 int pixel_to_glyph_translation (struct frame *f, int x_coord, | |
756 int y_coord, int *col, int *row, | |
757 int *obj_x, int *obj_y, | |
665 | 758 struct window **w, Charbpos *charbpos, |
759 Charbpos *closest, Charcount *modeline_closest, | |
428 | 760 Lisp_Object *obj1, Lisp_Object *obj2); |
761 void glyph_to_pixel_translation (struct window *w, int char_x, | |
762 int char_y, int *pix_x, int *pix_y); | |
665 | 763 int point_in_line_start_cache (struct window *w, Charbpos point, |
428 | 764 int min_past); |
665 | 765 int point_would_be_visible (struct window *w, Charbpos startp, |
1708 | 766 Charbpos point, int partially); |
665 | 767 Charbpos start_of_last_line (struct window *w, Charbpos startp); |
768 Charbpos end_of_last_line (struct window *w, Charbpos startp); | |
769 Charbpos start_with_line_at_pixpos (struct window *w, Charbpos point, | |
826 | 770 int pixpos); |
665 | 771 Charbpos start_with_point_on_display_line (struct window *w, Charbpos point, |
826 | 772 int line); |
428 | 773 int redisplay_variable_changed (Lisp_Object sym, Lisp_Object *val, |
774 Lisp_Object in_object, int flags); | |
775 void redisplay_glyph_changed (Lisp_Object glyph, Lisp_Object property, | |
776 Lisp_Object locale); | |
777 | |
778 #ifdef MEMORY_USAGE_STATS | |
779 int compute_display_line_dynarr_usage (display_line_dynarr *dyn, | |
5157
1fae11d56ad2
redo memory-usage mechanism, add way of dynamically initializing Lisp objects
Ben Wing <ben@xemacs.org>
parents:
4815
diff
changeset
|
780 struct usage_stats *ustats); |
428 | 781 int compute_line_start_cache_dynarr_usage (line_start_cache_dynarr *dyn, |
5157
1fae11d56ad2
redo memory-usage mechanism, add way of dynamically initializing Lisp objects
Ben Wing <ben@xemacs.org>
parents:
4815
diff
changeset
|
782 struct usage_stats *ustats); |
428 | 783 #endif |
784 | |
785 | |
786 /* defined in redisplay-output.c */ | |
787 int get_next_display_block (layout_bounds bounds, | |
788 display_block_dynarr *dba, int start_pos, | |
789 int *next_start); | |
442 | 790 void redisplay_output_layout (Lisp_Object domain, |
428 | 791 Lisp_Object image_instance, |
617 | 792 struct display_box* db, |
793 struct display_glyph_area* dga, | |
794 face_index findex, int cursor_start, | |
795 int cursor_width, | |
428 | 796 int cursor_height); |
797 void redisplay_output_subwindow (struct window *w, | |
798 Lisp_Object image_instance, | |
617 | 799 struct display_box* db, |
800 struct display_glyph_area* dga, | |
801 face_index findex, int cursor_start, | |
802 int cursor_width, | |
428 | 803 int cursor_height); |
617 | 804 void redisplay_unmap_subwindows_maybe (struct frame* f, int x, int y, |
805 int width, int height); | |
428 | 806 void redisplay_output_pixmap (struct window *w, |
807 Lisp_Object image_instance, | |
617 | 808 struct display_box* db, |
809 struct display_glyph_area* dga, | |
810 face_index findex, int cursor_start, | |
811 int cursor_width, | |
428 | 812 int cursor_height, int offset_bitmap); |
813 int redisplay_calculate_display_boxes (struct display_line *dl, int xpos, | |
819 | 814 int xoffset, int yoffset, int start_pixpos, |
4187 | 815 int width, struct display_box* dest, |
428 | 816 struct display_glyph_area* src); |
817 int redisplay_normalize_glyph_area (struct display_box* dest, | |
818 struct display_glyph_area* glyphsrc); | |
819 void redisplay_clear_to_window_end (struct window *w, int ypos1, int ypos2); | |
820 void redisplay_clear_region (Lisp_Object window, face_index findex, int x, | |
821 int y, int width, int height); | |
448 | 822 void redisplay_clear_top_of_window (struct window *w); |
428 | 823 void redisplay_clear_bottom_of_window (struct window *w, |
824 display_line_dynarr *ddla, | |
825 int min_start, int max_end); | |
826 void redisplay_update_line (struct window *w, int first_line, | |
827 int last_line, int update_values); | |
828 void redisplay_output_window (struct window *w); | |
829 void bevel_modeline (struct window *w, struct display_line *dl); | |
665 | 830 int redisplay_move_cursor (struct window *w, Charbpos new_point, |
428 | 831 int no_output_end); |
832 void redisplay_redraw_cursor (struct frame *f, int run_begin_end_meths); | |
833 void output_display_line (struct window *w, display_line_dynarr *cdla, | |
834 display_line_dynarr *ddla, int line, | |
835 int force_start, int force_end); | |
442 | 836 void sync_display_line_structs (struct window *w, int line, int do_blocks, |
837 display_line_dynarr *cdla, | |
838 display_line_dynarr *ddla); | |
1318 | 839 void redisplay_redraw_exposed_area (struct frame *f, int x, int y, int width, |
840 int height); | |
841 void register_post_redisplay_action (void (*fun) (Lisp_Object), | |
842 Lisp_Object arg); | |
843 int begin_hold_frame_size_changes (void); | |
844 int enter_redisplay_critical_section (void); | |
845 void exit_redisplay_critical_section (int); | |
846 int enter_redisplay_critical_section_maybe (void); | |
847 void exit_redisplay_critical_section_maybe (int depth); | |
2518 | 848 int enter_redisplay_critical_section_if (Boolint from_outside); |
849 void exit_redisplay_critical_section_if (Boolint from_outside, int depth); | |
428 | 850 |
5348
39304a35b6b3
Don't commit suicide when an X device dies.
Mike Sperber <sperber@deinprogramm.de>
parents:
5157
diff
changeset
|
851 void redisplay_cancel_ritual_suicide(void); |
39304a35b6b3
Don't commit suicide when an X device dies.
Mike Sperber <sperber@deinprogramm.de>
parents:
5157
diff
changeset
|
852 |
440 | 853 #endif /* INCLUDED_redisplay_h_ */ |