Mercurial > hg > xemacs-beta
comparison src/redisplay-x.c @ 867:804517e16990
[xemacs-hg @ 2002-06-05 09:54:39 by ben]
Textual renaming: text/char names
abbrev.c, alloc.c, buffer.c, buffer.h, bytecode.c, callint.c, casefiddle.c, casetab.c, charset.h, chartab.c, chartab.h, cmds.c, console-gtk.h, console-msw.c, console-msw.h, console-stream.c, console-tty.c, console-x.c, console-x.h, console.h, data.c, device-msw.c, device-x.c, dialog-msw.c, dired-msw.c, dired.c, doc.c, doprnt.c, editfns.c, eldap.c, emodules.c, eval.c, event-Xt.c, event-gtk.c, event-msw.c, event-stream.c, event-unixoid.c, events.c, events.h, file-coding.c, file-coding.h, fileio.c, filelock.c, fns.c, font-lock.c, frame-gtk.c, frame-msw.c, frame-x.c, frame.c, glyphs-eimage.c, glyphs-msw.c, glyphs-x.c, glyphs.c, glyphs.h, gpmevent.c, gui-x.c, gui-x.h, gui.c, gui.h, hpplay.c, indent.c, insdel.c, insdel.h, intl-win32.c, keymap.c, line-number.c, line-number.h, lisp-disunion.h, lisp-union.h, lisp.h, lread.c, lrecord.h, lstream.c, lstream.h, md5.c, menubar-msw.c, menubar-x.c, menubar.c, minibuf.c, mule-ccl.c, mule-charset.c, mule-coding.c, mule-wnnfns.c, ndir.h, nt.c, objects-gtk.c, objects-gtk.h, objects-msw.c, objects-tty.c, objects-x.c, objects.c, objects.h, postgresql.c, print.c, process-nt.c, process-unix.c, process.c, procimpl.h, realpath.c, redisplay-gtk.c, redisplay-msw.c, redisplay-output.c, redisplay-tty.c, redisplay-x.c, redisplay.c, redisplay.h, regex.c, search.c, select-common.h, select-gtk.c, select-x.c, sound.h, symbols.c, syntax.c, syntax.h, sysdep.c, sysdep.h, sysdir.h, sysfile.h, sysproc.h, syspwd.h, systime.h, syswindows.h, termcap.c, tests.c, text.c, text.h, toolbar-common.c, tooltalk.c, ui-gtk.c, unexnt.c, unicode.c, win32.c: Text/char naming rationalization.
[a] distinguish between "charptr" when it refers to operations on
the pointer itself and when it refers to operations on text; and
[b] use consistent naming for everything referring to internal
format, i.e.
Itext == text in internal format
Ibyte == a byte in such text
Ichar == a char as represented in internal character format
thus e.g.
set_charptr_emchar -> set_itext_ichar
The pre and post tags on either side of this change are:
pre-internal-format-textual-renaming
post-internal-format-textual-renaming
See the Internals Manual for details of exactly how this was done,
how to handle the change in your workspace, etc.
author | ben |
---|---|
date | Wed, 05 Jun 2002 09:58:45 +0000 |
parents | e7ee5f8bde58 |
children | 79c6ff3eef26 |
comparison
equal
deleted
inserted
replaced
866:613552a02607 | 867:804517e16990 |
---|---|
125 Returns the number of runs actually used. */ | 125 Returns the number of runs actually used. */ |
126 | 126 |
127 static int | 127 static int |
128 separate_textual_runs (unsigned char *text_storage, | 128 separate_textual_runs (unsigned char *text_storage, |
129 struct textual_run *run_storage, | 129 struct textual_run *run_storage, |
130 const Emchar *str, Charcount len) | 130 const Ichar *str, Charcount len) |
131 { | 131 { |
132 Lisp_Object prev_charset = Qunbound; /* not Qnil because that is a | 132 Lisp_Object prev_charset = Qunbound; /* not Qnil because that is a |
133 possible valid charset when | 133 possible valid charset when |
134 MULE is not defined */ | 134 MULE is not defined */ |
135 int runs_so_far = 0; | 135 int runs_so_far = 0; |
139 int need_ccl_conversion = 0; | 139 int need_ccl_conversion = 0; |
140 #endif | 140 #endif |
141 | 141 |
142 for (i = 0; i < len; i++) | 142 for (i = 0; i < len; i++) |
143 { | 143 { |
144 Emchar ch = str[i]; | 144 Ichar ch = str[i]; |
145 Lisp_Object charset; | 145 Lisp_Object charset; |
146 int byte1, byte2; | 146 int byte1, byte2; |
147 int dimension; | 147 int dimension; |
148 int graphic; | 148 int graphic; |
149 | 149 |
150 BREAKUP_EMCHAR (ch, charset, byte1, byte2); | 150 BREAKUP_ICHAR (ch, charset, byte1, byte2); |
151 dimension = XCHARSET_DIMENSION (charset); | 151 dimension = XCHARSET_DIMENSION (charset); |
152 graphic = XCHARSET_GRAPHIC (charset); | 152 graphic = XCHARSET_GRAPHIC (charset); |
153 | 153 |
154 if (!EQ (charset, prev_charset)) | 154 if (!EQ (charset, prev_charset)) |
155 { | 155 { |
243 Given a string and a face, return the string's length in pixels when | 243 Given a string and a face, return the string's length in pixels when |
244 displayed in the font associated with the face. | 244 displayed in the font associated with the face. |
245 */ | 245 */ |
246 | 246 |
247 static int | 247 static int |
248 x_text_width (struct frame *f, struct face_cachel *cachel, const Emchar *str, | 248 x_text_width (struct frame *f, struct face_cachel *cachel, const Ichar *str, |
249 Charcount len) | 249 Charcount len) |
250 { | 250 { |
251 int width_so_far = 0; | 251 int width_so_far = 0; |
252 unsigned char *text_storage = (unsigned char *) ALLOCA (2 * len); | 252 unsigned char *text_storage = (unsigned char *) ALLOCA (2 * len); |
253 struct textual_run *runs = alloca_array (struct textual_run, len); | 253 struct textual_run *runs = alloca_array (struct textual_run, len); |
320 x_output_display_block (struct window *w, struct display_line *dl, int block, | 320 x_output_display_block (struct window *w, struct display_line *dl, int block, |
321 int start, int end, int start_pixpos, int cursor_start, | 321 int start, int end, int start_pixpos, int cursor_start, |
322 int cursor_width, int cursor_height) | 322 int cursor_width, int cursor_height) |
323 { | 323 { |
324 struct frame *f = XFRAME (w->frame); | 324 struct frame *f = XFRAME (w->frame); |
325 Emchar_dynarr *buf = Dynarr_new (Emchar); | 325 Ichar_dynarr *buf = Dynarr_new (Ichar); |
326 Lisp_Object window; | 326 Lisp_Object window; |
327 | 327 |
328 struct display_block *db = Dynarr_atp (dl->display_blocks, block); | 328 struct display_block *db = Dynarr_atp (dl->display_blocks, block); |
329 rune_dynarr *rba = db->runes; | 329 rune_dynarr *rba = db->runes; |
330 struct rune *rb; | 330 struct rune *rb; |
343 return; | 343 return; |
344 | 344 |
345 findex = rb->findex; | 345 findex = rb->findex; |
346 xpos = rb->xpos; | 346 xpos = rb->xpos; |
347 if (rb->type == RUNE_CHAR) | 347 if (rb->type == RUNE_CHAR) |
348 charset = emchar_charset (rb->object.chr.ch); | 348 charset = ichar_charset (rb->object.chr.ch); |
349 | 349 |
350 if (end < 0) | 350 if (end < 0) |
351 end = Dynarr_length (rba); | 351 end = Dynarr_length (rba); |
352 Dynarr_reset (buf); | 352 Dynarr_reset (buf); |
353 | 353 |
355 { | 355 { |
356 rb = Dynarr_atp (rba, elt); | 356 rb = Dynarr_atp (rba, elt); |
357 | 357 |
358 if (rb->findex == findex && rb->type == RUNE_CHAR | 358 if (rb->findex == findex && rb->type == RUNE_CHAR |
359 && rb->object.chr.ch != '\n' && rb->cursor_type != CURSOR_ON | 359 && rb->object.chr.ch != '\n' && rb->cursor_type != CURSOR_ON |
360 && EQ (charset, emchar_charset (rb->object.chr.ch))) | 360 && EQ (charset, ichar_charset (rb->object.chr.ch))) |
361 { | 361 { |
362 Dynarr_add (buf, rb->object.chr.ch); | 362 Dynarr_add (buf, rb->object.chr.ch); |
363 width += rb->width; | 363 width += rb->width; |
364 elt++; | 364 elt++; |
365 } | 365 } |
378 | 378 |
379 if (rb->type == RUNE_CHAR) | 379 if (rb->type == RUNE_CHAR) |
380 { | 380 { |
381 findex = rb->findex; | 381 findex = rb->findex; |
382 xpos = rb->xpos; | 382 xpos = rb->xpos; |
383 charset = emchar_charset (rb->object.chr.ch); | 383 charset = ichar_charset (rb->object.chr.ch); |
384 | 384 |
385 if (rb->cursor_type == CURSOR_ON) | 385 if (rb->cursor_type == CURSOR_ON) |
386 { | 386 { |
387 if (rb->object.chr.ch == '\n') | 387 if (rb->object.chr.ch == '\n') |
388 { | 388 { |
745 | 745 |
746 W Window that the text is to be displayed in. | 746 W Window that the text is to be displayed in. |
747 DL Display line that this text is on. The values in the | 747 DL Display line that this text is on. The values in the |
748 structure are used to determine the vertical position and | 748 structure are used to determine the vertical position and |
749 clipping range of the text. | 749 clipping range of the text. |
750 BUF Dynamic array of Emchars specifying what is actually to be | 750 BUF Dynamic array of Ichars specifying what is actually to be |
751 drawn. | 751 drawn. |
752 XPOS X position in pixels where the text should start being drawn. | 752 XPOS X position in pixels where the text should start being drawn. |
753 XOFFSET Number of pixels to be chopped off the left side of the | 753 XOFFSET Number of pixels to be chopped off the left side of the |
754 text. The effect is as if the text were shifted to the | 754 text. The effect is as if the text were shifted to the |
755 left this many pixels and clipped at XPOS. | 755 left this many pixels and clipped at XPOS. |
767 Starting Y position of cursor is the top of the text line. | 767 Starting Y position of cursor is the top of the text line. |
768 The cursor is drawn sometimes whether or not CURSOR is set. ??? | 768 The cursor is drawn sometimes whether or not CURSOR is set. ??? |
769 ****************************************************************************/ | 769 ****************************************************************************/ |
770 void | 770 void |
771 x_output_string (struct window *w, struct display_line *dl, | 771 x_output_string (struct window *w, struct display_line *dl, |
772 Emchar_dynarr *buf, int xpos, int xoffset, int clip_start, | 772 Ichar_dynarr *buf, int xpos, int xoffset, int clip_start, |
773 int width, face_index findex, int cursor, | 773 int width, face_index findex, int cursor, |
774 int cursor_start, int cursor_width, int cursor_height) | 774 int cursor_start, int cursor_width, int cursor_height) |
775 { | 775 { |
776 /* General variables */ | 776 /* General variables */ |
777 struct frame *f = XFRAME (w->frame); | 777 struct frame *f = XFRAME (w->frame); |