Mercurial > hg > xemacs-beta
comparison src/redisplay.c @ 4928:ea701c23ed84
change text_width method to take a window, in preparation for unicode-internal changes
-------------------- ChangeLog entries follow: --------------------
src/ChangeLog addition:
2010-01-19 Ben Wing <ben@xemacs.org>
* console-impl.h (struct console_methods):
* console-stream.c (stream_text_width):
* redisplay-msw.c (mswindows_output_string):
* redisplay-msw.c (mswindows_text_width):
* redisplay-tty.c (tty_text_width):
* redisplay-xlike-inc.c (XLIKE_text_width):
* redisplay-xlike-inc.c (XLIKE_output_string):
* redisplay.c:
* redisplay.c (redisplay_window_text_width_ichar_string):
* redisplay.c (redisplay_text_width_string):
Change the text_width method to take a window instead of a frame.
Needed for Unicode-internal.
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Tue, 19 Jan 2010 11:21:34 -0600 |
parents | 91b3d00e717f |
children | 19a72041c5ed |
comparison
equal
deleted
inserted
replaced
4882:eab9498ecc0e | 4928:ea701c23ed84 |
---|---|
1 /* Display generation from window structure and buffer text. | 1 /* Display generation from window structure and buffer text. |
2 Copyright (C) 1994, 1995, 1996 Board of Trustees, University of Illinois. | 2 Copyright (C) 1994, 1995, 1996 Board of Trustees, University of Illinois. |
3 Copyright (C) 1995 Free Software Foundation, Inc. | 3 Copyright (C) 1995 Free Software Foundation, Inc. |
4 Copyright (C) 1995, 1996, 2000, 2001, 2002, 2003, 2005 Ben Wing. | 4 Copyright (C) 1995, 1996, 2000, 2001, 2002, 2003, 2005, 2010 Ben Wing. |
5 Copyright (C) 1995 Sun Microsystems, Inc. | 5 Copyright (C) 1995 Sun Microsystems, Inc. |
6 Copyright (C) 1996 Chuck Thompson. | 6 Copyright (C) 1996 Chuck Thompson. |
7 | 7 |
8 This file is part of XEmacs. | 8 This file is part of XEmacs. |
9 | 9 |
638 | 638 |
639 find_charsets_in_ichar_string (charsets, str, len); | 639 find_charsets_in_ichar_string (charsets, str, len); |
640 window = wrap_window (w); | 640 window = wrap_window (w); |
641 ensure_face_cachel_complete (WINDOW_FACE_CACHEL (w, findex), window, | 641 ensure_face_cachel_complete (WINDOW_FACE_CACHEL (w, findex), window, |
642 charsets); | 642 charsets); |
643 return DEVMETH (XDEVICE (FRAME_DEVICE (XFRAME (WINDOW_FRAME (w)))), | 643 return DEVMETH (WINDOW_XDEVICE (w), |
644 text_width, (XFRAME (WINDOW_FRAME (w)), | 644 text_width, (w, WINDOW_FACE_CACHEL (w, findex), str, |
645 WINDOW_FACE_CACHEL (w, findex), str, len)); | 645 len)); |
646 } | 646 } |
647 | 647 |
648 static Ichar_dynarr *rtw_ichar_dynarr; | 648 static Ichar_dynarr *rtw_ichar_dynarr; |
649 | 649 |
650 static int | 650 static int |
688 cachel.face = face; | 688 cachel.face = face; |
689 ensure_face_cachel_complete (&cachel, | 689 ensure_face_cachel_complete (&cachel, |
690 NILP (window) ? frame : window, | 690 NILP (window) ? frame : window, |
691 charsets); | 691 charsets); |
692 return DEVMETH (XDEVICE (FRAME_DEVICE (XFRAME (frame))), | 692 return DEVMETH (XDEVICE (FRAME_DEVICE (XFRAME (frame))), |
693 text_width, (XFRAME (frame), | 693 /* #### Not clear if we're always passed a window, but |
694 I think so. If not, we will get an abort here, | |
695 and then we need to either fix the callers to pass in | |
696 a window, or change *text_width() to take a domain | |
697 argument. */ | |
698 text_width, (XWINDOW (window), | |
694 &cachel, | 699 &cachel, |
695 Dynarr_atp (rtw_ichar_dynarr, 0), | 700 Dynarr_atp (rtw_ichar_dynarr, 0), |
696 Dynarr_length (rtw_ichar_dynarr))); | 701 Dynarr_length (rtw_ichar_dynarr))); |
697 } | 702 } |
698 | 703 |